RUN: /usr/share/launchpad-buildd/slavebin/slave-prep Forking launchpad-buildd slave process... Kernel version: Linux bos02-s390x-014 4.4.0-109-generic #132-Ubuntu SMP Tue Jan 9 19:58:22 UTC 2018 s390x Buildd toolchain package versions: launchpad-buildd_157 python-lpbuildd_157 sbuild_0.67.0-2ubuntu7.1 bzr-builder_0.7.3+bzr174~ppa13~ubuntu14.10.1 bzr_2.7.0-2ubuntu3.1 git-build-recipe_0.3.4~git201611291343.dcee459~ubuntu16.04.1 git_1:2.7.4-0ubuntu1.3 dpkg-dev_1.18.4ubuntu1.3 python-debian_0.1.27ubuntu2. Syncing the system clock with the buildd NTP service... 15 Jan 09:59:52 ntpdate[2122]: adjust time server 10.211.37.1 offset -0.000261 sec RUN: /usr/share/launchpad-buildd/slavebin/in-target unpack-chroot --backend=chroot --series=bionic --arch=s390x PACKAGEBUILD-14111329 /home/buildd/filecache-default/c63540de4962374dad549ddd7685c5c502845718 Creating target for build PACKAGEBUILD-14111329 RUN: /usr/share/launchpad-buildd/slavebin/in-target mount-chroot --backend=chroot --series=bionic --arch=s390x PACKAGEBUILD-14111329 Starting target for build PACKAGEBUILD-14111329 RUN: /usr/share/launchpad-buildd/slavebin/in-target override-sources-list --backend=chroot --series=bionic --arch=s390x PACKAGEBUILD-14111329 'deb http://ppa.launchpad.net/ubuntu-toolchain-r/test/ubuntu bionic main' 'deb http://ppa.launchpad.net/ubuntu-toolchain-r/volatile/ubuntu bionic main' 'deb http://ftpmaster.internal/ubuntu bionic main restricted universe multiverse' 'deb http://ftpmaster.internal/ubuntu bionic-security main restricted universe multiverse' 'deb http://ftpmaster.internal/ubuntu bionic-updates main restricted universe multiverse' Overriding sources.list in build-PACKAGEBUILD-14111329 RUN: /usr/share/launchpad-buildd/slavebin/in-target add-trusted-keys --backend=chroot --series=bionic --arch=s390x PACKAGEBUILD-14111329 Adding trusted keys to build-PACKAGEBUILD-14111329 Warning: apt-key output should not be parsed (stdout is not a terminal) OK Warning: apt-key output should not be parsed (stdout is not a terminal) /etc/apt/trusted.gpg -------------------- pub rsa1024 2009-10-22 [SC] 60C3 1780 3A41 BA51 845E 371A 1E93 77A2 BA9E F27F uid [ unknown] Launchpad Toolchain builds /etc/apt/trusted.gpg.d/ubuntu-keyring-2012-archive.gpg ------------------------------------------------------ pub rsa4096 2012-05-11 [SC] 790B C727 7767 219C 42C8 6F93 3B4F E6AC C0B2 1F32 uid [ unknown] Ubuntu Archive Automatic Signing Key (2012) /etc/apt/trusted.gpg.d/ubuntu-keyring-2012-cdimage.gpg ------------------------------------------------------ pub rsa4096 2012-05-11 [SC] 8439 38DF 228D 22F7 B374 2BC0 D94A A3F0 EFE2 1092 uid [ unknown] Ubuntu CD Image Automatic Signing Key (2012) RUN: /usr/share/launchpad-buildd/slavebin/in-target update-debian-chroot --backend=chroot --series=bionic --arch=s390x PACKAGEBUILD-14111329 Updating target for build PACKAGEBUILD-14111329 Get:1 http://ftpmaster.internal/ubuntu bionic InRelease [235 kB] Get:2 http://ppa.launchpad.net/ubuntu-toolchain-r/test/ubuntu bionic InRelease [15.4 kB] Get:3 http://ppa.launchpad.net/ubuntu-toolchain-r/volatile/ubuntu bionic InRelease [15.4 kB] Get:4 http://ftpmaster.internal/ubuntu bionic-security InRelease [65.4 kB] Get:5 http://ppa.launchpad.net/ubuntu-toolchain-r/test/ubuntu bionic/main s390x Packages [16.0 kB] Get:6 http://ftpmaster.internal/ubuntu bionic-updates InRelease [65.4 kB] Get:7 http://ppa.launchpad.net/ubuntu-toolchain-r/test/ubuntu bionic/main Translation-en [9132 B] Get:8 http://ftpmaster.internal/ubuntu bionic/main s390x Packages [942 kB] Get:9 http://ppa.launchpad.net/ubuntu-toolchain-r/volatile/ubuntu bionic/main s390x Packages [4452 B] Get:10 http://ftpmaster.internal/ubuntu bionic/main Translation-en [518 kB] Get:11 http://ppa.launchpad.net/ubuntu-toolchain-r/volatile/ubuntu bionic/main Translation-en [4552 B] Get:12 http://ftpmaster.internal/ubuntu bionic/restricted Translation-en [2384 B] Get:13 http://ftpmaster.internal/ubuntu bionic/universe s390x Packages [8061 kB] Get:14 http://ftpmaster.internal/ubuntu bionic/universe Translation-en [4941 kB] Get:15 http://ftpmaster.internal/ubuntu bionic/multiverse s390x Packages [125 kB] Get:16 http://ftpmaster.internal/ubuntu bionic/multiverse Translation-en [109 kB] Fetched 15.1 MB in 3s (5003 kB/s) Reading package lists... Reading package lists... Building dependency tree... Reading state information... Calculating upgrade... The following packages were automatically installed and are no longer required: g++-7 libasn1-8-heimdal libcurl3-gnutls libgssapi-krb5-2 libgssapi3-heimdal libhcrypto4-heimdal libheimbase1-heimdal libheimntlm0-heimdal libhx509-5-heimdal libidn2-0 libk5crypto3 libkeyutils1 libkrb5-26-heimdal libkrb5-3 libkrb5support0 libldap-2.4-2 libldap-common libnghttp2-14 libpsl5 libroken18-heimdal librtmp1 libsasl2-2 libsasl2-modules-db libstdc++-7-dev libunistring0 libwind0-heimdal Use 'sudo apt autoremove' to remove them. The following NEW packages will be installed: cpp-8 g++-8 gcc-8 gcc-8-base libgcc-8-dev libnghttp2-14 libstdc++-8-dev The following packages will be upgraded: adduser apt apt-transport-https base-files base-passwd binutils binutils-common binutils-s390x-linux-gnu bsdutils build-essential coreutils cpp cpp-7 debconf debianutils dpkg dpkg-dev e2fslibs e2fsprogs fdisk findutils g++ g++-7 gcc gcc-7 gcc-7-base gnupg gnupg-agent gpgv init init-system-helpers libapparmor1 libapt-pkg5.0 libasn1-8-heimdal libassuan0 libatomic1 libbinutils libblkid1 libc-bin libc-dev-bin libc6 libc6-dev libcap-ng0 libcap2 libcc1-0 libcomerr2 libcurl3-gnutls libdpkg-perl libfdisk1 libgcc-7-dev libgcc1 libgcrypt20 libgomp1 libgpg-error0 libgssapi3-heimdal libhcrypto4-heimdal libheimbase1-heimdal libheimntlm0-heimdal libhogweed4 libhx509-5-heimdal libidn11 libidn2-0 libip4tc0 libitm1 libkeyutils1 libkrb5-26-heimdal liblockfile-bin liblockfile1 libmount1 libnettle6 libnpth0 libp11-kit0 libpcre3 libperl5.26 libpng16-16 libpsl5 libroken18-heimdal libseccomp2 libselinux1 libsemanage-common libsemanage1 libsmartcols1 libsqlite3-0 libss2 libssl1.0.0 libstdc++-7-dev libstdc++6 libsystemd0 libtasn1-6 libudev1 libuuid1 libwind0-heimdal linux-libc-dev lsb-base mount multiarch-support openssl optipng perl perl-base perl-modules-5.26 pinentry-curses sensible-utils systemd systemd-sysv sysvinit-utils tzdata util-linux 108 upgraded, 7 newly installed, 0 to remove and 0 not upgraded. Need to get 143 MB of archives. After this operation, 399 MB of additional disk space will be used. Get:1 http://ppa.launchpad.net/ubuntu-toolchain-r/test/ubuntu bionic/main s390x gcc-8-base s390x 8-20180110-1ubuntu1 [17.9 kB] Get:2 http://ftpmaster.internal/ubuntu bionic/main s390x perl-modules-5.26 all 5.26.1-3 [2761 kB] Get:3 http://ppa.launchpad.net/ubuntu-toolchain-r/test/ubuntu bionic/main s390x libgcc1 s390x 1:8-20180110-1ubuntu1 [24.8 kB] Get:4 http://ppa.launchpad.net/ubuntu-toolchain-r/test/ubuntu bionic/main s390x libstdc++6 s390x 8-20180110-1ubuntu1 [395 kB] Get:5 http://ppa.launchpad.net/ubuntu-toolchain-r/test/ubuntu bionic/main s390x libgomp1 s390x 8-20180110-1ubuntu1 [70.1 kB] Get:6 http://ppa.launchpad.net/ubuntu-toolchain-r/test/ubuntu bionic/main s390x libitm1 s390x 8-20180110-1ubuntu1 [26.9 kB] Get:7 http://ppa.launchpad.net/ubuntu-toolchain-r/test/ubuntu bionic/main s390x libcc1-0 s390x 8-20180110-1ubuntu1 [36.9 kB] Get:8 http://ppa.launchpad.net/ubuntu-toolchain-r/test/ubuntu bionic/main s390x libatomic1 s390x 8-20180110-1ubuntu1 [8360 B] Get:9 http://ppa.launchpad.net/ubuntu-toolchain-r/test/ubuntu bionic/main s390x cpp-8 s390x 8-20180110-1ubuntu1 [29.1 MB] Get:10 http://ftpmaster.internal/ubuntu bionic/main s390x libperl5.26 s390x 5.26.1-3 [3372 kB] Get:11 http://ftpmaster.internal/ubuntu bionic/main s390x perl s390x 5.26.1-3 [201 kB] Get:12 http://ftpmaster.internal/ubuntu bionic/main s390x perl-base s390x 5.26.1-3 [1310 kB] Get:13 http://ftpmaster.internal/ubuntu bionic/main s390x libc6-dev s390x 2.26-0ubuntu2 [2022 kB] Get:14 http://ftpmaster.internal/ubuntu bionic/main s390x libc-dev-bin s390x 2.26-0ubuntu2 [62.8 kB] Get:15 http://ftpmaster.internal/ubuntu bionic/main s390x linux-libc-dev s390x 4.13.0-25.29 [958 kB] Get:16 http://ftpmaster.internal/ubuntu bionic/main s390x libc6 s390x 2.26-0ubuntu2 [2342 kB] Get:17 http://ftpmaster.internal/ubuntu bionic/main s390x init-system-helpers all 1.51 [37.3 kB] Get:18 http://ftpmaster.internal/ubuntu bionic/main s390x base-files s390x 10ubuntu1 [55.9 kB] Get:19 http://ftpmaster.internal/ubuntu bionic/main s390x bsdutils s390x 1:2.30.2-0.1ubuntu1 [57.9 kB] Get:20 http://ftpmaster.internal/ubuntu bionic/main s390x coreutils s390x 8.26-3ubuntu4 [1197 kB] Get:21 http://ftpmaster.internal/ubuntu bionic/main s390x debianutils s390x 4.8.4 [85.2 kB] Get:22 http://ftpmaster.internal/ubuntu bionic/main s390x dpkg s390x 1.19.0.4ubuntu1 [1122 kB] Get:23 http://ftpmaster.internal/ubuntu bionic/main s390x e2fslibs s390x 1.43.8-1ubuntu1 [153 kB] Get:24 http://ftpmaster.internal/ubuntu bionic/main s390x e2fsprogs s390x 1.43.8-1ubuntu1 [479 kB] Get:25 http://ftpmaster.internal/ubuntu bionic/main s390x findutils s390x 4.6.0+git+20170828-2 [287 kB] Get:26 http://ftpmaster.internal/ubuntu bionic/main s390x libuuid1 s390x 2.30.2-0.1ubuntu1 [14.9 kB] Get:27 http://ftpmaster.internal/ubuntu bionic/main s390x libblkid1 s390x 2.30.2-0.1ubuntu1 [112 kB] Get:28 http://ftpmaster.internal/ubuntu bionic/main s390x libsmartcols1 s390x 2.30.2-0.1ubuntu1 [74.9 kB] Get:29 http://ftpmaster.internal/ubuntu bionic/main s390x libfdisk1 s390x 2.30.2-0.1ubuntu1 [145 kB] Get:30 http://ftpmaster.internal/ubuntu bionic/main s390x libpcre3 s390x 2:8.39-8 [154 kB] Get:31 http://ftpmaster.internal/ubuntu bionic/main s390x libselinux1 s390x 2.7-2 [64.0 kB] Get:32 http://ftpmaster.internal/ubuntu bionic/main s390x libmount1 s390x 2.30.2-0.1ubuntu1 [122 kB] Get:33 http://ftpmaster.internal/ubuntu bionic/main s390x fdisk s390x 2.30.2-0.1ubuntu1 [100 kB] Get:34 http://ftpmaster.internal/ubuntu bionic/main s390x util-linux s390x 2.30.2-0.1ubuntu1 [845 kB] Get:35 http://ftpmaster.internal/ubuntu bionic/main s390x base-passwd s390x 3.5.44 [46.2 kB] Get:36 http://ftpmaster.internal/ubuntu bionic/main s390x libc-bin s390x 2.26-0ubuntu2 [540 kB] Get:37 http://ftpmaster.internal/ubuntu bionic/main s390x sysvinit-utils s390x 2.88dsf-59.10ubuntu1 [18.2 kB] Get:38 http://ftpmaster.internal/ubuntu bionic/main s390x libudev1 s390x 235-3ubuntu3 [51.4 kB] Get:39 http://ftpmaster.internal/ubuntu bionic/main s390x libapt-pkg5.0 s390x 1.6~alpha5 [724 kB] Get:40 http://ftpmaster.internal/ubuntu bionic/main s390x debconf all 1.5.65 [124 kB] Get:41 http://ftpmaster.internal/ubuntu bionic/main s390x adduser all 3.116ubuntu1 [163 kB] Get:42 http://ftpmaster.internal/ubuntu bionic/main s390x libgpg-error0 s390x 1.27-5 [35.4 kB] Get:43 http://ftpmaster.internal/ubuntu bionic/main s390x libgcrypt20 s390x 1.8.1-4 [350 kB] Get:44 http://ftpmaster.internal/ubuntu bionic/main s390x gpgv s390x 2.1.15-1ubuntu8 [171 kB] Get:45 http://ftpmaster.internal/ubuntu bionic/main s390x libseccomp2 s390x 2.3.1-2.1ubuntu3 [40.8 kB] Get:46 http://ftpmaster.internal/ubuntu bionic/main s390x apt s390x 1.6~alpha5 [1111 kB] Get:47 http://ftpmaster.internal/ubuntu bionic/main s390x libapparmor1 s390x 2.11.0-2ubuntu18 [27.8 kB] Get:48 http://ftpmaster.internal/ubuntu bionic/main s390x libcap2 s390x 1:2.25-1.2 [13.2 kB] Get:49 http://ftpmaster.internal/ubuntu bionic/main s390x libidn11 s390x 1.33-2.1 [44.3 kB] Get:50 http://ftpmaster.internal/ubuntu bionic/main s390x libip4tc0 s390x 1.6.1-2ubuntu2 [19.3 kB] Get:51 http://ftpmaster.internal/ubuntu bionic/main s390x mount s390x 2.30.2-0.1ubuntu1 [106 kB] Get:52 http://ftpmaster.internal/ubuntu bionic/main s390x systemd s390x 235-3ubuntu3 [2570 kB] Get:53 http://ftpmaster.internal/ubuntu bionic/main s390x libsystemd0 s390x 235-3ubuntu3 [180 kB] Get:54 http://ftpmaster.internal/ubuntu bionic/main s390x init s390x 1.51 [5864 B] Get:55 http://ftpmaster.internal/ubuntu bionic/main s390x systemd-sysv s390x 235-3ubuntu3 [13.1 kB] Get:56 http://ftpmaster.internal/ubuntu bionic/main s390x libcap-ng0 s390x 0.7.7-3.1 [10.7 kB] Get:57 http://ftpmaster.internal/ubuntu bionic/main s390x libcomerr2 s390x 1.43.8-1ubuntu1 [11.1 kB] Get:58 http://ftpmaster.internal/ubuntu bionic/main s390x libsemanage-common all 2.7-2 [6916 B] Get:59 http://ftpmaster.internal/ubuntu bionic/main s390x libsemanage1 s390x 2.7-2 [78.6 kB] Get:60 http://ftpmaster.internal/ubuntu bionic/main s390x libss2 s390x 1.43.8-1ubuntu1 [10.7 kB] Get:61 http://ftpmaster.internal/ubuntu bionic/main s390x libnettle6 s390x 3.3-2 [103 kB] Get:62 http://ftpmaster.internal/ubuntu bionic/main s390x libhogweed4 s390x 3.3-2 [134 kB] Get:63 http://ftpmaster.internal/ubuntu bionic/main s390x libp11-kit0 s390x 0.23.9-2 [188 kB] Get:64 http://ftpmaster.internal/ubuntu bionic/main s390x libtasn1-6 s390x 4.12-3 [34.2 kB] Get:65 http://ftpmaster.internal/ubuntu bionic/main s390x g++-7 s390x 7.2.0-18ubuntu2 [5971 kB] Get:66 http://ftpmaster.internal/ubuntu bionic/main s390x gcc-7 s390x 7.2.0-18ubuntu2 [5845 kB] Get:67 http://ftpmaster.internal/ubuntu bionic/main s390x cpp-7 s390x 7.2.0-18ubuntu2 [5175 kB] Get:68 http://ftpmaster.internal/ubuntu bionic/main s390x libbinutils s390x 2.29.1-12ubuntu1 [304 kB] Get:69 http://ftpmaster.internal/ubuntu bionic/main s390x binutils s390x 2.29.1-12ubuntu1 [3360 B] Get:70 http://ftpmaster.internal/ubuntu bionic/main s390x binutils-common s390x 2.29.1-12ubuntu1 [190 kB] Get:71 http://ftpmaster.internal/ubuntu bionic/main s390x binutils-s390x-linux-gnu s390x 2.29.1-12ubuntu1 [1696 kB] Get:72 http://ftpmaster.internal/ubuntu bionic/main s390x libstdc++-7-dev s390x 7.2.0-18ubuntu2 [1447 kB] Get:73 http://ftpmaster.internal/ubuntu bionic/main s390x libgcc-7-dev s390x 7.2.0-18ubuntu2 [279 kB] Get:74 http://ftpmaster.internal/ubuntu bionic/main s390x gcc-7-base s390x 7.2.0-18ubuntu2 [19.1 kB] Get:75 http://ftpmaster.internal/ubuntu bionic/main s390x lsb-base all 9.20170808ubuntu1 [12.5 kB] Get:76 http://ftpmaster.internal/ubuntu bionic/main s390x sensible-utils all 0.0.11 [14.8 kB] Get:77 http://ftpmaster.internal/ubuntu bionic/main s390x libassuan0 s390x 2.5.1-1 [32.0 kB] Get:78 http://ftpmaster.internal/ubuntu bionic/main s390x pinentry-curses s390x 1.0.0-3 [33.3 kB] Get:79 http://ftpmaster.internal/ubuntu bionic/main s390x libnpth0 s390x 1.5-3 [7512 B] Get:80 http://ftpmaster.internal/ubuntu bionic/main s390x gnupg s390x 2.1.15-1ubuntu8 [733 kB] Get:81 http://ftpmaster.internal/ubuntu bionic/main s390x gnupg-agent s390x 2.1.15-1ubuntu8 [233 kB] Get:82 http://ftpmaster.internal/ubuntu bionic/main s390x libsqlite3-0 s390x 3.21.0-1 [460 kB] Get:83 http://ftpmaster.internal/ubuntu bionic/main s390x libroken18-heimdal s390x 7.5.0+dfsg-1 [39.4 kB] Get:84 http://ftpmaster.internal/ubuntu bionic/main s390x libasn1-8-heimdal s390x 7.5.0+dfsg-1 [147 kB] Get:85 http://ftpmaster.internal/ubuntu bionic/main s390x libheimbase1-heimdal s390x 7.5.0+dfsg-1 [27.5 kB] Get:86 http://ftpmaster.internal/ubuntu bionic/main s390x libhcrypto4-heimdal s390x 7.5.0+dfsg-1 [82.4 kB] Get:87 http://ftpmaster.internal/ubuntu bionic/main s390x libwind0-heimdal s390x 7.5.0+dfsg-1 [47.7 kB] Get:88 http://ftpmaster.internal/ubuntu bionic/main s390x libhx509-5-heimdal s390x 7.5.0+dfsg-1 [98.3 kB] Get:89 http://ftpmaster.internal/ubuntu bionic/main s390x libkrb5-26-heimdal s390x 7.5.0+dfsg-1 [190 kB] Get:90 http://ftpmaster.internal/ubuntu bionic/main s390x libheimntlm0-heimdal s390x 7.5.0+dfsg-1 [14.1 kB] Get:91 http://ftpmaster.internal/ubuntu bionic/main s390x libgssapi3-heimdal s390x 7.5.0+dfsg-1 [86.9 kB] Get:92 http://ftpmaster.internal/ubuntu bionic/main s390x libssl1.0.0 s390x 1.0.2g-1ubuntu14 [771 kB] Get:93 http://ftpmaster.internal/ubuntu bionic/main s390x multiarch-support s390x 2.26-0ubuntu2 [6832 B] Get:94 http://ftpmaster.internal/ubuntu bionic/main s390x openssl s390x 1.0.2g-1ubuntu14 [477 kB] Get:95 http://ftpmaster.internal/ubuntu bionic/main s390x tzdata all 2017c-1 [188 kB] Get:96 http://ftpmaster.internal/ubuntu bionic/main s390x libidn2-0 s390x 2.0.4-1 [91.2 kB] Get:97 http://ftpmaster.internal/ubuntu bionic/main s390x libkeyutils1 s390x 1.5.9-9.2ubuntu1 [9092 B] Get:98 http://ftpmaster.internal/ubuntu bionic/main s390x libpng16-16 s390x 1.6.34-1 [171 kB] Get:99 http://ftpmaster.internal/ubuntu bionic/universe s390x apt-transport-https all 1.6~alpha5 [1692 B] Get:100 http://ftpmaster.internal/ubuntu bionic/main s390x dpkg-dev all 1.19.0.4ubuntu1 [607 kB] Get:101 http://ftpmaster.internal/ubuntu bionic/main s390x libdpkg-perl all 1.19.0.4ubuntu1 [211 kB] Get:102 http://ftpmaster.internal/ubuntu bionic/main s390x build-essential s390x 12.4ubuntu1 [4754 B] Get:103 http://ftpmaster.internal/ubuntu bionic/main s390x libnghttp2-14 s390x 1.29.0-1 [73.9 kB] Get:104 http://ftpmaster.internal/ubuntu bionic/main s390x libpsl5 s390x 0.19.1-4 [40.9 kB] Get:105 http://ftpmaster.internal/ubuntu bionic/main s390x libcurl3-gnutls s390x 7.57.0-1ubuntu1 [193 kB] Get:106 http://ftpmaster.internal/ubuntu bionic/main s390x liblockfile-bin s390x 1.14-1.1 [11.8 kB] Get:107 http://ftpmaster.internal/ubuntu bionic/main s390x liblockfile1 s390x 1.14-1.1 [6532 B] Get:108 http://ftpmaster.internal/ubuntu bionic/main s390x optipng s390x 0.7.6-1.1 [82.0 kB] Get:109 http://ppa.launchpad.net/ubuntu-toolchain-r/volatile/ubuntu bionic/main s390x cpp s390x 4:8-20121108-1ubuntu0.2 [42.2 kB] Get:110 http://ppa.launchpad.net/ubuntu-toolchain-r/test/ubuntu bionic/main s390x libgcc-8-dev s390x 8-20180110-1ubuntu1 [279 kB] Get:111 http://ppa.launchpad.net/ubuntu-toolchain-r/test/ubuntu bionic/main s390x gcc-8 s390x 8-20180110-1ubuntu1 [28.9 MB] Get:112 http://ppa.launchpad.net/ubuntu-toolchain-r/volatile/ubuntu bionic/main s390x gcc s390x 4:8-20121108-1ubuntu0.2 [5156 B] Get:113 http://ppa.launchpad.net/ubuntu-toolchain-r/test/ubuntu bionic/main s390x libstdc++-8-dev s390x 8-20180110-1ubuntu1 [1475 kB] Get:114 http://ppa.launchpad.net/ubuntu-toolchain-r/test/ubuntu bionic/main s390x g++-8 s390x 8-20180110-1ubuntu1 [31.5 MB] Get:115 http://ppa.launchpad.net/ubuntu-toolchain-r/volatile/ubuntu bionic/main s390x g++ s390x 4:8-20121108-1ubuntu0.2 [1536 B] debconf: delaying package configuration, since apt-utils is not installed Fetched 143 MB in 2s (48.1 MB/s) (Reading database ... 12436 files and directories currently installed.) Preparing to unpack .../perl_5.26.1-3_s390x.deb ... Unpacking perl (5.26.1-3) over (5.26.0-8ubuntu1) ... Preparing to unpack .../perl-modules-5.26_5.26.1-3_all.deb ... Unpacking perl-modules-5.26 (5.26.1-3) over (5.26.0-8ubuntu1) ... Preparing to unpack .../libperl5.26_5.26.1-3_s390x.deb ... Unpacking libperl5.26:s390x (5.26.1-3) over (5.26.0-8ubuntu1) ... Preparing to unpack .../perl-base_5.26.1-3_s390x.deb ... Unpacking perl-base (5.26.1-3) over (5.26.0-8ubuntu1) ... Setting up perl-base (5.26.1-3) ... (Reading database ... 12436 files and directories currently installed.) Preparing to unpack .../libc6-dev_2.26-0ubuntu2_s390x.deb ... Unpacking libc6-dev:s390x (2.26-0ubuntu2) over (2.26-0ubuntu1) ... Preparing to unpack .../libc-dev-bin_2.26-0ubuntu2_s390x.deb ... Unpacking libc-dev-bin (2.26-0ubuntu2) over (2.26-0ubuntu1) ... Preparing to unpack .../linux-libc-dev_4.13.0-25.29_s390x.deb ... Unpacking linux-libc-dev:s390x (4.13.0-25.29) over (4.13.0-11.12) ... Selecting previously unselected package gcc-8-base:s390x. Preparing to unpack .../gcc-8-base_8-20180110-1ubuntu1_s390x.deb ... Unpacking gcc-8-base:s390x (8-20180110-1ubuntu1) ... Setting up gcc-8-base:s390x (8-20180110-1ubuntu1) ... (Reading database ... 12443 files and directories currently installed.) Preparing to unpack .../libgcc1_1%3a8-20180110-1ubuntu1_s390x.deb ... Unpacking libgcc1:s390x (1:8-20180110-1ubuntu1) over (1:7.2.0-6ubuntu1) ... Setting up libgcc1:s390x (1:8-20180110-1ubuntu1) ... (Reading database ... 12443 files and directories currently installed.) Preparing to unpack .../libc6_2.26-0ubuntu2_s390x.deb ... Unpacking libc6:s390x (2.26-0ubuntu2) over (2.26-0ubuntu1) ... Setting up libc6:s390x (2.26-0ubuntu2) ... (Reading database ... 12443 files and directories currently installed.) Preparing to unpack .../init-system-helpers_1.51_all.deb ... Unpacking init-system-helpers (1.51) over (1.49ubuntu1) ... Setting up init-system-helpers (1.51) ... (Reading database ... 12443 files and directories currently installed.) Preparing to unpack .../base-files_10ubuntu1_s390x.deb ... Unpacking base-files (10ubuntu1) over (9.6ubuntu101) ... Setting up base-files (10ubuntu1) ... Installing new version of config file /etc/debian_version ... Installing new version of config file /etc/issue ... Installing new version of config file /etc/issue.net ... Installing new version of config file /etc/lsb-release ... (Reading database ... 12443 files and directories currently installed.) Preparing to unpack .../bsdutils_1%3a2.30.2-0.1ubuntu1_s390x.deb ... Unpacking bsdutils (1:2.30.2-0.1ubuntu1) over (1:2.30.1-0ubuntu4) ... Setting up bsdutils (1:2.30.2-0.1ubuntu1) ... (Reading database ... 12443 files and directories currently installed.) Preparing to unpack .../coreutils_8.26-3ubuntu4_s390x.deb ... Unpacking coreutils (8.26-3ubuntu4) over (8.26-3ubuntu3) ... Setting up coreutils (8.26-3ubuntu4) ... (Reading database ... 12443 files and directories currently installed.) Preparing to unpack .../debianutils_4.8.4_s390x.deb ... Unpacking debianutils (4.8.4) over (4.8.2) ... Setting up debianutils (4.8.4) ... (Reading database ... 12443 files and directories currently installed.) Preparing to unpack .../dpkg_1.19.0.4ubuntu1_s390x.deb ... Unpacking dpkg (1.19.0.4ubuntu1) over (1.18.24ubuntu1) ... Setting up dpkg (1.19.0.4ubuntu1) ... Installing new version of config file /etc/alternatives/README ... Installing new version of config file /etc/cron.daily/dpkg ... Installing new version of config file /etc/logrotate.d/dpkg ... (Reading database ... 12445 files and directories currently installed.) Preparing to unpack .../e2fslibs_1.43.8-1ubuntu1_s390x.deb ... Unpacking e2fslibs:s390x (1.43.8-1ubuntu1) over (1.43.5-1) ... Setting up e2fslibs:s390x (1.43.8-1ubuntu1) ... (Reading database ... 12445 files and directories currently installed.) Preparing to unpack .../e2fsprogs_1.43.8-1ubuntu1_s390x.deb ... Unpacking e2fsprogs (1.43.8-1ubuntu1) over (1.43.5-1) ... Setting up e2fsprogs (1.43.8-1ubuntu1) ... Installing new version of config file /etc/mke2fs.conf ... (Reading database ... 12445 files and directories currently installed.) Preparing to unpack .../findutils_4.6.0+git+20170828-2_s390x.deb ... Unpacking findutils (4.6.0+git+20170828-2) over (4.6.0+git+20170729-2) ... Setting up findutils (4.6.0+git+20170828-2) ... (Reading database ... 12445 files and directories currently installed.) Preparing to unpack .../libuuid1_2.30.2-0.1ubuntu1_s390x.deb ... Unpacking libuuid1:s390x (2.30.2-0.1ubuntu1) over (2.30.1-0ubuntu4) ... Setting up libuuid1:s390x (2.30.2-0.1ubuntu1) ... (Reading database ... 12445 files and directories currently installed.) Preparing to unpack .../libblkid1_2.30.2-0.1ubuntu1_s390x.deb ... Unpacking libblkid1:s390x (2.30.2-0.1ubuntu1) over (2.30.1-0ubuntu4) ... Setting up libblkid1:s390x (2.30.2-0.1ubuntu1) ... (Reading database ... 12445 files and directories currently installed.) Preparing to unpack .../libsmartcols1_2.30.2-0.1ubuntu1_s390x.deb ... Unpacking libsmartcols1:s390x (2.30.2-0.1ubuntu1) over (2.30.1-0ubuntu4) ... Setting up libsmartcols1:s390x (2.30.2-0.1ubuntu1) ... (Reading database ... 12445 files and directories currently installed.) Preparing to unpack .../libfdisk1_2.30.2-0.1ubuntu1_s390x.deb ... Unpacking libfdisk1:s390x (2.30.2-0.1ubuntu1) over (2.30.1-0ubuntu4) ... Setting up libfdisk1:s390x (2.30.2-0.1ubuntu1) ... (Reading database ... 12445 files and directories currently installed.) Preparing to unpack .../libpcre3_2%3a8.39-8_s390x.deb ... Unpacking libpcre3:s390x (2:8.39-8) over (2:8.39-4) ... Setting up libpcre3:s390x (2:8.39-8) ... (Reading database ... 12445 files and directories currently installed.) Preparing to unpack .../libselinux1_2.7-2_s390x.deb ... Unpacking libselinux1:s390x (2.7-2) over (2.7-1) ... Setting up libselinux1:s390x (2.7-2) ... (Reading database ... 12445 files and directories currently installed.) Preparing to unpack .../libmount1_2.30.2-0.1ubuntu1_s390x.deb ... Unpacking libmount1:s390x (2.30.2-0.1ubuntu1) over (2.30.1-0ubuntu4) ... Setting up libmount1:s390x (2.30.2-0.1ubuntu1) ... (Reading database ... 12445 files and directories currently installed.) Preparing to unpack .../fdisk_2.30.2-0.1ubuntu1_s390x.deb ... Unpacking fdisk (2.30.2-0.1ubuntu1) over (2.30.1-0ubuntu4) ... Setting up fdisk (2.30.2-0.1ubuntu1) ... (Reading database ... 12445 files and directories currently installed.) Preparing to unpack .../util-linux_2.30.2-0.1ubuntu1_s390x.deb ... Unpacking util-linux (2.30.2-0.1ubuntu1) over (2.30.1-0ubuntu4) ... Setting up util-linux (2.30.2-0.1ubuntu1) ... (Reading database ... 12446 files and directories currently installed.) Preparing to unpack .../base-passwd_3.5.44_s390x.deb ... Unpacking base-passwd (3.5.44) over (3.5.43) ... Setting up base-passwd (3.5.44) ... (Reading database ... 12446 files and directories currently installed.) Preparing to unpack .../libc-bin_2.26-0ubuntu2_s390x.deb ... Unpacking libc-bin (2.26-0ubuntu2) over (2.26-0ubuntu1) ... Setting up libc-bin (2.26-0ubuntu2) ... (Reading database ... 12446 files and directories currently installed.) Preparing to unpack .../sysvinit-utils_2.88dsf-59.10ubuntu1_s390x.deb ... Unpacking sysvinit-utils (2.88dsf-59.10ubuntu1) over (2.88dsf-59.8git1) ... Setting up sysvinit-utils (2.88dsf-59.10ubuntu1) ... (Reading database ... 12446 files and directories currently installed.) Preparing to unpack .../libstdc++6_8-20180110-1ubuntu1_s390x.deb ... Unpacking libstdc++6:s390x (8-20180110-1ubuntu1) over (7.2.0-6ubuntu1) ... Setting up libstdc++6:s390x (8-20180110-1ubuntu1) ... (Reading database ... 12446 files and directories currently installed.) Preparing to unpack .../libudev1_235-3ubuntu3_s390x.deb ... Unpacking libudev1:s390x (235-3ubuntu3) over (234-2ubuntu10) ... Setting up libudev1:s390x (235-3ubuntu3) ... (Reading database ... 12446 files and directories currently installed.) Preparing to unpack .../libapt-pkg5.0_1.6~alpha5_s390x.deb ... Unpacking libapt-pkg5.0:s390x (1.6~alpha5) over (1.5~rc4) ... Setting up libapt-pkg5.0:s390x (1.6~alpha5) ... (Reading database ... 12446 files and directories currently installed.) Preparing to unpack .../debconf_1.5.65_all.deb ... Unpacking debconf (1.5.65) over (1.5.63) ... Setting up debconf (1.5.65) ... (Reading database ... 12440 files and directories currently installed.) Preparing to unpack .../adduser_3.116ubuntu1_all.deb ... Unpacking adduser (3.116ubuntu1) over (3.113+nmu3ubuntu5) ... Setting up adduser (3.116ubuntu1) ... (Reading database ... 12438 files and directories currently installed.) Preparing to unpack .../libgpg-error0_1.27-5_s390x.deb ... Unpacking libgpg-error0:s390x (1.27-5) over (1.27-3) ... Setting up libgpg-error0:s390x (1.27-5) ... (Reading database ... 12438 files and directories currently installed.) Preparing to unpack .../libgcrypt20_1.8.1-4_s390x.deb ... Unpacking libgcrypt20:s390x (1.8.1-4) over (1.7.8-2ubuntu1) ... Setting up libgcrypt20:s390x (1.8.1-4) ... (Reading database ... 12438 files and directories currently installed.) Preparing to unpack .../gpgv_2.1.15-1ubuntu8_s390x.deb ... Unpacking gpgv (2.1.15-1ubuntu8) over (2.1.15-1ubuntu7) ... Setting up gpgv (2.1.15-1ubuntu8) ... (Reading database ... 12438 files and directories currently installed.) Preparing to unpack .../libseccomp2_2.3.1-2.1ubuntu3_s390x.deb ... Unpacking libseccomp2:s390x (2.3.1-2.1ubuntu3) over (2.3.1-2.1ubuntu2) ... Setting up libseccomp2:s390x (2.3.1-2.1ubuntu3) ... (Reading database ... 12438 files and directories currently installed.) Preparing to unpack .../apt_1.6~alpha5_s390x.deb ... Unpacking apt (1.6~alpha5) over (1.5~rc4) ... Setting up apt (1.6~alpha5) ... (Reading database ... 12434 files and directories currently installed.) Preparing to unpack .../libapparmor1_2.11.0-2ubuntu18_s390x.deb ... Unpacking libapparmor1:s390x (2.11.0-2ubuntu18) over (2.11.0-2ubuntu17) ... Preparing to unpack .../libcap2_1%3a2.25-1.2_s390x.deb ... Unpacking libcap2:s390x (1:2.25-1.2) over (1:2.25-1) ... Preparing to unpack .../libidn11_1.33-2.1_s390x.deb ... Unpacking libidn11:s390x (1.33-2.1) over (1.33-2) ... Setting up libidn11:s390x (1.33-2.1) ... (Reading database ... 12434 files and directories currently installed.) Preparing to unpack .../libip4tc0_1.6.1-2ubuntu2_s390x.deb ... Unpacking libip4tc0:s390x (1.6.1-2ubuntu2) over (1.6.1-2ubuntu1) ... Preparing to unpack .../mount_2.30.2-0.1ubuntu1_s390x.deb ... Unpacking mount (2.30.2-0.1ubuntu1) over (2.30.1-0ubuntu4) ... Preparing to unpack .../systemd_235-3ubuntu3_s390x.deb ... Unpacking systemd (235-3ubuntu3) over (234-2ubuntu10) ... Preparing to unpack .../libsystemd0_235-3ubuntu3_s390x.deb ... Unpacking libsystemd0:s390x (235-3ubuntu3) over (234-2ubuntu10) ... Setting up libsystemd0:s390x (235-3ubuntu3) ... (Reading database ... 12440 files and directories currently installed.) Preparing to unpack .../archives/init_1.51_s390x.deb ... Unpacking init (1.51) over (1.49ubuntu1) ... Setting up libapparmor1:s390x (2.11.0-2ubuntu18) ... Setting up libcap2:s390x (1:2.25-1.2) ... Setting up libip4tc0:s390x (1.6.1-2ubuntu2) ... Setting up mount (2.30.2-0.1ubuntu1) ... Setting up systemd (235-3ubuntu3) ... Installing new version of config file /etc/systemd/journald.conf ... Installing new version of config file /etc/systemd/system.conf ... Removing empty /etc/rc.local Removed /etc/systemd/system/network-online.target.wants/systemd-networkd-wait-online.service. Removing user `systemd-bus-proxy' ... Warning: group `systemd-bus-proxy' has no more members. Done. (Reading database ... 12440 files and directories currently installed.) Preparing to unpack .../systemd-sysv_235-3ubuntu3_s390x.deb ... Unpacking systemd-sysv (235-3ubuntu3) over (234-2ubuntu10) ... Preparing to unpack .../libcap-ng0_0.7.7-3.1_s390x.deb ... Unpacking libcap-ng0:s390x (0.7.7-3.1) over (0.7.7-3build1) ... Setting up libcap-ng0:s390x (0.7.7-3.1) ... (Reading database ... 12440 files and directories currently installed.) Preparing to unpack .../libcomerr2_1.43.8-1ubuntu1_s390x.deb ... Unpacking libcomerr2:s390x (1.43.8-1ubuntu1) over (1.43.5-1) ... Setting up libcomerr2:s390x (1.43.8-1ubuntu1) ... (Reading database ... 12440 files and directories currently installed.) Preparing to unpack .../libsemanage-common_2.7-2_all.deb ... Unpacking libsemanage-common (2.7-2) over (2.7-1) ... Setting up libsemanage-common (2.7-2) ... (Reading database ... 12440 files and directories currently installed.) Preparing to unpack .../libsemanage1_2.7-2_s390x.deb ... Unpacking libsemanage1:s390x (2.7-2) over (2.7-1) ... Setting up libsemanage1:s390x (2.7-2) ... (Reading database ... 12440 files and directories currently installed.) Preparing to unpack .../libss2_1.43.8-1ubuntu1_s390x.deb ... Unpacking libss2:s390x (1.43.8-1ubuntu1) over (1.43.5-1) ... Setting up libss2:s390x (1.43.8-1ubuntu1) ... (Reading database ... 12440 files and directories currently installed.) Preparing to unpack .../libnettle6_3.3-2_s390x.deb ... Unpacking libnettle6:s390x (3.3-2) over (3.3-1) ... Setting up libnettle6:s390x (3.3-2) ... (Reading database ... 12440 files and directories currently installed.) Preparing to unpack .../libhogweed4_3.3-2_s390x.deb ... Unpacking libhogweed4:s390x (3.3-2) over (3.3-1) ... Setting up libhogweed4:s390x (3.3-2) ... (Reading database ... 12440 files and directories currently installed.) Preparing to unpack .../libp11-kit0_0.23.9-2_s390x.deb ... Unpacking libp11-kit0:s390x (0.23.9-2) over (0.23.7-3) ... Setting up libp11-kit0:s390x (0.23.9-2) ... (Reading database ... 12440 files and directories currently installed.) Preparing to unpack .../libtasn1-6_4.12-3_s390x.deb ... Unpacking libtasn1-6:s390x (4.12-3) over (4.12-2.1) ... Setting up libtasn1-6:s390x (4.12-3) ... (Reading database ... 12440 files and directories currently installed.) Preparing to unpack .../00-libgomp1_8-20180110-1ubuntu1_s390x.deb ... Unpacking libgomp1:s390x (8-20180110-1ubuntu1) over (7.2.0-6ubuntu1) ... Preparing to unpack .../01-libitm1_8-20180110-1ubuntu1_s390x.deb ... Unpacking libitm1:s390x (8-20180110-1ubuntu1) over (7.2.0-6ubuntu1) ... Preparing to unpack .../02-g++-7_7.2.0-18ubuntu2_s390x.deb ... Unpacking g++-7 (7.2.0-18ubuntu2) over (7.2.0-6ubuntu1) ... Preparing to unpack .../03-gcc-7_7.2.0-18ubuntu2_s390x.deb ... Unpacking gcc-7 (7.2.0-18ubuntu2) over (7.2.0-6ubuntu1) ... Preparing to unpack .../04-cpp-7_7.2.0-18ubuntu2_s390x.deb ... Unpacking cpp-7 (7.2.0-18ubuntu2) over (7.2.0-6ubuntu1) ... Preparing to unpack .../05-libcc1-0_8-20180110-1ubuntu1_s390x.deb ... Unpacking libcc1-0:s390x (8-20180110-1ubuntu1) over (7.2.0-6ubuntu1) ... Preparing to unpack .../06-libbinutils_2.29.1-12ubuntu1_s390x.deb ... Unpacking libbinutils:s390x (2.29.1-12ubuntu1) over (2.29.1-1ubuntu1) ... Preparing to unpack .../07-binutils_2.29.1-12ubuntu1_s390x.deb ... Unpacking binutils (2.29.1-12ubuntu1) over (2.29.1-1ubuntu1) ... Preparing to unpack .../08-binutils-common_2.29.1-12ubuntu1_s390x.deb ... Unpacking binutils-common:s390x (2.29.1-12ubuntu1) over (2.29.1-1ubuntu1) ... Preparing to unpack .../09-binutils-s390x-linux-gnu_2.29.1-12ubuntu1_s390x.deb ... Unpacking binutils-s390x-linux-gnu (2.29.1-12ubuntu1) over (2.29.1-1ubuntu1) ... Preparing to unpack .../10-libatomic1_8-20180110-1ubuntu1_s390x.deb ... Unpacking libatomic1:s390x (8-20180110-1ubuntu1) over (7.2.0-6ubuntu1) ... Preparing to unpack .../11-libstdc++-7-dev_7.2.0-18ubuntu2_s390x.deb ... Unpacking libstdc++-7-dev:s390x (7.2.0-18ubuntu2) over (7.2.0-6ubuntu1) ... Preparing to unpack .../12-libgcc-7-dev_7.2.0-18ubuntu2_s390x.deb ... Unpacking libgcc-7-dev:s390x (7.2.0-18ubuntu2) over (7.2.0-6ubuntu1) ... Preparing to unpack .../13-gcc-7-base_7.2.0-18ubuntu2_s390x.deb ... Unpacking gcc-7-base:s390x (7.2.0-18ubuntu2) over (7.2.0-6ubuntu1) ... Preparing to unpack .../14-lsb-base_9.20170808ubuntu1_all.deb ... Unpacking lsb-base (9.20170808ubuntu1) over (9.20160110ubuntu5) ... Preparing to unpack .../15-sensible-utils_0.0.11_all.deb ... Unpacking sensible-utils (0.0.11) over (0.0.10) ... Preparing to unpack .../16-libassuan0_2.5.1-1_s390x.deb ... Unpacking libassuan0:s390x (2.5.1-1) over (2.4.3-3) ... Preparing to unpack .../17-pinentry-curses_1.0.0-3_s390x.deb ... Unpacking pinentry-curses (1.0.0-3) over (1.0.0-2) ... Preparing to unpack .../18-libnpth0_1.5-3_s390x.deb ... Unpacking libnpth0:s390x (1.5-3) over (1.5-2) ... Preparing to unpack .../19-gnupg_2.1.15-1ubuntu8_s390x.deb ... Unpacking gnupg (2.1.15-1ubuntu8) over (2.1.15-1ubuntu7) ... Preparing to unpack .../20-gnupg-agent_2.1.15-1ubuntu8_s390x.deb ... Unpacking gnupg-agent (2.1.15-1ubuntu8) over (2.1.15-1ubuntu7) ... Preparing to unpack .../21-libsqlite3-0_3.21.0-1_s390x.deb ... Unpacking libsqlite3-0:s390x (3.21.0-1) over (3.19.3-3) ... Preparing to unpack .../22-libroken18-heimdal_7.5.0+dfsg-1_s390x.deb ... Unpacking libroken18-heimdal:s390x (7.5.0+dfsg-1) over (7.4.0.dfsg.1-2) ... Preparing to unpack .../23-libasn1-8-heimdal_7.5.0+dfsg-1_s390x.deb ... Unpacking libasn1-8-heimdal:s390x (7.5.0+dfsg-1) over (7.4.0.dfsg.1-2) ... Preparing to unpack .../24-libheimbase1-heimdal_7.5.0+dfsg-1_s390x.deb ... Unpacking libheimbase1-heimdal:s390x (7.5.0+dfsg-1) over (7.4.0.dfsg.1-2) ... Preparing to unpack .../25-libhcrypto4-heimdal_7.5.0+dfsg-1_s390x.deb ... Unpacking libhcrypto4-heimdal:s390x (7.5.0+dfsg-1) over (7.4.0.dfsg.1-2) ... Preparing to unpack .../26-libwind0-heimdal_7.5.0+dfsg-1_s390x.deb ... Unpacking libwind0-heimdal:s390x (7.5.0+dfsg-1) over (7.4.0.dfsg.1-2) ... Preparing to unpack .../27-libhx509-5-heimdal_7.5.0+dfsg-1_s390x.deb ... Unpacking libhx509-5-heimdal:s390x (7.5.0+dfsg-1) over (7.4.0.dfsg.1-2) ... Preparing to unpack .../28-libkrb5-26-heimdal_7.5.0+dfsg-1_s390x.deb ... Unpacking libkrb5-26-heimdal:s390x (7.5.0+dfsg-1) over (7.4.0.dfsg.1-2) ... Preparing to unpack .../29-libheimntlm0-heimdal_7.5.0+dfsg-1_s390x.deb ... Unpacking libheimntlm0-heimdal:s390x (7.5.0+dfsg-1) over (7.4.0.dfsg.1-2) ... Preparing to unpack .../30-libgssapi3-heimdal_7.5.0+dfsg-1_s390x.deb ... Unpacking libgssapi3-heimdal:s390x (7.5.0+dfsg-1) over (7.4.0.dfsg.1-2) ... Preparing to unpack .../31-libssl1.0.0_1.0.2g-1ubuntu14_s390x.deb ... Unpacking libssl1.0.0:s390x (1.0.2g-1ubuntu14) over (1.0.2g-1ubuntu13) ... Preparing to unpack .../32-multiarch-support_2.26-0ubuntu2_s390x.deb ... Unpacking multiarch-support (2.26-0ubuntu2) over (2.26-0ubuntu1) ... Preparing to unpack .../33-openssl_1.0.2g-1ubuntu14_s390x.deb ... Unpacking openssl (1.0.2g-1ubuntu14) over (1.0.2g-1ubuntu13) ... Preparing to unpack .../34-tzdata_2017c-1_all.deb ... Unpacking tzdata (2017c-1) over (2017b-2) ... Preparing to unpack .../35-libidn2-0_2.0.4-1_s390x.deb ... Unpacking libidn2-0:s390x (2.0.4-1) over (2.0.2-5) ... Preparing to unpack .../36-libkeyutils1_1.5.9-9.2ubuntu1_s390x.deb ... Unpacking libkeyutils1:s390x (1.5.9-9.2ubuntu1) over (1.5.9-9ubuntu1) ... Preparing to unpack .../37-libpng16-16_1.6.34-1_s390x.deb ... Unpacking libpng16-16:s390x (1.6.34-1) over (1.6.32-2) ... Preparing to unpack .../38-apt-transport-https_1.6~alpha5_all.deb ... Unpacking apt-transport-https (1.6~alpha5) over (1.5~rc4) ... Selecting previously unselected package cpp-8. Preparing to unpack .../39-cpp-8_8-20180110-1ubuntu1_s390x.deb ... Unpacking cpp-8 (8-20180110-1ubuntu1) ... Preparing to unpack .../40-cpp_4%3a8-20121108-1ubuntu0.2_s390x.deb ... Unpacking cpp (4:8-20121108-1ubuntu0.2) over (4:7.2.0-1ubuntu1) ... Selecting previously unselected package libgcc-8-dev:s390x. Preparing to unpack .../41-libgcc-8-dev_8-20180110-1ubuntu1_s390x.deb ... Unpacking libgcc-8-dev:s390x (8-20180110-1ubuntu1) ... Selecting previously unselected package gcc-8. Preparing to unpack .../42-gcc-8_8-20180110-1ubuntu1_s390x.deb ... Unpacking gcc-8 (8-20180110-1ubuntu1) ... Preparing to unpack .../43-gcc_4%3a8-20121108-1ubuntu0.2_s390x.deb ... Unpacking gcc (4:8-20121108-1ubuntu0.2) over (4:7.2.0-1ubuntu1) ... Selecting previously unselected package libstdc++-8-dev:s390x. Preparing to unpack .../44-libstdc++-8-dev_8-20180110-1ubuntu1_s390x.deb ... Unpacking libstdc++-8-dev:s390x (8-20180110-1ubuntu1) ... Selecting previously unselected package g++-8. Preparing to unpack .../45-g++-8_8-20180110-1ubuntu1_s390x.deb ... Unpacking g++-8 (8-20180110-1ubuntu1) ... Preparing to unpack .../46-g++_4%3a8-20121108-1ubuntu0.2_s390x.deb ... Unpacking g++ (4:8-20121108-1ubuntu0.2) over (4:7.2.0-1ubuntu1) ... Preparing to unpack .../47-dpkg-dev_1.19.0.4ubuntu1_all.deb ... Unpacking dpkg-dev (1.19.0.4ubuntu1) over (1.18.24ubuntu1) ... Preparing to unpack .../48-libdpkg-perl_1.19.0.4ubuntu1_all.deb ... Unpacking libdpkg-perl (1.19.0.4ubuntu1) over (1.18.24ubuntu1) ... Preparing to unpack .../49-build-essential_12.4ubuntu1_s390x.deb ... Unpacking build-essential (12.4ubuntu1) over (12.1ubuntu2) ... Selecting previously unselected package libnghttp2-14:s390x. Preparing to unpack .../50-libnghttp2-14_1.29.0-1_s390x.deb ... Unpacking libnghttp2-14:s390x (1.29.0-1) ... Preparing to unpack .../51-libpsl5_0.19.1-4_s390x.deb ... Unpacking libpsl5:s390x (0.19.1-4) over (0.18.0-2) ... Preparing to unpack .../52-libcurl3-gnutls_7.57.0-1ubuntu1_s390x.deb ... Unpacking libcurl3-gnutls:s390x (7.57.0-1ubuntu1) over (7.55.1-1ubuntu1) ... Preparing to unpack .../53-liblockfile-bin_1.14-1.1_s390x.deb ... Unpacking liblockfile-bin (1.14-1.1) over (1.14-1) ... Preparing to unpack .../54-liblockfile1_1.14-1.1_s390x.deb ... Unpacking liblockfile1:s390x (1.14-1.1) over (1.14-1) ... Preparing to unpack .../55-optipng_0.7.6-1.1_s390x.deb ... Unpacking optipng (0.7.6-1.1) over (0.7.6-1build1) ... Setting up libnpth0:s390x (1.5-3) ... Setting up cpp-8 (8-20180110-1ubuntu1) ... Setting up libgomp1:s390x (8-20180110-1ubuntu1) ... Setting up libatomic1:s390x (8-20180110-1ubuntu1) ... Setting up cpp (4:8-20121108-1ubuntu0.2) ... Setting up liblockfile-bin (1.14-1.1) ... Setting up libcc1-0:s390x (8-20180110-1ubuntu1) ... Setting up apt-transport-https (1.6~alpha5) ... Setting up libidn2-0:s390x (2.0.4-1) ... Setting up libssl1.0.0:s390x (1.0.2g-1ubuntu14) ... Setting up libnghttp2-14:s390x (1.29.0-1) ... Setting up libpng16-16:s390x (1.6.34-1) ... Setting up libpsl5:s390x (0.19.1-4) ... Setting up multiarch-support (2.26-0ubuntu2) ... Setting up tzdata (2017c-1) ... Current default time zone: 'Etc/UTC' Local time is now: Mon Jan 15 10:00:23 UTC 2018. Universal Time is now: Mon Jan 15 10:00:23 UTC 2018. Run 'dpkg-reconfigure tzdata' if you wish to change it. Setting up systemd-sysv (235-3ubuntu3) ... Setting up liblockfile1:s390x (1.14-1.1) ... Setting up linux-libc-dev:s390x (4.13.0-25.29) ... Setting up libroken18-heimdal:s390x (7.5.0+dfsg-1) ... Setting up perl-modules-5.26 (5.26.1-3) ... Setting up optipng (0.7.6-1.1) ... Setting up lsb-base (9.20170808ubuntu1) ... Setting up gcc-7-base:s390x (7.2.0-18ubuntu2) ... Setting up binutils-common:s390x (2.29.1-12ubuntu1) ... Setting up sensible-utils (0.0.11) ... Processing triggers for libc-bin (2.26-0ubuntu2) ... Setting up libperl5.26:s390x (5.26.1-3) ... Setting up libheimbase1-heimdal:s390x (7.5.0+dfsg-1) ... Setting up openssl (1.0.2g-1ubuntu14) ... Setting up libsqlite3-0:s390x (3.21.0-1) ... Setting up libc-dev-bin (2.26-0ubuntu2) ... Setting up libkeyutils1:s390x (1.5.9-9.2ubuntu1) ... Setting up libc6-dev:s390x (2.26-0ubuntu2) ... Setting up libassuan0:s390x (2.5.1-1) ... Setting up libitm1:s390x (8-20180110-1ubuntu1) ... Setting up libwind0-heimdal:s390x (7.5.0+dfsg-1) ... Setting up libbinutils:s390x (2.29.1-12ubuntu1) ... Setting up libcurl3-gnutls:s390x (7.57.0-1ubuntu1) ... Setting up init (1.51) ... Setting up libasn1-8-heimdal:s390x (7.5.0+dfsg-1) ... Setting up binutils-s390x-linux-gnu (2.29.1-12ubuntu1) ... Setting up libhcrypto4-heimdal:s390x (7.5.0+dfsg-1) ... Setting up libhx509-5-heimdal:s390x (7.5.0+dfsg-1) ... Setting up libgcc-7-dev:s390x (7.2.0-18ubuntu2) ... Setting up cpp-7 (7.2.0-18ubuntu2) ... Setting up libstdc++-7-dev:s390x (7.2.0-18ubuntu2) ... Setting up perl (5.26.1-3) ... Setting up pinentry-curses (1.0.0-3) ... Setting up libgcc-8-dev:s390x (8-20180110-1ubuntu1) ... Setting up binutils (2.29.1-12ubuntu1) ... Setting up libkrb5-26-heimdal:s390x (7.5.0+dfsg-1) ... Setting up gnupg-agent (2.1.15-1ubuntu8) ... Setting up libheimntlm0-heimdal:s390x (7.5.0+dfsg-1) ... Setting up libstdc++-8-dev:s390x (8-20180110-1ubuntu1) ... Setting up gcc-7 (7.2.0-18ubuntu2) ... Setting up g++-7 (7.2.0-18ubuntu2) ... Setting up gnupg (2.1.15-1ubuntu8) ... Setting up libdpkg-perl (1.19.0.4ubuntu1) ... Setting up gcc-8 (8-20180110-1ubuntu1) ... Setting up g++-8 (8-20180110-1ubuntu1) ... Setting up dpkg-dev (1.19.0.4ubuntu1) ... Setting up libgssapi3-heimdal:s390x (7.5.0+dfsg-1) ... Setting up gcc (4:8-20121108-1ubuntu0.2) ... Setting up g++ (4:8-20121108-1ubuntu0.2) ... Setting up build-essential (12.4ubuntu1) ... Processing triggers for libc-bin (2.26-0ubuntu2) ... RUN: /usr/share/launchpad-buildd/slavebin/sbuild-package PACKAGEBUILD-14111329 s390x bionic -c chroot:build-PACKAGEBUILD-14111329 --arch=s390x --dist=bionic --nolog 'kakoune_0~2016.12.20.1.3a6167ae-1build1.dsc' Initiating build PACKAGEBUILD-14111329 with 4 jobs across 4 processor cores. Kernel reported to sbuild: 4.4.0-109-generic #132-Ubuntu SMP Tue Jan 9 19:58:22 UTC 2018 s390x sbuild (Debian sbuild) 0.67.0 (26 Dec 2015) on bos02-s390x-014.buildd +==============================================================================+ | kakoune 0~2016.12.20.1.3a6167ae-1build1 (s390x) 15 Jan 2018 10:00 | +==============================================================================+ Package: kakoune Version: 0~2016.12.20.1.3a6167ae-1build1 Source Version: 0~2016.12.20.1.3a6167ae-1build1 Distribution: bionic Machine Architecture: s390x Host Architecture: s390x Build Architecture: s390x I: NOTICE: Log filtering will replace 'build/kakoune-8OIeiA/kakoune-0~2016.12.20.1.3a6167ae' with '<>' I: NOTICE: Log filtering will replace 'build/kakoune-8OIeiA' with '<>' I: NOTICE: Log filtering will replace 'home/buildd/build-PACKAGEBUILD-14111329/chroot-autobuild' with '<>' +------------------------------------------------------------------------------+ | Fetch source files | +------------------------------------------------------------------------------+ Local sources ------------- kakoune_0~2016.12.20.1.3a6167ae-1build1.dsc exists in .; copying to chroot Check architectures ------------------- Check dependencies ------------------ Merged Build-Depends: build-essential, fakeroot Filtered Build-Depends: build-essential, fakeroot dpkg-deb: building package 'sbuild-build-depends-core-dummy' in '/<>/resolver-lAztQW/apt_archive/sbuild-build-depends-core-dummy.deb'. Ign:1 copy:/<>/resolver-lAztQW/apt_archive ./ InRelease Get:2 copy:/<>/resolver-lAztQW/apt_archive ./ Release [2119 B] Ign:3 copy:/<>/resolver-lAztQW/apt_archive ./ Release.gpg Get:4 copy:/<>/resolver-lAztQW/apt_archive ./ Sources [214 B] Get:5 copy:/<>/resolver-lAztQW/apt_archive ./ Packages [525 B] Fetched 2858 B in 0s (225 kB/s) Reading package lists... Reading package lists... +------------------------------------------------------------------------------+ | Install core build dependencies (apt-based resolver) | +------------------------------------------------------------------------------+ Installing build dependencies Reading package lists... Building dependency tree... Reading state information... The following packages were automatically installed and are no longer required: g++-7 libasn1-8-heimdal libcurl3-gnutls libgssapi-krb5-2 libgssapi3-heimdal libhcrypto4-heimdal libheimbase1-heimdal libheimntlm0-heimdal libhx509-5-heimdal libidn2-0 libk5crypto3 libkeyutils1 libkrb5-26-heimdal libkrb5-3 libkrb5support0 libldap-2.4-2 libldap-common libnghttp2-14 libpsl5 libroken18-heimdal librtmp1 libsasl2-2 libsasl2-modules-db libstdc++-7-dev libunistring0 libwind0-heimdal Use 'apt autoremove' to remove them. The following NEW packages will be installed: sbuild-build-depends-core-dummy 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. Need to get 856 B of archives. After this operation, 0 B of additional disk space will be used. Get:1 copy:/<>/resolver-lAztQW/apt_archive ./ sbuild-build-depends-core-dummy 0.invalid.0 [856 B] debconf: delaying package configuration, since apt-utils is not installed Fetched 856 B in 0s (0 B/s) Selecting previously unselected package sbuild-build-depends-core-dummy. (Reading database ... 13368 files and directories currently installed.) Preparing to unpack .../sbuild-build-depends-core-dummy_0.invalid.0_s390x.deb ... Unpacking sbuild-build-depends-core-dummy (0.invalid.0) ... Setting up sbuild-build-depends-core-dummy (0.invalid.0) ... Merged Build-Depends: debhelper (>= 10), asciidoc, docbook-xsl, libboost-regex-dev (>= 1.50), libncursesw5-dev, xsltproc Filtered Build-Depends: debhelper (>= 10), asciidoc, docbook-xsl, libboost-regex-dev (>= 1.50), libncursesw5-dev, xsltproc dpkg-deb: building package 'sbuild-build-depends-kakoune-dummy' in '/<>/resolver-mOlmAJ/apt_archive/sbuild-build-depends-kakoune-dummy.deb'. Ign:1 copy:/<>/resolver-mOlmAJ/apt_archive ./ InRelease Get:2 copy:/<>/resolver-mOlmAJ/apt_archive ./ Release [2119 B] Ign:3 copy:/<>/resolver-mOlmAJ/apt_archive ./ Release.gpg Get:4 copy:/<>/resolver-mOlmAJ/apt_archive ./ Sources [258 B] Get:5 copy:/<>/resolver-mOlmAJ/apt_archive ./ Packages [577 B] Fetched 2954 B in 0s (205 kB/s) Reading package lists... Reading package lists... +------------------------------------------------------------------------------+ | Install kakoune build dependencies (apt-based resolver) | +------------------------------------------------------------------------------+ Installing build dependencies Reading package lists... Building dependency tree... Reading state information... The following packages were automatically installed and are no longer required: g++-7 libasn1-8-heimdal libcurl3-gnutls libgssapi-krb5-2 libgssapi3-heimdal libhcrypto4-heimdal libheimbase1-heimdal libheimntlm0-heimdal libhx509-5-heimdal libidn2-0 libk5crypto3 libkeyutils1 libkrb5-26-heimdal libkrb5-3 libkrb5support0 libldap-2.4-2 libldap-common libnghttp2-14 libpsl5 libroken18-heimdal librtmp1 libsasl2-2 libsasl2-modules-db libwind0-heimdal Use 'apt autoremove' to remove them. The following additional packages will be installed: asciidoc asciidoc-base asciidoc-common autoconf automake autopoint autotools-dev bsdmainutils debhelper dh-autoreconf dh-python dh-strip-nondeterminism docbook-xsl file gettext gettext-base gir1.2-glib-2.0 gir1.2-harfbuzz-0.0 groff-base icu-devtools intltool-debian libarchive-zip-perl libboost-regex-dev libboost-regex1.65-dev libboost-regex1.65.1 libboost1.65-dev libbsd0 libcroco3 libelf1 libexpat1 libfile-stripnondeterminism-perl libfreetype6 libgirepository-1.0-1 libglib2.0-0 libglib2.0-bin libglib2.0-data libglib2.0-dev libglib2.0-dev-bin libgraphite2-3 libgraphite2-dev libharfbuzz-dev libharfbuzz-gobject0 libharfbuzz-icu0 libharfbuzz0b libicu-dev libicu-le-hb-dev libicu-le-hb0 libicu60 libmagic-mgc libmagic1 libmpdec2 libncursesw5-dev libpcre16-3 libpcre3-dev libpcre32-3 libpcrecpp0v5 libpipeline1 libpython-stdlib libpython2.7-minimal libpython2.7-stdlib libpython3-stdlib libpython3.6-minimal libpython3.6-stdlib libsigsegv2 libtimedate-perl libtinfo-dev libtool libxml2 libxml2-utils libxslt1.1 m4 man-db mime-support pkg-config po-debconf python python-minimal python2.7 python2.7-minimal python3 python3-distutils python3-minimal python3.6 python3.6-2to3 python3.6-minimal sgml-base xml-core xsltproc zlib1g-dev Suggested packages: asciidoc-doc docbook-utils source-highlight autoconf-archive gnu-standards autoconf-doc wamerican | wordlist whois vacation dh-make dwz dbtoepub docbook-xsl-doc-html | docbook-xsl-doc-pdf | docbook-xsl-doc-text | docbook-xsl-doc docbook-xsl-saxon fop libsaxon-java libxalan2-java libxslthl-java xalan gettext-doc libasprintf-dev libgettextpo-dev groff libboost1.65-doc libboost-atomic1.65-dev libboost-chrono1.65-dev libboost-container1.65-dev libboost-date-time1.65-dev libboost-exception1.65-dev libboost-filesystem1.65-dev libboost-graph1.65-dev libboost-graph-parallel1.65-dev libboost-iostreams1.65-dev libboost-locale1.65-dev libboost-log1.65-dev libboost-math1.65-dev libboost-mpi1.65-dev libboost-mpi-python1.65-dev libboost-numpy1.65-dev libboost-program-options1.65-dev libboost-python1.65-dev libboost-random1.65-dev libboost-serialization1.65-dev libboost-signals1.65-dev libboost-stacktrace1.65-dev libboost-system1.65-dev libboost-test1.65-dev libboost-thread1.65-dev libboost-timer1.65-dev libboost-type-erasure1.65-dev libboost-wave1.65-dev libboost1.65-tools-dev libmpfrc++-dev libntl-dev libglib2.0-doc libgraphite2-utils icu-doc ncurses-doc libtool-doc gfortran | fortran95-compiler gcj-jdk m4-doc less www-browser apparmor libmail-box-perl python-doc python-tk python2.7-doc binfmt-support python3-doc python3-tk python3-venv python3.6-venv python3.6-doc sgml-base-doc Recommended packages: asciidoc-dblatex asciidoc-doc vim-asciidoc xmlto docbook-xml curl | wget | lynx libarchive-cpio-perl shared-mime-info xdg-user-dirs libltdl-dev libmail-sendmail-perl The following packages will be REMOVED: pkg-create-dbgsym* The following NEW packages will be installed: asciidoc asciidoc-base asciidoc-common autoconf automake autopoint autotools-dev bsdmainutils debhelper dh-autoreconf dh-python dh-strip-nondeterminism docbook-xsl file gettext gettext-base gir1.2-glib-2.0 gir1.2-harfbuzz-0.0 groff-base icu-devtools intltool-debian libarchive-zip-perl libboost-regex-dev libboost-regex1.65-dev libboost-regex1.65.1 libboost1.65-dev libbsd0 libcroco3 libelf1 libexpat1 libfile-stripnondeterminism-perl libfreetype6 libgirepository-1.0-1 libglib2.0-0 libglib2.0-bin libglib2.0-data libglib2.0-dev libglib2.0-dev-bin libgraphite2-3 libgraphite2-dev libharfbuzz-dev libharfbuzz-gobject0 libharfbuzz-icu0 libharfbuzz0b libicu-dev libicu-le-hb-dev libicu-le-hb0 libicu60 libmagic-mgc libmagic1 libmpdec2 libncursesw5-dev libpcre16-3 libpcre3-dev libpcre32-3 libpcrecpp0v5 libpipeline1 libpython-stdlib libpython2.7-minimal libpython2.7-stdlib libpython3-stdlib libpython3.6-minimal libpython3.6-stdlib libsigsegv2 libtimedate-perl libtinfo-dev libtool libxml2 libxml2-utils libxslt1.1 m4 man-db mime-support pkg-config po-debconf python python-minimal python2.7 python2.7-minimal python3 python3-distutils python3-minimal python3.6 python3.6-2to3 python3.6-minimal sbuild-build-depends-kakoune-dummy sgml-base xml-core xsltproc zlib1g-dev 0 upgraded, 90 newly installed, 1 to remove and 0 not upgraded. Need to get 46.0 MB of archives. After this operation, 309 MB of additional disk space will be used. Get:1 copy:/<>/resolver-mOlmAJ/apt_archive ./ sbuild-build-depends-kakoune-dummy 0.invalid.0 [908 B] Get:2 http://ftpmaster.internal/ubuntu bionic/main s390x libpython3.6-minimal s390x 3.6.4-2 [526 kB] Get:3 http://ftpmaster.internal/ubuntu bionic/main s390x libexpat1 s390x 2.2.5-3 [79.3 kB] Get:4 http://ftpmaster.internal/ubuntu bionic/main s390x python3.6-minimal s390x 3.6.4-2 [1330 kB] Get:5 http://ftpmaster.internal/ubuntu bionic/main s390x python3-minimal s390x 3.6.3-0ubuntu2 [23.3 kB] Get:6 http://ftpmaster.internal/ubuntu bionic/main s390x mime-support all 3.60ubuntu1 [30.1 kB] Get:7 http://ftpmaster.internal/ubuntu bionic/main s390x libmpdec2 s390x 2.4.2-1 [81.5 kB] Get:8 http://ftpmaster.internal/ubuntu bionic/main s390x libpython3.6-stdlib s390x 3.6.4-2 [1612 kB] Get:9 http://ftpmaster.internal/ubuntu bionic/main s390x python3.6-2to3 all 3.6.4-2 [13.9 kB] Get:10 http://ftpmaster.internal/ubuntu bionic/main s390x python3-distutils all 3.6.4~rc1-6 [145 kB] Get:11 http://ftpmaster.internal/ubuntu bionic/main s390x python3.6 s390x 3.6.4-2 [181 kB] Get:12 http://ftpmaster.internal/ubuntu bionic/main s390x libpython3-stdlib s390x 3.6.3-0ubuntu2 [6822 B] Get:13 http://ftpmaster.internal/ubuntu bionic/main s390x dh-python all 2.20170125 [83.7 kB] Get:14 http://ftpmaster.internal/ubuntu bionic/main s390x python3 s390x 3.6.3-0ubuntu2 [8712 B] Get:15 http://ftpmaster.internal/ubuntu bionic/main s390x groff-base s390x 1.22.3-9 [1174 kB] Get:16 http://ftpmaster.internal/ubuntu bionic/main s390x libbsd0 s390x 0.8.6-3 [40.2 kB] Get:17 http://ftpmaster.internal/ubuntu bionic/main s390x bsdmainutils s390x 9.0.14ubuntu1 [178 kB] Get:18 http://ftpmaster.internal/ubuntu bionic/main s390x libpipeline1 s390x 1.5.0-1 [24.1 kB] Get:19 http://ftpmaster.internal/ubuntu bionic/main s390x man-db s390x 2.7.6.1-4 [886 kB] Get:20 http://ftpmaster.internal/ubuntu bionic/main s390x libpython2.7-minimal s390x 2.7.14-4 [337 kB] Get:21 http://ftpmaster.internal/ubuntu bionic/main s390x python2.7-minimal s390x 2.7.14-4 [1172 kB] Get:22 http://ftpmaster.internal/ubuntu bionic/main s390x python-minimal s390x 2.7.14-2ubuntu1 [28.1 kB] Get:23 http://ftpmaster.internal/ubuntu bionic/main s390x libpython2.7-stdlib s390x 2.7.14-4 [1855 kB] Get:24 http://ftpmaster.internal/ubuntu bionic/main s390x python2.7 s390x 2.7.14-4 [233 kB] Get:25 http://ftpmaster.internal/ubuntu bionic/main s390x libpython-stdlib s390x 2.7.14-2ubuntu1 [7576 B] Get:26 http://ftpmaster.internal/ubuntu bionic/main s390x python s390x 2.7.14-2ubuntu1 [140 kB] Get:27 http://ftpmaster.internal/ubuntu bionic/main s390x sgml-base all 1.29 [12.3 kB] Get:28 http://ftpmaster.internal/ubuntu bionic/main s390x libmagic-mgc s390x 1:5.32-1 [185 kB] Get:29 http://ftpmaster.internal/ubuntu bionic/main s390x libmagic1 s390x 1:5.32-1 [66.9 kB] Get:30 http://ftpmaster.internal/ubuntu bionic/main s390x file s390x 1:5.32-1 [21.8 kB] Get:31 http://ftpmaster.internal/ubuntu bionic/main s390x libelf1 s390x 0.170-0.2 [42.8 kB] Get:32 http://ftpmaster.internal/ubuntu bionic/main s390x libglib2.0-0 s390x 2.54.1-1ubuntu1 [1075 kB] Get:33 http://ftpmaster.internal/ubuntu bionic/main s390x libglib2.0-data all 2.54.1-1ubuntu1 [4250 B] Get:34 http://ftpmaster.internal/ubuntu bionic/main s390x libfreetype6 s390x 2.8-0.2ubuntu2 [313 kB] Get:35 http://ftpmaster.internal/ubuntu bionic/main s390x libgraphite2-3 s390x 1.3.10-8 [70.3 kB] Get:36 http://ftpmaster.internal/ubuntu bionic/main s390x libharfbuzz0b s390x 1.7.2-1 [218 kB] Get:37 http://ftpmaster.internal/ubuntu bionic/main s390x libicu-le-hb0 s390x 1.0.3+git161113-4 [14.5 kB] Get:38 http://ftpmaster.internal/ubuntu bionic/main s390x libicu60 s390x 60.2-1ubuntu1 [7846 kB] Get:39 http://ftpmaster.internal/ubuntu bionic/main s390x libxml2 s390x 2.9.4+dfsg1-5.2ubuntu1 [593 kB] Get:40 http://ftpmaster.internal/ubuntu bionic/main s390x gettext-base s390x 0.19.8.1-4ubuntu2 [47.9 kB] Get:41 http://ftpmaster.internal/ubuntu bionic/main s390x libgirepository-1.0-1 s390x 1.54.1-4 [79.4 kB] Get:42 http://ftpmaster.internal/ubuntu bionic/main s390x gir1.2-glib-2.0 s390x 1.54.1-4 [129 kB] Get:43 http://ftpmaster.internal/ubuntu bionic/universe s390x asciidoc-common all 8.6.10-2 [199 kB] Get:44 http://ftpmaster.internal/ubuntu bionic/main s390x libxml2-utils s390x 2.9.4+dfsg1-5.2ubuntu1 [34.1 kB] Get:45 http://ftpmaster.internal/ubuntu bionic/universe s390x asciidoc-base all 8.6.10-2 [80.7 kB] Get:46 http://ftpmaster.internal/ubuntu bionic/universe s390x asciidoc all 8.6.10-2 [3264 B] Get:47 http://ftpmaster.internal/ubuntu bionic/main s390x libsigsegv2 s390x 2.11-1 [12.6 kB] Get:48 http://ftpmaster.internal/ubuntu bionic/main s390x m4 s390x 1.4.18-1 [195 kB] Get:49 http://ftpmaster.internal/ubuntu bionic/main s390x autoconf all 2.69-11 [322 kB] Get:50 http://ftpmaster.internal/ubuntu bionic/main s390x autotools-dev all 20171216.1 [39.7 kB] Get:51 http://ftpmaster.internal/ubuntu bionic/main s390x automake all 1:1.15.1-3ubuntu1 [509 kB] Get:52 http://ftpmaster.internal/ubuntu bionic/main s390x autopoint all 0.19.8.1-4ubuntu2 [412 kB] Get:53 http://ftpmaster.internal/ubuntu bionic/main s390x libtool all 2.4.6-2 [194 kB] Get:54 http://ftpmaster.internal/ubuntu bionic/main s390x dh-autoreconf all 15 [15.8 kB] Get:55 http://ftpmaster.internal/ubuntu bionic/main s390x libarchive-zip-perl all 1.60-1 [83.9 kB] Get:56 http://ftpmaster.internal/ubuntu bionic/main s390x libfile-stripnondeterminism-perl all 0.040-1 [13.9 kB] Get:57 http://ftpmaster.internal/ubuntu bionic/main s390x libtimedate-perl all 2.3000-2 [37.5 kB] Get:58 http://ftpmaster.internal/ubuntu bionic/main s390x dh-strip-nondeterminism all 0.040-1 [5196 B] Get:59 http://ftpmaster.internal/ubuntu bionic/main s390x libcroco3 s390x 0.6.12-2 [74.2 kB] Get:60 http://ftpmaster.internal/ubuntu bionic/main s390x gettext s390x 0.19.8.1-4ubuntu2 [1045 kB] Get:61 http://ftpmaster.internal/ubuntu bionic/main s390x intltool-debian all 0.35.0+20060710.4 [24.9 kB] Get:62 http://ftpmaster.internal/ubuntu bionic/main s390x po-debconf all 1.0.20 [232 kB] Get:63 http://ftpmaster.internal/ubuntu bionic/main s390x debhelper all 11ubuntu1 [887 kB] Get:64 http://ftpmaster.internal/ubuntu bionic/main s390x xml-core all 0.18 [21.3 kB] Get:65 http://ftpmaster.internal/ubuntu bionic/main s390x docbook-xsl all 1.79.1+dfsg-2 [1075 kB] Get:66 http://ftpmaster.internal/ubuntu bionic/main s390x gir1.2-harfbuzz-0.0 s390x 1.7.2-1 [18.2 kB] Get:67 http://ftpmaster.internal/ubuntu bionic/main s390x icu-devtools s390x 60.2-1ubuntu1 [171 kB] Get:68 http://ftpmaster.internal/ubuntu bionic/main s390x libboost1.65-dev s390x 1.65.1+dfsg-0ubuntu4 [7217 kB] Get:69 http://ftpmaster.internal/ubuntu bionic/main s390x libboost-regex1.65.1 s390x 1.65.1+dfsg-0ubuntu4 [230 kB] Get:70 http://ftpmaster.internal/ubuntu bionic/main s390x libharfbuzz-icu0 s390x 1.7.2-1 [5604 B] Get:71 http://ftpmaster.internal/ubuntu bionic/main s390x libharfbuzz-gobject0 s390x 1.7.2-1 [13.2 kB] Get:72 http://ftpmaster.internal/ubuntu bionic/main s390x libglib2.0-bin s390x 2.54.1-1ubuntu1 [65.3 kB] Get:73 http://ftpmaster.internal/ubuntu bionic/main s390x libglib2.0-dev-bin s390x 2.54.1-1ubuntu1 [84.1 kB] Get:74 http://ftpmaster.internal/ubuntu bionic/main s390x libpcre16-3 s390x 2:8.39-8 [79.5 kB] Get:75 http://ftpmaster.internal/ubuntu bionic/main s390x libpcre32-3 s390x 2:8.39-8 [73.9 kB] Get:76 http://ftpmaster.internal/ubuntu bionic/main s390x libpcrecpp0v5 s390x 2:8.39-8 [14.5 kB] Get:77 http://ftpmaster.internal/ubuntu bionic/main s390x libpcre3-dev s390x 2:8.39-8 [373 kB] Get:78 http://ftpmaster.internal/ubuntu bionic/main s390x pkg-config s390x 0.29.1-0ubuntu2 [44.0 kB] Get:79 http://ftpmaster.internal/ubuntu bionic/main s390x zlib1g-dev s390x 1:1.2.11.dfsg-0ubuntu2 [173 kB] Get:80 http://ftpmaster.internal/ubuntu bionic/main s390x libglib2.0-dev s390x 2.54.1-1ubuntu1 [1312 kB] Get:81 http://ftpmaster.internal/ubuntu bionic/main s390x libgraphite2-dev s390x 1.3.10-8 [14.5 kB] Get:82 http://ftpmaster.internal/ubuntu bionic/main s390x libharfbuzz-dev s390x 1.7.2-1 [287 kB] Get:83 http://ftpmaster.internal/ubuntu bionic/main s390x libicu-le-hb-dev s390x 1.0.3+git161113-4 [29.8 kB] Get:84 http://ftpmaster.internal/ubuntu bionic/main s390x libicu-dev s390x 60.2-1ubuntu1 [8681 kB] Get:85 http://ftpmaster.internal/ubuntu bionic/universe s390x libboost-regex1.65-dev s390x 1.65.1+dfsg-0ubuntu4 [284 kB] Get:86 http://ftpmaster.internal/ubuntu bionic/universe s390x libboost-regex-dev s390x 1.65.1.0ubuntu1 [3184 B] Get:87 http://ftpmaster.internal/ubuntu bionic/main s390x libtinfo-dev s390x 6.0+20160625-1ubuntu1 [80.1 kB] Get:88 http://ftpmaster.internal/ubuntu bionic/main s390x libncursesw5-dev s390x 6.0+20160625-1ubuntu1 [192 kB] Get:89 http://ftpmaster.internal/ubuntu bionic/main s390x libxslt1.1 s390x 1.1.29-5 [139 kB] Get:90 http://ftpmaster.internal/ubuntu bionic/main s390x xsltproc s390x 1.1.29-5 [13.2 kB] debconf: delaying package configuration, since apt-utils is not installed Fetched 46.0 MB in 0s (70.4 MB/s) (Reading database ... 13368 files and directories currently installed.) Removing pkg-create-dbgsym (0.73) ... Selecting previously unselected package libpython3.6-minimal:s390x. (Reading database ... 13359 files and directories currently installed.) Preparing to unpack .../00-libpython3.6-minimal_3.6.4-2_s390x.deb ... Unpacking libpython3.6-minimal:s390x (3.6.4-2) ... Selecting previously unselected package libexpat1:s390x. Preparing to unpack .../01-libexpat1_2.2.5-3_s390x.deb ... Unpacking libexpat1:s390x (2.2.5-3) ... Selecting previously unselected package python3.6-minimal. Preparing to unpack .../02-python3.6-minimal_3.6.4-2_s390x.deb ... Unpacking python3.6-minimal (3.6.4-2) ... Selecting previously unselected package python3-minimal. Preparing to unpack .../03-python3-minimal_3.6.3-0ubuntu2_s390x.deb ... Unpacking python3-minimal (3.6.3-0ubuntu2) ... Selecting previously unselected package mime-support. Preparing to unpack .../04-mime-support_3.60ubuntu1_all.deb ... Unpacking mime-support (3.60ubuntu1) ... Selecting previously unselected package libmpdec2:s390x. Preparing to unpack .../05-libmpdec2_2.4.2-1_s390x.deb ... Unpacking libmpdec2:s390x (2.4.2-1) ... Selecting previously unselected package libpython3.6-stdlib:s390x. Preparing to unpack .../06-libpython3.6-stdlib_3.6.4-2_s390x.deb ... Unpacking libpython3.6-stdlib:s390x (3.6.4-2) ... Selecting previously unselected package python3.6-2to3. Preparing to unpack .../07-python3.6-2to3_3.6.4-2_all.deb ... Unpacking python3.6-2to3 (3.6.4-2) ... Selecting previously unselected package python3-distutils. Preparing to unpack .../08-python3-distutils_3.6.4~rc1-6_all.deb ... Unpacking python3-distutils (3.6.4~rc1-6) ... Selecting previously unselected package python3.6. Preparing to unpack .../09-python3.6_3.6.4-2_s390x.deb ... Unpacking python3.6 (3.6.4-2) ... Selecting previously unselected package libpython3-stdlib:s390x. Preparing to unpack .../10-libpython3-stdlib_3.6.3-0ubuntu2_s390x.deb ... Unpacking libpython3-stdlib:s390x (3.6.3-0ubuntu2) ... Selecting previously unselected package dh-python. Preparing to unpack .../11-dh-python_2.20170125_all.deb ... Unpacking dh-python (2.20170125) ... Setting up libpython3.6-minimal:s390x (3.6.4-2) ... Setting up libexpat1:s390x (2.2.5-3) ... Setting up python3.6-minimal (3.6.4-2) ... Setting up python3-minimal (3.6.3-0ubuntu2) ... Selecting previously unselected package python3. (Reading database ... 14202 files and directories currently installed.) Preparing to unpack .../00-python3_3.6.3-0ubuntu2_s390x.deb ... Unpacking python3 (3.6.3-0ubuntu2) ... Selecting previously unselected package groff-base. Preparing to unpack .../01-groff-base_1.22.3-9_s390x.deb ... Unpacking groff-base (1.22.3-9) ... Selecting previously unselected package libbsd0:s390x. Preparing to unpack .../02-libbsd0_0.8.6-3_s390x.deb ... Unpacking libbsd0:s390x (0.8.6-3) ... Selecting previously unselected package bsdmainutils. Preparing to unpack .../03-bsdmainutils_9.0.14ubuntu1_s390x.deb ... Unpacking bsdmainutils (9.0.14ubuntu1) ... Selecting previously unselected package libpipeline1:s390x. Preparing to unpack .../04-libpipeline1_1.5.0-1_s390x.deb ... Unpacking libpipeline1:s390x (1.5.0-1) ... Selecting previously unselected package man-db. Preparing to unpack .../05-man-db_2.7.6.1-4_s390x.deb ... Unpacking man-db (2.7.6.1-4) ... Selecting previously unselected package libpython2.7-minimal:s390x. Preparing to unpack .../06-libpython2.7-minimal_2.7.14-4_s390x.deb ... Unpacking libpython2.7-minimal:s390x (2.7.14-4) ... Selecting previously unselected package python2.7-minimal. Preparing to unpack .../07-python2.7-minimal_2.7.14-4_s390x.deb ... Unpacking python2.7-minimal (2.7.14-4) ... Selecting previously unselected package python-minimal. Preparing to unpack .../08-python-minimal_2.7.14-2ubuntu1_s390x.deb ... Unpacking python-minimal (2.7.14-2ubuntu1) ... Selecting previously unselected package libpython2.7-stdlib:s390x. Preparing to unpack .../09-libpython2.7-stdlib_2.7.14-4_s390x.deb ... Unpacking libpython2.7-stdlib:s390x (2.7.14-4) ... Selecting previously unselected package python2.7. Preparing to unpack .../10-python2.7_2.7.14-4_s390x.deb ... Unpacking python2.7 (2.7.14-4) ... Selecting previously unselected package libpython-stdlib:s390x. Preparing to unpack .../11-libpython-stdlib_2.7.14-2ubuntu1_s390x.deb ... Unpacking libpython-stdlib:s390x (2.7.14-2ubuntu1) ... Setting up libpython2.7-minimal:s390x (2.7.14-4) ... Setting up python2.7-minimal (2.7.14-4) ... Setting up python-minimal (2.7.14-2ubuntu1) ... Selecting previously unselected package python. (Reading database ... 15473 files and directories currently installed.) Preparing to unpack .../00-python_2.7.14-2ubuntu1_s390x.deb ... Unpacking python (2.7.14-2ubuntu1) ... Selecting previously unselected package sgml-base. Preparing to unpack .../01-sgml-base_1.29_all.deb ... Unpacking sgml-base (1.29) ... Selecting previously unselected package libmagic-mgc. Preparing to unpack .../02-libmagic-mgc_1%3a5.32-1_s390x.deb ... Unpacking libmagic-mgc (1:5.32-1) ... Selecting previously unselected package libmagic1:s390x. Preparing to unpack .../03-libmagic1_1%3a5.32-1_s390x.deb ... Unpacking libmagic1:s390x (1:5.32-1) ... Selecting previously unselected package file. Preparing to unpack .../04-file_1%3a5.32-1_s390x.deb ... Unpacking file (1:5.32-1) ... Selecting previously unselected package libelf1:s390x. Preparing to unpack .../05-libelf1_0.170-0.2_s390x.deb ... Unpacking libelf1:s390x (0.170-0.2) ... Selecting previously unselected package libglib2.0-0:s390x. Preparing to unpack .../06-libglib2.0-0_2.54.1-1ubuntu1_s390x.deb ... Unpacking libglib2.0-0:s390x (2.54.1-1ubuntu1) ... Selecting previously unselected package libglib2.0-data. Preparing to unpack .../07-libglib2.0-data_2.54.1-1ubuntu1_all.deb ... Unpacking libglib2.0-data (2.54.1-1ubuntu1) ... Selecting previously unselected package libfreetype6:s390x. Preparing to unpack .../08-libfreetype6_2.8-0.2ubuntu2_s390x.deb ... Unpacking libfreetype6:s390x (2.8-0.2ubuntu2) ... Selecting previously unselected package libgraphite2-3:s390x. Preparing to unpack .../09-libgraphite2-3_1.3.10-8_s390x.deb ... Unpacking libgraphite2-3:s390x (1.3.10-8) ... Selecting previously unselected package libharfbuzz0b:s390x. Preparing to unpack .../10-libharfbuzz0b_1.7.2-1_s390x.deb ... Unpacking libharfbuzz0b:s390x (1.7.2-1) ... Selecting previously unselected package libicu-le-hb0:s390x. Preparing to unpack .../11-libicu-le-hb0_1.0.3+git161113-4_s390x.deb ... Unpacking libicu-le-hb0:s390x (1.0.3+git161113-4) ... Selecting previously unselected package libicu60:s390x. Preparing to unpack .../12-libicu60_60.2-1ubuntu1_s390x.deb ... Unpacking libicu60:s390x (60.2-1ubuntu1) ... Selecting previously unselected package libxml2:s390x. Preparing to unpack .../13-libxml2_2.9.4+dfsg1-5.2ubuntu1_s390x.deb ... Unpacking libxml2:s390x (2.9.4+dfsg1-5.2ubuntu1) ... Selecting previously unselected package gettext-base. Preparing to unpack .../14-gettext-base_0.19.8.1-4ubuntu2_s390x.deb ... Unpacking gettext-base (0.19.8.1-4ubuntu2) ... Selecting previously unselected package libgirepository-1.0-1:s390x. Preparing to unpack .../15-libgirepository-1.0-1_1.54.1-4_s390x.deb ... Unpacking libgirepository-1.0-1:s390x (1.54.1-4) ... Selecting previously unselected package gir1.2-glib-2.0:s390x. Preparing to unpack .../16-gir1.2-glib-2.0_1.54.1-4_s390x.deb ... Unpacking gir1.2-glib-2.0:s390x (1.54.1-4) ... Selecting previously unselected package asciidoc-common. Preparing to unpack .../17-asciidoc-common_8.6.10-2_all.deb ... Unpacking asciidoc-common (8.6.10-2) ... Selecting previously unselected package libxml2-utils. Preparing to unpack .../18-libxml2-utils_2.9.4+dfsg1-5.2ubuntu1_s390x.deb ... Unpacking libxml2-utils (2.9.4+dfsg1-5.2ubuntu1) ... Selecting previously unselected package asciidoc-base. Preparing to unpack .../19-asciidoc-base_8.6.10-2_all.deb ... Unpacking asciidoc-base (8.6.10-2) ... Selecting previously unselected package asciidoc. Preparing to unpack .../20-asciidoc_8.6.10-2_all.deb ... Unpacking asciidoc (8.6.10-2) ... Selecting previously unselected package libsigsegv2:s390x. Preparing to unpack .../21-libsigsegv2_2.11-1_s390x.deb ... Unpacking libsigsegv2:s390x (2.11-1) ... Selecting previously unselected package m4. Preparing to unpack .../22-m4_1.4.18-1_s390x.deb ... Unpacking m4 (1.4.18-1) ... Selecting previously unselected package autoconf. Preparing to unpack .../23-autoconf_2.69-11_all.deb ... Unpacking autoconf (2.69-11) ... Selecting previously unselected package autotools-dev. Preparing to unpack .../24-autotools-dev_20171216.1_all.deb ... Unpacking autotools-dev (20171216.1) ... Selecting previously unselected package automake. Preparing to unpack .../25-automake_1%3a1.15.1-3ubuntu1_all.deb ... Unpacking automake (1:1.15.1-3ubuntu1) ... Selecting previously unselected package autopoint. Preparing to unpack .../26-autopoint_0.19.8.1-4ubuntu2_all.deb ... Unpacking autopoint (0.19.8.1-4ubuntu2) ... Selecting previously unselected package libtool. Preparing to unpack .../27-libtool_2.4.6-2_all.deb ... Unpacking libtool (2.4.6-2) ... Selecting previously unselected package dh-autoreconf. Preparing to unpack .../28-dh-autoreconf_15_all.deb ... Unpacking dh-autoreconf (15) ... Selecting previously unselected package libarchive-zip-perl. Preparing to unpack .../29-libarchive-zip-perl_1.60-1_all.deb ... Unpacking libarchive-zip-perl (1.60-1) ... Selecting previously unselected package libfile-stripnondeterminism-perl. Preparing to unpack .../30-libfile-stripnondeterminism-perl_0.040-1_all.deb ... Unpacking libfile-stripnondeterminism-perl (0.040-1) ... Selecting previously unselected package libtimedate-perl. Preparing to unpack .../31-libtimedate-perl_2.3000-2_all.deb ... Unpacking libtimedate-perl (2.3000-2) ... Selecting previously unselected package dh-strip-nondeterminism. Preparing to unpack .../32-dh-strip-nondeterminism_0.040-1_all.deb ... Unpacking dh-strip-nondeterminism (0.040-1) ... Selecting previously unselected package libcroco3:s390x. Preparing to unpack .../33-libcroco3_0.6.12-2_s390x.deb ... Unpacking libcroco3:s390x (0.6.12-2) ... Selecting previously unselected package gettext. Preparing to unpack .../34-gettext_0.19.8.1-4ubuntu2_s390x.deb ... Unpacking gettext (0.19.8.1-4ubuntu2) ... Selecting previously unselected package intltool-debian. Preparing to unpack .../35-intltool-debian_0.35.0+20060710.4_all.deb ... Unpacking intltool-debian (0.35.0+20060710.4) ... Selecting previously unselected package po-debconf. Preparing to unpack .../36-po-debconf_1.0.20_all.deb ... Unpacking po-debconf (1.0.20) ... Selecting previously unselected package debhelper. Preparing to unpack .../37-debhelper_11ubuntu1_all.deb ... Unpacking debhelper (11ubuntu1) ... Selecting previously unselected package xml-core. Preparing to unpack .../38-xml-core_0.18_all.deb ... Unpacking xml-core (0.18) ... Selecting previously unselected package docbook-xsl. Preparing to unpack .../39-docbook-xsl_1.79.1+dfsg-2_all.deb ... Unpacking docbook-xsl (1.79.1+dfsg-2) ... Selecting previously unselected package gir1.2-harfbuzz-0.0:s390x. Preparing to unpack .../40-gir1.2-harfbuzz-0.0_1.7.2-1_s390x.deb ... Unpacking gir1.2-harfbuzz-0.0:s390x (1.7.2-1) ... Selecting previously unselected package icu-devtools. Preparing to unpack .../41-icu-devtools_60.2-1ubuntu1_s390x.deb ... Unpacking icu-devtools (60.2-1ubuntu1) ... Selecting previously unselected package libboost1.65-dev:s390x. Preparing to unpack .../42-libboost1.65-dev_1.65.1+dfsg-0ubuntu4_s390x.deb ... Unpacking libboost1.65-dev:s390x (1.65.1+dfsg-0ubuntu4) ... Selecting previously unselected package libboost-regex1.65.1:s390x. Preparing to unpack .../43-libboost-regex1.65.1_1.65.1+dfsg-0ubuntu4_s390x.deb ... Unpacking libboost-regex1.65.1:s390x (1.65.1+dfsg-0ubuntu4) ... Selecting previously unselected package libharfbuzz-icu0:s390x. Preparing to unpack .../44-libharfbuzz-icu0_1.7.2-1_s390x.deb ... Unpacking libharfbuzz-icu0:s390x (1.7.2-1) ... Selecting previously unselected package libharfbuzz-gobject0:s390x. Preparing to unpack .../45-libharfbuzz-gobject0_1.7.2-1_s390x.deb ... Unpacking libharfbuzz-gobject0:s390x (1.7.2-1) ... Selecting previously unselected package libglib2.0-bin. Preparing to unpack .../46-libglib2.0-bin_2.54.1-1ubuntu1_s390x.deb ... Unpacking libglib2.0-bin (2.54.1-1ubuntu1) ... Selecting previously unselected package libglib2.0-dev-bin. Preparing to unpack .../47-libglib2.0-dev-bin_2.54.1-1ubuntu1_s390x.deb ... Unpacking libglib2.0-dev-bin (2.54.1-1ubuntu1) ... Selecting previously unselected package libpcre16-3:s390x. Preparing to unpack .../48-libpcre16-3_2%3a8.39-8_s390x.deb ... Unpacking libpcre16-3:s390x (2:8.39-8) ... Selecting previously unselected package libpcre32-3:s390x. Preparing to unpack .../49-libpcre32-3_2%3a8.39-8_s390x.deb ... Unpacking libpcre32-3:s390x (2:8.39-8) ... Selecting previously unselected package libpcrecpp0v5:s390x. Preparing to unpack .../50-libpcrecpp0v5_2%3a8.39-8_s390x.deb ... Unpacking libpcrecpp0v5:s390x (2:8.39-8) ... Selecting previously unselected package libpcre3-dev:s390x. Preparing to unpack .../51-libpcre3-dev_2%3a8.39-8_s390x.deb ... Unpacking libpcre3-dev:s390x (2:8.39-8) ... Selecting previously unselected package pkg-config. Preparing to unpack .../52-pkg-config_0.29.1-0ubuntu2_s390x.deb ... Unpacking pkg-config (0.29.1-0ubuntu2) ... Selecting previously unselected package zlib1g-dev:s390x. Preparing to unpack .../53-zlib1g-dev_1%3a1.2.11.dfsg-0ubuntu2_s390x.deb ... Unpacking zlib1g-dev:s390x (1:1.2.11.dfsg-0ubuntu2) ... Selecting previously unselected package libglib2.0-dev:s390x. Preparing to unpack .../54-libglib2.0-dev_2.54.1-1ubuntu1_s390x.deb ... Unpacking libglib2.0-dev:s390x (2.54.1-1ubuntu1) ... Selecting previously unselected package libgraphite2-dev:s390x. Preparing to unpack .../55-libgraphite2-dev_1.3.10-8_s390x.deb ... Unpacking libgraphite2-dev:s390x (1.3.10-8) ... Selecting previously unselected package libharfbuzz-dev:s390x. Preparing to unpack .../56-libharfbuzz-dev_1.7.2-1_s390x.deb ... Unpacking libharfbuzz-dev:s390x (1.7.2-1) ... Selecting previously unselected package libicu-le-hb-dev:s390x. Preparing to unpack .../57-libicu-le-hb-dev_1.0.3+git161113-4_s390x.deb ... Unpacking libicu-le-hb-dev:s390x (1.0.3+git161113-4) ... Selecting previously unselected package libicu-dev. Preparing to unpack .../58-libicu-dev_60.2-1ubuntu1_s390x.deb ... Unpacking libicu-dev (60.2-1ubuntu1) ... Selecting previously unselected package libboost-regex1.65-dev:s390x. Preparing to unpack .../59-libboost-regex1.65-dev_1.65.1+dfsg-0ubuntu4_s390x.deb ... Unpacking libboost-regex1.65-dev:s390x (1.65.1+dfsg-0ubuntu4) ... Selecting previously unselected package libboost-regex-dev:s390x. Preparing to unpack .../60-libboost-regex-dev_1.65.1.0ubuntu1_s390x.deb ... Unpacking libboost-regex-dev:s390x (1.65.1.0ubuntu1) ... Selecting previously unselected package libtinfo-dev:s390x. Preparing to unpack .../61-libtinfo-dev_6.0+20160625-1ubuntu1_s390x.deb ... Unpacking libtinfo-dev:s390x (6.0+20160625-1ubuntu1) ... Selecting previously unselected package libncursesw5-dev:s390x. Preparing to unpack .../62-libncursesw5-dev_6.0+20160625-1ubuntu1_s390x.deb ... Unpacking libncursesw5-dev:s390x (6.0+20160625-1ubuntu1) ... Selecting previously unselected package libxslt1.1:s390x. Preparing to unpack .../63-libxslt1.1_1.1.29-5_s390x.deb ... Unpacking libxslt1.1:s390x (1.1.29-5) ... Selecting previously unselected package xsltproc. Preparing to unpack .../64-xsltproc_1.1.29-5_s390x.deb ... Unpacking xsltproc (1.1.29-5) ... Selecting previously unselected package sbuild-build-depends-kakoune-dummy. Preparing to unpack .../65-sbuild-build-depends-kakoune-dummy_0.invalid.0_s390x.deb ... Unpacking sbuild-build-depends-kakoune-dummy (0.invalid.0) ... Setting up libarchive-zip-perl (1.60-1) ... Setting up mime-support (3.60ubuntu1) ... Setting up libtimedate-perl (2.3000-2) ... Setting up libsigsegv2:s390x (2.11-1) ... Setting up libelf1:s390x (0.170-0.2) ... Setting up groff-base (1.22.3-9) ... Setting up libglib2.0-0:s390x (2.54.1-1ubuntu1) ... No schema files found: doing nothing. Setting up libtinfo-dev:s390x (6.0+20160625-1ubuntu1) ... Setting up gettext-base (0.19.8.1-4ubuntu2) ... Setting up libpipeline1:s390x (1.5.0-1) ... Setting up m4 (1.4.18-1) ... Setting up sgml-base (1.29) ... Setting up libbsd0:s390x (0.8.6-3) ... Setting up libgirepository-1.0-1:s390x (1.54.1-4) ... Setting up libfreetype6:s390x (2.8-0.2ubuntu2) ... Setting up libmagic-mgc (1:5.32-1) ... Setting up libmagic1:s390x (1:5.32-1) ... Setting up libgraphite2-3:s390x (1.3.10-8) ... Setting up pkg-config (0.29.1-0ubuntu2) ... Setting up asciidoc-common (8.6.10-2) ... Setting up gir1.2-glib-2.0:s390x (1.54.1-4) ... Setting up libglib2.0-data (2.54.1-1ubuntu1) ... Processing triggers for libc-bin (2.26-0ubuntu2) ... Setting up autotools-dev (20171216.1) ... Setting up libncursesw5-dev:s390x (6.0+20160625-1ubuntu1) ... Setting up libpcrecpp0v5:s390x (2:8.39-8) ... Setting up libpcre32-3:s390x (2:8.39-8) ... Setting up libpcre16-3:s390x (2:8.39-8) ... Setting up xml-core (0.18) ... Setting up bsdmainutils (9.0.14ubuntu1) ... update-alternatives: using /usr/bin/bsd-write to provide /usr/bin/write (write) in auto mode update-alternatives: using /usr/bin/bsd-from to provide /usr/bin/from (from) in auto mode Setting up libglib2.0-bin (2.54.1-1ubuntu1) ... Setting up libboost1.65-dev:s390x (1.65.1+dfsg-0ubuntu4) ... Setting up libgraphite2-dev:s390x (1.3.10-8) ... Setting up libpython2.7-stdlib:s390x (2.7.14-4) ... Setting up autopoint (0.19.8.1-4ubuntu2) ... Setting up libmpdec2:s390x (2.4.2-1) ... Setting up zlib1g-dev:s390x (1:1.2.11.dfsg-0ubuntu2) ... Setting up libfile-stripnondeterminism-perl (0.040-1) ... Setting up libpython3.6-stdlib:s390x (3.6.4-2) ... Setting up libpcre3-dev:s390x (2:8.39-8) ... Setting up python2.7 (2.7.14-4) ... Setting up libharfbuzz0b:s390x (1.7.2-1) ... Setting up autoconf (2.69-11) ... Setting up file (1:5.32-1) ... Setting up libpython-stdlib:s390x (2.7.14-2ubuntu1) ... Setting up gir1.2-harfbuzz-0.0:s390x (1.7.2-1) ... Setting up automake (1:1.15.1-3ubuntu1) ... update-alternatives: using /usr/bin/automake-1.15 to provide /usr/bin/automake (automake) in auto mode Setting up man-db (2.7.6.1-4) ... Not building database; man-db/auto-update is not 'true'. Setting up libharfbuzz-gobject0:s390x (1.7.2-1) ... Setting up python (2.7.14-2ubuntu1) ... Setting up libtool (2.4.6-2) ... Setting up libpython3-stdlib:s390x (3.6.3-0ubuntu2) ... Processing triggers for sgml-base (1.29) ... Setting up docbook-xsl (1.79.1+dfsg-2) ... Setting up python3.6 (3.6.4-2) ... Setting up dh-autoreconf (15) ... Setting up python3 (3.6.3-0ubuntu2) ... Setting up libglib2.0-dev-bin (2.54.1-1ubuntu1) ... Setting up libicu-le-hb0:s390x (1.0.3+git161113-4) ... Setting up python3.6-2to3 (3.6.4-2) ... python3.6: can't get files for byte-compilation Setting up libglib2.0-dev:s390x (2.54.1-1ubuntu1) ... Setting up dh-strip-nondeterminism (0.040-1) ... Setting up dh-python (2.20170125) ... Setting up python3-distutils (3.6.4~rc1-6) ... Setting up libicu60:s390x (60.2-1ubuntu1) ... Setting up libharfbuzz-icu0:s390x (1.7.2-1) ... Setting up libxml2:s390x (2.9.4+dfsg1-5.2ubuntu1) ... Setting up libcroco3:s390x (0.6.12-2) ... Setting up libxslt1.1:s390x (1.1.29-5) ... Setting up icu-devtools (60.2-1ubuntu1) ... Setting up libharfbuzz-dev:s390x (1.7.2-1) ... Setting up libboost-regex1.65.1:s390x (1.65.1+dfsg-0ubuntu4) ... Setting up libicu-le-hb-dev:s390x (1.0.3+git161113-4) ... Setting up gettext (0.19.8.1-4ubuntu2) ... Setting up libxml2-utils (2.9.4+dfsg1-5.2ubuntu1) ... Setting up xsltproc (1.1.29-5) ... Setting up libicu-dev (60.2-1ubuntu1) ... Setting up intltool-debian (0.35.0+20060710.4) ... Setting up asciidoc-base (8.6.10-2) ... Setting up asciidoc (8.6.10-2) ... Setting up libboost-regex1.65-dev:s390x (1.65.1+dfsg-0ubuntu4) ... Setting up po-debconf (1.0.20) ... Setting up libboost-regex-dev:s390x (1.65.1.0ubuntu1) ... Setting up debhelper (11ubuntu1) ... Setting up sbuild-build-depends-kakoune-dummy (0.invalid.0) ... (Reading database ... 32549 files and directories currently installed.) Purging configuration files for pkg-create-dbgsym (0.73) ... Processing triggers for libc-bin (2.26-0ubuntu2) ... +------------------------------------------------------------------------------+ | Build environment | +------------------------------------------------------------------------------+ Kernel: Linux 4.4.0-109-generic s390x (s390x) Toolchain package versions: binutils_2.29.1-12ubuntu1 dpkg-dev_1.19.0.4ubuntu1 g++-7_7.2.0-18ubuntu2 g++-8_8-20180110-1ubuntu1 gcc-7_7.2.0-18ubuntu2 gcc-8_8-20180110-1ubuntu1 libc6-dev_2.26-0ubuntu2 libstdc++-7-dev_7.2.0-18ubuntu2 libstdc++-8-dev_8-20180110-1ubuntu1 libstdc++6_8-20180110-1ubuntu1 linux-libc-dev_4.13.0-25.29 Package versions: adduser_3.116ubuntu1 advancecomp_2.0-1 apt_1.6~alpha5 apt-transport-https_1.6~alpha5 asciidoc_8.6.10-2 asciidoc-base_8.6.10-2 asciidoc-common_8.6.10-2 autoconf_2.69-11 automake_1:1.15.1-3ubuntu1 autopoint_0.19.8.1-4ubuntu2 autotools-dev_20171216.1 base-files_10ubuntu1 base-passwd_3.5.44 bash_4.4-5ubuntu1 binutils_2.29.1-12ubuntu1 binutils-common_2.29.1-12ubuntu1 binutils-s390x-linux-gnu_2.29.1-12ubuntu1 bsdmainutils_9.0.14ubuntu1 bsdutils_1:2.30.2-0.1ubuntu1 build-essential_12.4ubuntu1 bzip2_1.0.6-8.1 ca-certificates_20170717 coreutils_8.26-3ubuntu4 cpp_4:8-20121108-1ubuntu0.2 cpp-7_7.2.0-18ubuntu2 cpp-8_8-20180110-1ubuntu1 dash_0.5.8-2.3ubuntu1 debconf_1.5.65 debhelper_11ubuntu1 debianutils_4.8.4 dh-autoreconf_15 dh-python_2.20170125 dh-strip-nondeterminism_0.040-1 diffutils_1:3.6-1 dmsetup_2:1.02.137-2ubuntu3 docbook-xsl_1.79.1+dfsg-2 dpkg_1.19.0.4ubuntu1 dpkg-dev_1.19.0.4ubuntu1 e2fslibs_1.43.8-1ubuntu1 e2fsprogs_1.43.8-1ubuntu1 fakeroot_1.21-1ubuntu2 fdisk_2.30.2-0.1ubuntu1 file_1:5.32-1 findutils_4.6.0+git+20170828-2 g++_4:8-20121108-1ubuntu0.2 g++-7_7.2.0-18ubuntu2 g++-8_8-20180110-1ubuntu1 gcc_4:8-20121108-1ubuntu0.2 gcc-7_7.2.0-18ubuntu2 gcc-7-base_7.2.0-18ubuntu2 gcc-8_8-20180110-1ubuntu1 gcc-8-base_8-20180110-1ubuntu1 gettext_0.19.8.1-4ubuntu2 gettext-base_0.19.8.1-4ubuntu2 gir1.2-glib-2.0_1.54.1-4 gir1.2-harfbuzz-0.0_1.7.2-1 gnupg_2.1.15-1ubuntu8 gnupg-agent_2.1.15-1ubuntu8 gpgv_2.1.15-1ubuntu8 grep_3.1-2 groff-base_1.22.3-9 gzip_1.6-5ubuntu1 hostname_3.18 icu-devtools_60.2-1ubuntu1 init_1.51 init-system-helpers_1.51 initscripts_2.88dsf-59.3ubuntu2 insserv_1.14.0-5ubuntu3 intltool-debian_0.35.0+20060710.4 libacl1_2.2.52-3build1 libapparmor1_2.11.0-2ubuntu18 libapt-pkg5.0_1.6~alpha5 libarchive-zip-perl_1.60-1 libasn1-8-heimdal_7.5.0+dfsg-1 libassuan0_2.5.1-1 libatomic1_8-20180110-1ubuntu1 libattr1_1:2.4.47-2build1 libaudit-common_1:2.7.7-1ubuntu2 libaudit1_1:2.7.7-1ubuntu2 libbinutils_2.29.1-12ubuntu1 libblkid1_2.30.2-0.1ubuntu1 libboost-regex-dev_1.65.1.0ubuntu1 libboost-regex1.65-dev_1.65.1+dfsg-0ubuntu4 libboost-regex1.65.1_1.65.1+dfsg-0ubuntu4 libboost1.65-dev_1.65.1+dfsg-0ubuntu4 libbsd0_0.8.6-3 libbz2-1.0_1.0.6-8.1 libc-bin_2.26-0ubuntu2 libc-dev-bin_2.26-0ubuntu2 libc6_2.26-0ubuntu2 libc6-dev_2.26-0ubuntu2 libcap-ng0_0.7.7-3.1 libcap2_1:2.25-1.2 libcc1-0_8-20180110-1ubuntu1 libcomerr2_1.43.8-1ubuntu1 libcroco3_0.6.12-2 libcryptsetup4_2:1.7.3-4ubuntu1 libcurl3-gnutls_7.57.0-1ubuntu1 libdb5.3_5.3.28-13.1 libdebconfclient0_0.213ubuntu1 libdevmapper1.02.1_2:1.02.137-2ubuntu3 libdpkg-perl_1.19.0.4ubuntu1 libelf1_0.170-0.2 libexpat1_2.2.5-3 libfakeroot_1.21-1ubuntu2 libfdisk1_2.30.2-0.1ubuntu1 libffi6_3.2.1-6 libfile-stripnondeterminism-perl_0.040-1 libfreetype6_2.8-0.2ubuntu2 libgcc-7-dev_7.2.0-18ubuntu2 libgcc-8-dev_8-20180110-1ubuntu1 libgcc1_1:8-20180110-1ubuntu1 libgcrypt20_1.8.1-4 libgdbm3_1.8.3-14 libgirepository-1.0-1_1.54.1-4 libglib2.0-0_2.54.1-1ubuntu1 libglib2.0-bin_2.54.1-1ubuntu1 libglib2.0-data_2.54.1-1ubuntu1 libglib2.0-dev_2.54.1-1ubuntu1 libglib2.0-dev-bin_2.54.1-1ubuntu1 libgmp10_2:6.1.2+dfsg-1 libgnutls30_3.5.8-6ubuntu3 libgomp1_8-20180110-1ubuntu1 libgpg-error0_1.27-5 libgraphite2-3_1.3.10-8 libgraphite2-dev_1.3.10-8 libgssapi-krb5-2_1.15.1-2 libgssapi3-heimdal_7.5.0+dfsg-1 libharfbuzz-dev_1.7.2-1 libharfbuzz-gobject0_1.7.2-1 libharfbuzz-icu0_1.7.2-1 libharfbuzz0b_1.7.2-1 libhcrypto4-heimdal_7.5.0+dfsg-1 libheimbase1-heimdal_7.5.0+dfsg-1 libheimntlm0-heimdal_7.5.0+dfsg-1 libhogweed4_3.3-2 libhx509-5-heimdal_7.5.0+dfsg-1 libicu-dev_60.2-1ubuntu1 libicu-le-hb-dev_1.0.3+git161113-4 libicu-le-hb0_1.0.3+git161113-4 libicu60_60.2-1ubuntu1 libidn11_1.33-2.1 libidn2-0_2.0.4-1 libip4tc0_1.6.1-2ubuntu2 libisl15_0.18-1 libitm1_8-20180110-1ubuntu1 libk5crypto3_1.15.1-2 libkeyutils1_1.5.9-9.2ubuntu1 libkmod2_24-1ubuntu2 libkrb5-26-heimdal_7.5.0+dfsg-1 libkrb5-3_1.15.1-2 libkrb5support0_1.15.1-2 libksba8_1.3.5-2 libldap-2.4-2_2.4.45+dfsg-1ubuntu1 libldap-common_2.4.45+dfsg-1ubuntu1 liblockfile-bin_1.14-1.1 liblockfile1_1.14-1.1 liblz4-1_0.0~r131-2ubuntu2 liblzma5_5.2.2-1.3 libmagic-mgc_1:5.32-1 libmagic1_1:5.32-1 libmount1_2.30.2-0.1ubuntu1 libmpc3_1.0.3-2 libmpdec2_2.4.2-1 libmpfr4_3.1.6-1 libncurses5_6.0+20160625-1ubuntu1 libncursesw5_6.0+20160625-1ubuntu1 libncursesw5-dev_6.0+20160625-1ubuntu1 libnettle6_3.3-2 libnghttp2-14_1.29.0-1 libnpth0_1.5-3 libp11-kit0_0.23.9-2 libpam-modules_1.1.8-3.2ubuntu3 libpam-modules-bin_1.1.8-3.2ubuntu3 libpam-runtime_1.1.8-3.2ubuntu3 libpam0g_1.1.8-3.2ubuntu3 libpcre16-3_2:8.39-8 libpcre3_2:8.39-8 libpcre3-dev_2:8.39-8 libpcre32-3_2:8.39-8 libpcrecpp0v5_2:8.39-8 libperl5.26_5.26.1-3 libpipeline1_1.5.0-1 libpng16-16_1.6.34-1 libprocps6_2:3.3.12-1ubuntu2 libpsl5_0.19.1-4 libpython-stdlib_2.7.14-2ubuntu1 libpython2.7-minimal_2.7.14-4 libpython2.7-stdlib_2.7.14-4 libpython3-stdlib_3.6.3-0ubuntu2 libpython3.6-minimal_3.6.4-2 libpython3.6-stdlib_3.6.4-2 libreadline7_7.0-0ubuntu2 libroken18-heimdal_7.5.0+dfsg-1 librtmp1_2.4+20151223.gitfa8646d.1-1 libsasl2-2_2.1.27~101-g0780600+dfsg-3ubuntu1 libsasl2-modules-db_2.1.27~101-g0780600+dfsg-3ubuntu1 libseccomp2_2.3.1-2.1ubuntu3 libselinux1_2.7-2 libsemanage-common_2.7-2 libsemanage1_2.7-2 libsepol1_2.7-1 libsigsegv2_2.11-1 libslang2_2.3.1-5ubuntu1 libsmartcols1_2.30.2-0.1ubuntu1 libsqlite3-0_3.21.0-1 libss2_1.43.8-1ubuntu1 libssl1.0.0_1.0.2g-1ubuntu14 libstdc++-7-dev_7.2.0-18ubuntu2 libstdc++-8-dev_8-20180110-1ubuntu1 libstdc++6_8-20180110-1ubuntu1 libsystemd0_235-3ubuntu3 libtasn1-6_4.12-3 libtimedate-perl_2.3000-2 libtinfo-dev_6.0+20160625-1ubuntu1 libtinfo5_6.0+20160625-1ubuntu1 libtool_2.4.6-2 libudev1_235-3ubuntu3 libunistring0_0.9.3-5.2ubuntu1 libusb-0.1-4_2:0.1.12-31 libustr-1.0-1_1.0.4-6 libuuid1_2.30.2-0.1ubuntu1 libwind0-heimdal_7.5.0+dfsg-1 libxml2_2.9.4+dfsg1-5.2ubuntu1 libxml2-utils_2.9.4+dfsg1-5.2ubuntu1 libxslt1.1_1.1.29-5 linux-libc-dev_4.13.0-25.29 lockfile-progs_0.1.17build1 login_1:4.2-3.2ubuntu4 lsb-base_9.20170808ubuntu1 m4_1.4.18-1 make_4.1-9.1 man-db_2.7.6.1-4 mawk_1.3.3-17ubuntu2 mime-support_3.60ubuntu1 mount_2.30.2-0.1ubuntu1 multiarch-support_2.26-0ubuntu2 ncurses-base_6.0+20160625-1ubuntu1 ncurses-bin_6.0+20160625-1ubuntu1 openssl_1.0.2g-1ubuntu14 optipng_0.7.6-1.1 passwd_1:4.2-3.2ubuntu4 patch_2.7.5-1build1 perl_5.26.1-3 perl-base_5.26.1-3 perl-modules-5.26_5.26.1-3 pinentry-curses_1.0.0-3 pkg-config_0.29.1-0ubuntu2 pkgbinarymangler_131 po-debconf_1.0.20 policyrcd-script-zg2_0.1-3 procps_2:3.3.12-1ubuntu2 python_2.7.14-2ubuntu1 python-minimal_2.7.14-2ubuntu1 python2.7_2.7.14-4 python2.7-minimal_2.7.14-4 python3_3.6.3-0ubuntu2 python3-distutils_3.6.4~rc1-6 python3-minimal_3.6.3-0ubuntu2 python3.6_3.6.4-2 python3.6-2to3_3.6.4-2 python3.6-minimal_3.6.4-2 readline-common_7.0-0ubuntu2 sbuild-build-depends-core-dummy_0.invalid.0 sbuild-build-depends-kakoune-dummy_0.invalid.0 sed_4.4-1 sensible-utils_0.0.11 sgml-base_1.29 systemd_235-3ubuntu3 systemd-sysv_235-3ubuntu3 sysv-rc_2.88dsf-59.3ubuntu2 sysvinit-utils_2.88dsf-59.10ubuntu1 tar_1.29b-2 tzdata_2017c-1 ubuntu-keyring_2016.10.27 util-linux_2.30.2-0.1ubuntu1 xml-core_0.18 xsltproc_1.1.29-5 xz-utils_5.2.2-1.3 zlib1g_1:1.2.11.dfsg-0ubuntu2 zlib1g-dev_1:1.2.11.dfsg-0ubuntu2 +------------------------------------------------------------------------------+ | Build | +------------------------------------------------------------------------------+ Unpack source ------------- gpgv: Signature made Thu Oct 26 19:02:13 2017 UTC gpgv: using RSA key gpgv: issuer "doko@ubuntu.com" gpgv: Can't check signature: No public key dpkg-source: warning: failed to verify signature on ./kakoune_0~2016.12.20.1.3a6167ae-1build1.dsc dpkg-source: info: extracting kakoune in kakoune-0~2016.12.20.1.3a6167ae dpkg-source: info: unpacking kakoune_0~2016.12.20.1.3a6167ae.orig.tar.xz dpkg-source: info: unpacking kakoune_0~2016.12.20.1.3a6167ae-1build1.debian.tar.xz dpkg-source: info: applying 01-typos.patch dpkg-source: info: applying 02-manpages.patch Check disc space ---------------- Sufficient free space for build User Environment ---------------- APT_CONFIG=/var/lib/sbuild/apt.conf DEB_BUILD_OPTIONS=noautodbgsym parallel=4 HOME=/sbuild-nonexistent LANG=C.UTF-8 LC_ALL=C.UTF-8 LOGNAME=buildd PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games SCHROOT_ALIAS_NAME=build-PACKAGEBUILD-14111329 SCHROOT_CHROOT_NAME=build-PACKAGEBUILD-14111329 SCHROOT_COMMAND=env SCHROOT_GID=2501 SCHROOT_GROUP=buildd SCHROOT_SESSION_ID=build-PACKAGEBUILD-14111329 SCHROOT_UID=2001 SCHROOT_USER=buildd SHELL=/bin/sh TERM=unknown USER=buildd V=1 dpkg-buildpackage ----------------- dpkg-buildpackage: info: source package kakoune dpkg-buildpackage: info: source version 0~2016.12.20.1.3a6167ae-1build1 dpkg-buildpackage: info: source distribution bionic dpkg-source --before-build kakoune-0~2016.12.20.1.3a6167ae dpkg-buildpackage: info: host architecture s390x fakeroot debian/rules clean dh 'clean' -D src dh_testdir -O-Dsrc dh_auto_clean -O-Dsrc cd src && make -j4 distclean make[1]: Entering directory '/<>/src' rm -f .*.o .*.d rm -f kak make[1]: Leaving directory '/<>/src' dh_autoreconf_clean -O-Dsrc dh_clean -O-Dsrc debian/rules build-arch dh 'build-arch' -D src dh_testdir -a -O-Dsrc dh_update_autotools_config -a -O-Dsrc dh_autoreconf -a -O-Dsrc dh_auto_configure -a -O-Dsrc dh_auto_build -a -O-Dsrc cd src && make -j4 make[1]: Entering directory '/<>/src' g++ -Wdate-time -D_FORTIFY_SOURCE=2 -DKAK_DEBUG -I/usr/include/ncursesw -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -pedantic -std=gnu++11 -g -Wall -Wno-reorder -Wno-sign-compare -Wno-address -MD -MP -MF .line_modification.debug.d -c -o .line_modification.debug.o line_modification.cc g++ -Wdate-time -D_FORTIFY_SOURCE=2 -DKAK_DEBUG -I/usr/include/ncursesw -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -pedantic -std=gnu++11 -g -Wall -Wno-reorder -Wno-sign-compare -Wno-address -MD -MP -MF .highlighter_group.debug.d -c -o .highlighter_group.debug.o highlighter_group.cc g++ -Wdate-time -D_FORTIFY_SOURCE=2 -DKAK_DEBUG -I/usr/include/ncursesw -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -pedantic -std=gnu++11 -g -Wall -Wno-reorder -Wno-sign-compare -Wno-address -MD -MP -MF .selectors.debug.d -c -o .selectors.debug.o selectors.cc g++ -Wdate-time -D_FORTIFY_SOURCE=2 -DKAK_DEBUG -I/usr/include/ncursesw -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -pedantic -std=gnu++11 -g -Wall -Wno-reorder -Wno-sign-compare -Wno-address -MD -MP -MF .alias_registry.debug.d -c -o .alias_registry.debug.o alias_registry.cc g++ -Wdate-time -D_FORTIFY_SOURCE=2 -DKAK_DEBUG -I/usr/include/ncursesw -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -pedantic -std=gnu++11 -g -Wall -Wno-reorder -Wno-sign-compare -Wno-address -MD -MP -MF .client.debug.d -c -o .client.debug.o client.cc g++ -Wdate-time -D_FORTIFY_SOURCE=2 -DKAK_DEBUG -I/usr/include/ncursesw -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -pedantic -std=gnu++11 -g -Wall -Wno-reorder -Wno-sign-compare -Wno-address -MD -MP -MF .unit_tests.debug.d -c -o .unit_tests.debug.o unit_tests.cc g++ -Wdate-time -D_FORTIFY_SOURCE=2 -DKAK_DEBUG -I/usr/include/ncursesw -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -pedantic -std=gnu++11 -g -Wall -Wno-reorder -Wno-sign-compare -Wno-address -MD -MP -MF .register_manager.debug.d -c -o .register_manager.debug.o register_manager.cc g++ -Wdate-time -D_FORTIFY_SOURCE=2 -DKAK_DEBUG -I/usr/include/ncursesw -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -pedantic -std=gnu++11 -g -Wall -Wno-reorder -Wno-sign-compare -Wno-address -MD -MP -MF .memory.debug.d -c -o .memory.debug.o memory.cc g++ -Wdate-time -D_FORTIFY_SOURCE=2 -DKAK_DEBUG -I/usr/include/ncursesw -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -pedantic -std=gnu++11 -g -Wall -Wno-reorder -Wno-sign-compare -Wno-address -MD -MP -MF .buffer_utils.debug.d -c -o .buffer_utils.debug.o buffer_utils.cc g++ -Wdate-time -D_FORTIFY_SOURCE=2 -DKAK_DEBUG -I/usr/include/ncursesw -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -pedantic -std=gnu++11 -g -Wall -Wno-reorder -Wno-sign-compare -Wno-address -MD -MP -MF .context.debug.d -c -o .context.debug.o context.cc g++ -Wdate-time -D_FORTIFY_SOURCE=2 -DKAK_DEBUG -I/usr/include/ncursesw -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -pedantic -std=gnu++11 -g -Wall -Wno-reorder -Wno-sign-compare -Wno-address -MD -MP -MF .shared_string.debug.d -c -o .shared_string.debug.o shared_string.cc g++ -Wdate-time -D_FORTIFY_SOURCE=2 -DKAK_DEBUG -I/usr/include/ncursesw -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -pedantic -std=gnu++11 -g -Wall -Wno-reorder -Wno-sign-compare -Wno-address -MD -MP -MF .commands.debug.d -c -o .commands.debug.o commands.cc g++ -Wdate-time -D_FORTIFY_SOURCE=2 -DKAK_DEBUG -I/usr/include/ncursesw -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -pedantic -std=gnu++11 -g -Wall -Wno-reorder -Wno-sign-compare -Wno-address -MD -MP -MF .hash.debug.d -c -o .hash.debug.o hash.cc g++ -Wdate-time -D_FORTIFY_SOURCE=2 -DKAK_DEBUG -I/usr/include/ncursesw -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -pedantic -std=gnu++11 -g -Wall -Wno-reorder -Wno-sign-compare -Wno-address -MD -MP -MF .string.debug.d -c -o .string.debug.o string.cc g++ -Wdate-time -D_FORTIFY_SOURCE=2 -DKAK_DEBUG -I/usr/include/ncursesw -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -pedantic -std=gnu++11 -g -Wall -Wno-reorder -Wno-sign-compare -Wno-address -MD -MP -MF .color.debug.d -c -o .color.debug.o color.cc g++ -Wdate-time -D_FORTIFY_SOURCE=2 -DKAK_DEBUG -I/usr/include/ncursesw -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -pedantic -std=gnu++11 -g -Wall -Wno-reorder -Wno-sign-compare -Wno-address -MD -MP -MF .face_registry.debug.d -c -o .face_registry.debug.o face_registry.cc g++ -Wdate-time -D_FORTIFY_SOURCE=2 -DKAK_DEBUG -I/usr/include/ncursesw -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -pedantic -std=gnu++11 -g -Wall -Wno-reorder -Wno-sign-compare -Wno-address -MD -MP -MF .assert.debug.d -c -o .assert.debug.o assert.cc g++ -Wdate-time -D_FORTIFY_SOURCE=2 -DKAK_DEBUG -I/usr/include/ncursesw -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -pedantic -std=gnu++11 -g -Wall -Wno-reorder -Wno-sign-compare -Wno-address -MD -MP -MF .remote.debug.d -c -o .remote.debug.o remote.cc g++ -Wdate-time -D_FORTIFY_SOURCE=2 -DKAK_DEBUG -I/usr/include/ncursesw -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -pedantic -std=gnu++11 -g -Wall -Wno-reorder -Wno-sign-compare -Wno-address -MD -MP -MF .client_manager.debug.d -c -o .client_manager.debug.o client_manager.cc g++ -Wdate-time -D_FORTIFY_SOURCE=2 -DKAK_DEBUG -I/usr/include/ncursesw -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -pedantic -std=gnu++11 -g -Wall -Wno-reorder -Wno-sign-compare -Wno-address -MD -MP -MF .insert_completer.debug.d -c -o .insert_completer.debug.o insert_completer.cc g++ -Wdate-time -D_FORTIFY_SOURCE=2 -DKAK_DEBUG -I/usr/include/ncursesw -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -pedantic -std=gnu++11 -g -Wall -Wno-reorder -Wno-sign-compare -Wno-address -MD -MP -MF .ncurses_ui.debug.d -c -o .ncurses_ui.debug.o ncurses_ui.cc In file included from ncurses_ui.cc:13: ncurses_ui.cc: In member function ‘void Kakoune::NCursesUI::set_face(Kakoune::NCursesWin*, Kakoune::Face, const Kakoune::Face&)’: /usr/include/ncursesw/ncurses.h:1059:63: warning: overflow in conversion from ‘chtype’ {aka ‘long unsigned int’} to ‘int’ changes value from ‘2147483648’ to ‘-2147483648’ [-Woverflow] #define NCURSES_BITS(mask,shift) (NCURSES_CAST(chtype,(mask)) << ((shift) + NCURSES_ATTR_SHIFT)) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/ncursesw/ncurses.h:1082:18: note: in expansion of macro ‘NCURSES_BITS’ #define A_ITALIC NCURSES_BITS(1UL,23) /* ncurses extension */ ^~~~~~~~~~~~ ncurses_ui.cc:209:27: note: in expansion of macro ‘A_ITALIC’ set_attribute(window, A_ITALIC, face.attributes & Attribute::Italic); ^~~~~~~~ g++ -Wdate-time -D_FORTIFY_SOURCE=2 -DKAK_DEBUG -I/usr/include/ncursesw -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -pedantic -std=gnu++11 -g -Wall -Wno-reorder -Wno-sign-compare -Wno-address -MD -MP -MF .backtrace.debug.d -c -o .backtrace.debug.o backtrace.cc g++ -Wdate-time -D_FORTIFY_SOURCE=2 -DKAK_DEBUG -I/usr/include/ncursesw -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -pedantic -std=gnu++11 -g -Wall -Wno-reorder -Wno-sign-compare -Wno-address -MD -MP -MF .normal.debug.d -c -o .normal.debug.o normal.cc g++ -Wdate-time -D_FORTIFY_SOURCE=2 -DKAK_DEBUG -I/usr/include/ncursesw -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -pedantic -std=gnu++11 -g -Wall -Wno-reorder -Wno-sign-compare -Wno-address -MD -MP -MF .regex.debug.d -c -o .regex.debug.o regex.cc normal.cc: In instantiation of ‘void Kakoune::select_object(Kakoune::Context&, Kakoune::NormalParams) [with Kakoune::ObjectFlags flags = (Kakoune::ObjectFlags)7; Kakoune::SelectMode mode = (Kakoune::SelectMode)0]’: normal.cc:1850:1: required from here normal.cc:965:20: warning: variable ‘whole’ set but not used [-Wunused-but-set-variable] const bool whole = (flags & whole_flags) == whole_flags; ^~~~~ normal.cc: In instantiation of ‘void Kakoune::select_object(Kakoune::Context&, Kakoune::NormalParams) [with Kakoune::ObjectFlags flags = (Kakoune::ObjectFlags)3; Kakoune::SelectMode mode = (Kakoune::SelectMode)0]’: normal.cc:1850:1: required from here normal.cc:965:20: warning: variable ‘whole’ set but not used [-Wunused-but-set-variable] normal.cc: In instantiation of ‘void Kakoune::select_object(Kakoune::Context&, Kakoune::NormalParams) [with Kakoune::ObjectFlags flags = (Kakoune::ObjectFlags)1; Kakoune::SelectMode mode = (Kakoune::SelectMode)0]’: normal.cc:1850:1: required from here normal.cc:965:20: warning: variable ‘whole’ set but not used [-Wunused-but-set-variable] normal.cc: In instantiation of ‘void Kakoune::select_object(Kakoune::Context&, Kakoune::NormalParams) [with Kakoune::ObjectFlags flags = (Kakoune::ObjectFlags)2; Kakoune::SelectMode mode = (Kakoune::SelectMode)0]’: normal.cc:1850:1: required from here normal.cc:965:20: warning: variable ‘whole’ set but not used [-Wunused-but-set-variable] normal.cc: In instantiation of ‘void Kakoune::select_object(Kakoune::Context&, Kakoune::NormalParams) [with Kakoune::ObjectFlags flags = (Kakoune::ObjectFlags)1; Kakoune::SelectMode mode = (Kakoune::SelectMode)1]’: normal.cc:1850:1: required from here normal.cc:965:20: warning: variable ‘whole’ set but not used [-Wunused-but-set-variable] normal.cc: In instantiation of ‘void Kakoune::select_object(Kakoune::Context&, Kakoune::NormalParams) [with Kakoune::ObjectFlags flags = (Kakoune::ObjectFlags)2; Kakoune::SelectMode mode = (Kakoune::SelectMode)1]’: normal.cc:1850:1: required from here normal.cc:965:20: warning: variable ‘whole’ set but not used [-Wunused-but-set-variable] normal.cc: In instantiation of ‘void Kakoune::select_object(Kakoune::Context&, Kakoune::NormalParams) [with Kakoune::ObjectFlags flags = (Kakoune::ObjectFlags)5; Kakoune::SelectMode mode = (Kakoune::SelectMode)0]’: normal.cc:1850:1: required from here normal.cc:965:20: warning: variable ‘whole’ set but not used [-Wunused-but-set-variable] normal.cc: In instantiation of ‘void Kakoune::select_object(Kakoune::Context&, Kakoune::NormalParams) [with Kakoune::ObjectFlags flags = (Kakoune::ObjectFlags)6; Kakoune::SelectMode mode = (Kakoune::SelectMode)0]’: normal.cc:1850:1: required from here normal.cc:965:20: warning: variable ‘whole’ set but not used [-Wunused-but-set-variable] normal.cc: In instantiation of ‘void Kakoune::select_object(Kakoune::Context&, Kakoune::NormalParams) [with Kakoune::ObjectFlags flags = (Kakoune::ObjectFlags)5; Kakoune::SelectMode mode = (Kakoune::SelectMode)1]’: normal.cc:1850:1: required from here normal.cc:965:20: warning: variable ‘whole’ set but not used [-Wunused-but-set-variable] normal.cc: In instantiation of ‘void Kakoune::select_object(Kakoune::Context&, Kakoune::NormalParams) [with Kakoune::ObjectFlags flags = (Kakoune::ObjectFlags)6; Kakoune::SelectMode mode = (Kakoune::SelectMode)1]’: normal.cc:1850:1: required from here normal.cc:965:20: warning: variable ‘whole’ set but not used [-Wunused-but-set-variable] In file included from /usr/include/c++/8/bits/stl_algobase.h:71, from /usr/include/c++/8/vector:60, from array_view.hh:4, from normal.hh:4, from normal.cc:1: /usr/include/c++/8/bits/predefined_ops.h: In instantiation of ‘__gnu_cxx::__ops::_Iter_pred<_Predicate>::_Iter_pred(_Predicate) [with _Predicate = Kakoune::select_object(Kakoune::Context&, Kakoune::NormalParams) [with Kakoune::ObjectFlags flags = (Kakoune::ObjectFlags)7; Kakoune::SelectMode mode = (Kakoune::SelectMode)0]:::: [with Kakoune::ObjectFlags flags = (Kakoune::ObjectFlags)7; Kakoune::SelectMode mode = (Kakoune::SelectMode)0]::SurroundingPair&)>]’: /usr/include/c++/8/bits/predefined_ops.h:278:9: required from ‘__gnu_cxx::__ops::_Iter_pred<_Predicate>::_Iter_pred(_Predicate) [with _Predicate = Kakoune::select_object(Kakoune::Context&, Kakoune::NormalParams) [with Kakoune::ObjectFlags flags = (Kakoune::ObjectFlags)7; Kakoune::SelectMode mode = (Kakoune::SelectMode)0]:::: [with Kakoune::ObjectFlags flags = (Kakoune::ObjectFlags)7; Kakoune::SelectMode mode = (Kakoune::SelectMode)0]::SurroundingPair&)>]’ /usr/include/c++/8/bits/predefined_ops.h:289:14: required from ‘__gnu_cxx::__ops::_Iter_pred<_Predicate> __gnu_cxx::__ops::__pred_iter(_Predicate) [with _Predicate = Kakoune::select_object(Kakoune::Context&, Kakoune::NormalParams) [with Kakoune::ObjectFlags flags = (Kakoune::ObjectFlags)7; Kakoune::SelectMode mode = (Kakoune::SelectMode)0]:::: [with Kakoune::ObjectFlags flags = (Kakoune::ObjectFlags)7; Kakoune::SelectMode mode = (Kakoune::SelectMode)0]::SurroundingPair&)>]’ /usr/include/c++/8/bits/stl_algo.h:3931:37: required from ‘_IIter std::find_if(_IIter, _IIter, _Predicate) [with _IIter = const Kakoune::select_object(Kakoune::Context&, Kakoune::NormalParams):: [with Kakoune::ObjectFlags flags = (Kakoune::ObjectFlags)7; Kakoune::SelectMode mode = (Kakoune::SelectMode)0]::SurroundingPair*; _Predicate = Kakoune::select_object(Kakoune::Context&, Kakoune::NormalParams) [with Kakoune::ObjectFlags flags = (Kakoune::ObjectFlags)7; Kakoune::SelectMode mode = (Kakoune::SelectMode)0]:::: [with Kakoune::ObjectFlags flags = (Kakoune::ObjectFlags)7; Kakoune::SelectMode mode = (Kakoune::SelectMode)0]::SurroundingPair&)>]’ containers.hh:322:24: required from ‘decltype (std::begin(container)) Kakoune::find_if(Container&&, T) [with Container = const Kakoune::select_object(Kakoune::Context&, Kakoune::NormalParams):: [with Kakoune::ObjectFlags flags = (Kakoune::ObjectFlags)7; Kakoune::SelectMode mode = (Kakoune::SelectMode)0]::SurroundingPair (&)[7]; T = Kakoune::select_object(Kakoune::Context&, Kakoune::NormalParams) [with Kakoune::ObjectFlags flags = (Kakoune::ObjectFlags)7; Kakoune::SelectMode mode = (Kakoune::SelectMode)0]:::: [with Kakoune::ObjectFlags flags = (Kakoune::ObjectFlags)7; Kakoune::SelectMode mode = (Kakoune::SelectMode)0]::SurroundingPair&)>; decltype (std::begin(container)) = const Kakoune::select_object(Kakoune::Context&, Kakoune::NormalParams):: [with Kakoune::ObjectFlags flags = (Kakoune::ObjectFlags)7; Kakoune::SelectMode mode = (Kakoune::SelectMode)0]::SurroundingPair*]’ normal.cc:1039:31: required from ‘void Kakoune::select_object(Kakoune::Context&, Kakoune::NormalParams) [with Kakoune::ObjectFlags flags = (Kakoune::ObjectFlags)7; Kakoune::SelectMode mode = (Kakoune::SelectMode)0]’ normal.cc:1850:1: required from here /usr/include/c++/8/bits/predefined_ops.h:276:7: internal compiler error: Segmentation fault _Iter_pred(_Predicate __pred) ^~~~~~~~~~ 0x172e041 crash_signal ../../src/gcc/toplev.c:325 0x11d92be local_class_index ../../src/gcc/cp/mangle.c:1925 0x11dbeeb discriminator_for_local_entity ../../src/gcc/cp/mangle.c:1957 0x11dbeeb write_local_name ../../src/gcc/cp/mangle.c:2058 0x11dbeeb write_name ../../src/gcc/cp/mangle.c:964 0x11de3e9 write_encoding ../../src/gcc/cp/mangle.c:825 0x11dbd4f write_local_name ../../src/gcc/cp/mangle.c:2027 0x11dbd4f write_name ../../src/gcc/cp/mangle.c:964 0x11dc72b write_class_enum_type ../../src/gcc/cp/mangle.c:2809 0x11dc72b write_type ../../src/gcc/cp/mangle.c:2222 0x11dcfc5 write_type ../../src/gcc/cp/mangle.c:2140 0x11dc925 write_type ../../src/gcc/cp/mangle.c:2303 0x11de25d write_method_parms ../../src/gcc/cp/mangle.c:2796 0x11db01d write_closure_type_name ../../src/gcc/cp/mangle.c:1666 0x11db01d write_unqualified_name ../../src/gcc/cp/mangle.c:1410 0x11dbdcf write_name ../../src/gcc/cp/mangle.c:937 0x11dbea3 write_local_name ../../src/gcc/cp/mangle.c:2057 0x11dbea3 write_name ../../src/gcc/cp/mangle.c:964 0x11dc72b write_class_enum_type ../../src/gcc/cp/mangle.c:2809 0x11dc72b write_type ../../src/gcc/cp/mangle.c:2222 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report. See for instructions. g++ -Wdate-time -D_FORTIFY_SOURCE=2 -DKAK_DEBUG -I/usr/include/ncursesw -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -pedantic -std=gnu++11 -g -Wall -Wno-reorder -Wno-sign-compare -Wno-address -MD -MP -MF .event_manager.debug.d -c -o .event_manager.debug.o event_manager.cc g++ -Wdate-time -D_FORTIFY_SOURCE=2 -DKAK_DEBUG -I/usr/include/ncursesw -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -pedantic -std=gnu++11 -g -Wall -Wno-reorder -Wno-sign-compare -Wno-address -MD -MP -MF .buffer_manager.debug.d -c -o .buffer_manager.debug.o buffer_manager.cc g++ -Wdate-time -D_FORTIFY_SOURCE=2 -DKAK_DEBUG -I/usr/include/ncursesw -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -pedantic -std=gnu++11 -g -Wall -Wno-reorder -Wno-sign-compare -Wno-address -MD -MP -MF .exception.debug.d -c -o .exception.debug.o exception.cc g++ -Wdate-time -D_FORTIFY_SOURCE=2 -DKAK_DEBUG -I/usr/include/ncursesw -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -pedantic -std=gnu++11 -g -Wall -Wno-reorder -Wno-sign-compare -Wno-address -MD -MP -MF .input_handler.debug.d -c -o .input_handler.debug.o input_handler.cc g++ -Wdate-time -D_FORTIFY_SOURCE=2 -DKAK_DEBUG -I/usr/include/ncursesw -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -pedantic -std=gnu++11 -g -Wall -Wno-reorder -Wno-sign-compare -Wno-address -MD -MP -MF .file.debug.d -c -o .file.debug.o file.cc g++ -Wdate-time -D_FORTIFY_SOURCE=2 -DKAK_DEBUG -I/usr/include/ncursesw -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -pedantic -std=gnu++11 -g -Wall -Wno-reorder -Wno-sign-compare -Wno-address -MD -MP -MF .main.debug.d -c -o .main.debug.o main.cc g++ -Wdate-time -D_FORTIFY_SOURCE=2 -DKAK_DEBUG -I/usr/include/ncursesw -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -pedantic -std=gnu++11 -g -Wall -Wno-reorder -Wno-sign-compare -Wno-address -MD -MP -MF .command_manager.debug.d -c -o .command_manager.debug.o command_manager.cc g++ -Wdate-time -D_FORTIFY_SOURCE=2 -DKAK_DEBUG -I/usr/include/ncursesw -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -pedantic -std=gnu++11 -g -Wall -Wno-reorder -Wno-sign-compare -Wno-address -MD -MP -MF .shell_manager.debug.d -c -o .shell_manager.debug.o shell_manager.cc Preprocessed source stored into /tmp/ccL6EV5q.out file, please attach this to your bugreport. === BEGIN GCC DUMP === 6242: // Target: s390x-linux-gnu 6242: // Configured with: ../src/configure -v --with-pkgversion='Ubuntu 8-20180110-1ubuntu1' --with-bugurl=file:///usr/share/doc/gcc-8/README.Bugs --enable-languages=c,ada,c++,go,d,fortran,objc,obj-c++ --prefix=/usr --with-gcc-major-version-only --program-suffix=-8 --program-prefix=s390x-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-libsanitizer --disable-libquadmath --enable-plugin --enable-default-pie --with-system-zlib --disable-libphobos --enable-objc-gc=auto --enable-multiarch --disable-werror --with-arch=zEC12 --with-long-double-128 --enable-multilib --enable-checking=release --build=s390x-linux-gnu --host=s390x-linux-gnu --target=s390x-linux-gnu 6242: // Thread model: posix 6242: // gcc version 8.0.0 20180110 (experimental) [trunk revision 256425] (Ubuntu 8-20180110-1ubuntu1) 6242: // 6242: // normal.cc: In instantiation of ‘void Kakoune::select_object(Kakoune::Context&, Kakoune::NormalParams) [with Kakoune::ObjectFlags flags = (Kakoune::ObjectFlags)7; Kakoune::SelectMode mode = (Kakoune::SelectMode)0]’: 6242: // normal.cc:1850:1: required from here 6242: // normal.cc:965:20: warning: variable ‘whole’ set but not used [-Wunused-but-set-variable] 6242: // const bool whole = (flags & whole_flags) == whole_flags; 6242: // ^~~~~ 6242: // normal.cc: In instantiation of ‘void Kakoune::select_object(Kakoune::Context&, Kakoune::NormalParams) [with Kakoune::ObjectFlags flags = (Kakoune::ObjectFlags)3; Kakoune::SelectMode mode = (Kakoune::SelectMode)0]’: 6242: // normal.cc:1850:1: required from here 6242: // normal.cc:965:20: warning: variable ‘whole’ set but not used [-Wunused-but-set-variable] 6242: // normal.cc: In instantiation of ‘void Kakoune::select_object(Kakoune::Context&, Kakoune::NormalParams) [with Kakoune::ObjectFlags flags = (Kakoune::ObjectFlags)1; Kakoune::SelectMode mode = (Kakoune::SelectMode)0]’: 6242: // normal.cc:1850:1: required from here 6242: // normal.cc:965:20: warning: variable ‘whole’ set but not used [-Wunused-but-set-variable] 6242: // normal.cc: In instantiation of ‘void Kakoune::select_object(Kakoune::Context&, Kakoune::NormalParams) [with Kakoune::ObjectFlags flags = (Kakoune::ObjectFlags)2; Kakoune::SelectMode mode = (Kakoune::SelectMode)0]’: 6242: // normal.cc:1850:1: required from here 6242: // normal.cc:965:20: warning: variable ‘whole’ set but not used [-Wunused-but-set-variable] 6242: // normal.cc: In instantiation of ‘void Kakoune::select_object(Kakoune::Context&, Kakoune::NormalParams) [with Kakoune::ObjectFlags flags = (Kakoune::ObjectFlags)1; Kakoune::SelectMode mode = (Kakoune::SelectMode)1]’: 6242: // normal.cc:1850:1: required from here 6242: // normal.cc:965:20: warning: variable ‘whole’ set but not used [-Wunused-but-set-variable] 6242: // normal.cc: In instantiation of ‘void Kakoune::select_object(Kakoune::Context&, Kakoune::NormalParams) [with Kakoune::ObjectFlags flags = (Kakoune::ObjectFlags)2; Kakoune::SelectMode mode = (Kakoune::SelectMode)1]’: 6242: // normal.cc:1850:1: required from here 6242: // normal.cc:965:20: warning: variable ‘whole’ set but not used [-Wunused-but-set-variable] 6242: // normal.cc: In instantiation of ‘void Kakoune::select_object(Kakoune::Context&, Kakoune::NormalParams) [with Kakoune::ObjectFlags flags = (Kakoune::ObjectFlags)5; Kakoune::SelectMode mode = (Kakoune::SelectMode)0]’: 6242: // normal.cc:1850:1: required from here 6242: // normal.cc:965:20: warning: variable ‘whole’ set but not used [-Wunused-but-set-variable] 6242: // normal.cc: In instantiation of ‘void Kakoune::select_object(Kakoune::Context&, Kakoune::NormalParams) [with Kakoune::ObjectFlags flags = (Kakoune::ObjectFlags)6; Kakoune::SelectMode mode = (Kakoune::SelectMode)0]’: 6242: // normal.cc:1850:1: required from here 6242: // normal.cc:965:20: warning: variable ‘whole’ set but not used [-Wunused-but-set-variable] 6242: // normal.cc: In instantiation of ‘void Kakoune::select_object(Kakoune::Context&, Kakoune::NormalParams) [with Kakoune::ObjectFlags flags = (Kakoune::ObjectFlags)5; Kakoune::SelectMode mode = (Kakoune::SelectMode)1]’: 6242: // normal.cc:1850:1: required from here 6242: // normal.cc:965:20: warning: variable ‘whole’ set but not used [-Wunused-but-set-variable] 6242: // normal.cc: In instantiation of ‘void Kakoune::select_object(Kakoune::Context&, Kakoune::NormalParams) [with Kakoune::ObjectFlags flags = (Kakoune::ObjectFlags)6; Kakoune::SelectMode mode = (Kakoune::SelectMode)1]’: 6242: // normal.cc:1850:1: required from here 6242: // normal.cc:965:20: warning: variable ‘whole’ set but not used [-Wunused-but-set-variable] 6242: // In file included from /usr/include/c++/8/bits/stl_algobase.h:71, 6242: // from /usr/include/c++/8/vector:60, 6242: // from array_view.hh:4, 6242: // from normal.hh:4, 6242: // from normal.cc:1: 6242: // /usr/include/c++/8/bits/predefined_ops.h: In instantiation of ‘__gnu_cxx::__ops::_Iter_pred<_Predicate>::_Iter_pred(_Predicate) [with _Predicate = Kakoune::select_object(Kakoune::Context&, Kakoune::NormalParams) [with Kakoune::ObjectFlags flags = (Kakoune::ObjectFlags)7; Kakoune::SelectMode mode = (Kakoune::SelectMode)0]:::: [with Kakoune::ObjectFlags flags = (Kakoune::ObjectFlags)7; Kakoune::SelectMode mode = (Kakoune::SelectMode)0]::SurroundingPair&)>]’: 6242: // /usr/include/c++/8/bits/predefined_ops.h:278:9: required from ‘__gnu_cxx::__ops::_Iter_pred<_Predicate>::_Iter_pred(_Predicate) [with _Predicate = Kakoune::select_object(Kakoune::Context&, Kakoune::NormalParams) [with Kakoune::ObjectFlags flags = (Kakoune::ObjectFlags)7; Kakoune::SelectMode mode = (Kakoune::SelectMode)0]:::: [with Kakoune::ObjectFlags flags = (Kakoune::ObjectFlags)7; Kakoune::SelectMode mode = (Kakoune::SelectMode)0]::SurroundingPair&)>]’ 6242: // /usr/include/c++/8/bits/predefined_ops.h:289:14: required from ‘__gnu_cxx::__ops::_Iter_pred<_Predicate> __gnu_cxx::__ops::__pred_iter(_Predicate) [with _Predicate = Kakoune::select_object(Kakoune::Context&, Kakoune::NormalParams) [with Kakoune::ObjectFlags flags = (Kakoune::ObjectFlags)7; Kakoune::SelectMode mode = (Kakoune::SelectMode)0]:::: [with Kakoune::ObjectFlags flags = (Kakoune::ObjectFlags)7; Kakoune::SelectMode mode = (Kakoune::SelectMode)0]::SurroundingPair&)>]’ 6242: // /usr/include/c++/8/bits/stl_algo.h:3931:37: required from ‘_IIter std::find_if(_IIter, _IIter, _Predicate) [with _IIter = const Kakoune::select_object(Kakoune::Context&, Kakoune::NormalParams):: [with Kakoune::ObjectFlags flags = (Kakoune::ObjectFlags)7; Kakoune::SelectMode mode = (Kakoune::SelectMode)0]::SurroundingPair*; _Predicate = Kakoune::select_object(Kakoune::Context&, Kakoune::NormalParams) [with Kakoune::ObjectFlags flags = (Kakoune::ObjectFlags)7; Kakoune::SelectMode mode = (Kakoune::SelectMode)0]:::: [with Kakoune::ObjectFlags flags = (Kakoune::ObjectFlags)7; Kakoune::SelectMode mode = (Kakoune::SelectMode)0]::SurroundingPair&)>]’ 6242: // containers.hh:322:24: required from ‘decltype (std::begin(container)) Kakoune::find_if(Container&&, T) [with Container = const Kakoune::select_object(Kakoune::Context&, Kakoune::NormalParams):: [with Kakoune::ObjectFlags flags = (Kakoune::ObjectFlags)7; Kakoune::SelectMode mode = (Kakoune::SelectMode)0]::SurroundingPair (&)[7]; T = Kakoune::select_object(Kakoune::Context&, Kakoune::NormalParams) [with Kakoune::ObjectFlags flags = (Kakoune::ObjectFlags)7; Kakoune::SelectMode mode = (Kakoune::SelectMode)0]:::: [with Kakoune::ObjectFlags flags = (Kakoune::ObjectFlags)7; Kakoune::SelectMode mode = (Kakoune::SelectMode)0]::SurroundingPair&)>; decltype (std::begin(container)) = const Kakoune::select_object(Kakoune::Context&, Kakoune::NormalParams):: [with Kakoune::ObjectFlags flags = (Kakoune::ObjectFlags)7; Kakoune::SelectMode mode = (Kakoune::SelectMode)0]::SurroundingPair*]’ 6242: // normal.cc:1039:31: required from ‘void Kakoune::select_object(Kakoune::Context&, Kakoune::NormalParams) [with Kakoune::ObjectFlags flags = (Kakoune::ObjectFlags)7; Kakoune::SelectMode mode = (Kakoune::SelectMode)0]’ 6242: // normal.cc:1850:1: required from here 6242: // /usr/include/c++/8/bits/predefined_ops.h:276:7: internal compiler error: Segmentation fault 6242: // _Iter_pred(_Predicate __pred) 6242: // ^~~~~~~~~~ 6242: // 0x172e041 crash_signal 6242: // ../../src/gcc/toplev.c:325 6242: // 0x11d92be local_class_index 6242: // ../../src/gcc/cp/mangle.c:1925 6242: // 0x11dbeeb discriminator_for_local_entity 6242: // ../../src/gcc/cp/mangle.c:1957 6242: // 0x11dbeeb write_local_name 6242: // ../../src/gcc/cp/mangle.c:2058 6242: // 0x11dbeeb write_name 6242: // ../../src/gcc/cp/mangle.c:964 6242: // 0x11de3e9 write_encoding 6242: // ../../src/gcc/cp/mangle.c:825 6242: // 0x11dbd4f write_local_name 6242: // ../../src/gcc/cp/mangle.c:2027 6242: // 0x11dbd4f write_name 6242: // ../../src/gcc/cp/mangle.c:964 6242: // 0x11dc72b write_class_enum_type 6242: // ../../src/gcc/cp/mangle.c:2809 6242: // 0x11dc72b write_type 6242: // ../../src/gcc/cp/mangle.c:2222 6242: // 0x11dcfc5 write_type 6242: // ../../src/gcc/cp/mangle.c:2140 6242: // 0x11dc925 write_type 6242: // ../../src/gcc/cp/mangle.c:2303 6242: // 0x11de25d write_method_parms 6242: // ../../src/gcc/cp/mangle.c:2796 6242: // 0x11db01d write_closure_type_name 6242: // ../../src/gcc/cp/mangle.c:1666 6242: // 0x11db01d write_unqualified_name 6242: // ../../src/gcc/cp/mangle.c:1410 6242: // 0x11dbdcf write_name 6242: // ../../src/gcc/cp/mangle.c:937 6242: // 0x11dbea3 write_local_name 6242: // ../../src/gcc/cp/mangle.c:2057 6242: // 0x11dbea3 write_name 6242: // ../../src/gcc/cp/mangle.c:964 6242: // 0x11dc72b write_class_enum_type 6242: // ../../src/gcc/cp/mangle.c:2809 6242: // 0x11dc72b write_type 6242: // ../../src/gcc/cp/mangle.c:2222 6242: // Please submit a full bug report, 6242: // with preprocessed source if appropriate. 6242: // Please include the complete backtrace with any bug report. 6242: // See for instructions. 6242: 6242: // /usr/lib/gcc/s390x-linux-gnu/8/cc1plus -quiet -I /usr/include/ncursesw -imultiarch s390x-linux-gnu -MD .normal.debug.d -MF .normal.debug.d -MP -MQ .normal.debug.o -D_GNU_SOURCE -D _FORTIFY_SOURCE=2 -D KAK_DEBUG normal.cc -quiet -dumpbase normal.cc -march=zEC12 -m64 -mzarch -auxbase-strip .normal.debug.o -g -g -O2 -Wdate-time -Wformat=1 -Werror=format-security -Wpedantic -Wall -Wno-reorder -Wno-sign-compare -Wno-address -std=gnu++11 -fdebug-prefix-map=/<>=. -fstack-protector-strong -fstack-protector-strong -Wformat-security -o - -frandom-seed=0 -fdump-noaddr 6242: 6242: # 1 "normal.cc" 6242: # 1 "/<>/src//" 6242: # 1 "" 6242: # 1 "" 6242: # 1 "/usr/include/stdc-predef.h" 1 3 4 6242: # 1 "" 2 6242: # 1 "normal.cc" 6242: # 1 "normal.hh" 1 6242: 6242: 6242: 6242: # 1 "array_view.hh" 1 6242: 6242: 6242: 6242: # 1 "/usr/include/c++/8/vector" 1 3 6242: # 58 "/usr/include/c++/8/vector" 3 6242: 6242: # 59 "/usr/include/c++/8/vector" 3 6242: 6242: # 1 "/usr/include/c++/8/bits/stl_algobase.h" 1 3 6242: # 59 "/usr/include/c++/8/bits/stl_algobase.h" 3 6242: # 1 "/usr/include/s390x-linux-gnu/c++/8/bits/c++config.h" 1 3 6242: # 236 "/usr/include/s390x-linux-gnu/c++/8/bits/c++config.h" 3 6242: 6242: # 236 "/usr/include/s390x-linux-gnu/c++/8/bits/c++config.h" 3 6242: namespace std 6242: { 6242: typedef long unsigned int size_t; 6242: typedef long int ptrdiff_t; 6242: 6242: 6242: typedef decltype(nullptr) nullptr_t; 6242: 6242: } 6242: # 258 "/usr/include/s390x-linux-gnu/c++/8/bits/c++config.h" 3 6242: namespace std 6242: { 6242: inline namespace __cxx11 __attribute__((__abi_tag__ ("cxx11"))) { } 6242: } 6242: namespace __gnu_cxx 6242: { 6242: inline namespace __cxx11 __attribute__((__abi_tag__ ("cxx11"))) { } 6242: } 6242: # 401 "/usr/include/s390x-linux-gnu/c++/8/bits/c++config.h" 3 6242: namespace std 6242: { 6242: inline namespace __gnu_cxx_ldbl128 { } 6242: } 6242: # 508 "/usr/include/s390x-linux-gnu/c++/8/bits/c++config.h" 3 6242: # 1 "/usr/include/s390x-linux-gnu/c++/8/bits/os_defines.h" 1 3 6242: # 39 "/usr/include/s390x-linux-gnu/c++/8/bits/os_defines.h" 3 6242: # 1 "/usr/include/features.h" 1 3 4 6242: # 419 "/usr/include/features.h" 3 4 6242: # 1 "/usr/include/s390x-linux-gnu/sys/cdefs.h" 1 3 4 6242: # 419 "/usr/include/s390x-linux-gnu/sys/cdefs.h" 3 4 6242: # 1 "/usr/include/s390x-linux-gnu/bits/wordsize.h" 1 3 4 6242: # 420 "/usr/include/s390x-linux-gnu/sys/cdefs.h" 2 3 4 6242: # 1 "/usr/include/s390x-linux-gnu/bits/long-double.h" 1 3 4 6242: # 421 "/usr/include/s390x-linux-gnu/sys/cdefs.h" 2 3 4 6242: # 420 "/usr/include/features.h" 2 3 4 6242: # 443 "/usr/include/features.h" 3 4 6242: # 1 "/usr/include/s390x-linux-gnu/gnu/stubs.h" 1 3 4 6242: 6242: 6242: 6242: 6242: # 1 "/usr/include/s390x-linux-gnu/bits/wordsize.h" 1 3 4 6242: # 6 "/usr/include/s390x-linux-gnu/gnu/stubs.h" 2 3 4 6242: 6242: 6242: 6242: 6242: 6242: # 1 "/usr/include/s390x-linux-gnu/gnu/stubs-64.h" 1 3 4 6242: # 12 "/usr/include/s390x-linux-gnu/gnu/stubs.h" 2 3 4 6242: # 444 "/usr/include/features.h" 2 3 4 6242: # 40 "/usr/include/s390x-linux-gnu/c++/8/bits/os_defines.h" 2 3 6242: # 509 "/usr/include/s390x-linux-gnu/c++/8/bits/c++config.h" 2 3 6242: 6242: 6242: # 1 "/usr/include/s390x-linux-gnu/c++/8/bits/cpu_defines.h" 1 3 6242: # 512 "/usr/include/s390x-linux-gnu/c++/8/bits/c++config.h" 2 3 6242: # 60 "/usr/include/c++/8/bits/stl_algobase.h" 2 3 6242: # 1 "/usr/include/c++/8/bits/functexcept.h" 1 3 6242: # 40 "/usr/include/c++/8/bits/functexcept.h" 3 6242: # 1 "/usr/include/c++/8/bits/exception_defines.h" 1 3 6242: # 41 "/usr/include/c++/8/bits/functexcept.h" 2 3 6242: 6242: namespace std __attribute__ ((__visibility__ ("default"))) 6242: { 6242: 6242: 6242: 6242: void 6242: __throw_bad_exception(void) __attribute__((__noreturn__)); 6242: 6242: 6242: void 6242: __throw_bad_alloc(void) __attribute__((__noreturn__)); 6242: 6242: 6242: void 6242: __throw_bad_cast(void) __attribute__((__noreturn__)); 6242: 6242: void 6242: __throw_bad_typeid(void) __attribute__((__noreturn__)); 6242: 6242: 6242: void 6242: __throw_logic_error(const char*) __attribute__((__noreturn__)); 6242: 6242: void 6242: __throw_domain_error(const char*) __attribute__((__noreturn__)); 6242: 6242: void 6242: __throw_invalid_argument(const char*) __attribute__((__noreturn__)); 6242: 6242: void 6242: __throw_length_error(const char*) __attribute__((__noreturn__)); 6242: 6242: void 6242: __throw_out_of_range(const char*) __attribute__((__noreturn__)); 6242: 6242: void 6242: __throw_out_of_range_fmt(const char*, ...) __attribute__((__noreturn__)) 6242: __attribute__((__format__(__gnu_printf__, 1, 2))); 6242: 6242: void 6242: __throw_runtime_error(const char*) __attribute__((__noreturn__)); 6242: 6242: void 6242: __throw_range_error(const char*) __attribute__((__noreturn__)); 6242: 6242: void 6242: __throw_overflow_error(const char*) __attribute__((__noreturn__)); 6242: 6242: void 6242: __throw_underflow_error(const char*) __attribute__((__noreturn__)); 6242: 6242: 6242: void 6242: __throw_ios_failure(const char*) __attribute__((__noreturn__)); 6242: 6242: void 6242: __throw_system_error(int) __attribute__((__noreturn__)); 6242: 6242: void 6242: __throw_future_error(int) __attribute__((__noreturn__)); 6242: 6242: 6242: void 6242: __throw_bad_function_call() __attribute__((__noreturn__)); 6242: 6242: 6242: } 6242: # 61 "/usr/include/c++/8/bits/stl_algobase.h" 2 3 6242: # 1 "/usr/include/c++/8/bits/cpp_type_traits.h" 1 3 6242: # 35 "/usr/include/c++/8/bits/cpp_type_traits.h" 3 6242: 6242: # 36 "/usr/include/c++/8/bits/cpp_type_traits.h" 3 6242: # 67 "/usr/include/c++/8/bits/cpp_type_traits.h" 3 6242: extern "C++" { 6242: 6242: namespace std __attribute__ ((__visibility__ ("default"))) 6242: { 6242: 6242: 6242: struct __true_type { }; 6242: struct __false_type { }; 6242: 6242: template 6242: struct __truth_type 6242: { typedef __false_type __type; }; 6242: 6242: template<> 6242: struct __truth_type 6242: { typedef __true_type __type; }; 6242: 6242: 6242: 6242: template 6242: struct __traitor 6242: { 6242: enum { __value = bool(_Sp::__value) || bool(_Tp::__value) }; 6242: typedef typename __truth_type<__value>::__type __type; 6242: }; 6242: 6242: 6242: template 6242: struct __are_same 6242: { 6242: enum { __value = 0 }; 6242: typedef __false_type __type; 6242: }; 6242: 6242: template 6242: struct __are_same<_Tp, _Tp> 6242: { 6242: enum { __value = 1 }; 6242: typedef __true_type __type; 6242: }; 6242: 6242: 6242: template 6242: struct __is_void 6242: { 6242: enum { __value = 0 }; 6242: typedef __false_type __type; 6242: }; 6242: 6242: template<> 6242: struct __is_void 6242: { 6242: enum { __value = 1 }; 6242: typedef __true_type __type; 6242: }; 6242: 6242: 6242: 6242: 6242: template 6242: struct __is_integer 6242: { 6242: enum { __value = 0 }; 6242: typedef __false_type __type; 6242: }; 6242: 6242: 6242: 6242: 6242: 6242: template<> 6242: struct __is_integer 6242: { 6242: enum { __value = 1 }; 6242: typedef __true_type __type; 6242: }; 6242: 6242: template<> 6242: struct __is_integer 6242: { 6242: enum { __value = 1 }; 6242: typedef __true_type __type; 6242: }; 6242: 6242: template<> 6242: struct __is_integer 6242: { 6242: enum { __value = 1 }; 6242: typedef __true_type __type; 6242: }; 6242: 6242: template<> 6242: struct __is_integer 6242: { 6242: enum { __value = 1 }; 6242: typedef __true_type __type; 6242: }; 6242: 6242: 6242: template<> 6242: struct __is_integer 6242: { 6242: enum { __value = 1 }; 6242: typedef __true_type __type; 6242: }; 6242: 6242: 6242: 6242: template<> 6242: struct __is_integer 6242: { 6242: enum { __value = 1 }; 6242: typedef __true_type __type; 6242: }; 6242: 6242: template<> 6242: struct __is_integer 6242: { 6242: enum { __value = 1 }; 6242: typedef __true_type __type; 6242: }; 6242: 6242: 6242: template<> 6242: struct __is_integer 6242: { 6242: enum { __value = 1 }; 6242: typedef __true_type __type; 6242: }; 6242: 6242: template<> 6242: struct __is_integer 6242: { 6242: enum { __value = 1 }; 6242: typedef __true_type __type; 6242: }; 6242: 6242: template<> 6242: struct __is_integer 6242: { 6242: enum { __value = 1 }; 6242: typedef __true_type __type; 6242: }; 6242: 6242: template<> 6242: struct __is_integer 6242: { 6242: enum { __value = 1 }; 6242: typedef __true_type __type; 6242: }; 6242: 6242: template<> 6242: struct __is_integer 6242: { 6242: enum { __value = 1 }; 6242: typedef __true_type __type; 6242: }; 6242: 6242: template<> 6242: struct __is_integer 6242: { 6242: enum { __value = 1 }; 6242: typedef __true_type __type; 6242: }; 6242: 6242: template<> 6242: struct __is_integer 6242: { 6242: enum { __value = 1 }; 6242: typedef __true_type __type; 6242: }; 6242: 6242: template<> 6242: struct __is_integer 6242: { 6242: enum { __value = 1 }; 6242: typedef __true_type __type; 6242: }; 6242: # 261 "/usr/include/c++/8/bits/cpp_type_traits.h" 3 6242: template<> struct __is_integer<__int128> { enum { __value = 1 }; typedef __true_type __type; }; template<> struct __is_integer { enum { __value = 1 }; typedef __true_type __type; }; 6242: # 278 "/usr/include/c++/8/bits/cpp_type_traits.h" 3 6242: template 6242: struct __is_floating 6242: { 6242: enum { __value = 0 }; 6242: typedef __false_type __type; 6242: }; 6242: 6242: 6242: template<> 6242: struct __is_floating 6242: { 6242: enum { __value = 1 }; 6242: typedef __true_type __type; 6242: }; 6242: 6242: template<> 6242: struct __is_floating 6242: { 6242: enum { __value = 1 }; 6242: typedef __true_type __type; 6242: }; 6242: 6242: template<> 6242: struct __is_floating 6242: { 6242: enum { __value = 1 }; 6242: typedef __true_type __type; 6242: }; 6242: 6242: 6242: 6242: 6242: template 6242: struct __is_pointer 6242: { 6242: enum { __value = 0 }; 6242: typedef __false_type __type; 6242: }; 6242: 6242: template 6242: struct __is_pointer<_Tp*> 6242: { 6242: enum { __value = 1 }; 6242: typedef __true_type __type; 6242: }; 6242: 6242: 6242: 6242: 6242: template 6242: struct __is_arithmetic 6242: : public __traitor<__is_integer<_Tp>, __is_floating<_Tp> > 6242: { }; 6242: 6242: 6242: 6242: 6242: template 6242: struct __is_scalar 6242: : public __traitor<__is_arithmetic<_Tp>, __is_pointer<_Tp> > 6242: { }; 6242: 6242: 6242: 6242: 6242: template 6242: struct __is_char 6242: { 6242: enum { __value = 0 }; 6242: typedef __false_type __type; 6242: }; 6242: 6242: template<> 6242: struct __is_char 6242: { 6242: enum { __value = 1 }; 6242: typedef __true_type __type; 6242: }; 6242: 6242: 6242: template<> 6242: struct __is_char 6242: { 6242: enum { __value = 1 }; 6242: typedef __true_type __type; 6242: }; 6242: 6242: 6242: template 6242: struct __is_byte 6242: { 6242: enum { __value = 0 }; 6242: typedef __false_type __type; 6242: }; 6242: 6242: template<> 6242: struct __is_byte 6242: { 6242: enum { __value = 1 }; 6242: typedef __true_type __type; 6242: }; 6242: 6242: template<> 6242: struct __is_byte 6242: { 6242: enum { __value = 1 }; 6242: typedef __true_type __type; 6242: }; 6242: 6242: template<> 6242: struct __is_byte 6242: { 6242: enum { __value = 1 }; 6242: typedef __true_type __type; 6242: }; 6242: 6242: 6242: 6242: 6242: template 6242: struct __is_move_iterator 6242: { 6242: enum { __value = 0 }; 6242: typedef __false_type __type; 6242: }; 6242: 6242: 6242: 6242: template 6242: inline _Iterator 6242: __miter_base(_Iterator __it) 6242: { return __it; } 6242: 6242: 6242: } 6242: } 6242: # 62 "/usr/include/c++/8/bits/stl_algobase.h" 2 3 6242: # 1 "/usr/include/c++/8/ext/type_traits.h" 1 3 6242: # 32 "/usr/include/c++/8/ext/type_traits.h" 3 6242: 6242: # 33 "/usr/include/c++/8/ext/type_traits.h" 3 6242: 6242: 6242: 6242: 6242: extern "C++" { 6242: 6242: namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) 6242: { 6242: 6242: 6242: 6242: template 6242: struct __enable_if 6242: { }; 6242: 6242: template 6242: struct __enable_if 6242: { typedef _Tp __type; }; 6242: 6242: 6242: 6242: template 6242: struct __conditional_type 6242: { typedef _Iftrue __type; }; 6242: 6242: template 6242: struct __conditional_type 6242: { typedef _Iffalse __type; }; 6242: 6242: 6242: 6242: template 6242: struct __add_unsigned 6242: { 6242: private: 6242: typedef __enable_if::__value, _Tp> __if_type; 6242: 6242: public: 6242: typedef typename __if_type::__type __type; 6242: }; 6242: 6242: template<> 6242: struct __add_unsigned 6242: { typedef unsigned char __type; }; 6242: 6242: template<> 6242: struct __add_unsigned 6242: { typedef unsigned char __type; }; 6242: 6242: template<> 6242: struct __add_unsigned 6242: { typedef unsigned short __type; }; 6242: 6242: template<> 6242: struct __add_unsigned 6242: { typedef unsigned int __type; }; 6242: 6242: template<> 6242: struct __add_unsigned 6242: { typedef unsigned long __type; }; 6242: 6242: template<> 6242: struct __add_unsigned 6242: { typedef unsigned long long __type; }; 6242: 6242: 6242: template<> 6242: struct __add_unsigned; 6242: 6242: template<> 6242: struct __add_unsigned; 6242: 6242: 6242: 6242: template 6242: struct __remove_unsigned 6242: { 6242: private: 6242: typedef __enable_if::__value, _Tp> __if_type; 6242: 6242: public: 6242: typedef typename __if_type::__type __type; 6242: }; 6242: 6242: template<> 6242: struct __remove_unsigned 6242: { typedef signed char __type; }; 6242: 6242: template<> 6242: struct __remove_unsigned 6242: { typedef signed char __type; }; 6242: 6242: template<> 6242: struct __remove_unsigned 6242: { typedef short __type; }; 6242: 6242: template<> 6242: struct __remove_unsigned 6242: { typedef int __type; }; 6242: 6242: template<> 6242: struct __remove_unsigned 6242: { typedef long __type; }; 6242: 6242: template<> 6242: struct __remove_unsigned 6242: { typedef long long __type; }; 6242: 6242: 6242: template<> 6242: struct __remove_unsigned; 6242: 6242: template<> 6242: struct __remove_unsigned; 6242: 6242: 6242: 6242: template 6242: inline bool 6242: __is_null_pointer(_Type* __ptr) 6242: { return __ptr == 0; } 6242: 6242: template 6242: inline bool 6242: __is_null_pointer(_Type) 6242: { return false; } 6242: 6242: 6242: inline bool 6242: __is_null_pointer(std::nullptr_t) 6242: { return true; } 6242: 6242: 6242: 6242: template::__value> 6242: struct __promote 6242: { typedef double __type; }; 6242: 6242: 6242: 6242: 6242: template 6242: struct __promote<_Tp, false> 6242: { }; 6242: 6242: template<> 6242: struct __promote 6242: { typedef long double __type; }; 6242: 6242: template<> 6242: struct __promote 6242: { typedef double __type; }; 6242: 6242: template<> 6242: struct __promote 6242: { typedef float __type; }; 6242: 6242: template::__type, 6242: typename _Up2 = typename __promote<_Up>::__type> 6242: struct __promote_2 6242: { 6242: typedef __typeof__(_Tp2() + _Up2()) __type; 6242: }; 6242: 6242: template::__type, 6242: typename _Up2 = typename __promote<_Up>::__type, 6242: typename _Vp2 = typename __promote<_Vp>::__type> 6242: struct __promote_3 6242: { 6242: typedef __typeof__(_Tp2() + _Up2() + _Vp2()) __type; 6242: }; 6242: 6242: template::__type, 6242: typename _Up2 = typename __promote<_Up>::__type, 6242: typename _Vp2 = typename __promote<_Vp>::__type, 6242: typename _Wp2 = typename __promote<_Wp>::__type> 6242: struct __promote_4 6242: { 6242: typedef __typeof__(_Tp2() + _Up2() + _Vp2() + _Wp2()) __type; 6242: }; 6242: 6242: 6242: } 6242: } 6242: # 63 "/usr/include/c++/8/bits/stl_algobase.h" 2 3 6242: # 1 "/usr/include/c++/8/ext/numeric_traits.h" 1 3 6242: # 32 "/usr/include/c++/8/ext/numeric_traits.h" 3 6242: 6242: # 33 "/usr/include/c++/8/ext/numeric_traits.h" 3 6242: 6242: 6242: 6242: 6242: namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) 6242: { 6242: 6242: # 54 "/usr/include/c++/8/ext/numeric_traits.h" 3 6242: template 6242: struct __numeric_traits_integer 6242: { 6242: 6242: static const _Value __min = (((_Value)(-1) < 0) ? (_Value)1 << (sizeof(_Value) * 8 - ((_Value)(-1) < 0)) : (_Value)0); 6242: static const _Value __max = (((_Value)(-1) < 0) ? (((((_Value)1 << ((sizeof(_Value) * 8 - ((_Value)(-1) < 0)) - 1)) - 1) << 1) + 1) : ~(_Value)0); 6242: 6242: 6242: 6242: static const bool __is_signed = ((_Value)(-1) < 0); 6242: static const int __digits = (sizeof(_Value) * 8 - ((_Value)(-1) < 0)); 6242: }; 6242: 6242: template 6242: const _Value __numeric_traits_integer<_Value>::__min; 6242: 6242: template 6242: const _Value __numeric_traits_integer<_Value>::__max; 6242: 6242: template 6242: const bool __numeric_traits_integer<_Value>::__is_signed; 6242: 6242: template 6242: const int __numeric_traits_integer<_Value>::__digits; 6242: # 99 "/usr/include/c++/8/ext/numeric_traits.h" 3 6242: template 6242: struct __numeric_traits_floating 6242: { 6242: 6242: static const int __max_digits10 = (2 + (std::__are_same<_Value, float>::__value ? 24 : std::__are_same<_Value, double>::__value ? 53 : 113) * 643L / 2136); 6242: 6242: 6242: static const bool __is_signed = true; 6242: static const int __digits10 = (std::__are_same<_Value, float>::__value ? 6 : std::__are_same<_Value, double>::__value ? 15 : 33); 6242: static const int __max_exponent10 = (std::__are_same<_Value, float>::__value ? 38 : std::__are_same<_Value, double>::__value ? 308 : 4932); 6242: }; 6242: 6242: template 6242: const int __numeric_traits_floating<_Value>::__max_digits10; 6242: 6242: template 6242: const bool __numeric_traits_floating<_Value>::__is_signed; 6242: 6242: template 6242: const int __numeric_traits_floating<_Value>::__digits10; 6242: 6242: template 6242: const int __numeric_traits_floating<_Value>::__max_exponent10; 6242: 6242: template 6242: struct __numeric_traits 6242: : public __conditional_type::__value, 6242: __numeric_traits_integer<_Value>, 6242: __numeric_traits_floating<_Value> >::__type 6242: { }; 6242: 6242: 6242: } 6242: # 64 "/usr/include/c++/8/bits/stl_algobase.h" 2 3 6242: # 1 "/usr/include/c++/8/bits/stl_pair.h" 1 3 6242: # 59 "/usr/include/c++/8/bits/stl_pair.h" 3 6242: # 1 "/usr/include/c++/8/bits/move.h" 1 3 6242: # 34 "/usr/include/c++/8/bits/move.h" 3 6242: # 1 "/usr/include/c++/8/bits/concept_check.h" 1 3 6242: # 33 "/usr/include/c++/8/bits/concept_check.h" 3 6242: 6242: # 34 "/usr/include/c++/8/bits/concept_check.h" 3 6242: # 35 "/usr/include/c++/8/bits/move.h" 2 3 6242: 6242: namespace std __attribute__ ((__visibility__ ("default"))) 6242: { 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: template 6242: inline constexpr _Tp* 6242: __addressof(_Tp& __r) noexcept 6242: { return __builtin_addressof(__r); } 6242: 6242: 6242: 6242: 6242: } 6242: 6242: # 1 "/usr/include/c++/8/type_traits" 1 3 6242: # 32 "/usr/include/c++/8/type_traits" 3 6242: 6242: # 33 "/usr/include/c++/8/type_traits" 3 6242: # 42 "/usr/include/c++/8/type_traits" 3 6242: namespace std 6242: { 6242: typedef short unsigned int uint_least16_t; 6242: typedef unsigned int uint_least32_t; 6242: } 6242: 6242: 6242: 6242: 6242: 6242: namespace std __attribute__ ((__visibility__ ("default"))) 6242: { 6242: 6242: # 68 "/usr/include/c++/8/type_traits" 3 6242: template 6242: struct integral_constant 6242: { 6242: static constexpr _Tp value = __v; 6242: typedef _Tp value_type; 6242: typedef integral_constant<_Tp, __v> type; 6242: constexpr operator value_type() const noexcept { return value; } 6242: 6242: 6242: 6242: 6242: 6242: 6242: }; 6242: 6242: template 6242: constexpr _Tp integral_constant<_Tp, __v>::value; 6242: 6242: 6242: typedef integral_constant true_type; 6242: 6242: 6242: typedef integral_constant false_type; 6242: 6242: template 6242: using __bool_constant = integral_constant; 6242: # 103 "/usr/include/c++/8/type_traits" 3 6242: template 6242: struct conditional; 6242: 6242: template 6242: struct __or_; 6242: 6242: template<> 6242: struct __or_<> 6242: : public false_type 6242: { }; 6242: 6242: template 6242: struct __or_<_B1> 6242: : public _B1 6242: { }; 6242: 6242: template 6242: struct __or_<_B1, _B2> 6242: : public conditional<_B1::value, _B1, _B2>::type 6242: { }; 6242: 6242: template 6242: struct __or_<_B1, _B2, _B3, _Bn...> 6242: : public conditional<_B1::value, _B1, __or_<_B2, _B3, _Bn...>>::type 6242: { }; 6242: 6242: template 6242: struct __and_; 6242: 6242: template<> 6242: struct __and_<> 6242: : public true_type 6242: { }; 6242: 6242: template 6242: struct __and_<_B1> 6242: : public _B1 6242: { }; 6242: 6242: template 6242: struct __and_<_B1, _B2> 6242: : public conditional<_B1::value, _B2, _B1>::type 6242: { }; 6242: 6242: template 6242: struct __and_<_B1, _B2, _B3, _Bn...> 6242: : public conditional<_B1::value, __and_<_B2, _B3, _Bn...>, _B1>::type 6242: { }; 6242: 6242: template 6242: struct __not_ 6242: : public __bool_constant 6242: { }; 6242: # 192 "/usr/include/c++/8/type_traits" 3 6242: template 6242: struct __success_type 6242: { typedef _Tp type; }; 6242: 6242: struct __failure_type 6242: { }; 6242: 6242: 6242: 6242: template 6242: struct remove_cv; 6242: 6242: template 6242: struct __is_void_helper 6242: : public false_type { }; 6242: 6242: template<> 6242: struct __is_void_helper 6242: : public true_type { }; 6242: 6242: 6242: template 6242: struct is_void 6242: : public __is_void_helper::type>::type 6242: { }; 6242: 6242: template 6242: struct __is_integral_helper 6242: : public false_type { }; 6242: 6242: template<> 6242: struct __is_integral_helper 6242: : public true_type { }; 6242: 6242: template<> 6242: struct __is_integral_helper 6242: : public true_type { }; 6242: 6242: template<> 6242: struct __is_integral_helper 6242: : public true_type { }; 6242: 6242: template<> 6242: struct __is_integral_helper 6242: : public true_type { }; 6242: 6242: 6242: template<> 6242: struct __is_integral_helper 6242: : public true_type { }; 6242: 6242: 6242: template<> 6242: struct __is_integral_helper 6242: : public true_type { }; 6242: 6242: template<> 6242: struct __is_integral_helper 6242: : public true_type { }; 6242: 6242: template<> 6242: struct __is_integral_helper 6242: : public true_type { }; 6242: 6242: template<> 6242: struct __is_integral_helper 6242: : public true_type { }; 6242: 6242: template<> 6242: struct __is_integral_helper 6242: : public true_type { }; 6242: 6242: template<> 6242: struct __is_integral_helper 6242: : public true_type { }; 6242: 6242: template<> 6242: struct __is_integral_helper 6242: : public true_type { }; 6242: 6242: template<> 6242: struct __is_integral_helper 6242: : public true_type { }; 6242: 6242: template<> 6242: struct __is_integral_helper 6242: : public true_type { }; 6242: 6242: template<> 6242: struct __is_integral_helper 6242: : public true_type { }; 6242: 6242: 6242: 6242: 6242: template<> 6242: struct __is_integral_helper<__int128> 6242: : public true_type { }; 6242: 6242: template<> 6242: struct __is_integral_helper 6242: : public true_type { }; 6242: # 324 "/usr/include/c++/8/type_traits" 3 6242: template 6242: struct is_integral 6242: : public __is_integral_helper::type>::type 6242: { }; 6242: 6242: template 6242: struct __is_floating_point_helper 6242: : public false_type { }; 6242: 6242: template<> 6242: struct __is_floating_point_helper 6242: : public true_type { }; 6242: 6242: template<> 6242: struct __is_floating_point_helper 6242: : public true_type { }; 6242: 6242: template<> 6242: struct __is_floating_point_helper 6242: : public true_type { }; 6242: # 352 "/usr/include/c++/8/type_traits" 3 6242: template 6242: struct is_floating_point 6242: : public __is_floating_point_helper::type>::type 6242: { }; 6242: 6242: 6242: template 6242: struct is_array 6242: : public false_type { }; 6242: 6242: template 6242: struct is_array<_Tp[_Size]> 6242: : public true_type { }; 6242: 6242: template 6242: struct is_array<_Tp[]> 6242: : public true_type { }; 6242: 6242: template 6242: struct __is_pointer_helper 6242: : public false_type { }; 6242: 6242: template 6242: struct __is_pointer_helper<_Tp*> 6242: : public true_type { }; 6242: 6242: 6242: template 6242: struct is_pointer 6242: : public __is_pointer_helper::type>::type 6242: { }; 6242: 6242: 6242: template 6242: struct is_lvalue_reference 6242: : public false_type { }; 6242: 6242: template 6242: struct is_lvalue_reference<_Tp&> 6242: : public true_type { }; 6242: 6242: 6242: template 6242: struct is_rvalue_reference 6242: : public false_type { }; 6242: 6242: template 6242: struct is_rvalue_reference<_Tp&&> 6242: : public true_type { }; 6242: 6242: template 6242: struct is_function; 6242: 6242: template 6242: struct __is_member_object_pointer_helper 6242: : public false_type { }; 6242: 6242: template 6242: struct __is_member_object_pointer_helper<_Tp _Cp::*> 6242: : public integral_constant::value> { }; 6242: 6242: 6242: template 6242: struct is_member_object_pointer 6242: : public __is_member_object_pointer_helper< 6242: typename remove_cv<_Tp>::type>::type 6242: { }; 6242: 6242: template 6242: struct __is_member_function_pointer_helper 6242: : public false_type { }; 6242: 6242: template 6242: struct __is_member_function_pointer_helper<_Tp _Cp::*> 6242: : public integral_constant::value> { }; 6242: 6242: 6242: template 6242: struct is_member_function_pointer 6242: : public __is_member_function_pointer_helper< 6242: typename remove_cv<_Tp>::type>::type 6242: { }; 6242: 6242: 6242: template 6242: struct is_enum 6242: : public integral_constant 6242: { }; 6242: 6242: 6242: template 6242: struct is_union 6242: : public integral_constant 6242: { }; 6242: 6242: 6242: template 6242: struct is_class 6242: : public integral_constant 6242: { }; 6242: 6242: 6242: template 6242: struct is_function 6242: : public false_type { }; 6242: 6242: template 6242: struct is_function<_Res(_ArgTypes...) > 6242: : public true_type { }; 6242: 6242: template 6242: struct is_function<_Res(_ArgTypes...) & > 6242: : public true_type { }; 6242: 6242: template 6242: struct is_function<_Res(_ArgTypes...) && > 6242: : public true_type { }; 6242: 6242: template 6242: struct is_function<_Res(_ArgTypes......) > 6242: : public true_type { }; 6242: 6242: template 6242: struct is_function<_Res(_ArgTypes......) & > 6242: : public true_type { }; 6242: 6242: template 6242: struct is_function<_Res(_ArgTypes......) && > 6242: : public true_type { }; 6242: 6242: template 6242: struct is_function<_Res(_ArgTypes...) const > 6242: : public true_type { }; 6242: 6242: template 6242: struct is_function<_Res(_ArgTypes...) const & > 6242: : public true_type { }; 6242: 6242: template 6242: struct is_function<_Res(_ArgTypes...) const && > 6242: : public true_type { }; 6242: 6242: template 6242: struct is_function<_Res(_ArgTypes......) const > 6242: : public true_type { }; 6242: 6242: template 6242: struct is_function<_Res(_ArgTypes......) const & > 6242: : public true_type { }; 6242: 6242: template 6242: struct is_function<_Res(_ArgTypes......) const && > 6242: : public true_type { }; 6242: 6242: template 6242: struct is_function<_Res(_ArgTypes...) volatile > 6242: : public true_type { }; 6242: 6242: template 6242: struct is_function<_Res(_ArgTypes...) volatile & > 6242: : public true_type { }; 6242: 6242: template 6242: struct is_function<_Res(_ArgTypes...) volatile && > 6242: : public true_type { }; 6242: 6242: template 6242: struct is_function<_Res(_ArgTypes......) volatile > 6242: : public true_type { }; 6242: 6242: template 6242: struct is_function<_Res(_ArgTypes......) volatile & > 6242: : public true_type { }; 6242: 6242: template 6242: struct is_function<_Res(_ArgTypes......) volatile && > 6242: : public true_type { }; 6242: 6242: template 6242: struct is_function<_Res(_ArgTypes...) const volatile > 6242: : public true_type { }; 6242: 6242: template 6242: struct is_function<_Res(_ArgTypes...) const volatile & > 6242: : public true_type { }; 6242: 6242: template 6242: struct is_function<_Res(_ArgTypes...) const volatile && > 6242: : public true_type { }; 6242: 6242: template 6242: struct is_function<_Res(_ArgTypes......) const volatile > 6242: : public true_type { }; 6242: 6242: template 6242: struct is_function<_Res(_ArgTypes......) const volatile & > 6242: : public true_type { }; 6242: 6242: template 6242: struct is_function<_Res(_ArgTypes......) const volatile && > 6242: : public true_type { }; 6242: 6242: 6242: 6242: template 6242: struct __is_null_pointer_helper 6242: : public false_type { }; 6242: 6242: template<> 6242: struct __is_null_pointer_helper 6242: : public true_type { }; 6242: 6242: 6242: template 6242: struct is_null_pointer 6242: : public __is_null_pointer_helper::type>::type 6242: { }; 6242: 6242: 6242: template 6242: struct __is_nullptr_t 6242: : public is_null_pointer<_Tp> 6242: { }; 6242: 6242: 6242: 6242: 6242: template 6242: struct is_reference 6242: : public __or_, 6242: is_rvalue_reference<_Tp>>::type 6242: { }; 6242: 6242: 6242: template 6242: struct is_arithmetic 6242: : public __or_, is_floating_point<_Tp>>::type 6242: { }; 6242: 6242: 6242: template 6242: struct is_fundamental 6242: : public __or_, is_void<_Tp>, 6242: is_null_pointer<_Tp>>::type 6242: { }; 6242: 6242: 6242: template 6242: struct is_object 6242: : public __not_<__or_, is_reference<_Tp>, 6242: is_void<_Tp>>>::type 6242: { }; 6242: 6242: template 6242: struct is_member_pointer; 6242: 6242: 6242: template 6242: struct is_scalar 6242: : public __or_, is_enum<_Tp>, is_pointer<_Tp>, 6242: is_member_pointer<_Tp>, is_null_pointer<_Tp>>::type 6242: { }; 6242: 6242: 6242: template 6242: struct is_compound 6242: : public integral_constant::value> { }; 6242: 6242: template 6242: struct __is_member_pointer_helper 6242: : public false_type { }; 6242: 6242: template 6242: struct __is_member_pointer_helper<_Tp _Cp::*> 6242: : public true_type { }; 6242: 6242: 6242: template 6242: struct is_member_pointer 6242: : public __is_member_pointer_helper::type>::type 6242: { }; 6242: 6242: 6242: 6242: template 6242: struct __is_referenceable 6242: : public __or_, is_reference<_Tp>>::type 6242: { }; 6242: 6242: template 6242: struct __is_referenceable<_Res(_Args...) > 6242: : public true_type 6242: { }; 6242: 6242: template 6242: struct __is_referenceable<_Res(_Args......) > 6242: : public true_type 6242: { }; 6242: 6242: 6242: 6242: 6242: template 6242: struct is_const 6242: : public false_type { }; 6242: 6242: template 6242: struct is_const<_Tp const> 6242: : public true_type { }; 6242: 6242: 6242: template 6242: struct is_volatile 6242: : public false_type { }; 6242: 6242: template 6242: struct is_volatile<_Tp volatile> 6242: : public true_type { }; 6242: 6242: 6242: template 6242: struct is_trivial 6242: : public integral_constant 6242: { }; 6242: 6242: 6242: template 6242: struct is_trivially_copyable 6242: : public integral_constant 6242: { }; 6242: 6242: 6242: template 6242: struct is_standard_layout 6242: : public integral_constant 6242: { }; 6242: 6242: 6242: 6242: template 6242: struct is_pod 6242: : public integral_constant 6242: { }; 6242: 6242: 6242: template 6242: struct is_literal_type 6242: : public integral_constant 6242: { }; 6242: 6242: 6242: template 6242: struct is_empty 6242: : public integral_constant 6242: { }; 6242: 6242: 6242: template 6242: struct is_polymorphic 6242: : public integral_constant 6242: { }; 6242: # 724 "/usr/include/c++/8/type_traits" 3 6242: template 6242: struct is_abstract 6242: : public integral_constant 6242: { }; 6242: 6242: template::value> 6242: struct __is_signed_helper 6242: : public false_type { }; 6242: 6242: template 6242: struct __is_signed_helper<_Tp, true> 6242: : public integral_constant 6242: { }; 6242: 6242: 6242: template 6242: struct is_signed 6242: : public __is_signed_helper<_Tp>::type 6242: { }; 6242: 6242: 6242: template 6242: struct is_unsigned 6242: : public __and_, __not_>> 6242: { }; 6242: # 759 "/usr/include/c++/8/type_traits" 3 6242: template 6242: _Up 6242: __declval(int); 6242: 6242: template 6242: _Tp 6242: __declval(long); 6242: 6242: template 6242: auto declval() noexcept -> decltype(__declval<_Tp>(0)); 6242: 6242: template 6242: struct extent; 6242: 6242: template 6242: struct remove_all_extents; 6242: 6242: template 6242: struct __is_array_known_bounds 6242: : public integral_constant::value > 0)> 6242: { }; 6242: 6242: template 6242: struct __is_array_unknown_bounds 6242: : public __and_, __not_>> 6242: { }; 6242: 6242: 6242: 6242: 6242: 6242: 6242: struct __do_is_destructible_impl 6242: { 6242: template().~_Tp())> 6242: static true_type __test(int); 6242: 6242: template 6242: static false_type __test(...); 6242: }; 6242: 6242: template 6242: struct __is_destructible_impl 6242: : public __do_is_destructible_impl 6242: { 6242: typedef decltype(__test<_Tp>(0)) type; 6242: }; 6242: 6242: template, 6242: __is_array_unknown_bounds<_Tp>, 6242: is_function<_Tp>>::value, 6242: bool = __or_, is_scalar<_Tp>>::value> 6242: struct __is_destructible_safe; 6242: 6242: template 6242: struct __is_destructible_safe<_Tp, false, false> 6242: : public __is_destructible_impl::type>::type 6242: { }; 6242: 6242: template 6242: struct __is_destructible_safe<_Tp, true, false> 6242: : public false_type { }; 6242: 6242: template 6242: struct __is_destructible_safe<_Tp, false, true> 6242: : public true_type { }; 6242: 6242: 6242: template 6242: struct is_destructible 6242: : public __is_destructible_safe<_Tp>::type 6242: { }; 6242: 6242: 6242: 6242: 6242: 6242: struct __do_is_nt_destructible_impl 6242: { 6242: template 6242: static integral_constant().~_Tp())> 6242: __test(int); 6242: 6242: template 6242: static false_type __test(...); 6242: }; 6242: 6242: template 6242: struct __is_nt_destructible_impl 6242: : public __do_is_nt_destructible_impl 6242: { 6242: typedef decltype(__test<_Tp>(0)) type; 6242: }; 6242: 6242: template, 6242: __is_array_unknown_bounds<_Tp>, 6242: is_function<_Tp>>::value, 6242: bool = __or_, is_scalar<_Tp>>::value> 6242: struct __is_nt_destructible_safe; 6242: 6242: template 6242: struct __is_nt_destructible_safe<_Tp, false, false> 6242: : public __is_nt_destructible_impl::type>::type 6242: { }; 6242: 6242: template 6242: struct __is_nt_destructible_safe<_Tp, true, false> 6242: : public false_type { }; 6242: 6242: template 6242: struct __is_nt_destructible_safe<_Tp, false, true> 6242: : public true_type { }; 6242: 6242: 6242: template 6242: struct is_nothrow_destructible 6242: : public __is_nt_destructible_safe<_Tp>::type 6242: { }; 6242: 6242: struct __do_is_default_constructible_impl 6242: { 6242: template 6242: static true_type __test(int); 6242: 6242: template 6242: static false_type __test(...); 6242: }; 6242: 6242: template 6242: struct __is_default_constructible_impl 6242: : public __do_is_default_constructible_impl 6242: { 6242: typedef decltype(__test<_Tp>(0)) type; 6242: }; 6242: 6242: template 6242: struct __is_default_constructible_atom 6242: : public __and_<__not_>, 6242: __is_default_constructible_impl<_Tp>> 6242: { }; 6242: 6242: template::value> 6242: struct __is_default_constructible_safe; 6242: 6242: 6242: 6242: 6242: 6242: 6242: template 6242: struct __is_default_constructible_safe<_Tp, true> 6242: : public __and_<__is_array_known_bounds<_Tp>, 6242: __is_default_constructible_atom::type>> 6242: { }; 6242: 6242: template 6242: struct __is_default_constructible_safe<_Tp, false> 6242: : public __is_default_constructible_atom<_Tp>::type 6242: { }; 6242: 6242: 6242: template 6242: struct is_default_constructible 6242: : public __is_default_constructible_safe<_Tp>::type 6242: { }; 6242: 6242: 6242: template 6242: struct is_constructible 6242: : public __bool_constant<__is_constructible(_Tp, _Args...)> 6242: { }; 6242: 6242: template::value> 6242: struct __is_copy_constructible_impl; 6242: 6242: template 6242: struct __is_copy_constructible_impl<_Tp, false> 6242: : public false_type { }; 6242: 6242: template 6242: struct __is_copy_constructible_impl<_Tp, true> 6242: : public is_constructible<_Tp, const _Tp&> 6242: { }; 6242: 6242: 6242: template 6242: struct is_copy_constructible 6242: : public __is_copy_constructible_impl<_Tp> 6242: { }; 6242: 6242: template::value> 6242: struct __is_move_constructible_impl; 6242: 6242: template 6242: struct __is_move_constructible_impl<_Tp, false> 6242: : public false_type { }; 6242: 6242: template 6242: struct __is_move_constructible_impl<_Tp, true> 6242: : public is_constructible<_Tp, _Tp&&> 6242: { }; 6242: 6242: 6242: template 6242: struct is_move_constructible 6242: : public __is_move_constructible_impl<_Tp> 6242: { }; 6242: 6242: template 6242: struct __is_nt_default_constructible_atom 6242: : public integral_constant 6242: { }; 6242: 6242: template::value> 6242: struct __is_nt_default_constructible_impl; 6242: 6242: template 6242: struct __is_nt_default_constructible_impl<_Tp, true> 6242: : public __and_<__is_array_known_bounds<_Tp>, 6242: __is_nt_default_constructible_atom::type>> 6242: { }; 6242: 6242: template 6242: struct __is_nt_default_constructible_impl<_Tp, false> 6242: : public __is_nt_default_constructible_atom<_Tp> 6242: { }; 6242: 6242: 6242: template 6242: struct is_nothrow_default_constructible 6242: : public __and_, 6242: __is_nt_default_constructible_impl<_Tp>> 6242: { }; 6242: 6242: template 6242: struct __is_nt_constructible_impl 6242: : public integral_constant()...))> 6242: { }; 6242: 6242: template 6242: struct __is_nt_constructible_impl<_Tp, _Arg> 6242: : public integral_constant(declval<_Arg>()))> 6242: { }; 6242: 6242: template 6242: struct __is_nt_constructible_impl<_Tp> 6242: : public is_nothrow_default_constructible<_Tp> 6242: { }; 6242: 6242: 6242: template 6242: struct is_nothrow_constructible 6242: : public __and_, 6242: __is_nt_constructible_impl<_Tp, _Args...>> 6242: { }; 6242: 6242: template::value> 6242: struct __is_nothrow_copy_constructible_impl; 6242: 6242: template 6242: struct __is_nothrow_copy_constructible_impl<_Tp, false> 6242: : public false_type { }; 6242: 6242: template 6242: struct __is_nothrow_copy_constructible_impl<_Tp, true> 6242: : public is_nothrow_constructible<_Tp, const _Tp&> 6242: { }; 6242: 6242: 6242: template 6242: struct is_nothrow_copy_constructible 6242: : public __is_nothrow_copy_constructible_impl<_Tp> 6242: { }; 6242: 6242: template::value> 6242: struct __is_nothrow_move_constructible_impl; 6242: 6242: template 6242: struct __is_nothrow_move_constructible_impl<_Tp, false> 6242: : public false_type { }; 6242: 6242: template 6242: struct __is_nothrow_move_constructible_impl<_Tp, true> 6242: : public is_nothrow_constructible<_Tp, _Tp&&> 6242: { }; 6242: 6242: 6242: template 6242: struct is_nothrow_move_constructible 6242: : public __is_nothrow_move_constructible_impl<_Tp> 6242: { }; 6242: 6242: 6242: template 6242: struct is_assignable 6242: : public __bool_constant<__is_assignable(_Tp, _Up)> 6242: { }; 6242: 6242: template::value> 6242: struct __is_copy_assignable_impl; 6242: 6242: template 6242: struct __is_copy_assignable_impl<_Tp, false> 6242: : public false_type { }; 6242: 6242: template 6242: struct __is_copy_assignable_impl<_Tp, true> 6242: : public is_assignable<_Tp&, const _Tp&> 6242: { }; 6242: 6242: 6242: template 6242: struct is_copy_assignable 6242: : public __is_copy_assignable_impl<_Tp> 6242: { }; 6242: 6242: template::value> 6242: struct __is_move_assignable_impl; 6242: 6242: template 6242: struct __is_move_assignable_impl<_Tp, false> 6242: : public false_type { }; 6242: 6242: template 6242: struct __is_move_assignable_impl<_Tp, true> 6242: : public is_assignable<_Tp&, _Tp&&> 6242: { }; 6242: 6242: 6242: template 6242: struct is_move_assignable 6242: : public __is_move_assignable_impl<_Tp> 6242: { }; 6242: 6242: template 6242: struct __is_nt_assignable_impl 6242: : public integral_constant() = declval<_Up>())> 6242: { }; 6242: 6242: 6242: template 6242: struct is_nothrow_assignable 6242: : public __and_, 6242: __is_nt_assignable_impl<_Tp, _Up>> 6242: { }; 6242: 6242: template::value> 6242: struct __is_nt_copy_assignable_impl; 6242: 6242: template 6242: struct __is_nt_copy_assignable_impl<_Tp, false> 6242: : public false_type { }; 6242: 6242: template 6242: struct __is_nt_copy_assignable_impl<_Tp, true> 6242: : public is_nothrow_assignable<_Tp&, const _Tp&> 6242: { }; 6242: 6242: 6242: template 6242: struct is_nothrow_copy_assignable 6242: : public __is_nt_copy_assignable_impl<_Tp> 6242: { }; 6242: 6242: template::value> 6242: struct __is_nt_move_assignable_impl; 6242: 6242: template 6242: struct __is_nt_move_assignable_impl<_Tp, false> 6242: : public false_type { }; 6242: 6242: template 6242: struct __is_nt_move_assignable_impl<_Tp, true> 6242: : public is_nothrow_assignable<_Tp&, _Tp&&> 6242: { }; 6242: 6242: 6242: template 6242: struct is_nothrow_move_assignable 6242: : public __is_nt_move_assignable_impl<_Tp> 6242: { }; 6242: 6242: 6242: template 6242: struct is_trivially_constructible 6242: : public __bool_constant<__is_trivially_constructible(_Tp, _Args...)> 6242: { }; 6242: 6242: 6242: template 6242: struct is_trivially_default_constructible 6242: : public is_trivially_constructible<_Tp>::type 6242: { }; 6242: 6242: struct __do_is_implicitly_default_constructible_impl 6242: { 6242: template 6242: static void __helper(const _Tp&); 6242: 6242: template 6242: static true_type __test(const _Tp&, 6242: decltype(__helper({}))* = 0); 6242: 6242: static false_type __test(...); 6242: }; 6242: 6242: template 6242: struct __is_implicitly_default_constructible_impl 6242: : public __do_is_implicitly_default_constructible_impl 6242: { 6242: typedef decltype(__test(declval<_Tp>())) type; 6242: }; 6242: 6242: template 6242: struct __is_implicitly_default_constructible_safe 6242: : public __is_implicitly_default_constructible_impl<_Tp>::type 6242: { }; 6242: 6242: template 6242: struct __is_implicitly_default_constructible 6242: : public __and_, 6242: __is_implicitly_default_constructible_safe<_Tp>> 6242: { }; 6242: 6242: 6242: 6242: template::value> 6242: struct __is_trivially_copy_constructible_impl; 6242: 6242: template 6242: struct __is_trivially_copy_constructible_impl<_Tp, false> 6242: : public false_type { }; 6242: 6242: template 6242: struct __is_trivially_copy_constructible_impl<_Tp, true> 6242: : public __and_, 6242: integral_constant> 6242: { }; 6242: 6242: template 6242: struct is_trivially_copy_constructible 6242: : public __is_trivially_copy_constructible_impl<_Tp> 6242: { }; 6242: 6242: 6242: 6242: template::value> 6242: struct __is_trivially_move_constructible_impl; 6242: 6242: template 6242: struct __is_trivially_move_constructible_impl<_Tp, false> 6242: : public false_type { }; 6242: 6242: template 6242: struct __is_trivially_move_constructible_impl<_Tp, true> 6242: : public __and_, 6242: integral_constant> 6242: { }; 6242: 6242: template 6242: struct is_trivially_move_constructible 6242: : public __is_trivially_move_constructible_impl<_Tp> 6242: { }; 6242: 6242: 6242: template 6242: struct is_trivially_assignable 6242: : public __bool_constant<__is_trivially_assignable(_Tp, _Up)> 6242: { }; 6242: 6242: 6242: 6242: template::value> 6242: struct __is_trivially_copy_assignable_impl; 6242: 6242: template 6242: struct __is_trivially_copy_assignable_impl<_Tp, false> 6242: : public false_type { }; 6242: 6242: template 6242: struct __is_trivially_copy_assignable_impl<_Tp, true> 6242: : public __and_, 6242: integral_constant> 6242: { }; 6242: 6242: template 6242: struct is_trivially_copy_assignable 6242: : public __is_trivially_copy_assignable_impl<_Tp> 6242: { }; 6242: 6242: 6242: 6242: template::value> 6242: struct __is_trivially_move_assignable_impl; 6242: 6242: template 6242: struct __is_trivially_move_assignable_impl<_Tp, false> 6242: : public false_type { }; 6242: 6242: template 6242: struct __is_trivially_move_assignable_impl<_Tp, true> 6242: : public __and_, 6242: integral_constant> 6242: { }; 6242: 6242: template 6242: struct is_trivially_move_assignable 6242: : public __is_trivially_move_assignable_impl<_Tp> 6242: { }; 6242: 6242: 6242: template 6242: struct is_trivially_destructible 6242: : public __and_, integral_constant> 6242: { }; 6242: 6242: 6242: 6242: template 6242: struct has_virtual_destructor 6242: : public integral_constant 6242: { }; 6242: 6242: 6242: 6242: 6242: 6242: template 6242: struct alignment_of 6242: : public integral_constant { }; 6242: 6242: 6242: template 6242: struct rank 6242: : public integral_constant { }; 6242: 6242: template 6242: struct rank<_Tp[_Size]> 6242: : public integral_constant::value> { }; 6242: 6242: template 6242: struct rank<_Tp[]> 6242: : public integral_constant::value> { }; 6242: 6242: 6242: template 6242: struct extent 6242: : public integral_constant { }; 6242: 6242: template 6242: struct extent<_Tp[_Size], _Uint> 6242: : public integral_constant::value> 6242: { }; 6242: 6242: template 6242: struct extent<_Tp[], _Uint> 6242: : public integral_constant::value> 6242: { }; 6242: 6242: 6242: 6242: 6242: 6242: template 6242: struct is_same 6242: : public false_type { }; 6242: 6242: template 6242: struct is_same<_Tp, _Tp> 6242: : public true_type { }; 6242: 6242: 6242: template 6242: struct is_base_of 6242: : public integral_constant 6242: { }; 6242: 6242: template, is_function<_To>, 6242: is_array<_To>>::value> 6242: struct __is_convertible_helper 6242: { typedef typename is_void<_To>::type type; }; 6242: 6242: template 6242: class __is_convertible_helper<_From, _To, false> 6242: { 6242: template 6242: static void __test_aux(_To1); 6242: 6242: template(std::declval<_From1>()))> 6242: static true_type 6242: __test(int); 6242: 6242: template 6242: static false_type 6242: __test(...); 6242: 6242: public: 6242: typedef decltype(__test<_From, _To>(0)) type; 6242: }; 6242: 6242: 6242: 6242: template 6242: struct is_convertible 6242: : public __is_convertible_helper<_From, _To>::type 6242: { }; 6242: 6242: 6242: 6242: 6242: 6242: template 6242: struct remove_const 6242: { typedef _Tp type; }; 6242: 6242: template 6242: struct remove_const<_Tp const> 6242: { typedef _Tp type; }; 6242: 6242: 6242: template 6242: struct remove_volatile 6242: { typedef _Tp type; }; 6242: 6242: template 6242: struct remove_volatile<_Tp volatile> 6242: { typedef _Tp type; }; 6242: 6242: 6242: template 6242: struct remove_cv 6242: { 6242: typedef typename 6242: remove_const::type>::type type; 6242: }; 6242: 6242: 6242: template 6242: struct add_const 6242: { typedef _Tp const type; }; 6242: 6242: 6242: template 6242: struct add_volatile 6242: { typedef _Tp volatile type; }; 6242: 6242: 6242: template 6242: struct add_cv 6242: { 6242: typedef typename 6242: add_const::type>::type type; 6242: }; 6242: # 1463 "/usr/include/c++/8/type_traits" 3 6242: template 6242: struct remove_reference 6242: { typedef _Tp type; }; 6242: 6242: template 6242: struct remove_reference<_Tp&> 6242: { typedef _Tp type; }; 6242: 6242: template 6242: struct remove_reference<_Tp&&> 6242: { typedef _Tp type; }; 6242: 6242: template::value> 6242: struct __add_lvalue_reference_helper 6242: { typedef _Tp type; }; 6242: 6242: template 6242: struct __add_lvalue_reference_helper<_Tp, true> 6242: { typedef _Tp& type; }; 6242: 6242: 6242: template 6242: struct add_lvalue_reference 6242: : public __add_lvalue_reference_helper<_Tp> 6242: { }; 6242: 6242: template::value> 6242: struct __add_rvalue_reference_helper 6242: { typedef _Tp type; }; 6242: 6242: template 6242: struct __add_rvalue_reference_helper<_Tp, true> 6242: { typedef _Tp&& type; }; 6242: 6242: 6242: template 6242: struct add_rvalue_reference 6242: : public __add_rvalue_reference_helper<_Tp> 6242: { }; 6242: # 1520 "/usr/include/c++/8/type_traits" 3 6242: template 6242: struct __cv_selector; 6242: 6242: template 6242: struct __cv_selector<_Unqualified, false, false> 6242: { typedef _Unqualified __type; }; 6242: 6242: template 6242: struct __cv_selector<_Unqualified, false, true> 6242: { typedef volatile _Unqualified __type; }; 6242: 6242: template 6242: struct __cv_selector<_Unqualified, true, false> 6242: { typedef const _Unqualified __type; }; 6242: 6242: template 6242: struct __cv_selector<_Unqualified, true, true> 6242: { typedef const volatile _Unqualified __type; }; 6242: 6242: template::value, 6242: bool _IsVol = is_volatile<_Qualified>::value> 6242: class __match_cv_qualifiers 6242: { 6242: typedef __cv_selector<_Unqualified, _IsConst, _IsVol> __match; 6242: 6242: public: 6242: typedef typename __match::__type __type; 6242: }; 6242: 6242: 6242: template 6242: struct __make_unsigned 6242: { typedef _Tp __type; }; 6242: 6242: template<> 6242: struct __make_unsigned 6242: { typedef unsigned char __type; }; 6242: 6242: template<> 6242: struct __make_unsigned 6242: { typedef unsigned char __type; }; 6242: 6242: template<> 6242: struct __make_unsigned 6242: { typedef unsigned short __type; }; 6242: 6242: template<> 6242: struct __make_unsigned 6242: { typedef unsigned int __type; }; 6242: 6242: template<> 6242: struct __make_unsigned 6242: { typedef unsigned long __type; }; 6242: 6242: template<> 6242: struct __make_unsigned 6242: { typedef unsigned long long __type; }; 6242: 6242: 6242: template<> 6242: struct __make_unsigned : __make_unsigned 6242: { }; 6242: 6242: 6242: 6242: template<> 6242: struct __make_unsigned<__int128> 6242: { typedef unsigned __int128 __type; }; 6242: # 1607 "/usr/include/c++/8/type_traits" 3 6242: template::value, 6242: bool _IsEnum = is_enum<_Tp>::value> 6242: class __make_unsigned_selector; 6242: 6242: template 6242: class __make_unsigned_selector<_Tp, true, false> 6242: { 6242: typedef __make_unsigned::type> __unsignedt; 6242: typedef typename __unsignedt::__type __unsigned_type; 6242: typedef __match_cv_qualifiers<_Tp, __unsigned_type> __cv_unsigned; 6242: 6242: public: 6242: typedef typename __cv_unsigned::__type __type; 6242: }; 6242: 6242: template 6242: class __make_unsigned_selector<_Tp, false, true> 6242: { 6242: 6242: typedef unsigned char __smallest; 6242: static const bool __b0 = sizeof(_Tp) <= sizeof(__smallest); 6242: static const bool __b1 = sizeof(_Tp) <= sizeof(unsigned short); 6242: static const bool __b2 = sizeof(_Tp) <= sizeof(unsigned int); 6242: static const bool __b3 = sizeof(_Tp) <= sizeof(unsigned long); 6242: typedef conditional<__b3, unsigned long, unsigned long long> __cond3; 6242: typedef typename __cond3::type __cond3_type; 6242: typedef conditional<__b2, unsigned int, __cond3_type> __cond2; 6242: typedef typename __cond2::type __cond2_type; 6242: typedef conditional<__b1, unsigned short, __cond2_type> __cond1; 6242: typedef typename __cond1::type __cond1_type; 6242: 6242: typedef typename conditional<__b0, __smallest, __cond1_type>::type 6242: __unsigned_type; 6242: typedef __match_cv_qualifiers<_Tp, __unsigned_type> __cv_unsigned; 6242: 6242: public: 6242: typedef typename __cv_unsigned::__type __type; 6242: }; 6242: 6242: 6242: 6242: 6242: 6242: template 6242: struct make_unsigned 6242: { typedef typename __make_unsigned_selector<_Tp>::__type type; }; 6242: 6242: 6242: template<> 6242: struct make_unsigned; 6242: 6242: 6242: 6242: template 6242: struct __make_signed 6242: { typedef _Tp __type; }; 6242: 6242: template<> 6242: struct __make_signed 6242: { typedef signed char __type; }; 6242: 6242: template<> 6242: struct __make_signed 6242: { typedef signed char __type; }; 6242: 6242: template<> 6242: struct __make_signed 6242: { typedef signed short __type; }; 6242: 6242: template<> 6242: struct __make_signed 6242: { typedef signed int __type; }; 6242: 6242: template<> 6242: struct __make_signed 6242: { typedef signed long __type; }; 6242: 6242: template<> 6242: struct __make_signed 6242: { typedef signed long long __type; }; 6242: # 1696 "/usr/include/c++/8/type_traits" 3 6242: template<> 6242: struct __make_signed : __make_signed 6242: { }; 6242: template<> 6242: struct __make_signed : __make_signed 6242: { }; 6242: 6242: 6242: 6242: template<> 6242: struct __make_signed 6242: { typedef __int128 __type; }; 6242: # 1726 "/usr/include/c++/8/type_traits" 3 6242: template::value, 6242: bool _IsEnum = is_enum<_Tp>::value> 6242: class __make_signed_selector; 6242: 6242: template 6242: class __make_signed_selector<_Tp, true, false> 6242: { 6242: typedef __make_signed::type> __signedt; 6242: typedef typename __signedt::__type __signed_type; 6242: typedef __match_cv_qualifiers<_Tp, __signed_type> __cv_signed; 6242: 6242: public: 6242: typedef typename __cv_signed::__type __type; 6242: }; 6242: 6242: template 6242: class __make_signed_selector<_Tp, false, true> 6242: { 6242: typedef typename __make_unsigned_selector<_Tp>::__type __unsigned_type; 6242: 6242: public: 6242: typedef typename __make_signed_selector<__unsigned_type>::__type __type; 6242: }; 6242: 6242: 6242: 6242: 6242: 6242: template 6242: struct make_signed 6242: { typedef typename __make_signed_selector<_Tp>::__type type; }; 6242: 6242: 6242: template<> 6242: struct make_signed; 6242: # 1776 "/usr/include/c++/8/type_traits" 3 6242: template 6242: struct remove_extent 6242: { typedef _Tp type; }; 6242: 6242: template 6242: struct remove_extent<_Tp[_Size]> 6242: { typedef _Tp type; }; 6242: 6242: template 6242: struct remove_extent<_Tp[]> 6242: { typedef _Tp type; }; 6242: 6242: 6242: template 6242: struct remove_all_extents 6242: { typedef _Tp type; }; 6242: 6242: template 6242: struct remove_all_extents<_Tp[_Size]> 6242: { typedef typename remove_all_extents<_Tp>::type type; }; 6242: 6242: template 6242: struct remove_all_extents<_Tp[]> 6242: { typedef typename remove_all_extents<_Tp>::type type; }; 6242: # 1813 "/usr/include/c++/8/type_traits" 3 6242: template 6242: struct __remove_pointer_helper 6242: { typedef _Tp type; }; 6242: 6242: template 6242: struct __remove_pointer_helper<_Tp, _Up*> 6242: { typedef _Up type; }; 6242: 6242: 6242: template 6242: struct remove_pointer 6242: : public __remove_pointer_helper<_Tp, typename remove_cv<_Tp>::type> 6242: { }; 6242: 6242: 6242: template, 6242: is_void<_Tp>>::value> 6242: struct __add_pointer_helper 6242: { typedef _Tp type; }; 6242: 6242: template 6242: struct __add_pointer_helper<_Tp, true> 6242: { typedef typename remove_reference<_Tp>::type* type; }; 6242: 6242: template 6242: struct add_pointer 6242: : public __add_pointer_helper<_Tp> 6242: { }; 6242: # 1852 "/usr/include/c++/8/type_traits" 3 6242: template 6242: struct __aligned_storage_msa 6242: { 6242: union __type 6242: { 6242: unsigned char __data[_Len]; 6242: struct __attribute__((__aligned__)) { } __align; 6242: }; 6242: }; 6242: # 1872 "/usr/include/c++/8/type_traits" 3 6242: template::__type)> 6242: struct aligned_storage 6242: { 6242: union type 6242: { 6242: unsigned char __data[_Len]; 6242: struct __attribute__((__aligned__((_Align)))) { } __align; 6242: }; 6242: }; 6242: 6242: template 6242: struct __strictest_alignment 6242: { 6242: static const size_t _S_alignment = 0; 6242: static const size_t _S_size = 0; 6242: }; 6242: 6242: template 6242: struct __strictest_alignment<_Tp, _Types...> 6242: { 6242: static const size_t _S_alignment = 6242: alignof(_Tp) > __strictest_alignment<_Types...>::_S_alignment 6242: ? alignof(_Tp) : __strictest_alignment<_Types...>::_S_alignment; 6242: static const size_t _S_size = 6242: sizeof(_Tp) > __strictest_alignment<_Types...>::_S_size 6242: ? sizeof(_Tp) : __strictest_alignment<_Types...>::_S_size; 6242: }; 6242: # 1911 "/usr/include/c++/8/type_traits" 3 6242: template 6242: struct aligned_union 6242: { 6242: private: 6242: static_assert(sizeof...(_Types) != 0, "At least one type is required"); 6242: 6242: using __strictest = __strictest_alignment<_Types...>; 6242: static const size_t _S_len = _Len > __strictest::_S_size 6242: ? _Len : __strictest::_S_size; 6242: public: 6242: 6242: static const size_t alignment_value = __strictest::_S_alignment; 6242: 6242: typedef typename aligned_storage<_S_len, alignment_value>::type type; 6242: }; 6242: 6242: template 6242: const size_t aligned_union<_Len, _Types...>::alignment_value; 6242: 6242: 6242: 6242: template::value, 6242: bool _IsFunction = is_function<_Up>::value> 6242: struct __decay_selector; 6242: 6242: 6242: template 6242: struct __decay_selector<_Up, false, false> 6242: { typedef typename remove_cv<_Up>::type __type; }; 6242: 6242: template 6242: struct __decay_selector<_Up, true, false> 6242: { typedef typename remove_extent<_Up>::type* __type; }; 6242: 6242: template 6242: struct __decay_selector<_Up, false, true> 6242: { typedef typename add_pointer<_Up>::type __type; }; 6242: 6242: 6242: template 6242: class decay 6242: { 6242: typedef typename remove_reference<_Tp>::type __remove_type; 6242: 6242: public: 6242: typedef typename __decay_selector<__remove_type>::__type type; 6242: }; 6242: 6242: template 6242: class reference_wrapper; 6242: 6242: 6242: template 6242: struct __strip_reference_wrapper 6242: { 6242: typedef _Tp __type; 6242: }; 6242: 6242: template 6242: struct __strip_reference_wrapper > 6242: { 6242: typedef _Tp& __type; 6242: }; 6242: 6242: template 6242: struct __decay_and_strip 6242: { 6242: typedef typename __strip_reference_wrapper< 6242: typename decay<_Tp>::type>::__type __type; 6242: }; 6242: 6242: 6242: 6242: 6242: template 6242: struct enable_if 6242: { }; 6242: 6242: 6242: template 6242: struct enable_if 6242: { typedef _Tp type; }; 6242: 6242: template 6242: using _Require = typename enable_if<__and_<_Cond...>::value>::type; 6242: 6242: 6242: 6242: template 6242: struct conditional 6242: { typedef _Iftrue type; }; 6242: 6242: 6242: template 6242: struct conditional 6242: { typedef _Iffalse type; }; 6242: 6242: 6242: template 6242: struct common_type; 6242: 6242: 6242: 6242: struct __do_common_type_impl 6242: { 6242: template 6242: static __success_type() 6242: : std::declval<_Up>())>::type> _S_test(int); 6242: 6242: template 6242: static __failure_type _S_test(...); 6242: }; 6242: 6242: template 6242: struct __common_type_impl 6242: : private __do_common_type_impl 6242: { 6242: typedef decltype(_S_test<_Tp, _Up>(0)) type; 6242: }; 6242: 6242: struct __do_member_type_wrapper 6242: { 6242: template 6242: static __success_type _S_test(int); 6242: 6242: template 6242: static __failure_type _S_test(...); 6242: }; 6242: 6242: template 6242: struct __member_type_wrapper 6242: : private __do_member_type_wrapper 6242: { 6242: typedef decltype(_S_test<_Tp>(0)) type; 6242: }; 6242: 6242: template 6242: struct __expanded_common_type_wrapper 6242: { 6242: typedef common_type type; 6242: }; 6242: 6242: template 6242: struct __expanded_common_type_wrapper<__failure_type, _Args...> 6242: { typedef __failure_type type; }; 6242: 6242: template 6242: struct common_type<_Tp> 6242: { typedef typename decay<_Tp>::type type; }; 6242: 6242: template 6242: struct common_type<_Tp, _Up> 6242: : public __common_type_impl<_Tp, _Up>::type 6242: { }; 6242: 6242: template 6242: struct common_type<_Tp, _Up, _Vp...> 6242: : public __expanded_common_type_wrapper>::type, _Vp...>::type 6242: { }; 6242: 6242: 6242: template 6242: struct underlying_type 6242: { 6242: typedef __underlying_type(_Tp) type; 6242: }; 6242: 6242: template 6242: struct __declval_protector 6242: { 6242: static const bool __stop = false; 6242: }; 6242: 6242: template 6242: auto declval() noexcept -> decltype(__declval<_Tp>(0)) 6242: { 6242: static_assert(__declval_protector<_Tp>::__stop, 6242: "declval() must not be used!"); 6242: return __declval<_Tp>(0); 6242: } 6242: 6242: 6242: template 6242: class result_of; 6242: 6242: 6242: 6242: 6242: 6242: struct __invoke_memfun_ref { }; 6242: struct __invoke_memfun_deref { }; 6242: struct __invoke_memobj_ref { }; 6242: struct __invoke_memobj_deref { }; 6242: struct __invoke_other { }; 6242: 6242: 6242: template 6242: struct __result_of_success : __success_type<_Tp> 6242: { using __invoke_type = _Tag; }; 6242: 6242: 6242: struct __result_of_memfun_ref_impl 6242: { 6242: template 6242: static __result_of_success().*std::declval<_Fp>())(std::declval<_Args>()...) 6242: ), __invoke_memfun_ref> _S_test(int); 6242: 6242: template 6242: static __failure_type _S_test(...); 6242: }; 6242: 6242: template 6242: struct __result_of_memfun_ref 6242: : private __result_of_memfun_ref_impl 6242: { 6242: typedef decltype(_S_test<_MemPtr, _Arg, _Args...>(0)) type; 6242: }; 6242: 6242: 6242: struct __result_of_memfun_deref_impl 6242: { 6242: template 6242: static __result_of_success()).*std::declval<_Fp>())(std::declval<_Args>()...) 6242: ), __invoke_memfun_deref> _S_test(int); 6242: 6242: template 6242: static __failure_type _S_test(...); 6242: }; 6242: 6242: template 6242: struct __result_of_memfun_deref 6242: : private __result_of_memfun_deref_impl 6242: { 6242: typedef decltype(_S_test<_MemPtr, _Arg, _Args...>(0)) type; 6242: }; 6242: 6242: 6242: struct __result_of_memobj_ref_impl 6242: { 6242: template 6242: static __result_of_success().*std::declval<_Fp>() 6242: ), __invoke_memobj_ref> _S_test(int); 6242: 6242: template 6242: static __failure_type _S_test(...); 6242: }; 6242: 6242: template 6242: struct __result_of_memobj_ref 6242: : private __result_of_memobj_ref_impl 6242: { 6242: typedef decltype(_S_test<_MemPtr, _Arg>(0)) type; 6242: }; 6242: 6242: 6242: struct __result_of_memobj_deref_impl 6242: { 6242: template 6242: static __result_of_success()).*std::declval<_Fp>() 6242: ), __invoke_memobj_deref> _S_test(int); 6242: 6242: template 6242: static __failure_type _S_test(...); 6242: }; 6242: 6242: template 6242: struct __result_of_memobj_deref 6242: : private __result_of_memobj_deref_impl 6242: { 6242: typedef decltype(_S_test<_MemPtr, _Arg>(0)) type; 6242: }; 6242: 6242: template 6242: struct __result_of_memobj; 6242: 6242: template 6242: struct __result_of_memobj<_Res _Class::*, _Arg> 6242: { 6242: typedef typename remove_cv::type>::type _Argval; 6242: typedef _Res _Class::* _MemPtr; 6242: typedef typename conditional<__or_, 6242: is_base_of<_Class, _Argval>>::value, 6242: __result_of_memobj_ref<_MemPtr, _Arg>, 6242: __result_of_memobj_deref<_MemPtr, _Arg> 6242: >::type::type type; 6242: }; 6242: 6242: template 6242: struct __result_of_memfun; 6242: 6242: template 6242: struct __result_of_memfun<_Res _Class::*, _Arg, _Args...> 6242: { 6242: typedef typename remove_cv::type>::type _Argval; 6242: typedef _Res _Class::* _MemPtr; 6242: typedef typename conditional<__or_, 6242: is_base_of<_Class, _Argval>>::value, 6242: __result_of_memfun_ref<_MemPtr, _Arg, _Args...>, 6242: __result_of_memfun_deref<_MemPtr, _Arg, _Args...> 6242: >::type::type type; 6242: }; 6242: 6242: 6242: 6242: 6242: 6242: 6242: template::type> 6242: struct __inv_unwrap 6242: { 6242: using type = _Tp; 6242: }; 6242: 6242: template 6242: struct __inv_unwrap<_Tp, reference_wrapper<_Up>> 6242: { 6242: using type = _Up&; 6242: }; 6242: 6242: template 6242: struct __result_of_impl 6242: { 6242: typedef __failure_type type; 6242: }; 6242: 6242: template 6242: struct __result_of_impl 6242: : public __result_of_memobj::type, 6242: typename __inv_unwrap<_Arg>::type> 6242: { }; 6242: 6242: template 6242: struct __result_of_impl 6242: : public __result_of_memfun::type, 6242: typename __inv_unwrap<_Arg>::type, _Args...> 6242: { }; 6242: 6242: 6242: struct __result_of_other_impl 6242: { 6242: template 6242: static __result_of_success()(std::declval<_Args>()...) 6242: ), __invoke_other> _S_test(int); 6242: 6242: template 6242: static __failure_type _S_test(...); 6242: }; 6242: 6242: template 6242: struct __result_of_impl 6242: : private __result_of_other_impl 6242: { 6242: typedef decltype(_S_test<_Functor, _ArgTypes...>(0)) type; 6242: }; 6242: 6242: 6242: template 6242: struct __invoke_result 6242: : public __result_of_impl< 6242: is_member_object_pointer< 6242: typename remove_reference<_Functor>::type 6242: >::value, 6242: is_member_function_pointer< 6242: typename remove_reference<_Functor>::type 6242: >::value, 6242: _Functor, _ArgTypes... 6242: >::type 6242: { }; 6242: 6242: template 6242: struct result_of<_Functor(_ArgTypes...)> 6242: : public __invoke_result<_Functor, _ArgTypes...> 6242: { }; 6242: # 2329 "/usr/include/c++/8/type_traits" 3 6242: template using __void_t = void; 6242: 6242: 6242: 6242: 6242: template using void_t = void; 6242: 6242: 6242: 6242: template class _Op, typename... _Args> 6242: struct __detector 6242: { 6242: using value_t = false_type; 6242: using type = _Default; 6242: }; 6242: 6242: 6242: template class _Op, 6242: typename... _Args> 6242: struct __detector<_Default, __void_t<_Op<_Args...>>, _Op, _Args...> 6242: { 6242: using value_t = true_type; 6242: using type = _Op<_Args...>; 6242: }; 6242: 6242: 6242: template class _Op, 6242: typename... _Args> 6242: using __detected_or = __detector<_Default, void, _Op, _Args...>; 6242: 6242: 6242: template class _Op, 6242: typename... _Args> 6242: using __detected_or_t 6242: = typename __detected_or<_Default, _Op, _Args...>::type; 6242: # 2382 "/usr/include/c++/8/type_traits" 3 6242: template 6242: struct __is_swappable; 6242: 6242: template 6242: struct __is_nothrow_swappable; 6242: 6242: template 6242: class tuple; 6242: 6242: template 6242: struct __is_tuple_like_impl : false_type 6242: { }; 6242: 6242: template 6242: struct __is_tuple_like_impl> : true_type 6242: { }; 6242: 6242: 6242: template 6242: struct __is_tuple_like 6242: : public __is_tuple_like_impl::type>::type>::type 6242: { }; 6242: 6242: template 6242: inline 6242: typename enable_if<__and_<__not_<__is_tuple_like<_Tp>>, 6242: is_move_constructible<_Tp>, 6242: is_move_assignable<_Tp>>::value>::type 6242: swap(_Tp&, _Tp&) 6242: noexcept(__and_, 6242: is_nothrow_move_assignable<_Tp>>::value); 6242: 6242: template 6242: inline 6242: typename enable_if<__is_swappable<_Tp>::value>::type 6242: swap(_Tp (&__a)[_Nm], _Tp (&__b)[_Nm]) 6242: noexcept(__is_nothrow_swappable<_Tp>::value); 6242: 6242: namespace __swappable_details { 6242: using std::swap; 6242: 6242: struct __do_is_swappable_impl 6242: { 6242: template(), std::declval<_Tp&>()))> 6242: static true_type __test(int); 6242: 6242: template 6242: static false_type __test(...); 6242: }; 6242: 6242: struct __do_is_nothrow_swappable_impl 6242: { 6242: template 6242: static __bool_constant< 6242: noexcept(swap(std::declval<_Tp&>(), std::declval<_Tp&>())) 6242: > __test(int); 6242: 6242: template 6242: static false_type __test(...); 6242: }; 6242: 6242: } 6242: 6242: template 6242: struct __is_swappable_impl 6242: : public __swappable_details::__do_is_swappable_impl 6242: { 6242: typedef decltype(__test<_Tp>(0)) type; 6242: }; 6242: 6242: template 6242: struct __is_nothrow_swappable_impl 6242: : public __swappable_details::__do_is_nothrow_swappable_impl 6242: { 6242: typedef decltype(__test<_Tp>(0)) type; 6242: }; 6242: 6242: template 6242: struct __is_swappable 6242: : public __is_swappable_impl<_Tp>::type 6242: { }; 6242: 6242: template 6242: struct __is_nothrow_swappable 6242: : public __is_nothrow_swappable_impl<_Tp>::type 6242: { }; 6242: 6242: 6242: 6242: 6242: 6242: 6242: template 6242: struct is_swappable 6242: : public __is_swappable_impl<_Tp>::type 6242: { }; 6242: 6242: 6242: template 6242: struct is_nothrow_swappable 6242: : public __is_nothrow_swappable_impl<_Tp>::type 6242: { }; 6242: # 2499 "/usr/include/c++/8/type_traits" 3 6242: namespace __swappable_with_details { 6242: using std::swap; 6242: 6242: struct __do_is_swappable_with_impl 6242: { 6242: template(), std::declval<_Up>())), 6242: typename 6242: = decltype(swap(std::declval<_Up>(), std::declval<_Tp>()))> 6242: static true_type __test(int); 6242: 6242: template 6242: static false_type __test(...); 6242: }; 6242: 6242: struct __do_is_nothrow_swappable_with_impl 6242: { 6242: template 6242: static __bool_constant< 6242: noexcept(swap(std::declval<_Tp>(), std::declval<_Up>())) 6242: && 6242: noexcept(swap(std::declval<_Up>(), std::declval<_Tp>())) 6242: > __test(int); 6242: 6242: template 6242: static false_type __test(...); 6242: }; 6242: 6242: } 6242: 6242: template 6242: struct __is_swappable_with_impl 6242: : public __swappable_with_details::__do_is_swappable_with_impl 6242: { 6242: typedef decltype(__test<_Tp, _Up>(0)) type; 6242: }; 6242: 6242: 6242: template 6242: struct __is_swappable_with_impl<_Tp&, _Tp&> 6242: : public __swappable_details::__do_is_swappable_impl 6242: { 6242: typedef decltype(__test<_Tp&>(0)) type; 6242: }; 6242: 6242: template 6242: struct __is_nothrow_swappable_with_impl 6242: : public __swappable_with_details::__do_is_nothrow_swappable_with_impl 6242: { 6242: typedef decltype(__test<_Tp, _Up>(0)) type; 6242: }; 6242: 6242: 6242: template 6242: struct __is_nothrow_swappable_with_impl<_Tp&, _Tp&> 6242: : public __swappable_details::__do_is_nothrow_swappable_impl 6242: { 6242: typedef decltype(__test<_Tp&>(0)) type; 6242: }; 6242: 6242: 6242: template 6242: struct is_swappable_with 6242: : public __is_swappable_with_impl<_Tp, _Up>::type 6242: { }; 6242: 6242: 6242: template 6242: struct is_nothrow_swappable_with 6242: : public __is_nothrow_swappable_with_impl<_Tp, _Up>::type 6242: { }; 6242: # 2587 "/usr/include/c++/8/type_traits" 3 6242: template 6242: struct __is_invocable_impl : false_type { }; 6242: 6242: template 6242: struct __is_invocable_impl<_Result, _Ret, __void_t> 6242: : __or_, is_convertible>::type 6242: { }; 6242: 6242: template 6242: struct __is_invocable 6242: : __is_invocable_impl<__invoke_result<_Fn, _ArgTypes...>, void>::type 6242: { }; 6242: 6242: template 6242: constexpr bool __call_is_nt(__invoke_memfun_ref) 6242: { 6242: using _Up = typename __inv_unwrap<_Tp>::type; 6242: return noexcept((std::declval<_Up>().*std::declval<_Fn>())( 6242: std::declval<_Args>()...)); 6242: } 6242: 6242: template 6242: constexpr bool __call_is_nt(__invoke_memfun_deref) 6242: { 6242: return noexcept(((*std::declval<_Tp>()).*std::declval<_Fn>())( 6242: std::declval<_Args>()...)); 6242: } 6242: 6242: template 6242: constexpr bool __call_is_nt(__invoke_memobj_ref) 6242: { 6242: using _Up = typename __inv_unwrap<_Tp>::type; 6242: return noexcept(std::declval<_Up>().*std::declval<_Fn>()); 6242: } 6242: 6242: template 6242: constexpr bool __call_is_nt(__invoke_memobj_deref) 6242: { 6242: return noexcept((*std::declval<_Tp>()).*std::declval<_Fn>()); 6242: } 6242: 6242: template 6242: constexpr bool __call_is_nt(__invoke_other) 6242: { 6242: return noexcept(std::declval<_Fn>()(std::declval<_Args>()...)); 6242: } 6242: 6242: template 6242: struct __call_is_nothrow 6242: : __bool_constant< 6242: std::__call_is_nt<_Fn, _Args...>(typename _Result::__invoke_type{}) 6242: > 6242: { }; 6242: 6242: template 6242: using __call_is_nothrow_ 6242: = __call_is_nothrow<__invoke_result<_Fn, _Args...>, _Fn, _Args...>; 6242: 6242: 6242: template 6242: struct __is_nothrow_invocable 6242: : __and_<__is_invocable<_Fn, _Args...>, 6242: __call_is_nothrow_<_Fn, _Args...>>::type 6242: { }; 6242: 6242: struct __nonesuch { 6242: __nonesuch() = delete; 6242: ~__nonesuch() = delete; 6242: __nonesuch(__nonesuch const&) = delete; 6242: void operator=(__nonesuch const&) = delete; 6242: }; 6242: # 2943 "/usr/include/c++/8/type_traits" 3 6242: 6242: } 6242: # 56 "/usr/include/c++/8/bits/move.h" 2 3 6242: 6242: namespace std __attribute__ ((__visibility__ ("default"))) 6242: { 6242: 6242: # 72 "/usr/include/c++/8/bits/move.h" 3 6242: template 6242: constexpr _Tp&& 6242: forward(typename std::remove_reference<_Tp>::type& __t) noexcept 6242: { return static_cast<_Tp&&>(__t); } 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: template 6242: constexpr _Tp&& 6242: forward(typename std::remove_reference<_Tp>::type&& __t) noexcept 6242: { 6242: static_assert(!std::is_lvalue_reference<_Tp>::value, "template argument" 6242: " substituting _Tp is an lvalue reference type"); 6242: return static_cast<_Tp&&>(__t); 6242: } 6242: 6242: 6242: 6242: 6242: 6242: 6242: template 6242: constexpr typename std::remove_reference<_Tp>::type&& 6242: move(_Tp&& __t) noexcept 6242: { return static_cast::type&&>(__t); } 6242: 6242: 6242: template 6242: struct __move_if_noexcept_cond 6242: : public __and_<__not_>, 6242: is_copy_constructible<_Tp>>::type { }; 6242: # 116 "/usr/include/c++/8/bits/move.h" 3 6242: template 6242: constexpr typename 6242: conditional<__move_if_noexcept_cond<_Tp>::value, const _Tp&, _Tp&&>::type 6242: move_if_noexcept(_Tp& __x) noexcept 6242: { return std::move(__x); } 6242: # 136 "/usr/include/c++/8/bits/move.h" 3 6242: template 6242: inline _Tp* 6242: addressof(_Tp& __r) noexcept 6242: { return std::__addressof(__r); } 6242: 6242: 6242: 6242: template 6242: const _Tp* addressof(const _Tp&&) = delete; 6242: 6242: 6242: template 6242: inline _Tp 6242: __exchange(_Tp& __obj, _Up&& __new_val) 6242: { 6242: _Tp __old_val = std::move(__obj); 6242: __obj = std::forward<_Up>(__new_val); 6242: return __old_val; 6242: } 6242: # 176 "/usr/include/c++/8/bits/move.h" 3 6242: template 6242: inline 6242: 6242: typename enable_if<__and_<__not_<__is_tuple_like<_Tp>>, 6242: is_move_constructible<_Tp>, 6242: is_move_assignable<_Tp>>::value>::type 6242: swap(_Tp& __a, _Tp& __b) 6242: noexcept(__and_, 6242: is_nothrow_move_assignable<_Tp>>::value) 6242: 6242: 6242: 6242: 6242: { 6242: 6242: 6242: 6242: _Tp __tmp = std::move(__a); 6242: __a = std::move(__b); 6242: __b = std::move(__tmp); 6242: } 6242: 6242: 6242: 6242: 6242: template 6242: inline 6242: 6242: typename enable_if<__is_swappable<_Tp>::value>::type 6242: swap(_Tp (&__a)[_Nm], _Tp (&__b)[_Nm]) 6242: noexcept(__is_nothrow_swappable<_Tp>::value) 6242: 6242: 6242: 6242: 6242: { 6242: for (size_t __n = 0; __n < _Nm; ++__n) 6242: swap(__a[__n], __b[__n]); 6242: } 6242: 6242: 6242: 6242: } 6242: # 60 "/usr/include/c++/8/bits/stl_pair.h" 2 3 6242: 6242: 6242: 6242: 6242: 6242: namespace std __attribute__ ((__visibility__ ("default"))) 6242: { 6242: 6242: # 76 "/usr/include/c++/8/bits/stl_pair.h" 3 6242: struct piecewise_construct_t { explicit piecewise_construct_t() = default; }; 6242: 6242: 6242: constexpr piecewise_construct_t piecewise_construct = 6242: piecewise_construct_t(); 6242: 6242: 6242: template 6242: class tuple; 6242: 6242: template 6242: struct _Index_tuple; 6242: 6242: 6242: 6242: 6242: 6242: 6242: template 6242: struct _PCC 6242: { 6242: template 6242: static constexpr bool _ConstructiblePair() 6242: { 6242: return __and_, 6242: is_constructible<_T2, const _U2&>>::value; 6242: } 6242: 6242: template 6242: static constexpr bool _ImplicitlyConvertiblePair() 6242: { 6242: return __and_, 6242: is_convertible>::value; 6242: } 6242: 6242: template 6242: static constexpr bool _MoveConstructiblePair() 6242: { 6242: return __and_, 6242: is_constructible<_T2, _U2&&>>::value; 6242: } 6242: 6242: template 6242: static constexpr bool _ImplicitlyMoveConvertiblePair() 6242: { 6242: return __and_, 6242: is_convertible<_U2&&, _T2>>::value; 6242: } 6242: 6242: template 6242: static constexpr bool _CopyMovePair() 6242: { 6242: using __do_converts = __and_, 6242: is_convertible<_U2&&, _T2>>; 6242: using __converts = typename conditional<__implicit, 6242: __do_converts, 6242: __not_<__do_converts>>::type; 6242: return __and_, 6242: is_constructible<_T2, _U2&&>, 6242: __converts 6242: >::value; 6242: } 6242: 6242: template 6242: static constexpr bool _MoveCopyPair() 6242: { 6242: using __do_converts = __and_, 6242: is_convertible>; 6242: using __converts = typename conditional<__implicit, 6242: __do_converts, 6242: __not_<__do_converts>>::type; 6242: return __and_, 6242: is_constructible<_T2, const _U2&&>, 6242: __converts 6242: >::value; 6242: } 6242: }; 6242: 6242: template 6242: struct _PCC 6242: { 6242: template 6242: static constexpr bool _ConstructiblePair() 6242: { 6242: return false; 6242: } 6242: 6242: template 6242: static constexpr bool _ImplicitlyConvertiblePair() 6242: { 6242: return false; 6242: } 6242: 6242: template 6242: static constexpr bool _MoveConstructiblePair() 6242: { 6242: return false; 6242: } 6242: 6242: template 6242: static constexpr bool _ImplicitlyMoveConvertiblePair() 6242: { 6242: return false; 6242: } 6242: }; 6242: 6242: 6242: 6242: 6242: struct __nonesuch_no_braces : std::__nonesuch { 6242: explicit __nonesuch_no_braces(const __nonesuch&) = delete; 6242: }; 6242: # 197 "/usr/include/c++/8/bits/stl_pair.h" 3 6242: template 6242: struct pair 6242: { 6242: typedef _T1 first_type; 6242: typedef _T2 second_type; 6242: 6242: _T1 first; 6242: _T2 second; 6242: 6242: 6242: 6242: 6242: 6242: 6242: template , 6242: __is_implicitly_default_constructible<_U2>> 6242: ::value, bool>::type = true> 6242: 6242: constexpr pair() 6242: : first(), second() { } 6242: 6242: 6242: template , 6242: is_default_constructible<_U2>, 6242: __not_< 6242: __and_<__is_implicitly_default_constructible<_U1>, 6242: __is_implicitly_default_constructible<_U2>>>> 6242: ::value, bool>::type = false> 6242: explicit constexpr pair() 6242: : first(), second() { } 6242: # 241 "/usr/include/c++/8/bits/stl_pair.h" 3 6242: using _PCCP = _PCC; 6242: 6242: template() 6242: && _PCCP::template 6242: _ImplicitlyConvertiblePair<_U1, _U2>(), 6242: bool>::type=true> 6242: constexpr pair(const _T1& __a, const _T2& __b) 6242: : first(__a), second(__b) { } 6242: 6242: template() 6242: && !_PCCP::template 6242: _ImplicitlyConvertiblePair<_U1, _U2>(), 6242: bool>::type=false> 6242: explicit constexpr pair(const _T1& __a, const _T2& __b) 6242: : first(__a), second(__b) { } 6242: # 269 "/usr/include/c++/8/bits/stl_pair.h" 3 6242: template 6242: using _PCCFP = _PCC::value 6242: || !is_same<_T2, _U2>::value, 6242: _T1, _T2>; 6242: 6242: template::template 6242: _ConstructiblePair<_U1, _U2>() 6242: && _PCCFP<_U1, _U2>::template 6242: _ImplicitlyConvertiblePair<_U1, _U2>(), 6242: bool>::type=true> 6242: constexpr pair(const pair<_U1, _U2>& __p) 6242: : first(__p.first), second(__p.second) { } 6242: 6242: template::template 6242: _ConstructiblePair<_U1, _U2>() 6242: && !_PCCFP<_U1, _U2>::template 6242: _ImplicitlyConvertiblePair<_U1, _U2>(), 6242: bool>::type=false> 6242: explicit constexpr pair(const pair<_U1, _U2>& __p) 6242: : first(__p.first), second(__p.second) { } 6242: 6242: constexpr pair(const pair&) = default; 6242: constexpr pair(pair&&) = default; 6242: 6242: 6242: template(), 6242: bool>::type=true> 6242: constexpr pair(_U1&& __x, const _T2& __y) 6242: : first(std::forward<_U1>(__x)), second(__y) { } 6242: 6242: template(), 6242: bool>::type=false> 6242: explicit constexpr pair(_U1&& __x, const _T2& __y) 6242: : first(std::forward<_U1>(__x)), second(__y) { } 6242: 6242: template(), 6242: bool>::type=true> 6242: constexpr pair(const _T1& __x, _U2&& __y) 6242: : first(__x), second(std::forward<_U2>(__y)) { } 6242: 6242: template(), 6242: bool>::type=false> 6242: explicit pair(const _T1& __x, _U2&& __y) 6242: : first(__x), second(std::forward<_U2>(__y)) { } 6242: 6242: template() 6242: && _PCCP::template 6242: _ImplicitlyMoveConvertiblePair<_U1, _U2>(), 6242: bool>::type=true> 6242: constexpr pair(_U1&& __x, _U2&& __y) 6242: : first(std::forward<_U1>(__x)), second(std::forward<_U2>(__y)) { } 6242: 6242: template() 6242: && !_PCCP::template 6242: _ImplicitlyMoveConvertiblePair<_U1, _U2>(), 6242: bool>::type=false> 6242: explicit constexpr pair(_U1&& __x, _U2&& __y) 6242: : first(std::forward<_U1>(__x)), second(std::forward<_U2>(__y)) { } 6242: 6242: 6242: template::template 6242: _MoveConstructiblePair<_U1, _U2>() 6242: && _PCCFP<_U1, _U2>::template 6242: _ImplicitlyMoveConvertiblePair<_U1, _U2>(), 6242: bool>::type=true> 6242: constexpr pair(pair<_U1, _U2>&& __p) 6242: : first(std::forward<_U1>(__p.first)), 6242: second(std::forward<_U2>(__p.second)) { } 6242: 6242: template::template 6242: _MoveConstructiblePair<_U1, _U2>() 6242: && !_PCCFP<_U1, _U2>::template 6242: _ImplicitlyMoveConvertiblePair<_U1, _U2>(), 6242: bool>::type=false> 6242: explicit constexpr pair(pair<_U1, _U2>&& __p) 6242: : first(std::forward<_U1>(__p.first)), 6242: second(std::forward<_U2>(__p.second)) { } 6242: 6242: template 6242: pair(piecewise_construct_t, tuple<_Args1...>, tuple<_Args2...>); 6242: 6242: pair& 6242: operator=(typename conditional< 6242: __and_, 6242: is_copy_assignable<_T2>>::value, 6242: const pair&, const __nonesuch_no_braces&>::type __p) 6242: { 6242: first = __p.first; 6242: second = __p.second; 6242: return *this; 6242: } 6242: 6242: pair& 6242: operator=(typename conditional< 6242: __not_<__and_, 6242: is_copy_assignable<_T2>>>::value, 6242: const pair&, const __nonesuch_no_braces&>::type __p) = delete; 6242: 6242: pair& 6242: operator=(typename conditional< 6242: __and_, 6242: is_move_assignable<_T2>>::value, 6242: pair&&, __nonesuch_no_braces&&>::type __p) 6242: noexcept(__and_, 6242: is_nothrow_move_assignable<_T2>>::value) 6242: { 6242: first = std::forward(__p.first); 6242: second = std::forward(__p.second); 6242: return *this; 6242: } 6242: 6242: template 6242: typename enable_if<__and_, 6242: is_assignable<_T2&, const _U2&>>::value, 6242: pair&>::type 6242: operator=(const pair<_U1, _U2>& __p) 6242: { 6242: first = __p.first; 6242: second = __p.second; 6242: return *this; 6242: } 6242: 6242: template 6242: typename enable_if<__and_, 6242: is_assignable<_T2&, _U2&&>>::value, 6242: pair&>::type 6242: operator=(pair<_U1, _U2>&& __p) 6242: { 6242: first = std::forward<_U1>(__p.first); 6242: second = std::forward<_U2>(__p.second); 6242: return *this; 6242: } 6242: 6242: void 6242: swap(pair& __p) 6242: noexcept(__and_<__is_nothrow_swappable<_T1>, 6242: __is_nothrow_swappable<_T2>>::value) 6242: { 6242: using std::swap; 6242: swap(first, __p.first); 6242: swap(second, __p.second); 6242: } 6242: 6242: private: 6242: template 6242: pair(tuple<_Args1...>&, tuple<_Args2...>&, 6242: _Index_tuple<_Indexes1...>, _Index_tuple<_Indexes2...>); 6242: 6242: }; 6242: 6242: 6242: 6242: 6242: 6242: 6242: template 6242: inline constexpr bool 6242: operator==(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) 6242: { return __x.first == __y.first && __x.second == __y.second; } 6242: 6242: 6242: template 6242: inline constexpr bool 6242: operator<(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) 6242: { return __x.first < __y.first 6242: || (!(__y.first < __x.first) && __x.second < __y.second); } 6242: 6242: 6242: template 6242: inline constexpr bool 6242: operator!=(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) 6242: { return !(__x == __y); } 6242: 6242: 6242: template 6242: inline constexpr bool 6242: operator>(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) 6242: { return __y < __x; } 6242: 6242: 6242: template 6242: inline constexpr bool 6242: operator<=(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) 6242: { return !(__y < __x); } 6242: 6242: 6242: template 6242: inline constexpr bool 6242: operator>=(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) 6242: { return !(__x < __y); } 6242: 6242: 6242: 6242: 6242: 6242: template 6242: inline 6242: 6242: 6242: typename enable_if<__and_<__is_swappable<_T1>, 6242: __is_swappable<_T2>>::value>::type 6242: 6242: 6242: 6242: swap(pair<_T1, _T2>& __x, pair<_T1, _T2>& __y) 6242: noexcept(noexcept(__x.swap(__y))) 6242: { __x.swap(__y); } 6242: 6242: 6242: template 6242: typename enable_if, 6242: __is_swappable<_T2>>::value>::type 6242: swap(pair<_T1, _T2>&, pair<_T1, _T2>&) = delete; 6242: # 516 "/usr/include/c++/8/bits/stl_pair.h" 3 6242: template 6242: constexpr pair::__type, 6242: typename __decay_and_strip<_T2>::__type> 6242: make_pair(_T1&& __x, _T2&& __y) 6242: { 6242: typedef typename __decay_and_strip<_T1>::__type __ds_type1; 6242: typedef typename __decay_and_strip<_T2>::__type __ds_type2; 6242: typedef pair<__ds_type1, __ds_type2> __pair_type; 6242: return __pair_type(std::forward<_T1>(__x), std::forward<_T2>(__y)); 6242: } 6242: # 535 "/usr/include/c++/8/bits/stl_pair.h" 3 6242: 6242: } 6242: # 65 "/usr/include/c++/8/bits/stl_algobase.h" 2 3 6242: # 1 "/usr/include/c++/8/bits/stl_iterator_base_types.h" 1 3 6242: # 62 "/usr/include/c++/8/bits/stl_iterator_base_types.h" 3 6242: 6242: # 63 "/usr/include/c++/8/bits/stl_iterator_base_types.h" 3 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: namespace std __attribute__ ((__visibility__ ("default"))) 6242: { 6242: 6242: # 89 "/usr/include/c++/8/bits/stl_iterator_base_types.h" 3 6242: struct input_iterator_tag { }; 6242: 6242: 6242: struct output_iterator_tag { }; 6242: 6242: 6242: struct forward_iterator_tag : public input_iterator_tag { }; 6242: 6242: 6242: 6242: struct bidirectional_iterator_tag : public forward_iterator_tag { }; 6242: 6242: 6242: 6242: struct random_access_iterator_tag : public bidirectional_iterator_tag { }; 6242: # 116 "/usr/include/c++/8/bits/stl_iterator_base_types.h" 3 6242: template 6242: struct iterator 6242: { 6242: 6242: typedef _Category iterator_category; 6242: 6242: typedef _Tp value_type; 6242: 6242: typedef _Distance difference_type; 6242: 6242: typedef _Pointer pointer; 6242: 6242: typedef _Reference reference; 6242: }; 6242: # 143 "/usr/include/c++/8/bits/stl_iterator_base_types.h" 3 6242: template> 6242: struct __iterator_traits { }; 6242: 6242: template 6242: struct __iterator_traits<_Iterator, 6242: __void_t> 6242: { 6242: typedef typename _Iterator::iterator_category iterator_category; 6242: typedef typename _Iterator::value_type value_type; 6242: typedef typename _Iterator::difference_type difference_type; 6242: typedef typename _Iterator::pointer pointer; 6242: typedef typename _Iterator::reference reference; 6242: }; 6242: 6242: template 6242: struct iterator_traits 6242: : public __iterator_traits<_Iterator> { }; 6242: # 177 "/usr/include/c++/8/bits/stl_iterator_base_types.h" 3 6242: template 6242: struct iterator_traits<_Tp*> 6242: { 6242: typedef random_access_iterator_tag iterator_category; 6242: typedef _Tp value_type; 6242: typedef ptrdiff_t difference_type; 6242: typedef _Tp* pointer; 6242: typedef _Tp& reference; 6242: }; 6242: 6242: 6242: template 6242: struct iterator_traits 6242: { 6242: typedef random_access_iterator_tag iterator_category; 6242: typedef _Tp value_type; 6242: typedef ptrdiff_t difference_type; 6242: typedef const _Tp* pointer; 6242: typedef const _Tp& reference; 6242: }; 6242: 6242: 6242: 6242: 6242: 6242: template 6242: inline constexpr 6242: typename iterator_traits<_Iter>::iterator_category 6242: __iterator_category(const _Iter&) 6242: { return typename iterator_traits<_Iter>::iterator_category(); } 6242: # 231 "/usr/include/c++/8/bits/stl_iterator_base_types.h" 3 6242: template 6242: using _RequireInputIter = typename 6242: enable_if::iterator_category, 6242: input_iterator_tag>::value>::type; 6242: 6242: 6242: 6242: } 6242: # 66 "/usr/include/c++/8/bits/stl_algobase.h" 2 3 6242: # 1 "/usr/include/c++/8/bits/stl_iterator_base_funcs.h" 1 3 6242: # 62 "/usr/include/c++/8/bits/stl_iterator_base_funcs.h" 3 6242: 6242: # 63 "/usr/include/c++/8/bits/stl_iterator_base_funcs.h" 3 6242: 6242: 6242: # 1 "/usr/include/c++/8/debug/assertions.h" 1 3 6242: # 66 "/usr/include/c++/8/bits/stl_iterator_base_funcs.h" 2 3 6242: 6242: namespace std __attribute__ ((__visibility__ ("default"))) 6242: { 6242: 6242: 6242: 6242: 6242: template struct _List_iterator; 6242: template struct _List_const_iterator; 6242: 6242: 6242: template 6242: inline 6242: typename iterator_traits<_InputIterator>::difference_type 6242: __distance(_InputIterator __first, _InputIterator __last, 6242: input_iterator_tag) 6242: { 6242: 6242: 6242: 6242: typename iterator_traits<_InputIterator>::difference_type __n = 0; 6242: while (__first != __last) 6242: { 6242: ++__first; 6242: ++__n; 6242: } 6242: return __n; 6242: } 6242: 6242: template 6242: inline 6242: typename iterator_traits<_RandomAccessIterator>::difference_type 6242: __distance(_RandomAccessIterator __first, _RandomAccessIterator __last, 6242: random_access_iterator_tag) 6242: { 6242: 6242: 6242: 6242: return __last - __first; 6242: } 6242: 6242: 6242: 6242: template 6242: ptrdiff_t 6242: __distance(std::_List_iterator<_Tp>, 6242: std::_List_iterator<_Tp>, 6242: input_iterator_tag); 6242: 6242: template 6242: ptrdiff_t 6242: __distance(std::_List_const_iterator<_Tp>, 6242: std::_List_const_iterator<_Tp>, 6242: input_iterator_tag); 6242: # 135 "/usr/include/c++/8/bits/stl_iterator_base_funcs.h" 3 6242: template 6242: inline 6242: typename iterator_traits<_InputIterator>::difference_type 6242: distance(_InputIterator __first, _InputIterator __last) 6242: { 6242: 6242: return std::__distance(__first, __last, 6242: std::__iterator_category(__first)); 6242: } 6242: 6242: template 6242: inline void 6242: __advance(_InputIterator& __i, _Distance __n, input_iterator_tag) 6242: { 6242: 6242: 6242: ; 6242: while (__n--) 6242: ++__i; 6242: } 6242: 6242: template 6242: inline void 6242: __advance(_BidirectionalIterator& __i, _Distance __n, 6242: bidirectional_iterator_tag) 6242: { 6242: 6242: 6242: 6242: if (__n > 0) 6242: while (__n--) 6242: ++__i; 6242: else 6242: while (__n++) 6242: --__i; 6242: } 6242: 6242: template 6242: inline void 6242: __advance(_RandomAccessIterator& __i, _Distance __n, 6242: random_access_iterator_tag) 6242: { 6242: 6242: 6242: 6242: if (__builtin_constant_p(__n) && __n == 1) 6242: ++__i; 6242: else if (__builtin_constant_p(__n) && __n == -1) 6242: --__i; 6242: else 6242: __i += __n; 6242: } 6242: # 200 "/usr/include/c++/8/bits/stl_iterator_base_funcs.h" 3 6242: template 6242: inline void 6242: advance(_InputIterator& __i, _Distance __n) 6242: { 6242: 6242: typename iterator_traits<_InputIterator>::difference_type __d = __n; 6242: std::__advance(__i, __d, std::__iterator_category(__i)); 6242: } 6242: 6242: 6242: 6242: template 6242: inline _InputIterator 6242: next(_InputIterator __x, typename 6242: iterator_traits<_InputIterator>::difference_type __n = 1) 6242: { 6242: 6242: 6242: std::advance(__x, __n); 6242: return __x; 6242: } 6242: 6242: template 6242: inline _BidirectionalIterator 6242: prev(_BidirectionalIterator __x, typename 6242: iterator_traits<_BidirectionalIterator>::difference_type __n = 1) 6242: { 6242: 6242: 6242: 6242: std::advance(__x, -__n); 6242: return __x; 6242: } 6242: 6242: 6242: 6242: 6242: } 6242: # 67 "/usr/include/c++/8/bits/stl_algobase.h" 2 3 6242: # 1 "/usr/include/c++/8/bits/stl_iterator.h" 1 3 6242: # 66 "/usr/include/c++/8/bits/stl_iterator.h" 3 6242: # 1 "/usr/include/c++/8/bits/ptr_traits.h" 1 3 6242: # 37 "/usr/include/c++/8/bits/ptr_traits.h" 3 6242: namespace std __attribute__ ((__visibility__ ("default"))) 6242: { 6242: 6242: 6242: class __undefined; 6242: 6242: 6242: template 6242: struct __get_first_arg 6242: { using type = __undefined; }; 6242: 6242: template class _Template, typename _Tp, 6242: typename... _Types> 6242: struct __get_first_arg<_Template<_Tp, _Types...>> 6242: { using type = _Tp; }; 6242: 6242: template 6242: using __get_first_arg_t = typename __get_first_arg<_Tp>::type; 6242: 6242: 6242: template 6242: struct __replace_first_arg 6242: { }; 6242: 6242: template class _Template, typename _Up, 6242: typename _Tp, typename... _Types> 6242: struct __replace_first_arg<_Template<_Tp, _Types...>, _Up> 6242: { using type = _Template<_Up, _Types...>; }; 6242: 6242: template 6242: using __replace_first_arg_t = typename __replace_first_arg<_Tp, _Up>::type; 6242: 6242: template 6242: using __make_not_void 6242: = typename conditional::value, __undefined, _Tp>::type; 6242: 6242: 6242: 6242: 6242: 6242: template 6242: struct pointer_traits 6242: { 6242: private: 6242: template 6242: using __element_type = typename _Tp::element_type; 6242: 6242: template 6242: using __difference_type = typename _Tp::difference_type; 6242: 6242: template 6242: struct __rebind : __replace_first_arg<_Tp, _Up> { }; 6242: 6242: template 6242: struct __rebind<_Tp, _Up, __void_t>> 6242: { using type = typename _Tp::template rebind<_Up>; }; 6242: 6242: public: 6242: 6242: using pointer = _Ptr; 6242: 6242: 6242: using element_type 6242: = __detected_or_t<__get_first_arg_t<_Ptr>, __element_type, _Ptr>; 6242: 6242: 6242: using difference_type 6242: = __detected_or_t; 6242: 6242: 6242: template 6242: using rebind = typename __rebind<_Ptr, _Up>::type; 6242: 6242: static _Ptr 6242: pointer_to(__make_not_void& __e) 6242: { return _Ptr::pointer_to(__e); } 6242: 6242: static_assert(!is_same::value, 6242: "pointer type defines element_type or is like SomePointer"); 6242: }; 6242: 6242: 6242: 6242: 6242: 6242: template 6242: struct pointer_traits<_Tp*> 6242: { 6242: 6242: typedef _Tp* pointer; 6242: 6242: typedef _Tp element_type; 6242: 6242: typedef ptrdiff_t difference_type; 6242: 6242: template 6242: using rebind = _Up*; 6242: 6242: 6242: 6242: 6242: 6242: 6242: static pointer 6242: pointer_to(__make_not_void& __r) noexcept 6242: { return std::addressof(__r); } 6242: }; 6242: 6242: 6242: template 6242: using __ptr_rebind = typename pointer_traits<_Ptr>::template rebind<_Tp>; 6242: 6242: template 6242: constexpr _Tp* 6242: __to_address(_Tp* __ptr) noexcept 6242: { 6242: static_assert(!std::is_function<_Tp>::value, "not a function pointer"); 6242: return __ptr; 6242: } 6242: 6242: 6242: template 6242: constexpr typename std::pointer_traits<_Ptr>::element_type* 6242: __to_address(const _Ptr& __ptr) 6242: { return std::__to_address(__ptr.operator->()); } 6242: # 198 "/usr/include/c++/8/bits/ptr_traits.h" 3 6242: 6242: } 6242: # 67 "/usr/include/c++/8/bits/stl_iterator.h" 2 3 6242: 6242: 6242: 6242: 6242: 6242: namespace std __attribute__ ((__visibility__ ("default"))) 6242: { 6242: 6242: # 100 "/usr/include/c++/8/bits/stl_iterator.h" 3 6242: template 6242: class reverse_iterator 6242: : public iterator::iterator_category, 6242: typename iterator_traits<_Iterator>::value_type, 6242: typename iterator_traits<_Iterator>::difference_type, 6242: typename iterator_traits<_Iterator>::pointer, 6242: typename iterator_traits<_Iterator>::reference> 6242: { 6242: protected: 6242: _Iterator current; 6242: 6242: typedef iterator_traits<_Iterator> __traits_type; 6242: 6242: public: 6242: typedef _Iterator iterator_type; 6242: typedef typename __traits_type::difference_type difference_type; 6242: typedef typename __traits_type::pointer pointer; 6242: typedef typename __traits_type::reference reference; 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: reverse_iterator() : current() { } 6242: 6242: 6242: 6242: 6242: explicit 6242: reverse_iterator(iterator_type __x) : current(__x) { } 6242: 6242: 6242: 6242: 6242: 6242: reverse_iterator(const reverse_iterator& __x) 6242: : current(__x.current) { } 6242: 6242: 6242: 6242: 6242: 6242: template 6242: 6242: reverse_iterator(const reverse_iterator<_Iter>& __x) 6242: : current(__x.base()) { } 6242: 6242: 6242: 6242: 6242: iterator_type 6242: base() const 6242: { return current; } 6242: # 167 "/usr/include/c++/8/bits/stl_iterator.h" 3 6242: reference 6242: operator*() const 6242: { 6242: _Iterator __tmp = current; 6242: return *--__tmp; 6242: } 6242: 6242: 6242: 6242: 6242: 6242: 6242: pointer 6242: operator->() const 6242: { return &(operator*()); } 6242: 6242: 6242: 6242: 6242: 6242: 6242: reverse_iterator& 6242: operator++() 6242: { 6242: --current; 6242: return *this; 6242: } 6242: 6242: 6242: 6242: 6242: 6242: 6242: reverse_iterator 6242: operator++(int) 6242: { 6242: reverse_iterator __tmp = *this; 6242: --current; 6242: return __tmp; 6242: } 6242: 6242: 6242: 6242: 6242: 6242: 6242: reverse_iterator& 6242: operator--() 6242: { 6242: ++current; 6242: return *this; 6242: } 6242: 6242: 6242: 6242: 6242: 6242: 6242: reverse_iterator 6242: operator--(int) 6242: { 6242: reverse_iterator __tmp = *this; 6242: ++current; 6242: return __tmp; 6242: } 6242: 6242: 6242: 6242: 6242: 6242: 6242: reverse_iterator 6242: operator+(difference_type __n) const 6242: { return reverse_iterator(current - __n); } 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: reverse_iterator& 6242: operator+=(difference_type __n) 6242: { 6242: current -= __n; 6242: return *this; 6242: } 6242: 6242: 6242: 6242: 6242: 6242: 6242: reverse_iterator 6242: operator-(difference_type __n) const 6242: { return reverse_iterator(current + __n); } 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: reverse_iterator& 6242: operator-=(difference_type __n) 6242: { 6242: current += __n; 6242: return *this; 6242: } 6242: 6242: 6242: 6242: 6242: 6242: 6242: reference 6242: operator[](difference_type __n) const 6242: { return *(*this + __n); } 6242: }; 6242: # 297 "/usr/include/c++/8/bits/stl_iterator.h" 3 6242: template 6242: inline bool 6242: operator==(const reverse_iterator<_Iterator>& __x, 6242: const reverse_iterator<_Iterator>& __y) 6242: { return __x.base() == __y.base(); } 6242: 6242: template 6242: inline bool 6242: operator<(const reverse_iterator<_Iterator>& __x, 6242: const reverse_iterator<_Iterator>& __y) 6242: { return __y.base() < __x.base(); } 6242: 6242: template 6242: inline bool 6242: operator!=(const reverse_iterator<_Iterator>& __x, 6242: const reverse_iterator<_Iterator>& __y) 6242: { return !(__x == __y); } 6242: 6242: template 6242: inline bool 6242: operator>(const reverse_iterator<_Iterator>& __x, 6242: const reverse_iterator<_Iterator>& __y) 6242: { return __y < __x; } 6242: 6242: template 6242: inline bool 6242: operator<=(const reverse_iterator<_Iterator>& __x, 6242: const reverse_iterator<_Iterator>& __y) 6242: { return !(__y < __x); } 6242: 6242: template 6242: inline bool 6242: operator>=(const reverse_iterator<_Iterator>& __x, 6242: const reverse_iterator<_Iterator>& __y) 6242: { return !(__x < __y); } 6242: 6242: 6242: 6242: template 6242: inline bool 6242: operator==(const reverse_iterator<_IteratorL>& __x, 6242: const reverse_iterator<_IteratorR>& __y) 6242: { return __x.base() == __y.base(); } 6242: 6242: template 6242: inline bool 6242: operator<(const reverse_iterator<_IteratorL>& __x, 6242: const reverse_iterator<_IteratorR>& __y) 6242: { return __y.base() < __x.base(); } 6242: 6242: template 6242: inline bool 6242: operator!=(const reverse_iterator<_IteratorL>& __x, 6242: const reverse_iterator<_IteratorR>& __y) 6242: { return !(__x == __y); } 6242: 6242: template 6242: inline bool 6242: operator>(const reverse_iterator<_IteratorL>& __x, 6242: const reverse_iterator<_IteratorR>& __y) 6242: { return __y < __x; } 6242: 6242: template 6242: inline bool 6242: operator<=(const reverse_iterator<_IteratorL>& __x, 6242: const reverse_iterator<_IteratorR>& __y) 6242: { return !(__y < __x); } 6242: 6242: template 6242: inline bool 6242: operator>=(const reverse_iterator<_IteratorL>& __x, 6242: const reverse_iterator<_IteratorR>& __y) 6242: { return !(__x < __y); } 6242: # 387 "/usr/include/c++/8/bits/stl_iterator.h" 3 6242: template 6242: inline auto 6242: operator-(const reverse_iterator<_IteratorL>& __x, 6242: const reverse_iterator<_IteratorR>& __y) 6242: -> decltype(__y.base() - __x.base()) 6242: { return __y.base() - __x.base(); } 6242: 6242: 6242: template 6242: inline reverse_iterator<_Iterator> 6242: operator+(typename reverse_iterator<_Iterator>::difference_type __n, 6242: const reverse_iterator<_Iterator>& __x) 6242: { return reverse_iterator<_Iterator>(__x.base() - __n); } 6242: 6242: 6242: 6242: template 6242: inline reverse_iterator<_Iterator> 6242: __make_reverse_iterator(_Iterator __i) 6242: { return reverse_iterator<_Iterator>(__i); } 6242: # 422 "/usr/include/c++/8/bits/stl_iterator.h" 3 6242: template 6242: auto 6242: __niter_base(reverse_iterator<_Iterator> __it) 6242: -> decltype(__make_reverse_iterator(__niter_base(__it.base()))) 6242: { return __make_reverse_iterator(__niter_base(__it.base())); } 6242: 6242: template 6242: struct __is_move_iterator > 6242: : __is_move_iterator<_Iterator> 6242: { }; 6242: 6242: template 6242: auto 6242: __miter_base(reverse_iterator<_Iterator> __it) 6242: -> decltype(__make_reverse_iterator(__miter_base(__it.base()))) 6242: { return __make_reverse_iterator(__miter_base(__it.base())); } 6242: # 451 "/usr/include/c++/8/bits/stl_iterator.h" 3 6242: template 6242: class back_insert_iterator 6242: : public iterator 6242: { 6242: protected: 6242: _Container* container; 6242: 6242: public: 6242: 6242: typedef _Container container_type; 6242: 6242: 6242: explicit 6242: back_insert_iterator(_Container& __x) 6242: : container(std::__addressof(__x)) { } 6242: # 486 "/usr/include/c++/8/bits/stl_iterator.h" 3 6242: back_insert_iterator& 6242: operator=(const typename _Container::value_type& __value) 6242: { 6242: container->push_back(__value); 6242: return *this; 6242: } 6242: 6242: back_insert_iterator& 6242: operator=(typename _Container::value_type&& __value) 6242: { 6242: container->push_back(std::move(__value)); 6242: return *this; 6242: } 6242: 6242: 6242: 6242: back_insert_iterator& 6242: operator*() 6242: { return *this; } 6242: 6242: 6242: back_insert_iterator& 6242: operator++() 6242: { return *this; } 6242: 6242: 6242: back_insert_iterator 6242: operator++(int) 6242: { return *this; } 6242: }; 6242: # 528 "/usr/include/c++/8/bits/stl_iterator.h" 3 6242: template 6242: inline back_insert_iterator<_Container> 6242: back_inserter(_Container& __x) 6242: { return back_insert_iterator<_Container>(__x); } 6242: # 543 "/usr/include/c++/8/bits/stl_iterator.h" 3 6242: template 6242: class front_insert_iterator 6242: : public iterator 6242: { 6242: protected: 6242: _Container* container; 6242: 6242: public: 6242: 6242: typedef _Container container_type; 6242: 6242: 6242: explicit front_insert_iterator(_Container& __x) 6242: : container(std::__addressof(__x)) { } 6242: # 577 "/usr/include/c++/8/bits/stl_iterator.h" 3 6242: front_insert_iterator& 6242: operator=(const typename _Container::value_type& __value) 6242: { 6242: container->push_front(__value); 6242: return *this; 6242: } 6242: 6242: front_insert_iterator& 6242: operator=(typename _Container::value_type&& __value) 6242: { 6242: container->push_front(std::move(__value)); 6242: return *this; 6242: } 6242: 6242: 6242: 6242: front_insert_iterator& 6242: operator*() 6242: { return *this; } 6242: 6242: 6242: front_insert_iterator& 6242: operator++() 6242: { return *this; } 6242: 6242: 6242: front_insert_iterator 6242: operator++(int) 6242: { return *this; } 6242: }; 6242: # 619 "/usr/include/c++/8/bits/stl_iterator.h" 3 6242: template 6242: inline front_insert_iterator<_Container> 6242: front_inserter(_Container& __x) 6242: { return front_insert_iterator<_Container>(__x); } 6242: # 638 "/usr/include/c++/8/bits/stl_iterator.h" 3 6242: template 6242: class insert_iterator 6242: : public iterator 6242: { 6242: protected: 6242: _Container* container; 6242: typename _Container::iterator iter; 6242: 6242: public: 6242: 6242: typedef _Container container_type; 6242: 6242: 6242: 6242: 6242: 6242: insert_iterator(_Container& __x, typename _Container::iterator __i) 6242: : container(std::__addressof(__x)), iter(__i) {} 6242: # 689 "/usr/include/c++/8/bits/stl_iterator.h" 3 6242: insert_iterator& 6242: operator=(const typename _Container::value_type& __value) 6242: { 6242: iter = container->insert(iter, __value); 6242: ++iter; 6242: return *this; 6242: } 6242: 6242: insert_iterator& 6242: operator=(typename _Container::value_type&& __value) 6242: { 6242: iter = container->insert(iter, std::move(__value)); 6242: ++iter; 6242: return *this; 6242: } 6242: 6242: 6242: 6242: insert_iterator& 6242: operator*() 6242: { return *this; } 6242: 6242: 6242: insert_iterator& 6242: operator++() 6242: { return *this; } 6242: 6242: 6242: insert_iterator& 6242: operator++(int) 6242: { return *this; } 6242: }; 6242: # 734 "/usr/include/c++/8/bits/stl_iterator.h" 3 6242: template 6242: inline insert_iterator<_Container> 6242: inserter(_Container& __x, _Iterator __i) 6242: { 6242: return insert_iterator<_Container>(__x, 6242: typename _Container::iterator(__i)); 6242: } 6242: 6242: 6242: 6242: 6242: } 6242: 6242: namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) 6242: { 6242: 6242: # 758 "/usr/include/c++/8/bits/stl_iterator.h" 3 6242: using std::iterator_traits; 6242: using std::iterator; 6242: template 6242: class __normal_iterator 6242: { 6242: protected: 6242: _Iterator _M_current; 6242: 6242: typedef iterator_traits<_Iterator> __traits_type; 6242: 6242: public: 6242: typedef _Iterator iterator_type; 6242: typedef typename __traits_type::iterator_category iterator_category; 6242: typedef typename __traits_type::value_type value_type; 6242: typedef typename __traits_type::difference_type difference_type; 6242: typedef typename __traits_type::reference reference; 6242: typedef typename __traits_type::pointer pointer; 6242: 6242: constexpr __normal_iterator() noexcept 6242: : _M_current(_Iterator()) { } 6242: 6242: explicit 6242: __normal_iterator(const _Iterator& __i) noexcept 6242: : _M_current(__i) { } 6242: 6242: 6242: template 6242: __normal_iterator(const __normal_iterator<_Iter, 6242: typename __enable_if< 6242: (std::__are_same<_Iter, typename _Container::pointer>::__value), 6242: _Container>::__type>& __i) noexcept 6242: : _M_current(__i.base()) { } 6242: 6242: 6242: reference 6242: operator*() const noexcept 6242: { return *_M_current; } 6242: 6242: pointer 6242: operator->() const noexcept 6242: { return _M_current; } 6242: 6242: __normal_iterator& 6242: operator++() noexcept 6242: { 6242: ++_M_current; 6242: return *this; 6242: } 6242: 6242: __normal_iterator 6242: operator++(int) noexcept 6242: { return __normal_iterator(_M_current++); } 6242: 6242: 6242: __normal_iterator& 6242: operator--() noexcept 6242: { 6242: --_M_current; 6242: return *this; 6242: } 6242: 6242: __normal_iterator 6242: operator--(int) noexcept 6242: { return __normal_iterator(_M_current--); } 6242: 6242: 6242: reference 6242: operator[](difference_type __n) const noexcept 6242: { return _M_current[__n]; } 6242: 6242: __normal_iterator& 6242: operator+=(difference_type __n) noexcept 6242: { _M_current += __n; return *this; } 6242: 6242: __normal_iterator 6242: operator+(difference_type __n) const noexcept 6242: { return __normal_iterator(_M_current + __n); } 6242: 6242: __normal_iterator& 6242: operator-=(difference_type __n) noexcept 6242: { _M_current -= __n; return *this; } 6242: 6242: __normal_iterator 6242: operator-(difference_type __n) const noexcept 6242: { return __normal_iterator(_M_current - __n); } 6242: 6242: const _Iterator& 6242: base() const noexcept 6242: { return _M_current; } 6242: }; 6242: # 858 "/usr/include/c++/8/bits/stl_iterator.h" 3 6242: template 6242: inline bool 6242: operator==(const __normal_iterator<_IteratorL, _Container>& __lhs, 6242: const __normal_iterator<_IteratorR, _Container>& __rhs) 6242: noexcept 6242: { return __lhs.base() == __rhs.base(); } 6242: 6242: template 6242: inline bool 6242: operator==(const __normal_iterator<_Iterator, _Container>& __lhs, 6242: const __normal_iterator<_Iterator, _Container>& __rhs) 6242: noexcept 6242: { return __lhs.base() == __rhs.base(); } 6242: 6242: template 6242: inline bool 6242: operator!=(const __normal_iterator<_IteratorL, _Container>& __lhs, 6242: const __normal_iterator<_IteratorR, _Container>& __rhs) 6242: noexcept 6242: { return __lhs.base() != __rhs.base(); } 6242: 6242: template 6242: inline bool 6242: operator!=(const __normal_iterator<_Iterator, _Container>& __lhs, 6242: const __normal_iterator<_Iterator, _Container>& __rhs) 6242: noexcept 6242: { return __lhs.base() != __rhs.base(); } 6242: 6242: 6242: template 6242: inline bool 6242: operator<(const __normal_iterator<_IteratorL, _Container>& __lhs, 6242: const __normal_iterator<_IteratorR, _Container>& __rhs) 6242: noexcept 6242: { return __lhs.base() < __rhs.base(); } 6242: 6242: template 6242: inline bool 6242: operator<(const __normal_iterator<_Iterator, _Container>& __lhs, 6242: const __normal_iterator<_Iterator, _Container>& __rhs) 6242: noexcept 6242: { return __lhs.base() < __rhs.base(); } 6242: 6242: template 6242: inline bool 6242: operator>(const __normal_iterator<_IteratorL, _Container>& __lhs, 6242: const __normal_iterator<_IteratorR, _Container>& __rhs) 6242: noexcept 6242: { return __lhs.base() > __rhs.base(); } 6242: 6242: template 6242: inline bool 6242: operator>(const __normal_iterator<_Iterator, _Container>& __lhs, 6242: const __normal_iterator<_Iterator, _Container>& __rhs) 6242: noexcept 6242: { return __lhs.base() > __rhs.base(); } 6242: 6242: template 6242: inline bool 6242: operator<=(const __normal_iterator<_IteratorL, _Container>& __lhs, 6242: const __normal_iterator<_IteratorR, _Container>& __rhs) 6242: noexcept 6242: { return __lhs.base() <= __rhs.base(); } 6242: 6242: template 6242: inline bool 6242: operator<=(const __normal_iterator<_Iterator, _Container>& __lhs, 6242: const __normal_iterator<_Iterator, _Container>& __rhs) 6242: noexcept 6242: { return __lhs.base() <= __rhs.base(); } 6242: 6242: template 6242: inline bool 6242: operator>=(const __normal_iterator<_IteratorL, _Container>& __lhs, 6242: const __normal_iterator<_IteratorR, _Container>& __rhs) 6242: noexcept 6242: { return __lhs.base() >= __rhs.base(); } 6242: 6242: template 6242: inline bool 6242: operator>=(const __normal_iterator<_Iterator, _Container>& __lhs, 6242: const __normal_iterator<_Iterator, _Container>& __rhs) 6242: noexcept 6242: { return __lhs.base() >= __rhs.base(); } 6242: 6242: 6242: 6242: 6242: 6242: template 6242: 6242: 6242: inline auto 6242: operator-(const __normal_iterator<_IteratorL, _Container>& __lhs, 6242: const __normal_iterator<_IteratorR, _Container>& __rhs) noexcept 6242: -> decltype(__lhs.base() - __rhs.base()) 6242: 6242: 6242: 6242: 6242: 6242: { return __lhs.base() - __rhs.base(); } 6242: 6242: template 6242: inline typename __normal_iterator<_Iterator, _Container>::difference_type 6242: operator-(const __normal_iterator<_Iterator, _Container>& __lhs, 6242: const __normal_iterator<_Iterator, _Container>& __rhs) 6242: noexcept 6242: { return __lhs.base() - __rhs.base(); } 6242: 6242: template 6242: inline __normal_iterator<_Iterator, _Container> 6242: operator+(typename __normal_iterator<_Iterator, _Container>::difference_type 6242: __n, const __normal_iterator<_Iterator, _Container>& __i) 6242: noexcept 6242: { return __normal_iterator<_Iterator, _Container>(__i.base() + __n); } 6242: 6242: 6242: } 6242: 6242: namespace std __attribute__ ((__visibility__ ("default"))) 6242: { 6242: 6242: 6242: template 6242: _Iterator 6242: __niter_base(__gnu_cxx::__normal_iterator<_Iterator, _Container> __it) 6242: { return __it.base(); } 6242: # 1003 "/usr/include/c++/8/bits/stl_iterator.h" 3 6242: template 6242: class move_iterator 6242: { 6242: protected: 6242: _Iterator _M_current; 6242: 6242: typedef iterator_traits<_Iterator> __traits_type; 6242: typedef typename __traits_type::reference __base_ref; 6242: 6242: public: 6242: typedef _Iterator iterator_type; 6242: typedef typename __traits_type::iterator_category iterator_category; 6242: typedef typename __traits_type::value_type value_type; 6242: typedef typename __traits_type::difference_type difference_type; 6242: 6242: typedef _Iterator pointer; 6242: 6242: 6242: typedef typename conditional::value, 6242: typename remove_reference<__base_ref>::type&&, 6242: __base_ref>::type reference; 6242: 6242: 6242: move_iterator() 6242: : _M_current() { } 6242: 6242: explicit 6242: move_iterator(iterator_type __i) 6242: : _M_current(__i) { } 6242: 6242: template 6242: 6242: move_iterator(const move_iterator<_Iter>& __i) 6242: : _M_current(__i.base()) { } 6242: 6242: iterator_type 6242: base() const 6242: { return _M_current; } 6242: 6242: reference 6242: operator*() const 6242: { return static_cast(*_M_current); } 6242: 6242: pointer 6242: operator->() const 6242: { return _M_current; } 6242: 6242: move_iterator& 6242: operator++() 6242: { 6242: ++_M_current; 6242: return *this; 6242: } 6242: 6242: move_iterator 6242: operator++(int) 6242: { 6242: move_iterator __tmp = *this; 6242: ++_M_current; 6242: return __tmp; 6242: } 6242: 6242: move_iterator& 6242: operator--() 6242: { 6242: --_M_current; 6242: return *this; 6242: } 6242: 6242: move_iterator 6242: operator--(int) 6242: { 6242: move_iterator __tmp = *this; 6242: --_M_current; 6242: return __tmp; 6242: } 6242: 6242: move_iterator 6242: operator+(difference_type __n) const 6242: { return move_iterator(_M_current + __n); } 6242: 6242: move_iterator& 6242: operator+=(difference_type __n) 6242: { 6242: _M_current += __n; 6242: return *this; 6242: } 6242: 6242: move_iterator 6242: operator-(difference_type __n) const 6242: { return move_iterator(_M_current - __n); } 6242: 6242: move_iterator& 6242: operator-=(difference_type __n) 6242: { 6242: _M_current -= __n; 6242: return *this; 6242: } 6242: 6242: reference 6242: operator[](difference_type __n) const 6242: { return std::move(_M_current[__n]); } 6242: }; 6242: 6242: 6242: 6242: 6242: template 6242: inline bool 6242: operator==(const move_iterator<_IteratorL>& __x, 6242: const move_iterator<_IteratorR>& __y) 6242: { return __x.base() == __y.base(); } 6242: 6242: template 6242: inline bool 6242: operator==(const move_iterator<_Iterator>& __x, 6242: const move_iterator<_Iterator>& __y) 6242: { return __x.base() == __y.base(); } 6242: 6242: template 6242: inline bool 6242: operator!=(const move_iterator<_IteratorL>& __x, 6242: const move_iterator<_IteratorR>& __y) 6242: { return !(__x == __y); } 6242: 6242: template 6242: inline bool 6242: operator!=(const move_iterator<_Iterator>& __x, 6242: const move_iterator<_Iterator>& __y) 6242: { return !(__x == __y); } 6242: 6242: template 6242: inline bool 6242: operator<(const move_iterator<_IteratorL>& __x, 6242: const move_iterator<_IteratorR>& __y) 6242: { return __x.base() < __y.base(); } 6242: 6242: template 6242: inline bool 6242: operator<(const move_iterator<_Iterator>& __x, 6242: const move_iterator<_Iterator>& __y) 6242: { return __x.base() < __y.base(); } 6242: 6242: template 6242: inline bool 6242: operator<=(const move_iterator<_IteratorL>& __x, 6242: const move_iterator<_IteratorR>& __y) 6242: { return !(__y < __x); } 6242: 6242: template 6242: inline bool 6242: operator<=(const move_iterator<_Iterator>& __x, 6242: const move_iterator<_Iterator>& __y) 6242: { return !(__y < __x); } 6242: 6242: template 6242: inline bool 6242: operator>(const move_iterator<_IteratorL>& __x, 6242: const move_iterator<_IteratorR>& __y) 6242: { return __y < __x; } 6242: 6242: template 6242: inline bool 6242: operator>(const move_iterator<_Iterator>& __x, 6242: const move_iterator<_Iterator>& __y) 6242: { return __y < __x; } 6242: 6242: template 6242: inline bool 6242: operator>=(const move_iterator<_IteratorL>& __x, 6242: const move_iterator<_IteratorR>& __y) 6242: { return !(__x < __y); } 6242: 6242: template 6242: inline bool 6242: operator>=(const move_iterator<_Iterator>& __x, 6242: const move_iterator<_Iterator>& __y) 6242: { return !(__x < __y); } 6242: 6242: 6242: template 6242: inline auto 6242: operator-(const move_iterator<_IteratorL>& __x, 6242: const move_iterator<_IteratorR>& __y) 6242: -> decltype(__x.base() - __y.base()) 6242: { return __x.base() - __y.base(); } 6242: 6242: template 6242: inline move_iterator<_Iterator> 6242: operator+(typename move_iterator<_Iterator>::difference_type __n, 6242: const move_iterator<_Iterator>& __x) 6242: { return __x + __n; } 6242: 6242: template 6242: inline move_iterator<_Iterator> 6242: make_move_iterator(_Iterator __i) 6242: { return move_iterator<_Iterator>(__i); } 6242: 6242: template::value_type>::value, 6242: _Iterator, move_iterator<_Iterator>>::type> 6242: inline _ReturnType 6242: __make_move_if_noexcept_iterator(_Iterator __i) 6242: { return _ReturnType(__i); } 6242: 6242: 6242: 6242: template::value, 6242: const _Tp*, move_iterator<_Tp*>>::type> 6242: inline _ReturnType 6242: __make_move_if_noexcept_iterator(_Tp* __i) 6242: { return _ReturnType(__i); } 6242: 6242: 6242: 6242: template 6242: auto 6242: __niter_base(move_iterator<_Iterator> __it) 6242: -> decltype(make_move_iterator(__niter_base(__it.base()))) 6242: { return make_move_iterator(__niter_base(__it.base())); } 6242: 6242: template 6242: struct __is_move_iterator > 6242: { 6242: enum { __value = 1 }; 6242: typedef __true_type __type; 6242: }; 6242: 6242: template 6242: auto 6242: __miter_base(move_iterator<_Iterator> __it) 6242: -> decltype(__miter_base(__it.base())) 6242: { return __miter_base(__it.base()); } 6242: # 1268 "/usr/include/c++/8/bits/stl_iterator.h" 3 6242: 6242: } 6242: # 68 "/usr/include/c++/8/bits/stl_algobase.h" 2 3 6242: 6242: # 1 "/usr/include/c++/8/debug/debug.h" 1 3 6242: # 48 "/usr/include/c++/8/debug/debug.h" 3 6242: namespace std 6242: { 6242: namespace __debug { } 6242: } 6242: 6242: 6242: 6242: 6242: namespace __gnu_debug 6242: { 6242: using namespace std::__debug; 6242: } 6242: # 70 "/usr/include/c++/8/bits/stl_algobase.h" 2 3 6242: 6242: # 1 "/usr/include/c++/8/bits/predefined_ops.h" 1 3 6242: # 33 "/usr/include/c++/8/bits/predefined_ops.h" 3 6242: namespace __gnu_cxx 6242: { 6242: namespace __ops 6242: { 6242: struct _Iter_less_iter 6242: { 6242: template 6242: 6242: bool 6242: operator()(_Iterator1 __it1, _Iterator2 __it2) const 6242: { return *__it1 < *__it2; } 6242: }; 6242: 6242: 6242: inline _Iter_less_iter 6242: __iter_less_iter() 6242: { return _Iter_less_iter(); } 6242: 6242: struct _Iter_less_val 6242: { 6242: 6242: constexpr _Iter_less_val() = default; 6242: 6242: 6242: 6242: 6242: explicit 6242: _Iter_less_val(_Iter_less_iter) { } 6242: 6242: template 6242: bool 6242: operator()(_Iterator __it, _Value& __val) const 6242: { return *__it < __val; } 6242: }; 6242: 6242: inline _Iter_less_val 6242: __iter_less_val() 6242: { return _Iter_less_val(); } 6242: 6242: inline _Iter_less_val 6242: __iter_comp_val(_Iter_less_iter) 6242: { return _Iter_less_val(); } 6242: 6242: struct _Val_less_iter 6242: { 6242: 6242: constexpr _Val_less_iter() = default; 6242: 6242: 6242: 6242: 6242: explicit 6242: _Val_less_iter(_Iter_less_iter) { } 6242: 6242: template 6242: bool 6242: operator()(_Value& __val, _Iterator __it) const 6242: { return __val < *__it; } 6242: }; 6242: 6242: inline _Val_less_iter 6242: __val_less_iter() 6242: { return _Val_less_iter(); } 6242: 6242: inline _Val_less_iter 6242: __val_comp_iter(_Iter_less_iter) 6242: { return _Val_less_iter(); } 6242: 6242: struct _Iter_equal_to_iter 6242: { 6242: template 6242: bool 6242: operator()(_Iterator1 __it1, _Iterator2 __it2) const 6242: { return *__it1 == *__it2; } 6242: }; 6242: 6242: inline _Iter_equal_to_iter 6242: __iter_equal_to_iter() 6242: { return _Iter_equal_to_iter(); } 6242: 6242: struct _Iter_equal_to_val 6242: { 6242: template 6242: bool 6242: operator()(_Iterator __it, _Value& __val) const 6242: { return *__it == __val; } 6242: }; 6242: 6242: inline _Iter_equal_to_val 6242: __iter_equal_to_val() 6242: { return _Iter_equal_to_val(); } 6242: 6242: inline _Iter_equal_to_val 6242: __iter_comp_val(_Iter_equal_to_iter) 6242: { return _Iter_equal_to_val(); } 6242: 6242: template 6242: struct _Iter_comp_iter 6242: { 6242: _Compare _M_comp; 6242: 6242: explicit 6242: _Iter_comp_iter(_Compare __comp) 6242: : _M_comp(std::move(__comp)) 6242: { } 6242: 6242: template 6242: 6242: bool 6242: operator()(_Iterator1 __it1, _Iterator2 __it2) 6242: { return bool(_M_comp(*__it1, *__it2)); } 6242: }; 6242: 6242: template 6242: 6242: inline _Iter_comp_iter<_Compare> 6242: __iter_comp_iter(_Compare __comp) 6242: { return _Iter_comp_iter<_Compare>(std::move(__comp)); } 6242: 6242: template 6242: struct _Iter_comp_val 6242: { 6242: _Compare _M_comp; 6242: 6242: explicit 6242: _Iter_comp_val(_Compare __comp) 6242: : _M_comp(std::move(__comp)) 6242: { } 6242: 6242: explicit 6242: _Iter_comp_val(const _Iter_comp_iter<_Compare>& __comp) 6242: : _M_comp(__comp._M_comp) 6242: { } 6242: 6242: 6242: explicit 6242: _Iter_comp_val(_Iter_comp_iter<_Compare>&& __comp) 6242: : _M_comp(std::move(__comp._M_comp)) 6242: { } 6242: 6242: 6242: template 6242: bool 6242: operator()(_Iterator __it, _Value& __val) 6242: { return bool(_M_comp(*__it, __val)); } 6242: }; 6242: 6242: template 6242: inline _Iter_comp_val<_Compare> 6242: __iter_comp_val(_Compare __comp) 6242: { return _Iter_comp_val<_Compare>(std::move(__comp)); } 6242: 6242: template 6242: inline _Iter_comp_val<_Compare> 6242: __iter_comp_val(_Iter_comp_iter<_Compare> __comp) 6242: { return _Iter_comp_val<_Compare>(std::move(__comp)); } 6242: 6242: template 6242: struct _Val_comp_iter 6242: { 6242: _Compare _M_comp; 6242: 6242: explicit 6242: _Val_comp_iter(_Compare __comp) 6242: : _M_comp(std::move(__comp)) 6242: { } 6242: 6242: explicit 6242: _Val_comp_iter(const _Iter_comp_iter<_Compare>& __comp) 6242: : _M_comp(__comp._M_comp) 6242: { } 6242: 6242: 6242: explicit 6242: _Val_comp_iter(_Iter_comp_iter<_Compare>&& __comp) 6242: : _M_comp(std::move(__comp._M_comp)) 6242: { } 6242: 6242: 6242: template 6242: bool 6242: operator()(_Value& __val, _Iterator __it) 6242: { return bool(_M_comp(__val, *__it)); } 6242: }; 6242: 6242: template 6242: inline _Val_comp_iter<_Compare> 6242: __val_comp_iter(_Compare __comp) 6242: { return _Val_comp_iter<_Compare>(std::move(__comp)); } 6242: 6242: template 6242: inline _Val_comp_iter<_Compare> 6242: __val_comp_iter(_Iter_comp_iter<_Compare> __comp) 6242: { return _Val_comp_iter<_Compare>(std::move(__comp)); } 6242: 6242: template 6242: struct _Iter_equals_val 6242: { 6242: _Value& _M_value; 6242: 6242: explicit 6242: _Iter_equals_val(_Value& __value) 6242: : _M_value(__value) 6242: { } 6242: 6242: template 6242: bool 6242: operator()(_Iterator __it) 6242: { return *__it == _M_value; } 6242: }; 6242: 6242: template 6242: inline _Iter_equals_val<_Value> 6242: __iter_equals_val(_Value& __val) 6242: { return _Iter_equals_val<_Value>(__val); } 6242: 6242: template 6242: struct _Iter_equals_iter 6242: { 6242: _Iterator1 _M_it1; 6242: 6242: explicit 6242: _Iter_equals_iter(_Iterator1 __it1) 6242: : _M_it1(__it1) 6242: { } 6242: 6242: template 6242: bool 6242: operator()(_Iterator2 __it2) 6242: { return *__it2 == *_M_it1; } 6242: }; 6242: 6242: template 6242: inline _Iter_equals_iter<_Iterator> 6242: __iter_comp_iter(_Iter_equal_to_iter, _Iterator __it) 6242: { return _Iter_equals_iter<_Iterator>(__it); } 6242: 6242: template 6242: struct _Iter_pred 6242: { 6242: _Predicate _M_pred; 6242: 6242: explicit 6242: _Iter_pred(_Predicate __pred) 6242: : _M_pred(std::move(__pred)) 6242: { } 6242: 6242: template 6242: bool 6242: operator()(_Iterator __it) 6242: { return bool(_M_pred(*__it)); } 6242: }; 6242: 6242: template 6242: inline _Iter_pred<_Predicate> 6242: __pred_iter(_Predicate __pred) 6242: { return _Iter_pred<_Predicate>(std::move(__pred)); } 6242: 6242: template 6242: struct _Iter_comp_to_val 6242: { 6242: _Compare _M_comp; 6242: _Value& _M_value; 6242: 6242: _Iter_comp_to_val(_Compare __comp, _Value& __value) 6242: : _M_comp(std::move(__comp)), _M_value(__value) 6242: { } 6242: 6242: template 6242: bool 6242: operator()(_Iterator __it) 6242: { return bool(_M_comp(*__it, _M_value)); } 6242: }; 6242: 6242: template 6242: _Iter_comp_to_val<_Compare, _Value> 6242: __iter_comp_val(_Compare __comp, _Value &__val) 6242: { 6242: return _Iter_comp_to_val<_Compare, _Value>(std::move(__comp), __val); 6242: } 6242: 6242: template 6242: struct _Iter_comp_to_iter 6242: { 6242: _Compare _M_comp; 6242: _Iterator1 _M_it1; 6242: 6242: _Iter_comp_to_iter(_Compare __comp, _Iterator1 __it1) 6242: : _M_comp(std::move(__comp)), _M_it1(__it1) 6242: { } 6242: 6242: template 6242: bool 6242: operator()(_Iterator2 __it2) 6242: { return bool(_M_comp(*__it2, *_M_it1)); } 6242: }; 6242: 6242: template 6242: inline _Iter_comp_to_iter<_Compare, _Iterator> 6242: __iter_comp_iter(_Iter_comp_iter<_Compare> __comp, _Iterator __it) 6242: { 6242: return _Iter_comp_to_iter<_Compare, _Iterator>( 6242: std::move(__comp._M_comp), __it); 6242: } 6242: 6242: template 6242: struct _Iter_negate 6242: { 6242: _Predicate _M_pred; 6242: 6242: explicit 6242: _Iter_negate(_Predicate __pred) 6242: : _M_pred(std::move(__pred)) 6242: { } 6242: 6242: template 6242: bool 6242: operator()(_Iterator __it) 6242: { return !bool(_M_pred(*__it)); } 6242: }; 6242: 6242: template 6242: inline _Iter_negate<_Predicate> 6242: __negate(_Iter_pred<_Predicate> __pred) 6242: { return _Iter_negate<_Predicate>(std::move(__pred._M_pred)); } 6242: 6242: } 6242: } 6242: # 72 "/usr/include/c++/8/bits/stl_algobase.h" 2 3 6242: 6242: namespace std __attribute__ ((__visibility__ ("default"))) 6242: { 6242: 6242: # 118 "/usr/include/c++/8/bits/stl_algobase.h" 3 6242: template 6242: inline void 6242: iter_swap(_ForwardIterator1 __a, _ForwardIterator2 __b) 6242: { 6242: 6242: 6242: 6242: 6242: # 148 "/usr/include/c++/8/bits/stl_algobase.h" 3 6242: swap(*__a, *__b); 6242: 6242: } 6242: # 164 "/usr/include/c++/8/bits/stl_algobase.h" 3 6242: template 6242: _ForwardIterator2 6242: swap_ranges(_ForwardIterator1 __first1, _ForwardIterator1 __last1, 6242: _ForwardIterator2 __first2) 6242: { 6242: 6242: 6242: 6242: 6242: 6242: ; 6242: 6242: for (; __first1 != __last1; ++__first1, (void)++__first2) 6242: std::iter_swap(__first1, __first2); 6242: return __first2; 6242: } 6242: # 192 "/usr/include/c++/8/bits/stl_algobase.h" 3 6242: template 6242: 6242: inline const _Tp& 6242: min(const _Tp& __a, const _Tp& __b) 6242: { 6242: 6242: 6242: 6242: if (__b < __a) 6242: return __b; 6242: return __a; 6242: } 6242: # 216 "/usr/include/c++/8/bits/stl_algobase.h" 3 6242: template 6242: 6242: inline const _Tp& 6242: max(const _Tp& __a, const _Tp& __b) 6242: { 6242: 6242: 6242: 6242: if (__a < __b) 6242: return __b; 6242: return __a; 6242: } 6242: # 240 "/usr/include/c++/8/bits/stl_algobase.h" 3 6242: template 6242: 6242: inline const _Tp& 6242: min(const _Tp& __a, const _Tp& __b, _Compare __comp) 6242: { 6242: 6242: if (__comp(__b, __a)) 6242: return __b; 6242: return __a; 6242: } 6242: # 262 "/usr/include/c++/8/bits/stl_algobase.h" 3 6242: template 6242: 6242: inline const _Tp& 6242: max(const _Tp& __a, const _Tp& __b, _Compare __comp) 6242: { 6242: 6242: if (__comp(__a, __b)) 6242: return __b; 6242: return __a; 6242: } 6242: 6242: 6242: 6242: template 6242: inline _Iterator 6242: __niter_base(_Iterator __it) 6242: { return __it; } 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: template 6242: struct __copy_move 6242: { 6242: template 6242: static _OI 6242: __copy_m(_II __first, _II __last, _OI __result) 6242: { 6242: for (; __first != __last; ++__result, (void)++__first) 6242: *__result = *__first; 6242: return __result; 6242: } 6242: }; 6242: 6242: 6242: template 6242: struct __copy_move 6242: { 6242: template 6242: static _OI 6242: __copy_m(_II __first, _II __last, _OI __result) 6242: { 6242: for (; __first != __last; ++__result, (void)++__first) 6242: *__result = std::move(*__first); 6242: return __result; 6242: } 6242: }; 6242: 6242: 6242: template<> 6242: struct __copy_move 6242: { 6242: template 6242: static _OI 6242: __copy_m(_II __first, _II __last, _OI __result) 6242: { 6242: typedef typename iterator_traits<_II>::difference_type _Distance; 6242: for(_Distance __n = __last - __first; __n > 0; --__n) 6242: { 6242: *__result = *__first; 6242: ++__first; 6242: ++__result; 6242: } 6242: return __result; 6242: } 6242: }; 6242: 6242: 6242: template<> 6242: struct __copy_move 6242: { 6242: template 6242: static _OI 6242: __copy_m(_II __first, _II __last, _OI __result) 6242: { 6242: typedef typename iterator_traits<_II>::difference_type _Distance; 6242: for(_Distance __n = __last - __first; __n > 0; --__n) 6242: { 6242: *__result = std::move(*__first); 6242: ++__first; 6242: ++__result; 6242: } 6242: return __result; 6242: } 6242: }; 6242: 6242: 6242: template 6242: struct __copy_move<_IsMove, true, random_access_iterator_tag> 6242: { 6242: template 6242: static _Tp* 6242: __copy_m(const _Tp* __first, const _Tp* __last, _Tp* __result) 6242: { 6242: 6242: using __assignable = conditional<_IsMove, 6242: is_move_assignable<_Tp>, 6242: is_copy_assignable<_Tp>>; 6242: 6242: static_assert( __assignable::type::value, "type is not assignable" ); 6242: 6242: const ptrdiff_t _Num = __last - __first; 6242: if (_Num) 6242: __builtin_memmove(__result, __first, sizeof(_Tp) * _Num); 6242: return __result + _Num; 6242: } 6242: }; 6242: 6242: template 6242: inline _OI 6242: __copy_move_a(_II __first, _II __last, _OI __result) 6242: { 6242: typedef typename iterator_traits<_II>::value_type _ValueTypeI; 6242: typedef typename iterator_traits<_OI>::value_type _ValueTypeO; 6242: typedef typename iterator_traits<_II>::iterator_category _Category; 6242: const bool __simple = (__is_trivial(_ValueTypeI) 6242: && __is_pointer<_II>::__value 6242: && __is_pointer<_OI>::__value 6242: && __are_same<_ValueTypeI, _ValueTypeO>::__value); 6242: 6242: return std::__copy_move<_IsMove, __simple, 6242: _Category>::__copy_m(__first, __last, __result); 6242: } 6242: 6242: 6242: 6242: template 6242: struct char_traits; 6242: 6242: template 6242: class istreambuf_iterator; 6242: 6242: template 6242: class ostreambuf_iterator; 6242: 6242: template 6242: typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value, 6242: ostreambuf_iterator<_CharT, char_traits<_CharT> > >::__type 6242: __copy_move_a2(_CharT*, _CharT*, 6242: ostreambuf_iterator<_CharT, char_traits<_CharT> >); 6242: 6242: template 6242: typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value, 6242: ostreambuf_iterator<_CharT, char_traits<_CharT> > >::__type 6242: __copy_move_a2(const _CharT*, const _CharT*, 6242: ostreambuf_iterator<_CharT, char_traits<_CharT> >); 6242: 6242: template 6242: typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value, 6242: _CharT*>::__type 6242: __copy_move_a2(istreambuf_iterator<_CharT, char_traits<_CharT> >, 6242: istreambuf_iterator<_CharT, char_traits<_CharT> >, _CharT*); 6242: 6242: template 6242: inline _OI 6242: __copy_move_a2(_II __first, _II __last, _OI __result) 6242: { 6242: return _OI(std::__copy_move_a<_IsMove>(std::__niter_base(__first), 6242: std::__niter_base(__last), 6242: std::__niter_base(__result))); 6242: } 6242: # 444 "/usr/include/c++/8/bits/stl_algobase.h" 3 6242: template 6242: inline _OI 6242: copy(_II __first, _II __last, _OI __result) 6242: { 6242: 6242: 6242: 6242: 6242: ; 6242: 6242: return (std::__copy_move_a2<__is_move_iterator<_II>::__value> 6242: (std::__miter_base(__first), std::__miter_base(__last), 6242: __result)); 6242: } 6242: # 477 "/usr/include/c++/8/bits/stl_algobase.h" 3 6242: template 6242: inline _OI 6242: move(_II __first, _II __last, _OI __result) 6242: { 6242: 6242: 6242: 6242: 6242: ; 6242: 6242: return std::__copy_move_a2(std::__miter_base(__first), 6242: std::__miter_base(__last), __result); 6242: } 6242: 6242: 6242: 6242: 6242: 6242: 6242: template 6242: struct __copy_move_backward 6242: { 6242: template 6242: static _BI2 6242: __copy_move_b(_BI1 __first, _BI1 __last, _BI2 __result) 6242: { 6242: while (__first != __last) 6242: *--__result = *--__last; 6242: return __result; 6242: } 6242: }; 6242: 6242: 6242: template 6242: struct __copy_move_backward 6242: { 6242: template 6242: static _BI2 6242: __copy_move_b(_BI1 __first, _BI1 __last, _BI2 __result) 6242: { 6242: while (__first != __last) 6242: *--__result = std::move(*--__last); 6242: return __result; 6242: } 6242: }; 6242: 6242: 6242: template<> 6242: struct __copy_move_backward 6242: { 6242: template 6242: static _BI2 6242: __copy_move_b(_BI1 __first, _BI1 __last, _BI2 __result) 6242: { 6242: typename iterator_traits<_BI1>::difference_type __n; 6242: for (__n = __last - __first; __n > 0; --__n) 6242: *--__result = *--__last; 6242: return __result; 6242: } 6242: }; 6242: 6242: 6242: template<> 6242: struct __copy_move_backward 6242: { 6242: template 6242: static _BI2 6242: __copy_move_b(_BI1 __first, _BI1 __last, _BI2 __result) 6242: { 6242: typename iterator_traits<_BI1>::difference_type __n; 6242: for (__n = __last - __first; __n > 0; --__n) 6242: *--__result = std::move(*--__last); 6242: return __result; 6242: } 6242: }; 6242: 6242: 6242: template 6242: struct __copy_move_backward<_IsMove, true, random_access_iterator_tag> 6242: { 6242: template 6242: static _Tp* 6242: __copy_move_b(const _Tp* __first, const _Tp* __last, _Tp* __result) 6242: { 6242: 6242: using __assignable = conditional<_IsMove, 6242: is_move_assignable<_Tp>, 6242: is_copy_assignable<_Tp>>; 6242: 6242: static_assert( __assignable::type::value, "type is not assignable" ); 6242: 6242: const ptrdiff_t _Num = __last - __first; 6242: if (_Num) 6242: __builtin_memmove(__result - _Num, __first, sizeof(_Tp) * _Num); 6242: return __result - _Num; 6242: } 6242: }; 6242: 6242: template 6242: inline _BI2 6242: __copy_move_backward_a(_BI1 __first, _BI1 __last, _BI2 __result) 6242: { 6242: typedef typename iterator_traits<_BI1>::value_type _ValueType1; 6242: typedef typename iterator_traits<_BI2>::value_type _ValueType2; 6242: typedef typename iterator_traits<_BI1>::iterator_category _Category; 6242: const bool __simple = (__is_trivial(_ValueType1) 6242: && __is_pointer<_BI1>::__value 6242: && __is_pointer<_BI2>::__value 6242: && __are_same<_ValueType1, _ValueType2>::__value); 6242: 6242: return std::__copy_move_backward<_IsMove, __simple, 6242: _Category>::__copy_move_b(__first, 6242: __last, 6242: __result); 6242: } 6242: 6242: template 6242: inline _BI2 6242: __copy_move_backward_a2(_BI1 __first, _BI1 __last, _BI2 __result) 6242: { 6242: return _BI2(std::__copy_move_backward_a<_IsMove> 6242: (std::__niter_base(__first), std::__niter_base(__last), 6242: std::__niter_base(__result))); 6242: } 6242: # 620 "/usr/include/c++/8/bits/stl_algobase.h" 3 6242: template 6242: inline _BI2 6242: copy_backward(_BI1 __first, _BI1 __last, _BI2 __result) 6242: { 6242: 6242: 6242: 6242: 6242: 6242: 6242: ; 6242: 6242: return (std::__copy_move_backward_a2<__is_move_iterator<_BI1>::__value> 6242: (std::__miter_base(__first), std::__miter_base(__last), 6242: __result)); 6242: } 6242: # 656 "/usr/include/c++/8/bits/stl_algobase.h" 3 6242: template 6242: inline _BI2 6242: move_backward(_BI1 __first, _BI1 __last, _BI2 __result) 6242: { 6242: 6242: 6242: 6242: 6242: 6242: 6242: ; 6242: 6242: return std::__copy_move_backward_a2(std::__miter_base(__first), 6242: std::__miter_base(__last), 6242: __result); 6242: } 6242: 6242: 6242: 6242: 6242: 6242: 6242: template 6242: inline typename 6242: __gnu_cxx::__enable_if::__value, void>::__type 6242: __fill_a(_ForwardIterator __first, _ForwardIterator __last, 6242: const _Tp& __value) 6242: { 6242: for (; __first != __last; ++__first) 6242: *__first = __value; 6242: } 6242: 6242: template 6242: inline typename 6242: __gnu_cxx::__enable_if<__is_scalar<_Tp>::__value, void>::__type 6242: __fill_a(_ForwardIterator __first, _ForwardIterator __last, 6242: const _Tp& __value) 6242: { 6242: const _Tp __tmp = __value; 6242: for (; __first != __last; ++__first) 6242: *__first = __tmp; 6242: } 6242: 6242: 6242: template 6242: inline typename 6242: __gnu_cxx::__enable_if<__is_byte<_Tp>::__value, void>::__type 6242: __fill_a(_Tp* __first, _Tp* __last, const _Tp& __c) 6242: { 6242: const _Tp __tmp = __c; 6242: if (const size_t __len = __last - __first) 6242: __builtin_memset(__first, static_cast(__tmp), __len); 6242: } 6242: # 722 "/usr/include/c++/8/bits/stl_algobase.h" 3 6242: template 6242: inline void 6242: fill(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value) 6242: { 6242: 6242: 6242: 6242: ; 6242: 6242: std::__fill_a(std::__niter_base(__first), std::__niter_base(__last), 6242: __value); 6242: } 6242: 6242: template 6242: inline typename 6242: __gnu_cxx::__enable_if::__value, _OutputIterator>::__type 6242: __fill_n_a(_OutputIterator __first, _Size __n, const _Tp& __value) 6242: { 6242: for (__decltype(__n + 0) __niter = __n; 6242: __niter > 0; --__niter, (void) ++__first) 6242: *__first = __value; 6242: return __first; 6242: } 6242: 6242: template 6242: inline typename 6242: __gnu_cxx::__enable_if<__is_scalar<_Tp>::__value, _OutputIterator>::__type 6242: __fill_n_a(_OutputIterator __first, _Size __n, const _Tp& __value) 6242: { 6242: const _Tp __tmp = __value; 6242: for (__decltype(__n + 0) __niter = __n; 6242: __niter > 0; --__niter, (void) ++__first) 6242: *__first = __tmp; 6242: return __first; 6242: } 6242: 6242: template 6242: inline typename 6242: __gnu_cxx::__enable_if<__is_byte<_Tp>::__value, _Tp*>::__type 6242: __fill_n_a(_Tp* __first, _Size __n, const _Tp& __c) 6242: { 6242: std::__fill_a(__first, __first + __n, __c); 6242: return __first + __n; 6242: } 6242: # 782 "/usr/include/c++/8/bits/stl_algobase.h" 3 6242: template 6242: inline _OI 6242: fill_n(_OI __first, _Size __n, const _Tp& __value) 6242: { 6242: 6242: 6242: 6242: return _OI(std::__fill_n_a(std::__niter_base(__first), __n, __value)); 6242: } 6242: 6242: template 6242: struct __equal 6242: { 6242: template 6242: static bool 6242: equal(_II1 __first1, _II1 __last1, _II2 __first2) 6242: { 6242: for (; __first1 != __last1; ++__first1, (void) ++__first2) 6242: if (!(*__first1 == *__first2)) 6242: return false; 6242: return true; 6242: } 6242: }; 6242: 6242: template<> 6242: struct __equal 6242: { 6242: template 6242: static bool 6242: equal(const _Tp* __first1, const _Tp* __last1, const _Tp* __first2) 6242: { 6242: if (const size_t __len = (__last1 - __first1)) 6242: return !__builtin_memcmp(__first1, __first2, sizeof(_Tp) * __len); 6242: return true; 6242: } 6242: }; 6242: 6242: template 6242: inline bool 6242: __equal_aux(_II1 __first1, _II1 __last1, _II2 __first2) 6242: { 6242: typedef typename iterator_traits<_II1>::value_type _ValueType1; 6242: typedef typename iterator_traits<_II2>::value_type _ValueType2; 6242: const bool __simple = ((__is_integer<_ValueType1>::__value 6242: || __is_pointer<_ValueType1>::__value) 6242: && __is_pointer<_II1>::__value 6242: && __is_pointer<_II2>::__value 6242: && __are_same<_ValueType1, _ValueType2>::__value); 6242: 6242: return std::__equal<__simple>::equal(__first1, __last1, __first2); 6242: } 6242: 6242: template 6242: struct __lc_rai 6242: { 6242: template 6242: static _II1 6242: __newlast1(_II1, _II1 __last1, _II2, _II2) 6242: { return __last1; } 6242: 6242: template 6242: static bool 6242: __cnd2(_II __first, _II __last) 6242: { return __first != __last; } 6242: }; 6242: 6242: template<> 6242: struct __lc_rai 6242: { 6242: template 6242: static _RAI1 6242: __newlast1(_RAI1 __first1, _RAI1 __last1, 6242: _RAI2 __first2, _RAI2 __last2) 6242: { 6242: const typename iterator_traits<_RAI1>::difference_type 6242: __diff1 = __last1 - __first1; 6242: const typename iterator_traits<_RAI2>::difference_type 6242: __diff2 = __last2 - __first2; 6242: return __diff2 < __diff1 ? __first1 + __diff2 : __last1; 6242: } 6242: 6242: template 6242: static bool 6242: __cnd2(_RAI, _RAI) 6242: { return true; } 6242: }; 6242: 6242: template 6242: bool 6242: __lexicographical_compare_impl(_II1 __first1, _II1 __last1, 6242: _II2 __first2, _II2 __last2, 6242: _Compare __comp) 6242: { 6242: typedef typename iterator_traits<_II1>::iterator_category _Category1; 6242: typedef typename iterator_traits<_II2>::iterator_category _Category2; 6242: typedef std::__lc_rai<_Category1, _Category2> __rai_type; 6242: 6242: __last1 = __rai_type::__newlast1(__first1, __last1, __first2, __last2); 6242: for (; __first1 != __last1 && __rai_type::__cnd2(__first2, __last2); 6242: ++__first1, (void)++__first2) 6242: { 6242: if (__comp(__first1, __first2)) 6242: return true; 6242: if (__comp(__first2, __first1)) 6242: return false; 6242: } 6242: return __first1 == __last1 && __first2 != __last2; 6242: } 6242: 6242: template 6242: struct __lexicographical_compare 6242: { 6242: template 6242: static bool __lc(_II1, _II1, _II2, _II2); 6242: }; 6242: 6242: template 6242: template 6242: bool 6242: __lexicographical_compare<_BoolType>:: 6242: __lc(_II1 __first1, _II1 __last1, _II2 __first2, _II2 __last2) 6242: { 6242: return std::__lexicographical_compare_impl(__first1, __last1, 6242: __first2, __last2, 6242: __gnu_cxx::__ops::__iter_less_iter()); 6242: } 6242: 6242: template<> 6242: struct __lexicographical_compare 6242: { 6242: template 6242: static bool 6242: __lc(const _Tp* __first1, const _Tp* __last1, 6242: const _Up* __first2, const _Up* __last2) 6242: { 6242: const size_t __len1 = __last1 - __first1; 6242: const size_t __len2 = __last2 - __first2; 6242: if (const size_t __len = std::min(__len1, __len2)) 6242: if (int __result = __builtin_memcmp(__first1, __first2, __len)) 6242: return __result < 0; 6242: return __len1 < __len2; 6242: } 6242: }; 6242: 6242: template 6242: inline bool 6242: __lexicographical_compare_aux(_II1 __first1, _II1 __last1, 6242: _II2 __first2, _II2 __last2) 6242: { 6242: typedef typename iterator_traits<_II1>::value_type _ValueType1; 6242: typedef typename iterator_traits<_II2>::value_type _ValueType2; 6242: const bool __simple = 6242: (__is_byte<_ValueType1>::__value && __is_byte<_ValueType2>::__value 6242: && !__gnu_cxx::__numeric_traits<_ValueType1>::__is_signed 6242: && !__gnu_cxx::__numeric_traits<_ValueType2>::__is_signed 6242: && __is_pointer<_II1>::__value 6242: && __is_pointer<_II2>::__value); 6242: 6242: return std::__lexicographical_compare<__simple>::__lc(__first1, __last1, 6242: __first2, __last2); 6242: } 6242: 6242: template 6242: _ForwardIterator 6242: __lower_bound(_ForwardIterator __first, _ForwardIterator __last, 6242: const _Tp& __val, _Compare __comp) 6242: { 6242: typedef typename iterator_traits<_ForwardIterator>::difference_type 6242: _DistanceType; 6242: 6242: _DistanceType __len = std::distance(__first, __last); 6242: 6242: while (__len > 0) 6242: { 6242: _DistanceType __half = __len >> 1; 6242: _ForwardIterator __middle = __first; 6242: std::advance(__middle, __half); 6242: if (__comp(__middle, __val)) 6242: { 6242: __first = __middle; 6242: ++__first; 6242: __len = __len - __half - 1; 6242: } 6242: else 6242: __len = __half; 6242: } 6242: return __first; 6242: } 6242: # 982 "/usr/include/c++/8/bits/stl_algobase.h" 3 6242: template 6242: inline _ForwardIterator 6242: lower_bound(_ForwardIterator __first, _ForwardIterator __last, 6242: const _Tp& __val) 6242: { 6242: 6242: 6242: 6242: 6242: ; 6242: 6242: return std::__lower_bound(__first, __last, __val, 6242: __gnu_cxx::__ops::__iter_less_val()); 6242: } 6242: 6242: 6242: 6242: inline constexpr int 6242: __lg(int __n) 6242: { return sizeof(int) * 8 - 1 - __builtin_clz(__n); } 6242: 6242: inline constexpr unsigned 6242: __lg(unsigned __n) 6242: { return sizeof(int) * 8 - 1 - __builtin_clz(__n); } 6242: 6242: inline constexpr long 6242: __lg(long __n) 6242: { return sizeof(long) * 8 - 1 - __builtin_clzl(__n); } 6242: 6242: inline constexpr unsigned long 6242: __lg(unsigned long __n) 6242: { return sizeof(long) * 8 - 1 - __builtin_clzl(__n); } 6242: 6242: inline constexpr long long 6242: __lg(long long __n) 6242: { return sizeof(long long) * 8 - 1 - __builtin_clzll(__n); } 6242: 6242: inline constexpr unsigned long long 6242: __lg(unsigned long long __n) 6242: { return sizeof(long long) * 8 - 1 - __builtin_clzll(__n); } 6242: 6242: 6242: # 1037 "/usr/include/c++/8/bits/stl_algobase.h" 3 6242: template 6242: inline bool 6242: equal(_II1 __first1, _II1 __last1, _II2 __first2) 6242: { 6242: 6242: 6242: 6242: 6242: 6242: 6242: ; 6242: 6242: return std::__equal_aux(std::__niter_base(__first1), 6242: std::__niter_base(__last1), 6242: std::__niter_base(__first2)); 6242: } 6242: # 1069 "/usr/include/c++/8/bits/stl_algobase.h" 3 6242: template 6242: inline bool 6242: equal(_IIter1 __first1, _IIter1 __last1, 6242: _IIter2 __first2, _BinaryPredicate __binary_pred) 6242: { 6242: 6242: 6242: 6242: ; 6242: 6242: for (; __first1 != __last1; ++__first1, (void)++__first2) 6242: if (!bool(__binary_pred(*__first1, *__first2))) 6242: return false; 6242: return true; 6242: } 6242: 6242: 6242: 6242: template 6242: inline bool 6242: __equal4(_II1 __first1, _II1 __last1, _II2 __first2, _II2 __last2) 6242: { 6242: using _RATag = random_access_iterator_tag; 6242: using _Cat1 = typename iterator_traits<_II1>::iterator_category; 6242: using _Cat2 = typename iterator_traits<_II2>::iterator_category; 6242: using _RAIters = __and_, is_same<_Cat2, _RATag>>; 6242: if (_RAIters()) 6242: { 6242: auto __d1 = std::distance(__first1, __last1); 6242: auto __d2 = std::distance(__first2, __last2); 6242: if (__d1 != __d2) 6242: return false; 6242: return std::equal(__first1, __last1, __first2); 6242: } 6242: 6242: for (; __first1 != __last1 && __first2 != __last2; 6242: ++__first1, (void)++__first2) 6242: if (!(*__first1 == *__first2)) 6242: return false; 6242: return __first1 == __last1 && __first2 == __last2; 6242: } 6242: 6242: 6242: template 6242: inline bool 6242: __equal4(_II1 __first1, _II1 __last1, _II2 __first2, _II2 __last2, 6242: _BinaryPredicate __binary_pred) 6242: { 6242: using _RATag = random_access_iterator_tag; 6242: using _Cat1 = typename iterator_traits<_II1>::iterator_category; 6242: using _Cat2 = typename iterator_traits<_II2>::iterator_category; 6242: using _RAIters = __and_, is_same<_Cat2, _RATag>>; 6242: if (_RAIters()) 6242: { 6242: auto __d1 = std::distance(__first1, __last1); 6242: auto __d2 = std::distance(__first2, __last2); 6242: if (__d1 != __d2) 6242: return false; 6242: return std::equal(__first1, __last1, __first2, 6242: __binary_pred); 6242: } 6242: 6242: for (; __first1 != __last1 && __first2 != __last2; 6242: ++__first1, (void)++__first2) 6242: if (!bool(__binary_pred(*__first1, *__first2))) 6242: return false; 6242: return __first1 == __last1 && __first2 == __last2; 6242: } 6242: # 1219 "/usr/include/c++/8/bits/stl_algobase.h" 3 6242: template 6242: inline bool 6242: lexicographical_compare(_II1 __first1, _II1 __last1, 6242: _II2 __first2, _II2 __last2) 6242: { 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: ; 6242: ; 6242: 6242: return std::__lexicographical_compare_aux(std::__niter_base(__first1), 6242: std::__niter_base(__last1), 6242: std::__niter_base(__first2), 6242: std::__niter_base(__last2)); 6242: } 6242: # 1255 "/usr/include/c++/8/bits/stl_algobase.h" 3 6242: template 6242: inline bool 6242: lexicographical_compare(_II1 __first1, _II1 __last1, 6242: _II2 __first2, _II2 __last2, _Compare __comp) 6242: { 6242: 6242: 6242: 6242: ; 6242: ; 6242: 6242: return std::__lexicographical_compare_impl 6242: (__first1, __last1, __first2, __last2, 6242: __gnu_cxx::__ops::__iter_comp_iter(__comp)); 6242: } 6242: 6242: template 6242: pair<_InputIterator1, _InputIterator2> 6242: __mismatch(_InputIterator1 __first1, _InputIterator1 __last1, 6242: _InputIterator2 __first2, _BinaryPredicate __binary_pred) 6242: { 6242: while (__first1 != __last1 && __binary_pred(__first1, __first2)) 6242: { 6242: ++__first1; 6242: ++__first2; 6242: } 6242: return pair<_InputIterator1, _InputIterator2>(__first1, __first2); 6242: } 6242: # 1298 "/usr/include/c++/8/bits/stl_algobase.h" 3 6242: template 6242: inline pair<_InputIterator1, _InputIterator2> 6242: mismatch(_InputIterator1 __first1, _InputIterator1 __last1, 6242: _InputIterator2 __first2) 6242: { 6242: 6242: 6242: 6242: 6242: 6242: 6242: ; 6242: 6242: return std::__mismatch(__first1, __last1, __first2, 6242: __gnu_cxx::__ops::__iter_equal_to_iter()); 6242: } 6242: # 1331 "/usr/include/c++/8/bits/stl_algobase.h" 3 6242: template 6242: inline pair<_InputIterator1, _InputIterator2> 6242: mismatch(_InputIterator1 __first1, _InputIterator1 __last1, 6242: _InputIterator2 __first2, _BinaryPredicate __binary_pred) 6242: { 6242: 6242: 6242: 6242: ; 6242: 6242: return std::__mismatch(__first1, __last1, __first2, 6242: __gnu_cxx::__ops::__iter_comp_iter(__binary_pred)); 6242: } 6242: # 1431 "/usr/include/c++/8/bits/stl_algobase.h" 3 6242: 6242: 6242: } 6242: # 61 "/usr/include/c++/8/vector" 2 3 6242: # 1 "/usr/include/c++/8/bits/allocator.h" 1 3 6242: # 46 "/usr/include/c++/8/bits/allocator.h" 3 6242: # 1 "/usr/include/s390x-linux-gnu/c++/8/bits/c++allocator.h" 1 3 6242: # 33 "/usr/include/s390x-linux-gnu/c++/8/bits/c++allocator.h" 3 6242: # 1 "/usr/include/c++/8/ext/new_allocator.h" 1 3 6242: # 33 "/usr/include/c++/8/ext/new_allocator.h" 3 6242: # 1 "/usr/include/c++/8/new" 1 3 6242: # 37 "/usr/include/c++/8/new" 3 6242: 6242: # 38 "/usr/include/c++/8/new" 3 6242: 6242: 6242: # 1 "/usr/include/c++/8/exception" 1 3 6242: # 33 "/usr/include/c++/8/exception" 3 6242: 6242: # 34 "/usr/include/c++/8/exception" 3 6242: 6242: #pragma GCC visibility push(default) 6242: 6242: 6242: # 1 "/usr/include/c++/8/bits/exception.h" 1 3 6242: # 34 "/usr/include/c++/8/bits/exception.h" 3 6242: 6242: # 35 "/usr/include/c++/8/bits/exception.h" 3 6242: 6242: #pragma GCC visibility push(default) 6242: 6242: 6242: 6242: extern "C++" { 6242: 6242: namespace std 6242: { 6242: # 60 "/usr/include/c++/8/bits/exception.h" 3 6242: class exception 6242: { 6242: public: 6242: exception() noexcept { } 6242: virtual ~exception() noexcept; 6242: 6242: 6242: 6242: virtual const char* 6242: what() const noexcept; 6242: }; 6242: 6242: } 6242: 6242: } 6242: 6242: #pragma GCC visibility pop 6242: # 39 "/usr/include/c++/8/exception" 2 3 6242: 6242: extern "C++" { 6242: 6242: namespace std 6242: { 6242: 6242: 6242: class bad_exception : public exception 6242: { 6242: public: 6242: bad_exception() noexcept { } 6242: 6242: 6242: 6242: virtual ~bad_exception() noexcept; 6242: 6242: 6242: virtual const char* 6242: what() const noexcept; 6242: }; 6242: 6242: 6242: typedef void (*terminate_handler) (); 6242: 6242: 6242: typedef void (*unexpected_handler) (); 6242: 6242: 6242: terminate_handler set_terminate(terminate_handler) noexcept; 6242: 6242: 6242: 6242: terminate_handler get_terminate() noexcept; 6242: 6242: 6242: 6242: 6242: void terminate() noexcept __attribute__ ((__noreturn__)); 6242: 6242: 6242: unexpected_handler set_unexpected(unexpected_handler) noexcept; 6242: 6242: 6242: 6242: unexpected_handler get_unexpected() noexcept; 6242: 6242: 6242: 6242: 6242: void unexpected() __attribute__ ((__noreturn__)); 6242: # 101 "/usr/include/c++/8/exception" 3 6242: 6242: bool uncaught_exception() noexcept __attribute__ ((__pure__)); 6242: 6242: 6242: 6242: 6242: int uncaught_exceptions() noexcept __attribute__ ((__pure__)); 6242: 6242: 6242: 6242: } 6242: 6242: namespace __gnu_cxx 6242: { 6242: 6242: # 133 "/usr/include/c++/8/exception" 3 6242: void __verbose_terminate_handler(); 6242: 6242: 6242: } 6242: 6242: } 6242: 6242: #pragma GCC visibility pop 6242: 6242: 6242: # 1 "/usr/include/c++/8/bits/exception_ptr.h" 1 3 6242: # 34 "/usr/include/c++/8/bits/exception_ptr.h" 3 6242: #pragma GCC visibility push(default) 6242: 6242: 6242: 6242: # 1 "/usr/include/c++/8/bits/cxxabi_init_exception.h" 1 3 6242: # 34 "/usr/include/c++/8/bits/cxxabi_init_exception.h" 3 6242: 6242: # 35 "/usr/include/c++/8/bits/cxxabi_init_exception.h" 3 6242: 6242: #pragma GCC visibility push(default) 6242: 6242: # 1 "/usr/lib/gcc/s390x-linux-gnu/8/include/stddef.h" 1 3 4 6242: # 149 "/usr/lib/gcc/s390x-linux-gnu/8/include/stddef.h" 3 4 6242: typedef long int ptrdiff_t; 6242: # 216 "/usr/lib/gcc/s390x-linux-gnu/8/include/stddef.h" 3 4 6242: typedef long unsigned int size_t; 6242: # 426 "/usr/lib/gcc/s390x-linux-gnu/8/include/stddef.h" 3 4 6242: typedef struct { 6242: long long __max_align_ll __attribute__((__aligned__(__alignof__(long long)))); 6242: long double __max_align_ld __attribute__((__aligned__(__alignof__(long double)))); 6242: # 437 "/usr/lib/gcc/s390x-linux-gnu/8/include/stddef.h" 3 4 6242: } max_align_t; 6242: 6242: 6242: 6242: 6242: 6242: 6242: typedef decltype(nullptr) nullptr_t; 6242: # 39 "/usr/include/c++/8/bits/cxxabi_init_exception.h" 2 3 6242: # 50 "/usr/include/c++/8/bits/cxxabi_init_exception.h" 3 6242: namespace std 6242: { 6242: class type_info; 6242: } 6242: 6242: namespace __cxxabiv1 6242: { 6242: struct __cxa_refcounted_exception; 6242: 6242: extern "C" 6242: { 6242: 6242: void* 6242: __cxa_allocate_exception(size_t) noexcept; 6242: 6242: 6242: __cxa_refcounted_exception* 6242: __cxa_init_primary_exception(void *object, std::type_info *tinfo, 6242: void ( *dest) (void *)) noexcept; 6242: 6242: } 6242: } 6242: 6242: 6242: 6242: #pragma GCC visibility pop 6242: # 39 "/usr/include/c++/8/bits/exception_ptr.h" 2 3 6242: # 1 "/usr/include/c++/8/typeinfo" 1 3 6242: # 32 "/usr/include/c++/8/typeinfo" 3 6242: 6242: # 33 "/usr/include/c++/8/typeinfo" 3 6242: 6242: 6242: 6242: # 1 "/usr/include/c++/8/bits/hash_bytes.h" 1 3 6242: # 33 "/usr/include/c++/8/bits/hash_bytes.h" 3 6242: 6242: # 34 "/usr/include/c++/8/bits/hash_bytes.h" 3 6242: 6242: 6242: 6242: namespace std 6242: { 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: size_t 6242: _Hash_bytes(const void* __ptr, size_t __len, size_t __seed); 6242: 6242: 6242: 6242: 6242: 6242: size_t 6242: _Fnv_hash_bytes(const void* __ptr, size_t __len, size_t __seed); 6242: 6242: 6242: } 6242: # 37 "/usr/include/c++/8/typeinfo" 2 3 6242: 6242: 6242: #pragma GCC visibility push(default) 6242: 6242: extern "C++" { 6242: 6242: namespace __cxxabiv1 6242: { 6242: class __class_type_info; 6242: } 6242: # 80 "/usr/include/c++/8/typeinfo" 3 6242: namespace std 6242: { 6242: 6242: 6242: 6242: 6242: 6242: 6242: class type_info 6242: { 6242: public: 6242: 6242: 6242: 6242: 6242: virtual ~type_info(); 6242: 6242: 6242: 6242: const char* name() const noexcept 6242: { return __name[0] == '*' ? __name + 1 : __name; } 6242: # 115 "/usr/include/c++/8/typeinfo" 3 6242: bool before(const type_info& __arg) const noexcept 6242: { return (__name[0] == '*' && __arg.__name[0] == '*') 6242: ? __name < __arg.__name 6242: : __builtin_strcmp (__name, __arg.__name) < 0; } 6242: 6242: bool operator==(const type_info& __arg) const noexcept 6242: { 6242: return ((__name == __arg.__name) 6242: || (__name[0] != '*' && 6242: __builtin_strcmp (__name, __arg.__name) == 0)); 6242: } 6242: # 136 "/usr/include/c++/8/typeinfo" 3 6242: bool operator!=(const type_info& __arg) const noexcept 6242: { return !operator==(__arg); } 6242: 6242: 6242: size_t hash_code() const noexcept 6242: { 6242: 6242: return _Hash_bytes(name(), __builtin_strlen(name()), 6242: static_cast(0xc70f6907UL)); 6242: 6242: 6242: 6242: } 6242: 6242: 6242: 6242: virtual bool __is_pointer_p() const; 6242: 6242: 6242: virtual bool __is_function_p() const; 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: virtual bool __do_catch(const type_info *__thr_type, void **__thr_obj, 6242: unsigned __outer) const; 6242: 6242: 6242: virtual bool __do_upcast(const __cxxabiv1::__class_type_info *__target, 6242: void **__obj_ptr) const; 6242: 6242: protected: 6242: const char *__name; 6242: 6242: explicit type_info(const char *__n): __name(__n) { } 6242: 6242: private: 6242: 6242: type_info& operator=(const type_info&); 6242: type_info(const type_info&); 6242: }; 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: class bad_cast : public exception 6242: { 6242: public: 6242: bad_cast() noexcept { } 6242: 6242: 6242: 6242: virtual ~bad_cast() noexcept; 6242: 6242: 6242: virtual const char* what() const noexcept; 6242: }; 6242: 6242: 6242: 6242: 6242: 6242: class bad_typeid : public exception 6242: { 6242: public: 6242: bad_typeid () noexcept { } 6242: 6242: 6242: 6242: virtual ~bad_typeid() noexcept; 6242: 6242: 6242: virtual const char* what() const noexcept; 6242: }; 6242: } 6242: 6242: } 6242: 6242: #pragma GCC visibility pop 6242: # 40 "/usr/include/c++/8/bits/exception_ptr.h" 2 3 6242: # 1 "/usr/include/c++/8/new" 1 3 6242: # 41 "/usr/include/c++/8/bits/exception_ptr.h" 2 3 6242: 6242: extern "C++" { 6242: 6242: namespace std 6242: { 6242: class type_info; 6242: 6242: 6242: 6242: 6242: 6242: namespace __exception_ptr 6242: { 6242: class exception_ptr; 6242: } 6242: 6242: using __exception_ptr::exception_ptr; 6242: 6242: 6242: 6242: 6242: 6242: exception_ptr current_exception() noexcept; 6242: 6242: template 6242: exception_ptr make_exception_ptr(_Ex) noexcept; 6242: 6242: 6242: void rethrow_exception(exception_ptr) __attribute__ ((__noreturn__)); 6242: 6242: namespace __exception_ptr 6242: { 6242: using std::rethrow_exception; 6242: 6242: 6242: 6242: 6242: 6242: class exception_ptr 6242: { 6242: void* _M_exception_object; 6242: 6242: explicit exception_ptr(void* __e) noexcept; 6242: 6242: void _M_addref() noexcept; 6242: void _M_release() noexcept; 6242: 6242: void *_M_get() const noexcept __attribute__ ((__pure__)); 6242: 6242: friend exception_ptr std::current_exception() noexcept; 6242: friend void std::rethrow_exception(exception_ptr); 6242: template 6242: friend exception_ptr std::make_exception_ptr(_Ex) noexcept; 6242: 6242: public: 6242: exception_ptr() noexcept; 6242: 6242: exception_ptr(const exception_ptr&) noexcept; 6242: 6242: 6242: exception_ptr(nullptr_t) noexcept 6242: : _M_exception_object(0) 6242: { } 6242: 6242: exception_ptr(exception_ptr&& __o) noexcept 6242: : _M_exception_object(__o._M_exception_object) 6242: { __o._M_exception_object = 0; } 6242: # 117 "/usr/include/c++/8/bits/exception_ptr.h" 3 6242: exception_ptr& 6242: operator=(const exception_ptr&) noexcept; 6242: 6242: 6242: exception_ptr& 6242: operator=(exception_ptr&& __o) noexcept 6242: { 6242: exception_ptr(static_cast(__o)).swap(*this); 6242: return *this; 6242: } 6242: 6242: 6242: ~exception_ptr() noexcept; 6242: 6242: void 6242: swap(exception_ptr&) noexcept; 6242: # 144 "/usr/include/c++/8/bits/exception_ptr.h" 3 6242: explicit operator bool() const 6242: { return _M_exception_object; } 6242: 6242: 6242: friend bool 6242: operator==(const exception_ptr&, const exception_ptr&) 6242: noexcept __attribute__ ((__pure__)); 6242: 6242: const class std::type_info* 6242: __cxa_exception_type() const noexcept 6242: __attribute__ ((__pure__)); 6242: }; 6242: 6242: bool 6242: operator==(const exception_ptr&, const exception_ptr&) 6242: noexcept __attribute__ ((__pure__)); 6242: 6242: bool 6242: operator!=(const exception_ptr&, const exception_ptr&) 6242: noexcept __attribute__ ((__pure__)); 6242: 6242: inline void 6242: swap(exception_ptr& __lhs, exception_ptr& __rhs) 6242: { __lhs.swap(__rhs); } 6242: 6242: template 6242: inline void 6242: __dest_thunk(void* __x) 6242: { static_cast<_Ex*>(__x)->~_Ex(); } 6242: 6242: } 6242: 6242: 6242: template 6242: exception_ptr 6242: make_exception_ptr(_Ex __ex) noexcept 6242: { 6242: 6242: try 6242: { 6242: 6242: void *__e = __cxxabiv1::__cxa_allocate_exception(sizeof(_Ex)); 6242: (void)__cxxabiv1::__cxa_init_primary_exception( 6242: __e, const_cast(&typeid(__ex)), 6242: __exception_ptr::__dest_thunk<_Ex>); 6242: ::new (__e) _Ex(__ex); 6242: return exception_ptr(__e); 6242: 6242: 6242: 6242: } 6242: catch(...) 6242: { 6242: return current_exception(); 6242: } 6242: 6242: 6242: 6242: } 6242: 6242: 6242: } 6242: 6242: } 6242: 6242: #pragma GCC visibility pop 6242: # 144 "/usr/include/c++/8/exception" 2 3 6242: # 1 "/usr/include/c++/8/bits/nested_exception.h" 1 3 6242: # 33 "/usr/include/c++/8/bits/nested_exception.h" 3 6242: #pragma GCC visibility push(default) 6242: # 42 "/usr/include/c++/8/bits/nested_exception.h" 3 6242: extern "C++" { 6242: 6242: namespace std 6242: { 6242: 6242: 6242: 6242: 6242: 6242: 6242: class nested_exception 6242: { 6242: exception_ptr _M_ptr; 6242: 6242: public: 6242: nested_exception() noexcept : _M_ptr(current_exception()) { } 6242: 6242: nested_exception(const nested_exception&) noexcept = default; 6242: 6242: nested_exception& operator=(const nested_exception&) noexcept = default; 6242: 6242: virtual ~nested_exception() noexcept; 6242: 6242: [[noreturn]] 6242: void 6242: rethrow_nested() const 6242: { 6242: if (_M_ptr) 6242: rethrow_exception(_M_ptr); 6242: std::terminate(); 6242: } 6242: 6242: exception_ptr 6242: nested_ptr() const noexcept 6242: { return _M_ptr; } 6242: }; 6242: 6242: template 6242: struct _Nested_exception : public _Except, public nested_exception 6242: { 6242: explicit _Nested_exception(const _Except& __ex) 6242: : _Except(__ex) 6242: { } 6242: 6242: explicit _Nested_exception(_Except&& __ex) 6242: : _Except(static_cast<_Except&&>(__ex)) 6242: { } 6242: }; 6242: 6242: 6242: 6242: 6242: template 6242: [[noreturn]] 6242: inline void 6242: __throw_with_nested_impl(_Tp&& __t, true_type) 6242: { 6242: using _Up = typename remove_reference<_Tp>::type; 6242: throw _Nested_exception<_Up>{std::forward<_Tp>(__t)}; 6242: } 6242: 6242: template 6242: [[noreturn]] 6242: inline void 6242: __throw_with_nested_impl(_Tp&& __t, false_type) 6242: { throw std::forward<_Tp>(__t); } 6242: 6242: 6242: 6242: template 6242: [[noreturn]] 6242: inline void 6242: throw_with_nested(_Tp&& __t) 6242: { 6242: using _Up = typename decay<_Tp>::type; 6242: using _CopyConstructible 6242: = __and_, is_move_constructible<_Up>>; 6242: static_assert(_CopyConstructible::value, 6242: "throw_with_nested argument must be CopyConstructible"); 6242: using __nest = __and_, __bool_constant, 6242: __not_>>; 6242: std::__throw_with_nested_impl(std::forward<_Tp>(__t), __nest{}); 6242: } 6242: 6242: 6242: template 6242: using __rethrow_if_nested_cond = typename enable_if< 6242: __and_, 6242: __or_<__not_>, 6242: is_convertible<_Tp*, nested_exception*>>>::value 6242: >::type; 6242: 6242: 6242: template 6242: inline __rethrow_if_nested_cond<_Ex> 6242: __rethrow_if_nested_impl(const _Ex* __ptr) 6242: { 6242: if (auto __ne_ptr = dynamic_cast(__ptr)) 6242: __ne_ptr->rethrow_nested(); 6242: } 6242: 6242: 6242: inline void 6242: __rethrow_if_nested_impl(const void*) 6242: { } 6242: 6242: 6242: template 6242: inline void 6242: rethrow_if_nested(const _Ex& __ex) 6242: { std::__rethrow_if_nested_impl(std::__addressof(__ex)); } 6242: 6242: 6242: } 6242: 6242: } 6242: 6242: 6242: 6242: #pragma GCC visibility pop 6242: # 145 "/usr/include/c++/8/exception" 2 3 6242: # 41 "/usr/include/c++/8/new" 2 3 6242: 6242: #pragma GCC visibility push(default) 6242: 6242: extern "C++" { 6242: 6242: namespace std 6242: { 6242: 6242: 6242: 6242: 6242: 6242: 6242: class bad_alloc : public exception 6242: { 6242: public: 6242: bad_alloc() throw() { } 6242: 6242: 6242: 6242: virtual ~bad_alloc() throw(); 6242: 6242: 6242: virtual const char* what() const throw(); 6242: }; 6242: 6242: 6242: class bad_array_new_length : public bad_alloc 6242: { 6242: public: 6242: bad_array_new_length() throw() { } 6242: 6242: 6242: 6242: virtual ~bad_array_new_length() throw(); 6242: 6242: 6242: virtual const char* what() const throw(); 6242: }; 6242: 6242: 6242: 6242: 6242: 6242: 6242: struct nothrow_t 6242: { 6242: 6242: explicit nothrow_t() = default; 6242: 6242: }; 6242: 6242: extern const nothrow_t nothrow; 6242: 6242: 6242: 6242: typedef void (*new_handler)(); 6242: 6242: 6242: 6242: new_handler set_new_handler(new_handler) throw(); 6242: 6242: 6242: 6242: new_handler get_new_handler() noexcept; 6242: 6242: } 6242: # 120 "/usr/include/c++/8/new" 3 6242: void* operator new(std::size_t) 6242: __attribute__((__externally_visible__)); 6242: void* operator new[](std::size_t) 6242: __attribute__((__externally_visible__)); 6242: void operator delete(void*) noexcept 6242: __attribute__((__externally_visible__)); 6242: void operator delete[](void*) noexcept 6242: __attribute__((__externally_visible__)); 6242: 6242: 6242: 6242: 6242: 6242: 6242: void* operator new(std::size_t, const std::nothrow_t&) noexcept 6242: __attribute__((__externally_visible__)); 6242: void* operator new[](std::size_t, const std::nothrow_t&) noexcept 6242: __attribute__((__externally_visible__)); 6242: void operator delete(void*, const std::nothrow_t&) noexcept 6242: __attribute__((__externally_visible__)); 6242: void operator delete[](void*, const std::nothrow_t&) noexcept 6242: __attribute__((__externally_visible__)); 6242: # 168 "/usr/include/c++/8/new" 3 6242: inline void* operator new(std::size_t, void* __p) noexcept 6242: { return __p; } 6242: inline void* operator new[](std::size_t, void* __p) noexcept 6242: { return __p; } 6242: 6242: 6242: inline void operator delete (void*, void*) noexcept { } 6242: inline void operator delete[](void*, void*) noexcept { } 6242: 6242: } 6242: # 216 "/usr/include/c++/8/new" 3 6242: #pragma GCC visibility pop 6242: # 34 "/usr/include/c++/8/ext/new_allocator.h" 2 3 6242: 6242: 6242: 6242: 6242: 6242: 6242: namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) 6242: { 6242: 6242: 6242: using std::size_t; 6242: using std::ptrdiff_t; 6242: # 57 "/usr/include/c++/8/ext/new_allocator.h" 3 6242: template 6242: class new_allocator 6242: { 6242: public: 6242: typedef size_t size_type; 6242: typedef ptrdiff_t difference_type; 6242: typedef _Tp* pointer; 6242: typedef const _Tp* const_pointer; 6242: typedef _Tp& reference; 6242: typedef const _Tp& const_reference; 6242: typedef _Tp value_type; 6242: 6242: template 6242: struct rebind 6242: { typedef new_allocator<_Tp1> other; }; 6242: 6242: 6242: 6242: 6242: typedef std::true_type propagate_on_container_move_assignment; 6242: 6242: 6242: new_allocator() noexcept { } 6242: 6242: new_allocator(const new_allocator&) noexcept { } 6242: 6242: template 6242: new_allocator(const new_allocator<_Tp1>&) noexcept { } 6242: 6242: ~new_allocator() noexcept { } 6242: 6242: pointer 6242: address(reference __x) const noexcept 6242: { return std::__addressof(__x); } 6242: 6242: const_pointer 6242: address(const_reference __x) const noexcept 6242: { return std::__addressof(__x); } 6242: 6242: 6242: 6242: pointer 6242: allocate(size_type __n, const void* = static_cast(0)) 6242: { 6242: if (__n > this->max_size()) 6242: std::__throw_bad_alloc(); 6242: # 111 "/usr/include/c++/8/ext/new_allocator.h" 3 6242: return static_cast<_Tp*>(::operator new(__n * sizeof(_Tp))); 6242: } 6242: 6242: 6242: void 6242: deallocate(pointer __p, size_type) 6242: { 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: ::operator delete(__p); 6242: } 6242: 6242: size_type 6242: max_size() const noexcept 6242: { return size_t(-1) / sizeof(_Tp); } 6242: 6242: 6242: template 6242: void 6242: construct(_Up* __p, _Args&&... __args) 6242: { ::new((void *)__p) _Up(std::forward<_Args>(__args)...); } 6242: 6242: template 6242: void 6242: destroy(_Up* __p) { __p->~_Up(); } 6242: # 151 "/usr/include/c++/8/ext/new_allocator.h" 3 6242: }; 6242: 6242: template 6242: inline bool 6242: operator==(const new_allocator<_Tp>&, const new_allocator<_Tp>&) 6242: { return true; } 6242: 6242: template 6242: inline bool 6242: operator!=(const new_allocator<_Tp>&, const new_allocator<_Tp>&) 6242: { return false; } 6242: 6242: 6242: } 6242: # 34 "/usr/include/s390x-linux-gnu/c++/8/bits/c++allocator.h" 2 3 6242: 6242: 6242: namespace std 6242: { 6242: # 47 "/usr/include/s390x-linux-gnu/c++/8/bits/c++allocator.h" 3 6242: template 6242: using __allocator_base = __gnu_cxx::new_allocator<_Tp>; 6242: } 6242: # 47 "/usr/include/c++/8/bits/allocator.h" 2 3 6242: # 1 "/usr/include/c++/8/bits/memoryfwd.h" 1 3 6242: # 46 "/usr/include/c++/8/bits/memoryfwd.h" 3 6242: 6242: # 47 "/usr/include/c++/8/bits/memoryfwd.h" 3 6242: 6242: 6242: 6242: namespace std __attribute__ ((__visibility__ ("default"))) 6242: { 6242: 6242: # 63 "/usr/include/c++/8/bits/memoryfwd.h" 3 6242: template 6242: class allocator; 6242: 6242: template<> 6242: class allocator; 6242: 6242: 6242: template 6242: struct uses_allocator; 6242: 6242: 6242: 6242: 6242: } 6242: # 48 "/usr/include/c++/8/bits/allocator.h" 2 3 6242: # 57 "/usr/include/c++/8/bits/allocator.h" 3 6242: namespace std __attribute__ ((__visibility__ ("default"))) 6242: { 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: template<> 6242: class allocator 6242: { 6242: public: 6242: typedef size_t size_type; 6242: typedef ptrdiff_t difference_type; 6242: typedef void* pointer; 6242: typedef const void* const_pointer; 6242: typedef void value_type; 6242: 6242: template 6242: struct rebind 6242: { typedef allocator<_Tp1> other; }; 6242: 6242: 6242: 6242: 6242: typedef true_type propagate_on_container_move_assignment; 6242: 6242: typedef true_type is_always_equal; 6242: 6242: template 6242: void 6242: construct(_Up* __p, _Args&&... __args) 6242: { ::new((void *)__p) _Up(std::forward<_Args>(__args)...); } 6242: 6242: template 6242: void 6242: destroy(_Up* __p) { __p->~_Up(); } 6242: 6242: }; 6242: # 107 "/usr/include/c++/8/bits/allocator.h" 3 6242: template 6242: class allocator : public __allocator_base<_Tp> 6242: { 6242: public: 6242: typedef size_t size_type; 6242: typedef ptrdiff_t difference_type; 6242: typedef _Tp* pointer; 6242: typedef const _Tp* const_pointer; 6242: typedef _Tp& reference; 6242: typedef const _Tp& const_reference; 6242: typedef _Tp value_type; 6242: 6242: template 6242: struct rebind 6242: { typedef allocator<_Tp1> other; }; 6242: 6242: 6242: 6242: 6242: typedef true_type propagate_on_container_move_assignment; 6242: 6242: typedef true_type is_always_equal; 6242: 6242: 6242: allocator() throw() { } 6242: 6242: allocator(const allocator& __a) throw() 6242: : __allocator_base<_Tp>(__a) { } 6242: 6242: template 6242: allocator(const allocator<_Tp1>&) throw() { } 6242: 6242: ~allocator() throw() { } 6242: 6242: 6242: }; 6242: 6242: template 6242: inline bool 6242: operator==(const allocator<_T1>&, const allocator<_T2>&) 6242: noexcept 6242: { return true; } 6242: 6242: template 6242: inline bool 6242: operator==(const allocator<_Tp>&, const allocator<_Tp>&) 6242: noexcept 6242: { return true; } 6242: 6242: template 6242: inline bool 6242: operator!=(const allocator<_T1>&, const allocator<_T2>&) 6242: noexcept 6242: { return false; } 6242: 6242: template 6242: inline bool 6242: operator!=(const allocator<_Tp>&, const allocator<_Tp>&) 6242: noexcept 6242: { return false; } 6242: 6242: 6242: 6242: template 6242: class allocator 6242: { 6242: public: 6242: typedef _Tp value_type; 6242: template allocator(const allocator<_Up>&) { } 6242: }; 6242: 6242: template 6242: class allocator 6242: { 6242: public: 6242: typedef _Tp value_type; 6242: template allocator(const allocator<_Up>&) { } 6242: }; 6242: 6242: template 6242: class allocator 6242: { 6242: public: 6242: typedef _Tp value_type; 6242: template allocator(const allocator<_Up>&) { } 6242: }; 6242: 6242: 6242: 6242: 6242: 6242: 6242: extern template class allocator; 6242: extern template class allocator; 6242: 6242: 6242: 6242: 6242: 6242: 6242: template 6242: struct __alloc_swap 6242: { static void _S_do_it(_Alloc&, _Alloc&) noexcept { } }; 6242: 6242: template 6242: struct __alloc_swap<_Alloc, false> 6242: { 6242: static void 6242: _S_do_it(_Alloc& __one, _Alloc& __two) noexcept 6242: { 6242: 6242: if (__one != __two) 6242: swap(__one, __two); 6242: } 6242: }; 6242: 6242: 6242: template 6242: struct __alloc_neq 6242: { 6242: static bool 6242: _S_do_it(const _Alloc&, const _Alloc&) 6242: { return false; } 6242: }; 6242: 6242: template 6242: struct __alloc_neq<_Alloc, false> 6242: { 6242: static bool 6242: _S_do_it(const _Alloc& __one, const _Alloc& __two) 6242: { return __one != __two; } 6242: }; 6242: 6242: 6242: template, 6242: is_nothrow_move_constructible>::value> 6242: struct __shrink_to_fit_aux 6242: { static bool _S_do_it(_Tp&) noexcept { return false; } }; 6242: 6242: template 6242: struct __shrink_to_fit_aux<_Tp, true> 6242: { 6242: static bool 6242: _S_do_it(_Tp& __c) noexcept 6242: { 6242: 6242: try 6242: { 6242: _Tp(__make_move_if_noexcept_iterator(__c.begin()), 6242: __make_move_if_noexcept_iterator(__c.end()), 6242: __c.get_allocator()).swap(__c); 6242: return true; 6242: } 6242: catch(...) 6242: { return false; } 6242: 6242: 6242: 6242: } 6242: }; 6242: 6242: 6242: 6242: } 6242: # 62 "/usr/include/c++/8/vector" 2 3 6242: # 1 "/usr/include/c++/8/bits/stl_construct.h" 1 3 6242: # 61 "/usr/include/c++/8/bits/stl_construct.h" 3 6242: # 1 "/usr/include/c++/8/ext/alloc_traits.h" 1 3 6242: # 32 "/usr/include/c++/8/ext/alloc_traits.h" 3 6242: 6242: # 33 "/usr/include/c++/8/ext/alloc_traits.h" 3 6242: 6242: 6242: 6242: # 1 "/usr/include/c++/8/bits/alloc_traits.h" 1 3 6242: # 41 "/usr/include/c++/8/bits/alloc_traits.h" 3 6242: namespace std __attribute__ ((__visibility__ ("default"))) 6242: { 6242: 6242: 6242: struct __allocator_traits_base 6242: { 6242: template 6242: struct __rebind : __replace_first_arg<_Tp, _Up> { }; 6242: 6242: template 6242: struct __rebind<_Tp, _Up, 6242: __void_t::other>> 6242: { using type = typename _Tp::template rebind<_Up>::other; }; 6242: 6242: protected: 6242: template 6242: using __pointer = typename _Tp::pointer; 6242: template 6242: using __c_pointer = typename _Tp::const_pointer; 6242: template 6242: using __v_pointer = typename _Tp::void_pointer; 6242: template 6242: using __cv_pointer = typename _Tp::const_void_pointer; 6242: template 6242: using __pocca = typename _Tp::propagate_on_container_copy_assignment; 6242: template 6242: using __pocma = typename _Tp::propagate_on_container_move_assignment; 6242: template 6242: using __pocs = typename _Tp::propagate_on_container_swap; 6242: template 6242: using __equal = typename _Tp::is_always_equal; 6242: }; 6242: 6242: template 6242: using __alloc_rebind 6242: = typename __allocator_traits_base::template __rebind<_Alloc, _Up>::type; 6242: 6242: 6242: 6242: 6242: 6242: template 6242: struct allocator_traits : __allocator_traits_base 6242: { 6242: 6242: typedef _Alloc allocator_type; 6242: 6242: typedef typename _Alloc::value_type value_type; 6242: 6242: 6242: 6242: 6242: 6242: 6242: using pointer = __detected_or_t; 6242: 6242: private: 6242: 6242: template class _Func, typename _Tp, typename = void> 6242: struct _Ptr 6242: { 6242: using type = typename pointer_traits::template rebind<_Tp>; 6242: }; 6242: 6242: template class _Func, typename _Tp> 6242: struct _Ptr<_Func, _Tp, __void_t<_Func<_Alloc>>> 6242: { 6242: using type = _Func<_Alloc>; 6242: }; 6242: 6242: 6242: template 6242: struct _Diff 6242: { using type = typename pointer_traits<_PtrT>::difference_type; }; 6242: 6242: template 6242: struct _Diff<_A2, _PtrT, __void_t> 6242: { using type = typename _A2::difference_type; }; 6242: 6242: 6242: template 6242: struct _Size : make_unsigned<_DiffT> { }; 6242: 6242: template 6242: struct _Size<_A2, _DiffT, __void_t> 6242: { using type = typename _A2::size_type; }; 6242: 6242: public: 6242: 6242: 6242: 6242: 6242: 6242: 6242: using const_pointer = typename _Ptr<__c_pointer, const value_type>::type; 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: using void_pointer = typename _Ptr<__v_pointer, void>::type; 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: using const_void_pointer = typename _Ptr<__cv_pointer, const void>::type; 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: using difference_type = typename _Diff<_Alloc, pointer>::type; 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: using size_type = typename _Size<_Alloc, difference_type>::type; 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: using propagate_on_container_copy_assignment 6242: = __detected_or_t; 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: using propagate_on_container_move_assignment 6242: = __detected_or_t; 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: using propagate_on_container_swap 6242: = __detected_or_t; 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: using is_always_equal 6242: = __detected_or_t::type, __equal, _Alloc>; 6242: 6242: template 6242: using rebind_alloc = __alloc_rebind<_Alloc, _Tp>; 6242: template 6242: using rebind_traits = allocator_traits>; 6242: 6242: private: 6242: template 6242: static auto 6242: _S_allocate(_Alloc2& __a, size_type __n, const_void_pointer __hint, int) 6242: -> decltype(__a.allocate(__n, __hint)) 6242: { return __a.allocate(__n, __hint); } 6242: 6242: template 6242: static pointer 6242: _S_allocate(_Alloc2& __a, size_type __n, const_void_pointer, ...) 6242: { return __a.allocate(__n); } 6242: 6242: template 6242: struct __construct_helper 6242: { 6242: template()->construct( 6242: std::declval<_Tp*>(), std::declval<_Args>()...))> 6242: static true_type __test(int); 6242: 6242: template 6242: static false_type __test(...); 6242: 6242: using type = decltype(__test<_Alloc>(0)); 6242: }; 6242: 6242: template 6242: using __has_construct 6242: = typename __construct_helper<_Tp, _Args...>::type; 6242: 6242: template 6242: static _Require<__has_construct<_Tp, _Args...>> 6242: _S_construct(_Alloc& __a, _Tp* __p, _Args&&... __args) 6242: { __a.construct(__p, std::forward<_Args>(__args)...); } 6242: 6242: template 6242: static 6242: _Require<__and_<__not_<__has_construct<_Tp, _Args...>>, 6242: is_constructible<_Tp, _Args...>>> 6242: _S_construct(_Alloc&, _Tp* __p, _Args&&... __args) 6242: { ::new((void*)__p) _Tp(std::forward<_Args>(__args)...); } 6242: 6242: template 6242: static auto 6242: _S_destroy(_Alloc2& __a, _Tp* __p, int) 6242: -> decltype(__a.destroy(__p)) 6242: { __a.destroy(__p); } 6242: 6242: template 6242: static void 6242: _S_destroy(_Alloc2&, _Tp* __p, ...) 6242: { __p->~_Tp(); } 6242: 6242: template 6242: static auto 6242: _S_max_size(_Alloc2& __a, int) 6242: -> decltype(__a.max_size()) 6242: { return __a.max_size(); } 6242: 6242: template 6242: static size_type 6242: _S_max_size(_Alloc2&, ...) 6242: { 6242: 6242: 6242: return __gnu_cxx::__numeric_traits::__max 6242: / sizeof(value_type); 6242: } 6242: 6242: template 6242: static auto 6242: _S_select(_Alloc2& __a, int) 6242: -> decltype(__a.select_on_container_copy_construction()) 6242: { return __a.select_on_container_copy_construction(); } 6242: 6242: template 6242: static _Alloc2 6242: _S_select(_Alloc2& __a, ...) 6242: { return __a; } 6242: 6242: public: 6242: # 299 "/usr/include/c++/8/bits/alloc_traits.h" 3 6242: static pointer 6242: allocate(_Alloc& __a, size_type __n) 6242: { return __a.allocate(__n); } 6242: # 314 "/usr/include/c++/8/bits/alloc_traits.h" 3 6242: static pointer 6242: allocate(_Alloc& __a, size_type __n, const_void_pointer __hint) 6242: { return _S_allocate(__a, __n, __hint, 0); } 6242: # 326 "/usr/include/c++/8/bits/alloc_traits.h" 3 6242: static void 6242: deallocate(_Alloc& __a, pointer __p, size_type __n) 6242: { __a.deallocate(__p, __n); } 6242: # 341 "/usr/include/c++/8/bits/alloc_traits.h" 3 6242: template 6242: static auto construct(_Alloc& __a, _Tp* __p, _Args&&... __args) 6242: -> decltype(_S_construct(__a, __p, std::forward<_Args>(__args)...)) 6242: { _S_construct(__a, __p, std::forward<_Args>(__args)...); } 6242: # 354 "/usr/include/c++/8/bits/alloc_traits.h" 3 6242: template 6242: static void destroy(_Alloc& __a, _Tp* __p) 6242: { _S_destroy(__a, __p, 0); } 6242: # 366 "/usr/include/c++/8/bits/alloc_traits.h" 3 6242: static size_type max_size(const _Alloc& __a) noexcept 6242: { return _S_max_size(__a, 0); } 6242: # 377 "/usr/include/c++/8/bits/alloc_traits.h" 3 6242: static _Alloc 6242: select_on_container_copy_construction(const _Alloc& __rhs) 6242: { return _S_select(__rhs, 0); } 6242: }; 6242: 6242: 6242: template 6242: struct allocator_traits> 6242: { 6242: 6242: using allocator_type = allocator<_Tp>; 6242: 6242: using value_type = _Tp; 6242: 6242: 6242: using pointer = _Tp*; 6242: 6242: 6242: using const_pointer = const _Tp*; 6242: 6242: 6242: using void_pointer = void*; 6242: 6242: 6242: using const_void_pointer = const void*; 6242: 6242: 6242: using difference_type = std::ptrdiff_t; 6242: 6242: 6242: using size_type = std::size_t; 6242: 6242: 6242: using propagate_on_container_copy_assignment = false_type; 6242: 6242: 6242: using propagate_on_container_move_assignment = true_type; 6242: 6242: 6242: using propagate_on_container_swap = false_type; 6242: 6242: 6242: using is_always_equal = true_type; 6242: 6242: template 6242: using rebind_alloc = allocator<_Up>; 6242: 6242: template 6242: using rebind_traits = allocator_traits>; 6242: # 434 "/usr/include/c++/8/bits/alloc_traits.h" 3 6242: static pointer 6242: allocate(allocator_type& __a, size_type __n) 6242: { return __a.allocate(__n); } 6242: # 448 "/usr/include/c++/8/bits/alloc_traits.h" 3 6242: static pointer 6242: allocate(allocator_type& __a, size_type __n, const_void_pointer __hint) 6242: { return __a.allocate(__n, __hint); } 6242: # 460 "/usr/include/c++/8/bits/alloc_traits.h" 3 6242: static void 6242: deallocate(allocator_type& __a, pointer __p, size_type __n) 6242: { __a.deallocate(__p, __n); } 6242: # 472 "/usr/include/c++/8/bits/alloc_traits.h" 3 6242: template 6242: static void 6242: construct(allocator_type& __a, _Up* __p, _Args&&... __args) 6242: { __a.construct(__p, std::forward<_Args>(__args)...); } 6242: # 484 "/usr/include/c++/8/bits/alloc_traits.h" 3 6242: template 6242: static void 6242: destroy(allocator_type& __a, _Up* __p) 6242: { __a.destroy(__p); } 6242: 6242: 6242: 6242: 6242: 6242: 6242: static size_type 6242: max_size(const allocator_type& __a) noexcept 6242: { return __a.max_size(); } 6242: 6242: 6242: 6242: 6242: 6242: 6242: static allocator_type 6242: select_on_container_copy_construction(const allocator_type& __rhs) 6242: { return __rhs; } 6242: }; 6242: 6242: 6242: template 6242: inline void 6242: __do_alloc_on_copy(_Alloc& __one, const _Alloc& __two, true_type) 6242: { __one = __two; } 6242: 6242: template 6242: inline void 6242: __do_alloc_on_copy(_Alloc&, const _Alloc&, false_type) 6242: { } 6242: 6242: template 6242: inline void __alloc_on_copy(_Alloc& __one, const _Alloc& __two) 6242: { 6242: typedef allocator_traits<_Alloc> __traits; 6242: typedef typename __traits::propagate_on_container_copy_assignment __pocca; 6242: __do_alloc_on_copy(__one, __two, __pocca()); 6242: } 6242: 6242: template 6242: inline _Alloc __alloc_on_copy(const _Alloc& __a) 6242: { 6242: typedef allocator_traits<_Alloc> __traits; 6242: return __traits::select_on_container_copy_construction(__a); 6242: } 6242: 6242: template 6242: inline void __do_alloc_on_move(_Alloc& __one, _Alloc& __two, true_type) 6242: { __one = std::move(__two); } 6242: 6242: template 6242: inline void __do_alloc_on_move(_Alloc&, _Alloc&, false_type) 6242: { } 6242: 6242: template 6242: inline void __alloc_on_move(_Alloc& __one, _Alloc& __two) 6242: { 6242: typedef allocator_traits<_Alloc> __traits; 6242: typedef typename __traits::propagate_on_container_move_assignment __pocma; 6242: __do_alloc_on_move(__one, __two, __pocma()); 6242: } 6242: 6242: template 6242: inline void __do_alloc_on_swap(_Alloc& __one, _Alloc& __two, true_type) 6242: { 6242: using std::swap; 6242: swap(__one, __two); 6242: } 6242: 6242: template 6242: inline void __do_alloc_on_swap(_Alloc&, _Alloc&, false_type) 6242: { } 6242: 6242: template 6242: inline void __alloc_on_swap(_Alloc& __one, _Alloc& __two) 6242: { 6242: typedef allocator_traits<_Alloc> __traits; 6242: typedef typename __traits::propagate_on_container_swap __pocs; 6242: __do_alloc_on_swap(__one, __two, __pocs()); 6242: } 6242: 6242: template 6242: class __is_copy_insertable_impl 6242: { 6242: typedef allocator_traits<_Alloc> _Traits; 6242: 6242: template(), 6242: std::declval<_Up*>(), 6242: std::declval()))> 6242: static true_type 6242: _M_select(int); 6242: 6242: template 6242: static false_type 6242: _M_select(...); 6242: 6242: public: 6242: typedef decltype(_M_select(0)) type; 6242: }; 6242: 6242: 6242: template 6242: struct __is_copy_insertable 6242: : __is_copy_insertable_impl<_Alloc>::type 6242: { }; 6242: 6242: 6242: template 6242: struct __is_copy_insertable> 6242: : is_copy_constructible<_Tp> 6242: { }; 6242: 6242: 6242: 6242: template 6242: struct __is_allocator : false_type { }; 6242: 6242: template 6242: struct __is_allocator<_Alloc, 6242: __void_t().allocate(size_t{}))>> 6242: : true_type { }; 6242: 6242: template 6242: using _RequireAllocator 6242: = typename enable_if<__is_allocator<_Alloc>::value, _Alloc>::type; 6242: 6242: 6242: 6242: } 6242: # 37 "/usr/include/c++/8/ext/alloc_traits.h" 2 3 6242: 6242: 6242: 6242: 6242: namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) 6242: { 6242: 6242: 6242: 6242: 6242: 6242: 6242: template 6242: struct __alloc_traits 6242: 6242: : std::allocator_traits<_Alloc> 6242: 6242: { 6242: typedef _Alloc allocator_type; 6242: 6242: typedef std::allocator_traits<_Alloc> _Base_type; 6242: typedef typename _Base_type::value_type value_type; 6242: typedef typename _Base_type::pointer pointer; 6242: typedef typename _Base_type::const_pointer const_pointer; 6242: typedef typename _Base_type::size_type size_type; 6242: typedef typename _Base_type::difference_type difference_type; 6242: 6242: typedef value_type& reference; 6242: typedef const value_type& const_reference; 6242: using _Base_type::allocate; 6242: using _Base_type::deallocate; 6242: using _Base_type::construct; 6242: using _Base_type::destroy; 6242: using _Base_type::max_size; 6242: 6242: private: 6242: template 6242: using __is_custom_pointer 6242: = std::__and_, 6242: std::__not_>>; 6242: 6242: public: 6242: 6242: template 6242: static typename std::enable_if<__is_custom_pointer<_Ptr>::value>::type 6242: construct(_Alloc& __a, _Ptr __p, _Args&&... __args) 6242: { 6242: _Base_type::construct(__a, std::__to_address(__p), 6242: std::forward<_Args>(__args)...); 6242: } 6242: 6242: 6242: template 6242: static typename std::enable_if<__is_custom_pointer<_Ptr>::value>::type 6242: destroy(_Alloc& __a, _Ptr __p) 6242: { _Base_type::destroy(__a, std::__to_address(__p)); } 6242: 6242: static _Alloc _S_select_on_copy(const _Alloc& __a) 6242: { return _Base_type::select_on_container_copy_construction(__a); } 6242: 6242: static void _S_on_swap(_Alloc& __a, _Alloc& __b) 6242: { std::__alloc_on_swap(__a, __b); } 6242: 6242: static constexpr bool _S_propagate_on_copy_assign() 6242: { return _Base_type::propagate_on_container_copy_assignment::value; } 6242: 6242: static constexpr bool _S_propagate_on_move_assign() 6242: { return _Base_type::propagate_on_container_move_assignment::value; } 6242: 6242: static constexpr bool _S_propagate_on_swap() 6242: { return _Base_type::propagate_on_container_swap::value; } 6242: 6242: static constexpr bool _S_always_equal() 6242: { return _Base_type::is_always_equal::value; } 6242: 6242: static constexpr bool _S_nothrow_move() 6242: { return _S_propagate_on_move_assign() || _S_always_equal(); } 6242: 6242: template 6242: struct rebind 6242: { typedef typename _Base_type::template rebind_alloc<_Tp> other; }; 6242: # 158 "/usr/include/c++/8/ext/alloc_traits.h" 3 6242: }; 6242: 6242: 6242: } 6242: # 62 "/usr/include/c++/8/bits/stl_construct.h" 2 3 6242: 6242: namespace std __attribute__ ((__visibility__ ("default"))) 6242: { 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: template 6242: inline void 6242: _Construct(_T1* __p, _Args&&... __args) 6242: { ::new(static_cast(__p)) _T1(std::forward<_Args>(__args)...); } 6242: # 87 "/usr/include/c++/8/bits/stl_construct.h" 3 6242: template 6242: inline void 6242: _Construct_novalue(_T1* __p) 6242: { ::new(static_cast(__p)) _T1; } 6242: 6242: 6242: 6242: 6242: template 6242: inline void 6242: _Destroy(_Tp* __pointer) 6242: { __pointer->~_Tp(); } 6242: 6242: template 6242: struct _Destroy_aux 6242: { 6242: template 6242: static void 6242: __destroy(_ForwardIterator __first, _ForwardIterator __last) 6242: { 6242: for (; __first != __last; ++__first) 6242: std::_Destroy(std::__addressof(*__first)); 6242: } 6242: }; 6242: 6242: template<> 6242: struct _Destroy_aux 6242: { 6242: template 6242: static void 6242: __destroy(_ForwardIterator, _ForwardIterator) { } 6242: }; 6242: 6242: 6242: 6242: 6242: 6242: 6242: template 6242: inline void 6242: _Destroy(_ForwardIterator __first, _ForwardIterator __last) 6242: { 6242: typedef typename iterator_traits<_ForwardIterator>::value_type 6242: _Value_type; 6242: 6242: 6242: static_assert(is_destructible<_Value_type>::value, 6242: "value type is destructible"); 6242: 6242: std::_Destroy_aux<__has_trivial_destructor(_Value_type)>:: 6242: __destroy(__first, __last); 6242: } 6242: 6242: template 6242: struct _Destroy_n_aux 6242: { 6242: template 6242: static _ForwardIterator 6242: __destroy_n(_ForwardIterator __first, _Size __count) 6242: { 6242: for (; __count > 0; (void)++__first, --__count) 6242: std::_Destroy(std::__addressof(*__first)); 6242: return __first; 6242: } 6242: }; 6242: 6242: template<> 6242: struct _Destroy_n_aux 6242: { 6242: template 6242: static _ForwardIterator 6242: __destroy_n(_ForwardIterator __first, _Size __count) 6242: { 6242: std::advance(__first, __count); 6242: return __first; 6242: } 6242: }; 6242: 6242: 6242: 6242: 6242: 6242: 6242: template 6242: inline _ForwardIterator 6242: _Destroy_n(_ForwardIterator __first, _Size __count) 6242: { 6242: typedef typename iterator_traits<_ForwardIterator>::value_type 6242: _Value_type; 6242: 6242: 6242: static_assert(is_destructible<_Value_type>::value, 6242: "value type is destructible"); 6242: 6242: return std::_Destroy_n_aux<__has_trivial_destructor(_Value_type)>:: 6242: __destroy_n(__first, __count); 6242: } 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: template 6242: void 6242: _Destroy(_ForwardIterator __first, _ForwardIterator __last, 6242: _Allocator& __alloc) 6242: { 6242: typedef __gnu_cxx::__alloc_traits<_Allocator> __traits; 6242: for (; __first != __last; ++__first) 6242: __traits::destroy(__alloc, std::__addressof(*__first)); 6242: } 6242: 6242: template 6242: inline void 6242: _Destroy(_ForwardIterator __first, _ForwardIterator __last, 6242: allocator<_Tp>&) 6242: { 6242: _Destroy(__first, __last); 6242: } 6242: # 232 "/usr/include/c++/8/bits/stl_construct.h" 3 6242: 6242: } 6242: # 63 "/usr/include/c++/8/vector" 2 3 6242: # 1 "/usr/include/c++/8/bits/stl_uninitialized.h" 1 3 6242: # 67 "/usr/include/c++/8/bits/stl_uninitialized.h" 3 6242: namespace std __attribute__ ((__visibility__ ("default"))) 6242: { 6242: 6242: 6242: template 6242: struct __uninitialized_copy 6242: { 6242: template 6242: static _ForwardIterator 6242: __uninit_copy(_InputIterator __first, _InputIterator __last, 6242: _ForwardIterator __result) 6242: { 6242: _ForwardIterator __cur = __result; 6242: try 6242: { 6242: for (; __first != __last; ++__first, (void)++__cur) 6242: std::_Construct(std::__addressof(*__cur), *__first); 6242: return __cur; 6242: } 6242: catch(...) 6242: { 6242: std::_Destroy(__result, __cur); 6242: throw; 6242: } 6242: } 6242: }; 6242: 6242: template<> 6242: struct __uninitialized_copy 6242: { 6242: template 6242: static _ForwardIterator 6242: __uninit_copy(_InputIterator __first, _InputIterator __last, 6242: _ForwardIterator __result) 6242: { return std::copy(__first, __last, __result); } 6242: }; 6242: # 113 "/usr/include/c++/8/bits/stl_uninitialized.h" 3 6242: template 6242: inline _ForwardIterator 6242: uninitialized_copy(_InputIterator __first, _InputIterator __last, 6242: _ForwardIterator __result) 6242: { 6242: typedef typename iterator_traits<_InputIterator>::value_type 6242: _ValueType1; 6242: typedef typename iterator_traits<_ForwardIterator>::value_type 6242: _ValueType2; 6242: 6242: 6242: 6242: 6242: typedef typename iterator_traits<_InputIterator>::reference _RefType1; 6242: typedef typename iterator_traits<_ForwardIterator>::reference _RefType2; 6242: const bool __assignable = is_assignable<_RefType2, _RefType1>::value; 6242: 6242: 6242: return std::__uninitialized_copy<__is_trivial(_ValueType1) 6242: && __is_trivial(_ValueType2) 6242: && __assignable>:: 6242: __uninit_copy(__first, __last, __result); 6242: } 6242: 6242: 6242: template 6242: struct __uninitialized_fill 6242: { 6242: template 6242: static void 6242: __uninit_fill(_ForwardIterator __first, _ForwardIterator __last, 6242: const _Tp& __x) 6242: { 6242: _ForwardIterator __cur = __first; 6242: try 6242: { 6242: for (; __cur != __last; ++__cur) 6242: std::_Construct(std::__addressof(*__cur), __x); 6242: } 6242: catch(...) 6242: { 6242: std::_Destroy(__first, __cur); 6242: throw; 6242: } 6242: } 6242: }; 6242: 6242: template<> 6242: struct __uninitialized_fill 6242: { 6242: template 6242: static void 6242: __uninit_fill(_ForwardIterator __first, _ForwardIterator __last, 6242: const _Tp& __x) 6242: { std::fill(__first, __last, __x); } 6242: }; 6242: # 179 "/usr/include/c++/8/bits/stl_uninitialized.h" 3 6242: template 6242: inline void 6242: uninitialized_fill(_ForwardIterator __first, _ForwardIterator __last, 6242: const _Tp& __x) 6242: { 6242: typedef typename iterator_traits<_ForwardIterator>::value_type 6242: _ValueType; 6242: 6242: 6242: 6242: 6242: const bool __assignable = is_copy_assignable<_ValueType>::value; 6242: 6242: 6242: std::__uninitialized_fill<__is_trivial(_ValueType) && __assignable>:: 6242: __uninit_fill(__first, __last, __x); 6242: } 6242: 6242: 6242: template 6242: struct __uninitialized_fill_n 6242: { 6242: template 6242: static _ForwardIterator 6242: __uninit_fill_n(_ForwardIterator __first, _Size __n, 6242: const _Tp& __x) 6242: { 6242: _ForwardIterator __cur = __first; 6242: try 6242: { 6242: for (; __n > 0; --__n, (void) ++__cur) 6242: std::_Construct(std::__addressof(*__cur), __x); 6242: return __cur; 6242: } 6242: catch(...) 6242: { 6242: std::_Destroy(__first, __cur); 6242: throw; 6242: } 6242: } 6242: }; 6242: 6242: template<> 6242: struct __uninitialized_fill_n 6242: { 6242: template 6242: static _ForwardIterator 6242: __uninit_fill_n(_ForwardIterator __first, _Size __n, 6242: const _Tp& __x) 6242: { return std::fill_n(__first, __n, __x); } 6242: }; 6242: # 242 "/usr/include/c++/8/bits/stl_uninitialized.h" 3 6242: template 6242: inline _ForwardIterator 6242: uninitialized_fill_n(_ForwardIterator __first, _Size __n, const _Tp& __x) 6242: { 6242: typedef typename iterator_traits<_ForwardIterator>::value_type 6242: _ValueType; 6242: 6242: 6242: 6242: 6242: const bool __assignable = is_copy_assignable<_ValueType>::value; 6242: 6242: return __uninitialized_fill_n<__is_trivial(_ValueType) && __assignable>:: 6242: __uninit_fill_n(__first, __n, __x); 6242: } 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: template 6242: _ForwardIterator 6242: __uninitialized_copy_a(_InputIterator __first, _InputIterator __last, 6242: _ForwardIterator __result, _Allocator& __alloc) 6242: { 6242: _ForwardIterator __cur = __result; 6242: try 6242: { 6242: typedef __gnu_cxx::__alloc_traits<_Allocator> __traits; 6242: for (; __first != __last; ++__first, (void)++__cur) 6242: __traits::construct(__alloc, std::__addressof(*__cur), *__first); 6242: return __cur; 6242: } 6242: catch(...) 6242: { 6242: std::_Destroy(__result, __cur, __alloc); 6242: throw; 6242: } 6242: } 6242: 6242: template 6242: inline _ForwardIterator 6242: __uninitialized_copy_a(_InputIterator __first, _InputIterator __last, 6242: _ForwardIterator __result, allocator<_Tp>&) 6242: { return std::uninitialized_copy(__first, __last, __result); } 6242: 6242: template 6242: inline _ForwardIterator 6242: __uninitialized_move_a(_InputIterator __first, _InputIterator __last, 6242: _ForwardIterator __result, _Allocator& __alloc) 6242: { 6242: return std::__uninitialized_copy_a(std::make_move_iterator(__first), 6242: std::make_move_iterator(__last), 6242: __result, __alloc); 6242: } 6242: 6242: template 6242: inline _ForwardIterator 6242: __uninitialized_move_if_noexcept_a(_InputIterator __first, 6242: _InputIterator __last, 6242: _ForwardIterator __result, 6242: _Allocator& __alloc) 6242: { 6242: return std::__uninitialized_copy_a 6242: (std::__make_move_if_noexcept_iterator(__first), 6242: std::__make_move_if_noexcept_iterator(__last), __result, __alloc); 6242: } 6242: 6242: template 6242: void 6242: __uninitialized_fill_a(_ForwardIterator __first, _ForwardIterator __last, 6242: const _Tp& __x, _Allocator& __alloc) 6242: { 6242: _ForwardIterator __cur = __first; 6242: try 6242: { 6242: typedef __gnu_cxx::__alloc_traits<_Allocator> __traits; 6242: for (; __cur != __last; ++__cur) 6242: __traits::construct(__alloc, std::__addressof(*__cur), __x); 6242: } 6242: catch(...) 6242: { 6242: std::_Destroy(__first, __cur, __alloc); 6242: throw; 6242: } 6242: } 6242: 6242: template 6242: inline void 6242: __uninitialized_fill_a(_ForwardIterator __first, _ForwardIterator __last, 6242: const _Tp& __x, allocator<_Tp2>&) 6242: { std::uninitialized_fill(__first, __last, __x); } 6242: 6242: template 6242: _ForwardIterator 6242: __uninitialized_fill_n_a(_ForwardIterator __first, _Size __n, 6242: const _Tp& __x, _Allocator& __alloc) 6242: { 6242: _ForwardIterator __cur = __first; 6242: try 6242: { 6242: typedef __gnu_cxx::__alloc_traits<_Allocator> __traits; 6242: for (; __n > 0; --__n, (void) ++__cur) 6242: __traits::construct(__alloc, std::__addressof(*__cur), __x); 6242: return __cur; 6242: } 6242: catch(...) 6242: { 6242: std::_Destroy(__first, __cur, __alloc); 6242: throw; 6242: } 6242: } 6242: 6242: template 6242: inline _ForwardIterator 6242: __uninitialized_fill_n_a(_ForwardIterator __first, _Size __n, 6242: const _Tp& __x, allocator<_Tp2>&) 6242: { return std::uninitialized_fill_n(__first, __n, __x); } 6242: # 378 "/usr/include/c++/8/bits/stl_uninitialized.h" 3 6242: template 6242: inline _ForwardIterator 6242: __uninitialized_copy_move(_InputIterator1 __first1, 6242: _InputIterator1 __last1, 6242: _InputIterator2 __first2, 6242: _InputIterator2 __last2, 6242: _ForwardIterator __result, 6242: _Allocator& __alloc) 6242: { 6242: _ForwardIterator __mid = std::__uninitialized_copy_a(__first1, __last1, 6242: __result, 6242: __alloc); 6242: try 6242: { 6242: return std::__uninitialized_move_a(__first2, __last2, __mid, __alloc); 6242: } 6242: catch(...) 6242: { 6242: std::_Destroy(__result, __mid, __alloc); 6242: throw; 6242: } 6242: } 6242: 6242: 6242: 6242: 6242: 6242: template 6242: inline _ForwardIterator 6242: __uninitialized_move_copy(_InputIterator1 __first1, 6242: _InputIterator1 __last1, 6242: _InputIterator2 __first2, 6242: _InputIterator2 __last2, 6242: _ForwardIterator __result, 6242: _Allocator& __alloc) 6242: { 6242: _ForwardIterator __mid = std::__uninitialized_move_a(__first1, __last1, 6242: __result, 6242: __alloc); 6242: try 6242: { 6242: return std::__uninitialized_copy_a(__first2, __last2, __mid, __alloc); 6242: } 6242: catch(...) 6242: { 6242: std::_Destroy(__result, __mid, __alloc); 6242: throw; 6242: } 6242: } 6242: 6242: 6242: 6242: 6242: template 6242: inline _ForwardIterator 6242: __uninitialized_fill_move(_ForwardIterator __result, _ForwardIterator __mid, 6242: const _Tp& __x, _InputIterator __first, 6242: _InputIterator __last, _Allocator& __alloc) 6242: { 6242: std::__uninitialized_fill_a(__result, __mid, __x, __alloc); 6242: try 6242: { 6242: return std::__uninitialized_move_a(__first, __last, __mid, __alloc); 6242: } 6242: catch(...) 6242: { 6242: std::_Destroy(__result, __mid, __alloc); 6242: throw; 6242: } 6242: } 6242: 6242: 6242: 6242: 6242: template 6242: inline void 6242: __uninitialized_move_fill(_InputIterator __first1, _InputIterator __last1, 6242: _ForwardIterator __first2, 6242: _ForwardIterator __last2, const _Tp& __x, 6242: _Allocator& __alloc) 6242: { 6242: _ForwardIterator __mid2 = std::__uninitialized_move_a(__first1, __last1, 6242: __first2, 6242: __alloc); 6242: try 6242: { 6242: std::__uninitialized_fill_a(__mid2, __last2, __x, __alloc); 6242: } 6242: catch(...) 6242: { 6242: std::_Destroy(__first2, __mid2, __alloc); 6242: throw; 6242: } 6242: } 6242: 6242: 6242: 6242: 6242: 6242: template 6242: struct __uninitialized_default_1 6242: { 6242: template 6242: static void 6242: __uninit_default(_ForwardIterator __first, _ForwardIterator __last) 6242: { 6242: _ForwardIterator __cur = __first; 6242: try 6242: { 6242: for (; __cur != __last; ++__cur) 6242: std::_Construct(std::__addressof(*__cur)); 6242: } 6242: catch(...) 6242: { 6242: std::_Destroy(__first, __cur); 6242: throw; 6242: } 6242: } 6242: }; 6242: 6242: template<> 6242: struct __uninitialized_default_1 6242: { 6242: template 6242: static void 6242: __uninit_default(_ForwardIterator __first, _ForwardIterator __last) 6242: { 6242: typedef typename iterator_traits<_ForwardIterator>::value_type 6242: _ValueType; 6242: 6242: std::fill(__first, __last, _ValueType()); 6242: } 6242: }; 6242: 6242: template 6242: struct __uninitialized_default_n_1 6242: { 6242: template 6242: static _ForwardIterator 6242: __uninit_default_n(_ForwardIterator __first, _Size __n) 6242: { 6242: _ForwardIterator __cur = __first; 6242: try 6242: { 6242: for (; __n > 0; --__n, (void) ++__cur) 6242: std::_Construct(std::__addressof(*__cur)); 6242: return __cur; 6242: } 6242: catch(...) 6242: { 6242: std::_Destroy(__first, __cur); 6242: throw; 6242: } 6242: } 6242: }; 6242: 6242: template<> 6242: struct __uninitialized_default_n_1 6242: { 6242: template 6242: static _ForwardIterator 6242: __uninit_default_n(_ForwardIterator __first, _Size __n) 6242: { 6242: typedef typename iterator_traits<_ForwardIterator>::value_type 6242: _ValueType; 6242: 6242: return std::fill_n(__first, __n, _ValueType()); 6242: } 6242: }; 6242: 6242: 6242: 6242: 6242: template 6242: inline void 6242: __uninitialized_default(_ForwardIterator __first, 6242: _ForwardIterator __last) 6242: { 6242: typedef typename iterator_traits<_ForwardIterator>::value_type 6242: _ValueType; 6242: 6242: const bool __assignable = is_copy_assignable<_ValueType>::value; 6242: 6242: std::__uninitialized_default_1<__is_trivial(_ValueType) 6242: && __assignable>:: 6242: __uninit_default(__first, __last); 6242: } 6242: 6242: 6242: 6242: template 6242: inline _ForwardIterator 6242: __uninitialized_default_n(_ForwardIterator __first, _Size __n) 6242: { 6242: typedef typename iterator_traits<_ForwardIterator>::value_type 6242: _ValueType; 6242: 6242: const bool __assignable = is_copy_assignable<_ValueType>::value; 6242: 6242: return __uninitialized_default_n_1<__is_trivial(_ValueType) 6242: && __assignable>:: 6242: __uninit_default_n(__first, __n); 6242: } 6242: 6242: 6242: 6242: 6242: 6242: template 6242: void 6242: __uninitialized_default_a(_ForwardIterator __first, 6242: _ForwardIterator __last, 6242: _Allocator& __alloc) 6242: { 6242: _ForwardIterator __cur = __first; 6242: try 6242: { 6242: typedef __gnu_cxx::__alloc_traits<_Allocator> __traits; 6242: for (; __cur != __last; ++__cur) 6242: __traits::construct(__alloc, std::__addressof(*__cur)); 6242: } 6242: catch(...) 6242: { 6242: std::_Destroy(__first, __cur, __alloc); 6242: throw; 6242: } 6242: } 6242: 6242: template 6242: inline void 6242: __uninitialized_default_a(_ForwardIterator __first, 6242: _ForwardIterator __last, 6242: allocator<_Tp>&) 6242: { std::__uninitialized_default(__first, __last); } 6242: 6242: 6242: 6242: 6242: 6242: template 6242: _ForwardIterator 6242: __uninitialized_default_n_a(_ForwardIterator __first, _Size __n, 6242: _Allocator& __alloc) 6242: { 6242: _ForwardIterator __cur = __first; 6242: try 6242: { 6242: typedef __gnu_cxx::__alloc_traits<_Allocator> __traits; 6242: for (; __n > 0; --__n, (void) ++__cur) 6242: __traits::construct(__alloc, std::__addressof(*__cur)); 6242: return __cur; 6242: } 6242: catch(...) 6242: { 6242: std::_Destroy(__first, __cur, __alloc); 6242: throw; 6242: } 6242: } 6242: 6242: template 6242: inline _ForwardIterator 6242: __uninitialized_default_n_a(_ForwardIterator __first, _Size __n, 6242: allocator<_Tp>&) 6242: { return std::__uninitialized_default_n(__first, __n); } 6242: 6242: template 6242: struct __uninitialized_default_novalue_1 6242: { 6242: template 6242: static void 6242: __uninit_default_novalue(_ForwardIterator __first, 6242: _ForwardIterator __last) 6242: { 6242: _ForwardIterator __cur = __first; 6242: try 6242: { 6242: for (; __cur != __last; ++__cur) 6242: std::_Construct_novalue(std::__addressof(*__cur)); 6242: } 6242: catch(...) 6242: { 6242: std::_Destroy(__first, __cur); 6242: throw; 6242: } 6242: } 6242: }; 6242: 6242: template<> 6242: struct __uninitialized_default_novalue_1 6242: { 6242: template 6242: static void 6242: __uninit_default_novalue(_ForwardIterator __first, 6242: _ForwardIterator __last) 6242: { 6242: } 6242: }; 6242: 6242: template 6242: struct __uninitialized_default_novalue_n_1 6242: { 6242: template 6242: static _ForwardIterator 6242: __uninit_default_novalue_n(_ForwardIterator __first, _Size __n) 6242: { 6242: _ForwardIterator __cur = __first; 6242: try 6242: { 6242: for (; __n > 0; --__n, (void) ++__cur) 6242: std::_Construct_novalue(std::__addressof(*__cur)); 6242: return __cur; 6242: } 6242: catch(...) 6242: { 6242: std::_Destroy(__first, __cur); 6242: throw; 6242: } 6242: } 6242: }; 6242: 6242: template<> 6242: struct __uninitialized_default_novalue_n_1 6242: { 6242: template 6242: static _ForwardIterator 6242: __uninit_default_novalue_n(_ForwardIterator __first, _Size __n) 6242: { return std::next(__first, __n); } 6242: }; 6242: 6242: 6242: 6242: 6242: template 6242: inline void 6242: __uninitialized_default_novalue(_ForwardIterator __first, 6242: _ForwardIterator __last) 6242: { 6242: typedef typename iterator_traits<_ForwardIterator>::value_type 6242: _ValueType; 6242: 6242: std::__uninitialized_default_novalue_1< 6242: is_trivially_default_constructible<_ValueType>::value>:: 6242: __uninit_default_novalue(__first, __last); 6242: } 6242: 6242: 6242: 6242: template 6242: inline _ForwardIterator 6242: __uninitialized_default_novalue_n(_ForwardIterator __first, _Size __n) 6242: { 6242: typedef typename iterator_traits<_ForwardIterator>::value_type 6242: _ValueType; 6242: 6242: return __uninitialized_default_novalue_n_1< 6242: is_trivially_default_constructible<_ValueType>::value>:: 6242: __uninit_default_novalue_n(__first, __n); 6242: } 6242: 6242: template 6242: _ForwardIterator 6242: __uninitialized_copy_n(_InputIterator __first, _Size __n, 6242: _ForwardIterator __result, input_iterator_tag) 6242: { 6242: _ForwardIterator __cur = __result; 6242: try 6242: { 6242: for (; __n > 0; --__n, (void) ++__first, ++__cur) 6242: std::_Construct(std::__addressof(*__cur), *__first); 6242: return __cur; 6242: } 6242: catch(...) 6242: { 6242: std::_Destroy(__result, __cur); 6242: throw; 6242: } 6242: } 6242: 6242: template 6242: inline _ForwardIterator 6242: __uninitialized_copy_n(_RandomAccessIterator __first, _Size __n, 6242: _ForwardIterator __result, 6242: random_access_iterator_tag) 6242: { return std::uninitialized_copy(__first, __first + __n, __result); } 6242: 6242: template 6242: pair<_InputIterator, _ForwardIterator> 6242: __uninitialized_copy_n_pair(_InputIterator __first, _Size __n, 6242: _ForwardIterator __result, input_iterator_tag) 6242: { 6242: _ForwardIterator __cur = __result; 6242: try 6242: { 6242: for (; __n > 0; --__n, (void) ++__first, ++__cur) 6242: std::_Construct(std::__addressof(*__cur), *__first); 6242: return {__first, __cur}; 6242: } 6242: catch(...) 6242: { 6242: std::_Destroy(__result, __cur); 6242: throw; 6242: } 6242: } 6242: 6242: template 6242: inline pair<_RandomAccessIterator, _ForwardIterator> 6242: __uninitialized_copy_n_pair(_RandomAccessIterator __first, _Size __n, 6242: _ForwardIterator __result, 6242: random_access_iterator_tag) 6242: { 6242: auto __second_res = uninitialized_copy(__first, __first + __n, __result); 6242: auto __first_res = std::next(__first, __n); 6242: return {__first_res, __second_res}; 6242: } 6242: # 810 "/usr/include/c++/8/bits/stl_uninitialized.h" 3 6242: template 6242: inline _ForwardIterator 6242: uninitialized_copy_n(_InputIterator __first, _Size __n, 6242: _ForwardIterator __result) 6242: { return std::__uninitialized_copy_n(__first, __n, __result, 6242: std::__iterator_category(__first)); } 6242: 6242: template 6242: inline pair<_InputIterator, _ForwardIterator> 6242: __uninitialized_copy_n_pair(_InputIterator __first, _Size __n, 6242: _ForwardIterator __result) 6242: { 6242: return 6242: std::__uninitialized_copy_n_pair(__first, __n, __result, 6242: std::__iterator_category(__first)); 6242: } 6242: # 882 "/usr/include/c++/8/bits/stl_uninitialized.h" 3 6242: 6242: } 6242: # 64 "/usr/include/c++/8/vector" 2 3 6242: # 1 "/usr/include/c++/8/bits/stl_vector.h" 1 3 6242: # 63 "/usr/include/c++/8/bits/stl_vector.h" 3 6242: # 1 "/usr/include/c++/8/initializer_list" 1 3 6242: # 33 "/usr/include/c++/8/initializer_list" 3 6242: 6242: # 34 "/usr/include/c++/8/initializer_list" 3 6242: 6242: 6242: 6242: 6242: 6242: #pragma GCC visibility push(default) 6242: 6242: 6242: 6242: namespace std 6242: { 6242: 6242: template 6242: class initializer_list 6242: { 6242: public: 6242: typedef _E value_type; 6242: typedef const _E& reference; 6242: typedef const _E& const_reference; 6242: typedef size_t size_type; 6242: typedef const _E* iterator; 6242: typedef const _E* const_iterator; 6242: 6242: private: 6242: iterator _M_array; 6242: size_type _M_len; 6242: 6242: 6242: constexpr initializer_list(const_iterator __a, size_type __l) 6242: : _M_array(__a), _M_len(__l) { } 6242: 6242: public: 6242: constexpr initializer_list() noexcept 6242: : _M_array(0), _M_len(0) { } 6242: 6242: 6242: constexpr size_type 6242: size() const noexcept { return _M_len; } 6242: 6242: 6242: constexpr const_iterator 6242: begin() const noexcept { return _M_array; } 6242: 6242: 6242: constexpr const_iterator 6242: end() const noexcept { return begin() + size(); } 6242: }; 6242: 6242: 6242: 6242: 6242: 6242: 6242: template 6242: constexpr const _Tp* 6242: begin(initializer_list<_Tp> __ils) noexcept 6242: { return __ils.begin(); } 6242: 6242: 6242: 6242: 6242: 6242: 6242: template 6242: constexpr const _Tp* 6242: end(initializer_list<_Tp> __ils) noexcept 6242: { return __ils.end(); } 6242: } 6242: 6242: #pragma GCC visibility pop 6242: # 64 "/usr/include/c++/8/bits/stl_vector.h" 2 3 6242: # 74 "/usr/include/c++/8/bits/stl_vector.h" 3 6242: namespace std __attribute__ ((__visibility__ ("default"))) 6242: { 6242: 6242: 6242: 6242: 6242: template 6242: struct _Vector_base 6242: { 6242: typedef typename __gnu_cxx::__alloc_traits<_Alloc>::template 6242: rebind<_Tp>::other _Tp_alloc_type; 6242: typedef typename __gnu_cxx::__alloc_traits<_Tp_alloc_type>::pointer 6242: pointer; 6242: 6242: struct _Vector_impl 6242: : public _Tp_alloc_type 6242: { 6242: pointer _M_start; 6242: pointer _M_finish; 6242: pointer _M_end_of_storage; 6242: 6242: _Vector_impl() 6242: : _Tp_alloc_type(), _M_start(), _M_finish(), _M_end_of_storage() 6242: { } 6242: 6242: _Vector_impl(_Tp_alloc_type const& __a) noexcept 6242: : _Tp_alloc_type(__a), _M_start(), _M_finish(), _M_end_of_storage() 6242: { } 6242: 6242: 6242: _Vector_impl(_Tp_alloc_type&& __a) noexcept 6242: : _Tp_alloc_type(std::move(__a)), 6242: _M_start(), _M_finish(), _M_end_of_storage() 6242: { } 6242: 6242: 6242: void _M_swap_data(_Vector_impl& __x) noexcept 6242: { 6242: std::swap(_M_start, __x._M_start); 6242: std::swap(_M_finish, __x._M_finish); 6242: std::swap(_M_end_of_storage, __x._M_end_of_storage); 6242: } 6242: # 231 "/usr/include/c++/8/bits/stl_vector.h" 3 6242: }; 6242: 6242: public: 6242: typedef _Alloc allocator_type; 6242: 6242: _Tp_alloc_type& 6242: _M_get_Tp_allocator() noexcept 6242: { return *static_cast<_Tp_alloc_type*>(&this->_M_impl); } 6242: 6242: const _Tp_alloc_type& 6242: _M_get_Tp_allocator() const noexcept 6242: { return *static_cast(&this->_M_impl); } 6242: 6242: allocator_type 6242: get_allocator() const noexcept 6242: { return allocator_type(_M_get_Tp_allocator()); } 6242: 6242: _Vector_base() 6242: : _M_impl() { } 6242: 6242: _Vector_base(const allocator_type& __a) noexcept 6242: : _M_impl(__a) { } 6242: 6242: _Vector_base(size_t __n) 6242: : _M_impl() 6242: { _M_create_storage(__n); } 6242: 6242: _Vector_base(size_t __n, const allocator_type& __a) 6242: : _M_impl(__a) 6242: { _M_create_storage(__n); } 6242: 6242: 6242: _Vector_base(_Tp_alloc_type&& __a) noexcept 6242: : _M_impl(std::move(__a)) { } 6242: 6242: _Vector_base(_Vector_base&& __x) noexcept 6242: : _M_impl(std::move(__x._M_get_Tp_allocator())) 6242: { this->_M_impl._M_swap_data(__x._M_impl); } 6242: 6242: _Vector_base(_Vector_base&& __x, const allocator_type& __a) 6242: : _M_impl(__a) 6242: { 6242: if (__x.get_allocator() == __a) 6242: this->_M_impl._M_swap_data(__x._M_impl); 6242: else 6242: { 6242: size_t __n = __x._M_impl._M_finish - __x._M_impl._M_start; 6242: _M_create_storage(__n); 6242: } 6242: } 6242: 6242: 6242: ~_Vector_base() noexcept 6242: { 6242: _M_deallocate(_M_impl._M_start, 6242: _M_impl._M_end_of_storage - _M_impl._M_start); 6242: } 6242: 6242: public: 6242: _Vector_impl _M_impl; 6242: 6242: pointer 6242: _M_allocate(size_t __n) 6242: { 6242: typedef __gnu_cxx::__alloc_traits<_Tp_alloc_type> _Tr; 6242: return __n != 0 ? _Tr::allocate(_M_impl, __n) : pointer(); 6242: } 6242: 6242: void 6242: _M_deallocate(pointer __p, size_t __n) 6242: { 6242: typedef __gnu_cxx::__alloc_traits<_Tp_alloc_type> _Tr; 6242: if (__p) 6242: _Tr::deallocate(_M_impl, __p, __n); 6242: } 6242: 6242: private: 6242: void 6242: _M_create_storage(size_t __n) 6242: { 6242: this->_M_impl._M_start = this->_M_allocate(__n); 6242: this->_M_impl._M_finish = this->_M_impl._M_start; 6242: this->_M_impl._M_end_of_storage = this->_M_impl._M_start + __n; 6242: } 6242: }; 6242: # 338 "/usr/include/c++/8/bits/stl_vector.h" 3 6242: template > 6242: class vector : protected _Vector_base<_Tp, _Alloc> 6242: { 6242: # 351 "/usr/include/c++/8/bits/stl_vector.h" 3 6242: static_assert(is_same::type, _Tp>::value, 6242: "std::vector must have a non-const, non-volatile value_type"); 6242: 6242: 6242: 6242: 6242: 6242: 6242: typedef _Vector_base<_Tp, _Alloc> _Base; 6242: typedef typename _Base::_Tp_alloc_type _Tp_alloc_type; 6242: typedef __gnu_cxx::__alloc_traits<_Tp_alloc_type> _Alloc_traits; 6242: 6242: public: 6242: typedef _Tp value_type; 6242: typedef typename _Base::pointer pointer; 6242: typedef typename _Alloc_traits::const_pointer const_pointer; 6242: typedef typename _Alloc_traits::reference reference; 6242: typedef typename _Alloc_traits::const_reference const_reference; 6242: typedef __gnu_cxx::__normal_iterator iterator; 6242: typedef __gnu_cxx::__normal_iterator 6242: const_iterator; 6242: typedef std::reverse_iterator const_reverse_iterator; 6242: typedef std::reverse_iterator reverse_iterator; 6242: typedef size_t size_type; 6242: typedef ptrdiff_t difference_type; 6242: typedef _Alloc allocator_type; 6242: 6242: protected: 6242: using _Base::_M_allocate; 6242: using _Base::_M_deallocate; 6242: using _Base::_M_impl; 6242: using _Base::_M_get_Tp_allocator; 6242: 6242: public: 6242: 6242: 6242: 6242: 6242: 6242: 6242: vector() 6242: 6242: noexcept(is_nothrow_default_constructible<_Alloc>::value) 6242: 6242: : _Base() { } 6242: 6242: 6242: 6242: 6242: 6242: explicit 6242: vector(const allocator_type& __a) noexcept 6242: : _Base(__a) { } 6242: # 414 "/usr/include/c++/8/bits/stl_vector.h" 3 6242: explicit 6242: vector(size_type __n, const allocator_type& __a = allocator_type()) 6242: : _Base(__n, __a) 6242: { _M_default_initialize(__n); } 6242: # 427 "/usr/include/c++/8/bits/stl_vector.h" 3 6242: vector(size_type __n, const value_type& __value, 6242: const allocator_type& __a = allocator_type()) 6242: : _Base(__n, __a) 6242: { _M_fill_initialize(__n, __value); } 6242: # 458 "/usr/include/c++/8/bits/stl_vector.h" 3 6242: vector(const vector& __x) 6242: : _Base(__x.size(), 6242: _Alloc_traits::_S_select_on_copy(__x._M_get_Tp_allocator())) 6242: { 6242: this->_M_impl._M_finish = 6242: std::__uninitialized_copy_a(__x.begin(), __x.end(), 6242: this->_M_impl._M_start, 6242: _M_get_Tp_allocator()); 6242: } 6242: # 476 "/usr/include/c++/8/bits/stl_vector.h" 3 6242: vector(vector&& __x) noexcept 6242: : _Base(std::move(__x)) { } 6242: 6242: 6242: vector(const vector& __x, const allocator_type& __a) 6242: : _Base(__x.size(), __a) 6242: { 6242: this->_M_impl._M_finish = 6242: std::__uninitialized_copy_a(__x.begin(), __x.end(), 6242: this->_M_impl._M_start, 6242: _M_get_Tp_allocator()); 6242: } 6242: 6242: 6242: vector(vector&& __rv, const allocator_type& __m) 6242: noexcept(_Alloc_traits::_S_always_equal()) 6242: : _Base(std::move(__rv), __m) 6242: { 6242: if (__rv.get_allocator() != __m) 6242: { 6242: this->_M_impl._M_finish = 6242: std::__uninitialized_move_a(__rv.begin(), __rv.end(), 6242: this->_M_impl._M_start, 6242: _M_get_Tp_allocator()); 6242: __rv.clear(); 6242: } 6242: } 6242: # 515 "/usr/include/c++/8/bits/stl_vector.h" 3 6242: vector(initializer_list __l, 6242: const allocator_type& __a = allocator_type()) 6242: : _Base(__a) 6242: { 6242: _M_range_initialize(__l.begin(), __l.end(), 6242: random_access_iterator_tag()); 6242: } 6242: # 541 "/usr/include/c++/8/bits/stl_vector.h" 3 6242: template> 6242: vector(_InputIterator __first, _InputIterator __last, 6242: const allocator_type& __a = allocator_type()) 6242: : _Base(__a) 6242: { _M_initialize_dispatch(__first, __last, __false_type()); } 6242: # 565 "/usr/include/c++/8/bits/stl_vector.h" 3 6242: ~vector() noexcept 6242: { 6242: std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish, 6242: _M_get_Tp_allocator()); 6242: ; 6242: } 6242: # 581 "/usr/include/c++/8/bits/stl_vector.h" 3 6242: vector& 6242: operator=(const vector& __x); 6242: # 595 "/usr/include/c++/8/bits/stl_vector.h" 3 6242: vector& 6242: operator=(vector&& __x) noexcept(_Alloc_traits::_S_nothrow_move()) 6242: { 6242: constexpr bool __move_storage = 6242: _Alloc_traits::_S_propagate_on_move_assign() 6242: || _Alloc_traits::_S_always_equal(); 6242: _M_move_assign(std::move(__x), __bool_constant<__move_storage>()); 6242: return *this; 6242: } 6242: # 616 "/usr/include/c++/8/bits/stl_vector.h" 3 6242: vector& 6242: operator=(initializer_list __l) 6242: { 6242: this->_M_assign_aux(__l.begin(), __l.end(), 6242: random_access_iterator_tag()); 6242: return *this; 6242: } 6242: # 635 "/usr/include/c++/8/bits/stl_vector.h" 3 6242: void 6242: assign(size_type __n, const value_type& __val) 6242: { _M_fill_assign(__n, __val); } 6242: # 652 "/usr/include/c++/8/bits/stl_vector.h" 3 6242: template> 6242: void 6242: assign(_InputIterator __first, _InputIterator __last) 6242: { _M_assign_dispatch(__first, __last, __false_type()); } 6242: # 680 "/usr/include/c++/8/bits/stl_vector.h" 3 6242: void 6242: assign(initializer_list __l) 6242: { 6242: this->_M_assign_aux(__l.begin(), __l.end(), 6242: random_access_iterator_tag()); 6242: } 6242: 6242: 6242: 6242: using _Base::get_allocator; 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: iterator 6242: begin() noexcept 6242: { return iterator(this->_M_impl._M_start); } 6242: 6242: 6242: 6242: 6242: 6242: 6242: const_iterator 6242: begin() const noexcept 6242: { return const_iterator(this->_M_impl._M_start); } 6242: 6242: 6242: 6242: 6242: 6242: 6242: iterator 6242: end() noexcept 6242: { return iterator(this->_M_impl._M_finish); } 6242: 6242: 6242: 6242: 6242: 6242: 6242: const_iterator 6242: end() const noexcept 6242: { return const_iterator(this->_M_impl._M_finish); } 6242: 6242: 6242: 6242: 6242: 6242: 6242: reverse_iterator 6242: rbegin() noexcept 6242: { return reverse_iterator(end()); } 6242: 6242: 6242: 6242: 6242: 6242: 6242: const_reverse_iterator 6242: rbegin() const noexcept 6242: { return const_reverse_iterator(end()); } 6242: 6242: 6242: 6242: 6242: 6242: 6242: reverse_iterator 6242: rend() noexcept 6242: { return reverse_iterator(begin()); } 6242: 6242: 6242: 6242: 6242: 6242: 6242: const_reverse_iterator 6242: rend() const noexcept 6242: { return const_reverse_iterator(begin()); } 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: const_iterator 6242: cbegin() const noexcept 6242: { return const_iterator(this->_M_impl._M_start); } 6242: 6242: 6242: 6242: 6242: 6242: 6242: const_iterator 6242: cend() const noexcept 6242: { return const_iterator(this->_M_impl._M_finish); } 6242: 6242: 6242: 6242: 6242: 6242: 6242: const_reverse_iterator 6242: crbegin() const noexcept 6242: { return const_reverse_iterator(end()); } 6242: 6242: 6242: 6242: 6242: 6242: 6242: const_reverse_iterator 6242: crend() const noexcept 6242: { return const_reverse_iterator(begin()); } 6242: 6242: 6242: 6242: 6242: size_type 6242: size() const noexcept 6242: { return size_type(this->_M_impl._M_finish - this->_M_impl._M_start); } 6242: 6242: 6242: size_type 6242: max_size() const noexcept 6242: { return _Alloc_traits::max_size(_M_get_Tp_allocator()); } 6242: # 823 "/usr/include/c++/8/bits/stl_vector.h" 3 6242: void 6242: resize(size_type __new_size) 6242: { 6242: if (__new_size > size()) 6242: _M_default_append(__new_size - size()); 6242: else if (__new_size < size()) 6242: _M_erase_at_end(this->_M_impl._M_start + __new_size); 6242: } 6242: # 843 "/usr/include/c++/8/bits/stl_vector.h" 3 6242: void 6242: resize(size_type __new_size, const value_type& __x) 6242: { 6242: if (__new_size > size()) 6242: _M_fill_insert(end(), __new_size - size(), __x); 6242: else if (__new_size < size()) 6242: _M_erase_at_end(this->_M_impl._M_start + __new_size); 6242: } 6242: # 875 "/usr/include/c++/8/bits/stl_vector.h" 3 6242: void 6242: shrink_to_fit() 6242: { _M_shrink_to_fit(); } 6242: 6242: 6242: 6242: 6242: 6242: 6242: size_type 6242: capacity() const noexcept 6242: { return size_type(this->_M_impl._M_end_of_storage 6242: - this->_M_impl._M_start); } 6242: 6242: 6242: 6242: 6242: 6242: bool 6242: empty() const noexcept 6242: { return begin() == end(); } 6242: # 914 "/usr/include/c++/8/bits/stl_vector.h" 3 6242: void 6242: reserve(size_type __n); 6242: # 929 "/usr/include/c++/8/bits/stl_vector.h" 3 6242: reference 6242: operator[](size_type __n) noexcept 6242: { 6242: ; 6242: return *(this->_M_impl._M_start + __n); 6242: } 6242: # 947 "/usr/include/c++/8/bits/stl_vector.h" 3 6242: const_reference 6242: operator[](size_type __n) const noexcept 6242: { 6242: ; 6242: return *(this->_M_impl._M_start + __n); 6242: } 6242: 6242: protected: 6242: 6242: void 6242: _M_range_check(size_type __n) const 6242: { 6242: if (__n >= this->size()) 6242: __throw_out_of_range_fmt(("vector::_M_range_check: __n " "(which is %zu) >= this->size() " "(which is %zu)") 6242: 6242: , 6242: __n, this->size()); 6242: } 6242: 6242: public: 6242: # 978 "/usr/include/c++/8/bits/stl_vector.h" 3 6242: reference 6242: at(size_type __n) 6242: { 6242: _M_range_check(__n); 6242: return (*this)[__n]; 6242: } 6242: # 996 "/usr/include/c++/8/bits/stl_vector.h" 3 6242: const_reference 6242: at(size_type __n) const 6242: { 6242: _M_range_check(__n); 6242: return (*this)[__n]; 6242: } 6242: 6242: 6242: 6242: 6242: 6242: reference 6242: front() noexcept 6242: { 6242: ; 6242: return *begin(); 6242: } 6242: 6242: 6242: 6242: 6242: 6242: const_reference 6242: front() const noexcept 6242: { 6242: ; 6242: return *begin(); 6242: } 6242: 6242: 6242: 6242: 6242: 6242: reference 6242: back() noexcept 6242: { 6242: ; 6242: return *(end() - 1); 6242: } 6242: 6242: 6242: 6242: 6242: 6242: const_reference 6242: back() const noexcept 6242: { 6242: ; 6242: return *(end() - 1); 6242: } 6242: # 1054 "/usr/include/c++/8/bits/stl_vector.h" 3 6242: _Tp* 6242: data() noexcept 6242: { return _M_data_ptr(this->_M_impl._M_start); } 6242: 6242: const _Tp* 6242: data() const noexcept 6242: { return _M_data_ptr(this->_M_impl._M_start); } 6242: # 1073 "/usr/include/c++/8/bits/stl_vector.h" 3 6242: void 6242: push_back(const value_type& __x) 6242: { 6242: if (this->_M_impl._M_finish != this->_M_impl._M_end_of_storage) 6242: { 6242: ; 6242: _Alloc_traits::construct(this->_M_impl, this->_M_impl._M_finish, 6242: __x); 6242: ++this->_M_impl._M_finish; 6242: ; 6242: } 6242: else 6242: _M_realloc_insert(end(), __x); 6242: } 6242: 6242: 6242: void 6242: push_back(value_type&& __x) 6242: { emplace_back(std::move(__x)); } 6242: 6242: template 6242: 6242: 6242: 6242: void 6242: 6242: emplace_back(_Args&&... __args); 6242: # 1111 "/usr/include/c++/8/bits/stl_vector.h" 3 6242: void 6242: pop_back() noexcept 6242: { 6242: ; 6242: --this->_M_impl._M_finish; 6242: _Alloc_traits::destroy(this->_M_impl, this->_M_impl._M_finish); 6242: ; 6242: } 6242: # 1133 "/usr/include/c++/8/bits/stl_vector.h" 3 6242: template 6242: iterator 6242: emplace(const_iterator __position, _Args&&... __args) 6242: { return _M_emplace_aux(__position, std::forward<_Args>(__args)...); } 6242: # 1149 "/usr/include/c++/8/bits/stl_vector.h" 3 6242: iterator 6242: insert(const_iterator __position, const value_type& __x); 6242: # 1179 "/usr/include/c++/8/bits/stl_vector.h" 3 6242: iterator 6242: insert(const_iterator __position, value_type&& __x) 6242: { return _M_insert_rval(__position, std::move(__x)); } 6242: # 1196 "/usr/include/c++/8/bits/stl_vector.h" 3 6242: iterator 6242: insert(const_iterator __position, initializer_list __l) 6242: { 6242: auto __offset = __position - cbegin(); 6242: _M_range_insert(begin() + __offset, __l.begin(), __l.end(), 6242: std::random_access_iterator_tag()); 6242: return begin() + __offset; 6242: } 6242: # 1221 "/usr/include/c++/8/bits/stl_vector.h" 3 6242: iterator 6242: insert(const_iterator __position, size_type __n, const value_type& __x) 6242: { 6242: difference_type __offset = __position - cbegin(); 6242: _M_fill_insert(begin() + __offset, __n, __x); 6242: return begin() + __offset; 6242: } 6242: # 1263 "/usr/include/c++/8/bits/stl_vector.h" 3 6242: template> 6242: iterator 6242: insert(const_iterator __position, _InputIterator __first, 6242: _InputIterator __last) 6242: { 6242: difference_type __offset = __position - cbegin(); 6242: _M_insert_dispatch(begin() + __offset, 6242: __first, __last, __false_type()); 6242: return begin() + __offset; 6242: } 6242: # 1315 "/usr/include/c++/8/bits/stl_vector.h" 3 6242: iterator 6242: 6242: erase(const_iterator __position) 6242: { return _M_erase(begin() + (__position - cbegin())); } 6242: # 1342 "/usr/include/c++/8/bits/stl_vector.h" 3 6242: iterator 6242: 6242: erase(const_iterator __first, const_iterator __last) 6242: { 6242: const auto __beg = begin(); 6242: const auto __cbeg = cbegin(); 6242: return _M_erase(__beg + (__first - __cbeg), __beg + (__last - __cbeg)); 6242: } 6242: # 1366 "/usr/include/c++/8/bits/stl_vector.h" 3 6242: void 6242: swap(vector& __x) noexcept 6242: { 6242: 6242: 6242: ; 6242: 6242: this->_M_impl._M_swap_data(__x._M_impl); 6242: _Alloc_traits::_S_on_swap(_M_get_Tp_allocator(), 6242: __x._M_get_Tp_allocator()); 6242: } 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: void 6242: clear() noexcept 6242: { _M_erase_at_end(this->_M_impl._M_start); } 6242: 6242: protected: 6242: 6242: 6242: 6242: 6242: template 6242: pointer 6242: _M_allocate_and_copy(size_type __n, 6242: _ForwardIterator __first, _ForwardIterator __last) 6242: { 6242: pointer __result = this->_M_allocate(__n); 6242: try 6242: { 6242: std::__uninitialized_copy_a(__first, __last, __result, 6242: _M_get_Tp_allocator()); 6242: return __result; 6242: } 6242: catch(...) 6242: { 6242: _M_deallocate(__result, __n); 6242: throw; 6242: } 6242: } 6242: # 1419 "/usr/include/c++/8/bits/stl_vector.h" 3 6242: template 6242: void 6242: _M_initialize_dispatch(_Integer __n, _Integer __value, __true_type) 6242: { 6242: this->_M_impl._M_start = _M_allocate(static_cast(__n)); 6242: this->_M_impl._M_end_of_storage = 6242: this->_M_impl._M_start + static_cast(__n); 6242: _M_fill_initialize(static_cast(__n), __value); 6242: } 6242: 6242: 6242: template 6242: void 6242: _M_initialize_dispatch(_InputIterator __first, _InputIterator __last, 6242: __false_type) 6242: { 6242: typedef typename std::iterator_traits<_InputIterator>:: 6242: iterator_category _IterCategory; 6242: _M_range_initialize(__first, __last, _IterCategory()); 6242: } 6242: 6242: 6242: template 6242: void 6242: _M_range_initialize(_InputIterator __first, 6242: _InputIterator __last, std::input_iterator_tag) 6242: { 6242: for (; __first != __last; ++__first) 6242: 6242: emplace_back(*__first); 6242: 6242: 6242: 6242: } 6242: 6242: 6242: template 6242: void 6242: _M_range_initialize(_ForwardIterator __first, 6242: _ForwardIterator __last, std::forward_iterator_tag) 6242: { 6242: const size_type __n = std::distance(__first, __last); 6242: this->_M_impl._M_start = this->_M_allocate(__n); 6242: this->_M_impl._M_end_of_storage = this->_M_impl._M_start + __n; 6242: this->_M_impl._M_finish = 6242: std::__uninitialized_copy_a(__first, __last, 6242: this->_M_impl._M_start, 6242: _M_get_Tp_allocator()); 6242: } 6242: 6242: 6242: 6242: void 6242: _M_fill_initialize(size_type __n, const value_type& __value) 6242: { 6242: this->_M_impl._M_finish = 6242: std::__uninitialized_fill_n_a(this->_M_impl._M_start, __n, __value, 6242: _M_get_Tp_allocator()); 6242: } 6242: 6242: 6242: 6242: void 6242: _M_default_initialize(size_type __n) 6242: { 6242: this->_M_impl._M_finish = 6242: std::__uninitialized_default_n_a(this->_M_impl._M_start, __n, 6242: _M_get_Tp_allocator()); 6242: } 6242: # 1497 "/usr/include/c++/8/bits/stl_vector.h" 3 6242: template 6242: void 6242: _M_assign_dispatch(_Integer __n, _Integer __val, __true_type) 6242: { _M_fill_assign(__n, __val); } 6242: 6242: 6242: template 6242: void 6242: _M_assign_dispatch(_InputIterator __first, _InputIterator __last, 6242: __false_type) 6242: { _M_assign_aux(__first, __last, std::__iterator_category(__first)); } 6242: 6242: 6242: template 6242: void 6242: _M_assign_aux(_InputIterator __first, _InputIterator __last, 6242: std::input_iterator_tag); 6242: 6242: 6242: template 6242: void 6242: _M_assign_aux(_ForwardIterator __first, _ForwardIterator __last, 6242: std::forward_iterator_tag); 6242: 6242: 6242: 6242: void 6242: _M_fill_assign(size_type __n, const value_type& __val); 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: template 6242: void 6242: _M_insert_dispatch(iterator __pos, _Integer __n, _Integer __val, 6242: __true_type) 6242: { _M_fill_insert(__pos, __n, __val); } 6242: 6242: 6242: template 6242: void 6242: _M_insert_dispatch(iterator __pos, _InputIterator __first, 6242: _InputIterator __last, __false_type) 6242: { 6242: _M_range_insert(__pos, __first, __last, 6242: std::__iterator_category(__first)); 6242: } 6242: 6242: 6242: template 6242: void 6242: _M_range_insert(iterator __pos, _InputIterator __first, 6242: _InputIterator __last, std::input_iterator_tag); 6242: 6242: 6242: template 6242: void 6242: _M_range_insert(iterator __pos, _ForwardIterator __first, 6242: _ForwardIterator __last, std::forward_iterator_tag); 6242: 6242: 6242: 6242: void 6242: _M_fill_insert(iterator __pos, size_type __n, const value_type& __x); 6242: 6242: 6242: 6242: void 6242: _M_default_append(size_type __n); 6242: 6242: bool 6242: _M_shrink_to_fit(); 6242: # 1584 "/usr/include/c++/8/bits/stl_vector.h" 3 6242: struct _Temporary_value 6242: { 6242: template 6242: explicit 6242: _Temporary_value(vector* __vec, _Args&&... __args) : _M_this(__vec) 6242: { 6242: _Alloc_traits::construct(_M_this->_M_impl, _M_ptr(), 6242: std::forward<_Args>(__args)...); 6242: } 6242: 6242: ~_Temporary_value() 6242: { _Alloc_traits::destroy(_M_this->_M_impl, _M_ptr()); } 6242: 6242: value_type& 6242: _M_val() { return *reinterpret_cast<_Tp*>(&__buf); } 6242: 6242: private: 6242: pointer 6242: _M_ptr() { return pointer_traits::pointer_to(_M_val()); } 6242: 6242: vector* _M_this; 6242: typename aligned_storage::type __buf; 6242: }; 6242: 6242: 6242: 6242: template 6242: void 6242: _M_insert_aux(iterator __position, _Arg&& __arg); 6242: 6242: template 6242: void 6242: _M_realloc_insert(iterator __position, _Args&&... __args); 6242: 6242: 6242: iterator 6242: _M_insert_rval(const_iterator __position, value_type&& __v); 6242: 6242: 6242: template 6242: iterator 6242: _M_emplace_aux(const_iterator __position, _Args&&... __args); 6242: 6242: 6242: iterator 6242: _M_emplace_aux(const_iterator __position, value_type&& __v) 6242: { return _M_insert_rval(__position, std::move(__v)); } 6242: 6242: 6242: 6242: size_type 6242: _M_check_len(size_type __n, const char* __s) const 6242: { 6242: if (max_size() - size() < __n) 6242: __throw_length_error((__s)); 6242: 6242: const size_type __len = size() + std::max(size(), __n); 6242: return (__len < size() || __len > max_size()) ? max_size() : __len; 6242: } 6242: 6242: 6242: 6242: 6242: 6242: void 6242: _M_erase_at_end(pointer __pos) noexcept 6242: { 6242: if (size_type __n = this->_M_impl._M_finish - __pos) 6242: { 6242: std::_Destroy(__pos, this->_M_impl._M_finish, 6242: _M_get_Tp_allocator()); 6242: this->_M_impl._M_finish = __pos; 6242: ; 6242: } 6242: } 6242: 6242: iterator 6242: _M_erase(iterator __position); 6242: 6242: iterator 6242: _M_erase(iterator __first, iterator __last); 6242: 6242: 6242: private: 6242: 6242: 6242: 6242: void 6242: _M_move_assign(vector&& __x, std::true_type) noexcept 6242: { 6242: vector __tmp(get_allocator()); 6242: this->_M_impl._M_swap_data(__tmp._M_impl); 6242: this->_M_impl._M_swap_data(__x._M_impl); 6242: std::__alloc_on_move(_M_get_Tp_allocator(), __x._M_get_Tp_allocator()); 6242: } 6242: 6242: 6242: 6242: void 6242: _M_move_assign(vector&& __x, std::false_type) 6242: { 6242: if (__x._M_get_Tp_allocator() == this->_M_get_Tp_allocator()) 6242: _M_move_assign(std::move(__x), std::true_type()); 6242: else 6242: { 6242: 6242: 6242: this->assign(std::__make_move_if_noexcept_iterator(__x.begin()), 6242: std::__make_move_if_noexcept_iterator(__x.end())); 6242: __x.clear(); 6242: } 6242: } 6242: 6242: 6242: template 6242: _Up* 6242: _M_data_ptr(_Up* __ptr) const noexcept 6242: { return __ptr; } 6242: 6242: 6242: template 6242: typename std::pointer_traits<_Ptr>::element_type* 6242: _M_data_ptr(_Ptr __ptr) const 6242: { return empty() ? nullptr : std::__to_address(__ptr); } 6242: # 1724 "/usr/include/c++/8/bits/stl_vector.h" 3 6242: }; 6242: # 1746 "/usr/include/c++/8/bits/stl_vector.h" 3 6242: template 6242: inline bool 6242: operator==(const vector<_Tp, _Alloc>& __x, const vector<_Tp, _Alloc>& __y) 6242: { return (__x.size() == __y.size() 6242: && std::equal(__x.begin(), __x.end(), __y.begin())); } 6242: # 1763 "/usr/include/c++/8/bits/stl_vector.h" 3 6242: template 6242: inline bool 6242: operator<(const vector<_Tp, _Alloc>& __x, const vector<_Tp, _Alloc>& __y) 6242: { return std::lexicographical_compare(__x.begin(), __x.end(), 6242: __y.begin(), __y.end()); } 6242: 6242: 6242: template 6242: inline bool 6242: operator!=(const vector<_Tp, _Alloc>& __x, const vector<_Tp, _Alloc>& __y) 6242: { return !(__x == __y); } 6242: 6242: 6242: template 6242: inline bool 6242: operator>(const vector<_Tp, _Alloc>& __x, const vector<_Tp, _Alloc>& __y) 6242: { return __y < __x; } 6242: 6242: 6242: template 6242: inline bool 6242: operator<=(const vector<_Tp, _Alloc>& __x, const vector<_Tp, _Alloc>& __y) 6242: { return !(__y < __x); } 6242: 6242: 6242: template 6242: inline bool 6242: operator>=(const vector<_Tp, _Alloc>& __x, const vector<_Tp, _Alloc>& __y) 6242: { return !(__x < __y); } 6242: 6242: 6242: template 6242: inline void 6242: swap(vector<_Tp, _Alloc>& __x, vector<_Tp, _Alloc>& __y) 6242: noexcept(noexcept(__x.swap(__y))) 6242: { __x.swap(__y); } 6242: 6242: 6242: 6242: } 6242: # 65 "/usr/include/c++/8/vector" 2 3 6242: # 1 "/usr/include/c++/8/bits/stl_bvector.h" 1 3 6242: # 63 "/usr/include/c++/8/bits/stl_bvector.h" 3 6242: namespace std __attribute__ ((__visibility__ ("default"))) 6242: { 6242: 6242: 6242: 6242: typedef unsigned long _Bit_type; 6242: enum { _S_word_bit = int(8 * sizeof(_Bit_type)) }; 6242: 6242: struct _Bit_reference 6242: { 6242: _Bit_type * _M_p; 6242: _Bit_type _M_mask; 6242: 6242: _Bit_reference(_Bit_type * __x, _Bit_type __y) 6242: : _M_p(__x), _M_mask(__y) { } 6242: 6242: _Bit_reference() noexcept : _M_p(0), _M_mask(0) { } 6242: 6242: operator bool() const noexcept 6242: { return !!(*_M_p & _M_mask); } 6242: 6242: _Bit_reference& 6242: operator=(bool __x) noexcept 6242: { 6242: if (__x) 6242: *_M_p |= _M_mask; 6242: else 6242: *_M_p &= ~_M_mask; 6242: return *this; 6242: } 6242: 6242: _Bit_reference& 6242: operator=(const _Bit_reference& __x) noexcept 6242: { return *this = bool(__x); } 6242: 6242: bool 6242: operator==(const _Bit_reference& __x) const 6242: { return bool(*this) == bool(__x); } 6242: 6242: bool 6242: operator<(const _Bit_reference& __x) const 6242: { return !bool(*this) && bool(__x); } 6242: 6242: void 6242: flip() noexcept 6242: { *_M_p ^= _M_mask; } 6242: }; 6242: 6242: 6242: inline void 6242: swap(_Bit_reference __x, _Bit_reference __y) noexcept 6242: { 6242: bool __tmp = __x; 6242: __x = __y; 6242: __y = __tmp; 6242: } 6242: 6242: inline void 6242: swap(_Bit_reference __x, bool& __y) noexcept 6242: { 6242: bool __tmp = __x; 6242: __x = __y; 6242: __y = __tmp; 6242: } 6242: 6242: inline void 6242: swap(bool& __x, _Bit_reference __y) noexcept 6242: { 6242: bool __tmp = __x; 6242: __x = __y; 6242: __y = __tmp; 6242: } 6242: 6242: 6242: struct _Bit_iterator_base 6242: : public std::iterator 6242: { 6242: _Bit_type * _M_p; 6242: unsigned int _M_offset; 6242: 6242: _Bit_iterator_base(_Bit_type * __x, unsigned int __y) 6242: : _M_p(__x), _M_offset(__y) { } 6242: 6242: void 6242: _M_bump_up() 6242: { 6242: if (_M_offset++ == int(_S_word_bit) - 1) 6242: { 6242: _M_offset = 0; 6242: ++_M_p; 6242: } 6242: } 6242: 6242: void 6242: _M_bump_down() 6242: { 6242: if (_M_offset-- == 0) 6242: { 6242: _M_offset = int(_S_word_bit) - 1; 6242: --_M_p; 6242: } 6242: } 6242: 6242: void 6242: _M_incr(ptrdiff_t __i) 6242: { 6242: difference_type __n = __i + _M_offset; 6242: _M_p += __n / int(_S_word_bit); 6242: __n = __n % int(_S_word_bit); 6242: if (__n < 0) 6242: { 6242: __n += int(_S_word_bit); 6242: --_M_p; 6242: } 6242: _M_offset = static_cast(__n); 6242: } 6242: 6242: bool 6242: operator==(const _Bit_iterator_base& __i) const 6242: { return _M_p == __i._M_p && _M_offset == __i._M_offset; } 6242: 6242: bool 6242: operator<(const _Bit_iterator_base& __i) const 6242: { 6242: return _M_p < __i._M_p 6242: || (_M_p == __i._M_p && _M_offset < __i._M_offset); 6242: } 6242: 6242: bool 6242: operator!=(const _Bit_iterator_base& __i) const 6242: { return !(*this == __i); } 6242: 6242: bool 6242: operator>(const _Bit_iterator_base& __i) const 6242: { return __i < *this; } 6242: 6242: bool 6242: operator<=(const _Bit_iterator_base& __i) const 6242: { return !(__i < *this); } 6242: 6242: bool 6242: operator>=(const _Bit_iterator_base& __i) const 6242: { return !(*this < __i); } 6242: }; 6242: 6242: inline ptrdiff_t 6242: operator-(const _Bit_iterator_base& __x, const _Bit_iterator_base& __y) 6242: { 6242: return (int(_S_word_bit) * (__x._M_p - __y._M_p) 6242: + __x._M_offset - __y._M_offset); 6242: } 6242: 6242: struct _Bit_iterator : public _Bit_iterator_base 6242: { 6242: typedef _Bit_reference reference; 6242: typedef _Bit_reference* pointer; 6242: typedef _Bit_iterator iterator; 6242: 6242: _Bit_iterator() : _Bit_iterator_base(0, 0) { } 6242: 6242: _Bit_iterator(_Bit_type * __x, unsigned int __y) 6242: : _Bit_iterator_base(__x, __y) { } 6242: 6242: iterator 6242: _M_const_cast() const 6242: { return *this; } 6242: 6242: reference 6242: operator*() const 6242: { return reference(_M_p, 1UL << _M_offset); } 6242: 6242: iterator& 6242: operator++() 6242: { 6242: _M_bump_up(); 6242: return *this; 6242: } 6242: 6242: iterator 6242: operator++(int) 6242: { 6242: iterator __tmp = *this; 6242: _M_bump_up(); 6242: return __tmp; 6242: } 6242: 6242: iterator& 6242: operator--() 6242: { 6242: _M_bump_down(); 6242: return *this; 6242: } 6242: 6242: iterator 6242: operator--(int) 6242: { 6242: iterator __tmp = *this; 6242: _M_bump_down(); 6242: return __tmp; 6242: } 6242: 6242: iterator& 6242: operator+=(difference_type __i) 6242: { 6242: _M_incr(__i); 6242: return *this; 6242: } 6242: 6242: iterator& 6242: operator-=(difference_type __i) 6242: { 6242: *this += -__i; 6242: return *this; 6242: } 6242: 6242: iterator 6242: operator+(difference_type __i) const 6242: { 6242: iterator __tmp = *this; 6242: return __tmp += __i; 6242: } 6242: 6242: iterator 6242: operator-(difference_type __i) const 6242: { 6242: iterator __tmp = *this; 6242: return __tmp -= __i; 6242: } 6242: 6242: reference 6242: operator[](difference_type __i) const 6242: { return *(*this + __i); } 6242: }; 6242: 6242: inline _Bit_iterator 6242: operator+(ptrdiff_t __n, const _Bit_iterator& __x) 6242: { return __x + __n; } 6242: 6242: struct _Bit_const_iterator : public _Bit_iterator_base 6242: { 6242: typedef bool reference; 6242: typedef bool const_reference; 6242: typedef const bool* pointer; 6242: typedef _Bit_const_iterator const_iterator; 6242: 6242: _Bit_const_iterator() : _Bit_iterator_base(0, 0) { } 6242: 6242: _Bit_const_iterator(_Bit_type * __x, unsigned int __y) 6242: : _Bit_iterator_base(__x, __y) { } 6242: 6242: _Bit_const_iterator(const _Bit_iterator& __x) 6242: : _Bit_iterator_base(__x._M_p, __x._M_offset) { } 6242: 6242: _Bit_iterator 6242: _M_const_cast() const 6242: { return _Bit_iterator(_M_p, _M_offset); } 6242: 6242: const_reference 6242: operator*() const 6242: { return _Bit_reference(_M_p, 1UL << _M_offset); } 6242: 6242: const_iterator& 6242: operator++() 6242: { 6242: _M_bump_up(); 6242: return *this; 6242: } 6242: 6242: const_iterator 6242: operator++(int) 6242: { 6242: const_iterator __tmp = *this; 6242: _M_bump_up(); 6242: return __tmp; 6242: } 6242: 6242: const_iterator& 6242: operator--() 6242: { 6242: _M_bump_down(); 6242: return *this; 6242: } 6242: 6242: const_iterator 6242: operator--(int) 6242: { 6242: const_iterator __tmp = *this; 6242: _M_bump_down(); 6242: return __tmp; 6242: } 6242: 6242: const_iterator& 6242: operator+=(difference_type __i) 6242: { 6242: _M_incr(__i); 6242: return *this; 6242: } 6242: 6242: const_iterator& 6242: operator-=(difference_type __i) 6242: { 6242: *this += -__i; 6242: return *this; 6242: } 6242: 6242: const_iterator 6242: operator+(difference_type __i) const 6242: { 6242: const_iterator __tmp = *this; 6242: return __tmp += __i; 6242: } 6242: 6242: const_iterator 6242: operator-(difference_type __i) const 6242: { 6242: const_iterator __tmp = *this; 6242: return __tmp -= __i; 6242: } 6242: 6242: const_reference 6242: operator[](difference_type __i) const 6242: { return *(*this + __i); } 6242: }; 6242: 6242: inline _Bit_const_iterator 6242: operator+(ptrdiff_t __n, const _Bit_const_iterator& __x) 6242: { return __x + __n; } 6242: 6242: inline void 6242: __fill_bvector(_Bit_type * __v, 6242: unsigned int __first, unsigned int __last, bool __x) 6242: { 6242: const _Bit_type __fmask = ~0ul << __first; 6242: const _Bit_type __lmask = ~0ul >> (_S_word_bit - __last); 6242: const _Bit_type __mask = __fmask & __lmask; 6242: 6242: if (__x) 6242: *__v |= __mask; 6242: else 6242: *__v &= ~__mask; 6242: } 6242: 6242: inline void 6242: fill(_Bit_iterator __first, _Bit_iterator __last, const bool& __x) 6242: { 6242: if (__first._M_p != __last._M_p) 6242: { 6242: _Bit_type* __first_p = __first._M_p; 6242: if (__first._M_offset != 0) 6242: __fill_bvector(__first_p++, __first._M_offset, _S_word_bit, __x); 6242: 6242: __builtin_memset(__first_p, __x ? ~0 : 0, 6242: (__last._M_p - __first_p) * sizeof(_Bit_type)); 6242: 6242: if (__last._M_offset != 0) 6242: __fill_bvector(__last._M_p, 0, __last._M_offset, __x); 6242: } 6242: else if (__first._M_offset != __last._M_offset) 6242: __fill_bvector(__first._M_p, __first._M_offset, __last._M_offset, __x); 6242: } 6242: 6242: template 6242: struct _Bvector_base 6242: { 6242: typedef typename __gnu_cxx::__alloc_traits<_Alloc>::template 6242: rebind<_Bit_type>::other _Bit_alloc_type; 6242: typedef typename __gnu_cxx::__alloc_traits<_Bit_alloc_type> 6242: _Bit_alloc_traits; 6242: typedef typename _Bit_alloc_traits::pointer _Bit_pointer; 6242: 6242: struct _Bvector_impl_data 6242: { 6242: _Bit_iterator _M_start; 6242: _Bit_iterator _M_finish; 6242: _Bit_pointer _M_end_of_storage; 6242: 6242: _Bvector_impl_data() noexcept 6242: : _M_start(), _M_finish(), _M_end_of_storage() 6242: { } 6242: 6242: 6242: _Bvector_impl_data(_Bvector_impl_data&& __x) noexcept 6242: : _M_start(__x._M_start), _M_finish(__x._M_finish) 6242: , _M_end_of_storage(__x._M_end_of_storage) 6242: { __x._M_reset(); } 6242: 6242: void 6242: _M_move_data(_Bvector_impl_data&& __x) noexcept 6242: { 6242: this->_M_start = __x._M_start; 6242: this->_M_finish = __x._M_finish; 6242: this->_M_end_of_storage = __x._M_end_of_storage; 6242: __x._M_reset(); 6242: } 6242: 6242: 6242: void 6242: _M_reset() noexcept 6242: { 6242: _M_start = _M_finish = _Bit_iterator(); 6242: _M_end_of_storage = _Bit_pointer(); 6242: } 6242: }; 6242: 6242: struct _Bvector_impl 6242: : public _Bit_alloc_type, public _Bvector_impl_data 6242: { 6242: public: 6242: _Bvector_impl() 6242: noexcept(noexcept(_Bit_alloc_type())) 6242: : _Bit_alloc_type() 6242: { } 6242: 6242: _Bvector_impl(const _Bit_alloc_type& __a) noexcept 6242: : _Bit_alloc_type(__a) 6242: { } 6242: 6242: 6242: _Bvector_impl(_Bvector_impl&&) = default; 6242: 6242: 6242: _Bit_type* 6242: _M_end_addr() const noexcept 6242: { 6242: if (this->_M_end_of_storage) 6242: return std::__addressof(this->_M_end_of_storage[-1]) + 1; 6242: return 0; 6242: } 6242: }; 6242: 6242: public: 6242: typedef _Alloc allocator_type; 6242: 6242: _Bit_alloc_type& 6242: _M_get_Bit_allocator() noexcept 6242: { return this->_M_impl; } 6242: 6242: const _Bit_alloc_type& 6242: _M_get_Bit_allocator() const noexcept 6242: { return this->_M_impl; } 6242: 6242: allocator_type 6242: get_allocator() const noexcept 6242: { return allocator_type(_M_get_Bit_allocator()); } 6242: 6242: 6242: _Bvector_base() = default; 6242: 6242: 6242: 6242: 6242: _Bvector_base(const allocator_type& __a) 6242: : _M_impl(__a) { } 6242: 6242: 6242: _Bvector_base(_Bvector_base&&) = default; 6242: 6242: 6242: ~_Bvector_base() 6242: { this->_M_deallocate(); } 6242: 6242: protected: 6242: _Bvector_impl _M_impl; 6242: 6242: _Bit_pointer 6242: _M_allocate(size_t __n) 6242: { return _Bit_alloc_traits::allocate(_M_impl, _S_nword(__n)); } 6242: 6242: void 6242: _M_deallocate() 6242: { 6242: if (_M_impl._M_start._M_p) 6242: { 6242: const size_t __n = _M_impl._M_end_addr() - _M_impl._M_start._M_p; 6242: _Bit_alloc_traits::deallocate(_M_impl, 6242: _M_impl._M_end_of_storage - __n, 6242: __n); 6242: _M_impl._M_reset(); 6242: } 6242: } 6242: 6242: 6242: void 6242: _M_move_data(_Bvector_base&& __x) noexcept 6242: { _M_impl._M_move_data(std::move(__x._M_impl)); } 6242: 6242: 6242: static size_t 6242: _S_nword(size_t __n) 6242: { return (__n + int(_S_word_bit) - 1) / int(_S_word_bit); } 6242: }; 6242: 6242: 6242: 6242: } 6242: 6242: 6242: 6242: 6242: namespace std __attribute__ ((__visibility__ ("default"))) 6242: { 6242: 6242: 6242: # 586 "/usr/include/c++/8/bits/stl_bvector.h" 3 6242: template 6242: class vector : protected _Bvector_base<_Alloc> 6242: { 6242: typedef _Bvector_base<_Alloc> _Base; 6242: typedef typename _Base::_Bit_pointer _Bit_pointer; 6242: typedef typename _Base::_Bit_alloc_traits _Bit_alloc_traits; 6242: 6242: 6242: template friend struct hash; 6242: 6242: 6242: public: 6242: typedef bool value_type; 6242: typedef size_t size_type; 6242: typedef ptrdiff_t difference_type; 6242: typedef _Bit_reference reference; 6242: typedef bool const_reference; 6242: typedef _Bit_reference* pointer; 6242: typedef const bool* const_pointer; 6242: typedef _Bit_iterator iterator; 6242: typedef _Bit_const_iterator const_iterator; 6242: typedef std::reverse_iterator const_reverse_iterator; 6242: typedef std::reverse_iterator reverse_iterator; 6242: typedef _Alloc allocator_type; 6242: 6242: allocator_type 6242: get_allocator() const 6242: { return _Base::get_allocator(); } 6242: 6242: protected: 6242: using _Base::_M_allocate; 6242: using _Base::_M_deallocate; 6242: using _Base::_S_nword; 6242: using _Base::_M_get_Bit_allocator; 6242: 6242: public: 6242: 6242: vector() = default; 6242: 6242: 6242: 6242: 6242: explicit 6242: vector(const allocator_type& __a) 6242: : _Base(__a) { } 6242: 6242: 6242: explicit 6242: vector(size_type __n, const allocator_type& __a = allocator_type()) 6242: : vector(__n, false, __a) 6242: { } 6242: 6242: vector(size_type __n, const bool& __value, 6242: const allocator_type& __a = allocator_type()) 6242: 6242: 6242: 6242: 6242: 6242: : _Base(__a) 6242: { 6242: _M_initialize(__n); 6242: _M_initialize_value(__value); 6242: } 6242: 6242: vector(const vector& __x) 6242: : _Base(_Bit_alloc_traits::_S_select_on_copy(__x._M_get_Bit_allocator())) 6242: { 6242: _M_initialize(__x.size()); 6242: _M_copy_aligned(__x.begin(), __x.end(), this->_M_impl._M_start); 6242: } 6242: 6242: 6242: vector(vector&&) = default; 6242: 6242: vector(vector&& __x, const allocator_type& __a) 6242: noexcept(_Bit_alloc_traits::_S_always_equal()) 6242: : _Base(__a) 6242: { 6242: if (__x.get_allocator() == __a) 6242: this->_M_move_data(std::move(__x)); 6242: else 6242: { 6242: _M_initialize(__x.size()); 6242: _M_copy_aligned(__x.begin(), __x.end(), begin()); 6242: __x.clear(); 6242: } 6242: } 6242: 6242: vector(const vector& __x, const allocator_type& __a) 6242: : _Base(__a) 6242: { 6242: _M_initialize(__x.size()); 6242: _M_copy_aligned(__x.begin(), __x.end(), this->_M_impl._M_start); 6242: } 6242: 6242: vector(initializer_list __l, 6242: const allocator_type& __a = allocator_type()) 6242: : _Base(__a) 6242: { 6242: _M_initialize_range(__l.begin(), __l.end(), 6242: random_access_iterator_tag()); 6242: } 6242: 6242: 6242: 6242: template> 6242: vector(_InputIterator __first, _InputIterator __last, 6242: const allocator_type& __a = allocator_type()) 6242: : _Base(__a) 6242: { _M_initialize_dispatch(__first, __last, __false_type()); } 6242: # 709 "/usr/include/c++/8/bits/stl_bvector.h" 3 6242: ~vector() noexcept { } 6242: 6242: vector& 6242: operator=(const vector& __x) 6242: { 6242: if (&__x == this) 6242: return *this; 6242: 6242: if (_Bit_alloc_traits::_S_propagate_on_copy_assign()) 6242: { 6242: if (this->_M_get_Bit_allocator() != __x._M_get_Bit_allocator()) 6242: { 6242: this->_M_deallocate(); 6242: std::__alloc_on_copy(_M_get_Bit_allocator(), 6242: __x._M_get_Bit_allocator()); 6242: _M_initialize(__x.size()); 6242: } 6242: else 6242: std::__alloc_on_copy(_M_get_Bit_allocator(), 6242: __x._M_get_Bit_allocator()); 6242: } 6242: 6242: if (__x.size() > capacity()) 6242: { 6242: this->_M_deallocate(); 6242: _M_initialize(__x.size()); 6242: } 6242: this->_M_impl._M_finish = _M_copy_aligned(__x.begin(), __x.end(), 6242: begin()); 6242: return *this; 6242: } 6242: 6242: 6242: vector& 6242: operator=(vector&& __x) noexcept(_Bit_alloc_traits::_S_nothrow_move()) 6242: { 6242: if (_Bit_alloc_traits::_S_propagate_on_move_assign() 6242: || this->_M_get_Bit_allocator() == __x._M_get_Bit_allocator()) 6242: { 6242: this->_M_deallocate(); 6242: this->_M_move_data(std::move(__x)); 6242: std::__alloc_on_move(_M_get_Bit_allocator(), 6242: __x._M_get_Bit_allocator()); 6242: } 6242: else 6242: { 6242: if (__x.size() > capacity()) 6242: { 6242: this->_M_deallocate(); 6242: _M_initialize(__x.size()); 6242: } 6242: this->_M_impl._M_finish = _M_copy_aligned(__x.begin(), __x.end(), 6242: begin()); 6242: __x.clear(); 6242: } 6242: return *this; 6242: } 6242: 6242: vector& 6242: operator=(initializer_list __l) 6242: { 6242: this->assign (__l.begin(), __l.end()); 6242: return *this; 6242: } 6242: 6242: 6242: 6242: 6242: 6242: 6242: void 6242: assign(size_type __n, const bool& __x) 6242: { _M_fill_assign(__n, __x); } 6242: 6242: 6242: template> 6242: void 6242: assign(_InputIterator __first, _InputIterator __last) 6242: { _M_assign_aux(__first, __last, std::__iterator_category(__first)); } 6242: # 800 "/usr/include/c++/8/bits/stl_bvector.h" 3 6242: void 6242: assign(initializer_list __l) 6242: { _M_assign_aux(__l.begin(), __l.end(), random_access_iterator_tag()); } 6242: 6242: 6242: iterator 6242: begin() noexcept 6242: { return this->_M_impl._M_start; } 6242: 6242: const_iterator 6242: begin() const noexcept 6242: { return this->_M_impl._M_start; } 6242: 6242: iterator 6242: end() noexcept 6242: { return this->_M_impl._M_finish; } 6242: 6242: const_iterator 6242: end() const noexcept 6242: { return this->_M_impl._M_finish; } 6242: 6242: reverse_iterator 6242: rbegin() noexcept 6242: { return reverse_iterator(end()); } 6242: 6242: const_reverse_iterator 6242: rbegin() const noexcept 6242: { return const_reverse_iterator(end()); } 6242: 6242: reverse_iterator 6242: rend() noexcept 6242: { return reverse_iterator(begin()); } 6242: 6242: const_reverse_iterator 6242: rend() const noexcept 6242: { return const_reverse_iterator(begin()); } 6242: 6242: 6242: const_iterator 6242: cbegin() const noexcept 6242: { return this->_M_impl._M_start; } 6242: 6242: const_iterator 6242: cend() const noexcept 6242: { return this->_M_impl._M_finish; } 6242: 6242: const_reverse_iterator 6242: crbegin() const noexcept 6242: { return const_reverse_iterator(end()); } 6242: 6242: const_reverse_iterator 6242: crend() const noexcept 6242: { return const_reverse_iterator(begin()); } 6242: 6242: 6242: size_type 6242: size() const noexcept 6242: { return size_type(end() - begin()); } 6242: 6242: size_type 6242: max_size() const noexcept 6242: { 6242: const size_type __isize = 6242: __gnu_cxx::__numeric_traits::__max 6242: - int(_S_word_bit) + 1; 6242: const size_type __asize 6242: = _Bit_alloc_traits::max_size(_M_get_Bit_allocator()); 6242: return (__asize <= __isize / int(_S_word_bit) 6242: ? __asize * int(_S_word_bit) : __isize); 6242: } 6242: 6242: size_type 6242: capacity() const noexcept 6242: { return size_type(const_iterator(this->_M_impl._M_end_addr(), 0) 6242: - begin()); } 6242: 6242: bool 6242: empty() const noexcept 6242: { return begin() == end(); } 6242: 6242: reference 6242: operator[](size_type __n) 6242: { 6242: return *iterator(this->_M_impl._M_start._M_p 6242: + __n / int(_S_word_bit), __n % int(_S_word_bit)); 6242: } 6242: 6242: const_reference 6242: operator[](size_type __n) const 6242: { 6242: return *const_iterator(this->_M_impl._M_start._M_p 6242: + __n / int(_S_word_bit), __n % int(_S_word_bit)); 6242: } 6242: 6242: protected: 6242: void 6242: _M_range_check(size_type __n) const 6242: { 6242: if (__n >= this->size()) 6242: __throw_out_of_range_fmt(("vector::_M_range_check: __n " "(which is %zu) >= this->size() " "(which is %zu)") 6242: 6242: , 6242: __n, this->size()); 6242: } 6242: 6242: public: 6242: reference 6242: at(size_type __n) 6242: { _M_range_check(__n); return (*this)[__n]; } 6242: 6242: const_reference 6242: at(size_type __n) const 6242: { _M_range_check(__n); return (*this)[__n]; } 6242: 6242: void 6242: reserve(size_type __n) 6242: { 6242: if (__n > max_size()) 6242: __throw_length_error(("vector::reserve")); 6242: if (capacity() < __n) 6242: _M_reallocate(__n); 6242: } 6242: 6242: reference 6242: front() 6242: { return *begin(); } 6242: 6242: const_reference 6242: front() const 6242: { return *begin(); } 6242: 6242: reference 6242: back() 6242: { return *(end() - 1); } 6242: 6242: const_reference 6242: back() const 6242: { return *(end() - 1); } 6242: 6242: 6242: 6242: 6242: 6242: 6242: void 6242: data() noexcept { } 6242: 6242: void 6242: push_back(bool __x) 6242: { 6242: if (this->_M_impl._M_finish._M_p != this->_M_impl._M_end_addr()) 6242: *this->_M_impl._M_finish++ = __x; 6242: else 6242: _M_insert_aux(end(), __x); 6242: } 6242: 6242: void 6242: swap(vector& __x) noexcept 6242: { 6242: std::swap(this->_M_impl._M_start, __x._M_impl._M_start); 6242: std::swap(this->_M_impl._M_finish, __x._M_impl._M_finish); 6242: std::swap(this->_M_impl._M_end_of_storage, 6242: __x._M_impl._M_end_of_storage); 6242: _Bit_alloc_traits::_S_on_swap(_M_get_Bit_allocator(), 6242: __x._M_get_Bit_allocator()); 6242: } 6242: 6242: 6242: static void 6242: swap(reference __x, reference __y) noexcept 6242: { 6242: bool __tmp = __x; 6242: __x = __y; 6242: __y = __tmp; 6242: } 6242: 6242: iterator 6242: 6242: insert(const_iterator __position, const bool& __x = bool()) 6242: 6242: 6242: 6242: { 6242: const difference_type __n = __position - begin(); 6242: if (this->_M_impl._M_finish._M_p != this->_M_impl._M_end_addr() 6242: && __position == end()) 6242: *this->_M_impl._M_finish++ = __x; 6242: else 6242: _M_insert_aux(__position._M_const_cast(), __x); 6242: return begin() + __n; 6242: } 6242: 6242: 6242: template> 6242: iterator 6242: insert(const_iterator __position, 6242: _InputIterator __first, _InputIterator __last) 6242: { 6242: difference_type __offset = __position - cbegin(); 6242: _M_insert_dispatch(__position._M_const_cast(), 6242: __first, __last, __false_type()); 6242: return begin() + __offset; 6242: } 6242: # 1016 "/usr/include/c++/8/bits/stl_bvector.h" 3 6242: iterator 6242: insert(const_iterator __position, size_type __n, const bool& __x) 6242: { 6242: difference_type __offset = __position - cbegin(); 6242: _M_fill_insert(__position._M_const_cast(), __n, __x); 6242: return begin() + __offset; 6242: } 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: iterator 6242: insert(const_iterator __p, initializer_list __l) 6242: { return this->insert(__p, __l.begin(), __l.end()); } 6242: 6242: 6242: void 6242: pop_back() 6242: { --this->_M_impl._M_finish; } 6242: 6242: iterator 6242: 6242: erase(const_iterator __position) 6242: 6242: 6242: 6242: { return _M_erase(__position._M_const_cast()); } 6242: 6242: iterator 6242: 6242: erase(const_iterator __first, const_iterator __last) 6242: 6242: 6242: 6242: { return _M_erase(__first._M_const_cast(), __last._M_const_cast()); } 6242: 6242: void 6242: resize(size_type __new_size, bool __x = bool()) 6242: { 6242: if (__new_size < size()) 6242: _M_erase_at_end(begin() + difference_type(__new_size)); 6242: else 6242: insert(end(), __new_size - size(), __x); 6242: } 6242: 6242: 6242: void 6242: shrink_to_fit() 6242: { _M_shrink_to_fit(); } 6242: 6242: 6242: void 6242: flip() noexcept 6242: { 6242: _Bit_type * const __end = this->_M_impl._M_end_addr(); 6242: for (_Bit_type * __p = this->_M_impl._M_start._M_p; __p != __end; ++__p) 6242: *__p = ~*__p; 6242: } 6242: 6242: void 6242: clear() noexcept 6242: { _M_erase_at_end(begin()); } 6242: 6242: 6242: template 6242: 6242: 6242: 6242: void 6242: 6242: emplace_back(_Args&&... __args) 6242: { 6242: push_back(bool(__args...)); 6242: 6242: 6242: 6242: } 6242: 6242: template 6242: iterator 6242: emplace(const_iterator __pos, _Args&&... __args) 6242: { return insert(__pos, bool(__args...)); } 6242: 6242: 6242: protected: 6242: 6242: iterator 6242: _M_copy_aligned(const_iterator __first, const_iterator __last, 6242: iterator __result) 6242: { 6242: _Bit_type* __q = std::copy(__first._M_p, __last._M_p, __result._M_p); 6242: return std::copy(const_iterator(__last._M_p, 0), __last, 6242: iterator(__q, 0)); 6242: } 6242: 6242: void 6242: _M_initialize(size_type __n) 6242: { 6242: if (__n) 6242: { 6242: _Bit_pointer __q = this->_M_allocate(__n); 6242: this->_M_impl._M_end_of_storage = __q + _S_nword(__n); 6242: this->_M_impl._M_start = iterator(std::__addressof(*__q), 0); 6242: } 6242: else 6242: { 6242: this->_M_impl._M_end_of_storage = _Bit_pointer(); 6242: this->_M_impl._M_start = iterator(0, 0); 6242: } 6242: this->_M_impl._M_finish = this->_M_impl._M_start + difference_type(__n); 6242: 6242: } 6242: 6242: void 6242: _M_initialize_value(bool __x) 6242: { 6242: if (_Bit_type* __p = this->_M_impl._M_start._M_p) 6242: __builtin_memset(__p, __x ? ~0 : 0, 6242: (this->_M_impl._M_end_addr() - __p) 6242: * sizeof(_Bit_type)); 6242: } 6242: 6242: void 6242: _M_reallocate(size_type __n); 6242: 6242: 6242: bool 6242: _M_shrink_to_fit(); 6242: 6242: 6242: 6242: 6242: 6242: 6242: template 6242: void 6242: _M_initialize_dispatch(_Integer __n, _Integer __x, __true_type) 6242: { 6242: _M_initialize(static_cast(__n)); 6242: _M_initialize_value(__x); 6242: } 6242: 6242: template 6242: void 6242: _M_initialize_dispatch(_InputIterator __first, _InputIterator __last, 6242: __false_type) 6242: { _M_initialize_range(__first, __last, 6242: std::__iterator_category(__first)); } 6242: 6242: template 6242: void 6242: _M_initialize_range(_InputIterator __first, _InputIterator __last, 6242: std::input_iterator_tag) 6242: { 6242: for (; __first != __last; ++__first) 6242: push_back(*__first); 6242: } 6242: 6242: template 6242: void 6242: _M_initialize_range(_ForwardIterator __first, _ForwardIterator __last, 6242: std::forward_iterator_tag) 6242: { 6242: const size_type __n = std::distance(__first, __last); 6242: _M_initialize(__n); 6242: std::copy(__first, __last, this->_M_impl._M_start); 6242: } 6242: # 1202 "/usr/include/c++/8/bits/stl_bvector.h" 3 6242: void 6242: _M_fill_assign(size_t __n, bool __x) 6242: { 6242: if (__n > size()) 6242: { 6242: _M_initialize_value(__x); 6242: insert(end(), __n - size(), __x); 6242: } 6242: else 6242: { 6242: _M_erase_at_end(begin() + __n); 6242: _M_initialize_value(__x); 6242: } 6242: } 6242: 6242: template 6242: void 6242: _M_assign_aux(_InputIterator __first, _InputIterator __last, 6242: std::input_iterator_tag) 6242: { 6242: iterator __cur = begin(); 6242: for (; __first != __last && __cur != end(); ++__cur, ++__first) 6242: *__cur = *__first; 6242: if (__first == __last) 6242: _M_erase_at_end(__cur); 6242: else 6242: insert(end(), __first, __last); 6242: } 6242: 6242: template 6242: void 6242: _M_assign_aux(_ForwardIterator __first, _ForwardIterator __last, 6242: std::forward_iterator_tag) 6242: { 6242: const size_type __len = std::distance(__first, __last); 6242: if (__len < size()) 6242: _M_erase_at_end(std::copy(__first, __last, begin())); 6242: else 6242: { 6242: _ForwardIterator __mid = __first; 6242: std::advance(__mid, size()); 6242: std::copy(__first, __mid, begin()); 6242: insert(end(), __mid, __last); 6242: } 6242: } 6242: 6242: 6242: 6242: 6242: 6242: template 6242: void 6242: _M_insert_dispatch(iterator __pos, _Integer __n, _Integer __x, 6242: __true_type) 6242: { _M_fill_insert(__pos, __n, __x); } 6242: 6242: template 6242: void 6242: _M_insert_dispatch(iterator __pos, 6242: _InputIterator __first, _InputIterator __last, 6242: __false_type) 6242: { _M_insert_range(__pos, __first, __last, 6242: std::__iterator_category(__first)); } 6242: 6242: void 6242: _M_fill_insert(iterator __position, size_type __n, bool __x); 6242: 6242: template 6242: void 6242: _M_insert_range(iterator __pos, _InputIterator __first, 6242: _InputIterator __last, std::input_iterator_tag) 6242: { 6242: for (; __first != __last; ++__first) 6242: { 6242: __pos = insert(__pos, *__first); 6242: ++__pos; 6242: } 6242: } 6242: 6242: template 6242: void 6242: _M_insert_range(iterator __position, _ForwardIterator __first, 6242: _ForwardIterator __last, std::forward_iterator_tag); 6242: 6242: void 6242: _M_insert_aux(iterator __position, bool __x); 6242: 6242: size_type 6242: _M_check_len(size_type __n, const char* __s) const 6242: { 6242: if (max_size() - size() < __n) 6242: __throw_length_error((__s)); 6242: 6242: const size_type __len = size() + std::max(size(), __n); 6242: return (__len < size() || __len > max_size()) ? max_size() : __len; 6242: } 6242: 6242: void 6242: _M_erase_at_end(iterator __pos) 6242: { this->_M_impl._M_finish = __pos; } 6242: 6242: iterator 6242: _M_erase(iterator __pos); 6242: 6242: iterator 6242: _M_erase(iterator __first, iterator __last); 6242: }; 6242: 6242: 6242: 6242: } 6242: 6242: 6242: 6242: # 1 "/usr/include/c++/8/bits/functional_hash.h" 1 3 6242: # 33 "/usr/include/c++/8/bits/functional_hash.h" 3 6242: 6242: # 34 "/usr/include/c++/8/bits/functional_hash.h" 3 6242: 6242: 6242: 6242: namespace std __attribute__ ((__visibility__ ("default"))) 6242: { 6242: 6242: # 49 "/usr/include/c++/8/bits/functional_hash.h" 3 6242: template 6242: struct __hash_base 6242: { 6242: typedef _Result result_type ; 6242: typedef _Arg argument_type ; 6242: }; 6242: 6242: 6242: template 6242: struct hash; 6242: 6242: template 6242: struct __poison_hash 6242: { 6242: static constexpr bool __enable_hash_call = false; 6242: private: 6242: 6242: __poison_hash(__poison_hash&&); 6242: ~__poison_hash(); 6242: }; 6242: 6242: template 6242: struct __poison_hash<_Tp, __void_t()(declval<_Tp>()))>> 6242: { 6242: static constexpr bool __enable_hash_call = true; 6242: }; 6242: 6242: 6242: template::value> 6242: struct __hash_enum 6242: { 6242: private: 6242: 6242: __hash_enum(__hash_enum&&); 6242: ~__hash_enum(); 6242: }; 6242: 6242: 6242: template 6242: struct __hash_enum<_Tp, true> : public __hash_base 6242: { 6242: size_t 6242: operator()(_Tp __val) const noexcept 6242: { 6242: using __type = typename underlying_type<_Tp>::type; 6242: return hash<__type>{}(static_cast<__type>(__val)); 6242: } 6242: }; 6242: 6242: 6242: 6242: template 6242: struct hash : __hash_enum<_Tp> 6242: { }; 6242: 6242: 6242: template 6242: struct hash<_Tp*> : public __hash_base 6242: { 6242: size_t 6242: operator()(_Tp* __p) const noexcept 6242: { return reinterpret_cast(__p); } 6242: }; 6242: # 124 "/usr/include/c++/8/bits/functional_hash.h" 3 6242: template<> struct hash : public __hash_base { size_t operator()(bool __val) const noexcept { return static_cast(__val); } }; 6242: 6242: 6242: template<> struct hash : public __hash_base { size_t operator()(char __val) const noexcept { return static_cast(__val); } }; 6242: 6242: 6242: template<> struct hash : public __hash_base { size_t operator()(signed char __val) const noexcept { return static_cast(__val); } }; 6242: 6242: 6242: template<> struct hash : public __hash_base { size_t operator()(unsigned char __val) const noexcept { return static_cast(__val); } }; 6242: 6242: 6242: template<> struct hash : public __hash_base { size_t operator()(wchar_t __val) const noexcept { return static_cast(__val); } }; 6242: 6242: 6242: template<> struct hash : public __hash_base { size_t operator()(char16_t __val) const noexcept { return static_cast(__val); } }; 6242: 6242: 6242: template<> struct hash : public __hash_base { size_t operator()(char32_t __val) const noexcept { return static_cast(__val); } }; 6242: 6242: 6242: template<> struct hash : public __hash_base { size_t operator()(short __val) const noexcept { return static_cast(__val); } }; 6242: 6242: 6242: template<> struct hash : public __hash_base { size_t operator()(int __val) const noexcept { return static_cast(__val); } }; 6242: 6242: 6242: template<> struct hash : public __hash_base { size_t operator()(long __val) const noexcept { return static_cast(__val); } }; 6242: 6242: 6242: template<> struct hash : public __hash_base { size_t operator()(long long __val) const noexcept { return static_cast(__val); } }; 6242: 6242: 6242: template<> struct hash : public __hash_base { size_t operator()(unsigned short __val) const noexcept { return static_cast(__val); } }; 6242: 6242: 6242: template<> struct hash : public __hash_base { size_t operator()(unsigned int __val) const noexcept { return static_cast(__val); } }; 6242: 6242: 6242: template<> struct hash : public __hash_base { size_t operator()(unsigned long __val) const noexcept { return static_cast(__val); } }; 6242: 6242: 6242: template<> struct hash : public __hash_base { size_t operator()(unsigned long long __val) const noexcept { return static_cast(__val); } }; 6242: 6242: 6242: template<> struct hash<__int128> : public __hash_base { size_t operator()(__int128 __val) const noexcept { return static_cast(__val); } }; 6242: template<> struct hash<__int128 unsigned> : public __hash_base { size_t operator()(__int128 unsigned __val) const noexcept { return static_cast(__val); } }; 6242: # 187 "/usr/include/c++/8/bits/functional_hash.h" 3 6242: struct _Hash_impl 6242: { 6242: static size_t 6242: hash(const void* __ptr, size_t __clength, 6242: size_t __seed = static_cast(0xc70f6907UL)) 6242: { return _Hash_bytes(__ptr, __clength, __seed); } 6242: 6242: template 6242: static size_t 6242: hash(const _Tp& __val) 6242: { return hash(&__val, sizeof(__val)); } 6242: 6242: template 6242: static size_t 6242: __hash_combine(const _Tp& __val, size_t __hash) 6242: { return hash(&__val, sizeof(__val), __hash); } 6242: }; 6242: 6242: 6242: struct _Fnv_hash_impl 6242: { 6242: static size_t 6242: hash(const void* __ptr, size_t __clength, 6242: size_t __seed = static_cast(2166136261UL)) 6242: { return _Fnv_hash_bytes(__ptr, __clength, __seed); } 6242: 6242: template 6242: static size_t 6242: hash(const _Tp& __val) 6242: { return hash(&__val, sizeof(__val)); } 6242: 6242: template 6242: static size_t 6242: __hash_combine(const _Tp& __val, size_t __hash) 6242: { return hash(&__val, sizeof(__val), __hash); } 6242: }; 6242: 6242: 6242: template<> 6242: struct hash : public __hash_base 6242: { 6242: size_t 6242: operator()(float __val) const noexcept 6242: { 6242: 6242: return __val != 0.0f ? std::_Hash_impl::hash(__val) : 0; 6242: } 6242: }; 6242: 6242: 6242: template<> 6242: struct hash : public __hash_base 6242: { 6242: size_t 6242: operator()(double __val) const noexcept 6242: { 6242: 6242: return __val != 0.0 ? std::_Hash_impl::hash(__val) : 0; 6242: } 6242: }; 6242: 6242: 6242: template<> 6242: struct hash 6242: : public __hash_base 6242: { 6242: __attribute__ ((__pure__)) size_t 6242: operator()(long double __val) const noexcept; 6242: }; 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: template 6242: struct __is_fast_hash : public std::true_type 6242: { }; 6242: 6242: template<> 6242: struct __is_fast_hash> : public std::false_type 6242: { }; 6242: 6242: 6242: } 6242: # 1317 "/usr/include/c++/8/bits/stl_bvector.h" 2 3 6242: 6242: namespace std __attribute__ ((__visibility__ ("default"))) 6242: { 6242: 6242: 6242: 6242: 6242: template 6242: struct hash> 6242: : public __hash_base> 6242: { 6242: size_t 6242: operator()(const std::vector&) const noexcept; 6242: }; 6242: 6242: 6242: } 6242: # 66 "/usr/include/c++/8/vector" 2 3 6242: # 1 "/usr/include/c++/8/bits/range_access.h" 1 3 6242: # 33 "/usr/include/c++/8/bits/range_access.h" 3 6242: 6242: # 34 "/usr/include/c++/8/bits/range_access.h" 3 6242: 6242: 6242: 6242: namespace std __attribute__ ((__visibility__ ("default"))) 6242: { 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: template 6242: inline auto 6242: begin(_Container& __cont) -> decltype(__cont.begin()) 6242: { return __cont.begin(); } 6242: 6242: 6242: 6242: 6242: 6242: 6242: template 6242: inline auto 6242: begin(const _Container& __cont) -> decltype(__cont.begin()) 6242: { return __cont.begin(); } 6242: 6242: 6242: 6242: 6242: 6242: 6242: template 6242: inline auto 6242: end(_Container& __cont) -> decltype(__cont.end()) 6242: { return __cont.end(); } 6242: 6242: 6242: 6242: 6242: 6242: 6242: template 6242: inline auto 6242: end(const _Container& __cont) -> decltype(__cont.end()) 6242: { return __cont.end(); } 6242: 6242: 6242: 6242: 6242: 6242: template 6242: inline _Tp* 6242: begin(_Tp (&__arr)[_Nm]) 6242: { return __arr; } 6242: 6242: 6242: 6242: 6242: 6242: 6242: template 6242: inline _Tp* 6242: end(_Tp (&__arr)[_Nm]) 6242: { return __arr + _Nm; } 6242: # 323 "/usr/include/c++/8/bits/range_access.h" 3 6242: 6242: } 6242: # 67 "/usr/include/c++/8/vector" 2 3 6242: 6242: 6242: # 1 "/usr/include/c++/8/bits/vector.tcc" 1 3 6242: # 59 "/usr/include/c++/8/bits/vector.tcc" 3 6242: namespace std __attribute__ ((__visibility__ ("default"))) 6242: { 6242: 6242: 6242: 6242: template 6242: void 6242: vector<_Tp, _Alloc>:: 6242: reserve(size_type __n) 6242: { 6242: if (__n > this->max_size()) 6242: __throw_length_error(("vector::reserve")); 6242: if (this->capacity() < __n) 6242: { 6242: const size_type __old_size = size(); 6242: pointer __tmp = _M_allocate_and_copy(__n, 6242: std::__make_move_if_noexcept_iterator(this->_M_impl._M_start), 6242: std::__make_move_if_noexcept_iterator(this->_M_impl._M_finish)); 6242: ; 6242: std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish, 6242: _M_get_Tp_allocator()); 6242: _M_deallocate(this->_M_impl._M_start, 6242: this->_M_impl._M_end_of_storage 6242: - this->_M_impl._M_start); 6242: this->_M_impl._M_start = __tmp; 6242: this->_M_impl._M_finish = __tmp + __old_size; 6242: this->_M_impl._M_end_of_storage = this->_M_impl._M_start + __n; 6242: } 6242: } 6242: 6242: 6242: template 6242: template 6242: 6242: 6242: 6242: void 6242: 6242: vector<_Tp, _Alloc>:: 6242: emplace_back(_Args&&... __args) 6242: { 6242: if (this->_M_impl._M_finish != this->_M_impl._M_end_of_storage) 6242: { 6242: ; 6242: _Alloc_traits::construct(this->_M_impl, this->_M_impl._M_finish, 6242: std::forward<_Args>(__args)...); 6242: ++this->_M_impl._M_finish; 6242: ; 6242: } 6242: else 6242: _M_realloc_insert(end(), std::forward<_Args>(__args)...); 6242: 6242: 6242: 6242: } 6242: 6242: 6242: template 6242: typename vector<_Tp, _Alloc>::iterator 6242: vector<_Tp, _Alloc>:: 6242: 6242: insert(const_iterator __position, const value_type& __x) 6242: 6242: 6242: 6242: { 6242: const size_type __n = __position - begin(); 6242: if (this->_M_impl._M_finish != this->_M_impl._M_end_of_storage) 6242: if (__position == end()) 6242: { 6242: ; 6242: _Alloc_traits::construct(this->_M_impl, this->_M_impl._M_finish, 6242: __x); 6242: ++this->_M_impl._M_finish; 6242: ; 6242: } 6242: else 6242: { 6242: 6242: const auto __pos = begin() + (__position - cbegin()); 6242: 6242: 6242: _Temporary_value __x_copy(this, __x); 6242: _M_insert_aux(__pos, std::move(__x_copy._M_val())); 6242: 6242: 6242: 6242: } 6242: else 6242: 6242: _M_realloc_insert(begin() + (__position - cbegin()), __x); 6242: 6242: 6242: 6242: 6242: return iterator(this->_M_impl._M_start + __n); 6242: } 6242: 6242: template 6242: typename vector<_Tp, _Alloc>::iterator 6242: vector<_Tp, _Alloc>:: 6242: _M_erase(iterator __position) 6242: { 6242: if (__position + 1 != end()) 6242: std::move(__position + 1, end(), __position); 6242: --this->_M_impl._M_finish; 6242: _Alloc_traits::destroy(this->_M_impl, this->_M_impl._M_finish); 6242: ; 6242: return __position; 6242: } 6242: 6242: template 6242: typename vector<_Tp, _Alloc>::iterator 6242: vector<_Tp, _Alloc>:: 6242: _M_erase(iterator __first, iterator __last) 6242: { 6242: if (__first != __last) 6242: { 6242: if (__last != end()) 6242: std::move(__last, end(), __first); 6242: _M_erase_at_end(__first.base() + (end() - __last)); 6242: } 6242: return __first; 6242: } 6242: 6242: template 6242: vector<_Tp, _Alloc>& 6242: vector<_Tp, _Alloc>:: 6242: operator=(const vector<_Tp, _Alloc>& __x) 6242: { 6242: if (&__x != this) 6242: { 6242: ; 6242: 6242: if (_Alloc_traits::_S_propagate_on_copy_assign()) 6242: { 6242: if (!_Alloc_traits::_S_always_equal() 6242: && _M_get_Tp_allocator() != __x._M_get_Tp_allocator()) 6242: { 6242: 6242: this->clear(); 6242: _M_deallocate(this->_M_impl._M_start, 6242: this->_M_impl._M_end_of_storage 6242: - this->_M_impl._M_start); 6242: this->_M_impl._M_start = nullptr; 6242: this->_M_impl._M_finish = nullptr; 6242: this->_M_impl._M_end_of_storage = nullptr; 6242: } 6242: std::__alloc_on_copy(_M_get_Tp_allocator(), 6242: __x._M_get_Tp_allocator()); 6242: } 6242: 6242: const size_type __xlen = __x.size(); 6242: if (__xlen > capacity()) 6242: { 6242: pointer __tmp = _M_allocate_and_copy(__xlen, __x.begin(), 6242: __x.end()); 6242: std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish, 6242: _M_get_Tp_allocator()); 6242: _M_deallocate(this->_M_impl._M_start, 6242: this->_M_impl._M_end_of_storage 6242: - this->_M_impl._M_start); 6242: this->_M_impl._M_start = __tmp; 6242: this->_M_impl._M_end_of_storage = this->_M_impl._M_start + __xlen; 6242: } 6242: else if (size() >= __xlen) 6242: { 6242: std::_Destroy(std::copy(__x.begin(), __x.end(), begin()), 6242: end(), _M_get_Tp_allocator()); 6242: } 6242: else 6242: { 6242: std::copy(__x._M_impl._M_start, __x._M_impl._M_start + size(), 6242: this->_M_impl._M_start); 6242: std::__uninitialized_copy_a(__x._M_impl._M_start + size(), 6242: __x._M_impl._M_finish, 6242: this->_M_impl._M_finish, 6242: _M_get_Tp_allocator()); 6242: } 6242: this->_M_impl._M_finish = this->_M_impl._M_start + __xlen; 6242: } 6242: return *this; 6242: } 6242: 6242: template 6242: void 6242: vector<_Tp, _Alloc>:: 6242: _M_fill_assign(size_t __n, const value_type& __val) 6242: { 6242: if (__n > capacity()) 6242: { 6242: vector __tmp(__n, __val, _M_get_Tp_allocator()); 6242: __tmp._M_impl._M_swap_data(this->_M_impl); 6242: } 6242: else if (__n > size()) 6242: { 6242: std::fill(begin(), end(), __val); 6242: const size_type __add = __n - size(); 6242: ; 6242: this->_M_impl._M_finish = 6242: std::__uninitialized_fill_n_a(this->_M_impl._M_finish, 6242: __add, __val, _M_get_Tp_allocator()); 6242: ; 6242: } 6242: else 6242: _M_erase_at_end(std::fill_n(this->_M_impl._M_start, __n, __val)); 6242: } 6242: 6242: template 6242: template 6242: void 6242: vector<_Tp, _Alloc>:: 6242: _M_assign_aux(_InputIterator __first, _InputIterator __last, 6242: std::input_iterator_tag) 6242: { 6242: pointer __cur(this->_M_impl._M_start); 6242: for (; __first != __last && __cur != this->_M_impl._M_finish; 6242: ++__cur, ++__first) 6242: *__cur = *__first; 6242: if (__first == __last) 6242: _M_erase_at_end(__cur); 6242: else 6242: _M_range_insert(end(), __first, __last, 6242: std::__iterator_category(__first)); 6242: } 6242: 6242: template 6242: template 6242: void 6242: vector<_Tp, _Alloc>:: 6242: _M_assign_aux(_ForwardIterator __first, _ForwardIterator __last, 6242: std::forward_iterator_tag) 6242: { 6242: const size_type __len = std::distance(__first, __last); 6242: 6242: if (__len > capacity()) 6242: { 6242: pointer __tmp(_M_allocate_and_copy(__len, __first, __last)); 6242: ; 6242: std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish, 6242: _M_get_Tp_allocator()); 6242: _M_deallocate(this->_M_impl._M_start, 6242: this->_M_impl._M_end_of_storage 6242: - this->_M_impl._M_start); 6242: this->_M_impl._M_start = __tmp; 6242: this->_M_impl._M_finish = this->_M_impl._M_start + __len; 6242: this->_M_impl._M_end_of_storage = this->_M_impl._M_finish; 6242: } 6242: else if (size() >= __len) 6242: _M_erase_at_end(std::copy(__first, __last, this->_M_impl._M_start)); 6242: else 6242: { 6242: _ForwardIterator __mid = __first; 6242: std::advance(__mid, size()); 6242: std::copy(__first, __mid, this->_M_impl._M_start); 6242: const size_type __attribute__((__unused__)) __n = __len - size(); 6242: ; 6242: this->_M_impl._M_finish = 6242: std::__uninitialized_copy_a(__mid, __last, 6242: this->_M_impl._M_finish, 6242: _M_get_Tp_allocator()); 6242: ; 6242: } 6242: } 6242: 6242: 6242: template 6242: auto 6242: vector<_Tp, _Alloc>:: 6242: _M_insert_rval(const_iterator __position, value_type&& __v) -> iterator 6242: { 6242: const auto __n = __position - cbegin(); 6242: if (this->_M_impl._M_finish != this->_M_impl._M_end_of_storage) 6242: if (__position == cend()) 6242: { 6242: ; 6242: _Alloc_traits::construct(this->_M_impl, this->_M_impl._M_finish, 6242: std::move(__v)); 6242: ++this->_M_impl._M_finish; 6242: ; 6242: } 6242: else 6242: _M_insert_aux(begin() + __n, std::move(__v)); 6242: else 6242: _M_realloc_insert(begin() + __n, std::move(__v)); 6242: 6242: return iterator(this->_M_impl._M_start + __n); 6242: } 6242: 6242: template 6242: template 6242: auto 6242: vector<_Tp, _Alloc>:: 6242: _M_emplace_aux(const_iterator __position, _Args&&... __args) 6242: -> iterator 6242: { 6242: const auto __n = __position - cbegin(); 6242: if (this->_M_impl._M_finish != this->_M_impl._M_end_of_storage) 6242: if (__position == cend()) 6242: { 6242: ; 6242: _Alloc_traits::construct(this->_M_impl, this->_M_impl._M_finish, 6242: std::forward<_Args>(__args)...); 6242: ++this->_M_impl._M_finish; 6242: ; 6242: } 6242: else 6242: { 6242: 6242: 6242: 6242: _Temporary_value __tmp(this, std::forward<_Args>(__args)...); 6242: _M_insert_aux(begin() + __n, std::move(__tmp._M_val())); 6242: } 6242: else 6242: _M_realloc_insert(begin() + __n, std::forward<_Args>(__args)...); 6242: 6242: return iterator(this->_M_impl._M_start + __n); 6242: } 6242: 6242: template 6242: template 6242: void 6242: vector<_Tp, _Alloc>:: 6242: _M_insert_aux(iterator __position, _Arg&& __arg) 6242: 6242: 6242: 6242: 6242: 6242: 6242: { 6242: ; 6242: _Alloc_traits::construct(this->_M_impl, this->_M_impl._M_finish, 6242: std::move(*(this->_M_impl._M_finish - 1))); 6242: ++this->_M_impl._M_finish; 6242: ; 6242: 6242: 6242: 6242: std::move_backward(__position.base(), this->_M_impl._M_finish - 2, this->_M_impl._M_finish - 1) 6242: 6242: ; 6242: 6242: 6242: 6242: *__position = std::forward<_Arg>(__arg); 6242: 6242: } 6242: 6242: 6242: template 6242: template 6242: void 6242: vector<_Tp, _Alloc>:: 6242: _M_realloc_insert(iterator __position, _Args&&... __args) 6242: 6242: 6242: 6242: 6242: 6242: 6242: { 6242: const size_type __len = 6242: _M_check_len(size_type(1), "vector::_M_realloc_insert"); 6242: pointer __old_start = this->_M_impl._M_start; 6242: pointer __old_finish = this->_M_impl._M_finish; 6242: const size_type __elems_before = __position - begin(); 6242: pointer __new_start(this->_M_allocate(__len)); 6242: pointer __new_finish(__new_start); 6242: try 6242: { 6242: 6242: 6242: 6242: 6242: 6242: _Alloc_traits::construct(this->_M_impl, 6242: __new_start + __elems_before, 6242: 6242: std::forward<_Args>(__args)...); 6242: 6242: 6242: 6242: __new_finish = pointer(); 6242: 6242: __new_finish 6242: = std::__uninitialized_move_if_noexcept_a 6242: (__old_start, __position.base(), 6242: __new_start, _M_get_Tp_allocator()); 6242: 6242: ++__new_finish; 6242: 6242: __new_finish 6242: = std::__uninitialized_move_if_noexcept_a 6242: (__position.base(), __old_finish, 6242: __new_finish, _M_get_Tp_allocator()); 6242: } 6242: catch(...) 6242: { 6242: if (!__new_finish) 6242: _Alloc_traits::destroy(this->_M_impl, 6242: __new_start + __elems_before); 6242: else 6242: std::_Destroy(__new_start, __new_finish, _M_get_Tp_allocator()); 6242: _M_deallocate(__new_start, __len); 6242: throw; 6242: } 6242: ; 6242: std::_Destroy(__old_start, __old_finish, _M_get_Tp_allocator()); 6242: _M_deallocate(__old_start, 6242: this->_M_impl._M_end_of_storage - __old_start); 6242: this->_M_impl._M_start = __new_start; 6242: this->_M_impl._M_finish = __new_finish; 6242: this->_M_impl._M_end_of_storage = __new_start + __len; 6242: } 6242: 6242: template 6242: void 6242: vector<_Tp, _Alloc>:: 6242: _M_fill_insert(iterator __position, size_type __n, const value_type& __x) 6242: { 6242: if (__n != 0) 6242: { 6242: if (size_type(this->_M_impl._M_end_of_storage 6242: - this->_M_impl._M_finish) >= __n) 6242: { 6242: 6242: 6242: 6242: _Temporary_value __tmp(this, __x); 6242: value_type& __x_copy = __tmp._M_val(); 6242: 6242: const size_type __elems_after = end() - __position; 6242: pointer __old_finish(this->_M_impl._M_finish); 6242: if (__elems_after > __n) 6242: { 6242: ; 6242: std::__uninitialized_move_a(this->_M_impl._M_finish - __n, 6242: this->_M_impl._M_finish, 6242: this->_M_impl._M_finish, 6242: _M_get_Tp_allocator()); 6242: this->_M_impl._M_finish += __n; 6242: ; 6242: std::move_backward(__position.base(), __old_finish - __n, __old_finish) 6242: ; 6242: std::fill(__position.base(), __position.base() + __n, 6242: __x_copy); 6242: } 6242: else 6242: { 6242: ; 6242: this->_M_impl._M_finish = 6242: std::__uninitialized_fill_n_a(this->_M_impl._M_finish, 6242: __n - __elems_after, 6242: __x_copy, 6242: _M_get_Tp_allocator()); 6242: ; 6242: std::__uninitialized_move_a(__position.base(), __old_finish, 6242: this->_M_impl._M_finish, 6242: _M_get_Tp_allocator()); 6242: this->_M_impl._M_finish += __elems_after; 6242: ; 6242: std::fill(__position.base(), __old_finish, __x_copy); 6242: } 6242: } 6242: else 6242: { 6242: const size_type __len = 6242: _M_check_len(__n, "vector::_M_fill_insert"); 6242: const size_type __elems_before = __position - begin(); 6242: pointer __new_start(this->_M_allocate(__len)); 6242: pointer __new_finish(__new_start); 6242: try 6242: { 6242: 6242: std::__uninitialized_fill_n_a(__new_start + __elems_before, 6242: __n, __x, 6242: _M_get_Tp_allocator()); 6242: __new_finish = pointer(); 6242: 6242: __new_finish 6242: = std::__uninitialized_move_if_noexcept_a 6242: (this->_M_impl._M_start, __position.base(), 6242: __new_start, _M_get_Tp_allocator()); 6242: 6242: __new_finish += __n; 6242: 6242: __new_finish 6242: = std::__uninitialized_move_if_noexcept_a 6242: (__position.base(), this->_M_impl._M_finish, 6242: __new_finish, _M_get_Tp_allocator()); 6242: } 6242: catch(...) 6242: { 6242: if (!__new_finish) 6242: std::_Destroy(__new_start + __elems_before, 6242: __new_start + __elems_before + __n, 6242: _M_get_Tp_allocator()); 6242: else 6242: std::_Destroy(__new_start, __new_finish, 6242: _M_get_Tp_allocator()); 6242: _M_deallocate(__new_start, __len); 6242: throw; 6242: } 6242: ; 6242: std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish, 6242: _M_get_Tp_allocator()); 6242: _M_deallocate(this->_M_impl._M_start, 6242: this->_M_impl._M_end_of_storage 6242: - this->_M_impl._M_start); 6242: this->_M_impl._M_start = __new_start; 6242: this->_M_impl._M_finish = __new_finish; 6242: this->_M_impl._M_end_of_storage = __new_start + __len; 6242: } 6242: } 6242: } 6242: 6242: 6242: template 6242: void 6242: vector<_Tp, _Alloc>:: 6242: _M_default_append(size_type __n) 6242: { 6242: if (__n != 0) 6242: { 6242: size_type __size = size(); 6242: size_type __navail = size_type(this->_M_impl._M_end_of_storage 6242: - this->_M_impl._M_finish); 6242: 6242: if (__size > max_size() || __navail > max_size() - __size) 6242: __builtin_unreachable(); 6242: 6242: if (__navail >= __n) 6242: { 6242: ; 6242: this->_M_impl._M_finish = 6242: std::__uninitialized_default_n_a(this->_M_impl._M_finish, 6242: __n, _M_get_Tp_allocator()); 6242: ; 6242: } 6242: else 6242: { 6242: const size_type __len = 6242: _M_check_len(__n, "vector::_M_default_append"); 6242: const size_type __old_size = __size; 6242: pointer __new_start(this->_M_allocate(__len)); 6242: pointer __new_finish(__new_start); 6242: try 6242: { 6242: __new_finish 6242: = std::__uninitialized_move_if_noexcept_a 6242: (this->_M_impl._M_start, this->_M_impl._M_finish, 6242: __new_start, _M_get_Tp_allocator()); 6242: __new_finish = 6242: std::__uninitialized_default_n_a(__new_finish, __n, 6242: _M_get_Tp_allocator()); 6242: } 6242: catch(...) 6242: { 6242: std::_Destroy(__new_start, __new_finish, 6242: _M_get_Tp_allocator()); 6242: _M_deallocate(__new_start, __len); 6242: throw; 6242: } 6242: ; 6242: std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish, 6242: _M_get_Tp_allocator()); 6242: _M_deallocate(this->_M_impl._M_start, 6242: this->_M_impl._M_end_of_storage 6242: - this->_M_impl._M_start); 6242: this->_M_impl._M_start = __new_start; 6242: this->_M_impl._M_finish = __new_finish; 6242: this->_M_impl._M_end_of_storage = __new_start + __len; 6242: } 6242: } 6242: } 6242: 6242: template 6242: bool 6242: vector<_Tp, _Alloc>:: 6242: _M_shrink_to_fit() 6242: { 6242: if (capacity() == size()) 6242: return false; 6242: ; 6242: return std::__shrink_to_fit_aux::_S_do_it(*this); 6242: } 6242: 6242: 6242: template 6242: template 6242: void 6242: vector<_Tp, _Alloc>:: 6242: _M_range_insert(iterator __pos, _InputIterator __first, 6242: _InputIterator __last, std::input_iterator_tag) 6242: { 6242: if (__pos == end()) 6242: { 6242: for (; __first != __last; ++__first) 6242: insert(end(), *__first); 6242: } 6242: else if (__first != __last) 6242: { 6242: vector __tmp(__first, __last, _M_get_Tp_allocator()); 6242: insert(__pos, 6242: std::make_move_iterator(__tmp.begin()), 6242: std::make_move_iterator(__tmp.end())); 6242: } 6242: } 6242: 6242: template 6242: template 6242: void 6242: vector<_Tp, _Alloc>:: 6242: _M_range_insert(iterator __position, _ForwardIterator __first, 6242: _ForwardIterator __last, std::forward_iterator_tag) 6242: { 6242: if (__first != __last) 6242: { 6242: const size_type __n = std::distance(__first, __last); 6242: if (size_type(this->_M_impl._M_end_of_storage 6242: - this->_M_impl._M_finish) >= __n) 6242: { 6242: const size_type __elems_after = end() - __position; 6242: pointer __old_finish(this->_M_impl._M_finish); 6242: if (__elems_after > __n) 6242: { 6242: ; 6242: std::__uninitialized_move_a(this->_M_impl._M_finish - __n, 6242: this->_M_impl._M_finish, 6242: this->_M_impl._M_finish, 6242: _M_get_Tp_allocator()); 6242: this->_M_impl._M_finish += __n; 6242: ; 6242: std::move_backward(__position.base(), __old_finish - __n, __old_finish) 6242: ; 6242: std::copy(__first, __last, __position); 6242: } 6242: else 6242: { 6242: _ForwardIterator __mid = __first; 6242: std::advance(__mid, __elems_after); 6242: ; 6242: std::__uninitialized_copy_a(__mid, __last, 6242: this->_M_impl._M_finish, 6242: _M_get_Tp_allocator()); 6242: this->_M_impl._M_finish += __n - __elems_after; 6242: ; 6242: std::__uninitialized_move_a(__position.base(), 6242: __old_finish, 6242: this->_M_impl._M_finish, 6242: _M_get_Tp_allocator()); 6242: this->_M_impl._M_finish += __elems_after; 6242: ; 6242: std::copy(__first, __mid, __position); 6242: } 6242: } 6242: else 6242: { 6242: const size_type __len = 6242: _M_check_len(__n, "vector::_M_range_insert"); 6242: pointer __new_start(this->_M_allocate(__len)); 6242: pointer __new_finish(__new_start); 6242: try 6242: { 6242: __new_finish 6242: = std::__uninitialized_move_if_noexcept_a 6242: (this->_M_impl._M_start, __position.base(), 6242: __new_start, _M_get_Tp_allocator()); 6242: __new_finish 6242: = std::__uninitialized_copy_a(__first, __last, 6242: __new_finish, 6242: _M_get_Tp_allocator()); 6242: __new_finish 6242: = std::__uninitialized_move_if_noexcept_a 6242: (__position.base(), this->_M_impl._M_finish, 6242: __new_finish, _M_get_Tp_allocator()); 6242: } 6242: catch(...) 6242: { 6242: std::_Destroy(__new_start, __new_finish, 6242: _M_get_Tp_allocator()); 6242: _M_deallocate(__new_start, __len); 6242: throw; 6242: } 6242: ; 6242: std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish, 6242: _M_get_Tp_allocator()); 6242: _M_deallocate(this->_M_impl._M_start, 6242: this->_M_impl._M_end_of_storage 6242: - this->_M_impl._M_start); 6242: this->_M_impl._M_start = __new_start; 6242: this->_M_impl._M_finish = __new_finish; 6242: this->_M_impl._M_end_of_storage = __new_start + __len; 6242: } 6242: } 6242: } 6242: 6242: 6242: 6242: template 6242: void 6242: vector:: 6242: _M_reallocate(size_type __n) 6242: { 6242: _Bit_pointer __q = this->_M_allocate(__n); 6242: iterator __start(std::__addressof(*__q), 0); 6242: iterator __finish(_M_copy_aligned(begin(), end(), __start)); 6242: this->_M_deallocate(); 6242: this->_M_impl._M_start = __start; 6242: this->_M_impl._M_finish = __finish; 6242: this->_M_impl._M_end_of_storage = __q + _S_nword(__n); 6242: } 6242: 6242: template 6242: void 6242: vector:: 6242: _M_fill_insert(iterator __position, size_type __n, bool __x) 6242: { 6242: if (__n == 0) 6242: return; 6242: if (capacity() - size() >= __n) 6242: { 6242: std::copy_backward(__position, end(), 6242: this->_M_impl._M_finish + difference_type(__n)); 6242: std::fill(__position, __position + difference_type(__n), __x); 6242: this->_M_impl._M_finish += difference_type(__n); 6242: } 6242: else 6242: { 6242: const size_type __len = 6242: _M_check_len(__n, "vector::_M_fill_insert"); 6242: _Bit_pointer __q = this->_M_allocate(__len); 6242: iterator __start(std::__addressof(*__q), 0); 6242: iterator __i = _M_copy_aligned(begin(), __position, __start); 6242: std::fill(__i, __i + difference_type(__n), __x); 6242: iterator __finish = std::copy(__position, end(), 6242: __i + difference_type(__n)); 6242: this->_M_deallocate(); 6242: this->_M_impl._M_end_of_storage = __q + _S_nword(__len); 6242: this->_M_impl._M_start = __start; 6242: this->_M_impl._M_finish = __finish; 6242: } 6242: } 6242: 6242: template 6242: template 6242: void 6242: vector:: 6242: _M_insert_range(iterator __position, _ForwardIterator __first, 6242: _ForwardIterator __last, std::forward_iterator_tag) 6242: { 6242: if (__first != __last) 6242: { 6242: size_type __n = std::distance(__first, __last); 6242: if (capacity() - size() >= __n) 6242: { 6242: std::copy_backward(__position, end(), 6242: this->_M_impl._M_finish 6242: + difference_type(__n)); 6242: std::copy(__first, __last, __position); 6242: this->_M_impl._M_finish += difference_type(__n); 6242: } 6242: else 6242: { 6242: const size_type __len = 6242: _M_check_len(__n, "vector::_M_insert_range"); 6242: _Bit_pointer __q = this->_M_allocate(__len); 6242: iterator __start(std::__addressof(*__q), 0); 6242: iterator __i = _M_copy_aligned(begin(), __position, __start); 6242: __i = std::copy(__first, __last, __i); 6242: iterator __finish = std::copy(__position, end(), __i); 6242: this->_M_deallocate(); 6242: this->_M_impl._M_end_of_storage = __q + _S_nword(__len); 6242: this->_M_impl._M_start = __start; 6242: this->_M_impl._M_finish = __finish; 6242: } 6242: } 6242: } 6242: 6242: template 6242: void 6242: vector:: 6242: _M_insert_aux(iterator __position, bool __x) 6242: { 6242: if (this->_M_impl._M_finish._M_p != this->_M_impl._M_end_addr()) 6242: { 6242: std::copy_backward(__position, this->_M_impl._M_finish, 6242: this->_M_impl._M_finish + 1); 6242: *__position = __x; 6242: ++this->_M_impl._M_finish; 6242: } 6242: else 6242: { 6242: const size_type __len = 6242: _M_check_len(size_type(1), "vector::_M_insert_aux"); 6242: _Bit_pointer __q = this->_M_allocate(__len); 6242: iterator __start(std::__addressof(*__q), 0); 6242: iterator __i = _M_copy_aligned(begin(), __position, __start); 6242: *__i++ = __x; 6242: iterator __finish = std::copy(__position, end(), __i); 6242: this->_M_deallocate(); 6242: this->_M_impl._M_end_of_storage = __q + _S_nword(__len); 6242: this->_M_impl._M_start = __start; 6242: this->_M_impl._M_finish = __finish; 6242: } 6242: } 6242: 6242: template 6242: typename vector::iterator 6242: vector:: 6242: _M_erase(iterator __position) 6242: { 6242: if (__position + 1 != end()) 6242: std::copy(__position + 1, end(), __position); 6242: --this->_M_impl._M_finish; 6242: return __position; 6242: } 6242: 6242: template 6242: typename vector::iterator 6242: vector:: 6242: _M_erase(iterator __first, iterator __last) 6242: { 6242: if (__first != __last) 6242: _M_erase_at_end(std::copy(__last, end(), __first)); 6242: return __first; 6242: } 6242: 6242: 6242: template 6242: bool 6242: vector:: 6242: _M_shrink_to_fit() 6242: { 6242: if (capacity() - size() < int(_S_word_bit)) 6242: return false; 6242: try 6242: { 6242: _M_reallocate(size()); 6242: return true; 6242: } 6242: catch(...) 6242: { return false; } 6242: } 6242: 6242: 6242: 6242: 6242: } 6242: 6242: 6242: 6242: namespace std __attribute__ ((__visibility__ ("default"))) 6242: { 6242: 6242: 6242: template 6242: size_t 6242: hash>:: 6242: operator()(const std::vector& __b) const noexcept 6242: { 6242: size_t __hash = 0; 6242: using std::_S_word_bit; 6242: using std::_Bit_type; 6242: 6242: const size_t __words = __b.size() / _S_word_bit; 6242: if (__words) 6242: { 6242: const size_t __clength = __words * sizeof(_Bit_type); 6242: __hash = std::_Hash_impl::hash(__b._M_impl._M_start._M_p, __clength); 6242: } 6242: 6242: const size_t __extrabits = __b.size() % _S_word_bit; 6242: if (__extrabits) 6242: { 6242: _Bit_type __hiword = *__b._M_impl._M_finish._M_p; 6242: __hiword &= ~((~static_cast<_Bit_type>(0)) << __extrabits); 6242: 6242: const size_t __clength 6242: = (__extrabits + 8 - 1) / 8; 6242: if (__words) 6242: __hash = std::_Hash_impl::hash(&__hiword, __clength, __hash); 6242: else 6242: __hash = std::_Hash_impl::hash(&__hiword, __clength); 6242: } 6242: 6242: return __hash; 6242: } 6242: 6242: 6242: } 6242: # 70 "/usr/include/c++/8/vector" 2 3 6242: # 5 "array_view.hh" 2 6242: 6242: # 1 "/usr/include/c++/8/iterator" 1 3 6242: # 58 "/usr/include/c++/8/iterator" 3 6242: 6242: # 59 "/usr/include/c++/8/iterator" 3 6242: 6242: 6242: 6242: 6242: 6242: # 1 "/usr/include/c++/8/ostream" 1 3 6242: # 36 "/usr/include/c++/8/ostream" 3 6242: 6242: # 37 "/usr/include/c++/8/ostream" 3 6242: 6242: # 1 "/usr/include/c++/8/ios" 1 3 6242: # 36 "/usr/include/c++/8/ios" 3 6242: 6242: # 37 "/usr/include/c++/8/ios" 3 6242: 6242: # 1 "/usr/include/c++/8/iosfwd" 1 3 6242: # 36 "/usr/include/c++/8/iosfwd" 3 6242: 6242: # 37 "/usr/include/c++/8/iosfwd" 3 6242: 6242: 6242: # 1 "/usr/include/c++/8/bits/stringfwd.h" 1 3 6242: # 37 "/usr/include/c++/8/bits/stringfwd.h" 3 6242: 6242: # 38 "/usr/include/c++/8/bits/stringfwd.h" 3 6242: 6242: 6242: 6242: 6242: namespace std __attribute__ ((__visibility__ ("default"))) 6242: { 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: template 6242: struct char_traits; 6242: 6242: template<> struct char_traits; 6242: 6242: 6242: template<> struct char_traits; 6242: 6242: 6242: 6242: 6242: template<> struct char_traits; 6242: template<> struct char_traits; 6242: 6242: 6242: namespace __cxx11 { 6242: 6242: template, 6242: typename _Alloc = allocator<_CharT> > 6242: class basic_string; 6242: 6242: 6242: typedef basic_string string; 6242: 6242: 6242: 6242: typedef basic_string wstring; 6242: 6242: 6242: 6242: 6242: 6242: typedef basic_string u16string; 6242: 6242: 6242: typedef basic_string u32string; 6242: 6242: 6242: } 6242: 6242: 6242: 6242: 6242: } 6242: # 40 "/usr/include/c++/8/iosfwd" 2 3 6242: # 1 "/usr/include/c++/8/bits/postypes.h" 1 3 6242: # 38 "/usr/include/c++/8/bits/postypes.h" 3 6242: 6242: # 39 "/usr/include/c++/8/bits/postypes.h" 3 6242: 6242: # 1 "/usr/include/c++/8/cwchar" 1 3 6242: # 39 "/usr/include/c++/8/cwchar" 3 6242: 6242: # 40 "/usr/include/c++/8/cwchar" 3 6242: 6242: 6242: 6242: 6242: # 1 "/usr/include/wchar.h" 1 3 4 6242: # 27 "/usr/include/wchar.h" 3 4 6242: # 1 "/usr/include/s390x-linux-gnu/bits/libc-header-start.h" 1 3 4 6242: # 28 "/usr/include/wchar.h" 2 3 4 6242: 6242: 6242: # 1 "/usr/include/s390x-linux-gnu/bits/floatn.h" 1 3 4 6242: # 31 "/usr/include/wchar.h" 2 3 4 6242: 6242: 6242: 6242: 6242: # 1 "/usr/lib/gcc/s390x-linux-gnu/8/include/stddef.h" 1 3 4 6242: # 36 "/usr/include/wchar.h" 2 3 4 6242: 6242: 6242: # 1 "/usr/lib/gcc/s390x-linux-gnu/8/include/stdarg.h" 1 3 4 6242: # 40 "/usr/lib/gcc/s390x-linux-gnu/8/include/stdarg.h" 3 4 6242: typedef __builtin_va_list __gnuc_va_list; 6242: # 39 "/usr/include/wchar.h" 2 3 4 6242: 6242: # 1 "/usr/include/s390x-linux-gnu/bits/wchar.h" 1 3 4 6242: # 41 "/usr/include/wchar.h" 2 3 4 6242: # 1 "/usr/include/s390x-linux-gnu/bits/types/wint_t.h" 1 3 4 6242: # 20 "/usr/include/s390x-linux-gnu/bits/types/wint_t.h" 3 4 6242: typedef unsigned int wint_t; 6242: # 42 "/usr/include/wchar.h" 2 3 4 6242: # 1 "/usr/include/s390x-linux-gnu/bits/types/mbstate_t.h" 1 3 4 6242: 6242: 6242: 6242: # 1 "/usr/include/s390x-linux-gnu/bits/types/__mbstate_t.h" 1 3 4 6242: # 13 "/usr/include/s390x-linux-gnu/bits/types/__mbstate_t.h" 3 4 6242: typedef struct 6242: { 6242: int __count; 6242: union 6242: { 6242: unsigned int __wch; 6242: char __wchb[4]; 6242: } __value; 6242: } __mbstate_t; 6242: # 5 "/usr/include/s390x-linux-gnu/bits/types/mbstate_t.h" 2 3 4 6242: 6242: typedef __mbstate_t mbstate_t; 6242: # 43 "/usr/include/wchar.h" 2 3 4 6242: # 1 "/usr/include/s390x-linux-gnu/bits/types/__FILE.h" 1 3 4 6242: 6242: 6242: 6242: struct _IO_FILE; 6242: typedef struct _IO_FILE __FILE; 6242: # 44 "/usr/include/wchar.h" 2 3 4 6242: 6242: 6242: # 1 "/usr/include/s390x-linux-gnu/bits/types/FILE.h" 1 3 4 6242: 6242: 6242: 6242: struct _IO_FILE; 6242: 6242: 6242: typedef struct _IO_FILE FILE; 6242: # 47 "/usr/include/wchar.h" 2 3 4 6242: 6242: 6242: # 1 "/usr/include/s390x-linux-gnu/bits/types/locale_t.h" 1 3 4 6242: # 22 "/usr/include/s390x-linux-gnu/bits/types/locale_t.h" 3 4 6242: # 1 "/usr/include/s390x-linux-gnu/bits/types/__locale_t.h" 1 3 4 6242: # 28 "/usr/include/s390x-linux-gnu/bits/types/__locale_t.h" 3 4 6242: struct __locale_struct 6242: { 6242: 6242: struct __locale_data *__locales[13]; 6242: 6242: 6242: const unsigned short int *__ctype_b; 6242: const int *__ctype_tolower; 6242: const int *__ctype_toupper; 6242: 6242: 6242: const char *__names[13]; 6242: }; 6242: 6242: typedef struct __locale_struct *__locale_t; 6242: # 23 "/usr/include/s390x-linux-gnu/bits/types/locale_t.h" 2 3 4 6242: 6242: typedef __locale_t locale_t; 6242: # 50 "/usr/include/wchar.h" 2 3 4 6242: # 79 "/usr/include/wchar.h" 3 4 6242: extern "C" { 6242: 6242: 6242: 6242: struct tm; 6242: 6242: 6242: 6242: extern wchar_t *wcscpy (wchar_t *__restrict __dest, 6242: const wchar_t *__restrict __src) 6242: throw () __attribute__ ((__nonnull__ (1, 2))); 6242: 6242: 6242: extern wchar_t *wcsncpy (wchar_t *__restrict __dest, 6242: const wchar_t *__restrict __src, size_t __n) 6242: throw () __attribute__ ((__nonnull__ (1, 2))); 6242: 6242: 6242: extern wchar_t *wcscat (wchar_t *__restrict __dest, 6242: const wchar_t *__restrict __src) 6242: throw () __attribute__ ((__nonnull__ (1, 2))); 6242: 6242: extern wchar_t *wcsncat (wchar_t *__restrict __dest, 6242: const wchar_t *__restrict __src, size_t __n) 6242: throw () __attribute__ ((__nonnull__ (1, 2))); 6242: 6242: 6242: extern int wcscmp (const wchar_t *__s1, const wchar_t *__s2) 6242: throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); 6242: 6242: extern int wcsncmp (const wchar_t *__s1, const wchar_t *__s2, size_t __n) 6242: throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); 6242: 6242: 6242: 6242: extern int wcscasecmp (const wchar_t *__s1, const wchar_t *__s2) throw (); 6242: 6242: 6242: extern int wcsncasecmp (const wchar_t *__s1, const wchar_t *__s2, 6242: size_t __n) throw (); 6242: 6242: 6242: 6242: extern int wcscasecmp_l (const wchar_t *__s1, const wchar_t *__s2, 6242: locale_t __loc) throw (); 6242: 6242: extern int wcsncasecmp_l (const wchar_t *__s1, const wchar_t *__s2, 6242: size_t __n, locale_t __loc) throw (); 6242: 6242: 6242: 6242: 6242: extern int wcscoll (const wchar_t *__s1, const wchar_t *__s2) throw (); 6242: 6242: 6242: 6242: extern size_t wcsxfrm (wchar_t *__restrict __s1, 6242: const wchar_t *__restrict __s2, size_t __n) throw (); 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: extern int wcscoll_l (const wchar_t *__s1, const wchar_t *__s2, 6242: locale_t __loc) throw (); 6242: 6242: 6242: 6242: 6242: extern size_t wcsxfrm_l (wchar_t *__s1, const wchar_t *__s2, 6242: size_t __n, locale_t __loc) throw (); 6242: 6242: 6242: extern wchar_t *wcsdup (const wchar_t *__s) throw () __attribute__ ((__malloc__)); 6242: 6242: 6242: 6242: 6242: extern "C++" wchar_t *wcschr (wchar_t *__wcs, wchar_t __wc) 6242: throw () __asm ("wcschr") __attribute__ ((__pure__)); 6242: extern "C++" const wchar_t *wcschr (const wchar_t *__wcs, wchar_t __wc) 6242: throw () __asm ("wcschr") __attribute__ ((__pure__)); 6242: 6242: 6242: 6242: 6242: 6242: 6242: extern "C++" wchar_t *wcsrchr (wchar_t *__wcs, wchar_t __wc) 6242: throw () __asm ("wcsrchr") __attribute__ ((__pure__)); 6242: extern "C++" const wchar_t *wcsrchr (const wchar_t *__wcs, wchar_t __wc) 6242: throw () __asm ("wcsrchr") __attribute__ ((__pure__)); 6242: # 181 "/usr/include/wchar.h" 3 4 6242: extern wchar_t *wcschrnul (const wchar_t *__s, wchar_t __wc) 6242: throw () __attribute__ ((__pure__)); 6242: 6242: 6242: 6242: 6242: extern size_t wcscspn (const wchar_t *__wcs, const wchar_t *__reject) 6242: throw () __attribute__ ((__pure__)); 6242: 6242: 6242: extern size_t wcsspn (const wchar_t *__wcs, const wchar_t *__accept) 6242: throw () __attribute__ ((__pure__)); 6242: 6242: 6242: extern "C++" wchar_t *wcspbrk (wchar_t *__wcs, const wchar_t *__accept) 6242: throw () __asm ("wcspbrk") __attribute__ ((__pure__)); 6242: extern "C++" const wchar_t *wcspbrk (const wchar_t *__wcs, 6242: const wchar_t *__accept) 6242: throw () __asm ("wcspbrk") __attribute__ ((__pure__)); 6242: 6242: 6242: 6242: 6242: 6242: 6242: extern "C++" wchar_t *wcsstr (wchar_t *__haystack, const wchar_t *__needle) 6242: throw () __asm ("wcsstr") __attribute__ ((__pure__)); 6242: extern "C++" const wchar_t *wcsstr (const wchar_t *__haystack, 6242: const wchar_t *__needle) 6242: throw () __asm ("wcsstr") __attribute__ ((__pure__)); 6242: 6242: 6242: 6242: 6242: 6242: 6242: extern wchar_t *wcstok (wchar_t *__restrict __s, 6242: const wchar_t *__restrict __delim, 6242: wchar_t **__restrict __ptr) throw (); 6242: 6242: 6242: extern size_t wcslen (const wchar_t *__s) throw () __attribute__ ((__pure__)); 6242: 6242: 6242: 6242: 6242: extern "C++" wchar_t *wcswcs (wchar_t *__haystack, const wchar_t *__needle) 6242: throw () __asm ("wcswcs") __attribute__ ((__pure__)); 6242: extern "C++" const wchar_t *wcswcs (const wchar_t *__haystack, 6242: const wchar_t *__needle) 6242: throw () __asm ("wcswcs") __attribute__ ((__pure__)); 6242: # 240 "/usr/include/wchar.h" 3 4 6242: extern size_t wcsnlen (const wchar_t *__s, size_t __maxlen) 6242: throw () __attribute__ ((__pure__)); 6242: 6242: 6242: 6242: 6242: 6242: extern "C++" wchar_t *wmemchr (wchar_t *__s, wchar_t __c, size_t __n) 6242: throw () __asm ("wmemchr") __attribute__ ((__pure__)); 6242: extern "C++" const wchar_t *wmemchr (const wchar_t *__s, wchar_t __c, 6242: size_t __n) 6242: throw () __asm ("wmemchr") __attribute__ ((__pure__)); 6242: 6242: 6242: 6242: 6242: 6242: 6242: extern int wmemcmp (const wchar_t *__s1, const wchar_t *__s2, size_t __n) 6242: throw () __attribute__ ((__pure__)); 6242: 6242: 6242: extern wchar_t *wmemcpy (wchar_t *__restrict __s1, 6242: const wchar_t *__restrict __s2, size_t __n) throw (); 6242: 6242: 6242: 6242: extern wchar_t *wmemmove (wchar_t *__s1, const wchar_t *__s2, size_t __n) 6242: throw (); 6242: 6242: 6242: extern wchar_t *wmemset (wchar_t *__s, wchar_t __c, size_t __n) throw (); 6242: 6242: 6242: 6242: 6242: extern wchar_t *wmempcpy (wchar_t *__restrict __s1, 6242: const wchar_t *__restrict __s2, size_t __n) 6242: throw (); 6242: 6242: 6242: 6242: 6242: 6242: extern wint_t btowc (int __c) throw (); 6242: 6242: 6242: 6242: extern int wctob (wint_t __c) throw (); 6242: 6242: 6242: 6242: extern int mbsinit (const mbstate_t *__ps) throw () __attribute__ ((__pure__)); 6242: 6242: 6242: 6242: extern size_t mbrtowc (wchar_t *__restrict __pwc, 6242: const char *__restrict __s, size_t __n, 6242: mbstate_t *__restrict __p) throw (); 6242: 6242: 6242: extern size_t wcrtomb (char *__restrict __s, wchar_t __wc, 6242: mbstate_t *__restrict __ps) throw (); 6242: 6242: 6242: extern size_t __mbrlen (const char *__restrict __s, size_t __n, 6242: mbstate_t *__restrict __ps) throw (); 6242: extern size_t mbrlen (const char *__restrict __s, size_t __n, 6242: mbstate_t *__restrict __ps) throw (); 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: extern wint_t __btowc_alias (int __c) __asm ("btowc"); 6242: extern __inline __attribute__ ((__gnu_inline__)) wint_t 6242: __attribute__ ((__leaf__)) btowc (int __c) throw () 6242: { return (__builtin_constant_p (__c) && __c >= '\0' && __c <= '\x7f' 6242: ? (wint_t) __c : __btowc_alias (__c)); } 6242: 6242: extern int __wctob_alias (wint_t __c) __asm ("wctob"); 6242: extern __inline __attribute__ ((__gnu_inline__)) int 6242: __attribute__ ((__leaf__)) wctob (wint_t __wc) throw () 6242: { return (__builtin_constant_p (__wc) && __wc >= L'\0' && __wc <= L'\x7f' 6242: ? (int) __wc : __wctob_alias (__wc)); } 6242: 6242: extern __inline __attribute__ ((__gnu_inline__)) size_t 6242: __attribute__ ((__leaf__)) mbrlen (const char *__restrict __s, size_t __n, mbstate_t *__restrict __ps) throw () 6242: 6242: { return (__ps != __null 6242: ? mbrtowc (__null, __s, __n, __ps) : __mbrlen (__s, __n, __null)); } 6242: 6242: 6242: 6242: 6242: extern size_t mbsrtowcs (wchar_t *__restrict __dst, 6242: const char **__restrict __src, size_t __len, 6242: mbstate_t *__restrict __ps) throw (); 6242: 6242: 6242: 6242: extern size_t wcsrtombs (char *__restrict __dst, 6242: const wchar_t **__restrict __src, size_t __len, 6242: mbstate_t *__restrict __ps) throw (); 6242: 6242: 6242: 6242: 6242: 6242: extern size_t mbsnrtowcs (wchar_t *__restrict __dst, 6242: const char **__restrict __src, size_t __nmc, 6242: size_t __len, mbstate_t *__restrict __ps) throw (); 6242: 6242: 6242: 6242: extern size_t wcsnrtombs (char *__restrict __dst, 6242: const wchar_t **__restrict __src, 6242: size_t __nwc, size_t __len, 6242: mbstate_t *__restrict __ps) throw (); 6242: 6242: 6242: 6242: 6242: 6242: 6242: extern int wcwidth (wchar_t __c) throw (); 6242: 6242: 6242: 6242: extern int wcswidth (const wchar_t *__s, size_t __n) throw (); 6242: 6242: 6242: 6242: 6242: 6242: extern double wcstod (const wchar_t *__restrict __nptr, 6242: wchar_t **__restrict __endptr) throw (); 6242: 6242: 6242: 6242: extern float wcstof (const wchar_t *__restrict __nptr, 6242: wchar_t **__restrict __endptr) throw (); 6242: extern long double wcstold (const wchar_t *__restrict __nptr, 6242: wchar_t **__restrict __endptr) throw (); 6242: # 397 "/usr/include/wchar.h" 3 4 6242: extern long int wcstol (const wchar_t *__restrict __nptr, 6242: wchar_t **__restrict __endptr, int __base) throw (); 6242: 6242: 6242: 6242: extern unsigned long int wcstoul (const wchar_t *__restrict __nptr, 6242: wchar_t **__restrict __endptr, int __base) 6242: throw (); 6242: 6242: 6242: 6242: 6242: __extension__ 6242: extern long long int wcstoll (const wchar_t *__restrict __nptr, 6242: wchar_t **__restrict __endptr, int __base) 6242: throw (); 6242: 6242: 6242: 6242: __extension__ 6242: extern unsigned long long int wcstoull (const wchar_t *__restrict __nptr, 6242: wchar_t **__restrict __endptr, 6242: int __base) throw (); 6242: 6242: 6242: 6242: 6242: 6242: __extension__ 6242: extern long long int wcstoq (const wchar_t *__restrict __nptr, 6242: wchar_t **__restrict __endptr, int __base) 6242: throw (); 6242: 6242: 6242: 6242: __extension__ 6242: extern unsigned long long int wcstouq (const wchar_t *__restrict __nptr, 6242: wchar_t **__restrict __endptr, 6242: int __base) throw (); 6242: 6242: 6242: 6242: 6242: 6242: 6242: extern long int wcstol_l (const wchar_t *__restrict __nptr, 6242: wchar_t **__restrict __endptr, int __base, 6242: locale_t __loc) throw (); 6242: 6242: extern unsigned long int wcstoul_l (const wchar_t *__restrict __nptr, 6242: wchar_t **__restrict __endptr, 6242: int __base, locale_t __loc) throw (); 6242: 6242: __extension__ 6242: extern long long int wcstoll_l (const wchar_t *__restrict __nptr, 6242: wchar_t **__restrict __endptr, 6242: int __base, locale_t __loc) throw (); 6242: 6242: __extension__ 6242: extern unsigned long long int wcstoull_l (const wchar_t *__restrict __nptr, 6242: wchar_t **__restrict __endptr, 6242: int __base, locale_t __loc) 6242: throw (); 6242: 6242: extern double wcstod_l (const wchar_t *__restrict __nptr, 6242: wchar_t **__restrict __endptr, locale_t __loc) 6242: throw (); 6242: 6242: extern float wcstof_l (const wchar_t *__restrict __nptr, 6242: wchar_t **__restrict __endptr, locale_t __loc) 6242: throw (); 6242: 6242: extern long double wcstold_l (const wchar_t *__restrict __nptr, 6242: wchar_t **__restrict __endptr, 6242: locale_t __loc) throw (); 6242: # 484 "/usr/include/wchar.h" 3 4 6242: extern wchar_t *wcpcpy (wchar_t *__restrict __dest, 6242: const wchar_t *__restrict __src) throw (); 6242: 6242: 6242: 6242: extern wchar_t *wcpncpy (wchar_t *__restrict __dest, 6242: const wchar_t *__restrict __src, size_t __n) 6242: throw (); 6242: # 500 "/usr/include/wchar.h" 3 4 6242: extern __FILE *open_wmemstream (wchar_t **__bufloc, size_t *__sizeloc) throw (); 6242: 6242: 6242: 6242: 6242: 6242: extern int fwide (__FILE *__fp, int __mode) throw (); 6242: 6242: 6242: 6242: 6242: 6242: 6242: extern int fwprintf (__FILE *__restrict __stream, 6242: const wchar_t *__restrict __format, ...) 6242: ; 6242: 6242: 6242: 6242: 6242: extern int wprintf (const wchar_t *__restrict __format, ...) 6242: ; 6242: 6242: extern int swprintf (wchar_t *__restrict __s, size_t __n, 6242: const wchar_t *__restrict __format, ...) 6242: throw () ; 6242: 6242: 6242: 6242: 6242: 6242: extern int vfwprintf (__FILE *__restrict __s, 6242: const wchar_t *__restrict __format, 6242: __gnuc_va_list __arg) 6242: ; 6242: 6242: 6242: 6242: 6242: extern int vwprintf (const wchar_t *__restrict __format, 6242: __gnuc_va_list __arg) 6242: ; 6242: 6242: 6242: extern int vswprintf (wchar_t *__restrict __s, size_t __n, 6242: const wchar_t *__restrict __format, 6242: __gnuc_va_list __arg) 6242: throw () ; 6242: 6242: 6242: 6242: 6242: 6242: 6242: extern int fwscanf (__FILE *__restrict __stream, 6242: const wchar_t *__restrict __format, ...) 6242: ; 6242: 6242: 6242: 6242: 6242: extern int wscanf (const wchar_t *__restrict __format, ...) 6242: ; 6242: 6242: extern int swscanf (const wchar_t *__restrict __s, 6242: const wchar_t *__restrict __format, ...) 6242: throw () ; 6242: # 606 "/usr/include/wchar.h" 3 4 6242: extern int vfwscanf (__FILE *__restrict __s, 6242: const wchar_t *__restrict __format, 6242: __gnuc_va_list __arg) 6242: ; 6242: 6242: 6242: 6242: 6242: extern int vwscanf (const wchar_t *__restrict __format, 6242: __gnuc_va_list __arg) 6242: ; 6242: 6242: extern int vswscanf (const wchar_t *__restrict __s, 6242: const wchar_t *__restrict __format, 6242: __gnuc_va_list __arg) 6242: throw () ; 6242: # 660 "/usr/include/wchar.h" 3 4 6242: extern wint_t fgetwc (__FILE *__stream); 6242: extern wint_t getwc (__FILE *__stream); 6242: 6242: 6242: 6242: 6242: 6242: extern wint_t getwchar (void); 6242: 6242: 6242: 6242: 6242: 6242: 6242: extern wint_t fputwc (wchar_t __wc, __FILE *__stream); 6242: extern wint_t putwc (wchar_t __wc, __FILE *__stream); 6242: 6242: 6242: 6242: 6242: 6242: extern wint_t putwchar (wchar_t __wc); 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: extern wchar_t *fgetws (wchar_t *__restrict __ws, int __n, 6242: __FILE *__restrict __stream); 6242: 6242: 6242: 6242: 6242: 6242: extern int fputws (const wchar_t *__restrict __ws, 6242: __FILE *__restrict __stream); 6242: 6242: 6242: 6242: 6242: 6242: 6242: extern wint_t ungetwc (wint_t __wc, __FILE *__stream); 6242: # 715 "/usr/include/wchar.h" 3 4 6242: extern wint_t getwc_unlocked (__FILE *__stream); 6242: extern wint_t getwchar_unlocked (void); 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: extern wint_t fgetwc_unlocked (__FILE *__stream); 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: extern wint_t fputwc_unlocked (wchar_t __wc, __FILE *__stream); 6242: # 741 "/usr/include/wchar.h" 3 4 6242: extern wint_t putwc_unlocked (wchar_t __wc, __FILE *__stream); 6242: extern wint_t putwchar_unlocked (wchar_t __wc); 6242: # 751 "/usr/include/wchar.h" 3 4 6242: extern wchar_t *fgetws_unlocked (wchar_t *__restrict __ws, int __n, 6242: __FILE *__restrict __stream); 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: extern int fputws_unlocked (const wchar_t *__restrict __ws, 6242: __FILE *__restrict __stream); 6242: 6242: 6242: 6242: 6242: 6242: 6242: extern size_t wcsftime (wchar_t *__restrict __s, size_t __maxsize, 6242: const wchar_t *__restrict __format, 6242: const struct tm *__restrict __tp) throw (); 6242: 6242: 6242: 6242: 6242: extern size_t wcsftime_l (wchar_t *__restrict __s, size_t __maxsize, 6242: const wchar_t *__restrict __format, 6242: const struct tm *__restrict __tp, 6242: locale_t __loc) throw (); 6242: 6242: 6242: 6242: 6242: # 1 "/usr/include/s390x-linux-gnu/bits/wchar2.h" 1 3 4 6242: # 24 "/usr/include/s390x-linux-gnu/bits/wchar2.h" 3 4 6242: extern wchar_t *__wmemcpy_chk (wchar_t *__restrict __s1, 6242: const wchar_t *__restrict __s2, size_t __n, 6242: size_t __ns1) throw (); 6242: extern wchar_t *__wmemcpy_alias (wchar_t *__restrict __s1, const wchar_t *__restrict __s2, size_t __n) throw () __asm__ ("" "wmemcpy") 6242: 6242: 6242: ; 6242: extern wchar_t *__wmemcpy_chk_warn (wchar_t *__restrict __s1, const wchar_t *__restrict __s2, size_t __n, size_t __ns1) throw () __asm__ ("" "__wmemcpy_chk") 6242: 6242: 6242: 6242: __attribute__((__warning__ ("wmemcpy called with length bigger than size of destination " "buffer"))) 6242: ; 6242: 6242: extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) wchar_t * 6242: __attribute__ ((__leaf__)) wmemcpy (wchar_t *__restrict __s1, const wchar_t *__restrict __s2, size_t __n) throw () 6242: 6242: { 6242: if (__builtin_object_size (__s1, 0) != (size_t) -1) 6242: { 6242: if (!__builtin_constant_p (__n)) 6242: return __wmemcpy_chk (__s1, __s2, __n, 6242: __builtin_object_size (__s1, 0) / sizeof (wchar_t)); 6242: 6242: if (__n > __builtin_object_size (__s1, 0) / sizeof (wchar_t)) 6242: return __wmemcpy_chk_warn (__s1, __s2, __n, 6242: __builtin_object_size (__s1, 0) / sizeof (wchar_t)); 6242: } 6242: return __wmemcpy_alias (__s1, __s2, __n); 6242: } 6242: 6242: 6242: extern wchar_t *__wmemmove_chk (wchar_t *__s1, const wchar_t *__s2, 6242: size_t __n, size_t __ns1) throw (); 6242: extern wchar_t *__wmemmove_alias (wchar_t *__s1, const wchar_t *__s2, size_t __n) throw () __asm__ ("" "wmemmove") 6242: 6242: ; 6242: extern wchar_t *__wmemmove_chk_warn (wchar_t *__s1, const wchar_t *__s2, size_t __n, size_t __ns1) throw () __asm__ ("" "__wmemmove_chk") 6242: 6242: 6242: __attribute__((__warning__ ("wmemmove called with length bigger than size of destination " "buffer"))) 6242: ; 6242: 6242: extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) wchar_t * 6242: __attribute__ ((__leaf__)) wmemmove (wchar_t *__s1, const wchar_t *__s2, size_t __n) throw () 6242: { 6242: if (__builtin_object_size (__s1, 0) != (size_t) -1) 6242: { 6242: if (!__builtin_constant_p (__n)) 6242: return __wmemmove_chk (__s1, __s2, __n, 6242: __builtin_object_size (__s1, 0) / sizeof (wchar_t)); 6242: 6242: if (__n > __builtin_object_size (__s1, 0) / sizeof (wchar_t)) 6242: return __wmemmove_chk_warn (__s1, __s2, __n, 6242: __builtin_object_size (__s1, 0) / sizeof (wchar_t)); 6242: } 6242: return __wmemmove_alias (__s1, __s2, __n); 6242: } 6242: 6242: 6242: 6242: extern wchar_t *__wmempcpy_chk (wchar_t *__restrict __s1, 6242: const wchar_t *__restrict __s2, size_t __n, 6242: size_t __ns1) throw (); 6242: extern wchar_t *__wmempcpy_alias (wchar_t *__restrict __s1, const wchar_t *__restrict __s2, size_t __n) throw () __asm__ ("" "wmempcpy") 6242: 6242: 6242: ; 6242: extern wchar_t *__wmempcpy_chk_warn (wchar_t *__restrict __s1, const wchar_t *__restrict __s2, size_t __n, size_t __ns1) throw () __asm__ ("" "__wmempcpy_chk") 6242: 6242: 6242: 6242: __attribute__((__warning__ ("wmempcpy called with length bigger than size of destination " "buffer"))) 6242: ; 6242: 6242: extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) wchar_t * 6242: __attribute__ ((__leaf__)) wmempcpy (wchar_t *__restrict __s1, const wchar_t *__restrict __s2, size_t __n) throw () 6242: 6242: { 6242: if (__builtin_object_size (__s1, 0) != (size_t) -1) 6242: { 6242: if (!__builtin_constant_p (__n)) 6242: return __wmempcpy_chk (__s1, __s2, __n, 6242: __builtin_object_size (__s1, 0) / sizeof (wchar_t)); 6242: 6242: if (__n > __builtin_object_size (__s1, 0) / sizeof (wchar_t)) 6242: return __wmempcpy_chk_warn (__s1, __s2, __n, 6242: __builtin_object_size (__s1, 0) / sizeof (wchar_t)); 6242: } 6242: return __wmempcpy_alias (__s1, __s2, __n); 6242: } 6242: 6242: 6242: 6242: extern wchar_t *__wmemset_chk (wchar_t *__s, wchar_t __c, size_t __n, 6242: size_t __ns) throw (); 6242: extern wchar_t *__wmemset_alias (wchar_t *__s, wchar_t __c, size_t __n) throw () __asm__ ("" "wmemset") 6242: ; 6242: extern wchar_t *__wmemset_chk_warn (wchar_t *__s, wchar_t __c, size_t __n, size_t __ns) throw () __asm__ ("" "__wmemset_chk") 6242: 6242: 6242: __attribute__((__warning__ ("wmemset called with length bigger than size of destination " "buffer"))) 6242: ; 6242: 6242: extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) wchar_t * 6242: __attribute__ ((__leaf__)) wmemset (wchar_t *__s, wchar_t __c, size_t __n) throw () 6242: { 6242: if (__builtin_object_size (__s, 0) != (size_t) -1) 6242: { 6242: if (!__builtin_constant_p (__n)) 6242: return __wmemset_chk (__s, __c, __n, __builtin_object_size (__s, 0) / sizeof (wchar_t)); 6242: 6242: if (__n > __builtin_object_size (__s, 0) / sizeof (wchar_t)) 6242: return __wmemset_chk_warn (__s, __c, __n, 6242: __builtin_object_size (__s, 0) / sizeof (wchar_t)); 6242: } 6242: return __wmemset_alias (__s, __c, __n); 6242: } 6242: 6242: 6242: extern wchar_t *__wcscpy_chk (wchar_t *__restrict __dest, 6242: const wchar_t *__restrict __src, 6242: size_t __n) throw (); 6242: extern wchar_t *__wcscpy_alias (wchar_t *__restrict __dest, const wchar_t *__restrict __src) throw () __asm__ ("" "wcscpy") 6242: 6242: ; 6242: 6242: extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) wchar_t * 6242: __attribute__ ((__leaf__)) wcscpy (wchar_t *__restrict __dest, const wchar_t *__restrict __src) throw () 6242: { 6242: if (__builtin_object_size (__dest, 2 > 1) != (size_t) -1) 6242: return __wcscpy_chk (__dest, __src, __builtin_object_size (__dest, 2 > 1) / sizeof (wchar_t)); 6242: return __wcscpy_alias (__dest, __src); 6242: } 6242: 6242: 6242: extern wchar_t *__wcpcpy_chk (wchar_t *__restrict __dest, 6242: const wchar_t *__restrict __src, 6242: size_t __destlen) throw (); 6242: extern wchar_t *__wcpcpy_alias (wchar_t *__restrict __dest, const wchar_t *__restrict __src) throw () __asm__ ("" "wcpcpy") 6242: 6242: ; 6242: 6242: extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) wchar_t * 6242: __attribute__ ((__leaf__)) wcpcpy (wchar_t *__restrict __dest, const wchar_t *__restrict __src) throw () 6242: { 6242: if (__builtin_object_size (__dest, 2 > 1) != (size_t) -1) 6242: return __wcpcpy_chk (__dest, __src, __builtin_object_size (__dest, 2 > 1) / sizeof (wchar_t)); 6242: return __wcpcpy_alias (__dest, __src); 6242: } 6242: 6242: 6242: extern wchar_t *__wcsncpy_chk (wchar_t *__restrict __dest, 6242: const wchar_t *__restrict __src, size_t __n, 6242: size_t __destlen) throw (); 6242: extern wchar_t *__wcsncpy_alias (wchar_t *__restrict __dest, const wchar_t *__restrict __src, size_t __n) throw () __asm__ ("" "wcsncpy") 6242: 6242: 6242: ; 6242: extern wchar_t *__wcsncpy_chk_warn (wchar_t *__restrict __dest, const wchar_t *__restrict __src, size_t __n, size_t __destlen) throw () __asm__ ("" "__wcsncpy_chk") 6242: 6242: 6242: 6242: __attribute__((__warning__ ("wcsncpy called with length bigger than size of destination " "buffer"))) 6242: ; 6242: 6242: extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) wchar_t * 6242: __attribute__ ((__leaf__)) wcsncpy (wchar_t *__restrict __dest, const wchar_t *__restrict __src, size_t __n) throw () 6242: 6242: { 6242: if (__builtin_object_size (__dest, 2 > 1) != (size_t) -1) 6242: { 6242: if (!__builtin_constant_p (__n)) 6242: return __wcsncpy_chk (__dest, __src, __n, 6242: __builtin_object_size (__dest, 2 > 1) / sizeof (wchar_t)); 6242: if (__n > __builtin_object_size (__dest, 2 > 1) / sizeof (wchar_t)) 6242: return __wcsncpy_chk_warn (__dest, __src, __n, 6242: __builtin_object_size (__dest, 2 > 1) / sizeof (wchar_t)); 6242: } 6242: return __wcsncpy_alias (__dest, __src, __n); 6242: } 6242: 6242: 6242: extern wchar_t *__wcpncpy_chk (wchar_t *__restrict __dest, 6242: const wchar_t *__restrict __src, size_t __n, 6242: size_t __destlen) throw (); 6242: extern wchar_t *__wcpncpy_alias (wchar_t *__restrict __dest, const wchar_t *__restrict __src, size_t __n) throw () __asm__ ("" "wcpncpy") 6242: 6242: 6242: ; 6242: extern wchar_t *__wcpncpy_chk_warn (wchar_t *__restrict __dest, const wchar_t *__restrict __src, size_t __n, size_t __destlen) throw () __asm__ ("" "__wcpncpy_chk") 6242: 6242: 6242: 6242: __attribute__((__warning__ ("wcpncpy called with length bigger than size of destination " "buffer"))) 6242: ; 6242: 6242: extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) wchar_t * 6242: __attribute__ ((__leaf__)) wcpncpy (wchar_t *__restrict __dest, const wchar_t *__restrict __src, size_t __n) throw () 6242: 6242: { 6242: if (__builtin_object_size (__dest, 2 > 1) != (size_t) -1) 6242: { 6242: if (!__builtin_constant_p (__n)) 6242: return __wcpncpy_chk (__dest, __src, __n, 6242: __builtin_object_size (__dest, 2 > 1) / sizeof (wchar_t)); 6242: if (__n > __builtin_object_size (__dest, 2 > 1) / sizeof (wchar_t)) 6242: return __wcpncpy_chk_warn (__dest, __src, __n, 6242: __builtin_object_size (__dest, 2 > 1) / sizeof (wchar_t)); 6242: } 6242: return __wcpncpy_alias (__dest, __src, __n); 6242: } 6242: 6242: 6242: extern wchar_t *__wcscat_chk (wchar_t *__restrict __dest, 6242: const wchar_t *__restrict __src, 6242: size_t __destlen) throw (); 6242: extern wchar_t *__wcscat_alias (wchar_t *__restrict __dest, const wchar_t *__restrict __src) throw () __asm__ ("" "wcscat") 6242: 6242: ; 6242: 6242: extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) wchar_t * 6242: __attribute__ ((__leaf__)) wcscat (wchar_t *__restrict __dest, const wchar_t *__restrict __src) throw () 6242: { 6242: if (__builtin_object_size (__dest, 2 > 1) != (size_t) -1) 6242: return __wcscat_chk (__dest, __src, __builtin_object_size (__dest, 2 > 1) / sizeof (wchar_t)); 6242: return __wcscat_alias (__dest, __src); 6242: } 6242: 6242: 6242: extern wchar_t *__wcsncat_chk (wchar_t *__restrict __dest, 6242: const wchar_t *__restrict __src, 6242: size_t __n, size_t __destlen) throw (); 6242: extern wchar_t *__wcsncat_alias (wchar_t *__restrict __dest, const wchar_t *__restrict __src, size_t __n) throw () __asm__ ("" "wcsncat") 6242: 6242: 6242: ; 6242: 6242: extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) wchar_t * 6242: __attribute__ ((__leaf__)) wcsncat (wchar_t *__restrict __dest, const wchar_t *__restrict __src, size_t __n) throw () 6242: 6242: { 6242: if (__builtin_object_size (__dest, 2 > 1) != (size_t) -1) 6242: return __wcsncat_chk (__dest, __src, __n, 6242: __builtin_object_size (__dest, 2 > 1) / sizeof (wchar_t)); 6242: return __wcsncat_alias (__dest, __src, __n); 6242: } 6242: 6242: 6242: extern int __swprintf_chk (wchar_t *__restrict __s, size_t __n, 6242: int __flag, size_t __s_len, 6242: const wchar_t *__restrict __format, ...) 6242: throw () ; 6242: 6242: extern int __swprintf_alias (wchar_t *__restrict __s, size_t __n, const wchar_t *__restrict __fmt, ...) throw () __asm__ ("" "swprintf") 6242: 6242: 6242: ; 6242: 6242: 6242: extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int 6242: __attribute__ ((__leaf__)) swprintf (wchar_t *__restrict __s, size_t __n, const wchar_t *__restrict __fmt, ...) throw () 6242: 6242: { 6242: if (__builtin_object_size (__s, 2 > 1) != (size_t) -1 || 2 > 1) 6242: return __swprintf_chk (__s, __n, 2 - 1, 6242: __builtin_object_size (__s, 2 > 1) / sizeof (wchar_t), 6242: __fmt, __builtin_va_arg_pack ()); 6242: return __swprintf_alias (__s, __n, __fmt, __builtin_va_arg_pack ()); 6242: } 6242: # 303 "/usr/include/s390x-linux-gnu/bits/wchar2.h" 3 4 6242: extern int __vswprintf_chk (wchar_t *__restrict __s, size_t __n, 6242: int __flag, size_t __s_len, 6242: const wchar_t *__restrict __format, 6242: __gnuc_va_list __arg) 6242: throw () ; 6242: 6242: extern int __vswprintf_alias (wchar_t *__restrict __s, size_t __n, const wchar_t *__restrict __fmt, __gnuc_va_list __ap) throw () __asm__ ("" "vswprintf") 6242: 6242: 6242: ; 6242: 6242: extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int 6242: __attribute__ ((__leaf__)) vswprintf (wchar_t *__restrict __s, size_t __n, const wchar_t *__restrict __fmt, __gnuc_va_list __ap) throw () 6242: 6242: { 6242: if (__builtin_object_size (__s, 2 > 1) != (size_t) -1 || 2 > 1) 6242: return __vswprintf_chk (__s, __n, 2 - 1, 6242: __builtin_object_size (__s, 2 > 1) / sizeof (wchar_t), __fmt, __ap); 6242: return __vswprintf_alias (__s, __n, __fmt, __ap); 6242: } 6242: 6242: 6242: 6242: 6242: extern int __fwprintf_chk (__FILE *__restrict __stream, int __flag, 6242: const wchar_t *__restrict __format, ...); 6242: extern int __wprintf_chk (int __flag, const wchar_t *__restrict __format, 6242: ...); 6242: extern int __vfwprintf_chk (__FILE *__restrict __stream, int __flag, 6242: const wchar_t *__restrict __format, 6242: __gnuc_va_list __ap); 6242: extern int __vwprintf_chk (int __flag, const wchar_t *__restrict __format, 6242: __gnuc_va_list __ap); 6242: 6242: 6242: extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int 6242: wprintf (const wchar_t *__restrict __fmt, ...) 6242: { 6242: return __wprintf_chk (2 - 1, __fmt, __builtin_va_arg_pack ()); 6242: } 6242: 6242: extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int 6242: fwprintf (__FILE *__restrict __stream, const wchar_t *__restrict __fmt, ...) 6242: { 6242: return __fwprintf_chk (__stream, 2 - 1, __fmt, 6242: __builtin_va_arg_pack ()); 6242: } 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int 6242: vwprintf (const wchar_t *__restrict __fmt, __gnuc_va_list __ap) 6242: { 6242: return __vwprintf_chk (2 - 1, __fmt, __ap); 6242: } 6242: 6242: extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int 6242: vfwprintf (__FILE *__restrict __stream, 6242: const wchar_t *__restrict __fmt, __gnuc_va_list __ap) 6242: { 6242: return __vfwprintf_chk (__stream, 2 - 1, __fmt, __ap); 6242: } 6242: 6242: 6242: 6242: extern wchar_t *__fgetws_chk (wchar_t *__restrict __s, size_t __size, int __n, 6242: __FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); 6242: extern wchar_t *__fgetws_alias (wchar_t *__restrict __s, int __n, __FILE *__restrict __stream) __asm__ ("" "fgetws") 6242: 6242: __attribute__ ((__warn_unused_result__)); 6242: extern wchar_t *__fgetws_chk_warn (wchar_t *__restrict __s, size_t __size, int __n, __FILE *__restrict __stream) __asm__ ("" "__fgetws_chk") 6242: 6242: 6242: __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("fgetws called with bigger size than length " "of destination buffer"))) 6242: ; 6242: 6242: extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__warn_unused_result__)) wchar_t * 6242: fgetws (wchar_t *__restrict __s, int __n, __FILE *__restrict __stream) 6242: { 6242: if (__builtin_object_size (__s, 2 > 1) != (size_t) -1) 6242: { 6242: if (!__builtin_constant_p (__n) || __n <= 0) 6242: return __fgetws_chk (__s, __builtin_object_size (__s, 2 > 1) / sizeof (wchar_t), 6242: __n, __stream); 6242: 6242: if ((size_t) __n > __builtin_object_size (__s, 2 > 1) / sizeof (wchar_t)) 6242: return __fgetws_chk_warn (__s, __builtin_object_size (__s, 2 > 1) / sizeof (wchar_t), 6242: __n, __stream); 6242: } 6242: return __fgetws_alias (__s, __n, __stream); 6242: } 6242: 6242: 6242: extern wchar_t *__fgetws_unlocked_chk (wchar_t *__restrict __s, size_t __size, 6242: int __n, __FILE *__restrict __stream) 6242: __attribute__ ((__warn_unused_result__)); 6242: extern wchar_t *__fgetws_unlocked_alias (wchar_t *__restrict __s, int __n, __FILE *__restrict __stream) __asm__ ("" "fgetws_unlocked") 6242: 6242: 6242: __attribute__ ((__warn_unused_result__)); 6242: extern wchar_t *__fgetws_unlocked_chk_warn (wchar_t *__restrict __s, size_t __size, int __n, __FILE *__restrict __stream) __asm__ ("" "__fgetws_unlocked_chk") 6242: 6242: 6242: 6242: __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("fgetws_unlocked called with bigger size than length " "of destination buffer"))) 6242: ; 6242: 6242: extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__warn_unused_result__)) wchar_t * 6242: fgetws_unlocked (wchar_t *__restrict __s, int __n, __FILE *__restrict __stream) 6242: { 6242: if (__builtin_object_size (__s, 2 > 1) != (size_t) -1) 6242: { 6242: if (!__builtin_constant_p (__n) || __n <= 0) 6242: return __fgetws_unlocked_chk (__s, __builtin_object_size (__s, 2 > 1) / sizeof (wchar_t), 6242: __n, __stream); 6242: 6242: if ((size_t) __n > __builtin_object_size (__s, 2 > 1) / sizeof (wchar_t)) 6242: return __fgetws_unlocked_chk_warn (__s, __builtin_object_size (__s, 2 > 1) / sizeof (wchar_t), 6242: __n, __stream); 6242: } 6242: return __fgetws_unlocked_alias (__s, __n, __stream); 6242: } 6242: 6242: 6242: 6242: extern size_t __wcrtomb_chk (char *__restrict __s, wchar_t __wchar, 6242: mbstate_t *__restrict __p, 6242: size_t __buflen) throw () __attribute__ ((__warn_unused_result__)); 6242: extern size_t __wcrtomb_alias (char *__restrict __s, wchar_t __wchar, mbstate_t *__restrict __ps) throw () __asm__ ("" "wcrtomb") 6242: 6242: __attribute__ ((__warn_unused_result__)); 6242: 6242: extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__warn_unused_result__)) size_t 6242: __attribute__ ((__leaf__)) wcrtomb (char *__restrict __s, wchar_t __wchar, mbstate_t *__restrict __ps) throw () 6242: 6242: { 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: if (__builtin_object_size (__s, 2 > 1) != (size_t) -1 && 16 > __builtin_object_size (__s, 2 > 1)) 6242: return __wcrtomb_chk (__s, __wchar, __ps, __builtin_object_size (__s, 2 > 1)); 6242: return __wcrtomb_alias (__s, __wchar, __ps); 6242: } 6242: 6242: 6242: extern size_t __mbsrtowcs_chk (wchar_t *__restrict __dst, 6242: const char **__restrict __src, 6242: size_t __len, mbstate_t *__restrict __ps, 6242: size_t __dstlen) throw (); 6242: extern size_t __mbsrtowcs_alias (wchar_t *__restrict __dst, const char **__restrict __src, size_t __len, mbstate_t *__restrict __ps) throw () __asm__ ("" "mbsrtowcs") 6242: 6242: 6242: 6242: ; 6242: extern size_t __mbsrtowcs_chk_warn (wchar_t *__restrict __dst, const char **__restrict __src, size_t __len, mbstate_t *__restrict __ps, size_t __dstlen) throw () __asm__ ("" "__mbsrtowcs_chk") 6242: 6242: 6242: 6242: 6242: __attribute__((__warning__ ("mbsrtowcs called with dst buffer smaller than len " "* sizeof (wchar_t)"))) 6242: ; 6242: 6242: extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) size_t 6242: __attribute__ ((__leaf__)) mbsrtowcs (wchar_t *__restrict __dst, const char **__restrict __src, size_t __len, mbstate_t *__restrict __ps) throw () 6242: 6242: { 6242: if (__builtin_object_size (__dst, 2 > 1) != (size_t) -1) 6242: { 6242: if (!__builtin_constant_p (__len)) 6242: return __mbsrtowcs_chk (__dst, __src, __len, __ps, 6242: __builtin_object_size (__dst, 2 > 1) / sizeof (wchar_t)); 6242: 6242: if (__len > __builtin_object_size (__dst, 2 > 1) / sizeof (wchar_t)) 6242: return __mbsrtowcs_chk_warn (__dst, __src, __len, __ps, 6242: __builtin_object_size (__dst, 2 > 1) / sizeof (wchar_t)); 6242: } 6242: return __mbsrtowcs_alias (__dst, __src, __len, __ps); 6242: } 6242: 6242: 6242: extern size_t __wcsrtombs_chk (char *__restrict __dst, 6242: const wchar_t **__restrict __src, 6242: size_t __len, mbstate_t *__restrict __ps, 6242: size_t __dstlen) throw (); 6242: extern size_t __wcsrtombs_alias (char *__restrict __dst, const wchar_t **__restrict __src, size_t __len, mbstate_t *__restrict __ps) throw () __asm__ ("" "wcsrtombs") 6242: 6242: 6242: 6242: ; 6242: extern size_t __wcsrtombs_chk_warn (char *__restrict __dst, const wchar_t **__restrict __src, size_t __len, mbstate_t *__restrict __ps, size_t __dstlen) throw () __asm__ ("" "__wcsrtombs_chk") 6242: 6242: 6242: 6242: 6242: __attribute__((__warning__ ("wcsrtombs called with dst buffer smaller than len"))); 6242: 6242: extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) size_t 6242: __attribute__ ((__leaf__)) wcsrtombs (char *__restrict __dst, const wchar_t **__restrict __src, size_t __len, mbstate_t *__restrict __ps) throw () 6242: 6242: { 6242: if (__builtin_object_size (__dst, 2 > 1) != (size_t) -1) 6242: { 6242: if (!__builtin_constant_p (__len)) 6242: return __wcsrtombs_chk (__dst, __src, __len, __ps, __builtin_object_size (__dst, 2 > 1)); 6242: 6242: if (__len > __builtin_object_size (__dst, 2 > 1)) 6242: return __wcsrtombs_chk_warn (__dst, __src, __len, __ps, __builtin_object_size (__dst, 2 > 1)); 6242: } 6242: return __wcsrtombs_alias (__dst, __src, __len, __ps); 6242: } 6242: 6242: 6242: 6242: extern size_t __mbsnrtowcs_chk (wchar_t *__restrict __dst, 6242: const char **__restrict __src, size_t __nmc, 6242: size_t __len, mbstate_t *__restrict __ps, 6242: size_t __dstlen) throw (); 6242: extern size_t __mbsnrtowcs_alias (wchar_t *__restrict __dst, const char **__restrict __src, size_t __nmc, size_t __len, mbstate_t *__restrict __ps) throw () __asm__ ("" "mbsnrtowcs") 6242: 6242: 6242: 6242: ; 6242: extern size_t __mbsnrtowcs_chk_warn (wchar_t *__restrict __dst, const char **__restrict __src, size_t __nmc, size_t __len, mbstate_t *__restrict __ps, size_t __dstlen) throw () __asm__ ("" "__mbsnrtowcs_chk") 6242: 6242: 6242: 6242: 6242: __attribute__((__warning__ ("mbsnrtowcs called with dst buffer smaller than len " "* sizeof (wchar_t)"))) 6242: ; 6242: 6242: extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) size_t 6242: __attribute__ ((__leaf__)) mbsnrtowcs (wchar_t *__restrict __dst, const char **__restrict __src, size_t __nmc, size_t __len, mbstate_t *__restrict __ps) throw () 6242: 6242: { 6242: if (__builtin_object_size (__dst, 2 > 1) != (size_t) -1) 6242: { 6242: if (!__builtin_constant_p (__len)) 6242: return __mbsnrtowcs_chk (__dst, __src, __nmc, __len, __ps, 6242: __builtin_object_size (__dst, 2 > 1) / sizeof (wchar_t)); 6242: 6242: if (__len > __builtin_object_size (__dst, 2 > 1) / sizeof (wchar_t)) 6242: return __mbsnrtowcs_chk_warn (__dst, __src, __nmc, __len, __ps, 6242: __builtin_object_size (__dst, 2 > 1) / sizeof (wchar_t)); 6242: } 6242: return __mbsnrtowcs_alias (__dst, __src, __nmc, __len, __ps); 6242: } 6242: 6242: 6242: extern size_t __wcsnrtombs_chk (char *__restrict __dst, 6242: const wchar_t **__restrict __src, 6242: size_t __nwc, size_t __len, 6242: mbstate_t *__restrict __ps, size_t __dstlen) 6242: throw (); 6242: extern size_t __wcsnrtombs_alias (char *__restrict __dst, const wchar_t **__restrict __src, size_t __nwc, size_t __len, mbstate_t *__restrict __ps) throw () __asm__ ("" "wcsnrtombs") 6242: 6242: 6242: 6242: ; 6242: extern size_t __wcsnrtombs_chk_warn (char *__restrict __dst, const wchar_t **__restrict __src, size_t __nwc, size_t __len, mbstate_t *__restrict __ps, size_t __dstlen) throw () __asm__ ("" "__wcsnrtombs_chk") 6242: 6242: 6242: 6242: 6242: 6242: __attribute__((__warning__ ("wcsnrtombs called with dst buffer smaller than len"))); 6242: 6242: extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) size_t 6242: __attribute__ ((__leaf__)) wcsnrtombs (char *__restrict __dst, const wchar_t **__restrict __src, size_t __nwc, size_t __len, mbstate_t *__restrict __ps) throw () 6242: 6242: { 6242: if (__builtin_object_size (__dst, 2 > 1) != (size_t) -1) 6242: { 6242: if (!__builtin_constant_p (__len)) 6242: return __wcsnrtombs_chk (__dst, __src, __nwc, __len, __ps, 6242: __builtin_object_size (__dst, 2 > 1)); 6242: 6242: if (__len > __builtin_object_size (__dst, 2 > 1)) 6242: return __wcsnrtombs_chk_warn (__dst, __src, __nwc, __len, __ps, 6242: __builtin_object_size (__dst, 2 > 1)); 6242: } 6242: return __wcsnrtombs_alias (__dst, __src, __nwc, __len, __ps); 6242: } 6242: # 784 "/usr/include/wchar.h" 2 3 4 6242: 6242: 6242: 6242: 6242: 6242: 6242: } 6242: # 45 "/usr/include/c++/8/cwchar" 2 3 6242: # 62 "/usr/include/c++/8/cwchar" 3 6242: namespace std 6242: { 6242: using ::mbstate_t; 6242: } 6242: # 135 "/usr/include/c++/8/cwchar" 3 6242: namespace std __attribute__ ((__visibility__ ("default"))) 6242: { 6242: 6242: 6242: using ::wint_t; 6242: 6242: using ::btowc; 6242: using ::fgetwc; 6242: using ::fgetws; 6242: using ::fputwc; 6242: using ::fputws; 6242: using ::fwide; 6242: using ::fwprintf; 6242: using ::fwscanf; 6242: using ::getwc; 6242: using ::getwchar; 6242: using ::mbrlen; 6242: using ::mbrtowc; 6242: using ::mbsinit; 6242: using ::mbsrtowcs; 6242: using ::putwc; 6242: using ::putwchar; 6242: 6242: using ::swprintf; 6242: 6242: using ::swscanf; 6242: using ::ungetwc; 6242: using ::vfwprintf; 6242: 6242: using ::vfwscanf; 6242: 6242: 6242: using ::vswprintf; 6242: 6242: 6242: using ::vswscanf; 6242: 6242: using ::vwprintf; 6242: 6242: using ::vwscanf; 6242: 6242: using ::wcrtomb; 6242: using ::wcscat; 6242: using ::wcscmp; 6242: using ::wcscoll; 6242: using ::wcscpy; 6242: using ::wcscspn; 6242: using ::wcsftime; 6242: using ::wcslen; 6242: using ::wcsncat; 6242: using ::wcsncmp; 6242: using ::wcsncpy; 6242: using ::wcsrtombs; 6242: using ::wcsspn; 6242: using ::wcstod; 6242: 6242: using ::wcstof; 6242: 6242: using ::wcstok; 6242: using ::wcstol; 6242: using ::wcstoul; 6242: using ::wcsxfrm; 6242: using ::wctob; 6242: using ::wmemcmp; 6242: using ::wmemcpy; 6242: using ::wmemmove; 6242: using ::wmemset; 6242: using ::wprintf; 6242: using ::wscanf; 6242: using ::wcschr; 6242: using ::wcspbrk; 6242: using ::wcsrchr; 6242: using ::wcsstr; 6242: using ::wmemchr; 6242: # 232 "/usr/include/c++/8/cwchar" 3 6242: 6242: } 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: namespace __gnu_cxx 6242: { 6242: 6242: 6242: 6242: 6242: 6242: using ::wcstold; 6242: # 257 "/usr/include/c++/8/cwchar" 3 6242: using ::wcstoll; 6242: using ::wcstoull; 6242: 6242: } 6242: 6242: namespace std 6242: { 6242: using ::__gnu_cxx::wcstold; 6242: using ::__gnu_cxx::wcstoll; 6242: using ::__gnu_cxx::wcstoull; 6242: } 6242: # 277 "/usr/include/c++/8/cwchar" 3 6242: namespace std 6242: { 6242: 6242: using std::wcstof; 6242: 6242: 6242: using std::vfwscanf; 6242: 6242: 6242: using std::vswscanf; 6242: 6242: 6242: using std::vwscanf; 6242: 6242: 6242: 6242: using std::wcstold; 6242: using std::wcstoll; 6242: using std::wcstoull; 6242: 6242: } 6242: # 41 "/usr/include/c++/8/bits/postypes.h" 2 3 6242: # 68 "/usr/include/c++/8/bits/postypes.h" 3 6242: namespace std __attribute__ ((__visibility__ ("default"))) 6242: { 6242: 6242: # 88 "/usr/include/c++/8/bits/postypes.h" 3 6242: typedef long streamoff; 6242: # 98 "/usr/include/c++/8/bits/postypes.h" 3 6242: typedef ptrdiff_t streamsize; 6242: # 111 "/usr/include/c++/8/bits/postypes.h" 3 6242: template 6242: class fpos 6242: { 6242: private: 6242: streamoff _M_off; 6242: _StateT _M_state; 6242: 6242: public: 6242: 6242: 6242: 6242: 6242: fpos() 6242: : _M_off(0), _M_state() { } 6242: # 133 "/usr/include/c++/8/bits/postypes.h" 3 6242: fpos(streamoff __off) 6242: : _M_off(__off), _M_state() { } 6242: 6242: 6242: operator streamoff() const { return _M_off; } 6242: 6242: 6242: void 6242: state(_StateT __st) 6242: { _M_state = __st; } 6242: 6242: 6242: _StateT 6242: state() const 6242: { return _M_state; } 6242: 6242: 6242: 6242: 6242: 6242: fpos& 6242: operator+=(streamoff __off) 6242: { 6242: _M_off += __off; 6242: return *this; 6242: } 6242: 6242: 6242: 6242: 6242: 6242: fpos& 6242: operator-=(streamoff __off) 6242: { 6242: _M_off -= __off; 6242: return *this; 6242: } 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: fpos 6242: operator+(streamoff __off) const 6242: { 6242: fpos __pos(*this); 6242: __pos += __off; 6242: return __pos; 6242: } 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: fpos 6242: operator-(streamoff __off) const 6242: { 6242: fpos __pos(*this); 6242: __pos -= __off; 6242: return __pos; 6242: } 6242: 6242: 6242: 6242: 6242: 6242: 6242: streamoff 6242: operator-(const fpos& __other) const 6242: { return _M_off - __other._M_off; } 6242: }; 6242: 6242: 6242: 6242: 6242: 6242: 6242: template 6242: inline bool 6242: operator==(const fpos<_StateT>& __lhs, const fpos<_StateT>& __rhs) 6242: { return streamoff(__lhs) == streamoff(__rhs); } 6242: 6242: template 6242: inline bool 6242: operator!=(const fpos<_StateT>& __lhs, const fpos<_StateT>& __rhs) 6242: { return streamoff(__lhs) != streamoff(__rhs); } 6242: 6242: 6242: 6242: 6242: 6242: typedef fpos streampos; 6242: 6242: typedef fpos wstreampos; 6242: 6242: 6242: 6242: typedef fpos u16streampos; 6242: 6242: typedef fpos u32streampos; 6242: 6242: 6242: 6242: } 6242: # 41 "/usr/include/c++/8/iosfwd" 2 3 6242: 6242: namespace std __attribute__ ((__visibility__ ("default"))) 6242: { 6242: 6242: # 74 "/usr/include/c++/8/iosfwd" 3 6242: class ios_base; 6242: 6242: template > 6242: class basic_ios; 6242: 6242: template > 6242: class basic_streambuf; 6242: 6242: template > 6242: class basic_istream; 6242: 6242: template > 6242: class basic_ostream; 6242: 6242: template > 6242: class basic_iostream; 6242: 6242: 6242: namespace __cxx11 { 6242: 6242: template, 6242: typename _Alloc = allocator<_CharT> > 6242: class basic_stringbuf; 6242: 6242: template, 6242: typename _Alloc = allocator<_CharT> > 6242: class basic_istringstream; 6242: 6242: template, 6242: typename _Alloc = allocator<_CharT> > 6242: class basic_ostringstream; 6242: 6242: template, 6242: typename _Alloc = allocator<_CharT> > 6242: class basic_stringstream; 6242: 6242: } 6242: 6242: template > 6242: class basic_filebuf; 6242: 6242: template > 6242: class basic_ifstream; 6242: 6242: template > 6242: class basic_ofstream; 6242: 6242: template > 6242: class basic_fstream; 6242: 6242: template > 6242: class istreambuf_iterator; 6242: 6242: template > 6242: class ostreambuf_iterator; 6242: 6242: 6242: 6242: typedef basic_ios ios; 6242: 6242: 6242: typedef basic_streambuf streambuf; 6242: 6242: 6242: typedef basic_istream istream; 6242: 6242: 6242: typedef basic_ostream ostream; 6242: 6242: 6242: typedef basic_iostream iostream; 6242: 6242: 6242: typedef basic_stringbuf stringbuf; 6242: 6242: 6242: typedef basic_istringstream istringstream; 6242: 6242: 6242: typedef basic_ostringstream ostringstream; 6242: 6242: 6242: typedef basic_stringstream stringstream; 6242: 6242: 6242: typedef basic_filebuf filebuf; 6242: 6242: 6242: typedef basic_ifstream ifstream; 6242: 6242: 6242: typedef basic_ofstream ofstream; 6242: 6242: 6242: typedef basic_fstream fstream; 6242: 6242: 6242: 6242: typedef basic_ios wios; 6242: 6242: 6242: typedef basic_streambuf wstreambuf; 6242: 6242: 6242: typedef basic_istream wistream; 6242: 6242: 6242: typedef basic_ostream wostream; 6242: 6242: 6242: typedef basic_iostream wiostream; 6242: 6242: 6242: typedef basic_stringbuf wstringbuf; 6242: 6242: 6242: typedef basic_istringstream wistringstream; 6242: 6242: 6242: typedef basic_ostringstream wostringstream; 6242: 6242: 6242: typedef basic_stringstream wstringstream; 6242: 6242: 6242: typedef basic_filebuf wfilebuf; 6242: 6242: 6242: typedef basic_ifstream wifstream; 6242: 6242: 6242: typedef basic_ofstream wofstream; 6242: 6242: 6242: typedef basic_fstream wfstream; 6242: 6242: 6242: 6242: 6242: } 6242: # 39 "/usr/include/c++/8/ios" 2 3 6242: 6242: # 1 "/usr/include/c++/8/bits/char_traits.h" 1 3 6242: # 37 "/usr/include/c++/8/bits/char_traits.h" 3 6242: 6242: # 38 "/usr/include/c++/8/bits/char_traits.h" 3 6242: 6242: 6242: 6242: # 1 "/usr/include/c++/8/cwchar" 1 3 6242: # 39 "/usr/include/c++/8/cwchar" 3 6242: 6242: # 40 "/usr/include/c++/8/cwchar" 3 6242: # 42 "/usr/include/c++/8/bits/char_traits.h" 2 3 6242: 6242: 6242: 6242: 6242: 6242: namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) 6242: { 6242: 6242: # 61 "/usr/include/c++/8/bits/char_traits.h" 3 6242: template 6242: struct _Char_types 6242: { 6242: typedef unsigned long int_type; 6242: typedef std::streampos pos_type; 6242: typedef std::streamoff off_type; 6242: typedef std::mbstate_t state_type; 6242: }; 6242: # 86 "/usr/include/c++/8/bits/char_traits.h" 3 6242: template 6242: struct char_traits 6242: { 6242: typedef _CharT char_type; 6242: typedef typename _Char_types<_CharT>::int_type int_type; 6242: typedef typename _Char_types<_CharT>::pos_type pos_type; 6242: typedef typename _Char_types<_CharT>::off_type off_type; 6242: typedef typename _Char_types<_CharT>::state_type state_type; 6242: 6242: static void 6242: assign(char_type& __c1, const char_type& __c2) 6242: { __c1 = __c2; } 6242: 6242: static constexpr bool 6242: eq(const char_type& __c1, const char_type& __c2) 6242: { return __c1 == __c2; } 6242: 6242: static constexpr bool 6242: lt(const char_type& __c1, const char_type& __c2) 6242: { return __c1 < __c2; } 6242: 6242: static int 6242: compare(const char_type* __s1, const char_type* __s2, std::size_t __n); 6242: 6242: static std::size_t 6242: length(const char_type* __s); 6242: 6242: static const char_type* 6242: find(const char_type* __s, std::size_t __n, const char_type& __a); 6242: 6242: static char_type* 6242: move(char_type* __s1, const char_type* __s2, std::size_t __n); 6242: 6242: static char_type* 6242: copy(char_type* __s1, const char_type* __s2, std::size_t __n); 6242: 6242: static char_type* 6242: assign(char_type* __s, std::size_t __n, char_type __a); 6242: 6242: static constexpr char_type 6242: to_char_type(const int_type& __c) 6242: { return static_cast(__c); } 6242: 6242: static constexpr int_type 6242: to_int_type(const char_type& __c) 6242: { return static_cast(__c); } 6242: 6242: static constexpr bool 6242: eq_int_type(const int_type& __c1, const int_type& __c2) 6242: { return __c1 == __c2; } 6242: 6242: static constexpr int_type 6242: eof() 6242: { return static_cast(-1); } 6242: 6242: static constexpr int_type 6242: not_eof(const int_type& __c) 6242: { return !eq_int_type(__c, eof()) ? __c : to_int_type(char_type()); } 6242: }; 6242: 6242: 6242: 6242: template 6242: int 6242: char_traits<_CharT>:: 6242: compare(const char_type* __s1, const char_type* __s2, std::size_t __n) 6242: { 6242: for (std::size_t __i = 0; __i < __n; ++__i) 6242: if (lt(__s1[__i], __s2[__i])) 6242: return -1; 6242: else if (lt(__s2[__i], __s1[__i])) 6242: return 1; 6242: return 0; 6242: } 6242: 6242: template 6242: std::size_t 6242: char_traits<_CharT>:: 6242: length(const char_type* __p) 6242: { 6242: std::size_t __i = 0; 6242: while (!eq(__p[__i], char_type())) 6242: ++__i; 6242: return __i; 6242: } 6242: 6242: template 6242: const typename char_traits<_CharT>::char_type* 6242: char_traits<_CharT>:: 6242: find(const char_type* __s, std::size_t __n, const char_type& __a) 6242: { 6242: for (std::size_t __i = 0; __i < __n; ++__i) 6242: if (eq(__s[__i], __a)) 6242: return __s + __i; 6242: return 0; 6242: } 6242: 6242: template 6242: typename char_traits<_CharT>::char_type* 6242: char_traits<_CharT>:: 6242: move(char_type* __s1, const char_type* __s2, std::size_t __n) 6242: { 6242: return static_cast<_CharT*>(__builtin_memmove(__s1, __s2, 6242: __n * sizeof(char_type))); 6242: } 6242: 6242: template 6242: typename char_traits<_CharT>::char_type* 6242: char_traits<_CharT>:: 6242: copy(char_type* __s1, const char_type* __s2, std::size_t __n) 6242: { 6242: 6242: std::copy(__s2, __s2 + __n, __s1); 6242: return __s1; 6242: } 6242: 6242: template 6242: typename char_traits<_CharT>::char_type* 6242: char_traits<_CharT>:: 6242: assign(char_type* __s, std::size_t __n, char_type __a) 6242: { 6242: 6242: std::fill_n(__s, __n, __a); 6242: return __s; 6242: } 6242: 6242: 6242: } 6242: 6242: namespace std __attribute__ ((__visibility__ ("default"))) 6242: { 6242: 6242: # 268 "/usr/include/c++/8/bits/char_traits.h" 3 6242: template 6242: struct char_traits : public __gnu_cxx::char_traits<_CharT> 6242: { }; 6242: 6242: 6242: 6242: template<> 6242: struct char_traits 6242: { 6242: typedef char char_type; 6242: typedef int int_type; 6242: typedef streampos pos_type; 6242: typedef streamoff off_type; 6242: typedef mbstate_t state_type; 6242: 6242: static void 6242: assign(char_type& __c1, const char_type& __c2) noexcept 6242: { __c1 = __c2; } 6242: 6242: static constexpr bool 6242: eq(const char_type& __c1, const char_type& __c2) noexcept 6242: { return __c1 == __c2; } 6242: 6242: static constexpr bool 6242: lt(const char_type& __c1, const char_type& __c2) noexcept 6242: { 6242: 6242: return (static_cast(__c1) 6242: < static_cast(__c2)); 6242: } 6242: 6242: static int 6242: compare(const char_type* __s1, const char_type* __s2, size_t __n) 6242: { 6242: 6242: 6242: 6242: 6242: 6242: 6242: if (__n == 0) 6242: return 0; 6242: return __builtin_memcmp(__s1, __s2, __n); 6242: } 6242: 6242: static size_t 6242: length(const char_type* __s) 6242: { 6242: 6242: 6242: 6242: 6242: return __builtin_strlen(__s); 6242: } 6242: 6242: static const char_type* 6242: find(const char_type* __s, size_t __n, const char_type& __a) 6242: { 6242: 6242: 6242: 6242: 6242: 6242: 6242: if (__n == 0) 6242: return 0; 6242: return static_cast(__builtin_memchr(__s, __a, __n)); 6242: } 6242: 6242: static char_type* 6242: move(char_type* __s1, const char_type* __s2, size_t __n) 6242: { 6242: if (__n == 0) 6242: return __s1; 6242: return static_cast(__builtin_memmove(__s1, __s2, __n)); 6242: } 6242: 6242: static char_type* 6242: copy(char_type* __s1, const char_type* __s2, size_t __n) 6242: { 6242: if (__n == 0) 6242: return __s1; 6242: return static_cast(__builtin_memcpy(__s1, __s2, __n)); 6242: } 6242: 6242: static char_type* 6242: assign(char_type* __s, size_t __n, char_type __a) 6242: { 6242: if (__n == 0) 6242: return __s; 6242: return static_cast(__builtin_memset(__s, __a, __n)); 6242: } 6242: 6242: static constexpr char_type 6242: to_char_type(const int_type& __c) noexcept 6242: { return static_cast(__c); } 6242: 6242: 6242: 6242: static constexpr int_type 6242: to_int_type(const char_type& __c) noexcept 6242: { return static_cast(static_cast(__c)); } 6242: 6242: static constexpr bool 6242: eq_int_type(const int_type& __c1, const int_type& __c2) noexcept 6242: { return __c1 == __c2; } 6242: 6242: static constexpr int_type 6242: eof() noexcept 6242: { return static_cast(-1); } 6242: 6242: static constexpr int_type 6242: not_eof(const int_type& __c) noexcept 6242: { return (__c == eof()) ? 0 : __c; } 6242: }; 6242: 6242: 6242: 6242: 6242: template<> 6242: struct char_traits 6242: { 6242: typedef wchar_t char_type; 6242: typedef wint_t int_type; 6242: typedef streamoff off_type; 6242: typedef wstreampos pos_type; 6242: typedef mbstate_t state_type; 6242: 6242: static void 6242: assign(char_type& __c1, const char_type& __c2) noexcept 6242: { __c1 = __c2; } 6242: 6242: static constexpr bool 6242: eq(const char_type& __c1, const char_type& __c2) noexcept 6242: { return __c1 == __c2; } 6242: 6242: static constexpr bool 6242: lt(const char_type& __c1, const char_type& __c2) noexcept 6242: { return __c1 < __c2; } 6242: 6242: static int 6242: compare(const char_type* __s1, const char_type* __s2, size_t __n) 6242: { 6242: 6242: 6242: 6242: 6242: 6242: 6242: if (__n == 0) 6242: return 0; 6242: else 6242: return wmemcmp(__s1, __s2, __n); 6242: } 6242: 6242: static size_t 6242: length(const char_type* __s) 6242: { 6242: 6242: 6242: 6242: 6242: 6242: return wcslen(__s); 6242: } 6242: 6242: static const char_type* 6242: find(const char_type* __s, size_t __n, const char_type& __a) 6242: { 6242: 6242: 6242: 6242: 6242: 6242: 6242: if (__n == 0) 6242: return 0; 6242: else 6242: return wmemchr(__s, __a, __n); 6242: } 6242: 6242: static char_type* 6242: move(char_type* __s1, const char_type* __s2, size_t __n) 6242: { 6242: if (__n == 0) 6242: return __s1; 6242: return wmemmove(__s1, __s2, __n); 6242: } 6242: 6242: static char_type* 6242: copy(char_type* __s1, const char_type* __s2, size_t __n) 6242: { 6242: if (__n == 0) 6242: return __s1; 6242: return wmemcpy(__s1, __s2, __n); 6242: } 6242: 6242: static char_type* 6242: assign(char_type* __s, size_t __n, char_type __a) 6242: { 6242: if (__n == 0) 6242: return __s; 6242: return wmemset(__s, __a, __n); 6242: } 6242: 6242: static constexpr char_type 6242: to_char_type(const int_type& __c) noexcept 6242: { return char_type(__c); } 6242: 6242: static constexpr int_type 6242: to_int_type(const char_type& __c) noexcept 6242: { return int_type(__c); } 6242: 6242: static constexpr bool 6242: eq_int_type(const int_type& __c1, const int_type& __c2) noexcept 6242: { return __c1 == __c2; } 6242: 6242: static constexpr int_type 6242: eof() noexcept 6242: { return static_cast((0xffffffffu)); } 6242: 6242: static constexpr int_type 6242: not_eof(const int_type& __c) noexcept 6242: { return eq_int_type(__c, eof()) ? 0 : __c; } 6242: }; 6242: 6242: 6242: 6242: } 6242: 6242: 6242: 6242: 6242: # 1 "/usr/include/c++/8/cstdint" 1 3 6242: # 32 "/usr/include/c++/8/cstdint" 3 6242: 6242: # 33 "/usr/include/c++/8/cstdint" 3 6242: # 41 "/usr/include/c++/8/cstdint" 3 6242: # 1 "/usr/lib/gcc/s390x-linux-gnu/8/include/stdint.h" 1 3 4 6242: # 9 "/usr/lib/gcc/s390x-linux-gnu/8/include/stdint.h" 3 4 6242: # 1 "/usr/include/stdint.h" 1 3 4 6242: # 26 "/usr/include/stdint.h" 3 4 6242: # 1 "/usr/include/s390x-linux-gnu/bits/libc-header-start.h" 1 3 4 6242: # 27 "/usr/include/stdint.h" 2 3 4 6242: # 1 "/usr/include/s390x-linux-gnu/bits/types.h" 1 3 4 6242: # 27 "/usr/include/s390x-linux-gnu/bits/types.h" 3 4 6242: # 1 "/usr/include/s390x-linux-gnu/bits/wordsize.h" 1 3 4 6242: # 28 "/usr/include/s390x-linux-gnu/bits/types.h" 2 3 4 6242: 6242: 6242: typedef unsigned char __u_char; 6242: typedef unsigned short int __u_short; 6242: typedef unsigned int __u_int; 6242: typedef unsigned long int __u_long; 6242: 6242: 6242: typedef signed char __int8_t; 6242: typedef unsigned char __uint8_t; 6242: typedef signed short int __int16_t; 6242: typedef unsigned short int __uint16_t; 6242: typedef signed int __int32_t; 6242: typedef unsigned int __uint32_t; 6242: 6242: typedef signed long int __int64_t; 6242: typedef unsigned long int __uint64_t; 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: typedef long int __quad_t; 6242: typedef unsigned long int __u_quad_t; 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: typedef long int __intmax_t; 6242: typedef unsigned long int __uintmax_t; 6242: # 130 "/usr/include/s390x-linux-gnu/bits/types.h" 3 4 6242: # 1 "/usr/include/s390x-linux-gnu/bits/typesizes.h" 1 3 4 6242: # 131 "/usr/include/s390x-linux-gnu/bits/types.h" 2 3 4 6242: 6242: 6242: typedef unsigned long int __dev_t; 6242: typedef unsigned int __uid_t; 6242: typedef unsigned int __gid_t; 6242: typedef unsigned long int __ino_t; 6242: typedef unsigned long int __ino64_t; 6242: typedef unsigned int __mode_t; 6242: typedef unsigned long int __nlink_t; 6242: typedef long int __off_t; 6242: typedef long int __off64_t; 6242: typedef int __pid_t; 6242: typedef struct { int __val[2]; } __fsid_t; 6242: typedef long int __clock_t; 6242: typedef unsigned long int __rlim_t; 6242: typedef unsigned long int __rlim64_t; 6242: typedef unsigned int __id_t; 6242: typedef long int __time_t; 6242: typedef unsigned int __useconds_t; 6242: typedef long int __suseconds_t; 6242: 6242: typedef int __daddr_t; 6242: typedef int __key_t; 6242: 6242: 6242: typedef int __clockid_t; 6242: 6242: 6242: typedef void * __timer_t; 6242: 6242: 6242: typedef long int __blksize_t; 6242: 6242: 6242: 6242: 6242: typedef long int __blkcnt_t; 6242: typedef long int __blkcnt64_t; 6242: 6242: 6242: typedef unsigned long int __fsblkcnt_t; 6242: typedef unsigned long int __fsblkcnt64_t; 6242: 6242: 6242: typedef unsigned long int __fsfilcnt_t; 6242: typedef unsigned long int __fsfilcnt64_t; 6242: 6242: 6242: typedef long int __fsword_t; 6242: 6242: typedef long int __ssize_t; 6242: 6242: 6242: typedef long int __syscall_slong_t; 6242: 6242: typedef unsigned long int __syscall_ulong_t; 6242: 6242: 6242: 6242: typedef __off64_t __loff_t; 6242: typedef __quad_t *__qaddr_t; 6242: typedef char *__caddr_t; 6242: 6242: 6242: typedef long int __intptr_t; 6242: 6242: 6242: typedef unsigned int __socklen_t; 6242: 6242: 6242: 6242: 6242: typedef int __sig_atomic_t; 6242: # 28 "/usr/include/stdint.h" 2 3 4 6242: 6242: # 1 "/usr/include/s390x-linux-gnu/bits/wordsize.h" 1 3 4 6242: # 30 "/usr/include/stdint.h" 2 3 4 6242: 6242: 6242: 6242: 6242: # 1 "/usr/include/s390x-linux-gnu/bits/stdint-intn.h" 1 3 4 6242: # 24 "/usr/include/s390x-linux-gnu/bits/stdint-intn.h" 3 4 6242: typedef __int8_t int8_t; 6242: typedef __int16_t int16_t; 6242: typedef __int32_t int32_t; 6242: typedef __int64_t int64_t; 6242: # 35 "/usr/include/stdint.h" 2 3 4 6242: 6242: 6242: # 1 "/usr/include/s390x-linux-gnu/bits/stdint-uintn.h" 1 3 4 6242: # 24 "/usr/include/s390x-linux-gnu/bits/stdint-uintn.h" 3 4 6242: typedef __uint8_t uint8_t; 6242: typedef __uint16_t uint16_t; 6242: typedef __uint32_t uint32_t; 6242: typedef __uint64_t uint64_t; 6242: # 38 "/usr/include/stdint.h" 2 3 4 6242: 6242: 6242: 6242: 6242: 6242: typedef signed char int_least8_t; 6242: typedef short int int_least16_t; 6242: typedef int int_least32_t; 6242: 6242: typedef long int int_least64_t; 6242: 6242: 6242: 6242: 6242: 6242: 6242: typedef unsigned char uint_least8_t; 6242: typedef unsigned short int uint_least16_t; 6242: typedef unsigned int uint_least32_t; 6242: 6242: typedef unsigned long int uint_least64_t; 6242: # 68 "/usr/include/stdint.h" 3 4 6242: typedef signed char int_fast8_t; 6242: 6242: typedef long int int_fast16_t; 6242: typedef long int int_fast32_t; 6242: typedef long int int_fast64_t; 6242: # 81 "/usr/include/stdint.h" 3 4 6242: typedef unsigned char uint_fast8_t; 6242: 6242: typedef unsigned long int uint_fast16_t; 6242: typedef unsigned long int uint_fast32_t; 6242: typedef unsigned long int uint_fast64_t; 6242: # 97 "/usr/include/stdint.h" 3 4 6242: typedef long int intptr_t; 6242: 6242: 6242: typedef unsigned long int uintptr_t; 6242: # 111 "/usr/include/stdint.h" 3 4 6242: typedef __intmax_t intmax_t; 6242: typedef __uintmax_t uintmax_t; 6242: # 10 "/usr/lib/gcc/s390x-linux-gnu/8/include/stdint.h" 2 3 4 6242: # 42 "/usr/include/c++/8/cstdint" 2 3 6242: 6242: 6242: 6242: 6242: namespace std 6242: { 6242: using ::int8_t; 6242: using ::int16_t; 6242: using ::int32_t; 6242: using ::int64_t; 6242: 6242: using ::int_fast8_t; 6242: using ::int_fast16_t; 6242: using ::int_fast32_t; 6242: using ::int_fast64_t; 6242: 6242: using ::int_least8_t; 6242: using ::int_least16_t; 6242: using ::int_least32_t; 6242: using ::int_least64_t; 6242: 6242: using ::intmax_t; 6242: using ::intptr_t; 6242: 6242: using ::uint8_t; 6242: using ::uint16_t; 6242: using ::uint32_t; 6242: using ::uint64_t; 6242: 6242: using ::uint_fast8_t; 6242: using ::uint_fast16_t; 6242: using ::uint_fast32_t; 6242: using ::uint_fast64_t; 6242: 6242: using ::uint_least8_t; 6242: using ::uint_least16_t; 6242: using ::uint_least32_t; 6242: using ::uint_least64_t; 6242: 6242: using ::uintmax_t; 6242: using ::uintptr_t; 6242: } 6242: # 502 "/usr/include/c++/8/bits/char_traits.h" 2 3 6242: 6242: namespace std __attribute__ ((__visibility__ ("default"))) 6242: { 6242: 6242: 6242: template<> 6242: struct char_traits 6242: { 6242: typedef char16_t char_type; 6242: typedef uint_least16_t int_type; 6242: typedef streamoff off_type; 6242: typedef u16streampos pos_type; 6242: typedef mbstate_t state_type; 6242: 6242: static void 6242: assign(char_type& __c1, const char_type& __c2) noexcept 6242: { __c1 = __c2; } 6242: 6242: static constexpr bool 6242: eq(const char_type& __c1, const char_type& __c2) noexcept 6242: { return __c1 == __c2; } 6242: 6242: static constexpr bool 6242: lt(const char_type& __c1, const char_type& __c2) noexcept 6242: { return __c1 < __c2; } 6242: 6242: static int 6242: compare(const char_type* __s1, const char_type* __s2, size_t __n) 6242: { 6242: for (size_t __i = 0; __i < __n; ++__i) 6242: if (lt(__s1[__i], __s2[__i])) 6242: return -1; 6242: else if (lt(__s2[__i], __s1[__i])) 6242: return 1; 6242: return 0; 6242: } 6242: 6242: static size_t 6242: length(const char_type* __s) 6242: { 6242: size_t __i = 0; 6242: while (!eq(__s[__i], char_type())) 6242: ++__i; 6242: return __i; 6242: } 6242: 6242: static const char_type* 6242: find(const char_type* __s, size_t __n, const char_type& __a) 6242: { 6242: for (size_t __i = 0; __i < __n; ++__i) 6242: if (eq(__s[__i], __a)) 6242: return __s + __i; 6242: return 0; 6242: } 6242: 6242: static char_type* 6242: move(char_type* __s1, const char_type* __s2, size_t __n) 6242: { 6242: if (__n == 0) 6242: return __s1; 6242: return (static_cast 6242: (__builtin_memmove(__s1, __s2, __n * sizeof(char_type)))); 6242: } 6242: 6242: static char_type* 6242: copy(char_type* __s1, const char_type* __s2, size_t __n) 6242: { 6242: if (__n == 0) 6242: return __s1; 6242: return (static_cast 6242: (__builtin_memcpy(__s1, __s2, __n * sizeof(char_type)))); 6242: } 6242: 6242: static char_type* 6242: assign(char_type* __s, size_t __n, char_type __a) 6242: { 6242: for (size_t __i = 0; __i < __n; ++__i) 6242: assign(__s[__i], __a); 6242: return __s; 6242: } 6242: 6242: static constexpr char_type 6242: to_char_type(const int_type& __c) noexcept 6242: { return char_type(__c); } 6242: 6242: static constexpr int_type 6242: to_int_type(const char_type& __c) noexcept 6242: { return __c == eof() ? int_type(0xfffd) : int_type(__c); } 6242: 6242: static constexpr bool 6242: eq_int_type(const int_type& __c1, const int_type& __c2) noexcept 6242: { return __c1 == __c2; } 6242: 6242: static constexpr int_type 6242: eof() noexcept 6242: { return static_cast(-1); } 6242: 6242: static constexpr int_type 6242: not_eof(const int_type& __c) noexcept 6242: { return eq_int_type(__c, eof()) ? 0 : __c; } 6242: }; 6242: 6242: template<> 6242: struct char_traits 6242: { 6242: typedef char32_t char_type; 6242: typedef uint_least32_t int_type; 6242: typedef streamoff off_type; 6242: typedef u32streampos pos_type; 6242: typedef mbstate_t state_type; 6242: 6242: static void 6242: assign(char_type& __c1, const char_type& __c2) noexcept 6242: { __c1 = __c2; } 6242: 6242: static constexpr bool 6242: eq(const char_type& __c1, const char_type& __c2) noexcept 6242: { return __c1 == __c2; } 6242: 6242: static constexpr bool 6242: lt(const char_type& __c1, const char_type& __c2) noexcept 6242: { return __c1 < __c2; } 6242: 6242: static int 6242: compare(const char_type* __s1, const char_type* __s2, size_t __n) 6242: { 6242: for (size_t __i = 0; __i < __n; ++__i) 6242: if (lt(__s1[__i], __s2[__i])) 6242: return -1; 6242: else if (lt(__s2[__i], __s1[__i])) 6242: return 1; 6242: return 0; 6242: } 6242: 6242: static size_t 6242: length(const char_type* __s) 6242: { 6242: size_t __i = 0; 6242: while (!eq(__s[__i], char_type())) 6242: ++__i; 6242: return __i; 6242: } 6242: 6242: static const char_type* 6242: find(const char_type* __s, size_t __n, const char_type& __a) 6242: { 6242: for (size_t __i = 0; __i < __n; ++__i) 6242: if (eq(__s[__i], __a)) 6242: return __s + __i; 6242: return 0; 6242: } 6242: 6242: static char_type* 6242: move(char_type* __s1, const char_type* __s2, size_t __n) 6242: { 6242: if (__n == 0) 6242: return __s1; 6242: return (static_cast 6242: (__builtin_memmove(__s1, __s2, __n * sizeof(char_type)))); 6242: } 6242: 6242: static char_type* 6242: copy(char_type* __s1, const char_type* __s2, size_t __n) 6242: { 6242: if (__n == 0) 6242: return __s1; 6242: return (static_cast 6242: (__builtin_memcpy(__s1, __s2, __n * sizeof(char_type)))); 6242: } 6242: 6242: static char_type* 6242: assign(char_type* __s, size_t __n, char_type __a) 6242: { 6242: for (size_t __i = 0; __i < __n; ++__i) 6242: assign(__s[__i], __a); 6242: return __s; 6242: } 6242: 6242: static constexpr char_type 6242: to_char_type(const int_type& __c) noexcept 6242: { return char_type(__c); } 6242: 6242: static constexpr int_type 6242: to_int_type(const char_type& __c) noexcept 6242: { return int_type(__c); } 6242: 6242: static constexpr bool 6242: eq_int_type(const int_type& __c1, const int_type& __c2) noexcept 6242: { return __c1 == __c2; } 6242: 6242: static constexpr int_type 6242: eof() noexcept 6242: { return static_cast(-1); } 6242: 6242: static constexpr int_type 6242: not_eof(const int_type& __c) noexcept 6242: { return eq_int_type(__c, eof()) ? 0 : __c; } 6242: }; 6242: 6242: 6242: } 6242: # 41 "/usr/include/c++/8/ios" 2 3 6242: # 1 "/usr/include/c++/8/bits/localefwd.h" 1 3 6242: # 37 "/usr/include/c++/8/bits/localefwd.h" 3 6242: 6242: # 38 "/usr/include/c++/8/bits/localefwd.h" 3 6242: 6242: 6242: # 1 "/usr/include/s390x-linux-gnu/c++/8/bits/c++locale.h" 1 3 6242: # 39 "/usr/include/s390x-linux-gnu/c++/8/bits/c++locale.h" 3 6242: 6242: # 40 "/usr/include/s390x-linux-gnu/c++/8/bits/c++locale.h" 3 6242: 6242: # 1 "/usr/include/c++/8/clocale" 1 3 6242: # 39 "/usr/include/c++/8/clocale" 3 6242: 6242: # 40 "/usr/include/c++/8/clocale" 3 6242: 6242: 6242: # 1 "/usr/include/locale.h" 1 3 4 6242: # 28 "/usr/include/locale.h" 3 4 6242: # 1 "/usr/lib/gcc/s390x-linux-gnu/8/include/stddef.h" 1 3 4 6242: # 29 "/usr/include/locale.h" 2 3 4 6242: # 1 "/usr/include/s390x-linux-gnu/bits/locale.h" 1 3 4 6242: # 30 "/usr/include/locale.h" 2 3 4 6242: 6242: extern "C" { 6242: # 51 "/usr/include/locale.h" 3 4 6242: struct lconv 6242: { 6242: 6242: 6242: char *decimal_point; 6242: char *thousands_sep; 6242: 6242: 6242: 6242: 6242: 6242: char *grouping; 6242: 6242: 6242: 6242: 6242: 6242: char *int_curr_symbol; 6242: char *currency_symbol; 6242: char *mon_decimal_point; 6242: char *mon_thousands_sep; 6242: char *mon_grouping; 6242: char *positive_sign; 6242: char *negative_sign; 6242: char int_frac_digits; 6242: char frac_digits; 6242: 6242: char p_cs_precedes; 6242: 6242: char p_sep_by_space; 6242: 6242: char n_cs_precedes; 6242: 6242: char n_sep_by_space; 6242: 6242: 6242: 6242: 6242: 6242: 6242: char p_sign_posn; 6242: char n_sign_posn; 6242: 6242: 6242: char int_p_cs_precedes; 6242: 6242: char int_p_sep_by_space; 6242: 6242: char int_n_cs_precedes; 6242: 6242: char int_n_sep_by_space; 6242: 6242: 6242: 6242: 6242: 6242: 6242: char int_p_sign_posn; 6242: char int_n_sign_posn; 6242: # 118 "/usr/include/locale.h" 3 4 6242: }; 6242: 6242: 6242: 6242: extern char *setlocale (int __category, const char *__locale) throw (); 6242: 6242: 6242: extern struct lconv *localeconv (void) throw (); 6242: # 141 "/usr/include/locale.h" 3 4 6242: extern locale_t newlocale (int __category_mask, const char *__locale, 6242: locale_t __base) throw (); 6242: # 176 "/usr/include/locale.h" 3 4 6242: extern locale_t duplocale (locale_t __dataset) throw (); 6242: 6242: 6242: 6242: extern void freelocale (locale_t __dataset) throw (); 6242: 6242: 6242: 6242: 6242: 6242: 6242: extern locale_t uselocale (locale_t __dataset) throw (); 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: } 6242: # 43 "/usr/include/c++/8/clocale" 2 3 6242: # 51 "/usr/include/c++/8/clocale" 3 6242: namespace std 6242: { 6242: using ::lconv; 6242: using ::setlocale; 6242: using ::localeconv; 6242: } 6242: # 42 "/usr/include/s390x-linux-gnu/c++/8/bits/c++locale.h" 2 3 6242: 6242: 6242: 6242: 6242: 6242: 6242: namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) 6242: { 6242: 6242: 6242: extern "C" __typeof(uselocale) __uselocale; 6242: 6242: 6242: } 6242: 6242: 6242: namespace std __attribute__ ((__visibility__ ("default"))) 6242: { 6242: 6242: 6242: typedef __locale_t __c_locale; 6242: 6242: 6242: 6242: 6242: 6242: inline int 6242: __convert_from_v(const __c_locale& __cloc __attribute__ ((__unused__)), 6242: char* __out, 6242: const int __size __attribute__ ((__unused__)), 6242: const char* __fmt, ...) 6242: { 6242: 6242: __c_locale __old = __gnu_cxx::__uselocale(__cloc); 6242: # 88 "/usr/include/s390x-linux-gnu/c++/8/bits/c++locale.h" 3 6242: __builtin_va_list __args; 6242: __builtin_va_start(__args, __fmt); 6242: 6242: 6242: const int __ret = __builtin_vsnprintf(__out, __size, __fmt, __args); 6242: 6242: 6242: 6242: 6242: __builtin_va_end(__args); 6242: 6242: 6242: __gnu_cxx::__uselocale(__old); 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: return __ret; 6242: } 6242: 6242: 6242: } 6242: # 41 "/usr/include/c++/8/bits/localefwd.h" 2 3 6242: 6242: # 1 "/usr/include/c++/8/cctype" 1 3 6242: # 39 "/usr/include/c++/8/cctype" 3 6242: 6242: # 40 "/usr/include/c++/8/cctype" 3 6242: 6242: 6242: # 1 "/usr/include/ctype.h" 1 3 4 6242: # 28 "/usr/include/ctype.h" 3 4 6242: extern "C" { 6242: # 39 "/usr/include/ctype.h" 3 4 6242: # 1 "/usr/include/endian.h" 1 3 4 6242: # 36 "/usr/include/endian.h" 3 4 6242: # 1 "/usr/include/s390x-linux-gnu/bits/endian.h" 1 3 4 6242: # 37 "/usr/include/endian.h" 2 3 4 6242: # 60 "/usr/include/endian.h" 3 4 6242: # 1 "/usr/include/s390x-linux-gnu/bits/byteswap.h" 1 3 4 6242: # 24 "/usr/include/s390x-linux-gnu/bits/byteswap.h" 3 4 6242: # 1 "/usr/include/s390x-linux-gnu/bits/wordsize.h" 1 3 4 6242: # 25 "/usr/include/s390x-linux-gnu/bits/byteswap.h" 2 3 4 6242: # 33 "/usr/include/s390x-linux-gnu/bits/byteswap.h" 3 4 6242: # 1 "/usr/include/s390x-linux-gnu/bits/byteswap-16.h" 1 3 4 6242: # 24 "/usr/include/s390x-linux-gnu/bits/byteswap-16.h" 3 4 6242: # 1 "/usr/include/s390x-linux-gnu/bits/wordsize.h" 1 3 4 6242: # 25 "/usr/include/s390x-linux-gnu/bits/byteswap-16.h" 2 3 4 6242: # 34 "/usr/include/s390x-linux-gnu/bits/byteswap.h" 2 3 4 6242: # 61 "/usr/include/endian.h" 2 3 4 6242: # 1 "/usr/include/s390x-linux-gnu/bits/uintn-identity.h" 1 3 4 6242: # 32 "/usr/include/s390x-linux-gnu/bits/uintn-identity.h" 3 4 6242: static __inline __uint16_t 6242: __uint16_identity (__uint16_t __x) 6242: { 6242: return __x; 6242: } 6242: 6242: static __inline __uint32_t 6242: __uint32_identity (__uint32_t __x) 6242: { 6242: return __x; 6242: } 6242: 6242: static __inline __uint64_t 6242: __uint64_identity (__uint64_t __x) 6242: { 6242: return __x; 6242: } 6242: # 62 "/usr/include/endian.h" 2 3 4 6242: # 40 "/usr/include/ctype.h" 2 3 4 6242: 6242: 6242: 6242: 6242: 6242: 6242: enum 6242: { 6242: _ISupper = (1 << (0)), 6242: _ISlower = (1 << (1)), 6242: _ISalpha = (1 << (2)), 6242: _ISdigit = (1 << (3)), 6242: _ISxdigit = (1 << (4)), 6242: _ISspace = (1 << (5)), 6242: _ISprint = (1 << (6)), 6242: _ISgraph = (1 << (7)), 6242: _ISblank = (1 << (8)), 6242: _IScntrl = (1 << (9)), 6242: _ISpunct = (1 << (10)), 6242: _ISalnum = (1 << (11)) 6242: }; 6242: # 79 "/usr/include/ctype.h" 3 4 6242: extern const unsigned short int **__ctype_b_loc (void) 6242: throw () __attribute__ ((__const__)); 6242: extern const __int32_t **__ctype_tolower_loc (void) 6242: throw () __attribute__ ((__const__)); 6242: extern const __int32_t **__ctype_toupper_loc (void) 6242: throw () __attribute__ ((__const__)); 6242: # 108 "/usr/include/ctype.h" 3 4 6242: extern int isalnum (int) throw (); 6242: extern int isalpha (int) throw (); 6242: extern int iscntrl (int) throw (); 6242: extern int isdigit (int) throw (); 6242: extern int islower (int) throw (); 6242: extern int isgraph (int) throw (); 6242: extern int isprint (int) throw (); 6242: extern int ispunct (int) throw (); 6242: extern int isspace (int) throw (); 6242: extern int isupper (int) throw (); 6242: extern int isxdigit (int) throw (); 6242: 6242: 6242: 6242: extern int tolower (int __c) throw (); 6242: 6242: 6242: extern int toupper (int __c) throw (); 6242: 6242: 6242: 6242: 6242: extern int isblank (int) throw (); 6242: 6242: 6242: 6242: 6242: extern int isctype (int __c, int __mask) throw (); 6242: 6242: 6242: 6242: 6242: 6242: 6242: extern int isascii (int __c) throw (); 6242: 6242: 6242: 6242: extern int toascii (int __c) throw (); 6242: 6242: 6242: 6242: extern int _toupper (int) throw (); 6242: extern int _tolower (int) throw (); 6242: # 251 "/usr/include/ctype.h" 3 4 6242: extern int isalnum_l (int, locale_t) throw (); 6242: extern int isalpha_l (int, locale_t) throw (); 6242: extern int iscntrl_l (int, locale_t) throw (); 6242: extern int isdigit_l (int, locale_t) throw (); 6242: extern int islower_l (int, locale_t) throw (); 6242: extern int isgraph_l (int, locale_t) throw (); 6242: extern int isprint_l (int, locale_t) throw (); 6242: extern int ispunct_l (int, locale_t) throw (); 6242: extern int isspace_l (int, locale_t) throw (); 6242: extern int isupper_l (int, locale_t) throw (); 6242: extern int isxdigit_l (int, locale_t) throw (); 6242: 6242: extern int isblank_l (int, locale_t) throw (); 6242: 6242: 6242: 6242: extern int __tolower_l (int __c, locale_t __l) throw (); 6242: extern int tolower_l (int __c, locale_t __l) throw (); 6242: 6242: 6242: extern int __toupper_l (int __c, locale_t __l) throw (); 6242: extern int toupper_l (int __c, locale_t __l) throw (); 6242: # 327 "/usr/include/ctype.h" 3 4 6242: } 6242: # 43 "/usr/include/c++/8/cctype" 2 3 6242: # 62 "/usr/include/c++/8/cctype" 3 6242: namespace std 6242: { 6242: using ::isalnum; 6242: using ::isalpha; 6242: using ::iscntrl; 6242: using ::isdigit; 6242: using ::isgraph; 6242: using ::islower; 6242: using ::isprint; 6242: using ::ispunct; 6242: using ::isspace; 6242: using ::isupper; 6242: using ::isxdigit; 6242: using ::tolower; 6242: using ::toupper; 6242: } 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: namespace std 6242: { 6242: using ::isblank; 6242: } 6242: # 43 "/usr/include/c++/8/bits/localefwd.h" 2 3 6242: 6242: namespace std __attribute__ ((__visibility__ ("default"))) 6242: { 6242: 6242: # 55 "/usr/include/c++/8/bits/localefwd.h" 3 6242: class locale; 6242: 6242: template 6242: bool 6242: has_facet(const locale&) throw(); 6242: 6242: template 6242: const _Facet& 6242: use_facet(const locale&); 6242: 6242: 6242: template 6242: bool 6242: isspace(_CharT, const locale&); 6242: 6242: template 6242: bool 6242: isprint(_CharT, const locale&); 6242: 6242: template 6242: bool 6242: iscntrl(_CharT, const locale&); 6242: 6242: template 6242: bool 6242: isupper(_CharT, const locale&); 6242: 6242: template 6242: bool 6242: islower(_CharT, const locale&); 6242: 6242: template 6242: bool 6242: isalpha(_CharT, const locale&); 6242: 6242: template 6242: bool 6242: isdigit(_CharT, const locale&); 6242: 6242: template 6242: bool 6242: ispunct(_CharT, const locale&); 6242: 6242: template 6242: bool 6242: isxdigit(_CharT, const locale&); 6242: 6242: template 6242: bool 6242: isalnum(_CharT, const locale&); 6242: 6242: template 6242: bool 6242: isgraph(_CharT, const locale&); 6242: 6242: 6242: template 6242: bool 6242: isblank(_CharT, const locale&); 6242: 6242: 6242: template 6242: _CharT 6242: toupper(_CharT, const locale&); 6242: 6242: template 6242: _CharT 6242: tolower(_CharT, const locale&); 6242: 6242: 6242: class ctype_base; 6242: template 6242: class ctype; 6242: template<> class ctype; 6242: 6242: template<> class ctype; 6242: 6242: template 6242: class ctype_byname; 6242: 6242: 6242: class codecvt_base; 6242: template 6242: class codecvt; 6242: template<> class codecvt; 6242: 6242: template<> class codecvt; 6242: 6242: template 6242: class codecvt_byname; 6242: 6242: 6242: namespace __gnu_cxx_ldbl128 { 6242: template > 6242: class num_get; 6242: template > 6242: class num_put; 6242: } 6242: namespace __cxx11 { 6242: template class numpunct; 6242: template class numpunct_byname; 6242: } 6242: 6242: namespace __cxx11 { 6242: 6242: template 6242: class collate; 6242: template 6242: class collate_byname; 6242: } 6242: 6242: 6242: class time_base; 6242: namespace __cxx11 { 6242: template > 6242: class time_get; 6242: template > 6242: class time_get_byname; 6242: } 6242: template > 6242: class time_put; 6242: template > 6242: class time_put_byname; 6242: 6242: 6242: class money_base; 6242: namespace __cxx11 { 6242: template > 6242: class money_get; 6242: template > 6242: class money_put; 6242: } 6242: namespace __cxx11 { 6242: template 6242: class moneypunct; 6242: template 6242: class moneypunct_byname; 6242: } 6242: 6242: 6242: class messages_base; 6242: namespace __cxx11 { 6242: template 6242: class messages; 6242: template 6242: class messages_byname; 6242: } 6242: 6242: 6242: } 6242: # 42 "/usr/include/c++/8/ios" 2 3 6242: # 1 "/usr/include/c++/8/bits/ios_base.h" 1 3 6242: # 37 "/usr/include/c++/8/bits/ios_base.h" 3 6242: 6242: # 38 "/usr/include/c++/8/bits/ios_base.h" 3 6242: 6242: # 1 "/usr/include/c++/8/ext/atomicity.h" 1 3 6242: # 32 "/usr/include/c++/8/ext/atomicity.h" 3 6242: 6242: # 33 "/usr/include/c++/8/ext/atomicity.h" 3 6242: 6242: 6242: # 1 "/usr/include/s390x-linux-gnu/c++/8/bits/gthr.h" 1 3 6242: # 30 "/usr/include/s390x-linux-gnu/c++/8/bits/gthr.h" 3 6242: #pragma GCC visibility push(default) 6242: # 148 "/usr/include/s390x-linux-gnu/c++/8/bits/gthr.h" 3 6242: # 1 "/usr/include/s390x-linux-gnu/c++/8/bits/gthr-default.h" 1 3 6242: # 35 "/usr/include/s390x-linux-gnu/c++/8/bits/gthr-default.h" 3 6242: # 1 "/usr/include/pthread.h" 1 3 4 6242: # 23 "/usr/include/pthread.h" 3 4 6242: # 1 "/usr/include/sched.h" 1 3 4 6242: # 29 "/usr/include/sched.h" 3 4 6242: # 1 "/usr/lib/gcc/s390x-linux-gnu/8/include/stddef.h" 1 3 4 6242: # 30 "/usr/include/sched.h" 2 3 4 6242: 6242: # 1 "/usr/include/s390x-linux-gnu/bits/types/time_t.h" 1 3 4 6242: 6242: 6242: 6242: 6242: 6242: 6242: typedef __time_t time_t; 6242: # 32 "/usr/include/sched.h" 2 3 4 6242: # 1 "/usr/include/s390x-linux-gnu/bits/types/struct_timespec.h" 1 3 4 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: struct timespec 6242: { 6242: __time_t tv_sec; 6242: __syscall_slong_t tv_nsec; 6242: }; 6242: # 33 "/usr/include/sched.h" 2 3 4 6242: 6242: 6242: 6242: 6242: 6242: typedef __pid_t pid_t; 6242: 6242: 6242: 6242: 6242: # 1 "/usr/include/s390x-linux-gnu/bits/sched.h" 1 3 4 6242: # 75 "/usr/include/s390x-linux-gnu/bits/sched.h" 3 4 6242: struct sched_param 6242: { 6242: int sched_priority; 6242: }; 6242: 6242: extern "C" { 6242: 6242: 6242: 6242: extern int clone (int (*__fn) (void *__arg), void *__child_stack, 6242: int __flags, void *__arg, ...) throw (); 6242: 6242: 6242: extern int unshare (int __flags) throw (); 6242: 6242: 6242: extern int sched_getcpu (void) throw (); 6242: 6242: 6242: extern int setns (int __fd, int __nstype) throw (); 6242: 6242: 6242: } 6242: # 44 "/usr/include/sched.h" 2 3 4 6242: # 1 "/usr/include/s390x-linux-gnu/bits/cpu-set.h" 1 3 4 6242: # 32 "/usr/include/s390x-linux-gnu/bits/cpu-set.h" 3 4 6242: typedef unsigned long int __cpu_mask; 6242: 6242: 6242: 6242: 6242: 6242: 6242: typedef struct 6242: { 6242: __cpu_mask __bits[1024 / (8 * sizeof (__cpu_mask))]; 6242: } cpu_set_t; 6242: # 115 "/usr/include/s390x-linux-gnu/bits/cpu-set.h" 3 4 6242: extern "C" { 6242: 6242: extern int __sched_cpucount (size_t __setsize, const cpu_set_t *__setp) 6242: throw (); 6242: extern cpu_set_t *__sched_cpualloc (size_t __count) throw () __attribute__ ((__warn_unused_result__)); 6242: extern void __sched_cpufree (cpu_set_t *__set) throw (); 6242: 6242: } 6242: # 45 "/usr/include/sched.h" 2 3 4 6242: 6242: 6242: 6242: 6242: 6242: 6242: extern "C" { 6242: 6242: 6242: extern int sched_setparam (__pid_t __pid, const struct sched_param *__param) 6242: throw (); 6242: 6242: 6242: extern int sched_getparam (__pid_t __pid, struct sched_param *__param) throw (); 6242: 6242: 6242: extern int sched_setscheduler (__pid_t __pid, int __policy, 6242: const struct sched_param *__param) throw (); 6242: 6242: 6242: extern int sched_getscheduler (__pid_t __pid) throw (); 6242: 6242: 6242: extern int sched_yield (void) throw (); 6242: 6242: 6242: extern int sched_get_priority_max (int __algorithm) throw (); 6242: 6242: 6242: extern int sched_get_priority_min (int __algorithm) throw (); 6242: 6242: 6242: extern int sched_rr_get_interval (__pid_t __pid, struct timespec *__t) throw (); 6242: # 121 "/usr/include/sched.h" 3 4 6242: extern int sched_setaffinity (__pid_t __pid, size_t __cpusetsize, 6242: const cpu_set_t *__cpuset) throw (); 6242: 6242: 6242: extern int sched_getaffinity (__pid_t __pid, size_t __cpusetsize, 6242: cpu_set_t *__cpuset) throw (); 6242: 6242: 6242: } 6242: # 24 "/usr/include/pthread.h" 2 3 4 6242: # 1 "/usr/include/time.h" 1 3 4 6242: # 29 "/usr/include/time.h" 3 4 6242: # 1 "/usr/lib/gcc/s390x-linux-gnu/8/include/stddef.h" 1 3 4 6242: # 30 "/usr/include/time.h" 2 3 4 6242: 6242: 6242: 6242: # 1 "/usr/include/s390x-linux-gnu/bits/time.h" 1 3 4 6242: # 73 "/usr/include/s390x-linux-gnu/bits/time.h" 3 4 6242: # 1 "/usr/include/s390x-linux-gnu/bits/timex.h" 1 3 4 6242: # 22 "/usr/include/s390x-linux-gnu/bits/timex.h" 3 4 6242: # 1 "/usr/include/s390x-linux-gnu/bits/types/struct_timeval.h" 1 3 4 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: struct timeval 6242: { 6242: __time_t tv_sec; 6242: __suseconds_t tv_usec; 6242: }; 6242: # 23 "/usr/include/s390x-linux-gnu/bits/timex.h" 2 3 4 6242: 6242: 6242: 6242: struct timex 6242: { 6242: unsigned int modes; 6242: __syscall_slong_t offset; 6242: __syscall_slong_t freq; 6242: __syscall_slong_t maxerror; 6242: __syscall_slong_t esterror; 6242: int status; 6242: __syscall_slong_t constant; 6242: __syscall_slong_t precision; 6242: __syscall_slong_t tolerance; 6242: struct timeval time; 6242: __syscall_slong_t tick; 6242: __syscall_slong_t ppsfreq; 6242: __syscall_slong_t jitter; 6242: int shift; 6242: __syscall_slong_t stabil; 6242: __syscall_slong_t jitcnt; 6242: __syscall_slong_t calcnt; 6242: __syscall_slong_t errcnt; 6242: __syscall_slong_t stbcnt; 6242: 6242: int tai; 6242: 6242: 6242: int :32; int :32; int :32; int :32; 6242: int :32; int :32; int :32; int :32; 6242: int :32; int :32; int :32; 6242: }; 6242: # 74 "/usr/include/s390x-linux-gnu/bits/time.h" 2 3 4 6242: 6242: extern "C" { 6242: 6242: 6242: extern int clock_adjtime (__clockid_t __clock_id, struct timex *__utx) throw (); 6242: 6242: } 6242: # 34 "/usr/include/time.h" 2 3 4 6242: 6242: 6242: 6242: # 1 "/usr/include/s390x-linux-gnu/bits/types/clock_t.h" 1 3 4 6242: 6242: 6242: 6242: 6242: 6242: 6242: typedef __clock_t clock_t; 6242: # 38 "/usr/include/time.h" 2 3 4 6242: 6242: # 1 "/usr/include/s390x-linux-gnu/bits/types/struct_tm.h" 1 3 4 6242: 6242: 6242: 6242: 6242: 6242: 6242: struct tm 6242: { 6242: int tm_sec; 6242: int tm_min; 6242: int tm_hour; 6242: int tm_mday; 6242: int tm_mon; 6242: int tm_year; 6242: int tm_wday; 6242: int tm_yday; 6242: int tm_isdst; 6242: 6242: 6242: long int tm_gmtoff; 6242: const char *tm_zone; 6242: 6242: 6242: 6242: 6242: }; 6242: # 40 "/usr/include/time.h" 2 3 4 6242: 6242: 6242: 6242: 6242: 6242: 6242: # 1 "/usr/include/s390x-linux-gnu/bits/types/clockid_t.h" 1 3 4 6242: 6242: 6242: 6242: 6242: 6242: 6242: typedef __clockid_t clockid_t; 6242: # 47 "/usr/include/time.h" 2 3 4 6242: # 1 "/usr/include/s390x-linux-gnu/bits/types/timer_t.h" 1 3 4 6242: 6242: 6242: 6242: 6242: 6242: 6242: typedef __timer_t timer_t; 6242: # 48 "/usr/include/time.h" 2 3 4 6242: # 1 "/usr/include/s390x-linux-gnu/bits/types/struct_itimerspec.h" 1 3 4 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: struct itimerspec 6242: { 6242: struct timespec it_interval; 6242: struct timespec it_value; 6242: }; 6242: # 49 "/usr/include/time.h" 2 3 4 6242: struct sigevent; 6242: # 68 "/usr/include/time.h" 3 4 6242: extern "C" { 6242: 6242: 6242: 6242: extern clock_t clock (void) throw (); 6242: 6242: 6242: extern time_t time (time_t *__timer) throw (); 6242: 6242: 6242: extern double difftime (time_t __time1, time_t __time0) 6242: throw () __attribute__ ((__const__)); 6242: 6242: 6242: extern time_t mktime (struct tm *__tp) throw (); 6242: 6242: 6242: 6242: 6242: 6242: extern size_t strftime (char *__restrict __s, size_t __maxsize, 6242: const char *__restrict __format, 6242: const struct tm *__restrict __tp) throw (); 6242: 6242: 6242: 6242: 6242: extern char *strptime (const char *__restrict __s, 6242: const char *__restrict __fmt, struct tm *__tp) 6242: throw (); 6242: 6242: 6242: 6242: 6242: 6242: 6242: extern size_t strftime_l (char *__restrict __s, size_t __maxsize, 6242: const char *__restrict __format, 6242: const struct tm *__restrict __tp, 6242: locale_t __loc) throw (); 6242: 6242: 6242: 6242: extern char *strptime_l (const char *__restrict __s, 6242: const char *__restrict __fmt, struct tm *__tp, 6242: locale_t __loc) throw (); 6242: 6242: 6242: 6242: 6242: 6242: extern struct tm *gmtime (const time_t *__timer) throw (); 6242: 6242: 6242: 6242: extern struct tm *localtime (const time_t *__timer) throw (); 6242: 6242: 6242: 6242: 6242: extern struct tm *gmtime_r (const time_t *__restrict __timer, 6242: struct tm *__restrict __tp) throw (); 6242: 6242: 6242: 6242: extern struct tm *localtime_r (const time_t *__restrict __timer, 6242: struct tm *__restrict __tp) throw (); 6242: 6242: 6242: 6242: 6242: extern char *asctime (const struct tm *__tp) throw (); 6242: 6242: 6242: extern char *ctime (const time_t *__timer) throw (); 6242: 6242: 6242: 6242: 6242: 6242: 6242: extern char *asctime_r (const struct tm *__restrict __tp, 6242: char *__restrict __buf) throw (); 6242: 6242: 6242: extern char *ctime_r (const time_t *__restrict __timer, 6242: char *__restrict __buf) throw (); 6242: 6242: 6242: 6242: 6242: extern char *__tzname[2]; 6242: extern int __daylight; 6242: extern long int __timezone; 6242: 6242: 6242: 6242: 6242: extern char *tzname[2]; 6242: 6242: 6242: 6242: extern void tzset (void) throw (); 6242: 6242: 6242: 6242: extern int daylight; 6242: extern long int timezone; 6242: 6242: 6242: 6242: 6242: 6242: extern int stime (const time_t *__when) throw (); 6242: # 196 "/usr/include/time.h" 3 4 6242: extern time_t timegm (struct tm *__tp) throw (); 6242: 6242: 6242: extern time_t timelocal (struct tm *__tp) throw (); 6242: 6242: 6242: extern int dysize (int __year) throw () __attribute__ ((__const__)); 6242: # 211 "/usr/include/time.h" 3 4 6242: extern int nanosleep (const struct timespec *__requested_time, 6242: struct timespec *__remaining); 6242: 6242: 6242: 6242: extern int clock_getres (clockid_t __clock_id, struct timespec *__res) throw (); 6242: 6242: 6242: extern int clock_gettime (clockid_t __clock_id, struct timespec *__tp) throw (); 6242: 6242: 6242: extern int clock_settime (clockid_t __clock_id, const struct timespec *__tp) 6242: throw (); 6242: 6242: 6242: 6242: 6242: 6242: 6242: extern int clock_nanosleep (clockid_t __clock_id, int __flags, 6242: const struct timespec *__req, 6242: struct timespec *__rem); 6242: 6242: 6242: extern int clock_getcpuclockid (pid_t __pid, clockid_t *__clock_id) throw (); 6242: 6242: 6242: 6242: 6242: extern int timer_create (clockid_t __clock_id, 6242: struct sigevent *__restrict __evp, 6242: timer_t *__restrict __timerid) throw (); 6242: 6242: 6242: extern int timer_delete (timer_t __timerid) throw (); 6242: 6242: 6242: extern int timer_settime (timer_t __timerid, int __flags, 6242: const struct itimerspec *__restrict __value, 6242: struct itimerspec *__restrict __ovalue) throw (); 6242: 6242: 6242: extern int timer_gettime (timer_t __timerid, struct itimerspec *__value) 6242: throw (); 6242: 6242: 6242: extern int timer_getoverrun (timer_t __timerid) throw (); 6242: 6242: 6242: 6242: 6242: 6242: extern int timespec_get (struct timespec *__ts, int __base) 6242: throw () __attribute__ ((__nonnull__ (1))); 6242: # 280 "/usr/include/time.h" 3 4 6242: extern int getdate_err; 6242: # 289 "/usr/include/time.h" 3 4 6242: extern struct tm *getdate (const char *__string); 6242: # 303 "/usr/include/time.h" 3 4 6242: extern int getdate_r (const char *__restrict __string, 6242: struct tm *__restrict __resbufp); 6242: 6242: 6242: } 6242: # 25 "/usr/include/pthread.h" 2 3 4 6242: 6242: # 1 "/usr/include/s390x-linux-gnu/bits/pthreadtypes.h" 1 3 4 6242: # 23 "/usr/include/s390x-linux-gnu/bits/pthreadtypes.h" 3 4 6242: # 1 "/usr/include/s390x-linux-gnu/bits/thread-shared-types.h" 1 3 4 6242: # 58 "/usr/include/s390x-linux-gnu/bits/thread-shared-types.h" 3 4 6242: # 1 "/usr/include/s390x-linux-gnu/bits/pthreadtypes-arch.h" 1 3 4 6242: # 21 "/usr/include/s390x-linux-gnu/bits/pthreadtypes-arch.h" 3 4 6242: # 1 "/usr/include/s390x-linux-gnu/bits/wordsize.h" 1 3 4 6242: # 22 "/usr/include/s390x-linux-gnu/bits/pthreadtypes-arch.h" 2 3 4 6242: # 52 "/usr/include/s390x-linux-gnu/bits/pthreadtypes-arch.h" 3 4 6242: struct __pthread_rwlock_arch_t 6242: { 6242: unsigned int __readers; 6242: unsigned int __writers; 6242: unsigned int __wrphase_futex; 6242: unsigned int __writers_futex; 6242: unsigned int __pad3; 6242: unsigned int __pad4; 6242: 6242: int __cur_writer; 6242: int __shared; 6242: unsigned long int __pad1; 6242: unsigned long int __pad2; 6242: 6242: 6242: unsigned int __flags; 6242: # 77 "/usr/include/s390x-linux-gnu/bits/pthreadtypes-arch.h" 3 4 6242: }; 6242: # 59 "/usr/include/s390x-linux-gnu/bits/thread-shared-types.h" 2 3 4 6242: 6242: 6242: 6242: 6242: typedef struct __pthread_internal_list 6242: { 6242: struct __pthread_internal_list *__prev; 6242: struct __pthread_internal_list *__next; 6242: } __pthread_list_t; 6242: # 99 "/usr/include/s390x-linux-gnu/bits/thread-shared-types.h" 3 4 6242: struct __pthread_mutex_s 6242: { 6242: int __lock ; 6242: unsigned int __count; 6242: int __owner; 6242: 6242: unsigned int __nusers; 6242: 6242: 6242: 6242: int __kind; 6242: 6242: 6242: int __spins; 6242: __pthread_list_t __list; 6242: # 123 "/usr/include/s390x-linux-gnu/bits/thread-shared-types.h" 3 4 6242: 6242: }; 6242: 6242: 6242: 6242: 6242: struct __pthread_cond_s 6242: { 6242: __extension__ union 6242: { 6242: __extension__ unsigned long long int __wseq; 6242: struct 6242: { 6242: unsigned int __low; 6242: unsigned int __high; 6242: } __wseq32; 6242: }; 6242: __extension__ union 6242: { 6242: __extension__ unsigned long long int __g1_start; 6242: struct 6242: { 6242: unsigned int __low; 6242: unsigned int __high; 6242: } __g1_start32; 6242: }; 6242: unsigned int __g_refs[2] ; 6242: unsigned int __g_size[2]; 6242: unsigned int __g1_orig_size; 6242: unsigned int __wrefs; 6242: unsigned int __g_signals[2]; 6242: }; 6242: # 24 "/usr/include/s390x-linux-gnu/bits/pthreadtypes.h" 2 3 4 6242: 6242: 6242: 6242: typedef unsigned long int pthread_t; 6242: 6242: 6242: 6242: 6242: typedef union 6242: { 6242: char __size[4]; 6242: int __align; 6242: } pthread_mutexattr_t; 6242: 6242: 6242: 6242: 6242: typedef union 6242: { 6242: char __size[4]; 6242: int __align; 6242: } pthread_condattr_t; 6242: 6242: 6242: 6242: typedef unsigned int pthread_key_t; 6242: 6242: 6242: 6242: typedef int pthread_once_t; 6242: 6242: 6242: union pthread_attr_t 6242: { 6242: char __size[56]; 6242: long int __align; 6242: }; 6242: 6242: typedef union pthread_attr_t pthread_attr_t; 6242: 6242: 6242: 6242: 6242: typedef union 6242: { 6242: struct __pthread_mutex_s __data; 6242: char __size[40]; 6242: long int __align; 6242: } pthread_mutex_t; 6242: 6242: 6242: typedef union 6242: { 6242: struct __pthread_cond_s __data; 6242: char __size[48]; 6242: __extension__ long long int __align; 6242: } pthread_cond_t; 6242: 6242: 6242: 6242: 6242: 6242: typedef union 6242: { 6242: struct __pthread_rwlock_arch_t __data; 6242: char __size[56]; 6242: long int __align; 6242: } pthread_rwlock_t; 6242: 6242: typedef union 6242: { 6242: char __size[8]; 6242: long int __align; 6242: } pthread_rwlockattr_t; 6242: 6242: 6242: 6242: 6242: 6242: typedef volatile int pthread_spinlock_t; 6242: 6242: 6242: 6242: 6242: typedef union 6242: { 6242: char __size[32]; 6242: long int __align; 6242: } pthread_barrier_t; 6242: 6242: typedef union 6242: { 6242: char __size[4]; 6242: int __align; 6242: } pthread_barrierattr_t; 6242: # 27 "/usr/include/pthread.h" 2 3 4 6242: # 1 "/usr/include/s390x-linux-gnu/bits/setjmp.h" 1 3 4 6242: # 27 "/usr/include/s390x-linux-gnu/bits/setjmp.h" 3 4 6242: # 1 "/usr/include/s390x-linux-gnu/bits/wordsize.h" 1 3 4 6242: # 28 "/usr/include/s390x-linux-gnu/bits/setjmp.h" 2 3 4 6242: 6242: 6242: 6242: typedef struct __s390_jmp_buf 6242: { 6242: 6242: long int __gregs[10]; 6242: 6242: 6242: 6242: long __fpregs[8]; 6242: 6242: 6242: 6242: 6242: } __jmp_buf[1]; 6242: # 28 "/usr/include/pthread.h" 2 3 4 6242: # 1 "/usr/include/s390x-linux-gnu/bits/wordsize.h" 1 3 4 6242: # 29 "/usr/include/pthread.h" 2 3 4 6242: 6242: 6242: 6242: 6242: enum 6242: { 6242: PTHREAD_CREATE_JOINABLE, 6242: 6242: PTHREAD_CREATE_DETACHED 6242: 6242: }; 6242: 6242: 6242: 6242: enum 6242: { 6242: PTHREAD_MUTEX_TIMED_NP, 6242: PTHREAD_MUTEX_RECURSIVE_NP, 6242: PTHREAD_MUTEX_ERRORCHECK_NP, 6242: PTHREAD_MUTEX_ADAPTIVE_NP 6242: 6242: , 6242: PTHREAD_MUTEX_NORMAL = PTHREAD_MUTEX_TIMED_NP, 6242: PTHREAD_MUTEX_RECURSIVE = PTHREAD_MUTEX_RECURSIVE_NP, 6242: PTHREAD_MUTEX_ERRORCHECK = PTHREAD_MUTEX_ERRORCHECK_NP, 6242: PTHREAD_MUTEX_DEFAULT = PTHREAD_MUTEX_NORMAL 6242: 6242: 6242: 6242: , PTHREAD_MUTEX_FAST_NP = PTHREAD_MUTEX_TIMED_NP 6242: 6242: }; 6242: 6242: 6242: 6242: 6242: enum 6242: { 6242: PTHREAD_MUTEX_STALLED, 6242: PTHREAD_MUTEX_STALLED_NP = PTHREAD_MUTEX_STALLED, 6242: PTHREAD_MUTEX_ROBUST, 6242: PTHREAD_MUTEX_ROBUST_NP = PTHREAD_MUTEX_ROBUST 6242: }; 6242: 6242: 6242: 6242: 6242: 6242: enum 6242: { 6242: PTHREAD_PRIO_NONE, 6242: PTHREAD_PRIO_INHERIT, 6242: PTHREAD_PRIO_PROTECT 6242: }; 6242: # 115 "/usr/include/pthread.h" 3 4 6242: enum 6242: { 6242: PTHREAD_RWLOCK_PREFER_READER_NP, 6242: PTHREAD_RWLOCK_PREFER_WRITER_NP, 6242: PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP, 6242: PTHREAD_RWLOCK_DEFAULT_NP = PTHREAD_RWLOCK_PREFER_READER_NP 6242: }; 6242: # 156 "/usr/include/pthread.h" 3 4 6242: enum 6242: { 6242: PTHREAD_INHERIT_SCHED, 6242: 6242: PTHREAD_EXPLICIT_SCHED 6242: 6242: }; 6242: 6242: 6242: 6242: enum 6242: { 6242: PTHREAD_SCOPE_SYSTEM, 6242: 6242: PTHREAD_SCOPE_PROCESS 6242: 6242: }; 6242: 6242: 6242: 6242: enum 6242: { 6242: PTHREAD_PROCESS_PRIVATE, 6242: 6242: PTHREAD_PROCESS_SHARED 6242: 6242: }; 6242: # 191 "/usr/include/pthread.h" 3 4 6242: struct _pthread_cleanup_buffer 6242: { 6242: void (*__routine) (void *); 6242: void *__arg; 6242: int __canceltype; 6242: struct _pthread_cleanup_buffer *__prev; 6242: }; 6242: 6242: 6242: enum 6242: { 6242: PTHREAD_CANCEL_ENABLE, 6242: 6242: PTHREAD_CANCEL_DISABLE 6242: 6242: }; 6242: enum 6242: { 6242: PTHREAD_CANCEL_DEFERRED, 6242: 6242: PTHREAD_CANCEL_ASYNCHRONOUS 6242: 6242: }; 6242: # 229 "/usr/include/pthread.h" 3 4 6242: extern "C" { 6242: 6242: 6242: 6242: 6242: extern int pthread_create (pthread_t *__restrict __newthread, 6242: const pthread_attr_t *__restrict __attr, 6242: void *(*__start_routine) (void *), 6242: void *__restrict __arg) throw () __attribute__ ((__nonnull__ (1, 3))); 6242: 6242: 6242: 6242: 6242: 6242: extern void pthread_exit (void *__retval) __attribute__ ((__noreturn__)); 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: extern int pthread_join (pthread_t __th, void **__thread_return); 6242: 6242: 6242: 6242: 6242: extern int pthread_tryjoin_np (pthread_t __th, void **__thread_return) throw (); 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: extern int pthread_timedjoin_np (pthread_t __th, void **__thread_return, 6242: const struct timespec *__abstime); 6242: 6242: 6242: 6242: 6242: 6242: 6242: extern int pthread_detach (pthread_t __th) throw (); 6242: 6242: 6242: 6242: extern pthread_t pthread_self (void) throw () __attribute__ ((__const__)); 6242: 6242: 6242: extern int pthread_equal (pthread_t __thread1, pthread_t __thread2) 6242: throw () __attribute__ ((__const__)); 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: extern int pthread_attr_init (pthread_attr_t *__attr) throw () __attribute__ ((__nonnull__ (1))); 6242: 6242: 6242: extern int pthread_attr_destroy (pthread_attr_t *__attr) 6242: throw () __attribute__ ((__nonnull__ (1))); 6242: 6242: 6242: extern int pthread_attr_getdetachstate (const pthread_attr_t *__attr, 6242: int *__detachstate) 6242: throw () __attribute__ ((__nonnull__ (1, 2))); 6242: 6242: 6242: extern int pthread_attr_setdetachstate (pthread_attr_t *__attr, 6242: int __detachstate) 6242: throw () __attribute__ ((__nonnull__ (1))); 6242: 6242: 6242: 6242: extern int pthread_attr_getguardsize (const pthread_attr_t *__attr, 6242: size_t *__guardsize) 6242: throw () __attribute__ ((__nonnull__ (1, 2))); 6242: 6242: 6242: extern int pthread_attr_setguardsize (pthread_attr_t *__attr, 6242: size_t __guardsize) 6242: throw () __attribute__ ((__nonnull__ (1))); 6242: 6242: 6242: 6242: extern int pthread_attr_getschedparam (const pthread_attr_t *__restrict __attr, 6242: struct sched_param *__restrict __param) 6242: throw () __attribute__ ((__nonnull__ (1, 2))); 6242: 6242: 6242: extern int pthread_attr_setschedparam (pthread_attr_t *__restrict __attr, 6242: const struct sched_param *__restrict 6242: __param) throw () __attribute__ ((__nonnull__ (1, 2))); 6242: 6242: 6242: extern int pthread_attr_getschedpolicy (const pthread_attr_t *__restrict 6242: __attr, int *__restrict __policy) 6242: throw () __attribute__ ((__nonnull__ (1, 2))); 6242: 6242: 6242: extern int pthread_attr_setschedpolicy (pthread_attr_t *__attr, int __policy) 6242: throw () __attribute__ ((__nonnull__ (1))); 6242: 6242: 6242: extern int pthread_attr_getinheritsched (const pthread_attr_t *__restrict 6242: __attr, int *__restrict __inherit) 6242: throw () __attribute__ ((__nonnull__ (1, 2))); 6242: 6242: 6242: extern int pthread_attr_setinheritsched (pthread_attr_t *__attr, 6242: int __inherit) 6242: throw () __attribute__ ((__nonnull__ (1))); 6242: 6242: 6242: 6242: extern int pthread_attr_getscope (const pthread_attr_t *__restrict __attr, 6242: int *__restrict __scope) 6242: throw () __attribute__ ((__nonnull__ (1, 2))); 6242: 6242: 6242: extern int pthread_attr_setscope (pthread_attr_t *__attr, int __scope) 6242: throw () __attribute__ ((__nonnull__ (1))); 6242: 6242: 6242: extern int pthread_attr_getstackaddr (const pthread_attr_t *__restrict 6242: __attr, void **__restrict __stackaddr) 6242: throw () __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__deprecated__)); 6242: 6242: 6242: 6242: 6242: 6242: extern int pthread_attr_setstackaddr (pthread_attr_t *__attr, 6242: void *__stackaddr) 6242: throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__deprecated__)); 6242: 6242: 6242: extern int pthread_attr_getstacksize (const pthread_attr_t *__restrict 6242: __attr, size_t *__restrict __stacksize) 6242: throw () __attribute__ ((__nonnull__ (1, 2))); 6242: 6242: 6242: 6242: 6242: extern int pthread_attr_setstacksize (pthread_attr_t *__attr, 6242: size_t __stacksize) 6242: throw () __attribute__ ((__nonnull__ (1))); 6242: 6242: 6242: 6242: extern int pthread_attr_getstack (const pthread_attr_t *__restrict __attr, 6242: void **__restrict __stackaddr, 6242: size_t *__restrict __stacksize) 6242: throw () __attribute__ ((__nonnull__ (1, 2, 3))); 6242: 6242: 6242: 6242: 6242: extern int pthread_attr_setstack (pthread_attr_t *__attr, void *__stackaddr, 6242: size_t __stacksize) throw () __attribute__ ((__nonnull__ (1))); 6242: 6242: 6242: 6242: 6242: 6242: extern int pthread_attr_setaffinity_np (pthread_attr_t *__attr, 6242: size_t __cpusetsize, 6242: const cpu_set_t *__cpuset) 6242: throw () __attribute__ ((__nonnull__ (1, 3))); 6242: 6242: 6242: 6242: extern int pthread_attr_getaffinity_np (const pthread_attr_t *__attr, 6242: size_t __cpusetsize, 6242: cpu_set_t *__cpuset) 6242: throw () __attribute__ ((__nonnull__ (1, 3))); 6242: 6242: 6242: extern int pthread_getattr_default_np (pthread_attr_t *__attr) 6242: throw () __attribute__ ((__nonnull__ (1))); 6242: 6242: 6242: 6242: extern int pthread_setattr_default_np (const pthread_attr_t *__attr) 6242: throw () __attribute__ ((__nonnull__ (1))); 6242: 6242: 6242: 6242: 6242: extern int pthread_getattr_np (pthread_t __th, pthread_attr_t *__attr) 6242: throw () __attribute__ ((__nonnull__ (2))); 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: extern int pthread_setschedparam (pthread_t __target_thread, int __policy, 6242: const struct sched_param *__param) 6242: throw () __attribute__ ((__nonnull__ (3))); 6242: 6242: 6242: extern int pthread_getschedparam (pthread_t __target_thread, 6242: int *__restrict __policy, 6242: struct sched_param *__restrict __param) 6242: throw () __attribute__ ((__nonnull__ (2, 3))); 6242: 6242: 6242: extern int pthread_setschedprio (pthread_t __target_thread, int __prio) 6242: throw (); 6242: 6242: 6242: 6242: 6242: extern int pthread_getname_np (pthread_t __target_thread, char *__buf, 6242: size_t __buflen) 6242: throw () __attribute__ ((__nonnull__ (2))); 6242: 6242: 6242: extern int pthread_setname_np (pthread_t __target_thread, const char *__name) 6242: throw () __attribute__ ((__nonnull__ (2))); 6242: 6242: 6242: 6242: 6242: 6242: extern int pthread_getconcurrency (void) throw (); 6242: 6242: 6242: extern int pthread_setconcurrency (int __level) throw (); 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: extern int pthread_yield (void) throw (); 6242: 6242: 6242: 6242: 6242: extern int pthread_setaffinity_np (pthread_t __th, size_t __cpusetsize, 6242: const cpu_set_t *__cpuset) 6242: throw () __attribute__ ((__nonnull__ (3))); 6242: 6242: 6242: extern int pthread_getaffinity_np (pthread_t __th, size_t __cpusetsize, 6242: cpu_set_t *__cpuset) 6242: throw () __attribute__ ((__nonnull__ (3))); 6242: # 495 "/usr/include/pthread.h" 3 4 6242: extern int pthread_once (pthread_once_t *__once_control, 6242: void (*__init_routine) (void)) __attribute__ ((__nonnull__ (1, 2))); 6242: # 507 "/usr/include/pthread.h" 3 4 6242: extern int pthread_setcancelstate (int __state, int *__oldstate); 6242: 6242: 6242: 6242: extern int pthread_setcanceltype (int __type, int *__oldtype); 6242: 6242: 6242: extern int pthread_cancel (pthread_t __th); 6242: 6242: 6242: 6242: 6242: extern void pthread_testcancel (void); 6242: 6242: 6242: 6242: 6242: typedef struct 6242: { 6242: struct 6242: { 6242: __jmp_buf __cancel_jmp_buf; 6242: int __mask_was_saved; 6242: } __cancel_jmp_buf[1]; 6242: void *__pad[4]; 6242: } __pthread_unwind_buf_t __attribute__ ((__aligned__)); 6242: # 541 "/usr/include/pthread.h" 3 4 6242: struct __pthread_cleanup_frame 6242: { 6242: void (*__cancel_routine) (void *); 6242: void *__cancel_arg; 6242: int __do_it; 6242: int __cancel_type; 6242: }; 6242: 6242: 6242: 6242: 6242: class __pthread_cleanup_class 6242: { 6242: void (*__cancel_routine) (void *); 6242: void *__cancel_arg; 6242: int __do_it; 6242: int __cancel_type; 6242: 6242: public: 6242: __pthread_cleanup_class (void (*__fct) (void *), void *__arg) 6242: : __cancel_routine (__fct), __cancel_arg (__arg), __do_it (1) { } 6242: ~__pthread_cleanup_class () { if (__do_it) __cancel_routine (__cancel_arg); } 6242: void __setdoit (int __newval) { __do_it = __newval; } 6242: void __defer () { pthread_setcanceltype (PTHREAD_CANCEL_DEFERRED, 6242: &__cancel_type); } 6242: void __restore () const { pthread_setcanceltype (__cancel_type, 0); } 6242: }; 6242: # 743 "/usr/include/pthread.h" 3 4 6242: struct __jmp_buf_tag; 6242: extern int __sigsetjmp (struct __jmp_buf_tag *__env, int __savemask) throw (); 6242: 6242: 6242: 6242: 6242: 6242: extern int pthread_mutex_init (pthread_mutex_t *__mutex, 6242: const pthread_mutexattr_t *__mutexattr) 6242: throw () __attribute__ ((__nonnull__ (1))); 6242: 6242: 6242: extern int pthread_mutex_destroy (pthread_mutex_t *__mutex) 6242: throw () __attribute__ ((__nonnull__ (1))); 6242: 6242: 6242: extern int pthread_mutex_trylock (pthread_mutex_t *__mutex) 6242: throw () __attribute__ ((__nonnull__ (1))); 6242: 6242: 6242: extern int pthread_mutex_lock (pthread_mutex_t *__mutex) 6242: throw () __attribute__ ((__nonnull__ (1))); 6242: 6242: 6242: 6242: extern int pthread_mutex_timedlock (pthread_mutex_t *__restrict __mutex, 6242: const struct timespec *__restrict 6242: __abstime) throw () __attribute__ ((__nonnull__ (1, 2))); 6242: 6242: 6242: 6242: extern int pthread_mutex_unlock (pthread_mutex_t *__mutex) 6242: throw () __attribute__ ((__nonnull__ (1))); 6242: 6242: 6242: 6242: extern int pthread_mutex_getprioceiling (const pthread_mutex_t * 6242: __restrict __mutex, 6242: int *__restrict __prioceiling) 6242: throw () __attribute__ ((__nonnull__ (1, 2))); 6242: 6242: 6242: 6242: extern int pthread_mutex_setprioceiling (pthread_mutex_t *__restrict __mutex, 6242: int __prioceiling, 6242: int *__restrict __old_ceiling) 6242: throw () __attribute__ ((__nonnull__ (1, 3))); 6242: 6242: 6242: 6242: 6242: extern int pthread_mutex_consistent (pthread_mutex_t *__mutex) 6242: throw () __attribute__ ((__nonnull__ (1))); 6242: 6242: extern int pthread_mutex_consistent_np (pthread_mutex_t *__mutex) 6242: throw () __attribute__ ((__nonnull__ (1))); 6242: # 807 "/usr/include/pthread.h" 3 4 6242: extern int pthread_mutexattr_init (pthread_mutexattr_t *__attr) 6242: throw () __attribute__ ((__nonnull__ (1))); 6242: 6242: 6242: extern int pthread_mutexattr_destroy (pthread_mutexattr_t *__attr) 6242: throw () __attribute__ ((__nonnull__ (1))); 6242: 6242: 6242: extern int pthread_mutexattr_getpshared (const pthread_mutexattr_t * 6242: __restrict __attr, 6242: int *__restrict __pshared) 6242: throw () __attribute__ ((__nonnull__ (1, 2))); 6242: 6242: 6242: extern int pthread_mutexattr_setpshared (pthread_mutexattr_t *__attr, 6242: int __pshared) 6242: throw () __attribute__ ((__nonnull__ (1))); 6242: 6242: 6242: 6242: extern int pthread_mutexattr_gettype (const pthread_mutexattr_t *__restrict 6242: __attr, int *__restrict __kind) 6242: throw () __attribute__ ((__nonnull__ (1, 2))); 6242: 6242: 6242: 6242: 6242: extern int pthread_mutexattr_settype (pthread_mutexattr_t *__attr, int __kind) 6242: throw () __attribute__ ((__nonnull__ (1))); 6242: 6242: 6242: 6242: extern int pthread_mutexattr_getprotocol (const pthread_mutexattr_t * 6242: __restrict __attr, 6242: int *__restrict __protocol) 6242: throw () __attribute__ ((__nonnull__ (1, 2))); 6242: 6242: 6242: 6242: extern int pthread_mutexattr_setprotocol (pthread_mutexattr_t *__attr, 6242: int __protocol) 6242: throw () __attribute__ ((__nonnull__ (1))); 6242: 6242: 6242: extern int pthread_mutexattr_getprioceiling (const pthread_mutexattr_t * 6242: __restrict __attr, 6242: int *__restrict __prioceiling) 6242: throw () __attribute__ ((__nonnull__ (1, 2))); 6242: 6242: 6242: extern int pthread_mutexattr_setprioceiling (pthread_mutexattr_t *__attr, 6242: int __prioceiling) 6242: throw () __attribute__ ((__nonnull__ (1))); 6242: 6242: 6242: 6242: extern int pthread_mutexattr_getrobust (const pthread_mutexattr_t *__attr, 6242: int *__robustness) 6242: throw () __attribute__ ((__nonnull__ (1, 2))); 6242: 6242: extern int pthread_mutexattr_getrobust_np (const pthread_mutexattr_t *__attr, 6242: int *__robustness) 6242: throw () __attribute__ ((__nonnull__ (1, 2))); 6242: 6242: 6242: 6242: extern int pthread_mutexattr_setrobust (pthread_mutexattr_t *__attr, 6242: int __robustness) 6242: throw () __attribute__ ((__nonnull__ (1))); 6242: 6242: extern int pthread_mutexattr_setrobust_np (pthread_mutexattr_t *__attr, 6242: int __robustness) 6242: throw () __attribute__ ((__nonnull__ (1))); 6242: # 889 "/usr/include/pthread.h" 3 4 6242: extern int pthread_rwlock_init (pthread_rwlock_t *__restrict __rwlock, 6242: const pthread_rwlockattr_t *__restrict 6242: __attr) throw () __attribute__ ((__nonnull__ (1))); 6242: 6242: 6242: extern int pthread_rwlock_destroy (pthread_rwlock_t *__rwlock) 6242: throw () __attribute__ ((__nonnull__ (1))); 6242: 6242: 6242: extern int pthread_rwlock_rdlock (pthread_rwlock_t *__rwlock) 6242: throw () __attribute__ ((__nonnull__ (1))); 6242: 6242: 6242: extern int pthread_rwlock_tryrdlock (pthread_rwlock_t *__rwlock) 6242: throw () __attribute__ ((__nonnull__ (1))); 6242: 6242: 6242: 6242: extern int pthread_rwlock_timedrdlock (pthread_rwlock_t *__restrict __rwlock, 6242: const struct timespec *__restrict 6242: __abstime) throw () __attribute__ ((__nonnull__ (1, 2))); 6242: 6242: 6242: 6242: extern int pthread_rwlock_wrlock (pthread_rwlock_t *__rwlock) 6242: throw () __attribute__ ((__nonnull__ (1))); 6242: 6242: 6242: extern int pthread_rwlock_trywrlock (pthread_rwlock_t *__rwlock) 6242: throw () __attribute__ ((__nonnull__ (1))); 6242: 6242: 6242: 6242: extern int pthread_rwlock_timedwrlock (pthread_rwlock_t *__restrict __rwlock, 6242: const struct timespec *__restrict 6242: __abstime) throw () __attribute__ ((__nonnull__ (1, 2))); 6242: 6242: 6242: 6242: extern int pthread_rwlock_unlock (pthread_rwlock_t *__rwlock) 6242: throw () __attribute__ ((__nonnull__ (1))); 6242: 6242: 6242: 6242: 6242: 6242: extern int pthread_rwlockattr_init (pthread_rwlockattr_t *__attr) 6242: throw () __attribute__ ((__nonnull__ (1))); 6242: 6242: 6242: extern int pthread_rwlockattr_destroy (pthread_rwlockattr_t *__attr) 6242: throw () __attribute__ ((__nonnull__ (1))); 6242: 6242: 6242: extern int pthread_rwlockattr_getpshared (const pthread_rwlockattr_t * 6242: __restrict __attr, 6242: int *__restrict __pshared) 6242: throw () __attribute__ ((__nonnull__ (1, 2))); 6242: 6242: 6242: extern int pthread_rwlockattr_setpshared (pthread_rwlockattr_t *__attr, 6242: int __pshared) 6242: throw () __attribute__ ((__nonnull__ (1))); 6242: 6242: 6242: extern int pthread_rwlockattr_getkind_np (const pthread_rwlockattr_t * 6242: __restrict __attr, 6242: int *__restrict __pref) 6242: throw () __attribute__ ((__nonnull__ (1, 2))); 6242: 6242: 6242: extern int pthread_rwlockattr_setkind_np (pthread_rwlockattr_t *__attr, 6242: int __pref) throw () __attribute__ ((__nonnull__ (1))); 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: extern int pthread_cond_init (pthread_cond_t *__restrict __cond, 6242: const pthread_condattr_t *__restrict __cond_attr) 6242: throw () __attribute__ ((__nonnull__ (1))); 6242: 6242: 6242: extern int pthread_cond_destroy (pthread_cond_t *__cond) 6242: throw () __attribute__ ((__nonnull__ (1))); 6242: 6242: 6242: extern int pthread_cond_signal (pthread_cond_t *__cond) 6242: throw () __attribute__ ((__nonnull__ (1))); 6242: 6242: 6242: extern int pthread_cond_broadcast (pthread_cond_t *__cond) 6242: throw () __attribute__ ((__nonnull__ (1))); 6242: 6242: 6242: 6242: 6242: 6242: 6242: extern int pthread_cond_wait (pthread_cond_t *__restrict __cond, 6242: pthread_mutex_t *__restrict __mutex) 6242: __attribute__ ((__nonnull__ (1, 2))); 6242: # 1001 "/usr/include/pthread.h" 3 4 6242: extern int pthread_cond_timedwait (pthread_cond_t *__restrict __cond, 6242: pthread_mutex_t *__restrict __mutex, 6242: const struct timespec *__restrict __abstime) 6242: __attribute__ ((__nonnull__ (1, 2, 3))); 6242: 6242: 6242: 6242: 6242: extern int pthread_condattr_init (pthread_condattr_t *__attr) 6242: throw () __attribute__ ((__nonnull__ (1))); 6242: 6242: 6242: extern int pthread_condattr_destroy (pthread_condattr_t *__attr) 6242: throw () __attribute__ ((__nonnull__ (1))); 6242: 6242: 6242: extern int pthread_condattr_getpshared (const pthread_condattr_t * 6242: __restrict __attr, 6242: int *__restrict __pshared) 6242: throw () __attribute__ ((__nonnull__ (1, 2))); 6242: 6242: 6242: extern int pthread_condattr_setpshared (pthread_condattr_t *__attr, 6242: int __pshared) throw () __attribute__ ((__nonnull__ (1))); 6242: 6242: 6242: 6242: extern int pthread_condattr_getclock (const pthread_condattr_t * 6242: __restrict __attr, 6242: __clockid_t *__restrict __clock_id) 6242: throw () __attribute__ ((__nonnull__ (1, 2))); 6242: 6242: 6242: extern int pthread_condattr_setclock (pthread_condattr_t *__attr, 6242: __clockid_t __clock_id) 6242: throw () __attribute__ ((__nonnull__ (1))); 6242: # 1045 "/usr/include/pthread.h" 3 4 6242: extern int pthread_spin_init (pthread_spinlock_t *__lock, int __pshared) 6242: throw () __attribute__ ((__nonnull__ (1))); 6242: 6242: 6242: extern int pthread_spin_destroy (pthread_spinlock_t *__lock) 6242: throw () __attribute__ ((__nonnull__ (1))); 6242: 6242: 6242: extern int pthread_spin_lock (pthread_spinlock_t *__lock) 6242: throw () __attribute__ ((__nonnull__ (1))); 6242: 6242: 6242: extern int pthread_spin_trylock (pthread_spinlock_t *__lock) 6242: throw () __attribute__ ((__nonnull__ (1))); 6242: 6242: 6242: extern int pthread_spin_unlock (pthread_spinlock_t *__lock) 6242: throw () __attribute__ ((__nonnull__ (1))); 6242: 6242: 6242: 6242: 6242: 6242: 6242: extern int pthread_barrier_init (pthread_barrier_t *__restrict __barrier, 6242: const pthread_barrierattr_t *__restrict 6242: __attr, unsigned int __count) 6242: throw () __attribute__ ((__nonnull__ (1))); 6242: 6242: 6242: extern int pthread_barrier_destroy (pthread_barrier_t *__barrier) 6242: throw () __attribute__ ((__nonnull__ (1))); 6242: 6242: 6242: extern int pthread_barrier_wait (pthread_barrier_t *__barrier) 6242: throw () __attribute__ ((__nonnull__ (1))); 6242: 6242: 6242: 6242: extern int pthread_barrierattr_init (pthread_barrierattr_t *__attr) 6242: throw () __attribute__ ((__nonnull__ (1))); 6242: 6242: 6242: extern int pthread_barrierattr_destroy (pthread_barrierattr_t *__attr) 6242: throw () __attribute__ ((__nonnull__ (1))); 6242: 6242: 6242: extern int pthread_barrierattr_getpshared (const pthread_barrierattr_t * 6242: __restrict __attr, 6242: int *__restrict __pshared) 6242: throw () __attribute__ ((__nonnull__ (1, 2))); 6242: 6242: 6242: extern int pthread_barrierattr_setpshared (pthread_barrierattr_t *__attr, 6242: int __pshared) 6242: throw () __attribute__ ((__nonnull__ (1))); 6242: # 1112 "/usr/include/pthread.h" 3 4 6242: extern int pthread_key_create (pthread_key_t *__key, 6242: void (*__destr_function) (void *)) 6242: throw () __attribute__ ((__nonnull__ (1))); 6242: 6242: 6242: extern int pthread_key_delete (pthread_key_t __key) throw (); 6242: 6242: 6242: extern void *pthread_getspecific (pthread_key_t __key) throw (); 6242: 6242: 6242: extern int pthread_setspecific (pthread_key_t __key, 6242: const void *__pointer) throw () ; 6242: 6242: 6242: 6242: 6242: extern int pthread_getcpuclockid (pthread_t __thread_id, 6242: __clockid_t *__clock_id) 6242: throw () __attribute__ ((__nonnull__ (2))); 6242: # 1146 "/usr/include/pthread.h" 3 4 6242: extern int pthread_atfork (void (*__prepare) (void), 6242: void (*__parent) (void), 6242: void (*__child) (void)) throw (); 6242: 6242: 6242: 6242: 6242: extern __inline __attribute__ ((__gnu_inline__)) int 6242: __attribute__ ((__leaf__)) pthread_equal (pthread_t __thread1, pthread_t __thread2) throw () 6242: { 6242: return __thread1 == __thread2; 6242: } 6242: 6242: 6242: } 6242: # 36 "/usr/include/s390x-linux-gnu/c++/8/bits/gthr-default.h" 2 3 6242: # 47 "/usr/include/s390x-linux-gnu/c++/8/bits/gthr-default.h" 3 6242: typedef pthread_t __gthread_t; 6242: typedef pthread_key_t __gthread_key_t; 6242: typedef pthread_once_t __gthread_once_t; 6242: typedef pthread_mutex_t __gthread_mutex_t; 6242: typedef pthread_mutex_t __gthread_recursive_mutex_t; 6242: typedef pthread_cond_t __gthread_cond_t; 6242: typedef struct timespec __gthread_time_t; 6242: # 101 "/usr/include/s390x-linux-gnu/c++/8/bits/gthr-default.h" 3 6242: static __typeof(pthread_once) __gthrw_pthread_once __attribute__ ((__weakref__("pthread_once"))); 6242: static __typeof(pthread_getspecific) __gthrw_pthread_getspecific __attribute__ ((__weakref__("pthread_getspecific"))); 6242: static __typeof(pthread_setspecific) __gthrw_pthread_setspecific __attribute__ ((__weakref__("pthread_setspecific"))); 6242: 6242: static __typeof(pthread_create) __gthrw_pthread_create __attribute__ ((__weakref__("pthread_create"))); 6242: static __typeof(pthread_join) __gthrw_pthread_join __attribute__ ((__weakref__("pthread_join"))); 6242: static __typeof(pthread_equal) __gthrw_pthread_equal __attribute__ ((__weakref__("pthread_equal"))); 6242: static __typeof(pthread_self) __gthrw_pthread_self __attribute__ ((__weakref__("pthread_self"))); 6242: static __typeof(pthread_detach) __gthrw_pthread_detach __attribute__ ((__weakref__("pthread_detach"))); 6242: 6242: static __typeof(pthread_cancel) __gthrw_pthread_cancel __attribute__ ((__weakref__("pthread_cancel"))); 6242: 6242: static __typeof(sched_yield) __gthrw_sched_yield __attribute__ ((__weakref__("sched_yield"))); 6242: 6242: static __typeof(pthread_mutex_lock) __gthrw_pthread_mutex_lock __attribute__ ((__weakref__("pthread_mutex_lock"))); 6242: static __typeof(pthread_mutex_trylock) __gthrw_pthread_mutex_trylock __attribute__ ((__weakref__("pthread_mutex_trylock"))); 6242: 6242: static __typeof(pthread_mutex_timedlock) __gthrw_pthread_mutex_timedlock __attribute__ ((__weakref__("pthread_mutex_timedlock"))); 6242: 6242: static __typeof(pthread_mutex_unlock) __gthrw_pthread_mutex_unlock __attribute__ ((__weakref__("pthread_mutex_unlock"))); 6242: static __typeof(pthread_mutex_init) __gthrw_pthread_mutex_init __attribute__ ((__weakref__("pthread_mutex_init"))); 6242: static __typeof(pthread_mutex_destroy) __gthrw_pthread_mutex_destroy __attribute__ ((__weakref__("pthread_mutex_destroy"))); 6242: 6242: static __typeof(pthread_cond_init) __gthrw_pthread_cond_init __attribute__ ((__weakref__("pthread_cond_init"))); 6242: static __typeof(pthread_cond_broadcast) __gthrw_pthread_cond_broadcast __attribute__ ((__weakref__("pthread_cond_broadcast"))); 6242: static __typeof(pthread_cond_signal) __gthrw_pthread_cond_signal __attribute__ ((__weakref__("pthread_cond_signal"))); 6242: static __typeof(pthread_cond_wait) __gthrw_pthread_cond_wait __attribute__ ((__weakref__("pthread_cond_wait"))); 6242: static __typeof(pthread_cond_timedwait) __gthrw_pthread_cond_timedwait __attribute__ ((__weakref__("pthread_cond_timedwait"))); 6242: static __typeof(pthread_cond_destroy) __gthrw_pthread_cond_destroy __attribute__ ((__weakref__("pthread_cond_destroy"))); 6242: 6242: static __typeof(pthread_key_create) __gthrw_pthread_key_create __attribute__ ((__weakref__("pthread_key_create"))); 6242: static __typeof(pthread_key_delete) __gthrw_pthread_key_delete __attribute__ ((__weakref__("pthread_key_delete"))); 6242: static __typeof(pthread_mutexattr_init) __gthrw_pthread_mutexattr_init __attribute__ ((__weakref__("pthread_mutexattr_init"))); 6242: static __typeof(pthread_mutexattr_settype) __gthrw_pthread_mutexattr_settype __attribute__ ((__weakref__("pthread_mutexattr_settype"))); 6242: static __typeof(pthread_mutexattr_destroy) __gthrw_pthread_mutexattr_destroy __attribute__ ((__weakref__("pthread_mutexattr_destroy"))); 6242: # 236 "/usr/include/s390x-linux-gnu/c++/8/bits/gthr-default.h" 3 6242: static __typeof(pthread_key_create) __gthrw___pthread_key_create __attribute__ ((__weakref__("__pthread_key_create"))); 6242: # 246 "/usr/include/s390x-linux-gnu/c++/8/bits/gthr-default.h" 3 6242: static inline int 6242: __gthread_active_p (void) 6242: { 6242: static void *const __gthread_active_ptr 6242: = __extension__ (void *) &__gthrw___pthread_key_create; 6242: return __gthread_active_ptr != 0; 6242: } 6242: # 658 "/usr/include/s390x-linux-gnu/c++/8/bits/gthr-default.h" 3 6242: static inline int 6242: __gthread_create (__gthread_t *__threadid, void *(*__func) (void*), 6242: void *__args) 6242: { 6242: return __gthrw_pthread_create (__threadid, __null, __func, __args); 6242: } 6242: 6242: static inline int 6242: __gthread_join (__gthread_t __threadid, void **__value_ptr) 6242: { 6242: return __gthrw_pthread_join (__threadid, __value_ptr); 6242: } 6242: 6242: static inline int 6242: __gthread_detach (__gthread_t __threadid) 6242: { 6242: return __gthrw_pthread_detach (__threadid); 6242: } 6242: 6242: static inline int 6242: __gthread_equal (__gthread_t __t1, __gthread_t __t2) 6242: { 6242: return __gthrw_pthread_equal (__t1, __t2); 6242: } 6242: 6242: static inline __gthread_t 6242: __gthread_self (void) 6242: { 6242: return __gthrw_pthread_self (); 6242: } 6242: 6242: static inline int 6242: __gthread_yield (void) 6242: { 6242: return __gthrw_sched_yield (); 6242: } 6242: 6242: static inline int 6242: __gthread_once (__gthread_once_t *__once, void (*__func) (void)) 6242: { 6242: if (__gthread_active_p ()) 6242: return __gthrw_pthread_once (__once, __func); 6242: else 6242: return -1; 6242: } 6242: 6242: static inline int 6242: __gthread_key_create (__gthread_key_t *__key, void (*__dtor) (void *)) 6242: { 6242: return __gthrw_pthread_key_create (__key, __dtor); 6242: } 6242: 6242: static inline int 6242: __gthread_key_delete (__gthread_key_t __key) 6242: { 6242: return __gthrw_pthread_key_delete (__key); 6242: } 6242: 6242: static inline void * 6242: __gthread_getspecific (__gthread_key_t __key) 6242: { 6242: return __gthrw_pthread_getspecific (__key); 6242: } 6242: 6242: static inline int 6242: __gthread_setspecific (__gthread_key_t __key, const void *__ptr) 6242: { 6242: return __gthrw_pthread_setspecific (__key, __ptr); 6242: } 6242: 6242: static inline void 6242: __gthread_mutex_init_function (__gthread_mutex_t *__mutex) 6242: { 6242: if (__gthread_active_p ()) 6242: __gthrw_pthread_mutex_init (__mutex, __null); 6242: } 6242: 6242: static inline int 6242: __gthread_mutex_destroy (__gthread_mutex_t *__mutex) 6242: { 6242: if (__gthread_active_p ()) 6242: return __gthrw_pthread_mutex_destroy (__mutex); 6242: else 6242: return 0; 6242: } 6242: 6242: static inline int 6242: __gthread_mutex_lock (__gthread_mutex_t *__mutex) 6242: { 6242: if (__gthread_active_p ()) 6242: return __gthrw_pthread_mutex_lock (__mutex); 6242: else 6242: return 0; 6242: } 6242: 6242: static inline int 6242: __gthread_mutex_trylock (__gthread_mutex_t *__mutex) 6242: { 6242: if (__gthread_active_p ()) 6242: return __gthrw_pthread_mutex_trylock (__mutex); 6242: else 6242: return 0; 6242: } 6242: 6242: 6242: static inline int 6242: __gthread_mutex_timedlock (__gthread_mutex_t *__mutex, 6242: const __gthread_time_t *__abs_timeout) 6242: { 6242: if (__gthread_active_p ()) 6242: return __gthrw_pthread_mutex_timedlock (__mutex, __abs_timeout); 6242: else 6242: return 0; 6242: } 6242: 6242: 6242: static inline int 6242: __gthread_mutex_unlock (__gthread_mutex_t *__mutex) 6242: { 6242: if (__gthread_active_p ()) 6242: return __gthrw_pthread_mutex_unlock (__mutex); 6242: else 6242: return 0; 6242: } 6242: # 807 "/usr/include/s390x-linux-gnu/c++/8/bits/gthr-default.h" 3 6242: static inline int 6242: __gthread_recursive_mutex_lock (__gthread_recursive_mutex_t *__mutex) 6242: { 6242: return __gthread_mutex_lock (__mutex); 6242: } 6242: 6242: static inline int 6242: __gthread_recursive_mutex_trylock (__gthread_recursive_mutex_t *__mutex) 6242: { 6242: return __gthread_mutex_trylock (__mutex); 6242: } 6242: 6242: 6242: static inline int 6242: __gthread_recursive_mutex_timedlock (__gthread_recursive_mutex_t *__mutex, 6242: const __gthread_time_t *__abs_timeout) 6242: { 6242: return __gthread_mutex_timedlock (__mutex, __abs_timeout); 6242: } 6242: 6242: 6242: static inline int 6242: __gthread_recursive_mutex_unlock (__gthread_recursive_mutex_t *__mutex) 6242: { 6242: return __gthread_mutex_unlock (__mutex); 6242: } 6242: 6242: static inline int 6242: __gthread_recursive_mutex_destroy (__gthread_recursive_mutex_t *__mutex) 6242: { 6242: return __gthread_mutex_destroy (__mutex); 6242: } 6242: # 849 "/usr/include/s390x-linux-gnu/c++/8/bits/gthr-default.h" 3 6242: static inline int 6242: __gthread_cond_broadcast (__gthread_cond_t *__cond) 6242: { 6242: return __gthrw_pthread_cond_broadcast (__cond); 6242: } 6242: 6242: static inline int 6242: __gthread_cond_signal (__gthread_cond_t *__cond) 6242: { 6242: return __gthrw_pthread_cond_signal (__cond); 6242: } 6242: 6242: static inline int 6242: __gthread_cond_wait (__gthread_cond_t *__cond, __gthread_mutex_t *__mutex) 6242: { 6242: return __gthrw_pthread_cond_wait (__cond, __mutex); 6242: } 6242: 6242: static inline int 6242: __gthread_cond_timedwait (__gthread_cond_t *__cond, __gthread_mutex_t *__mutex, 6242: const __gthread_time_t *__abs_timeout) 6242: { 6242: return __gthrw_pthread_cond_timedwait (__cond, __mutex, __abs_timeout); 6242: } 6242: 6242: static inline int 6242: __gthread_cond_wait_recursive (__gthread_cond_t *__cond, 6242: __gthread_recursive_mutex_t *__mutex) 6242: { 6242: return __gthread_cond_wait (__cond, __mutex); 6242: } 6242: 6242: static inline int 6242: __gthread_cond_destroy (__gthread_cond_t* __cond) 6242: { 6242: return __gthrw_pthread_cond_destroy (__cond); 6242: } 6242: # 149 "/usr/include/s390x-linux-gnu/c++/8/bits/gthr.h" 2 3 6242: 6242: 6242: #pragma GCC visibility pop 6242: # 36 "/usr/include/c++/8/ext/atomicity.h" 2 3 6242: # 1 "/usr/include/s390x-linux-gnu/c++/8/bits/atomic_word.h" 1 3 6242: # 32 "/usr/include/s390x-linux-gnu/c++/8/bits/atomic_word.h" 3 6242: typedef int _Atomic_word; 6242: # 37 "/usr/include/c++/8/ext/atomicity.h" 2 3 6242: 6242: namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) 6242: { 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: static inline _Atomic_word 6242: __exchange_and_add(volatile _Atomic_word* __mem, int __val) 6242: { return __atomic_fetch_add(__mem, __val, 4); } 6242: 6242: static inline void 6242: __atomic_add(volatile _Atomic_word* __mem, int __val) 6242: { __atomic_fetch_add(__mem, __val, 4); } 6242: # 64 "/usr/include/c++/8/ext/atomicity.h" 3 6242: static inline _Atomic_word 6242: __exchange_and_add_single(_Atomic_word* __mem, int __val) 6242: { 6242: _Atomic_word __result = *__mem; 6242: *__mem += __val; 6242: return __result; 6242: } 6242: 6242: static inline void 6242: __atomic_add_single(_Atomic_word* __mem, int __val) 6242: { *__mem += __val; } 6242: 6242: static inline _Atomic_word 6242: __attribute__ ((__unused__)) 6242: __exchange_and_add_dispatch(_Atomic_word* __mem, int __val) 6242: { 6242: 6242: if (__gthread_active_p()) 6242: return __exchange_and_add(__mem, __val); 6242: else 6242: return __exchange_and_add_single(__mem, __val); 6242: 6242: 6242: 6242: } 6242: 6242: static inline void 6242: __attribute__ ((__unused__)) 6242: __atomic_add_dispatch(_Atomic_word* __mem, int __val) 6242: { 6242: 6242: if (__gthread_active_p()) 6242: __atomic_add(__mem, __val); 6242: else 6242: __atomic_add_single(__mem, __val); 6242: 6242: 6242: 6242: } 6242: 6242: 6242: } 6242: # 40 "/usr/include/c++/8/bits/ios_base.h" 2 3 6242: 6242: # 1 "/usr/include/c++/8/bits/locale_classes.h" 1 3 6242: # 37 "/usr/include/c++/8/bits/locale_classes.h" 3 6242: 6242: # 38 "/usr/include/c++/8/bits/locale_classes.h" 3 6242: 6242: 6242: # 1 "/usr/include/c++/8/string" 1 3 6242: # 36 "/usr/include/c++/8/string" 3 6242: 6242: # 37 "/usr/include/c++/8/string" 3 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: # 1 "/usr/include/c++/8/bits/ostream_insert.h" 1 3 6242: # 33 "/usr/include/c++/8/bits/ostream_insert.h" 3 6242: 6242: # 34 "/usr/include/c++/8/bits/ostream_insert.h" 3 6242: 6242: 6242: # 1 "/usr/include/c++/8/bits/cxxabi_forced.h" 1 3 6242: # 34 "/usr/include/c++/8/bits/cxxabi_forced.h" 3 6242: 6242: # 35 "/usr/include/c++/8/bits/cxxabi_forced.h" 3 6242: 6242: #pragma GCC visibility push(default) 6242: 6242: 6242: namespace __cxxabiv1 6242: { 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: class __forced_unwind 6242: { 6242: virtual ~__forced_unwind() throw(); 6242: 6242: 6242: virtual void __pure_dummy() = 0; 6242: }; 6242: } 6242: 6242: 6242: #pragma GCC visibility pop 6242: # 37 "/usr/include/c++/8/bits/ostream_insert.h" 2 3 6242: 6242: namespace std __attribute__ ((__visibility__ ("default"))) 6242: { 6242: 6242: 6242: template 6242: inline void 6242: __ostream_write(basic_ostream<_CharT, _Traits>& __out, 6242: const _CharT* __s, streamsize __n) 6242: { 6242: typedef basic_ostream<_CharT, _Traits> __ostream_type; 6242: typedef typename __ostream_type::ios_base __ios_base; 6242: 6242: const streamsize __put = __out.rdbuf()->sputn(__s, __n); 6242: if (__put != __n) 6242: __out.setstate(__ios_base::badbit); 6242: } 6242: 6242: template 6242: inline void 6242: __ostream_fill(basic_ostream<_CharT, _Traits>& __out, streamsize __n) 6242: { 6242: typedef basic_ostream<_CharT, _Traits> __ostream_type; 6242: typedef typename __ostream_type::ios_base __ios_base; 6242: 6242: const _CharT __c = __out.fill(); 6242: for (; __n > 0; --__n) 6242: { 6242: const typename _Traits::int_type __put = __out.rdbuf()->sputc(__c); 6242: if (_Traits::eq_int_type(__put, _Traits::eof())) 6242: { 6242: __out.setstate(__ios_base::badbit); 6242: break; 6242: } 6242: } 6242: } 6242: 6242: template 6242: basic_ostream<_CharT, _Traits>& 6242: __ostream_insert(basic_ostream<_CharT, _Traits>& __out, 6242: const _CharT* __s, streamsize __n) 6242: { 6242: typedef basic_ostream<_CharT, _Traits> __ostream_type; 6242: typedef typename __ostream_type::ios_base __ios_base; 6242: 6242: typename __ostream_type::sentry __cerb(__out); 6242: if (__cerb) 6242: { 6242: try 6242: { 6242: const streamsize __w = __out.width(); 6242: if (__w > __n) 6242: { 6242: const bool __left = ((__out.flags() 6242: & __ios_base::adjustfield) 6242: == __ios_base::left); 6242: if (!__left) 6242: __ostream_fill(__out, __w - __n); 6242: if (__out.good()) 6242: __ostream_write(__out, __s, __n); 6242: if (__left && __out.good()) 6242: __ostream_fill(__out, __w - __n); 6242: } 6242: else 6242: __ostream_write(__out, __s, __n); 6242: __out.width(0); 6242: } 6242: catch(__cxxabiv1::__forced_unwind&) 6242: { 6242: __out._M_setstate(__ios_base::badbit); 6242: throw; 6242: } 6242: catch(...) 6242: { __out._M_setstate(__ios_base::badbit); } 6242: } 6242: return __out; 6242: } 6242: 6242: 6242: 6242: 6242: extern template ostream& __ostream_insert(ostream&, const char*, streamsize); 6242: 6242: 6242: extern template wostream& __ostream_insert(wostream&, const wchar_t*, 6242: streamsize); 6242: 6242: 6242: 6242: 6242: } 6242: # 45 "/usr/include/c++/8/string" 2 3 6242: 6242: 6242: 6242: # 1 "/usr/include/c++/8/bits/stl_function.h" 1 3 6242: # 63 "/usr/include/c++/8/bits/stl_function.h" 3 6242: namespace std __attribute__ ((__visibility__ ("default"))) 6242: { 6242: 6242: # 104 "/usr/include/c++/8/bits/stl_function.h" 3 6242: template 6242: struct unary_function 6242: { 6242: 6242: typedef _Arg argument_type; 6242: 6242: 6242: typedef _Result result_type; 6242: }; 6242: 6242: 6242: 6242: 6242: template 6242: struct binary_function 6242: { 6242: 6242: typedef _Arg1 first_argument_type; 6242: 6242: 6242: typedef _Arg2 second_argument_type; 6242: 6242: 6242: typedef _Result result_type; 6242: }; 6242: # 166 "/usr/include/c++/8/bits/stl_function.h" 3 6242: template 6242: struct plus : public binary_function<_Tp, _Tp, _Tp> 6242: { 6242: 6242: _Tp 6242: operator()(const _Tp& __x, const _Tp& __y) const 6242: { return __x + __y; } 6242: }; 6242: 6242: 6242: template 6242: struct minus : public binary_function<_Tp, _Tp, _Tp> 6242: { 6242: 6242: _Tp 6242: operator()(const _Tp& __x, const _Tp& __y) const 6242: { return __x - __y; } 6242: }; 6242: 6242: 6242: template 6242: struct multiplies : public binary_function<_Tp, _Tp, _Tp> 6242: { 6242: 6242: _Tp 6242: operator()(const _Tp& __x, const _Tp& __y) const 6242: { return __x * __y; } 6242: }; 6242: 6242: 6242: template 6242: struct divides : public binary_function<_Tp, _Tp, _Tp> 6242: { 6242: 6242: _Tp 6242: operator()(const _Tp& __x, const _Tp& __y) const 6242: { return __x / __y; } 6242: }; 6242: 6242: 6242: template 6242: struct modulus : public binary_function<_Tp, _Tp, _Tp> 6242: { 6242: 6242: _Tp 6242: operator()(const _Tp& __x, const _Tp& __y) const 6242: { return __x % __y; } 6242: }; 6242: 6242: 6242: template 6242: struct negate : public unary_function<_Tp, _Tp> 6242: { 6242: 6242: _Tp 6242: operator()(const _Tp& __x) const 6242: { return -__x; } 6242: }; 6242: # 350 "/usr/include/c++/8/bits/stl_function.h" 3 6242: template 6242: struct equal_to : public binary_function<_Tp, _Tp, bool> 6242: { 6242: 6242: bool 6242: operator()(const _Tp& __x, const _Tp& __y) const 6242: { return __x == __y; } 6242: }; 6242: 6242: 6242: template 6242: struct not_equal_to : public binary_function<_Tp, _Tp, bool> 6242: { 6242: 6242: bool 6242: operator()(const _Tp& __x, const _Tp& __y) const 6242: { return __x != __y; } 6242: }; 6242: 6242: 6242: template 6242: struct greater : public binary_function<_Tp, _Tp, bool> 6242: { 6242: 6242: bool 6242: operator()(const _Tp& __x, const _Tp& __y) const 6242: { return __x > __y; } 6242: }; 6242: 6242: 6242: template 6242: struct less : public binary_function<_Tp, _Tp, bool> 6242: { 6242: 6242: bool 6242: operator()(const _Tp& __x, const _Tp& __y) const 6242: { return __x < __y; } 6242: }; 6242: 6242: 6242: template 6242: struct greater_equal : public binary_function<_Tp, _Tp, bool> 6242: { 6242: 6242: bool 6242: operator()(const _Tp& __x, const _Tp& __y) const 6242: { return __x >= __y; } 6242: }; 6242: 6242: 6242: template 6242: struct less_equal : public binary_function<_Tp, _Tp, bool> 6242: { 6242: 6242: bool 6242: operator()(const _Tp& __x, const _Tp& __y) const 6242: { return __x <= __y; } 6242: }; 6242: # 523 "/usr/include/c++/8/bits/stl_function.h" 3 6242: template 6242: struct logical_and : public binary_function<_Tp, _Tp, bool> 6242: { 6242: 6242: bool 6242: operator()(const _Tp& __x, const _Tp& __y) const 6242: { return __x && __y; } 6242: }; 6242: 6242: 6242: template 6242: struct logical_or : public binary_function<_Tp, _Tp, bool> 6242: { 6242: 6242: bool 6242: operator()(const _Tp& __x, const _Tp& __y) const 6242: { return __x || __y; } 6242: }; 6242: 6242: 6242: template 6242: struct logical_not : public unary_function<_Tp, bool> 6242: { 6242: 6242: bool 6242: operator()(const _Tp& __x) const 6242: { return !__x; } 6242: }; 6242: # 616 "/usr/include/c++/8/bits/stl_function.h" 3 6242: template 6242: struct bit_and : public binary_function<_Tp, _Tp, _Tp> 6242: { 6242: 6242: _Tp 6242: operator()(const _Tp& __x, const _Tp& __y) const 6242: { return __x & __y; } 6242: }; 6242: 6242: template 6242: struct bit_or : public binary_function<_Tp, _Tp, _Tp> 6242: { 6242: 6242: _Tp 6242: operator()(const _Tp& __x, const _Tp& __y) const 6242: { return __x | __y; } 6242: }; 6242: 6242: template 6242: struct bit_xor : public binary_function<_Tp, _Tp, _Tp> 6242: { 6242: 6242: _Tp 6242: operator()(const _Tp& __x, const _Tp& __y) const 6242: { return __x ^ __y; } 6242: }; 6242: 6242: template 6242: struct bit_not : public unary_function<_Tp, _Tp> 6242: { 6242: 6242: _Tp 6242: operator()(const _Tp& __x) const 6242: { return ~__x; } 6242: }; 6242: # 740 "/usr/include/c++/8/bits/stl_function.h" 3 6242: template 6242: class unary_negate 6242: : public unary_function 6242: { 6242: protected: 6242: _Predicate _M_pred; 6242: 6242: public: 6242: 6242: explicit 6242: unary_negate(const _Predicate& __x) : _M_pred(__x) { } 6242: 6242: 6242: bool 6242: operator()(const typename _Predicate::argument_type& __x) const 6242: { return !_M_pred(__x); } 6242: }; 6242: 6242: 6242: template 6242: 6242: inline unary_negate<_Predicate> 6242: not1(const _Predicate& __pred) 6242: { return unary_negate<_Predicate>(__pred); } 6242: 6242: 6242: template 6242: class binary_negate 6242: : public binary_function 6242: { 6242: protected: 6242: _Predicate _M_pred; 6242: 6242: public: 6242: 6242: explicit 6242: binary_negate(const _Predicate& __x) : _M_pred(__x) { } 6242: 6242: 6242: bool 6242: operator()(const typename _Predicate::first_argument_type& __x, 6242: const typename _Predicate::second_argument_type& __y) const 6242: { return !_M_pred(__x, __y); } 6242: }; 6242: 6242: 6242: template 6242: 6242: inline binary_negate<_Predicate> 6242: not2(const _Predicate& __pred) 6242: { return binary_negate<_Predicate>(__pred); } 6242: # 817 "/usr/include/c++/8/bits/stl_function.h" 3 6242: template 6242: class pointer_to_unary_function : public unary_function<_Arg, _Result> 6242: { 6242: protected: 6242: _Result (*_M_ptr)(_Arg); 6242: 6242: public: 6242: pointer_to_unary_function() { } 6242: 6242: explicit 6242: pointer_to_unary_function(_Result (*__x)(_Arg)) 6242: : _M_ptr(__x) { } 6242: 6242: _Result 6242: operator()(_Arg __x) const 6242: { return _M_ptr(__x); } 6242: }; 6242: 6242: 6242: template 6242: inline pointer_to_unary_function<_Arg, _Result> 6242: ptr_fun(_Result (*__x)(_Arg)) 6242: { return pointer_to_unary_function<_Arg, _Result>(__x); } 6242: 6242: 6242: template 6242: class pointer_to_binary_function 6242: : public binary_function<_Arg1, _Arg2, _Result> 6242: { 6242: protected: 6242: _Result (*_M_ptr)(_Arg1, _Arg2); 6242: 6242: public: 6242: pointer_to_binary_function() { } 6242: 6242: explicit 6242: pointer_to_binary_function(_Result (*__x)(_Arg1, _Arg2)) 6242: : _M_ptr(__x) { } 6242: 6242: _Result 6242: operator()(_Arg1 __x, _Arg2 __y) const 6242: { return _M_ptr(__x, __y); } 6242: }; 6242: 6242: 6242: template 6242: inline pointer_to_binary_function<_Arg1, _Arg2, _Result> 6242: ptr_fun(_Result (*__x)(_Arg1, _Arg2)) 6242: { return pointer_to_binary_function<_Arg1, _Arg2, _Result>(__x); } 6242: 6242: 6242: template 6242: struct _Identity 6242: : public unary_function<_Tp, _Tp> 6242: { 6242: _Tp& 6242: operator()(_Tp& __x) const 6242: { return __x; } 6242: 6242: const _Tp& 6242: operator()(const _Tp& __x) const 6242: { return __x; } 6242: }; 6242: 6242: 6242: template struct _Identity : _Identity<_Tp> { }; 6242: 6242: template 6242: struct _Select1st 6242: : public unary_function<_Pair, typename _Pair::first_type> 6242: { 6242: typename _Pair::first_type& 6242: operator()(_Pair& __x) const 6242: { return __x.first; } 6242: 6242: const typename _Pair::first_type& 6242: operator()(const _Pair& __x) const 6242: { return __x.first; } 6242: 6242: 6242: template 6242: typename _Pair2::first_type& 6242: operator()(_Pair2& __x) const 6242: { return __x.first; } 6242: 6242: template 6242: const typename _Pair2::first_type& 6242: operator()(const _Pair2& __x) const 6242: { return __x.first; } 6242: 6242: }; 6242: 6242: template 6242: struct _Select2nd 6242: : public unary_function<_Pair, typename _Pair::second_type> 6242: { 6242: typename _Pair::second_type& 6242: operator()(_Pair& __x) const 6242: { return __x.second; } 6242: 6242: const typename _Pair::second_type& 6242: operator()(const _Pair& __x) const 6242: { return __x.second; } 6242: }; 6242: # 940 "/usr/include/c++/8/bits/stl_function.h" 3 6242: template 6242: class mem_fun_t : public unary_function<_Tp*, _Ret> 6242: { 6242: public: 6242: explicit 6242: mem_fun_t(_Ret (_Tp::*__pf)()) 6242: : _M_f(__pf) { } 6242: 6242: _Ret 6242: operator()(_Tp* __p) const 6242: { return (__p->*_M_f)(); } 6242: 6242: private: 6242: _Ret (_Tp::*_M_f)(); 6242: }; 6242: 6242: 6242: 6242: template 6242: class const_mem_fun_t : public unary_function 6242: { 6242: public: 6242: explicit 6242: const_mem_fun_t(_Ret (_Tp::*__pf)() const) 6242: : _M_f(__pf) { } 6242: 6242: _Ret 6242: operator()(const _Tp* __p) const 6242: { return (__p->*_M_f)(); } 6242: 6242: private: 6242: _Ret (_Tp::*_M_f)() const; 6242: }; 6242: 6242: 6242: 6242: template 6242: class mem_fun_ref_t : public unary_function<_Tp, _Ret> 6242: { 6242: public: 6242: explicit 6242: mem_fun_ref_t(_Ret (_Tp::*__pf)()) 6242: : _M_f(__pf) { } 6242: 6242: _Ret 6242: operator()(_Tp& __r) const 6242: { return (__r.*_M_f)(); } 6242: 6242: private: 6242: _Ret (_Tp::*_M_f)(); 6242: }; 6242: 6242: 6242: 6242: template 6242: class const_mem_fun_ref_t : public unary_function<_Tp, _Ret> 6242: { 6242: public: 6242: explicit 6242: const_mem_fun_ref_t(_Ret (_Tp::*__pf)() const) 6242: : _M_f(__pf) { } 6242: 6242: _Ret 6242: operator()(const _Tp& __r) const 6242: { return (__r.*_M_f)(); } 6242: 6242: private: 6242: _Ret (_Tp::*_M_f)() const; 6242: }; 6242: 6242: 6242: 6242: template 6242: class mem_fun1_t : public binary_function<_Tp*, _Arg, _Ret> 6242: { 6242: public: 6242: explicit 6242: mem_fun1_t(_Ret (_Tp::*__pf)(_Arg)) 6242: : _M_f(__pf) { } 6242: 6242: _Ret 6242: operator()(_Tp* __p, _Arg __x) const 6242: { return (__p->*_M_f)(__x); } 6242: 6242: private: 6242: _Ret (_Tp::*_M_f)(_Arg); 6242: }; 6242: 6242: 6242: 6242: template 6242: class const_mem_fun1_t : public binary_function 6242: { 6242: public: 6242: explicit 6242: const_mem_fun1_t(_Ret (_Tp::*__pf)(_Arg) const) 6242: : _M_f(__pf) { } 6242: 6242: _Ret 6242: operator()(const _Tp* __p, _Arg __x) const 6242: { return (__p->*_M_f)(__x); } 6242: 6242: private: 6242: _Ret (_Tp::*_M_f)(_Arg) const; 6242: }; 6242: 6242: 6242: 6242: template 6242: class mem_fun1_ref_t : public binary_function<_Tp, _Arg, _Ret> 6242: { 6242: public: 6242: explicit 6242: mem_fun1_ref_t(_Ret (_Tp::*__pf)(_Arg)) 6242: : _M_f(__pf) { } 6242: 6242: _Ret 6242: operator()(_Tp& __r, _Arg __x) const 6242: { return (__r.*_M_f)(__x); } 6242: 6242: private: 6242: _Ret (_Tp::*_M_f)(_Arg); 6242: }; 6242: 6242: 6242: 6242: template 6242: class const_mem_fun1_ref_t : public binary_function<_Tp, _Arg, _Ret> 6242: { 6242: public: 6242: explicit 6242: const_mem_fun1_ref_t(_Ret (_Tp::*__pf)(_Arg) const) 6242: : _M_f(__pf) { } 6242: 6242: _Ret 6242: operator()(const _Tp& __r, _Arg __x) const 6242: { return (__r.*_M_f)(__x); } 6242: 6242: private: 6242: _Ret (_Tp::*_M_f)(_Arg) const; 6242: }; 6242: 6242: 6242: 6242: template 6242: inline mem_fun_t<_Ret, _Tp> 6242: mem_fun(_Ret (_Tp::*__f)()) 6242: { return mem_fun_t<_Ret, _Tp>(__f); } 6242: 6242: template 6242: inline const_mem_fun_t<_Ret, _Tp> 6242: mem_fun(_Ret (_Tp::*__f)() const) 6242: { return const_mem_fun_t<_Ret, _Tp>(__f); } 6242: 6242: template 6242: inline mem_fun_ref_t<_Ret, _Tp> 6242: mem_fun_ref(_Ret (_Tp::*__f)()) 6242: { return mem_fun_ref_t<_Ret, _Tp>(__f); } 6242: 6242: template 6242: inline const_mem_fun_ref_t<_Ret, _Tp> 6242: mem_fun_ref(_Ret (_Tp::*__f)() const) 6242: { return const_mem_fun_ref_t<_Ret, _Tp>(__f); } 6242: 6242: template 6242: inline mem_fun1_t<_Ret, _Tp, _Arg> 6242: mem_fun(_Ret (_Tp::*__f)(_Arg)) 6242: { return mem_fun1_t<_Ret, _Tp, _Arg>(__f); } 6242: 6242: template 6242: inline const_mem_fun1_t<_Ret, _Tp, _Arg> 6242: mem_fun(_Ret (_Tp::*__f)(_Arg) const) 6242: { return const_mem_fun1_t<_Ret, _Tp, _Arg>(__f); } 6242: 6242: template 6242: inline mem_fun1_ref_t<_Ret, _Tp, _Arg> 6242: mem_fun_ref(_Ret (_Tp::*__f)(_Arg)) 6242: { return mem_fun1_ref_t<_Ret, _Tp, _Arg>(__f); } 6242: 6242: template 6242: inline const_mem_fun1_ref_t<_Ret, _Tp, _Arg> 6242: mem_fun_ref(_Ret (_Tp::*__f)(_Arg) const) 6242: { return const_mem_fun1_ref_t<_Ret, _Tp, _Arg>(__f); } 6242: 6242: 6242: 6242: 6242: } 6242: 6242: 6242: # 1 "/usr/include/c++/8/backward/binders.h" 1 3 6242: # 60 "/usr/include/c++/8/backward/binders.h" 3 6242: #pragma GCC diagnostic push 6242: #pragma GCC diagnostic ignored "-Wdeprecated-declarations" 6242: 6242: namespace std __attribute__ ((__visibility__ ("default"))) 6242: { 6242: 6242: # 107 "/usr/include/c++/8/backward/binders.h" 3 6242: template 6242: class binder1st 6242: : public unary_function 6242: { 6242: protected: 6242: _Operation op; 6242: typename _Operation::first_argument_type value; 6242: 6242: public: 6242: binder1st(const _Operation& __x, 6242: const typename _Operation::first_argument_type& __y) 6242: : op(__x), value(__y) { } 6242: 6242: typename _Operation::result_type 6242: operator()(const typename _Operation::second_argument_type& __x) const 6242: { return op(value, __x); } 6242: 6242: 6242: 6242: typename _Operation::result_type 6242: operator()(typename _Operation::second_argument_type& __x) const 6242: { return op(value, __x); } 6242: } __attribute__ ((__deprecated__)); 6242: 6242: 6242: template 6242: inline binder1st<_Operation> 6242: bind1st(const _Operation& __fn, const _Tp& __x) 6242: { 6242: typedef typename _Operation::first_argument_type _Arg1_type; 6242: return binder1st<_Operation>(__fn, _Arg1_type(__x)); 6242: } 6242: 6242: 6242: template 6242: class binder2nd 6242: : public unary_function 6242: { 6242: protected: 6242: _Operation op; 6242: typename _Operation::second_argument_type value; 6242: 6242: public: 6242: binder2nd(const _Operation& __x, 6242: const typename _Operation::second_argument_type& __y) 6242: : op(__x), value(__y) { } 6242: 6242: typename _Operation::result_type 6242: operator()(const typename _Operation::first_argument_type& __x) const 6242: { return op(__x, value); } 6242: 6242: 6242: 6242: typename _Operation::result_type 6242: operator()(typename _Operation::first_argument_type& __x) const 6242: { return op(__x, value); } 6242: } __attribute__ ((__deprecated__)); 6242: 6242: 6242: template 6242: inline binder2nd<_Operation> 6242: bind2nd(const _Operation& __fn, const _Tp& __x) 6242: { 6242: typedef typename _Operation::second_argument_type _Arg2_type; 6242: return binder2nd<_Operation>(__fn, _Arg2_type(__x)); 6242: } 6242: 6242: 6242: 6242: } 6242: 6242: #pragma GCC diagnostic pop 6242: # 1131 "/usr/include/c++/8/bits/stl_function.h" 2 3 6242: # 49 "/usr/include/c++/8/string" 2 3 6242: 6242: 6242: 6242: # 1 "/usr/include/c++/8/bits/basic_string.h" 1 3 6242: # 37 "/usr/include/c++/8/bits/basic_string.h" 3 6242: 6242: # 38 "/usr/include/c++/8/bits/basic_string.h" 3 6242: # 52 "/usr/include/c++/8/bits/basic_string.h" 3 6242: namespace std __attribute__ ((__visibility__ ("default"))) 6242: { 6242: 6242: 6242: 6242: namespace __cxx11 { 6242: # 76 "/usr/include/c++/8/bits/basic_string.h" 3 6242: template 6242: class basic_string 6242: { 6242: typedef typename __gnu_cxx::__alloc_traits<_Alloc>::template 6242: rebind<_CharT>::other _Char_alloc_type; 6242: typedef __gnu_cxx::__alloc_traits<_Char_alloc_type> _Alloc_traits; 6242: 6242: 6242: public: 6242: typedef _Traits traits_type; 6242: typedef typename _Traits::char_type value_type; 6242: typedef _Char_alloc_type allocator_type; 6242: typedef typename _Alloc_traits::size_type size_type; 6242: typedef typename _Alloc_traits::difference_type difference_type; 6242: typedef typename _Alloc_traits::reference reference; 6242: typedef typename _Alloc_traits::const_reference const_reference; 6242: typedef typename _Alloc_traits::pointer pointer; 6242: typedef typename _Alloc_traits::const_pointer const_pointer; 6242: typedef __gnu_cxx::__normal_iterator iterator; 6242: typedef __gnu_cxx::__normal_iterator 6242: const_iterator; 6242: typedef std::reverse_iterator const_reverse_iterator; 6242: typedef std::reverse_iterator reverse_iterator; 6242: 6242: 6242: static const size_type npos = static_cast(-1); 6242: 6242: private: 6242: 6242: 6242: 6242: 6242: typedef const_iterator __const_iterator; 6242: # 139 "/usr/include/c++/8/bits/basic_string.h" 3 6242: struct _Alloc_hider : allocator_type 6242: { 6242: 6242: 6242: 6242: 6242: _Alloc_hider(pointer __dat, const _Alloc& __a) 6242: : allocator_type(__a), _M_p(__dat) { } 6242: 6242: _Alloc_hider(pointer __dat, _Alloc&& __a = _Alloc()) 6242: : allocator_type(std::move(__a)), _M_p(__dat) { } 6242: 6242: 6242: pointer _M_p; 6242: }; 6242: 6242: _Alloc_hider _M_dataplus; 6242: size_type _M_string_length; 6242: 6242: enum { _S_local_capacity = 15 / sizeof(_CharT) }; 6242: 6242: union 6242: { 6242: _CharT _M_local_buf[_S_local_capacity + 1]; 6242: size_type _M_allocated_capacity; 6242: }; 6242: 6242: void 6242: _M_data(pointer __p) 6242: { _M_dataplus._M_p = __p; } 6242: 6242: void 6242: _M_length(size_type __length) 6242: { _M_string_length = __length; } 6242: 6242: pointer 6242: _M_data() const 6242: { return _M_dataplus._M_p; } 6242: 6242: pointer 6242: _M_local_data() 6242: { 6242: 6242: return std::pointer_traits::pointer_to(*_M_local_buf); 6242: 6242: 6242: 6242: } 6242: 6242: const_pointer 6242: _M_local_data() const 6242: { 6242: 6242: return std::pointer_traits::pointer_to(*_M_local_buf); 6242: 6242: 6242: 6242: } 6242: 6242: void 6242: _M_capacity(size_type __capacity) 6242: { _M_allocated_capacity = __capacity; } 6242: 6242: void 6242: _M_set_length(size_type __n) 6242: { 6242: _M_length(__n); 6242: traits_type::assign(_M_data()[__n], _CharT()); 6242: } 6242: 6242: bool 6242: _M_is_local() const 6242: { return _M_data() == _M_local_data(); } 6242: 6242: 6242: pointer 6242: _M_create(size_type&, size_type); 6242: 6242: void 6242: _M_dispose() 6242: { 6242: if (!_M_is_local()) 6242: _M_destroy(_M_allocated_capacity); 6242: } 6242: 6242: void 6242: _M_destroy(size_type __size) throw() 6242: { _Alloc_traits::deallocate(_M_get_allocator(), _M_data(), __size + 1); } 6242: 6242: 6242: 6242: template 6242: void 6242: _M_construct_aux(_InIterator __beg, _InIterator __end, 6242: std::__false_type) 6242: { 6242: typedef typename iterator_traits<_InIterator>::iterator_category _Tag; 6242: _M_construct(__beg, __end, _Tag()); 6242: } 6242: 6242: 6242: 6242: template 6242: void 6242: _M_construct_aux(_Integer __beg, _Integer __end, std::__true_type) 6242: { _M_construct_aux_2(static_cast(__beg), __end); } 6242: 6242: void 6242: _M_construct_aux_2(size_type __req, _CharT __c) 6242: { _M_construct(__req, __c); } 6242: 6242: template 6242: void 6242: _M_construct(_InIterator __beg, _InIterator __end) 6242: { 6242: typedef typename std::__is_integer<_InIterator>::__type _Integral; 6242: _M_construct_aux(__beg, __end, _Integral()); 6242: } 6242: 6242: 6242: template 6242: void 6242: _M_construct(_InIterator __beg, _InIterator __end, 6242: std::input_iterator_tag); 6242: 6242: 6242: 6242: template 6242: void 6242: _M_construct(_FwdIterator __beg, _FwdIterator __end, 6242: std::forward_iterator_tag); 6242: 6242: void 6242: _M_construct(size_type __req, _CharT __c); 6242: 6242: allocator_type& 6242: _M_get_allocator() 6242: { return _M_dataplus; } 6242: 6242: const allocator_type& 6242: _M_get_allocator() const 6242: { return _M_dataplus; } 6242: 6242: private: 6242: # 298 "/usr/include/c++/8/bits/basic_string.h" 3 6242: size_type 6242: _M_check(size_type __pos, const char* __s) const 6242: { 6242: if (__pos > this->size()) 6242: __throw_out_of_range_fmt(("%s: __pos (which is %zu) > " "this->size() (which is %zu)") 6242: , 6242: __s, __pos, this->size()); 6242: return __pos; 6242: } 6242: 6242: void 6242: _M_check_length(size_type __n1, size_type __n2, const char* __s) const 6242: { 6242: if (this->max_size() - (this->size() - __n1) < __n2) 6242: __throw_length_error((__s)); 6242: } 6242: 6242: 6242: 6242: size_type 6242: _M_limit(size_type __pos, size_type __off) const noexcept 6242: { 6242: const bool __testoff = __off < this->size() - __pos; 6242: return __testoff ? __off : this->size() - __pos; 6242: } 6242: 6242: 6242: bool 6242: _M_disjunct(const _CharT* __s) const noexcept 6242: { 6242: return (less()(__s, _M_data()) 6242: || less()(_M_data() + this->size(), __s)); 6242: } 6242: 6242: 6242: 6242: static void 6242: _S_copy(_CharT* __d, const _CharT* __s, size_type __n) 6242: { 6242: if (__n == 1) 6242: traits_type::assign(*__d, *__s); 6242: else 6242: traits_type::copy(__d, __s, __n); 6242: } 6242: 6242: static void 6242: _S_move(_CharT* __d, const _CharT* __s, size_type __n) 6242: { 6242: if (__n == 1) 6242: traits_type::assign(*__d, *__s); 6242: else 6242: traits_type::move(__d, __s, __n); 6242: } 6242: 6242: static void 6242: _S_assign(_CharT* __d, size_type __n, _CharT __c) 6242: { 6242: if (__n == 1) 6242: traits_type::assign(*__d, __c); 6242: else 6242: traits_type::assign(__d, __n, __c); 6242: } 6242: 6242: 6242: 6242: template 6242: static void 6242: _S_copy_chars(_CharT* __p, _Iterator __k1, _Iterator __k2) 6242: { 6242: for (; __k1 != __k2; ++__k1, (void)++__p) 6242: traits_type::assign(*__p, *__k1); 6242: } 6242: 6242: static void 6242: _S_copy_chars(_CharT* __p, iterator __k1, iterator __k2) noexcept 6242: { _S_copy_chars(__p, __k1.base(), __k2.base()); } 6242: 6242: static void 6242: _S_copy_chars(_CharT* __p, const_iterator __k1, const_iterator __k2) 6242: noexcept 6242: { _S_copy_chars(__p, __k1.base(), __k2.base()); } 6242: 6242: static void 6242: _S_copy_chars(_CharT* __p, _CharT* __k1, _CharT* __k2) noexcept 6242: { _S_copy(__p, __k1, __k2 - __k1); } 6242: 6242: static void 6242: _S_copy_chars(_CharT* __p, const _CharT* __k1, const _CharT* __k2) 6242: noexcept 6242: { _S_copy(__p, __k1, __k2 - __k1); } 6242: 6242: static int 6242: _S_compare(size_type __n1, size_type __n2) noexcept 6242: { 6242: const difference_type __d = difference_type(__n1 - __n2); 6242: 6242: if (__d > __gnu_cxx::__numeric_traits::__max) 6242: return __gnu_cxx::__numeric_traits::__max; 6242: else if (__d < __gnu_cxx::__numeric_traits::__min) 6242: return __gnu_cxx::__numeric_traits::__min; 6242: else 6242: return int(__d); 6242: } 6242: 6242: void 6242: _M_assign(const basic_string&); 6242: 6242: void 6242: _M_mutate(size_type __pos, size_type __len1, const _CharT* __s, 6242: size_type __len2); 6242: 6242: void 6242: _M_erase(size_type __pos, size_type __n); 6242: 6242: public: 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: basic_string() 6242: noexcept(is_nothrow_default_constructible<_Alloc>::value) 6242: : _M_dataplus(_M_local_data()) 6242: { _M_set_length(0); } 6242: 6242: 6242: 6242: 6242: explicit 6242: basic_string(const _Alloc& __a) noexcept 6242: : _M_dataplus(_M_local_data(), __a) 6242: { _M_set_length(0); } 6242: 6242: 6242: 6242: 6242: 6242: basic_string(const basic_string& __str) 6242: : _M_dataplus(_M_local_data(), 6242: _Alloc_traits::_S_select_on_copy(__str._M_get_allocator())) 6242: { _M_construct(__str._M_data(), __str._M_data() + __str.length()); } 6242: # 450 "/usr/include/c++/8/bits/basic_string.h" 3 6242: basic_string(const basic_string& __str, size_type __pos, 6242: const _Alloc& __a = _Alloc()) 6242: : _M_dataplus(_M_local_data(), __a) 6242: { 6242: const _CharT* __start = __str._M_data() 6242: + __str._M_check(__pos, "basic_string::basic_string"); 6242: _M_construct(__start, __start + __str._M_limit(__pos, npos)); 6242: } 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: basic_string(const basic_string& __str, size_type __pos, 6242: size_type __n) 6242: : _M_dataplus(_M_local_data()) 6242: { 6242: const _CharT* __start = __str._M_data() 6242: + __str._M_check(__pos, "basic_string::basic_string"); 6242: _M_construct(__start, __start + __str._M_limit(__pos, __n)); 6242: } 6242: # 481 "/usr/include/c++/8/bits/basic_string.h" 3 6242: basic_string(const basic_string& __str, size_type __pos, 6242: size_type __n, const _Alloc& __a) 6242: : _M_dataplus(_M_local_data(), __a) 6242: { 6242: const _CharT* __start 6242: = __str._M_data() + __str._M_check(__pos, "string::string"); 6242: _M_construct(__start, __start + __str._M_limit(__pos, __n)); 6242: } 6242: # 499 "/usr/include/c++/8/bits/basic_string.h" 3 6242: basic_string(const _CharT* __s, size_type __n, 6242: const _Alloc& __a = _Alloc()) 6242: : _M_dataplus(_M_local_data(), __a) 6242: { _M_construct(__s, __s + __n); } 6242: 6242: 6242: 6242: 6242: 6242: 6242: basic_string(const _CharT* __s, const _Alloc& __a = _Alloc()) 6242: : _M_dataplus(_M_local_data(), __a) 6242: { _M_construct(__s, __s ? __s + traits_type::length(__s) : __s+npos); } 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: basic_string(size_type __n, _CharT __c, const _Alloc& __a = _Alloc()) 6242: : _M_dataplus(_M_local_data(), __a) 6242: { _M_construct(__n, __c); } 6242: # 531 "/usr/include/c++/8/bits/basic_string.h" 3 6242: basic_string(basic_string&& __str) noexcept 6242: : _M_dataplus(_M_local_data(), std::move(__str._M_get_allocator())) 6242: { 6242: if (__str._M_is_local()) 6242: { 6242: traits_type::copy(_M_local_buf, __str._M_local_buf, 6242: _S_local_capacity + 1); 6242: } 6242: else 6242: { 6242: _M_data(__str._M_data()); 6242: _M_capacity(__str._M_allocated_capacity); 6242: } 6242: 6242: 6242: 6242: 6242: _M_length(__str.length()); 6242: __str._M_data(__str._M_local_data()); 6242: __str._M_set_length(0); 6242: } 6242: 6242: 6242: 6242: 6242: 6242: 6242: basic_string(initializer_list<_CharT> __l, const _Alloc& __a = _Alloc()) 6242: : _M_dataplus(_M_local_data(), __a) 6242: { _M_construct(__l.begin(), __l.end()); } 6242: 6242: basic_string(const basic_string& __str, const _Alloc& __a) 6242: : _M_dataplus(_M_local_data(), __a) 6242: { _M_construct(__str.begin(), __str.end()); } 6242: 6242: basic_string(basic_string&& __str, const _Alloc& __a) 6242: noexcept(_Alloc_traits::_S_always_equal()) 6242: : _M_dataplus(_M_local_data(), __a) 6242: { 6242: if (__str._M_is_local()) 6242: { 6242: traits_type::copy(_M_local_buf, __str._M_local_buf, 6242: _S_local_capacity + 1); 6242: _M_length(__str.length()); 6242: __str._M_set_length(0); 6242: } 6242: else if (_Alloc_traits::_S_always_equal() 6242: || __str.get_allocator() == __a) 6242: { 6242: _M_data(__str._M_data()); 6242: _M_length(__str.length()); 6242: _M_capacity(__str._M_allocated_capacity); 6242: __str._M_data(__str._M_local_buf); 6242: __str._M_set_length(0); 6242: } 6242: else 6242: _M_construct(__str.begin(), __str.end()); 6242: } 6242: # 599 "/usr/include/c++/8/bits/basic_string.h" 3 6242: template> 6242: 6242: 6242: 6242: basic_string(_InputIterator __beg, _InputIterator __end, 6242: const _Alloc& __a = _Alloc()) 6242: : _M_dataplus(_M_local_data(), __a) 6242: { _M_construct(__beg, __end); } 6242: # 646 "/usr/include/c++/8/bits/basic_string.h" 3 6242: ~basic_string() 6242: { _M_dispose(); } 6242: 6242: 6242: 6242: 6242: 6242: basic_string& 6242: operator=(const basic_string& __str) 6242: { 6242: 6242: if (_Alloc_traits::_S_propagate_on_copy_assign()) 6242: { 6242: if (!_Alloc_traits::_S_always_equal() && !_M_is_local() 6242: && _M_get_allocator() != __str._M_get_allocator()) 6242: { 6242: 6242: 6242: if (__str.size() <= _S_local_capacity) 6242: { 6242: _M_destroy(_M_allocated_capacity); 6242: _M_data(_M_local_data()); 6242: _M_set_length(0); 6242: } 6242: else 6242: { 6242: const auto __len = __str.size(); 6242: auto __alloc = __str._M_get_allocator(); 6242: 6242: auto __ptr = _Alloc_traits::allocate(__alloc, __len + 1); 6242: _M_destroy(_M_allocated_capacity); 6242: _M_data(__ptr); 6242: _M_capacity(__len); 6242: _M_set_length(__len); 6242: } 6242: } 6242: std::__alloc_on_copy(_M_get_allocator(), __str._M_get_allocator()); 6242: } 6242: 6242: return this->assign(__str); 6242: } 6242: 6242: 6242: 6242: 6242: 6242: basic_string& 6242: operator=(const _CharT* __s) 6242: { return this->assign(__s); } 6242: # 703 "/usr/include/c++/8/bits/basic_string.h" 3 6242: basic_string& 6242: operator=(_CharT __c) 6242: { 6242: this->assign(1, __c); 6242: return *this; 6242: } 6242: # 721 "/usr/include/c++/8/bits/basic_string.h" 3 6242: basic_string& 6242: operator=(basic_string&& __str) 6242: noexcept(_Alloc_traits::_S_nothrow_move()) 6242: { 6242: if (!_M_is_local() && _Alloc_traits::_S_propagate_on_move_assign() 6242: && !_Alloc_traits::_S_always_equal() 6242: && _M_get_allocator() != __str._M_get_allocator()) 6242: { 6242: 6242: _M_destroy(_M_allocated_capacity); 6242: _M_data(_M_local_data()); 6242: _M_set_length(0); 6242: } 6242: 6242: std::__alloc_on_move(_M_get_allocator(), __str._M_get_allocator()); 6242: 6242: if (!__str._M_is_local() 6242: && (_Alloc_traits::_S_propagate_on_move_assign() 6242: || _Alloc_traits::_S_always_equal())) 6242: { 6242: pointer __data = nullptr; 6242: size_type __capacity; 6242: if (!_M_is_local()) 6242: { 6242: if (_Alloc_traits::_S_always_equal()) 6242: { 6242: __data = _M_data(); 6242: __capacity = _M_allocated_capacity; 6242: } 6242: else 6242: _M_destroy(_M_allocated_capacity); 6242: } 6242: 6242: _M_data(__str._M_data()); 6242: _M_length(__str.length()); 6242: _M_capacity(__str._M_allocated_capacity); 6242: if (__data) 6242: { 6242: __str._M_data(__data); 6242: __str._M_capacity(__capacity); 6242: } 6242: else 6242: __str._M_data(__str._M_local_buf); 6242: } 6242: else 6242: assign(__str); 6242: __str.clear(); 6242: return *this; 6242: } 6242: 6242: 6242: 6242: 6242: 6242: basic_string& 6242: operator=(initializer_list<_CharT> __l) 6242: { 6242: this->assign(__l.begin(), __l.size()); 6242: return *this; 6242: } 6242: # 806 "/usr/include/c++/8/bits/basic_string.h" 3 6242: iterator 6242: begin() noexcept 6242: { return iterator(_M_data()); } 6242: 6242: 6242: 6242: 6242: 6242: const_iterator 6242: begin() const noexcept 6242: { return const_iterator(_M_data()); } 6242: 6242: 6242: 6242: 6242: 6242: iterator 6242: end() noexcept 6242: { return iterator(_M_data() + this->size()); } 6242: 6242: 6242: 6242: 6242: 6242: const_iterator 6242: end() const noexcept 6242: { return const_iterator(_M_data() + this->size()); } 6242: 6242: 6242: 6242: 6242: 6242: 6242: reverse_iterator 6242: rbegin() noexcept 6242: { return reverse_iterator(this->end()); } 6242: 6242: 6242: 6242: 6242: 6242: 6242: const_reverse_iterator 6242: rbegin() const noexcept 6242: { return const_reverse_iterator(this->end()); } 6242: 6242: 6242: 6242: 6242: 6242: 6242: reverse_iterator 6242: rend() noexcept 6242: { return reverse_iterator(this->begin()); } 6242: 6242: 6242: 6242: 6242: 6242: 6242: const_reverse_iterator 6242: rend() const noexcept 6242: { return const_reverse_iterator(this->begin()); } 6242: 6242: 6242: 6242: 6242: 6242: 6242: const_iterator 6242: cbegin() const noexcept 6242: { return const_iterator(this->_M_data()); } 6242: 6242: 6242: 6242: 6242: 6242: const_iterator 6242: cend() const noexcept 6242: { return const_iterator(this->_M_data() + this->size()); } 6242: 6242: 6242: 6242: 6242: 6242: 6242: const_reverse_iterator 6242: crbegin() const noexcept 6242: { return const_reverse_iterator(this->end()); } 6242: 6242: 6242: 6242: 6242: 6242: 6242: const_reverse_iterator 6242: crend() const noexcept 6242: { return const_reverse_iterator(this->begin()); } 6242: 6242: 6242: public: 6242: 6242: 6242: 6242: size_type 6242: size() const noexcept 6242: { return _M_string_length; } 6242: 6242: 6242: 6242: size_type 6242: length() const noexcept 6242: { return _M_string_length; } 6242: 6242: 6242: size_type 6242: max_size() const noexcept 6242: { return (_Alloc_traits::max_size(_M_get_allocator()) - 1) / 2; } 6242: # 935 "/usr/include/c++/8/bits/basic_string.h" 3 6242: void 6242: resize(size_type __n, _CharT __c); 6242: # 948 "/usr/include/c++/8/bits/basic_string.h" 3 6242: void 6242: resize(size_type __n) 6242: { this->resize(__n, _CharT()); } 6242: 6242: 6242: 6242: void 6242: shrink_to_fit() noexcept 6242: { 6242: 6242: if (capacity() > size()) 6242: { 6242: try 6242: { reserve(0); } 6242: catch(...) 6242: { } 6242: } 6242: 6242: } 6242: 6242: 6242: 6242: 6242: 6242: 6242: size_type 6242: capacity() const noexcept 6242: { 6242: return _M_is_local() ? size_type(_S_local_capacity) 6242: : _M_allocated_capacity; 6242: } 6242: # 997 "/usr/include/c++/8/bits/basic_string.h" 3 6242: void 6242: reserve(size_type __res_arg = 0); 6242: 6242: 6242: 6242: 6242: void 6242: clear() noexcept 6242: { _M_set_length(0); } 6242: 6242: 6242: 6242: 6242: 6242: bool 6242: empty() const noexcept 6242: { return this->size() == 0; } 6242: # 1026 "/usr/include/c++/8/bits/basic_string.h" 3 6242: const_reference 6242: operator[] (size_type __pos) const noexcept 6242: { 6242: ; 6242: return _M_data()[__pos]; 6242: } 6242: # 1043 "/usr/include/c++/8/bits/basic_string.h" 3 6242: reference 6242: operator[](size_type __pos) 6242: { 6242: 6242: 6242: ; 6242: 6242: ; 6242: return _M_data()[__pos]; 6242: } 6242: # 1064 "/usr/include/c++/8/bits/basic_string.h" 3 6242: const_reference 6242: at(size_type __n) const 6242: { 6242: if (__n >= this->size()) 6242: __throw_out_of_range_fmt(("basic_string::at: __n " "(which is %zu) >= this->size() " "(which is %zu)") 6242: 6242: , 6242: __n, this->size()); 6242: return _M_data()[__n]; 6242: } 6242: # 1085 "/usr/include/c++/8/bits/basic_string.h" 3 6242: reference 6242: at(size_type __n) 6242: { 6242: if (__n >= size()) 6242: __throw_out_of_range_fmt(("basic_string::at: __n " "(which is %zu) >= this->size() " "(which is %zu)") 6242: 6242: , 6242: __n, this->size()); 6242: return _M_data()[__n]; 6242: } 6242: 6242: 6242: 6242: 6242: 6242: 6242: reference 6242: front() noexcept 6242: { 6242: ; 6242: return operator[](0); 6242: } 6242: 6242: 6242: 6242: 6242: 6242: const_reference 6242: front() const noexcept 6242: { 6242: ; 6242: return operator[](0); 6242: } 6242: 6242: 6242: 6242: 6242: 6242: reference 6242: back() noexcept 6242: { 6242: ; 6242: return operator[](this->size() - 1); 6242: } 6242: 6242: 6242: 6242: 6242: 6242: const_reference 6242: back() const noexcept 6242: { 6242: ; 6242: return operator[](this->size() - 1); 6242: } 6242: # 1148 "/usr/include/c++/8/bits/basic_string.h" 3 6242: basic_string& 6242: operator+=(const basic_string& __str) 6242: { return this->append(__str); } 6242: 6242: 6242: 6242: 6242: 6242: 6242: basic_string& 6242: operator+=(const _CharT* __s) 6242: { return this->append(__s); } 6242: 6242: 6242: 6242: 6242: 6242: 6242: basic_string& 6242: operator+=(_CharT __c) 6242: { 6242: this->push_back(__c); 6242: return *this; 6242: } 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: basic_string& 6242: operator+=(initializer_list<_CharT> __l) 6242: { return this->append(__l.begin(), __l.size()); } 6242: # 1201 "/usr/include/c++/8/bits/basic_string.h" 3 6242: basic_string& 6242: append(const basic_string& __str) 6242: { return _M_append(__str._M_data(), __str.size()); } 6242: # 1218 "/usr/include/c++/8/bits/basic_string.h" 3 6242: basic_string& 6242: append(const basic_string& __str, size_type __pos, size_type __n) 6242: { return _M_append(__str._M_data() 6242: + __str._M_check(__pos, "basic_string::append"), 6242: __str._M_limit(__pos, __n)); } 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: basic_string& 6242: append(const _CharT* __s, size_type __n) 6242: { 6242: ; 6242: _M_check_length(size_type(0), __n, "basic_string::append"); 6242: return _M_append(__s, __n); 6242: } 6242: 6242: 6242: 6242: 6242: 6242: 6242: basic_string& 6242: append(const _CharT* __s) 6242: { 6242: ; 6242: const size_type __n = traits_type::length(__s); 6242: _M_check_length(size_type(0), __n, "basic_string::append"); 6242: return _M_append(__s, __n); 6242: } 6242: # 1260 "/usr/include/c++/8/bits/basic_string.h" 3 6242: basic_string& 6242: append(size_type __n, _CharT __c) 6242: { return _M_replace_aux(this->size(), size_type(0), __n, __c); } 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: basic_string& 6242: append(initializer_list<_CharT> __l) 6242: { return this->append(__l.begin(), __l.size()); } 6242: # 1284 "/usr/include/c++/8/bits/basic_string.h" 3 6242: template> 6242: 6242: 6242: 6242: basic_string& 6242: append(_InputIterator __first, _InputIterator __last) 6242: { return this->replace(end(), end(), __first, __last); } 6242: # 1329 "/usr/include/c++/8/bits/basic_string.h" 3 6242: void 6242: push_back(_CharT __c) 6242: { 6242: const size_type __size = this->size(); 6242: if (__size + 1 > this->capacity()) 6242: this->_M_mutate(__size, size_type(0), 0, size_type(1)); 6242: traits_type::assign(this->_M_data()[__size], __c); 6242: this->_M_set_length(__size + 1); 6242: } 6242: 6242: 6242: 6242: 6242: 6242: 6242: basic_string& 6242: assign(const basic_string& __str) 6242: { 6242: this->_M_assign(__str); 6242: return *this; 6242: } 6242: # 1360 "/usr/include/c++/8/bits/basic_string.h" 3 6242: basic_string& 6242: assign(basic_string&& __str) 6242: noexcept(_Alloc_traits::_S_nothrow_move()) 6242: { 6242: 6242: 6242: return *this = std::move(__str); 6242: } 6242: # 1383 "/usr/include/c++/8/bits/basic_string.h" 3 6242: basic_string& 6242: assign(const basic_string& __str, size_type __pos, size_type __n) 6242: { return _M_replace(size_type(0), this->size(), __str._M_data() 6242: + __str._M_check(__pos, "basic_string::assign"), 6242: __str._M_limit(__pos, __n)); } 6242: # 1399 "/usr/include/c++/8/bits/basic_string.h" 3 6242: basic_string& 6242: assign(const _CharT* __s, size_type __n) 6242: { 6242: ; 6242: return _M_replace(size_type(0), this->size(), __s, __n); 6242: } 6242: # 1415 "/usr/include/c++/8/bits/basic_string.h" 3 6242: basic_string& 6242: assign(const _CharT* __s) 6242: { 6242: ; 6242: return _M_replace(size_type(0), this->size(), __s, 6242: traits_type::length(__s)); 6242: } 6242: # 1432 "/usr/include/c++/8/bits/basic_string.h" 3 6242: basic_string& 6242: assign(size_type __n, _CharT __c) 6242: { return _M_replace_aux(size_type(0), this->size(), __n, __c); } 6242: # 1445 "/usr/include/c++/8/bits/basic_string.h" 3 6242: template> 6242: 6242: 6242: 6242: basic_string& 6242: assign(_InputIterator __first, _InputIterator __last) 6242: { return this->replace(begin(), end(), __first, __last); } 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: basic_string& 6242: assign(initializer_list<_CharT> __l) 6242: { return this->assign(__l.begin(), __l.size()); } 6242: # 1513 "/usr/include/c++/8/bits/basic_string.h" 3 6242: iterator 6242: insert(const_iterator __p, size_type __n, _CharT __c) 6242: { 6242: ; 6242: const size_type __pos = __p - begin(); 6242: this->replace(__p, __p, __n, __c); 6242: return iterator(this->_M_data() + __pos); 6242: } 6242: # 1555 "/usr/include/c++/8/bits/basic_string.h" 3 6242: template> 6242: iterator 6242: insert(const_iterator __p, _InputIterator __beg, _InputIterator __end) 6242: { 6242: ; 6242: const size_type __pos = __p - begin(); 6242: this->replace(__p, __p, __beg, __end); 6242: return iterator(this->_M_data() + __pos); 6242: } 6242: # 1591 "/usr/include/c++/8/bits/basic_string.h" 3 6242: void 6242: insert(iterator __p, initializer_list<_CharT> __l) 6242: { 6242: ; 6242: this->insert(__p - begin(), __l.begin(), __l.size()); 6242: } 6242: # 1611 "/usr/include/c++/8/bits/basic_string.h" 3 6242: basic_string& 6242: insert(size_type __pos1, const basic_string& __str) 6242: { return this->replace(__pos1, size_type(0), 6242: __str._M_data(), __str.size()); } 6242: # 1634 "/usr/include/c++/8/bits/basic_string.h" 3 6242: basic_string& 6242: insert(size_type __pos1, const basic_string& __str, 6242: size_type __pos2, size_type __n) 6242: { return this->replace(__pos1, size_type(0), __str._M_data() 6242: + __str._M_check(__pos2, "basic_string::insert"), 6242: __str._M_limit(__pos2, __n)); } 6242: # 1657 "/usr/include/c++/8/bits/basic_string.h" 3 6242: basic_string& 6242: insert(size_type __pos, const _CharT* __s, size_type __n) 6242: { return this->replace(__pos, size_type(0), __s, __n); } 6242: # 1676 "/usr/include/c++/8/bits/basic_string.h" 3 6242: basic_string& 6242: insert(size_type __pos, const _CharT* __s) 6242: { 6242: ; 6242: return this->replace(__pos, size_type(0), __s, 6242: traits_type::length(__s)); 6242: } 6242: # 1700 "/usr/include/c++/8/bits/basic_string.h" 3 6242: basic_string& 6242: insert(size_type __pos, size_type __n, _CharT __c) 6242: { return _M_replace_aux(_M_check(__pos, "basic_string::insert"), 6242: size_type(0), __n, __c); } 6242: # 1718 "/usr/include/c++/8/bits/basic_string.h" 3 6242: iterator 6242: insert(__const_iterator __p, _CharT __c) 6242: { 6242: ; 6242: const size_type __pos = __p - begin(); 6242: _M_replace_aux(__pos, size_type(0), size_type(1), __c); 6242: return iterator(_M_data() + __pos); 6242: } 6242: # 1778 "/usr/include/c++/8/bits/basic_string.h" 3 6242: basic_string& 6242: erase(size_type __pos = 0, size_type __n = npos) 6242: { 6242: _M_check(__pos, "basic_string::erase"); 6242: if (__n == npos) 6242: this->_M_set_length(__pos); 6242: else if (__n != 0) 6242: this->_M_erase(__pos, _M_limit(__pos, __n)); 6242: return *this; 6242: } 6242: # 1797 "/usr/include/c++/8/bits/basic_string.h" 3 6242: iterator 6242: erase(__const_iterator __position) 6242: { 6242: 6242: ; 6242: const size_type __pos = __position - begin(); 6242: this->_M_erase(__pos, size_type(1)); 6242: return iterator(_M_data() + __pos); 6242: } 6242: # 1816 "/usr/include/c++/8/bits/basic_string.h" 3 6242: iterator 6242: erase(__const_iterator __first, __const_iterator __last) 6242: { 6242: 6242: ; 6242: const size_type __pos = __first - begin(); 6242: if (__last == end()) 6242: this->_M_set_length(__pos); 6242: else 6242: this->_M_erase(__pos, __last - __first); 6242: return iterator(this->_M_data() + __pos); 6242: } 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: void 6242: pop_back() noexcept 6242: { 6242: ; 6242: _M_erase(size() - 1, 1); 6242: } 6242: # 1860 "/usr/include/c++/8/bits/basic_string.h" 3 6242: basic_string& 6242: replace(size_type __pos, size_type __n, const basic_string& __str) 6242: { return this->replace(__pos, __n, __str._M_data(), __str.size()); } 6242: # 1882 "/usr/include/c++/8/bits/basic_string.h" 3 6242: basic_string& 6242: replace(size_type __pos1, size_type __n1, const basic_string& __str, 6242: size_type __pos2, size_type __n2) 6242: { return this->replace(__pos1, __n1, __str._M_data() 6242: + __str._M_check(__pos2, "basic_string::replace"), 6242: __str._M_limit(__pos2, __n2)); } 6242: # 1907 "/usr/include/c++/8/bits/basic_string.h" 3 6242: basic_string& 6242: replace(size_type __pos, size_type __n1, const _CharT* __s, 6242: size_type __n2) 6242: { 6242: ; 6242: return _M_replace(_M_check(__pos, "basic_string::replace"), 6242: _M_limit(__pos, __n1), __s, __n2); 6242: } 6242: # 1932 "/usr/include/c++/8/bits/basic_string.h" 3 6242: basic_string& 6242: replace(size_type __pos, size_type __n1, const _CharT* __s) 6242: { 6242: ; 6242: return this->replace(__pos, __n1, __s, traits_type::length(__s)); 6242: } 6242: # 1956 "/usr/include/c++/8/bits/basic_string.h" 3 6242: basic_string& 6242: replace(size_type __pos, size_type __n1, size_type __n2, _CharT __c) 6242: { return _M_replace_aux(_M_check(__pos, "basic_string::replace"), 6242: _M_limit(__pos, __n1), __n2, __c); } 6242: # 1974 "/usr/include/c++/8/bits/basic_string.h" 3 6242: basic_string& 6242: replace(__const_iterator __i1, __const_iterator __i2, 6242: const basic_string& __str) 6242: { return this->replace(__i1, __i2, __str._M_data(), __str.size()); } 6242: # 1994 "/usr/include/c++/8/bits/basic_string.h" 3 6242: basic_string& 6242: replace(__const_iterator __i1, __const_iterator __i2, 6242: const _CharT* __s, size_type __n) 6242: { 6242: 6242: ; 6242: return this->replace(__i1 - begin(), __i2 - __i1, __s, __n); 6242: } 6242: # 2016 "/usr/include/c++/8/bits/basic_string.h" 3 6242: basic_string& 6242: replace(__const_iterator __i1, __const_iterator __i2, const _CharT* __s) 6242: { 6242: ; 6242: return this->replace(__i1, __i2, __s, traits_type::length(__s)); 6242: } 6242: # 2037 "/usr/include/c++/8/bits/basic_string.h" 3 6242: basic_string& 6242: replace(__const_iterator __i1, __const_iterator __i2, size_type __n, 6242: _CharT __c) 6242: { 6242: 6242: ; 6242: return _M_replace_aux(__i1 - begin(), __i2 - __i1, __n, __c); 6242: } 6242: # 2062 "/usr/include/c++/8/bits/basic_string.h" 3 6242: template> 6242: basic_string& 6242: replace(const_iterator __i1, const_iterator __i2, 6242: _InputIterator __k1, _InputIterator __k2) 6242: { 6242: 6242: ; 6242: ; 6242: return this->_M_replace_dispatch(__i1, __i2, __k1, __k2, 6242: std::__false_type()); 6242: } 6242: # 2094 "/usr/include/c++/8/bits/basic_string.h" 3 6242: basic_string& 6242: replace(__const_iterator __i1, __const_iterator __i2, 6242: _CharT* __k1, _CharT* __k2) 6242: { 6242: 6242: ; 6242: ; 6242: return this->replace(__i1 - begin(), __i2 - __i1, 6242: __k1, __k2 - __k1); 6242: } 6242: 6242: basic_string& 6242: replace(__const_iterator __i1, __const_iterator __i2, 6242: const _CharT* __k1, const _CharT* __k2) 6242: { 6242: 6242: ; 6242: ; 6242: return this->replace(__i1 - begin(), __i2 - __i1, 6242: __k1, __k2 - __k1); 6242: } 6242: 6242: basic_string& 6242: replace(__const_iterator __i1, __const_iterator __i2, 6242: iterator __k1, iterator __k2) 6242: { 6242: 6242: ; 6242: ; 6242: return this->replace(__i1 - begin(), __i2 - __i1, 6242: __k1.base(), __k2 - __k1); 6242: } 6242: 6242: basic_string& 6242: replace(__const_iterator __i1, __const_iterator __i2, 6242: const_iterator __k1, const_iterator __k2) 6242: { 6242: 6242: ; 6242: ; 6242: return this->replace(__i1 - begin(), __i2 - __i1, 6242: __k1.base(), __k2 - __k1); 6242: } 6242: # 2153 "/usr/include/c++/8/bits/basic_string.h" 3 6242: basic_string& replace(const_iterator __i1, const_iterator __i2, 6242: initializer_list<_CharT> __l) 6242: { return this->replace(__i1, __i2, __l.begin(), __l.size()); } 6242: # 2212 "/usr/include/c++/8/bits/basic_string.h" 3 6242: private: 6242: template 6242: basic_string& 6242: _M_replace_dispatch(const_iterator __i1, const_iterator __i2, 6242: _Integer __n, _Integer __val, __true_type) 6242: { return _M_replace_aux(__i1 - begin(), __i2 - __i1, __n, __val); } 6242: 6242: template 6242: basic_string& 6242: _M_replace_dispatch(const_iterator __i1, const_iterator __i2, 6242: _InputIterator __k1, _InputIterator __k2, 6242: __false_type); 6242: 6242: basic_string& 6242: _M_replace_aux(size_type __pos1, size_type __n1, size_type __n2, 6242: _CharT __c); 6242: 6242: basic_string& 6242: _M_replace(size_type __pos, size_type __len1, const _CharT* __s, 6242: const size_type __len2); 6242: 6242: basic_string& 6242: _M_append(const _CharT* __s, size_type __n); 6242: 6242: public: 6242: # 2250 "/usr/include/c++/8/bits/basic_string.h" 3 6242: size_type 6242: copy(_CharT* __s, size_type __n, size_type __pos = 0) const; 6242: # 2260 "/usr/include/c++/8/bits/basic_string.h" 3 6242: void 6242: swap(basic_string& __s) noexcept; 6242: # 2270 "/usr/include/c++/8/bits/basic_string.h" 3 6242: const _CharT* 6242: c_str() const noexcept 6242: { return _M_data(); } 6242: # 2282 "/usr/include/c++/8/bits/basic_string.h" 3 6242: const _CharT* 6242: data() const noexcept 6242: { return _M_data(); } 6242: # 2301 "/usr/include/c++/8/bits/basic_string.h" 3 6242: allocator_type 6242: get_allocator() const noexcept 6242: { return _M_get_allocator(); } 6242: # 2317 "/usr/include/c++/8/bits/basic_string.h" 3 6242: size_type 6242: find(const _CharT* __s, size_type __pos, size_type __n) const 6242: noexcept; 6242: # 2331 "/usr/include/c++/8/bits/basic_string.h" 3 6242: size_type 6242: find(const basic_string& __str, size_type __pos = 0) const 6242: noexcept 6242: { return this->find(__str.data(), __pos, __str.size()); } 6242: # 2363 "/usr/include/c++/8/bits/basic_string.h" 3 6242: size_type 6242: find(const _CharT* __s, size_type __pos = 0) const noexcept 6242: { 6242: ; 6242: return this->find(__s, __pos, traits_type::length(__s)); 6242: } 6242: # 2380 "/usr/include/c++/8/bits/basic_string.h" 3 6242: size_type 6242: find(_CharT __c, size_type __pos = 0) const noexcept; 6242: # 2393 "/usr/include/c++/8/bits/basic_string.h" 3 6242: size_type 6242: rfind(const basic_string& __str, size_type __pos = npos) const 6242: noexcept 6242: { return this->rfind(__str.data(), __pos, __str.size()); } 6242: # 2427 "/usr/include/c++/8/bits/basic_string.h" 3 6242: size_type 6242: rfind(const _CharT* __s, size_type __pos, size_type __n) const 6242: noexcept; 6242: # 2441 "/usr/include/c++/8/bits/basic_string.h" 3 6242: size_type 6242: rfind(const _CharT* __s, size_type __pos = npos) const 6242: { 6242: ; 6242: return this->rfind(__s, __pos, traits_type::length(__s)); 6242: } 6242: # 2458 "/usr/include/c++/8/bits/basic_string.h" 3 6242: size_type 6242: rfind(_CharT __c, size_type __pos = npos) const noexcept; 6242: # 2472 "/usr/include/c++/8/bits/basic_string.h" 3 6242: size_type 6242: find_first_of(const basic_string& __str, size_type __pos = 0) const 6242: noexcept 6242: { return this->find_first_of(__str.data(), __pos, __str.size()); } 6242: # 2507 "/usr/include/c++/8/bits/basic_string.h" 3 6242: size_type 6242: find_first_of(const _CharT* __s, size_type __pos, size_type __n) const 6242: noexcept; 6242: # 2521 "/usr/include/c++/8/bits/basic_string.h" 3 6242: size_type 6242: find_first_of(const _CharT* __s, size_type __pos = 0) const 6242: noexcept 6242: { 6242: ; 6242: return this->find_first_of(__s, __pos, traits_type::length(__s)); 6242: } 6242: # 2541 "/usr/include/c++/8/bits/basic_string.h" 3 6242: size_type 6242: find_first_of(_CharT __c, size_type __pos = 0) const noexcept 6242: { return this->find(__c, __pos); } 6242: # 2556 "/usr/include/c++/8/bits/basic_string.h" 3 6242: size_type 6242: find_last_of(const basic_string& __str, size_type __pos = npos) const 6242: noexcept 6242: { return this->find_last_of(__str.data(), __pos, __str.size()); } 6242: # 2591 "/usr/include/c++/8/bits/basic_string.h" 3 6242: size_type 6242: find_last_of(const _CharT* __s, size_type __pos, size_type __n) const 6242: noexcept; 6242: # 2605 "/usr/include/c++/8/bits/basic_string.h" 3 6242: size_type 6242: find_last_of(const _CharT* __s, size_type __pos = npos) const 6242: noexcept 6242: { 6242: ; 6242: return this->find_last_of(__s, __pos, traits_type::length(__s)); 6242: } 6242: # 2625 "/usr/include/c++/8/bits/basic_string.h" 3 6242: size_type 6242: find_last_of(_CharT __c, size_type __pos = npos) const noexcept 6242: { return this->rfind(__c, __pos); } 6242: # 2639 "/usr/include/c++/8/bits/basic_string.h" 3 6242: size_type 6242: find_first_not_of(const basic_string& __str, size_type __pos = 0) const 6242: noexcept 6242: { return this->find_first_not_of(__str.data(), __pos, __str.size()); } 6242: # 2674 "/usr/include/c++/8/bits/basic_string.h" 3 6242: size_type 6242: find_first_not_of(const _CharT* __s, size_type __pos, 6242: size_type __n) const noexcept; 6242: # 2688 "/usr/include/c++/8/bits/basic_string.h" 3 6242: size_type 6242: find_first_not_of(const _CharT* __s, size_type __pos = 0) const 6242: noexcept 6242: { 6242: ; 6242: return this->find_first_not_of(__s, __pos, traits_type::length(__s)); 6242: } 6242: # 2706 "/usr/include/c++/8/bits/basic_string.h" 3 6242: size_type 6242: find_first_not_of(_CharT __c, size_type __pos = 0) const 6242: noexcept; 6242: # 2721 "/usr/include/c++/8/bits/basic_string.h" 3 6242: size_type 6242: find_last_not_of(const basic_string& __str, size_type __pos = npos) const 6242: noexcept 6242: { return this->find_last_not_of(__str.data(), __pos, __str.size()); } 6242: # 2756 "/usr/include/c++/8/bits/basic_string.h" 3 6242: size_type 6242: find_last_not_of(const _CharT* __s, size_type __pos, 6242: size_type __n) const noexcept; 6242: # 2770 "/usr/include/c++/8/bits/basic_string.h" 3 6242: size_type 6242: find_last_not_of(const _CharT* __s, size_type __pos = npos) const 6242: noexcept 6242: { 6242: ; 6242: return this->find_last_not_of(__s, __pos, traits_type::length(__s)); 6242: } 6242: # 2788 "/usr/include/c++/8/bits/basic_string.h" 3 6242: size_type 6242: find_last_not_of(_CharT __c, size_type __pos = npos) const 6242: noexcept; 6242: # 2804 "/usr/include/c++/8/bits/basic_string.h" 3 6242: basic_string 6242: substr(size_type __pos = 0, size_type __n = npos) const 6242: { return basic_string(*this, 6242: _M_check(__pos, "basic_string::substr"), __n); } 6242: # 2823 "/usr/include/c++/8/bits/basic_string.h" 3 6242: int 6242: compare(const basic_string& __str) const 6242: { 6242: const size_type __size = this->size(); 6242: const size_type __osize = __str.size(); 6242: const size_type __len = std::min(__size, __osize); 6242: 6242: int __r = traits_type::compare(_M_data(), __str.data(), __len); 6242: if (!__r) 6242: __r = _S_compare(__size, __osize); 6242: return __r; 6242: } 6242: # 2916 "/usr/include/c++/8/bits/basic_string.h" 3 6242: int 6242: compare(size_type __pos, size_type __n, const basic_string& __str) const; 6242: # 2942 "/usr/include/c++/8/bits/basic_string.h" 3 6242: int 6242: compare(size_type __pos1, size_type __n1, const basic_string& __str, 6242: size_type __pos2, size_type __n2) const; 6242: # 2960 "/usr/include/c++/8/bits/basic_string.h" 3 6242: int 6242: compare(const _CharT* __s) const noexcept; 6242: # 2984 "/usr/include/c++/8/bits/basic_string.h" 3 6242: int 6242: compare(size_type __pos, size_type __n1, const _CharT* __s) const; 6242: # 3011 "/usr/include/c++/8/bits/basic_string.h" 3 6242: int 6242: compare(size_type __pos, size_type __n1, const _CharT* __s, 6242: size_type __n2) const; 6242: 6242: 6242: template friend class basic_stringbuf; 6242: }; 6242: } 6242: # 5886 "/usr/include/c++/8/bits/basic_string.h" 3 6242: template 6242: basic_string<_CharT, _Traits, _Alloc> 6242: operator+(const basic_string<_CharT, _Traits, _Alloc>& __lhs, 6242: const basic_string<_CharT, _Traits, _Alloc>& __rhs) 6242: { 6242: basic_string<_CharT, _Traits, _Alloc> __str(__lhs); 6242: __str.append(__rhs); 6242: return __str; 6242: } 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: template 6242: basic_string<_CharT,_Traits,_Alloc> 6242: operator+(const _CharT* __lhs, 6242: const basic_string<_CharT,_Traits,_Alloc>& __rhs); 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: template 6242: basic_string<_CharT,_Traits,_Alloc> 6242: operator+(_CharT __lhs, const basic_string<_CharT,_Traits,_Alloc>& __rhs); 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: template 6242: inline basic_string<_CharT, _Traits, _Alloc> 6242: operator+(const basic_string<_CharT, _Traits, _Alloc>& __lhs, 6242: const _CharT* __rhs) 6242: { 6242: basic_string<_CharT, _Traits, _Alloc> __str(__lhs); 6242: __str.append(__rhs); 6242: return __str; 6242: } 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: template 6242: inline basic_string<_CharT, _Traits, _Alloc> 6242: operator+(const basic_string<_CharT, _Traits, _Alloc>& __lhs, _CharT __rhs) 6242: { 6242: typedef basic_string<_CharT, _Traits, _Alloc> __string_type; 6242: typedef typename __string_type::size_type __size_type; 6242: __string_type __str(__lhs); 6242: __str.append(__size_type(1), __rhs); 6242: return __str; 6242: } 6242: 6242: 6242: template 6242: inline basic_string<_CharT, _Traits, _Alloc> 6242: operator+(basic_string<_CharT, _Traits, _Alloc>&& __lhs, 6242: const basic_string<_CharT, _Traits, _Alloc>& __rhs) 6242: { return std::move(__lhs.append(__rhs)); } 6242: 6242: template 6242: inline basic_string<_CharT, _Traits, _Alloc> 6242: operator+(const basic_string<_CharT, _Traits, _Alloc>& __lhs, 6242: basic_string<_CharT, _Traits, _Alloc>&& __rhs) 6242: { return std::move(__rhs.insert(0, __lhs)); } 6242: 6242: template 6242: inline basic_string<_CharT, _Traits, _Alloc> 6242: operator+(basic_string<_CharT, _Traits, _Alloc>&& __lhs, 6242: basic_string<_CharT, _Traits, _Alloc>&& __rhs) 6242: { 6242: const auto __size = __lhs.size() + __rhs.size(); 6242: const bool __cond = (__size > __lhs.capacity() 6242: && __size <= __rhs.capacity()); 6242: return __cond ? std::move(__rhs.insert(0, __lhs)) 6242: : std::move(__lhs.append(__rhs)); 6242: } 6242: 6242: template 6242: inline basic_string<_CharT, _Traits, _Alloc> 6242: operator+(const _CharT* __lhs, 6242: basic_string<_CharT, _Traits, _Alloc>&& __rhs) 6242: { return std::move(__rhs.insert(0, __lhs)); } 6242: 6242: template 6242: inline basic_string<_CharT, _Traits, _Alloc> 6242: operator+(_CharT __lhs, 6242: basic_string<_CharT, _Traits, _Alloc>&& __rhs) 6242: { return std::move(__rhs.insert(0, 1, __lhs)); } 6242: 6242: template 6242: inline basic_string<_CharT, _Traits, _Alloc> 6242: operator+(basic_string<_CharT, _Traits, _Alloc>&& __lhs, 6242: const _CharT* __rhs) 6242: { return std::move(__lhs.append(__rhs)); } 6242: 6242: template 6242: inline basic_string<_CharT, _Traits, _Alloc> 6242: operator+(basic_string<_CharT, _Traits, _Alloc>&& __lhs, 6242: _CharT __rhs) 6242: { return std::move(__lhs.append(1, __rhs)); } 6242: # 6007 "/usr/include/c++/8/bits/basic_string.h" 3 6242: template 6242: inline bool 6242: operator==(const basic_string<_CharT, _Traits, _Alloc>& __lhs, 6242: const basic_string<_CharT, _Traits, _Alloc>& __rhs) 6242: noexcept 6242: { return __lhs.compare(__rhs) == 0; } 6242: 6242: template 6242: inline 6242: typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value, bool>::__type 6242: operator==(const basic_string<_CharT>& __lhs, 6242: const basic_string<_CharT>& __rhs) noexcept 6242: { return (__lhs.size() == __rhs.size() 6242: && !std::char_traits<_CharT>::compare(__lhs.data(), __rhs.data(), 6242: __lhs.size())); } 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: template 6242: inline bool 6242: operator==(const _CharT* __lhs, 6242: const basic_string<_CharT, _Traits, _Alloc>& __rhs) 6242: { return __rhs.compare(__lhs) == 0; } 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: template 6242: inline bool 6242: operator==(const basic_string<_CharT, _Traits, _Alloc>& __lhs, 6242: const _CharT* __rhs) 6242: { return __lhs.compare(__rhs) == 0; } 6242: # 6054 "/usr/include/c++/8/bits/basic_string.h" 3 6242: template 6242: inline bool 6242: operator!=(const basic_string<_CharT, _Traits, _Alloc>& __lhs, 6242: const basic_string<_CharT, _Traits, _Alloc>& __rhs) 6242: noexcept 6242: { return !(__lhs == __rhs); } 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: template 6242: inline bool 6242: operator!=(const _CharT* __lhs, 6242: const basic_string<_CharT, _Traits, _Alloc>& __rhs) 6242: { return !(__lhs == __rhs); } 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: template 6242: inline bool 6242: operator!=(const basic_string<_CharT, _Traits, _Alloc>& __lhs, 6242: const _CharT* __rhs) 6242: { return !(__lhs == __rhs); } 6242: # 6092 "/usr/include/c++/8/bits/basic_string.h" 3 6242: template 6242: inline bool 6242: operator<(const basic_string<_CharT, _Traits, _Alloc>& __lhs, 6242: const basic_string<_CharT, _Traits, _Alloc>& __rhs) 6242: noexcept 6242: { return __lhs.compare(__rhs) < 0; } 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: template 6242: inline bool 6242: operator<(const basic_string<_CharT, _Traits, _Alloc>& __lhs, 6242: const _CharT* __rhs) 6242: { return __lhs.compare(__rhs) < 0; } 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: template 6242: inline bool 6242: operator<(const _CharT* __lhs, 6242: const basic_string<_CharT, _Traits, _Alloc>& __rhs) 6242: { return __rhs.compare(__lhs) > 0; } 6242: # 6130 "/usr/include/c++/8/bits/basic_string.h" 3 6242: template 6242: inline bool 6242: operator>(const basic_string<_CharT, _Traits, _Alloc>& __lhs, 6242: const basic_string<_CharT, _Traits, _Alloc>& __rhs) 6242: noexcept 6242: { return __lhs.compare(__rhs) > 0; } 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: template 6242: inline bool 6242: operator>(const basic_string<_CharT, _Traits, _Alloc>& __lhs, 6242: const _CharT* __rhs) 6242: { return __lhs.compare(__rhs) > 0; } 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: template 6242: inline bool 6242: operator>(const _CharT* __lhs, 6242: const basic_string<_CharT, _Traits, _Alloc>& __rhs) 6242: { return __rhs.compare(__lhs) < 0; } 6242: # 6168 "/usr/include/c++/8/bits/basic_string.h" 3 6242: template 6242: inline bool 6242: operator<=(const basic_string<_CharT, _Traits, _Alloc>& __lhs, 6242: const basic_string<_CharT, _Traits, _Alloc>& __rhs) 6242: noexcept 6242: { return __lhs.compare(__rhs) <= 0; } 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: template 6242: inline bool 6242: operator<=(const basic_string<_CharT, _Traits, _Alloc>& __lhs, 6242: const _CharT* __rhs) 6242: { return __lhs.compare(__rhs) <= 0; } 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: template 6242: inline bool 6242: operator<=(const _CharT* __lhs, 6242: const basic_string<_CharT, _Traits, _Alloc>& __rhs) 6242: { return __rhs.compare(__lhs) >= 0; } 6242: # 6206 "/usr/include/c++/8/bits/basic_string.h" 3 6242: template 6242: inline bool 6242: operator>=(const basic_string<_CharT, _Traits, _Alloc>& __lhs, 6242: const basic_string<_CharT, _Traits, _Alloc>& __rhs) 6242: noexcept 6242: { return __lhs.compare(__rhs) >= 0; } 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: template 6242: inline bool 6242: operator>=(const basic_string<_CharT, _Traits, _Alloc>& __lhs, 6242: const _CharT* __rhs) 6242: { return __lhs.compare(__rhs) >= 0; } 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: template 6242: inline bool 6242: operator>=(const _CharT* __lhs, 6242: const basic_string<_CharT, _Traits, _Alloc>& __rhs) 6242: { return __rhs.compare(__lhs) <= 0; } 6242: # 6244 "/usr/include/c++/8/bits/basic_string.h" 3 6242: template 6242: inline void 6242: swap(basic_string<_CharT, _Traits, _Alloc>& __lhs, 6242: basic_string<_CharT, _Traits, _Alloc>& __rhs) 6242: noexcept(noexcept(__lhs.swap(__rhs))) 6242: { __lhs.swap(__rhs); } 6242: # 6264 "/usr/include/c++/8/bits/basic_string.h" 3 6242: template 6242: basic_istream<_CharT, _Traits>& 6242: operator>>(basic_istream<_CharT, _Traits>& __is, 6242: basic_string<_CharT, _Traits, _Alloc>& __str); 6242: 6242: template<> 6242: basic_istream& 6242: operator>>(basic_istream& __is, basic_string& __str); 6242: # 6282 "/usr/include/c++/8/bits/basic_string.h" 3 6242: template 6242: inline basic_ostream<_CharT, _Traits>& 6242: operator<<(basic_ostream<_CharT, _Traits>& __os, 6242: const basic_string<_CharT, _Traits, _Alloc>& __str) 6242: { 6242: 6242: 6242: return __ostream_insert(__os, __str.data(), __str.size()); 6242: } 6242: # 6305 "/usr/include/c++/8/bits/basic_string.h" 3 6242: template 6242: basic_istream<_CharT, _Traits>& 6242: getline(basic_istream<_CharT, _Traits>& __is, 6242: basic_string<_CharT, _Traits, _Alloc>& __str, _CharT __delim); 6242: # 6322 "/usr/include/c++/8/bits/basic_string.h" 3 6242: template 6242: inline basic_istream<_CharT, _Traits>& 6242: getline(basic_istream<_CharT, _Traits>& __is, 6242: basic_string<_CharT, _Traits, _Alloc>& __str) 6242: { return std::getline(__is, __str, __is.widen('\n')); } 6242: 6242: 6242: 6242: template 6242: inline basic_istream<_CharT, _Traits>& 6242: getline(basic_istream<_CharT, _Traits>&& __is, 6242: basic_string<_CharT, _Traits, _Alloc>& __str, _CharT __delim) 6242: { return std::getline(__is, __str, __delim); } 6242: 6242: 6242: template 6242: inline basic_istream<_CharT, _Traits>& 6242: getline(basic_istream<_CharT, _Traits>&& __is, 6242: basic_string<_CharT, _Traits, _Alloc>& __str) 6242: { return std::getline(__is, __str); } 6242: 6242: 6242: template<> 6242: basic_istream& 6242: getline(basic_istream& __in, basic_string& __str, 6242: char __delim); 6242: 6242: 6242: template<> 6242: basic_istream& 6242: getline(basic_istream& __in, basic_string& __str, 6242: wchar_t __delim); 6242: 6242: 6242: 6242: } 6242: 6242: 6242: 6242: # 1 "/usr/include/c++/8/ext/string_conversions.h" 1 3 6242: # 32 "/usr/include/c++/8/ext/string_conversions.h" 3 6242: 6242: # 33 "/usr/include/c++/8/ext/string_conversions.h" 3 6242: # 41 "/usr/include/c++/8/ext/string_conversions.h" 3 6242: # 1 "/usr/include/c++/8/cstdlib" 1 3 6242: # 39 "/usr/include/c++/8/cstdlib" 3 6242: 6242: # 40 "/usr/include/c++/8/cstdlib" 3 6242: # 75 "/usr/include/c++/8/cstdlib" 3 6242: # 1 "/usr/include/stdlib.h" 1 3 4 6242: # 25 "/usr/include/stdlib.h" 3 4 6242: # 1 "/usr/include/s390x-linux-gnu/bits/libc-header-start.h" 1 3 4 6242: # 26 "/usr/include/stdlib.h" 2 3 4 6242: 6242: 6242: 6242: 6242: 6242: # 1 "/usr/lib/gcc/s390x-linux-gnu/8/include/stddef.h" 1 3 4 6242: # 32 "/usr/include/stdlib.h" 2 3 4 6242: 6242: extern "C" { 6242: 6242: 6242: 6242: 6242: 6242: # 1 "/usr/include/s390x-linux-gnu/bits/waitflags.h" 1 3 4 6242: # 52 "/usr/include/s390x-linux-gnu/bits/waitflags.h" 3 4 6242: typedef enum 6242: { 6242: P_ALL, 6242: P_PID, 6242: P_PGID 6242: } idtype_t; 6242: # 40 "/usr/include/stdlib.h" 2 3 4 6242: # 1 "/usr/include/s390x-linux-gnu/bits/waitstatus.h" 1 3 4 6242: # 41 "/usr/include/stdlib.h" 2 3 4 6242: # 55 "/usr/include/stdlib.h" 3 4 6242: # 1 "/usr/include/s390x-linux-gnu/bits/floatn.h" 1 3 4 6242: # 56 "/usr/include/stdlib.h" 2 3 4 6242: 6242: 6242: typedef struct 6242: { 6242: int quot; 6242: int rem; 6242: } div_t; 6242: 6242: 6242: 6242: typedef struct 6242: { 6242: long int quot; 6242: long int rem; 6242: } ldiv_t; 6242: 6242: 6242: 6242: 6242: 6242: __extension__ typedef struct 6242: { 6242: long long int quot; 6242: long long int rem; 6242: } lldiv_t; 6242: # 97 "/usr/include/stdlib.h" 3 4 6242: extern size_t __ctype_get_mb_cur_max (void) throw () __attribute__ ((__warn_unused_result__)); 6242: 6242: 6242: 6242: extern double atof (const char *__nptr) 6242: throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); 6242: 6242: extern int atoi (const char *__nptr) 6242: throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); 6242: 6242: extern long int atol (const char *__nptr) 6242: throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); 6242: 6242: 6242: 6242: __extension__ extern long long int atoll (const char *__nptr) 6242: throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); 6242: 6242: 6242: 6242: extern double strtod (const char *__restrict __nptr, 6242: char **__restrict __endptr) 6242: throw () __attribute__ ((__nonnull__ (1))); 6242: 6242: 6242: 6242: extern float strtof (const char *__restrict __nptr, 6242: char **__restrict __endptr) throw () __attribute__ ((__nonnull__ (1))); 6242: 6242: extern long double strtold (const char *__restrict __nptr, 6242: char **__restrict __endptr) 6242: throw () __attribute__ ((__nonnull__ (1))); 6242: # 139 "/usr/include/stdlib.h" 3 4 6242: extern long int strtol (const char *__restrict __nptr, 6242: char **__restrict __endptr, int __base) 6242: throw () __attribute__ ((__nonnull__ (1))); 6242: 6242: extern unsigned long int strtoul (const char *__restrict __nptr, 6242: char **__restrict __endptr, int __base) 6242: throw () __attribute__ ((__nonnull__ (1))); 6242: 6242: 6242: 6242: __extension__ 6242: extern long long int strtoq (const char *__restrict __nptr, 6242: char **__restrict __endptr, int __base) 6242: throw () __attribute__ ((__nonnull__ (1))); 6242: 6242: __extension__ 6242: extern unsigned long long int strtouq (const char *__restrict __nptr, 6242: char **__restrict __endptr, int __base) 6242: throw () __attribute__ ((__nonnull__ (1))); 6242: 6242: 6242: 6242: 6242: __extension__ 6242: extern long long int strtoll (const char *__restrict __nptr, 6242: char **__restrict __endptr, int __base) 6242: throw () __attribute__ ((__nonnull__ (1))); 6242: 6242: __extension__ 6242: extern unsigned long long int strtoull (const char *__restrict __nptr, 6242: char **__restrict __endptr, int __base) 6242: throw () __attribute__ ((__nonnull__ (1))); 6242: 6242: 6242: 6242: 6242: extern int strfromd (char *__dest, size_t __size, const char *__format, 6242: double __f) 6242: throw () __attribute__ ((__nonnull__ (3))); 6242: 6242: extern int strfromf (char *__dest, size_t __size, const char *__format, 6242: float __f) 6242: throw () __attribute__ ((__nonnull__ (3))); 6242: 6242: extern int strfroml (char *__dest, size_t __size, const char *__format, 6242: long double __f) 6242: throw () __attribute__ ((__nonnull__ (3))); 6242: # 201 "/usr/include/stdlib.h" 3 4 6242: extern long int strtol_l (const char *__restrict __nptr, 6242: char **__restrict __endptr, int __base, 6242: locale_t __loc) throw () __attribute__ ((__nonnull__ (1, 4))); 6242: 6242: extern unsigned long int strtoul_l (const char *__restrict __nptr, 6242: char **__restrict __endptr, 6242: int __base, locale_t __loc) 6242: throw () __attribute__ ((__nonnull__ (1, 4))); 6242: 6242: __extension__ 6242: extern long long int strtoll_l (const char *__restrict __nptr, 6242: char **__restrict __endptr, int __base, 6242: locale_t __loc) 6242: throw () __attribute__ ((__nonnull__ (1, 4))); 6242: 6242: __extension__ 6242: extern unsigned long long int strtoull_l (const char *__restrict __nptr, 6242: char **__restrict __endptr, 6242: int __base, locale_t __loc) 6242: throw () __attribute__ ((__nonnull__ (1, 4))); 6242: 6242: extern double strtod_l (const char *__restrict __nptr, 6242: char **__restrict __endptr, locale_t __loc) 6242: throw () __attribute__ ((__nonnull__ (1, 3))); 6242: 6242: extern float strtof_l (const char *__restrict __nptr, 6242: char **__restrict __endptr, locale_t __loc) 6242: throw () __attribute__ ((__nonnull__ (1, 3))); 6242: 6242: extern long double strtold_l (const char *__restrict __nptr, 6242: char **__restrict __endptr, 6242: locale_t __loc) 6242: throw () __attribute__ ((__nonnull__ (1, 3))); 6242: # 245 "/usr/include/stdlib.h" 3 4 6242: extern __inline __attribute__ ((__gnu_inline__)) int 6242: __attribute__ ((__leaf__)) atoi (const char *__nptr) throw () 6242: { 6242: return (int) strtol (__nptr, (char **) __null, 10); 6242: } 6242: extern __inline __attribute__ ((__gnu_inline__)) long int 6242: __attribute__ ((__leaf__)) atol (const char *__nptr) throw () 6242: { 6242: return strtol (__nptr, (char **) __null, 10); 6242: } 6242: 6242: 6242: __extension__ extern __inline __attribute__ ((__gnu_inline__)) long long int 6242: __attribute__ ((__leaf__)) atoll (const char *__nptr) throw () 6242: { 6242: return strtoll (__nptr, (char **) __null, 10); 6242: } 6242: # 270 "/usr/include/stdlib.h" 3 4 6242: extern char *l64a (long int __n) throw () __attribute__ ((__warn_unused_result__)); 6242: 6242: 6242: extern long int a64l (const char *__s) 6242: throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); 6242: 6242: 6242: 6242: 6242: # 1 "/usr/include/s390x-linux-gnu/sys/types.h" 1 3 4 6242: # 27 "/usr/include/s390x-linux-gnu/sys/types.h" 3 4 6242: extern "C" { 6242: 6242: 6242: 6242: 6242: 6242: typedef __u_char u_char; 6242: typedef __u_short u_short; 6242: typedef __u_int u_int; 6242: typedef __u_long u_long; 6242: typedef __quad_t quad_t; 6242: typedef __u_quad_t u_quad_t; 6242: typedef __fsid_t fsid_t; 6242: 6242: 6242: 6242: 6242: typedef __loff_t loff_t; 6242: 6242: 6242: 6242: typedef __ino_t ino_t; 6242: 6242: 6242: 6242: 6242: 6242: 6242: typedef __ino64_t ino64_t; 6242: 6242: 6242: 6242: 6242: typedef __dev_t dev_t; 6242: 6242: 6242: 6242: 6242: typedef __gid_t gid_t; 6242: 6242: 6242: 6242: 6242: typedef __mode_t mode_t; 6242: 6242: 6242: 6242: 6242: typedef __nlink_t nlink_t; 6242: 6242: 6242: 6242: 6242: typedef __uid_t uid_t; 6242: 6242: 6242: 6242: 6242: 6242: typedef __off_t off_t; 6242: 6242: 6242: 6242: 6242: 6242: 6242: typedef __off64_t off64_t; 6242: # 104 "/usr/include/s390x-linux-gnu/sys/types.h" 3 4 6242: typedef __id_t id_t; 6242: 6242: 6242: 6242: 6242: typedef __ssize_t ssize_t; 6242: 6242: 6242: 6242: 6242: 6242: typedef __daddr_t daddr_t; 6242: typedef __caddr_t caddr_t; 6242: 6242: 6242: 6242: 6242: 6242: typedef __key_t key_t; 6242: # 135 "/usr/include/s390x-linux-gnu/sys/types.h" 3 4 6242: typedef __useconds_t useconds_t; 6242: 6242: 6242: 6242: typedef __suseconds_t suseconds_t; 6242: 6242: 6242: 6242: 6242: 6242: # 1 "/usr/lib/gcc/s390x-linux-gnu/8/include/stddef.h" 1 3 4 6242: # 146 "/usr/include/s390x-linux-gnu/sys/types.h" 2 3 4 6242: 6242: 6242: 6242: typedef unsigned long int ulong; 6242: typedef unsigned short int ushort; 6242: typedef unsigned int uint; 6242: # 178 "/usr/include/s390x-linux-gnu/sys/types.h" 3 4 6242: typedef unsigned int u_int8_t __attribute__ ((__mode__ (__QI__))); 6242: typedef unsigned int u_int16_t __attribute__ ((__mode__ (__HI__))); 6242: typedef unsigned int u_int32_t __attribute__ ((__mode__ (__SI__))); 6242: typedef unsigned int u_int64_t __attribute__ ((__mode__ (__DI__))); 6242: 6242: typedef int register_t __attribute__ ((__mode__ (__word__))); 6242: # 197 "/usr/include/s390x-linux-gnu/sys/types.h" 3 4 6242: # 1 "/usr/include/s390x-linux-gnu/sys/select.h" 1 3 4 6242: # 30 "/usr/include/s390x-linux-gnu/sys/select.h" 3 4 6242: # 1 "/usr/include/s390x-linux-gnu/bits/select.h" 1 3 4 6242: # 31 "/usr/include/s390x-linux-gnu/sys/select.h" 2 3 4 6242: 6242: 6242: # 1 "/usr/include/s390x-linux-gnu/bits/types/sigset_t.h" 1 3 4 6242: 6242: 6242: 6242: # 1 "/usr/include/s390x-linux-gnu/bits/types/__sigset_t.h" 1 3 4 6242: 6242: 6242: 6242: 6242: typedef struct 6242: { 6242: unsigned long int __val[(1024 / (8 * sizeof (unsigned long int)))]; 6242: } __sigset_t; 6242: # 5 "/usr/include/s390x-linux-gnu/bits/types/sigset_t.h" 2 3 4 6242: 6242: 6242: typedef __sigset_t sigset_t; 6242: # 34 "/usr/include/s390x-linux-gnu/sys/select.h" 2 3 4 6242: # 49 "/usr/include/s390x-linux-gnu/sys/select.h" 3 4 6242: typedef long int __fd_mask; 6242: # 59 "/usr/include/s390x-linux-gnu/sys/select.h" 3 4 6242: typedef struct 6242: { 6242: 6242: 6242: 6242: __fd_mask fds_bits[1024 / (8 * (int) sizeof (__fd_mask))]; 6242: 6242: 6242: 6242: 6242: 6242: } fd_set; 6242: 6242: 6242: 6242: 6242: 6242: 6242: typedef __fd_mask fd_mask; 6242: # 91 "/usr/include/s390x-linux-gnu/sys/select.h" 3 4 6242: extern "C" { 6242: # 101 "/usr/include/s390x-linux-gnu/sys/select.h" 3 4 6242: extern int select (int __nfds, fd_set *__restrict __readfds, 6242: fd_set *__restrict __writefds, 6242: fd_set *__restrict __exceptfds, 6242: struct timeval *__restrict __timeout); 6242: # 113 "/usr/include/s390x-linux-gnu/sys/select.h" 3 4 6242: extern int pselect (int __nfds, fd_set *__restrict __readfds, 6242: fd_set *__restrict __writefds, 6242: fd_set *__restrict __exceptfds, 6242: const struct timespec *__restrict __timeout, 6242: const __sigset_t *__restrict __sigmask); 6242: 6242: 6242: 6242: 6242: 6242: # 1 "/usr/include/s390x-linux-gnu/bits/select2.h" 1 3 4 6242: # 24 "/usr/include/s390x-linux-gnu/bits/select2.h" 3 4 6242: extern long int __fdelt_chk (long int __d); 6242: extern long int __fdelt_warn (long int __d) 6242: __attribute__((__warning__ ("bit outside of fd_set selected"))); 6242: # 124 "/usr/include/s390x-linux-gnu/sys/select.h" 2 3 4 6242: 6242: 6242: } 6242: # 198 "/usr/include/s390x-linux-gnu/sys/types.h" 2 3 4 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: # 1 "/usr/include/s390x-linux-gnu/sys/sysmacros.h" 1 3 4 6242: # 41 "/usr/include/s390x-linux-gnu/sys/sysmacros.h" 3 4 6242: # 1 "/usr/include/s390x-linux-gnu/bits/sysmacros.h" 1 3 4 6242: # 42 "/usr/include/s390x-linux-gnu/sys/sysmacros.h" 2 3 4 6242: # 71 "/usr/include/s390x-linux-gnu/sys/sysmacros.h" 3 4 6242: extern "C" { 6242: 6242: extern unsigned int gnu_dev_major (__dev_t __dev) throw () __attribute__ ((__const__)); 6242: extern unsigned int gnu_dev_minor (__dev_t __dev) throw () __attribute__ ((__const__)); 6242: extern __dev_t gnu_dev_makedev (unsigned int __major, unsigned int __minor) throw () __attribute__ ((__const__)); 6242: 6242: 6242: 6242: __extension__ extern __inline __attribute__ ((__gnu_inline__)) __attribute__ ((__const__)) unsigned int __attribute__ ((__leaf__)) gnu_dev_major (__dev_t __dev) throw () { unsigned int __major; __major = ((__dev & (__dev_t) 0x00000000000fff00u) >> 8); __major |= ((__dev & (__dev_t) 0xfffff00000000000u) >> 32); return __major; } 6242: __extension__ extern __inline __attribute__ ((__gnu_inline__)) __attribute__ ((__const__)) unsigned int __attribute__ ((__leaf__)) gnu_dev_minor (__dev_t __dev) throw () { unsigned int __minor; __minor = ((__dev & (__dev_t) 0x00000000000000ffu) >> 0); __minor |= ((__dev & (__dev_t) 0x00000ffffff00000u) >> 12); return __minor; } 6242: __extension__ extern __inline __attribute__ ((__gnu_inline__)) __attribute__ ((__const__)) __dev_t __attribute__ ((__leaf__)) gnu_dev_makedev (unsigned int __major, unsigned int __minor) throw () { __dev_t __dev; __dev = (((__dev_t) (__major & 0x00000fffu)) << 8); __dev |= (((__dev_t) (__major & 0xfffff000u)) << 32); __dev |= (((__dev_t) (__minor & 0x000000ffu)) << 0); __dev |= (((__dev_t) (__minor & 0xffffff00u)) << 12); return __dev; } 6242: 6242: 6242: 6242: } 6242: # 206 "/usr/include/s390x-linux-gnu/sys/types.h" 2 3 4 6242: 6242: 6242: 6242: 6242: 6242: 6242: typedef __blksize_t blksize_t; 6242: 6242: 6242: 6242: 6242: 6242: 6242: typedef __blkcnt_t blkcnt_t; 6242: 6242: 6242: 6242: typedef __fsblkcnt_t fsblkcnt_t; 6242: 6242: 6242: 6242: typedef __fsfilcnt_t fsfilcnt_t; 6242: # 246 "/usr/include/s390x-linux-gnu/sys/types.h" 3 4 6242: typedef __blkcnt64_t blkcnt64_t; 6242: typedef __fsblkcnt64_t fsblkcnt64_t; 6242: typedef __fsfilcnt64_t fsfilcnt64_t; 6242: # 257 "/usr/include/s390x-linux-gnu/sys/types.h" 3 4 6242: } 6242: # 280 "/usr/include/stdlib.h" 2 3 4 6242: 6242: 6242: 6242: 6242: 6242: 6242: extern long int random (void) throw (); 6242: 6242: 6242: extern void srandom (unsigned int __seed) throw (); 6242: 6242: 6242: 6242: 6242: 6242: extern char *initstate (unsigned int __seed, char *__statebuf, 6242: size_t __statelen) throw () __attribute__ ((__nonnull__ (2))); 6242: 6242: 6242: 6242: extern char *setstate (char *__statebuf) throw () __attribute__ ((__nonnull__ (1))); 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: struct random_data 6242: { 6242: int32_t *fptr; 6242: int32_t *rptr; 6242: int32_t *state; 6242: int rand_type; 6242: int rand_deg; 6242: int rand_sep; 6242: int32_t *end_ptr; 6242: }; 6242: 6242: extern int random_r (struct random_data *__restrict __buf, 6242: int32_t *__restrict __result) throw () __attribute__ ((__nonnull__ (1, 2))); 6242: 6242: extern int srandom_r (unsigned int __seed, struct random_data *__buf) 6242: throw () __attribute__ ((__nonnull__ (2))); 6242: 6242: extern int initstate_r (unsigned int __seed, char *__restrict __statebuf, 6242: size_t __statelen, 6242: struct random_data *__restrict __buf) 6242: throw () __attribute__ ((__nonnull__ (2, 4))); 6242: 6242: extern int setstate_r (char *__restrict __statebuf, 6242: struct random_data *__restrict __buf) 6242: throw () __attribute__ ((__nonnull__ (1, 2))); 6242: 6242: 6242: 6242: 6242: 6242: extern int rand (void) throw (); 6242: 6242: extern void srand (unsigned int __seed) throw (); 6242: 6242: 6242: 6242: extern int rand_r (unsigned int *__seed) throw (); 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: extern double drand48 (void) throw (); 6242: extern double erand48 (unsigned short int __xsubi[3]) throw () __attribute__ ((__nonnull__ (1))); 6242: 6242: 6242: extern long int lrand48 (void) throw (); 6242: extern long int nrand48 (unsigned short int __xsubi[3]) 6242: throw () __attribute__ ((__nonnull__ (1))); 6242: 6242: 6242: extern long int mrand48 (void) throw (); 6242: extern long int jrand48 (unsigned short int __xsubi[3]) 6242: throw () __attribute__ ((__nonnull__ (1))); 6242: 6242: 6242: extern void srand48 (long int __seedval) throw (); 6242: extern unsigned short int *seed48 (unsigned short int __seed16v[3]) 6242: throw () __attribute__ ((__nonnull__ (1))); 6242: extern void lcong48 (unsigned short int __param[7]) throw () __attribute__ ((__nonnull__ (1))); 6242: 6242: 6242: 6242: 6242: 6242: struct drand48_data 6242: { 6242: unsigned short int __x[3]; 6242: unsigned short int __old_x[3]; 6242: unsigned short int __c; 6242: unsigned short int __init; 6242: __extension__ unsigned long long int __a; 6242: 6242: }; 6242: 6242: 6242: extern int drand48_r (struct drand48_data *__restrict __buffer, 6242: double *__restrict __result) throw () __attribute__ ((__nonnull__ (1, 2))); 6242: extern int erand48_r (unsigned short int __xsubi[3], 6242: struct drand48_data *__restrict __buffer, 6242: double *__restrict __result) throw () __attribute__ ((__nonnull__ (1, 2))); 6242: 6242: 6242: extern int lrand48_r (struct drand48_data *__restrict __buffer, 6242: long int *__restrict __result) 6242: throw () __attribute__ ((__nonnull__ (1, 2))); 6242: extern int nrand48_r (unsigned short int __xsubi[3], 6242: struct drand48_data *__restrict __buffer, 6242: long int *__restrict __result) 6242: throw () __attribute__ ((__nonnull__ (1, 2))); 6242: 6242: 6242: extern int mrand48_r (struct drand48_data *__restrict __buffer, 6242: long int *__restrict __result) 6242: throw () __attribute__ ((__nonnull__ (1, 2))); 6242: extern int jrand48_r (unsigned short int __xsubi[3], 6242: struct drand48_data *__restrict __buffer, 6242: long int *__restrict __result) 6242: throw () __attribute__ ((__nonnull__ (1, 2))); 6242: 6242: 6242: extern int srand48_r (long int __seedval, struct drand48_data *__buffer) 6242: throw () __attribute__ ((__nonnull__ (2))); 6242: 6242: extern int seed48_r (unsigned short int __seed16v[3], 6242: struct drand48_data *__buffer) throw () __attribute__ ((__nonnull__ (1, 2))); 6242: 6242: extern int lcong48_r (unsigned short int __param[7], 6242: struct drand48_data *__buffer) 6242: throw () __attribute__ ((__nonnull__ (1, 2))); 6242: 6242: 6242: 6242: 6242: extern void *malloc (size_t __size) throw () __attribute__ ((__malloc__)) __attribute__ ((__warn_unused_result__)); 6242: 6242: extern void *calloc (size_t __nmemb, size_t __size) 6242: throw () __attribute__ ((__malloc__)) __attribute__ ((__warn_unused_result__)); 6242: 6242: 6242: 6242: 6242: 6242: 6242: extern void *realloc (void *__ptr, size_t __size) 6242: throw () __attribute__ ((__warn_unused_result__)); 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: extern void *reallocarray (void *__ptr, size_t __nmemb, size_t __size) 6242: throw () __attribute__ ((__warn_unused_result__)); 6242: 6242: 6242: 6242: extern void free (void *__ptr) throw (); 6242: 6242: 6242: # 1 "/usr/include/alloca.h" 1 3 4 6242: # 24 "/usr/include/alloca.h" 3 4 6242: # 1 "/usr/lib/gcc/s390x-linux-gnu/8/include/stddef.h" 1 3 4 6242: # 25 "/usr/include/alloca.h" 2 3 4 6242: 6242: extern "C" { 6242: 6242: 6242: 6242: 6242: 6242: extern void *alloca (size_t __size) throw (); 6242: 6242: 6242: 6242: 6242: 6242: } 6242: # 452 "/usr/include/stdlib.h" 2 3 4 6242: 6242: 6242: 6242: 6242: 6242: extern void *valloc (size_t __size) throw () __attribute__ ((__malloc__)) __attribute__ ((__warn_unused_result__)); 6242: 6242: 6242: 6242: 6242: extern int posix_memalign (void **__memptr, size_t __alignment, size_t __size) 6242: throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); 6242: 6242: 6242: 6242: 6242: extern void *aligned_alloc (size_t __alignment, size_t __size) 6242: throw () __attribute__ ((__malloc__)) __attribute__ ((__alloc_size__ (2))) __attribute__ ((__warn_unused_result__)); 6242: 6242: 6242: 6242: extern void abort (void) throw () __attribute__ ((__noreturn__)); 6242: 6242: 6242: 6242: extern int atexit (void (*__func) (void)) throw () __attribute__ ((__nonnull__ (1))); 6242: 6242: 6242: 6242: 6242: extern "C++" int at_quick_exit (void (*__func) (void)) 6242: throw () __asm ("at_quick_exit") __attribute__ ((__nonnull__ (1))); 6242: # 492 "/usr/include/stdlib.h" 3 4 6242: extern int on_exit (void (*__func) (int __status, void *__arg), void *__arg) 6242: throw () __attribute__ ((__nonnull__ (1))); 6242: 6242: 6242: 6242: 6242: 6242: extern void exit (int __status) throw () __attribute__ ((__noreturn__)); 6242: 6242: 6242: 6242: 6242: 6242: extern void quick_exit (int __status) throw () __attribute__ ((__noreturn__)); 6242: 6242: 6242: 6242: 6242: 6242: extern void _Exit (int __status) throw () __attribute__ ((__noreturn__)); 6242: 6242: 6242: 6242: 6242: extern char *getenv (const char *__name) throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); 6242: 6242: 6242: 6242: 6242: extern char *secure_getenv (const char *__name) 6242: throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); 6242: 6242: 6242: 6242: 6242: 6242: 6242: extern int putenv (char *__string) throw () __attribute__ ((__nonnull__ (1))); 6242: 6242: 6242: 6242: 6242: 6242: extern int setenv (const char *__name, const char *__value, int __replace) 6242: throw () __attribute__ ((__nonnull__ (2))); 6242: 6242: 6242: extern int unsetenv (const char *__name) throw () __attribute__ ((__nonnull__ (1))); 6242: 6242: 6242: 6242: 6242: 6242: 6242: extern int clearenv (void) throw (); 6242: # 557 "/usr/include/stdlib.h" 3 4 6242: extern char *mktemp (char *__template) throw () __attribute__ ((__nonnull__ (1))); 6242: # 570 "/usr/include/stdlib.h" 3 4 6242: extern int mkstemp (char *__template) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); 6242: # 580 "/usr/include/stdlib.h" 3 4 6242: extern int mkstemp64 (char *__template) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); 6242: # 592 "/usr/include/stdlib.h" 3 4 6242: extern int mkstemps (char *__template, int __suffixlen) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); 6242: # 602 "/usr/include/stdlib.h" 3 4 6242: extern int mkstemps64 (char *__template, int __suffixlen) 6242: __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); 6242: # 613 "/usr/include/stdlib.h" 3 4 6242: extern char *mkdtemp (char *__template) throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); 6242: # 624 "/usr/include/stdlib.h" 3 4 6242: extern int mkostemp (char *__template, int __flags) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); 6242: # 634 "/usr/include/stdlib.h" 3 4 6242: extern int mkostemp64 (char *__template, int __flags) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); 6242: # 644 "/usr/include/stdlib.h" 3 4 6242: extern int mkostemps (char *__template, int __suffixlen, int __flags) 6242: __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); 6242: # 656 "/usr/include/stdlib.h" 3 4 6242: extern int mkostemps64 (char *__template, int __suffixlen, int __flags) 6242: __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); 6242: # 666 "/usr/include/stdlib.h" 3 4 6242: extern int system (const char *__command) __attribute__ ((__warn_unused_result__)); 6242: 6242: 6242: 6242: 6242: 6242: extern char *canonicalize_file_name (const char *__name) 6242: throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); 6242: # 682 "/usr/include/stdlib.h" 3 4 6242: extern char *realpath (const char *__restrict __name, 6242: char *__restrict __resolved) throw () __attribute__ ((__warn_unused_result__)); 6242: 6242: 6242: 6242: 6242: 6242: 6242: typedef int (*__compar_fn_t) (const void *, const void *); 6242: 6242: 6242: typedef __compar_fn_t comparison_fn_t; 6242: 6242: 6242: 6242: typedef int (*__compar_d_fn_t) (const void *, const void *, void *); 6242: 6242: 6242: 6242: 6242: extern void *bsearch (const void *__key, const void *__base, 6242: size_t __nmemb, size_t __size, __compar_fn_t __compar) 6242: __attribute__ ((__nonnull__ (1, 2, 5))) __attribute__ ((__warn_unused_result__)); 6242: 6242: 6242: # 1 "/usr/include/s390x-linux-gnu/bits/stdlib-bsearch.h" 1 3 4 6242: # 19 "/usr/include/s390x-linux-gnu/bits/stdlib-bsearch.h" 3 4 6242: extern __inline __attribute__ ((__gnu_inline__)) void * 6242: bsearch (const void *__key, const void *__base, size_t __nmemb, size_t __size, 6242: __compar_fn_t __compar) 6242: { 6242: size_t __l, __u, __idx; 6242: const void *__p; 6242: int __comparison; 6242: 6242: __l = 0; 6242: __u = __nmemb; 6242: while (__l < __u) 6242: { 6242: __idx = (__l + __u) / 2; 6242: __p = (void *) (((const char *) __base) + (__idx * __size)); 6242: __comparison = (*__compar) (__key, __p); 6242: if (__comparison < 0) 6242: __u = __idx; 6242: else if (__comparison > 0) 6242: __l = __idx + 1; 6242: else 6242: return (void *) __p; 6242: } 6242: 6242: return __null; 6242: } 6242: # 708 "/usr/include/stdlib.h" 2 3 4 6242: 6242: 6242: 6242: 6242: extern void qsort (void *__base, size_t __nmemb, size_t __size, 6242: __compar_fn_t __compar) __attribute__ ((__nonnull__ (1, 4))); 6242: 6242: extern void qsort_r (void *__base, size_t __nmemb, size_t __size, 6242: __compar_d_fn_t __compar, void *__arg) 6242: __attribute__ ((__nonnull__ (1, 4))); 6242: 6242: 6242: 6242: 6242: extern int abs (int __x) throw () __attribute__ ((__const__)) __attribute__ ((__warn_unused_result__)); 6242: extern long int labs (long int __x) throw () __attribute__ ((__const__)) __attribute__ ((__warn_unused_result__)); 6242: 6242: 6242: __extension__ extern long long int llabs (long long int __x) 6242: throw () __attribute__ ((__const__)) __attribute__ ((__warn_unused_result__)); 6242: 6242: 6242: 6242: 6242: 6242: 6242: extern div_t div (int __numer, int __denom) 6242: throw () __attribute__ ((__const__)) __attribute__ ((__warn_unused_result__)); 6242: extern ldiv_t ldiv (long int __numer, long int __denom) 6242: throw () __attribute__ ((__const__)) __attribute__ ((__warn_unused_result__)); 6242: 6242: 6242: __extension__ extern lldiv_t lldiv (long long int __numer, 6242: long long int __denom) 6242: throw () __attribute__ ((__const__)) __attribute__ ((__warn_unused_result__)); 6242: # 754 "/usr/include/stdlib.h" 3 4 6242: extern char *ecvt (double __value, int __ndigit, int *__restrict __decpt, 6242: int *__restrict __sign) throw () __attribute__ ((__nonnull__ (3, 4))) __attribute__ ((__warn_unused_result__)); 6242: 6242: 6242: 6242: 6242: extern char *fcvt (double __value, int __ndigit, int *__restrict __decpt, 6242: int *__restrict __sign) throw () __attribute__ ((__nonnull__ (3, 4))) __attribute__ ((__warn_unused_result__)); 6242: 6242: 6242: 6242: 6242: extern char *gcvt (double __value, int __ndigit, char *__buf) 6242: throw () __attribute__ ((__nonnull__ (3))) __attribute__ ((__warn_unused_result__)); 6242: 6242: 6242: 6242: 6242: extern char *qecvt (long double __value, int __ndigit, 6242: int *__restrict __decpt, int *__restrict __sign) 6242: throw () __attribute__ ((__nonnull__ (3, 4))) __attribute__ ((__warn_unused_result__)); 6242: extern char *qfcvt (long double __value, int __ndigit, 6242: int *__restrict __decpt, int *__restrict __sign) 6242: throw () __attribute__ ((__nonnull__ (3, 4))) __attribute__ ((__warn_unused_result__)); 6242: extern char *qgcvt (long double __value, int __ndigit, char *__buf) 6242: throw () __attribute__ ((__nonnull__ (3))) __attribute__ ((__warn_unused_result__)); 6242: 6242: 6242: 6242: 6242: extern int ecvt_r (double __value, int __ndigit, int *__restrict __decpt, 6242: int *__restrict __sign, char *__restrict __buf, 6242: size_t __len) throw () __attribute__ ((__nonnull__ (3, 4, 5))); 6242: extern int fcvt_r (double __value, int __ndigit, int *__restrict __decpt, 6242: int *__restrict __sign, char *__restrict __buf, 6242: size_t __len) throw () __attribute__ ((__nonnull__ (3, 4, 5))); 6242: 6242: extern int qecvt_r (long double __value, int __ndigit, 6242: int *__restrict __decpt, int *__restrict __sign, 6242: char *__restrict __buf, size_t __len) 6242: throw () __attribute__ ((__nonnull__ (3, 4, 5))); 6242: extern int qfcvt_r (long double __value, int __ndigit, 6242: int *__restrict __decpt, int *__restrict __sign, 6242: char *__restrict __buf, size_t __len) 6242: throw () __attribute__ ((__nonnull__ (3, 4, 5))); 6242: 6242: 6242: 6242: 6242: 6242: extern int mblen (const char *__s, size_t __n) throw (); 6242: 6242: 6242: extern int mbtowc (wchar_t *__restrict __pwc, 6242: const char *__restrict __s, size_t __n) throw (); 6242: 6242: 6242: extern int wctomb (char *__s, wchar_t __wchar) throw (); 6242: 6242: 6242: 6242: extern size_t mbstowcs (wchar_t *__restrict __pwcs, 6242: const char *__restrict __s, size_t __n) throw (); 6242: 6242: extern size_t wcstombs (char *__restrict __s, 6242: const wchar_t *__restrict __pwcs, size_t __n) 6242: throw (); 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: extern int rpmatch (const char *__response) throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); 6242: # 839 "/usr/include/stdlib.h" 3 4 6242: extern int getsubopt (char **__restrict __optionp, 6242: char *const *__restrict __tokens, 6242: char **__restrict __valuep) 6242: throw () __attribute__ ((__nonnull__ (1, 2, 3))) __attribute__ ((__warn_unused_result__)); 6242: 6242: 6242: 6242: 6242: 6242: extern void setkey (const char *__key) throw () __attribute__ ((__nonnull__ (1))); 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: extern int posix_openpt (int __oflag) __attribute__ ((__warn_unused_result__)); 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: extern int grantpt (int __fd) throw (); 6242: 6242: 6242: 6242: extern int unlockpt (int __fd) throw (); 6242: 6242: 6242: 6242: 6242: extern char *ptsname (int __fd) throw () __attribute__ ((__warn_unused_result__)); 6242: 6242: 6242: 6242: 6242: 6242: 6242: extern int ptsname_r (int __fd, char *__buf, size_t __buflen) 6242: throw () __attribute__ ((__nonnull__ (2))); 6242: 6242: 6242: extern int getpt (void); 6242: 6242: 6242: 6242: 6242: 6242: 6242: extern int getloadavg (double __loadavg[], int __nelem) 6242: throw () __attribute__ ((__nonnull__ (1))); 6242: # 901 "/usr/include/stdlib.h" 3 4 6242: # 1 "/usr/include/s390x-linux-gnu/bits/stdlib-float.h" 1 3 4 6242: # 24 "/usr/include/s390x-linux-gnu/bits/stdlib-float.h" 3 4 6242: extern __inline __attribute__ ((__gnu_inline__)) double 6242: __attribute__ ((__leaf__)) atof (const char *__nptr) throw () 6242: { 6242: return strtod (__nptr, (char **) __null); 6242: } 6242: # 902 "/usr/include/stdlib.h" 2 3 4 6242: 6242: 6242: 6242: # 1 "/usr/include/s390x-linux-gnu/bits/stdlib.h" 1 3 4 6242: # 23 "/usr/include/s390x-linux-gnu/bits/stdlib.h" 3 4 6242: extern char *__realpath_chk (const char *__restrict __name, 6242: char *__restrict __resolved, 6242: size_t __resolvedlen) throw () __attribute__ ((__warn_unused_result__)); 6242: extern char *__realpath_alias (const char *__restrict __name, char *__restrict __resolved) throw () __asm__ ("" "realpath") 6242: 6242: __attribute__ ((__warn_unused_result__)); 6242: extern char *__realpath_chk_warn (const char *__restrict __name, char *__restrict __resolved, size_t __resolvedlen) throw () __asm__ ("" "__realpath_chk") 6242: 6242: 6242: __attribute__ ((__warn_unused_result__)) 6242: __attribute__((__warning__ ("second argument of realpath must be either NULL or at " "least PATH_MAX bytes long buffer"))) 6242: ; 6242: 6242: extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__warn_unused_result__)) char * 6242: __attribute__ ((__leaf__)) realpath (const char *__restrict __name, char *__restrict __resolved) throw () 6242: { 6242: if (__builtin_object_size (__resolved, 2 > 1) != (size_t) -1) 6242: { 6242: 6242: 6242: 6242: 6242: return __realpath_chk (__name, __resolved, __builtin_object_size (__resolved, 2 > 1)); 6242: } 6242: 6242: return __realpath_alias (__name, __resolved); 6242: } 6242: 6242: 6242: extern int __ptsname_r_chk (int __fd, char *__buf, size_t __buflen, 6242: size_t __nreal) throw () __attribute__ ((__nonnull__ (2))); 6242: extern int __ptsname_r_alias (int __fd, char *__buf, size_t __buflen) throw () __asm__ ("" "ptsname_r") 6242: 6242: __attribute__ ((__nonnull__ (2))); 6242: extern int __ptsname_r_chk_warn (int __fd, char *__buf, size_t __buflen, size_t __nreal) throw () __asm__ ("" "__ptsname_r_chk") 6242: 6242: 6242: __attribute__ ((__nonnull__ (2))) __attribute__((__warning__ ("ptsname_r called with buflen bigger than " "size of buf"))) 6242: ; 6242: 6242: extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int 6242: __attribute__ ((__leaf__)) ptsname_r (int __fd, char *__buf, size_t __buflen) throw () 6242: { 6242: if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1) 6242: { 6242: if (!__builtin_constant_p (__buflen)) 6242: return __ptsname_r_chk (__fd, __buf, __buflen, __builtin_object_size (__buf, 2 > 1)); 6242: if (__buflen > __builtin_object_size (__buf, 2 > 1)) 6242: return __ptsname_r_chk_warn (__fd, __buf, __buflen, __builtin_object_size (__buf, 2 > 1)); 6242: } 6242: return __ptsname_r_alias (__fd, __buf, __buflen); 6242: } 6242: 6242: 6242: extern int __wctomb_chk (char *__s, wchar_t __wchar, size_t __buflen) 6242: throw () __attribute__ ((__warn_unused_result__)); 6242: extern int __wctomb_alias (char *__s, wchar_t __wchar) throw () __asm__ ("" "wctomb") 6242: __attribute__ ((__warn_unused_result__)); 6242: 6242: extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__warn_unused_result__)) int 6242: __attribute__ ((__leaf__)) wctomb (char *__s, wchar_t __wchar) throw () 6242: { 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: if (__builtin_object_size (__s, 2 > 1) != (size_t) -1 && 16 > __builtin_object_size (__s, 2 > 1)) 6242: return __wctomb_chk (__s, __wchar, __builtin_object_size (__s, 2 > 1)); 6242: return __wctomb_alias (__s, __wchar); 6242: } 6242: 6242: 6242: extern size_t __mbstowcs_chk (wchar_t *__restrict __dst, 6242: const char *__restrict __src, 6242: size_t __len, size_t __dstlen) throw (); 6242: extern size_t __mbstowcs_alias (wchar_t *__restrict __dst, const char *__restrict __src, size_t __len) throw () __asm__ ("" "mbstowcs") 6242: 6242: 6242: ; 6242: extern size_t __mbstowcs_chk_warn (wchar_t *__restrict __dst, const char *__restrict __src, size_t __len, size_t __dstlen) throw () __asm__ ("" "__mbstowcs_chk") 6242: 6242: 6242: 6242: __attribute__((__warning__ ("mbstowcs called with dst buffer smaller than len " "* sizeof (wchar_t)"))) 6242: ; 6242: 6242: extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) size_t 6242: __attribute__ ((__leaf__)) mbstowcs (wchar_t *__restrict __dst, const char *__restrict __src, size_t __len) throw () 6242: 6242: { 6242: if (__builtin_object_size (__dst, 2 > 1) != (size_t) -1) 6242: { 6242: if (!__builtin_constant_p (__len)) 6242: return __mbstowcs_chk (__dst, __src, __len, 6242: __builtin_object_size (__dst, 2 > 1) / sizeof (wchar_t)); 6242: 6242: if (__len > __builtin_object_size (__dst, 2 > 1) / sizeof (wchar_t)) 6242: return __mbstowcs_chk_warn (__dst, __src, __len, 6242: __builtin_object_size (__dst, 2 > 1) / sizeof (wchar_t)); 6242: } 6242: return __mbstowcs_alias (__dst, __src, __len); 6242: } 6242: 6242: 6242: extern size_t __wcstombs_chk (char *__restrict __dst, 6242: const wchar_t *__restrict __src, 6242: size_t __len, size_t __dstlen) throw (); 6242: extern size_t __wcstombs_alias (char *__restrict __dst, const wchar_t *__restrict __src, size_t __len) throw () __asm__ ("" "wcstombs") 6242: 6242: 6242: ; 6242: extern size_t __wcstombs_chk_warn (char *__restrict __dst, const wchar_t *__restrict __src, size_t __len, size_t __dstlen) throw () __asm__ ("" "__wcstombs_chk") 6242: 6242: 6242: 6242: __attribute__((__warning__ ("wcstombs called with dst buffer smaller than len"))); 6242: 6242: extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) size_t 6242: __attribute__ ((__leaf__)) wcstombs (char *__restrict __dst, const wchar_t *__restrict __src, size_t __len) throw () 6242: 6242: { 6242: if (__builtin_object_size (__dst, 2 > 1) != (size_t) -1) 6242: { 6242: if (!__builtin_constant_p (__len)) 6242: return __wcstombs_chk (__dst, __src, __len, __builtin_object_size (__dst, 2 > 1)); 6242: if (__len > __builtin_object_size (__dst, 2 > 1)) 6242: return __wcstombs_chk_warn (__dst, __src, __len, __builtin_object_size (__dst, 2 > 1)); 6242: } 6242: return __wcstombs_alias (__dst, __src, __len); 6242: } 6242: # 906 "/usr/include/stdlib.h" 2 3 4 6242: 6242: 6242: 6242: 6242: 6242: } 6242: # 76 "/usr/include/c++/8/cstdlib" 2 3 6242: 6242: # 1 "/usr/include/c++/8/bits/std_abs.h" 1 3 6242: # 33 "/usr/include/c++/8/bits/std_abs.h" 3 6242: 6242: # 34 "/usr/include/c++/8/bits/std_abs.h" 3 6242: # 46 "/usr/include/c++/8/bits/std_abs.h" 3 6242: extern "C++" 6242: { 6242: namespace std __attribute__ ((__visibility__ ("default"))) 6242: { 6242: 6242: 6242: using ::abs; 6242: 6242: 6242: inline long 6242: abs(long __i) { return __builtin_labs(__i); } 6242: 6242: 6242: 6242: inline long long 6242: abs(long long __x) { return __builtin_llabs (__x); } 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: inline constexpr double 6242: abs(double __x) 6242: { return __builtin_fabs(__x); } 6242: 6242: inline constexpr float 6242: abs(float __x) 6242: { return __builtin_fabsf(__x); } 6242: 6242: inline constexpr long double 6242: abs(long double __x) 6242: { return __builtin_fabsl(__x); } 6242: 6242: 6242: 6242: inline constexpr __int128 6242: abs(__int128 __x) { return __x >= 0 ? __x : -__x; } 6242: # 106 "/usr/include/c++/8/bits/std_abs.h" 3 6242: 6242: } 6242: } 6242: # 78 "/usr/include/c++/8/cstdlib" 2 3 6242: # 118 "/usr/include/c++/8/cstdlib" 3 6242: extern "C++" 6242: { 6242: namespace std __attribute__ ((__visibility__ ("default"))) 6242: { 6242: 6242: 6242: using ::div_t; 6242: using ::ldiv_t; 6242: 6242: using ::abort; 6242: using ::atexit; 6242: 6242: 6242: using ::at_quick_exit; 6242: 6242: 6242: using ::atof; 6242: using ::atoi; 6242: using ::atol; 6242: using ::bsearch; 6242: using ::calloc; 6242: using ::div; 6242: using ::exit; 6242: using ::free; 6242: using ::getenv; 6242: using ::labs; 6242: using ::ldiv; 6242: using ::malloc; 6242: 6242: using ::mblen; 6242: using ::mbstowcs; 6242: using ::mbtowc; 6242: 6242: using ::qsort; 6242: 6242: 6242: using ::quick_exit; 6242: 6242: 6242: using ::rand; 6242: using ::realloc; 6242: using ::srand; 6242: using ::strtod; 6242: using ::strtol; 6242: using ::strtoul; 6242: using ::system; 6242: 6242: using ::wcstombs; 6242: using ::wctomb; 6242: 6242: 6242: 6242: inline ldiv_t 6242: div(long __i, long __j) { return ldiv(__i, __j); } 6242: 6242: 6242: 6242: 6242: } 6242: # 189 "/usr/include/c++/8/cstdlib" 3 6242: namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) 6242: { 6242: 6242: 6242: 6242: using ::lldiv_t; 6242: 6242: 6242: 6242: 6242: 6242: using ::_Exit; 6242: 6242: 6242: 6242: using ::llabs; 6242: 6242: inline lldiv_t 6242: div(long long __n, long long __d) 6242: { lldiv_t __q; __q.quot = __n / __d; __q.rem = __n % __d; return __q; } 6242: 6242: using ::lldiv; 6242: # 221 "/usr/include/c++/8/cstdlib" 3 6242: using ::atoll; 6242: using ::strtoll; 6242: using ::strtoull; 6242: 6242: using ::strtof; 6242: using ::strtold; 6242: 6242: 6242: } 6242: 6242: namespace std 6242: { 6242: 6242: using ::__gnu_cxx::lldiv_t; 6242: 6242: using ::__gnu_cxx::_Exit; 6242: 6242: using ::__gnu_cxx::llabs; 6242: using ::__gnu_cxx::div; 6242: using ::__gnu_cxx::lldiv; 6242: 6242: using ::__gnu_cxx::atoll; 6242: using ::__gnu_cxx::strtof; 6242: using ::__gnu_cxx::strtoll; 6242: using ::__gnu_cxx::strtoull; 6242: using ::__gnu_cxx::strtold; 6242: } 6242: 6242: 6242: 6242: } 6242: # 42 "/usr/include/c++/8/ext/string_conversions.h" 2 3 6242: # 1 "/usr/include/c++/8/cwchar" 1 3 6242: # 39 "/usr/include/c++/8/cwchar" 3 6242: 6242: # 40 "/usr/include/c++/8/cwchar" 3 6242: # 43 "/usr/include/c++/8/ext/string_conversions.h" 2 3 6242: # 1 "/usr/include/c++/8/cstdio" 1 3 6242: # 39 "/usr/include/c++/8/cstdio" 3 6242: 6242: # 40 "/usr/include/c++/8/cstdio" 3 6242: 6242: 6242: # 1 "/usr/include/stdio.h" 1 3 4 6242: # 27 "/usr/include/stdio.h" 3 4 6242: # 1 "/usr/include/s390x-linux-gnu/bits/libc-header-start.h" 1 3 4 6242: # 28 "/usr/include/stdio.h" 2 3 4 6242: 6242: extern "C" { 6242: 6242: 6242: 6242: # 1 "/usr/lib/gcc/s390x-linux-gnu/8/include/stddef.h" 1 3 4 6242: # 34 "/usr/include/stdio.h" 2 3 4 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: # 1 "/usr/include/libio.h" 1 3 4 6242: # 31 "/usr/include/libio.h" 3 4 6242: # 1 "/usr/include/_G_config.h" 1 3 4 6242: # 15 "/usr/include/_G_config.h" 3 4 6242: # 1 "/usr/lib/gcc/s390x-linux-gnu/8/include/stddef.h" 1 3 4 6242: # 16 "/usr/include/_G_config.h" 2 3 4 6242: 6242: 6242: 6242: 6242: 6242: 6242: typedef struct 6242: { 6242: __off_t __pos; 6242: __mbstate_t __state; 6242: } _G_fpos_t; 6242: typedef struct 6242: { 6242: __off64_t __pos; 6242: __mbstate_t __state; 6242: } _G_fpos64_t; 6242: # 32 "/usr/include/libio.h" 2 3 4 6242: # 49 "/usr/include/libio.h" 3 4 6242: # 1 "/usr/lib/gcc/s390x-linux-gnu/8/include/stdarg.h" 1 3 4 6242: # 50 "/usr/include/libio.h" 2 3 4 6242: # 145 "/usr/include/libio.h" 3 4 6242: struct _IO_jump_t; struct _IO_FILE; 6242: 6242: 6242: 6242: 6242: typedef void _IO_lock_t; 6242: 6242: 6242: 6242: 6242: 6242: struct _IO_marker { 6242: struct _IO_marker *_next; 6242: struct _IO_FILE *_sbuf; 6242: 6242: 6242: 6242: int _pos; 6242: # 173 "/usr/include/libio.h" 3 4 6242: }; 6242: 6242: 6242: enum __codecvt_result 6242: { 6242: __codecvt_ok, 6242: __codecvt_partial, 6242: __codecvt_error, 6242: __codecvt_noconv 6242: }; 6242: # 241 "/usr/include/libio.h" 3 4 6242: struct _IO_FILE { 6242: int _flags; 6242: 6242: 6242: 6242: 6242: char* _IO_read_ptr; 6242: char* _IO_read_end; 6242: char* _IO_read_base; 6242: char* _IO_write_base; 6242: char* _IO_write_ptr; 6242: char* _IO_write_end; 6242: char* _IO_buf_base; 6242: char* _IO_buf_end; 6242: 6242: char *_IO_save_base; 6242: char *_IO_backup_base; 6242: char *_IO_save_end; 6242: 6242: struct _IO_marker *_markers; 6242: 6242: struct _IO_FILE *_chain; 6242: 6242: int _fileno; 6242: 6242: 6242: 6242: int _flags2; 6242: 6242: __off_t _old_offset; 6242: 6242: 6242: 6242: unsigned short _cur_column; 6242: signed char _vtable_offset; 6242: char _shortbuf[1]; 6242: 6242: 6242: 6242: _IO_lock_t *_lock; 6242: # 289 "/usr/include/libio.h" 3 4 6242: __off64_t _offset; 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: void *__pad1; 6242: void *__pad2; 6242: void *__pad3; 6242: void *__pad4; 6242: 6242: size_t __pad5; 6242: int _mode; 6242: 6242: char _unused2[15 * sizeof (int) - 4 * sizeof (void *) - sizeof (size_t)]; 6242: 6242: }; 6242: 6242: 6242: 6242: 6242: 6242: struct _IO_FILE_plus; 6242: 6242: extern struct _IO_FILE_plus _IO_2_1_stdin_; 6242: extern struct _IO_FILE_plus _IO_2_1_stdout_; 6242: extern struct _IO_FILE_plus _IO_2_1_stderr_; 6242: # 333 "/usr/include/libio.h" 3 4 6242: typedef __ssize_t __io_read_fn (void *__cookie, char *__buf, size_t __nbytes); 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: typedef __ssize_t __io_write_fn (void *__cookie, const char *__buf, 6242: size_t __n); 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: typedef int __io_seek_fn (void *__cookie, __off64_t *__pos, int __w); 6242: 6242: 6242: typedef int __io_close_fn (void *__cookie); 6242: 6242: 6242: 6242: 6242: typedef __io_read_fn cookie_read_function_t; 6242: typedef __io_write_fn cookie_write_function_t; 6242: typedef __io_seek_fn cookie_seek_function_t; 6242: typedef __io_close_fn cookie_close_function_t; 6242: 6242: 6242: typedef struct 6242: { 6242: __io_read_fn *read; 6242: __io_write_fn *write; 6242: __io_seek_fn *seek; 6242: __io_close_fn *close; 6242: } _IO_cookie_io_functions_t; 6242: typedef _IO_cookie_io_functions_t cookie_io_functions_t; 6242: 6242: struct _IO_cookie_file; 6242: 6242: 6242: extern void _IO_cookie_init (struct _IO_cookie_file *__cfile, int __read_write, 6242: void *__cookie, _IO_cookie_io_functions_t __fns); 6242: 6242: 6242: 6242: 6242: extern "C" { 6242: 6242: 6242: extern int __underflow (_IO_FILE *); 6242: extern int __uflow (_IO_FILE *); 6242: extern int __overflow (_IO_FILE *, int); 6242: # 429 "/usr/include/libio.h" 3 4 6242: extern int _IO_getc (_IO_FILE *__fp); 6242: extern int _IO_putc (int __c, _IO_FILE *__fp); 6242: extern int _IO_feof (_IO_FILE *__fp) throw (); 6242: extern int _IO_ferror (_IO_FILE *__fp) throw (); 6242: 6242: extern int _IO_peekc_locked (_IO_FILE *__fp); 6242: 6242: 6242: 6242: 6242: 6242: extern void _IO_flockfile (_IO_FILE *) throw (); 6242: extern void _IO_funlockfile (_IO_FILE *) throw (); 6242: extern int _IO_ftrylockfile (_IO_FILE *) throw (); 6242: # 458 "/usr/include/libio.h" 3 4 6242: extern int _IO_vfscanf (_IO_FILE * __restrict, const char * __restrict, 6242: __gnuc_va_list, int *__restrict); 6242: extern int _IO_vfprintf (_IO_FILE *__restrict, const char *__restrict, 6242: __gnuc_va_list); 6242: extern __ssize_t _IO_padn (_IO_FILE *, int, __ssize_t); 6242: extern size_t _IO_sgetn (_IO_FILE *, void *, size_t); 6242: 6242: extern __off64_t _IO_seekoff (_IO_FILE *, __off64_t, int, int); 6242: extern __off64_t _IO_seekpos (_IO_FILE *, __off64_t, int); 6242: 6242: extern void _IO_free_backup_area (_IO_FILE *) throw (); 6242: # 520 "/usr/include/libio.h" 3 4 6242: } 6242: # 42 "/usr/include/stdio.h" 2 3 4 6242: 6242: 6242: 6242: 6242: typedef __gnuc_va_list va_list; 6242: # 78 "/usr/include/stdio.h" 3 4 6242: typedef _G_fpos_t fpos_t; 6242: 6242: 6242: 6242: 6242: typedef _G_fpos64_t fpos64_t; 6242: # 131 "/usr/include/stdio.h" 3 4 6242: # 1 "/usr/include/s390x-linux-gnu/bits/stdio_lim.h" 1 3 4 6242: # 132 "/usr/include/stdio.h" 2 3 4 6242: 6242: 6242: 6242: extern struct _IO_FILE *stdin; 6242: extern struct _IO_FILE *stdout; 6242: extern struct _IO_FILE *stderr; 6242: 6242: 6242: 6242: 6242: 6242: 6242: extern int remove (const char *__filename) throw (); 6242: 6242: extern int rename (const char *__old, const char *__new) throw (); 6242: 6242: 6242: 6242: extern int renameat (int __oldfd, const char *__old, int __newfd, 6242: const char *__new) throw (); 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: extern FILE *tmpfile (void) __attribute__ ((__warn_unused_result__)); 6242: # 169 "/usr/include/stdio.h" 3 4 6242: extern FILE *tmpfile64 (void) __attribute__ ((__warn_unused_result__)); 6242: 6242: 6242: 6242: extern char *tmpnam (char *__s) throw () __attribute__ ((__warn_unused_result__)); 6242: 6242: 6242: 6242: 6242: extern char *tmpnam_r (char *__s) throw () __attribute__ ((__warn_unused_result__)); 6242: # 190 "/usr/include/stdio.h" 3 4 6242: extern char *tempnam (const char *__dir, const char *__pfx) 6242: throw () __attribute__ ((__malloc__)) __attribute__ ((__warn_unused_result__)); 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: extern int fclose (FILE *__stream); 6242: 6242: 6242: 6242: 6242: extern int fflush (FILE *__stream); 6242: # 213 "/usr/include/stdio.h" 3 4 6242: extern int fflush_unlocked (FILE *__stream); 6242: # 223 "/usr/include/stdio.h" 3 4 6242: extern int fcloseall (void); 6242: # 232 "/usr/include/stdio.h" 3 4 6242: extern FILE *fopen (const char *__restrict __filename, 6242: const char *__restrict __modes) __attribute__ ((__warn_unused_result__)); 6242: 6242: 6242: 6242: 6242: extern FILE *freopen (const char *__restrict __filename, 6242: const char *__restrict __modes, 6242: FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); 6242: # 256 "/usr/include/stdio.h" 3 4 6242: extern FILE *fopen64 (const char *__restrict __filename, 6242: const char *__restrict __modes) __attribute__ ((__warn_unused_result__)); 6242: extern FILE *freopen64 (const char *__restrict __filename, 6242: const char *__restrict __modes, 6242: FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); 6242: 6242: 6242: 6242: 6242: extern FILE *fdopen (int __fd, const char *__modes) throw () __attribute__ ((__warn_unused_result__)); 6242: 6242: 6242: 6242: 6242: 6242: extern FILE *fopencookie (void *__restrict __magic_cookie, 6242: const char *__restrict __modes, 6242: _IO_cookie_io_functions_t __io_funcs) throw () __attribute__ ((__warn_unused_result__)); 6242: 6242: 6242: 6242: 6242: extern FILE *fmemopen (void *__s, size_t __len, const char *__modes) 6242: throw () __attribute__ ((__warn_unused_result__)); 6242: 6242: 6242: 6242: 6242: extern FILE *open_memstream (char **__bufloc, size_t *__sizeloc) throw () __attribute__ ((__warn_unused_result__)); 6242: 6242: 6242: 6242: 6242: 6242: extern void setbuf (FILE *__restrict __stream, char *__restrict __buf) throw (); 6242: 6242: 6242: 6242: extern int setvbuf (FILE *__restrict __stream, char *__restrict __buf, 6242: int __modes, size_t __n) throw (); 6242: 6242: 6242: 6242: 6242: extern void setbuffer (FILE *__restrict __stream, char *__restrict __buf, 6242: size_t __size) throw (); 6242: 6242: 6242: extern void setlinebuf (FILE *__stream) throw (); 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: extern int fprintf (FILE *__restrict __stream, 6242: const char *__restrict __format, ...); 6242: 6242: 6242: 6242: 6242: extern int printf (const char *__restrict __format, ...); 6242: 6242: extern int sprintf (char *__restrict __s, 6242: const char *__restrict __format, ...) throw (); 6242: 6242: 6242: 6242: 6242: 6242: extern int vfprintf (FILE *__restrict __s, const char *__restrict __format, 6242: __gnuc_va_list __arg); 6242: 6242: 6242: 6242: 6242: extern int vprintf (const char *__restrict __format, __gnuc_va_list __arg); 6242: 6242: extern int vsprintf (char *__restrict __s, const char *__restrict __format, 6242: __gnuc_va_list __arg) throw (); 6242: 6242: 6242: 6242: extern int snprintf (char *__restrict __s, size_t __maxlen, 6242: const char *__restrict __format, ...) 6242: throw () __attribute__ ((__format__ (__printf__, 3, 4))); 6242: 6242: extern int vsnprintf (char *__restrict __s, size_t __maxlen, 6242: const char *__restrict __format, __gnuc_va_list __arg) 6242: throw () __attribute__ ((__format__ (__printf__, 3, 0))); 6242: 6242: 6242: 6242: 6242: 6242: extern int vasprintf (char **__restrict __ptr, const char *__restrict __f, 6242: __gnuc_va_list __arg) 6242: throw () __attribute__ ((__format__ (__printf__, 2, 0))) __attribute__ ((__warn_unused_result__)); 6242: extern int __asprintf (char **__restrict __ptr, 6242: const char *__restrict __fmt, ...) 6242: throw () __attribute__ ((__format__ (__printf__, 2, 3))) __attribute__ ((__warn_unused_result__)); 6242: extern int asprintf (char **__restrict __ptr, 6242: const char *__restrict __fmt, ...) 6242: throw () __attribute__ ((__format__ (__printf__, 2, 3))) __attribute__ ((__warn_unused_result__)); 6242: 6242: 6242: 6242: 6242: extern int vdprintf (int __fd, const char *__restrict __fmt, 6242: __gnuc_va_list __arg) 6242: __attribute__ ((__format__ (__printf__, 2, 0))); 6242: extern int dprintf (int __fd, const char *__restrict __fmt, ...) 6242: __attribute__ ((__format__ (__printf__, 2, 3))); 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: extern int fscanf (FILE *__restrict __stream, 6242: const char *__restrict __format, ...) __attribute__ ((__warn_unused_result__)); 6242: 6242: 6242: 6242: 6242: extern int scanf (const char *__restrict __format, ...) __attribute__ ((__warn_unused_result__)); 6242: 6242: extern int sscanf (const char *__restrict __s, 6242: const char *__restrict __format, ...) throw (); 6242: # 420 "/usr/include/stdio.h" 3 4 6242: extern int vfscanf (FILE *__restrict __s, const char *__restrict __format, 6242: __gnuc_va_list __arg) 6242: __attribute__ ((__format__ (__scanf__, 2, 0))) __attribute__ ((__warn_unused_result__)); 6242: 6242: 6242: 6242: 6242: 6242: extern int vscanf (const char *__restrict __format, __gnuc_va_list __arg) 6242: __attribute__ ((__format__ (__scanf__, 1, 0))) __attribute__ ((__warn_unused_result__)); 6242: 6242: 6242: extern int vsscanf (const char *__restrict __s, 6242: const char *__restrict __format, __gnuc_va_list __arg) 6242: throw () __attribute__ ((__format__ (__scanf__, 2, 0))); 6242: # 477 "/usr/include/stdio.h" 3 4 6242: extern int fgetc (FILE *__stream); 6242: extern int getc (FILE *__stream); 6242: 6242: 6242: 6242: 6242: 6242: extern int getchar (void); 6242: # 495 "/usr/include/stdio.h" 3 4 6242: extern int getc_unlocked (FILE *__stream); 6242: extern int getchar_unlocked (void); 6242: # 506 "/usr/include/stdio.h" 3 4 6242: extern int fgetc_unlocked (FILE *__stream); 6242: # 517 "/usr/include/stdio.h" 3 4 6242: extern int fputc (int __c, FILE *__stream); 6242: extern int putc (int __c, FILE *__stream); 6242: 6242: 6242: 6242: 6242: 6242: extern int putchar (int __c); 6242: # 537 "/usr/include/stdio.h" 3 4 6242: extern int fputc_unlocked (int __c, FILE *__stream); 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: extern int putc_unlocked (int __c, FILE *__stream); 6242: extern int putchar_unlocked (int __c); 6242: 6242: 6242: 6242: 6242: 6242: 6242: extern int getw (FILE *__stream); 6242: 6242: 6242: extern int putw (int __w, FILE *__stream); 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: extern char *fgets (char *__restrict __s, int __n, FILE *__restrict __stream) 6242: __attribute__ ((__warn_unused_result__)); 6242: # 577 "/usr/include/stdio.h" 3 4 6242: extern char *gets (char *__s) __attribute__ ((__warn_unused_result__)) __attribute__ ((__deprecated__)); 6242: # 587 "/usr/include/stdio.h" 3 4 6242: extern char *fgets_unlocked (char *__restrict __s, int __n, 6242: FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); 6242: # 603 "/usr/include/stdio.h" 3 4 6242: extern __ssize_t __getdelim (char **__restrict __lineptr, 6242: size_t *__restrict __n, int __delimiter, 6242: FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); 6242: extern __ssize_t getdelim (char **__restrict __lineptr, 6242: size_t *__restrict __n, int __delimiter, 6242: FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: extern __ssize_t getline (char **__restrict __lineptr, 6242: size_t *__restrict __n, 6242: FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: extern int fputs (const char *__restrict __s, FILE *__restrict __stream); 6242: 6242: 6242: 6242: 6242: 6242: extern int puts (const char *__s); 6242: 6242: 6242: 6242: 6242: 6242: 6242: extern int ungetc (int __c, FILE *__stream); 6242: 6242: 6242: 6242: 6242: 6242: 6242: extern size_t fread (void *__restrict __ptr, size_t __size, 6242: size_t __n, FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); 6242: 6242: 6242: 6242: 6242: extern size_t fwrite (const void *__restrict __ptr, size_t __size, 6242: size_t __n, FILE *__restrict __s); 6242: # 662 "/usr/include/stdio.h" 3 4 6242: extern int fputs_unlocked (const char *__restrict __s, 6242: FILE *__restrict __stream); 6242: # 673 "/usr/include/stdio.h" 3 4 6242: extern size_t fread_unlocked (void *__restrict __ptr, size_t __size, 6242: size_t __n, FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); 6242: extern size_t fwrite_unlocked (const void *__restrict __ptr, size_t __size, 6242: size_t __n, FILE *__restrict __stream); 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: extern int fseek (FILE *__stream, long int __off, int __whence); 6242: 6242: 6242: 6242: 6242: extern long int ftell (FILE *__stream) __attribute__ ((__warn_unused_result__)); 6242: 6242: 6242: 6242: 6242: extern void rewind (FILE *__stream); 6242: # 707 "/usr/include/stdio.h" 3 4 6242: extern int fseeko (FILE *__stream, __off_t __off, int __whence); 6242: 6242: 6242: 6242: 6242: extern __off_t ftello (FILE *__stream) __attribute__ ((__warn_unused_result__)); 6242: # 731 "/usr/include/stdio.h" 3 4 6242: extern int fgetpos (FILE *__restrict __stream, fpos_t *__restrict __pos); 6242: 6242: 6242: 6242: 6242: extern int fsetpos (FILE *__stream, const fpos_t *__pos); 6242: # 750 "/usr/include/stdio.h" 3 4 6242: extern int fseeko64 (FILE *__stream, __off64_t __off, int __whence); 6242: extern __off64_t ftello64 (FILE *__stream) __attribute__ ((__warn_unused_result__)); 6242: extern int fgetpos64 (FILE *__restrict __stream, fpos64_t *__restrict __pos); 6242: extern int fsetpos64 (FILE *__stream, const fpos64_t *__pos); 6242: 6242: 6242: 6242: extern void clearerr (FILE *__stream) throw (); 6242: 6242: extern int feof (FILE *__stream) throw () __attribute__ ((__warn_unused_result__)); 6242: 6242: extern int ferror (FILE *__stream) throw () __attribute__ ((__warn_unused_result__)); 6242: 6242: 6242: 6242: extern void clearerr_unlocked (FILE *__stream) throw (); 6242: extern int feof_unlocked (FILE *__stream) throw () __attribute__ ((__warn_unused_result__)); 6242: extern int ferror_unlocked (FILE *__stream) throw () __attribute__ ((__warn_unused_result__)); 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: extern void perror (const char *__s); 6242: 6242: 6242: 6242: 6242: 6242: # 1 "/usr/include/s390x-linux-gnu/bits/sys_errlist.h" 1 3 4 6242: # 26 "/usr/include/s390x-linux-gnu/bits/sys_errlist.h" 3 4 6242: extern int sys_nerr; 6242: extern const char *const sys_errlist[]; 6242: 6242: 6242: extern int _sys_nerr; 6242: extern const char *const _sys_errlist[]; 6242: # 782 "/usr/include/stdio.h" 2 3 4 6242: 6242: 6242: 6242: 6242: extern int fileno (FILE *__stream) throw () __attribute__ ((__warn_unused_result__)); 6242: 6242: 6242: 6242: 6242: extern int fileno_unlocked (FILE *__stream) throw () __attribute__ ((__warn_unused_result__)); 6242: # 800 "/usr/include/stdio.h" 3 4 6242: extern FILE *popen (const char *__command, const char *__modes) __attribute__ ((__warn_unused_result__)); 6242: 6242: 6242: 6242: 6242: 6242: extern int pclose (FILE *__stream); 6242: 6242: 6242: 6242: 6242: 6242: extern char *ctermid (char *__s) throw (); 6242: 6242: 6242: 6242: 6242: 6242: extern char *cuserid (char *__s); 6242: 6242: 6242: 6242: 6242: struct obstack; 6242: 6242: 6242: extern int obstack_printf (struct obstack *__restrict __obstack, 6242: const char *__restrict __format, ...) 6242: throw () __attribute__ ((__format__ (__printf__, 2, 3))); 6242: extern int obstack_vprintf (struct obstack *__restrict __obstack, 6242: const char *__restrict __format, 6242: __gnuc_va_list __args) 6242: throw () __attribute__ ((__format__ (__printf__, 2, 0))); 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: extern void flockfile (FILE *__stream) throw (); 6242: 6242: 6242: 6242: extern int ftrylockfile (FILE *__stream) throw () __attribute__ ((__warn_unused_result__)); 6242: 6242: 6242: extern void funlockfile (FILE *__stream) throw (); 6242: # 859 "/usr/include/stdio.h" 3 4 6242: # 1 "/usr/include/s390x-linux-gnu/bits/stdio.h" 1 3 4 6242: # 43 "/usr/include/s390x-linux-gnu/bits/stdio.h" 3 4 6242: extern __inline __attribute__ ((__gnu_inline__)) int 6242: getchar (void) 6242: { 6242: return _IO_getc (stdin); 6242: } 6242: 6242: 6242: 6242: 6242: extern __inline __attribute__ ((__gnu_inline__)) int 6242: fgetc_unlocked (FILE *__fp) 6242: { 6242: return (__builtin_expect (((__fp)->_IO_read_ptr >= (__fp)->_IO_read_end), 0) ? __uflow (__fp) : *(unsigned char *) (__fp)->_IO_read_ptr++); 6242: } 6242: 6242: 6242: 6242: 6242: 6242: extern __inline __attribute__ ((__gnu_inline__)) int 6242: getc_unlocked (FILE *__fp) 6242: { 6242: return (__builtin_expect (((__fp)->_IO_read_ptr >= (__fp)->_IO_read_end), 0) ? __uflow (__fp) : *(unsigned char *) (__fp)->_IO_read_ptr++); 6242: } 6242: 6242: 6242: extern __inline __attribute__ ((__gnu_inline__)) int 6242: getchar_unlocked (void) 6242: { 6242: return (__builtin_expect (((stdin)->_IO_read_ptr >= (stdin)->_IO_read_end), 0) ? __uflow (stdin) : *(unsigned char *) (stdin)->_IO_read_ptr++); 6242: } 6242: 6242: 6242: 6242: 6242: extern __inline __attribute__ ((__gnu_inline__)) int 6242: putchar (int __c) 6242: { 6242: return _IO_putc (__c, stdout); 6242: } 6242: 6242: 6242: 6242: 6242: extern __inline __attribute__ ((__gnu_inline__)) int 6242: fputc_unlocked (int __c, FILE *__stream) 6242: { 6242: return (__builtin_expect (((__stream)->_IO_write_ptr >= (__stream)->_IO_write_end), 0) ? __overflow (__stream, (unsigned char) (__c)) : (unsigned char) (*(__stream)->_IO_write_ptr++ = (__c))); 6242: } 6242: 6242: 6242: 6242: 6242: 6242: extern __inline __attribute__ ((__gnu_inline__)) int 6242: putc_unlocked (int __c, FILE *__stream) 6242: { 6242: return (__builtin_expect (((__stream)->_IO_write_ptr >= (__stream)->_IO_write_end), 0) ? __overflow (__stream, (unsigned char) (__c)) : (unsigned char) (*(__stream)->_IO_write_ptr++ = (__c))); 6242: } 6242: 6242: 6242: extern __inline __attribute__ ((__gnu_inline__)) int 6242: putchar_unlocked (int __c) 6242: { 6242: return (__builtin_expect (((stdout)->_IO_write_ptr >= (stdout)->_IO_write_end), 0) ? __overflow (stdout, (unsigned char) (__c)) : (unsigned char) (*(stdout)->_IO_write_ptr++ = (__c))); 6242: } 6242: 6242: 6242: 6242: 6242: 6242: extern __inline __attribute__ ((__gnu_inline__)) __ssize_t 6242: getline (char **__lineptr, size_t *__n, FILE *__stream) 6242: { 6242: return __getdelim (__lineptr, __n, '\n', __stream); 6242: } 6242: 6242: 6242: 6242: 6242: 6242: extern __inline __attribute__ ((__gnu_inline__)) int 6242: __attribute__ ((__leaf__)) feof_unlocked (FILE *__stream) throw () 6242: { 6242: return (((__stream)->_flags & 0x10) != 0); 6242: } 6242: 6242: 6242: extern __inline __attribute__ ((__gnu_inline__)) int 6242: __attribute__ ((__leaf__)) ferror_unlocked (FILE *__stream) throw () 6242: { 6242: return (((__stream)->_flags & 0x20) != 0); 6242: } 6242: # 860 "/usr/include/stdio.h" 2 3 4 6242: 6242: 6242: # 1 "/usr/include/s390x-linux-gnu/bits/stdio2.h" 1 3 4 6242: # 23 "/usr/include/s390x-linux-gnu/bits/stdio2.h" 3 4 6242: extern int __sprintf_chk (char *__restrict __s, int __flag, size_t __slen, 6242: const char *__restrict __format, ...) throw (); 6242: extern int __vsprintf_chk (char *__restrict __s, int __flag, size_t __slen, 6242: const char *__restrict __format, 6242: __gnuc_va_list __ap) throw (); 6242: 6242: 6242: extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int 6242: __attribute__ ((__leaf__)) sprintf (char *__restrict __s, const char *__restrict __fmt, ...) throw () 6242: { 6242: return __builtin___sprintf_chk (__s, 2 - 1, 6242: __builtin_object_size (__s, 2 > 1), __fmt, __builtin_va_arg_pack ()); 6242: } 6242: 6242: 6242: 6242: 6242: 6242: 6242: extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int 6242: __attribute__ ((__leaf__)) vsprintf (char *__restrict __s, const char *__restrict __fmt, __gnuc_va_list __ap) throw () 6242: 6242: { 6242: return __builtin___vsprintf_chk (__s, 2 - 1, 6242: __builtin_object_size (__s, 2 > 1), __fmt, __ap); 6242: } 6242: 6242: 6242: 6242: extern int __snprintf_chk (char *__restrict __s, size_t __n, int __flag, 6242: size_t __slen, const char *__restrict __format, 6242: ...) throw (); 6242: extern int __vsnprintf_chk (char *__restrict __s, size_t __n, int __flag, 6242: size_t __slen, const char *__restrict __format, 6242: __gnuc_va_list __ap) throw (); 6242: 6242: 6242: extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int 6242: __attribute__ ((__leaf__)) snprintf (char *__restrict __s, size_t __n, const char *__restrict __fmt, ...) throw () 6242: 6242: { 6242: return __builtin___snprintf_chk (__s, __n, 2 - 1, 6242: __builtin_object_size (__s, 2 > 1), __fmt, __builtin_va_arg_pack ()); 6242: } 6242: 6242: 6242: 6242: 6242: 6242: 6242: extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int 6242: __attribute__ ((__leaf__)) vsnprintf (char *__restrict __s, size_t __n, const char *__restrict __fmt, __gnuc_va_list __ap) throw () 6242: 6242: { 6242: return __builtin___vsnprintf_chk (__s, __n, 2 - 1, 6242: __builtin_object_size (__s, 2 > 1), __fmt, __ap); 6242: } 6242: 6242: 6242: 6242: 6242: 6242: extern int __fprintf_chk (FILE *__restrict __stream, int __flag, 6242: const char *__restrict __format, ...); 6242: extern int __printf_chk (int __flag, const char *__restrict __format, ...); 6242: extern int __vfprintf_chk (FILE *__restrict __stream, int __flag, 6242: const char *__restrict __format, __gnuc_va_list __ap); 6242: extern int __vprintf_chk (int __flag, const char *__restrict __format, 6242: __gnuc_va_list __ap); 6242: 6242: 6242: extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int 6242: fprintf (FILE *__restrict __stream, const char *__restrict __fmt, ...) 6242: { 6242: return __fprintf_chk (__stream, 2 - 1, __fmt, 6242: __builtin_va_arg_pack ()); 6242: } 6242: 6242: extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int 6242: printf (const char *__restrict __fmt, ...) 6242: { 6242: return __printf_chk (2 - 1, __fmt, __builtin_va_arg_pack ()); 6242: } 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int 6242: vprintf (const char *__restrict __fmt, __gnuc_va_list __ap) 6242: { 6242: 6242: return __vfprintf_chk (stdout, 2 - 1, __fmt, __ap); 6242: 6242: 6242: 6242: } 6242: 6242: extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int 6242: vfprintf (FILE *__restrict __stream, 6242: const char *__restrict __fmt, __gnuc_va_list __ap) 6242: { 6242: return __vfprintf_chk (__stream, 2 - 1, __fmt, __ap); 6242: } 6242: 6242: 6242: extern int __dprintf_chk (int __fd, int __flag, const char *__restrict __fmt, 6242: ...) __attribute__ ((__format__ (__printf__, 3, 4))); 6242: extern int __vdprintf_chk (int __fd, int __flag, 6242: const char *__restrict __fmt, __gnuc_va_list __arg) 6242: __attribute__ ((__format__ (__printf__, 3, 0))); 6242: 6242: 6242: extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int 6242: dprintf (int __fd, const char *__restrict __fmt, ...) 6242: { 6242: return __dprintf_chk (__fd, 2 - 1, __fmt, 6242: __builtin_va_arg_pack ()); 6242: } 6242: 6242: 6242: 6242: 6242: 6242: extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int 6242: vdprintf (int __fd, const char *__restrict __fmt, __gnuc_va_list __ap) 6242: { 6242: return __vdprintf_chk (__fd, 2 - 1, __fmt, __ap); 6242: } 6242: 6242: 6242: 6242: 6242: extern int __asprintf_chk (char **__restrict __ptr, int __flag, 6242: const char *__restrict __fmt, ...) 6242: throw () __attribute__ ((__format__ (__printf__, 3, 4))) __attribute__ ((__warn_unused_result__)); 6242: extern int __vasprintf_chk (char **__restrict __ptr, int __flag, 6242: const char *__restrict __fmt, __gnuc_va_list __arg) 6242: throw () __attribute__ ((__format__ (__printf__, 3, 0))) __attribute__ ((__warn_unused_result__)); 6242: extern int __obstack_printf_chk (struct obstack *__restrict __obstack, 6242: int __flag, const char *__restrict __format, 6242: ...) 6242: throw () __attribute__ ((__format__ (__printf__, 3, 4))); 6242: extern int __obstack_vprintf_chk (struct obstack *__restrict __obstack, 6242: int __flag, 6242: const char *__restrict __format, 6242: __gnuc_va_list __args) 6242: throw () __attribute__ ((__format__ (__printf__, 3, 0))); 6242: 6242: 6242: extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int 6242: __attribute__ ((__leaf__)) asprintf (char **__restrict __ptr, const char *__restrict __fmt, ...) throw () 6242: { 6242: return __asprintf_chk (__ptr, 2 - 1, __fmt, 6242: __builtin_va_arg_pack ()); 6242: } 6242: 6242: extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int 6242: __attribute__ ((__leaf__)) __asprintf (char **__restrict __ptr, const char *__restrict __fmt, ...) throw () 6242: 6242: { 6242: return __asprintf_chk (__ptr, 2 - 1, __fmt, 6242: __builtin_va_arg_pack ()); 6242: } 6242: 6242: extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int 6242: __attribute__ ((__leaf__)) obstack_printf (struct obstack *__restrict __obstack, const char *__restrict __fmt, ...) throw () 6242: 6242: { 6242: return __obstack_printf_chk (__obstack, 2 - 1, __fmt, 6242: __builtin_va_arg_pack ()); 6242: } 6242: # 206 "/usr/include/s390x-linux-gnu/bits/stdio2.h" 3 4 6242: extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int 6242: __attribute__ ((__leaf__)) vasprintf (char **__restrict __ptr, const char *__restrict __fmt, __gnuc_va_list __ap) throw () 6242: 6242: { 6242: return __vasprintf_chk (__ptr, 2 - 1, __fmt, __ap); 6242: } 6242: 6242: extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int 6242: __attribute__ ((__leaf__)) obstack_vprintf (struct obstack *__restrict __obstack, const char *__restrict __fmt, __gnuc_va_list __ap) throw () 6242: 6242: { 6242: return __obstack_vprintf_chk (__obstack, 2 - 1, __fmt, 6242: __ap); 6242: } 6242: 6242: 6242: 6242: 6242: 6242: 6242: extern char *__gets_chk (char *__str, size_t) __attribute__ ((__warn_unused_result__)); 6242: extern char *__gets_warn (char *__str) __asm__ ("" "gets") 6242: __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("please use fgets or getline instead, gets can't " "specify buffer size"))) 6242: ; 6242: 6242: extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__warn_unused_result__)) char * 6242: gets (char *__str) 6242: { 6242: if (__builtin_object_size (__str, 2 > 1) != (size_t) -1) 6242: return __gets_chk (__str, __builtin_object_size (__str, 2 > 1)); 6242: return __gets_warn (__str); 6242: } 6242: 6242: 6242: extern char *__fgets_chk (char *__restrict __s, size_t __size, int __n, 6242: FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); 6242: extern char *__fgets_alias (char *__restrict __s, int __n, FILE *__restrict __stream) __asm__ ("" "fgets") 6242: 6242: __attribute__ ((__warn_unused_result__)); 6242: extern char *__fgets_chk_warn (char *__restrict __s, size_t __size, int __n, FILE *__restrict __stream) __asm__ ("" "__fgets_chk") 6242: 6242: 6242: __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("fgets called with bigger size than length " "of destination buffer"))) 6242: ; 6242: 6242: extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__warn_unused_result__)) char * 6242: fgets (char *__restrict __s, int __n, FILE *__restrict __stream) 6242: { 6242: if (__builtin_object_size (__s, 2 > 1) != (size_t) -1) 6242: { 6242: if (!__builtin_constant_p (__n) || __n <= 0) 6242: return __fgets_chk (__s, __builtin_object_size (__s, 2 > 1), __n, __stream); 6242: 6242: if ((size_t) __n > __builtin_object_size (__s, 2 > 1)) 6242: return __fgets_chk_warn (__s, __builtin_object_size (__s, 2 > 1), __n, __stream); 6242: } 6242: return __fgets_alias (__s, __n, __stream); 6242: } 6242: 6242: extern size_t __fread_chk (void *__restrict __ptr, size_t __ptrlen, 6242: size_t __size, size_t __n, 6242: FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); 6242: extern size_t __fread_alias (void *__restrict __ptr, size_t __size, size_t __n, FILE *__restrict __stream) __asm__ ("" "fread") 6242: 6242: 6242: __attribute__ ((__warn_unused_result__)); 6242: extern size_t __fread_chk_warn (void *__restrict __ptr, size_t __ptrlen, size_t __size, size_t __n, FILE *__restrict __stream) __asm__ ("" "__fread_chk") 6242: 6242: 6242: 6242: 6242: __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("fread called with bigger size * nmemb than length " "of destination buffer"))) 6242: ; 6242: 6242: extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__warn_unused_result__)) size_t 6242: fread (void *__restrict __ptr, size_t __size, size_t __n, 6242: FILE *__restrict __stream) 6242: { 6242: if (__builtin_object_size (__ptr, 0) != (size_t) -1) 6242: { 6242: if (!__builtin_constant_p (__size) 6242: || !__builtin_constant_p (__n) 6242: || (__size | __n) >= (((size_t) 1) << (8 * sizeof (size_t) / 2))) 6242: return __fread_chk (__ptr, __builtin_object_size (__ptr, 0), __size, __n, __stream); 6242: 6242: if (__size * __n > __builtin_object_size (__ptr, 0)) 6242: return __fread_chk_warn (__ptr, __builtin_object_size (__ptr, 0), __size, __n, __stream); 6242: } 6242: return __fread_alias (__ptr, __size, __n, __stream); 6242: } 6242: 6242: 6242: extern char *__fgets_unlocked_chk (char *__restrict __s, size_t __size, 6242: int __n, FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); 6242: extern char *__fgets_unlocked_alias (char *__restrict __s, int __n, FILE *__restrict __stream) __asm__ ("" "fgets_unlocked") 6242: 6242: __attribute__ ((__warn_unused_result__)); 6242: extern char *__fgets_unlocked_chk_warn (char *__restrict __s, size_t __size, int __n, FILE *__restrict __stream) __asm__ ("" "__fgets_unlocked_chk") 6242: 6242: 6242: __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("fgets_unlocked called with bigger size than length " "of destination buffer"))) 6242: ; 6242: 6242: extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__warn_unused_result__)) char * 6242: fgets_unlocked (char *__restrict __s, int __n, FILE *__restrict __stream) 6242: { 6242: if (__builtin_object_size (__s, 2 > 1) != (size_t) -1) 6242: { 6242: if (!__builtin_constant_p (__n) || __n <= 0) 6242: return __fgets_unlocked_chk (__s, __builtin_object_size (__s, 2 > 1), __n, __stream); 6242: 6242: if ((size_t) __n > __builtin_object_size (__s, 2 > 1)) 6242: return __fgets_unlocked_chk_warn (__s, __builtin_object_size (__s, 2 > 1), __n, __stream); 6242: } 6242: return __fgets_unlocked_alias (__s, __n, __stream); 6242: } 6242: 6242: 6242: 6242: 6242: extern size_t __fread_unlocked_chk (void *__restrict __ptr, size_t __ptrlen, 6242: size_t __size, size_t __n, 6242: FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); 6242: extern size_t __fread_unlocked_alias (void *__restrict __ptr, size_t __size, size_t __n, FILE *__restrict __stream) __asm__ ("" "fread_unlocked") 6242: 6242: 6242: __attribute__ ((__warn_unused_result__)); 6242: extern size_t __fread_unlocked_chk_warn (void *__restrict __ptr, size_t __ptrlen, size_t __size, size_t __n, FILE *__restrict __stream) __asm__ ("" "__fread_unlocked_chk") 6242: 6242: 6242: 6242: 6242: __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("fread_unlocked called with bigger size * nmemb than " "length of destination buffer"))) 6242: ; 6242: 6242: extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__warn_unused_result__)) size_t 6242: fread_unlocked (void *__restrict __ptr, size_t __size, size_t __n, 6242: FILE *__restrict __stream) 6242: { 6242: if (__builtin_object_size (__ptr, 0) != (size_t) -1) 6242: { 6242: if (!__builtin_constant_p (__size) 6242: || !__builtin_constant_p (__n) 6242: || (__size | __n) >= (((size_t) 1) << (8 * sizeof (size_t) / 2))) 6242: return __fread_unlocked_chk (__ptr, __builtin_object_size (__ptr, 0), __size, __n, 6242: __stream); 6242: 6242: if (__size * __n > __builtin_object_size (__ptr, 0)) 6242: return __fread_unlocked_chk_warn (__ptr, __builtin_object_size (__ptr, 0), __size, __n, 6242: __stream); 6242: } 6242: 6242: 6242: if (__builtin_constant_p (__size) 6242: && __builtin_constant_p (__n) 6242: && (__size | __n) < (((size_t) 1) << (8 * sizeof (size_t) / 2)) 6242: && __size * __n <= 8) 6242: { 6242: size_t __cnt = __size * __n; 6242: char *__cptr = (char *) __ptr; 6242: if (__cnt == 0) 6242: return 0; 6242: 6242: for (; __cnt > 0; --__cnt) 6242: { 6242: int __c = (__builtin_expect (((__stream)->_IO_read_ptr >= (__stream)->_IO_read_end), 0) ? __uflow (__stream) : *(unsigned char *) (__stream)->_IO_read_ptr++); 6242: if (__c == (-1)) 6242: break; 6242: *__cptr++ = __c; 6242: } 6242: return (__cptr - (char *) __ptr) / __size; 6242: } 6242: 6242: return __fread_unlocked_alias (__ptr, __size, __n, __stream); 6242: } 6242: # 863 "/usr/include/stdio.h" 2 3 4 6242: 6242: 6242: 6242: 6242: 6242: } 6242: # 43 "/usr/include/c++/8/cstdio" 2 3 6242: # 96 "/usr/include/c++/8/cstdio" 3 6242: namespace std 6242: { 6242: using ::FILE; 6242: using ::fpos_t; 6242: 6242: using ::clearerr; 6242: using ::fclose; 6242: using ::feof; 6242: using ::ferror; 6242: using ::fflush; 6242: using ::fgetc; 6242: using ::fgetpos; 6242: using ::fgets; 6242: using ::fopen; 6242: using ::fprintf; 6242: using ::fputc; 6242: using ::fputs; 6242: using ::fread; 6242: using ::freopen; 6242: using ::fscanf; 6242: using ::fseek; 6242: using ::fsetpos; 6242: using ::ftell; 6242: using ::fwrite; 6242: using ::getc; 6242: using ::getchar; 6242: 6242: 6242: using ::gets; 6242: 6242: using ::perror; 6242: using ::printf; 6242: using ::putc; 6242: using ::putchar; 6242: using ::puts; 6242: using ::remove; 6242: using ::rename; 6242: using ::rewind; 6242: using ::scanf; 6242: using ::setbuf; 6242: using ::setvbuf; 6242: using ::sprintf; 6242: using ::sscanf; 6242: using ::tmpfile; 6242: 6242: using ::tmpnam; 6242: 6242: using ::ungetc; 6242: using ::vfprintf; 6242: using ::vprintf; 6242: using ::vsprintf; 6242: } 6242: # 157 "/usr/include/c++/8/cstdio" 3 6242: namespace __gnu_cxx 6242: { 6242: # 175 "/usr/include/c++/8/cstdio" 3 6242: using ::snprintf; 6242: using ::vfscanf; 6242: using ::vscanf; 6242: using ::vsnprintf; 6242: using ::vsscanf; 6242: 6242: } 6242: 6242: namespace std 6242: { 6242: using ::__gnu_cxx::snprintf; 6242: using ::__gnu_cxx::vfscanf; 6242: using ::__gnu_cxx::vscanf; 6242: using ::__gnu_cxx::vsnprintf; 6242: using ::__gnu_cxx::vsscanf; 6242: } 6242: # 44 "/usr/include/c++/8/ext/string_conversions.h" 2 3 6242: # 1 "/usr/include/c++/8/cerrno" 1 3 6242: # 39 "/usr/include/c++/8/cerrno" 3 6242: 6242: # 40 "/usr/include/c++/8/cerrno" 3 6242: 6242: 6242: # 1 "/usr/include/errno.h" 1 3 4 6242: # 28 "/usr/include/errno.h" 3 4 6242: # 1 "/usr/include/s390x-linux-gnu/bits/errno.h" 1 3 4 6242: # 26 "/usr/include/s390x-linux-gnu/bits/errno.h" 3 4 6242: # 1 "/usr/include/linux/errno.h" 1 3 4 6242: # 1 "/usr/include/s390x-linux-gnu/asm/errno.h" 1 3 4 6242: # 1 "/usr/include/asm-generic/errno.h" 1 3 4 6242: 6242: 6242: 6242: # 1 "/usr/include/asm-generic/errno-base.h" 1 3 4 6242: # 5 "/usr/include/asm-generic/errno.h" 2 3 4 6242: # 1 "/usr/include/s390x-linux-gnu/asm/errno.h" 2 3 4 6242: # 1 "/usr/include/linux/errno.h" 2 3 4 6242: # 27 "/usr/include/s390x-linux-gnu/bits/errno.h" 2 3 4 6242: # 29 "/usr/include/errno.h" 2 3 4 6242: 6242: 6242: 6242: 6242: 6242: extern "C" { 6242: 6242: 6242: extern int *__errno_location (void) throw () __attribute__ ((__const__)); 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: extern char *program_invocation_name; 6242: extern char *program_invocation_short_name; 6242: 6242: 6242: 6242: 6242: 6242: typedef int error_t; 6242: 6242: 6242: 6242: 6242: } 6242: # 43 "/usr/include/c++/8/cerrno" 2 3 6242: # 45 "/usr/include/c++/8/ext/string_conversions.h" 2 3 6242: 6242: namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) 6242: { 6242: 6242: 6242: 6242: template 6242: _Ret 6242: __stoa(_TRet (*__convf) (const _CharT*, _CharT**, _Base...), 6242: const char* __name, const _CharT* __str, std::size_t* __idx, 6242: _Base... __base) 6242: { 6242: _Ret __ret; 6242: 6242: _CharT* __endptr; 6242: 6242: struct _Save_errno { 6242: _Save_errno() : _M_errno((*__errno_location ())) { (*__errno_location ()) = 0; } 6242: ~_Save_errno() { if ((*__errno_location ()) == 0) (*__errno_location ()) = _M_errno; } 6242: int _M_errno; 6242: } const __save_errno; 6242: 6242: struct _Range_chk { 6242: static bool 6242: _S_chk(_TRet, std::false_type) { return false; } 6242: 6242: static bool 6242: _S_chk(_TRet __val, std::true_type) 6242: { 6242: return __val < _TRet(__numeric_traits::__min) 6242: || __val > _TRet(__numeric_traits::__max); 6242: } 6242: }; 6242: 6242: const _TRet __tmp = __convf(__str, &__endptr, __base...); 6242: 6242: if (__endptr == __str) 6242: std::__throw_invalid_argument(__name); 6242: else if ((*__errno_location ()) == 34 6242: || _Range_chk::_S_chk(__tmp, std::is_same<_Ret, int>{})) 6242: std::__throw_out_of_range(__name); 6242: else 6242: __ret = __tmp; 6242: 6242: if (__idx) 6242: *__idx = __endptr - __str; 6242: 6242: return __ret; 6242: } 6242: 6242: 6242: template 6242: _String 6242: __to_xstring(int (*__convf) (_CharT*, std::size_t, const _CharT*, 6242: __builtin_va_list), std::size_t __n, 6242: const _CharT* __fmt, ...) 6242: { 6242: 6242: 6242: _CharT* __s = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT) 6242: * __n)); 6242: 6242: __builtin_va_list __args; 6242: __builtin_va_start(__args, __fmt); 6242: 6242: const int __len = __convf(__s, __n, __fmt, __args); 6242: 6242: __builtin_va_end(__args); 6242: 6242: return _String(__s, __s + __len); 6242: } 6242: 6242: 6242: } 6242: # 6362 "/usr/include/c++/8/bits/basic_string.h" 2 3 6242: 6242: namespace std __attribute__ ((__visibility__ ("default"))) 6242: { 6242: 6242: namespace __cxx11 { 6242: 6242: 6242: 6242: inline int 6242: stoi(const string& __str, size_t* __idx = 0, int __base = 10) 6242: { return __gnu_cxx::__stoa(&std::strtol, "stoi", __str.c_str(), 6242: __idx, __base); } 6242: 6242: inline long 6242: stol(const string& __str, size_t* __idx = 0, int __base = 10) 6242: { return __gnu_cxx::__stoa(&std::strtol, "stol", __str.c_str(), 6242: __idx, __base); } 6242: 6242: inline unsigned long 6242: stoul(const string& __str, size_t* __idx = 0, int __base = 10) 6242: { return __gnu_cxx::__stoa(&std::strtoul, "stoul", __str.c_str(), 6242: __idx, __base); } 6242: 6242: inline long long 6242: stoll(const string& __str, size_t* __idx = 0, int __base = 10) 6242: { return __gnu_cxx::__stoa(&std::strtoll, "stoll", __str.c_str(), 6242: __idx, __base); } 6242: 6242: inline unsigned long long 6242: stoull(const string& __str, size_t* __idx = 0, int __base = 10) 6242: { return __gnu_cxx::__stoa(&std::strtoull, "stoull", __str.c_str(), 6242: __idx, __base); } 6242: 6242: 6242: inline float 6242: stof(const string& __str, size_t* __idx = 0) 6242: { return __gnu_cxx::__stoa(&std::strtof, "stof", __str.c_str(), __idx); } 6242: 6242: inline double 6242: stod(const string& __str, size_t* __idx = 0) 6242: { return __gnu_cxx::__stoa(&std::strtod, "stod", __str.c_str(), __idx); } 6242: 6242: inline long double 6242: stold(const string& __str, size_t* __idx = 0) 6242: { return __gnu_cxx::__stoa(&std::strtold, "stold", __str.c_str(), __idx); } 6242: 6242: 6242: 6242: 6242: 6242: 6242: inline string 6242: to_string(int __val) 6242: { return __gnu_cxx::__to_xstring(&std::vsnprintf, 4 * sizeof(int), 6242: "%d", __val); } 6242: 6242: inline string 6242: to_string(unsigned __val) 6242: { return __gnu_cxx::__to_xstring(&std::vsnprintf, 6242: 4 * sizeof(unsigned), 6242: "%u", __val); } 6242: 6242: inline string 6242: to_string(long __val) 6242: { return __gnu_cxx::__to_xstring(&std::vsnprintf, 4 * sizeof(long), 6242: "%ld", __val); } 6242: 6242: inline string 6242: to_string(unsigned long __val) 6242: { return __gnu_cxx::__to_xstring(&std::vsnprintf, 6242: 4 * sizeof(unsigned long), 6242: "%lu", __val); } 6242: 6242: inline string 6242: to_string(long long __val) 6242: { return __gnu_cxx::__to_xstring(&std::vsnprintf, 6242: 4 * sizeof(long long), 6242: "%lld", __val); } 6242: 6242: inline string 6242: to_string(unsigned long long __val) 6242: { return __gnu_cxx::__to_xstring(&std::vsnprintf, 6242: 4 * sizeof(unsigned long long), 6242: "%llu", __val); } 6242: 6242: inline string 6242: to_string(float __val) 6242: { 6242: const int __n = 6242: __gnu_cxx::__numeric_traits::__max_exponent10 + 20; 6242: return __gnu_cxx::__to_xstring(&std::vsnprintf, __n, 6242: "%f", __val); 6242: } 6242: 6242: inline string 6242: to_string(double __val) 6242: { 6242: const int __n = 6242: __gnu_cxx::__numeric_traits::__max_exponent10 + 20; 6242: return __gnu_cxx::__to_xstring(&std::vsnprintf, __n, 6242: "%f", __val); 6242: } 6242: 6242: inline string 6242: to_string(long double __val) 6242: { 6242: const int __n = 6242: __gnu_cxx::__numeric_traits::__max_exponent10 + 20; 6242: return __gnu_cxx::__to_xstring(&std::vsnprintf, __n, 6242: "%Lf", __val); 6242: } 6242: 6242: 6242: 6242: inline int 6242: stoi(const wstring& __str, size_t* __idx = 0, int __base = 10) 6242: { return __gnu_cxx::__stoa(&std::wcstol, "stoi", __str.c_str(), 6242: __idx, __base); } 6242: 6242: inline long 6242: stol(const wstring& __str, size_t* __idx = 0, int __base = 10) 6242: { return __gnu_cxx::__stoa(&std::wcstol, "stol", __str.c_str(), 6242: __idx, __base); } 6242: 6242: inline unsigned long 6242: stoul(const wstring& __str, size_t* __idx = 0, int __base = 10) 6242: { return __gnu_cxx::__stoa(&std::wcstoul, "stoul", __str.c_str(), 6242: __idx, __base); } 6242: 6242: inline long long 6242: stoll(const wstring& __str, size_t* __idx = 0, int __base = 10) 6242: { return __gnu_cxx::__stoa(&std::wcstoll, "stoll", __str.c_str(), 6242: __idx, __base); } 6242: 6242: inline unsigned long long 6242: stoull(const wstring& __str, size_t* __idx = 0, int __base = 10) 6242: { return __gnu_cxx::__stoa(&std::wcstoull, "stoull", __str.c_str(), 6242: __idx, __base); } 6242: 6242: 6242: inline float 6242: stof(const wstring& __str, size_t* __idx = 0) 6242: { return __gnu_cxx::__stoa(&std::wcstof, "stof", __str.c_str(), __idx); } 6242: 6242: inline double 6242: stod(const wstring& __str, size_t* __idx = 0) 6242: { return __gnu_cxx::__stoa(&std::wcstod, "stod", __str.c_str(), __idx); } 6242: 6242: inline long double 6242: stold(const wstring& __str, size_t* __idx = 0) 6242: { return __gnu_cxx::__stoa(&std::wcstold, "stold", __str.c_str(), __idx); } 6242: 6242: 6242: 6242: inline wstring 6242: to_wstring(int __val) 6242: { return __gnu_cxx::__to_xstring(&std::vswprintf, 4 * sizeof(int), 6242: L"%d", __val); } 6242: 6242: inline wstring 6242: to_wstring(unsigned __val) 6242: { return __gnu_cxx::__to_xstring(&std::vswprintf, 6242: 4 * sizeof(unsigned), 6242: L"%u", __val); } 6242: 6242: inline wstring 6242: to_wstring(long __val) 6242: { return __gnu_cxx::__to_xstring(&std::vswprintf, 4 * sizeof(long), 6242: L"%ld", __val); } 6242: 6242: inline wstring 6242: to_wstring(unsigned long __val) 6242: { return __gnu_cxx::__to_xstring(&std::vswprintf, 6242: 4 * sizeof(unsigned long), 6242: L"%lu", __val); } 6242: 6242: inline wstring 6242: to_wstring(long long __val) 6242: { return __gnu_cxx::__to_xstring(&std::vswprintf, 6242: 4 * sizeof(long long), 6242: L"%lld", __val); } 6242: 6242: inline wstring 6242: to_wstring(unsigned long long __val) 6242: { return __gnu_cxx::__to_xstring(&std::vswprintf, 6242: 4 * sizeof(unsigned long long), 6242: L"%llu", __val); } 6242: 6242: inline wstring 6242: to_wstring(float __val) 6242: { 6242: const int __n = 6242: __gnu_cxx::__numeric_traits::__max_exponent10 + 20; 6242: return __gnu_cxx::__to_xstring(&std::vswprintf, __n, 6242: L"%f", __val); 6242: } 6242: 6242: inline wstring 6242: to_wstring(double __val) 6242: { 6242: const int __n = 6242: __gnu_cxx::__numeric_traits::__max_exponent10 + 20; 6242: return __gnu_cxx::__to_xstring(&std::vswprintf, __n, 6242: L"%f", __val); 6242: } 6242: 6242: inline wstring 6242: to_wstring(long double __val) 6242: { 6242: const int __n = 6242: __gnu_cxx::__numeric_traits::__max_exponent10 + 20; 6242: return __gnu_cxx::__to_xstring(&std::vswprintf, __n, 6242: L"%Lf", __val); 6242: } 6242: 6242: 6242: 6242: } 6242: 6242: } 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: namespace std __attribute__ ((__visibility__ ("default"))) 6242: { 6242: 6242: 6242: 6242: 6242: 6242: 6242: template<> 6242: struct hash 6242: : public __hash_base 6242: { 6242: size_t 6242: operator()(const string& __s) const noexcept 6242: { return std::_Hash_impl::hash(__s.data(), __s.length()); } 6242: }; 6242: 6242: template<> 6242: struct __is_fast_hash> : std::false_type 6242: { }; 6242: 6242: 6242: 6242: template<> 6242: struct hash 6242: : public __hash_base 6242: { 6242: size_t 6242: operator()(const wstring& __s) const noexcept 6242: { return std::_Hash_impl::hash(__s.data(), 6242: __s.length() * sizeof(wchar_t)); } 6242: }; 6242: 6242: template<> 6242: struct __is_fast_hash> : std::false_type 6242: { }; 6242: 6242: 6242: 6242: 6242: 6242: template<> 6242: struct hash 6242: : public __hash_base 6242: { 6242: size_t 6242: operator()(const u16string& __s) const noexcept 6242: { return std::_Hash_impl::hash(__s.data(), 6242: __s.length() * sizeof(char16_t)); } 6242: }; 6242: 6242: template<> 6242: struct __is_fast_hash> : std::false_type 6242: { }; 6242: 6242: 6242: template<> 6242: struct hash 6242: : public __hash_base 6242: { 6242: size_t 6242: operator()(const u32string& __s) const noexcept 6242: { return std::_Hash_impl::hash(__s.data(), 6242: __s.length() * sizeof(char32_t)); } 6242: }; 6242: 6242: template<> 6242: struct __is_fast_hash> : std::false_type 6242: { }; 6242: # 6700 "/usr/include/c++/8/bits/basic_string.h" 3 6242: 6242: } 6242: # 53 "/usr/include/c++/8/string" 2 3 6242: # 1 "/usr/include/c++/8/bits/basic_string.tcc" 1 3 6242: # 42 "/usr/include/c++/8/bits/basic_string.tcc" 3 6242: 6242: # 43 "/usr/include/c++/8/bits/basic_string.tcc" 3 6242: 6242: 6242: 6242: namespace std __attribute__ ((__visibility__ ("default"))) 6242: { 6242: 6242: 6242: 6242: 6242: template 6242: const typename basic_string<_CharT, _Traits, _Alloc>::size_type 6242: basic_string<_CharT, _Traits, _Alloc>::npos; 6242: 6242: template 6242: void 6242: basic_string<_CharT, _Traits, _Alloc>:: 6242: swap(basic_string& __s) noexcept 6242: { 6242: if (this == &__s) 6242: return; 6242: 6242: _Alloc_traits::_S_on_swap(_M_get_allocator(), __s._M_get_allocator()); 6242: 6242: if (_M_is_local()) 6242: if (__s._M_is_local()) 6242: { 6242: if (length() && __s.length()) 6242: { 6242: _CharT __tmp_data[_S_local_capacity + 1]; 6242: traits_type::copy(__tmp_data, __s._M_local_buf, 6242: _S_local_capacity + 1); 6242: traits_type::copy(__s._M_local_buf, _M_local_buf, 6242: _S_local_capacity + 1); 6242: traits_type::copy(_M_local_buf, __tmp_data, 6242: _S_local_capacity + 1); 6242: } 6242: else if (__s.length()) 6242: { 6242: traits_type::copy(_M_local_buf, __s._M_local_buf, 6242: _S_local_capacity + 1); 6242: _M_length(__s.length()); 6242: __s._M_set_length(0); 6242: return; 6242: } 6242: else if (length()) 6242: { 6242: traits_type::copy(__s._M_local_buf, _M_local_buf, 6242: _S_local_capacity + 1); 6242: __s._M_length(length()); 6242: _M_set_length(0); 6242: return; 6242: } 6242: } 6242: else 6242: { 6242: const size_type __tmp_capacity = __s._M_allocated_capacity; 6242: traits_type::copy(__s._M_local_buf, _M_local_buf, 6242: _S_local_capacity + 1); 6242: _M_data(__s._M_data()); 6242: __s._M_data(__s._M_local_buf); 6242: _M_capacity(__tmp_capacity); 6242: } 6242: else 6242: { 6242: const size_type __tmp_capacity = _M_allocated_capacity; 6242: if (__s._M_is_local()) 6242: { 6242: traits_type::copy(_M_local_buf, __s._M_local_buf, 6242: _S_local_capacity + 1); 6242: __s._M_data(_M_data()); 6242: _M_data(_M_local_buf); 6242: } 6242: else 6242: { 6242: pointer __tmp_ptr = _M_data(); 6242: _M_data(__s._M_data()); 6242: __s._M_data(__tmp_ptr); 6242: _M_capacity(__s._M_allocated_capacity); 6242: } 6242: __s._M_capacity(__tmp_capacity); 6242: } 6242: 6242: const size_type __tmp_length = length(); 6242: _M_length(__s.length()); 6242: __s._M_length(__tmp_length); 6242: } 6242: 6242: template 6242: typename basic_string<_CharT, _Traits, _Alloc>::pointer 6242: basic_string<_CharT, _Traits, _Alloc>:: 6242: _M_create(size_type& __capacity, size_type __old_capacity) 6242: { 6242: 6242: 6242: if (__capacity > max_size()) 6242: std::__throw_length_error(("basic_string::_M_create")); 6242: 6242: 6242: 6242: 6242: if (__capacity > __old_capacity && __capacity < 2 * __old_capacity) 6242: { 6242: __capacity = 2 * __old_capacity; 6242: 6242: if (__capacity > max_size()) 6242: __capacity = max_size(); 6242: } 6242: 6242: 6242: 6242: return _Alloc_traits::allocate(_M_get_allocator(), __capacity + 1); 6242: } 6242: 6242: 6242: 6242: 6242: 6242: template 6242: template 6242: void 6242: basic_string<_CharT, _Traits, _Alloc>:: 6242: _M_construct(_InIterator __beg, _InIterator __end, 6242: std::input_iterator_tag) 6242: { 6242: size_type __len = 0; 6242: size_type __capacity = size_type(_S_local_capacity); 6242: 6242: while (__beg != __end && __len < __capacity) 6242: { 6242: _M_data()[__len++] = *__beg; 6242: ++__beg; 6242: } 6242: 6242: try 6242: { 6242: while (__beg != __end) 6242: { 6242: if (__len == __capacity) 6242: { 6242: 6242: __capacity = __len + 1; 6242: pointer __another = _M_create(__capacity, __len); 6242: this->_S_copy(__another, _M_data(), __len); 6242: _M_dispose(); 6242: _M_data(__another); 6242: _M_capacity(__capacity); 6242: } 6242: _M_data()[__len++] = *__beg; 6242: ++__beg; 6242: } 6242: } 6242: catch(...) 6242: { 6242: _M_dispose(); 6242: throw; 6242: } 6242: 6242: _M_set_length(__len); 6242: } 6242: 6242: template 6242: template 6242: void 6242: basic_string<_CharT, _Traits, _Alloc>:: 6242: _M_construct(_InIterator __beg, _InIterator __end, 6242: std::forward_iterator_tag) 6242: { 6242: 6242: if (__gnu_cxx::__is_null_pointer(__beg) && __beg != __end) 6242: std::__throw_logic_error(("basic_string::" "_M_construct null not valid") 6242: ); 6242: 6242: size_type __dnew = static_cast(std::distance(__beg, __end)); 6242: 6242: if (__dnew > size_type(_S_local_capacity)) 6242: { 6242: _M_data(_M_create(__dnew, size_type(0))); 6242: _M_capacity(__dnew); 6242: } 6242: 6242: 6242: try 6242: { this->_S_copy_chars(_M_data(), __beg, __end); } 6242: catch(...) 6242: { 6242: _M_dispose(); 6242: throw; 6242: } 6242: 6242: _M_set_length(__dnew); 6242: } 6242: 6242: template 6242: void 6242: basic_string<_CharT, _Traits, _Alloc>:: 6242: _M_construct(size_type __n, _CharT __c) 6242: { 6242: if (__n > size_type(_S_local_capacity)) 6242: { 6242: _M_data(_M_create(__n, size_type(0))); 6242: _M_capacity(__n); 6242: } 6242: 6242: if (__n) 6242: this->_S_assign(_M_data(), __n, __c); 6242: 6242: _M_set_length(__n); 6242: } 6242: 6242: template 6242: void 6242: basic_string<_CharT, _Traits, _Alloc>:: 6242: _M_assign(const basic_string& __str) 6242: { 6242: if (this != &__str) 6242: { 6242: const size_type __rsize = __str.length(); 6242: const size_type __capacity = capacity(); 6242: 6242: if (__rsize > __capacity) 6242: { 6242: size_type __new_capacity = __rsize; 6242: pointer __tmp = _M_create(__new_capacity, __capacity); 6242: _M_dispose(); 6242: _M_data(__tmp); 6242: _M_capacity(__new_capacity); 6242: } 6242: 6242: if (__rsize) 6242: this->_S_copy(_M_data(), __str._M_data(), __rsize); 6242: 6242: _M_set_length(__rsize); 6242: } 6242: } 6242: 6242: template 6242: void 6242: basic_string<_CharT, _Traits, _Alloc>:: 6242: reserve(size_type __res) 6242: { 6242: 6242: if (__res < length()) 6242: __res = length(); 6242: 6242: const size_type __capacity = capacity(); 6242: if (__res != __capacity) 6242: { 6242: if (__res > __capacity 6242: || __res > size_type(_S_local_capacity)) 6242: { 6242: pointer __tmp = _M_create(__res, __capacity); 6242: this->_S_copy(__tmp, _M_data(), length() + 1); 6242: _M_dispose(); 6242: _M_data(__tmp); 6242: _M_capacity(__res); 6242: } 6242: else if (!_M_is_local()) 6242: { 6242: this->_S_copy(_M_local_data(), _M_data(), length() + 1); 6242: _M_destroy(__capacity); 6242: _M_data(_M_local_data()); 6242: } 6242: } 6242: } 6242: 6242: template 6242: void 6242: basic_string<_CharT, _Traits, _Alloc>:: 6242: _M_mutate(size_type __pos, size_type __len1, const _CharT* __s, 6242: size_type __len2) 6242: { 6242: const size_type __how_much = length() - __pos - __len1; 6242: 6242: size_type __new_capacity = length() + __len2 - __len1; 6242: pointer __r = _M_create(__new_capacity, capacity()); 6242: 6242: if (__pos) 6242: this->_S_copy(__r, _M_data(), __pos); 6242: if (__s && __len2) 6242: this->_S_copy(__r + __pos, __s, __len2); 6242: if (__how_much) 6242: this->_S_copy(__r + __pos + __len2, 6242: _M_data() + __pos + __len1, __how_much); 6242: 6242: _M_dispose(); 6242: _M_data(__r); 6242: _M_capacity(__new_capacity); 6242: } 6242: 6242: template 6242: void 6242: basic_string<_CharT, _Traits, _Alloc>:: 6242: _M_erase(size_type __pos, size_type __n) 6242: { 6242: const size_type __how_much = length() - __pos - __n; 6242: 6242: if (__how_much && __n) 6242: this->_S_move(_M_data() + __pos, _M_data() + __pos + __n, __how_much); 6242: 6242: _M_set_length(length() - __n); 6242: } 6242: 6242: template 6242: void 6242: basic_string<_CharT, _Traits, _Alloc>:: 6242: resize(size_type __n, _CharT __c) 6242: { 6242: const size_type __size = this->size(); 6242: if (__size < __n) 6242: this->append(__n - __size, __c); 6242: else if (__n < __size) 6242: this->_M_set_length(__n); 6242: } 6242: 6242: template 6242: basic_string<_CharT, _Traits, _Alloc>& 6242: basic_string<_CharT, _Traits, _Alloc>:: 6242: _M_append(const _CharT* __s, size_type __n) 6242: { 6242: const size_type __len = __n + this->size(); 6242: 6242: if (__len <= this->capacity()) 6242: { 6242: if (__n) 6242: this->_S_copy(this->_M_data() + this->size(), __s, __n); 6242: } 6242: else 6242: this->_M_mutate(this->size(), size_type(0), __s, __n); 6242: 6242: this->_M_set_length(__len); 6242: return *this; 6242: } 6242: 6242: template 6242: template 6242: basic_string<_CharT, _Traits, _Alloc>& 6242: basic_string<_CharT, _Traits, _Alloc>:: 6242: _M_replace_dispatch(const_iterator __i1, const_iterator __i2, 6242: _InputIterator __k1, _InputIterator __k2, 6242: std::__false_type) 6242: { 6242: const basic_string __s(__k1, __k2); 6242: const size_type __n1 = __i2 - __i1; 6242: return _M_replace(__i1 - begin(), __n1, __s._M_data(), 6242: __s.size()); 6242: } 6242: 6242: template 6242: basic_string<_CharT, _Traits, _Alloc>& 6242: basic_string<_CharT, _Traits, _Alloc>:: 6242: _M_replace_aux(size_type __pos1, size_type __n1, size_type __n2, 6242: _CharT __c) 6242: { 6242: _M_check_length(__n1, __n2, "basic_string::_M_replace_aux"); 6242: 6242: const size_type __old_size = this->size(); 6242: const size_type __new_size = __old_size + __n2 - __n1; 6242: 6242: if (__new_size <= this->capacity()) 6242: { 6242: pointer __p = this->_M_data() + __pos1; 6242: 6242: const size_type __how_much = __old_size - __pos1 - __n1; 6242: if (__how_much && __n1 != __n2) 6242: this->_S_move(__p + __n2, __p + __n1, __how_much); 6242: } 6242: else 6242: this->_M_mutate(__pos1, __n1, 0, __n2); 6242: 6242: if (__n2) 6242: this->_S_assign(this->_M_data() + __pos1, __n2, __c); 6242: 6242: this->_M_set_length(__new_size); 6242: return *this; 6242: } 6242: 6242: template 6242: basic_string<_CharT, _Traits, _Alloc>& 6242: basic_string<_CharT, _Traits, _Alloc>:: 6242: _M_replace(size_type __pos, size_type __len1, const _CharT* __s, 6242: const size_type __len2) 6242: { 6242: _M_check_length(__len1, __len2, "basic_string::_M_replace"); 6242: 6242: const size_type __old_size = this->size(); 6242: const size_type __new_size = __old_size + __len2 - __len1; 6242: 6242: if (__new_size <= this->capacity()) 6242: { 6242: pointer __p = this->_M_data() + __pos; 6242: 6242: const size_type __how_much = __old_size - __pos - __len1; 6242: if (_M_disjunct(__s)) 6242: { 6242: if (__how_much && __len1 != __len2) 6242: this->_S_move(__p + __len2, __p + __len1, __how_much); 6242: if (__len2) 6242: this->_S_copy(__p, __s, __len2); 6242: } 6242: else 6242: { 6242: 6242: if (__len2 && __len2 <= __len1) 6242: this->_S_move(__p, __s, __len2); 6242: if (__how_much && __len1 != __len2) 6242: this->_S_move(__p + __len2, __p + __len1, __how_much); 6242: if (__len2 > __len1) 6242: { 6242: if (__s + __len2 <= __p + __len1) 6242: this->_S_move(__p, __s, __len2); 6242: else if (__s >= __p + __len1) 6242: this->_S_copy(__p, __s + __len2 - __len1, __len2); 6242: else 6242: { 6242: const size_type __nleft = (__p + __len1) - __s; 6242: this->_S_move(__p, __s, __nleft); 6242: this->_S_copy(__p + __nleft, __p + __len2, 6242: __len2 - __nleft); 6242: } 6242: } 6242: } 6242: } 6242: else 6242: this->_M_mutate(__pos, __len1, __s, __len2); 6242: 6242: this->_M_set_length(__new_size); 6242: return *this; 6242: } 6242: 6242: template 6242: typename basic_string<_CharT, _Traits, _Alloc>::size_type 6242: basic_string<_CharT, _Traits, _Alloc>:: 6242: copy(_CharT* __s, size_type __n, size_type __pos) const 6242: { 6242: _M_check(__pos, "basic_string::copy"); 6242: __n = _M_limit(__pos, __n); 6242: ; 6242: if (__n) 6242: _S_copy(__s, _M_data() + __pos, __n); 6242: 6242: return __n; 6242: } 6242: # 1155 "/usr/include/c++/8/bits/basic_string.tcc" 3 6242: template 6242: basic_string<_CharT, _Traits, _Alloc> 6242: operator+(const _CharT* __lhs, 6242: const basic_string<_CharT, _Traits, _Alloc>& __rhs) 6242: { 6242: ; 6242: typedef basic_string<_CharT, _Traits, _Alloc> __string_type; 6242: typedef typename __string_type::size_type __size_type; 6242: const __size_type __len = _Traits::length(__lhs); 6242: __string_type __str; 6242: __str.reserve(__len + __rhs.size()); 6242: __str.append(__lhs, __len); 6242: __str.append(__rhs); 6242: return __str; 6242: } 6242: 6242: template 6242: basic_string<_CharT, _Traits, _Alloc> 6242: operator+(_CharT __lhs, const basic_string<_CharT, _Traits, _Alloc>& __rhs) 6242: { 6242: typedef basic_string<_CharT, _Traits, _Alloc> __string_type; 6242: typedef typename __string_type::size_type __size_type; 6242: __string_type __str; 6242: const __size_type __len = __rhs.size(); 6242: __str.reserve(__len + 1); 6242: __str.append(__size_type(1), __lhs); 6242: __str.append(__rhs); 6242: return __str; 6242: } 6242: 6242: template 6242: typename basic_string<_CharT, _Traits, _Alloc>::size_type 6242: basic_string<_CharT, _Traits, _Alloc>:: 6242: find(const _CharT* __s, size_type __pos, size_type __n) const 6242: noexcept 6242: { 6242: ; 6242: const size_type __size = this->size(); 6242: 6242: if (__n == 0) 6242: return __pos <= __size ? __pos : npos; 6242: if (__pos >= __size) 6242: return npos; 6242: 6242: const _CharT __elem0 = __s[0]; 6242: const _CharT* const __data = data(); 6242: const _CharT* __first = __data + __pos; 6242: const _CharT* const __last = __data + __size; 6242: size_type __len = __size - __pos; 6242: 6242: while (__len >= __n) 6242: { 6242: 6242: __first = traits_type::find(__first, __len - __n + 1, __elem0); 6242: if (!__first) 6242: return npos; 6242: 6242: 6242: 6242: if (traits_type::compare(__first, __s, __n) == 0) 6242: return __first - __data; 6242: __len = __last - ++__first; 6242: } 6242: return npos; 6242: } 6242: 6242: template 6242: typename basic_string<_CharT, _Traits, _Alloc>::size_type 6242: basic_string<_CharT, _Traits, _Alloc>:: 6242: find(_CharT __c, size_type __pos) const noexcept 6242: { 6242: size_type __ret = npos; 6242: const size_type __size = this->size(); 6242: if (__pos < __size) 6242: { 6242: const _CharT* __data = _M_data(); 6242: const size_type __n = __size - __pos; 6242: const _CharT* __p = traits_type::find(__data + __pos, __n, __c); 6242: if (__p) 6242: __ret = __p - __data; 6242: } 6242: return __ret; 6242: } 6242: 6242: template 6242: typename basic_string<_CharT, _Traits, _Alloc>::size_type 6242: basic_string<_CharT, _Traits, _Alloc>:: 6242: rfind(const _CharT* __s, size_type __pos, size_type __n) const 6242: noexcept 6242: { 6242: ; 6242: const size_type __size = this->size(); 6242: if (__n <= __size) 6242: { 6242: __pos = std::min(size_type(__size - __n), __pos); 6242: const _CharT* __data = _M_data(); 6242: do 6242: { 6242: if (traits_type::compare(__data + __pos, __s, __n) == 0) 6242: return __pos; 6242: } 6242: while (__pos-- > 0); 6242: } 6242: return npos; 6242: } 6242: 6242: template 6242: typename basic_string<_CharT, _Traits, _Alloc>::size_type 6242: basic_string<_CharT, _Traits, _Alloc>:: 6242: rfind(_CharT __c, size_type __pos) const noexcept 6242: { 6242: size_type __size = this->size(); 6242: if (__size) 6242: { 6242: if (--__size > __pos) 6242: __size = __pos; 6242: for (++__size; __size-- > 0; ) 6242: if (traits_type::eq(_M_data()[__size], __c)) 6242: return __size; 6242: } 6242: return npos; 6242: } 6242: 6242: template 6242: typename basic_string<_CharT, _Traits, _Alloc>::size_type 6242: basic_string<_CharT, _Traits, _Alloc>:: 6242: find_first_of(const _CharT* __s, size_type __pos, size_type __n) const 6242: noexcept 6242: { 6242: ; 6242: for (; __n && __pos < this->size(); ++__pos) 6242: { 6242: const _CharT* __p = traits_type::find(__s, __n, _M_data()[__pos]); 6242: if (__p) 6242: return __pos; 6242: } 6242: return npos; 6242: } 6242: 6242: template 6242: typename basic_string<_CharT, _Traits, _Alloc>::size_type 6242: basic_string<_CharT, _Traits, _Alloc>:: 6242: find_last_of(const _CharT* __s, size_type __pos, size_type __n) const 6242: noexcept 6242: { 6242: ; 6242: size_type __size = this->size(); 6242: if (__size && __n) 6242: { 6242: if (--__size > __pos) 6242: __size = __pos; 6242: do 6242: { 6242: if (traits_type::find(__s, __n, _M_data()[__size])) 6242: return __size; 6242: } 6242: while (__size-- != 0); 6242: } 6242: return npos; 6242: } 6242: 6242: template 6242: typename basic_string<_CharT, _Traits, _Alloc>::size_type 6242: basic_string<_CharT, _Traits, _Alloc>:: 6242: find_first_not_of(const _CharT* __s, size_type __pos, size_type __n) const 6242: noexcept 6242: { 6242: ; 6242: for (; __pos < this->size(); ++__pos) 6242: if (!traits_type::find(__s, __n, _M_data()[__pos])) 6242: return __pos; 6242: return npos; 6242: } 6242: 6242: template 6242: typename basic_string<_CharT, _Traits, _Alloc>::size_type 6242: basic_string<_CharT, _Traits, _Alloc>:: 6242: find_first_not_of(_CharT __c, size_type __pos) const noexcept 6242: { 6242: for (; __pos < this->size(); ++__pos) 6242: if (!traits_type::eq(_M_data()[__pos], __c)) 6242: return __pos; 6242: return npos; 6242: } 6242: 6242: template 6242: typename basic_string<_CharT, _Traits, _Alloc>::size_type 6242: basic_string<_CharT, _Traits, _Alloc>:: 6242: find_last_not_of(const _CharT* __s, size_type __pos, size_type __n) const 6242: noexcept 6242: { 6242: ; 6242: size_type __size = this->size(); 6242: if (__size) 6242: { 6242: if (--__size > __pos) 6242: __size = __pos; 6242: do 6242: { 6242: if (!traits_type::find(__s, __n, _M_data()[__size])) 6242: return __size; 6242: } 6242: while (__size--); 6242: } 6242: return npos; 6242: } 6242: 6242: template 6242: typename basic_string<_CharT, _Traits, _Alloc>::size_type 6242: basic_string<_CharT, _Traits, _Alloc>:: 6242: find_last_not_of(_CharT __c, size_type __pos) const noexcept 6242: { 6242: size_type __size = this->size(); 6242: if (__size) 6242: { 6242: if (--__size > __pos) 6242: __size = __pos; 6242: do 6242: { 6242: if (!traits_type::eq(_M_data()[__size], __c)) 6242: return __size; 6242: } 6242: while (__size--); 6242: } 6242: return npos; 6242: } 6242: 6242: template 6242: int 6242: basic_string<_CharT, _Traits, _Alloc>:: 6242: compare(size_type __pos, size_type __n, const basic_string& __str) const 6242: { 6242: _M_check(__pos, "basic_string::compare"); 6242: __n = _M_limit(__pos, __n); 6242: const size_type __osize = __str.size(); 6242: const size_type __len = std::min(__n, __osize); 6242: int __r = traits_type::compare(_M_data() + __pos, __str.data(), __len); 6242: if (!__r) 6242: __r = _S_compare(__n, __osize); 6242: return __r; 6242: } 6242: 6242: template 6242: int 6242: basic_string<_CharT, _Traits, _Alloc>:: 6242: compare(size_type __pos1, size_type __n1, const basic_string& __str, 6242: size_type __pos2, size_type __n2) const 6242: { 6242: _M_check(__pos1, "basic_string::compare"); 6242: __str._M_check(__pos2, "basic_string::compare"); 6242: __n1 = _M_limit(__pos1, __n1); 6242: __n2 = __str._M_limit(__pos2, __n2); 6242: const size_type __len = std::min(__n1, __n2); 6242: int __r = traits_type::compare(_M_data() + __pos1, 6242: __str.data() + __pos2, __len); 6242: if (!__r) 6242: __r = _S_compare(__n1, __n2); 6242: return __r; 6242: } 6242: 6242: template 6242: int 6242: basic_string<_CharT, _Traits, _Alloc>:: 6242: compare(const _CharT* __s) const noexcept 6242: { 6242: ; 6242: const size_type __size = this->size(); 6242: const size_type __osize = traits_type::length(__s); 6242: const size_type __len = std::min(__size, __osize); 6242: int __r = traits_type::compare(_M_data(), __s, __len); 6242: if (!__r) 6242: __r = _S_compare(__size, __osize); 6242: return __r; 6242: } 6242: 6242: template 6242: int 6242: basic_string <_CharT, _Traits, _Alloc>:: 6242: compare(size_type __pos, size_type __n1, const _CharT* __s) const 6242: { 6242: ; 6242: _M_check(__pos, "basic_string::compare"); 6242: __n1 = _M_limit(__pos, __n1); 6242: const size_type __osize = traits_type::length(__s); 6242: const size_type __len = std::min(__n1, __osize); 6242: int __r = traits_type::compare(_M_data() + __pos, __s, __len); 6242: if (!__r) 6242: __r = _S_compare(__n1, __osize); 6242: return __r; 6242: } 6242: 6242: template 6242: int 6242: basic_string <_CharT, _Traits, _Alloc>:: 6242: compare(size_type __pos, size_type __n1, const _CharT* __s, 6242: size_type __n2) const 6242: { 6242: ; 6242: _M_check(__pos, "basic_string::compare"); 6242: __n1 = _M_limit(__pos, __n1); 6242: const size_type __len = std::min(__n1, __n2); 6242: int __r = traits_type::compare(_M_data() + __pos, __s, __len); 6242: if (!__r) 6242: __r = _S_compare(__n1, __n2); 6242: return __r; 6242: } 6242: 6242: 6242: template 6242: basic_istream<_CharT, _Traits>& 6242: operator>>(basic_istream<_CharT, _Traits>& __in, 6242: basic_string<_CharT, _Traits, _Alloc>& __str) 6242: { 6242: typedef basic_istream<_CharT, _Traits> __istream_type; 6242: typedef basic_string<_CharT, _Traits, _Alloc> __string_type; 6242: typedef typename __istream_type::ios_base __ios_base; 6242: typedef typename __istream_type::int_type __int_type; 6242: typedef typename __string_type::size_type __size_type; 6242: typedef ctype<_CharT> __ctype_type; 6242: typedef typename __ctype_type::ctype_base __ctype_base; 6242: 6242: __size_type __extracted = 0; 6242: typename __ios_base::iostate __err = __ios_base::goodbit; 6242: typename __istream_type::sentry __cerb(__in, false); 6242: if (__cerb) 6242: { 6242: try 6242: { 6242: 6242: __str.erase(); 6242: _CharT __buf[128]; 6242: __size_type __len = 0; 6242: const streamsize __w = __in.width(); 6242: const __size_type __n = __w > 0 ? static_cast<__size_type>(__w) 6242: : __str.max_size(); 6242: const __ctype_type& __ct = use_facet<__ctype_type>(__in.getloc()); 6242: const __int_type __eof = _Traits::eof(); 6242: __int_type __c = __in.rdbuf()->sgetc(); 6242: 6242: while (__extracted < __n 6242: && !_Traits::eq_int_type(__c, __eof) 6242: && !__ct.is(__ctype_base::space, 6242: _Traits::to_char_type(__c))) 6242: { 6242: if (__len == sizeof(__buf) / sizeof(_CharT)) 6242: { 6242: __str.append(__buf, sizeof(__buf) / sizeof(_CharT)); 6242: __len = 0; 6242: } 6242: __buf[__len++] = _Traits::to_char_type(__c); 6242: ++__extracted; 6242: __c = __in.rdbuf()->snextc(); 6242: } 6242: __str.append(__buf, __len); 6242: 6242: if (_Traits::eq_int_type(__c, __eof)) 6242: __err |= __ios_base::eofbit; 6242: __in.width(0); 6242: } 6242: catch(__cxxabiv1::__forced_unwind&) 6242: { 6242: __in._M_setstate(__ios_base::badbit); 6242: throw; 6242: } 6242: catch(...) 6242: { 6242: 6242: 6242: 6242: __in._M_setstate(__ios_base::badbit); 6242: } 6242: } 6242: 6242: if (!__extracted) 6242: __err |= __ios_base::failbit; 6242: if (__err) 6242: __in.setstate(__err); 6242: return __in; 6242: } 6242: 6242: template 6242: basic_istream<_CharT, _Traits>& 6242: getline(basic_istream<_CharT, _Traits>& __in, 6242: basic_string<_CharT, _Traits, _Alloc>& __str, _CharT __delim) 6242: { 6242: typedef basic_istream<_CharT, _Traits> __istream_type; 6242: typedef basic_string<_CharT, _Traits, _Alloc> __string_type; 6242: typedef typename __istream_type::ios_base __ios_base; 6242: typedef typename __istream_type::int_type __int_type; 6242: typedef typename __string_type::size_type __size_type; 6242: 6242: __size_type __extracted = 0; 6242: const __size_type __n = __str.max_size(); 6242: typename __ios_base::iostate __err = __ios_base::goodbit; 6242: typename __istream_type::sentry __cerb(__in, true); 6242: if (__cerb) 6242: { 6242: try 6242: { 6242: __str.erase(); 6242: const __int_type __idelim = _Traits::to_int_type(__delim); 6242: const __int_type __eof = _Traits::eof(); 6242: __int_type __c = __in.rdbuf()->sgetc(); 6242: 6242: while (__extracted < __n 6242: && !_Traits::eq_int_type(__c, __eof) 6242: && !_Traits::eq_int_type(__c, __idelim)) 6242: { 6242: __str += _Traits::to_char_type(__c); 6242: ++__extracted; 6242: __c = __in.rdbuf()->snextc(); 6242: } 6242: 6242: if (_Traits::eq_int_type(__c, __eof)) 6242: __err |= __ios_base::eofbit; 6242: else if (_Traits::eq_int_type(__c, __idelim)) 6242: { 6242: ++__extracted; 6242: __in.rdbuf()->sbumpc(); 6242: } 6242: else 6242: __err |= __ios_base::failbit; 6242: } 6242: catch(__cxxabiv1::__forced_unwind&) 6242: { 6242: __in._M_setstate(__ios_base::badbit); 6242: throw; 6242: } 6242: catch(...) 6242: { 6242: 6242: 6242: 6242: __in._M_setstate(__ios_base::badbit); 6242: } 6242: } 6242: if (!__extracted) 6242: __err |= __ios_base::failbit; 6242: if (__err) 6242: __in.setstate(__err); 6242: return __in; 6242: } 6242: 6242: 6242: 6242: 6242: extern template class basic_string; 6242: extern template 6242: basic_istream& 6242: operator>>(basic_istream&, string&); 6242: extern template 6242: basic_ostream& 6242: operator<<(basic_ostream&, const string&); 6242: extern template 6242: basic_istream& 6242: getline(basic_istream&, string&, char); 6242: extern template 6242: basic_istream& 6242: getline(basic_istream&, string&); 6242: 6242: 6242: extern template class basic_string; 6242: extern template 6242: basic_istream& 6242: operator>>(basic_istream&, wstring&); 6242: extern template 6242: basic_ostream& 6242: operator<<(basic_ostream&, const wstring&); 6242: extern template 6242: basic_istream& 6242: getline(basic_istream&, wstring&, wchar_t); 6242: extern template 6242: basic_istream& 6242: getline(basic_istream&, wstring&); 6242: 6242: 6242: 6242: 6242: } 6242: # 54 "/usr/include/c++/8/string" 2 3 6242: # 41 "/usr/include/c++/8/bits/locale_classes.h" 2 3 6242: 6242: 6242: namespace std __attribute__ ((__visibility__ ("default"))) 6242: { 6242: 6242: # 62 "/usr/include/c++/8/bits/locale_classes.h" 3 6242: class locale 6242: { 6242: public: 6242: 6242: 6242: typedef int category; 6242: 6242: 6242: class facet; 6242: class id; 6242: class _Impl; 6242: 6242: friend class facet; 6242: friend class _Impl; 6242: 6242: template 6242: friend bool 6242: has_facet(const locale&) throw(); 6242: 6242: template 6242: friend const _Facet& 6242: use_facet(const locale&); 6242: 6242: template 6242: friend struct __use_cache; 6242: # 98 "/usr/include/c++/8/bits/locale_classes.h" 3 6242: static const category none = 0; 6242: static const category ctype = 1L << 0; 6242: static const category numeric = 1L << 1; 6242: static const category collate = 1L << 2; 6242: static const category time = 1L << 3; 6242: static const category monetary = 1L << 4; 6242: static const category messages = 1L << 5; 6242: static const category all = (ctype | numeric | collate | 6242: time | monetary | messages); 6242: # 117 "/usr/include/c++/8/bits/locale_classes.h" 3 6242: locale() throw(); 6242: # 126 "/usr/include/c++/8/bits/locale_classes.h" 3 6242: locale(const locale& __other) throw(); 6242: # 136 "/usr/include/c++/8/bits/locale_classes.h" 3 6242: explicit 6242: locale(const char* __s); 6242: # 151 "/usr/include/c++/8/bits/locale_classes.h" 3 6242: locale(const locale& __base, const char* __s, category __cat); 6242: # 162 "/usr/include/c++/8/bits/locale_classes.h" 3 6242: explicit 6242: locale(const std::string& __s) : locale(__s.c_str()) { } 6242: # 177 "/usr/include/c++/8/bits/locale_classes.h" 3 6242: locale(const locale& __base, const std::string& __s, category __cat) 6242: : locale(__base, __s.c_str(), __cat) { } 6242: # 192 "/usr/include/c++/8/bits/locale_classes.h" 3 6242: locale(const locale& __base, const locale& __add, category __cat); 6242: # 205 "/usr/include/c++/8/bits/locale_classes.h" 3 6242: template 6242: locale(const locale& __other, _Facet* __f); 6242: 6242: 6242: ~locale() throw(); 6242: # 219 "/usr/include/c++/8/bits/locale_classes.h" 3 6242: const locale& 6242: operator=(const locale& __other) throw(); 6242: # 234 "/usr/include/c++/8/bits/locale_classes.h" 3 6242: template 6242: locale 6242: combine(const locale& __other) const; 6242: 6242: 6242: 6242: 6242: 6242: 6242: __attribute ((__abi_tag__ ("cxx11"))) 6242: string 6242: name() const; 6242: # 254 "/usr/include/c++/8/bits/locale_classes.h" 3 6242: bool 6242: operator==(const locale& __other) const throw(); 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: bool 6242: operator!=(const locale& __other) const throw() 6242: { return !(this->operator==(__other)); } 6242: # 282 "/usr/include/c++/8/bits/locale_classes.h" 3 6242: template 6242: bool 6242: operator()(const basic_string<_Char, _Traits, _Alloc>& __s1, 6242: const basic_string<_Char, _Traits, _Alloc>& __s2) const; 6242: # 298 "/usr/include/c++/8/bits/locale_classes.h" 3 6242: static locale 6242: global(const locale& __loc); 6242: 6242: 6242: 6242: 6242: static const locale& 6242: classic(); 6242: 6242: private: 6242: 6242: _Impl* _M_impl; 6242: 6242: 6242: static _Impl* _S_classic; 6242: 6242: 6242: static _Impl* _S_global; 6242: 6242: 6242: 6242: 6242: 6242: static const char* const* const _S_categories; 6242: # 333 "/usr/include/c++/8/bits/locale_classes.h" 3 6242: enum { _S_categories_size = 6 + 6 }; 6242: 6242: 6242: static __gthread_once_t _S_once; 6242: 6242: 6242: explicit 6242: locale(_Impl*) throw(); 6242: 6242: static void 6242: _S_initialize(); 6242: 6242: static void 6242: _S_initialize_once() throw(); 6242: 6242: static category 6242: _S_normalize_category(category); 6242: 6242: void 6242: _M_coalesce(const locale& __base, const locale& __add, category __cat); 6242: 6242: 6242: static const id* const _S_twinned_facets[]; 6242: 6242: }; 6242: # 371 "/usr/include/c++/8/bits/locale_classes.h" 3 6242: class locale::facet 6242: { 6242: private: 6242: friend class locale; 6242: friend class locale::_Impl; 6242: 6242: mutable _Atomic_word _M_refcount; 6242: 6242: 6242: static __c_locale _S_c_locale; 6242: 6242: 6242: static const char _S_c_name[2]; 6242: 6242: 6242: static __gthread_once_t _S_once; 6242: 6242: 6242: static void 6242: _S_initialize_once(); 6242: 6242: protected: 6242: # 402 "/usr/include/c++/8/bits/locale_classes.h" 3 6242: explicit 6242: facet(size_t __refs = 0) throw() : _M_refcount(__refs ? 1 : 0) 6242: { } 6242: 6242: 6242: virtual 6242: ~facet(); 6242: 6242: static void 6242: _S_create_c_locale(__c_locale& __cloc, const char* __s, 6242: __c_locale __old = 0); 6242: 6242: static __c_locale 6242: _S_clone_c_locale(__c_locale& __cloc) throw(); 6242: 6242: static void 6242: _S_destroy_c_locale(__c_locale& __cloc); 6242: 6242: static __c_locale 6242: _S_lc_ctype_c_locale(__c_locale __cloc, const char* __s); 6242: 6242: 6242: 6242: static __c_locale 6242: _S_get_c_locale(); 6242: 6242: __attribute__ ((__const__)) static const char* 6242: _S_get_c_name() throw(); 6242: # 438 "/usr/include/c++/8/bits/locale_classes.h" 3 6242: facet(const facet&) = delete; 6242: 6242: facet& 6242: operator=(const facet&) = delete; 6242: 6242: 6242: private: 6242: void 6242: _M_add_reference() const throw() 6242: { __gnu_cxx::__atomic_add_dispatch(&_M_refcount, 1); } 6242: 6242: void 6242: _M_remove_reference() const throw() 6242: { 6242: 6242: ; 6242: if (__gnu_cxx::__exchange_and_add_dispatch(&_M_refcount, -1) == 1) 6242: { 6242: ; 6242: try 6242: { delete this; } 6242: catch(...) 6242: { } 6242: } 6242: } 6242: 6242: const facet* _M_sso_shim(const id*) const; 6242: const facet* _M_cow_shim(const id*) const; 6242: 6242: protected: 6242: class __shim; 6242: }; 6242: # 483 "/usr/include/c++/8/bits/locale_classes.h" 3 6242: class locale::id 6242: { 6242: private: 6242: friend class locale; 6242: friend class locale::_Impl; 6242: 6242: template 6242: friend const _Facet& 6242: use_facet(const locale&); 6242: 6242: template 6242: friend bool 6242: has_facet(const locale&) throw(); 6242: 6242: 6242: 6242: 6242: mutable size_t _M_index; 6242: 6242: 6242: static _Atomic_word _S_refcount; 6242: 6242: void 6242: operator=(const id&); 6242: 6242: id(const id&); 6242: 6242: public: 6242: 6242: 6242: 6242: id() { } 6242: 6242: size_t 6242: _M_id() const throw(); 6242: }; 6242: 6242: 6242: 6242: class locale::_Impl 6242: { 6242: public: 6242: 6242: friend class locale; 6242: friend class locale::facet; 6242: 6242: template 6242: friend bool 6242: has_facet(const locale&) throw(); 6242: 6242: template 6242: friend const _Facet& 6242: use_facet(const locale&); 6242: 6242: template 6242: friend struct __use_cache; 6242: 6242: private: 6242: 6242: _Atomic_word _M_refcount; 6242: const facet** _M_facets; 6242: size_t _M_facets_size; 6242: const facet** _M_caches; 6242: char** _M_names; 6242: static const locale::id* const _S_id_ctype[]; 6242: static const locale::id* const _S_id_numeric[]; 6242: static const locale::id* const _S_id_collate[]; 6242: static const locale::id* const _S_id_time[]; 6242: static const locale::id* const _S_id_monetary[]; 6242: static const locale::id* const _S_id_messages[]; 6242: static const locale::id* const* const _S_facet_categories[]; 6242: 6242: void 6242: _M_add_reference() throw() 6242: { __gnu_cxx::__atomic_add_dispatch(&_M_refcount, 1); } 6242: 6242: void 6242: _M_remove_reference() throw() 6242: { 6242: 6242: ; 6242: if (__gnu_cxx::__exchange_and_add_dispatch(&_M_refcount, -1) == 1) 6242: { 6242: ; 6242: try 6242: { delete this; } 6242: catch(...) 6242: { } 6242: } 6242: } 6242: 6242: _Impl(const _Impl&, size_t); 6242: _Impl(const char*, size_t); 6242: _Impl(size_t) throw(); 6242: 6242: ~_Impl() throw(); 6242: 6242: _Impl(const _Impl&); 6242: 6242: void 6242: operator=(const _Impl&); 6242: 6242: bool 6242: _M_check_same_name() 6242: { 6242: bool __ret = true; 6242: if (_M_names[1]) 6242: 6242: for (size_t __i = 0; __ret && __i < _S_categories_size - 1; ++__i) 6242: __ret = __builtin_strcmp(_M_names[__i], _M_names[__i + 1]) == 0; 6242: return __ret; 6242: } 6242: 6242: void 6242: _M_replace_categories(const _Impl*, category); 6242: 6242: void 6242: _M_replace_category(const _Impl*, const locale::id* const*); 6242: 6242: void 6242: _M_replace_facet(const _Impl*, const locale::id*); 6242: 6242: void 6242: _M_install_facet(const locale::id*, const facet*); 6242: 6242: template 6242: void 6242: _M_init_facet(_Facet* __facet) 6242: { _M_install_facet(&_Facet::id, __facet); } 6242: 6242: template 6242: void 6242: _M_init_facet_unchecked(_Facet* __facet) 6242: { 6242: __facet->_M_add_reference(); 6242: _M_facets[_Facet::id._M_id()] = __facet; 6242: } 6242: 6242: void 6242: _M_install_cache(const facet*, size_t); 6242: 6242: void _M_init_extra(facet**); 6242: void _M_init_extra(void*, void*, const char*, const char*); 6242: }; 6242: # 641 "/usr/include/c++/8/bits/locale_classes.h" 3 6242: template 6242: class __cxx11:: collate : public locale::facet 6242: { 6242: public: 6242: 6242: 6242: 6242: typedef _CharT char_type; 6242: typedef basic_string<_CharT> string_type; 6242: 6242: 6242: protected: 6242: 6242: 6242: __c_locale _M_c_locale_collate; 6242: 6242: public: 6242: 6242: static locale::id id; 6242: # 668 "/usr/include/c++/8/bits/locale_classes.h" 3 6242: explicit 6242: collate(size_t __refs = 0) 6242: : facet(__refs), _M_c_locale_collate(_S_get_c_locale()) 6242: { } 6242: # 682 "/usr/include/c++/8/bits/locale_classes.h" 3 6242: explicit 6242: collate(__c_locale __cloc, size_t __refs = 0) 6242: : facet(__refs), _M_c_locale_collate(_S_clone_c_locale(__cloc)) 6242: { } 6242: # 699 "/usr/include/c++/8/bits/locale_classes.h" 3 6242: int 6242: compare(const _CharT* __lo1, const _CharT* __hi1, 6242: const _CharT* __lo2, const _CharT* __hi2) const 6242: { return this->do_compare(__lo1, __hi1, __lo2, __hi2); } 6242: # 718 "/usr/include/c++/8/bits/locale_classes.h" 3 6242: string_type 6242: transform(const _CharT* __lo, const _CharT* __hi) const 6242: { return this->do_transform(__lo, __hi); } 6242: # 732 "/usr/include/c++/8/bits/locale_classes.h" 3 6242: long 6242: hash(const _CharT* __lo, const _CharT* __hi) const 6242: { return this->do_hash(__lo, __hi); } 6242: 6242: 6242: int 6242: _M_compare(const _CharT*, const _CharT*) const throw(); 6242: 6242: size_t 6242: _M_transform(_CharT*, const _CharT*, size_t) const throw(); 6242: 6242: protected: 6242: 6242: virtual 6242: ~collate() 6242: { _S_destroy_c_locale(_M_c_locale_collate); } 6242: # 761 "/usr/include/c++/8/bits/locale_classes.h" 3 6242: virtual int 6242: do_compare(const _CharT* __lo1, const _CharT* __hi1, 6242: const _CharT* __lo2, const _CharT* __hi2) const; 6242: # 775 "/usr/include/c++/8/bits/locale_classes.h" 3 6242: virtual string_type 6242: do_transform(const _CharT* __lo, const _CharT* __hi) const; 6242: # 788 "/usr/include/c++/8/bits/locale_classes.h" 3 6242: virtual long 6242: do_hash(const _CharT* __lo, const _CharT* __hi) const; 6242: }; 6242: 6242: template 6242: locale::id collate<_CharT>::id; 6242: 6242: 6242: template<> 6242: int 6242: collate::_M_compare(const char*, const char*) const throw(); 6242: 6242: template<> 6242: size_t 6242: collate::_M_transform(char*, const char*, size_t) const throw(); 6242: 6242: 6242: template<> 6242: int 6242: collate::_M_compare(const wchar_t*, const wchar_t*) const throw(); 6242: 6242: template<> 6242: size_t 6242: collate::_M_transform(wchar_t*, const wchar_t*, size_t) const throw(); 6242: 6242: 6242: 6242: template 6242: class __cxx11:: collate_byname : public collate<_CharT> 6242: { 6242: public: 6242: 6242: 6242: typedef _CharT char_type; 6242: typedef basic_string<_CharT> string_type; 6242: 6242: 6242: explicit 6242: collate_byname(const char* __s, size_t __refs = 0) 6242: : collate<_CharT>(__refs) 6242: { 6242: if (__builtin_strcmp(__s, "C") != 0 6242: && __builtin_strcmp(__s, "POSIX") != 0) 6242: { 6242: this->_S_destroy_c_locale(this->_M_c_locale_collate); 6242: this->_S_create_c_locale(this->_M_c_locale_collate, __s); 6242: } 6242: } 6242: 6242: 6242: explicit 6242: collate_byname(const string& __s, size_t __refs = 0) 6242: : collate_byname(__s.c_str(), __refs) { } 6242: 6242: 6242: protected: 6242: virtual 6242: ~collate_byname() { } 6242: }; 6242: 6242: 6242: } 6242: 6242: # 1 "/usr/include/c++/8/bits/locale_classes.tcc" 1 3 6242: # 37 "/usr/include/c++/8/bits/locale_classes.tcc" 3 6242: 6242: # 38 "/usr/include/c++/8/bits/locale_classes.tcc" 3 6242: 6242: namespace std __attribute__ ((__visibility__ ("default"))) 6242: { 6242: 6242: 6242: template 6242: locale:: 6242: locale(const locale& __other, _Facet* __f) 6242: { 6242: _M_impl = new _Impl(*__other._M_impl, 1); 6242: 6242: try 6242: { _M_impl->_M_install_facet(&_Facet::id, __f); } 6242: catch(...) 6242: { 6242: _M_impl->_M_remove_reference(); 6242: throw; 6242: } 6242: delete [] _M_impl->_M_names[0]; 6242: _M_impl->_M_names[0] = 0; 6242: } 6242: 6242: template 6242: locale 6242: locale:: 6242: combine(const locale& __other) const 6242: { 6242: _Impl* __tmp = new _Impl(*_M_impl, 1); 6242: try 6242: { 6242: __tmp->_M_replace_facet(__other._M_impl, &_Facet::id); 6242: } 6242: catch(...) 6242: { 6242: __tmp->_M_remove_reference(); 6242: throw; 6242: } 6242: return locale(__tmp); 6242: } 6242: 6242: template 6242: bool 6242: locale:: 6242: operator()(const basic_string<_CharT, _Traits, _Alloc>& __s1, 6242: const basic_string<_CharT, _Traits, _Alloc>& __s2) const 6242: { 6242: typedef std::collate<_CharT> __collate_type; 6242: const __collate_type& __collate = use_facet<__collate_type>(*this); 6242: return (__collate.compare(__s1.data(), __s1.data() + __s1.length(), 6242: __s2.data(), __s2.data() + __s2.length()) < 0); 6242: } 6242: # 102 "/usr/include/c++/8/bits/locale_classes.tcc" 3 6242: template 6242: bool 6242: has_facet(const locale& __loc) throw() 6242: { 6242: const size_t __i = _Facet::id._M_id(); 6242: const locale::facet** __facets = __loc._M_impl->_M_facets; 6242: return (__i < __loc._M_impl->_M_facets_size 6242: 6242: && dynamic_cast(__facets[__i])); 6242: 6242: 6242: 6242: } 6242: # 130 "/usr/include/c++/8/bits/locale_classes.tcc" 3 6242: template 6242: const _Facet& 6242: use_facet(const locale& __loc) 6242: { 6242: const size_t __i = _Facet::id._M_id(); 6242: const locale::facet** __facets = __loc._M_impl->_M_facets; 6242: if (__i >= __loc._M_impl->_M_facets_size || !__facets[__i]) 6242: __throw_bad_cast(); 6242: 6242: return dynamic_cast(*__facets[__i]); 6242: 6242: 6242: 6242: } 6242: 6242: 6242: 6242: template 6242: int 6242: collate<_CharT>::_M_compare(const _CharT*, const _CharT*) const throw () 6242: { return 0; } 6242: 6242: 6242: template 6242: size_t 6242: collate<_CharT>::_M_transform(_CharT*, const _CharT*, size_t) const throw () 6242: { return 0; } 6242: 6242: template 6242: int 6242: collate<_CharT>:: 6242: do_compare(const _CharT* __lo1, const _CharT* __hi1, 6242: const _CharT* __lo2, const _CharT* __hi2) const 6242: { 6242: 6242: 6242: const string_type __one(__lo1, __hi1); 6242: const string_type __two(__lo2, __hi2); 6242: 6242: const _CharT* __p = __one.c_str(); 6242: const _CharT* __pend = __one.data() + __one.length(); 6242: const _CharT* __q = __two.c_str(); 6242: const _CharT* __qend = __two.data() + __two.length(); 6242: 6242: 6242: 6242: 6242: for (;;) 6242: { 6242: const int __res = _M_compare(__p, __q); 6242: if (__res) 6242: return __res; 6242: 6242: __p += char_traits<_CharT>::length(__p); 6242: __q += char_traits<_CharT>::length(__q); 6242: if (__p == __pend && __q == __qend) 6242: return 0; 6242: else if (__p == __pend) 6242: return -1; 6242: else if (__q == __qend) 6242: return 1; 6242: 6242: __p++; 6242: __q++; 6242: } 6242: } 6242: 6242: template 6242: typename collate<_CharT>::string_type 6242: collate<_CharT>:: 6242: do_transform(const _CharT* __lo, const _CharT* __hi) const 6242: { 6242: string_type __ret; 6242: 6242: 6242: const string_type __str(__lo, __hi); 6242: 6242: const _CharT* __p = __str.c_str(); 6242: const _CharT* __pend = __str.data() + __str.length(); 6242: 6242: size_t __len = (__hi - __lo) * 2; 6242: 6242: _CharT* __c = new _CharT[__len]; 6242: 6242: try 6242: { 6242: 6242: 6242: 6242: for (;;) 6242: { 6242: 6242: size_t __res = _M_transform(__c, __p, __len); 6242: 6242: 6242: if (__res >= __len) 6242: { 6242: __len = __res + 1; 6242: delete [] __c, __c = 0; 6242: __c = new _CharT[__len]; 6242: __res = _M_transform(__c, __p, __len); 6242: } 6242: 6242: __ret.append(__c, __res); 6242: __p += char_traits<_CharT>::length(__p); 6242: if (__p == __pend) 6242: break; 6242: 6242: __p++; 6242: __ret.push_back(_CharT()); 6242: } 6242: } 6242: catch(...) 6242: { 6242: delete [] __c; 6242: throw; 6242: } 6242: 6242: delete [] __c; 6242: 6242: return __ret; 6242: } 6242: 6242: template 6242: long 6242: collate<_CharT>:: 6242: do_hash(const _CharT* __lo, const _CharT* __hi) const 6242: { 6242: unsigned long __val = 0; 6242: for (; __lo < __hi; ++__lo) 6242: __val = 6242: *__lo + ((__val << 7) 6242: | (__val >> (__gnu_cxx::__numeric_traits:: 6242: __digits - 7))); 6242: return static_cast(__val); 6242: } 6242: 6242: 6242: 6242: 6242: extern template class collate; 6242: extern template class collate_byname; 6242: 6242: extern template 6242: const collate& 6242: use_facet >(const locale&); 6242: 6242: extern template 6242: bool 6242: has_facet >(const locale&); 6242: 6242: 6242: extern template class collate; 6242: extern template class collate_byname; 6242: 6242: extern template 6242: const collate& 6242: use_facet >(const locale&); 6242: 6242: extern template 6242: bool 6242: has_facet >(const locale&); 6242: 6242: 6242: 6242: 6242: } 6242: # 852 "/usr/include/c++/8/bits/locale_classes.h" 2 3 6242: # 42 "/usr/include/c++/8/bits/ios_base.h" 2 3 6242: 6242: 6242: 6242: 6242: # 1 "/usr/include/c++/8/system_error" 1 3 6242: # 32 "/usr/include/c++/8/system_error" 3 6242: 6242: # 33 "/usr/include/c++/8/system_error" 3 6242: 6242: 6242: 6242: 6242: 6242: 6242: # 1 "/usr/include/s390x-linux-gnu/c++/8/bits/error_constants.h" 1 3 6242: # 34 "/usr/include/s390x-linux-gnu/c++/8/bits/error_constants.h" 3 6242: # 1 "/usr/include/c++/8/cerrno" 1 3 6242: # 39 "/usr/include/c++/8/cerrno" 3 6242: 6242: # 40 "/usr/include/c++/8/cerrno" 3 6242: # 35 "/usr/include/s390x-linux-gnu/c++/8/bits/error_constants.h" 2 3 6242: 6242: namespace std __attribute__ ((__visibility__ ("default"))) 6242: { 6242: 6242: 6242: enum class errc 6242: { 6242: address_family_not_supported = 97, 6242: address_in_use = 98, 6242: address_not_available = 99, 6242: already_connected = 106, 6242: argument_list_too_long = 7, 6242: argument_out_of_domain = 33, 6242: bad_address = 14, 6242: bad_file_descriptor = 9, 6242: 6242: 6242: bad_message = 74, 6242: 6242: 6242: broken_pipe = 32, 6242: connection_aborted = 103, 6242: connection_already_in_progress = 114, 6242: connection_refused = 111, 6242: connection_reset = 104, 6242: cross_device_link = 18, 6242: destination_address_required = 89, 6242: device_or_resource_busy = 16, 6242: directory_not_empty = 39, 6242: executable_format_error = 8, 6242: file_exists = 17, 6242: file_too_large = 27, 6242: filename_too_long = 36, 6242: function_not_supported = 38, 6242: host_unreachable = 113, 6242: 6242: 6242: identifier_removed = 43, 6242: 6242: 6242: illegal_byte_sequence = 84, 6242: inappropriate_io_control_operation = 25, 6242: interrupted = 4, 6242: invalid_argument = 22, 6242: invalid_seek = 29, 6242: io_error = 5, 6242: is_a_directory = 21, 6242: message_size = 90, 6242: network_down = 100, 6242: network_reset = 102, 6242: network_unreachable = 101, 6242: no_buffer_space = 105, 6242: no_child_process = 10, 6242: 6242: 6242: no_link = 67, 6242: 6242: 6242: no_lock_available = 37, 6242: 6242: 6242: no_message_available = 61, 6242: 6242: 6242: no_message = 42, 6242: no_protocol_option = 92, 6242: no_space_on_device = 28, 6242: 6242: 6242: no_stream_resources = 63, 6242: 6242: 6242: no_such_device_or_address = 6, 6242: no_such_device = 19, 6242: no_such_file_or_directory = 2, 6242: no_such_process = 3, 6242: not_a_directory = 20, 6242: not_a_socket = 88, 6242: 6242: 6242: not_a_stream = 60, 6242: 6242: 6242: not_connected = 107, 6242: not_enough_memory = 12, 6242: 6242: 6242: not_supported = 95, 6242: 6242: 6242: 6242: operation_canceled = 125, 6242: 6242: 6242: operation_in_progress = 115, 6242: operation_not_permitted = 1, 6242: operation_not_supported = 95, 6242: operation_would_block = 11, 6242: 6242: 6242: owner_dead = 130, 6242: 6242: 6242: permission_denied = 13, 6242: 6242: 6242: protocol_error = 71, 6242: 6242: 6242: protocol_not_supported = 93, 6242: read_only_file_system = 30, 6242: resource_deadlock_would_occur = 35, 6242: resource_unavailable_try_again = 11, 6242: result_out_of_range = 34, 6242: 6242: 6242: state_not_recoverable = 131, 6242: 6242: 6242: 6242: stream_timeout = 62, 6242: 6242: 6242: 6242: text_file_busy = 26, 6242: 6242: 6242: timed_out = 110, 6242: too_many_files_open_in_system = 23, 6242: too_many_files_open = 24, 6242: too_many_links = 31, 6242: too_many_symbolic_link_levels = 40, 6242: 6242: 6242: value_too_large = 75, 6242: 6242: 6242: wrong_protocol_type = 91 6242: }; 6242: 6242: 6242: } 6242: # 40 "/usr/include/c++/8/system_error" 2 3 6242: 6242: # 1 "/usr/include/c++/8/stdexcept" 1 3 6242: # 36 "/usr/include/c++/8/stdexcept" 3 6242: 6242: # 37 "/usr/include/c++/8/stdexcept" 3 6242: 6242: 6242: 6242: 6242: namespace std __attribute__ ((__visibility__ ("default"))) 6242: { 6242: 6242: 6242: 6242: 6242: 6242: struct __cow_string 6242: { 6242: union { 6242: const char* _M_p; 6242: char _M_bytes[sizeof(const char*)]; 6242: }; 6242: 6242: __cow_string(); 6242: __cow_string(const std::string&); 6242: __cow_string(const char*, size_t); 6242: __cow_string(const __cow_string&) noexcept; 6242: __cow_string& operator=(const __cow_string&) noexcept; 6242: ~__cow_string(); 6242: 6242: __cow_string(__cow_string&&) noexcept; 6242: __cow_string& operator=(__cow_string&&) noexcept; 6242: 6242: }; 6242: 6242: typedef basic_string __sso_string; 6242: # 113 "/usr/include/c++/8/stdexcept" 3 6242: class logic_error : public exception 6242: { 6242: __cow_string _M_msg; 6242: 6242: public: 6242: 6242: explicit 6242: logic_error(const string& __arg) ; 6242: 6242: 6242: explicit 6242: logic_error(const char*) ; 6242: 6242: 6242: 6242: logic_error(const logic_error&) noexcept; 6242: logic_error& operator=(const logic_error&) noexcept; 6242: 6242: 6242: virtual ~logic_error() noexcept; 6242: 6242: 6242: 6242: virtual const char* 6242: what() const noexcept; 6242: 6242: 6242: 6242: 6242: 6242: }; 6242: 6242: 6242: 6242: class domain_error : public logic_error 6242: { 6242: public: 6242: explicit domain_error(const string& __arg) ; 6242: 6242: explicit domain_error(const char*) ; 6242: 6242: virtual ~domain_error() noexcept; 6242: }; 6242: 6242: 6242: class invalid_argument : public logic_error 6242: { 6242: public: 6242: explicit invalid_argument(const string& __arg) ; 6242: 6242: explicit invalid_argument(const char*) ; 6242: 6242: virtual ~invalid_argument() noexcept; 6242: }; 6242: 6242: 6242: 6242: class length_error : public logic_error 6242: { 6242: public: 6242: explicit length_error(const string& __arg) ; 6242: 6242: explicit length_error(const char*) ; 6242: 6242: virtual ~length_error() noexcept; 6242: }; 6242: 6242: 6242: 6242: class out_of_range : public logic_error 6242: { 6242: public: 6242: explicit out_of_range(const string& __arg) ; 6242: 6242: explicit out_of_range(const char*) ; 6242: 6242: virtual ~out_of_range() noexcept; 6242: }; 6242: 6242: 6242: 6242: 6242: 6242: 6242: class runtime_error : public exception 6242: { 6242: __cow_string _M_msg; 6242: 6242: public: 6242: 6242: explicit 6242: runtime_error(const string& __arg) ; 6242: 6242: 6242: explicit 6242: runtime_error(const char*) ; 6242: 6242: 6242: 6242: runtime_error(const runtime_error&) noexcept; 6242: runtime_error& operator=(const runtime_error&) noexcept; 6242: 6242: 6242: virtual ~runtime_error() noexcept; 6242: 6242: 6242: 6242: virtual const char* 6242: what() const noexcept; 6242: 6242: 6242: 6242: 6242: 6242: }; 6242: 6242: 6242: class range_error : public runtime_error 6242: { 6242: public: 6242: explicit range_error(const string& __arg) ; 6242: 6242: explicit range_error(const char*) ; 6242: 6242: virtual ~range_error() noexcept; 6242: }; 6242: 6242: 6242: class overflow_error : public runtime_error 6242: { 6242: public: 6242: explicit overflow_error(const string& __arg) ; 6242: 6242: explicit overflow_error(const char*) ; 6242: 6242: virtual ~overflow_error() noexcept; 6242: }; 6242: 6242: 6242: class underflow_error : public runtime_error 6242: { 6242: public: 6242: explicit underflow_error(const string& __arg) ; 6242: 6242: explicit underflow_error(const char*) ; 6242: 6242: virtual ~underflow_error() noexcept; 6242: }; 6242: 6242: 6242: 6242: 6242: } 6242: # 42 "/usr/include/c++/8/system_error" 2 3 6242: 6242: namespace std __attribute__ ((__visibility__ ("default"))) 6242: { 6242: 6242: 6242: class error_code; 6242: class error_condition; 6242: class system_error; 6242: 6242: 6242: template 6242: struct is_error_code_enum : public false_type { }; 6242: 6242: 6242: template 6242: struct is_error_condition_enum : public false_type { }; 6242: 6242: template<> 6242: struct is_error_condition_enum 6242: : public true_type { }; 6242: # 71 "/usr/include/c++/8/system_error" 3 6242: inline namespace _V2 { 6242: 6242: 6242: class error_category 6242: { 6242: public: 6242: constexpr error_category() noexcept = default; 6242: 6242: virtual ~error_category(); 6242: 6242: error_category(const error_category&) = delete; 6242: error_category& operator=(const error_category&) = delete; 6242: 6242: virtual const char* 6242: name() const noexcept = 0; 6242: 6242: 6242: 6242: 6242: 6242: 6242: private: 6242: __attribute ((__abi_tag__ ("cxx11"))) 6242: virtual __cow_string 6242: _M_message(int) const; 6242: 6242: public: 6242: __attribute ((__abi_tag__ ("cxx11"))) 6242: virtual string 6242: message(int) const = 0; 6242: # 110 "/usr/include/c++/8/system_error" 3 6242: public: 6242: virtual error_condition 6242: default_error_condition(int __i) const noexcept; 6242: 6242: virtual bool 6242: equivalent(int __i, const error_condition& __cond) const noexcept; 6242: 6242: virtual bool 6242: equivalent(const error_code& __code, int __i) const noexcept; 6242: 6242: bool 6242: operator<(const error_category& __other) const noexcept 6242: { return less()(this, &__other); } 6242: 6242: bool 6242: operator==(const error_category& __other) const noexcept 6242: { return this == &__other; } 6242: 6242: bool 6242: operator!=(const error_category& __other) const noexcept 6242: { return this != &__other; } 6242: }; 6242: 6242: 6242: __attribute__ ((__const__)) const error_category& system_category() noexcept; 6242: __attribute__ ((__const__)) const error_category& generic_category() noexcept; 6242: 6242: } 6242: 6242: error_code make_error_code(errc) noexcept; 6242: 6242: template 6242: struct hash; 6242: 6242: 6242: 6242: struct error_code 6242: { 6242: error_code() noexcept 6242: : _M_value(0), _M_cat(&system_category()) { } 6242: 6242: error_code(int __v, const error_category& __cat) noexcept 6242: : _M_value(__v), _M_cat(&__cat) { } 6242: 6242: template::value>::type> 6242: error_code(_ErrorCodeEnum __e) noexcept 6242: { *this = make_error_code(__e); } 6242: 6242: void 6242: assign(int __v, const error_category& __cat) noexcept 6242: { 6242: _M_value = __v; 6242: _M_cat = &__cat; 6242: } 6242: 6242: void 6242: clear() noexcept 6242: { assign(0, system_category()); } 6242: 6242: 6242: template 6242: typename enable_if::value, 6242: error_code&>::type 6242: operator=(_ErrorCodeEnum __e) noexcept 6242: { return *this = make_error_code(__e); } 6242: 6242: int 6242: value() const noexcept { return _M_value; } 6242: 6242: const error_category& 6242: category() const noexcept { return *_M_cat; } 6242: 6242: error_condition 6242: default_error_condition() const noexcept; 6242: 6242: __attribute ((__abi_tag__ ("cxx11"))) 6242: string 6242: message() const 6242: { return category().message(value()); } 6242: 6242: explicit operator bool() const noexcept 6242: { return _M_value != 0; } 6242: 6242: 6242: private: 6242: friend class hash; 6242: 6242: int _M_value; 6242: const error_category* _M_cat; 6242: }; 6242: 6242: 6242: inline error_code 6242: make_error_code(errc __e) noexcept 6242: { return error_code(static_cast(__e), generic_category()); } 6242: 6242: inline bool 6242: operator<(const error_code& __lhs, const error_code& __rhs) noexcept 6242: { 6242: return (__lhs.category() < __rhs.category() 6242: || (__lhs.category() == __rhs.category() 6242: && __lhs.value() < __rhs.value())); 6242: } 6242: 6242: template 6242: basic_ostream<_CharT, _Traits>& 6242: operator<<(basic_ostream<_CharT, _Traits>& __os, const error_code& __e) 6242: { return (__os << __e.category().name() << ':' << __e.value()); } 6242: 6242: error_condition make_error_condition(errc) noexcept; 6242: 6242: 6242: 6242: struct error_condition 6242: { 6242: error_condition() noexcept 6242: : _M_value(0), _M_cat(&generic_category()) { } 6242: 6242: error_condition(int __v, const error_category& __cat) noexcept 6242: : _M_value(__v), _M_cat(&__cat) { } 6242: 6242: template::value>::type> 6242: error_condition(_ErrorConditionEnum __e) noexcept 6242: { *this = make_error_condition(__e); } 6242: 6242: void 6242: assign(int __v, const error_category& __cat) noexcept 6242: { 6242: _M_value = __v; 6242: _M_cat = &__cat; 6242: } 6242: 6242: 6242: template 6242: typename enable_if::value, error_condition&>::type 6242: operator=(_ErrorConditionEnum __e) noexcept 6242: { return *this = make_error_condition(__e); } 6242: 6242: void 6242: clear() noexcept 6242: { assign(0, generic_category()); } 6242: 6242: 6242: int 6242: value() const noexcept { return _M_value; } 6242: 6242: const error_category& 6242: category() const noexcept { return *_M_cat; } 6242: 6242: __attribute ((__abi_tag__ ("cxx11"))) 6242: string 6242: message() const 6242: { return category().message(value()); } 6242: 6242: explicit operator bool() const noexcept 6242: { return _M_value != 0; } 6242: 6242: 6242: private: 6242: int _M_value; 6242: const error_category* _M_cat; 6242: }; 6242: 6242: 6242: inline error_condition 6242: make_error_condition(errc __e) noexcept 6242: { return error_condition(static_cast(__e), generic_category()); } 6242: 6242: inline bool 6242: operator<(const error_condition& __lhs, 6242: const error_condition& __rhs) noexcept 6242: { 6242: return (__lhs.category() < __rhs.category() 6242: || (__lhs.category() == __rhs.category() 6242: && __lhs.value() < __rhs.value())); 6242: } 6242: 6242: 6242: inline bool 6242: operator==(const error_code& __lhs, const error_code& __rhs) noexcept 6242: { return (__lhs.category() == __rhs.category() 6242: && __lhs.value() == __rhs.value()); } 6242: 6242: inline bool 6242: operator==(const error_code& __lhs, const error_condition& __rhs) noexcept 6242: { 6242: return (__lhs.category().equivalent(__lhs.value(), __rhs) 6242: || __rhs.category().equivalent(__lhs, __rhs.value())); 6242: } 6242: 6242: inline bool 6242: operator==(const error_condition& __lhs, const error_code& __rhs) noexcept 6242: { 6242: return (__rhs.category().equivalent(__rhs.value(), __lhs) 6242: || __lhs.category().equivalent(__rhs, __lhs.value())); 6242: } 6242: 6242: inline bool 6242: operator==(const error_condition& __lhs, 6242: const error_condition& __rhs) noexcept 6242: { 6242: return (__lhs.category() == __rhs.category() 6242: && __lhs.value() == __rhs.value()); 6242: } 6242: 6242: inline bool 6242: operator!=(const error_code& __lhs, const error_code& __rhs) noexcept 6242: { return !(__lhs == __rhs); } 6242: 6242: inline bool 6242: operator!=(const error_code& __lhs, const error_condition& __rhs) noexcept 6242: { return !(__lhs == __rhs); } 6242: 6242: inline bool 6242: operator!=(const error_condition& __lhs, const error_code& __rhs) noexcept 6242: { return !(__lhs == __rhs); } 6242: 6242: inline bool 6242: operator!=(const error_condition& __lhs, 6242: const error_condition& __rhs) noexcept 6242: { return !(__lhs == __rhs); } 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: class system_error : public std::runtime_error 6242: { 6242: private: 6242: error_code _M_code; 6242: 6242: public: 6242: system_error(error_code __ec = error_code()) 6242: : runtime_error(__ec.message()), _M_code(__ec) { } 6242: 6242: system_error(error_code __ecg++ -Wdate-time -D_FORTIFY_SOURCE=2 -DKAK_DEBUG -I/usr/include/ncursesw -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -pedantic -std=gnu++11 -g -Wall -Wno-reorder -Wno-sign-compare -Wno-address -MD -MP -MF .window.debug.d -c -o .window.debug.o window.cc , const string& __what) 6242: : runtime_error(__what + ": " + __ec.message()), _M_code(__ec) { } 6242: 6242: system_error(error_code __ec, const char* __what) 6242: : runtime_error(__what + (": " + __ec.message())), _M_code(__ec) { } 6242: 6242: system_error(int __v, const error_category& __ecat, const char* __what) 6242: : system_error(error_code(__v, __ecat), __what) { } 6242: 6242: system_error(int __v, const error_category& __ecat) 6242: : runtime_error(error_code(__v, __ecat).message()), 6242: _M_code(__v, __ecat) { } 6242: 6242: system_error(int __v, const error_category& __ecat, const string& __what) 6242: : runtime_error(__what + ": " + error_code(__v, __ecat).message()), 6242: _M_code(__v, __ecat) { } 6242: 6242: virtual ~system_error() noexcept; 6242: 6242: const error_code& 6242: code() const noexcept { return _M_code; } 6242: }; 6242: 6242: 6242: } 6242: 6242: 6242: 6242: namespace std __attribute__ ((__visibility__ ("default"))) 6242: { 6242: 6242: 6242: 6242: 6242: 6242: template<> 6242: struct hash 6242: : public __hash_base 6242: { 6242: size_t 6242: operator()(const error_code& __e) const noexcept 6242: { 6242: const size_t __tmp = std::_Hash_impl::hash(__e._M_value); 6242: return std::_Hash_impl::__hash_combine(__e._M_cat, __tmp); 6242: } 6242: }; 6242: # 414 "/usr/include/c++/8/system_error" 3 6242: 6242: } 6242: # 47 "/usr/include/c++/8/bits/ios_base.h" 2 3 6242: 6242: 6242: namespace std __attribute__ ((__visibility__ ("default"))) 6242: { 6242: 6242: 6242: 6242: 6242: 6242: 6242: enum _Ios_Fmtflags 6242: { 6242: _S_boolalpha = 1L << 0, 6242: _S_dec = 1L << 1, 6242: _S_fixed = 1L << 2, 6242: _S_hex = 1L << 3, 6242: _S_internal = 1L << 4, 6242: _S_left = 1L << 5, 6242: _S_oct = 1L << 6, 6242: _S_right = 1L << 7, 6242: _S_scientific = 1L << 8, 6242: _S_showbase = 1L << 9, 6242: _S_showpoint = 1L << 10, 6242: _S_showpos = 1L << 11, 6242: _S_skipws = 1L << 12, 6242: _S_unitbuf = 1L << 13, 6242: _S_uppercase = 1L << 14, 6242: _S_adjustfield = _S_left | _S_right | _S_internal, 6242: _S_basefield = _S_dec | _S_oct | _S_hex, 6242: _S_floatfield = _S_scientific | _S_fixed, 6242: _S_ios_fmtflags_end = 1L << 16, 6242: _S_ios_fmtflags_max = 0x7fffffff, 6242: _S_ios_fmtflags_min = ~0x7fffffff 6242: }; 6242: 6242: inline constexpr _Ios_Fmtflags 6242: operator&(_Ios_Fmtflags __a, _Ios_Fmtflags __b) 6242: { return _Ios_Fmtflags(static_cast(__a) & static_cast(__b)); } 6242: 6242: inline constexpr _Ios_Fmtflags 6242: operator|(_Ios_Fmtflags __a, _Ios_Fmtflags __b) 6242: { return _Ios_Fmtflags(static_cast(__a) | static_cast(__b)); } 6242: 6242: inline constexpr _Ios_Fmtflags 6242: operator^(_Ios_Fmtflags __a, _Ios_Fmtflags __b) 6242: { return _Ios_Fmtflags(static_cast(__a) ^ static_cast(__b)); } 6242: 6242: inline constexpr _Ios_Fmtflags 6242: operator~(_Ios_Fmtflags __a) 6242: { return _Ios_Fmtflags(~static_cast(__a)); } 6242: 6242: inline const _Ios_Fmtflags& 6242: operator|=(_Ios_Fmtflags& __a, _Ios_Fmtflags __b) 6242: { return __a = __a | __b; } 6242: 6242: inline const _Ios_Fmtflags& 6242: operator&=(_Ios_Fmtflags& __a, _Ios_Fmtflags __b) 6242: { return __a = __a & __b; } 6242: 6242: inline const _Ios_Fmtflags& 6242: operator^=(_Ios_Fmtflags& __a, _Ios_Fmtflags __b) 6242: { return __a = __a ^ __b; } 6242: 6242: 6242: enum _Ios_Openmode 6242: { 6242: _S_app = 1L << 0, 6242: _S_ate = 1L << 1, 6242: _S_bin = 1L << 2, 6242: _S_in = 1L << 3, 6242: _S_out = 1L << 4, 6242: _S_trunc = 1L << 5, 6242: _S_ios_openmode_end = 1L << 16, 6242: _S_ios_openmode_max = 0x7fffffff, 6242: _S_ios_openmode_min = ~0x7fffffff 6242: }; 6242: 6242: inline constexpr _Ios_Openmode 6242: operator&(_Ios_Openmode __a, _Ios_Openmode __b) 6242: { return _Ios_Openmode(static_cast(__a) & static_cast(__b)); } 6242: 6242: inline constexpr _Ios_Openmode 6242: operator|(_Ios_Openmode __a, _Ios_Openmode __b) 6242: { return _Ios_Openmode(static_cast(__a) | static_cast(__b)); } 6242: 6242: inline constexpr _Ios_Openmode 6242: operator^(_Ios_Openmode __a, _Ios_Openmode __b) 6242: { return _Ios_Openmode(static_cast(__a) ^ static_cast(__b)); } 6242: 6242: inline constexpr _Ios_Openmode 6242: operator~(_Ios_Openmode __a) 6242: { return _Ios_Openmode(~static_cast(__a)); } 6242: 6242: inline const _Ios_Openmode& 6242: operator|=(_Ios_Openmode& __a, _Ios_Openmode __b) 6242: { return __a = __a | __b; } 6242: 6242: inline const _Ios_Openmode& 6242: operator&=(_Ios_Openmode& __a, _Ios_Openmode __b) 6242: { return __a = __a & __b; } 6242: 6242: inline const _Ios_Openmode& 6242: operator^=(_Ios_Openmode& __a, _Ios_Openmode __b) 6242: { return __a = __a ^ __b; } 6242: 6242: 6242: enum _Ios_Iostate 6242: { 6242: _S_goodbit = 0, 6242: _S_badbit = 1L << 0, 6242: _S_eofbit = 1L << 1, 6242: _S_failbit = 1L << 2, 6242: _S_ios_iostate_end = 1L << 16, 6242: _S_ios_iostate_max = 0x7fffffff, 6242: _S_ios_iostate_min = ~0x7fffffff 6242: }; 6242: 6242: inline constexpr _Ios_Iostate 6242: operator&(_Ios_Iostate __a, _Ios_Iostate __b) 6242: { return _Ios_Iostate(static_cast(__a) & static_cast(__b)); } 6242: 6242: inline constexpr _Ios_Iostate 6242: operator|(_Ios_Iostate __a, _Ios_Iostate __b) 6242: { return _Ios_Iostate(static_cast(__a) | static_cast(__b)); } 6242: 6242: inline constexpr _Ios_Iostate 6242: operator^(_Ios_Iostate __a, _Ios_Iostate __b) 6242: { return _Ios_Iostate(static_cast(__a) ^ static_cast(__b)); } 6242: 6242: inline constexpr _Ios_Iostate 6242: operator~(_Ios_Iostate __a) 6242: { return _Ios_Iostate(~static_cast(__a)); } 6242: 6242: inline const _Ios_Iostate& 6242: operator|=(_Ios_Iostate& __a, _Ios_Iostate __b) 6242: { return __a = __a | __b; } 6242: 6242: inline const _Ios_Iostate& 6242: operator&=(_Ios_Iostate& __a, _Ios_Iostate __b) 6242: { return __a = __a & __b; } 6242: 6242: inline const _Ios_Iostate& 6242: operator^=(_Ios_Iostate& __a, _Ios_Iostate __b) 6242: { return __a = __a ^ __b; } 6242: 6242: 6242: enum _Ios_Seekdir 6242: { 6242: _S_beg = 0, 6242: _S_cur = 1, 6242: _S_end = 2, 6242: _S_ios_seekdir_end = 1L << 16 6242: }; 6242: 6242: 6242: 6242: enum class io_errc { stream = 1 }; 6242: 6242: template <> struct is_error_code_enum : public true_type { }; 6242: 6242: const error_category& iostream_category() noexcept; 6242: 6242: inline error_code 6242: make_error_code(io_errc __e) noexcept 6242: { return error_code(static_cast(__e), iostream_category()); } 6242: 6242: inline error_condition 6242: make_error_condition(io_errc __e) noexcept 6242: { return error_condition(static_cast(__e), iostream_category()); } 6242: # 228 "/usr/include/c++/8/bits/ios_base.h" 3 6242: class ios_base 6242: { 6242: # 246 "/usr/include/c++/8/bits/ios_base.h" 3 6242: public: 6242: # 255 "/usr/include/c++/8/bits/ios_base.h" 3 6242: class __attribute ((__abi_tag__ ("cxx11"))) failure : public system_error 6242: { 6242: public: 6242: explicit 6242: failure(const string& __str); 6242: 6242: 6242: explicit 6242: failure(const string&, const error_code&); 6242: 6242: explicit 6242: failure(const char*, const error_code& = io_errc::stream); 6242: 6242: 6242: virtual 6242: ~failure() throw(); 6242: 6242: virtual const char* 6242: what() const throw(); 6242: }; 6242: # 323 "/usr/include/c++/8/bits/ios_base.h" 3 6242: typedef _Ios_Fmtflags fmtflags; 6242: 6242: 6242: static const fmtflags boolalpha = _S_boolalpha; 6242: 6242: 6242: static const fmtflags dec = _S_dec; 6242: 6242: 6242: static const fmtflags fixed = _S_fixed; 6242: 6242: 6242: static const fmtflags hex = _S_hex; 6242: 6242: 6242: 6242: 6242: static const fmtflags internal = _S_internal; 6242: 6242: 6242: 6242: static const fmtflags left = _S_left; 6242: 6242: 6242: static const fmtflags oct = _S_oct; 6242: 6242: 6242: 6242: static const fmtflags right = _S_right; 6242: 6242: 6242: static const fmtflags scientific = _S_scientific; 6242: 6242: 6242: 6242: static const fmtflags showbase = _S_showbase; 6242: 6242: 6242: 6242: static const fmtflags showpoint = _S_showpoint; 6242: 6242: 6242: static const fmtflags showpos = _S_showpos; 6242: 6242: 6242: static const fmtflags skipws = _S_skipws; 6242: 6242: 6242: static const fmtflags unitbuf = _S_unitbuf; 6242: 6242: 6242: 6242: static const fmtflags uppercase = _S_uppercase; 6242: 6242: 6242: static const fmtflags adjustfield = _S_adjustfield; 6242: 6242: 6242: static const fmtflags basefield = _S_basefield; 6242: 6242: 6242: static const fmtflags floatfield = _S_floatfield; 6242: # 398 "/usr/include/c++/8/bits/ios_base.h" 3 6242: typedef _Ios_Iostate iostate; 6242: 6242: 6242: 6242: static const iostate badbit = _S_badbit; 6242: 6242: 6242: static const iostate eofbit = _S_eofbit; 6242: 6242: 6242: 6242: 6242: static const iostate failbit = _S_failbit; 6242: 6242: 6242: static const iostate goodbit = _S_goodbit; 6242: # 429 "/usr/include/c++/8/bits/ios_base.h" 3 6242: typedef _Ios_Openmode openmode; 6242: 6242: 6242: static const openmode app = _S_app; 6242: 6242: 6242: static const openmode ate = _S_ate; 6242: 6242: 6242: 6242: 6242: static const openmode binary = _S_bin; 6242: 6242: 6242: static const openmode in = _S_in; 6242: 6242: 6242: static const openmode out = _S_out; 6242: 6242: 6242: static const openmode trunc = _S_trunc; 6242: # 461 "/usr/include/c++/8/bits/ios_base.h" 3 6242: typedef _Ios_Seekdir seekdir; 6242: 6242: 6242: static const seekdir beg = _S_beg; 6242: 6242: 6242: static const seekdir cur = _S_cur; 6242: 6242: 6242: static const seekdir end = _S_end; 6242: 6242: 6242: 6242: typedef int io_state; 6242: typedef int open_mode; 6242: typedef int seek_dir; 6242: 6242: typedef std::streampos streampos; 6242: typedef std::streamoff streamoff; 6242: # 489 "/usr/include/c++/8/bits/ios_base.h" 3 6242: enum event 6242: { 6242: erase_event, 6242: imbue_event, 6242: copyfmt_event 6242: }; 6242: # 506 "/usr/include/c++/8/bits/ios_base.h" 3 6242: typedef void (*event_callback) (event __e, ios_base& __b, int __i); 6242: # 518 "/usr/include/c++/8/bits/ios_base.h" 3 6242: void 6242: register_callback(event_callback __fn, int __index); 6242: 6242: protected: 6242: streamsize _M_precision; 6242: streamsize _M_width; 6242: fmtflags _M_flags; 6242: iostate _M_exception; 6242: iostate _M_streambuf_state; 6242: 6242: 6242: 6242: struct _Callback_list 6242: { 6242: 6242: _Callback_list* _M_next; 6242: ios_base::event_callback _M_fn; 6242: int _M_index; 6242: _Atomic_word _M_refcount; 6242: 6242: _Callback_list(ios_base::event_callback __fn, int __index, 6242: _Callback_list* __cb) 6242: : _M_next(__cb), _M_fn(__fn), _M_index(__index), _M_refcount(0) { } 6242: 6242: void 6242: _M_add_reference() { __gnu_cxx::__atomic_add_dispatch(&_M_refcount, 1); } 6242: 6242: 6242: int 6242: _M_remove_reference() 6242: { 6242: 6242: ; 6242: int __res = __gnu_cxx::__exchange_and_add_dispatch(&_M_refcount, -1); 6242: if (__res == 0) 6242: { 6242: ; 6242: } 6242: return __res; 6242: } 6242: }; 6242: 6242: _Callback_list* _M_callbacks; 6242: 6242: void 6242: _M_call_callbacks(event __ev) throw(); 6242: 6242: void 6242: _M_dispose_callbacks(void) throw(); 6242: 6242: 6242: struct _Words 6242: { 6242: void* _M_pword; 6242: long _M_iword; 6242: _Words() : _M_pword(0), _M_iword(0) { } 6242: }; 6242: 6242: 6242: _Words _M_word_zero; 6242: 6242: 6242: 6242: enum { _S_local_word_size = 8 }; 6242: _Words _M_local_word[_S_local_word_size]; 6242: 6242: 6242: int _M_word_size; 6242: _Words* _M_word; 6242: 6242: _Words& 6242: _M_grow_words(int __index, bool __iword); 6242: 6242: 6242: locale _M_ios_locale; 6242: 6242: void 6242: _M_init() throw(); 6242: 6242: public: 6242: 6242: 6242: 6242: 6242: 6242: class Init 6242: { 6242: friend class ios_base; 6242: public: 6242: Init(); 6242: ~Init(); 6242: 6242: private: 6242: static _Atomic_word _S_refcount; 6242: static bool _S_synced_with_stdio; 6242: }; 6242: 6242: 6242: 6242: 6242: 6242: 6242: fmtflags 6242: flags() const 6242: { return _M_flags; } 6242: # 631 "/usr/include/c++/8/bits/ios_base.h" 3 6242: fmtflags 6242: flags(fmtflags __fmtfl) 6242: { 6242: fmtflags __old = _M_flags; 6242: _M_flags = __fmtfl; 6242: return __old; 6242: } 6242: # 647 "/usr/include/c++/8/bits/ios_base.h" 3 6242: fmtflags 6242: setf(fmtflags __fmtfl) 6242: { 6242: fmtflags __old = _M_flags; 6242: _M_flags |= __fmtfl; 6242: return __old; 6242: } 6242: # 664 "/usr/include/c++/8/bits/ios_base.h" 3 6242: fmtflags 6242: setf(fmtflags __fmtfl, fmtflags __mask) 6242: { 6242: fmtflags __old = _M_flags; 6242: _M_flags &= ~__mask; 6242: _M_flags |= (__fmtfl & __mask); 6242: return __old; 6242: } 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: void 6242: unsetf(fmtflags __mask) 6242: { _M_flags &= ~__mask; } 6242: # 690 "/usr/include/c++/8/bits/ios_base.h" 3 6242: streamsize 6242: precision() const 6242: { return _M_precision; } 6242: 6242: 6242: 6242: 6242: 6242: 6242: streamsize 6242: precision(streamsize __prec) 6242: { 6242: streamsize __old = _M_precision; 6242: _M_precision = __prec; 6242: return __old; 6242: } 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: streamsize 6242: width() const 6242: { return _M_width; } 6242: 6242: 6242: 6242: 6242: 6242: 6242: streamsize 6242: width(streamsize __wide) 6242: { 6242: streamsize __old = _M_width; 6242: _M_width = __wide; 6242: return __old; 6242: } 6242: # 741 "/usr/include/c++/8/bits/ios_base.h" 3 6242: static bool 6242: sync_with_stdio(bool __sync = true); 6242: # 753 "/usr/include/c++/8/bits/ios_base.h" 3 6242: locale 6242: imbue(const locale& __loc) throw(); 6242: # 764 "/usr/include/c++/8/bits/ios_base.h" 3 6242: locale 6242: getloc() const 6242: { return _M_ios_locale; } 6242: # 775 "/usr/include/c++/8/bits/ios_base.h" 3 6242: const locale& 6242: _M_getloc() const 6242: { return _M_ios_locale; } 6242: # 794 "/usr/include/c++/8/bits/ios_base.h" 3 6242: static int 6242: xalloc() throw(); 6242: # 810 "/usr/include/c++/8/bits/ios_base.h" 3 6242: long& 6242: iword(int __ix) 6242: { 6242: _Words& __word = (__ix < _M_word_size) 6242: ? _M_word[__ix] : _M_grow_words(__ix, true); 6242: return __word._M_iword; 6242: } 6242: # 831 "/usr/include/c++/8/bits/ios_base.h" 3 6242: void*& 6242: pword(int __ix) 6242: { 6242: _Words& __word = (__ix < _M_word_size) 6242: ? _M_word[__ix] : _M_grow_words(__ix, false); 6242: return __word._M_pword; 6242: } 6242: # 848 "/usr/include/c++/8/bits/ios_base.h" 3 6242: virtual ~ios_base(); 6242: 6242: protected: 6242: ios_base() throw (); 6242: # 862 "/usr/include/c++/8/bits/ios_base.h" 3 6242: public: 6242: ios_base(const ios_base&) = delete; 6242: 6242: ios_base& 6242: operator=(const ios_base&) = delete; 6242: 6242: protected: 6242: void 6242: _M_move(ios_base&) noexcept; 6242: 6242: void 6242: _M_swap(ios_base& __rhs) noexcept; 6242: 6242: }; 6242: 6242: 6242: 6242: inline ios_base& 6242: boolalpha(ios_base& __base) 6242: { 6242: __base.setf(ios_base::boolalpha); 6242: return __base; 6242: } 6242: 6242: 6242: inline ios_base& 6242: noboolalpha(ios_base& __base) 6242: { 6242: __base.unsetf(ios_base::boolalpha); 6242: return __base; 6242: } 6242: 6242: 6242: inline ios_base& 6242: showbase(ios_base& __base) 6242: { 6242: __base.setf(ios_base::showbase); 6242: return __base; 6242: } 6242: 6242: 6242: inline ios_base& 6242: noshowbase(ios_base& __base) 6242: { 6242: __base.unsetf(ios_base::showbase); 6242: return __base; 6242: } 6242: 6242: 6242: inline ios_base& 6242: showpoint(ios_base& __base) 6242: { 6242: __base.setf(ios_base::showpoint); 6242: return __base; 6242: } 6242: 6242: 6242: inline ios_base& 6242: noshowpoint(ios_base& __base) 6242: { 6242: __base.unsetf(ios_base::showpoint); 6242: return __base; 6242: } 6242: 6242: 6242: inline ios_base& 6242: showpos(ios_base& __base) 6242: { 6242: __base.setf(ios_base::showpos); 6242: return __base; 6242: } 6242: 6242: 6242: inline ios_base& 6242: noshowpos(ios_base& __base) 6242: { 6242: __base.unsetf(ios_base::showpos); 6242: return __base; 6242: } 6242: 6242: 6242: inline ios_base& 6242: skipws(ios_base& __base) 6242: { 6242: __base.setf(ios_base::skipws); 6242: return __base; 6242: } 6242: 6242: 6242: inline ios_base& 6242: noskipws(ios_base& __base) 6242: { 6242: __base.unsetf(ios_base::skipws); 6242: return __base; 6242: } 6242: 6242: 6242: inline ios_base& 6242: uppercase(ios_base& __base) 6242: { 6242: __base.setf(ios_base::uppercase); 6242: return __base; 6242: } 6242: 6242: 6242: inline ios_base& 6242: nouppercase(ios_base& __base) 6242: { 6242: __base.unsetf(ios_base::uppercase); 6242: return __base; 6242: } 6242: 6242: 6242: inline ios_base& 6242: unitbuf(ios_base& __base) 6242: { 6242: __base.setf(ios_base::unitbuf); 6242: return __base; 6242: } 6242: 6242: 6242: inline ios_base& 6242: nounitbuf(ios_base& __base) 6242: { 6242: __base.unsetf(ios_base::unitbuf); 6242: return __base; 6242: } 6242: 6242: 6242: 6242: inline ios_base& 6242: internal(ios_base& __base) 6242: { 6242: __base.setf(ios_base::internal, ios_base::adjustfield); 6242: return __base; 6242: } 6242: 6242: 6242: inline ios_base& 6242: left(ios_base& __base) 6242: { 6242: __base.setf(ios_base::left, ios_base::adjustfield); 6242: return __base; 6242: } 6242: 6242: 6242: inline ios_base& 6242: right(ios_base& __base) 6242: { 6242: __base.setf(ios_base::right, ios_base::adjustfield); 6242: return __base; 6242: } 6242: 6242: 6242: 6242: inline ios_base& 6242: dec(ios_base& __base) 6242: { 6242: __base.setf(ios_base::dec, ios_base::basefield); 6242: return __base; 6242: } 6242: 6242: 6242: inline ios_base& 6242: hex(ios_base& __base) 6242: { 6242: __base.setf(ios_base::hex, ios_base::basefield); 6242: return __base; 6242: } 6242: 6242: 6242: inline ios_base& 6242: oct(ios_base& __base) 6242: { 6242: __base.setf(ios_base::oct, ios_base::basefield); 6242: return __base; 6242: } 6242: 6242: 6242: 6242: inline ios_base& 6242: fixed(ios_base& __base) 6242: { 6242: __base.setf(ios_base::fixed, ios_base::floatfield); 6242: return __base; 6242: } 6242: 6242: 6242: inline ios_base& 6242: scientific(ios_base& __base) 6242: { 6242: __base.setf(ios_base::scientific, ios_base::floatfield); 6242: return __base; 6242: } 6242: 6242: 6242: 6242: 6242: 6242: 6242: inline ios_base& 6242: hexfloat(ios_base& __base) 6242: { 6242: __base.setf(ios_base::fixed | ios_base::scientific, ios_base::floatfield); 6242: return __base; 6242: } 6242: 6242: 6242: inline ios_base& 6242: defaultfloat(ios_base& __base) 6242: { 6242: __base.unsetf(ios_base::floatfield); 6242: return __base; 6242: } 6242: 6242: 6242: 6242: } 6242: # 43 "/usr/include/c++/8/ios" 2 3 6242: # 1 "/usr/include/c++/8/streambuf" 1 3 6242: # 36 "/usr/include/c++/8/streambuf" 3 6242: 6242: # 37 "/usr/include/c++/8/streambuf" 3 6242: # 45 "/usr/include/c++/8/streambuf" 3 6242: namespace std __attribute__ ((__visibility__ ("default"))) 6242: { 6242: 6242: 6242: 6242: 6242: template 6242: streamsize 6242: __copy_streambufs_eof(basic_streambuf<_CharT, _Traits>*, 6242: basic_streambuf<_CharT, _Traits>*, bool&); 6242: # 121 "/usr/include/c++/8/streambuf" 3 6242: template 6242: class basic_streambuf 6242: { 6242: public: 6242: 6242: 6242: 6242: 6242: 6242: 6242: typedef _CharT char_type; 6242: typedef _Traits traits_type; 6242: typedef typename traits_type::int_type int_type; 6242: typedef typename traits_type::pos_type pos_type; 6242: typedef typename traits_type::off_type off_type; 6242: 6242: 6242: 6242: 6242: typedef basic_streambuf __streambuf_type; 6242: 6242: 6242: friend class basic_ios; 6242: friend class basic_istream; 6242: friend class basic_ostream; 6242: friend class istreambuf_iterator; 6242: friend class ostreambuf_iterator; 6242: 6242: friend streamsize 6242: __copy_streambufs_eof<>(basic_streambuf*, basic_streambuf*, bool&); 6242: 6242: template 6242: friend typename __gnu_cxx::__enable_if<__is_char<_CharT2>::__value, 6242: _CharT2*>::__type 6242: __copy_move_a2(istreambuf_iterator<_CharT2>, 6242: istreambuf_iterator<_CharT2>, _CharT2*); 6242: 6242: template 6242: friend typename __gnu_cxx::__enable_if<__is_char<_CharT2>::__value, 6242: istreambuf_iterator<_CharT2> >::__type 6242: find(istreambuf_iterator<_CharT2>, istreambuf_iterator<_CharT2>, 6242: const _CharT2&); 6242: 6242: template 6242: friend typename __gnu_cxx::__enable_if<__is_char<_CharT2>::__value, 6242: void>::__type 6242: advance(istreambuf_iterator<_CharT2>&, _Distance); 6242: 6242: template 6242: friend basic_istream<_CharT2, _Traits2>& 6242: operator>>(basic_istream<_CharT2, _Traits2>&, _CharT2*); 6242: 6242: template 6242: friend basic_istream<_CharT2, _Traits2>& 6242: operator>>(basic_istream<_CharT2, _Traits2>&, 6242: basic_string<_CharT2, _Traits2, _Alloc>&); 6242: 6242: template 6242: friend basic_istream<_CharT2, _Traits2>& 6242: getline(basic_istream<_CharT2, _Traits2>&, 6242: basic_string<_CharT2, _Traits2, _Alloc>&, _CharT2); 6242: 6242: protected: 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: char_type* _M_in_beg; 6242: char_type* _M_in_cur; 6242: char_type* _M_in_end; 6242: char_type* _M_out_beg; 6242: char_type* _M_out_cur; 6242: char_type* _M_out_end; 6242: 6242: 6242: locale _M_buf_locale; 6242: 6242: public: 6242: 6242: virtual 6242: ~basic_streambuf() 6242: { } 6242: # 215 "/usr/include/c++/8/streambuf" 3 6242: locale 6242: pubimbue(const locale& __loc) 6242: { 6242: locale __tmp(this->getloc()); 6242: this->imbue(__loc); 6242: _M_buf_locale = __loc; 6242: return __tmp; 6242: } 6242: # 232 "/usr/include/c++/8/streambuf" 3 6242: locale 6242: getloc() const 6242: { return _M_buf_locale; } 6242: # 245 "/usr/include/c++/8/streambuf" 3 6242: basic_streambuf* 6242: pubsetbuf(char_type* __s, streamsize __n) 6242: { return this->setbuf(__s, __n); } 6242: # 257 "/usr/include/c++/8/streambuf" 3 6242: pos_type 6242: pubseekoff(off_type __off, ios_base::seekdir __way, 6242: ios_base::openmode __mode = ios_base::in | ios_base::out) 6242: { return this->seekoff(__off, __way, __mode); } 6242: # 269 "/usr/include/c++/8/streambuf" 3 6242: pos_type 6242: pubseekpos(pos_type __sp, 6242: ios_base::openmode __mode = ios_base::in | ios_base::out) 6242: { return this->seekpos(__sp, __mode); } 6242: 6242: 6242: 6242: 6242: int 6242: pubsync() { return this->sync(); } 6242: # 290 "/usr/include/c++/8/streambuf" 3 6242: streamsize 6242: in_avail() 6242: { 6242: const streamsize __ret = this->egptr() - this->gptr(); 6242: return __ret ? __ret : this->showmanyc(); 6242: } 6242: # 304 "/usr/include/c++/8/streambuf" 3 6242: int_type 6242: snextc() 6242: { 6242: int_type __ret = traits_type::eof(); 6242: if (__builtin_expect(!traits_type::eq_int_type(this->sbumpc(), 6242: __ret), true)) 6242: __ret = this->sgetc(); 6242: return __ret; 6242: } 6242: # 322 "/usr/include/c++/8/streambuf" 3 6242: int_type 6242: sbumpc() 6242: { 6242: int_type __ret; 6242: if (__builtin_expect(this->gptr() < this->egptr(), true)) 6242: { 6242: __ret = traits_type::to_int_type(*this->gptr()); 6242: this->gbump(1); 6242: } 6242: else 6242: __ret = this->uflow(); 6242: return __ret; 6242: } 6242: # 344 "/usr/include/c++/8/streambuf" 3 6242: int_type 6242: sgetc() 6242: { 6242: int_type __ret; 6242: if (__builtin_expect(this->gptr() < this->egptr(), true)) 6242: __ret = traits_type::to_int_type(*this->gptr()); 6242: else 6242: __ret = this->underflow(); 6242: return __ret; 6242: } 6242: # 363 "/usr/include/c++/8/streambuf" 3 6242: streamsize 6242: sgetn(char_type* __s, streamsize __n) 6242: { return this->xsgetn(__s, __n); } 6242: # 378 "/usr/include/c++/8/streambuf" 3 6242: int_type 6242: sputbackc(char_type __c) 6242: { 6242: int_type __ret; 6242: const bool __testpos = this->eback() < this->gptr(); 6242: if (__builtin_expect(!__testpos || 6242: !traits_type::eq(__c, this->gptr()[-1]), false)) 6242: __ret = this->pbackfail(traits_type::to_int_type(__c)); 6242: else 6242: { 6242: this->gbump(-1); 6242: __ret = traits_type::to_int_type(*this->gptr()); 6242: } 6242: return __ret; 6242: } 6242: # 403 "/usr/include/c++/8/streambuf" 3 6242: int_type 6242: sungetc() 6242: { 6242: int_type __ret; 6242: if (__builtin_expect(this->eback() < this->gptr(), true)) 6242: { 6242: this->gbump(-1); 6242: __ret = traits_type::to_int_type(*this->gptr()); 6242: } 6242: else 6242: __ret = this->pbackfail(); 6242: return __ret; 6242: } 6242: # 430 "/usr/include/c++/8/streambuf" 3 6242: int_type 6242: sputc(char_type __c) 6242: { 6242: int_type __ret; 6242: if (__builtin_expect(this->pptr() < this->epptr(), true)) 6242: { 6242: *this->pptr() = __c; 6242: this->pbump(1); 6242: __ret = traits_type::to_int_type(__c); 6242: } 6242: else 6242: __ret = this->overflow(traits_type::to_int_type(__c)); 6242: return __ret; 6242: } 6242: # 456 "/usr/include/c++/8/streambuf" 3 6242: streamsize 6242: sputn(const char_type* __s, streamsize __n) 6242: { return this->xsputn(__s, __n); } 6242: 6242: protected: 6242: # 470 "/usr/include/c++/8/streambuf" 3 6242: basic_streambuf() 6242: : _M_in_beg(0), _M_in_cur(0), _M_in_end(0), 6242: _M_out_beg(0), _M_out_cur(0), _M_out_end(0), 6242: _M_buf_locale(locale()) 6242: { } 6242: # 488 "/usr/include/c++/8/streambuf" 3 6242: char_type* 6242: eback() const { return _M_in_beg; } 6242: 6242: char_type* 6242: gptr() const { return _M_in_cur; } 6242: 6242: char_type* 6242: egptr() const { return _M_in_end; } 6242: # 504 "/usr/include/c++/8/streambuf" 3 6242: void 6242: gbump(int __n) { _M_in_cur += __n; } 6242: # 515 "/usr/include/c++/8/streambuf" 3 6242: void 6242: setg(char_type* __gbeg, char_type* __gnext, char_type* __gend) 6242: { 6242: _M_in_beg = __gbeg; 6242: _M_in_cur = __gnext; 6242: _M_in_end = __gend; 6242: } 6242: # 535 "/usr/include/c++/8/streambuf" 3 6242: char_type* 6242: pbase() const { return _M_out_beg; } 6242: 6242: char_type* 6242: pptr() const { return _M_out_cur; } 6242: 6242: char_type* 6242: epptr() const { return _M_out_end; } 6242: # 551 "/usr/include/c++/8/streambuf" 3 6242: void 6242: pbump(int __n) { _M_out_cur += __n; } 6242: # 561 "/usr/include/c++/8/streambuf" 3 6242: void 6242: setp(char_type* __pbeg, char_type* __pend) 6242: { 6242: _M_out_beg = _M_out_cur = __pbeg; 6242: _M_out_end = __pend; 6242: } 6242: # 582 "/usr/include/c++/8/streambuf" 3 6242: virtual void 6242: imbue(const locale& __loc __attribute__ ((__unused__))) 6242: { } 6242: # 597 "/usr/include/c++/8/streambuf" 3 6242: virtual basic_streambuf* 6242: setbuf(char_type*, streamsize) 6242: { return this; } 6242: # 608 "/usr/include/c++/8/streambuf" 3 6242: virtual pos_type 6242: seekoff(off_type, ios_base::seekdir, 6242: ios_base::openmode = ios_base::in | ios_base::out) 6242: { return pos_type(off_type(-1)); } 6242: # 620 "/usr/include/c++/8/streambuf" 3 6242: virtual pos_type 6242: seekpos(pos_type, 6242: ios_base::openmode = ios_base::in | ios_base::out) 6242: { return pos_type(off_type(-1)); } 6242: # 633 "/usr/include/c++/8/streambuf" 3 6242: virtual int 6242: sync() { return 0; } 6242: # 655 "/usr/include/c++/8/streambuf" 3 6242: virtual streamsize 6242: showmanyc() { return 0; } 6242: # 671 "/usr/include/c++/8/streambuf" 3 6242: virtual streamsize 6242: xsgetn(char_type* __s, streamsize __n); 6242: # 693 "/usr/include/c++/8/streambuf" 3 6242: virtual int_type 6242: underflow() 6242: { return traits_type::eof(); } 6242: # 706 "/usr/include/c++/8/streambuf" 3 6242: virtual int_type 6242: uflow() 6242: { 6242: int_type __ret = traits_type::eof(); 6242: const bool __testeof = traits_type::eq_int_type(this->underflow(), 6242: __ret); 6242: if (!__testeof) 6242: { 6242: __ret = traits_type::to_int_type(*this->gptr()); 6242: this->gbump(1); 6242: } 6242: return __ret; 6242: } 6242: # 730 "/usr/include/c++/8/streambuf" 3 6242: virtual int_type 6242: pbackfail(int_type __c __attribute__ ((__unused__)) = traits_type::eof()) 6242: { return traits_type::eof(); } 6242: # 748 "/usr/include/c++/8/streambuf" 3 6242: virtual streamsize 6242: xsputn(const char_type* __s, streamsize __n); 6242: # 774 "/usr/include/c++/8/streambuf" 3 6242: virtual int_type 6242: overflow(int_type __c __attribute__ ((__unused__)) = traits_type::eof()) 6242: { return traits_type::eof(); } 6242: 6242: 6242: 6242: public: 6242: # 790 "/usr/include/c++/8/streambuf" 3 6242: [[__deprecated__("stossc is deprecated, use sbumpc instead")]] 6242: 6242: void 6242: stossc() 6242: { 6242: if (this->gptr() < this->egptr()) 6242: this->gbump(1); 6242: else 6242: this->uflow(); 6242: } 6242: 6242: 6242: 6242: void 6242: __safe_gbump(streamsize __n) { _M_in_cur += __n; } 6242: 6242: void 6242: __safe_pbump(streamsize __n) { _M_out_cur += __n; } 6242: 6242: 6242: 6242: 6242: protected: 6242: 6242: basic_streambuf(const basic_streambuf&); 6242: 6242: basic_streambuf& 6242: operator=(const basic_streambuf&); 6242: 6242: 6242: void 6242: swap(basic_streambuf& __sb) 6242: { 6242: std::swap(_M_in_beg, __sb._M_in_beg); 6242: std::swap(_M_in_cur, __sb._M_in_cur); 6242: std::swap(_M_in_end, __sb._M_in_end); 6242: std::swap(_M_out_beg, __sb._M_out_beg); 6242: std::swap(_M_out_cur, __sb._M_out_cur); 6242: std::swap(_M_out_end, __sb._M_out_end); 6242: std::swap(_M_buf_locale, __sb._M_buf_locale); 6242: } 6242: 6242: }; 6242: 6242: 6242: template 6242: std::basic_streambuf<_CharT, _Traits>:: 6242: basic_streambuf(const basic_streambuf&) = default; 6242: 6242: template 6242: std::basic_streambuf<_CharT, _Traits>& 6242: std::basic_streambuf<_CharT, _Traits>:: 6242: operator=(const basic_streambuf&) = default; 6242: 6242: 6242: 6242: template<> 6242: streamsize 6242: __copy_streambufs_eof(basic_streambuf* __sbin, 6242: basic_streambuf* __sbout, bool& __ineof); 6242: 6242: template<> 6242: streamsize 6242: __copy_streambufs_eof(basic_streambuf* __sbin, 6242: basic_streambuf* __sbout, bool& __ineof); 6242: 6242: 6242: 6242: 6242: 6242: } 6242: 6242: # 1 "/usr/include/c++/8/bits/streambuf.tcc" 1 3 6242: # 37 "/usr/include/c++/8/bits/streambuf.tcc" 3 6242: 6242: # 38 "/usr/include/c++/8/bits/streambuf.tcc" 3 6242: 6242: namespace std __attribute__ ((__visibility__ ("default"))) 6242: { 6242: 6242: 6242: template 6242: streamsize 6242: basic_streambuf<_CharT, _Traits>:: 6242: xsgetn(char_type* __s, streamsize __n) 6242: { 6242: streamsize __ret = 0; 6242: while (__ret < __n) 6242: { 6242: const streamsize __buf_len = this->egptr() - this->gptr(); 6242: if (__buf_len) 6242: { 6242: const streamsize __remaining = __n - __ret; 6242: const streamsize __len = std::min(__buf_len, __remaining); 6242: traits_type::copy(__s, this->gptr(), __len); 6242: __ret += __len; 6242: __s += __len; 6242: this->__safe_gbump(__len); 6242: } 6242: 6242: if (__ret < __n) 6242: { 6242: const int_type __c = this->uflow(); 6242: if (!traits_type::eq_int_type(__c, traits_type::eof())) 6242: { 6242: traits_type::assign(*__s++, traits_type::to_char_type(__c)); 6242: ++__ret; 6242: } 6242: else 6242: break; 6242: } 6242: } 6242: return __ret; 6242: } 6242: 6242: template 6242: streamsize 6242: basic_streambuf<_CharT, _Traits>:: 6242: xsputn(const char_type* __s, streamsize __n) 6242: { 6242: streamsize __ret = 0; 6242: while (__ret < __n) 6242: { 6242: const streamsize __buf_len = this->epptr() - this->pptr(); 6242: if (__buf_len) 6242: { 6242: const streamsize __remaining = __n - __ret; 6242: const streamsize __len = std::min(__buf_len, __remaining); 6242: traits_type::copy(this->pptr(), __s, __len); 6242: __ret += __len; 6242: __s += __len; 6242: this->__safe_pbump(__len); 6242: } 6242: 6242: if (__ret < __n) 6242: { 6242: int_type __c = this->overflow(traits_type::to_int_type(*__s)); 6242: if (!traits_type::eq_int_type(__c, traits_type::eof())) 6242: { 6242: ++__ret; 6242: ++__s; 6242: } 6242: else 6242: break; 6242: } 6242: } 6242: return __ret; 6242: } 6242: 6242: 6242: 6242: 6242: template 6242: streamsize 6242: __copy_streambufs_eof(basic_streambuf<_CharT, _Traits>* __sbin, 6242: basic_streambuf<_CharT, _Traits>* __sbout, 6242: bool& __ineof) 6242: { 6242: streamsize __ret = 0; 6242: __ineof = true; 6242: typename _Traits::int_type __c = __sbin->sgetc(); 6242: while (!_Traits::eq_int_type(__c, _Traits::eof())) 6242: { 6242: __c = __sbout->sputc(_Traits::to_char_type(__c)); 6242: if (_Traits::eq_int_type(__c, _Traits::eof())) 6242: { 6242: __ineof = false; 6242: break; 6242: } 6242: ++__ret; 6242: __c = __sbin->snextc(); 6242: } 6242: return __ret; 6242: } 6242: 6242: template 6242: inline streamsize 6242: __copy_streambufs(basic_streambuf<_CharT, _Traits>* __sbin, 6242: basic_streambuf<_CharT, _Traits>* __sbout) 6242: { 6242: bool __ineof; 6242: return __copy_streambufs_eof(__sbin, __sbout, __ineof); 6242: } 6242: 6242: 6242: 6242: 6242: extern template class basic_streambuf; 6242: extern template 6242: streamsize 6242: __copy_streambufs(basic_streambuf*, 6242: basic_streambuf*); 6242: extern template 6242: streamsize 6242: __copy_streambufs_eof(basic_streambuf*, 6242: basic_streambuf*, bool&); 6242: 6242: 6242: extern template class basic_streambuf; 6242: extern template 6242: streamsize 6242: __copy_streambufs(basic_streambuf*, 6242: basic_streambuf*); 6242: extern template 6242: streamsize 6242: __copy_streambufs_eof(basic_streambuf*, 6242: basic_streambuf*, bool&); 6242: 6242: 6242: 6242: 6242: } 6242: # 863 "/usr/include/c++/8/streambuf" 2 3 6242: # 44 "/usr/include/c++/8/ios" 2 3 6242: # 1 "/usr/include/c++/8/bits/basic_ios.h" 1 3 6242: # 33 "/usr/include/c++/8/bits/basic_ios.h" 3 6242: 6242: # 34 "/usr/include/c++/8/bits/basic_ios.h" 3 6242: 6242: 6242: 6242: # 1 "/usr/include/c++/8/bits/locale_facets.h" 1 3 6242: # 37 "/usr/include/c++/8/bits/locale_facets.h" 3 6242: 6242: # 38 "/usr/include/c++/8/bits/locale_facets.h" 3 6242: 6242: # 1 "/usr/include/c++/8/cwctype" 1 3 6242: # 39 "/usr/include/c++/8/cwctype" 3 6242: 6242: # 40 "/usr/include/c++/8/cwctype" 3 6242: # 50 "/usr/include/c++/8/cwctype" 3 6242: # 1 "/usr/include/wctype.h" 1 3 4 6242: # 38 "/usr/include/wctype.h" 3 4 6242: # 1 "/usr/include/s390x-linux-gnu/bits/wctype-wchar.h" 1 3 4 6242: # 38 "/usr/include/s390x-linux-gnu/bits/wctype-wchar.h" 3 4 6242: typedef unsigned long int wctype_t; 6242: # 56 "/usr/include/s390x-linux-gnu/bits/wctype-wchar.h" 3 4 6242: enum 6242: { 6242: __ISwupper = 0, 6242: __ISwlower = 1, 6242: __ISwalpha = 2, 6242: __ISwdigit = 3, 6242: __ISwxdigit = 4, 6242: __ISwspace = 5, 6242: __ISwprint = 6, 6242: __ISwgraph = 7, 6242: __ISwblank = 8, 6242: __ISwcntrl = 9, 6242: __ISwpunct = 10, 6242: __ISwalnum = 11, 6242: 6242: _ISwupper = (1 << (__ISwupper)), 6242: _ISwlower = (1 << (__ISwlower)), 6242: _ISwalpha = (1 << (__ISwalpha)), 6242: _ISwdigit = (1 << (__ISwdigit)), 6242: _ISwxdigit = (1 << (__ISwxdigit)), 6242: _ISwspace = (1 << (__ISwspace)), 6242: _ISwprint = (1 << (__ISwprint)), 6242: _ISwgraph = (1 << (__ISwgraph)), 6242: _ISwblank = (1 << (__ISwblank)), 6242: _ISwcntrl = (1 << (__ISwcntrl)), 6242: _ISwpunct = (1 << (__ISwpunct)), 6242: _ISwalnum = (1 << (__ISwalnum)) 6242: }; 6242: 6242: 6242: 6242: extern "C" { 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: extern int iswalnum (wint_t __wc) throw (); 6242: 6242: 6242: 6242: 6242: 6242: extern int iswalpha (wint_t __wc) throw (); 6242: 6242: 6242: extern int iswcntrl (wint_t __wc) throw (); 6242: 6242: 6242: 6242: extern int iswdigit (wint_t __wc) throw (); 6242: 6242: 6242: 6242: extern int iswgraph (wint_t __wc) throw (); 6242: 6242: 6242: 6242: 6242: extern int iswlower (wint_t __wc) throw (); 6242: 6242: 6242: extern int iswprint (wint_t __wc) throw (); 6242: 6242: 6242: 6242: 6242: extern int iswpunct (wint_t __wc) throw (); 6242: 6242: 6242: 6242: 6242: extern int iswspace (wint_t __wc) throw (); 6242: 6242: 6242: 6242: 6242: extern int iswupper (wint_t __wc) throw (); 6242: 6242: 6242: 6242: 6242: extern int iswxdigit (wint_t __wc) throw (); 6242: 6242: 6242: 6242: 6242: 6242: extern int iswblank (wint_t __wc) throw (); 6242: # 155 "/usr/include/s390x-linux-gnu/bits/wctype-wchar.h" 3 4 6242: extern wctype_t wctype (const char *__property) throw (); 6242: 6242: 6242: 6242: extern int iswctype (wint_t __wc, wctype_t __desc) throw (); 6242: 6242: 6242: 6242: 6242: 6242: 6242: extern wint_t towlower (wint_t __wc) throw (); 6242: 6242: 6242: extern wint_t towupper (wint_t __wc) throw (); 6242: 6242: } 6242: # 39 "/usr/include/wctype.h" 2 3 4 6242: 6242: 6242: 6242: 6242: 6242: extern "C" { 6242: 6242: 6242: 6242: typedef const __int32_t *wctrans_t; 6242: 6242: 6242: 6242: extern wctrans_t wctrans (const char *__property) throw (); 6242: 6242: 6242: extern wint_t towctrans (wint_t __wc, wctrans_t __desc) throw (); 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: extern int iswalnum_l (wint_t __wc, locale_t __locale) throw (); 6242: 6242: 6242: 6242: 6242: 6242: extern int iswalpha_l (wint_t __wc, locale_t __locale) throw (); 6242: 6242: 6242: extern int iswcntrl_l (wint_t __wc, locale_t __locale) throw (); 6242: 6242: 6242: 6242: extern int iswdigit_l (wint_t __wc, locale_t __locale) throw (); 6242: 6242: 6242: 6242: extern int iswgraph_l (wint_t __wc, locale_t __locale) throw (); 6242: 6242: 6242: 6242: 6242: extern int iswlower_l (wint_t __wc, locale_t __locale) throw (); 6242: 6242: 6242: extern int iswprint_l (wint_t __wc, locale_t __locale) throw (); 6242: 6242: 6242: 6242: 6242: extern int iswpunct_l (wint_t __wc, locale_t __locale) throw (); 6242: 6242: 6242: 6242: 6242: extern int iswspace_l (wint_t __wc, locale_t __locale) throw (); 6242: 6242: 6242: 6242: 6242: extern int iswupper_l (wint_t __wc, locale_t __locale) throw (); 6242: 6242: 6242: 6242: 6242: extern int iswxdigit_l (wint_t __wc, locale_t __locale) throw (); 6242: 6242: 6242: 6242: 6242: extern int iswblank_l (wint_t __wc, locale_t __locale) throw (); 6242: 6242: 6242: 6242: extern wctype_t wctype_l (const char *__property, locale_t __locale) 6242: throw (); 6242: 6242: 6242: 6242: extern int iswctype_l (wint_t __wc, wctype_t __desc, locale_t __locale) 6242: throw (); 6242: 6242: 6242: 6242: 6242: 6242: 6242: extern wint_t towlower_l (wint_t __wc, locale_t __locale) throw (); 6242: 6242: 6242: extern wint_t towupper_l (wint_t __wc, locale_t __locale) throw (); 6242: 6242: 6242: 6242: extern wctrans_t wctrans_l (const char *__property, locale_t __locale) 6242: throw (); 6242: 6242: 6242: extern wint_t towctrans_l (wint_t __wc, wctrans_t __desc, 6242: locale_t __locale) throw (); 6242: 6242: 6242: 6242: } 6242: # 51 "/usr/include/c++/8/cwctype" 2 3 6242: # 80 "/usr/include/c++/8/cwctype" 3 6242: namespace std 6242: { 6242: using ::wctrans_t; 6242: using ::wctype_t; 6242: using ::wint_t; 6242: 6242: using ::iswalnum; 6242: using ::iswalpha; 6242: 6242: using ::iswblank; 6242: 6242: using ::iswcntrl; 6242: using ::iswctype; 6242: using ::iswdigit; 6242: using ::iswgraph; 6242: using ::iswlower; 6242: using ::iswprint; 6242: using ::iswpunct; 6242: using ::iswspace; 6242: using ::iswupper; 6242: using ::iswxdigit; 6242: using ::towctrans; 6242: using ::towlower; 6242: using ::towupper; 6242: using ::wctrans; 6242: using ::wctype; 6242: } 6242: # 40 "/usr/include/c++/8/bits/locale_facets.h" 2 3 6242: # 1 "/usr/include/c++/8/cctype" 1 3 6242: # 39 "/usr/include/c++/8/cctype" 3 6242: 6242: # 40 "/usr/include/c++/8/cctype" 3 6242: # 41 "/usr/include/c++/8/bits/locale_facets.h" 2 3 6242: # 1 "/usr/include/s390x-linux-gnu/c++/8/bits/ctype_base.h" 1 3 6242: # 36 "/usr/include/s390x-linux-gnu/c++/8/bits/ctype_base.h" 3 6242: namespace std __attribute__ ((__visibility__ ("default"))) 6242: { 6242: 6242: 6242: 6242: struct ctype_base 6242: { 6242: 6242: typedef const int* __to_type; 6242: 6242: 6242: 6242: typedef unsigned short mask; 6242: static const mask upper = _ISupper; 6242: static const mask lower = _ISlower; 6242: static const mask alpha = _ISalpha; 6242: static const mask digit = _ISdigit; 6242: static const mask xdigit = _ISxdigit; 6242: static const mask space = _ISspace; 6242: static const mask print = _ISprint; 6242: static const mask graph = _ISalpha | _ISdigit | _ISpunct; 6242: static const mask cntrl = _IScntrl; 6242: static const mask punct = _ISpunct; 6242: static const mask alnum = _ISalpha | _ISdigit; 6242: 6242: static const mask blank = _ISblank; 6242: 6242: }; 6242: 6242: 6242: } 6242: # 42 "/usr/include/c++/8/bits/locale_facets.h" 2 3 6242: 6242: 6242: 6242: 6242: 6242: 6242: # 1 "/usr/include/c++/8/bits/streambuf_iterator.h" 1 3 6242: # 33 "/usr/include/c++/8/bits/streambuf_iterator.h" 3 6242: 6242: # 34 "/usr/include/c++/8/bits/streambuf_iterator.h" 3 6242: 6242: 6242: 6242: 6242: namespace std __attribute__ ((__visibility__ ("default"))) 6242: { 6242: 6242: # 49 "/usr/include/c++/8/bits/streambuf_iterator.h" 3 6242: template 6242: class istreambuf_iterator 6242: : public iterator 6242: 6242: 6242: 6242: { 6242: public: 6242: 6242: 6242: 6242: typedef _CharT char_type; 6242: typedef _Traits traits_type; 6242: typedef typename _Traits::int_type int_type; 6242: typedef basic_streambuf<_CharT, _Traits> streambuf_type; 6242: typedef basic_istream<_CharT, _Traits> istream_type; 6242: 6242: 6242: template 6242: friend typename __gnu_cxx::__enable_if<__is_char<_CharT2>::__value, 6242: ostreambuf_iterator<_CharT2> >::__type 6242: copy(istreambuf_iterator<_CharT2>, istreambuf_iterator<_CharT2>, 6242: ostreambuf_iterator<_CharT2>); 6242: 6242: template 6242: friend typename __gnu_cxx::__enable_if<__is_char<_CharT2>::__value, 6242: _CharT2*>::__type 6242: __copy_move_a2(istreambuf_iterator<_CharT2>, 6242: istreambuf_iterator<_CharT2>, _CharT2*); 6242: 6242: template 6242: friend typename __gnu_cxx::__enable_if<__is_char<_CharT2>::__value, 6242: istreambuf_iterator<_CharT2> >::__type 6242: find(istreambuf_iterator<_CharT2>, istreambuf_iterator<_CharT2>, 6242: const _CharT2&); 6242: 6242: template 6242: friend typename __gnu_cxx::__enable_if<__is_char<_CharT2>::__value, 6242: void>::__type 6242: advance(istreambuf_iterator<_CharT2>&, _Distance); 6242: 6242: private: 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: mutable streambuf_type* _M_sbuf; 6242: int_type _M_c; 6242: 6242: public: 6242: 6242: constexpr istreambuf_iterator() noexcept 6242: : _M_sbuf(0), _M_c(traits_type::eof()) { } 6242: 6242: 6242: istreambuf_iterator(const istreambuf_iterator&) noexcept = default; 6242: 6242: ~istreambuf_iterator() = default; 6242: 6242: 6242: 6242: istreambuf_iterator(istream_type& __s) noexcept 6242: : _M_sbuf(__s.rdbuf()), _M_c(traits_type::eof()) { } 6242: 6242: 6242: istreambuf_iterator(streambuf_type* __s) noexcept 6242: : _M_sbuf(__s), _M_c(traits_type::eof()) { } 6242: 6242: 6242: 6242: 6242: char_type 6242: operator*() const 6242: { 6242: int_type __c = _M_get(); 6242: # 139 "/usr/include/c++/8/bits/streambuf_iterator.h" 3 6242: return traits_type::to_char_type(__c); 6242: } 6242: 6242: 6242: istreambuf_iterator& 6242: operator++() 6242: { 6242: 6242: 6242: 6242: ; 6242: 6242: _M_sbuf->sbumpc(); 6242: _M_c = traits_type::eof(); 6242: return *this; 6242: } 6242: 6242: 6242: istreambuf_iterator 6242: operator++(int) 6242: { 6242: 6242: 6242: 6242: ; 6242: 6242: istreambuf_iterator __old = *this; 6242: __old._M_c = _M_sbuf->sbumpc(); 6242: _M_c = traits_type::eof(); 6242: return __old; 6242: } 6242: 6242: 6242: 6242: 6242: 6242: bool 6242: equal(const istreambuf_iterator& __b) const 6242: { return _M_at_eof() == __b._M_at_eof(); } 6242: 6242: private: 6242: int_type 6242: _M_get() const 6242: { 6242: int_type __ret = _M_c; 6242: if (_M_sbuf && _S_is_eof(__ret) && _S_is_eof(__ret = _M_sbuf->sgetc())) 6242: _M_sbuf = 0; 6242: return __ret; 6242: } 6242: 6242: bool 6242: _M_at_eof() const 6242: { return _S_is_eof(_M_get()); } 6242: 6242: static bool 6242: _S_is_eof(int_type __c) 6242: { 6242: const int_type __eof = traits_type::eof(); 6242: return traits_type::eq_int_type(__c, __eof); 6242: } 6242: }; 6242: 6242: template 6242: inline bool 6242: operator==(const istreambuf_iterator<_CharT, _Traits>& __a, 6242: const istreambuf_iterator<_CharT, _Traits>& __b) 6242: { return __a.equal(__b); } 6242: 6242: template 6242: inline bool 6242: operator!=(const istreambuf_iterator<_CharT, _Traits>& __a, 6242: const istreambuf_iterator<_CharT, _Traits>& __b) 6242: { return !__a.equal(__b); } 6242: 6242: 6242: template 6242: class ostreambuf_iterator 6242: : public iterator 6242: { 6242: public: 6242: 6242: 6242: 6242: typedef _CharT char_type; 6242: typedef _Traits traits_type; 6242: typedef basic_streambuf<_CharT, _Traits> streambuf_type; 6242: typedef basic_ostream<_CharT, _Traits> ostream_type; 6242: 6242: 6242: template 6242: friend typename __gnu_cxx::__enable_if<__is_char<_CharT2>::__value, 6242: ostreambuf_iterator<_CharT2> >::__type 6242: copy(istreambuf_iterator<_CharT2>, istreambuf_iterator<_CharT2>, 6242: ostreambuf_iterator<_CharT2>); 6242: 6242: private: 6242: streambuf_type* _M_sbuf; 6242: bool _M_failed; 6242: 6242: public: 6242: 6242: ostreambuf_iterator(ostream_type& __s) noexcept 6242: : _M_sbuf(__s.rdbuf()), _M_failed(!_M_sbuf) { } 6242: 6242: 6242: ostreambuf_iterator(streambuf_type* __s) noexcept 6242: : _M_sbuf(__s), _M_failed(!_M_sbuf) { } 6242: 6242: 6242: ostreambuf_iterator& 6242: operator=(_CharT __c) 6242: { 6242: if (!_M_failed && 6242: _Traits::eq_int_type(_M_sbuf->sputc(__c), _Traits::eof())) 6242: _M_failed = true; 6242: return *this; 6242: } 6242: 6242: 6242: ostreambuf_iterator& 6242: operator*() 6242: { return *this; } 6242: 6242: 6242: ostreambuf_iterator& 6242: operator++(int) 6242: { return *this; } 6242: 6242: 6242: ostreambuf_iterator& 6242: operator++() 6242: { return *this; } 6242: 6242: 6242: bool 6242: failed() const noexcept 6242: { return _M_failed; } 6242: 6242: ostreambuf_iterator& 6242: _M_put(const _CharT* __ws, streamsize __len) 6242: { 6242: if (__builtin_expect(!_M_failed, true) 6242: && __builtin_expect(this->_M_sbuf->sputn(__ws, __len) != __len, 6242: false)) 6242: _M_failed = true; 6242: return *this; 6242: } 6242: }; 6242: 6242: 6242: template 6242: typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value, 6242: ostreambuf_iterator<_CharT> >::__type 6242: copy(istreambuf_iterator<_CharT> __first, 6242: istreambuf_iterator<_CharT> __last, 6242: ostreambuf_iterator<_CharT> __result) 6242: { 6242: if (__first._M_sbuf && !__last._M_sbuf && !__result._M_failed) 6242: { 6242: bool __ineof; 6242: __copy_streambufs_eof(__first._M_sbuf, __result._M_sbuf, __ineof); 6242: if (!__ineof) 6242: __result._M_failed = true; 6242: } 6242: return __result; 6242: } 6242: 6242: template 6242: typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value, 6242: ostreambuf_iterator<_CharT> >::__type 6242: __copy_move_a2(_CharT* __first, _CharT* __last, 6242: ostreambuf_iterator<_CharT> __result) 6242: { 6242: const streamsize __num = __last - __first; 6242: if (__num > 0) 6242: __result._M_put(__first, __num); 6242: return __result; 6242: } 6242: 6242: template 6242: typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value, 6242: ostreambuf_iterator<_CharT> >::__type 6242: __copy_move_a2(const _CharT* __first, const _CharT* __last, 6242: ostreambuf_iterator<_CharT> __result) 6242: { 6242: const streamsize __num = __last - __first; 6242: if (__num > 0) 6242: __result._M_put(__first, __num); 6242: return __result; 6242: } 6242: 6242: template 6242: typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value, 6242: _CharT*>::__type 6242: __copy_move_a2(istreambuf_iterator<_CharT> __first, 6242: istreambuf_iterator<_CharT> __last, _CharT* __result) 6242: { 6242: typedef istreambuf_iterator<_CharT> __is_iterator_type; 6242: typedef typename __is_iterator_type::traits_type traits_type; 6242: typedef typename __is_iterator_type::streambuf_type streambuf_type; 6242: typedef typename traits_type::int_type int_type; 6242: 6242: if (__first._M_sbuf && !__last._M_sbuf) 6242: { 6242: streambuf_type* __sb = __first._M_sbuf; 6242: int_type __c = __sb->sgetc(); 6242: while (!traits_type::eq_int_type(__c, traits_type::eof())) 6242: { 6242: const streamsize __n = __sb->egptr() - __sb->gptr(); 6242: if (__n > 1) 6242: { 6242: traits_type::copy(__result, __sb->gptr(), __n); 6242: __sb->__safe_gbump(__n); 6242: __result += __n; 6242: __c = __sb->underflow(); 6242: } 6242: else 6242: { 6242: *__result++ = traits_type::to_char_type(__c); 6242: __c = __sb->snextc(); 6242: } 6242: } 6242: } 6242: return __result; 6242: } 6242: 6242: template 6242: typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value, 6242: istreambuf_iterator<_CharT> >::__type 6242: find(istreambuf_iterator<_CharT> __first, 6242: istreambuf_iterator<_CharT> __last, const _CharT& __val) 6242: { 6242: typedef istreambuf_iterator<_CharT> __is_iterator_type; 6242: typedef typename __is_iterator_type::traits_type traits_type; 6242: typedef typename __is_iterator_type::streambuf_type streambuf_type; 6242: typedef typename traits_type::int_type int_type; 6242: const int_type __eof = traits_type::eof(); 6242: 6242: if (__first._M_sbuf && !__last._M_sbuf) 6242: { 6242: const int_type __ival = traits_type::to_int_type(__val); 6242: streambuf_type* __sb = __first._M_sbuf; 6242: int_type __c = __sb->sgetc(); 6242: while (!traits_type::eq_int_type(__c, __eof) 6242: && !traits_type::eq_int_type(__c, __ival)) 6242: { 6242: streamsize __n = __sb->egptr() - __sb->gptr(); 6242: if (__n > 1) 6242: { 6242: const _CharT* __p = traits_type::find(__sb->gptr(), 6242: __n, __val); 6242: if (__p) 6242: __n = __p - __sb->gptr(); 6242: __sb->__safe_gbump(__n); 6242: __c = __sb->sgetc(); 6242: } 6242: else 6242: __c = __sb->snextc(); 6242: } 6242: 6242: __first._M_c = __eof; 6242: } 6242: 6242: return __first; 6242: } 6242: 6242: template 6242: typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value, 6242: void>::__type 6242: advance(istreambuf_iterator<_CharT>& __i, _Distance __n) 6242: { 6242: if (__n == 0) 6242: return; 6242: 6242: ; 6242: 6242: 6242: ; 6242: 6242: typedef istreambuf_iterator<_CharT> __is_iterator_type; 6242: typedef typename __is_iterator_type::traits_type traits_type; 6242: typedef typename __is_iterator_type::streambuf_type streambuf_type; 6242: typedef typename traits_type::int_type int_type; 6242: const int_type __eof = traits_type::eof(); 6242: 6242: streambuf_type* __sb = __i._M_sbuf; 6242: while (__n > 0) 6242: { 6242: streamsize __size = __sb->egptr() - __sb->gptr(); 6242: if (__size > __n) 6242: { 6242: __sb->__safe_gbump(__n); 6242: break; 6242: } 6242: 6242: __sb->__safe_gbump(__size); 6242: __n -= __size; 6242: if (traits_type::eq_int_type(__sb->underflow(), __eof)) 6242: { 6242: 6242: 6242: ; 6242: break; 6242: } 6242: } 6242: 6242: __i._M_c = __eof; 6242: } 6242: 6242: 6242: 6242: 6242: } 6242: # 49 "/usr/include/c++/8/bits/locale_facets.h" 2 3 6242: 6242: namespace std __attribute__ ((__visibility__ ("default"))) 6242: { 6242: 6242: # 71 "/usr/include/c++/8/bits/locale_facets.h" 3 6242: template 6242: void 6242: __convert_to_v(const char*, _Tp&, ios_base::iostate&, 6242: const __c_locale&) throw(); 6242: 6242: 6242: template<> 6242: void 6242: __convert_to_v(const char*, float&, ios_base::iostate&, 6242: const __c_locale&) throw(); 6242: 6242: template<> 6242: void 6242: __convert_to_v(const char*, double&, ios_base::iostate&, 6242: const __c_locale&) throw(); 6242: 6242: template<> 6242: void 6242: __convert_to_v(const char*, long double&, ios_base::iostate&, 6242: const __c_locale&) throw(); 6242: 6242: 6242: 6242: template 6242: struct __pad 6242: { 6242: static void 6242: _S_pad(ios_base& __io, _CharT __fill, _CharT* __news, 6242: const _CharT* __olds, streamsize __newlen, streamsize __oldlen); 6242: }; 6242: 6242: 6242: 6242: 6242: 6242: 6242: template 6242: _CharT* 6242: __add_grouping(_CharT* __s, _CharT __sep, 6242: const char* __gbeg, size_t __gsize, 6242: const _CharT* __first, const _CharT* __last); 6242: 6242: 6242: 6242: 6242: template 6242: inline 6242: ostreambuf_iterator<_CharT> 6242: __write(ostreambuf_iterator<_CharT> __s, const _CharT* __ws, int __len) 6242: { 6242: __s._M_put(__ws, __len); 6242: return __s; 6242: } 6242: 6242: 6242: template 6242: inline 6242: _OutIter 6242: __write(_OutIter __s, const _CharT* __ws, int __len) 6242: { 6242: for (int __j = 0; __j < __len; __j++, ++__s) 6242: *__s = __ws[__j]; 6242: return __s; 6242: } 6242: # 149 "/usr/include/c++/8/bits/locale_facets.h" 3 6242: template 6242: class __ctype_abstract_base : public locale::facet, public ctype_base 6242: { 6242: public: 6242: 6242: 6242: typedef _CharT char_type; 6242: # 168 "/usr/include/c++/8/bits/locale_facets.h" 3 6242: bool 6242: is(mask __m, char_type __c) const 6242: { return this->do_is(__m, __c); } 6242: # 185 "/usr/include/c++/8/bits/locale_facets.h" 3 6242: const char_type* 6242: is(const char_type *__lo, const char_type *__hi, mask *__vec) const 6242: { return this->do_is(__lo, __hi, __vec); } 6242: # 201 "/usr/include/c++/8/bits/locale_facets.h" 3 6242: const char_type* 6242: scan_is(mask __m, const char_type* __lo, const char_type* __hi) const 6242: { return this->do_scan_is(__m, __lo, __hi); } 6242: # 217 "/usr/include/c++/8/bits/locale_facets.h" 3 6242: const char_type* 6242: scan_not(mask __m, const char_type* __lo, const char_type* __hi) const 6242: { return this->do_scan_not(__m, __lo, __hi); } 6242: # 231 "/usr/include/c++/8/bits/locale_facets.h" 3 6242: char_type 6242: toupper(char_type __c) const 6242: { return this->do_toupper(__c); } 6242: # 246 "/usr/include/c++/8/bits/locale_facets.h" 3 6242: const char_type* 6242: toupper(char_type *__lo, const char_type* __hi) const 6242: { return this->do_toupper(__lo, __hi); } 6242: # 260 "/usr/include/c++/8/bits/locale_facets.h" 3 6242: char_type 6242: tolower(char_type __c) const 6242: { return this->do_tolower(__c); } 6242: # 275 "/usr/include/c++/8/bits/locale_facets.h" 3 6242: const char_type* 6242: tolower(char_type* __lo, const char_type* __hi) const 6242: { return this->do_tolower(__lo, __hi); } 6242: # 292 "/usr/include/c++/8/bits/locale_facets.h" 3 6242: char_type 6242: widen(char __c) const 6242: { return this->do_widen(__c); } 6242: # 311 "/usr/include/c++/8/bits/locale_facets.h" 3 6242: const char* 6242: widen(const char* __lo, const char* __hi, char_type* __to) const 6242: { return this->do_widen(__lo, __hi, __to); } 6242: # 330 "/usr/include/c++/8/bits/locale_facets.h" 3 6242: char 6242: narrow(char_type __c, char __dfault) const 6242: { return this->do_narrow(__c, __dfault); } 6242: # 352 "/usr/include/c++/8/bits/locale_facets.h" 3 6242: const char_type* 6242: narrow(const char_type* __lo, const char_type* __hi, 6242: char __dfault, char* __to) const 6242: { return this->do_narrow(__lo, __hi, __dfault, __to); } 6242: 6242: protected: 6242: explicit 6242: __ctype_abstract_base(size_t __refs = 0): facet(__refs) { } 6242: 6242: virtual 6242: ~__ctype_abstract_base() { } 6242: # 377 "/usr/include/c++/8/bits/locale_facets.h" 3 6242: virtual bool 6242: do_is(mask __m, char_type __c) const = 0; 6242: # 396 "/usr/include/c++/8/bits/locale_facets.h" 3 6242: virtual const char_type* 6242: do_is(const char_type* __lo, const char_type* __hi, 6242: mask* __vec) const = 0; 6242: # 415 "/usr/include/c++/8/bits/locale_facets.h" 3 6242: virtual const char_type* 6242: do_scan_is(mask __m, const char_type* __lo, 6242: const char_type* __hi) const = 0; 6242: # 434 "/usr/include/c++/8/bits/locale_facets.h" 3 6242: virtual const char_type* 6242: do_scan_not(mask __m, const char_type* __lo, 6242: const char_type* __hi) const = 0; 6242: # 452 "/usr/include/c++/8/bits/locale_facets.h" 3 6242: virtual char_type 6242: do_toupper(char_type __c) const = 0; 6242: # 469 "/usr/include/c++/8/bits/locale_facets.h" 3 6242: virtual const char_type* 6242: do_toupper(char_type* __lo, const char_type* __hi) const = 0; 6242: # 485 "/usr/include/c++/8/bits/locale_facets.h" 3 6242: virtual char_type 6242: do_tolower(char_type __c) const = 0; 6242: # 502 "/usr/include/c++/8/bits/locale_facets.h" 3 6242: virtual const char_type* 6242: do_tolower(char_type* __lo, const char_type* __hi) const = 0; 6242: # 521 "/usr/include/c++/8/bits/locale_facets.h" 3 6242: virtual char_type 6242: do_widen(char __c) const = 0; 6242: # 542 "/usr/include/c++/8/bits/locale_facets.h" 3 6242: virtual const char* 6242: do_widen(const char* __lo, const char* __hi, char_type* __to) const = 0; 6242: # 563 "/usr/include/c++/8/bits/locale_facets.h" 3 6242: virtual char 6242: do_narrow(char_type __c, char __dfault) const = 0; 6242: # 588 "/usr/include/c++/8/bits/locale_facets.h" 3 6242: virtual const char_type* 6242: do_narrow(const char_type* __lo, const char_type* __hi, 6242: char __dfault, char* __to) const = 0; 6242: }; 6242: # 611 "/usr/include/c++/8/bits/locale_facets.h" 3 6242: template 6242: class ctype : public __ctype_abstract_base<_CharT> 6242: { 6242: public: 6242: 6242: typedef _CharT char_type; 6242: typedef typename __ctype_abstract_base<_CharT>::mask mask; 6242: 6242: 6242: static locale::id id; 6242: 6242: explicit 6242: ctype(size_t __refs = 0) : __ctype_abstract_base<_CharT>(__refs) { } 6242: 6242: protected: 6242: virtual 6242: ~ctype(); 6242: 6242: virtual bool 6242: do_is(mask __m, char_type __c) const; 6242: 6242: virtual const char_type* 6242: do_is(const char_type* __lo, const char_type* __hi, mask* __vec) const; 6242: 6242: virtual const char_type* 6242: do_scan_is(mask __m, const char_type* __lo, const char_type* __hi) const; 6242: 6242: virtual const char_type* 6242: do_scan_not(mask __m, const char_type* __lo, 6242: const char_type* __hi) const; 6242: 6242: virtual char_type 6242: do_toupper(char_type __c) const; 6242: 6242: virtual const char_type* 6242: do_toupper(char_type* __lo, const char_type* __hi) const; 6242: 6242: virtual char_type 6242: do_tolower(char_type __c) const; 6242: 6242: virtual const char_type* 6242: do_tolower(char_type* __lo, const char_type* __hi) const; 6242: 6242: virtual char_type 6242: do_widen(char __c) const; 6242: 6242: virtual const char* 6242: do_widen(const char* __lo, const char* __hi, char_type* __dest) const; 6242: 6242: virtual char 6242: do_narrow(char_type, char __dfault) const; 6242: 6242: virtual const char_type* 6242: do_narrow(const char_type* __lo, const char_type* __hi, 6242: char __dfault, char* __to) const; 6242: }; 6242: 6242: template 6242: locale::id ctype<_CharT>::id; 6242: # 680 "/usr/include/c++/8/bits/locale_facets.h" 3 6242: template<> 6242: class ctype : public locale::facet, public ctype_base 6242: { 6242: public: 6242: 6242: 6242: typedef char char_type; 6242: 6242: protected: 6242: 6242: __c_locale _M_c_locale_ctype; 6242: bool _M_del; 6242: __to_type _M_toupper; 6242: __to_type _M_tolower; 6242: const mask* _M_table; 6242: mutable char _M_widen_ok; 6242: mutable char _M_widen[1 + static_cast(-1)]; 6242: mutable char _M_narrow[1 + static_cast(-1)]; 6242: mutable char _M_narrow_ok; 6242: 6242: 6242: public: 6242: 6242: static locale::id id; 6242: 6242: static const size_t table_size = 1 + static_cast(-1); 6242: # 717 "/usr/include/c++/8/bits/locale_facets.h" 3 6242: explicit 6242: ctype(const mask* __table = 0, bool __del = false, size_t __refs = 0); 6242: # 730 "/usr/include/c++/8/bits/locale_facets.h" 3 6242: explicit 6242: ctype(__c_locale __cloc, const mask* __table = 0, bool __del = false, 6242: size_t __refs = 0); 6242: # 743 "/usr/include/c++/8/bits/locale_facets.h" 3 6242: inline bool 6242: is(mask __m, char __c) const; 6242: # 758 "/usr/include/c++/8/bits/locale_facets.h" 3 6242: inline const char* 6242: is(const char* __lo, const char* __hi, mask* __vec) const; 6242: # 772 "/usr/include/c++/8/bits/locale_facets.h" 3 6242: inline const char* 6242: scan_is(mask __m, const char* __lo, const char* __hi) const; 6242: # 786 "/usr/include/c++/8/bits/locale_facets.h" 3 6242: inline const char* 6242: scan_not(mask __m, const char* __lo, const char* __hi) const; 6242: # 801 "/usr/include/c++/8/bits/locale_facets.h" 3 6242: char_type 6242: toupper(char_type __c) const 6242: { return this->do_toupper(__c); } 6242: # 818 "/usr/include/c++/8/bits/locale_facets.h" 3 6242: const char_type* 6242: toupper(char_type *__lo, const char_type* __hi) const 6242: { return this->do_toupper(__lo, __hi); } 6242: # 834 "/usr/include/c++/8/bits/locale_facets.h" 3 6242: char_type 6242: tolower(char_type __c) const 6242: { return this->do_tolower(__c); } 6242: # 851 "/usr/include/c++/8/bits/locale_facets.h" 3 6242: const char_type* 6242: tolower(char_type* __lo, const char_type* __hi) const 6242: { return this->do_tolower(__lo, __hi); } 6242: # 871 "/usr/include/c++/8/bits/locale_facets.h" 3 6242: char_type 6242: widen(char __c) const 6242: { 6242: if (_M_widen_ok) 6242: return _M_widen[static_cast(__c)]; 6242: this->_M_widen_init(); 6242: return this->do_widen(__c); 6242: } 6242: # 898 "/usr/include/c++/8/bits/locale_facets.h" 3 6242: const char* 6242: widen(const char* __lo, const char* __hi, char_type* __to) const 6242: { 6242: if (_M_widen_ok == 1) 6242: { 6242: __builtin_memcpy(__to, __lo, __hi - __lo); 6242: return __hi; 6242: } 6242: if (!_M_widen_ok) 6242: _M_widen_init(); 6242: return this->do_widen(__lo, __hi, __to); 6242: } 6242: # 929 "/usr/include/c++/8/bits/locale_facets.h" 3 6242: char 6242: narrow(char_type __c, char __dfault) const 6242: { 6242: if (_M_narrow[static_cast(__c)]) 6242: return _M_narrow[static_cast(__c)]; 6242: const char __t = do_narrow(__c, __dfault); 6242: if (__t != __dfault) 6242: _M_narrow[static_cast(__c)] = __t; 6242: return __t; 6242: } 6242: # 962 "/usr/include/c++/8/bits/locale_facets.h" 3 6242: const char_type* 6242: narrow(const char_type* __lo, const char_type* __hi, 6242: char __dfault, char* __to) const 6242: { 6242: if (__builtin_expect(_M_narrow_ok == 1, true)) 6242: { 6242: __builtin_memcpy(__to, __lo, __hi - __lo); 6242: return __hi; 6242: } 6242: if (!_M_narrow_ok) 6242: _M_narrow_init(); 6242: return this->do_narrow(__lo, __hi, __dfault, __to); 6242: } 6242: 6242: 6242: 6242: 6242: 6242: const mask* 6242: table() const throw() 6242: { return _M_table; } 6242: 6242: 6242: static const mask* 6242: classic_table() throw(); 6242: protected: 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: virtual 6242: ~ctype(); 6242: # 1011 "/usr/include/c++/8/bits/locale_facets.h" 3 6242: virtual char_type 6242: do_toupper(char_type __c) const; 6242: # 1028 "/usr/include/c++/8/bits/locale_facets.h" 3 6242: virtual const char_type* 6242: do_toupper(char_type* __lo, const char_type* __hi) const; 6242: # 1044 "/usr/include/c++/8/bits/locale_facets.h" 3 6242: virtual char_type 6242: do_tolower(char_type __c) const; 6242: # 1061 "/usr/include/c++/8/bits/locale_facets.h" 3 6242: virtual const char_type* 6242: do_tolower(char_type* __lo, const char_type* __hi) const; 6242: # 1081 "/usr/include/c++/8/bits/locale_facets.h" 3 6242: virtual char_type 6242: do_widen(char __c) const 6242: { return __c; } 6242: # 1104 "/usr/include/c++/8/bits/locale_facets.h" 3 6242: virtual const char* 6242: do_widen(const char* __lo, const char* __hi, char_type* __to) const 6242: { 6242: __builtin_memcpy(__to, __lo, __hi - __lo); 6242: return __hi; 6242: } 6242: # 1130 "/usr/include/c++/8/bits/locale_facets.h" 3 6242: virtual char 6242: do_narrow(char_type __c, char __dfault __attribute__((__unused__))) const 6242: { return __c; } 6242: # 1156 "/usr/include/c++/8/bits/locale_facets.h" 3 6242: virtual const char_type* 6242: do_narrow(const char_type* __lo, const char_type* __hi, 6242: char __dfault __attribute__((__unused__)), char* __to) const 6242: { 6242: __builtin_memcpy(__to, __lo, __hi - __lo); 6242: return __hi; 6242: } 6242: 6242: private: 6242: void _M_narrow_init() const; 6242: void _M_widen_init() const; 6242: }; 6242: # 1181 "/usr/include/c++/8/bits/locale_facets.h" 3 6242: template<> 6242: class ctype : public __ctype_abstract_base 6242: { 6242: public: 6242: 6242: 6242: typedef wchar_t char_type; 6242: typedef wctype_t __wmask_type; 6242: 6242: protected: 6242: __c_locale _M_c_locale_ctype; 6242: 6242: 6242: bool _M_narrow_ok; 6242: char _M_narrow[128]; 6242: wint_t _M_widen[1 + static_cast(-1)]; 6242: 6242: 6242: mask _M_bit[16]; 6242: __wmask_type _M_wmask[16]; 6242: 6242: public: 6242: 6242: 6242: static locale::id id; 6242: # 1214 "/usr/include/c++/8/bits/locale_facets.h" 3 6242: explicit 6242: ctype(size_t __refs = 0); 6242: # 1225 "/usr/include/c++/8/bits/locale_facets.h" 3 6242: explicit 6242: ctype(__c_locale __cloc, size_t __refs = 0); 6242: 6242: protected: 6242: __wmask_type 6242: _M_convert_to_wmask(const mask __m) const throw(); 6242: 6242: 6242: virtual 6242: ~ctype(); 6242: # 1249 "/usr/include/c++/8/bits/locale_facets.h" 3 6242: virtual bool 6242: do_is(mask __m, char_type __c) const; 6242: # 1268 "/usr/include/c++/8/bits/locale_facets.h" 3 6242: virtual const char_type* 6242: do_is(const char_type* __lo, const char_type* __hi, mask* __vec) const; 6242: # 1286 "/usr/include/c++/8/bits/locale_facets.h" 3 6242: virtual const char_type* 6242: do_scan_is(mask __m, const char_type* __lo, const char_type* __hi) const; 6242: # 1304 "/usr/include/c++/8/bits/locale_facets.h" 3 6242: virtual const char_type* 6242: do_scan_not(mask __m, const char_type* __lo, 6242: const char_type* __hi) const; 6242: # 1321 "/usr/include/c++/8/bits/locale_facets.h" 3 6242: virtual char_type 6242: do_toupper(char_type __c) const; 6242: # 1338 "/usr/include/c++/8/bits/locale_facets.h" 3 6242: virtual const char_type* 6242: do_toupper(char_type* __lo, const char_type* __hi) const; 6242: # 1354 "/usr/include/c++/8/bits/locale_facets.h" 3 6242: virtual char_type 6242: do_tolower(char_type __c) const; 6242: # 1371 "/usr/include/c++/8/bits/locale_facets.h" 3 6242: virtual const char_type* 6242: do_tolower(char_type* __lo, const char_type* __hi) const; 6242: # 1391 "/usr/include/c++/8/bits/locale_facets.h" 3 6242: virtual char_type 6242: do_widen(char __c) const; 6242: # 1413 "/usr/include/c++/8/bits/locale_facets.h" 3 6242: virtual const char* 6242: do_widen(const char* __lo, const char* __hi, char_type* __to) const; 6242: # 1436 "/usr/include/c++/8/bits/locale_facets.h" 3 6242: virtual char 6242: do_narrow(char_type __c, char __dfault) const; 6242: # 1462 "/usr/include/c++/8/bits/locale_facets.h" 3 6242: virtual const char_type* 6242: do_narrow(const char_type* __lo, const char_type* __hi, 6242: char __dfault, char* __to) const; 6242: 6242: 6242: void 6242: _M_initialize_ctype() throw(); 6242: }; 6242: 6242: 6242: 6242: template 6242: class ctype_byname : public ctype<_CharT> 6242: { 6242: public: 6242: typedef typename ctype<_CharT>::mask mask; 6242: 6242: explicit 6242: ctype_byname(const char* __s, size_t __refs = 0); 6242: 6242: 6242: explicit 6242: ctype_byname(const string& __s, size_t __refs = 0) 6242: : ctype_byname(__s.c_str(), __refs) { } 6242: 6242: 6242: protected: 6242: virtual 6242: ~ctype_byname() { } 6242: }; 6242: 6242: 6242: template<> 6242: class ctype_byname : public ctype 6242: { 6242: public: 6242: explicit 6242: ctype_byname(const char* __s, size_t __refs = 0); 6242: 6242: 6242: explicit 6242: ctype_byname(const string& __s, size_t __refs = 0); 6242: 6242: 6242: protected: 6242: virtual 6242: ~ctype_byname(); 6242: }; 6242: 6242: 6242: template<> 6242: class ctype_byname : public ctype 6242: { 6242: public: 6242: explicit 6242: ctype_byname(const char* __s, size_t __refs = 0); 6242: 6242: 6242: explicit 6242: ctype_byname(const string& __s, size_t __refs = 0); 6242: 6242: 6242: protected: 6242: virtual 6242: ~ctype_byname(); 6242: }; 6242: 6242: 6242: 6242: } 6242: 6242: 6242: # 1 "/usr/include/s390x-linux-gnu/c++/8/bits/ctype_inline.h" 1 3 6242: # 37 "/usr/include/s390x-linux-gnu/c++/8/bits/ctype_inline.h" 3 6242: namespace std __attribute__ ((__visibility__ ("default"))) 6242: { 6242: 6242: 6242: bool 6242: ctype:: 6242: is(mask __m, char __c) const 6242: { return _M_table[static_cast(__c)] & __m; } 6242: 6242: const char* 6242: ctype:: 6242: is(const char* __low, const char* __high, mask* __vec) const 6242: { 6242: while (__low < __high) 6242: *__vec++ = _M_table[static_cast(*__low++)]; 6242: return __high; 6242: } 6242: 6242: const char* 6242: ctype:: 6242: scan_is(mask __m, const char* __low, const char* __high) const 6242: { 6242: while (__low < __high 6242: && !(_M_table[static_cast(*__low)] & __m)) 6242: ++__low; 6242: return __low; 6242: } 6242: 6242: const char* 6242: ctype:: 6242: scan_not(mask __m, const char* __low, const char* __high) const 6242: { 6242: while (__low < __high 6242: && (_M_table[static_cast(*__low)] & __m) != 0) 6242: ++__low; 6242: return __low; 6242: } 6242: 6242: 6242: } 6242: # 1535 "/usr/include/c++/8/bits/locale_facets.h" 2 3 6242: 6242: namespace std __attribute__ ((__visibility__ ("default"))) 6242: { 6242: 6242: 6242: 6242: class __num_base 6242: { 6242: public: 6242: 6242: 6242: enum 6242: { 6242: _S_ominus, 6242: _S_oplus, 6242: _S_ox, 6242: _S_oX, 6242: _S_odigits, 6242: _S_odigits_end = _S_odigits + 16, 6242: _S_oudigits = _S_odigits_end, 6242: _S_oudigits_end = _S_oudigits + 16, 6242: _S_oe = _S_odigits + 14, 6242: _S_oE = _S_oudigits + 14, 6242: _S_oend = _S_oudigits_end 6242: }; 6242: 6242: 6242: 6242: 6242: 6242: 6242: static const char* _S_atoms_out; 6242: 6242: 6242: 6242: static const char* _S_atoms_in; 6242: 6242: enum 6242: { 6242: _S_iminus, 6242: _S_iplus, 6242: _S_ix, 6242: _S_iX, 6242: _S_izero, 6242: _S_ie = _S_izero + 14, 6242: _S_iE = _S_izero + 20, 6242: _S_iend = 26 6242: }; 6242: 6242: 6242: 6242: static void 6242: _S_format_float(const ios_base& __io, char* __fptr, char __mod) throw(); 6242: }; 6242: 6242: template 6242: struct __numpunct_cache : public locale::facet 6242: { 6242: const char* _M_grouping; 6242: size_t _M_grouping_size; 6242: bool _M_use_grouping; 6242: const _CharT* _M_truename; 6242: size_t _M_truename_size; 6242: const _CharT* _M_falsename; 6242: size_t _M_falsename_size; 6242: _CharT _M_decimal_point; 6242: _CharT _M_thousands_sep; 6242: 6242: 6242: 6242: 6242: 6242: _CharT _M_atoms_out[__num_base::_S_oend]; 6242: 6242: 6242: 6242: 6242: 6242: _CharT _M_atoms_in[__num_base::_S_iend]; 6242: 6242: bool _M_allocated; 6242: 6242: __numpunct_cache(size_t __refs = 0) 6242: : facet(__refs), _M_grouping(0), _M_grouping_size(0), 6242: _M_use_grouping(false), 6242: _M_truename(0), _M_truename_size(0), _M_falsename(0), 6242: _M_falsename_size(0), _M_decimal_point(_CharT()), 6242: _M_thousands_sep(_CharT()), _M_allocated(false) 6242: { } 6242: 6242: ~__numpunct_cache(); 6242: 6242: void 6242: _M_cache(const locale& __loc); 6242: 6242: private: 6242: __numpunct_cache& 6242: operator=(const __numpunct_cache&); 6242: 6242: explicit 6242: __numpunct_cache(const __numpunct_cache&); 6242: }; 6242: 6242: template 6242: __numpunct_cache<_CharT>::~__numpunct_cache() 6242: { 6242: if (_M_allocated) 6242: { 6242: delete [] _M_grouping; 6242: delete [] _M_truename; 6242: delete [] _M_falsename; 6242: } 6242: } 6242: 6242: namespace __cxx11 { 6242: # 1665 "/usr/include/c++/8/bits/locale_facets.h" 3 6242: template 6242: class numpunct : public locale::facet 6242: { 6242: public: 6242: 6242: 6242: 6242: typedef _CharT char_type; 6242: typedef basic_string<_CharT> string_type; 6242: 6242: typedef __numpunct_cache<_CharT> __cache_type; 6242: 6242: protected: 6242: __cache_type* _M_data; 6242: 6242: public: 6242: 6242: static locale::id id; 6242: 6242: 6242: 6242: 6242: 6242: 6242: explicit 6242: numpunct(size_t __refs = 0) 6242: : facet(__refs), _M_data(0) 6242: { _M_initialize_numpunct(); } 6242: # 1703 "/usr/include/c++/8/bits/locale_facets.h" 3 6242: explicit 6242: numpunct(__cache_type* __cache, size_t __refs = 0) 6242: : facet(__refs), _M_data(__cache) 6242: { _M_initialize_numpunct(); } 6242: # 1717 "/usr/include/c++/8/bits/locale_facets.h" 3 6242: explicit 6242: numpunct(__c_locale __cloc, size_t __refs = 0) 6242: : facet(__refs), _M_data(0) 6242: { _M_initialize_numpunct(__cloc); } 6242: # 1731 "/usr/include/c++/8/bits/locale_facets.h" 3 6242: char_type 6242: decimal_point() const 6242: { return this->do_decimal_point(); } 6242: # 1744 "/usr/include/c++/8/bits/locale_facets.h" 3 6242: char_type 6242: thousands_sep() const 6242: { return this->do_thousands_sep(); } 6242: # 1775 "/usr/include/c++/8/bits/locale_facets.h" 3 6242: string 6242: grouping() const 6242: { return this->do_grouping(); } 6242: # 1788 "/usr/include/c++/8/bits/locale_facets.h" 3 6242: string_type 6242: truename() const 6242: { return this->do_truename(); } 6242: # 1801 "/usr/include/c++/8/bits/locale_facets.h" 3 6242: string_type 6242: falsename() const 6242: { return this->do_falsename(); } 6242: 6242: protected: 6242: 6242: virtual 6242: ~numpunct(); 6242: # 1818 "/usr/include/c++/8/bits/locale_facets.h" 3 6242: virtual char_type 6242: do_decimal_point() const 6242: { return _M_data->_M_decimal_point; } 6242: # 1830 "/usr/include/c++/8/bits/locale_facets.h" 3 6242: virtual char_type 6242: do_thousands_sep() const 6242: { return _M_data->_M_thousands_sep; } 6242: # 1843 "/usr/include/c++/8/bits/locale_facets.h" 3 6242: virtual string 6242: do_grouping() const 6242: { return _M_data->_M_grouping; } 6242: # 1856 "/usr/include/c++/8/bits/locale_facets.h" 3 6242: virtual string_type 6242: do_truename() const 6242: { return _M_data->_M_truename; } 6242: # 1869 "/usr/include/c++/8/bits/locale_facets.h" 3 6242: virtual string_type 6242: do_falsename() const 6242: { return _M_data->_M_falsename; } 6242: 6242: 6242: void 6242: _M_initialize_numpunct(__c_locale __cloc = 0); 6242: }; 6242: 6242: template 6242: locale::id numpunct<_CharT>::id; 6242: 6242: template<> 6242: numpunct::~numpunct(); 6242: 6242: template<> 6242: void 6242: numpunct::_M_initialize_numpunct(__c_locale __cloc); 6242: 6242: 6242: template<> 6242: numpunct::~numpunct(); 6242: 6242: template<> 6242: void 6242: numpunct::_M_initialize_numpunct(__c_locale __cloc); 6242: 6242: 6242: 6242: template 6242: class numpunct_byname : public numpunct<_CharT> 6242: { 6242: public: 6242: typedef _CharT char_type; 6242: typedef basic_string<_CharT> string_type; 6242: 6242: explicit 6242: numpunct_byname(const char* __s, size_t __refs = 0) 6242: : numpunct<_CharT>(__refs) 6242: { 6242: if (__builtin_strcmp(__s, "C") != 0 6242: && __builtin_strcmp(__s, "POSIX") != 0) 6242: { 6242: __c_locale __tmp; 6242: this->_S_create_c_locale(__tmp, __s); 6242: this->_M_initialize_numpunct(__tmp); 6242: this->_S_destroy_c_locale(__tmp); 6242: } 6242: } 6242: 6242: 6242: explicit 6242: numpunct_byname(const string& __s, size_t __refs = 0) 6242: : numpunct_byname(__s.c_str(), __refs) { } 6242: 6242: 6242: protected: 6242: virtual 6242: ~numpunct_byname() { } 6242: }; 6242: 6242: } 6242: 6242: namespace __gnu_cxx_ldbl128 { 6242: # 1947 "/usr/include/c++/8/bits/locale_facets.h" 3 6242: template 6242: class num_get : public locale::facet 6242: { 6242: public: 6242: 6242: 6242: 6242: typedef _CharT char_type; 6242: typedef _InIter iter_type; 6242: 6242: 6242: 6242: static locale::id id; 6242: # 1968 "/usr/include/c++/8/bits/locale_facets.h" 3 6242: explicit 6242: num_get(size_t __refs = 0) : facet(__refs) { } 6242: # 1994 "/usr/include/c++/8/bits/locale_facets.h" 3 6242: iter_type 6242: get(iter_type __in, iter_type __end, ios_base& __io, 6242: ios_base::iostate& __err, bool& __v) const 6242: { return this->do_get(__in, __end, __io, __err, __v); } 6242: # 2031 "/usr/include/c++/8/bits/locale_facets.h" 3 6242: iter_type 6242: get(iter_type __in, iter_type __end, ios_base& __io, 6242: ios_base::iostate& __err, long& __v) const 6242: { return this->do_get(__in, __end, __io, __err, __v); } 6242: 6242: iter_type 6242: get(iter_type __in, iter_type __end, ios_base& __io, 6242: ios_base::iostate& __err, unsigned short& __v) const 6242: { return this->do_get(__in, __end, __io, __err, __v); } 6242: 6242: iter_type 6242: get(iter_type __in, iter_type __end, ios_base& __io, 6242: ios_base::iostate& __err, unsigned int& __v) const 6242: { return this->do_get(__in, __end, __io, __err, __v); } 6242: 6242: iter_type 6242: get(iter_type __in, iter_type __end, ios_base& __io, 6242: ios_base::iostate& __err, unsigned long& __v) const 6242: { return this->do_get(__in, __end, __io, __err, __v); } 6242: 6242: 6242: iter_type 6242: get(iter_type __in, iter_type __end, ios_base& __io, 6242: ios_base::iostate& __err, long long& __v) const 6242: { return this->do_get(__in, __end, __io, __err, __v); } 6242: 6242: iter_type 6242: get(iter_type __in, iter_type __end, ios_base& __io, 6242: ios_base::iostate& __err, unsigned long long& __v) const 6242: { return this->do_get(__in, __end, __io, __err, __v); } 6242: # 2091 "/usr/include/c++/8/bits/locale_facets.h" 3 6242: iter_type 6242: get(iter_type __in, iter_type __end, ios_base& __io, 6242: ios_base::iostate& __err, float& __v) const 6242: { return this->do_get(__in, __end, __io, __err, __v); } 6242: 6242: iter_type 6242: get(iter_type __in, iter_type __end, ios_base& __io, 6242: ios_base::iostate& __err, double& __v) const 6242: { return this->do_get(__in, __end, __io, __err, __v); } 6242: 6242: iter_type 6242: get(iter_type __in, iter_type __end, ios_base& __io, 6242: ios_base::iostate& __err, long double& __v) const 6242: { return this->do_get(__in, __end, __io, __err, __v); } 6242: # 2134 "/usr/include/c++/8/bits/locale_facets.h" 3 6242: iter_type 6242: get(iter_type __in, iter_type __end, ios_base& __io, 6242: ios_base::iostate& __err, void*& __v) const 6242: { return this->do_get(__in, __end, __io, __err, __v); } 6242: 6242: protected: 6242: 6242: virtual ~num_get() { } 6242: 6242: __attribute ((__abi_tag__ ("cxx11"))) 6242: iter_type 6242: _M_extract_float(iter_type, iter_type, ios_base&, ios_base::iostate&, 6242: string&) const; 6242: 6242: template 6242: __attribute ((__abi_tag__ ("cxx11"))) 6242: iter_type 6242: _M_extract_int(iter_type, iter_type, ios_base&, ios_base::iostate&, 6242: _ValueT&) const; 6242: 6242: template 6242: typename __gnu_cxx::__enable_if<__is_char<_CharT2>::__value, int>::__type 6242: _M_find(const _CharT2*, size_t __len, _CharT2 __c) const 6242: { 6242: int __ret = -1; 6242: if (__len <= 10) 6242: { 6242: if (__c >= _CharT2('0') && __c < _CharT2(_CharT2('0') + __len)) 6242: __ret = __c - _CharT2('0'); 6242: } 6242: else 6242: { 6242: if (__c >= _CharT2('0') && __c <= _CharT2('9')) 6242: __ret = __c - _CharT2('0'); 6242: else if (__c >= _CharT2('a') && __c <= _CharT2('f')) 6242: __ret = 10 + (__c - _CharT2('a')); 6242: else if (__c >= _CharT2('A') && __c <= _CharT2('F')) 6242: __ret = 10 + (__c - _CharT2('A')); 6242: } 6242: return __ret; 6242: } 6242: 6242: template 6242: typename __gnu_cxx::__enable_if::__value, 6242: int>::__type 6242: _M_find(const _CharT2* __zero, size_t __len, _CharT2 __c) const 6242: { 6242: int __ret = -1; 6242: const char_type* __q = char_traits<_CharT2>::find(__zero, __len, __c); 6242: if (__q) 6242: { 6242: __ret = __q - __zero; 6242: if (__ret > 15) 6242: __ret -= 6; 6242: } 6242: return __ret; 6242: } 6242: # 2207 "/usr/include/c++/8/bits/locale_facets.h" 3 6242: virtual iter_type 6242: do_get(iter_type, iter_type, ios_base&, ios_base::iostate&, bool&) const; 6242: 6242: virtual iter_type 6242: do_get(iter_type __beg, iter_type __end, ios_base& __io, 6242: ios_base::iostate& __err, long& __v) const 6242: { return _M_extract_int(__beg, __end, __io, __err, __v); } 6242: 6242: virtual iter_type 6242: do_get(iter_type __beg, iter_type __end, ios_base& __io, 6242: ios_base::iostate& __err, unsigned short& __v) const 6242: { return _M_extract_int(__beg, __end, __io, __err, __v); } 6242: 6242: virtual iter_type 6242: do_get(iter_type __beg, iter_type __end, ios_base& __io, 6242: ios_base::iostate& __err, unsigned int& __v) const 6242: { return _M_extract_int(__beg, __end, __io, __err, __v); } 6242: 6242: virtual iter_type 6242: do_get(iter_type __beg, iter_type __end, ios_base& __io, 6242: ios_base::iostate& __err, unsigned long& __v) const 6242: { return _M_extract_int(__beg, __end, __io, __err, __v); } 6242: 6242: 6242: virtual iter_type 6242: do_get(iter_type __beg, iter_type __end, ios_base& __io, 6242: ios_base::iostate& __err, long long& __v) const 6242: { return _M_extract_int(__beg, __end, __io, __err, __v); } 6242: 6242: virtual iter_type 6242: do_get(iter_type __beg, iter_type __end, ios_base& __io, 6242: ios_base::iostate& __err, unsigned long long& __v) const 6242: { return _M_extract_int(__beg, __end, __io, __err, __v); } 6242: 6242: 6242: virtual iter_type 6242: do_get(iter_type, iter_type, ios_base&, ios_base::iostate&, float&) const; 6242: 6242: virtual iter_type 6242: do_get(iter_type, iter_type, ios_base&, ios_base::iostate&, 6242: double&) const; 6242: 6242: 6242: 6242: virtual iter_type 6242: __do_get(iter_type, iter_type, ios_base&, ios_base::iostate&, 6242: double&) const; 6242: 6242: 6242: 6242: 6242: 6242: 6242: virtual iter_type 6242: do_get(iter_type, iter_type, ios_base&, ios_base::iostate&, void*&) const; 6242: 6242: 6242: 6242: virtual iter_type 6242: do_get(iter_type, iter_type, ios_base&, ios_base::iostate&, 6242: long double&) const; 6242: 6242: 6242: }; 6242: 6242: template 6242: locale::id num_get<_CharT, _InIter>::id; 6242: # 2288 "/usr/include/c++/8/bits/locale_facets.h" 3 6242: template 6242: class num_put : public locale::facet 6242: { 6242: public: 6242: 6242: 6242: 6242: typedef _CharT char_type; 6242: typedef _OutIter iter_type; 6242: 6242: 6242: 6242: static locale::id id; 6242: # 2309 "/usr/include/c++/8/bits/locale_facets.h" 3 6242: explicit 6242: num_put(size_t __refs = 0) : facet(__refs) { } 6242: # 2327 "/usr/include/c++/8/bits/locale_facets.h" 3 6242: iter_type 6242: put(iter_type __s, ios_base& __io, char_type __fill, bool __v) const 6242: { return this->do_put(__s, __io, __fill, __v); } 6242: # 2369 "/usr/include/c++/8/bits/locale_facets.h" 3 6242: iter_type 6242: put(iter_type __s, ios_base& __io, char_type __fill, long __v) const 6242: { return this->do_put(__s, __io, __fill, __v); } 6242: 6242: iter_type 6242: put(iter_type __s, ios_base& __io, char_type __fill, 6242: unsigned long __v) const 6242: { return this->do_put(__s, __io, __fill, __v); } 6242: 6242: 6242: iter_type 6242: put(iter_type __s, ios_base& __io, char_type __fill, long long __v) const 6242: { return this->do_put(__s, __io, __fill, __v); } 6242: 6242: iter_type 6242: put(iter_type __s, ios_base& __io, char_type __fill, 6242: unsigned long long __v) const 6242: { return this->do_put(__s, __io, __fill, __v); } 6242: # 2432 "/usr/include/c++/8/bits/locale_facets.h" 3 6242: iter_type 6242: put(iter_type __s, ios_base& __io, char_type __fill, double __v) const 6242: { return this->do_put(__s, __io, __fill, __v); } 6242: 6242: iter_type 6242: put(iter_type __s, ios_base& __io, char_type __fill, 6242: long double __v) const 6242: { return this->do_put(__s, __io, __fill, __v); } 6242: # 2457 "/usr/include/c++/8/bits/locale_facets.h" 3 6242: iter_type 6242: put(iter_type __s, ios_base& __io, char_type __fill, 6242: const void* __v) const 6242: { return this->do_put(__s, __io, __fill, __v); } 6242: 6242: protected: 6242: template 6242: iter_type 6242: _M_insert_float(iter_type, ios_base& __io, char_type __fill, 6242: char __mod, _ValueT __v) const; 6242: 6242: void 6242: _M_group_float(const char* __grouping, size_t __grouping_size, 6242: char_type __sep, const char_type* __p, char_type* __new, 6242: char_type* __cs, int& __len) const; 6242: 6242: template 6242: iter_type 6242: _M_insert_int(iter_type, ios_base& __io, char_type __fill, 6242: _ValueT __v) const; 6242: 6242: void 6242: _M_group_int(const char* __grouping, size_t __grouping_size, 6242: char_type __sep, ios_base& __io, char_type* __new, 6242: char_type* __cs, int& __len) const; 6242: 6242: void 6242: _M_pad(char_type __fill, streamsize __w, ios_base& __io, 6242: char_type* __new, const char_type* __cs, int& __len) const; 6242: 6242: 6242: virtual 6242: ~num_put() { } 6242: # 2505 "/usr/include/c++/8/bits/locale_facets.h" 3 6242: virtual iter_type 6242: do_put(iter_type __s, ios_base& __io, char_type __fill, bool __v) const; 6242: 6242: virtual iter_type 6242: do_put(iter_type __s, ios_base& __io, char_type __fill, long __v) const 6242: { return _M_insert_int(__s, __io, __fill, __v); } 6242: 6242: virtual iter_type 6242: do_put(iter_type __s, ios_base& __io, char_type __fill, 6242: unsigned long __v) const 6242: { return _M_insert_int(__s, __io, __fill, __v); } 6242: 6242: 6242: virtual iter_type 6242: do_put(iter_type __s, ios_base& __io, char_type __fill, 6242: long long __v) const 6242: { return _M_insert_int(__s, __io, __fill, __v); } 6242: 6242: virtual iter_type 6242: do_put(iter_type __s, ios_base& __io, char_type __fill, 6242: unsigned long long __v) const 6242: { return _M_insert_int(__s, __io, __fill, __v); } 6242: 6242: 6242: virtual iter_type 6242: do_put(iter_type, ios_base&, char_type, double) const; 6242: 6242: 6242: 6242: virtual iter_type 6242: __do_put(iter_type, ios_base&, char_type, double) const; 6242: 6242: 6242: 6242: 6242: 6242: virtual iter_type 6242: do_put(iter_type, ios_base&, char_type, const void*) const; 6242: 6242: 6242: 6242: virtual iter_type 6242: do_put(iter_type, ios_base&, char_type, long double) const; 6242: 6242: 6242: }; 6242: 6242: template 6242: locale::id num_put<_CharT, _OutIter>::id; 6242: 6242: } 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: template 6242: inline bool 6242: isspace(_CharT __c, const locale& __loc) 6242: { return use_facet >(__loc).is(ctype_base::space, __c); } 6242: 6242: 6242: template 6242: inline bool 6242: isprint(_CharT __c, const locale& __loc) 6242: { return use_facet >(__loc).is(ctype_base::print, __c); } 6242: 6242: 6242: template 6242: inline bool 6242: iscntrl(_CharT __c, const locale& __loc) 6242: { return use_facet >(__loc).is(ctype_base::cntrl, __c); } 6242: 6242: 6242: template 6242: inline bool 6242: isupper(_CharT __c, const locale& __loc) 6242: { return use_facet >(__loc).is(ctype_base::upper, __c); } 6242: 6242: 6242: template 6242: inline bool 6242: islower(_CharT __c, const locale& __loc) 6242: { return use_facet >(__loc).is(ctype_base::lower, __c); } 6242: 6242: 6242: template 6242: inline bool 6242: isalpha(_CharT __c, const locale& __loc) 6242: { return use_facet >(__loc).is(ctype_base::alpha, __c); } 6242: 6242: 6242: template 6242: inline bool 6242: isdigit(_CharT __c, const locale& __loc) 6242: { return use_facet >(__loc).is(ctype_base::digit, __c); } 6242: 6242: 6242: template 6242: inline bool 6242: ispunct(_CharT __c, const locale& __loc) 6242: { return use_facet >(__loc).is(ctype_base::punct, __c); } 6242: 6242: 6242: template 6242: inline bool 6242: isxdigit(_CharT __c, const locale& __loc) 6242: { return use_facet >(__loc).is(ctype_base::xdigit, __c); } 6242: 6242: 6242: template 6242: inline bool 6242: isalnum(_CharT __c, const locale& __loc) 6242: { return use_facet >(__loc).is(ctype_base::alnum, __c); } 6242: 6242: 6242: template 6242: inline bool 6242: isgraph(_CharT __c, const locale& __loc) 6242: { return use_facet >(__loc).is(ctype_base::graph, __c); } 6242: 6242: 6242: 6242: template 6242: inline bool 6242: isblank(_CharT __c, const locale& __loc) 6242: { return use_facet >(__loc).is(ctype_base::blank, __c); } 6242: 6242: 6242: 6242: template 6242: inline _CharT 6242: toupper(_CharT __c, const locale& __loc) 6242: { return use_facet >(__loc).toupper(__c); } 6242: 6242: 6242: template 6242: inline _CharT 6242: tolower(_CharT __c, const locale& __loc) 6242: { return use_facet >(__loc).tolower(__c); } 6242: 6242: 6242: } 6242: 6242: # 1 "/usr/include/c++/8/bits/locale_facets.tcc" 1 3 6242: # 33 "/usr/include/c++/8/bits/locale_facets.tcc" 3 6242: 6242: # 34 "/usr/include/c++/8/bits/locale_facets.tcc" 3 6242: 6242: namespace std __attribute__ ((__visibility__ ("default"))) 6242: { 6242: 6242: 6242: 6242: 6242: template 6242: struct __use_cache 6242: { 6242: const _Facet* 6242: operator() (const locale& __loc) const; 6242: }; 6242: 6242: 6242: template 6242: struct __use_cache<__numpunct_cache<_CharT> > 6242: { 6242: const __numpunct_cache<_CharT>* 6242: operator() (const locale& __loc) const 6242: { 6242: const size_t __i = numpunct<_CharT>::id._M_id(); 6242: const locale::facet** __caches = __loc._M_impl->_M_caches; 6242: if (!__caches[__i]) 6242: { 6242: __numpunct_cache<_CharT>* __tmp = 0; 6242: try 6242: { 6242: __tmp = new __numpunct_cache<_CharT>; 6242: __tmp->_M_cache(__loc); 6242: } 6242: catch(...) 6242: { 6242: delete __tmp; 6242: throw; 6242: } 6242: __loc._M_impl->_M_install_cache(__tmp, __i); 6242: } 6242: return static_cast*>(__caches[__i]); 6242: } 6242: }; 6242: 6242: template 6242: void 6242: __numpunct_cache<_CharT>::_M_cache(const locale& __loc) 6242: { 6242: const numpunct<_CharT>& __np = use_facet >(__loc); 6242: 6242: char* __grouping = 0; 6242: _CharT* __truename = 0; 6242: _CharT* __falsename = 0; 6242: try 6242: { 6242: const string& __g = __np.grouping(); 6242: _M_grouping_size = __g.size(); 6242: __grouping = new char[_M_grouping_size]; 6242: __g.copy(__grouping, _M_grouping_size); 6242: _M_use_grouping = (_M_grouping_size 6242: && static_cast(__grouping[0]) > 0 6242: && (__grouping[0] 6242: != __gnu_cxx::__numeric_traits::__max)); 6242: 6242: const basic_string<_CharT>& __tn = __np.truename(); 6242: _M_truename_size = __tn.size(); 6242: __truename = new _CharT[_M_truename_size]; 6242: __tn.copy(__truename, _M_truename_size); 6242: 6242: const basic_string<_CharT>& __fn = __np.falsename(); 6242: _M_falsename_size = __fn.size(); 6242: __falsename = new _CharT[_M_falsename_size]; 6242: __fn.copy(__falsename, _M_falsename_size); 6242: 6242: _M_decimal_point = __np.decimal_point(); 6242: _M_thousands_sep = __np.thousands_sep(); 6242: 6242: const ctype<_CharT>& __ct = use_facet >(__loc); 6242: __ct.widen(__num_base::_S_atoms_out, 6242: __num_base::_S_atoms_out 6242: + __num_base::_S_oend, _M_atoms_out); 6242: __ct.widen(__num_base::_S_atoms_in, 6242: __num_base::_S_atoms_in 6242: + __num_base::_S_iend, _M_atoms_in); 6242: 6242: _M_grouping = __grouping; 6242: _M_truename = __truename; 6242: _M_falsename = __falsename; 6242: _M_allocated = true; 6242: } 6242: catch(...) 6242: { 6242: delete [] __grouping; 6242: delete [] __truename; 6242: delete [] __falsename; 6242: throw; 6242: } 6242: } 6242: # 139 "/usr/include/c++/8/bits/locale_facets.tcc" 3 6242: __attribute__ ((__pure__)) bool 6242: __verify_grouping(const char* __grouping, size_t __grouping_size, 6242: const string& __grouping_tmp) throw (); 6242: 6242: namespace __gnu_cxx_ldbl128 { 6242: 6242: template 6242: __attribute ((__abi_tag__ ("cxx11"))) 6242: _InIter 6242: num_get<_CharT, _InIter>:: 6242: _M_extract_float(_InIter __beg, _InIter __end, ios_base& __io, 6242: ios_base::iostate& __err, string& __xtrc) const 6242: { 6242: typedef char_traits<_CharT> __traits_type; 6242: typedef __numpunct_cache<_CharT> __cache_type; 6242: __use_cache<__cache_type> __uc; 6242: const locale& __loc = __io._M_getloc(); 6242: const __cache_type* __lc = __uc(__loc); 6242: const _CharT* __lit = __lc->_M_atoms_in; 6242: char_type __c = char_type(); 6242: 6242: 6242: bool __testeof = __beg == __end; 6242: 6242: 6242: if (!__testeof) 6242: { 6242: __c = *__beg; 6242: const bool __plus = __c == __lit[__num_base::_S_iplus]; 6242: if ((__plus || __c == __lit[__num_base::_S_iminus]) 6242: && !(__lc->_M_use_grouping && __c == __lc->_M_thousands_sep) 6242: && !(__c == __lc->_M_decimal_point)) 6242: { 6242: __xtrc += __plus ? '+' : '-'; 6242: if (++__beg != __end) 6242: __c = *__beg; 6242: else 6242: __testeof = true; 6242: } 6242: } 6242: 6242: 6242: bool __found_mantissa = false; 6242: int __sep_pos = 0; 6242: while (!__testeof) 6242: { 6242: if ((__lc->_M_use_grouping && __c == __lc->_M_thousands_sep) 6242: || __c == __lc->_M_decimal_point) 6242: break; 6242: else if (__c == __lit[__num_base::_S_izero]) 6242: { 6242: if (!__found_mantissa) 6242: { 6242: __xtrc += '0'; 6242: __found_mantissa = true; 6242: } 6242: ++__sep_pos; 6242: 6242: if (++__beg != __end) 6242: __c = *__beg; 6242: else 6242: __testeof = true; 6242: } 6242: else 6242: break; 6242: } 6242: 6242: 6242: bool __found_dec = false; 6242: bool __found_sci = false; 6242: string __found_grouping; 6242: if (__lc->_M_use_grouping) 6242: __found_grouping.reserve(32); 6242: const char_type* __lit_zero = __lit + __num_base::_S_izero; 6242: 6242: if (!__lc->_M_allocated) 6242: 6242: while (!__testeof) 6242: { 6242: const int __digit = _M_find(__lit_zero, 10, __c); 6242: if (__digit != -1) 6242: { 6242: __xtrc += '0' + __digit; 6242: __found_mantissa = true; 6242: } 6242: else if (__c == __lc->_M_decimal_point 6242: && !__found_dec && !__found_sci) 6242: { 6242: __xtrc += '.'; 6242: __found_dec = true; 6242: } 6242: else if ((__c == __lit[__num_base::_S_ie] 6242: || __c == __lit[__num_base::_S_iE]) 6242: && !__found_sci && __found_mantissa) 6242: { 6242: 6242: __xtrc += 'e'; 6242: __found_sci = true; 6242: 6242: 6242: if (++__beg != __end) 6242: { 6242: __c = *__beg; 6242: const bool __plus = __c == __lit[__num_base::_S_iplus]; 6242: if (__plus || __c == __lit[__num_base::_S_iminus]) 6242: __xtrc += __plus ? '+' : '-'; 6242: else 6242: continue; 6242: } 6242: else 6242: { 6242: __testeof = true; 6242: break; 6242: } 6242: } 6242: else 6242: break; 6242: 6242: if (++__beg != __end) 6242: __c = *__beg; 6242: else 6242: __testeof = true; 6242: } 6242: else 6242: while (!__testeof) 6242: { 6242: 6242: 6242: if (__lc->_M_use_grouping && __c == __lc->_M_thousands_sep) 6242: { 6242: if (!__found_dec && !__found_sci) 6242: { 6242: 6242: 6242: if (__sep_pos) 6242: { 6242: __found_grouping += static_cast(__sep_pos); 6242: __sep_pos = 0; 6242: } 6242: else 6242: { 6242: 6242: 6242: __xtrc.clear(); 6242: break; 6242: } 6242: } 6242: else 6242: break; 6242: } 6242: else if (__c == __lc->_M_decimal_point) 6242: { 6242: if (!__found_dec && !__found_sci) 6242: { 6242: 6242: 6242: 6242: if (__found_grouping.size()) 6242: __found_grouping += static_cast(__sep_pos); 6242: __xtrc += '.'; 6242: __found_dec = true; 6242: } 6242: else 6242: break; 6242: } 6242: else 6242: { 6242: const char_type* __q = 6242: __traits_type::find(__lit_zero, 10, __c); 6242: if (__q) 6242: { 6242: __xtrc += '0' + (__q - __lit_zero); 6242: __found_mantissa = true; 6242: ++__sep_pos; 6242: } 6242: else if ((__c == __lit[__num_base::_S_ie] 6242: || __c == __lit[__num_base::_S_iE]) 6242: && !__found_sci && __found_mantissa) 6242: { 6242: 6242: if (__found_grouping.size() && !__found_dec) 6242: __found_grouping += static_cast(__sep_pos); 6242: __xtrc += 'e'; 6242: __found_sci = true; 6242: 6242: 6242: if (++__beg != __end) 6242: { 6242: __c = *__beg; 6242: const bool __plus = __c == __lit[__num_base::_S_iplus]; 6242: if ((__plus || __c == __lit[__num_base::_S_iminus]) 6242: && !(__lc->_M_use_grouping 6242: && __c == __lc->_M_thousands_sep) 6242: && !(__c == __lc->_M_decimal_point)) 6242: __xtrc += __plus ? '+' : '-'; 6242: else 6242: continue; 6242: } 6242: else 6242: { 6242: __testeof = true; 6242: break; 6242: } 6242: } 6242: else 6242: break; 6242: } 6242: 6242: if (++__beg != __end) 6242: __c = *__beg; 6242: else 6242: __testeof = true; 6242: } 6242: 6242: 6242: 6242: if (__found_grouping.size()) 6242: { 6242: 6242: if (!__found_dec && !__found_sci) 6242: __found_grouping += static_cast(__sep_pos); 6242: 6242: if (!std::__verify_grouping(__lc->_M_grouping, 6242: __lc->_M_grouping_size, 6242: __found_grouping)) 6242: __err = ios_base::failbit; 6242: } 6242: 6242: return __beg; 6242: } 6242: 6242: template 6242: template 6242: __attribute ((__abi_tag__ ("cxx11"))) 6242: _InIter 6242: num_get<_CharT, _InIter>:: 6242: _M_extract_int(_InIter __beg, _InIter __end, ios_base& __io, 6242: ios_base::iostate& __err, _ValueT& __v) const 6242: { 6242: typedef char_traits<_CharT> __traits_type; 6242: using __gnu_cxx::__add_unsigned; 6242: typedef typename __add_unsigned<_ValueT>::__type __unsigned_type; 6242: typedef __numpunct_cache<_CharT> __cache_type; 6242: __use_cache<__cache_type> __uc; 6242: const locale& __loc = __io._M_getloc(); 6242: const __cache_type* __lc = __uc(__loc); 6242: const _CharT* __lit = __lc->_M_atoms_in; 6242: char_type __c = char_type(); 6242: 6242: 6242: const ios_base::fmtflags __basefield = __io.flags() 6242: & ios_base::basefield; 6242: const bool __oct = __basefield == ios_base::oct; 6242: int __base = __oct ? 8 : (__basefield == ios_base::hex ? 16 : 10); 6242: 6242: 6242: bool __testeof = __beg == __end; 6242: 6242: 6242: bool __negative = false; 6242: if (!__testeof) 6242: { 6242: __c = *__beg; 6242: __negative = __c == __lit[__num_base::_S_iminus]; 6242: if ((__negative || __c == __lit[__num_base::_S_iplus]) 6242: && !(__lc->_M_use_grouping && __c == __lc->_M_thousands_sep) 6242: && !(__c == __lc->_M_decimal_point)) 6242: { 6242: if (++__beg != __end) 6242: __c = *__beg; 6242: else 6242: __testeof = true; 6242: } 6242: } 6242: 6242: 6242: 6242: bool __found_zero = false; 6242: int __sep_pos = 0; 6242: while (!__testeof) 6242: { 6242: if ((__lc->_M_use_grouping && __c == __lc->_M_thousands_sep) 6242: || __c == __lc->_M_decimal_point) 6242: break; 6242: else if (__c == __lit[__num_base::_S_izero] 6242: && (!__found_zero || __base == 10)) 6242: { 6242: __found_zero = true; 6242: ++__sep_pos; 6242: if (__basefield == 0) 6242: __base = 8; 6242: if (__base == 8) 6242: __sep_pos = 0; 6242: } 6242: else if (__found_zero 6242: && (__c == __lit[__num_base::_S_ix] 6242: || __c == __lit[__num_base::_S_iX])) 6242: { 6242: if (__basefield == 0) 6242: __base = 16; 6242: if (__base == 16) 6242: { 6242: __found_zero = false; 6242: __sep_pos = 0; 6242: } 6242: else 6242: break; 6242: } 6242: else 6242: break; 6242: 6242: if (++__beg != __end) 6242: { 6242: __c = *__beg; 6242: if (!__found_zero) 6242: break; 6242: } 6242: else 6242: __testeof = true; 6242: } 6242: 6242: 6242: 6242: const size_t __len = (__base == 16 ? __num_base::_S_iend 6242: - __num_base::_S_izero : __base); 6242: 6242: 6242: typedef __gnu_cxx::__numeric_traits<_ValueT> __num_traits; 6242: string __found_grouping; 6242: if (__lc->_M_use_grouping) 6242: __found_grouping.reserve(32); 6242: bool __testfail = false; 6242: bool __testoverflow = false; 6242: const __unsigned_type __max = 6242: (__negative && __num_traits::__is_signed) 6242: ? -static_cast<__unsigned_type>(__num_traits::__min) 6242: : __num_traits::__max; 6242: const __unsigned_type __smax = __max / __base; 6242: __unsigned_type __result = 0; 6242: int __digit = 0; 6242: const char_type* __lit_zero = __lit + __num_base::_S_izero; 6242: 6242: if (!__lc->_M_allocated) 6242: 6242: while (!__testeof) 6242: { 6242: __digit = _M_find(__lit_zero, __len, __c); 6242: if (__digit == -1) 6242: break; 6242: 6242: if (__result > __smax) 6242: __testoverflow = true; 6242: else 6242: { 6242: __result *= __base; 6242: __testoverflow |= __result > __max - __digit; 6242: __result += __digit; 6242: ++__sep_pos; 6242: } 6242: 6242: if (++__beg != __end) 6242: __c = *__beg; 6242: else 6242: __testeof = true; 6242: } 6242: else 6242: while (!__testeof) 6242: { 6242: 6242: 6242: if (__lc->_M_use_grouping && __c == __lc->_M_thousands_sep) 6242: { 6242: 6242: 6242: if (__sep_pos) 6242: { 6242: __found_grouping += static_cast(__sep_pos); 6242: __sep_pos = 0; 6242: } 6242: else 6242: { 6242: __testfail = true; 6242: break; 6242: } 6242: } 6242: else if (__c == __lc->_M_decimal_point) 6242: break; 6242: else 6242: { 6242: const char_type* __q = 6242: __traits_type::find(__lit_zero, __len, __c); 6242: if (!__q) 6242: break; 6242: 6242: __digit = __q - __lit_zero; 6242: if (__digit > 15) 6242: __digit -= 6; 6242: if (__result > __smax) 6242: __testoverflow = true; 6242: else 6242: { 6242: __result *= __base; 6242: __testoverflow |= __result > __max - __digit; 6242: __result += __digit; 6242: ++__sep_pos; 6242: } 6242: } 6242: 6242: if (++__beg != __end) 6242: __c = *__beg; 6242: else 6242: __testeof = true; 6242: } 6242: 6242: 6242: 6242: if (__found_grouping.size()) 6242: { 6242: 6242: __found_grouping += static_cast(__sep_pos); 6242: 6242: if (!std::__verify_grouping(__lc->_M_grouping, 6242: __lc->_M_grouping_size, 6242: __found_grouping)) 6242: __err = ios_base::failbit; 6242: } 6242: 6242: 6242: 6242: if ((!__sep_pos && !__found_zero && !__found_grouping.size()) 6242: || __testfail) 6242: { 6242: __v = 0; 6242: __err = ios_base::failbit; 6242: } 6242: else if (__testoverflow) 6242: { 6242: if (__negative && __num_traits::__is_signed) 6242: __v = __num_traits::__min; 6242: else 6242: __v = __num_traits::__max; 6242: __err = ios_base::failbit; 6242: } 6242: else 6242: __v = __negative ? -__result : __result; 6242: 6242: if (__testeof) 6242: __err |= ios_base::eofbit; 6242: return __beg; 6242: } 6242: 6242: 6242: 6242: template 6242: _InIter 6242: num_get<_CharT, _InIter>:: 6242: do_get(iter_type __beg, iter_type __end, ios_base& __io, 6242: ios_base::iostate& __err, bool& __v) const 6242: { 6242: if (!(__io.flags() & ios_base::boolalpha)) 6242: { 6242: 6242: 6242: 6242: long __l = -1; 6242: __beg = _M_extract_int(__beg, __end, __io, __err, __l); 6242: if (__l == 0 || __l == 1) 6242: __v = bool(__l); 6242: else 6242: { 6242: 6242: 6242: __v = true; 6242: __err = ios_base::failbit; 6242: if (__beg == __end) 6242: __err |= ios_base::eofbit; 6242: } 6242: } 6242: else 6242: { 6242: 6242: typedef __numpunct_cache<_CharT> __cache_type; 6242: __use_cache<__cache_type> __uc; 6242: const locale& __loc = __io._M_getloc(); 6242: const __cache_type* __lc = __uc(__loc); 6242: 6242: bool __testf = true; 6242: bool __testt = true; 6242: bool __donef = __lc->_M_falsename_size == 0; 6242: bool __donet = __lc->_M_truename_size == 0; 6242: bool __testeof = false; 6242: size_t __n = 0; 6242: while (!__donef || !__donet) 6242: { 6242: if (__beg == __end) 6242: { 6242: __testeof = true; 6242: break; 6242: } 6242: 6242: const char_type __c = *__beg; 6242: 6242: if (!__donef) 6242: __testf = __c == __lc->_M_falsename[__n]; 6242: 6242: if (!__testf && __donet) 6242: break; 6242: 6242: if (!__donet) 6242: __testt = __c == __lc->_M_truename[__n]; 6242: 6242: if (!__testt && __donef) 6242: break; 6242: 6242: if (!__testt && !__testf) 6242: break; 6242: 6242: ++__n; 6242: ++__beg; 6242: 6242: __donef = !__testf || __n >= __lc->_M_falsename_size; 6242: __donet = !__testt || __n >= __lc->_M_truename_size; 6242: } 6242: if (__testf && __n == __lc->_M_falsename_size && __n) 6242: { 6242: __v = false; 6242: if (__testt && __n == __lc->_M_truename_size) 6242: __err = ios_base::failbit; 6242: else 6242: __err = __testeof ? ios_base::eofbit : ios_base::goodbit; 6242: } 6242: else if (__testt && __n == __lc->_M_truename_size && __n) 6242: { 6242: __v = true; 6242: __err = __testeof ? ios_base::eofbit : ios_base::goodbit; 6242: } 6242: else 6242: { 6242: 6242: 6242: __v = false; 6242: __err = ios_base::failbit; 6242: if (__testeof) 6242: __err |= ios_base::eofbit; 6242: } 6242: } 6242: return __beg; 6242: } 6242: 6242: template 6242: _InIter 6242: num_get<_CharT, _InIter>:: 6242: do_get(iter_type __beg, iter_type __end, ios_base& __io, 6242: ios_base::iostate& __err, float& __v) const 6242: { 6242: string __xtrc; 6242: __xtrc.reserve(32); 6242: __beg = _M_extract_float(__beg, __end, __io, __err, __xtrc); 6242: std::__convert_to_v(__xtrc.c_str(), __v, __err, _S_get_c_locale()); 6242: if (__beg == __end) 6242: __err |= ios_base::eofbit; 6242: return __beg; 6242: } 6242: 6242: template 6242: _InIter 6242: num_get<_CharT, _InIter>:: 6242: do_get(iter_type __beg, iter_type __end, ios_base& __io, 6242: ios_base::iostate& __err, double& __v) const 6242: { 6242: string __xtrc; 6242: __xtrc.reserve(32); 6242: __beg = _M_extract_float(__beg, __end, __io, __err, __xtrc); 6242: std::__convert_to_v(__xtrc.c_str(), __v, __err, _S_get_c_locale()); 6242: if (__beg == __end) 6242: __err |= ios_base::eofbit; 6242: return __beg; 6242: } 6242: 6242: 6242: template 6242: _InIter 6242: num_get<_CharT, _InIter>:: 6242: __do_get(iter_type __beg, iter_type __end, ios_base& __io, 6242: ios_base::iostate& __err, double& __v) const 6242: { 6242: string __xtrc; 6242: __xtrc.reserve(32); 6242: __beg = _M_extract_float(__beg, __end, __io, __err, __xtrc); 6242: std::__convert_to_v(__xtrc.c_str(), __v, __err, _S_get_c_locale()); 6242: if (__beg == __end) 6242: __err |= ios_base::eofbit; 6242: return __beg; 6242: } 6242: 6242: 6242: template 6242: _InIter 6242: num_get<_CharT, _InIter>:: 6242: do_get(iter_type __beg, iter_type __end, ios_base& __io, 6242: ios_base::iostate& __err, long double& __v) const 6242: { 6242: string __xtrc; 6242: __xtrc.reserve(32); 6242: __beg = _M_extract_float(__beg, __end, __io, __err, __xtrc); 6242: std::__convert_to_v(__xtrc.c_str(), __v, __err, _S_get_c_locale()); 6242: if (__beg == __end) 6242: __err |= ios_base::eofbit; 6242: return __beg; 6242: } 6242: 6242: template 6242: _InIter 6242: num_get<_CharT, _InIter>:: 6242: do_get(iter_type __beg, iter_type __end, ios_base& __io, 6242: ios_base::iostate& __err, void*& __v) const 6242: { 6242: 6242: typedef ios_base::fmtflags fmtflags; 6242: const fmtflags __fmt = __io.flags(); 6242: __io.flags((__fmt & ~ios_base::basefield) | ios_base::hex); 6242: 6242: typedef __gnu_cxx::__conditional_type<(sizeof(void*) 6242: <= sizeof(unsigned long)), 6242: unsigned long, unsigned long long>::__type _UIntPtrType; 6242: 6242: _UIntPtrType __ul; 6242: __beg = _M_extract_int(__beg, __end, __io, __err, __ul); 6242: 6242: 6242: __io.flags(__fmt); 6242: 6242: __v = reinterpret_cast(__ul); 6242: return __beg; 6242: } 6242: 6242: 6242: 6242: template 6242: void 6242: num_put<_CharT, _OutIter>:: 6242: _M_pad(_CharT __fill, streamsize __w, ios_base& __io, 6242: _CharT* __new, const _CharT* __cs, int& __len) const 6242: { 6242: 6242: 6242: __pad<_CharT, char_traits<_CharT> >::_S_pad(__io, __fill, __new, 6242: __cs, __w, __len); 6242: __len = static_cast(__w); 6242: } 6242: 6242: } 6242: 6242: template 6242: int 6242: __int_to_char(_CharT* __bufend, _ValueT __v, const _CharT* __lit, 6242: ios_base::fmtflags __flags, bool __dec) 6242: { 6242: _CharT* __buf = __bufend; 6242: if (__builtin_expect(__dec, true)) 6242: { 6242: 6242: do 6242: { 6242: *--__buf = __lit[(__v % 10) + __num_base::_S_odigits]; 6242: __v /= 10; 6242: } 6242: while (__v != 0); 6242: } 6242: else if ((__flags & ios_base::basefield) == ios_base::oct) 6242: { 6242: 6242: do 6242: { 6242: *--__buf = __lit[(__v & 0x7) + __num_base::_S_odigits]; 6242: __v >>= 3; 6242: } 6242: while (__v != 0); 6242: } 6242: else 6242: { 6242: 6242: const bool __uppercase = __flags & ios_base::uppercase; 6242: const int __case_offset = __uppercase ? __num_base::_S_oudigits 6242: : __num_base::_S_odigits; 6242: do 6242: { 6242: *--__buf = __lit[(__v & 0xf) + __case_offset]; 6242: __v >>= 4; 6242: } 6242: while (__v != 0); 6242: } 6242: return __bufend - __buf; 6242: } 6242: 6242: namespace __gnu_cxx_ldbl128 { 6242: 6242: template 6242: void 6242: num_put<_CharT, _OutIter>:: 6242: _M_group_int(const char* __grouping, size_t __grouping_size, _CharT __sep, 6242: ios_base&, _CharT* __new, _CharT* __cs, int& __len) const 6242: { 6242: _CharT* __p = std::__add_grouping(__new, __sep, __grouping, 6242: __grouping_size, __cs, __cs + __len); 6242: __len = __p - __new; 6242: } 6242: 6242: template 6242: template 6242: _OutIter 6242: num_put<_CharT, _OutIter>:: 6242: _M_insert_int(_OutIter __s, ios_base& __io, _CharT __fill, 6242: _ValueT __v) const 6242: { 6242: using __gnu_cxx::__add_unsigned; 6242: typedef typename __add_unsigned<_ValueT>::__type __unsigned_type; 6242: typedef __numpunct_cache<_CharT> __cache_type; 6242: __use_cache<__cache_type> __uc; 6242: const locale& __loc = __io._M_getloc(); 6242: const __cache_type* __lc = __uc(__loc); 6242: const _CharT* __lit = __lc->_M_atoms_out; 6242: const ios_base::fmtflags __flags = __io.flags(); 6242: 6242: 6242: const int __ilen = 5 * sizeof(_ValueT); 6242: _CharT* __cs = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT) 6242: * __ilen)); 6242: 6242: 6242: 6242: const ios_base::fmtflags __basefield = __flags & ios_base::basefield; 6242: const bool __dec = (__basefield != ios_base::oct 6242: && __basefield != ios_base::hex); 6242: const __unsigned_type __u = ((__v > 0 || !__dec) 6242: ? __unsigned_type(__v) 6242: : -__unsigned_type(__v)); 6242: int __len = __int_to_char(__cs + __ilen, __u, __lit, __flags, __dec); 6242: __cs += __ilen - __len; 6242: 6242: 6242: if (__lc->_M_use_grouping) 6242: { 6242: 6242: 6242: _CharT* __cs2 = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT) 6242: * (__len + 1) 6242: * 2)); 6242: _M_group_int(__lc->_M_grouping, __lc->_M_grouping_size, 6242: __lc->_M_thousands_sep, __io, __cs2 + 2, __cs, __len); 6242: __cs = __cs2 + 2; 6242: } 6242: 6242: 6242: if (__builtin_expect(__dec, true)) 6242: { 6242: 6242: if (__v >= 0) 6242: { 6242: if (bool(__flags & ios_base::showpos) 6242: && __gnu_cxx::__numeric_traits<_ValueT>::__is_signed) 6242: *--__cs = __lit[__num_base::_S_oplus], ++__len; 6242: } 6242: else 6242: *--__cs = __lit[__num_base::_S_ominus], ++__len; 6242: } 6242: else if (bool(__flags & ios_base::showbase) && __v) 6242: { 6242: if (__basefield == ios_base::oct) 6242: *--__cs = __lit[__num_base::_S_odigits], ++__len; 6242: else 6242: { 6242: 6242: const bool __uppercase = __flags & ios_base::uppercase; 6242: *--__cs = __lit[__num_base::_S_ox + __uppercase]; 6242: 6242: *--__cs = __lit[__num_base::_S_odigits]; 6242: __len += 2; 6242: } 6242: } 6242: 6242: 6242: const streamsize __w = __io.width(); 6242: if (__w > static_cast(__len)) 6242: { 6242: _CharT* __cs3 = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT) 6242: * __w)); 6242: _M_pad(__fill, __w, __io, __cs3, __cs, __len); 6242: __cs = __cs3; 6242: } 6242: __io.width(0); 6242: 6242: 6242: 6242: return std::__write(__s, __cs, __len); 6242: } 6242: 6242: template 6242: void 6242: num_put<_CharT, _OutIter>:: 6242: _M_group_float(const char* __grouping, size_t __grouping_size, 6242: _CharT __sep, const _CharT* __p, _CharT* __new, 6242: _CharT* __cs, int& __len) const 6242: { 6242: 6242: 6242: 6242: const int __declen = __p ? __p - __cs : __len; 6242: _CharT* __p2 = std::__add_grouping(__new, __sep, __grouping, 6242: __grouping_size, 6242: __cs, __cs + __declen); 6242: 6242: 6242: int __newlen = __p2 - __new; 6242: if (__p) 6242: { 6242: char_traits<_CharT>::copy(__p2, __p, __len - __declen); 6242: __newlen += __len - __declen; 6242: } 6242: __len = __newlen; 6242: } 6242: # 971 "/usr/include/c++/8/bits/locale_facets.tcc" 3 6242: template 6242: template 6242: _OutIter 6242: num_put<_CharT, _OutIter>:: 6242: _M_insert_float(_OutIter __s, ios_base& __io, _CharT __fill, char __mod, 6242: _ValueT __v) const 6242: { 6242: typedef __numpunct_cache<_CharT> __cache_type; 6242: __use_cache<__cache_type> __uc; 6242: const locale& __loc = __io._M_getloc(); 6242: const __cache_type* __lc = __uc(__loc); 6242: 6242: 6242: const streamsize __prec = __io.precision() < 0 ? 6 : __io.precision(); 6242: 6242: const int __max_digits = 6242: __gnu_cxx::__numeric_traits<_ValueT>::__digits10; 6242: 6242: 6242: int __len; 6242: 6242: char __fbuf[16]; 6242: __num_base::_S_format_float(__io, __fbuf, __mod); 6242: 6242: 6242: 6242: const bool __use_prec = 6242: (__io.flags() & ios_base::floatfield) != ios_base::floatfield; 6242: 6242: 6242: 6242: int __cs_size = __max_digits * 3; 6242: char* __cs = static_cast(__builtin_alloca(__cs_size)); 6242: if (__use_prec) 6242: __len = std::__convert_from_v(_S_get_c_locale(), __cs, __cs_size, 6242: __fbuf, __prec, __v); 6242: else 6242: __len = std::__convert_from_v(_S_get_c_locale(), __cs, __cs_size, 6242: __fbuf, __v); 6242: 6242: 6242: if (__len >= __cs_size) 6242: { 6242: __cs_size = __len + 1; 6242: __cs = static_cast(__builtin_alloca(__cs_size)); 6242: if (__use_prec) 6242: __len = std::__convert_from_v(_S_get_c_locale(), __cs, __cs_size, 6242: __fbuf, __prec, __v); 6242: else 6242: __len = std::__convert_from_v(_S_get_c_locale(), __cs, __cs_size, 6242: __fbuf, __v); 6242: } 6242: # 1044 "/usr/include/c++/8/bits/locale_facets.tcc" 3 6242: const ctype<_CharT>& __ctype = use_facet >(__loc); 6242: 6242: _CharT* __ws = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT) 6242: * __len)); 6242: __ctype.widen(__cs, __cs + __len, __ws); 6242: 6242: 6242: _CharT* __wp = 0; 6242: const char* __p = char_traits::find(__cs, __len, '.'); 6242: if (__p) 6242: { 6242: __wp = __ws + (__p - __cs); 6242: *__wp = __lc->_M_decimal_point; 6242: } 6242: 6242: 6242: 6242: 6242: if (__lc->_M_use_grouping 6242: && (__wp || __len < 3 || (__cs[1] <= '9' && __cs[2] <= '9' 6242: && __cs[1] >= '0' && __cs[2] >= '0'))) 6242: { 6242: 6242: 6242: _CharT* __ws2 = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT) 6242: * __len * 2)); 6242: 6242: streamsize __off = 0; 6242: if (__cs[0] == '-' || __cs[0] == '+') 6242: { 6242: __off = 1; 6242: __ws2[0] = __ws[0]; 6242: __len -= 1; 6242: } 6242: 6242: _M_group_float(__lc->_M_grouping, __lc->_M_grouping_size, 6242: __lc->_M_thousands_sep, __wp, __ws2 + __off, 6242: __ws + __off, __len); 6242: __len += __off; 6242: 6242: __ws = __ws2; 6242: } 6242: 6242: 6242: const streamsize __w = __io.width(); 6242: if (__w > static_cast(__len)) 6242: { 6242: _CharT* __ws3 = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT) 6242: * __w)); 6242: _M_pad(__fill, __w, __io, __ws3, __ws, __len); 6242: __ws = __ws3; 6242: } 6242: __io.width(0); 6242: 6242: 6242: 6242: return std::__write(__s, __ws, __len); 6242: } 6242: 6242: template 6242: _OutIter 6242: num_put<_CharT, _OutIter>:: 6242: do_put(iter_type __s, ios_base& __io, char_type __fill, bool __v) const 6242: { 6242: const ios_base::fmtflags __flags = __io.flags(); 6242: if ((__flags & ios_base::boolalpha) == 0) 6242: { 6242: const long __l = __v; 6242: __s = _M_insert_int(__s, __io, __fill, __l); 6242: } 6242: else 6242: { 6242: typedef __numpunct_cache<_CharT> __cache_type; 6242: __use_cache<__cache_type> __uc; 6242: const locale& __loc = __io._M_getloc(); 6242: const __cache_type* __lc = __uc(__loc); 6242: 6242: const _CharT* __name = __v ? __lc->_M_truename 6242: : __lc->_M_falsename; 6242: int __len = __v ? __lc->_M_truename_size 6242: : __lc->_M_falsename_size; 6242: 6242: const streamsize __w = __io.width(); 6242: if (__w > static_cast(__len)) 6242: { 6242: const streamsize __plen = __w - __len; 6242: _CharT* __ps 6242: = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT) 6242: * __plen)); 6242: 6242: char_traits<_CharT>::assign(__ps, __plen, __fill); 6242: __io.width(0); 6242: 6242: if ((__flags & ios_base::adjustfield) == ios_base::left) 6242: { 6242: __s = std::__write(__s, __name, __len); 6242: __s = std::__write(__s, __ps, __plen); 6242: } 6242: else 6242: { 6242: __s = std::__write(__s, __ps, __plen); 6242: __s = std::__write(__s, __name, __len); 6242: } 6242: return __s; 6242: } 6242: __io.width(0); 6242: __s = std::__write(__s, __name, __len); 6242: } 6242: return __s; 6242: } 6242: 6242: template 6242: _OutIter 6242: num_put<_CharT, _OutIter>:: 6242: do_put(iter_type __s, ios_base& __io, char_type __fill, double __v) const 6242: { return _M_insert_float(__s, __io, __fill, char(), __v); } 6242: 6242: 6242: template 6242: _OutIter 6242: num_put<_CharT, _OutIter>:: 6242: __do_put(iter_type __s, ios_base& __io, char_type __fill, double __v) const 6242: { return _M_insert_float(__s, __io, __fill, char(), __v); } 6242: 6242: 6242: template 6242: _OutIter 6242: num_put<_CharT, _OutIter>:: 6242: do_put(iter_type __s, ios_base& __io, char_type __fill, 6242: long double __v) const 6242: { return _M_insert_float(__s, __io, __fill, 'L', __v); } 6242: 6242: template 6242: _OutIter 6242: num_put<_CharT, _OutIter>:: 6242: do_put(iter_type __s, ios_base& __io, char_type __fill, 6242: const void* __v) const 6242: { 6242: const ios_base::fmtflags __flags = __io.flags(); 6242: const ios_base::fmtflags __fmt = ~(ios_base::basefield 6242: | ios_base::uppercase); 6242: __io.flags((__flags & __fmt) | (ios_base::hex | ios_base::showbase)); 6242: 6242: typedef __gnu_cxx::__conditional_type<(sizeof(const void*) 6242: <= sizeof(unsigned long)), 6242: unsigned long, unsigned long long>::__type _UIntPtrType; 6242: 6242: __s = _M_insert_int(__s, __io, __fill, 6242: reinterpret_cast<_UIntPtrType>(__v)); 6242: __io.flags(__flags); 6242: return __s; 6242: } 6242: 6242: } 6242: # 1206 "/usr/include/c++/8/bits/locale_facets.tcc" 3 6242: template 6242: void 6242: __pad<_CharT, _Traits>::_S_pad(ios_base& __io, _CharT __fill, 6242: _CharT* __news, const _CharT* __olds, 6242: streamsize __newlen, streamsize __oldlen) 6242: { 6242: const size_t __plen = static_cast(__newlen - __oldlen); 6242: const ios_base::fmtflags __adjust = __io.flags() & ios_base::adjustfield; 6242: 6242: 6242: if (__adjust == ios_base::left) 6242: { 6242: _Traits::copy(__news, __olds, __oldlen); 6242: _Traits::assign(__news + __oldlen, __plen, __fill); 6242: return; 6242: } 6242: 6242: size_t __mod = 0; 6242: if (__adjust == ios_base::internal) 6242: { 6242: 6242: 6242: 6242: const locale& __loc = __io._M_getloc(); 6242: const ctype<_CharT>& __ctype = use_facet >(__loc); 6242: 6242: if (__ctype.widen('-') == __olds[0] 6242: || __ctype.widen('+') == __olds[0]) 6242: { 6242: __news[0] = __olds[0]; 6242: __mod = 1; 6242: ++__news; 6242: } 6242: else if (__ctype.widen('0') == __olds[0] 6242: && __oldlen > 1 6242: && (__ctype.widen('x') == __olds[1] 6242: || __ctype.widen('X') == __olds[1])) 6242: { 6242: __news[0] = __olds[0]; 6242: __news[1] = __olds[1]; 6242: __mod = 2; 6242: __news += 2; 6242: } 6242: 6242: } 6242: _Traits::assign(__news, __plen, __fill); 6242: _Traits::copy(__news + __plen, __olds + __mod, __oldlen - __mod); 6242: } 6242: 6242: template 6242: _CharT* 6242: __add_grouping(_CharT* __s, _CharT __sep, 6242: const char* __gbeg, size_t __gsize, 6242: const _CharT* __first, const _CharT* __last) 6242: { 6242: size_t __idx = 0; 6242: size_t __ctr = 0; 6242: 6242: while (__last - __first > __gbeg[__idx] 6242: && static_cast(__gbeg[__idx]) > 0 6242: && __gbeg[__idx] != __gnu_cxx::__numeric_traits::__max) 6242: { 6242: __last -= __gbeg[__idx]; 6242: __idx < __gsize - 1 ? ++__idx : ++__ctr; 6242: } 6242: 6242: while (__first != __last) 6242: *__s++ = *__first++; 6242: 6242: while (__ctr--) 6242: { 6242: *__s++ = __sep; 6242: for (char __i = __gbeg[__idx]; __i > 0; --__i) 6242: *__s++ = *__first++; 6242: } 6242: 6242: while (__idx--) 6242: { 6242: *__s++ = __sep; 6242: for (char __i = __gbeg[__idx]; __i > 0; --__i) 6242: *__s++ = *__first++; 6242: } 6242: 6242: return __s; 6242: } 6242: 6242: 6242: 6242: 6242: extern template class __cxx11:: numpunct; 6242: extern template class __cxx11:: numpunct_byname; 6242: extern template class __gnu_cxx_ldbl128:: num_get; 6242: extern template class __gnu_cxx_ldbl128:: num_put; 6242: extern template class ctype_byname; 6242: 6242: extern template 6242: const ctype& 6242: use_facet >(const locale&); 6242: 6242: extern template 6242: const numpunct& 6242: use_facet >(const locale&); 6242: 6242: extern template 6242: const num_put& 6242: use_facet >(const locale&); 6242: 6242: extern template 6242: const num_get& 6242: use_facet >(const locale&); 6242: 6242: extern template 6242: bool 6242: has_facet >(const locale&); 6242: 6242: extern template 6242: bool 6242: has_facet >(const locale&); 6242: 6242: extern template 6242: bool 6242: has_facet >(const locale&); 6242: 6242: extern template 6242: bool 6242: has_facet >(const locale&); 6242: 6242: 6242: extern template class __cxx11:: numpunct; 6242: extern template class __cxx11:: numpunct_byname; 6242: extern template class __gnu_cxx_ldbl128:: num_get; 6242: extern template class __gnu_cxx_ldbl128:: num_put; 6242: extern template class ctype_byname; 6242: 6242: extern template 6242: const ctype& 6242: use_facet >(const locale&); 6242: 6242: extern template 6242: const numpunct& 6242: use_facet >(const locale&); 6242: 6242: extern template 6242: const num_put& 6242: use_facet >(const locale&); 6242: 6242: extern template 6242: const num_get& 6242: use_facet >(const locale&); 6242: 6242: extern template 6242: bool 6242: has_facet >(const locale&); 6242: 6242: extern template 6242: bool 6242: has_facet >(const locale&); 6242: 6242: extern template 6242: bool 6242: has_facet >(const locale&); 6242: 6242: extern template 6242: bool 6242: has_facet >(const locale&); 6242: 6242: 6242: 6242: 6242: } 6242: # 2652 "/usr/include/c++/8/bits/locale_facets.h" 2 3 6242: # 38 "/usr/include/c++/8/bits/basic_ios.h" 2 3 6242: 6242: 6242: 6242: namespace std __attribute__ ((__visibility__ ("default"))) 6242: { 6242: 6242: 6242: template 6242: inline const _Facet& 6242: __check_facet(const _Facet* __f) 6242: { 6242: if (!__f) 6242: __throw_bad_cast(); 6242: return *__f; 6242: } 6242: # 66 "/usr/include/c++/8/bits/basic_ios.h" 3 6242: template 6242: class basic_ios : public ios_base 6242: { 6242: public: 6242: 6242: 6242: 6242: 6242: 6242: 6242: typedef _CharT char_type; 6242: typedef typename _Traits::int_type int_type; 6242: typedef typename _Traits::pos_type pos_type; 6242: typedef typename _Traits::off_type off_type; 6242: typedef _Traits traits_type; 6242: 6242: 6242: 6242: 6242: 6242: 6242: typedef ctype<_CharT> __ctype_type; 6242: typedef num_put<_CharT, ostreambuf_iterator<_CharT, _Traits> > 6242: __num_put_type; 6242: typedef num_get<_CharT, istreambuf_iterator<_CharT, _Traits> > 6242: __num_get_type; 6242: 6242: 6242: 6242: protected: 6242: basic_ostream<_CharT, _Traits>* _M_tie; 6242: mutable char_type _M_fill; 6242: mutable bool _M_fill_init; 6242: basic_streambuf<_CharT, _Traits>* _M_streambuf; 6242: 6242: 6242: const __ctype_type* _M_ctype; 6242: 6242: const __num_put_type* _M_num_put; 6242: 6242: const __num_get_type* _M_num_get; 6242: 6242: public: 6242: # 117 "/usr/include/c++/8/bits/basic_ios.h" 3 6242: explicit operator bool() const 6242: { return !this->fail(); } 6242: 6242: 6242: 6242: 6242: 6242: bool 6242: operator!() const 6242: { return this->fail(); } 6242: # 136 "/usr/include/c++/8/bits/basic_ios.h" 3 6242: iostate 6242: rdstate() const 6242: { return _M_streambuf_state; } 6242: # 147 "/usr/include/c++/8/bits/basic_ios.h" 3 6242: void 6242: clear(iostate __state = goodbit); 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: void 6242: setstate(iostate __state) 6242: { this->clear(this->rdstate() | __state); } 6242: 6242: 6242: 6242: 6242: void 6242: _M_setstate(iostate __state) 6242: { 6242: 6242: 6242: _M_streambuf_state |= __state; 6242: if (this->exceptions() & __state) 6242: throw; 6242: } 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: bool 6242: good() const 6242: { return this->rdstate() == 0; } 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: bool 6242: eof() const 6242: { return (this->rdstate() & eofbit) != 0; } 6242: # 200 "/usr/include/c++/8/bits/basic_ios.h" 3 6242: bool 6242: fail() const 6242: { return (this->rdstate() & (badbit | failbit)) != 0; } 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: bool 6242: bad() const 6242: { return (this->rdstate() & badbit) != 0; } 6242: # 221 "/usr/include/c++/8/bits/basic_ios.h" 3 6242: iostate 6242: exceptions() const 6242: { return _M_exception; } 6242: # 256 "/usr/include/c++/8/bits/basic_ios.h" 3 6242: void 6242: exceptions(iostate __except) 6242: { 6242: _M_exception = __except; 6242: this->clear(_M_streambuf_state); 6242: } 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: explicit 6242: basic_ios(basic_streambuf<_CharT, _Traits>* __sb) 6242: : ios_base(), _M_tie(0), _M_fill(), _M_fill_init(false), _M_streambuf(0), 6242: _M_ctype(0), _M_num_put(0), _M_num_get(0) 6242: { this->init(__sb); } 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: virtual 6242: ~basic_ios() { } 6242: # 294 "/usr/include/c++/8/bits/basic_ios.h" 3 6242: basic_ostream<_CharT, _Traits>* 6242: tie() const 6242: { return _M_tie; } 6242: # 306 "/usr/include/c++/8/bits/basic_ios.h" 3 6242: basic_ostream<_CharT, _Traits>* 6242: tie(basic_ostream<_CharT, _Traits>* __tiestr) 6242: { 6242: basic_ostream<_CharT, _Traits>* __old = _M_tie; 6242: _M_tie = __tiestr; 6242: return __old; 6242: } 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: basic_streambuf<_CharT, _Traits>* 6242: rdbuf() const 6242: { return _M_streambuf; } 6242: # 346 "/usr/include/c++/8/bits/basic_ios.h" 3 6242: basic_streambuf<_CharT, _Traits>* 6242: rdbuf(basic_streambuf<_CharT, _Traits>* __sb); 6242: # 360 "/usr/include/c++/8/bits/basic_ios.h" 3 6242: basic_ios& 6242: copyfmt(const basic_ios& __rhs); 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: char_type 6242: fill() const 6242: { 6242: if (!_M_fill_init) 6242: { 6242: _M_fill = this->widen(' '); 6242: _M_fill_init = true; 6242: } 6242: return _M_fill; 6242: } 6242: # 389 "/usr/include/c++/8/bits/basic_ios.h" 3 6242: char_type 6242: fill(char_type __ch) 6242: { 6242: char_type __old = this->fill(); 6242: _M_fill = __ch; 6242: return __old; 6242: } 6242: # 409 "/usr/include/c++/8/bits/basic_ios.h" 3 6242: locale 6242: imbue(const locale& __loc); 6242: # 429 "/usr/include/c++/8/bits/basic_ios.h" 3 6242: char 6242: narrow(char_type __c, char __dfault) const 6242: { return __check_facet(_M_ctype).narrow(__c, __dfault); } 6242: # 448 "/usr/include/c++/8/bits/basic_ios.h" 3 6242: char_type 6242: widen(char __c) const 6242: { return __check_facet(_M_ctype).widen(__c); } 6242: 6242: protected: 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: basic_ios() 6242: : ios_base(), _M_tie(0), _M_fill(char_type()), _M_fill_init(false), 6242: _M_streambuf(0), _M_ctype(0), _M_num_put(0), _M_num_get(0) 6242: { } 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: void 6242: init(basic_streambuf<_CharT, _Traits>* __sb); 6242: 6242: 6242: basic_ios(const basic_ios&) = delete; 6242: basic_ios& operator=(const basic_ios&) = delete; 6242: 6242: void 6242: move(basic_ios& __rhs) 6242: { 6242: ios_base::_M_move(__rhs); 6242: _M_cache_locale(_M_ios_locale); 6242: this->tie(__rhs.tie(nullptr)); 6242: _M_fill = __rhs._M_fill; 6242: _M_fill_init = __rhs._M_fill_init; 6242: _M_streambuf = nullptr; 6242: } 6242: 6242: void 6242: move(basic_ios&& __rhs) 6242: { this->move(__rhs); } 6242: 6242: void 6242: swap(basic_ios& __rhs) noexcept 6242: { 6242: ios_base::_M_swap(__rhs); 6242: _M_cache_locale(_M_ios_locale); 6242: __rhs._M_cache_locale(__rhs._M_ios_locale); 6242: std::swap(_M_tie, __rhs._M_tie); 6242: std::swap(_M_fill, __rhs._M_fill); 6242: std::swap(_M_fill_init, __rhs._M_fill_init); 6242: } 6242: 6242: void 6242: set_rdbuf(basic_streambuf<_CharT, _Traits>* __sb) 6242: { _M_streambuf = __sb; } 6242: 6242: 6242: void 6242: _M_cache_locale(const locale& __loc); 6242: }; 6242: 6242: 6242: } 6242: 6242: # 1 "/usr/include/c++/8/bits/basic_ios.tcc" 1 3 6242: # 33 "/usr/include/c++/8/bits/basic_ios.tcc" 3 6242: 6242: # 34 "/usr/include/c++/8/bits/basic_ios.tcc" 3 6242: 6242: namespace std __attribute__ ((__visibility__ ("default"))) 6242: { 6242: 6242: 6242: template 6242: void 6242: basic_ios<_CharT, _Traits>::clear(iostate __state) 6242: { 6242: if (this->rdbuf()) 6242: _M_streambuf_state = __state; 6242: else 6242: _M_streambuf_state = __state | badbit; 6242: if (this->exceptions() & this->rdstate()) 6242: __throw_ios_failure(("basic_ios::clear")); 6242: } 6242: 6242: template 6242: basic_streambuf<_CharT, _Traits>* 6242: basic_ios<_CharT, _Traits>::rdbuf(basic_streambuf<_CharT, _Traits>* __sb) 6242: { 6242: basic_streambuf<_CharT, _Traits>* __old = _M_streambuf; 6242: _M_streambuf = __sb; 6242: this->clear(); 6242: return __old; 6242: } 6242: 6242: template 6242: basic_ios<_CharT, _Traits>& 6242: basic_ios<_CharT, _Traits>::copyfmt(const basic_ios& __rhs) 6242: { 6242: 6242: 6242: if (this != &__rhs) 6242: { 6242: 6242: 6242: 6242: 6242: _Words* __words = (__rhs._M_word_size <= _S_local_word_size) ? 6242: _M_local_word : new _Words[__rhs._M_word_size]; 6242: 6242: 6242: _Callback_list* __cb = __rhs._M_callbacks; 6242: if (__cb) 6242: __cb->_M_add_reference(); 6242: _M_call_callbacks(erase_event); 6242: if (_M_word != _M_local_word) 6242: { 6242: delete [] _M_word; 6242: _M_word = 0; 6242: } 6242: _M_dispose_callbacks(); 6242: 6242: 6242: _M_callbacks = __cb; 6242: for (int __i = 0; __i < __rhs._M_word_size; ++__i) 6242: __words[__i] = __rhs._M_word[__i]; 6242: _M_word = __words; 6242: _M_word_size = __rhs._M_word_size; 6242: 6242: this->flags(__rhs.flags()); 6242: this->width(__rhs.width()); 6242: this->precision(__rhs.precision()); 6242: this->tie(__rhs.tie()); 6242: this->fill(__rhs.fill()); 6242: _M_ios_locale = __rhs.getloc(); 6242: _M_cache_locale(_M_ios_locale); 6242: 6242: _M_call_callbacks(copyfmt_event); 6242: 6242: 6242: this->exceptions(__rhs.exceptions()); 6242: } 6242: return *this; 6242: } 6242: 6242: 6242: template 6242: locale 6242: basic_ios<_CharT, _Traits>::imbue(const locale& __loc) 6242: { 6242: locale __old(this->getloc()); 6242: ios_base::imbue(__loc); 6242: _M_cache_locale(__loc); 6242: if (this->rdbuf() != 0) 6242: this->rdbuf()->pubimbue(__loc); 6242: return __old; 6242: } 6242: 6242: template 6242: void 6242: basic_ios<_CharT, _Traits>::init(basic_streambuf<_CharT, _Traits>* __sb) 6242: { 6242: 6242: ios_base::_M_init(); 6242: 6242: 6242: _M_cache_locale(_M_ios_locale); 6242: # 146 "/usr/include/c++/8/bits/basic_ios.tcc" 3 6242: _M_fill = _CharT(); 6242: _M_fill_init = false; 6242: 6242: _M_tie = 0; 6242: _M_exception = goodbit; 6242: _M_streambuf = __sb; 6242: _M_streambuf_state = __sb ? goodbit : badbit; 6242: } 6242: 6242: template 6242: void 6242: basic_ios<_CharT, _Traits>::_M_cache_locale(const locale& __loc) 6242: { 6242: if (__builtin_expect(has_facet<__ctype_type>(__loc), true)) 6242: _M_ctype = std::__addressof(use_facet<__ctype_type>(__loc)); 6242: else 6242: _M_ctype = 0; 6242: 6242: if (__builtin_expect(has_facet<__num_put_type>(__loc), true)) 6242: _M_num_put = std::__addressof(use_facet<__num_put_type>(__loc)); 6242: else 6242: _M_num_put = 0; 6242: 6242: if (__builtin_expect(has_facet<__num_get_type>(__loc), true)) 6242: _M_num_get = std::__addressof(use_facet<__num_get_type>(__loc)); 6242: else 6242: _M_num_get = 0; 6242: } 6242: 6242: 6242: 6242: 6242: extern template class basic_ios; 6242: 6242: 6242: extern template class basic_ios; 6242: 6242: 6242: 6242: 6242: } 6242: # 517 "/usr/include/c++/8/bits/basic_ios.h" 2 3 6242: # 45 "/usr/include/c++/8/ios" 2 3 6242: # 39 "/usr/include/c++/8/ostream" 2 3 6242: 6242: 6242: namespace std __attribute__ ((__visibility__ ("default"))) 6242: { 6242: 6242: # 57 "/usr/include/c++/8/ostream" 3 6242: template 6242: class basic_ostream : virtual public basic_ios<_CharT, _Traits> 6242: { 6242: public: 6242: 6242: typedef _CharT char_type; 6242: typedef typename _Traits::int_type int_type; 6242: typedef typename _Traits::pos_type pos_type; 6242: typedef typename _Traits::off_type off_type; 6242: typedef _Traits traits_type; 6242: 6242: 6242: typedef basic_streambuf<_CharT, _Traits> __streambuf_type; 6242: typedef basic_ios<_CharT, _Traits> __ios_type; 6242: typedef basic_ostream<_CharT, _Traits> __ostream_type; 6242: typedef num_put<_CharT, ostreambuf_iterator<_CharT, _Traits> > 6242: __num_put_type; 6242: typedef ctype<_CharT> __ctype_type; 6242: # 83 "/usr/include/c++/8/ostream" 3 6242: explicit 6242: basic_ostream(__streambuf_type* __sb) 6242: { this->init(__sb); } 6242: 6242: 6242: 6242: 6242: 6242: 6242: virtual 6242: ~basic_ostream() { } 6242: 6242: 6242: class sentry; 6242: friend class sentry; 6242: # 107 "/usr/include/c++/8/ostream" 3 6242: __ostream_type& 6242: operator<<(__ostream_type& (*__pf)(__ostream_type&)) 6242: { 6242: 6242: 6242: 6242: return __pf(*this); 6242: } 6242: 6242: __ostream_type& 6242: operator<<(__ios_type& (*__pf)(__ios_type&)) 6242: { 6242: 6242: 6242: 6242: __pf(*this); 6242: return *this; 6242: } 6242: 6242: __ostream_type& 6242: operator<<(ios_base& (*__pf) (ios_base&)) 6242: { 6242: 6242: 6242: 6242: __pf(*this); 6242: return *this; 6242: } 6242: # 165 "/usr/include/c++/8/ostream" 3 6242: __ostream_type& 6242: operator<<(long __n) 6242: { return _M_insert(__n); } 6242: 6242: __ostream_type& 6242: operator<<(unsigned long __n) 6242: { return _M_insert(__n); } 6242: 6242: __ostream_type& 6242: operator<<(bool __n) 6242: { return _M_insert(__n); } 6242: 6242: __ostream_type& 6242: operator<<(short __n); 6242: 6242: __ostream_type& 6242: operator<<(unsigned short __n) 6242: { 6242: 6242: 6242: return _M_insert(static_cast(__n)); 6242: } 6242: 6242: __ostream_type& 6242: operator<<(int __n); 6242: 6242: __ostream_type& 6242: operator<<(unsigned int __n) 6242: { 6242: 6242: 6242: return _M_insert(static_cast(__n)); 6242: } 6242: 6242: 6242: __ostream_type& 6242: operator<<(long long __n) 6242: { return _M_insert(__n); } 6242: 6242: __ostream_type& 6242: operator<<(unsigned long long __n) 6242: { return _M_insert(__n); } 6242: # 219 "/usr/include/c++/8/ostream" 3 6242: __ostream_type& 6242: operator<<(double __f) 6242: { return _M_insert(__f); } 6242: 6242: __ostream_type& 6242: operator<<(float __f) 6242: { 6242: 6242: 6242: return _M_insert(static_cast(__f)); 6242: } 6242: 6242: __ostream_type& 6242: operator<<(long double __f) 6242: { return _M_insert(__f); } 6242: # 244 "/usr/include/c++/8/ostream" 3 6242: __ostream_type& 6242: operator<<(const void* __p) 6242: { return _M_insert(__p); } 6242: # 269 "/usr/include/c++/8/ostream" 3 6242: __ostream_type& 6242: operator<<(__streambuf_type* __sb); 6242: # 302 "/usr/include/c++/8/ostream" 3 6242: __ostream_type& 6242: put(char_type __c); 6242: 6242: 6242: 6242: 6242: 6242: 6242: void 6242: _M_write(const char_type* __s, streamsize __n) 6242: { 6242: const streamsize __put = this->rdbuf()->sputn(__s, __n); 6242: if (__put != __n) 6242: this->setstate(ios_base::badbit); 6242: } 6242: # 334 "/usr/include/c++/8/ostream" 3 6242: __ostream_type& 6242: write(const char_type* __s, streamsize __n); 6242: # 347 "/usr/include/c++/8/ostream" 3 6242: __ostream_type& 6242: flush(); 6242: # 357 "/usr/include/c++/8/ostream" 3 6242: pos_type 6242: tellp(); 6242: # 368 "/usr/include/c++/8/ostream" 3 6242: __ostream_type& 6242: seekp(pos_type); 6242: # 380 "/usr/include/c++/8/ostream" 3 6242: __ostream_type& 6242: seekp(off_type, ios_base::seekdir); 6242: 6242: protected: 6242: basic_ostream() 6242: { this->init(0); } 6242: 6242: 6242: 6242: basic_ostream(basic_iostream<_CharT, _Traits>&) { } 6242: 6242: basic_ostream(const basic_ostream&) = delete; 6242: 6242: basic_ostream(basic_ostream&& __rhs) 6242: : __ios_type() 6242: { __ios_type::move(__rhs); } 6242: 6242: 6242: 6242: basic_ostream& operator=(const basic_ostream&) = delete; 6242: 6242: basic_ostream& 6242: operator=(basic_ostream&& __rhs) 6242: { 6242: swap(__rhs); 6242: return *this; 6242: } 6242: 6242: void 6242: swap(basic_ostream& __rhs) 6242: { __ios_type::swap(__rhs); } 6242: 6242: 6242: template 6242: __ostream_type& 6242: _M_insert(_ValueT __v); 6242: }; 6242: # 425 "/usr/include/c++/8/ostream" 3 6242: template 6242: class basic_ostream<_CharT, _Traits>::sentry 6242: { 6242: 6242: bool _M_ok; 6242: basic_ostream<_CharT, _Traits>& _M_os; 6242: 6242: public: 6242: # 444 "/usr/include/c++/8/ostream" 3 6242: explicit 6242: sentry(basic_ostream<_CharT, _Traits>& __os); 6242: # 454 "/usr/include/c++/8/ostream" 3 6242: ~sentry() 6242: { 6242: 6242: if (bool(_M_os.flags() & ios_base::unitbuf) && !uncaught_exception()) 6242: { 6242: 6242: if (_M_os.rdbuf() && _M_os.rdbuf()->pubsync() == -1) 6242: _M_os.setstate(ios_base::badbit); 6242: } 6242: } 6242: # 473 "/usr/include/c++/8/ostream" 3 6242: explicit 6242: 6242: operator bool() const 6242: { return _M_ok; } 6242: }; 6242: # 495 "/usr/include/c++/8/ostream" 3 6242: template 6242: inline basic_ostream<_CharT, _Traits>& 6242: operator<<(basic_ostream<_CharT, _Traits>& __out, _CharT __c) 6242: { return __ostream_insert(__out, &__c, 1); } 6242: 6242: template 6242: inline basic_ostream<_CharT, _Traits>& 6242: operator<<(basic_ostream<_CharT, _Traits>& __out, char __c) 6242: { return (__out << __out.widen(__c)); } 6242: 6242: 6242: template 6242: inline basic_ostream& 6242: operator<<(basic_ostream& __out, char __c) 6242: { return __ostream_insert(__out, &__c, 1); } 6242: 6242: 6242: template 6242: inline basic_ostream& 6242: operator<<(basic_ostream& __out, signed char __c) 6242: { return (__out << static_cast(__c)); } 6242: 6242: template 6242: inline basic_ostream& 6242: operator<<(basic_ostream& __out, unsigned char __c) 6242: { return (__out << static_cast(__c)); } 6242: # 537 "/usr/include/c++/8/ostream" 3 6242: template 6242: inline basic_ostream<_CharT, _Traits>& 6242: operator<<(basic_ostream<_CharT, _Traits>& __out, const _CharT* __s) 6242: { 6242: if (!__s) 6242: __out.setstate(ios_base::badbit); 6242: else 6242: __ostream_insert(__out, __s, 6242: static_cast(_Traits::length(__s))); 6242: return __out; 6242: } 6242: 6242: template 6242: basic_ostream<_CharT, _Traits> & 6242: operator<<(basic_ostream<_CharT, _Traits>& __out, const char* __s); 6242: 6242: 6242: template 6242: inline basic_ostream& 6242: operator<<(basic_ostream& __out, const char* __s) 6242: { 6242: if (!__s) 6242: __out.setstate(ios_base::badbit); 6242: else 6242: __ostream_insert(__out, __s, 6242: static_cast(_Traits::length(__s))); 6242: return __out; 6242: } 6242: 6242: 6242: template 6242: inline basic_ostream& 6242: operator<<(basic_ostream& __out, const signed char* __s) 6242: { return (__out << reinterpret_cast(__s)); } 6242: 6242: template 6242: inline basic_ostream & 6242: operator<<(basic_ostream& __out, const unsigned char* __s) 6242: { return (__out << reinterpret_cast(__s)); } 6242: # 588 "/usr/include/c++/8/ostream" 3 6242: template 6242: inline basic_ostream<_CharT, _Traits>& 6242: endl(basic_ostream<_CharT, _Traits>& __os) 6242: { return flush(__os.put(__os.widen('\n'))); } 6242: # 600 "/usr/include/c++/8/ostream" 3 6242: template 6242: inline basic_ostream<_CharT, _Traits>& 6242: ends(basic_ostream<_CharT, _Traits>& __os) 6242: { return __os.put(_CharT()); } 6242: 6242: 6242: 6242: 6242: 6242: 6242: template 6242: inline basic_ostream<_CharT, _Traits>& 6242: flush(basic_ostream<_CharT, _Traits>& __os) 6242: { return __os.flush(); } 6242: 6242: 6242: template 6242: basic_ostream<_Ch, _Up>& 6242: __is_convertible_to_basic_ostream_test(basic_ostream<_Ch, _Up>*); 6242: 6242: template 6242: struct __is_convertible_to_basic_ostream_impl 6242: { 6242: using __ostream_type = void; 6242: }; 6242: 6242: template 6242: using __do_is_convertible_to_basic_ostream_impl = 6242: decltype(__is_convertible_to_basic_ostream_test 6242: (declval::type*>())); 6242: 6242: template 6242: struct __is_convertible_to_basic_ostream_impl 6242: <_Tp, 6242: __void_t<__do_is_convertible_to_basic_ostream_impl<_Tp>>> 6242: { 6242: using __ostream_type = 6242: __do_is_convertible_to_basic_ostream_impl<_Tp>; 6242: }; 6242: 6242: template 6242: struct __is_convertible_to_basic_ostream 6242: : __is_convertible_to_basic_ostream_impl<_Tp> 6242: { 6242: public: 6242: using type = __not_::__ostream_type>>; 6242: constexpr static bool value = type::value; 6242: }; 6242: 6242: template 6242: struct __is_insertable : false_type {}; 6242: 6242: template 6242: struct __is_insertable<_Ostream, _Tp, 6242: __void_t() 6242: << declval())>> 6242: : true_type {}; 6242: 6242: template 6242: using __rvalue_ostream_type = 6242: typename __is_convertible_to_basic_ostream< 6242: _Ostream>::__ostream_type; 6242: # 674 "/usr/include/c++/8/ostream" 3 6242: template 6242: inline 6242: typename enable_if<__and_<__not_>, 6242: __is_convertible_to_basic_ostream<_Ostream>, 6242: __is_insertable< 6242: __rvalue_ostream_type<_Ostream>, 6242: const _Tp&>>::value, 6242: __rvalue_ostream_type<_Ostream>>::type 6242: operator<<(_Ostream&& __os, const _Tp& __x) 6242: { 6242: __rvalue_ostream_type<_Ostream> __ret_os = __os; 6242: __ret_os << __x; 6242: return __ret_os; 6242: } 6242: 6242: 6242: 6242: } 6242: 6242: # 1 "/usr/include/c++/8/bits/ostream.tcc" 1 3 6242: # 37 "/usr/include/c++/8/bits/ostream.tcc" 3 6242: 6242: # 38 "/usr/include/c++/8/bits/ostream.tcc" 3 6242: 6242: 6242: 6242: namespace std __attribute__ ((__visibility__ ("default"))) 6242: { 6242: 6242: 6242: template 6242: basic_ostream<_CharT, _Traits>::sentry:: 6242: sentry(basic_ostream<_CharT, _Traits>& __os) 6242: : _M_ok(false), _M_os(__os) 6242: { 6242: 6242: if (__os.tie() && __os.good()) 6242: __os.tie()->flush(); 6242: 6242: if (__os.good()) 6242: _M_ok = true; 6242: else 6242: __os.setstate(ios_base::failbit); 6242: } 6242: 6242: template 6242: template 6242: basic_ostream<_CharT, _Traits>& 6242: basic_ostream<_CharT, _Traits>:: 6242: _M_insert(_ValueT __v) 6242: { 6242: sentry __cerb(*this); 6242: if (__cerb) 6242: { 6242: ios_base::iostate __err = ios_base::goodbit; 6242: try 6242: { 6242: const __num_put_type& __np = __check_facet(this->_M_num_put); 6242: if (__np.put(*this, *this, this->fill(), __v).failed()) 6242: __err |= ios_base::badbit; 6242: } 6242: catch(__cxxabiv1::__forced_unwind&) 6242: { 6242: this->_M_setstate(ios_base::badbit); 6242: throw; 6242: } 6242: catch(...) 6242: { this->_M_setstate(ios_base::badbit); } 6242: if (__err) 6242: this->setstate(__err); 6242: } 6242: return *this; 6242: } 6242: 6242: template 6242: basic_ostream<_CharT, _Traits>& 6242: basic_ostream<_CharT, _Traits>:: 6242: operator<<(short __n) 6242: { 6242: 6242: 6242: const ios_base::fmtflags __fmt = this->flags() & ios_base::basefield; 6242: if (__fmt == ios_base::oct || __fmt == ios_base::hex) 6242: return _M_insert(static_cast(static_cast(__n))); 6242: else 6242: return _M_insert(static_cast(__n)); 6242: } 6242: 6242: template 6242: basic_ostream<_CharT, _Traits>& 6242: basic_ostream<_CharT, _Traits>:: 6242: operator<<(int __n) 6242: { 6242: 6242: 6242: const ios_base::fmtflags __fmt = this->flags() & ios_base::basefield; 6242: if (__fmt == ios_base::oct || __fmt == ios_base::hex) 6242: return _M_insert(static_cast(static_cast(__n))); 6242: else 6242: return _M_insert(static_cast(__n)); 6242: } 6242: 6242: template 6242: basic_ostream<_CharT, _Traits>& 6242: basic_ostream<_CharT, _Traits>:: 6242: operator<<(__streambuf_type* __sbin) 6242: { 6242: ios_base::iostate __err = ios_base::goodbit; 6242: sentry __cerb(*this); 6242: if (__cerb && __sbin) 6242: { 6242: try 6242: { 6242: if (!__copy_streambufs(__sbin, this->rdbuf())) 6242: __err |= ios_base::failbit; 6242: } 6242: catch(__cxxabiv1::__forced_unwind&) 6242: { 6242: this->_M_setstate(ios_base::badbit); 6242: throw; 6242: } 6242: catch(...) 6242: { this->_M_setstate(ios_base::failbit); } 6242: } 6242: else if (!__sbin) 6242: __err |= ios_base::badbit; 6242: if (__err) 6242: this->setstate(__err); 6242: return *this; 6242: } 6242: 6242: template 6242: basic_ostream<_CharT, _Traits>& 6242: basic_ostream<_CharT, _Traits>:: 6242: put(char_type __c) 6242: { 6242: 6242: 6242: 6242: 6242: 6242: 6242: sentry __cerb(*this); 6242: if (__cerb) 6242: { 6242: ios_base::iostate __err = ios_base::goodbit; 6242: try 6242: { 6242: const int_type __put = this->rdbuf()->sputc(__c); 6242: if (traits_type::eq_int_type(__put, traits_type::eof())) 6242: __err |= ios_base::badbit; 6242: } 6242: catch(__cxxabiv1::__forced_unwind&) 6242: { 6242: this->_M_setstate(ios_base::badbit); 6242: throw; 6242: } 6242: catch(...) 6242: { this->_M_setstate(ios_base::badbit); } 6242: if (__err) 6242: this->setstate(__err); 6242: } 6242: return *this; 6242: } 6242: 6242: template 6242: basic_ostream<_CharT, _Traits>& 6242: basic_ostream<_CharT, _Traits>:: 6242: write(const _CharT* __s, streamsize __n) 6242: { 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: sentry __cerb(*this); 6242: if (__cerb) 6242: { 6242: try 6242: { _M_write(__s, __n); } 6242: catch(__cxxabiv1::__forced_unwind&) 6242: { 6242: this->_M_setstate(ios_base::badbit); 6242: throw; 6242: } 6242: catch(...) 6242: { this->_M_setstate(ios_base::badbit); } 6242: } 6242: return *this; 6242: } 6242: 6242: template 6242: basic_ostream<_CharT, _Traits>& 6242: basic_ostream<_CharT, _Traits>:: 6242: flush() 6242: { 6242: 6242: 6242: 6242: ios_base::iostate __err = ios_base::goodbit; 6242: try 6242: { 6242: if (this->rdbuf() && this->rdbuf()->pubsync() == -1) 6242: __err |= ios_base::badbit; 6242: } 6242: catch(__cxxabiv1::__forced_unwind&) 6242: { 6242: this->_M_setstate(ios_base::badbit); 6242: throw; 6242: } 6242: catch(...) 6242: { this->_M_setstate(ios_base::badbit); } 6242: if (__err) 6242: this->setstate(__err); 6242: return *this; 6242: } 6242: 6242: template 6242: typename basic_ostream<_CharT, _Traits>::pos_type 6242: basic_ostream<_CharT, _Traits>:: 6242: tellp() 6242: { 6242: pos_type __ret = pos_type(-1); 6242: try 6242: { 6242: if (!this->fail()) 6242: __ret = this->rdbuf()->pubseekoff(0, ios_base::cur, ios_base::out); 6242: } 6242: catch(__cxxabiv1::__forced_unwind&) 6242: { 6242: this->_M_setstate(ios_base::badbit); 6242: throw; 6242: } 6242: catch(...) 6242: { this->_M_setstate(ios_base::badbit); } 6242: return __ret; 6242: } 6242: 6242: template 6242: basic_ostream<_CharT, _Traits>& 6242: basic_ostream<_CharT, _Traits>:: 6242: seekp(pos_type __pos) 6242: { 6242: ios_base::iostate __err = ios_base::goodbit; 6242: try 6242: { 6242: if (!this->fail()) 6242: { 6242: 6242: 6242: const pos_type __p = this->rdbuf()->pubseekpos(__pos, 6242: ios_base::out); 6242: 6242: 6242: if (__p == pos_type(off_type(-1))) 6242: __err |= ios_base::failbit; 6242: } 6242: } 6242: catch(__cxxabiv1::__forced_unwind&) 6242: { 6242: this->_M_setstate(ios_base::badbit); 6242: throw; 6242: } 6242: catch(...) 6242: { this->_M_setstate(ios_base::badbit); } 6242: if (__err) 6242: this->setstate(__err); 6242: return *this; 6242: } 6242: 6242: template 6242: basic_ostream<_CharT, _Traits>& 6242: basic_ostream<_CharT, _Traits>:: 6242: seekp(off_type __off, ios_base::seekdir __dir) 6242: { 6242: ios_base::iostate __err = ios_base::goodbit; 6242: try 6242: { 6242: if (!this->fail()) 6242: { 6242: 6242: 6242: const pos_type __p = this->rdbuf()->pubseekoff(__off, __dir, 6242: ios_base::out); 6242: 6242: 6242: if (__p == pos_type(off_type(-1))) 6242: __err |= ios_base::failbit; 6242: } 6242: } 6242: catch(__cxxabiv1::__forced_unwind&) 6242: { 6242: this->_M_setstate(ios_base::badbit); 6242: throw; 6242: } 6242: catch(...) 6242: { this->_M_setstate(ios_base::badbit); } 6242: if (__err) 6242: this->setstate(__err); 6242: return *this; 6242: } 6242: 6242: template 6242: basic_ostream<_CharT, _Traits>& 6242: operator<<(basic_ostream<_CharT, _Traits>& __out, const char* __s) 6242: { 6242: if (!__s) 6242: __out.setstate(ios_base::badbit); 6242: else 6242: { 6242: 6242: 6242: const size_t __clen = char_traits::length(__s); 6242: try 6242: { 6242: struct __ptr_guard 6242: { 6242: _CharT *__p; 6242: __ptr_guard (_CharT *__ip): __p(__ip) { } 6242: ~__ptr_guard() { delete[] __p; } 6242: _CharT* __get() { return __p; } 6242: } __pg (new _CharT[__clen]); 6242: 6242: _CharT *__ws = __pg.__get(); 6242: for (size_t __i = 0; __i < __clen; ++__i) 6242: __ws[__i] = __out.widen(__s[__i]); 6242: __ostream_insert(__out, __ws, __clen); 6242: } 6242: catch(__cxxabiv1::__forced_unwind&) 6242: { 6242: __out._M_setstate(ios_base::badbit); 6242: throw; 6242: } 6242: catch(...) 6242: { __out._M_setstate(ios_base::badbit); } 6242: } 6242: return __out; 6242: } 6242: 6242: 6242: 6242: 6242: extern template class basic_ostream; 6242: extern template ostream& endl(ostream&); 6242: extern template ostream& ends(ostream&); 6242: extern template ostream& flush(ostream&); 6242: extern template ostream& operator<<(ostream&, char); 6242: extern template ostream& operator<<(ostream&, unsigned char); 6242: extern template ostream& operator<<(ostream&, signed char); 6242: extern template ostream& operator<<(ostream&, const char*); 6242: extern template ostream& operator<<(ostream&, const unsigned char*); 6242: extern template ostream& operator<<(ostream&, const signed char*); 6242: 6242: extern template ostream& ostream::_M_insert(long); 6242: extern template ostream& ostream::_M_insert(unsigned long); 6242: extern template ostream& ostream::_M_insert(bool); 6242: 6242: extern template ostream& ostream::_M_insert(long long); 6242: extern template ostream& ostream::_M_insert(unsigned long long); 6242: 6242: extern template ostream& ostream::_M_insert(double); 6242: extern template ostream& ostream::_M_insert(long double); 6242: extern template ostream& ostream::_M_insert(const void*); 6242: 6242: 6242: extern template class basic_ostream; 6242: extern template wostream& endl(wostream&); 6242: extern template wostream& ends(wostream&); 6242: extern template wostream& flush(wostream&); 6242: extern template wostream& operator<<(wostream&, wchar_t); 6242: extern template wostream& operator<<(wostream&, char); 6242: extern template wostream& operator<<(wostream&, const wchar_t*); 6242: extern template wostream& operator<<(wostream&, const char*); 6242: 6242: extern template wostream& wostream::_M_insert(long); 6242: extern template wostream& wostream::_M_insert(unsigned long); 6242: extern template wostream& wostream::_M_insert(bool); 6242: 6242: extern template wostream& wostream::_M_insert(long long); 6242: extern template wostream& wostream::_M_insert(unsigned long long); 6242: 6242: extern template wostream& wostream::_M_insert(double); 6242: extern template wostream& wostream::_M_insert(long double); 6242: extern template wostream& wostream::_M_insert(const void*); 6242: 6242: 6242: 6242: 6242: } 6242: # 694 "/usr/include/c++/8/ostream" 2 3 6242: # 65 "/usr/include/c++/8/iterator" 2 3 6242: # 1 "/usr/include/c++/8/istream" 1 3 6242: # 36 "/usr/include/c++/8/istream" 3 6242: 6242: # 37 "/usr/include/c++/8/istream" 3 6242: 6242: 6242: 6242: 6242: namespace std __attribute__ ((__visibility__ ("default"))) 6242: { 6242: 6242: # 57 "/usr/include/c++/8/istream" 3 6242: template 6242: class basic_istream : virtual public basic_ios<_CharT, _Traits> 6242: { 6242: public: 6242: 6242: typedef _CharT char_type; 6242: typedef typename _Traits::int_type int_type; 6242: typedef typename _Traits::pos_type pos_type; 6242: typedef typename _Traits::off_type off_type; 6242: typedef _Traits traits_type; 6242: 6242: 6242: typedef basic_streambuf<_CharT, _Traits> __streambuf_type; 6242: typedef basic_ios<_CharT, _Traits> __ios_type; 6242: typedef basic_istream<_CharT, _Traits> __istream_type; 6242: typedef num_get<_CharT, istreambuf_iterator<_CharT, _Traits> > 6242: __num_get_type; 6242: typedef ctype<_CharT> __ctype_type; 6242: 6242: protected: 6242: 6242: 6242: 6242: 6242: 6242: streamsize _M_gcount; 6242: 6242: public: 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: explicit 6242: basic_istream(__streambuf_type* __sb) 6242: : _M_gcount(streamsize(0)) 6242: { this->init(__sb); } 6242: 6242: 6242: 6242: 6242: 6242: 6242: virtual 6242: ~basic_istream() 6242: { _M_gcount = streamsize(0); } 6242: 6242: 6242: class sentry; 6242: friend class sentry; 6242: # 119 "/usr/include/c++/8/istream" 3 6242: __istream_type& 6242: operator>>(__istream_type& (*__pf)(__istream_type&)) 6242: { return __pf(*this); } 6242: 6242: __istream_type& 6242: operator>>(__ios_type& (*__pf)(__ios_type&)) 6242: { 6242: __pf(*this); 6242: return *this; 6242: } 6242: 6242: __istream_type& 6242: operator>>(ios_base& (*__pf)(ios_base&)) 6242: { 6242: __pf(*this); 6242: return *this; 6242: } 6242: # 167 "/usr/include/c++/8/istream" 3 6242: __istream_type& 6242: operator>>(bool& __n) 6242: { return _M_extract(__n); } 6242: 6242: __istream_type& 6242: operator>>(short& __n); 6242: 6242: __istream_type& 6242: operator>>(unsigned short& __n) 6242: { return _M_extract(__n); } 6242: 6242: __istream_type& 6242: operator>>(int& __n); 6242: 6242: __istream_type& 6242: operator>>(unsigned int& __n) 6242: { return _M_extract(__n); } 6242: 6242: __istream_type& 6242: operator>>(long& __n) 6242: { return _M_extract(__n); } 6242: 6242: __istream_type& 6242: operator>>(unsigned long& __n) 6242: { return _M_extract(__n); } 6242: 6242: 6242: __istream_type& 6242: operator>>(long long& __n) 6242: { return _M_extract(__n); } 6242: 6242: __istream_type& 6242: operator>>(unsigned long long& __n) 6242: { return _M_extract(__n); } 6242: # 213 "/usr/include/c++/8/istream" 3 6242: __istream_type& 6242: operator>>(float& __f) 6242: { return _M_extract(__f); } 6242: 6242: __istream_type& 6242: operator>>(double& __f) 6242: { return _M_extract(__f); } 6242: 6242: __istream_type& 6242: operator>>(long double& __f) 6242: { return _M_extract(__f); } 6242: # 234 "/usr/include/c++/8/istream" 3 6242: __istream_type& 6242: operator>>(void*& __p) 6242: { return _M_extract(__p); } 6242: # 258 "/usr/include/c++/8/istream" 3 6242: __istream_type& 6242: operator>>(__streambuf_type* __sb); 6242: # 268 "/usr/include/c++/8/istream" 3 6242: streamsize 6242: gcount() const 6242: { return _M_gcount; } 6242: # 301 "/usr/include/c++/8/istream" 3 6242: int_type 6242: get(); 6242: # 315 "/usr/include/c++/8/istream" 3 6242: __istream_type& 6242: get(char_type& __c); 6242: # 342 "/usr/include/c++/8/istream" 3 6242: __istream_type& 6242: get(char_type* __s, streamsize __n, char_type __delim); 6242: # 353 "/usr/include/c++/8/istream" 3 6242: __istream_type& 6242: get(char_type* __s, streamsize __n) 6242: { return this->get(__s, __n, this->widen('\n')); } 6242: # 376 "/usr/include/c++/8/istream" 3 6242: __istream_type& 6242: get(__streambuf_type& __sb, char_type __delim); 6242: # 386 "/usr/include/c++/8/istream" 3 6242: __istream_type& 6242: get(__streambuf_type& __sb) 6242: { return this->get(__sb, this->widen('\n')); } 6242: # 415 "/usr/include/c++/8/istream" 3 6242: __istream_type& 6242: getline(char_type* __s, streamsize __n, char_type __delim); 6242: # 426 "/usr/include/c++/8/istream" 3 6242: __istream_type& 6242: getline(char_type* __s, streamsize __n) 6242: { return this->getline(__s, __n, this->widen('\n')); } 6242: # 450 "/usr/include/c++/8/istream" 3 6242: __istream_type& 6242: ignore(streamsize __n, int_type __delim); 6242: 6242: __istream_type& 6242: ignore(streamsize __n); 6242: 6242: __istream_type& 6242: ignore(); 6242: # 467 "/usr/include/c++/8/istream" 3 6242: int_type 6242: peek(); 6242: # 485 "/usr/include/c++/8/istream" 3 6242: __istream_type& 6242: read(char_type* __s, streamsize __n); 6242: # 504 "/usr/include/c++/8/istream" 3 6242: streamsize 6242: readsome(char_type* __s, streamsize __n); 6242: # 521 "/usr/include/c++/8/istream" 3 6242: __istream_type& 6242: putback(char_type __c); 6242: # 537 "/usr/include/c++/8/istream" 3 6242: __istream_type& 6242: unget(); 6242: # 555 "/usr/include/c++/8/istream" 3 6242: int 6242: sync(); 6242: # 570 "/usr/include/c++/8/istream" 3 6242: pos_type 6242: tellg(); 6242: # 585 "/usr/include/c++/8/istream" 3 6242: __istream_type& 6242: seekg(pos_type); 6242: # 601 "/usr/include/c++/8/istream" 3 6242: __istream_type& 6242: seekg(off_type, ios_base::seekdir); 6242: 6242: 6242: protected: 6242: basic_istream() 6242: : _M_gcount(streamsize(0)) 6242: { this->init(0); } 6242: 6242: 6242: basic_istream(const basic_istream&) = delete; 6242: 6242: basic_istream(basic_istream&& __rhs) 6242: : __ios_type(), _M_gcount(__rhs._M_gcount) 6242: { 6242: __ios_type::move(__rhs); 6242: __rhs._M_gcount = 0; 6242: } 6242: 6242: 6242: 6242: basic_istream& operator=(const basic_istream&) = delete; 6242: 6242: basic_istream& 6242: operator=(basic_istream&& __rhs) 6242: { 6242: swap(__rhs); 6242: return *this; 6242: } 6242: 6242: void 6242: swap(basic_istream& __rhs) 6242: { 6242: __ios_type::swap(__rhs); 6242: std::swap(_M_gcount, __rhs._M_gcount); 6242: } 6242: 6242: 6242: template 6242: __istream_type& 6242: _M_extract(_ValueT& __v); 6242: }; 6242: 6242: 6242: template<> 6242: basic_istream& 6242: basic_istream:: 6242: getline(char_type* __s, streamsize __n, char_type __delim); 6242: 6242: template<> 6242: basic_istream& 6242: basic_istream:: 6242: ignore(streamsize __n); 6242: 6242: template<> 6242: basic_istream& 6242: basic_istream:: 6242: ignore(streamsize __n, int_type __delim); 6242: 6242: 6242: template<> 6242: basic_istream& 6242: basic_istream:: 6242: getline(char_type* __s, streamsize __n, char_type __delim); 6242: 6242: template<> 6242: basic_istream& 6242: basic_istream:: 6242: ignore(streamsize __n); 6242: 6242: template<> 6242: basic_istream& 6242: basic_istream:: 6242: ignore(streamsize __n, int_type __delim); 6242: # 685 "/usr/include/c++/8/istream" 3 6242: template 6242: class basic_istream<_CharT, _Traits>::sentry 6242: { 6242: 6242: bool _M_ok; 6242: 6242: public: 6242: 6242: typedef _Traits traits_type; 6242: typedef basic_streambuf<_CharT, _Traits> __streambuf_type; 6242: typedef basic_istream<_CharT, _Traits> __istream_type; 6242: typedef typename __istream_type::__ctype_type __ctype_type; 6242: typedef typename _Traits::int_type __int_type; 6242: # 721 "/usr/include/c++/8/istream" 3 6242: explicit 6242: sentry(basic_istream<_CharT, _Traits>& __is, bool __noskipws = false); 6242: # 732 "/usr/include/c++/8/istream" 3 6242: explicit 6242: 6242: operator bool() const 6242: { return _M_ok; } 6242: }; 6242: # 750 "/usr/include/c++/8/istream" 3 6242: template 6242: basic_istream<_CharT, _Traits>& 6242: operator>>(basic_istream<_CharT, _Traits>& __in, _CharT& __c); 6242: 6242: template 6242: inline basic_istream& 6242: operator>>(basic_istream& __in, unsigned char& __c) 6242: { return (__in >> reinterpret_cast(__c)); } 6242: 6242: template 6242: inline basic_istream& 6242: operator>>(basic_istream& __in, signed char& __c) 6242: { return (__in >> reinterpret_cast(__c)); } 6242: # 792 "/usr/include/c++/8/istream" 3 6242: template 6242: basic_istream<_CharT, _Traits>& 6242: operator>>(basic_istream<_CharT, _Traits>& __in, _CharT* __s); 6242: 6242: 6242: template<> 6242: basic_istream& 6242: operator>>(basic_istream& __in, char* __s); 6242: 6242: template 6242: inline basic_istream& 6242: operator>>(basic_istream& __in, unsigned char* __s) 6242: { return (__in >> reinterpret_cast(__s)); } 6242: 6242: template 6242: inline basic_istream& 6242: operator>>(basic_istream& __in, signed char* __s) 6242: { return (__in >> reinterpret_cast(__s)); } 6242: # 823 "/usr/include/c++/8/istream" 3 6242: template 6242: class basic_iostream 6242: : public basic_istream<_CharT, _Traits>, 6242: public basic_ostream<_CharT, _Traits> 6242: { 6242: public: 6242: 6242: 6242: 6242: typedef _CharT char_type; 6242: typedef typename _Traits::int_type int_type; 6242: typedef typename _Traits::pos_type pos_type; 6242: typedef typename _Traits::off_type off_type; 6242: typedef _Traits traits_type; 6242: 6242: 6242: typedef basic_istream<_CharT, _Traits> __istream_type; 6242: typedef basic_ostream<_CharT, _Traits> __ostream_type; 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: explicit 6242: basic_iostream(basic_streambuf<_CharT, _Traits>* __sb) 6242: : __istream_type(__sb), __ostream_type(__sb) { } 6242: 6242: 6242: 6242: 6242: virtual 6242: ~basic_iostream() { } 6242: 6242: protected: 6242: basic_iostream() 6242: : __istream_type(), __ostream_type() { } 6242: 6242: 6242: basic_iostream(const basic_iostream&) = delete; 6242: 6242: basic_iostream(basic_iostream&& __rhs) 6242: : __istream_type(std::move(__rhs)), __ostream_type(*this) 6242: { } 6242: 6242: 6242: 6242: basic_iostream& operator=(const basic_iostream&) = delete; 6242: 6242: basic_iostream& 6242: operator=(basic_iostream&& __rhs) 6242: { 6242: swap(__rhs); 6242: return *this; 6242: } 6242: 6242: void 6242: swap(basic_iostream& __rhs) 6242: { __istream_type::swap(__rhs); } 6242: 6242: }; 6242: # 906 "/usr/include/c++/8/istream" 3 6242: template 6242: basic_istream<_CharT, _Traits>& 6242: ws(basic_istream<_CharT, _Traits>& __is); 6242: 6242: 6242: template 6242: basic_istream<_Ch, _Up>& 6242: __is_convertible_to_basic_istream_test(basic_istream<_Ch, _Up>*); 6242: 6242: template 6242: struct __is_convertible_to_basic_istream_impl 6242: { 6242: using __istream_type = void; 6242: }; 6242: 6242: template 6242: using __do_is_convertible_to_basic_istream_impl = 6242: decltype(__is_convertible_to_basic_istream_test 6242: (declval::type*>())); 6242: 6242: template 6242: struct __is_convertible_to_basic_istream_impl 6242: <_Tp, 6242: __void_t<__do_is_convertible_to_basic_istream_impl<_Tp>>> 6242: { 6242: using __istream_type = 6242: __do_is_convertible_to_basic_istream_impl<_Tp>; 6242: }; 6242: 6242: template 6242: struct __is_convertible_to_basic_istream 6242: : __is_convertible_to_basic_istream_impl<_Tp> 6242: { 6242: public: 6242: using type = __not_::__istream_type>>; 6242: constexpr static bool value = type::value; 6242: }; 6242: 6242: template 6242: struct __is_extractable : false_type {}; 6242: 6242: template 6242: struct __is_extractable<_Istream, _Tp, 6242: __void_t() 6242: >> declval<_Tp>())>> 6242: : true_type {}; 6242: 6242: template 6242: using __rvalue_istream_type = 6242: typename __is_convertible_to_basic_istream< 6242: _Istream>::__istream_type; 6242: # 972 "/usr/include/c++/8/istream" 3 6242: template 6242: inline 6242: typename enable_if<__and_<__not_>, 6242: __is_convertible_to_basic_istream<_Istream>, 6242: __is_extractable< 6242: __rvalue_istream_type<_Istream>, 6242: _Tp&&>>::value, 6242: __rvalue_istream_type<_Istream>>::type 6242: operator>>(_Istream&& __is, _Tp&& __x) 6242: { 6242: __rvalue_istream_type<_Istream> __ret_is = __is; 6242: __ret_is >> std::forward<_Tp>(__x); 6242: return __ret_is; 6242: } 6242: 6242: 6242: 6242: } 6242: 6242: # 1 "/usr/include/c++/8/bits/istream.tcc" 1 3 6242: # 37 "/usr/include/c++/8/bits/istream.tcc" 3 6242: 6242: # 38 "/usr/include/c++/8/bits/istream.tcc" 3 6242: 6242: 6242: 6242: namespace std __attribute__ ((__visibility__ ("default"))) 6242: { 6242: 6242: 6242: template 6242: basic_istream<_CharT, _Traits>::sentry:: 6242: sentry(basic_istream<_CharT, _Traits>& __in, bool __noskip) : _M_ok(false) 6242: { 6242: ios_base::iostate __err = ios_base::goodbit; 6242: if (__in.good()) 6242: try 6242: { 6242: if (__in.tie()) 6242: __in.tie()->flush(); 6242: if (!__noskip && bool(__in.flags() & ios_base::skipws)) 6242: { 6242: const __int_type __eof = traits_type::eof(); 6242: __streambuf_type* __sb = __in.rdbuf(); 6242: __int_type __c = __sb->sgetc(); 6242: 6242: const __ctype_type& __ct = __check_facet(__in._M_ctype); 6242: while (!traits_type::eq_int_type(__c, __eof) 6242: && __ct.is(ctype_base::space, 6242: traits_type::to_char_type(__c))) 6242: __c = __sb->snextc(); 6242: 6242: 6242: 6242: 6242: if (traits_type::eq_int_type(__c, __eof)) 6242: __err |= ios_base::eofbit; 6242: } 6242: } 6242: catch(__cxxabiv1::__forced_unwind&) 6242: { 6242: __in._M_setstate(ios_base::badbit); 6242: throw; 6242: } 6242: catch(...) 6242: { __in._M_setstate(ios_base::badbit); } 6242: 6242: if (__in.good() && __err == ios_base::goodbit) 6242: _M_ok = true; 6242: else 6242: { 6242: __err |= ios_base::failbit; 6242: __in.setstate(__err); 6242: } 6242: } 6242: 6242: template 6242: template 6242: basic_istream<_CharT, _Traits>& 6242: basic_istream<_CharT, _Traits>:: 6242: _M_extract(_ValueT& __v) 6242: { 6242: sentry __cerb(*this, false); 6242: if (__cerb) 6242: { 6242: ios_base::iostate __err = ios_base::goodbit; 6242: try 6242: { 6242: const __num_get_type& __ng = __check_facet(this->_M_num_get); 6242: __ng.get(*this, 0, *this, __err, __v); 6242: } 6242: catch(__cxxabiv1::__forced_unwind&) 6242: { 6242: this->_M_setstate(ios_base::badbit); 6242: throw; 6242: } 6242: catch(...) 6242: { this->_M_setstate(ios_base::badbit); } 6242: if (__err) 6242: this->setstate(__err); 6242: } 6242: return *this; 6242: } 6242: 6242: template 6242: basic_istream<_CharT, _Traits>& 6242: basic_istream<_CharT, _Traits>:: 6242: operator>>(short& __n) 6242: { 6242: 6242: 6242: sentry __cerb(*this, false); 6242: if (__cerb) 6242: { 6242: ios_base::iostate __err = ios_base::goodbit; 6242: try 6242: { 6242: long __l; 6242: const __num_get_type& __ng = __check_facet(this->_M_num_get); 6242: __ng.get(*this, 0, *this, __err, __l); 6242: 6242: 6242: 6242: if (__l < __gnu_cxx::__numeric_traits::__min) 6242: { 6242: __err |= ios_base::failbit; 6242: __n = __gnu_cxx::__numeric_traits::__min; 6242: } 6242: else if (__l > __gnu_cxx::__numeric_traits::__max) 6242: { 6242: __err |= ios_base::failbit; 6242: __n = __gnu_cxx::__numeric_traits::__max; 6242: } 6242: else 6242: __n = short(__l); 6242: } 6242: catch(__cxxabiv1::__forced_unwind&) 6242: { 6242: this->_M_setstate(ios_base::badbit); 6242: throw; 6242: } 6242: catch(...) 6242: { this->_M_setstate(ios_base::badbit); } 6242: if (__err) 6242: this->setstate(__err); 6242: } 6242: return *this; 6242: } 6242: 6242: template 6242: basic_istream<_CharT, _Traits>& 6242: basic_istream<_CharT, _Traits>:: 6242: operator>>(int& __n) 6242: { 6242: 6242: 6242: sentry __cerb(*this, false); 6242: if (__cerb) 6242: { 6242: ios_base::iostate __err = ios_base::goodbit; 6242: try 6242: { 6242: long __l; 6242: const __num_get_type& __ng = __check_facet(this->_M_num_get); 6242: __ng.get(*this, 0, *this, __err, __l); 6242: 6242: 6242: 6242: if (__l < __gnu_cxx::__numeric_traits::__min) 6242: { 6242: __err |= ios_base::failbit; 6242: __n = __gnu_cxx::__numeric_traits::__min; 6242: } 6242: else if (__l > __gnu_cxx::__numeric_traits::__max) 6242: { 6242: __err |= ios_base::failbit; 6242: __n = __gnu_cxx::__numeric_traits::__max; 6242: } 6242: else 6242: __n = int(__l); 6242: } 6242: catch(__cxxabiv1::__forced_unwind&) 6242: { 6242: this->_M_setstate(ios_base::badbit); 6242: throw; 6242: } 6242: catch(...) 6242: { this->_M_setstate(ios_base::badbit); } 6242: if (__err) 6242: this->setstate(__err); 6242: } 6242: return *this; 6242: } 6242: 6242: template 6242: basic_istream<_CharT, _Traits>& 6242: basic_istream<_CharT, _Traits>:: 6242: operator>>(__streambuf_type* __sbout) 6242: { 6242: ios_base::iostate __err = ios_base::goodbit; 6242: sentry __cerb(*this, false); 6242: if (__cerb && __sbout) 6242: { 6242: try 6242: { 6242: bool __ineof; 6242: if (!__copy_streambufs_eof(this->rdbuf(), __sbout, __ineof)) 6242: __err |= ios_base::failbit; 6242: if (__ineof) 6242: __err |= ios_base::eofbit; 6242: } 6242: catch(__cxxabiv1::__forced_unwind&) 6242: { 6242: this->_M_setstate(ios_base::failbit); 6242: throw; 6242: } 6242: catch(...) 6242: { this->_M_setstate(ios_base::failbit); } 6242: } 6242: else if (!__sbout) 6242: __err |= ios_base::failbit; 6242: if (__err) 6242: this->setstate(__err); 6242: return *this; 6242: } 6242: 6242: template 6242: typename basic_istream<_CharT, _Traits>::int_type 6242: basic_istream<_CharT, _Traits>:: 6242: get(void) 6242: { 6242: const int_type __eof = traits_type::eof(); 6242: int_type __c = __eof; 6242: _M_gcount = 0; 6242: ios_base::iostate __err = ios_base::goodbit; 6242: sentry __cerb(*this, true); 6242: if (__cerb) 6242: { 6242: try 6242: { 6242: __c = this->rdbuf()->sbumpc(); 6242: 6242: if (!traits_type::eq_int_type(__c, __eof)) 6242: _M_gcount = 1; 6242: else 6242: __err |= ios_base::eofbit; 6242: } 6242: catch(__cxxabiv1::__forced_unwind&) 6242: { 6242: this->_M_setstate(ios_base::badbit); 6242: throw; 6242: } 6242: catch(...) 6242: { this->_M_setstate(ios_base::badbit); } 6242: } 6242: if (!_M_gcount) 6242: __err |= ios_base::failbit; 6242: if (__err) 6242: this->setstate(__err); 6242: return __c; 6242: } 6242: 6242: template 6242: basic_istream<_CharT, _Traits>& 6242: basic_istream<_CharT, _Traits>:: 6242: get(char_type& __c) 6242: { 6242: _M_gcount = 0; 6242: ios_base::iostate __err = ios_base::goodbit; 6242: sentry __cerb(*this, true); 6242: if (__cerb) 6242: { 6242: try 6242: { 6242: const int_type __cb = this->rdbuf()->sbumpc(); 6242: 6242: if (!traits_type::eq_int_type(__cb, traits_type::eof())) 6242: { 6242: _M_gcount = 1; 6242: __c = traits_type::to_char_type(__cb); 6242: } 6242: else 6242: __err |= ios_base::eofbit; 6242: } 6242: catch(__cxxabiv1::__forced_unwind&) 6242: { 6242: this->_M_setstate(ios_base::badbit); 6242: throw; 6242: } 6242: catch(...) 6242: { this->_M_setstate(ios_base::badbit); } 6242: } 6242: if (!_M_gcount) 6242: __err |= ios_base::failbit; 6242: if (__err) 6242: this->setstate(__err); 6242: return *this; 6242: } 6242: 6242: template 6242: basic_istream<_CharT, _Traits>& 6242: basic_istream<_CharT, _Traits>:: 6242: get(char_type* __s, streamsize __n, char_type __delim) 6242: { 6242: _M_gcount = 0; 6242: ios_base::iostate __err = ios_base::goodbit; 6242: sentry __cerb(*this, true); 6242: if (__cerb) 6242: { 6242: try 6242: { 6242: const int_type __idelim = traits_type::to_int_type(__delim); 6242: const int_type __eof = traits_type::eof(); 6242: __streambuf_type* __sb = this->rdbuf(); 6242: int_type __c = __sb->sgetc(); 6242: 6242: while (_M_gcount + 1 < __n 6242: && !traits_type::eq_int_type(__c, __eof) 6242: && !traits_type::eq_int_type(__c, __idelim)) 6242: { 6242: *__s++ = traits_type::to_char_type(__c); 6242: ++_M_gcount; 6242: __c = __sb->snextc(); 6242: } 6242: if (traits_type::eq_int_type(__c, __eof)) 6242: __err |= ios_base::eofbit; 6242: } 6242: catch(__cxxabiv1::__forced_unwind&) 6242: { 6242: this->_M_setstate(ios_base::badbit); 6242: throw; 6242: } 6242: catch(...) 6242: { this->_M_setstate(ios_base::badbit); } 6242: } 6242: 6242: 6242: if (__n > 0) 6242: *__s = char_type(); 6242: if (!_M_gcount) 6242: __err |= ios_base::failbit; 6242: if (__err) 6242: this->setstate(__err); 6242: return *this; 6242: } 6242: 6242: template 6242: basic_istream<_CharT, _Traits>& 6242: basic_istream<_CharT, _Traits>:: 6242: get(__streambuf_type& __sb, char_type __delim) 6242: { 6242: _M_gcount = 0; 6242: ios_base::iostate __err = ios_base::goodbit; 6242: sentry __cerb(*this, true); 6242: if (__cerb) 6242: { 6242: try 6242: { 6242: const int_type __idelim = traits_type::to_int_type(__delim); 6242: const int_type __eof = traits_type::eof(); 6242: __streambuf_type* __this_sb = this->rdbuf(); 6242: int_type __c = __this_sb->sgetc(); 6242: char_type __c2 = traits_type::to_char_type(__c); 6242: 6242: while (!traits_type::eq_int_type(__c, __eof) 6242: && !traits_type::eq_int_type(__c, __idelim) 6242: && !traits_type::eq_int_type(__sb.sputc(__c2), __eof)) 6242: { 6242: ++_M_gcount; 6242: __c = __this_sb->snextc(); 6242: __c2 = traits_type::to_char_type(__c); 6242: } 6242: if (traits_type::eq_int_type(__c, __eof)) 6242: __err |= ios_base::eofbit; 6242: } 6242: catch(__cxxabiv1::__forced_unwind&) 6242: { 6242: this->_M_setstate(ios_base::badbit); 6242: throw; 6242: } 6242: catch(...) 6242: { this->_M_setstate(ios_base::badbit); } 6242: } 6242: if (!_M_gcount) 6242: __err |= ios_base::failbit; 6242: if (__err) 6242: this->setstate(__err); 6242: return *this; 6242: } 6242: 6242: template 6242: basic_istream<_CharT, _Traits>& 6242: basic_istream<_CharT, _Traits>:: 6242: getline(char_type* __s, streamsize __n, char_type __delim) 6242: { 6242: _M_gcount = 0; 6242: ios_base::iostate __err = ios_base::goodbit; 6242: sentry __cerb(*this, true); 6242: if (__cerb) 6242: { 6242: try 6242: { 6242: const int_type __idelim = traits_type::to_int_type(__delim); 6242: const int_type __eof = traits_type::eof(); 6242: __streambuf_type* __sb = this->rdbuf(); 6242: int_type __c = __sb->sgetc(); 6242: 6242: while (_M_gcount + 1 < __n 6242: && !traits_type::eq_int_type(__c, __eof) 6242: && !traits_type::eq_int_type(__c, __idelim)) 6242: { 6242: *__s++ = traits_type::to_char_type(__c); 6242: __c = __sb->snextc(); 6242: ++_M_gcount; 6242: } 6242: if (traits_type::eq_int_type(__c, __eof)) 6242: __err |= ios_base::eofbit; 6242: else 6242: { 6242: if (traits_type::eq_int_type(__c, __idelim)) 6242: { 6242: __sb->sbumpc(); 6242: ++_M_gcount; 6242: } 6242: else 6242: __err |= ios_base::failbit; 6242: } 6242: } 6242: catch(__cxxabiv1::__forced_unwind&) 6242: { 6242: this->_M_setstate(ios_base::badbit); 6242: throw; 6242: } 6242: catch(...) 6242: { this->_M_setstate(ios_base::badbit); } 6242: } 6242: 6242: 6242: if (__n > 0) 6242: *__s = char_type(); 6242: if (!_M_gcount) 6242: __err |= ios_base::failbit; 6242: if (__err) 6242: this->setstate(__err); 6242: return *this; 6242: } 6242: 6242: 6242: 6242: 6242: template 6242: basic_istream<_CharT, _Traits>& 6242: basic_istream<_CharT, _Traits>:: 6242: ignore(void) 6242: { 6242: _M_gcount = 0; 6242: sentry __cerb(*this, true); 6242: if (__cerb) 6242: { 6242: ios_base::iostate __err = ios_base::goodbit; 6242: try 6242: { 6242: const int_type __eof = traits_type::eof(); 6242: __streambuf_type* __sb = this->rdbuf(); 6242: 6242: if (traits_type::eq_int_type(__sb->sbumpc(), __eof)) 6242: __err |= ios_base::eofbit; 6242: else 6242: _M_gcount = 1; 6242: } 6242: catch(__cxxabiv1::__forced_unwind&) 6242: { 6242: this->_M_setstate(ios_base::badbit); 6242: throw; 6242: } 6242: catch(...) 6242: { this->_M_setstate(ios_base::badbit); } 6242: if (__err) 6242: this->setstate(__err); 6242: } 6242: return *this; 6242: } 6242: 6242: template 6242: basic_istream<_CharT, _Traits>& 6242: basic_istream<_CharT, _Traits>:: 6242: ignore(streamsize __n) 6242: { 6242: _M_gcount = 0; 6242: sentry __cerb(*this, true); 6242: if (__cerb && __n > 0) 6242: { 6242: ios_base::iostate __err = ios_base::goodbit; 6242: try 6242: { 6242: const int_type __eof = traits_type::eof(); 6242: __streambuf_type* __sb = this->rdbuf(); 6242: int_type __c = __sb->sgetc(); 6242: # 521 "/usr/include/c++/8/bits/istream.tcc" 3 6242: bool __large_ignore = false; 6242: while (true) 6242: { 6242: while (_M_gcount < __n 6242: && !traits_type::eq_int_type(__c, __eof)) 6242: { 6242: ++_M_gcount; 6242: __c = __sb->snextc(); 6242: } 6242: if (__n == __gnu_cxx::__numeric_traits::__max 6242: && !traits_type::eq_int_type(__c, __eof)) 6242: { 6242: _M_gcount = 6242: __gnu_cxx::__numeric_traits::__min; 6242: __large_ignore = true; 6242: } 6242: else 6242: break; 6242: } 6242: 6242: if (__large_ignore) 6242: _M_gcount = __gnu_cxx::__numeric_traits::__max; 6242: 6242: if (traits_type::eq_int_type(__c, __eof)) 6242: __err |= ios_base::eofbit; 6242: } 6242: catch(__cxxabiv1::__forced_unwind&) 6242: { 6242: this->_M_setstate(ios_base::badbit); 6242: throw; 6242: } 6242: catch(...) 6242: { this->_M_setstate(ios_base::badbit); } 6242: if (__err) 6242: this->setstate(__err); 6242: } 6242: return *this; 6242: } 6242: 6242: template 6242: basic_istream<_CharT, _Traits>& 6242: basic_istream<_CharT, _Traits>:: 6242: ignore(streamsize __n, int_type __delim) 6242: { 6242: _M_gcount = 0; 6242: sentry __cerb(*this, true); 6242: if (__cerb && __n > 0) 6242: { 6242: ios_base::iostate __err = ios_base::goodbit; 6242: try 6242: { 6242: const int_type __eof = traits_type::eof(); 6242: __streambuf_type* __sb = this->rdbuf(); 6242: int_type __c = __sb->sgetc(); 6242: 6242: 6242: bool __large_ignore = false; 6242: while (true) 6242: { 6242: while (_M_gcount < __n 6242: && !traits_type::eq_int_type(__c, __eof) 6242: && !traits_type::eq_int_type(__c, __delim)) 6242: { 6242: ++_M_gcount; 6242: __c = __sb->snextc(); 6242: } 6242: if (__n == __gnu_cxx::__numeric_traits::__max 6242: && !traits_type::eq_int_type(__c, __eof) 6242: && !traits_type::eq_int_type(__c, __delim)) 6242: { 6242: _M_gcount = 6242: __gnu_cxx::__numeric_traits::__min; 6242: __large_ignore = true; 6242: } 6242: else 6242: break; 6242: } 6242: 6242: if (__large_ignore) 6242: _M_gcount = __gnu_cxx::__numeric_traits::__max; 6242: 6242: if (traits_type::eq_int_type(__c, __eof)) 6242: __err |= ios_base::eofbit; 6242: else if (traits_type::eq_int_type(__c, __delim)) 6242: { 6242: if (_M_gcount 6242: < __gnu_cxx::__numeric_traits::__max) 6242: ++_M_gcount; 6242: __sb->sbumpc(); 6242: } 6242: } 6242: catch(__cxxabiv1::__forced_unwind&) 6242: { 6242: this->_M_setstate(ios_base::badbit); 6242: throw; 6242: } 6242: catch(...) 6242: { this->_M_setstate(ios_base::badbit); } 6242: if (__err) 6242: this->setstate(__err); 6242: } 6242: return *this; 6242: } 6242: 6242: template 6242: typename basic_istream<_CharT, _Traits>::int_type 6242: basic_istream<_CharT, _Traits>:: 6242: peek(void) 6242: { 6242: int_type __c = traits_type::eof(); 6242: _M_gcount = 0; 6242: sentry __cerb(*this, true); 6242: if (__cerb) 6242: { 6242: ios_base::iostate __err = ios_base::goodbit; 6242: try 6242: { 6242: __c = this->rdbuf()->sgetc(); 6242: if (traits_type::eq_int_type(__c, traits_type::eof())) 6242: __err |= ios_base::eofbit; 6242: } 6242: catch(__cxxabiv1::__forced_unwind&) 6242: { 6242: this->_M_setstate(ios_base::badbit); 6242: throw; 6242: } 6242: catch(...) 6242: { this->_M_setstate(ios_base::badbit); } 6242: if (__err) 6242: this->setstate(__err); 6242: } 6242: return __c; 6242: } 6242: 6242: template 6242: basic_istream<_CharT, _Traits>& 6242: basic_istream<_CharT, _Traits>:: 6242: read(char_type* __s, streamsize __n) 6242: { 6242: _M_gcount = 0; 6242: sentry __cerb(*this, true); 6242: if (__cerb) 6242: { 6242: ios_base::iostate __err = ios_base::goodbit; 6242: try 6242: { 6242: _M_gcount = this->rdbuf()->sgetn(__s, __n); 6242: if (_M_gcount != __n) 6242: __err |= (ios_base::eofbit | ios_base::failbit); 6242: } 6242: catch(__cxxabiv1::__forced_unwind&) 6242: { 6242: this->_M_setstate(ios_base::badbit); 6242: throw; 6242: } 6242: catch(...) 6242: { this->_M_setstate(ios_base::badbit); } 6242: if (__err) 6242: this->setstate(__err); 6242: } 6242: return *this; 6242: } 6242: 6242: template 6242: streamsize 6242: basic_istream<_CharT, _Traits>:: 6242: readsome(char_type* __s, streamsize __n) 6242: { 6242: _M_gcount = 0; 6242: sentry __cerb(*this, true); 6242: if (__cerb) 6242: { 6242: ios_base::iostate __err = ios_base::goodbit; 6242: try 6242: { 6242: 6242: const streamsize __num = this->rdbuf()->in_avail(); 6242: if (__num > 0) 6242: _M_gcount = this->rdbuf()->sgetn(__s, std::min(__num, __n)); 6242: else if (__num == -1) 6242: __err |= ios_base::eofbit; 6242: } 6242: catch(__cxxabiv1::__forced_unwind&) 6242: { 6242: this->_M_setstate(ios_base::badbit); 6242: throw; 6242: } 6242: catch(...) 6242: { this->_M_setstate(ios_base::badbit); } 6242: if (__err) 6242: this->setstate(__err); 6242: } 6242: return _M_gcount; 6242: } 6242: 6242: template 6242: basic_istream<_CharT, _Traits>& 6242: basic_istream<_CharT, _Traits>:: 6242: putback(char_type __c) 6242: { 6242: 6242: 6242: _M_gcount = 0; 6242: 6242: this->clear(this->rdstate() & ~ios_base::eofbit); 6242: sentry __cerb(*this, true); 6242: if (__cerb) 6242: { 6242: ios_base::iostate __err = ios_base::goodbit; 6242: try 6242: { 6242: const int_type __eof = traits_type::eof(); 6242: __streambuf_type* __sb = this->rdbuf(); 6242: if (!__sb 6242: || traits_type::eq_int_type(__sb->sputbackc(__c), __eof)) 6242: __err |= ios_base::badbit; 6242: } 6242: catch(__cxxabiv1::__forced_unwind&) 6242: { 6242: this->_M_setstate(ios_base::badbit); 6242: throw; 6242: } 6242: catch(...) 6242: { this->_M_setstate(ios_base::badbit); } 6242: if (__err) 6242: this->setstate(__err); 6242: } 6242: return *this; 6242: } 6242: 6242: template 6242: basic_istream<_CharT, _Traits>& 6242: basic_istream<_CharT, _Traits>:: 6242: unget(void) 6242: { 6242: 6242: 6242: _M_gcount = 0; 6242: 6242: this->clear(this->rdstate() & ~ios_base::eofbit); 6242: sentry __cerb(*this, true); 6242: if (__cerb) 6242: { 6242: ios_base::iostate __err = ios_base::goodbit; 6242: try 6242: { 6242: const int_type __eof = traits_type::eof(); 6242: __streambuf_type* __sb = this->rdbuf(); 6242: if (!__sb 6242: || traits_type::eq_int_type(__sb->sungetc(), __eof)) 6242: __err |= ios_base::badbit; 6242: } 6242: catch(__cxxabiv1::__forced_unwind&) 6242: { 6242: this->_M_setstate(ios_base::badbit); 6242: throw; 6242: } 6242: catch(...) 6242: { this->_M_setstate(ios_base::badbit); } 6242: if (__err) 6242: this->setstate(__err); 6242: } 6242: return *this; 6242: } 6242: 6242: template 6242: int 6242: basic_istream<_CharT, _Traits>:: 6242: sync(void) 6242: { 6242: 6242: 6242: int __ret = -1; 6242: sentry __cerb(*this, true); 6242: if (__cerb) 6242: { 6242: ios_base::iostate __err = ios_base::goodbit; 6242: try 6242: { 6242: __streambuf_type* __sb = this->rdbuf(); 6242: if (__sb) 6242: { 6242: if (__sb->pubsync() == -1) 6242: __err |= ios_base::badbit; 6242: else 6242: __ret = 0; 6242: } 6242: } 6242: catch(__cxxabiv1::__forced_unwind&) 6242: { 6242: this->_M_setstate(ios_base::badbit); 6242: throw; 6242: } 6242: catch(...) 6242: { this->_M_setstate(ios_base::badbit); } 6242: if (__err) 6242: this->setstate(__err); 6242: } 6242: return __ret; 6242: } 6242: 6242: template 6242: typename basic_istream<_CharT, _Traits>::pos_type 6242: basic_istream<_CharT, _Traits>:: 6242: tellg(void) 6242: { 6242: 6242: 6242: pos_type __ret = pos_type(-1); 6242: sentry __cerb(*this, true); 6242: if (__cerb) 6242: { 6242: try 6242: { 6242: if (!this->fail()) 6242: __ret = this->rdbuf()->pubseekoff(0, ios_base::cur, 6242: ios_base::in); 6242: } 6242: catch(__cxxabiv1::__forced_unwind&) 6242: { 6242: this->_M_setstate(ios_base::badbit); 6242: throw; 6242: } 6242: catch(...) 6242: { this->_M_setstate(ios_base::badbit); } 6242: } 6242: return __ret; 6242: } 6242: 6242: template 6242: basic_istream<_CharT, _Traits>& 6242: basic_istream<_CharT, _Traits>:: 6242: seekg(pos_type __pos) 6242: { 6242: 6242: 6242: 6242: this->clear(this->rdstate() & ~ios_base::eofbit); 6242: sentry __cerb(*this, true); 6242: if (__cerb) 6242: { 6242: ios_base::iostate __err = ios_base::goodbit; 6242: try 6242: { 6242: if (!this->fail()) 6242: { 6242: 6242: const pos_type __p = this->rdbuf()->pubseekpos(__pos, 6242: ios_base::in); 6242: 6242: 6242: if (__p == pos_type(off_type(-1))) 6242: __err |= ios_base::failbit; 6242: } 6242: } 6242: catch(__cxxabiv1::__forced_unwind&) 6242: { 6242: this->_M_setstate(ios_base::badbit); 6242: throw; 6242: } 6242: catch(...) 6242: { this->_M_setstate(ios_base::badbit); } 6242: if (__err) 6242: this->setstate(__err); 6242: } 6242: return *this; 6242: } 6242: 6242: template 6242: basic_istream<_CharT, _Traits>& 6242: basic_istream<_CharT, _Traits>:: 6242: seekg(off_type __off, ios_base::seekdir __dir) 6242: { 6242: 6242: 6242: 6242: this->clear(this->rdstate() & ~ios_base::eofbit); 6242: sentry __cerb(*this, true); 6242: if (__cerb) 6242: { 6242: ios_base::iostate __err = ios_base::goodbit; 6242: try 6242: { 6242: if (!this->fail()) 6242: { 6242: 6242: const pos_type __p = this->rdbuf()->pubseekoff(__off, __dir, 6242: ios_base::in); 6242: 6242: 6242: if (__p == pos_type(off_type(-1))) 6242: __err |= ios_base::failbit; 6242: } 6242: } 6242: catch(__cxxabiv1::__forced_unwind&) 6242: { 6242: this->_M_setstate(ios_base::badbit); 6242: throw; 6242: } 6242: catch(...) 6242: { this->_M_setstate(ios_base::badbit); } 6242: if (__err) 6242: this->setstate(__err); 6242: } 6242: return *this; 6242: } 6242: 6242: 6242: template 6242: basic_istream<_CharT, _Traits>& 6242: operator>>(basic_istream<_CharT, _Traits>& __in, _CharT& __c) 6242: { 6242: typedef basic_istream<_CharT, _Traits> __istream_type; 6242: typedef typename __istream_type::int_type __int_type; 6242: 6242: typename __istream_type::sentry __cerb(__in, false); 6242: if (__cerb) 6242: { 6242: ios_base::iostate __err = ios_base::goodbit; 6242: try 6242: { 6242: const __int_type __cb = __in.rdbuf()->sbumpc(); 6242: if (!_Traits::eq_int_type(__cb, _Traits::eof())) 6242: __c = _Traits::to_char_type(__cb); 6242: else 6242: __err |= (ios_base::eofbit | ios_base::failbit); 6242: } 6242: catch(__cxxabiv1::__forced_unwind&) 6242: { 6242: __in._M_setstate(ios_base::badbit); 6242: throw; 6242: } 6242: catch(...) 6242: { __in._M_setstate(ios_base::badbit); } 6242: if (__err) 6242: __in.setstate(__err); 6242: } 6242: return __in; 6242: } 6242: 6242: template 6242: basic_istream<_CharT, _Traits>& 6242: operator>>(basic_istream<_CharT, _Traits>& __in, _CharT* __s) 6242: { 6242: typedef basic_istream<_CharT, _Traits> __istream_type; 6242: typedef basic_streambuf<_CharT, _Traits> __streambuf_type; 6242: typedef typename _Traits::int_type int_type; 6242: typedef _CharT char_type; 6242: typedef ctype<_CharT> __ctype_type; 6242: 6242: streamsize __extracted = 0; 6242: ios_base::iostate __err = ios_base::goodbit; 6242: typename __istream_type::sentry __cerb(__in, false); 6242: if (__cerb) 6242: { 6242: try 6242: { 6242: 6242: streamsize __num = __in.width(); 6242: if (__num <= 0) 6242: __num = __gnu_cxx::__numeric_traits::__max; 6242: 6242: const __ctype_type& __ct = use_facet<__ctype_type>(__in.getloc()); 6242: 6242: const int_type __eof = _Traits::eof(); 6242: __streambuf_type* __sb = __in.rdbuf(); 6242: int_type __c = __sb->sgetc(); 6242: 6242: while (__extracted < __num - 1 6242: && !_Traits::eq_int_type(__c, __eof) 6242: && !__ct.is(ctype_base::space, 6242: _Traits::to_char_type(__c))) 6242: { 6242: *__s++ = _Traits::to_char_type(__c); 6242: ++__extracted; 6242: __c = __sb->snextc(); 6242: } 6242: if (_Traits::eq_int_type(__c, __eof)) 6242: __err |= ios_base::eofbit; 6242: 6242: 6242: 6242: *__s = char_type(); 6242: __in.width(0); 6242: } 6242: catch(__cxxabiv1::__forced_unwind&) 6242: { 6242: __in._M_setstate(ios_base::badbit); 6242: throw; 6242: } 6242: catch(...) 6242: { __in._M_setstate(ios_base::badbit); } 6242: } 6242: if (!__extracted) 6242: __err |= ios_base::failbit; 6242: if (__err) 6242: __in.setstate(__err); 6242: return __in; 6242: } 6242: 6242: 6242: template 6242: basic_istream<_CharT, _Traits>& 6242: ws(basic_istream<_CharT, _Traits>& __in) 6242: { 6242: typedef basic_istream<_CharT, _Traits> __istream_type; 6242: typedef basic_streambuf<_CharT, _Traits> __streambuf_type; 6242: typedef typename __istream_type::int_type __int_type; 6242: typedef ctype<_CharT> __ctype_type; 6242: 6242: const __ctype_type& __ct = use_facet<__ctype_type>(__in.getloc()); 6242: const __int_type __eof = _Traits::eof(); 6242: __streambuf_type* __sb = __in.rdbuf(); 6242: __int_type __c = __sb->sgetc(); 6242: 6242: while (!_Traits::eq_int_type(__c, __eof) 6242: && __ct.is(ctype_base::space, _Traits::to_char_type(__c))) 6242: __c = __sb->snextc(); 6242: 6242: if (_Traits::eq_int_type(__c, __eof)) 6242: __in.setstate(ios_base::eofbit); 6242: return __in; 6242: } 6242: 6242: 6242: 6242: 6242: extern template class basic_istream; 6242: extern template istream& ws(istream&); 6242: extern template istream& operator>>(istream&, char&); 6242: extern template istream& operator>>(istream&, char*); 6242: extern template istream& operator>>(istream&, unsigned char&); 6242: extern template istream& operator>>(istream&, signed char&); 6242: extern template istream& operator>>(istream&, unsigned char*); 6242: extern template istream& operator>>(istream&, signed char*); 6242: 6242: extern template istream& istream::_M_extract(unsigned short&); 6242: extern template istream& istream::_M_extract(unsigned int&); 6242: extern template istream& istream::_M_extract(long&); 6242: extern template istream& istream::_M_extract(unsigned long&); 6242: extern template istream& istream::_M_extract(bool&); 6242: 6242: extern template istream& istream::_M_extract(long long&); 6242: extern template istream& istream::_M_extract(unsigned long long&); 6242: 6242: extern template istream& istream::_M_extract(float&); 6242: extern template istream& istream::_M_extract(double&); 6242: extern template istream& istream::_M_extract(long double&); 6242: extern template istream& istream::_M_extract(void*&); 6242: 6242: extern template class basic_iostream; 6242: 6242: 6242: extern template class basic_istream; 6242: extern template wistream& ws(wistream&); 6242: extern template wistream& operator>>(wistream&, wchar_t&); 6242: extern template wistream& operator>>(wistream&, wchar_t*); 6242: 6242: extern template wistream& wistream::_M_extract(unsigned short&); 6242: extern template wistream& wistream::_M_extract(unsigned int&); 6242: extern template wistream& wistream::_M_extract(long&); 6242: extern template wistream& wistream::_M_extract(unsigned long&); 6242: extern template wistream& wistream::_M_extract(bool&); 6242: 6242: extern template wistream& wistream::_M_extract(long long&); 6242: extern template wistream& wistream::_M_extract(unsigned long long&); 6242: 6242: extern template wistream& wistream::_M_extract(float&); 6242: extern template wistream& wistream::_M_extract(double&); 6242: extern template wistream& wistream::_M_extract(long double&); 6242: extern template wistream& wistream::_M_extract(void*&); 6242: 6242: extern template class basic_iostream; 6242: 6242: 6242: 6242: 6242: } 6242: # 992 "/usr/include/c++/8/istream" 2 3 6242: # 66 "/usr/include/c++/8/iterator" 2 3 6242: # 1 "/usr/include/c++/8/bits/stream_iterator.h" 1 3 6242: # 33 "/usr/include/c++/8/bits/stream_iterator.h" 3 6242: 6242: # 34 "/usr/include/c++/8/bits/stream_iterator.h" 3 6242: 6242: 6242: 6242: namespace std __attribute__ ((__visibility__ ("default"))) 6242: { 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: template, typename _Dist = ptrdiff_t> 6242: class istream_iterator 6242: : public iterator 6242: { 6242: public: 6242: typedef _CharT char_type; 6242: typedef _Traits traits_type; 6242: typedef basic_istream<_CharT, _Traits> istream_type; 6242: 6242: private: 6242: istream_type* _M_stream; 6242: _Tp _M_value; 6242: bool _M_ok; 6242: 6242: public: 6242: 6242: constexpr istream_iterator() 6242: : _M_stream(0), _M_value(), _M_ok(false) {} 6242: 6242: 6242: istream_iterator(istream_type& __s) 6242: : _M_stream(std::__addressof(__s)) 6242: { _M_read(); } 6242: 6242: istream_iterator(const istream_iterator& __obj) 6242: : _M_stream(__obj._M_stream), _M_value(__obj._M_value), 6242: _M_ok(__obj._M_ok) 6242: { } 6242: 6242: const _Tp& 6242: operator*() const 6242: { 6242: 6242: 6242: ; 6242: return _M_value; 6242: } 6242: 6242: const _Tp* 6242: operator->() const { return std::__addressof((operator*())); } 6242: 6242: istream_iterator& 6242: operator++() 6242: { 6242: 6242: 6242: ; 6242: _M_read(); 6242: return *this; 6242: } 6242: 6242: istream_iterator 6242: operator++(int) 6242: { 6242: 6242: 6242: ; 6242: istream_iterator __tmp = *this; 6242: _M_read(); 6242: return __tmp; 6242: } 6242: 6242: bool 6242: _M_equal(const istream_iterator& __x) const 6242: { return (_M_ok == __x._M_ok) && (!_M_ok || _M_stream == __x._M_stream); } 6242: 6242: private: 6242: void 6242: _M_read() 6242: { 6242: _M_ok = (_M_stream && *_M_stream) ? true : false; 6242: if (_M_ok) 6242: { 6242: *_M_stream >> _M_value; 6242: _M_ok = *_M_stream ? true : false; 6242: } 6242: } 6242: }; 6242: 6242: 6242: template 6242: inline bool 6242: operator==(const istream_iterator<_Tp, _CharT, _Traits, _Dist>& __x, 6242: const istream_iterator<_Tp, _CharT, _Traits, _Dist>& __y) 6242: { return __x._M_equal(__y); } 6242: 6242: 6242: template 6242: inline bool 6242: operator!=(const istream_iterator<_Tp, _CharT, _Traits, _Dist>& __x, 6242: const istream_iterator<_Tp, _CharT, _Traits, _Dist>& __y) 6242: { return !__x._M_equal(__y); } 6242: # 152 "/usr/include/c++/8/bits/stream_iterator.h" 3 6242: template > 6242: class ostream_iterator 6242: : public iterator 6242: { 6242: public: 6242: 6242: 6242: typedef _CharT char_type; 6242: typedef _Traits traits_type; 6242: typedef basic_ostream<_CharT, _Traits> ostream_type; 6242: 6242: 6242: private: 6242: ostream_type* _M_stream; 6242: const _CharT* _M_string; 6242: 6242: public: 6242: 6242: ostream_iterator(ostream_type& __s) 6242: : _M_stream(std::__addressof(__s)), _M_string(0) {} 6242: # 184 "/usr/include/c++/8/bits/stream_iterator.h" 3 6242: ostream_iterator(ostream_type& __s, const _CharT* __c) 6242: : _M_stream(&__s), _M_string(__c) { } 6242: 6242: 6242: ostream_iterator(const ostream_iterator& __obj) 6242: : _M_stream(__obj._M_stream), _M_string(__obj._M_string) { } 6242: 6242: 6242: 6242: ostream_iterator& 6242: operator=(const _Tp& __value) 6242: { 6242: 6242: 6242: ; 6242: *_M_stream << __value; 6242: if (_M_string) *_M_stream << _M_string; 6242: return *this; 6242: } 6242: 6242: ostream_iterator& 6242: operator*() 6242: { return *this; } 6242: 6242: ostream_iterator& 6242: operator++() 6242: { return *this; } 6242: 6242: ostream_iterator& 6242: operator++(int) 6242: { return *this; } 6242: }; 6242: 6242: 6242: 6242: 6242: } 6242: # 67 "/usr/include/c++/8/iterator" 2 3 6242: # 7 "array_view.hh" 2 6242: 6242: 6242: # 8 "array_view.hh" 6242: namespace Kakoune 6242: { 6242: 6242: 6242: 6242: template 6242: class ArrayView 6242: { 6242: public: 6242: using size_t = std::size_t; 6242: 6242: constexpr ArrayView() 6242: : m_pointer(nullptr), m_size(0) {} 6242: 6242: constexpr ArrayView(T& oneval) 6242: : m_pointer(&oneval), m_size(1) {} 6242: 6242: constexpr ArrayView(T* pointer, size_t size) 6242: : m_pointer(pointer), m_size(size) {} 6242: 6242: constexpr ArrayView(T* begin, T* end) 6242: : m_pointer(begin), m_size(end - begin) {} 6242: 6242: template 6242: constexpr ArrayView(T(&array)[N]) : m_pointer(array), m_size(N) {} 6242: 6242: template 6242: constexpr ArrayView(const Iterator& begin, const Iterator& end) 6242: : m_pointer(&(*begin)), m_size(end - begin) {} 6242: 6242: template 6242: constexpr ArrayView(const std::vector& v) 6242: : m_pointer(&v[0]), m_size(v.size()) {} 6242: 6242: constexpr ArrayView(const std::initializer_list& v) 6242: : m_pointer(v.begin()), m_size(v.size()) {} 6242: 6242: constexpr T* pointer() const { return m_pointer; } 6242: constexpr size_t size() const { return m_size; } 6242: 6242: [[gnu::always_inline]] 6242: constexpr T& operator[](size_t n) const { return *(m_pointer + n); } 6242: 6242: constexpr T* begin() const { return m_pointer; } 6242: constexpr T* end() const { return m_pointer+m_size; } 6242: 6242: using reverse_iterator = std::reverse_iterator; 6242: constexpr reverse_iterator rbegin() const { return reverse_iterator(m_pointer+m_size); } 6242: constexpr reverse_iterator rend() const { return reverse_iterator(m_pointer); } 6242: 6242: constexpr T& front() const { return *m_pointer; } 6242: constexpr T& back() const { return *(m_pointer + m_size - 1); } 6242: 6242: constexpr bool empty() const { return m_size == 0; } 6242: 6242: constexpr ArrayView subrange(size_t first, size_t count = -1) const 6242: { 6242: return ArrayView(m_pointer + std::min(first, m_size), 6242: std::min(count, m_size - std::min(first, m_size))); 6242: } 6242: 6242: private: 6242: T* m_pointer; 6242: size_t m_size; 6242: }; 6242: 6242: template 6242: using ConstArrayView = ArrayView; 6242: 6242: template 6242: bool operator==(ArrayView lhs, ArrayView rhs) 6242: { 6242: if (lhs.size() != rhs.size()) 6242: return false; 6242: for (int i = 0; i < lhs.size(); ++i) 6242: { 6242: if (lhs[i] != rhs[i]) 6242: return false; 6242: } 6242: return true; 6242: } 6242: 6242: template 6242: bool operator!=(ArrayView lhs, ArrayView rhs) 6242: { 6242: return not (lhs == rhs); 6242: } 6242: 6242: } 6242: # 5 "normal.hh" 2 6242: # 1 "keys.hh" 1 6242: 6242: 6242: 6242: # 1 "coord.hh" 1 6242: 6242: 6242: 6242: # 1 "units.hh" 1 6242: 6242: 6242: 6242: # 1 "assert.hh" 1 6242: 6242: 6242: 6242: namespace Kakoune 6242: { 6242: 6242: class StringView; 6242: 6242: 6242: bool notify_fatal_error(StringView message); 6242: 6242: void on_assert_failed(const char* message); 6242: 6242: } 6242: # 5 "units.hh" 2 6242: # 1 "hash.hh" 1 6242: 6242: 6242: 6242: 6242: # 1 "/usr/include/c++/8/functional" 1 3 6242: # 46 "/usr/include/c++/8/functional" 3 6242: 6242: # 47 "/usr/include/c++/8/functional" 3 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: # 1 "/usr/include/c++/8/tuple" 1 3 6242: # 32 "/usr/include/c++/8/tuple" 3 6242: 6242: # 33 "/usr/include/c++/8/tuple" 3 6242: 6242: 6242: 6242: 6242: 6242: # 1 "/usr/include/c++/8/utility" 1 3 6242: # 58 "/usr/include/c++/8/utility" 3 6242: 6242: # 59 "/usr/include/c++/8/utility" 3 6242: # 69 "/usr/include/c++/8/utility" 3 6242: # 1 "/usr/include/c++/8/bits/stl_relops.h" 1 3 6242: # 67 "/usr/include/c++/8/bits/stl_relops.h" 3 6242: 6242: # 67 "/usr/include/c++/8/bits/stl_relops.h" 3 6242: namespace std __attribute__ ((__visibility__ ("default"))) 6242: { 6242: 6242: 6242: namespace rel_ops 6242: { 6242: # 85 "/usr/include/c++/8/bits/stl_relops.h" 3 6242: template 6242: inline bool 6242: operator!=(const _Tp& __x, const _Tp& __y) 6242: { return !(__x == __y); } 6242: # 98 "/usr/include/c++/8/bits/stl_relops.h" 3 6242: template 6242: inline bool 6242: operator>(const _Tp& __x, const _Tp& __y) 6242: { return __y < __x; } 6242: # 111 "/usr/include/c++/8/bits/stl_relops.h" 3 6242: template 6242: inline bool 6242: operator<=(const _Tp& __x, const _Tp& __y) 6242: { return !(__y < __x); } 6242: # 124 "/usr/include/c++/8/bits/stl_relops.h" 3 6242: template 6242: inline bool 6242: operator>=(const _Tp& __x, const _Tp& __y) 6242: { return !(__x < __y); } 6242: } 6242: 6242: 6242: } 6242: # 70 "/usr/include/c++/8/utility" 2 3 6242: # 82 "/usr/include/c++/8/utility" 3 6242: namespace std __attribute__ ((__visibility__ ("default"))) 6242: { 6242: 6242: 6242: 6242: template 6242: struct tuple_size; 6242: 6242: 6242: 6242: 6242: 6242: template::type, 6242: typename = typename enable_if::value>::type, 6242: size_t = tuple_size<_Tp>::value> 6242: using __enable_if_has_tuple_size = _Tp; 6242: 6242: template 6242: struct tuple_size> 6242: : public tuple_size<_Tp> { }; 6242: 6242: template 6242: struct tuple_size> 6242: : public tuple_size<_Tp> { }; 6242: 6242: template 6242: struct tuple_size> 6242: : public tuple_size<_Tp> { }; 6242: 6242: 6242: template 6242: struct tuple_element; 6242: 6242: 6242: template 6242: using __tuple_element_t = typename tuple_element<__i, _Tp>::type; 6242: 6242: template 6242: struct tuple_element<__i, const _Tp> 6242: { 6242: typedef typename add_const<__tuple_element_t<__i, _Tp>>::type type; 6242: }; 6242: 6242: template 6242: struct tuple_element<__i, volatile _Tp> 6242: { 6242: typedef typename add_volatile<__tuple_element_t<__i, _Tp>>::type type; 6242: }; 6242: 6242: template 6242: struct tuple_element<__i, const volatile _Tp> 6242: { 6242: typedef typename add_cv<__tuple_element_t<__i, _Tp>>::type type; 6242: }; 6242: # 148 "/usr/include/c++/8/utility" 3 6242: template 6242: struct __is_tuple_like_impl> : true_type 6242: { }; 6242: 6242: 6242: template 6242: struct tuple_size> 6242: : public integral_constant { }; 6242: 6242: 6242: template 6242: struct tuple_element<0, std::pair<_Tp1, _Tp2>> 6242: { typedef _Tp1 type; }; 6242: 6242: 6242: template 6242: struct tuple_element<1, std::pair<_Tp1, _Tp2>> 6242: { typedef _Tp2 type; }; 6242: 6242: template 6242: struct __pair_get; 6242: 6242: template<> 6242: struct __pair_get<0> 6242: { 6242: template 6242: static constexpr _Tp1& 6242: __get(std::pair<_Tp1, _Tp2>& __pair) noexcept 6242: { return __pair.first; } 6242: 6242: template 6242: static constexpr _Tp1&& 6242: __move_get(std::pair<_Tp1, _Tp2>&& __pair) noexcept 6242: { return std::forward<_Tp1>(__pair.first); } 6242: 6242: template 6242: static constexpr const _Tp1& 6242: __const_get(const std::pair<_Tp1, _Tp2>& __pair) noexcept 6242: { return __pair.first; } 6242: 6242: template 6242: static constexpr const _Tp1&& 6242: __const_move_get(const std::pair<_Tp1, _Tp2>&& __pair) noexcept 6242: { return std::forward(__pair.first); } 6242: }; 6242: 6242: template<> 6242: struct __pair_get<1> 6242: { 6242: template 6242: static constexpr _Tp2& 6242: __get(std::pair<_Tp1, _Tp2>& __pair) noexcept 6242: { return __pair.second; } 6242: 6242: template 6242: static constexpr _Tp2&& 6242: __move_get(std::pair<_Tp1, _Tp2>&& __pair) noexcept 6242: { return std::forward<_Tp2>(__pair.second); } 6242: 6242: template 6242: static constexpr const _Tp2& 6242: __const_get(const std::pair<_Tp1, _Tp2>& __pair) noexcept 6242: { return __pair.second; } 6242: 6242: template 6242: static constexpr const _Tp2&& 6242: __const_move_get(const std::pair<_Tp1, _Tp2>&& __pair) noexcept 6242: { return std::forward(__pair.second); } 6242: }; 6242: 6242: template 6242: constexpr typename tuple_element<_Int, std::pair<_Tp1, _Tp2>>::type& 6242: get(std::pair<_Tp1, _Tp2>& __in) noexcept 6242: { return __pair_get<_Int>::__get(__in); } 6242: 6242: template 6242: constexpr typename tuple_element<_Int, std::pair<_Tp1, _Tp2>>::type&& 6242: get(std::pair<_Tp1, _Tp2>&& __in) noexcept 6242: { return __pair_get<_Int>::__move_get(std::move(__in)); } 6242: 6242: template 6242: constexpr const typename tuple_element<_Int, std::pair<_Tp1, _Tp2>>::type& 6242: get(const std::pair<_Tp1, _Tp2>& __in) noexcept 6242: { return __pair_get<_Int>::__const_get(__in); } 6242: 6242: template 6242: constexpr const typename tuple_element<_Int, std::pair<_Tp1, _Tp2>>::type&& 6242: get(const std::pair<_Tp1, _Tp2>&& __in) noexcept 6242: { return __pair_get<_Int>::__const_move_get(std::move(__in)); } 6242: # 293 "/usr/include/c++/8/utility" 3 6242: template struct _Index_tuple { }; 6242: # 302 "/usr/include/c++/8/utility" 3 6242: template 6242: struct _Build_index_tuple 6242: { 6242: 6242: 6242: 6242: 6242: 6242: 6242: using __type = _Index_tuple<__integer_pack(_Num)...>; 6242: 6242: }; 6242: # 397 "/usr/include/c++/8/utility" 3 6242: 6242: } 6242: # 39 "/usr/include/c++/8/tuple" 2 3 6242: # 1 "/usr/include/c++/8/array" 1 3 6242: # 32 "/usr/include/c++/8/array" 3 6242: 6242: # 33 "/usr/include/c++/8/array" 3 6242: # 43 "/usr/include/c++/8/array" 3 6242: namespace std __attribute__ ((__visibility__ ("default"))) 6242: { 6242: 6242: 6242: template 6242: struct __array_traits 6242: { 6242: typedef _Tp _Type[_Nm]; 6242: typedef __is_swappable<_Tp> _Is_swappable; 6242: typedef __is_nothrow_swappable<_Tp> _Is_nothrow_swappable; 6242: 6242: static constexpr _Tp& 6242: _S_ref(const _Type& __t, std::size_t __n) noexcept 6242: { return const_cast<_Tp&>(__t[__n]); } 6242: 6242: static constexpr _Tp* 6242: _S_ptr(const _Type& __t) noexcept 6242: { return const_cast<_Tp*>(__t); } 6242: }; 6242: 6242: template 6242: struct __array_traits<_Tp, 0> 6242: { 6242: struct _Type { }; 6242: typedef true_type _Is_swappable; 6242: typedef true_type _Is_nothrow_swappable; 6242: 6242: static constexpr _Tp& 6242: _S_ref(const _Type&, std::size_t) noexcept 6242: { return *static_cast<_Tp*>(nullptr); } 6242: 6242: static constexpr _Tp* 6242: _S_ptr(const _Type&) noexcept 6242: { return nullptr; } 6242: }; 6242: # 93 "/usr/include/c++/8/array" 3 6242: template 6242: struct array 6242: { 6242: typedef _Tp value_type; 6242: typedef value_type* pointer; 6242: typedef const value_type* const_pointer; 6242: typedef value_type& reference; 6242: typedef const value_type& const_reference; 6242: typedef value_type* iterator; 6242: typedef const value_type* const_iterator; 6242: typedef std::size_t size_type; 6242: typedef std::ptrdiff_t difference_type; 6242: typedef std::reverse_iterator reverse_iterator; 6242: typedef std::reverse_iterator const_reverse_iterator; 6242: 6242: 6242: typedef std::__array_traits<_Tp, _Nm> _AT_Type; 6242: typename _AT_Type::_Type _M_elems; 6242: 6242: 6242: 6242: 6242: void 6242: fill(const value_type& __u) 6242: { std::fill_n(begin(), size(), __u); } 6242: 6242: void 6242: swap(array& __other) 6242: noexcept(_AT_Type::_Is_nothrow_swappable::value) 6242: { std::swap_ranges(begin(), end(), __other.begin()); } 6242: 6242: 6242: iterator 6242: begin() noexcept 6242: { return iterator(data()); } 6242: 6242: const_iterator 6242: begin() const noexcept 6242: { return const_iterator(data()); } 6242: 6242: iterator 6242: end() noexcept 6242: { return iterator(data() + _Nm); } 6242: 6242: const_iterator 6242: end() const noexcept 6242: { return const_iterator(data() + _Nm); } 6242: 6242: reverse_iterator 6242: rbegin() noexcept 6242: { return reverse_iterator(end()); } 6242: 6242: const_reverse_iterator 6242: rbegin() const noexcept 6242: { return const_reverse_iterator(end()); } 6242: 6242: reverse_iterator 6242: rend() noexcept 6242: { return reverse_iterator(begin()); } 6242: 6242: const_reverse_iterator 6242: rend() const noexcept 6242: { return const_reverse_iterator(begin()); } 6242: 6242: const_iterator 6242: cbegin() const noexcept 6242: { return const_iterator(data()); } 6242: 6242: const_iterator 6242: cend() const noexcept 6242: { return const_iterator(data() + _Nm); } 6242: 6242: const_reverse_iterator 6242: crbegin() const noexcept 6242: { return const_reverse_iterator(end()); } 6242: 6242: const_reverse_iterator 6242: crend() const noexcept 6242: { return const_reverse_iterator(begin()); } 6242: 6242: 6242: constexpr size_type 6242: size() const noexcept { return _Nm; } 6242: 6242: constexpr size_type 6242: max_size() const noexcept { return _Nm; } 6242: 6242: constexpr bool 6242: empty() const noexcept { return size() == 0; } 6242: 6242: 6242: reference 6242: operator[](size_type __n) noexcept 6242: { return _AT_Type::_S_ref(_M_elems, __n); } 6242: 6242: constexpr const_reference 6242: operator[](size_type __n) const noexcept 6242: { return _AT_Type::_S_ref(_M_elems, __n); } 6242: 6242: reference 6242: at(size_type __n) 6242: { 6242: if (__n >= _Nm) 6242: std::__throw_out_of_range_fmt(("array::at: __n (which is %zu) " ">= _Nm (which is %zu)") 6242: , 6242: __n, _Nm); 6242: return _AT_Type::_S_ref(_M_elems, __n); 6242: } 6242: 6242: constexpr const_reference 6242: at(size_type __n) const 6242: { 6242: 6242: 6242: return __n < _Nm ? _AT_Type::_S_ref(_M_elems, __n) 6242: : (std::__throw_out_of_range_fmt(("array::at: __n (which is %zu) " ">= _Nm (which is %zu)") 6242: , 6242: __n, _Nm), 6242: _AT_Type::_S_ref(_M_elems, 0)); 6242: } 6242: 6242: reference 6242: front() noexcept 6242: { return *begin(); } 6242: 6242: constexpr const_reference 6242: front() const noexcept 6242: { return _AT_Type::_S_ref(_M_elems, 0); } 6242: 6242: reference 6242: back() noexcept 6242: { return _Nm ? *(end() - 1) : *end(); } 6242: 6242: constexpr const_reference 6242: back() const noexcept 6242: { 6242: return _Nm ? _AT_Type::_S_ref(_M_elems, _Nm - 1) 6242: : _AT_Type::_S_ref(_M_elems, 0); 6242: } 6242: 6242: pointer 6242: data() noexcept 6242: { return _AT_Type::_S_ptr(_M_elems); } 6242: 6242: const_pointer 6242: data() const noexcept 6242: { return _AT_Type::_S_ptr(_M_elems); } 6242: }; 6242: # 250 "/usr/include/c++/8/array" 3 6242: template 6242: inline bool 6242: operator==(const array<_Tp, _Nm>& __one, const array<_Tp, _Nm>& __two) 6242: { return std::equal(__one.begin(), __one.end(), __two.begin()); } 6242: 6242: template 6242: inline bool 6242: operator!=(const array<_Tp, _Nm>& __one, const array<_Tp, _Nm>& __two) 6242: { return !(__one == __two); } 6242: 6242: template 6242: inline bool 6242: operator<(const array<_Tp, _Nm>& __a, const array<_Tp, _Nm>& __b) 6242: { 6242: return std::lexicographical_compare(__a.begin(), __a.end(), 6242: __b.begin(), __b.end()); 6242: } 6242: 6242: template 6242: inline bool 6242: operator>(const array<_Tp, _Nm>& __one, const array<_Tp, _Nm>& __two) 6242: { return __two < __one; } 6242: 6242: template 6242: inline bool 6242: operator<=(const array<_Tp, _Nm>& __one, const array<_Tp, _Nm>& __two) 6242: { return !(__one > __two); } 6242: 6242: template 6242: inline bool 6242: operator>=(const array<_Tp, _Nm>& __one, const array<_Tp, _Nm>& __two) 6242: { return !(__one < __two); } 6242: 6242: 6242: template 6242: inline 6242: 6242: 6242: typename enable_if< 6242: std::__array_traits<_Tp, _Nm>::_Is_swappable::value 6242: >::type 6242: 6242: 6242: 6242: swap(array<_Tp, _Nm>& __one, array<_Tp, _Nm>& __two) 6242: noexcept(noexcept(__one.swap(__two))) 6242: { __one.swap(__two); } 6242: 6242: 6242: template 6242: typename enable_if< 6242: !std::__array_traits<_Tp, _Nm>::_Is_swappable::value>::type 6242: swap(array<_Tp, _Nm>&, array<_Tp, _Nm>&) = delete; 6242: 6242: 6242: template 6242: constexpr _Tp& 6242: get(array<_Tp, _Nm>& __arr) noexcept 6242: { 6242: static_assert(_Int < _Nm, "array index is within bounds"); 6242: return std::__array_traits<_Tp, _Nm>:: 6242: _S_ref(__arr._M_elems, _Int); 6242: } 6242: 6242: template 6242: constexpr _Tp&& 6242: get(array<_Tp, _Nm>&& __arr) noexcept 6242: { 6242: static_assert(_Int < _Nm, "array index is within bounds"); 6242: return std::move(std::get<_Int>(__arr)); 6242: } 6242: 6242: template 6242: constexpr const _Tp& 6242: get(const array<_Tp, _Nm>& __arr) noexcept 6242: { 6242: static_assert(_Int < _Nm, "array index is within bounds"); 6242: return std::__array_traits<_Tp, _Nm>:: 6242: _S_ref(__arr._M_elems, _Int); 6242: } 6242: 6242: template 6242: constexpr const _Tp&& 6242: get(const array<_Tp, _Nm>&& __arr) noexcept 6242: { 6242: static_assert(_Int < _Nm, "array index is within bounds"); 6242: return std::move(std::get<_Int>(__arr)); 6242: } 6242: 6242: 6242: } 6242: 6242: namespace std __attribute__ ((__visibility__ ("default"))) 6242: { 6242: 6242: 6242: 6242: 6242: 6242: template 6242: struct tuple_size; 6242: 6242: 6242: template 6242: struct tuple_size> 6242: : public integral_constant { }; 6242: 6242: 6242: template 6242: struct tuple_element; 6242: 6242: 6242: template 6242: struct tuple_element<_Int, std::array<_Tp, _Nm>> 6242: { 6242: static_assert(_Int < _Nm, "index is out of bounds"); 6242: typedef _Tp type; 6242: }; 6242: 6242: template 6242: struct __is_tuple_like_impl> : true_type 6242: { }; 6242: 6242: 6242: } 6242: # 40 "/usr/include/c++/8/tuple" 2 3 6242: # 1 "/usr/include/c++/8/bits/uses_allocator.h" 1 3 6242: # 35 "/usr/include/c++/8/bits/uses_allocator.h" 3 6242: namespace std __attribute__ ((__visibility__ ("default"))) 6242: { 6242: 6242: 6242: struct __erased_type { }; 6242: 6242: template 6242: using __is_erased_or_convertible 6242: = __or_, is_convertible<_Alloc, _Tp>>; 6242: 6242: 6242: struct allocator_arg_t { explicit allocator_arg_t() = default; }; 6242: 6242: constexpr allocator_arg_t allocator_arg = 6242: allocator_arg_t(); 6242: 6242: template> 6242: struct __uses_allocator_helper 6242: : false_type { }; 6242: 6242: template 6242: struct __uses_allocator_helper<_Tp, _Alloc, 6242: __void_t> 6242: : __is_erased_or_convertible<_Alloc, typename _Tp::allocator_type>::type 6242: { }; 6242: 6242: 6242: template 6242: struct uses_allocator 6242: : __uses_allocator_helper<_Tp, _Alloc>::type 6242: { }; 6242: 6242: struct __uses_alloc_base { }; 6242: 6242: struct __uses_alloc0 : __uses_alloc_base 6242: { 6242: struct _Sink { void operator=(const void*) { } } _M_a; 6242: }; 6242: 6242: template 6242: struct __uses_alloc1 : __uses_alloc_base { const _Alloc* _M_a; }; 6242: 6242: template 6242: struct __uses_alloc2 : __uses_alloc_base { const _Alloc* _M_a; }; 6242: 6242: template 6242: struct __uses_alloc; 6242: 6242: template 6242: struct __uses_alloc 6242: : conditional< 6242: is_constructible<_Tp, allocator_arg_t, _Alloc, _Args...>::value, 6242: __uses_alloc1<_Alloc>, 6242: __uses_alloc2<_Alloc>>::type 6242: { 6242: static_assert(__or_< 6242: is_constructible<_Tp, allocator_arg_t, _Alloc, _Args...>, 6242: is_constructible<_Tp, _Args..., _Alloc>>::value, "construction with" 6242: " an allocator must be possible if uses_allocator is true"); 6242: }; 6242: 6242: template 6242: struct __uses_alloc 6242: : __uses_alloc0 { }; 6242: 6242: template 6242: using __uses_alloc_t = 6242: __uses_alloc::value, _Tp, _Alloc, _Args...>; 6242: 6242: template 6242: inline __uses_alloc_t<_Tp, _Alloc, _Args...> 6242: __use_alloc(const _Alloc& __a) 6242: { 6242: __uses_alloc_t<_Tp, _Alloc, _Args...> __ret; 6242: __ret._M_a = std::__addressof(__a); 6242: return __ret; 6242: } 6242: 6242: template 6242: void 6242: __use_alloc(const _Alloc&&) = delete; 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: template class _Predicate, 6242: typename _Tp, typename _Alloc, typename... _Args> 6242: struct __is_uses_allocator_predicate 6242: : conditional::value, 6242: __or_<_Predicate<_Tp, allocator_arg_t, _Alloc, _Args...>, 6242: _Predicate<_Tp, _Args..., _Alloc>>, 6242: _Predicate<_Tp, _Args...>>::type { }; 6242: 6242: template 6242: struct __is_uses_allocator_constructible 6242: : __is_uses_allocator_predicate 6242: { }; 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: template 6242: struct __is_nothrow_uses_allocator_constructible 6242: : __is_uses_allocator_predicate 6242: { }; 6242: # 156 "/usr/include/c++/8/bits/uses_allocator.h" 3 6242: template 6242: void __uses_allocator_construct_impl(__uses_alloc0 __a, _Tp* __ptr, 6242: _Args&&... __args) 6242: { ::new ((void*)__ptr) _Tp(std::forward<_Args>(__args)...); } 6242: 6242: template 6242: void __uses_allocator_construct_impl(__uses_alloc1<_Alloc> __a, _Tp* __ptr, 6242: _Args&&... __args) 6242: { 6242: ::new ((void*)__ptr) _Tp(allocator_arg, *__a._M_a, 6242: std::forward<_Args>(__args)...); 6242: } 6242: 6242: template 6242: void __uses_allocator_construct_impl(__uses_alloc2<_Alloc> __a, _Tp* __ptr, 6242: _Args&&... __args) 6242: { ::new ((void*)__ptr) _Tp(std::forward<_Args>(__args)..., *__a._M_a); } 6242: 6242: template 6242: void __uses_allocator_construct(const _Alloc& __a, _Tp* __ptr, 6242: _Args&&... __args) 6242: { 6242: __uses_allocator_construct_impl(__use_alloc<_Tp, _Alloc, _Args...>(__a), 6242: __ptr, std::forward<_Args>(__args)...); 6242: } 6242: 6242: 6242: } 6242: # 41 "/usr/include/c++/8/tuple" 2 3 6242: # 1 "/usr/include/c++/8/bits/invoke.h" 1 3 6242: # 33 "/usr/include/c++/8/bits/invoke.h" 3 6242: 6242: # 34 "/usr/include/c++/8/bits/invoke.h" 3 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: namespace std __attribute__ ((__visibility__ ("default"))) 6242: { 6242: 6242: # 52 "/usr/include/c++/8/bits/invoke.h" 3 6242: template::type> 6242: constexpr _Up&& 6242: __invfwd(typename remove_reference<_Tp>::type& __t) noexcept 6242: { return static_cast<_Up&&>(__t); } 6242: 6242: template 6242: constexpr _Res 6242: __invoke_impl(__invoke_other, _Fn&& __f, _Args&&... __args) 6242: { return std::forward<_Fn>(__f)(std::forward<_Args>(__args)...); } 6242: 6242: template 6242: constexpr _Res 6242: __invoke_impl(__invoke_memfun_ref, _MemFun&& __f, _Tp&& __t, 6242: _Args&&... __args) 6242: { return (__invfwd<_Tp>(__t).*__f)(std::forward<_Args>(__args)...); } 6242: 6242: template 6242: constexpr _Res 6242: __invoke_impl(__invoke_memfun_deref, _MemFun&& __f, _Tp&& __t, 6242: _Args&&... __args) 6242: { 6242: return ((*std::forward<_Tp>(__t)).*__f)(std::forward<_Args>(__args)...); 6242: } 6242: 6242: template 6242: constexpr _Res 6242: __invoke_impl(__invoke_memobj_ref, _MemPtr&& __f, _Tp&& __t) 6242: { return __invfwd<_Tp>(__t).*__f; } 6242: 6242: template 6242: constexpr _Res 6242: __invoke_impl(__invoke_memobj_deref, _MemPtr&& __f, _Tp&& __t) 6242: { return (*std::forward<_Tp>(__t)).*__f; } 6242: 6242: 6242: template 6242: constexpr typename __invoke_result<_Callable, _Args...>::type 6242: __invoke(_Callable&& __fn, _Args&&... __args) 6242: noexcept(__is_nothrow_invocable<_Callable, _Args...>::value) 6242: { 6242: using __result = __invoke_result<_Callable, _Args...>; 6242: using __type = typename __result::type; 6242: using __tag = typename __result::__invoke_type; 6242: return std::__invoke_impl<__type>(__tag{}, std::forward<_Callable>(__fn), 6242: std::forward<_Args>(__args)...); 6242: } 6242: 6242: 6242: } 6242: # 42 "/usr/include/c++/8/tuple" 2 3 6242: 6242: namespace std __attribute__ ((__visibility__ ("default"))) 6242: { 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: template 6242: class tuple; 6242: 6242: template 6242: struct __is_empty_non_tuple : is_empty<_Tp> { }; 6242: 6242: 6242: template 6242: struct __is_empty_non_tuple> : false_type { }; 6242: 6242: 6242: template 6242: using __empty_not_final 6242: = typename conditional<__is_final(_Tp), false_type, 6242: __is_empty_non_tuple<_Tp>>::type; 6242: 6242: template::value> 6242: struct _Head_base; 6242: 6242: template 6242: struct _Head_base<_Idx, _Head, true> 6242: : public _Head 6242: { 6242: constexpr _Head_base() 6242: : _Head() { } 6242: 6242: constexpr _Head_base(const _Head& __h) 6242: : _Head(__h) { } 6242: 6242: constexpr _Head_base(const _Head_base&) = default; 6242: constexpr _Head_base(_Head_base&&) = default; 6242: 6242: template 6242: constexpr _Head_base(_UHead&& __h) 6242: : _Head(std::forward<_UHead>(__h)) { } 6242: 6242: _Head_base(allocator_arg_t, __uses_alloc0) 6242: : _Head() { } 6242: 6242: template 6242: _Head_base(allocator_arg_t, __uses_alloc1<_Alloc> __a) 6242: : _Head(allocator_arg, *__a._M_a) { } 6242: 6242: template 6242: _Head_base(allocator_arg_t, __uses_alloc2<_Alloc> __a) 6242: : _Head(*__a._M_a) { } 6242: 6242: template 6242: _Head_base(__uses_alloc0, _UHead&& __uhead) 6242: : _Head(std::forward<_UHead>(__uhead)) { } 6242: 6242: template 6242: _Head_base(__uses_alloc1<_Alloc> __a, _UHead&& __uhead) 6242: : _Head(allocator_arg, *__a._M_a, std::forward<_UHead>(__uhead)) { } 6242: 6242: template 6242: _Head_base(__uses_alloc2<_Alloc> __a, _UHead&& __uhead) 6242: : _Head(std::forward<_UHead>(__uhead), *__a._M_a) { } 6242: 6242: static constexpr _Head& 6242: _M_head(_Head_base& __b) noexcept { return __b; } 6242: 6242: static constexpr const _Head& 6242: _M_head(const _Head_base& __b) noexcept { return __b; } 6242: }; 6242: 6242: template 6242: struct _Head_base<_Idx, _Head, false> 6242: { 6242: constexpr _Head_base() 6242: : _M_head_impl() { } 6242: 6242: constexpr _Head_base(const _Head& __h) 6242: : _M_head_impl(__h) { } 6242: 6242: constexpr _Head_base(const _Head_base&) = default; 6242: constexpr _Head_base(_Head_base&&) = default; 6242: 6242: template 6242: constexpr _Head_base(_UHead&& __h) 6242: : _M_head_impl(std::forward<_UHead>(__h)) { } 6242: 6242: _Head_base(allocator_arg_t, __uses_alloc0) 6242: : _M_head_impl() { } 6242: 6242: template 6242: _Head_base(allocator_arg_t, __uses_alloc1<_Alloc> __a) 6242: : _M_head_impl(allocator_arg, *__a._M_a) { } 6242: 6242: template 6242: _Head_base(allocator_arg_t, __uses_alloc2<_Alloc> __a) 6242: : _M_head_impl(*__a._M_a) { } 6242: 6242: template 6242: _Head_base(__uses_alloc0, _UHead&& __uhead) 6242: : _M_head_impl(std::forward<_UHead>(__uhead)) { } 6242: 6242: template 6242: _Head_base(__uses_alloc1<_Alloc> __a, _UHead&& __uhead) 6242: : _M_head_impl(allocator_arg, *__a._M_a, std::forward<_UHead>(__uhead)) 6242: { } 6242: 6242: template 6242: _Head_base(__uses_alloc2<_Alloc> __a, _UHead&& __uhead) 6242: : _M_head_impl(std::forward<_UHead>(__uhead), *__a._M_a) { } 6242: 6242: static constexpr _Head& 6242: _M_head(_Head_base& __b) noexcept { return __b._M_head_impl; } 6242: 6242: static constexpr const _Head& 6242: _M_head(const _Head_base& __b) noexcept { return __b._M_head_impl; } 6242: 6242: _Head _M_head_impl; 6242: }; 6242: # 176 "/usr/include/c++/8/tuple" 3 6242: template 6242: struct _Tuple_impl; 6242: 6242: 6242: 6242: 6242: 6242: 6242: template 6242: struct _Tuple_impl<_Idx, _Head, _Tail...> 6242: : public _Tuple_impl<_Idx + 1, _Tail...>, 6242: private _Head_base<_Idx, _Head> 6242: { 6242: template friend class _Tuple_impl; 6242: 6242: typedef _Tuple_impl<_Idx + 1, _Tail...> _Inherited; 6242: typedef _Head_base<_Idx, _Head> _Base; 6242: 6242: static constexpr _Head& 6242: _M_head(_Tuple_impl& __t) noexcept { return _Base::_M_head(__t); } 6242: 6242: static constexpr const _Head& 6242: _M_head(const _Tuple_impl& __t) noexcept { return _Base::_M_head(__t); } 6242: 6242: static constexpr _Inherited& 6242: _M_tail(_Tuple_impl& __t) noexcept { return __t; } 6242: 6242: static constexpr const _Inherited& 6242: _M_tail(const _Tuple_impl& __t) noexcept { return __t; } 6242: 6242: constexpr _Tuple_impl() 6242: : _Inherited(), _Base() { } 6242: 6242: explicit 6242: constexpr _Tuple_impl(const _Head& __head, const _Tail&... __tail) 6242: : _Inherited(__tail...), _Base(__head) { } 6242: 6242: template::type> 6242: explicit 6242: constexpr _Tuple_impl(_UHead&& __head, _UTail&&... __tail) 6242: : _Inherited(std::forward<_UTail>(__tail)...), 6242: _Base(std::forward<_UHead>(__head)) { } 6242: 6242: constexpr _Tuple_impl(const _Tuple_impl&) = default; 6242: 6242: constexpr 6242: _Tuple_impl(_Tuple_impl&& __in) 6242: noexcept(__and_, 6242: is_nothrow_move_constructible<_Inherited>>::value) 6242: : _Inherited(std::move(_M_tail(__in))), 6242: _Base(std::forward<_Head>(_M_head(__in))) { } 6242: 6242: template 6242: constexpr _Tuple_impl(const _Tuple_impl<_Idx, _UElements...>& __in) 6242: : _Inherited(_Tuple_impl<_Idx, _UElements...>::_M_tail(__in)), 6242: _Base(_Tuple_impl<_Idx, _UElements...>::_M_head(__in)) { } 6242: 6242: template 6242: constexpr _Tuple_impl(_Tuple_impl<_Idx, _UHead, _UTails...>&& __in) 6242: : _Inherited(std::move 6242: (_Tuple_impl<_Idx, _UHead, _UTails...>::_M_tail(__in))), 6242: _Base(std::forward<_UHead> 6242: (_Tuple_impl<_Idx, _UHead, _UTails...>::_M_head(__in))) { } 6242: 6242: template 6242: _Tuple_impl(allocator_arg_t __tag, const _Alloc& __a) 6242: : _Inherited(__tag, __a), 6242: _Base(__tag, __use_alloc<_Head>(__a)) { } 6242: 6242: template 6242: _Tuple_impl(allocator_arg_t __tag, const _Alloc& __a, 6242: const _Head& __head, const _Tail&... __tail) 6242: : _Inherited(__tag, __a, __tail...), 6242: _Base(__use_alloc<_Head, _Alloc, _Head>(__a), __head) { } 6242: 6242: template::type> 6242: _Tuple_impl(allocator_arg_t __tag, const _Alloc& __a, 6242: _UHead&& __head, _UTail&&... __tail) 6242: : _Inherited(__tag, __a, std::forward<_UTail>(__tail)...), 6242: _Base(__use_alloc<_Head, _Alloc, _UHead>(__a), 6242: std::forward<_UHead>(__head)) { } 6242: 6242: template 6242: _Tuple_impl(allocator_arg_t __tag, const _Alloc& __a, 6242: const _Tuple_impl& __in) 6242: : _Inherited(__tag, __a, _M_tail(__in)), 6242: _Base(__use_alloc<_Head, _Alloc, _Head>(__a), _M_head(__in)) { } 6242: 6242: template 6242: _Tuple_impl(allocator_arg_t __tag, const _Alloc& __a, 6242: _Tuple_impl&& __in) 6242: : _Inherited(__tag, __a, std::move(_M_tail(__in))), 6242: _Base(__use_alloc<_Head, _Alloc, _Head>(__a), 6242: std::forward<_Head>(_M_head(__in))) { } 6242: 6242: template 6242: _Tuple_impl(allocator_arg_t __tag, const _Alloc& __a, 6242: const _Tuple_impl<_Idx, _UElements...>& __in) 6242: : _Inherited(__tag, __a, 6242: _Tuple_impl<_Idx, _UElements...>::_M_tail(__in)), 6242: _Base(__use_alloc<_Head, _Alloc, _Head>(__a), 6242: _Tuple_impl<_Idx, _UElements...>::_M_head(__in)) { } 6242: 6242: template 6242: _Tuple_impl(allocator_arg_t __tag, const _Alloc& __a, 6242: _Tuple_impl<_Idx, _UHead, _UTails...>&& __in) 6242: : _Inherited(__tag, __a, std::move 6242: (_Tuple_impl<_Idx, _UHead, _UTails...>::_M_tail(__in))), 6242: _Base(__use_alloc<_Head, _Alloc, _UHead>(__a), 6242: std::forward<_UHead> 6242: (_Tuple_impl<_Idx, _UHead, _UTails...>::_M_head(__in))) { } 6242: 6242: _Tuple_impl& 6242: operator=(const _Tuple_impl& __in) 6242: { 6242: _M_head(*this) = _M_head(__in); 6242: _M_tail(*this) = _M_tail(__in); 6242: return *this; 6242: } 6242: 6242: _Tuple_impl& 6242: operator=(_Tuple_impl&& __in) 6242: noexcept(__and_, 6242: is_nothrow_move_assignable<_Inherited>>::value) 6242: { 6242: _M_head(*this) = std::forward<_Head>(_M_head(__in)); 6242: _M_tail(*this) = std::move(_M_tail(__in)); 6242: return *this; 6242: } 6242: 6242: template 6242: _Tuple_impl& 6242: operator=(const _Tuple_impl<_Idx, _UElements...>& __in) 6242: { 6242: _M_head(*this) = _Tuple_impl<_Idx, _UElements...>::_M_head(__in); 6242: _M_tail(*this) = _Tuple_impl<_Idx, _UElements...>::_M_tail(__in); 6242: return *this; 6242: } 6242: 6242: template 6242: _Tuple_impl& 6242: operator=(_Tuple_impl<_Idx, _UHead, _UTails...>&& __in) 6242: { 6242: _M_head(*this) = std::forward<_UHead> 6242: (_Tuple_impl<_Idx, _UHead, _UTails...>::_M_head(__in)); 6242: _M_tail(*this) = std::move 6242: (_Tuple_impl<_Idx, _UHead, _UTails...>::_M_tail(__in)); 6242: return *this; 6242: } 6242: 6242: protected: 6242: void 6242: _M_swap(_Tuple_impl& __in) 6242: noexcept(__is_nothrow_swappable<_Head>::value 6242: && noexcept(_M_tail(__in)._M_swap(_M_tail(__in)))) 6242: { 6242: using std::swap; 6242: swap(_M_head(*this), _M_head(__in)); 6242: _Inherited::_M_swap(_M_tail(__in)); 6242: } 6242: }; 6242: 6242: 6242: template 6242: struct _Tuple_impl<_Idx, _Head> 6242: : private _Head_base<_Idx, _Head> 6242: { 6242: template friend class _Tuple_impl; 6242: 6242: typedef _Head_base<_Idx, _Head> _Base; 6242: 6242: static constexpr _Head& 6242: _M_head(_Tuple_impl& __t) noexcept { return _Base::_M_head(__t); } 6242: 6242: static constexpr const _Head& 6242: _M_head(const _Tuple_impl& __t) noexcept { return _Base::_M_head(__t); } 6242: 6242: constexpr _Tuple_impl() 6242: : _Base() { } 6242: 6242: explicit 6242: constexpr _Tuple_impl(const _Head& __head) 6242: : _Base(__head) { } 6242: 6242: template 6242: explicit 6242: constexpr _Tuple_impl(_UHead&& __head) 6242: : _Base(std::forward<_UHead>(__head)) { } 6242: 6242: constexpr _Tuple_impl(const _Tuple_impl&) = default; 6242: 6242: constexpr 6242: _Tuple_impl(_Tuple_impl&& __in) 6242: noexcept(is_nothrow_move_constructible<_Head>::value) 6242: : _Base(std::forward<_Head>(_M_head(__in))) { } 6242: 6242: template 6242: constexpr _Tuple_impl(const _Tuple_impl<_Idx, _UHead>& __in) 6242: : _Base(_Tuple_impl<_Idx, _UHead>::_M_head(__in)) { } 6242: 6242: template 6242: constexpr _Tuple_impl(_Tuple_impl<_Idx, _UHead>&& __in) 6242: : _Base(std::forward<_UHead>(_Tuple_impl<_Idx, _UHead>::_M_head(__in))) 6242: { } 6242: 6242: template 6242: _Tuple_impl(allocator_arg_t __tag, const _Alloc& __a) 6242: : _Base(__tag, __use_alloc<_Head>(__a)) { } 6242: 6242: template 6242: _Tuple_impl(allocator_arg_t __tag, const _Alloc& __a, 6242: const _Head& __head) 6242: : _Base(__use_alloc<_Head, _Alloc, _Head>(__a), __head) { } 6242: 6242: template 6242: _Tuple_impl(allocator_arg_t __tag, const _Alloc& __a, 6242: _UHead&& __head) 6242: : _Base(__use_alloc<_Head, _Alloc, _UHead>(__a), 6242: std::forward<_UHead>(__head)) { } 6242: 6242: template 6242: _Tuple_impl(allocator_arg_t __tag, const _Alloc& __a, 6242: const _Tuple_impl& __in) 6242: : _Base(__use_alloc<_Head, _Alloc, _Head>(__a), _M_head(__in)) { } 6242: 6242: template 6242: _Tuple_impl(allocator_arg_t __tag, const _Alloc& __a, 6242: _Tuple_impl&& __in) 6242: : _Base(__use_alloc<_Head, _Alloc, _Head>(__a), 6242: std::forward<_Head>(_M_head(__in))) { } 6242: 6242: template 6242: _Tuple_impl(allocator_arg_t __tag, const _Alloc& __a, 6242: const _Tuple_impl<_Idx, _UHead>& __in) 6242: : _Base(__use_alloc<_Head, _Alloc, _Head>(__a), 6242: _Tuple_impl<_Idx, _UHead>::_M_head(__in)) { } 6242: 6242: template 6242: _Tuple_impl(allocator_arg_t __tag, const _Alloc& __a, 6242: _Tuple_impl<_Idx, _UHead>&& __in) 6242: : _Base(__use_alloc<_Head, _Alloc, _UHead>(__a), 6242: std::forward<_UHead>(_Tuple_impl<_Idx, _UHead>::_M_head(__in))) 6242: { } 6242: 6242: _Tuple_impl& 6242: operator=(const _Tuple_impl& __in) 6242: { 6242: _M_head(*this) = _M_head(__in); 6242: return *this; 6242: } 6242: 6242: _Tuple_impl& 6242: operator=(_Tuple_impl&& __in) 6242: noexcept(is_nothrow_move_assignable<_Head>::value) 6242: { 6242: _M_head(*this) = std::forward<_Head>(_M_head(__in)); 6242: return *this; 6242: } 6242: 6242: template 6242: _Tuple_impl& 6242: operator=(const _Tuple_impl<_Idx, _UHead>& __in) 6242: { 6242: _M_head(*this) = _Tuple_impl<_Idx, _UHead>::_M_head(__in); 6242: return *this; 6242: } 6242: 6242: template 6242: _Tuple_impl& 6242: operator=(_Tuple_impl<_Idx, _UHead>&& __in) 6242: { 6242: _M_head(*this) 6242: = std::forward<_UHead>(_Tuple_impl<_Idx, _UHead>::_M_head(__in)); 6242: return *this; 6242: } 6242: 6242: protected: 6242: void 6242: _M_swap(_Tuple_impl& __in) 6242: noexcept(__is_nothrow_swappable<_Head>::value) 6242: { 6242: using std::swap; 6242: swap(_M_head(*this), _M_head(__in)); 6242: } 6242: }; 6242: 6242: 6242: 6242: template 6242: struct _TC 6242: { 6242: template 6242: static constexpr bool _ConstructibleTuple() 6242: { 6242: return __and_...>::value; 6242: } 6242: 6242: template 6242: static constexpr bool _ImplicitlyConvertibleTuple() 6242: { 6242: return __and_...>::value; 6242: } 6242: 6242: template 6242: static constexpr bool _MoveConstructibleTuple() 6242: { 6242: return __and_...>::value; 6242: } 6242: 6242: template 6242: static constexpr bool _ImplicitlyMoveConvertibleTuple() 6242: { 6242: return __and_...>::value; 6242: } 6242: 6242: template 6242: static constexpr bool _NonNestedTuple() 6242: { 6242: return __and_<__not_, 6242: typename remove_cv< 6242: typename remove_reference<_SrcTuple>::type 6242: >::type>>, 6242: __not_>, 6242: __not_> 6242: >::value; 6242: } 6242: template 6242: static constexpr bool _NotSameTuple() 6242: { 6242: return __not_, 6242: typename remove_const< 6242: typename remove_reference<_UElements...>::type 6242: >::type>>::value; 6242: } 6242: }; 6242: 6242: template 6242: struct _TC 6242: { 6242: template 6242: static constexpr bool _ConstructibleTuple() 6242: { 6242: return false; 6242: } 6242: 6242: template 6242: static constexpr bool _ImplicitlyConvertibleTuple() 6242: { 6242: return false; 6242: } 6242: 6242: template 6242: static constexpr bool _MoveConstructibleTuple() 6242: { 6242: return false; 6242: } 6242: 6242: template 6242: static constexpr bool _ImplicitlyMoveConvertibleTuple() 6242: { 6242: return false; 6242: } 6242: 6242: template 6242: static constexpr bool _NonNestedTuple() 6242: { 6242: return true; 6242: } 6242: template 6242: static constexpr bool _NotSameTuple() 6242: { 6242: return true; 6242: } 6242: }; 6242: 6242: 6242: template 6242: class tuple : public _Tuple_impl<0, _Elements...> 6242: { 6242: typedef _Tuple_impl<0, _Elements...> _Inherited; 6242: 6242: 6242: 6242: template 6242: struct _TC2 6242: { 6242: static constexpr bool _DefaultConstructibleTuple() 6242: { 6242: return __and_...>::value; 6242: } 6242: static constexpr bool _ImplicitlyDefaultConstructibleTuple() 6242: { 6242: return __and_<__is_implicitly_default_constructible<_Elements>...> 6242: ::value; 6242: } 6242: }; 6242: 6242: public: 6242: template:: 6242: _ImplicitlyDefaultConstructibleTuple(), 6242: bool>::type = true> 6242: constexpr tuple() 6242: : _Inherited() { } 6242: 6242: template:: 6242: _DefaultConstructibleTuple() 6242: && 6242: !_TC2<_Dummy>:: 6242: _ImplicitlyDefaultConstructibleTuple(), 6242: bool>::type = false> 6242: explicit constexpr tuple() 6242: : _Inherited() { } 6242: 6242: 6242: 6242: template using _TCC = 6242: _TC::value, 6242: _Elements...>; 6242: 6242: template::template 6242: _ConstructibleTuple<_Elements...>() 6242: && _TCC<_Dummy>::template 6242: _ImplicitlyConvertibleTuple<_Elements...>() 6242: && (sizeof...(_Elements) >= 1), 6242: bool>::type=true> 6242: constexpr tuple(const _Elements&... __elements) 6242: : _Inherited(__elements...) { } 6242: 6242: template::template 6242: _ConstructibleTuple<_Elements...>() 6242: && !_TCC<_Dummy>::template 6242: _ImplicitlyConvertibleTuple<_Elements...>() 6242: && (sizeof...(_Elements) >= 1), 6242: bool>::type=false> 6242: explicit constexpr tuple(const _Elements&... __elements) 6242: : _Inherited(__elements...) { } 6242: 6242: 6242: 6242: template using _TMC = 6242: _TC<(sizeof...(_Elements) == sizeof...(_UElements)) 6242: && (_TC<(sizeof...(_UElements)==1), _Elements...>:: 6242: template _NotSameTuple<_UElements...>()), 6242: _Elements...>; 6242: 6242: 6242: 6242: template using _TMCT = 6242: _TC<(sizeof...(_Elements) == sizeof...(_UElements)) 6242: && !is_same, 6242: tuple<_UElements...>>::value, 6242: _Elements...>; 6242: 6242: template::template 6242: _MoveConstructibleTuple<_UElements...>() 6242: && _TMC<_UElements...>::template 6242: _ImplicitlyMoveConvertibleTuple<_UElements...>() 6242: && (sizeof...(_Elements) >= 1), 6242: bool>::type=true> 6242: constexpr tuple(_UElements&&... __elements) 6242: : _Inherited(std::forward<_UElements>(__elements)...) { } 6242: 6242: template::template 6242: _MoveConstructibleTuple<_UElements...>() 6242: && !_TMC<_UElements...>::template 6242: _ImplicitlyMoveConvertibleTuple<_UElements...>() 6242: && (sizeof...(_Elements) >= 1), 6242: bool>::type=false> 6242: explicit constexpr tuple(_UElements&&... __elements) 6242: : _Inherited(std::forward<_UElements>(__elements)...) { } 6242: 6242: constexpr tuple(const tuple&) = default; 6242: 6242: constexpr tuple(tuple&&) = default; 6242: 6242: 6242: 6242: template using _TNTC = 6242: _TC::value && sizeof...(_Elements) == 1, 6242: _Elements...>; 6242: 6242: template::template 6242: _ConstructibleTuple<_UElements...>() 6242: && _TMCT<_UElements...>::template 6242: _ImplicitlyConvertibleTuple<_UElements...>() 6242: && _TNTC<_Dummy>::template 6242: _NonNestedTuple&>(), 6242: bool>::type=true> 6242: constexpr tuple(const tuple<_UElements...>& __in) 6242: : _Inherited(static_cast&>(__in)) 6242: { } 6242: 6242: template::template 6242: _ConstructibleTuple<_UElements...>() 6242: && !_TMCT<_UElements...>::template 6242: _ImplicitlyConvertibleTuple<_UElements...>() 6242: && _TNTC<_Dummy>::template 6242: _NonNestedTuple&>(), 6242: bool>::type=false> 6242: explicit constexpr tuple(const tuple<_UElements...>& __in) 6242: : _Inherited(static_cast&>(__in)) 6242: { } 6242: 6242: template::template 6242: _MoveConstructibleTuple<_UElements...>() 6242: && _TMCT<_UElements...>::template 6242: _ImplicitlyMoveConvertibleTuple<_UElements...>() 6242: && _TNTC<_Dummy>::template 6242: _NonNestedTuple&&>(), 6242: bool>::type=true> 6242: constexpr tuple(tuple<_UElements...>&& __in) 6242: : _Inherited(static_cast<_Tuple_impl<0, _UElements...>&&>(__in)) { } 6242: 6242: template::template 6242: _MoveConstructibleTuple<_UElements...>() 6242: && !_TMCT<_UElements...>::template 6242: _ImplicitlyMoveConvertibleTuple<_UElements...>() 6242: && _TNTC<_Dummy>::template 6242: _NonNestedTuple&&>(), 6242: bool>::type=false> 6242: explicit constexpr tuple(tuple<_UElements...>&& __in) 6242: : _Inherited(static_cast<_Tuple_impl<0, _UElements...>&&>(__in)) { } 6242: 6242: 6242: 6242: template 6242: tuple(allocator_arg_t __tag, const _Alloc& __a) 6242: : _Inherited(__tag, __a) { } 6242: 6242: template::template 6242: _ConstructibleTuple<_Elements...>() 6242: && _TCC<_Dummy>::template 6242: _ImplicitlyConvertibleTuple<_Elements...>(), 6242: bool>::type=true> 6242: tuple(allocator_arg_t __tag, const _Alloc& __a, 6242: const _Elements&... __elements) 6242: : _Inherited(__tag, __a, __elements...) { } 6242: 6242: template::template 6242: _ConstructibleTuple<_Elements...>() 6242: && !_TCC<_Dummy>::template 6242: _ImplicitlyConvertibleTuple<_Elements...>(), 6242: bool>::type=false> 6242: explicit tuple(allocator_arg_t __tag, const _Alloc& __a, 6242: const _Elements&... __elements) 6242: : _Inherited(__tag, __a, __elements...) { } 6242: 6242: template::template 6242: _MoveConstructibleTuple<_UElements...>() 6242: && _TMC<_UElements...>::template 6242: _ImplicitlyMoveConvertibleTuple<_UElements...>(), 6242: bool>::type=true> 6242: tuple(allocator_arg_t __tag, const _Alloc& __a, 6242: _UElements&&... __elements) 6242: : _Inherited(__tag, __a, std::forward<_UElements>(__elements)...) 6242: { } 6242: 6242: template::template 6242: _MoveConstructibleTuple<_UElements...>() 6242: && !_TMC<_UElements...>::template 6242: _ImplicitlyMoveConvertibleTuple<_UElements...>(), 6242: bool>::type=false> 6242: explicit tuple(allocator_arg_t __tag, const _Alloc& __a, 6242: _UElements&&... __elements) 6242: : _Inherited(__tag, __a, std::forward<_UElements>(__elements)...) 6242: { } 6242: 6242: template 6242: tuple(allocator_arg_t __tag, const _Alloc& __a, const tuple& __in) 6242: : _Inherited(__tag, __a, static_cast(__in)) { } 6242: 6242: template 6242: tuple(allocator_arg_t __tag, const _Alloc& __a, tuple&& __in) 6242: : _Inherited(__tag, __a, static_cast<_Inherited&&>(__in)) { } 6242: 6242: template::template 6242: _ConstructibleTuple<_UElements...>() 6242: && _TMCT<_UElements...>::template 6242: _ImplicitlyConvertibleTuple<_UElements...>() 6242: && _TNTC<_Dummy>::template 6242: _NonNestedTuple&&>(), 6242: bool>::type=true> 6242: tuple(allocator_arg_t __tag, const _Alloc& __a, 6242: const tuple<_UElements...>& __in) 6242: : _Inherited(__tag, __a, 6242: static_cast&>(__in)) 6242: { } 6242: 6242: template::template 6242: _ConstructibleTuple<_UElements...>() 6242: && !_TMCT<_UElements...>::template 6242: _ImplicitlyConvertibleTuple<_UElements...>() 6242: && _TNTC<_Dummy>::template 6242: _NonNestedTuple&&>(), 6242: bool>::type=false> 6242: explicit tuple(allocator_arg_t __tag, const _Alloc& __a, 6242: const tuple<_UElements...>& __in) 6242: : _Inherited(__tag, __a, 6242: static_cast&>(__in)) 6242: { } 6242: 6242: template::template 6242: _MoveConstructibleTuple<_UElements...>() 6242: && _TMCT<_UElements...>::template 6242: _ImplicitlyMoveConvertibleTuple<_UElements...>() 6242: && _TNTC<_Dummy>::template 6242: _NonNestedTuple&&>(), 6242: bool>::type=true> 6242: tuple(allocator_arg_t __tag, const _Alloc& __a, 6242: tuple<_UElements...>&& __in) 6242: : _Inherited(__tag, __a, 6242: static_cast<_Tuple_impl<0, _UElements...>&&>(__in)) 6242: { } 6242: 6242: template::template 6242: _MoveConstructibleTuple<_UElements...>() 6242: && !_TMCT<_UElements...>::template 6242: _ImplicitlyMoveConvertibleTuple<_UElements...>() 6242: && _TNTC<_Dummy>::template 6242: _NonNestedTuple&&>(), 6242: bool>::type=false> 6242: explicit tuple(allocator_arg_t __tag, const _Alloc& __a, 6242: tuple<_UElements...>&& __in) 6242: : _Inherited(__tag, __a, 6242: static_cast<_Tuple_impl<0, _UElements...>&&>(__in)) 6242: { } 6242: 6242: tuple& 6242: operator=(const tuple& __in) 6242: { 6242: static_cast<_Inherited&>(*this) = __in; 6242: return *this; 6242: } 6242: 6242: tuple& 6242: operator=(tuple&& __in) 6242: noexcept(is_nothrow_move_assignable<_Inherited>::value) 6242: { 6242: static_cast<_Inherited&>(*this) = std::move(__in); 6242: return *this; 6242: } 6242: 6242: template 6242: typename 6242: enable_if::type 6242: operator=(const tuple<_UElements...>& __in) 6242: { 6242: static_cast<_Inherited&>(*this) = __in; 6242: return *this; 6242: } 6242: 6242: template 6242: typename 6242: enable_if::type 6242: operator=(tuple<_UElements...>&& __in) 6242: { 6242: static_cast<_Inherited&>(*this) = std::move(__in); 6242: return *this; 6242: } 6242: 6242: void 6242: swap(tuple& __in) 6242: noexcept(noexcept(__in._M_swap(__in))) 6242: { _Inherited::_M_swap(__in); } 6242: }; 6242: # 889 "/usr/include/c++/8/tuple" 3 6242: template<> 6242: class tuple<> 6242: { 6242: public: 6242: void swap(tuple&) noexcept { } 6242: 6242: 6242: tuple() = default; 6242: 6242: template 6242: tuple(allocator_arg_t, const _Alloc&) { } 6242: template 6242: tuple(allocator_arg_t, const _Alloc&, const tuple&) { } 6242: }; 6242: 6242: 6242: 6242: template 6242: class tuple<_T1, _T2> : public _Tuple_impl<0, _T1, _T2> 6242: { 6242: typedef _Tuple_impl<0, _T1, _T2> _Inherited; 6242: 6242: public: 6242: template , 6242: __is_implicitly_default_constructible<_U2>> 6242: ::value, bool>::type = true> 6242: 6242: constexpr tuple() 6242: : _Inherited() { } 6242: 6242: template , 6242: is_default_constructible<_U2>, 6242: __not_< 6242: __and_<__is_implicitly_default_constructible<_U1>, 6242: __is_implicitly_default_constructible<_U2>>>> 6242: ::value, bool>::type = false> 6242: 6242: explicit constexpr tuple() 6242: : _Inherited() { } 6242: 6242: 6242: 6242: template using _TCC = 6242: _TC::value, _T1, _T2>; 6242: 6242: template::template 6242: _ConstructibleTuple<_T1, _T2>() 6242: && _TCC<_Dummy>::template 6242: _ImplicitlyConvertibleTuple<_T1, _T2>(), 6242: bool>::type = true> 6242: constexpr tuple(const _T1& __a1, const _T2& __a2) 6242: : _Inherited(__a1, __a2) { } 6242: 6242: template::template 6242: _ConstructibleTuple<_T1, _T2>() 6242: && !_TCC<_Dummy>::template 6242: _ImplicitlyConvertibleTuple<_T1, _T2>(), 6242: bool>::type = false> 6242: explicit constexpr tuple(const _T1& __a1, const _T2& __a2) 6242: : _Inherited(__a1, __a2) { } 6242: 6242: 6242: 6242: using _TMC = _TC; 6242: 6242: template() 6242: && _TMC::template 6242: _ImplicitlyMoveConvertibleTuple<_U1, _U2>() 6242: && !is_same::type, 6242: allocator_arg_t>::value, 6242: bool>::type = true> 6242: constexpr tuple(_U1&& __a1, _U2&& __a2) 6242: : _Inherited(std::forward<_U1>(__a1), std::forward<_U2>(__a2)) { } 6242: 6242: template() 6242: && !_TMC::template 6242: _ImplicitlyMoveConvertibleTuple<_U1, _U2>() 6242: && !is_same::type, 6242: allocator_arg_t>::value, 6242: bool>::type = false> 6242: explicit constexpr tuple(_U1&& __a1, _U2&& __a2) 6242: : _Inherited(std::forward<_U1>(__a1), std::forward<_U2>(__a2)) { } 6242: 6242: constexpr tuple(const tuple&) = default; 6242: 6242: constexpr tuple(tuple&&) = default; 6242: 6242: template() 6242: && _TMC::template 6242: _ImplicitlyConvertibleTuple<_U1, _U2>(), 6242: bool>::type = true> 6242: constexpr tuple(const tuple<_U1, _U2>& __in) 6242: : _Inherited(static_cast&>(__in)) { } 6242: 6242: template() 6242: && !_TMC::template 6242: _ImplicitlyConvertibleTuple<_U1, _U2>(), 6242: bool>::type = false> 6242: explicit constexpr tuple(const tuple<_U1, _U2>& __in) 6242: : _Inherited(static_cast&>(__in)) { } 6242: 6242: template() 6242: && _TMC::template 6242: _ImplicitlyMoveConvertibleTuple<_U1, _U2>(), 6242: bool>::type = true> 6242: constexpr tuple(tuple<_U1, _U2>&& __in) 6242: : _Inherited(static_cast<_Tuple_impl<0, _U1, _U2>&&>(__in)) { } 6242: 6242: template() 6242: && !_TMC::template 6242: _ImplicitlyMoveConvertibleTuple<_U1, _U2>(), 6242: bool>::type = false> 6242: explicit constexpr tuple(tuple<_U1, _U2>&& __in) 6242: : _Inherited(static_cast<_Tuple_impl<0, _U1, _U2>&&>(__in)) { } 6242: 6242: template() 6242: && _TMC::template 6242: _ImplicitlyConvertibleTuple<_U1, _U2>(), 6242: bool>::type = true> 6242: constexpr tuple(const pair<_U1, _U2>& __in) 6242: : _Inherited(__in.first, __in.second) { } 6242: 6242: template() 6242: && !_TMC::template 6242: _ImplicitlyConvertibleTuple<_U1, _U2>(), 6242: bool>::type = false> 6242: explicit constexpr tuple(const pair<_U1, _U2>& __in) 6242: : _Inherited(__in.first, __in.second) { } 6242: 6242: template() 6242: && _TMC::template 6242: _ImplicitlyMoveConvertibleTuple<_U1, _U2>(), 6242: bool>::type = true> 6242: constexpr tuple(pair<_U1, _U2>&& __in) 6242: : _Inherited(std::forward<_U1>(__in.first), 6242: std::forward<_U2>(__in.second)) { } 6242: 6242: template() 6242: && !_TMC::template 6242: _ImplicitlyMoveConvertibleTuple<_U1, _U2>(), 6242: bool>::type = false> 6242: explicit constexpr tuple(pair<_U1, _U2>&& __in) 6242: : _Inherited(std::forward<_U1>(__in.first), 6242: std::forward<_U2>(__in.second)) { } 6242: 6242: 6242: 6242: template 6242: tuple(allocator_arg_t __tag, const _Alloc& __a) 6242: : _Inherited(__tag, __a) { } 6242: 6242: template::template 6242: _ConstructibleTuple<_T1, _T2>() 6242: && _TCC<_Dummy>::template 6242: _ImplicitlyConvertibleTuple<_T1, _T2>(), 6242: bool>::type=true> 6242: 6242: tuple(allocator_arg_t __tag, const _Alloc& __a, 6242: const _T1& __a1, const _T2& __a2) 6242: : _Inherited(__tag, __a, __a1, __a2) { } 6242: 6242: template::template 6242: _ConstructibleTuple<_T1, _T2>() 6242: && !_TCC<_Dummy>::template 6242: _ImplicitlyConvertibleTuple<_T1, _T2>(), 6242: bool>::type=false> 6242: 6242: explicit tuple(allocator_arg_t __tag, const _Alloc& __a, 6242: const _T1& __a1, const _T2& __a2) 6242: : _Inherited(__tag, __a, __a1, __a2) { } 6242: 6242: template() 6242: && _TMC::template 6242: _ImplicitlyMoveConvertibleTuple<_U1, _U2>(), 6242: bool>::type = true> 6242: tuple(allocator_arg_t __tag, const _Alloc& __a, _U1&& __a1, _U2&& __a2) 6242: : _Inherited(__tag, __a, std::forward<_U1>(__a1), 6242: std::forward<_U2>(__a2)) { } 6242: 6242: template() 6242: && !_TMC::template 6242: _ImplicitlyMoveConvertibleTuple<_U1, _U2>(), 6242: bool>::type = false> 6242: explicit tuple(allocator_arg_t __tag, const _Alloc& __a, 6242: _U1&& __a1, _U2&& __a2) 6242: : _Inherited(__tag, __a, std::forward<_U1>(__a1), 6242: std::forward<_U2>(__a2)) { } 6242: 6242: template 6242: tuple(allocator_arg_t __tag, const _Alloc& __a, const tuple& __in) 6242: : _Inherited(__tag, __a, static_cast(__in)) { } 6242: 6242: template 6242: tuple(allocator_arg_t __tag, const _Alloc& __a, tuple&& __in) 6242: : _Inherited(__tag, __a, static_cast<_Inherited&&>(__in)) { } 6242: 6242: template() 6242: && _TMC::template 6242: _ImplicitlyConvertibleTuple<_U1, _U2>(), 6242: bool>::type = true> 6242: tuple(allocator_arg_t __tag, const _Alloc& __a, 6242: const tuple<_U1, _U2>& __in) 6242: : _Inherited(__tag, __a, 6242: static_cast&>(__in)) 6242: { } 6242: 6242: template() 6242: && !_TMC::template 6242: _ImplicitlyConvertibleTuple<_U1, _U2>(), 6242: bool>::type = false> 6242: explicit tuple(allocator_arg_t __tag, const _Alloc& __a, 6242: const tuple<_U1, _U2>& __in) 6242: : _Inherited(__tag, __a, 6242: static_cast&>(__in)) 6242: { } 6242: 6242: template() 6242: && _TMC::template 6242: _ImplicitlyMoveConvertibleTuple<_U1, _U2>(), 6242: bool>::type = true> 6242: tuple(allocator_arg_t __tag, const _Alloc& __a, tuple<_U1, _U2>&& __in) 6242: : _Inherited(__tag, __a, static_cast<_Tuple_impl<0, _U1, _U2>&&>(__in)) 6242: { } 6242: 6242: template() 6242: && !_TMC::template 6242: _ImplicitlyMoveConvertibleTuple<_U1, _U2>(), 6242: bool>::type = false> 6242: explicit tuple(allocator_arg_t __tag, const _Alloc& __a, 6242: tuple<_U1, _U2>&& __in) 6242: : _Inherited(__tag, __a, static_cast<_Tuple_impl<0, _U1, _U2>&&>(__in)) 6242: { } 6242: 6242: template() 6242: && _TMC::template 6242: _ImplicitlyConvertibleTuple<_U1, _U2>(), 6242: bool>::type = true> 6242: tuple(allocator_arg_t __tag, const _Alloc& __a, 6242: const pair<_U1, _U2>& __in) 6242: : _Inherited(__tag, __a, __in.first, __in.second) { } 6242: 6242: template() 6242: && !_TMC::template 6242: _ImplicitlyConvertibleTuple<_U1, _U2>(), 6242: bool>::type = false> 6242: explicit tuple(allocator_arg_t __tag, const _Alloc& __a, 6242: const pair<_U1, _U2>& __in) 6242: : _Inherited(__tag, __a, __in.first, __in.second) { } 6242: 6242: template() 6242: && _TMC::template 6242: _ImplicitlyMoveConvertibleTuple<_U1, _U2>(), 6242: bool>::type = true> 6242: tuple(allocator_arg_t __tag, const _Alloc& __a, pair<_U1, _U2>&& __in) 6242: : _Inherited(__tag, __a, std::forward<_U1>(__in.first), 6242: std::forward<_U2>(__in.second)) { } 6242: 6242: template() 6242: && !_TMC::template 6242: _ImplicitlyMoveConvertibleTuple<_U1, _U2>(), 6242: bool>::type = false> 6242: explicit tuple(allocator_arg_t __tag, const _Alloc& __a, 6242: pair<_U1, _U2>&& __in) 6242: : _Inherited(__tag, __a, std::forward<_U1>(__in.first), 6242: std::forward<_U2>(__in.second)) { } 6242: 6242: tuple& 6242: operator=(const tuple& __in) 6242: { 6242: static_cast<_Inherited&>(*this) = __in; 6242: return *this; 6242: } 6242: 6242: tuple& 6242: operator=(tuple&& __in) 6242: noexcept(is_nothrow_move_assignable<_Inherited>::value) 6242: { 6242: static_cast<_Inherited&>(*this) = std::move(__in); 6242: return *this; 6242: } 6242: 6242: template 6242: tuple& 6242: operator=(const tuple<_U1, _U2>& __in) 6242: { 6242: static_cast<_Inherited&>(*this) = __in; 6242: return *this; 6242: } 6242: 6242: template 6242: tuple& 6242: operator=(tuple<_U1, _U2>&& __in) 6242: { 6242: static_cast<_Inherited&>(*this) = std::move(__in); 6242: return *this; 6242: } 6242: 6242: template 6242: tuple& 6242: operator=(const pair<_U1, _U2>& __in) 6242: { 6242: this->_M_head(*this) = __in.first; 6242: this->_M_tail(*this)._M_head(*this) = __in.second; 6242: return *this; 6242: } 6242: 6242: template 6242: tuple& 6242: operator=(pair<_U1, _U2>&& __in) 6242: { 6242: this->_M_head(*this) = std::forward<_U1>(__in.first); 6242: this->_M_tail(*this)._M_head(*this) = std::forward<_U2>(__in.second); 6242: return *this; 6242: } 6242: 6242: void 6242: swap(tuple& __in) 6242: noexcept(noexcept(__in._M_swap(__in))) 6242: { _Inherited::_M_swap(__in); } 6242: }; 6242: 6242: 6242: 6242: template 6242: struct tuple_size> 6242: : public integral_constant { }; 6242: # 1278 "/usr/include/c++/8/tuple" 3 6242: template 6242: struct tuple_element<__i, tuple<_Head, _Tail...> > 6242: : tuple_element<__i - 1, tuple<_Tail...> > { }; 6242: 6242: 6242: 6242: 6242: template 6242: struct tuple_element<0, tuple<_Head, _Tail...> > 6242: { 6242: typedef _Head type; 6242: }; 6242: 6242: 6242: 6242: 6242: template 6242: struct tuple_element<__i, tuple<>> 6242: { 6242: static_assert(__i < tuple_size>::value, 6242: "tuple index is in range"); 6242: }; 6242: 6242: template 6242: constexpr _Head& 6242: __get_helper(_Tuple_impl<__i, _Head, _Tail...>& __t) noexcept 6242: { return _Tuple_impl<__i, _Head, _Tail...>::_M_head(__t); } 6242: 6242: template 6242: constexpr const _Head& 6242: __get_helper(const _Tuple_impl<__i, _Head, _Tail...>& __t) noexcept 6242: { return _Tuple_impl<__i, _Head, _Tail...>::_M_head(__t); } 6242: 6242: 6242: template 6242: constexpr __tuple_element_t<__i, tuple<_Elements...>>& 6242: get(tuple<_Elements...>& __t) noexcept 6242: { return std::__get_helper<__i>(__t); } 6242: 6242: 6242: template 6242: constexpr const __tuple_element_t<__i, tuple<_Elements...>>& 6242: get(const tuple<_Elements...>& __t) noexcept 6242: { return std::__get_helper<__i>(__t); } 6242: 6242: 6242: template 6242: constexpr __tuple_element_t<__i, tuple<_Elements...>>&& 6242: get(tuple<_Elements...>&& __t) noexcept 6242: { 6242: typedef __tuple_element_t<__i, tuple<_Elements...>> __element_type; 6242: return std::forward<__element_type&&>(std::get<__i>(__t)); 6242: } 6242: 6242: 6242: template 6242: constexpr const __tuple_element_t<__i, tuple<_Elements...>>&& 6242: get(const tuple<_Elements...>&& __t) noexcept 6242: { 6242: typedef __tuple_element_t<__i, tuple<_Elements...>> __element_type; 6242: return std::forward(std::get<__i>(__t)); 6242: } 6242: # 1382 "/usr/include/c++/8/tuple" 3 6242: template 6242: struct __tuple_compare 6242: { 6242: static constexpr bool 6242: __eq(const _Tp& __t, const _Up& __u) 6242: { 6242: return bool(std::get<__i>(__t) == std::get<__i>(__u)) 6242: && __tuple_compare<_Tp, _Up, __i + 1, __size>::__eq(__t, __u); 6242: } 6242: 6242: static constexpr bool 6242: __less(const _Tp& __t, const _Up& __u) 6242: { 6242: return bool(std::get<__i>(__t) < std::get<__i>(__u)) 6242: || (!bool(std::get<__i>(__u) < std::get<__i>(__t)) 6242: && __tuple_compare<_Tp, _Up, __i + 1, __size>::__less(__t, __u)); 6242: } 6242: }; 6242: 6242: template 6242: struct __tuple_compare<_Tp, _Up, __size, __size> 6242: { 6242: static constexpr bool 6242: __eq(const _Tp&, const _Up&) { return true; } 6242: 6242: static constexpr bool 6242: __less(const _Tp&, const _Up&) { return false; } 6242: }; 6242: 6242: template 6242: constexpr bool 6242: operator==(const tuple<_TElements...>& __t, 6242: const tuple<_UElements...>& __u) 6242: { 6242: static_assert(sizeof...(_TElements) == sizeof...(_UElements), 6242: "tuple objects can only be compared if they have equal sizes."); 6242: using __compare = __tuple_compare, 6242: tuple<_UElements...>, 6242: 0, sizeof...(_TElements)>; 6242: return __compare::__eq(__t, __u); 6242: } 6242: 6242: template 6242: constexpr bool 6242: operator<(const tuple<_TElements...>& __t, 6242: const tuple<_UElements...>& __u) 6242: { 6242: static_assert(sizeof...(_TElements) == sizeof...(_UElements), 6242: "tuple objects can only be compared if they have equal sizes."); 6242: using __compare = __tuple_compare, 6242: tuple<_UElements...>, 6242: 0, sizeof...(_TElements)>; 6242: return __compare::__less(__t, __u); 6242: } 6242: 6242: template 6242: constexpr bool 6242: operator!=(const tuple<_TElements...>& __t, 6242: const tuple<_UElements...>& __u) 6242: { return !(__t == __u); } 6242: 6242: template 6242: constexpr bool 6242: operator>(const tuple<_TElements...>& __t, 6242: const tuple<_UElements...>& __u) 6242: { return __u < __t; } 6242: 6242: template 6242: constexpr bool 6242: operator<=(const tuple<_TElements...>& __t, 6242: const tuple<_UElements...>& __u) 6242: { return !(__u < __t); } 6242: 6242: template 6242: constexpr bool 6242: operator>=(const tuple<_TElements...>& __t, 6242: const tuple<_UElements...>& __u) 6242: { return !(__t < __u); } 6242: 6242: 6242: template 6242: constexpr tuple::__type...> 6242: make_tuple(_Elements&&... __args) 6242: { 6242: typedef tuple::__type...> 6242: __result_type; 6242: return __result_type(std::forward<_Elements>(__args)...); 6242: } 6242: 6242: 6242: 6242: template 6242: constexpr tuple<_Elements&&...> 6242: forward_as_tuple(_Elements&&... __args) noexcept 6242: { return tuple<_Elements&&...>(std::forward<_Elements>(__args)...); } 6242: 6242: template 6242: struct __make_tuple_impl; 6242: 6242: template 6242: struct __make_tuple_impl<_Idx, tuple<_Tp...>, _Tuple, _Nm> 6242: : __make_tuple_impl<_Idx + 1, 6242: tuple<_Tp..., __tuple_element_t<_Idx, _Tuple>>, 6242: _Tuple, _Nm> 6242: { }; 6242: 6242: template 6242: struct __make_tuple_impl<_Nm, tuple<_Tp...>, _Tuple, _Nm> 6242: { 6242: typedef tuple<_Tp...> __type; 6242: }; 6242: 6242: template 6242: struct __do_make_tuple 6242: : __make_tuple_impl<0, tuple<>, _Tuple, std::tuple_size<_Tuple>::value> 6242: { }; 6242: 6242: 6242: template 6242: struct __make_tuple 6242: : public __do_make_tuple::type>::type> 6242: { }; 6242: 6242: 6242: template 6242: struct __combine_tuples; 6242: 6242: template<> 6242: struct __combine_tuples<> 6242: { 6242: typedef tuple<> __type; 6242: }; 6242: 6242: template 6242: struct __combine_tuples> 6242: { 6242: typedef tuple<_Ts...> __type; 6242: }; 6242: 6242: template 6242: struct __combine_tuples, tuple<_T2s...>, _Rem...> 6242: { 6242: typedef typename __combine_tuples, 6242: _Rem...>::__type __type; 6242: }; 6242: 6242: 6242: template 6242: struct __tuple_cat_result 6242: { 6242: typedef typename __combine_tuples 6242: ::__type...>::__type __type; 6242: }; 6242: 6242: 6242: 6242: template 6242: struct __make_1st_indices; 6242: 6242: template<> 6242: struct __make_1st_indices<> 6242: { 6242: typedef std::_Index_tuple<> __type; 6242: }; 6242: 6242: template 6242: struct __make_1st_indices<_Tp, _Tpls...> 6242: { 6242: typedef typename std::_Build_index_tuple::type>::value>::__type __type; 6242: }; 6242: 6242: 6242: 6242: 6242: template 6242: struct __tuple_concater; 6242: 6242: template 6242: struct __tuple_concater<_Ret, std::_Index_tuple<_Is...>, _Tp, _Tpls...> 6242: { 6242: template 6242: static constexpr _Ret 6242: _S_do(_Tp&& __tp, _Tpls&&... __tps, _Us&&... __us) 6242: { 6242: typedef typename __make_1st_indices<_Tpls...>::__type __idx; 6242: typedef __tuple_concater<_Ret, __idx, _Tpls...> __next; 6242: return __next::_S_do(std::forward<_Tpls>(__tps)..., 6242: std::forward<_Us>(__us)..., 6242: std::get<_Is>(std::forward<_Tp>(__tp))...); 6242: } 6242: }; 6242: 6242: template 6242: struct __tuple_concater<_Ret, std::_Index_tuple<>> 6242: { 6242: template 6242: static constexpr _Ret 6242: _S_do(_Us&&... __us) 6242: { 6242: return _Ret(std::forward<_Us>(__us)...); 6242: } 6242: }; 6242: 6242: 6242: template...>::value>::type> 6242: constexpr auto 6242: tuple_cat(_Tpls&&... __tpls) 6242: -> typename __tuple_cat_result<_Tpls...>::__type 6242: { 6242: typedef typename __tuple_cat_result<_Tpls...>::__type __ret; 6242: typedef typename __make_1st_indices<_Tpls...>::__type __idx; 6242: typedef __tuple_concater<__ret, __idx, _Tpls...> __concater; 6242: return __concater::_S_do(std::forward<_Tpls>(__tpls)...); 6242: } 6242: 6242: 6242: 6242: 6242: template 6242: constexpr tuple<_Elements&...> 6242: tie(_Elements&... __args) noexcept 6242: { return tuple<_Elements&...>(__args...); } 6242: 6242: 6242: template 6242: inline 6242: 6242: 6242: typename enable_if<__and_<__is_swappable<_Elements>...>::value 6242: >::type 6242: 6242: 6242: 6242: swap(tuple<_Elements...>& __x, tuple<_Elements...>& __y) 6242: noexcept(noexcept(__x.swap(__y))) 6242: { __x.swap(__y); } 6242: 6242: 6242: template 6242: typename enable_if...>::value>::type 6242: swap(tuple<_Elements...>&, tuple<_Elements...>&) = delete; 6242: 6242: 6242: 6242: 6242: 6242: 6242: struct _Swallow_assign 6242: { 6242: template 6242: const _Swallow_assign& 6242: operator=(const _Tp&) const 6242: { return *this; } 6242: }; 6242: 6242: 6242: 6242: constexpr _Swallow_assign ignore{}; 6242: 6242: 6242: template 6242: struct uses_allocator, _Alloc> : true_type { }; 6242: 6242: 6242: template 6242: template 6242: inline 6242: pair<_T1, _T2>:: 6242: pair(piecewise_construct_t, 6242: tuple<_Args1...> __first, tuple<_Args2...> __second) 6242: : pair(__first, __second, 6242: typename _Build_index_tuple::__type(), 6242: typename _Build_index_tuple::__type()) 6242: { } 6242: 6242: template 6242: template 6242: inline 6242: pair<_T1, _T2>:: 6242: pair(tuple<_Args1...>& __tuple1, tuple<_Args2...>& __tuple2, 6242: _Index_tuple<_Indexes1...>, _Index_tuple<_Indexes2...>) 6242: : first(std::forward<_Args1>(std::get<_Indexes1>(__tuple1))...), 6242: second(std::forward<_Args2>(std::get<_Indexes2>(__tuple2))...) 6242: { } 6242: # 1711 "/usr/include/c++/8/tuple" 3 6242: 6242: } 6242: # 55 "/usr/include/c++/8/functional" 2 3 6242: 6242: 6242: 6242: # 1 "/usr/include/c++/8/bits/refwrap.h" 1 3 6242: # 33 "/usr/include/c++/8/bits/refwrap.h" 3 6242: 6242: # 34 "/usr/include/c++/8/bits/refwrap.h" 3 6242: # 43 "/usr/include/c++/8/bits/refwrap.h" 3 6242: namespace std __attribute__ ((__visibility__ ("default"))) 6242: { 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: template 6242: struct _Maybe_unary_or_binary_function { }; 6242: 6242: 6242: template 6242: struct _Maybe_unary_or_binary_function<_Res, _T1> 6242: : std::unary_function<_T1, _Res> { }; 6242: 6242: 6242: template 6242: struct _Maybe_unary_or_binary_function<_Res, _T1, _T2> 6242: : std::binary_function<_T1, _T2, _Res> { }; 6242: 6242: template 6242: struct _Mem_fn_traits; 6242: 6242: template 6242: struct _Mem_fn_traits_base 6242: { 6242: using __result_type = _Res; 6242: using __maybe_type 6242: = _Maybe_unary_or_binary_function<_Res, _Class*, _ArgTypes...>; 6242: using __arity = integral_constant; 6242: }; 6242: # 97 "/usr/include/c++/8/bits/refwrap.h" 3 6242: template struct _Mem_fn_traits<_Res (_Class::*)(_ArgTypes...) > : _Mem_fn_traits_base<_Res, _Class, _ArgTypes...> { using __vararg = false_type; }; template struct _Mem_fn_traits<_Res (_Class::*)(_ArgTypes... ...) > : _Mem_fn_traits_base<_Res, _Class, _ArgTypes...> { using __vararg = true_type; }; template struct _Mem_fn_traits<_Res (_Class::*)(_ArgTypes...) const > : _Mem_fn_traits_base<_Res, const _Class, _ArgTypes...> { using __vararg = false_type; }; template struct _Mem_fn_traits<_Res (_Class::*)(_ArgTypes... ...) const > : _Mem_fn_traits_base<_Res, const _Class, _ArgTypes...> { using __vararg = true_type; }; template struct _Mem_fn_traits<_Res (_Class::*)(_ArgTypes...) volatile > : _Mem_fn_traits_base<_Res, volatile _Class, _ArgTypes...> { using __vararg = false_type; }; template struct _Mem_fn_traits<_Res (_Class::*)(_ArgTypes... ...) volatile > : _Mem_fn_traits_base<_Res, volatile _Class, _ArgTypes...> { using __vararg = true_type; }; template struct _Mem_fn_traits<_Res (_Class::*)(_ArgTypes...) const volatile > : _Mem_fn_traits_base<_Res, const volatile _Class, _ArgTypes...> { using __vararg = false_type; }; template struct _Mem_fn_traits<_Res (_Class::*)(_ArgTypes... ...) const volatile > : _Mem_fn_traits_base<_Res, const volatile _Class, _ArgTypes...> { using __vararg = true_type; }; 6242: template struct _Mem_fn_traits<_Res (_Class::*)(_ArgTypes...) &> : _Mem_fn_traits_base<_Res, _Class, _ArgTypes...> { using __vararg = false_type; }; template struct _Mem_fn_traits<_Res (_Class::*)(_ArgTypes... ...) &> : _Mem_fn_traits_base<_Res, _Class, _ArgTypes...> { using __vararg = true_type; }; template struct _Mem_fn_traits<_Res (_Class::*)(_ArgTypes...) const &> : _Mem_fn_traits_base<_Res, const _Class, _ArgTypes...> { using __vararg = false_type; }; template struct _Mem_fn_traits<_Res (_Class::*)(_ArgTypes... ...) const &> : _Mem_fn_traits_base<_Res, const _Class, _ArgTypes...> { using __vararg = true_type; }; template struct _Mem_fn_traits<_Res (_Class::*)(_ArgTypes...) volatile &> : _Mem_fn_traits_base<_Res, volatile _Class, _ArgTypes...> { using __vararg = false_type; }; template struct _Mem_fn_traits<_Res (_Class::*)(_ArgTypes... ...) volatile &> : _Mem_fn_traits_base<_Res, volatile _Class, _ArgTypes...> { using __vararg = true_type; }; template struct _Mem_fn_traits<_Res (_Class::*)(_ArgTypes...) const volatile &> : _Mem_fn_traits_base<_Res, const volatile _Class, _ArgTypes...> { using __vararg = false_type; }; template struct _Mem_fn_traits<_Res (_Class::*)(_ArgTypes... ...) const volatile &> : _Mem_fn_traits_base<_Res, const volatile _Class, _ArgTypes...> { using __vararg = true_type; }; 6242: template struct _Mem_fn_traits<_Res (_Class::*)(_ArgTypes...) &&> : _Mem_fn_traits_base<_Res, _Class, _ArgTypes...> { using __vararg = false_type; }; template struct _Mem_fn_traits<_Res (_Class::*)(_ArgTypes... ...) &&> : _Mem_fn_traits_base<_Res, _Class, _ArgTypes...> { using __vararg = true_type; }; template struct _Mem_fn_traits<_Res (_Class::*)(_ArgTypes...) const &&> : _Mem_fn_traits_base<_Res, const _Class, _ArgTypes...> { using __vararg = false_type; }; template struct _Mem_fn_traits<_Res (_Class::*)(_ArgTypes... ...) const &&> : _Mem_fn_traits_base<_Res, const _Class, _ArgTypes...> { using __vararg = true_type; }; template struct _Mem_fn_traits<_Res (_Class::*)(_ArgTypes...) volatile &&> : _Mem_fn_traits_base<_Res, volatile _Class, _ArgTypes...> { using __vararg = false_type; }; template struct _Mem_fn_traits<_Res (_Class::*)(_ArgTypes... ...) volatile &&> : _Mem_fn_traits_base<_Res, volatile _Class, _ArgTypes...> { using __vararg = true_type; }; template struct _Mem_fn_traits<_Res (_Class::*)(_ArgTypes...) const volatile &&> : _Mem_fn_traits_base<_Res, const volatile _Class, _ArgTypes...> { using __vararg = false_type; }; template struct _Mem_fn_traits<_Res (_Class::*)(_ArgTypes... ...) const volatile &&> : _Mem_fn_traits_base<_Res, const volatile _Class, _ArgTypes...> { using __vararg = true_type; }; 6242: # 111 "/usr/include/c++/8/bits/refwrap.h" 3 6242: template> 6242: struct _Maybe_get_result_type 6242: { }; 6242: 6242: template 6242: struct _Maybe_get_result_type<_Functor, 6242: __void_t> 6242: { typedef typename _Functor::result_type result_type; }; 6242: 6242: 6242: 6242: 6242: 6242: template 6242: struct _Weak_result_type_impl 6242: : _Maybe_get_result_type<_Functor> 6242: { }; 6242: 6242: 6242: template 6242: struct _Weak_result_type_impl<_Res(_ArgTypes...) > 6242: { typedef _Res result_type; }; 6242: 6242: 6242: template 6242: struct _Weak_result_type_impl<_Res(_ArgTypes......) > 6242: { typedef _Res result_type; }; 6242: 6242: 6242: template 6242: struct _Weak_result_type_impl<_Res(*)(_ArgTypes...) > 6242: { typedef _Res result_type; }; 6242: 6242: 6242: template 6242: struct 6242: _Weak_result_type_impl<_Res(*)(_ArgTypes......) > 6242: { typedef _Res result_type; }; 6242: 6242: 6242: template::value> 6242: struct _Weak_result_type_memfun 6242: : _Weak_result_type_impl<_Functor> 6242: { }; 6242: 6242: 6242: template 6242: struct _Weak_result_type_memfun<_MemFunPtr, true> 6242: { 6242: using result_type = typename _Mem_fn_traits<_MemFunPtr>::__result_type; 6242: }; 6242: 6242: 6242: template 6242: struct _Weak_result_type_memfun<_Func _Class::*, false> 6242: { }; 6242: 6242: 6242: 6242: 6242: 6242: template 6242: struct _Weak_result_type 6242: : _Weak_result_type_memfun::type> 6242: { }; 6242: 6242: 6242: template> 6242: struct _Refwrap_base_arg1 6242: { }; 6242: 6242: 6242: template 6242: struct _Refwrap_base_arg1<_Tp, 6242: __void_t> 6242: { 6242: typedef typename _Tp::argument_type argument_type; 6242: }; 6242: 6242: 6242: template> 6242: struct _Refwrap_base_arg2 6242: { }; 6242: 6242: 6242: template 6242: struct _Refwrap_base_arg2<_Tp, 6242: __void_t> 6242: { 6242: typedef typename _Tp::first_argument_type first_argument_type; 6242: typedef typename _Tp::second_argument_type second_argument_type; 6242: }; 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: template 6242: struct _Reference_wrapper_base 6242: : _Weak_result_type<_Tp>, _Refwrap_base_arg1<_Tp>, _Refwrap_base_arg2<_Tp> 6242: { }; 6242: 6242: 6242: template 6242: struct _Reference_wrapper_base<_Res(_T1) > 6242: : unary_function<_T1, _Res> 6242: { }; 6242: 6242: template 6242: struct _Reference_wrapper_base<_Res(_T1) const> 6242: : unary_function<_T1, _Res> 6242: { }; 6242: 6242: template 6242: struct _Reference_wrapper_base<_Res(_T1) volatile> 6242: : unary_function<_T1, _Res> 6242: { }; 6242: 6242: template 6242: struct _Reference_wrapper_base<_Res(_T1) const volatile> 6242: : unary_function<_T1, _Res> 6242: { }; 6242: 6242: 6242: template 6242: struct _Reference_wrapper_base<_Res(_T1, _T2) > 6242: : binary_function<_T1, _T2, _Res> 6242: { }; 6242: 6242: template 6242: struct _Reference_wrapper_base<_Res(_T1, _T2) const> 6242: : binary_function<_T1, _T2, _Res> 6242: { }; 6242: 6242: template 6242: struct _Reference_wrapper_base<_Res(_T1, _T2) volatile> 6242: : binary_function<_T1, _T2, _Res> 6242: { }; 6242: 6242: template 6242: struct _Reference_wrapper_base<_Res(_T1, _T2) const volatile> 6242: : binary_function<_T1, _T2, _Res> 6242: { }; 6242: 6242: 6242: template 6242: struct _Reference_wrapper_base<_Res(*)(_T1) > 6242: : unary_function<_T1, _Res> 6242: { }; 6242: 6242: 6242: template 6242: struct _Reference_wrapper_base<_Res(*)(_T1, _T2) > 6242: : binary_function<_T1, _T2, _Res> 6242: { }; 6242: 6242: template::value> 6242: struct _Reference_wrapper_base_memfun 6242: : _Reference_wrapper_base<_Tp> 6242: { }; 6242: 6242: template 6242: struct _Reference_wrapper_base_memfun<_MemFunPtr, true> 6242: : _Mem_fn_traits<_MemFunPtr>::__maybe_type 6242: { 6242: using result_type = typename _Mem_fn_traits<_MemFunPtr>::__result_type; 6242: }; 6242: 6242: 6242: 6242: 6242: 6242: 6242: template 6242: class reference_wrapper 6242: : public _Reference_wrapper_base_memfun::type> 6242: { 6242: _Tp* _M_data; 6242: 6242: public: 6242: typedef _Tp type; 6242: 6242: reference_wrapper(_Tp& __indata) noexcept 6242: : _M_data(std::__addressof(__indata)) 6242: { } 6242: 6242: reference_wrapper(_Tp&&) = delete; 6242: 6242: reference_wrapper(const reference_wrapper&) = default; 6242: 6242: reference_wrapper& 6242: operator=(const reference_wrapper&) = default; 6242: 6242: operator _Tp&() const noexcept 6242: { return this->get(); } 6242: 6242: _Tp& 6242: get() const noexcept 6242: { return *_M_data; } 6242: 6242: template 6242: typename result_of<_Tp&(_Args&&...)>::type 6242: operator()(_Args&&... __args) const 6242: { 6242: return std::__invoke(get(), std::forward<_Args>(__args)...); 6242: } 6242: }; 6242: 6242: 6242: 6242: template 6242: inline reference_wrapper<_Tp> 6242: ref(_Tp& __t) noexcept 6242: { return reference_wrapper<_Tp>(__t); } 6242: 6242: 6242: template 6242: inline reference_wrapper 6242: cref(const _Tp& __t) noexcept 6242: { return reference_wrapper(__t); } 6242: 6242: template 6242: void ref(const _Tp&&) = delete; 6242: 6242: template 6242: void cref(const _Tp&&) = delete; 6242: 6242: 6242: template 6242: inline reference_wrapper<_Tp> 6242: ref(reference_wrapper<_Tp> __t) noexcept 6242: { return __t; } 6242: 6242: 6242: template 6242: inline reference_wrapper 6242: cref(reference_wrapper<_Tp> __t) noexcept 6242: { return { __t.get() }; } 6242: 6242: 6242: 6242: 6242: } 6242: # 59 "/usr/include/c++/8/functional" 2 3 6242: # 1 "/usr/include/c++/8/bits/std_function.h" 1 3 6242: # 33 "/usr/include/c++/8/bits/std_function.h" 3 6242: 6242: # 34 "/usr/include/c++/8/bits/std_function.h" 3 6242: # 47 "/usr/include/c++/8/bits/std_function.h" 3 6242: namespace std __attribute__ ((__visibility__ ("default"))) 6242: { 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: class bad_function_call : public std::exception 6242: { 6242: public: 6242: virtual ~bad_function_call() noexcept; 6242: 6242: const char* what() const noexcept; 6242: }; 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: template 6242: struct __is_location_invariant 6242: : is_trivially_copyable<_Tp>::type 6242: { }; 6242: 6242: class _Undefined_class; 6242: 6242: union _Nocopy_types 6242: { 6242: void* _M_object; 6242: const void* _M_const_object; 6242: void (*_M_function_pointer)(); 6242: void (_Undefined_class::*_M_member_pointer)(); 6242: }; 6242: 6242: union [[gnu::may_alias]] _Any_data 6242: { 6242: void* _M_access() { return &_M_pod_data[0]; } 6242: const void* _M_access() const { return &_M_pod_data[0]; } 6242: 6242: template 6242: _Tp& 6242: _M_access() 6242: { return *static_cast<_Tp*>(_M_access()); } 6242: 6242: template 6242: const _Tp& 6242: _M_access() const 6242: { return *static_cast(_M_access()); } 6242: 6242: _Nocopy_types _M_unused; 6242: char _M_pod_data[sizeof(_Nocopy_types)]; 6242: }; 6242: 6242: enum _Manager_operation 6242: { 6242: __get_type_info, 6242: __get_functor_ptr, 6242: __clone_functor, 6242: __destroy_functor 6242: }; 6242: 6242: 6242: 6242: template 6242: struct _Simple_type_wrapper 6242: { 6242: _Simple_type_wrapper(_Tp __value) : __value(__value) { } 6242: 6242: _Tp __value; 6242: }; 6242: 6242: template 6242: struct __is_location_invariant<_Simple_type_wrapper<_Tp> > 6242: : __is_location_invariant<_Tp> 6242: { }; 6242: 6242: template 6242: class function; 6242: 6242: 6242: class _Function_base 6242: { 6242: public: 6242: static const std::size_t _M_max_size = sizeof(_Nocopy_types); 6242: static const std::size_t _M_max_align = __alignof__(_Nocopy_types); 6242: 6242: template 6242: class _Base_manager 6242: { 6242: protected: 6242: static const bool __stored_locally = 6242: (__is_location_invariant<_Functor>::value 6242: && sizeof(_Functor) <= _M_max_size 6242: && __alignof__(_Functor) <= _M_max_align 6242: && (_M_max_align % __alignof__(_Functor) == 0)); 6242: 6242: typedef integral_constant _Local_storage; 6242: 6242: 6242: static _Functor* 6242: _M_get_pointer(const _Any_data& __source) 6242: { 6242: const _Functor* __ptr = 6242: __stored_locally? std::__addressof(__source._M_access<_Functor>()) 6242: : __source._M_access<_Functor*>(); 6242: return const_cast<_Functor*>(__ptr); 6242: } 6242: 6242: 6242: 6242: static void 6242: _M_clone(_Any_data& __dest, const _Any_data& __source, true_type) 6242: { 6242: ::new (__dest._M_access()) _Functor(__source._M_access<_Functor>()); 6242: } 6242: 6242: 6242: 6242: static void 6242: _M_clone(_Any_data& __dest, const _Any_data& __source, false_type) 6242: { 6242: __dest._M_access<_Functor*>() = 6242: new _Functor(*__source._M_access<_Functor*>()); 6242: } 6242: 6242: 6242: 6242: static void 6242: _M_destroy(_Any_data& __victim, true_type) 6242: { 6242: __victim._M_access<_Functor>().~_Functor(); 6242: } 6242: 6242: 6242: static void 6242: _M_destroy(_Any_data& __victim, false_type) 6242: { 6242: delete __victim._M_access<_Functor*>(); 6242: } 6242: 6242: public: 6242: static bool 6242: _M_manager(_Any_data& __dest, const _Any_data& __source, 6242: _Manager_operation __op) 6242: { 6242: switch (__op) 6242: { 6242: 6242: case __get_type_info: 6242: __dest._M_access() = &typeid(_Functor); 6242: break; 6242: 6242: case __get_functor_ptr: 6242: __dest._M_access<_Functor*>() = _M_get_pointer(__source); 6242: break; 6242: 6242: case __clone_functor: 6242: _M_clone(__dest, __source, _Local_storage()); 6242: break; 6242: 6242: case __destroy_functor: 6242: _M_destroy(__dest, _Local_storage()); 6242: break; 6242: } 6242: return false; 6242: } 6242: 6242: static void 6242: _M_init_functor(_Any_data& __functor, _Functor&& __f) 6242: { _M_init_functor(__functor, std::move(__f), _Local_storage()); } 6242: 6242: template 6242: static bool 6242: _M_not_empty_function(const function<_Signature>& __f) 6242: { return static_cast(__f); } 6242: 6242: template 6242: static bool 6242: _M_not_empty_function(_Tp* __fp) 6242: { return __fp != nullptr; } 6242: 6242: template 6242: static bool 6242: _M_not_empty_function(_Tp _Class::* __mp) 6242: { return __mp != nullptr; } 6242: 6242: template 6242: static bool 6242: _M_not_empty_function(const _Tp&) 6242: { return true; } 6242: 6242: private: 6242: static void 6242: _M_init_functor(_Any_data& __functor, _Functor&& __f, true_type) 6242: { ::new (__functor._M_access()) _Functor(std::move(__f)); } 6242: 6242: static void 6242: _M_init_functor(_Any_data& __functor, _Functor&& __f, false_type) 6242: { __functor._M_access<_Functor*>() = new _Functor(std::move(__f)); } 6242: }; 6242: 6242: _Function_base() : _M_manager(nullptr) { } 6242: 6242: ~_Function_base() 6242: { 6242: if (_M_manager) 6242: _M_manager(_M_functor, _M_functor, __destroy_functor); 6242: } 6242: 6242: bool _M_empty() const { return !_M_manager; } 6242: 6242: typedef bool (*_Manager_type)(_Any_data&, const _Any_data&, 6242: _Manager_operation); 6242: 6242: _Any_data _M_functor; 6242: _Manager_type _M_manager; 6242: }; 6242: 6242: template 6242: class _Function_handler; 6242: 6242: template 6242: class _Function_handler<_Res(_ArgTypes...), _Functor> 6242: : public _Function_base::_Base_manager<_Functor> 6242: { 6242: typedef _Function_base::_Base_manager<_Functor> _Base; 6242: 6242: public: 6242: static _Res 6242: _M_invoke(const _Any_data& __functor, _ArgTypes&&... __args) 6242: { 6242: return (*_Base::_M_get_pointer(__functor))( 6242: std::forward<_ArgTypes>(__args)...); 6242: } 6242: }; 6242: 6242: template 6242: class _Function_handler 6242: : public _Function_base::_Base_manager<_Functor> 6242: { 6242: typedef _Function_base::_Base_manager<_Functor> _Base; 6242: 6242: public: 6242: static void 6242: _M_invoke(const _Any_data& __functor, _ArgTypes&&... __args) 6242: { 6242: (*_Base::_M_get_pointer(__functor))( 6242: std::forward<_ArgTypes>(__args)...); 6242: } 6242: }; 6242: 6242: template 6242: class _Function_handler<_Res(_ArgTypes...), _Member _Class::*> 6242: : public _Function_handler 6242: { 6242: typedef _Function_handler 6242: _Base; 6242: 6242: public: 6242: static _Res 6242: _M_invoke(const _Any_data& __functor, _ArgTypes&&... __args) 6242: { 6242: return std::__invoke(_Base::_M_get_pointer(__functor)->__value, 6242: std::forward<_ArgTypes>(__args)...); 6242: } 6242: }; 6242: 6242: template 6242: class _Function_handler 6242: : public _Function_base::_Base_manager< 6242: _Simple_type_wrapper< _Member _Class::* > > 6242: { 6242: typedef _Member _Class::* _Functor; 6242: typedef _Simple_type_wrapper<_Functor> _Wrapper; 6242: typedef _Function_base::_Base_manager<_Wrapper> _Base; 6242: 6242: public: 6242: static bool 6242: _M_manager(_Any_data& __dest, const _Any_data& __source, 6242: _Manager_operation __op) 6242: { 6242: switch (__op) 6242: { 6242: 6242: case __get_type_info: 6242: __dest._M_access() = &typeid(_Functor); 6242: break; 6242: 6242: case __get_functor_ptr: 6242: __dest._M_access<_Functor*>() = 6242: &_Base::_M_get_pointer(__source)->__value; 6242: break; 6242: 6242: default: 6242: _Base::_M_manager(__dest, __source, __op); 6242: } 6242: return false; 6242: } 6242: 6242: static void 6242: _M_invoke(const _Any_data& __functor, _ArgTypes&&... __args) 6242: { 6242: std::__invoke(_Base::_M_get_pointer(__functor)->__value, 6242: std::forward<_ArgTypes>(__args)...); 6242: } 6242: }; 6242: 6242: template 6242: using __check_func_return_type 6242: = __or_, is_same<_From, _To>, is_convertible<_From, _To>>; 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: template 6242: class function<_Res(_ArgTypes...)> 6242: : public _Maybe_unary_or_binary_function<_Res, _ArgTypes...>, 6242: private _Function_base 6242: { 6242: template::type> 6242: struct _Callable : __check_func_return_type<_Res2, _Res> { }; 6242: 6242: 6242: 6242: template 6242: struct _Callable : false_type { }; 6242: 6242: template 6242: using _Requires = typename enable_if<_Cond::value, _Tp>::type; 6242: 6242: public: 6242: typedef _Res result_type; 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: function() noexcept 6242: : _Function_base() { } 6242: 6242: 6242: 6242: 6242: 6242: function(nullptr_t) noexcept 6242: : _Function_base() { } 6242: # 413 "/usr/include/c++/8/bits/std_function.h" 3 6242: function(const function& __x); 6242: # 422 "/usr/include/c++/8/bits/std_function.h" 3 6242: function(function&& __x) noexcept : _Function_base() 6242: { 6242: __x.swap(*this); 6242: } 6242: # 443 "/usr/include/c++/8/bits/std_function.h" 3 6242: template>, void>, 6242: typename = _Requires<_Callable<_Functor>, void>> 6242: function(_Functor); 6242: # 460 "/usr/include/c++/8/bits/std_function.h" 3 6242: function& 6242: operator=(const function& __x) 6242: { 6242: function(__x).swap(*this); 6242: return *this; 6242: } 6242: # 478 "/usr/include/c++/8/bits/std_function.h" 3 6242: function& 6242: operator=(function&& __x) noexcept 6242: { 6242: function(std::move(__x)).swap(*this); 6242: return *this; 6242: } 6242: # 492 "/usr/include/c++/8/bits/std_function.h" 3 6242: function& 6242: operator=(nullptr_t) noexcept 6242: { 6242: if (_M_manager) 6242: { 6242: _M_manager(_M_functor, _M_functor, __destroy_functor); 6242: _M_manager = nullptr; 6242: _M_invoker = nullptr; 6242: } 6242: return *this; 6242: } 6242: # 520 "/usr/include/c++/8/bits/std_function.h" 3 6242: template 6242: _Requires<_Callable::type>, function&> 6242: operator=(_Functor&& __f) 6242: { 6242: function(std::forward<_Functor>(__f)).swap(*this); 6242: return *this; 6242: } 6242: 6242: 6242: template 6242: function& 6242: operator=(reference_wrapper<_Functor> __f) noexcept 6242: { 6242: function(__f).swap(*this); 6242: return *this; 6242: } 6242: # 546 "/usr/include/c++/8/bits/std_function.h" 3 6242: void swap(function& __x) noexcept 6242: { 6242: std::swap(_M_functor, __x._M_functor); 6242: std::swap(_M_manager, __x._M_manager); 6242: std::swap(_M_invoker, __x._M_invoker); 6242: } 6242: # 563 "/usr/include/c++/8/bits/std_function.h" 3 6242: explicit operator bool() const noexcept 6242: { return !_M_empty(); } 6242: # 576 "/usr/include/c++/8/bits/std_function.h" 3 6242: _Res operator()(_ArgTypes... __args) const; 6242: # 589 "/usr/include/c++/8/bits/std_function.h" 3 6242: const type_info& target_type() const noexcept; 6242: # 602 "/usr/include/c++/8/bits/std_function.h" 3 6242: template _Functor* target() noexcept; 6242: 6242: template const _Functor* target() const noexcept; 6242: 6242: 6242: 6242: private: 6242: using _Invoker_type = _Res (*)(const _Any_data&, _ArgTypes&&...); 6242: _Invoker_type _M_invoker; 6242: }; 6242: # 651 "/usr/include/c++/8/bits/std_function.h" 3 6242: template 6242: function<_Res(_ArgTypes...)>:: 6242: function(const function& __x) 6242: : _Function_base() 6242: { 6242: if (static_cast(__x)) 6242: { 6242: __x._M_manager(_M_functor, __x._M_functor, __clone_functor); 6242: _M_invoker = __x._M_invoker; 6242: _M_manager = __x._M_manager; 6242: } 6242: } 6242: 6242: template 6242: template 6242: function<_Res(_ArgTypes...)>:: 6242: function(_Functor __f) 6242: : _Function_base() 6242: { 6242: typedef _Function_handler<_Res(_ArgTypes...), _Functor> _My_handler; 6242: 6242: if (_My_handler::_M_not_empty_function(__f)) 6242: { 6242: _My_handler::_M_init_functor(_M_functor, std::move(__f)); 6242: _M_invoker = &_My_handler::_M_invoke; 6242: _M_manager = &_My_handler::_M_manager; 6242: } 6242: } 6242: 6242: template 6242: _Res 6242: function<_Res(_ArgTypes...)>:: 6242: operator()(_ArgTypes... __args) const 6242: { 6242: if (_M_empty()) 6242: __throw_bad_function_call(); 6242: return _M_invoker(_M_functor, std::forward<_ArgTypes>(__args)...); 6242: } 6242: 6242: 6242: template 6242: const type_info& 6242: function<_Res(_ArgTypes...)>:: 6242: target_type() const noexcept 6242: { 6242: if (_M_manager) 6242: { 6242: _Any_data __typeinfo_result; 6242: _M_manager(__typeinfo_result, _M_functor, __get_type_info); 6242: return *__typeinfo_result._M_access(); 6242: } 6242: else 6242: return typeid(void); 6242: } 6242: 6242: template 6242: template 6242: _Functor* 6242: function<_Res(_ArgTypes...)>:: 6242: target() noexcept 6242: { 6242: const function* __const_this = this; 6242: const _Functor* __func = __const_this->template target<_Functor>(); 6242: return const_cast<_Functor*>(__func); 6242: } 6242: 6242: template 6242: template 6242: const _Functor* 6242: function<_Res(_ArgTypes...)>:: 6242: target() const noexcept 6242: { 6242: if (typeid(_Functor) == target_type() && _M_manager) 6242: { 6242: _Any_data __ptr; 6242: _M_manager(__ptr, _M_functor, __get_functor_ptr); 6242: return __ptr._M_access(); 6242: } 6242: else 6242: return nullptr; 6242: } 6242: # 743 "/usr/include/c++/8/bits/std_function.h" 3 6242: template 6242: inline bool 6242: operator==(const function<_Res(_Args...)>& __f, nullptr_t) noexcept 6242: { return !static_cast(__f); } 6242: 6242: 6242: template 6242: inline bool 6242: operator==(nullptr_t, const function<_Res(_Args...)>& __f) noexcept 6242: { return !static_cast(__f); } 6242: # 761 "/usr/include/c++/8/bits/std_function.h" 3 6242: template 6242: inline bool 6242: operator!=(const function<_Res(_Args...)>& __f, nullptr_t) noexcept 6242: { return static_cast(__f); } 6242: 6242: 6242: template 6242: inline bool 6242: operator!=(nullptr_t, const function<_Res(_Args...)>& __f) noexcept 6242: { return static_cast(__f); } 6242: # 782 "/usr/include/c++/8/bits/std_function.h" 3 6242: template 6242: inline void 6242: swap(function<_Res(_Args...)>& __x, function<_Res(_Args...)>& __y) noexcept 6242: { __x.swap(__y); } 6242: 6242: 6242: } 6242: # 60 "/usr/include/c++/8/functional" 2 3 6242: # 68 "/usr/include/c++/8/functional" 3 6242: namespace std __attribute__ ((__visibility__ ("default"))) 6242: { 6242: 6242: # 86 "/usr/include/c++/8/functional" 3 6242: template::value> 6242: class _Mem_fn_base 6242: : public _Mem_fn_traits<_MemFunPtr>::__maybe_type 6242: { 6242: using _Traits = _Mem_fn_traits<_MemFunPtr>; 6242: 6242: using _Arity = typename _Traits::__arity; 6242: using _Varargs = typename _Traits::__vararg; 6242: 6242: template 6242: friend struct _Bind_check_arity; 6242: 6242: _MemFunPtr _M_pmf; 6242: 6242: public: 6242: 6242: using result_type = typename _Traits::__result_type; 6242: 6242: explicit constexpr 6242: _Mem_fn_base(_MemFunPtr __pmf) noexcept : _M_pmf(__pmf) { } 6242: 6242: template 6242: auto 6242: operator()(_Args&&... __args) const 6242: noexcept(noexcept( 6242: std::__invoke(_M_pmf, std::forward<_Args>(__args)...))) 6242: -> decltype(std::__invoke(_M_pmf, std::forward<_Args>(__args)...)) 6242: { return std::__invoke(_M_pmf, std::forward<_Args>(__args)...); } 6242: }; 6242: 6242: 6242: template 6242: class _Mem_fn_base<_MemObjPtr, false> 6242: { 6242: using _Arity = integral_constant; 6242: using _Varargs = false_type; 6242: 6242: template 6242: friend struct _Bind_check_arity; 6242: 6242: _MemObjPtr _M_pm; 6242: 6242: public: 6242: explicit constexpr 6242: _Mem_fn_base(_MemObjPtr __pm) noexcept : _M_pm(__pm) { } 6242: 6242: template 6242: auto 6242: operator()(_Tp&& __obj) const 6242: noexcept(noexcept(std::__invoke(_M_pm, std::forward<_Tp>(__obj)))) 6242: -> decltype(std::__invoke(_M_pm, std::forward<_Tp>(__obj))) 6242: { return std::__invoke(_M_pm, std::forward<_Tp>(__obj)); } 6242: }; 6242: 6242: template 6242: struct _Mem_fn; 6242: 6242: template 6242: struct _Mem_fn<_Res _Class::*> 6242: : _Mem_fn_base<_Res _Class::*> 6242: { 6242: using _Mem_fn_base<_Res _Class::*>::_Mem_fn_base; 6242: }; 6242: # 158 "/usr/include/c++/8/functional" 3 6242: template 6242: inline _Mem_fn<_Tp _Class::*> 6242: mem_fn(_Tp _Class::* __pm) noexcept 6242: { 6242: return _Mem_fn<_Tp _Class::*>(__pm); 6242: } 6242: # 173 "/usr/include/c++/8/functional" 3 6242: template 6242: struct is_bind_expression 6242: : public false_type { }; 6242: # 184 "/usr/include/c++/8/functional" 3 6242: template 6242: struct is_placeholder 6242: : public integral_constant 6242: { }; 6242: # 199 "/usr/include/c++/8/functional" 3 6242: template struct _Placeholder { }; 6242: 6242: 6242: 6242: 6242: 6242: namespace placeholders 6242: { 6242: 6242: 6242: 6242: 6242: extern const _Placeholder<1> _1; 6242: extern const _Placeholder<2> _2; 6242: extern const _Placeholder<3> _3; 6242: extern const _Placeholder<4> _4; 6242: extern const _Placeholder<5> _5; 6242: extern const _Placeholder<6> _6; 6242: extern const _Placeholder<7> _7; 6242: extern const _Placeholder<8> _8; 6242: extern const _Placeholder<9> _9; 6242: extern const _Placeholder<10> _10; 6242: extern const _Placeholder<11> _11; 6242: extern const _Placeholder<12> _12; 6242: extern const _Placeholder<13> _13; 6242: extern const _Placeholder<14> _14; 6242: extern const _Placeholder<15> _15; 6242: extern const _Placeholder<16> _16; 6242: extern const _Placeholder<17> _17; 6242: extern const _Placeholder<18> _18; 6242: extern const _Placeholder<19> _19; 6242: extern const _Placeholder<20> _20; 6242: extern const _Placeholder<21> _21; 6242: extern const _Placeholder<22> _22; 6242: extern const _Placeholder<23> _23; 6242: extern const _Placeholder<24> _24; 6242: extern const _Placeholder<25> _25; 6242: extern const _Placeholder<26> _26; 6242: extern const _Placeholder<27> _27; 6242: extern const _Placeholder<28> _28; 6242: extern const _Placeholder<29> _29; 6242: } 6242: 6242: 6242: 6242: 6242: 6242: 6242: template 6242: struct is_placeholder<_Placeholder<_Num> > 6242: : public integral_constant 6242: { }; 6242: 6242: template 6242: struct is_placeholder > 6242: : public integral_constant 6242: { }; 6242: 6242: 6242: 6242: template 6242: using _Safe_tuple_element_t 6242: = typename enable_if<(__i < tuple_size<_Tuple>::value), 6242: tuple_element<__i, _Tuple>>::type::type; 6242: # 275 "/usr/include/c++/8/functional" 3 6242: template::value, 6242: bool _IsPlaceholder = (is_placeholder<_Arg>::value > 0)> 6242: class _Mu; 6242: 6242: 6242: 6242: 6242: 6242: 6242: template 6242: class _Mu, false, false> 6242: { 6242: public: 6242: 6242: 6242: 6242: 6242: template 6242: _Tp& 6242: operator()(_CVRef& __arg, _Tuple&) const volatile 6242: { return __arg.get(); } 6242: }; 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: template 6242: class _Mu<_Arg, true, false> 6242: { 6242: public: 6242: template 6242: auto 6242: operator()(_CVArg& __arg, 6242: tuple<_Args...>& __tuple) const volatile 6242: -> decltype(__arg(declval<_Args>()...)) 6242: { 6242: 6242: typedef typename _Build_index_tuple::__type 6242: _Indexes; 6242: return this->__call(__arg, __tuple, _Indexes()); 6242: } 6242: 6242: private: 6242: 6242: 6242: template 6242: auto 6242: __call(_CVArg& __arg, tuple<_Args...>& __tuple, 6242: const _Index_tuple<_Indexes...>&) const volatile 6242: -> decltype(__arg(declval<_Args>()...)) 6242: { 6242: return __arg(std::get<_Indexes>(std::move(__tuple))...); 6242: } 6242: }; 6242: 6242: 6242: 6242: 6242: 6242: 6242: template 6242: class _Mu<_Arg, false, true> 6242: { 6242: public: 6242: template 6242: _Safe_tuple_element_t<(is_placeholder<_Arg>::value - 1), _Tuple>&& 6242: operator()(const volatile _Arg&, _Tuple& __tuple) const volatile 6242: { 6242: return 6242: ::std::get<(is_placeholder<_Arg>::value - 1)>(std::move(__tuple)); 6242: } 6242: }; 6242: 6242: 6242: 6242: 6242: 6242: 6242: template 6242: class _Mu<_Arg, false, false> 6242: { 6242: public: 6242: template 6242: _CVArg&& 6242: operator()(_CVArg&& __arg, _Tuple&) const volatile 6242: { return std::forward<_CVArg>(__arg); } 6242: }; 6242: 6242: 6242: template 6242: inline auto 6242: __volget(volatile tuple<_Tp...>& __tuple) 6242: -> __tuple_element_t<_Ind, tuple<_Tp...>> volatile& 6242: { return std::get<_Ind>(const_cast&>(__tuple)); } 6242: 6242: 6242: template 6242: inline auto 6242: __volget(const volatile tuple<_Tp...>& __tuple) 6242: -> __tuple_element_t<_Ind, tuple<_Tp...>> const volatile& 6242: { return std::get<_Ind>(const_cast&>(__tuple)); } 6242: 6242: 6242: template 6242: struct _Bind; 6242: 6242: template 6242: class _Bind<_Functor(_Bound_args...)> 6242: : public _Weak_result_type<_Functor> 6242: { 6242: typedef typename _Build_index_tuple::__type 6242: _Bound_indexes; 6242: 6242: _Functor _M_f; 6242: tuple<_Bound_args...> _M_bound_args; 6242: 6242: 6242: template 6242: _Result 6242: __call(tuple<_Args...>&& __args, _Index_tuple<_Indexes...>) 6242: { 6242: return std::__invoke(_M_f, 6242: _Mu<_Bound_args>()(std::get<_Indexes>(_M_bound_args), __args)... 6242: ); 6242: } 6242: 6242: 6242: template 6242: _Result 6242: __call_c(tuple<_Args...>&& __args, _Index_tuple<_Indexes...>) const 6242: { 6242: return std::__invoke(_M_f, 6242: _Mu<_Bound_args>()(std::get<_Indexes>(_M_bound_args), __args)... 6242: ); 6242: } 6242: 6242: 6242: template 6242: _Result 6242: __call_v(tuple<_Args...>&& __args, 6242: _Index_tuple<_Indexes...>) volatile 6242: { 6242: return std::__invoke(_M_f, 6242: _Mu<_Bound_args>()(__volget<_Indexes>(_M_bound_args), __args)... 6242: ); 6242: } 6242: 6242: 6242: template 6242: _Result 6242: __call_c_v(tuple<_Args...>&& __args, 6242: _Index_tuple<_Indexes...>) const volatile 6242: { 6242: return std::__invoke(_M_f, 6242: _Mu<_Bound_args>()(__volget<_Indexes>(_M_bound_args), __args)... 6242: ); 6242: } 6242: 6242: template 6242: using _Mu_type = decltype( 6242: _Mu::type>()( 6242: std::declval<_BoundArg&>(), std::declval<_CallArgs&>()) ); 6242: 6242: template 6242: using _Res_type_impl 6242: = typename result_of< _Fn&(_Mu_type<_BArgs, _CallArgs>&&...) >::type; 6242: 6242: template 6242: using _Res_type = _Res_type_impl<_Functor, _CallArgs, _Bound_args...>; 6242: 6242: template 6242: using __dependent = typename 6242: enable_if::value+1), _Functor>::type; 6242: 6242: template class __cv_quals> 6242: using _Res_type_cv = _Res_type_impl< 6242: typename __cv_quals<__dependent<_CallArgs>>::type, 6242: _CallArgs, 6242: typename __cv_quals<_Bound_args>::type...>; 6242: 6242: public: 6242: template 6242: explicit _Bind(const _Functor& __f, _Args&&... __args) 6242: : _M_f(__f), _M_bound_args(std::forward<_Args>(__args)...) 6242: { } 6242: 6242: template 6242: explicit _Bind(_Functor&& __f, _Args&&... __args) 6242: : _M_f(std::move(__f)), _M_bound_args(std::forward<_Args>(__args)...) 6242: { } 6242: 6242: _Bind(const _Bind&) = default; 6242: 6242: _Bind(_Bind&& __b) 6242: : _M_f(std::move(__b._M_f)), _M_bound_args(std::move(__b._M_bound_args)) 6242: { } 6242: 6242: 6242: template>> 6242: _Result 6242: operator()(_Args&&... __args) 6242: { 6242: return this->__call<_Result>( 6242: std::forward_as_tuple(std::forward<_Args>(__args)...), 6242: _Bound_indexes()); 6242: } 6242: 6242: 6242: template, add_const>> 6242: _Result 6242: operator()(_Args&&... __args) const 6242: { 6242: return this->__call_c<_Result>( 6242: std::forward_as_tuple(std::forward<_Args>(__args)...), 6242: _Bound_indexes()); 6242: } 6242: # 505 "/usr/include/c++/8/functional" 3 6242: template, add_volatile>> 6242: 6242: _Result 6242: operator()(_Args&&... __args) volatile 6242: { 6242: return this->__call_v<_Result>( 6242: std::forward_as_tuple(std::forward<_Args>(__args)...), 6242: _Bound_indexes()); 6242: } 6242: 6242: 6242: template, add_cv>> 6242: 6242: _Result 6242: operator()(_Args&&... __args) const volatile 6242: { 6242: return this->__call_c_v<_Result>( 6242: std::forward_as_tuple(std::forward<_Args>(__args)...), 6242: _Bound_indexes()); 6242: } 6242: }; 6242: 6242: 6242: template 6242: struct _Bind_result; 6242: 6242: template 6242: class _Bind_result<_Result, _Functor(_Bound_args...)> 6242: { 6242: typedef typename _Build_index_tuple::__type 6242: _Bound_indexes; 6242: 6242: _Functor _M_f; 6242: tuple<_Bound_args...> _M_bound_args; 6242: 6242: 6242: template 6242: using __enable_if_void 6242: = typename enable_if{}>::type; 6242: 6242: template 6242: using __disable_if_void 6242: = typename enable_if{}, _Result>::type; 6242: 6242: 6242: template 6242: __disable_if_void<_Res> 6242: __call(tuple<_Args...>&& __args, _Index_tuple<_Indexes...>) 6242: { 6242: return std::__invoke(_M_f, _Mu<_Bound_args>() 6242: (std::get<_Indexes>(_M_bound_args), __args)...); 6242: } 6242: 6242: 6242: template 6242: __enable_if_void<_Res> 6242: __call(tuple<_Args...>&& __args, _Index_tuple<_Indexes...>) 6242: { 6242: std::__invoke(_M_f, _Mu<_Bound_args>() 6242: (std::get<_Indexes>(_M_bound_args), __args)...); 6242: } 6242: 6242: 6242: template 6242: __disable_if_void<_Res> 6242: __call(tuple<_Args...>&& __args, _Index_tuple<_Indexes...>) const 6242: { 6242: return std::__invoke(_M_f, _Mu<_Bound_args>() 6242: (std::get<_Indexes>(_M_bound_args), __args)...); 6242: } 6242: 6242: 6242: template 6242: __enable_if_void<_Res> 6242: __call(tuple<_Args...>&& __args, _Index_tuple<_Indexes...>) const 6242: { 6242: std::__invoke(_M_f, _Mu<_Bound_args>() 6242: (std::get<_Indexes>(_M_bound_args), __args)...); 6242: } 6242: 6242: 6242: template 6242: __disable_if_void<_Res> 6242: __call(tuple<_Args...>&& __args, _Index_tuple<_Indexes...>) volatile 6242: { 6242: return std::__invoke(_M_f, _Mu<_Bound_args>() 6242: (__volget<_Indexes>(_M_bound_args), __args)...); 6242: } 6242: 6242: 6242: template 6242: __enable_if_void<_Res> 6242: __call(tuple<_Args...>&& __args, _Index_tuple<_Indexes...>) volatile 6242: { 6242: std::__invoke(_M_f, _Mu<_Bound_args>() 6242: (__volget<_Indexes>(_M_bound_args), __args)...); 6242: } 6242: 6242: 6242: template 6242: __disable_if_void<_Res> 6242: __call(tuple<_Args...>&& __args, 6242: _Index_tuple<_Indexes...>) const volatile 6242: { 6242: return std::__invoke(_M_f, _Mu<_Bound_args>() 6242: (__volget<_Indexes>(_M_bound_args), __args)...); 6242: } 6242: 6242: 6242: template 6242: __enable_if_void<_Res> 6242: __call(tuple<_Args...>&& __args, 6242: _Index_tuple<_Indexes...>) const volatile 6242: { 6242: std::__invoke(_M_f, _Mu<_Bound_args>() 6242: (__volget<_Indexes>(_M_bound_args), __args)...); 6242: } 6242: 6242: public: 6242: typedef _Result result_type; 6242: 6242: template 6242: explicit _Bind_result(const _Functor& __f, _Args&&... __args) 6242: : _M_f(__f), _M_bound_args(std::forward<_Args>(__args)...) 6242: { } 6242: 6242: template 6242: explicit _Bind_result(_Functor&& __f, _Args&&... __args) 6242: : _M_f(std::move(__f)), _M_bound_args(std::forward<_Args>(__args)...) 6242: { } 6242: 6242: _Bind_result(const _Bind_result&) = default; 6242: 6242: _Bind_result(_Bind_result&& __b) 6242: : _M_f(std::move(__b._M_f)), _M_bound_args(std::move(__b._M_bound_args)) 6242: { } 6242: 6242: 6242: template 6242: result_type 6242: operator()(_Args&&... __args) 6242: { 6242: return this->__call<_Result>( 6242: std::forward_as_tuple(std::forward<_Args>(__args)...), 6242: _Bound_indexes()); 6242: } 6242: 6242: 6242: template 6242: result_type 6242: operator()(_Args&&... __args) const 6242: { 6242: return this->__call<_Result>( 6242: std::forward_as_tuple(std::forward<_Args>(__args)...), 6242: _Bound_indexes()); 6242: } 6242: 6242: 6242: template 6242: 6242: result_type 6242: operator()(_Args&&... __args) volatile 6242: { 6242: return this->__call<_Result>( 6242: std::forward_as_tuple(std::forward<_Args>(__args)...), 6242: _Bound_indexes()); 6242: } 6242: 6242: 6242: template 6242: 6242: result_type 6242: operator()(_Args&&... __args) const volatile 6242: { 6242: return this->__call<_Result>( 6242: std::forward_as_tuple(std::forward<_Args>(__args)...), 6242: _Bound_indexes()); 6242: } 6242: }; 6242: 6242: 6242: 6242: 6242: 6242: 6242: template 6242: struct is_bind_expression<_Bind<_Signature> > 6242: : public true_type { }; 6242: 6242: 6242: 6242: 6242: 6242: template 6242: struct is_bind_expression > 6242: : public true_type { }; 6242: 6242: 6242: 6242: 6242: 6242: template 6242: struct is_bind_expression > 6242: : public true_type { }; 6242: 6242: 6242: 6242: 6242: 6242: template 6242: struct is_bind_expression> 6242: : public true_type { }; 6242: 6242: 6242: 6242: 6242: 6242: template 6242: struct is_bind_expression<_Bind_result<_Result, _Signature>> 6242: : public true_type { }; 6242: 6242: 6242: 6242: 6242: 6242: template 6242: struct is_bind_expression> 6242: : public true_type { }; 6242: 6242: 6242: 6242: 6242: 6242: template 6242: struct is_bind_expression> 6242: : public true_type { }; 6242: 6242: 6242: 6242: 6242: 6242: template 6242: struct is_bind_expression> 6242: : public true_type { }; 6242: 6242: template 6242: struct _Bind_check_arity { }; 6242: 6242: template 6242: struct _Bind_check_arity<_Ret (*)(_Args...), _BoundArgs...> 6242: { 6242: static_assert(sizeof...(_BoundArgs) == sizeof...(_Args), 6242: "Wrong number of arguments for function"); 6242: }; 6242: 6242: template 6242: struct _Bind_check_arity<_Ret (*)(_Args......), _BoundArgs...> 6242: { 6242: static_assert(sizeof...(_BoundArgs) >= sizeof...(_Args), 6242: "Wrong number of arguments for function"); 6242: }; 6242: 6242: template 6242: struct _Bind_check_arity<_Tp _Class::*, _BoundArgs...> 6242: { 6242: using _Arity = typename _Mem_fn<_Tp _Class::*>::_Arity; 6242: using _Varargs = typename _Mem_fn<_Tp _Class::*>::_Varargs; 6242: static_assert(_Varargs::value 6242: ? sizeof...(_BoundArgs) >= _Arity::value + 1 6242: : sizeof...(_BoundArgs) == _Arity::value + 1, 6242: "Wrong number of arguments for pointer-to-member"); 6242: }; 6242: 6242: 6242: 6242: 6242: template::type> 6242: using __is_socketlike = __or_, is_enum<_Tp2>>; 6242: 6242: template 6242: struct _Bind_helper 6242: : _Bind_check_arity::type, _BoundArgs...> 6242: { 6242: typedef typename decay<_Func>::type __func_type; 6242: typedef _Bind<__func_type(typename decay<_BoundArgs>::type...)> type; 6242: }; 6242: 6242: 6242: 6242: 6242: template 6242: struct _Bind_helper 6242: { }; 6242: 6242: 6242: 6242: 6242: 6242: template 6242: inline typename 6242: _Bind_helper<__is_socketlike<_Func>::value, _Func, _BoundArgs...>::type 6242: bind(_Func&& __f, _BoundArgs&&... __args) 6242: { 6242: typedef _Bind_helper __helper_type; 6242: return typename __helper_type::type(std::forward<_Func>(__f), 6242: std::forward<_BoundArgs>(__args)...); 6242: } 6242: 6242: template 6242: struct _Bindres_helper 6242: : _Bind_check_arity::type, _BoundArgs...> 6242: { 6242: typedef typename decay<_Func>::type __functor_type; 6242: typedef _Bind_result<_Result, 6242: __functor_type(typename decay<_BoundArgs>::type...)> 6242: type; 6242: }; 6242: 6242: 6242: 6242: 6242: 6242: template 6242: inline 6242: typename _Bindres_helper<_Result, _Func, _BoundArgs...>::type 6242: bind(_Func&& __f, _BoundArgs&&... __args) 6242: { 6242: typedef _Bindres_helper<_Result, _Func, _BoundArgs...> __helper_type; 6242: return typename __helper_type::type(std::forward<_Func>(__f), 6242: std::forward<_BoundArgs>(__args)...); 6242: } 6242: # 1192 "/usr/include/c++/8/functional" 3 6242: 6242: } 6242: # 6 "hash.hh" 2 6242: 6242: # 1 "/usr/include/c++/8/cstddef" 1 3 6242: # 42 "/usr/include/c++/8/cstddef" 3 6242: 6242: # 43 "/usr/include/c++/8/cstddef" 3 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: # 1 "/usr/lib/gcc/s390x-linux-gnu/8/include/stddef.h" 1 3 4 6242: # 51 "/usr/include/c++/8/cstddef" 2 3 6242: 6242: 6242: namespace std 6242: { 6242: 6242: using ::max_align_t; 6242: } 6242: # 8 "hash.hh" 2 6242: 6242: 6242: # 9 "hash.hh" 6242: namespace Kakoune 6242: { 6242: 6242: size_t hash_data(const char* data, size_t len); 6242: 6242: template 6242: size_t hash_value(const Type&... val) 6242: { 6242: static_assert(sizeof...(Type) == 1, ""); 6242: return std::hash()(val...); 6242: } 6242: 6242: template 6242: typename std::enable_if::value, size_t>::type 6242: hash_value(const Type& val) 6242: { 6242: return hash_value((typename std::underlying_type::type)val); 6242: } 6242: 6242: template 6242: size_t hash_values(Type&& t) 6242: { 6242: return hash_value(std::forward(t)); 6242: } 6242: 6242: inline size_t combine_hash(size_t lhs, size_t rhs) 6242: { 6242: return lhs ^ (rhs + 0x9e3779b9 + (lhs << 6) + (lhs >> 2)); 6242: } 6242: 6242: template 6242: size_t hash_values(Type&& t, RemainingTypes&&... rt) 6242: { 6242: size_t seed = hash_values(std::forward(rt)...); 6242: return combine_hash(seed, hash_value(std::forward(t))); 6242: } 6242: 6242: template 6242: size_t hash_value(const std::pair& val) 6242: { 6242: return hash_values(val.first, val.second); 6242: } 6242: 6242: template 6242: struct Hash 6242: { 6242: size_t operator()(const Type& val) const 6242: { 6242: return hash_value(val); 6242: } 6242: }; 6242: 6242: } 6242: # 6 "units.hh" 2 6242: 6242: 6242: 6242: namespace Kakoune 6242: { 6242: 6242: template 6242: class StronglyTypedNumber 6242: { 6242: public: 6242: [[gnu::always_inline]] 6242: explicit constexpr StronglyTypedNumber(ValueType value) 6242: : m_value(value) 6242: { 6242: static_assert(std::is_base_of::value, 6242: "RealType is not derived from StronglyTypedNumber"); 6242: } 6242: 6242: [[gnu::always_inline]] 6242: constexpr friend RealType operator+(RealType lhs, RealType rhs) 6242: { return RealType(lhs.m_value + rhs.m_value); } 6242: 6242: [[gnu::always_inline]] 6242: constexpr friend RealType operator-(RealType lhs, RealType rhs) 6242: { return RealType(lhs.m_value - rhs.m_value); } 6242: 6242: [[gnu::always_inline]] 6242: constexpr friend RealType operator*(RealType lhs, RealType rhs) 6242: { return RealType(lhs.m_value * rhs.m_value); } 6242: 6242: [[gnu::always_inline]] 6242: constexpr friend RealType operator/(RealType lhs, RealType rhs) 6242: { return RealType(lhs.m_value / rhs.m_value); } 6242: 6242: [[gnu::always_inline]] 6242: RealType& operator+=(RealType other) 6242: { m_value += other.m_value; return static_cast(*this); } 6242: 6242: [[gnu::always_inline]] 6242: RealType& operator-=(RealType other) 6242: { m_value -= other.m_value; return static_cast(*this); } 6242: 6242: [[gnu::always_inline]] 6242: RealType& operator*=(RealType other) 6242: { m_value *= other.m_value; return static_cast(*this); } 6242: 6242: [[gnu::always_inline]] 6242: RealType& operator/=(RealType other) 6242: { m_value /= other.m_value; return static_cast(*this); } 6242: 6242: [[gnu::always_inline]] 6242: RealType& operator++() 6242: { ++m_value; return static_cast(*this); } 6242: 6242: [[gnu::always_inline]] 6242: RealType& operator--() 6242: { --m_value; return static_cast(*this); } 6242: 6242: [[gnu::always_inline]] 6242: RealType operator++(int) 6242: { RealType backup(static_cast(*this)); ++m_value; return backup; } 6242: 6242: [[gnu::always_inline]] 6242: RealType operator--(int) 6242: { RealType backup(static_cast(*this)); --m_value; return backup; } 6242: 6242: [[gnu::always_inline]] 6242: constexpr RealType operator-() const { return RealType(-m_value); } 6242: 6242: [[gnu::always_inline]] 6242: constexpr friend RealType operator%(RealType lhs, RealType rhs) 6242: { return RealType(lhs.m_value % rhs.m_value); } 6242: 6242: [[gnu::always_inline]] 6242: RealType& operator%=(RealType other) 6242: { m_value %= other.m_value; return static_cast(*this); } 6242: 6242: [[gnu::always_inline]] 6242: constexpr friend bool operator==(RealType lhs, RealType rhs) 6242: { return lhs.m_value == rhs.m_value; } 6242: 6242: [[gnu::always_inline]] 6242: constexpr friend bool operator!=(RealType lhs, RealType rhs) 6242: { return lhs.m_value != rhs.m_value; } 6242: 6242: [[gnu::always_inline]] 6242: constexpr friend bool operator<(RealType lhs, RealType rhs) 6242: { return lhs.m_value < rhs.m_value; } 6242: 6242: [[gnu::always_inline]] 6242: constexpr friend bool operator<=(RealType lhs, RealType rhs) 6242: { return lhs.m_value <= rhs.m_value; } 6242: 6242: [[gnu::always_inline]] 6242: constexpr friend bool operator>(RealType lhs, RealType rhs) 6242: { return lhs.m_value > rhs.m_value; } 6242: 6242: [[gnu::always_inline]] 6242: constexpr friend bool operator>=(RealType lhs, RealType rhs) 6242: { return lhs.m_value >= rhs.m_value; } 6242: 6242: [[gnu::always_inline]] 6242: constexpr bool operator!() const 6242: { return not m_value; } 6242: 6242: [[gnu::always_inline]] 6242: explicit constexpr operator ValueType() const { return m_value; } 6242: [[gnu::always_inline]] 6242: explicit constexpr operator bool() const { return m_value; } 6242: 6242: friend size_t hash_value(RealType val) { return hash_value(val.m_value); } 6242: friend size_t abs(RealType val) { return val.m_value < ValueType(0) ? -val.m_value : val.m_value; } 6242: 6242: explicit operator size_t() { if (not (m_value >= 0)) on_assert_failed("assert failed \"" "m_value >= 0" "\" at " "units.hh" ":" "119"); return (size_t)m_value; } 6242: 6242: protected: 6242: ValueType m_value; 6242: }; 6242: 6242: struct LineCount : public StronglyTypedNumber 6242: { 6242: [[gnu::always_inline]] 6242: constexpr LineCount(int value = 0) : StronglyTypedNumber(value) {} 6242: }; 6242: 6242: [[gnu::always_inline]] 6242: inline constexpr LineCount operator"" _line(unsigned long long int value) 6242: { 6242: return LineCount(value); 6242: } 6242: 6242: struct ByteCount : public StronglyTypedNumber 6242: { 6242: [[gnu::always_inline]] 6242: constexpr ByteCount(int value = 0) : StronglyTypedNumber(value) {} 6242: }; 6242: 6242: [[gnu::always_inline]] 6242: inline constexpr ByteCount operator"" _byte(unsigned long long int value) 6242: { 6242: return ByteCount(value); 6242: } 6242: 6242: struct CharCount : public StronglyTypedNumber 6242: { 6242: [[gnu::always_inline]] 6242: constexpr CharCount(int value = 0) : StronglyTypedNumber(value) {} 6242: }; 6242: 6242: [[gnu::always_inline]] 6242: inline constexpr CharCount operator"" _char(unsigned long long int value) 6242: { 6242: return CharCount(value); 6242: } 6242: 6242: struct ColumnCount : public StronglyTypedNumber 6242: { 6242: [[gnu::always_inline]] 6242: constexpr ColumnCount(int value = 0) : StronglyTypedNumber(value) {} 6242: }; 6242: 6242: [[gnu::always_inline]] 6242: inline constexpr ColumnCount operator"" _col(unsigned long long int value) 6242: { 6242: return ColumnCount(value); 6242: } 6242: 6242: } 6242: # 5 "coord.hh" 2 6242: 6242: 6242: namespace Kakoune 6242: { 6242: 6242: template 6242: struct LineAndColumn 6242: { 6242: LineType line; 6242: ColumnType column; 6242: 6242: [[gnu::always_inline]] 6242: constexpr LineAndColumn(LineType line = 0, ColumnType column = 0) 6242: : line(line), column(column) {} 6242: 6242: [[gnu::always_inline]] 6242: constexpr EffectiveType operator+(EffectiveType other) const 6242: { 6242: return {line + other.line, column + other.column}; 6242: } 6242: 6242: [[gnu::always_inline]] 6242: EffectiveType& operator+=(EffectiveType other) 6242: { 6242: line += other.line; 6242: column += other.column; 6242: return *static_cast(this); 6242: } 6242: 6242: [[gnu::always_inline]] 6242: constexpr EffectiveType operator-(EffectiveType other) const 6242: { 6242: return {line - other.line, column - other.column}; 6242: } 6242: 6242: [[gnu::always_inline]] 6242: EffectiveType& operator-=(EffectiveType other) 6242: { 6242: line -= other.line; 6242: column -= other.column; 6242: return *static_cast(this); 6242: } 6242: 6242: [[gnu::always_inline]] 6242: constexpr bool operator< (EffectiveType other) const 6242: { 6242: return (line != other.line) ? line < other.line 6242: : column < other.column; 6242: } 6242: 6242: [[gnu::always_inline]] 6242: constexpr bool operator<= (EffectiveType other) const 6242: { 6242: return (line != other.line) ? line < other.line 6242: : column <= other.column; 6242: } 6242: 6242: [[gnu::always_inline]] 6242: constexpr bool operator> (EffectiveType other) const 6242: { 6242: return (line != other.line) ? line > other.line 6242: : column > other.column; 6242: } 6242: 6242: [[gnu::always_inline]] 6242: constexpr bool operator>= (EffectiveType other) const 6242: { 6242: return (line != other.line) ? line > other.line 6242: : column >= other.column; 6242: } 6242: 6242: [[gnu::always_inline]] 6242: constexpr bool operator== (EffectiveType other) const 6242: { 6242: return line == other.line and column == other.column; 6242: } 6242: 6242: [[gnu::always_inline]] 6242: constexpr bool operator!= (EffectiveType other) const 6242: { 6242: return line != other.line or column != other.column; 6242: } 6242: 6242: friend size_t hash_value(const EffectiveType& val) 6242: { 6242: return hash_values(val.line, val.column); 6242: } 6242: }; 6242: 6242: struct BufferCoord : LineAndColumn 6242: { 6242: [[gnu::always_inline]] 6242: constexpr BufferCoord(LineCount line = 0, ByteCount column = 0) 6242: : LineAndColumn(line, column) {} 6242: }; 6242: 6242: struct DisplayCoord : LineAndColumn 6242: { 6242: [[gnu::always_inline]] 6242: constexpr DisplayCoord(LineCount line = 0, ColumnCount column = 0) 6242: : LineAndColumn(line, column) {} 6242: 6242: static constexpr const char* option_type_name = "coord"; 6242: }; 6242: 6242: struct BufferCoordAndTarget : BufferCoord 6242: { 6242: [[gnu::always_inline]] 6242: constexpr BufferCoordAndTarget(LineCount line = 0, ByteCount column = 0, ColumnCount target = -1) 6242: : BufferCoord(line, column), target(target) {} 6242: 6242: [[gnu::always_inline]] 6242: constexpr BufferCoordAndTarget(BufferCoord coord, ColumnCount target = -1) 6242: : BufferCoord(coord), target(target) {} 6242: 6242: ColumnCount target; 6242: }; 6242: 6242: inline size_t hash_value(const BufferCoordAndTarget& val) 6242: { 6242: return hash_values(val.line, val.column, val.target); 6242: } 6242: 6242: } 6242: # 5 "keys.hh" 2 6242: # 1 "flags.hh" 1 6242: 6242: 6242: 6242: 6242: 6242: namespace Kakoune 6242: { 6242: 6242: template 6242: struct WithBitOps : std::false_type {}; 6242: 6242: template 6242: using UnderlyingType = typename std::underlying_type::type; 6242: 6242: template 6242: using EnableIfWithBitOps = typename std::enable_if::value, T>::type; 6242: 6242: template 6242: using EnableIfWithoutBitOps = typename std::enable_if::value, T>::type; 6242: 6242: template> 6242: constexpr Flags operator|(Flags lhs, Flags rhs) 6242: { 6242: return (Flags)((UnderlyingType) lhs | (UnderlyingType) rhs); 6242: } 6242: 6242: template> 6242: Flags& operator|=(Flags& lhs, Flags rhs) 6242: { 6242: (UnderlyingType&) lhs |= (UnderlyingType) rhs; 6242: return lhs; 6242: } 6242: 6242: template 6242: struct TestableFlags 6242: { 6242: Flags value; 6242: constexpr operator bool() const { return (UnderlyingType)value; } 6242: constexpr operator Flags() const { return value; } 6242: constexpr operator UnderlyingType() const { return (UnderlyingType)value; } 6242: 6242: bool operator==(const TestableFlags& other) const { return value == other.value; } 6242: bool operator!=(const TestableFlags& other) const { return value != other.value; } 6242: }; 6242: 6242: template> 6242: constexpr TestableFlags operator&(Flags lhs, Flags rhs) 6242: { 6242: return { (Flags)((UnderlyingType) lhs & (UnderlyingType) rhs) }; 6242: } 6242: 6242: template> 6242: Flags& operator&=(Flags& lhs, Flags rhs) 6242: { 6242: (UnderlyingType&) lhs &= (UnderlyingType) rhs; 6242: return lhs; 6242: } 6242: 6242: template> 6242: constexpr Flags operator~(Flags lhs) 6242: { 6242: return (Flags)(~(UnderlyingType)lhs); 6242: } 6242: 6242: template> 6242: constexpr Flags operator^(Flags lhs, Flags rhs) 6242: { 6242: return (Flags)((UnderlyingType) lhs ^ (UnderlyingType) rhs); 6242: } 6242: 6242: template> 6242: Flags& operator^=(Flags& lhs, Flags rhs) 6242: { 6242: (UnderlyingType&) lhs ^= (UnderlyingType) rhs; 6242: return lhs; 6242: } 6242: 6242: } 6242: # 6 "keys.hh" 2 6242: 6242: # 1 "optional.hh" 1 6242: 6242: 6242: 6242: 6242: 6242: namespace Kakoune 6242: { 6242: 6242: template 6242: struct Optional 6242: { 6242: public: 6242: constexpr Optional() : m_valid(false) {} 6242: Optional(const T& other) : m_valid(true) { new (&m_value) T(other); } 6242: Optional(T&& other) : m_valid(true) { new (&m_value) T(std::move(other)); } 6242: 6242: Optional(const Optional& other) 6242: : m_valid(other.m_valid) 6242: { 6242: if (m_valid) 6242: new (&m_value) T(other.m_value); 6242: } 6242: 6242: Optional(Optional&& other) 6242: noexcept(noexcept(new (nullptr) T(std::move(other.m_value)))) 6242: : m_valid(other.m_valid) 6242: { 6242: if (m_valid) 6242: new (&m_value) T(std::move(other.m_value)); 6242: } 6242: 6242: Optional& operator=(const Optional& other) 6242: { 6242: destruct_ifn(); 6242: if ((m_valid = other.m_valid)) 6242: new (&m_value) T(other.m_value); 6242: return *this; 6242: } 6242: 6242: Optional& operator=(Optional&& other) 6242: { 6242: destruct_ifn(); 6242: if ((m_valid = other.m_valid)) 6242: new (&m_value) T(std::move(other.m_value)); 6242: return *this; 6242: } 6242: 6242: ~Optional() { destruct_ifn(); } 6242: 6242: constexpr explicit operator bool() const noexcept { return m_valid; } 6242: 6242: bool operator==(const Optional& other) const 6242: { 6242: return m_valid == other.m_valid and 6242: (not m_valid or m_value == other.m_value); 6242: } 6242: 6242: template 6242: void emplace(Args&&... args) 6242: { 6242: destruct_ifn(); 6242: new (&m_value) T{std::forward(args)...}; 6242: m_valid = true; 6242: } 6242: 6242: T& operator*() 6242: { 6242: if (not (m_valid)) on_assert_failed("assert failed \"" "m_valid" "\" at " "optional.hh" ":" "68"); 6242: return m_value; 6242: } 6242: const T& operator*() const { return *const_cast(*this); } 6242: 6242: T* operator->() 6242: { 6242: if (not (m_valid)) on_assert_failed("assert failed \"" "m_valid" "\" at " "optional.hh" ":" "75"); 6242: return &m_value; 6242: } 6242: const T* operator->() const { return const_cast(*this).operator->(); } 6242: 6242: template 6242: T value_or(U&& fallback) const { return m_valid ? m_value : T{fallback}; } 6242: 6242: void reset() { destruct_ifn(); m_valid = false; } 6242: 6242: private: 6242: void destruct_ifn() { if (m_valid) m_value.~T(); } 6242: 6242: struct Empty {}; 6242: union 6242: { 6242: Empty m_empty; 6242: T m_value; 6242: }; 6242: bool m_valid; 6242: }; 6242: 6242: } 6242: # 8 "keys.hh" 2 6242: # 1 "unicode.hh" 1 6242: 6242: 6242: 6242: 6242: 6242: # 1 "/usr/include/c++/8/locale" 1 3 6242: # 36 "/usr/include/c++/8/locale" 3 6242: 6242: # 37 "/usr/include/c++/8/locale" 3 6242: 6242: 6242: 6242: 6242: # 1 "/usr/include/c++/8/bits/locale_facets_nonio.h" 1 3 6242: # 37 "/usr/include/c++/8/bits/locale_facets_nonio.h" 3 6242: 6242: # 38 "/usr/include/c++/8/bits/locale_facets_nonio.h" 3 6242: 6242: # 1 "/usr/include/c++/8/ctime" 1 3 6242: # 39 "/usr/include/c++/8/ctime" 3 6242: 6242: # 40 "/usr/include/c++/8/ctime" 3 6242: # 58 "/usr/include/c++/8/ctime" 3 6242: 6242: # 58 "/usr/include/c++/8/ctime" 3 6242: namespace std 6242: { 6242: using ::clock_t; 6242: using ::time_t; 6242: using ::tm; 6242: 6242: using ::clock; 6242: using ::difftime; 6242: using ::mktime; 6242: using ::time; 6242: using ::asctime; 6242: using ::ctime; 6242: using ::gmtime; 6242: using ::localtime; 6242: using ::strftime; 6242: } 6242: # 40 "/usr/include/c++/8/bits/locale_facets_nonio.h" 2 3 6242: 6242: namespace std __attribute__ ((__visibility__ ("default"))) 6242: { 6242: 6242: # 52 "/usr/include/c++/8/bits/locale_facets_nonio.h" 3 6242: class time_base 6242: { 6242: public: 6242: enum dateorder { no_order, dmy, mdy, ymd, ydm }; 6242: }; 6242: 6242: template 6242: struct __timepunct_cache : public locale::facet 6242: { 6242: 6242: static const _CharT* _S_timezones[14]; 6242: 6242: const _CharT* _M_date_format; 6242: const _CharT* _M_date_era_format; 6242: const _CharT* _M_time_format; 6242: const _CharT* _M_time_era_format; 6242: const _CharT* _M_date_time_format; 6242: const _CharT* _M_date_time_era_format; 6242: const _CharT* _M_am; 6242: const _CharT* _M_pm; 6242: const _CharT* _M_am_pm_format; 6242: 6242: 6242: const _CharT* _M_day1; 6242: const _CharT* _M_day2; 6242: const _CharT* _M_day3; 6242: const _CharT* _M_day4; 6242: const _CharT* _M_day5; 6242: const _CharT* _M_day6; 6242: const _CharT* _M_day7; 6242: 6242: 6242: const _CharT* _M_aday1; 6242: const _CharT* _M_aday2; 6242: const _CharT* _M_aday3; 6242: const _CharT* _M_aday4; 6242: const _CharT* _M_aday5; 6242: const _CharT* _M_aday6; 6242: const _CharT* _M_aday7; 6242: 6242: 6242: const _CharT* _M_month01; 6242: const _CharT* _M_month02; 6242: const _CharT* _M_month03; 6242: const _CharT* _M_month04; 6242: const _CharT* _M_month05; 6242: const _CharT* _M_month06; 6242: const _CharT* _M_month07; 6242: const _CharT* _M_month08; 6242: const _CharT* _M_month09; 6242: const _CharT* _M_month10; 6242: const _CharT* _M_month11; 6242: const _CharT* _M_month12; 6242: 6242: 6242: const _CharT* _M_amonth01; 6242: const _CharT* _M_amonth02; 6242: const _CharT* _M_amonth03; 6242: const _CharT* _M_amonth04; 6242: const _CharT* _M_amonth05; 6242: const _CharT* _M_amonth06; 6242: const _CharT* _M_amonth07; 6242: const _CharT* _M_amonth08; 6242: const _CharT* _M_amonth09; 6242: const _CharT* _M_amonth10; 6242: const _CharT* _M_amonth11; 6242: const _CharT* _M_amonth12; 6242: 6242: bool _M_allocated; 6242: 6242: __timepunct_cache(size_t __refs = 0) : facet(__refs), 6242: _M_date_format(0), _M_date_era_format(0), _M_time_format(0), 6242: _M_time_era_format(0), _M_date_time_format(0), 6242: _M_date_time_era_format(0), _M_am(0), _M_pm(0), 6242: _M_am_pm_format(0), _M_day1(0), _M_day2(0), _M_day3(0), 6242: _M_day4(0), _M_day5(0), _M_day6(0), _M_day7(0), 6242: _M_aday1(0), _M_aday2(0), _M_aday3(0), _M_aday4(0), 6242: _M_aday5(0), _M_aday6(0), _M_aday7(0), _M_month01(0), 6242: _M_month02(0), _M_month03(0), _M_month04(0), _M_month05(0), 6242: _M_month06(0), _M_month07(0), _M_month08(0), _M_month09(0), 6242: _M_month10(0), _M_month11(0), _M_month12(0), _M_amonth01(0), 6242: _M_amonth02(0), _M_amonth03(0), _M_amonth04(0), 6242: _M_amonth05(0), _M_amonth06(0), _M_amonth07(0), 6242: _M_amonth08(0), _M_amonth09(0), _M_amonth10(0), 6242: _M_amonth11(0), _M_amonth12(0), _M_allocated(false) 6242: { } 6242: 6242: ~__timepunct_cache(); 6242: 6242: private: 6242: __timepunct_cache& 6242: operator=(const __timepunct_cache&); 6242: 6242: explicit 6242: __timepunct_cache(const __timepunct_cache&); 6242: }; 6242: 6242: template 6242: __timepunct_cache<_CharT>::~__timepunct_cache() 6242: { 6242: if (_M_allocated) 6242: { 6242: 6242: } 6242: } 6242: 6242: 6242: template<> 6242: const char* 6242: __timepunct_cache::_S_timezones[14]; 6242: 6242: 6242: template<> 6242: const wchar_t* 6242: __timepunct_cache::_S_timezones[14]; 6242: 6242: 6242: 6242: template 6242: const _CharT* __timepunct_cache<_CharT>::_S_timezones[14]; 6242: 6242: template 6242: class __timepunct : public locale::facet 6242: { 6242: public: 6242: 6242: typedef _CharT __char_type; 6242: typedef __timepunct_cache<_CharT> __cache_type; 6242: 6242: protected: 6242: __cache_type* _M_data; 6242: __c_locale _M_c_locale_timepunct; 6242: const char* _M_name_timepunct; 6242: 6242: public: 6242: 6242: static locale::id id; 6242: 6242: explicit 6242: __timepunct(size_t __refs = 0); 6242: 6242: explicit 6242: __timepunct(__cache_type* __cache, size_t __refs = 0); 6242: # 206 "/usr/include/c++/8/bits/locale_facets_nonio.h" 3 6242: explicit 6242: __timepunct(__c_locale __cloc, const char* __s, size_t __refs = 0); 6242: 6242: 6242: 6242: void 6242: _M_put(_CharT* __s, size_t __maxlen, const _CharT* __format, 6242: const tm* __tm) const throw (); 6242: 6242: void 6242: _M_date_formats(const _CharT** __date) const 6242: { 6242: 6242: __date[0] = _M_data->_M_date_format; 6242: __date[1] = _M_data->_M_date_era_format; 6242: } 6242: 6242: void 6242: _M_time_formats(const _CharT** __time) const 6242: { 6242: 6242: __time[0] = _M_data->_M_time_format; 6242: __time[1] = _M_data->_M_time_era_format; 6242: } 6242: 6242: void 6242: _M_date_time_formats(const _CharT** __dt) const 6242: { 6242: 6242: __dt[0] = _M_data->_M_date_time_format; 6242: __dt[1] = _M_data->_M_date_time_era_format; 6242: } 6242: 6242: 6242: void 6242: _M_am_pm_format(const _CharT*) const 6242: { } 6242: 6242: 6242: void 6242: _M_am_pm(const _CharT** __ampm) const 6242: { 6242: __ampm[0] = _M_data->_M_am; 6242: __ampm[1] = _M_data->_M_pm; 6242: } 6242: 6242: void 6242: _M_days(const _CharT** __days) const 6242: { 6242: __days[0] = _M_data->_M_day1; 6242: __days[1] = _M_data->_M_day2; 6242: __days[2] = _M_data->_M_day3; 6242: __days[3] = _M_data->_M_day4; 6242: __days[4] = _M_data->_M_day5; 6242: __days[5] = _M_data->_M_day6; 6242: __days[6] = _M_data->_M_day7; 6242: } 6242: 6242: void 6242: _M_days_abbreviated(const _CharT** __days) const 6242: { 6242: __days[0] = _M_data->_M_aday1; 6242: __days[1] = _M_data->_M_aday2; 6242: __days[2] = _M_data->_M_aday3; 6242: __days[3] = _M_data->_M_aday4; 6242: __days[4] = _M_data->_M_aday5; 6242: __days[5] = _M_data->_M_aday6; 6242: __days[6] = _M_data->_M_aday7; 6242: } 6242: 6242: void 6242: _M_months(const _CharT** __months) const 6242: { 6242: __months[0] = _M_data->_M_month01; 6242: __months[1] = _M_data->_M_month02; 6242: __months[2] = _M_data->_M_month03; 6242: __months[3] = _M_data->_M_month04; 6242: __months[4] = _M_data->_M_month05; 6242: __months[5] = _M_data->_M_month06; 6242: __months[6] = _M_data->_M_month07; 6242: __months[7] = _M_data->_M_month08; 6242: __months[8] = _M_data->_M_month09; 6242: __months[9] = _M_data->_M_month10; 6242: __months[10] = _M_data->_M_month11; 6242: __months[11] = _M_data->_M_month12; 6242: } 6242: 6242: void 6242: _M_months_abbreviated(const _CharT** __months) const 6242: { 6242: __months[0] = _M_data->_M_amonth01; 6242: __months[1] = _M_data->_M_amonth02; 6242: __months[2] = _M_data->_M_amonth03; 6242: __months[3] = _M_data->_M_amonth04; 6242: __months[4] = _M_data->_M_amonth05; 6242: __months[5] = _M_data->_M_amonth06; 6242: __months[6] = _M_data->_M_amonth07; 6242: __months[7] = _M_data->_M_amonth08; 6242: __months[8] = _M_data->_M_amonth09; 6242: __months[9] = _M_data->_M_amonth10; 6242: __months[10] = _M_data->_M_amonth11; 6242: __months[11] = _M_data->_M_amonth12; 6242: } 6242: 6242: protected: 6242: virtual 6242: ~__timepunct(); 6242: 6242: 6242: void 6242: _M_initialize_timepunct(__c_locale __cloc = 0); 6242: }; 6242: 6242: template 6242: locale::id __timepunct<_CharT>::id; 6242: 6242: 6242: template<> 6242: void 6242: __timepunct::_M_initialize_timepunct(__c_locale __cloc); 6242: 6242: template<> 6242: void 6242: __timepunct::_M_put(char*, size_t, const char*, const tm*) const throw (); 6242: 6242: 6242: template<> 6242: void 6242: __timepunct::_M_initialize_timepunct(__c_locale __cloc); 6242: 6242: template<> 6242: void 6242: __timepunct::_M_put(wchar_t*, size_t, const wchar_t*, 6242: const tm*) const throw (); 6242: 6242: 6242: 6242: } 6242: 6242: 6242: # 1 "/usr/include/s390x-linux-gnu/c++/8/bits/time_members.h" 1 3 6242: # 37 "/usr/include/s390x-linux-gnu/c++/8/bits/time_members.h" 3 6242: namespace std __attribute__ ((__visibility__ ("default"))) 6242: { 6242: 6242: 6242: template 6242: __timepunct<_CharT>::__timepunct(size_t __refs) 6242: : facet(__refs), _M_data(0), _M_c_locale_timepunct(0), 6242: _M_name_timepunct(_S_get_c_name()) 6242: { _M_initialize_timepunct(); } 6242: 6242: template 6242: __timepunct<_CharT>::__timepunct(__cache_type* __cache, size_t __refs) 6242: : facet(__refs), _M_data(__cache), _M_c_locale_timepunct(0), 6242: _M_name_timepunct(_S_get_c_name()) 6242: { _M_initialize_timepunct(); } 6242: 6242: template 6242: __timepunct<_CharT>::__timepunct(__c_locale __cloc, const char* __s, 6242: size_t __refs) 6242: : facet(__refs), _M_data(0), _M_c_locale_timepunct(0), 6242: _M_name_timepunct(0) 6242: { 6242: if (__builtin_strcmp(__s, _S_get_c_name()) != 0) 6242: { 6242: const size_t __len = __builtin_strlen(__s) + 1; 6242: char* __tmp = new char[__len]; 6242: __builtin_memcpy(__tmp, __s, __len); 6242: _M_name_timepunct = __tmp; 6242: } 6242: else 6242: _M_name_timepunct = _S_get_c_name(); 6242: 6242: try 6242: { _M_initialize_timepunct(__cloc); } 6242: catch(...) 6242: { 6242: if (_M_name_timepunct != _S_get_c_name()) 6242: delete [] _M_name_timepunct; 6242: throw; 6242: } 6242: } 6242: 6242: template 6242: __timepunct<_CharT>::~__timepunct() 6242: { 6242: if (_M_name_timepunct != _S_get_c_name()) 6242: delete [] _M_name_timepunct; 6242: delete _M_data; 6242: _S_destroy_c_locale(_M_c_locale_timepunct); 6242: } 6242: 6242: 6242: } 6242: # 347 "/usr/include/c++/8/bits/locale_facets_nonio.h" 2 3 6242: 6242: namespace std __attribute__ ((__visibility__ ("default"))) 6242: { 6242: 6242: 6242: namespace __cxx11 { 6242: # 367 "/usr/include/c++/8/bits/locale_facets_nonio.h" 3 6242: template 6242: class time_get : public locale::facet, public time_base 6242: { 6242: public: 6242: 6242: 6242: 6242: typedef _CharT char_type; 6242: typedef _InIter iter_type; 6242: 6242: 6242: 6242: static locale::id id; 6242: # 388 "/usr/include/c++/8/bits/locale_facets_nonio.h" 3 6242: explicit 6242: time_get(size_t __refs = 0) 6242: : facet (__refs) { } 6242: # 405 "/usr/include/c++/8/bits/locale_facets_nonio.h" 3 6242: dateorder 6242: date_order() const 6242: { return this->do_date_order(); } 6242: # 429 "/usr/include/c++/8/bits/locale_facets_nonio.h" 3 6242: iter_type 6242: get_time(iter_type __beg, iter_type __end, ios_base& __io, 6242: ios_base::iostate& __err, tm* __tm) const 6242: { return this->do_get_time(__beg, __end, __io, __err, __tm); } 6242: # 454 "/usr/include/c++/8/bits/locale_facets_nonio.h" 3 6242: iter_type 6242: get_date(iter_type __beg, iter_type __end, ios_base& __io, 6242: ios_base::iostate& __err, tm* __tm) const 6242: { return this->do_get_date(__beg, __end, __io, __err, __tm); } 6242: # 482 "/usr/include/c++/8/bits/locale_facets_nonio.h" 3 6242: iter_type 6242: get_weekday(iter_type __beg, iter_type __end, ios_base& __io, 6242: ios_base::iostate& __err, tm* __tm) const 6242: { return this->do_get_weekday(__beg, __end, __io, __err, __tm); } 6242: # 511 "/usr/include/c++/8/bits/locale_facets_nonio.h" 3 6242: iter_type 6242: get_monthname(iter_type __beg, iter_type __end, ios_base& __io, 6242: ios_base::iostate& __err, tm* __tm) const 6242: { return this->do_get_monthname(__beg, __end, __io, __err, __tm); } 6242: # 537 "/usr/include/c++/8/bits/locale_facets_nonio.h" 3 6242: iter_type 6242: get_year(iter_type __beg, iter_type __end, ios_base& __io, 6242: ios_base::iostate& __err, tm* __tm) const 6242: { return this->do_get_year(__beg, __end, __io, __err, __tm); } 6242: # 558 "/usr/include/c++/8/bits/locale_facets_nonio.h" 3 6242: inline 6242: iter_type get(iter_type __s, iter_type __end, ios_base& __io, 6242: ios_base::iostate& __err, tm* __tm, char __format, 6242: char __modifier = 0) const 6242: { 6242: return this->do_get(__s, __end, __io, __err, __tm, __format, 6242: __modifier); 6242: } 6242: # 585 "/usr/include/c++/8/bits/locale_facets_nonio.h" 3 6242: iter_type get(iter_type __s, iter_type __end, ios_base& __io, 6242: ios_base::iostate& __err, tm* __tm, const char_type* __fmt, 6242: const char_type* __fmtend) const; 6242: 6242: 6242: protected: 6242: 6242: virtual 6242: ~time_get() { } 6242: # 605 "/usr/include/c++/8/bits/locale_facets_nonio.h" 3 6242: virtual dateorder 6242: do_date_order() const; 6242: # 623 "/usr/include/c++/8/bits/locale_facets_nonio.h" 3 6242: virtual iter_type 6242: do_get_time(iter_type __beg, iter_type __end, ios_base& __io, 6242: ios_base::iostate& __err, tm* __tm) const; 6242: # 642 "/usr/include/c++/8/bits/locale_facets_nonio.h" 3 6242: virtual iter_type 6242: do_get_date(iter_type __beg, iter_type __end, ios_base& __io, 6242: ios_base::iostate& __err, tm* __tm) const; 6242: # 661 "/usr/include/c++/8/bits/locale_facets_nonio.h" 3 6242: virtual iter_type 6242: do_get_weekday(iter_type __beg, iter_type __end, ios_base&, 6242: ios_base::iostate& __err, tm* __tm) const; 6242: # 680 "/usr/include/c++/8/bits/locale_facets_nonio.h" 3 6242: virtual iter_type 6242: do_get_monthname(iter_type __beg, iter_type __end, ios_base&, 6242: ios_base::iostate& __err, tm* __tm) const; 6242: # 699 "/usr/include/c++/8/bits/locale_facets_nonio.h" 3 6242: virtual iter_type 6242: do_get_year(iter_type __beg, iter_type __end, ios_base& __io, 6242: ios_base::iostate& __err, tm* __tm) const; 6242: # 722 "/usr/include/c++/8/bits/locale_facets_nonio.h" 3 6242: virtual 6242: 6242: iter_type 6242: do_get(iter_type __s, iter_type __end, ios_base& __f, 6242: ios_base::iostate& __err, tm* __tm, 6242: char __format, char __modifier) const; 6242: 6242: 6242: 6242: iter_type 6242: _M_extract_num(iter_type __beg, iter_type __end, int& __member, 6242: int __min, int __max, size_t __len, 6242: ios_base& __io, ios_base::iostate& __err) const; 6242: 6242: 6242: iter_type 6242: _M_extract_name(iter_type __beg, iter_type __end, int& __member, 6242: const _CharT** __names, size_t __indexlen, 6242: ios_base& __io, ios_base::iostate& __err) const; 6242: 6242: 6242: iter_type 6242: _M_extract_wday_or_month(iter_type __beg, iter_type __end, int& __member, 6242: const _CharT** __names, size_t __indexlen, 6242: ios_base& __io, ios_base::iostate& __err) const; 6242: 6242: 6242: iter_type 6242: _M_extract_via_format(iter_type __beg, iter_type __end, ios_base& __io, 6242: ios_base::iostate& __err, tm* __tm, 6242: const _CharT* __format) const; 6242: }; 6242: 6242: template 6242: locale::id time_get<_CharT, _InIter>::id; 6242: 6242: 6242: template 6242: class time_get_byname : public time_get<_CharT, _InIter> 6242: { 6242: public: 6242: 6242: typedef _CharT char_type; 6242: typedef _InIter iter_type; 6242: 6242: explicit 6242: time_get_byname(const char*, size_t __refs = 0) 6242: : time_get<_CharT, _InIter>(__refs) { } 6242: 6242: 6242: explicit 6242: time_get_byname(const string& __s, size_t __refs = 0) 6242: : time_get_byname(__s.c_str(), __refs) { } 6242: 6242: 6242: protected: 6242: virtual 6242: ~time_get_byname() { } 6242: }; 6242: 6242: } 6242: # 796 "/usr/include/c++/8/bits/locale_facets_nonio.h" 3 6242: template 6242: class time_put : public locale::facet 6242: { 6242: public: 6242: 6242: 6242: 6242: typedef _CharT char_type; 6242: typedef _OutIter iter_type; 6242: 6242: 6242: 6242: static locale::id id; 6242: # 817 "/usr/include/c++/8/bits/locale_facets_nonio.h" 3 6242: explicit 6242: time_put(size_t __refs = 0) 6242: : facet(__refs) { } 6242: # 836 "/usr/include/c++/8/bits/locale_facets_nonio.h" 3 6242: iter_type 6242: put(iter_type __s, ios_base& __io, char_type __fill, const tm* __tm, 6242: const _CharT* __beg, const _CharT* __end) const; 6242: # 856 "/usr/include/c++/8/bits/locale_facets_nonio.h" 3 6242: iter_type 6242: put(iter_type __s, ios_base& __io, char_type __fill, 6242: const tm* __tm, char __format, char __mod = 0) const 6242: { return this->do_put(__s, __io, __fill, __tm, __format, __mod); } 6242: 6242: protected: 6242: 6242: virtual 6242: ~time_put() 6242: { } 6242: # 883 "/usr/include/c++/8/bits/locale_facets_nonio.h" 3 6242: virtual iter_type 6242: do_put(iter_type __s, ios_base& __io, char_type __fill, const tm* __tm, 6242: char __format, char __mod) const; 6242: }; 6242: 6242: template 6242: locale::id time_put<_CharT, _OutIter>::id; 6242: 6242: 6242: template 6242: class time_put_byname : public time_put<_CharT, _OutIter> 6242: { 6242: public: 6242: 6242: typedef _CharT char_type; 6242: typedef _OutIter iter_type; 6242: 6242: explicit 6242: time_put_byname(const char*, size_t __refs = 0) 6242: : time_put<_CharT, _OutIter>(__refs) 6242: { } 6242: 6242: 6242: explicit 6242: time_put_byname(const string& __s, size_t __refs = 0) 6242: : time_put_byname(__s.c_str(), __refs) { } 6242: 6242: 6242: protected: 6242: virtual 6242: ~time_put_byname() { } 6242: }; 6242: # 928 "/usr/include/c++/8/bits/locale_facets_nonio.h" 3 6242: class money_base 6242: { 6242: public: 6242: enum part { none, space, symbol, sign, value }; 6242: struct pattern { char field[4]; }; 6242: 6242: static const pattern _S_default_pattern; 6242: 6242: enum 6242: { 6242: _S_minus, 6242: _S_zero, 6242: _S_end = 11 6242: }; 6242: 6242: 6242: 6242: static const char* _S_atoms; 6242: 6242: 6242: 6242: __attribute__ ((__const__)) static pattern 6242: _S_construct_pattern(char __precedes, char __space, char __posn) throw (); 6242: }; 6242: 6242: template 6242: struct __moneypunct_cache : public locale::facet 6242: { 6242: const char* _M_grouping; 6242: size_t _M_grouping_size; 6242: bool _M_use_grouping; 6242: _CharT _M_decimal_point; 6242: _CharT _M_thousands_sep; 6242: const _CharT* _M_curr_symbol; 6242: size_t _M_curr_symbol_size; 6242: const _CharT* _M_positive_sign; 6242: size_t _M_positive_sign_size; 6242: const _CharT* _M_negative_sign; 6242: size_t _M_negative_sign_size; 6242: int _M_frac_digits; 6242: money_base::pattern _M_pos_format; 6242: money_base::pattern _M_neg_format; 6242: 6242: 6242: 6242: 6242: _CharT _M_atoms[money_base::_S_end]; 6242: 6242: bool _M_allocated; 6242: 6242: __moneypunct_cache(size_t __refs = 0) : facet(__refs), 6242: _M_grouping(0), _M_grouping_size(0), _M_use_grouping(false), 6242: _M_decimal_point(_CharT()), _M_thousands_sep(_CharT()), 6242: _M_curr_symbol(0), _M_curr_symbol_size(0), 6242: _M_positive_sign(0), _M_positive_sign_size(0), 6242: _M_negative_sign(0), _M_negative_sign_size(0), 6242: _M_frac_digits(0), 6242: _M_pos_format(money_base::pattern()), 6242: _M_neg_format(money_base::pattern()), _M_allocated(false) 6242: { } 6242: 6242: ~__moneypunct_cache(); 6242: 6242: void 6242: _M_cache(const locale& __loc); 6242: 6242: private: 6242: __moneypunct_cache& 6242: operator=(const __moneypunct_cache&); 6242: 6242: explicit 6242: __moneypunct_cache(const __moneypunct_cache&); 6242: }; 6242: 6242: template 6242: __moneypunct_cache<_CharT, _Intl>::~__moneypunct_cache() 6242: { 6242: if (_M_allocated) 6242: { 6242: delete [] _M_grouping; 6242: delete [] _M_curr_symbol; 6242: delete [] _M_positive_sign; 6242: delete [] _M_negative_sign; 6242: } 6242: } 6242: 6242: namespace __cxx11 { 6242: # 1023 "/usr/include/c++/8/bits/locale_facets_nonio.h" 3 6242: template 6242: class moneypunct : public locale::facet, public money_base 6242: { 6242: public: 6242: 6242: 6242: 6242: typedef _CharT char_type; 6242: typedef basic_string<_CharT> string_type; 6242: 6242: typedef __moneypunct_cache<_CharT, _Intl> __cache_type; 6242: 6242: private: 6242: __cache_type* _M_data; 6242: 6242: public: 6242: 6242: 6242: static const bool intl = _Intl; 6242: 6242: static locale::id id; 6242: # 1052 "/usr/include/c++/8/bits/locale_facets_nonio.h" 3 6242: explicit 6242: moneypunct(size_t __refs = 0) 6242: : facet(__refs), _M_data(0) 6242: { _M_initialize_moneypunct(); } 6242: # 1065 "/usr/include/c++/8/bits/locale_facets_nonio.h" 3 6242: explicit 6242: moneypunct(__cache_type* __cache, size_t __refs = 0) 6242: : facet(__refs), _M_data(__cache) 6242: { _M_initialize_moneypunct(); } 6242: # 1080 "/usr/include/c++/8/bits/locale_facets_nonio.h" 3 6242: explicit 6242: moneypunct(__c_locale __cloc, const char* __s, size_t __refs = 0) 6242: : facet(__refs), _M_data(0) 6242: { _M_initialize_moneypunct(__cloc, __s); } 6242: # 1094 "/usr/include/c++/8/bits/locale_facets_nonio.h" 3 6242: char_type 6242: decimal_point() const 6242: { return this->do_decimal_point(); } 6242: # 1107 "/usr/include/c++/8/bits/locale_facets_nonio.h" 3 6242: char_type 6242: thousands_sep() const 6242: { return this->do_thousands_sep(); } 6242: # 1137 "/usr/include/c++/8/bits/locale_facets_nonio.h" 3 6242: string 6242: grouping() const 6242: { return this->do_grouping(); } 6242: # 1150 "/usr/include/c++/8/bits/locale_facets_nonio.h" 3 6242: string_type 6242: curr_symbol() const 6242: { return this->do_curr_symbol(); } 6242: # 1167 "/usr/include/c++/8/bits/locale_facets_nonio.h" 3 6242: string_type 6242: positive_sign() const 6242: { return this->do_positive_sign(); } 6242: # 1184 "/usr/include/c++/8/bits/locale_facets_nonio.h" 3 6242: string_type 6242: negative_sign() const 6242: { return this->do_negative_sign(); } 6242: # 1200 "/usr/include/c++/8/bits/locale_facets_nonio.h" 3 6242: int 6242: frac_digits() const 6242: { return this->do_frac_digits(); } 6242: # 1236 "/usr/include/c++/8/bits/locale_facets_nonio.h" 3 6242: pattern 6242: pos_format() const 6242: { return this->do_pos_format(); } 6242: 6242: pattern 6242: neg_format() const 6242: { return this->do_neg_format(); } 6242: 6242: 6242: protected: 6242: 6242: virtual 6242: ~moneypunct(); 6242: # 1258 "/usr/include/c++/8/bits/locale_facets_nonio.h" 3 6242: virtual char_type 6242: do_decimal_point() const 6242: { return _M_data->_M_decimal_point; } 6242: # 1270 "/usr/include/c++/8/bits/locale_facets_nonio.h" 3 6242: virtual char_type 6242: do_thousands_sep() const 6242: { return _M_data->_M_thousands_sep; } 6242: # 1283 "/usr/include/c++/8/bits/locale_facets_nonio.h" 3 6242: virtual string 6242: do_grouping() const 6242: { return _M_data->_M_grouping; } 6242: # 1296 "/usr/include/c++/8/bits/locale_facets_nonio.h" 3 6242: virtual string_type 6242: do_curr_symbol() const 6242: { return _M_data->_M_curr_symbol; } 6242: # 1309 "/usr/include/c++/8/bits/locale_facets_nonio.h" 3 6242: virtual string_type 6242: do_positive_sign() const 6242: { return _M_data->_M_positive_sign; } 6242: # 1322 "/usr/include/c++/8/bits/locale_facets_nonio.h" 3 6242: virtual string_type 6242: do_negative_sign() const 6242: { return _M_data->_M_negative_sign; } 6242: # 1336 "/usr/include/c++/8/bits/locale_facets_nonio.h" 3 6242: virtual int 6242: do_frac_digits() const 6242: { return _M_data->_M_frac_digits; } 6242: # 1350 "/usr/include/c++/8/bits/locale_facets_nonio.h" 3 6242: virtual pattern 6242: do_pos_format() const 6242: { return _M_data->_M_pos_format; } 6242: # 1364 "/usr/include/c++/8/bits/locale_facets_nonio.h" 3 6242: virtual pattern 6242: do_neg_format() const 6242: { return _M_data->_M_neg_format; } 6242: 6242: 6242: void 6242: _M_initialize_moneypunct(__c_locale __cloc = 0, 6242: const char* __name = 0); 6242: }; 6242: 6242: template 6242: locale::id moneypunct<_CharT, _Intl>::id; 6242: 6242: template 6242: const bool moneypunct<_CharT, _Intl>::intl; 6242: 6242: template<> 6242: moneypunct::~moneypunct(); 6242: 6242: template<> 6242: moneypunct::~moneypunct(); 6242: 6242: template<> 6242: void 6242: moneypunct::_M_initialize_moneypunct(__c_locale, const char*); 6242: 6242: template<> 6242: void 6242: moneypunct::_M_initialize_moneypunct(__c_locale, const char*); 6242: 6242: 6242: template<> 6242: moneypunct::~moneypunct(); 6242: 6242: template<> 6242: moneypunct::~moneypunct(); 6242: 6242: template<> 6242: void 6242: moneypunct::_M_initialize_moneypunct(__c_locale, 6242: const char*); 6242: 6242: template<> 6242: void 6242: moneypunct::_M_initialize_moneypunct(__c_locale, 6242: const char*); 6242: 6242: 6242: 6242: template 6242: class moneypunct_byname : public moneypunct<_CharT, _Intl> 6242: { 6242: public: 6242: typedef _CharT char_type; 6242: typedef basic_string<_CharT> string_type; 6242: 6242: static const bool intl = _Intl; 6242: 6242: explicit 6242: moneypunct_byname(const char* __s, size_t __refs = 0) 6242: : moneypunct<_CharT, _Intl>(__refs) 6242: { 6242: if (__builtin_strcmp(__s, "C") != 0 6242: && __builtin_strcmp(__s, "POSIX") != 0) 6242: { 6242: __c_locale __tmp; 6242: this->_S_create_c_locale(__tmp, __s); 6242: this->_M_initialize_moneypunct(__tmp); 6242: this->_S_destroy_c_locale(__tmp); 6242: } 6242: } 6242: 6242: 6242: explicit 6242: moneypunct_byname(const string& __s, size_t __refs = 0) 6242: : moneypunct_byname(__s.c_str(), __refs) { } 6242: 6242: 6242: protected: 6242: virtual 6242: ~moneypunct_byname() { } 6242: }; 6242: 6242: template 6242: const bool moneypunct_byname<_CharT, _Intl>::intl; 6242: 6242: } 6242: 6242: namespace __cxx11 { 6242: # 1467 "/usr/include/c++/8/bits/locale_facets_nonio.h" 3 6242: template 6242: class money_get : public locale::facet 6242: { 6242: public: 6242: 6242: 6242: 6242: typedef _CharT char_type; 6242: typedef _InIter iter_type; 6242: typedef basic_string<_CharT> string_type; 6242: 6242: 6242: 6242: static locale::id id; 6242: # 1489 "/usr/include/c++/8/bits/locale_facets_nonio.h" 3 6242: explicit 6242: money_get(size_t __refs = 0) : facet(__refs) { } 6242: # 1519 "/usr/include/c++/8/bits/locale_facets_nonio.h" 3 6242: iter_type 6242: get(iter_type __s, iter_type __end, bool __intl, ios_base& __io, 6242: ios_base::iostate& __err, long double& __units) const 6242: { return this->do_get(__s, __end, __intl, __io, __err, __units); } 6242: # 1550 "/usr/include/c++/8/bits/locale_facets_nonio.h" 3 6242: iter_type 6242: get(iter_type __s, iter_type __end, bool __intl, ios_base& __io, 6242: ios_base::iostate& __err, string_type& __digits) const 6242: { return this->do_get(__s, __end, __intl, __io, __err, __digits); } 6242: 6242: protected: 6242: 6242: virtual 6242: ~money_get() { } 6242: # 1574 "/usr/include/c++/8/bits/locale_facets_nonio.h" 3 6242: virtual iter_type 6242: do_get(iter_type __s, iter_type __end, bool __intl, ios_base& __io, 6242: ios_base::iostate& __err, long double& __units) const; 6242: # 1586 "/usr/include/c++/8/bits/locale_facets_nonio.h" 3 6242: virtual iter_type 6242: do_get(iter_type __s, iter_type __end, bool __intl, ios_base& __io, 6242: ios_base::iostate& __err, string_type& __digits) const; 6242: # 1598 "/usr/include/c++/8/bits/locale_facets_nonio.h" 3 6242: template 6242: iter_type 6242: _M_extract(iter_type __s, iter_type __end, ios_base& __io, 6242: ios_base::iostate& __err, string& __digits) const; 6242: }; 6242: 6242: template 6242: locale::id money_get<_CharT, _InIter>::id; 6242: # 1620 "/usr/include/c++/8/bits/locale_facets_nonio.h" 3 6242: template 6242: class money_put : public locale::facet 6242: { 6242: public: 6242: 6242: 6242: typedef _CharT char_type; 6242: typedef _OutIter iter_type; 6242: typedef basic_string<_CharT> string_type; 6242: 6242: 6242: 6242: static locale::id id; 6242: # 1641 "/usr/include/c++/8/bits/locale_facets_nonio.h" 3 6242: explicit 6242: money_put(size_t __refs = 0) : facet(__refs) { } 6242: # 1661 "/usr/include/c++/8/bits/locale_facets_nonio.h" 3 6242: iter_type 6242: put(iter_type __s, bool __intl, ios_base& __io, 6242: char_type __fill, long double __units) const 6242: { return this->do_put(__s, __intl, __io, __fill, __units); } 6242: # 1684 "/usr/include/c++/8/bits/locale_facets_nonio.h" 3 6242: iter_type 6242: put(iter_type __s, bool __intl, ios_base& __io, 6242: char_type __fill, const string_type& __digits) const 6242: { return this->do_put(__s, __intl, __io, __fill, __digits); } 6242: 6242: protected: 6242: 6242: virtual 6242: ~money_put() { } 6242: # 1719 "/usr/include/c++/8/bits/locale_facets_nonio.h" 3 6242: virtual iter_type 6242: do_put(iter_type __s, bool __intl, ios_base& __io, char_type __fill, 6242: long double __units) const; 6242: # 1743 "/usr/include/c++/8/bits/locale_facets_nonio.h" 3 6242: virtual iter_type 6242: do_put(iter_type __s, bool __intl, ios_base& __io, char_type __fill, 6242: const string_type& __digits) const; 6242: # 1755 "/usr/include/c++/8/bits/locale_facets_nonio.h" 3 6242: template 6242: iter_type 6242: _M_insert(iter_type __s, ios_base& __io, char_type __fill, 6242: const string_type& __digits) const; 6242: }; 6242: 6242: template 6242: locale::id money_put<_CharT, _OutIter>::id; 6242: 6242: } 6242: 6242: 6242: 6242: 6242: 6242: struct messages_base 6242: { 6242: typedef int catalog; 6242: }; 6242: 6242: namespace __cxx11 { 6242: # 1798 "/usr/include/c++/8/bits/locale_facets_nonio.h" 3 6242: template 6242: class messages : public locale::facet, public messages_base 6242: { 6242: public: 6242: 6242: 6242: 6242: typedef _CharT char_type; 6242: typedef basic_string<_CharT> string_type; 6242: 6242: 6242: protected: 6242: 6242: 6242: __c_locale _M_c_locale_messages; 6242: const char* _M_name_messages; 6242: 6242: public: 6242: 6242: static locale::id id; 6242: # 1826 "/usr/include/c++/8/bits/locale_facets_nonio.h" 3 6242: explicit 6242: messages(size_t __refs = 0); 6242: # 1840 "/usr/include/c++/8/bits/locale_facets_nonio.h" 3 6242: explicit 6242: messages(__c_locale __cloc, const char* __s, size_t __refs = 0); 6242: # 1853 "/usr/include/c++/8/bits/locale_facets_nonio.h" 3 6242: catalog 6242: open(const basic_string& __s, const locale& __loc) const 6242: { return this->do_open(__s, __loc); } 6242: # 1871 "/usr/include/c++/8/bits/locale_facets_nonio.h" 3 6242: catalog 6242: open(const basic_string&, const locale&, const char*) const; 6242: # 1889 "/usr/include/c++/8/bits/locale_facets_nonio.h" 3 6242: string_type 6242: get(catalog __c, int __set, int __msgid, const string_type& __s) const 6242: { return this->do_get(__c, __set, __msgid, __s); } 6242: # 1900 "/usr/include/c++/8/bits/locale_facets_nonio.h" 3 6242: void 6242: close(catalog __c) const 6242: { return this->do_close(__c); } 6242: 6242: protected: 6242: 6242: virtual 6242: ~messages(); 6242: # 1920 "/usr/include/c++/8/bits/locale_facets_nonio.h" 3 6242: virtual catalog 6242: do_open(const basic_string&, const locale&) const; 6242: # 1939 "/usr/include/c++/8/bits/locale_facets_nonio.h" 3 6242: virtual string_type 6242: do_get(catalog, int, int, const string_type& __dfault) const; 6242: 6242: 6242: 6242: 6242: 6242: 6242: virtual void 6242: do_close(catalog) const; 6242: 6242: 6242: char* 6242: _M_convert_to_char(const string_type& __msg) const 6242: { 6242: 6242: return reinterpret_cast(const_cast<_CharT*>(__msg.c_str())); 6242: } 6242: 6242: 6242: string_type 6242: _M_convert_from_char(char*) const 6242: { 6242: 6242: return string_type(); 6242: } 6242: }; 6242: 6242: template 6242: locale::id messages<_CharT>::id; 6242: 6242: 6242: template<> 6242: string 6242: messages::do_get(catalog, int, int, const string&) const; 6242: 6242: 6242: template<> 6242: wstring 6242: messages::do_get(catalog, int, int, const wstring&) const; 6242: 6242: 6242: 6242: template 6242: class messages_byname : public messages<_CharT> 6242: { 6242: public: 6242: typedef _CharT char_type; 6242: typedef basic_string<_CharT> string_type; 6242: 6242: explicit 6242: messages_byname(const char* __s, size_t __refs = 0); 6242: 6242: 6242: explicit 6242: messages_byname(const string& __s, size_t __refs = 0) 6242: : messages_byname(__s.c_str(), __refs) { } 6242: 6242: 6242: protected: 6242: virtual 6242: ~messages_byname() 6242: { } 6242: }; 6242: 6242: } 6242: 6242: 6242: } 6242: 6242: 6242: # 1 "/usr/include/s390x-linux-gnu/c++/8/bits/messages_members.h" 1 3 6242: # 36 "/usr/include/s390x-linux-gnu/c++/8/bits/messages_members.h" 3 6242: # 1 "/usr/include/libintl.h" 1 3 4 6242: # 34 "/usr/include/libintl.h" 3 4 6242: extern "C" { 6242: 6242: 6242: 6242: 6242: extern char *gettext (const char *__msgid) 6242: throw () __attribute__ ((__format_arg__ (1))); 6242: 6242: 6242: 6242: extern char *dgettext (const char *__domainname, const char *__msgid) 6242: throw () __attribute__ ((__format_arg__ (2))); 6242: extern char *__dgettext (const char *__domainname, const char *__msgid) 6242: throw () __attribute__ ((__format_arg__ (2))); 6242: 6242: 6242: 6242: extern char *dcgettext (const char *__domainname, 6242: const char *__msgid, int __category) 6242: throw () __attribute__ ((__format_arg__ (2))); 6242: extern char *__dcgettext (const char *__domainname, 6242: const char *__msgid, int __category) 6242: throw () __attribute__ ((__format_arg__ (2))); 6242: 6242: 6242: 6242: 6242: extern char *ngettext (const char *__msgid1, const char *__msgid2, 6242: unsigned long int __n) 6242: throw () __attribute__ ((__format_arg__ (1))) __attribute__ ((__format_arg__ (2))); 6242: 6242: 6242: 6242: extern char *dngettext (const char *__domainname, const char *__msgid1, 6242: const char *__msgid2, unsigned long int __n) 6242: throw () __attribute__ ((__format_arg__ (2))) __attribute__ ((__format_arg__ (3))); 6242: 6242: 6242: 6242: extern char *dcngettext (const char *__domainname, const char *__msgid1, 6242: const char *__msgid2, unsigned long int __n, 6242: int __category) 6242: throw () __attribute__ ((__format_arg__ (2))) __attribute__ ((__format_arg__ (3))); 6242: 6242: 6242: 6242: 6242: 6242: extern char *textdomain (const char *__domainname) throw (); 6242: 6242: 6242: 6242: extern char *bindtextdomain (const char *__domainname, 6242: const char *__dirname) throw (); 6242: 6242: 6242: 6242: extern char *bind_textdomain_codeset (const char *__domainname, 6242: const char *__codeset) throw (); 6242: # 121 "/usr/include/libintl.h" 3 4 6242: } 6242: # 37 "/usr/include/s390x-linux-gnu/c++/8/bits/messages_members.h" 2 3 6242: 6242: namespace std __attribute__ ((__visibility__ ("default"))) 6242: { 6242: 6242: 6242: 6242: template 6242: messages<_CharT>::messages(size_t __refs) 6242: : facet(__refs), _M_c_locale_messages(_S_get_c_locale()), 6242: _M_name_messages(_S_get_c_name()) 6242: { } 6242: 6242: template 6242: messages<_CharT>::messages(__c_locale __cloc, const char* __s, 6242: size_t __refs) 6242: : facet(__refs), _M_c_locale_messages(0), _M_name_messages(0) 6242: { 6242: if (__builtin_strcmp(__s, _S_get_c_name()) != 0) 6242: { 6242: const size_t __len = __builtin_strlen(__s) + 1; 6242: char* __tmp = new char[__len]; 6242: __builtin_memcpy(__tmp, __s, __len); 6242: _M_name_messages = __tmp; 6242: } 6242: else 6242: _M_name_messages = _S_get_c_name(); 6242: 6242: 6242: _M_c_locale_messages = _S_clone_c_locale(__cloc); 6242: } 6242: 6242: template 6242: typename messages<_CharT>::catalog 6242: messages<_CharT>::open(const basic_string& __s, const locale& __loc, 6242: const char* __dir) const 6242: { 6242: bindtextdomain(__s.c_str(), __dir); 6242: return this->do_open(__s, __loc); 6242: } 6242: 6242: 6242: template 6242: messages<_CharT>::~messages() 6242: { 6242: if (_M_name_messages != _S_get_c_name()) 6242: delete [] _M_name_messages; 6242: _S_destroy_c_locale(_M_c_locale_messages); 6242: } 6242: 6242: template 6242: typename messages<_CharT>::catalog 6242: messages<_CharT>::do_open(const basic_string& __s, 6242: const locale&) const 6242: { 6242: 6242: 6242: textdomain(__s.c_str()); 6242: return 0; 6242: } 6242: 6242: template 6242: void 6242: messages<_CharT>::do_close(catalog) const 6242: { } 6242: 6242: 6242: template 6242: messages_byname<_CharT>::messages_byname(const char* __s, size_t __refs) 6242: : messages<_CharT>(__refs) 6242: { 6242: if (this->_M_name_messages != locale::facet::_S_get_c_name()) 6242: { 6242: delete [] this->_M_name_messages; 6242: if (__builtin_strcmp(__s, locale::facet::_S_get_c_name()) != 0) 6242: { 6242: const size_t __len = __builtin_strlen(__s) + 1; 6242: char* __tmp = new char[__len]; 6242: __builtin_memcpy(__tmp, __s, __len); 6242: this->_M_name_messages = __tmp; 6242: } 6242: else 6242: this->_M_name_messages = locale::facet::_S_get_c_name(); 6242: } 6242: 6242: if (__builtin_strcmp(__s, "C") != 0 6242: && __builtin_strcmp(__s, "POSIX") != 0) 6242: { 6242: this->_S_destroy_c_locale(this->_M_c_locale_messages); 6242: this->_S_create_c_locale(this->_M_c_locale_messages, __s); 6242: } 6242: } 6242: 6242: 6242: template<> 6242: typename messages::catalog 6242: messages::do_open(const basic_string&, 6242: const locale&) const; 6242: 6242: template<> 6242: void 6242: messages::do_close(catalog) const; 6242: 6242: 6242: template<> 6242: typename messages::catalog 6242: messages::do_open(const basic_string&, 6242: const locale&) const; 6242: 6242: template<> 6242: void 6242: messages::do_close(catalog) const; 6242: 6242: 6242: 6242: } 6242: # 2011 "/usr/include/c++/8/bits/locale_facets_nonio.h" 2 3 6242: 6242: 6242: # 1 "/usr/include/c++/8/bits/codecvt.h" 1 3 6242: # 39 "/usr/include/c++/8/bits/codecvt.h" 3 6242: 6242: # 40 "/usr/include/c++/8/bits/codecvt.h" 3 6242: 6242: namespace std __attribute__ ((__visibility__ ("default"))) 6242: { 6242: 6242: 6242: 6242: class codecvt_base 6242: { 6242: public: 6242: enum result 6242: { 6242: ok, 6242: partial, 6242: error, 6242: noconv 6242: }; 6242: }; 6242: # 67 "/usr/include/c++/8/bits/codecvt.h" 3 6242: template 6242: class __codecvt_abstract_base 6242: : public locale::facet, public codecvt_base 6242: { 6242: public: 6242: 6242: typedef codecvt_base::result result; 6242: typedef _InternT intern_type; 6242: typedef _ExternT extern_type; 6242: typedef _StateT state_type; 6242: # 115 "/usr/include/c++/8/bits/codecvt.h" 3 6242: result 6242: out(state_type& __state, const intern_type* __from, 6242: const intern_type* __from_end, const intern_type*& __from_next, 6242: extern_type* __to, extern_type* __to_end, 6242: extern_type*& __to_next) const 6242: { 6242: return this->do_out(__state, __from, __from_end, __from_next, 6242: __to, __to_end, __to_next); 6242: } 6242: # 154 "/usr/include/c++/8/bits/codecvt.h" 3 6242: result 6242: unshift(state_type& __state, extern_type* __to, extern_type* __to_end, 6242: extern_type*& __to_next) const 6242: { return this->do_unshift(__state, __to,__to_end,__to_next); } 6242: # 195 "/usr/include/c++/8/bits/codecvt.h" 3 6242: result 6242: in(state_type& __state, const extern_type* __from, 6242: const extern_type* __from_end, const extern_type*& __from_next, 6242: intern_type* __to, intern_type* __to_end, 6242: intern_type*& __to_next) const 6242: { 6242: return this->do_in(__state, __from, __from_end, __from_next, 6242: __to, __to_end, __to_next); 6242: } 6242: 6242: int 6242: encoding() const throw() 6242: { return this->do_encoding(); } 6242: 6242: bool 6242: always_noconv() const throw() 6242: { return this->do_always_noconv(); } 6242: 6242: int 6242: length(state_type& __state, const extern_type* __from, 6242: const extern_type* __end, size_t __max) const 6242: { return this->do_length(__state, __from, __end, __max); } 6242: 6242: int 6242: max_length() const throw() 6242: { return this->do_max_length(); } 6242: 6242: protected: 6242: explicit 6242: __codecvt_abstract_base(size_t __refs = 0) : locale::facet(__refs) { } 6242: 6242: virtual 6242: ~__codecvt_abstract_base() { } 6242: # 236 "/usr/include/c++/8/bits/codecvt.h" 3 6242: virtual result 6242: do_out(state_type& __state, const intern_type* __from, 6242: const intern_type* __from_end, const intern_type*& __from_next, 6242: extern_type* __to, extern_type* __to_end, 6242: extern_type*& __to_next) const = 0; 6242: 6242: virtual result 6242: do_unshift(state_type& __state, extern_type* __to, 6242: extern_type* __to_end, extern_type*& __to_next) const = 0; 6242: 6242: virtual result 6242: do_in(state_type& __state, const extern_type* __from, 6242: const extern_type* __from_end, const extern_type*& __from_next, 6242: intern_type* __to, intern_type* __to_end, 6242: intern_type*& __to_next) const = 0; 6242: 6242: virtual int 6242: do_encoding() const throw() = 0; 6242: 6242: virtual bool 6242: do_always_noconv() const throw() = 0; 6242: 6242: virtual int 6242: do_length(state_type&, const extern_type* __from, 6242: const extern_type* __end, size_t __max) const = 0; 6242: 6242: virtual int 6242: do_max_length() const throw() = 0; 6242: }; 6242: # 273 "/usr/include/c++/8/bits/codecvt.h" 3 6242: template 6242: class codecvt 6242: : public __codecvt_abstract_base<_InternT, _ExternT, _StateT> 6242: { 6242: public: 6242: 6242: typedef codecvt_base::result result; 6242: typedef _InternT intern_type; 6242: typedef _ExternT extern_type; 6242: typedef _StateT state_type; 6242: 6242: protected: 6242: __c_locale _M_c_locale_codecvt; 6242: 6242: public: 6242: static locale::id id; 6242: 6242: explicit 6242: codecvt(size_t __refs = 0) 6242: : __codecvt_abstract_base<_InternT, _ExternT, _StateT> (__refs), 6242: _M_c_locale_codecvt(0) 6242: { } 6242: 6242: explicit 6242: codecvt(__c_locale __cloc, size_t __refs = 0); 6242: 6242: protected: 6242: virtual 6242: ~codecvt() { } 6242: 6242: virtual result 6242: do_out(state_type& __state, const intern_type* __from, 6242: const intern_type* __from_end, const intern_type*& __from_next, 6242: extern_type* __to, extern_type* __to_end, 6242: extern_type*& __to_next) const; 6242: 6242: virtual result 6242: do_unshift(state_type& __state, extern_type* __to, 6242: extern_type* __to_end, extern_type*& __to_next) const; 6242: 6242: virtual result 6242: do_in(state_type& __state, const extern_type* __from, 6242: const extern_type* __from_end, const extern_type*& __from_next, 6242: intern_type* __to, intern_type* __to_end, 6242: intern_type*& __to_next) const; 6242: 6242: virtual int 6242: do_encoding() const throw(); 6242: 6242: virtual bool 6242: do_always_noconv() const throw(); 6242: 6242: virtual int 6242: do_length(state_type&, const extern_type* __from, 6242: const extern_type* __end, size_t __max) const; 6242: 6242: virtual int 6242: do_max_length() const throw(); 6242: }; 6242: 6242: template 6242: locale::id codecvt<_InternT, _ExternT, _StateT>::id; 6242: 6242: 6242: template<> 6242: class codecvt 6242: : public __codecvt_abstract_base 6242: { 6242: friend class messages; 6242: 6242: public: 6242: 6242: typedef char intern_type; 6242: typedef char extern_type; 6242: typedef mbstate_t state_type; 6242: 6242: protected: 6242: __c_locale _M_c_locale_codecvt; 6242: 6242: public: 6242: static locale::id id; 6242: 6242: explicit 6242: codecvt(size_t __refs = 0); 6242: 6242: explicit 6242: codecvt(__c_locale __cloc, size_t __refs = 0); 6242: 6242: protected: 6242: virtual 6242: ~codecvt(); 6242: 6242: virtual result 6242: do_out(state_type& __state, const intern_type* __from, 6242: const intern_type* __from_end, const intern_type*& __from_next, 6242: extern_type* __to, extern_type* __to_end, 6242: extern_type*& __to_next) const; 6242: 6242: virtual result 6242: do_unshift(state_type& __state, extern_type* __to, 6242: extern_type* __to_end, extern_type*& __to_next) const; 6242: 6242: virtual result 6242: do_in(state_type& __state, const extern_type* __from, 6242: const extern_type* __from_end, const extern_type*& __from_next, 6242: intern_type* __to, intern_type* __to_end, 6242: intern_type*& __to_next) const; 6242: 6242: virtual int 6242: do_encoding() const throw(); 6242: 6242: virtual bool 6242: do_always_noconv() const throw(); 6242: 6242: virtual int 6242: do_length(state_type&, const extern_type* __from, 6242: const extern_type* __end, size_t __max) const; 6242: 6242: virtual int 6242: do_max_length() const throw(); 6242: }; 6242: 6242: 6242: 6242: 6242: 6242: 6242: template<> 6242: class codecvt 6242: : public __codecvt_abstract_base 6242: { 6242: friend class messages; 6242: 6242: public: 6242: 6242: typedef wchar_t intern_type; 6242: typedef char extern_type; 6242: typedef mbstate_t state_type; 6242: 6242: protected: 6242: __c_locale _M_c_locale_codecvt; 6242: 6242: public: 6242: static locale::id id; 6242: 6242: explicit 6242: codecvt(size_t __refs = 0); 6242: 6242: explicit 6242: codecvt(__c_locale __cloc, size_t __refs = 0); 6242: 6242: protected: 6242: virtual 6242: ~codecvt(); 6242: 6242: virtual result 6242: do_out(state_type& __state, const intern_type* __from, 6242: const intern_type* __from_end, const intern_type*& __from_next, 6242: extern_type* __to, extern_type* __to_end, 6242: extern_type*& __to_next) const; 6242: 6242: virtual result 6242: do_unshift(state_type& __state, 6242: extern_type* __to, extern_type* __to_end, 6242: extern_type*& __to_next) const; 6242: 6242: virtual result 6242: do_in(state_type& __state, 6242: const extern_type* __from, const extern_type* __from_end, 6242: const extern_type*& __from_next, 6242: intern_type* __to, intern_type* __to_end, 6242: intern_type*& __to_next) const; 6242: 6242: virtual 6242: int do_encoding() const throw(); 6242: 6242: virtual 6242: bool do_always_noconv() const throw(); 6242: 6242: virtual 6242: int do_length(state_type&, const extern_type* __from, 6242: const extern_type* __end, size_t __max) const; 6242: 6242: virtual int 6242: do_max_length() const throw(); 6242: }; 6242: # 467 "/usr/include/c++/8/bits/codecvt.h" 3 6242: template<> 6242: class codecvt 6242: : public __codecvt_abstract_base 6242: { 6242: public: 6242: 6242: typedef char16_t intern_type; 6242: typedef char extern_type; 6242: typedef mbstate_t state_type; 6242: 6242: public: 6242: static locale::id id; 6242: 6242: explicit 6242: codecvt(size_t __refs = 0) 6242: : __codecvt_abstract_base(__refs) { } 6242: 6242: protected: 6242: virtual 6242: ~codecvt(); 6242: 6242: virtual result 6242: do_out(state_type& __state, const intern_type* __from, 6242: const intern_type* __from_end, const intern_type*& __from_next, 6242: extern_type* __to, extern_type* __to_end, 6242: extern_type*& __to_next) const; 6242: 6242: virtual result 6242: do_unshift(state_type& __state, 6242: extern_type* __to, extern_type* __to_end, 6242: extern_type*& __to_next) const; 6242: 6242: virtual result 6242: do_in(state_type& __state, 6242: const extern_type* __from, const extern_type* __from_end, 6242: const extern_type*& __from_next, 6242: intern_type* __to, intern_type* __to_end, 6242: intern_type*& __to_next) const; 6242: 6242: virtual 6242: int do_encoding() const throw(); 6242: 6242: virtual 6242: bool do_always_noconv() const throw(); 6242: 6242: virtual 6242: int do_length(state_type&, const extern_type* __from, 6242: const extern_type* __end, size_t __max) const; 6242: 6242: virtual int 6242: do_max_length() const throw(); 6242: }; 6242: 6242: 6242: 6242: 6242: 6242: template<> 6242: class codecvt 6242: : public __codecvt_abstract_base 6242: { 6242: public: 6242: 6242: typedef char32_t intern_type; 6242: typedef char extern_type; 6242: typedef mbstate_t state_type; 6242: 6242: public: 6242: static locale::id id; 6242: 6242: explicit 6242: codecvt(size_t __refs = 0) 6242: : __codecvt_abstract_base(__refs) { } 6242: 6242: protected: 6242: virtual 6242: ~codecvt(); 6242: 6242: virtual result 6242: do_out(state_type& __state, const intern_type* __from, 6242: const intern_type* __from_end, const intern_type*& __from_next, 6242: extern_type* __to, extern_type* __to_end, 6242: extern_type*& __to_next) const; 6242: 6242: virtual result 6242: do_unshift(state_type& __state, 6242: extern_type* __to, extern_type* __to_end, 6242: extern_type*& __to_next) const; 6242: 6242: virtual result 6242: do_in(state_type& __state, 6242: const extern_type* __from, const extern_type* __from_end, 6242: const extern_type*& __from_next, 6242: intern_type* __to, intern_type* __to_end, 6242: intern_type*& __to_next) const; 6242: 6242: virtual 6242: int do_encoding() const throw(); 6242: 6242: virtual 6242: bool do_always_noconv() const throw(); 6242: 6242: virtual 6242: int do_length(state_type&, const extern_type* __from, 6242: const extern_type* __end, size_t __max) const; 6242: 6242: virtual int 6242: do_max_length() const throw(); 6242: }; 6242: 6242: 6242: 6242: 6242: 6242: template 6242: class codecvt_byname : public codecvt<_InternT, _ExternT, _StateT> 6242: { 6242: public: 6242: explicit 6242: codecvt_byname(const char* __s, size_t __refs = 0) 6242: : codecvt<_InternT, _ExternT, _StateT>(__refs) 6242: { 6242: if (__builtin_strcmp(__s, "C") != 0 6242: && __builtin_strcmp(__s, "POSIX") != 0) 6242: { 6242: this->_S_destroy_c_locale(this->_M_c_locale_codecvt); 6242: this->_S_create_c_locale(this->_M_c_locale_codecvt, __s); 6242: } 6242: } 6242: 6242: 6242: explicit 6242: codecvt_byname(const string& __s, size_t __refs = 0) 6242: : codecvt_byname(__s.c_str(), __refs) { } 6242: 6242: 6242: protected: 6242: virtual 6242: ~codecvt_byname() { } 6242: }; 6242: 6242: 6242: template<> 6242: class codecvt_byname 6242: : public codecvt 6242: { 6242: public: 6242: explicit 6242: codecvt_byname(const char*, size_t __refs = 0) 6242: : codecvt(__refs) { } 6242: 6242: explicit 6242: codecvt_byname(const string& __s, size_t __refs = 0) 6242: : codecvt_byname(__s.c_str(), __refs) { } 6242: 6242: protected: 6242: virtual 6242: ~codecvt_byname() { } 6242: }; 6242: 6242: template<> 6242: class codecvt_byname 6242: : public codecvt 6242: { 6242: public: 6242: explicit 6242: codecvt_byname(const char*, size_t __refs = 0) 6242: : codecvt(__refs) { } 6242: 6242: explicit 6242: codecvt_byname(const string& __s, size_t __refs = 0) 6242: : codecvt_byname(__s.c_str(), __refs) { } 6242: 6242: protected: 6242: virtual 6242: ~codecvt_byname() { } 6242: }; 6242: 6242: 6242: 6242: 6242: 6242: extern template class codecvt_byname; 6242: 6242: extern template 6242: const codecvt& 6242: use_facet >(const locale&); 6242: 6242: extern template 6242: bool 6242: has_facet >(const locale&); 6242: 6242: 6242: extern template class codecvt_byname; 6242: 6242: extern template 6242: const codecvt& 6242: use_facet >(const locale&); 6242: 6242: extern template 6242: bool 6242: has_facet >(const locale&); 6242: 6242: 6242: 6242: extern template class codecvt_byname; 6242: extern template class codecvt_byname; 6242: 6242: 6242: 6242: 6242: 6242: } 6242: # 2014 "/usr/include/c++/8/bits/locale_facets_nonio.h" 2 3 6242: 6242: # 1 "/usr/include/c++/8/bits/locale_facets_nonio.tcc" 1 3 6242: # 33 "/usr/include/c++/8/bits/locale_facets_nonio.tcc" 3 6242: 6242: # 34 "/usr/include/c++/8/bits/locale_facets_nonio.tcc" 3 6242: 6242: namespace std __attribute__ ((__visibility__ ("default"))) 6242: { 6242: 6242: 6242: template 6242: struct __use_cache<__moneypunct_cache<_CharT, _Intl> > 6242: { 6242: const __moneypunct_cache<_CharT, _Intl>* 6242: operator() (const locale& __loc) const 6242: { 6242: const size_t __i = moneypunct<_CharT, _Intl>::id._M_id(); 6242: const locale::facet** __caches = __loc._M_impl->_M_caches; 6242: if (!__caches[__i]) 6242: { 6242: __moneypunct_cache<_CharT, _Intl>* __tmp = 0; 6242: try 6242: { 6242: __tmp = new __moneypunct_cache<_CharT, _Intl>; 6242: __tmp->_M_cache(__loc); 6242: } 6242: catch(...) 6242: { 6242: delete __tmp; 6242: throw; 6242: } 6242: __loc._M_impl->_M_install_cache(__tmp, __i); 6242: } 6242: return static_cast< 6242: const __moneypunct_cache<_CharT, _Intl>*>(__caches[__i]); 6242: } 6242: }; 6242: 6242: template 6242: void 6242: __moneypunct_cache<_CharT, _Intl>::_M_cache(const locale& __loc) 6242: { 6242: const moneypunct<_CharT, _Intl>& __mp = 6242: use_facet >(__loc); 6242: 6242: _M_decimal_point = __mp.decimal_point(); 6242: _M_thousands_sep = __mp.thousands_sep(); 6242: _M_frac_digits = __mp.frac_digits(); 6242: 6242: char* __grouping = 0; 6242: _CharT* __curr_symbol = 0; 6242: _CharT* __positive_sign = 0; 6242: _CharT* __negative_sign = 0; 6242: try 6242: { 6242: const string& __g = __mp.grouping(); 6242: _M_grouping_size = __g.size(); 6242: __grouping = new char[_M_grouping_size]; 6242: __g.copy(__grouping, _M_grouping_size); 6242: _M_use_grouping = (_M_grouping_size 6242: && static_cast(__grouping[0]) > 0 6242: && (__grouping[0] 6242: != __gnu_cxx::__numeric_traits::__max)); 6242: 6242: const basic_string<_CharT>& __cs = __mp.curr_symbol(); 6242: _M_curr_symbol_size = __cs.size(); 6242: __curr_symbol = new _CharT[_M_curr_symbol_size]; 6242: __cs.copy(__curr_symbol, _M_curr_symbol_size); 6242: 6242: const basic_string<_CharT>& __ps = __mp.positive_sign(); 6242: _M_positive_sign_size = __ps.size(); 6242: __positive_sign = new _CharT[_M_positive_sign_size]; 6242: __ps.copy(__positive_sign, _M_positive_sign_size); 6242: 6242: const basic_string<_CharT>& __ns = __mp.negative_sign(); 6242: _M_negative_sign_size = __ns.size(); 6242: __negative_sign = new _CharT[_M_negative_sign_size]; 6242: __ns.copy(__negative_sign, _M_negative_sign_size); 6242: 6242: _M_pos_format = __mp.pos_format(); 6242: _M_neg_format = __mp.neg_format(); 6242: 6242: const ctype<_CharT>& __ct = use_facet >(__loc); 6242: __ct.widen(money_base::_S_atoms, 6242: money_base::_S_atoms + money_base::_S_end, _M_atoms); 6242: 6242: _M_grouping = __grouping; 6242: _M_curr_symbol = __curr_symbol; 6242: _M_positive_sign = __positive_sign; 6242: _M_negative_sign = __negative_sign; 6242: _M_allocated = true; 6242: } 6242: catch(...) 6242: { 6242: delete [] __grouping; 6242: delete [] __curr_symbol; 6242: delete [] __positive_sign; 6242: delete [] __negative_sign; 6242: throw; 6242: } 6242: } 6242: 6242: namespace __cxx11 { 6242: 6242: template 6242: template 6242: _InIter 6242: money_get<_CharT, _InIter>:: 6242: _M_extract(iter_type __beg, iter_type __end, ios_base& __io, 6242: ios_base::iostate& __err, string& __units) const 6242: { 6242: typedef char_traits<_CharT> __traits_type; 6242: typedef typename string_type::size_type size_type; 6242: typedef money_base::part part; 6242: typedef __moneypunct_cache<_CharT, _Intl> __cache_type; 6242: 6242: const locale& __loc = __io._M_getloc(); 6242: const ctype<_CharT>& __ctype = use_facet >(__loc); 6242: 6242: __use_cache<__cache_type> __uc; 6242: const __cache_type* __lc = __uc(__loc); 6242: const char_type* __lit = __lc->_M_atoms; 6242: 6242: 6242: bool __negative = false; 6242: 6242: size_type __sign_size = 0; 6242: 6242: const bool __mandatory_sign = (__lc->_M_positive_sign_size 6242: && __lc->_M_negative_sign_size); 6242: 6242: string __grouping_tmp; 6242: if (__lc->_M_use_grouping) 6242: __grouping_tmp.reserve(32); 6242: 6242: int __last_pos = 0; 6242: 6242: int __n = 0; 6242: 6242: bool __testvalid = true; 6242: 6242: bool __testdecfound = false; 6242: 6242: 6242: string __res; 6242: __res.reserve(32); 6242: 6242: const char_type* __lit_zero = __lit + money_base::_S_zero; 6242: const money_base::pattern __p = __lc->_M_neg_format; 6242: for (int __i = 0; __i < 4 && __testvalid; ++__i) 6242: { 6242: const part __which = static_cast(__p.field[__i]); 6242: switch (__which) 6242: { 6242: case money_base::symbol: 6242: 6242: 6242: 6242: 6242: if (__io.flags() & ios_base::showbase || __sign_size > 1 6242: || __i == 0 6242: || (__i == 1 && (__mandatory_sign 6242: || (static_cast(__p.field[0]) 6242: == money_base::sign) 6242: || (static_cast(__p.field[2]) 6242: == money_base::space))) 6242: || (__i == 2 && ((static_cast(__p.field[3]) 6242: == money_base::value) 6242: || (__mandatory_sign 6242: && (static_cast(__p.field[3]) 6242: == money_base::sign))))) 6242: { 6242: const size_type __len = __lc->_M_curr_symbol_size; 6242: size_type __j = 0; 6242: for (; __beg != __end && __j < __len 6242: && *__beg == __lc->_M_curr_symbol[__j]; 6242: ++__beg, (void)++__j); 6242: if (__j != __len 6242: && (__j || __io.flags() & ios_base::showbase)) 6242: __testvalid = false; 6242: } 6242: break; 6242: case money_base::sign: 6242: 6242: if (__lc->_M_positive_sign_size && __beg != __end 6242: && *__beg == __lc->_M_positive_sign[0]) 6242: { 6242: __sign_size = __lc->_M_positive_sign_size; 6242: ++__beg; 6242: } 6242: else if (__lc->_M_negative_sign_size && __beg != __end 6242: && *__beg == __lc->_M_negative_sign[0]) 6242: { 6242: __negative = true; 6242: __sign_size = __lc->_M_negative_sign_size; 6242: ++__beg; 6242: } 6242: else if (__lc->_M_positive_sign_size 6242: && !__lc->_M_negative_sign_size) 6242: 6242: 6242: __negative = true; 6242: else if (__mandatory_sign) 6242: __testvalid = false; 6242: break; 6242: case money_base::value: 6242: 6242: 6242: for (; __beg != __end; ++__beg) 6242: { 6242: const char_type __c = *__beg; 6242: const char_type* __q = __traits_type::find(__lit_zero, 6242: 10, __c); 6242: if (__q != 0) 6242: { 6242: __res += money_base::_S_atoms[__q - __lit]; 6242: ++__n; 6242: } 6242: else if (__c == __lc->_M_decimal_point 6242: && !__testdecfound) 6242: { 6242: if (__lc->_M_frac_digits <= 0) 6242: break; 6242: 6242: __last_pos = __n; 6242: __n = 0; 6242: __testdecfound = true; 6242: } 6242: else if (__lc->_M_use_grouping 6242: && __c == __lc->_M_thousands_sep 6242: && !__testdecfound) 6242: { 6242: if (__n) 6242: { 6242: 6242: __grouping_tmp += static_cast(__n); 6242: __n = 0; 6242: } 6242: else 6242: { 6242: __testvalid = false; 6242: break; 6242: } 6242: } 6242: else 6242: break; 6242: } 6242: if (__res.empty()) 6242: __testvalid = false; 6242: break; 6242: case money_base::space: 6242: 6242: if (__beg != __end && __ctype.is(ctype_base::space, *__beg)) 6242: ++__beg; 6242: else 6242: __testvalid = false; 6242: 6242: case money_base::none: 6242: 6242: if (__i != 3) 6242: for (; __beg != __end 6242: && __ctype.is(ctype_base::space, *__beg); ++__beg); 6242: break; 6242: } 6242: } 6242: 6242: 6242: if (__sign_size > 1 && __testvalid) 6242: { 6242: const char_type* __sign = __negative ? __lc->_M_negative_sign 6242: : __lc->_M_positive_sign; 6242: size_type __i = 1; 6242: for (; __beg != __end && __i < __sign_size 6242: && *__beg == __sign[__i]; ++__beg, (void)++__i); 6242: 6242: if (__i != __sign_size) 6242: __testvalid = false; 6242: } 6242: 6242: if (__testvalid) 6242: { 6242: 6242: if (__res.size() > 1) 6242: { 6242: const size_type __first = __res.find_first_not_of('0'); 6242: const bool __only_zeros = __first == string::npos; 6242: if (__first) 6242: __res.erase(0, __only_zeros ? __res.size() - 1 : __first); 6242: } 6242: 6242: 6242: if (__negative && __res[0] != '0') 6242: __res.insert(__res.begin(), '-'); 6242: 6242: 6242: if (__grouping_tmp.size()) 6242: { 6242: 6242: __grouping_tmp += static_cast(__testdecfound ? __last_pos 6242: : __n); 6242: if (!std::__verify_grouping(__lc->_M_grouping, 6242: __lc->_M_grouping_size, 6242: __grouping_tmp)) 6242: __err |= ios_base::failbit; 6242: } 6242: 6242: 6242: if (__testdecfound && __n != __lc->_M_frac_digits) 6242: __testvalid = false; 6242: } 6242: 6242: 6242: if (!__testvalid) 6242: __err |= ios_base::failbit; 6242: else 6242: __units.swap(__res); 6242: 6242: 6242: if (__beg == __end) 6242: __err |= ios_base::eofbit; 6242: return __beg; 6242: } 6242: # 368 "/usr/include/c++/8/bits/locale_facets_nonio.tcc" 3 6242: template 6242: _InIter 6242: money_get<_CharT, _InIter>:: 6242: do_get(iter_type __beg, iter_type __end, bool __intl, ios_base& __io, 6242: ios_base::iostate& __err, long double& __units) const 6242: { 6242: string __str; 6242: __beg = __intl ? _M_extract(__beg, __end, __io, __err, __str) 6242: : _M_extract(__beg, __end, __io, __err, __str); 6242: std::__convert_to_v(__str.c_str(), __units, __err, _S_get_c_locale()); 6242: return __beg; 6242: } 6242: 6242: template 6242: _InIter 6242: money_get<_CharT, _InIter>:: 6242: do_get(iter_type __beg, iter_type __end, bool __intl, ios_base& __io, 6242: ios_base::iostate& __err, string_type& __digits) const 6242: { 6242: typedef typename string::size_type size_type; 6242: 6242: const locale& __loc = __io._M_getloc(); 6242: const ctype<_CharT>& __ctype = use_facet >(__loc); 6242: 6242: string __str; 6242: __beg = __intl ? _M_extract(__beg, __end, __io, __err, __str) 6242: : _M_extract(__beg, __end, __io, __err, __str); 6242: const size_type __len = __str.size(); 6242: if (__len) 6242: { 6242: __digits.resize(__len); 6242: __ctype.widen(__str.data(), __str.data() + __len, &__digits[0]); 6242: } 6242: return __beg; 6242: } 6242: 6242: template 6242: template 6242: _OutIter 6242: money_put<_CharT, _OutIter>:: 6242: _M_insert(iter_type __s, ios_base& __io, char_type __fill, 6242: const string_type& __digits) const 6242: { 6242: typedef typename string_type::size_type size_type; 6242: typedef money_base::part part; 6242: typedef __moneypunct_cache<_CharT, _Intl> __cache_type; 6242: 6242: const locale& __loc = __io._M_getloc(); 6242: const ctype<_CharT>& __ctype = use_facet >(__loc); 6242: 6242: __use_cache<__cache_type> __uc; 6242: const __cache_type* __lc = __uc(__loc); 6242: const char_type* __lit = __lc->_M_atoms; 6242: 6242: 6242: 6242: const char_type* __beg = __digits.data(); 6242: 6242: money_base::pattern __p; 6242: const char_type* __sign; 6242: size_type __sign_size; 6242: if (!(*__beg == __lit[money_base::_S_minus])) 6242: { 6242: __p = __lc->_M_pos_format; 6242: __sign = __lc->_M_positive_sign; 6242: __sign_size = __lc->_M_positive_sign_size; 6242: } 6242: else 6242: { 6242: __p = __lc->_M_neg_format; 6242: __sign = __lc->_M_negative_sign; 6242: __sign_size = __lc->_M_negative_sign_size; 6242: if (__digits.size()) 6242: ++__beg; 6242: } 6242: 6242: 6242: size_type __len = __ctype.scan_not(ctype_base::digit, __beg, 6242: __beg + __digits.size()) - __beg; 6242: if (__len) 6242: { 6242: 6242: 6242: 6242: string_type __value; 6242: __value.reserve(2 * __len); 6242: 6242: 6242: 6242: long __paddec = __len - __lc->_M_frac_digits; 6242: if (__paddec > 0) 6242: { 6242: if (__lc->_M_frac_digits < 0) 6242: __paddec = __len; 6242: if (__lc->_M_grouping_size) 6242: { 6242: __value.assign(2 * __paddec, char_type()); 6242: _CharT* __vend = 6242: std::__add_grouping(&__value[0], __lc->_M_thousands_sep, 6242: __lc->_M_grouping, 6242: __lc->_M_grouping_size, 6242: __beg, __beg + __paddec); 6242: __value.erase(__vend - &__value[0]); 6242: } 6242: else 6242: __value.assign(__beg, __paddec); 6242: } 6242: 6242: 6242: if (__lc->_M_frac_digits > 0) 6242: { 6242: __value += __lc->_M_decimal_point; 6242: if (__paddec >= 0) 6242: __value.append(__beg + __paddec, __lc->_M_frac_digits); 6242: else 6242: { 6242: 6242: __value.append(-__paddec, __lit[money_base::_S_zero]); 6242: __value.append(__beg, __len); 6242: } 6242: } 6242: 6242: 6242: const ios_base::fmtflags __f = __io.flags() 6242: & ios_base::adjustfield; 6242: __len = __value.size() + __sign_size; 6242: __len += ((__io.flags() & ios_base::showbase) 6242: ? __lc->_M_curr_symbol_size : 0); 6242: 6242: string_type __res; 6242: __res.reserve(2 * __len); 6242: 6242: const size_type __width = static_cast(__io.width()); 6242: const bool __testipad = (__f == ios_base::internal 6242: && __len < __width); 6242: 6242: for (int __i = 0; __i < 4; ++__i) 6242: { 6242: const part __which = static_cast(__p.field[__i]); 6242: switch (__which) 6242: { 6242: case money_base::symbol: 6242: if (__io.flags() & ios_base::showbase) 6242: __res.append(__lc->_M_curr_symbol, 6242: __lc->_M_curr_symbol_size); 6242: break; 6242: case money_base::sign: 6242: 6242: 6242: 6242: if (__sign_size) 6242: __res += __sign[0]; 6242: break; 6242: case money_base::value: 6242: __res += __value; 6242: break; 6242: case money_base::space: 6242: 6242: 6242: 6242: if (__testipad) 6242: __res.append(__width - __len, __fill); 6242: else 6242: __res += __fill; 6242: break; 6242: case money_base::none: 6242: if (__testipad) 6242: __res.append(__width - __len, __fill); 6242: break; 6242: } 6242: } 6242: 6242: 6242: if (__sign_size > 1) 6242: __res.append(__sign + 1, __sign_size - 1); 6242: 6242: 6242: __len = __res.size(); 6242: if (__width > __len) 6242: { 6242: if (__f == ios_base::left) 6242: 6242: __res.append(__width - __len, __fill); 6242: else 6242: 6242: __res.insert(0, __width - __len, __fill); 6242: __len = __width; 6242: } 6242: 6242: 6242: __s = std::__write(__s, __res.data(), __len); 6242: } 6242: __io.width(0); 6242: return __s; 6242: } 6242: # 574 "/usr/include/c++/8/bits/locale_facets_nonio.tcc" 3 6242: template 6242: _OutIter 6242: money_put<_CharT, _OutIter>:: 6242: do_put(iter_type __s, bool __intl, ios_base& __io, char_type __fill, 6242: long double __units) const 6242: { 6242: const locale __loc = __io.getloc(); 6242: const ctype<_CharT>& __ctype = use_facet >(__loc); 6242: 6242: 6242: int __cs_size = 64; 6242: char* __cs = static_cast(__builtin_alloca(__cs_size)); 6242: 6242: 6242: int __len = std::__convert_from_v(_S_get_c_locale(), __cs, __cs_size, 6242: "%.*Lf", 0, __units); 6242: 6242: if (__len >= __cs_size) 6242: { 6242: __cs_size = __len + 1; 6242: __cs = static_cast(__builtin_alloca(__cs_size)); 6242: __len = std::__convert_from_v(_S_get_c_locale(), __cs, __cs_size, 6242: "%.*Lf", 0, __units); 6242: } 6242: # 606 "/usr/include/c++/8/bits/locale_facets_nonio.tcc" 3 6242: string_type __digits(__len, char_type()); 6242: __ctype.widen(__cs, __cs + __len, &__digits[0]); 6242: return __intl ? _M_insert(__s, __io, __fill, __digits) 6242: : _M_insert(__s, __io, __fill, __digits); 6242: } 6242: 6242: template 6242: _OutIter 6242: money_put<_CharT, _OutIter>:: 6242: do_put(iter_type __s, bool __intl, ios_base& __io, char_type __fill, 6242: const string_type& __digits) const 6242: { return __intl ? _M_insert(__s, __io, __fill, __digits) 6242: : _M_insert(__s, __io, __fill, __digits); } 6242: 6242: } 6242: 6242: 6242: 6242: 6242: template 6242: time_base::dateorder 6242: time_get<_CharT, _InIter>::do_date_order() const 6242: { return time_base::no_order; } 6242: 6242: 6242: 6242: template 6242: _InIter 6242: time_get<_CharT, _InIter>:: 6242: _M_extract_via_format(iter_type __beg, iter_type __end, ios_base& __io, 6242: ios_base::iostate& __err, tm* __tm, 6242: const _CharT* __format) const 6242: { 6242: const locale& __loc = __io._M_getloc(); 6242: const __timepunct<_CharT>& __tp = use_facet<__timepunct<_CharT> >(__loc); 6242: const ctype<_CharT>& __ctype = use_facet >(__loc); 6242: const size_t __len = char_traits<_CharT>::length(__format); 6242: 6242: ios_base::iostate __tmperr = ios_base::goodbit; 6242: size_t __i = 0; 6242: for (; __beg != __end && __i < __len && !__tmperr; ++__i) 6242: { 6242: if (__ctype.narrow(__format[__i], 0) == '%') 6242: { 6242: 6242: char __c = __ctype.narrow(__format[++__i], 0); 6242: int __mem = 0; 6242: if (__c == 'E' || __c == 'O') 6242: __c = __ctype.narrow(__format[++__i], 0); 6242: switch (__c) 6242: { 6242: const char* __cs; 6242: _CharT __wcs[10]; 6242: case 'a': 6242: 6242: const char_type* __days1[7]; 6242: __tp._M_days_abbreviated(__days1); 6242: __beg = _M_extract_name(__beg, __end, __mem, __days1, 6242: 7, __io, __tmperr); 6242: if (!__tmperr) 6242: __tm->tm_wday = __mem; 6242: break; 6242: case 'A': 6242: 6242: const char_type* __days2[7]; 6242: __tp._M_days(__days2); 6242: __beg = _M_extract_name(__beg, __end, __mem, __days2, 6242: 7, __io, __tmperr); 6242: if (!__tmperr) 6242: __tm->tm_wday = __mem; 6242: break; 6242: case 'h': 6242: case 'b': 6242: 6242: const char_type* __months1[12]; 6242: __tp._M_months_abbreviated(__months1); 6242: __beg = _M_extract_name(__beg, __end, __mem, 6242: __months1, 12, __io, __tmperr); 6242: if (!__tmperr) 6242: __tm->tm_mon = __mem; 6242: break; 6242: case 'B': 6242: 6242: const char_type* __months2[12]; 6242: __tp._M_months(__months2); 6242: __beg = _M_extract_name(__beg, __end, __mem, 6242: __months2, 12, __io, __tmperr); 6242: if (!__tmperr) 6242: __tm->tm_mon = __mem; 6242: break; 6242: case 'c': 6242: 6242: const char_type* __dt[2]; 6242: __tp._M_date_time_formats(__dt); 6242: __beg = _M_extract_via_format(__beg, __end, __io, __tmperr, 6242: __tm, __dt[0]); 6242: break; 6242: case 'd': 6242: 6242: __beg = _M_extract_num(__beg, __end, __mem, 1, 31, 2, 6242: __io, __tmperr); 6242: if (!__tmperr) 6242: __tm->tm_mday = __mem; 6242: break; 6242: case 'e': 6242: 6242: 6242: if (__ctype.is(ctype_base::space, *__beg)) 6242: __beg = _M_extract_num(++__beg, __end, __mem, 1, 9, 6242: 1, __io, __tmperr); 6242: else 6242: __beg = _M_extract_num(__beg, __end, __mem, 10, 31, 6242: 2, __io, __tmperr); 6242: if (!__tmperr) 6242: __tm->tm_mday = __mem; 6242: break; 6242: case 'D': 6242: 6242: __cs = "%m/%d/%y"; 6242: __ctype.widen(__cs, __cs + 9, __wcs); 6242: __beg = _M_extract_via_format(__beg, __end, __io, __tmperr, 6242: __tm, __wcs); 6242: break; 6242: case 'H': 6242: 6242: __beg = _M_extract_num(__beg, __end, __mem, 0, 23, 2, 6242: __io, __tmperr); 6242: if (!__tmperr) 6242: __tm->tm_hour = __mem; 6242: break; 6242: case 'I': 6242: 6242: __beg = _M_extract_num(__beg, __end, __mem, 1, 12, 2, 6242: __io, __tmperr); 6242: if (!__tmperr) 6242: __tm->tm_hour = __mem; 6242: break; 6242: case 'm': 6242: 6242: __beg = _M_extract_num(__beg, __end, __mem, 1, 12, 2, 6242: __io, __tmperr); 6242: if (!__tmperr) 6242: __tm->tm_mon = __mem - 1; 6242: break; 6242: case 'M': 6242: 6242: __beg = _M_extract_num(__beg, __end, __mem, 0, 59, 2, 6242: __io, __tmperr); 6242: if (!__tmperr) 6242: __tm->tm_min = __mem; 6242: break; 6242: case 'n': 6242: if (__ctype.narrow(*__beg, 0) == '\n') 6242: ++__beg; 6242: else 6242: __tmperr |= ios_base::failbit; 6242: break; 6242: case 'R': 6242: 6242: __cs = "%H:%M"; 6242: __ctype.widen(__cs, __cs + 6, __wcs); 6242: __beg = _M_extract_via_format(__beg, __end, __io, __tmperr, 6242: __tm, __wcs); 6242: break; 6242: case 'S': 6242: 6242: 6242: 6242: __beg = _M_extract_num(__beg, __end, __mem, 0, 60, 2, 6242: 6242: 6242: 6242: __io, __tmperr); 6242: if (!__tmperr) 6242: __tm->tm_sec = __mem; 6242: break; 6242: case 't': 6242: if (__ctype.narrow(*__beg, 0) == '\t') 6242: ++__beg; 6242: else 6242: __tmperr |= ios_base::failbit; 6242: break; 6242: case 'T': 6242: 6242: __cs = "%H:%M:%S"; 6242: __ctype.widen(__cs, __cs + 9, __wcs); 6242: __beg = _M_extract_via_format(__beg, __end, __io, __tmperr, 6242: __tm, __wcs); 6242: break; 6242: case 'x': 6242: 6242: const char_type* __dates[2]; 6242: __tp._M_date_formats(__dates); 6242: __beg = _M_extract_via_format(__beg, __end, __io, __tmperr, 6242: __tm, __dates[0]); 6242: break; 6242: case 'X': 6242: 6242: const char_type* __times[2]; 6242: __tp._M_time_formats(__times); 6242: __beg = _M_extract_via_format(__beg, __end, __io, __tmperr, 6242: __tm, __times[0]); 6242: break; 6242: case 'y': 6242: case 'C': 6242: 6242: case 'Y': 6242: 6242: 6242: 6242: 6242: __beg = _M_extract_num(__beg, __end, __mem, 0, 9999, 4, 6242: __io, __tmperr); 6242: if (!__tmperr) 6242: __tm->tm_year = __mem < 0 ? __mem + 100 : __mem - 1900; 6242: break; 6242: case 'Z': 6242: 6242: if (__ctype.is(ctype_base::upper, *__beg)) 6242: { 6242: int __tmp; 6242: __beg = _M_extract_name(__beg, __end, __tmp, 6242: __timepunct_cache<_CharT>::_S_timezones, 6242: 14, __io, __tmperr); 6242: 6242: 6242: if (__beg != __end && !__tmperr && __tmp == 0 6242: && (*__beg == __ctype.widen('-') 6242: || *__beg == __ctype.widen('+'))) 6242: { 6242: __beg = _M_extract_num(__beg, __end, __tmp, 0, 23, 2, 6242: __io, __tmperr); 6242: __beg = _M_extract_num(__beg, __end, __tmp, 0, 59, 2, 6242: __io, __tmperr); 6242: } 6242: } 6242: else 6242: __tmperr |= ios_base::failbit; 6242: break; 6242: default: 6242: 6242: __tmperr |= ios_base::failbit; 6242: } 6242: } 6242: else 6242: { 6242: 6242: if (__format[__i] == *__beg) 6242: ++__beg; 6242: else 6242: __tmperr |= ios_base::failbit; 6242: } 6242: } 6242: 6242: if (__tmperr || __i != __len) 6242: __err |= ios_base::failbit; 6242: 6242: return __beg; 6242: } 6242: 6242: template 6242: _InIter 6242: time_get<_CharT, _InIter>:: 6242: _M_extract_num(iter_type __beg, iter_type __end, int& __member, 6242: int __min, int __max, size_t __len, 6242: ios_base& __io, ios_base::iostate& __err) const 6242: { 6242: const locale& __loc = __io._M_getloc(); 6242: const ctype<_CharT>& __ctype = use_facet >(__loc); 6242: 6242: 6242: int __mult = __len == 2 ? 10 : (__len == 4 ? 1000 : 1); 6242: 6242: ++__min; 6242: size_t __i = 0; 6242: int __value = 0; 6242: for (; __beg != __end && __i < __len; ++__beg, (void)++__i) 6242: { 6242: const char __c = __ctype.narrow(*__beg, '*'); 6242: if (__c >= '0' && __c <= '9') 6242: { 6242: __value = __value * 10 + (__c - '0'); 6242: const int __valuec = __value * __mult; 6242: if (__valuec > __max || __valuec + __mult < __min) 6242: break; 6242: __mult /= 10; 6242: } 6242: else 6242: break; 6242: } 6242: if (__i == __len) 6242: __member = __value; 6242: 6242: else if (__len == 4 && __i == 2) 6242: __member = __value - 100; 6242: else 6242: __err |= ios_base::failbit; 6242: 6242: return __beg; 6242: } 6242: 6242: 6242: 6242: template 6242: _InIter 6242: time_get<_CharT, _InIter>:: 6242: _M_extract_name(iter_type __beg, iter_type __end, int& __member, 6242: const _CharT** __names, size_t __indexlen, 6242: ios_base& __io, ios_base::iostate& __err) const 6242: { 6242: typedef char_traits<_CharT> __traits_type; 6242: const locale& __loc = __io._M_getloc(); 6242: const ctype<_CharT>& __ctype = use_facet >(__loc); 6242: 6242: int* __matches = static_cast(__builtin_alloca(sizeof(int) 6242: * __indexlen)); 6242: size_t __nmatches = 0; 6242: size_t __pos = 0; 6242: bool __testvalid = true; 6242: const char_type* __name; 6242: 6242: 6242: 6242: 6242: 6242: if (__beg != __end) 6242: { 6242: const char_type __c = *__beg; 6242: for (size_t __i1 = 0; __i1 < __indexlen; ++__i1) 6242: if (__c == __names[__i1][0] 6242: || __c == __ctype.toupper(__names[__i1][0])) 6242: __matches[__nmatches++] = __i1; 6242: } 6242: 6242: while (__nmatches > 1) 6242: { 6242: 6242: size_t __minlen = __traits_type::length(__names[__matches[0]]); 6242: for (size_t __i2 = 1; __i2 < __nmatches; ++__i2) 6242: __minlen = std::min(__minlen, 6242: __traits_type::length(__names[__matches[__i2]])); 6242: ++__beg; 6242: ++__pos; 6242: if (__pos < __minlen && __beg != __end) 6242: for (size_t __i3 = 0; __i3 < __nmatches;) 6242: { 6242: __name = __names[__matches[__i3]]; 6242: if (!(__name[__pos] == *__beg)) 6242: __matches[__i3] = __matches[--__nmatches]; 6242: else 6242: ++__i3; 6242: } 6242: else 6242: break; 6242: } 6242: 6242: if (__nmatches == 1) 6242: { 6242: 6242: ++__beg; 6242: ++__pos; 6242: __name = __names[__matches[0]]; 6242: const size_t __len = __traits_type::length(__name); 6242: while (__pos < __len && __beg != __end && __name[__pos] == *__beg) 6242: ++__beg, (void)++__pos; 6242: 6242: if (__len == __pos) 6242: __member = __matches[0]; 6242: else 6242: __testvalid = false; 6242: } 6242: else 6242: __testvalid = false; 6242: if (!__testvalid) 6242: __err |= ios_base::failbit; 6242: 6242: return __beg; 6242: } 6242: 6242: template 6242: _InIter 6242: time_get<_CharT, _InIter>:: 6242: _M_extract_wday_or_month(iter_type __beg, iter_type __end, int& __member, 6242: const _CharT** __names, size_t __indexlen, 6242: ios_base& __io, ios_base::iostate& __err) const 6242: { 6242: typedef char_traits<_CharT> __traits_type; 6242: const locale& __loc = __io._M_getloc(); 6242: const ctype<_CharT>& __ctype = use_facet >(__loc); 6242: 6242: int* __matches = static_cast(__builtin_alloca(2 * sizeof(int) 6242: * __indexlen)); 6242: size_t __nmatches = 0; 6242: size_t* __matches_lengths = 0; 6242: size_t __pos = 0; 6242: 6242: if (__beg != __end) 6242: { 6242: const char_type __c = *__beg; 6242: for (size_t __i = 0; __i < 2 * __indexlen; ++__i) 6242: if (__c == __names[__i][0] 6242: || __c == __ctype.toupper(__names[__i][0])) 6242: __matches[__nmatches++] = __i; 6242: } 6242: 6242: if (__nmatches) 6242: { 6242: ++__beg; 6242: ++__pos; 6242: 6242: __matches_lengths 6242: = static_cast(__builtin_alloca(sizeof(size_t) 6242: * __nmatches)); 6242: for (size_t __i = 0; __i < __nmatches; ++__i) 6242: __matches_lengths[__i] 6242: = __traits_type::length(__names[__matches[__i]]); 6242: } 6242: 6242: for (; __beg != __end; ++__beg, (void)++__pos) 6242: { 6242: size_t __nskipped = 0; 6242: const char_type __c = *__beg; 6242: for (size_t __i = 0; __i < __nmatches;) 6242: { 6242: const char_type* __name = __names[__matches[__i]]; 6242: if (__pos >= __matches_lengths[__i]) 6242: ++__nskipped, ++__i; 6242: else if (!(__name[__pos] == __c)) 6242: { 6242: --__nmatches; 6242: __matches[__i] = __matches[__nmatches]; 6242: __matches_lengths[__i] = __matches_lengths[__nmatches]; 6242: } 6242: else 6242: ++__i; 6242: } 6242: if (__nskipped == __nmatches) 6242: break; 6242: } 6242: 6242: if ((__nmatches == 1 && __matches_lengths[0] == __pos) 6242: || (__nmatches == 2 && (__matches_lengths[0] == __pos 6242: || __matches_lengths[1] == __pos))) 6242: __member = (__matches[0] >= __indexlen 6242: ? __matches[0] - __indexlen : __matches[0]); 6242: else 6242: __err |= ios_base::failbit; 6242: 6242: return __beg; 6242: } 6242: 6242: template 6242: _InIter 6242: time_get<_CharT, _InIter>:: 6242: do_get_time(iter_type __beg, iter_type __end, ios_base& __io, 6242: ios_base::iostate& __err, tm* __tm) const 6242: { 6242: const locale& __loc = __io._M_getloc(); 6242: const __timepunct<_CharT>& __tp = use_facet<__timepunct<_CharT> >(__loc); 6242: const char_type* __times[2]; 6242: __tp._M_time_formats(__times); 6242: __beg = _M_extract_via_format(__beg, __end, __io, __err, 6242: __tm, __times[0]); 6242: if (__beg == __end) 6242: __err |= ios_base::eofbit; 6242: return __beg; 6242: } 6242: 6242: template 6242: _InIter 6242: time_get<_CharT, _InIter>:: 6242: do_get_date(iter_type __beg, iter_type __end, ios_base& __io, 6242: ios_base::iostate& __err, tm* __tm) const 6242: { 6242: const locale& __loc = __io._M_getloc(); 6242: const __timepunct<_CharT>& __tp = use_facet<__timepunct<_CharT> >(__loc); 6242: const char_type* __dates[2]; 6242: __tp._M_date_formats(__dates); 6242: __beg = _M_extract_via_format(__beg, __end, __io, __err, 6242: __tm, __dates[0]); 6242: if (__beg == __end) 6242: __err |= ios_base::eofbit; 6242: return __beg; 6242: } 6242: 6242: template 6242: _InIter 6242: time_get<_CharT, _InIter>:: 6242: do_get_weekday(iter_type __beg, iter_type __end, ios_base& __io, 6242: ios_base::iostate& __err, tm* __tm) const 6242: { 6242: const locale& __loc = __io._M_getloc(); 6242: const __timepunct<_CharT>& __tp = use_facet<__timepunct<_CharT> >(__loc); 6242: const char_type* __days[14]; 6242: __tp._M_days_abbreviated(__days); 6242: __tp._M_days(__days + 7); 6242: int __tmpwday; 6242: ios_base::iostate __tmperr = ios_base::goodbit; 6242: 6242: __beg = _M_extract_wday_or_month(__beg, __end, __tmpwday, __days, 7, 6242: __io, __tmperr); 6242: if (!__tmperr) 6242: __tm->tm_wday = __tmpwday; 6242: else 6242: __err |= ios_base::failbit; 6242: 6242: if (__beg == __end) 6242: __err |= ios_base::eofbit; 6242: return __beg; 6242: } 6242: 6242: template 6242: _InIter 6242: time_get<_CharT, _InIter>:: 6242: do_get_monthname(iter_type __beg, iter_type __end, 6242: ios_base& __io, ios_base::iostate& __err, tm* __tm) const 6242: { 6242: const locale& __loc = __io._M_getloc(); 6242: const __timepunct<_CharT>& __tp = use_facet<__timepunct<_CharT> >(__loc); 6242: const char_type* __months[24]; 6242: __tp._M_months_abbreviated(__months); 6242: __tp._M_months(__months + 12); 6242: int __tmpmon; 6242: ios_base::iostate __tmperr = ios_base::goodbit; 6242: 6242: __beg = _M_extract_wday_or_month(__beg, __end, __tmpmon, __months, 12, 6242: __io, __tmperr); 6242: if (!__tmperr) 6242: __tm->tm_mon = __tmpmon; 6242: else 6242: __err |= ios_base::failbit; 6242: 6242: if (__beg == __end) 6242: __err |= ios_base::eofbit; 6242: return __beg; 6242: } 6242: 6242: template 6242: _InIter 6242: time_get<_CharT, _InIter>:: 6242: do_get_year(iter_type __beg, iter_type __end, ios_base& __io, 6242: ios_base::iostate& __err, tm* __tm) const 6242: { 6242: int __tmpyear; 6242: ios_base::iostate __tmperr = ios_base::goodbit; 6242: 6242: __beg = _M_extract_num(__beg, __end, __tmpyear, 0, 9999, 4, 6242: __io, __tmperr); 6242: if (!__tmperr) 6242: __tm->tm_year = __tmpyear < 0 ? __tmpyear + 100 : __tmpyear - 1900; 6242: else 6242: __err |= ios_base::failbit; 6242: 6242: if (__beg == __end) 6242: __err |= ios_base::eofbit; 6242: return __beg; 6242: } 6242: 6242: 6242: template 6242: inline 6242: _InIter 6242: time_get<_CharT, _InIter>:: 6242: get(iter_type __s, iter_type __end, ios_base& __io, 6242: ios_base::iostate& __err, tm* __tm, const char_type* __fmt, 6242: const char_type* __fmtend) const 6242: { 6242: const locale& __loc = __io._M_getloc(); 6242: ctype<_CharT> const& __ctype = use_facet >(__loc); 6242: __err = ios_base::goodbit; 6242: while (__fmt != __fmtend && 6242: __err == ios_base::goodbit) 6242: { 6242: if (__s == __end) 6242: { 6242: __err = ios_base::eofbit | ios_base::failbit; 6242: break; 6242: } 6242: else if (__ctype.narrow(*__fmt, 0) == '%') 6242: { 6242: char __format; 6242: char __mod = 0; 6242: if (++__fmt == __fmtend) 6242: { 6242: __err = ios_base::failbit; 6242: break; 6242: } 6242: const char __c = __ctype.narrow(*__fmt, 0); 6242: if (__c != 'E' && __c != 'O') 6242: __format = __c; 6242: else if (++__fmt != __fmtend) 6242: { 6242: __mod = __c; 6242: __format = __ctype.narrow(*__fmt, 0); 6242: } 6242: else 6242: { 6242: __err = ios_base::failbit; 6242: break; 6242: } 6242: __s = this->do_get(__s, __end, __io, __err, __tm, __format, 6242: __mod); 6242: ++__fmt; 6242: } 6242: else if (__ctype.is(ctype_base::space, *__fmt)) 6242: { 6242: ++__fmt; 6242: while (__fmt != __fmtend && 6242: __ctype.is(ctype_base::space, *__fmt)) 6242: ++__fmt; 6242: 6242: while (__s != __end && 6242: __ctype.is(ctype_base::space, *__s)) 6242: ++__s; 6242: } 6242: 6242: else if (__ctype.tolower(*__s) == __ctype.tolower(*__fmt) || 6242: __ctype.toupper(*__s) == __ctype.toupper(*__fmt)) 6242: { 6242: ++__s; 6242: ++__fmt; 6242: } 6242: else 6242: { 6242: __err = ios_base::failbit; 6242: break; 6242: } 6242: } 6242: return __s; 6242: } 6242: 6242: template 6242: inline 6242: _InIter 6242: time_get<_CharT, _InIter>:: 6242: do_get(iter_type __beg, iter_type __end, ios_base& __io, 6242: ios_base::iostate& __err, tm* __tm, 6242: char __format, char __mod) const 6242: { 6242: const locale& __loc = __io._M_getloc(); 6242: ctype<_CharT> const& __ctype = use_facet >(__loc); 6242: __err = ios_base::goodbit; 6242: 6242: char_type __fmt[4]; 6242: __fmt[0] = __ctype.widen('%'); 6242: if (!__mod) 6242: { 6242: __fmt[1] = __format; 6242: __fmt[2] = char_type(); 6242: } 6242: else 6242: { 6242: __fmt[1] = __mod; 6242: __fmt[2] = __format; 6242: __fmt[3] = char_type(); 6242: } 6242: 6242: __beg = _M_extract_via_format(__beg, __end, __io, __err, __tm, __fmt); 6242: if (__beg == __end) 6242: __err |= ios_base::eofbit; 6242: return __beg; 6242: } 6242: 6242: 6242: 6242: template 6242: _OutIter 6242: time_put<_CharT, _OutIter>:: 6242: put(iter_type __s, ios_base& __io, char_type __fill, const tm* __tm, 6242: const _CharT* __beg, const _CharT* __end) const 6242: { 6242: const locale& __loc = __io._M_getloc(); 6242: ctype<_CharT> const& __ctype = use_facet >(__loc); 6242: for (; __beg != __end; ++__beg) 6242: if (__ctype.narrow(*__beg, 0) != '%') 6242: { 6242: *__s = *__beg; 6242: ++__s; 6242: } 6242: else if (++__beg != __end) 6242: { 6242: char __format; 6242: char __mod = 0; 6242: const char __c = __ctype.narrow(*__beg, 0); 6242: if (__c != 'E' && __c != 'O') 6242: __format = __c; 6242: else if (++__beg != __end) 6242: { 6242: __mod = __c; 6242: __format = __ctype.narrow(*__beg, 0); 6242: } 6242: else 6242: break; 6242: __s = this->do_put(__s, __io, __fill, __tm, __format, __mod); 6242: } 6242: else 6242: break; 6242: return __s; 6242: } 6242: 6242: template 6242: _OutIter 6242: time_put<_CharT, _OutIter>:: 6242: do_put(iter_type __s, ios_base& __io, char_type, const tm* __tm, 6242: char __format, char __mod) const 6242: { 6242: const locale& __loc = __io._M_getloc(); 6242: ctype<_CharT> const& __ctype = use_facet >(__loc); 6242: __timepunct<_CharT> const& __tp = use_facet<__timepunct<_CharT> >(__loc); 6242: 6242: 6242: 6242: const size_t __maxlen = 128; 6242: char_type __res[__maxlen]; 6242: 6242: 6242: 6242: 6242: 6242: 6242: char_type __fmt[4]; 6242: __fmt[0] = __ctype.widen('%'); 6242: if (!__mod) 6242: { 6242: __fmt[1] = __format; 6242: __fmt[2] = char_type(); 6242: } 6242: else 6242: { 6242: __fmt[1] = __mod; 6242: __fmt[2] = __format; 6242: __fmt[3] = char_type(); 6242: } 6242: 6242: __tp._M_put(__res, __maxlen, __fmt, __tm); 6242: 6242: 6242: return std::__write(__s, __res, char_traits::length(__res)); 6242: } 6242: 6242: 6242: 6242: 6242: 6242: extern template class moneypunct; 6242: extern template class moneypunct; 6242: extern template class moneypunct_byname; 6242: extern template class moneypunct_byname; 6242: extern template class __cxx11:: money_get; 6242: extern template class __cxx11:: money_put; 6242: extern template class __timepunct; 6242: extern template class time_put; 6242: extern template class time_put_byname; 6242: extern template class time_get; 6242: extern template class time_get_byname; 6242: extern template class messages; 6242: extern template class messages_byname; 6242: 6242: extern template 6242: const moneypunct& 6242: use_facet >(const locale&); 6242: 6242: extern template 6242: const moneypunct& 6242: use_facet >(const locale&); 6242: 6242: extern template 6242: const money_put& 6242: use_facet >(const locale&); 6242: 6242: extern template 6242: const money_get& 6242: use_facet >(const locale&); 6242: 6242: extern template 6242: const __timepunct& 6242: use_facet<__timepunct >(const locale&); 6242: 6242: extern template 6242: const time_put& 6242: use_facet >(const locale&); 6242: 6242: extern template 6242: const time_get& 6242: use_facet >(const locale&); 6242: 6242: extern template 6242: const messages& 6242: use_facet >(const locale&); 6242: 6242: extern template 6242: bool 6242: has_facet >(const locale&); 6242: 6242: extern template 6242: bool 6242: has_facet >(const locale&); 6242: 6242: extern template 6242: bool 6242: has_facet >(const locale&); 6242: 6242: extern template 6242: bool 6242: has_facet<__timepunct >(const locale&); 6242: 6242: extern template 6242: bool 6242: has_facet >(const locale&); 6242: 6242: extern template 6242: bool 6242: has_facet >(const locale&); 6242: 6242: extern template 6242: bool 6242: has_facet >(const locale&); 6242: 6242: 6242: extern template class moneypunct; 6242: extern template class moneypunct; 6242: extern template class moneypunct_byname; 6242: extern template class moneypunct_byname; 6242: extern template class __cxx11:: money_get; 6242: extern template class __cxx11:: money_put; 6242: extern template class __timepunct; 6242: extern template class time_put; 6242: extern template class time_put_byname; 6242: extern template class time_get; 6242: extern template class time_get_byname; 6242: extern template class messages; 6242: extern template class messages_byname; 6242: 6242: extern template 6242: const moneypunct& 6242: use_facet >(const locale&); 6242: 6242: extern template 6242: const moneypunct& 6242: use_facet >(const locale&); 6242: 6242: extern template 6242: const money_put& 6242: use_facet >(const locale&); 6242: 6242: extern template 6242: const money_get& 6242: use_facet >(const locale&); 6242: 6242: extern template 6242: const __timepunct& 6242: use_facet<__timepunct >(const locale&); 6242: 6242: extern template 6242: const time_put& 6242: use_facet >(const locale&); 6242: 6242: extern template 6242: const time_get& 6242: use_facet >(const locale&); 6242: 6242: extern template 6242: const messages& 6242: use_facet >(const locale&); 6242: 6242: extern template 6242: bool 6242: has_facet >(const locale&); 6242: 6242: extern template 6242: bool 6242: has_facet >(const locale&); 6242: 6242: extern template 6242: bool 6242: has_facet >(const locale&); 6242: 6242: extern template 6242: bool 6242: has_facet<__timepunct >(const locale&); 6242: 6242: extern template 6242: bool 6242: has_facet >(const locale&); 6242: 6242: extern template 6242: bool 6242: has_facet >(const locale&); 6242: 6242: extern template 6242: bool 6242: has_facet >(const locale&); 6242: 6242: 6242: 6242: 6242: } 6242: # 2016 "/usr/include/c++/8/bits/locale_facets_nonio.h" 2 3 6242: # 42 "/usr/include/c++/8/locale" 2 3 6242: 6242: # 1 "/usr/include/c++/8/bits/locale_conv.h" 1 3 6242: # 38 "/usr/include/c++/8/bits/locale_conv.h" 3 6242: # 1 "/usr/include/c++/8/bits/stringfwd.h" 1 3 6242: # 39 "/usr/include/c++/8/bits/locale_conv.h" 2 3 6242: # 1 "/usr/include/c++/8/bits/allocator.h" 1 3 6242: # 40 "/usr/include/c++/8/bits/locale_conv.h" 2 3 6242: # 1 "/usr/include/c++/8/bits/codecvt.h" 1 3 6242: # 41 "/usr/include/c++/8/bits/locale_conv.h" 2 3 6242: # 1 "/usr/include/c++/8/bits/unique_ptr.h" 1 3 6242: # 41 "/usr/include/c++/8/bits/unique_ptr.h" 3 6242: namespace std __attribute__ ((__visibility__ ("default"))) 6242: { 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: #pragma GCC diagnostic push 6242: #pragma GCC diagnostic ignored "-Wdeprecated-declarations" 6242: template class auto_ptr; 6242: #pragma GCC diagnostic pop 6242: 6242: 6242: 6242: template 6242: struct default_delete 6242: { 6242: 6242: constexpr default_delete() noexcept = default; 6242: 6242: 6242: 6242: 6242: 6242: 6242: template::value>::type> 6242: default_delete(const default_delete<_Up>&) noexcept { } 6242: 6242: 6242: void 6242: operator()(_Tp* __ptr) const 6242: { 6242: static_assert(!is_void<_Tp>::value, 6242: "can't delete pointer to incomplete type"); 6242: static_assert(sizeof(_Tp)>0, 6242: "can't delete pointer to incomplete type"); 6242: delete __ptr; 6242: } 6242: }; 6242: 6242: 6242: 6242: 6242: template 6242: struct default_delete<_Tp[]> 6242: { 6242: public: 6242: 6242: constexpr default_delete() noexcept = default; 6242: # 104 "/usr/include/c++/8/bits/unique_ptr.h" 3 6242: template::value>::type> 6242: default_delete(const default_delete<_Up[]>&) noexcept { } 6242: 6242: 6242: template 6242: typename enable_if::value>::type 6242: operator()(_Up* __ptr) const 6242: { 6242: static_assert(sizeof(_Tp)>0, 6242: "can't delete pointer to incomplete type"); 6242: delete [] __ptr; 6242: } 6242: }; 6242: 6242: template 6242: class __uniq_ptr_impl 6242: { 6242: template 6242: struct _Ptr 6242: { 6242: using type = _Up*; 6242: }; 6242: 6242: template 6242: struct 6242: _Ptr<_Up, _Ep, __void_t::type::pointer>> 6242: { 6242: using type = typename remove_reference<_Ep>::type::pointer; 6242: }; 6242: 6242: public: 6242: using _DeleterConstraint = enable_if< 6242: __and_<__not_>, 6242: is_default_constructible<_Dp>>::value>; 6242: 6242: using pointer = typename _Ptr<_Tp, _Dp>::type; 6242: 6242: __uniq_ptr_impl() = default; 6242: __uniq_ptr_impl(pointer __p) : _M_t() { _M_ptr() = __p; } 6242: 6242: template 6242: __uniq_ptr_impl(pointer __p, _Del&& __d) 6242: : _M_t(__p, std::forward<_Del>(__d)) { } 6242: 6242: pointer& _M_ptr() { return std::get<0>(_M_t); } 6242: pointer _M_ptr() const { return std::get<0>(_M_t); } 6242: _Dp& _M_deleter() { return std::get<1>(_M_t); } 6242: const _Dp& _M_deleter() const { return std::get<1>(_M_t); } 6242: 6242: private: 6242: tuple _M_t; 6242: }; 6242: 6242: 6242: template > 6242: class unique_ptr 6242: { 6242: template 6242: using _DeleterConstraint = 6242: typename __uniq_ptr_impl<_Tp, _Up>::_DeleterConstraint::type; 6242: 6242: __uniq_ptr_impl<_Tp, _Dp> _M_t; 6242: 6242: public: 6242: using pointer = typename __uniq_ptr_impl<_Tp, _Dp>::pointer; 6242: using element_type = _Tp; 6242: using deleter_type = _Dp; 6242: 6242: 6242: 6242: template 6242: using __safe_conversion_up = __and_< 6242: is_convertible::pointer, pointer>, 6242: __not_>, 6242: __or_<__and_, 6242: is_same>, 6242: __and_<__not_>, 6242: is_convertible<_Ep, deleter_type>> 6242: > 6242: >; 6242: 6242: 6242: 6242: 6242: template > 6242: constexpr unique_ptr() noexcept 6242: : _M_t() 6242: { } 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: template > 6242: explicit 6242: unique_ptr(pointer __p) noexcept 6242: : _M_t(__p) 6242: { } 6242: # 215 "/usr/include/c++/8/bits/unique_ptr.h" 3 6242: unique_ptr(pointer __p, 6242: typename conditional::value, 6242: deleter_type, const deleter_type&>::type __d) noexcept 6242: : _M_t(__p, __d) { } 6242: # 227 "/usr/include/c++/8/bits/unique_ptr.h" 3 6242: unique_ptr(pointer __p, 6242: typename remove_reference::type&& __d) noexcept 6242: : _M_t(std::move(__p), std::move(__d)) 6242: { static_assert(!std::is_reference::value, 6242: "rvalue deleter bound to reference"); } 6242: 6242: 6242: template > 6242: constexpr unique_ptr(nullptr_t) noexcept : unique_ptr() { } 6242: 6242: 6242: 6242: 6242: unique_ptr(unique_ptr&& __u) noexcept 6242: : _M_t(__u.release(), std::forward(__u.get_deleter())) { } 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: template, 6242: typename conditional::value, 6242: is_same<_Ep, _Dp>, 6242: is_convertible<_Ep, _Dp>>::type>> 6242: unique_ptr(unique_ptr<_Up, _Ep>&& __u) noexcept 6242: : _M_t(__u.release(), std::forward<_Ep>(__u.get_deleter())) 6242: { } 6242: 6242: 6242: #pragma GCC diagnostic push 6242: #pragma GCC diagnostic ignored "-Wdeprecated-declarations" 6242: 6242: template, is_same<_Dp, default_delete<_Tp>>>> 6242: unique_ptr(auto_ptr<_Up>&& __u) noexcept; 6242: #pragma GCC diagnostic pop 6242: 6242: 6242: 6242: ~unique_ptr() noexcept 6242: { 6242: auto& __ptr = _M_t._M_ptr(); 6242: if (__ptr != nullptr) 6242: get_deleter()(__ptr); 6242: __ptr = pointer(); 6242: } 6242: # 286 "/usr/include/c++/8/bits/unique_ptr.h" 3 6242: unique_ptr& 6242: operator=(unique_ptr&& __u) noexcept 6242: { 6242: reset(__u.release()); 6242: get_deleter() = std::forward(__u.get_deleter()); 6242: return *this; 6242: } 6242: # 301 "/usr/include/c++/8/bits/unique_ptr.h" 3 6242: template 6242: typename enable_if< __and_< 6242: __safe_conversion_up<_Up, _Ep>, 6242: is_assignable 6242: >::value, 6242: unique_ptr&>::type 6242: operator=(unique_ptr<_Up, _Ep>&& __u) noexcept 6242: { 6242: reset(__u.release()); 6242: get_deleter() = std::forward<_Ep>(__u.get_deleter()); 6242: return *this; 6242: } 6242: 6242: 6242: unique_ptr& 6242: operator=(nullptr_t) noexcept 6242: { 6242: reset(); 6242: return *this; 6242: } 6242: 6242: 6242: 6242: 6242: typename add_lvalue_reference::type 6242: operator*() const 6242: { 6242: ; 6242: return *get(); 6242: } 6242: 6242: 6242: pointer 6242: operator->() const noexcept 6242: { 6242: ; 6242: return get(); 6242: } 6242: 6242: 6242: pointer 6242: get() const noexcept 6242: { return _M_t._M_ptr(); } 6242: 6242: 6242: deleter_type& 6242: get_deleter() noexcept 6242: { return _M_t._M_deleter(); } 6242: 6242: 6242: const deleter_type& 6242: get_deleter() const noexcept 6242: { return _M_t._M_deleter(); } 6242: 6242: 6242: explicit operator bool() const noexcept 6242: { return get() == pointer() ? false : true; } 6242: 6242: 6242: 6242: 6242: pointer 6242: release() noexcept 6242: { 6242: pointer __p = get(); 6242: _M_t._M_ptr() = pointer(); 6242: return __p; 6242: } 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: void 6242: reset(pointer __p = pointer()) noexcept 6242: { 6242: using std::swap; 6242: swap(_M_t._M_ptr(), __p); 6242: if (__p != pointer()) 6242: get_deleter()(__p); 6242: } 6242: 6242: 6242: void 6242: swap(unique_ptr& __u) noexcept 6242: { 6242: using std::swap; 6242: swap(_M_t, __u._M_t); 6242: } 6242: 6242: 6242: unique_ptr(const unique_ptr&) = delete; 6242: unique_ptr& operator=(const unique_ptr&) = delete; 6242: }; 6242: 6242: 6242: 6242: 6242: 6242: template 6242: class unique_ptr<_Tp[], _Dp> 6242: { 6242: template 6242: using _DeleterConstraint = 6242: typename __uniq_ptr_impl<_Tp, _Up>::_DeleterConstraint::type; 6242: 6242: __uniq_ptr_impl<_Tp, _Dp> _M_t; 6242: 6242: template 6242: using __remove_cv = typename remove_cv<_Up>::type; 6242: 6242: 6242: template 6242: using __is_derived_Tp 6242: = __and_< is_base_of<_Tp, _Up>, 6242: __not_, __remove_cv<_Up>>> >; 6242: 6242: public: 6242: using pointer = typename __uniq_ptr_impl<_Tp, _Dp>::pointer; 6242: using element_type = _Tp; 6242: using deleter_type = _Dp; 6242: 6242: 6242: 6242: template, 6242: typename _Up_element_type = typename _Up_up::element_type> 6242: using __safe_conversion_up = __and_< 6242: is_array<_Up>, 6242: is_same, 6242: is_same, 6242: is_convertible<_Up_element_type(*)[], element_type(*)[]>, 6242: __or_<__and_, is_same>, 6242: __and_<__not_>, 6242: is_convertible<_Ep, deleter_type>>> 6242: >; 6242: 6242: 6242: template 6242: using __safe_conversion_raw = __and_< 6242: __or_<__or_, 6242: is_same<_Up, nullptr_t>>, 6242: __and_, 6242: is_same, 6242: is_convertible< 6242: typename remove_pointer<_Up>::type(*)[], 6242: element_type(*)[]> 6242: > 6242: > 6242: >; 6242: 6242: 6242: 6242: 6242: template > 6242: constexpr unique_ptr() noexcept 6242: : _M_t() 6242: { } 6242: # 470 "/usr/include/c++/8/bits/unique_ptr.h" 3 6242: template, 6242: typename = typename enable_if< 6242: __safe_conversion_raw<_Up>::value, bool>::type> 6242: explicit 6242: unique_ptr(_Up __p) noexcept 6242: : _M_t(__p) 6242: { } 6242: # 488 "/usr/include/c++/8/bits/unique_ptr.h" 3 6242: template::value, bool>::type> 6242: unique_ptr(_Up __p, 6242: typename conditional::value, 6242: deleter_type, const deleter_type&>::type __d) noexcept 6242: : _M_t(__p, __d) { } 6242: # 504 "/usr/include/c++/8/bits/unique_ptr.h" 3 6242: template::value, bool>::type> 6242: unique_ptr(_Up __p, typename 6242: remove_reference::type&& __d) noexcept 6242: : _M_t(std::move(__p), std::move(__d)) 6242: { static_assert(!is_reference::value, 6242: "rvalue deleter bound to reference"); } 6242: 6242: 6242: unique_ptr(unique_ptr&& __u) noexcept 6242: : _M_t(__u.release(), std::forward(__u.get_deleter())) { } 6242: 6242: 6242: template > 6242: constexpr unique_ptr(nullptr_t) noexcept : unique_ptr() { } 6242: 6242: template>> 6242: unique_ptr(unique_ptr<_Up, _Ep>&& __u) noexcept 6242: : _M_t(__u.release(), std::forward<_Ep>(__u.get_deleter())) 6242: { } 6242: 6242: 6242: ~unique_ptr() 6242: { 6242: auto& __ptr = _M_t._M_ptr(); 6242: if (__ptr != nullptr) 6242: get_deleter()(__ptr); 6242: __ptr = pointer(); 6242: } 6242: # 545 "/usr/include/c++/8/bits/unique_ptr.h" 3 6242: unique_ptr& 6242: operator=(unique_ptr&& __u) noexcept 6242: { 6242: reset(__u.release()); 6242: get_deleter() = std::forward(__u.get_deleter()); 6242: return *this; 6242: } 6242: # 560 "/usr/include/c++/8/bits/unique_ptr.h" 3 6242: template 6242: typename 6242: enable_if<__and_<__safe_conversion_up<_Up, _Ep>, 6242: is_assignable 6242: >::value, 6242: unique_ptr&>::type 6242: operator=(unique_ptr<_Up, _Ep>&& __u) noexcept 6242: { 6242: reset(__u.release()); 6242: get_deleter() = std::forward<_Ep>(__u.get_deleter()); 6242: return *this; 6242: } 6242: 6242: 6242: unique_ptr& 6242: operator=(nullptr_t) noexcept 6242: { 6242: reset(); 6242: return *this; 6242: } 6242: 6242: 6242: 6242: 6242: typename std::add_lvalue_reference::type 6242: operator[](size_t __i) const 6242: { 6242: ; 6242: return get()[__i]; 6242: } 6242: 6242: 6242: pointer 6242: get() const noexcept 6242: { return _M_t._M_ptr(); } 6242: 6242: 6242: deleter_type& 6242: get_deleter() noexcept 6242: { return _M_t._M_deleter(); } 6242: 6242: 6242: const deleter_type& 6242: get_deleter() const noexcept 6242: { return _M_t._M_deleter(); } 6242: 6242: 6242: explicit operator bool() const noexcept 6242: { return get() == pointer() ? false : true; } 6242: 6242: 6242: 6242: 6242: pointer 6242: release() noexcept 6242: { 6242: pointer __p = get(); 6242: _M_t._M_ptr() = pointer(); 6242: return __p; 6242: } 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: template , 6242: __and_, 6242: is_pointer<_Up>, 6242: is_convertible< 6242: typename remove_pointer<_Up>::type(*)[], 6242: element_type(*)[] 6242: > 6242: > 6242: > 6242: >> 6242: void 6242: reset(_Up __p) noexcept 6242: { 6242: pointer __ptr = __p; 6242: using std::swap; 6242: swap(_M_t._M_ptr(), __ptr); 6242: if (__ptr != nullptr) 6242: get_deleter()(__ptr); 6242: } 6242: 6242: void reset(nullptr_t = nullptr) noexcept 6242: { 6242: reset(pointer()); 6242: } 6242: 6242: 6242: void 6242: swap(unique_ptr& __u) noexcept 6242: { 6242: using std::swap; 6242: swap(_M_t, __u._M_t); 6242: } 6242: 6242: 6242: unique_ptr(const unique_ptr&) = delete; 6242: unique_ptr& operator=(const unique_ptr&) = delete; 6242: }; 6242: 6242: template 6242: inline 6242: 6242: 6242: typename enable_if<__is_swappable<_Dp>::value>::type 6242: 6242: 6242: 6242: swap(unique_ptr<_Tp, _Dp>& __x, 6242: unique_ptr<_Tp, _Dp>& __y) noexcept 6242: { __x.swap(__y); } 6242: 6242: 6242: template 6242: typename enable_if::value>::type 6242: swap(unique_ptr<_Tp, _Dp>&, 6242: unique_ptr<_Tp, _Dp>&) = delete; 6242: 6242: 6242: template 6242: inline bool 6242: operator==(const unique_ptr<_Tp, _Dp>& __x, 6242: const unique_ptr<_Up, _Ep>& __y) 6242: { return __x.get() == __y.get(); } 6242: 6242: template 6242: inline bool 6242: operator==(const unique_ptr<_Tp, _Dp>& __x, nullptr_t) noexcept 6242: { return !__x; } 6242: 6242: template 6242: inline bool 6242: operator==(nullptr_t, const unique_ptr<_Tp, _Dp>& __x) noexcept 6242: { return !__x; } 6242: 6242: template 6242: inline bool 6242: operator!=(const unique_ptr<_Tp, _Dp>& __x, 6242: const unique_ptr<_Up, _Ep>& __y) 6242: { return __x.get() != __y.get(); } 6242: 6242: template 6242: inline bool 6242: operator!=(const unique_ptr<_Tp, _Dp>& __x, nullptr_t) noexcept 6242: { return (bool)__x; } 6242: 6242: template 6242: inline bool 6242: operator!=(nullptr_t, const unique_ptr<_Tp, _Dp>& __x) noexcept 6242: { return (bool)__x; } 6242: 6242: template 6242: inline bool 6242: operator<(const unique_ptr<_Tp, _Dp>& __x, 6242: const unique_ptr<_Up, _Ep>& __y) 6242: { 6242: typedef typename 6242: std::common_type::pointer, 6242: typename unique_ptr<_Up, _Ep>::pointer>::type _CT; 6242: return std::less<_CT>()(__x.get(), __y.get()); 6242: } 6242: 6242: template 6242: inline bool 6242: operator<(const unique_ptr<_Tp, _Dp>& __x, nullptr_t) 6242: { return std::less::pointer>()(__x.get(), 6242: nullptr); } 6242: 6242: template 6242: inline bool 6242: operator<(nullptr_t, const unique_ptr<_Tp, _Dp>& __x) 6242: { return std::less::pointer>()(nullptr, 6242: __x.get()); } 6242: 6242: template 6242: inline bool 6242: operator<=(const unique_ptr<_Tp, _Dp>& __x, 6242: const unique_ptr<_Up, _Ep>& __y) 6242: { return !(__y < __x); } 6242: 6242: template 6242: inline bool 6242: operator<=(const unique_ptr<_Tp, _Dp>& __x, nullptr_t) 6242: { return !(nullptr < __x); } 6242: 6242: template 6242: inline bool 6242: operator<=(nullptr_t, const unique_ptr<_Tp, _Dp>& __x) 6242: { return !(__x < nullptr); } 6242: 6242: template 6242: inline bool 6242: operator>(const unique_ptr<_Tp, _Dp>& __x, 6242: const unique_ptr<_Up, _Ep>& __y) 6242: { return (__y < __x); } 6242: 6242: template 6242: inline bool 6242: operator>(const unique_ptr<_Tp, _Dp>& __x, nullptr_t) 6242: { return std::less::pointer>()(nullptr, 6242: __x.get()); } 6242: 6242: template 6242: inline bool 6242: operator>(nullptr_t, const unique_ptr<_Tp, _Dp>& __x) 6242: { return std::less::pointer>()(__x.get(), 6242: nullptr); } 6242: 6242: template 6242: inline bool 6242: operator>=(const unique_ptr<_Tp, _Dp>& __x, 6242: const unique_ptr<_Up, _Ep>& __y) 6242: { return !(__x < __y); } 6242: 6242: template 6242: inline bool 6242: operator>=(const unique_ptr<_Tp, _Dp>& __x, nullptr_t) 6242: { return !(__x < nullptr); } 6242: 6242: template 6242: inline bool 6242: operator>=(nullptr_t, const unique_ptr<_Tp, _Dp>& __x) 6242: { return !(nullptr < __x); } 6242: 6242: 6242: template 6242: struct hash> 6242: : public __hash_base>, 6242: private __poison_hash::pointer> 6242: { 6242: size_t 6242: operator()(const unique_ptr<_Tp, _Dp>& __u) const noexcept 6242: { 6242: typedef unique_ptr<_Tp, _Dp> _UP; 6242: return std::hash()(__u.get()); 6242: } 6242: }; 6242: # 847 "/usr/include/c++/8/bits/unique_ptr.h" 3 6242: 6242: } 6242: # 42 "/usr/include/c++/8/bits/locale_conv.h" 2 3 6242: 6242: namespace std __attribute__ ((__visibility__ ("default"))) 6242: { 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: template 6242: bool 6242: __do_str_codecvt(const _InChar* __first, const _InChar* __last, 6242: _OutStr& __outstr, const _Codecvt& __cvt, _State& __state, 6242: size_t& __count, _Fn __fn) 6242: { 6242: if (__first == __last) 6242: { 6242: __outstr.clear(); 6242: __count = 0; 6242: return true; 6242: } 6242: 6242: size_t __outchars = 0; 6242: auto __next = __first; 6242: const auto __maxlen = __cvt.max_length() + 1; 6242: 6242: codecvt_base::result __result; 6242: do 6242: { 6242: __outstr.resize(__outstr.size() + (__last - __next) * __maxlen); 6242: auto __outnext = &__outstr.front() + __outchars; 6242: auto const __outlast = &__outstr.back() + 1; 6242: __result = (__cvt.*__fn)(__state, __next, __last, __next, 6242: __outnext, __outlast, __outnext); 6242: __outchars = __outnext - &__outstr.front(); 6242: } 6242: while (__result == codecvt_base::partial && __next != __last 6242: && (__outstr.size() - __outchars) < __maxlen); 6242: 6242: if (__result == codecvt_base::error) 6242: { 6242: __count = __next - __first; 6242: return false; 6242: } 6242: 6242: if (__result == codecvt_base::noconv) 6242: { 6242: __outstr.assign(__first, __last); 6242: __count = __last - __first; 6242: } 6242: else 6242: { 6242: __outstr.resize(__outchars); 6242: __count = __next - __first; 6242: } 6242: 6242: return true; 6242: } 6242: 6242: 6242: template 6242: inline bool 6242: __str_codecvt_in(const char* __first, const char* __last, 6242: basic_string<_CharT, _Traits, _Alloc>& __outstr, 6242: const codecvt<_CharT, char, _State>& __cvt, 6242: _State& __state, size_t& __count) 6242: { 6242: using _Codecvt = codecvt<_CharT, char, _State>; 6242: using _ConvFn 6242: = codecvt_base::result 6242: (_Codecvt::*)(_State&, const char*, const char*, const char*&, 6242: _CharT*, _CharT*, _CharT*&) const; 6242: _ConvFn __fn = &codecvt<_CharT, char, _State>::in; 6242: return __do_str_codecvt(__first, __last, __outstr, __cvt, __state, 6242: __count, __fn); 6242: } 6242: 6242: template 6242: inline bool 6242: __str_codecvt_in(const char* __first, const char* __last, 6242: basic_string<_CharT, _Traits, _Alloc>& __outstr, 6242: const codecvt<_CharT, char, _State>& __cvt) 6242: { 6242: _State __state = {}; 6242: size_t __n; 6242: return __str_codecvt_in(__first, __last, __outstr, __cvt, __state, __n); 6242: } 6242: 6242: 6242: template 6242: inline bool 6242: __str_codecvt_out(const _CharT* __first, const _CharT* __last, 6242: basic_string& __outstr, 6242: const codecvt<_CharT, char, _State>& __cvt, 6242: _State& __state, size_t& __count) 6242: { 6242: using _Codecvt = codecvt<_CharT, char, _State>; 6242: using _ConvFn 6242: = codecvt_base::result 6242: (_Codecvt::*)(_State&, const _CharT*, const _CharT*, const _CharT*&, 6242: char*, char*, char*&) const; 6242: _ConvFn __fn = &codecvt<_CharT, char, _State>::out; 6242: return __do_str_codecvt(__first, __last, __outstr, __cvt, __state, 6242: __count, __fn); 6242: } 6242: 6242: template 6242: inline bool 6242: __str_codecvt_out(const _CharT* __first, const _CharT* __last, 6242: basic_string& __outstr, 6242: const codecvt<_CharT, char, _State>& __cvt) 6242: { 6242: _State __state = {}; 6242: size_t __n; 6242: return __str_codecvt_out(__first, __last, __outstr, __cvt, __state, __n); 6242: } 6242: 6242: 6242: 6242: namespace __cxx11 { 6242: 6242: 6242: template, 6242: typename _Byte_alloc = allocator> 6242: class wstring_convert 6242: { 6242: public: 6242: typedef basic_string, _Byte_alloc> byte_string; 6242: typedef basic_string<_Elem, char_traits<_Elem>, _Wide_alloc> wide_string; 6242: typedef typename _Codecvt::state_type state_type; 6242: typedef typename wide_string::traits_type::int_type int_type; 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: explicit 6242: wstring_convert(_Codecvt* __pcvt = new _Codecvt()) : _M_cvt(__pcvt) 6242: { 6242: if (!_M_cvt) 6242: __throw_logic_error("wstring_convert"); 6242: } 6242: # 198 "/usr/include/c++/8/bits/locale_conv.h" 3 6242: wstring_convert(_Codecvt* __pcvt, state_type __state) 6242: : _M_cvt(__pcvt), _M_state(__state), _M_with_cvtstate(true) 6242: { 6242: if (!_M_cvt) 6242: __throw_logic_error("wstring_convert"); 6242: } 6242: 6242: 6242: 6242: 6242: 6242: 6242: explicit 6242: wstring_convert(const byte_string& __byte_err, 6242: const wide_string& __wide_err = wide_string()) 6242: : _M_cvt(new _Codecvt), 6242: _M_byte_err_string(__byte_err), _M_wide_err_string(__wide_err), 6242: _M_with_strings(true) 6242: { 6242: if (!_M_cvt) 6242: __throw_logic_error("wstring_convert"); 6242: } 6242: 6242: ~wstring_convert() = default; 6242: 6242: 6242: 6242: wstring_convert(const wstring_convert&) = delete; 6242: wstring_convert& operator=(const wstring_convert&) = delete; 6242: 6242: 6242: wide_string 6242: from_bytes(char __byte) 6242: { 6242: char __bytes[2] = { __byte }; 6242: return from_bytes(__bytes, __bytes+1); 6242: } 6242: 6242: wide_string 6242: from_bytes(const char* __ptr) 6242: { return from_bytes(__ptr, __ptr+char_traits::length(__ptr)); } 6242: 6242: wide_string 6242: from_bytes(const byte_string& __str) 6242: { 6242: auto __ptr = __str.data(); 6242: return from_bytes(__ptr, __ptr + __str.size()); 6242: } 6242: 6242: wide_string 6242: from_bytes(const char* __first, const char* __last) 6242: { 6242: if (!_M_with_cvtstate) 6242: _M_state = state_type(); 6242: wide_string __out{ _M_wide_err_string.get_allocator() }; 6242: if (__str_codecvt_in(__first, __last, __out, *_M_cvt, _M_state, 6242: _M_count)) 6242: return __out; 6242: if (_M_with_strings) 6242: return _M_wide_err_string; 6242: __throw_range_error("wstring_convert::from_bytes"); 6242: } 6242: 6242: 6242: 6242: byte_string 6242: to_bytes(_Elem __wchar) 6242: { 6242: _Elem __wchars[2] = { __wchar }; 6242: return to_bytes(__wchars, __wchars+1); 6242: } 6242: 6242: byte_string 6242: to_bytes(const _Elem* __ptr) 6242: { 6242: return to_bytes(__ptr, __ptr+wide_string::traits_type::length(__ptr)); 6242: } 6242: 6242: byte_string 6242: to_bytes(const wide_string& __wstr) 6242: { 6242: auto __ptr = __wstr.data(); 6242: return to_bytes(__ptr, __ptr + __wstr.size()); 6242: } 6242: 6242: byte_string 6242: to_bytes(const _Elem* __first, const _Elem* __last) 6242: { 6242: if (!_M_with_cvtstate) 6242: _M_state = state_type(); 6242: byte_string __out{ _M_byte_err_string.get_allocator() }; 6242: if (__str_codecvt_out(__first, __last, __out, *_M_cvt, _M_state, 6242: _M_count)) 6242: return __out; 6242: if (_M_with_strings) 6242: return _M_byte_err_string; 6242: __throw_range_error("wstring_convert::to_bytes"); 6242: } 6242: 6242: 6242: 6242: 6242: 6242: size_t converted() const noexcept { return _M_count; } 6242: 6242: 6242: state_type state() const { return _M_state; } 6242: 6242: private: 6242: unique_ptr<_Codecvt> _M_cvt; 6242: byte_string _M_byte_err_string; 6242: wide_string _M_wide_err_string; 6242: state_type _M_state = state_type(); 6242: size_t _M_count = 0; 6242: bool _M_with_cvtstate = false; 6242: bool _M_with_strings = false; 6242: }; 6242: 6242: } 6242: 6242: 6242: template> 6242: class wbuffer_convert : public basic_streambuf<_Elem, _Tr> 6242: { 6242: typedef basic_streambuf<_Elem, _Tr> _Wide_streambuf; 6242: 6242: public: 6242: typedef typename _Codecvt::state_type state_type; 6242: # 336 "/usr/include/c++/8/bits/locale_conv.h" 3 6242: explicit 6242: wbuffer_convert(streambuf* __bytebuf = 0, _Codecvt* __pcvt = new _Codecvt, 6242: state_type __state = state_type()) 6242: : _M_buf(__bytebuf), _M_cvt(__pcvt), _M_state(__state) 6242: { 6242: if (!_M_cvt) 6242: __throw_logic_error("wbuffer_convert"); 6242: 6242: _M_always_noconv = _M_cvt->always_noconv(); 6242: 6242: if (_M_buf) 6242: { 6242: this->setp(_M_put_area, _M_put_area + _S_buffer_length); 6242: this->setg(_M_get_area + _S_putback_length, 6242: _M_get_area + _S_putback_length, 6242: _M_get_area + _S_putback_length); 6242: } 6242: } 6242: 6242: ~wbuffer_convert() = default; 6242: 6242: 6242: 6242: wbuffer_convert(const wbuffer_convert&) = delete; 6242: wbuffer_convert& operator=(const wbuffer_convert&) = delete; 6242: 6242: streambuf* rdbuf() const noexcept { return _M_buf; } 6242: 6242: streambuf* 6242: rdbuf(streambuf *__bytebuf) noexcept 6242: { 6242: auto __prev = _M_buf; 6242: _M_buf = __bytebuf; 6242: return __prev; 6242: } 6242: 6242: 6242: state_type state() const noexcept { return _M_state; } 6242: 6242: protected: 6242: int 6242: sync() 6242: { return _M_buf && _M_conv_put() && !_M_buf->pubsync() ? 0 : -1; } 6242: 6242: typename _Wide_streambuf::int_type 6242: overflow(typename _Wide_streambuf::int_type __out) 6242: { 6242: if (!_M_buf || !_M_conv_put()) 6242: return _Tr::eof(); 6242: else if (!_Tr::eq_int_type(__out, _Tr::eof())) 6242: return this->sputc(__out); 6242: return _Tr::not_eof(__out); 6242: } 6242: 6242: typename _Wide_streambuf::int_type 6242: underflow() 6242: { 6242: if (!_M_buf) 6242: return _Tr::eof(); 6242: 6242: if (this->gptr() < this->egptr() || (_M_buf && _M_conv_get())) 6242: return _Tr::to_int_type(*this->gptr()); 6242: else 6242: return _Tr::eof(); 6242: } 6242: 6242: streamsize 6242: xsputn(const typename _Wide_streambuf::char_type* __s, streamsize __n) 6242: { 6242: if (!_M_buf || __n == 0) 6242: return 0; 6242: streamsize __done = 0; 6242: do 6242: { 6242: auto __nn = std::min(this->epptr() - this->pptr(), 6242: __n - __done); 6242: _Tr::copy(this->pptr(), __s + __done, __nn); 6242: this->pbump(__nn); 6242: __done += __nn; 6242: } while (__done < __n && _M_conv_put()); 6242: return __done; 6242: } 6242: 6242: private: 6242: 6242: bool 6242: _M_conv_get() 6242: { 6242: const streamsize __pb1 = this->gptr() - this->eback(); 6242: const streamsize __pb2 = _S_putback_length; 6242: const streamsize __npb = std::min(__pb1, __pb2); 6242: 6242: _Tr::move(_M_get_area + _S_putback_length - __npb, 6242: this->gptr() - __npb, __npb); 6242: 6242: streamsize __nbytes = sizeof(_M_get_buf) - _M_unconv; 6242: __nbytes = std::min(__nbytes, _M_buf->in_avail()); 6242: if (__nbytes < 1) 6242: __nbytes = 1; 6242: __nbytes = _M_buf->sgetn(_M_get_buf + _M_unconv, __nbytes); 6242: if (__nbytes < 1) 6242: return false; 6242: __nbytes += _M_unconv; 6242: 6242: 6242: 6242: _Elem* __outbuf = _M_get_area + _S_putback_length; 6242: _Elem* __outnext = __outbuf; 6242: const char* __bnext = _M_get_buf; 6242: 6242: codecvt_base::result __result; 6242: if (_M_always_noconv) 6242: __result = codecvt_base::noconv; 6242: else 6242: { 6242: _Elem* __outend = _M_get_area + _S_buffer_length; 6242: 6242: __result = _M_cvt->in(_M_state, 6242: __bnext, __bnext + __nbytes, __bnext, 6242: __outbuf, __outend, __outnext); 6242: } 6242: 6242: if (__result == codecvt_base::noconv) 6242: { 6242: 6242: auto __get_buf = reinterpret_cast(_M_get_buf); 6242: _Tr::copy(__outbuf, __get_buf, __nbytes); 6242: _M_unconv = 0; 6242: return true; 6242: } 6242: 6242: if ((_M_unconv = _M_get_buf + __nbytes - __bnext)) 6242: char_traits::move(_M_get_buf, __bnext, _M_unconv); 6242: 6242: this->setg(__outbuf, __outbuf, __outnext); 6242: 6242: return __result != codecvt_base::error; 6242: } 6242: 6242: 6242: bool 6242: _M_put(...) 6242: { return false; } 6242: 6242: bool 6242: _M_put(const char* __p, streamsize __n) 6242: { 6242: if (_M_buf->sputn(__p, __n) < __n) 6242: return false; 6242: return true; 6242: } 6242: 6242: 6242: bool 6242: _M_conv_put() 6242: { 6242: _Elem* const __first = this->pbase(); 6242: const _Elem* const __last = this->pptr(); 6242: const streamsize __pending = __last - __first; 6242: 6242: if (_M_always_noconv) 6242: return _M_put(__first, __pending); 6242: 6242: char __outbuf[2 * _S_buffer_length]; 6242: 6242: const _Elem* __next = __first; 6242: const _Elem* __start; 6242: do 6242: { 6242: __start = __next; 6242: char* __outnext = __outbuf; 6242: char* const __outlast = __outbuf + sizeof(__outbuf); 6242: auto __result = _M_cvt->out(_M_state, __next, __last, __next, 6242: __outnext, __outlast, __outnext); 6242: if (__result == codecvt_base::error) 6242: return false; 6242: else if (__result == codecvt_base::noconv) 6242: return _M_put(__next, __pending); 6242: 6242: if (!_M_put(__outbuf, __outnext - __outbuf)) 6242: return false; 6242: } 6242: while (__next != __last && __next != __start); 6242: 6242: if (__next != __last) 6242: _Tr::move(__first, __next, __last - __next); 6242: 6242: this->pbump(__first - __next); 6242: return __next != __first; 6242: } 6242: 6242: streambuf* _M_buf; 6242: unique_ptr<_Codecvt> _M_cvt; 6242: state_type _M_state; 6242: 6242: static const streamsize _S_buffer_length = 32; 6242: static const streamsize _S_putback_length = 3; 6242: _Elem _M_put_area[_S_buffer_length]; 6242: _Elem _M_get_area[_S_buffer_length]; 6242: streamsize _M_unconv = 0; 6242: char _M_get_buf[_S_buffer_length-_S_putback_length]; 6242: bool _M_always_noconv; 6242: }; 6242: 6242: 6242: 6242: 6242: 6242: 6242: } 6242: # 44 "/usr/include/c++/8/locale" 2 3 6242: # 7 "unicode.hh" 2 6242: 6242: 6242: 6242: 6242: # 10 "unicode.hh" 6242: namespace Kakoune 6242: { 6242: 6242: using Codepoint = char32_t; 6242: 6242: inline bool is_eol(Codepoint c) 6242: { 6242: return c == '\n'; 6242: } 6242: 6242: inline bool is_horizontal_blank(Codepoint c) 6242: { 6242: return c == ' ' or c == '\t'; 6242: } 6242: 6242: inline bool is_blank(Codepoint c) 6242: { 6242: return c == ' ' or c == '\t' or c == '\n'; 6242: } 6242: 6242: enum WordType { Word, WORD }; 6242: 6242: template 6242: inline bool is_word(Codepoint c) 6242: { 6242: return c == '_' or iswalnum((wchar_t)c); 6242: } 6242: 6242: template<> 6242: inline bool is_word(Codepoint c) 6242: { 6242: return not is_horizontal_blank(c) and not is_eol(c); 6242: } 6242: 6242: inline bool is_punctuation(Codepoint c) 6242: { 6242: return not (is_word(c) or is_horizontal_blank(c) or is_eol(c)); 6242: } 6242: 6242: inline bool is_basic_alpha(Codepoint c) 6242: { 6242: return (c >= 'a' and c <= 'z') or (c >= 'A' and c <= 'Z'); 6242: } 6242: 6242: inline ColumnCount codepoint_width(Codepoint c) 6242: { 6242: return c == '\n' ? 1 : wcwidth((wchar_t)c); 6242: } 6242: 6242: enum class CharCategories 6242: { 6242: Blank, 6242: EndOfLine, 6242: Word, 6242: Punctuation, 6242: }; 6242: 6242: template 6242: inline CharCategories categorize(Codepoint c) 6242: { 6242: if (is_eol(c)) 6242: return CharCategories::EndOfLine; 6242: if (is_horizontal_blank(c)) 6242: return CharCategories::Blank; 6242: if (word_type == WORD or is_word(c)) 6242: return CharCategories::Word; 6242: return CharCategories::Punctuation; 6242: } 6242: 6242: inline Codepoint to_lower(Codepoint cp) { return towlower((wchar_t)cp); } 6242: inline Codepoint to_upper(Codepoint cp) { return towupper((wchar_t)cp); } 6242: 6242: inline char to_lower(char c) { return c >= 'A' and c <= 'Z' ? c - 'A' + 'a' : c; } 6242: inline char to_upper(char c) { return c >= 'a' and c <= 'z' ? c - 'a' + 'A' : c; } 6242: 6242: } 6242: # 9 "keys.hh" 2 6242: # 1 "vector.hh" 1 6242: 6242: 6242: 6242: # 1 "memory.hh" 1 6242: # 10 "memory.hh" 6242: namespace Kakoune 6242: { 6242: 6242: enum class MemoryDomain 6242: { 6242: Undefined, 6242: String, 6242: SharedString, 6242: BufferContent, 6242: BufferMeta, 6242: Options, 6242: Highlight, 6242: Display, 6242: Mapping, 6242: Commands, 6242: Hooks, 6242: Aliases, 6242: EnvVars, 6242: Faces, 6242: Values, 6242: Registers, 6242: Client, 6242: WordDB, 6242: Selections, 6242: History, 6242: Remote, 6242: Events, 6242: Completion, 6242: Count 6242: }; 6242: 6242: inline const char* domain_name(MemoryDomain domain) 6242: { 6242: switch (domain) 6242: { 6242: case MemoryDomain::Undefined: return "Undefined"; 6242: case MemoryDomain::String: return "String"; 6242: case MemoryDomain::SharedString: return "SharedString"; 6242: case MemoryDomain::BufferContent: return "BufferContent"; 6242: case MemoryDomain::BufferMeta: return "BufferMeta"; 6242: case MemoryDomain::Options: return "Options"; 6242: case MemoryDomain::Highlight: return "Highlight"; 6242: case MemoryDomain::Display: return "Display"; 6242: case MemoryDomain::Mapping: return "Mapping"; 6242: case MemoryDomain::Commands: return "Commands"; 6242: case MemoryDomain::Hooks: return "Hooks"; 6242: case MemoryDomain::WordDB: return "WordDB"; 6242: case MemoryDomain::Aliases: return "Aliases"; 6242: case MemoryDomain::EnvVars: return "EnvVars"; 6242: case MemoryDomain::Faces: return "Faces"; 6242: case MemoryDomain::Values: return "Values"; 6242: case MemoryDomain::Registers: return "Registers"; 6242: case MemoryDomain::Client: return "Client"; 6242: case MemoryDomain::Selections: return "Selections"; 6242: case MemoryDomain::History: return "History"; 6242: case MemoryDomain::Remote: return "Remote"; 6242: case MemoryDomain::Events: return "Events"; 6242: case MemoryDomain::Completion: return "Completion"; 6242: case MemoryDomain::Count: break; 6242: } 6242: if (not (false)) on_assert_failed("assert failed \"" "false" "\" at " "memory.hh" ":" "70"); 6242: return ""; 6242: } 6242: 6242: extern size_t domain_allocated_bytes[(size_t)MemoryDomain::Count]; 6242: 6242: inline void on_alloc(MemoryDomain domain, size_t size) 6242: { 6242: domain_allocated_bytes[(int)domain] += size; 6242: } 6242: 6242: inline void on_dealloc(MemoryDomain domain, size_t size) 6242: { 6242: if (not (domain_allocated_bytes[(int)domain] >= size)) on_assert_failed("assert failed \"" "domain_allocated_bytes[(int)domain] >= size" "\" at " "memory.hh" ":" "83"); 6242: domain_allocated_bytes[(int)domain] -= size; 6242: } 6242: 6242: template 6242: struct Allocator 6242: { 6242: using value_type = T; 6242: 6242: using pointer = T*; 6242: using const_pointer = const T*; 6242: using reference = T&; 6242: using const_reference = const T&; 6242: using size_type = std::size_t; 6242: using difference_type = std::ptrdiff_t; 6242: 6242: Allocator() = default; 6242: template 6242: Allocator(const Allocator&) {} 6242: 6242: template 6242: struct rebind { using other = Allocator; }; 6242: 6242: T* allocate(size_t n) 6242: { 6242: size_t size = sizeof(T) * n; 6242: on_alloc(domain, size); 6242: return reinterpret_cast(::operator new(size)); 6242: } 6242: 6242: void deallocate(T* ptr, size_t n) 6242: { 6242: size_t size = sizeof(T) * n; 6242: on_dealloc(domain, size); 6242: ::operator delete(ptr); 6242: } 6242: 6242: template 6242: [[gnu::always_inline]] 6242: void construct(U* p, Args&&... args) 6242: { 6242: new ((void*)p) U(std::forward(args)...); 6242: } 6242: 6242: template 6242: [[gnu::always_inline]] 6242: void destroy(U* p) { p->~U(); } 6242: }; 6242: 6242: template 6242: bool operator==(const Allocator& lhs, const Allocator& rhs) 6242: { 6242: return d1 == d2; 6242: } 6242: 6242: template 6242: bool operator!=(const Allocator& lhs, const Allocator& rhs) 6242: { 6242: return d1 != d2; 6242: } 6242: 6242: template 6242: struct TypeDomain 6242: { 6242: static constexpr MemoryDomain domain() { return TypeDomain::helper((T*)nullptr); } 6242: private: 6242: template static decltype(U::Domain) constexpr helper(U*) { return U::Domain; } 6242: static constexpr MemoryDomain helper(...) { return MemoryDomain::Undefined; } 6242: }; 6242: 6242: template 6242: struct UseMemoryDomain 6242: { 6242: static constexpr MemoryDomain Domain = d; 6242: static void* operator new(size_t size) 6242: { 6242: on_alloc(Domain, size); 6242: return ::operator new(size); 6242: } 6242: 6242: static void* operator new(size_t size, void* ptr) 6242: { 6242: return ::operator new(size, ptr); 6242: } 6242: 6242: static void operator delete(void* ptr, size_t size) 6242: { 6242: on_dealloc(Domain, size); 6242: ::operator delete(ptr); 6242: } 6242: }; 6242: 6242: } 6242: # 5 "vector.hh" 2 6242: 6242: 6242: 6242: namespace Kakoune 6242: { 6242: 6242: template::domain()> 6242: using Vector = std::vector>; 6242: 6242: } 6242: # 10 "keys.hh" 2 6242: 6242: namespace Kakoune 6242: { 6242: 6242: struct Key 6242: { 6242: enum class Modifiers : int 6242: { 6242: None = 0, 6242: Control = 1 << 0, 6242: Alt = 1 << 1, 6242: ControlAlt = Control | Alt, 6242: 6242: MousePress = 1 << 2, 6242: MouseRelease = 1 << 3, 6242: MousePos = 1 << 4, 6242: MouseWheelDown = 1 << 5, 6242: MouseWheelUp = 1 << 6, 6242: MouseEvent = MousePress | MouseRelease | MousePos | 6242: MouseWheelDown | MouseWheelUp, 6242: 6242: Resize = 1 << 7, 6242: }; 6242: enum NamedKey : Codepoint 6242: { 6242: 6242: Backspace = 0xD800, 6242: Delete, 6242: Escape, 6242: Return, 6242: Up, 6242: Down, 6242: Left, 6242: Right, 6242: PageUp, 6242: PageDown, 6242: Home, 6242: End, 6242: Tab, 6242: BackTab, 6242: F1, 6242: F2, 6242: F3, 6242: F4, 6242: F5, 6242: F6, 6242: F7, 6242: F8, 6242: F9, 6242: F10, 6242: F11, 6242: F12, 6242: FocusIn, 6242: FocusOut, 6242: Invalid, 6242: }; 6242: 6242: Modifiers modifiers; 6242: Codepoint key; 6242: 6242: constexpr Key(Modifiers modifiers, Codepoint key) 6242: : modifiers(modifiers), key(key) {} 6242: 6242: constexpr Key(Codepoint key) 6242: : modifiers(Modifiers::None), key(key) {} 6242: 6242: constexpr uint64_t val() const { return (uint64_t)modifiers << 32 | key; } 6242: 6242: constexpr bool operator==(Key other) const { return val() == other.val(); } 6242: constexpr bool operator!=(Key other) const { return val() != other.val(); } 6242: constexpr bool operator<(Key other) const { return val() < other.val(); } 6242: 6242: constexpr DisplayCoord coord() const { return {(int)((key & 0xFFFF0000) >> 16), (int)(key & 0x0000FFFF)}; } 6242: 6242: Optional codepoint() const; 6242: }; 6242: 6242: template<> struct WithBitOps : std::true_type {}; 6242: 6242: using KeyList = Vector; 6242: 6242: class String; 6242: class StringView; 6242: 6242: KeyList parse_keys(StringView str); 6242: String key_to_str(Key key); 6242: 6242: constexpr Key alt(Codepoint key) { return { Key::Modifiers::Alt, key }; } 6242: constexpr Key ctrl(Codepoint key) { return { Key::Modifiers::Control, key }; } 6242: constexpr Key ctrlalt(Codepoint key) { return { Key::Modifiers::ControlAlt, key }; } 6242: 6242: constexpr Codepoint encode_coord(DisplayCoord coord) { return (Codepoint)(((int)coord.line << 16) | ((int)coord.column & 0x0000FFFF)); } 6242: 6242: constexpr Key resize(DisplayCoord dim) { return { Key::Modifiers::Resize, encode_coord(dim) }; } 6242: 6242: inline size_t hash_value(const Key& key) { return hash_values(key.modifiers, key.key); } 6242: 6242: } 6242: # 6 "normal.hh" 2 6242: # 1 "string.hh" 1 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: # 1 "utf8.hh" 1 6242: # 10 "utf8.hh" 6242: namespace Kakoune 6242: { 6242: 6242: namespace utf8 6242: { 6242: 6242: template 6242: [[gnu::always_inline]] 6242: inline char read(Iterator& it) { char c = *it; ++it; return c; } 6242: 6242: 6242: 6242: [[gnu::always_inline]] 6242: inline bool is_character_start(char c) 6242: { 6242: return (c & 0xC0) != 0x80; 6242: } 6242: 6242: namespace InvalidPolicy 6242: { 6242: 6242: struct Assert 6242: { 6242: Codepoint operator()(Codepoint cp) const { if (not (false)) on_assert_failed("assert failed \"" "false" "\" at " "utf8.hh" ":" "33"); return cp; } 6242: }; 6242: 6242: struct Pass 6242: { 6242: Codepoint operator()(Codepoint cp) const { return cp; } 6242: }; 6242: 6242: } 6242: 6242: 6242: 6242: template 6242: Codepoint read_codepoint(Iterator& it, const Iterator& end) 6242: { 6242: if (it == end) 6242: return InvalidPolicy{}(-1); 6242: 6242: 6242: unsigned char byte = read(it); 6242: if (not (byte & 0x80)) 6242: return byte; 6242: 6242: if (it == end) 6242: return InvalidPolicy{}(byte); 6242: 6242: if ((byte & 0xE0) == 0xC0) 6242: return ((byte & 0x1F) << 6) | (read(it) & 0x3F); 6242: 6242: if ((byte & 0xF0) == 0xE0) 6242: { 6242: Codepoint cp = ((byte & 0x0F) << 12) | ((read(it) & 0x3F) << 6); 6242: if (it == end) 6242: return InvalidPolicy{}(cp); 6242: return cp | (read(it) & 0x3F); 6242: } 6242: 6242: if ((byte & 0xF8) == 0xF0) 6242: { 6242: Codepoint cp = ((byte & 0x0F) << 18) | ((read(it) & 0x3F) << 12); 6242: if (it == end) 6242: return InvalidPolicy{}(cp); 6242: cp |= (read(it) & 0x3F) << 6; 6242: if (it == end) 6242: return InvalidPolicy{}(cp); 6242: return cp | (read(it) & 0x3F); 6242: } 6242: return InvalidPolicy{}(byte); 6242: } 6242: 6242: template 6242: Codepoint codepoint(Iterator it, const Iterator& end) 6242: { 6242: return read_codepoint(it, end); 6242: } 6242: 6242: template 6242: ByteCount codepoint_size(char byte) 6242: { 6242: if (not (byte & 0x80)) 6242: return 1; 6242: else if ((byte & 0xE0) == 0xC0) 6242: return 2; 6242: else if ((byte & 0xF0) == 0xE0) 6242: return 3; 6242: else if ((byte & 0xF8) == 0xF0) 6242: return 4; 6242: else 6242: { 6242: InvalidPolicy{}(byte); 6242: return 1; 6242: } 6242: } 6242: 6242: struct invalid_codepoint{}; 6242: 6242: inline ByteCount codepoint_size(Codepoint cp) 6242: { 6242: if (cp <= 0x7F) 6242: return 1; 6242: else if (cp <= 0x7FF) 6242: return 2; 6242: else if (cp <= 0xFFFF) 6242: return 3; 6242: else if (cp <= 0x10FFFF) 6242: return 4; 6242: else 6242: throw invalid_codepoint{}; 6242: } 6242: 6242: template 6242: void to_next(Iterator& it, const Iterator& end) 6242: { 6242: if (it != end and read(it) & 0x80) 6242: while (it != end and (*(it) & 0xC0) == 0x80) 6242: ++it; 6242: } 6242: 6242: 6242: template 6242: Iterator next(Iterator it, const Iterator& end) 6242: { 6242: to_next(it, end); 6242: return it; 6242: } 6242: 6242: 6242: 6242: template 6242: Iterator finish(Iterator it, const Iterator& end) 6242: { 6242: while (it != end and (*(it) & 0xC0) == 0x80) 6242: ++it; 6242: return it; 6242: } 6242: 6242: template 6242: void to_previous(Iterator& it, const Iterator& begin) 6242: { 6242: while (it != begin and (*(--it) & 0xC0) == 0x80) 6242: ; 6242: } 6242: 6242: template 6242: Iterator previous(Iterator it, const Iterator& begin) 6242: { 6242: to_previous(it, begin); 6242: return it; 6242: } 6242: 6242: 6242: 6242: 6242: template 6242: Iterator advance(Iterator it, const Iterator& end, CharCount d) 6242: { 6242: if (it == end) 6242: return it; 6242: 6242: if (d < 0) 6242: { 6242: while (it != end and d != 0) 6242: { 6242: if (is_character_start(*--it)) 6242: ++d; 6242: } 6242: } 6242: else if (d > 0) 6242: { 6242: while (it != end and d != 0) 6242: { 6242: if (is_character_start(*++it)) 6242: --d; 6242: } 6242: } 6242: return it; 6242: } 6242: 6242: 6242: 6242: 6242: template 6242: Iterator advance(Iterator it, const Iterator& end, ColumnCount d) 6242: { 6242: if (it == end) 6242: return it; 6242: 6242: if (d < 0) 6242: { 6242: while (it != end and d < 0) 6242: { 6242: auto cur = it; 6242: to_previous(it, end); 6242: d += codepoint_width(codepoint(it, cur)); 6242: } 6242: } 6242: else if (d > 0) 6242: { 6242: auto begin = it; 6242: while (it != end and d > 0) 6242: { 6242: d -= codepoint_width(read_codepoint(it, end)); 6242: if (it != end and d < 0) 6242: to_previous(it, begin); 6242: } 6242: } 6242: return it; 6242: } 6242: 6242: 6242: template 6242: CharCount distance(Iterator begin, const Iterator& end) 6242: { 6242: CharCount dist = 0; 6242: 6242: while (begin != end) 6242: { 6242: if (is_character_start(read(begin))) 6242: ++dist; 6242: } 6242: return dist; 6242: } 6242: 6242: 6242: template 6242: ColumnCount column_distance(Iterator begin, const Iterator& end) 6242: { 6242: ColumnCount dist = 0; 6242: 6242: while (begin != end) 6242: dist += codepoint_width(read_codepoint(begin, end)); 6242: return dist; 6242: } 6242: 6242: 6242: template 6242: Iterator character_start(Iterator it, const Iterator& begin) 6242: { 6242: while (it != begin and not is_character_start(*it)) 6242: --it; 6242: return it; 6242: } 6242: 6242: template 6242: void dump(OutputIterator&& it, Codepoint cp) 6242: { 6242: if (cp <= 0x7F) 6242: *it++ = cp; 6242: else if (cp <= 0x7FF) 6242: { 6242: *it++ = 0xC0 | (cp >> 6); 6242: *it++ = 0x80 | (cp & 0x3F); 6242: } 6242: else if (cp <= 0xFFFF) 6242: { 6242: *it++ = 0xE0 | (cp >> 12); 6242: *it++ = 0x80 | ((cp >> 6) & 0x3F); 6242: *it++ = 0x80 | (cp & 0x3F); 6242: } 6242: else if (cp <= 0x10FFFF) 6242: { 6242: *it++ = 0xF0 | (cp >> 18); 6242: *it++ = 0x80 | ((cp >> 12) & 0x3F); 6242: *it++ = 0x80 | ((cp >> 6) & 0x3F); 6242: *it++ = 0x80 | (cp & 0x3F); 6242: } 6242: else 6242: throw invalid_codepoint{}; 6242: } 6242: 6242: } 6242: 6242: } 6242: # 9 "string.hh" 2 6242: 6242: 6242: # 1 "/usr/include/string.h" 1 3 4 6242: # 26 "/usr/include/string.h" 3 4 6242: # 1 "/usr/include/s390x-linux-gnu/bits/libc-header-start.h" 1 3 4 6242: # 27 "/usr/include/string.h" 2 3 4 6242: 6242: 6242: # 28 "/usr/include/string.h" 3 4 6242: extern "C" { 6242: 6242: 6242: 6242: 6242: # 1 "/usr/lib/gcc/s390x-linux-gnu/8/include/stddef.h" 1 3 4 6242: # 34 "/usr/include/string.h" 2 3 4 6242: # 42 "/usr/include/string.h" 3 4 6242: extern void *memcpy (void *__restrict __dest, const void *__restrict __src, 6242: size_t __n) throw () __attribute__ ((__nonnull__ (1, 2))); 6242: 6242: 6242: extern void *memmove (void *__dest, const void *__src, size_t __n) 6242: throw () __attribute__ ((__nonnull__ (1, 2))); 6242: 6242: 6242: 6242: 6242: 6242: extern void *memccpy (void *__restrict __dest, const void *__restrict __src, 6242: int __c, size_t __n) 6242: throw () __attribute__ ((__nonnull__ (1, 2))); 6242: 6242: 6242: 6242: 6242: extern void *memset (void *__s, int __c, size_t __n) throw () __attribute__ ((__nonnull__ (1))); 6242: 6242: 6242: extern int memcmp (const void *__s1, const void *__s2, size_t __n) 6242: throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); 6242: 6242: 6242: 6242: extern "C++" 6242: { 6242: extern void *memchr (void *__s, int __c, size_t __n) 6242: throw () __asm ("memchr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); 6242: extern const void *memchr (const void *__s, int __c, size_t __n) 6242: throw () __asm ("memchr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); 6242: 6242: 6242: extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) void * 6242: memchr (void *__s, int __c, size_t __n) throw () 6242: { 6242: return __builtin_memchr (__s, __c, __n); 6242: } 6242: 6242: extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) const void * 6242: memchr (const void *__s, int __c, size_t __n) throw () 6242: { 6242: return __builtin_memchr (__s, __c, __n); 6242: } 6242: 6242: } 6242: # 98 "/usr/include/string.h" 3 4 6242: extern "C++" void *rawmemchr (void *__s, int __c) 6242: throw () __asm ("rawmemchr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); 6242: extern "C++" const void *rawmemchr (const void *__s, int __c) 6242: throw () __asm ("rawmemchr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: extern "C++" void *memrchr (void *__s, int __c, size_t __n) 6242: throw () __asm ("memrchr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); 6242: extern "C++" const void *memrchr (const void *__s, int __c, size_t __n) 6242: throw () __asm ("memrchr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); 6242: # 121 "/usr/include/string.h" 3 4 6242: extern char *strcpy (char *__restrict __dest, const char *__restrict __src) 6242: throw () __attribute__ ((__nonnull__ (1, 2))); 6242: 6242: extern char *strncpy (char *__restrict __dest, 6242: const char *__restrict __src, size_t __n) 6242: throw () __attribute__ ((__nonnull__ (1, 2))); 6242: 6242: 6242: extern char *strcat (char *__restrict __dest, const char *__restrict __src) 6242: throw () __attribute__ ((__nonnull__ (1, 2))); 6242: 6242: extern char *strncat (char *__restrict __dest, const char *__restrict __src, 6242: size_t __n) throw () __attribute__ ((__nonnull__ (1, 2))); 6242: 6242: 6242: extern int strcmp (const char *__s1, const char *__s2) 6242: throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); 6242: 6242: extern int strncmp (const char *__s1, const char *__s2, size_t __n) 6242: throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); 6242: 6242: 6242: extern int strcoll (const char *__s1, const char *__s2) 6242: throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); 6242: 6242: extern size_t strxfrm (char *__restrict __dest, 6242: const char *__restrict __src, size_t __n) 6242: throw () __attribute__ ((__nonnull__ (2))); 6242: 6242: 6242: 6242: 6242: 6242: 6242: extern int strcoll_l (const char *__s1, const char *__s2, locale_t __l) 6242: throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2, 3))); 6242: 6242: 6242: extern size_t strxfrm_l (char *__dest, const char *__src, size_t __n, 6242: locale_t __l) throw () __attribute__ ((__nonnull__ (2, 4))); 6242: 6242: 6242: 6242: 6242: 6242: extern char *strdup (const char *__s) 6242: throw () __attribute__ ((__malloc__)) __attribute__ ((__nonnull__ (1))); 6242: 6242: 6242: 6242: 6242: 6242: 6242: extern char *strndup (const char *__string, size_t __n) 6242: throw () __attribute__ ((__malloc__)) __attribute__ ((__nonnull__ (1))); 6242: # 203 "/usr/include/string.h" 3 4 6242: extern "C++" 6242: { 6242: extern char *strchr (char *__s, int __c) 6242: throw () __asm ("strchr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); 6242: extern const char *strchr (const char *__s, int __c) 6242: throw () __asm ("strchr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); 6242: 6242: 6242: extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) char * 6242: strchr (char *__s, int __c) throw () 6242: { 6242: return __builtin_strchr (__s, __c); 6242: } 6242: 6242: extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) const char * 6242: strchr (const char *__s, int __c) throw () 6242: { 6242: return __builtin_strchr (__s, __c); 6242: } 6242: 6242: } 6242: 6242: 6242: 6242: 6242: 6242: 6242: extern "C++" 6242: { 6242: extern char *strrchr (char *__s, int __c) 6242: throw () __asm ("strrchr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); 6242: extern const char *strrchr (const char *__s, int __c) 6242: throw () __asm ("strrchr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); 6242: 6242: 6242: extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) char * 6242: strrchr (char *__s, int __c) throw () 6242: { 6242: return __builtin_strrchr (__s, __c); 6242: } 6242: 6242: extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) const char * 6242: strrchr (const char *__s, int __c) throw () 6242: { 6242: return __builtin_strrchr (__s, __c); 6242: } 6242: 6242: } 6242: # 260 "/usr/include/string.h" 3 4 6242: extern "C++" char *strchrnul (char *__s, int __c) 6242: throw () __asm ("strchrnul") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); 6242: extern "C++" const char *strchrnul (const char *__s, int __c) 6242: throw () __asm ("strchrnul") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); 6242: # 272 "/usr/include/string.h" 3 4 6242: extern size_t strcspn (const char *__s, const char *__reject) 6242: throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); 6242: 6242: 6242: extern size_t strspn (const char *__s, const char *__accept) 6242: throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); 6242: 6242: 6242: extern "C++" 6242: { 6242: extern char *strpbrk (char *__s, const char *__accept) 6242: throw () __asm ("strpbrk") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); 6242: extern const char *strpbrk (const char *__s, const char *__accept) 6242: throw () __asm ("strpbrk") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); 6242: 6242: 6242: extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) char * 6242: strpbrk (char *__s, const char *__accept) throw () 6242: { 6242: return __builtin_strpbrk (__s, __accept); 6242: } 6242: 6242: extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) const char * 6242: strpbrk (const char *__s, const char *__accept) throw () 6242: { 6242: return __builtin_strpbrk (__s, __accept); 6242: } 6242: 6242: } 6242: 6242: 6242: 6242: 6242: 6242: 6242: extern "C++" 6242: { 6242: extern char *strstr (char *__haystack, const char *__needle) 6242: throw () __asm ("strstr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); 6242: extern const char *strstr (const char *__haystack, const char *__needle) 6242: throw () __asm ("strstr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); 6242: 6242: 6242: extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) char * 6242: strstr (char *__haystack, const char *__needle) throw () 6242: { 6242: return __builtin_strstr (__haystack, __needle); 6242: } 6242: 6242: extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) const char * 6242: strstr (const char *__haystack, const char *__needle) throw () 6242: { 6242: return __builtin_strstr (__haystack, __needle); 6242: } 6242: 6242: } 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: extern char *strtok (char *__restrict __s, const char *__restrict __delim) 6242: throw () __attribute__ ((__nonnull__ (2))); 6242: 6242: 6242: 6242: extern char *__strtok_r (char *__restrict __s, 6242: const char *__restrict __delim, 6242: char **__restrict __save_ptr) 6242: throw () __attribute__ ((__nonnull__ (2, 3))); 6242: 6242: extern char *strtok_r (char *__restrict __s, const char *__restrict __delim, 6242: char **__restrict __save_ptr) 6242: throw () __attribute__ ((__nonnull__ (2, 3))); 6242: 6242: 6242: 6242: 6242: 6242: extern "C++" char *strcasestr (char *__haystack, const char *__needle) 6242: throw () __asm ("strcasestr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); 6242: extern "C++" const char *strcasestr (const char *__haystack, 6242: const char *__needle) 6242: throw () __asm ("strcasestr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); 6242: # 368 "/usr/include/string.h" 3 4 6242: extern void *memmem (const void *__haystack, size_t __haystacklen, 6242: const void *__needle, size_t __needlelen) 6242: throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 3))); 6242: 6242: 6242: 6242: extern void *__mempcpy (void *__restrict __dest, 6242: const void *__restrict __src, size_t __n) 6242: throw () __attribute__ ((__nonnull__ (1, 2))); 6242: extern void *mempcpy (void *__restrict __dest, 6242: const void *__restrict __src, size_t __n) 6242: throw () __attribute__ ((__nonnull__ (1, 2))); 6242: 6242: 6242: 6242: 6242: extern size_t strlen (const char *__s) 6242: throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); 6242: 6242: 6242: 6242: 6242: extern size_t strnlen (const char *__string, size_t __maxlen) 6242: throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); 6242: 6242: 6242: 6242: 6242: extern char *strerror (int __errnum) throw (); 6242: # 420 "/usr/include/string.h" 3 4 6242: extern char *strerror_r (int __errnum, char *__buf, size_t __buflen) 6242: throw () __attribute__ ((__nonnull__ (2))) __attribute__ ((__warn_unused_result__)); 6242: 6242: 6242: 6242: 6242: 6242: extern char *strerror_l (int __errnum, locale_t __l) throw (); 6242: 6242: 6242: 6242: # 1 "/usr/include/strings.h" 1 3 4 6242: # 23 "/usr/include/strings.h" 3 4 6242: # 1 "/usr/lib/gcc/s390x-linux-gnu/8/include/stddef.h" 1 3 4 6242: # 24 "/usr/include/strings.h" 2 3 4 6242: 6242: 6242: 6242: 6242: 6242: 6242: extern "C" { 6242: 6242: 6242: 6242: extern int bcmp (const void *__s1, const void *__s2, size_t __n) 6242: throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); 6242: 6242: 6242: extern void bcopy (const void *__src, void *__dest, size_t __n) 6242: throw () __attribute__ ((__nonnull__ (1, 2))); 6242: 6242: 6242: extern void bzero (void *__s, size_t __n) throw () __attribute__ ((__nonnull__ (1))); 6242: 6242: 6242: 6242: extern "C++" 6242: { 6242: extern char *index (char *__s, int __c) 6242: throw () __asm ("index") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); 6242: extern const char *index (const char *__s, int __c) 6242: throw () __asm ("index") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); 6242: 6242: 6242: extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) char * 6242: index (char *__s, int __c) throw () 6242: { 6242: return __builtin_index (__s, __c); 6242: } 6242: 6242: extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) const char * 6242: index (const char *__s, int __c) throw () 6242: { 6242: return __builtin_index (__s, __c); 6242: } 6242: 6242: } 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: extern "C++" 6242: { 6242: extern char *rindex (char *__s, int __c) 6242: throw () __asm ("rindex") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); 6242: extern const char *rindex (const char *__s, int __c) 6242: throw () __asm ("rindex") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); 6242: 6242: 6242: extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) char * 6242: rindex (char *__s, int __c) throw () 6242: { 6242: return __builtin_rindex (__s, __c); 6242: } 6242: 6242: extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) const char * 6242: rindex (const char *__s, int __c) throw () 6242: { 6242: return __builtin_rindex (__s, __c); 6242: } 6242: 6242: } 6242: # 104 "/usr/include/strings.h" 3 4 6242: extern int ffs (int __i) throw () __attribute__ ((__const__)); 6242: 6242: 6242: 6242: 6242: 6242: extern int ffsl (long int __l) throw () __attribute__ ((__const__)); 6242: __extension__ extern int ffsll (long long int __ll) 6242: throw () __attribute__ ((__const__)); 6242: 6242: 6242: 6242: extern int strcasecmp (const char *__s1, const char *__s2) 6242: throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); 6242: 6242: 6242: extern int strncasecmp (const char *__s1, const char *__s2, size_t __n) 6242: throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); 6242: 6242: 6242: 6242: 6242: 6242: 6242: extern int strcasecmp_l (const char *__s1, const char *__s2, locale_t __loc) 6242: throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2, 3))); 6242: 6242: 6242: 6242: extern int strncasecmp_l (const char *__s1, const char *__s2, 6242: size_t __n, locale_t __loc) 6242: throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2, 4))); 6242: 6242: 6242: } 6242: 6242: 6242: 6242: 6242: 6242: # 1 "/usr/include/s390x-linux-gnu/bits/strings_fortified.h" 1 3 4 6242: # 22 "/usr/include/s390x-linux-gnu/bits/strings_fortified.h" 3 4 6242: extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) void 6242: __attribute__ ((__leaf__)) bcopy (const void *__src, void *__dest, size_t __len) throw () 6242: { 6242: (void) __builtin___memmove_chk (__dest, __src, __len, __builtin_object_size (__dest, 0)); 6242: } 6242: 6242: extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) void 6242: __attribute__ ((__leaf__)) bzero (void *__dest, size_t __len) throw () 6242: { 6242: (void) __builtin___memset_chk (__dest, '\0', __len, __builtin_object_size (__dest, 0)); 6242: } 6242: # 145 "/usr/include/strings.h" 2 3 4 6242: # 432 "/usr/include/string.h" 2 3 4 6242: 6242: 6242: 6242: extern void explicit_bzero (void *__s, size_t __n) throw () __attribute__ ((__nonnull__ (1))); 6242: 6242: 6242: 6242: extern char *strsep (char **__restrict __stringp, 6242: const char *__restrict __delim) 6242: throw () __attribute__ ((__nonnull__ (1, 2))); 6242: 6242: 6242: 6242: 6242: extern char *strsignal (int __sig) throw (); 6242: 6242: 6242: extern char *__stpcpy (char *__restrict __dest, const char *__restrict __src) 6242: throw () __attribute__ ((__nonnull__ (1, 2))); 6242: extern char *stpcpy (char *__restrict __dest, const char *__restrict __src) 6242: throw () __attribute__ ((__nonnull__ (1, 2))); 6242: 6242: 6242: 6242: extern char *__stpncpy (char *__restrict __dest, 6242: const char *__restrict __src, size_t __n) 6242: throw () __attribute__ ((__nonnull__ (1, 2))); 6242: extern char *stpncpy (char *__restrict __dest, 6242: const char *__restrict __src, size_t __n) 6242: throw () __attribute__ ((__nonnull__ (1, 2))); 6242: 6242: 6242: 6242: 6242: extern int strverscmp (const char *__s1, const char *__s2) 6242: throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); 6242: 6242: 6242: extern char *strfry (char *__string) throw () __attribute__ ((__nonnull__ (1))); 6242: 6242: 6242: extern void *memfrob (void *__s, size_t __n) throw () __attribute__ ((__nonnull__ (1))); 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: extern "C++" char *basename (char *__filename) 6242: throw () __asm ("basename") __attribute__ ((__nonnull__ (1))); 6242: extern "C++" const char *basename (const char *__filename) 6242: throw () __asm ("basename") __attribute__ ((__nonnull__ (1))); 6242: # 494 "/usr/include/string.h" 3 4 6242: # 1 "/usr/include/s390x-linux-gnu/bits/string_fortified.h" 1 3 4 6242: # 30 "/usr/include/s390x-linux-gnu/bits/string_fortified.h" 3 4 6242: extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) void * 6242: __attribute__ ((__leaf__)) memcpy (void *__restrict __dest, const void *__restrict __src, size_t __len) throw () 6242: 6242: { 6242: return __builtin___memcpy_chk (__dest, __src, __len, __builtin_object_size (__dest, 0)); 6242: } 6242: 6242: extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) void * 6242: __attribute__ ((__leaf__)) memmove (void *__dest, const void *__src, size_t __len) throw () 6242: { 6242: return __builtin___memmove_chk (__dest, __src, __len, __builtin_object_size (__dest, 0)); 6242: } 6242: 6242: 6242: extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) void * 6242: __attribute__ ((__leaf__)) mempcpy (void *__restrict __dest, const void *__restrict __src, size_t __len) throw () 6242: 6242: { 6242: return __builtin___mempcpy_chk (__dest, __src, __len, __builtin_object_size (__dest, 0)); 6242: } 6242: # 58 "/usr/include/s390x-linux-gnu/bits/string_fortified.h" 3 4 6242: extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) void * 6242: __attribute__ ((__leaf__)) memset (void *__dest, int __ch, size_t __len) throw () 6242: { 6242: # 71 "/usr/include/s390x-linux-gnu/bits/string_fortified.h" 3 4 6242: return __builtin___memset_chk (__dest, __ch, __len, __builtin_object_size (__dest, 0)); 6242: } 6242: 6242: 6242: 6242: 6242: void __explicit_bzero_chk (void *__dest, size_t __len, size_t __destlen) 6242: throw () __attribute__ ((__nonnull__ (1))); 6242: 6242: extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) void 6242: __attribute__ ((__leaf__)) explicit_bzero (void *__dest, size_t __len) throw () 6242: { 6242: __explicit_bzero_chk (__dest, __len, __builtin_object_size (__dest, 0)); 6242: } 6242: 6242: 6242: extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) char * 6242: __attribute__ ((__leaf__)) strcpy (char *__restrict __dest, const char *__restrict __src) throw () 6242: { 6242: return __builtin___strcpy_chk (__dest, __src, __builtin_object_size (__dest, 2 > 1)); 6242: } 6242: 6242: 6242: extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) char * 6242: __attribute__ ((__leaf__)) stpcpy (char *__restrict __dest, const char *__restrict __src) throw () 6242: { 6242: return __builtin___stpcpy_chk (__dest, __src, __builtin_object_size (__dest, 2 > 1)); 6242: } 6242: 6242: 6242: 6242: extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) char * 6242: __attribute__ ((__leaf__)) strncpy (char *__restrict __dest, const char *__restrict __src, size_t __len) throw () 6242: 6242: { 6242: return __builtin___strncpy_chk (__dest, __src, __len, __builtin_object_size (__dest, 2 > 1)); 6242: } 6242: 6242: 6242: extern char *__stpncpy_chk (char *__dest, const char *__src, size_t __n, 6242: size_t __destlen) throw (); 6242: extern char *__stpncpy_alias (char *__dest, const char *__src, size_t __n) throw () __asm__ ("" "stpncpy") 6242: ; 6242: 6242: extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) char * 6242: __attribute__ ((__leaf__)) stpncpy (char *__dest, const char *__src, size_t __n) throw () 6242: { 6242: if (__builtin_object_size (__dest, 2 > 1) != (size_t) -1 6242: && (!__builtin_constant_p (__n) || __n > __builtin_object_size (__dest, 2 > 1))) 6242: return __stpncpy_chk (__dest, __src, __n, __builtin_object_size (__dest, 2 > 1)); 6242: return __stpncpy_alias (__dest, __src, __n); 6242: } 6242: 6242: 6242: extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) char * 6242: __attribute__ ((__leaf__)) strcat (char *__restrict __dest, const char *__restrict __src) throw () 6242: { 6242: return __builtin___strcat_chk (__dest, __src, __builtin_object_size (__dest, 2 > 1)); 6242: } 6242: 6242: 6242: extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) char * 6242: __attribute__ ((__leaf__)) strncat (char *__restrict __dest, const char *__restrict __src, size_t __len) throw () 6242: 6242: { 6242: return __builtin___strncat_chk (__dest, __src, __len, __builtin_object_size (__dest, 2 > 1)); 6242: } 6242: # 495 "/usr/include/string.h" 2 3 4 6242: 6242: 6242: 6242: } 6242: # 12 "string.hh" 2 6242: # 1 "/usr/include/c++/8/climits" 1 3 6242: # 39 "/usr/include/c++/8/climits" 3 6242: 6242: # 40 "/usr/include/c++/8/climits" 3 6242: 6242: 6242: # 1 "/usr/lib/gcc/s390x-linux-gnu/8/include-fixed/limits.h" 1 3 4 6242: # 34 "/usr/lib/gcc/s390x-linux-gnu/8/include-fixed/limits.h" 3 4 6242: # 1 "/usr/lib/gcc/s390x-linux-gnu/8/include-fixed/syslimits.h" 1 3 4 6242: 6242: 6242: 6242: 6242: 6242: 6242: # 1 "/usr/lib/gcc/s390x-linux-gnu/8/include-fixed/limits.h" 1 3 4 6242: # 194 "/usr/lib/gcc/s390x-linux-gnu/8/include-fixed/limits.h" 3 4 6242: # 1 "/usr/include/limits.h" 1 3 4 6242: # 26 "/usr/include/limits.h" 3 4 6242: # 1 "/usr/include/s390x-linux-gnu/bits/libc-header-start.h" 1 3 4 6242: # 27 "/usr/include/limits.h" 2 3 4 6242: # 183 "/usr/include/limits.h" 3 4 6242: # 1 "/usr/include/s390x-linux-gnu/bits/posix1_lim.h" 1 3 4 6242: # 160 "/usr/include/s390x-linux-gnu/bits/posix1_lim.h" 3 4 6242: # 1 "/usr/include/s390x-linux-gnu/bits/local_lim.h" 1 3 4 6242: # 38 "/usr/include/s390x-linux-gnu/bits/local_lim.h" 3 4 6242: # 1 "/usr/include/linux/limits.h" 1 3 4 6242: # 39 "/usr/include/s390x-linux-gnu/bits/local_lim.h" 2 3 4 6242: # 161 "/usr/include/s390x-linux-gnu/bits/posix1_lim.h" 2 3 4 6242: # 184 "/usr/include/limits.h" 2 3 4 6242: 6242: 6242: 6242: # 1 "/usr/include/s390x-linux-gnu/bits/posix2_lim.h" 1 3 4 6242: # 188 "/usr/include/limits.h" 2 3 4 6242: 6242: 6242: 6242: # 1 "/usr/include/s390x-linux-gnu/bits/xopen_lim.h" 1 3 4 6242: # 64 "/usr/include/s390x-linux-gnu/bits/xopen_lim.h" 3 4 6242: # 1 "/usr/include/s390x-linux-gnu/bits/uio_lim.h" 1 3 4 6242: # 65 "/usr/include/s390x-linux-gnu/bits/xopen_lim.h" 2 3 4 6242: # 192 "/usr/include/limits.h" 2 3 4 6242: # 195 "/usr/lib/gcc/s390x-linux-gnu/8/include-fixed/limits.h" 2 3 4 6242: # 8 "/usr/lib/gcc/s390x-linux-gnu/8/include-fixed/syslimits.h" 2 3 4 6242: # 35 "/usr/lib/gcc/s390x-linux-gnu/8/include-fixed/limits.h" 2 3 4 6242: # 43 "/usr/include/c++/8/climits" 2 3 6242: # 13 "string.hh" 2 6242: 6242: 6242: # 14 "string.hh" 6242: namespace Kakoune 6242: { 6242: 6242: class StringView; 6242: 6242: template 6242: class StringOps 6242: { 6242: public: 6242: using value_type = CharType; 6242: 6242: friend inline size_t hash_value(const Type& str) 6242: { 6242: return hash_data(str.data(), (int)str.length()); 6242: } 6242: 6242: using iterator = CharType*; 6242: using const_iterator = const CharType*; 6242: using reverse_iterator = std::reverse_iterator; 6242: using const_reverse_iterator = std::reverse_iterator; 6242: 6242: [[gnu::always_inline]] 6242: iterator begin() { return type().data(); } 6242: 6242: [[gnu::always_inline]] 6242: const_iterator begin() const { return type().data(); } 6242: 6242: [[gnu::always_inline]] 6242: iterator end() { return type().data() + (int)type().length(); } 6242: 6242: [[gnu::always_inline]] 6242: const_iterator end() const { return type().data() + (int)type().length(); } 6242: 6242: reverse_iterator rbegin() { return reverse_iterator{end()}; } 6242: const_reverse_iterator rbegin() const { return const_reverse_iterator{end()}; } 6242: 6242: reverse_iterator rend() { return reverse_iterator{begin()}; } 6242: const_reverse_iterator rend() const { return const_reverse_iterator{begin()}; } 6242: 6242: CharType& front() { return *type().data(); } 6242: const CharType& front() const { return *type().data(); } 6242: CharType& back() { return type().data()[(int)type().length() - 1]; } 6242: const CharType& back() const { return type().data()[(int)type().length() - 1]; } 6242: 6242: [[gnu::always_inline]] 6242: CharType& operator[](ByteCount pos) { return type().data()[(int)pos]; } 6242: 6242: [[gnu::always_inline]] 6242: const CharType& operator[](ByteCount pos) const { return type().data()[(int)pos]; } 6242: 6242: Codepoint operator[](CharCount pos) const 6242: { return utf8::codepoint(utf8::advance(begin(), end(), pos), end()); } 6242: 6242: CharCount char_length() const { return utf8::distance(begin(), end()); } 6242: ColumnCount column_length() const { return utf8::column_distance(begin(), end()); } 6242: 6242: [[gnu::always_inline]] 6242: bool empty() const { return type().length() == 0_byte; } 6242: 6242: ByteCount byte_count_to(CharCount count) const 6242: { return utf8::advance(begin(), end(), count) - begin(); } 6242: 6242: ByteCount byte_count_to(ColumnCount count) const 6242: { return utf8::advance(begin(), end(), count) - begin(); } 6242: 6242: CharCount char_count_to(ByteCount count) const 6242: { return utf8::distance(begin(), begin() + (int)count); } 6242: 6242: ColumnCount column_count_to(ByteCount count) const 6242: { return utf8::column_distance(begin(), begin() + (int)count); } 6242: 6242: StringView substr(ByteCount from, ByteCount length = 0x7fffffff) const; 6242: StringView substr(CharCount from, CharCount length = 0x7fffffff) const; 6242: StringView substr(ColumnCount from, ColumnCount length = 0x7fffffff) const; 6242: 6242: private: 6242: [[gnu::always_inline]] 6242: Type& type() { return *static_cast(this); } 6242: [[gnu::always_inline]] 6242: const Type& type() const { return *static_cast(this); } 6242: }; 6242: 6242: [[gnu::optimize(3)]] 6242: constexpr ByteCount strlen(const char* s) 6242: { 6242: return *s == 0 ? 0 : strlen(s+1) + 1; 6242: } 6242: 6242: class String : public StringOps 6242: { 6242: public: 6242: String() {} 6242: String(const char* content) : m_data(content, (size_t)strlen(content)) {} 6242: String(const char* content, ByteCount len) : m_data(content, (size_t)len) {} 6242: explicit String(Codepoint cp, CharCount count = 1) 6242: { 6242: reserve(utf8::codepoint_size(cp) * (int)count); 6242: while (count-- > 0) 6242: utf8::dump(std::back_inserter(*this), cp); 6242: } 6242: explicit String(Codepoint cp, ColumnCount count) 6242: { 6242: if (not (count % codepoint_width(cp) == 0)) on_assert_failed("assert failed \"" "count % codepoint_width(cp) == 0" "\" at " "string.hh" ":" "116"); 6242: int cp_count = (int)(count / std::max(codepoint_width(cp), 1_col)); 6242: reserve(utf8::codepoint_size(cp) * cp_count); 6242: while (cp_count-- > 0) 6242: utf8::dump(std::back_inserter(*this), cp); 6242: } 6242: String(const char* begin, const char* end) : m_data(begin, end-begin) {} 6242: 6242: [[gnu::always_inline]] 6242: char* data() { return m_data.data(); } 6242: 6242: [[gnu::always_inline]] 6242: const char* data() const { return m_data.data(); } 6242: 6242: [[gnu::always_inline]] 6242: ByteCount length() const { return m_data.size(); } 6242: 6242: [[gnu::always_inline]] 6242: const char* c_str() const { return m_data.data(); } 6242: 6242: [[gnu::always_inline]] 6242: void append(const char* data, ByteCount count) { m_data.append(data, (size_t)count); } 6242: 6242: void clear() { m_data.clear(); } 6242: 6242: void push_back(char c) { m_data.append(&c, 1); } 6242: void force_size(ByteCount size) { m_data.force_size((size_t)size); } 6242: void reserve(ByteCount size) { m_data.reserve((size_t)size); } 6242: void resize(ByteCount size, char c); 6242: 6242: static const String ms_empty; 6242: static constexpr const char* option_type_name = "str"; 6242: # 156 "string.hh" 6242: union Data 6242: { 6242: using Alloc = Allocator; 6242: 6242: struct Long 6242: { 6242: static constexpr size_t max_capacity = 6242: (size_t)1 << 8 * (sizeof(size_t) - 1); 6242: 6242: char* ptr; 6242: size_t size; 6242: size_t capacity; 6242: } l; 6242: 6242: struct Short 6242: { 6242: static constexpr size_t capacity = sizeof(Long) - 2; 6242: char string[capacity+1]; 6242: unsigned char size; 6242: } s; 6242: 6242: Data() { set_empty(); } 6242: Data(const char* data, size_t size, size_t capacity); 6242: Data(const char* data, size_t size) : Data(data, size, size) {} 6242: Data(const Data& other) : Data{other.data(), other.size()} {} 6242: 6242: ~Data() { release(); } 6242: Data(Data&& other) noexcept; 6242: Data& operator=(const Data& other); 6242: Data& operator=(Data&& other) noexcept; 6242: 6242: bool is_long() const { return (s.size & 1) == 0; } 6242: size_t size() const { return is_long() ? l.size : (s.size >> 1); } 6242: size_t capacity() const { return is_long() ? l.capacity : Short::capacity; } 6242: 6242: const char* data() const { return is_long() ? l.ptr : s.string; } 6242: char* data() { return is_long() ? l.ptr : s.string; } 6242: 6242: template 6242: void reserve(size_t new_capacity); 6242: void set_size(size_t size); 6242: void force_size(size_t new_size); 6242: void append(const char* str, size_t len); 6242: void clear(); 6242: 6242: private: 6242: void release(); 6242: void set_empty() { s.size = 1; } 6242: void set_short(const char* data, size_t size); 6242: }; 6242: 6242: private: 6242: Data m_data; 6242: }; 6242: 6242: class StringView : public StringOps 6242: { 6242: public: 6242: constexpr StringView() = default; 6242: constexpr StringView(const char* data, ByteCount length) 6242: : m_data{data}, m_length{length} {} 6242: constexpr StringView(const char* data) : m_data{data}, m_length{data ? strlen(data) : 0} {} 6242: constexpr StringView(const char* begin, const char* end) : m_data{begin}, m_length{(int)(end - begin)} {} 6242: StringView(const String& str) : m_data{str.data()}, m_length{(int)str.length()} {} 6242: StringView(const char& c) : m_data(&c), m_length(1) {} 6242: StringView(int c) = delete; 6242: StringView(Codepoint c) = delete; 6242: 6242: [[gnu::always_inline]] 6242: constexpr const char* data() const { return m_data; } 6242: 6242: [[gnu::always_inline]] 6242: constexpr ByteCount length() const { return m_length; } 6242: 6242: String str() const { return {m_data, m_length}; } 6242: 6242: struct ZeroTerminatedString 6242: { 6242: ZeroTerminatedString(const char* begin, const char* end) 6242: { 6242: if (*end == '\0') 6242: unowned = begin; 6242: else 6242: owned = String::Data(begin, end - begin); 6242: } 6242: operator const char*() const { return unowned ? unowned : owned.data(); } 6242: 6242: private: 6242: String::Data owned; 6242: const char* unowned = nullptr; 6242: 6242: }; 6242: ZeroTerminatedString zstr() const { return {begin(), end()}; } 6242: 6242: private: 6242: const char* m_data = nullptr; 6242: ByteCount m_length = 0; 6242: }; 6242: 6242: template 6242: inline StringView StringOps::substr(ByteCount from, ByteCount length) const 6242: { 6242: if (length < 0) 6242: length = 0x7fffffff; 6242: const auto str_len = type().length(); 6242: if (not (from >= 0 and from <= str_len)) on_assert_failed("assert failed \"" "from >= 0 and from <= str_len" "\" at " "string.hh" ":" "261"); 6242: return StringView{ type().data() + (int)from, std::min(str_len - from, length) }; 6242: } 6242: 6242: template 6242: inline StringView StringOps::substr(CharCount from, CharCount length) const 6242: { 6242: if (length < 0) 6242: length = 0x7fffffff; 6242: auto beg = utf8::advance(begin(), end(), from); 6242: return StringView{ beg, utf8::advance(beg, end(), length) }; 6242: } 6242: 6242: template 6242: inline StringView StringOps::substr(ColumnCount from, ColumnCount length) const 6242: { 6242: if (length < 0) 6242: length = 0x7fffffff; 6242: auto beg = utf8::advance(begin(), end(), from); 6242: return StringView{ beg, utf8::advance(beg, end(), length) }; 6242: } 6242: 6242: inline String& operator+=(String& lhs, StringView rhs) 6242: { 6242: lhs.append(rhs.data(), rhs.length()); 6242: return lhs; 6242: } 6242: 6242: inline String operator+(StringView lhs, StringView rhs) 6242: { 6242: String res; 6242: res.reserve(lhs.length() + rhs.length()); 6242: res.append(lhs.data(), lhs.length()); 6242: res.append(rhs.data(), rhs.length()); 6242: return res; 6242: } 6242: 6242: [[gnu::always_inline]] 6242: inline bool operator==(const StringView& lhs, const StringView& rhs) 6242: { 6242: return lhs.length() == rhs.length() and 6242: std::equal(lhs.begin(), lhs.end(), rhs.begin()); 6242: } 6242: 6242: [[gnu::always_inline]] 6242: inline bool operator!=(const StringView& lhs, const StringView& rhs) 6242: { return not (lhs == rhs); } 6242: 6242: inline bool operator<(const StringView& lhs, const StringView& rhs) 6242: { 6242: return std::lexicographical_compare(lhs.begin(), lhs.end(), 6242: rhs.begin(), rhs.end()); 6242: } 6242: 6242: inline String operator"" _str(const char* str, size_t) 6242: { 6242: return String(str); 6242: } 6242: 6242: Vector split(StringView str, char separator, char escape); 6242: Vector split(StringView str, char separator); 6242: 6242: String escape(StringView str, StringView characters, char escape); 6242: String unescape(StringView str, StringView characters, char escape); 6242: 6242: String indent(StringView str, StringView indent = " "); 6242: 6242: String replace(StringView str, StringView substr, StringView replacement); 6242: 6242: template 6242: String join(const Container& container, char joiner, bool esc_joiner = true) 6242: { 6242: const char to_escape[2] = { joiner, '\\' }; 6242: String res; 6242: for (const auto& str : container) 6242: { 6242: if (not res.empty()) 6242: res += joiner; 6242: res += esc_joiner ? escape(str, {to_escape, 2}, '\\') : str; 6242: } 6242: return res; 6242: } 6242: 6242: inline bool prefix_match(StringView str, StringView prefix) 6242: { 6242: return str.substr(0_byte, prefix.length()) == prefix; 6242: } 6242: 6242: bool subsequence_match(StringView str, StringView subseq); 6242: 6242: String expand_tabs(StringView line, ColumnCount tabstop, ColumnCount col = 0); 6242: 6242: Vector wrap_lines(StringView text, ColumnCount max_width); 6242: 6242: int str_to_int(StringView str); 6242: Optional str_to_int_ifp(StringView str); 6242: 6242: inline String option_to_string(StringView opt) { return opt.str(); } 6242: inline void option_from_string(StringView str, String& opt) { opt = str.str(); } 6242: inline bool option_add(String& opt, StringView val) { opt += val; return not val.empty(); } 6242: 6242: template 6242: struct InplaceString 6242: { 6242: static_assert(N < 256, "InplaceString cannot handle sizes >= 256"); 6242: 6242: constexpr operator StringView() const { return {m_data, ByteCount{m_length}}; } 6242: operator String() const { return {m_data, ByteCount{m_length}}; } 6242: 6242: unsigned char m_length; 6242: char m_data[N]; 6242: }; 6242: 6242: struct Hex { size_t val; }; 6242: inline Hex hex(size_t val) { return {val}; } 6242: 6242: InplaceString<15> to_string(int val); 6242: InplaceString<23> to_string(long int val); 6242: InplaceString<23> to_string(size_t val); 6242: InplaceString<23> to_string(long long int val); 6242: InplaceString<23> to_string(Hex val); 6242: InplaceString<23> to_string(float val); 6242: InplaceString<7> to_string(Codepoint c); 6242: 6242: template 6242: decltype(to_string(std::declval())) 6242: to_string(const StronglyTypedNumber& val) 6242: { 6242: return to_string((ValueType)val); 6242: } 6242: 6242: namespace detail 6242: { 6242: 6242: template using IsString = std::is_convertible; 6242: 6242: template::value>::type> 6242: auto format_param(const T& val) -> decltype(to_string(val)) { return to_string(val); } 6242: 6242: template::value>::type> 6242: StringView format_param(const T& val) { return val; } 6242: 6242: } 6242: 6242: String format(StringView fmt, ArrayView params); 6242: 6242: template 6242: String format(StringView fmt, Types... params) 6242: { 6242: return format(fmt, ArrayView{detail::format_param(params)...}); 6242: } 6242: 6242: StringView format_to(ArrayView buffer, StringView fmt, ArrayView params); 6242: 6242: template 6242: StringView format_to(ArrayView buffer, StringView fmt, Types... params) 6242: { 6242: return format_to(buffer, fmt, ArrayView{detail::format_param(params)...}); 6242: } 6242: 6242: } 6242: # 7 "normal.hh" 2 6242: 6242: namespace Kakoune 6242: { 6242: 6242: class Context; 6242: 6242: struct NormalParams 6242: { 6242: int count; 6242: char reg; 6242: }; 6242: 6242: struct NormalCmdDesc 6242: { 6242: Key key; 6242: StringView docstring; 6242: void (*func)(Context& context, NormalParams params); 6242: }; 6242: 6242: using KeyMap = const ArrayView; 6242: extern KeyMap keymap; 6242: 6242: } 6242: # 2 "normal.cc" 2 6242: 6242: # 1 "buffer.hh" 1 6242: 6242: 6242: 6242: # 1 "clock.hh" 1 6242: 6242: 6242: 6242: # 1 "/usr/include/c++/8/chrono" 1 3 6242: # 32 "/usr/include/c++/8/chrono" 3 6242: 6242: # 33 "/usr/include/c++/8/chrono" 3 6242: 6242: 6242: 6242: 6242: 6242: # 1 "/usr/include/c++/8/ratio" 1 3 6242: # 32 "/usr/include/c++/8/ratio" 3 6242: 6242: # 33 "/usr/include/c++/8/ratio" 3 6242: # 43 "/usr/include/c++/8/ratio" 3 6242: 6242: # 43 "/usr/include/c++/8/ratio" 3 6242: namespace std __attribute__ ((__visibility__ ("default"))) 6242: { 6242: 6242: # 55 "/usr/include/c++/8/ratio" 3 6242: template 6242: struct __static_sign 6242: : integral_constant 6242: { }; 6242: 6242: template 6242: struct __static_abs 6242: : integral_constant::value> 6242: { }; 6242: 6242: template 6242: struct __static_gcd 6242: : __static_gcd<_Qn, (_Pn % _Qn)> 6242: { }; 6242: 6242: template 6242: struct __static_gcd<_Pn, 0> 6242: : integral_constant::value> 6242: { }; 6242: 6242: template 6242: struct __static_gcd<0, _Qn> 6242: : integral_constant::value> 6242: { }; 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: template 6242: struct __safe_multiply 6242: { 6242: private: 6242: static const uintmax_t __c = uintmax_t(1) << (sizeof(intmax_t) * 4); 6242: 6242: static const uintmax_t __a0 = __static_abs<_Pn>::value % __c; 6242: static const uintmax_t __a1 = __static_abs<_Pn>::value / __c; 6242: static const uintmax_t __b0 = __static_abs<_Qn>::value % __c; 6242: static const uintmax_t __b1 = __static_abs<_Qn>::value / __c; 6242: 6242: static_assert(__a1 == 0 || __b1 == 0, 6242: "overflow in multiplication"); 6242: static_assert(__a0 * __b1 + __b0 * __a1 < (__c >> 1), 6242: "overflow in multiplication"); 6242: static_assert(__b0 * __a0 <= 0x7fffffffffffffffL, 6242: "overflow in multiplication"); 6242: static_assert((__a0 * __b1 + __b0 * __a1) * __c 6242: <= 0x7fffffffffffffffL - __b0 * __a0, 6242: "overflow in multiplication"); 6242: 6242: public: 6242: static const intmax_t value = _Pn * _Qn; 6242: }; 6242: 6242: 6242: 6242: template 6242: struct __big_less 6242: : integral_constant 6242: { }; 6242: 6242: template 6242: struct __big_add 6242: { 6242: static constexpr uintmax_t __lo = __lo1 + __lo2; 6242: static constexpr uintmax_t __hi = (__hi1 + __hi2 + 6242: (__lo1 + __lo2 < __lo1)); 6242: }; 6242: 6242: 6242: template 6242: struct __big_sub 6242: { 6242: static_assert(!__big_less<__hi1, __lo1, __hi2, __lo2>::value, 6242: "Internal library error"); 6242: static constexpr uintmax_t __lo = __lo1 - __lo2; 6242: static constexpr uintmax_t __hi = (__hi1 - __hi2 - 6242: (__lo1 < __lo2)); 6242: }; 6242: 6242: 6242: template 6242: struct __big_mul 6242: { 6242: private: 6242: static constexpr uintmax_t __c = uintmax_t(1) << (sizeof(intmax_t) * 4); 6242: static constexpr uintmax_t __x0 = __x % __c; 6242: static constexpr uintmax_t __x1 = __x / __c; 6242: static constexpr uintmax_t __y0 = __y % __c; 6242: static constexpr uintmax_t __y1 = __y / __c; 6242: static constexpr uintmax_t __x0y0 = __x0 * __y0; 6242: static constexpr uintmax_t __x0y1 = __x0 * __y1; 6242: static constexpr uintmax_t __x1y0 = __x1 * __y0; 6242: static constexpr uintmax_t __x1y1 = __x1 * __y1; 6242: static constexpr uintmax_t __mix = __x0y1 + __x1y0; 6242: static constexpr uintmax_t __mix_lo = __mix * __c; 6242: static constexpr uintmax_t __mix_hi 6242: = __mix / __c + ((__mix < __x0y1) ? __c : 0); 6242: typedef __big_add<__mix_hi, __mix_lo, __x1y1, __x0y0> _Res; 6242: public: 6242: static constexpr uintmax_t __hi = _Res::__hi; 6242: static constexpr uintmax_t __lo = _Res::__lo; 6242: }; 6242: 6242: 6242: 6242: template 6242: struct __big_div_impl 6242: { 6242: private: 6242: static_assert(__d >= (uintmax_t(1) << (sizeof(intmax_t) * 8 - 1)), 6242: "Internal library error"); 6242: static_assert(__n1 < __d, "Internal library error"); 6242: static constexpr uintmax_t __c = uintmax_t(1) << (sizeof(intmax_t) * 4); 6242: static constexpr uintmax_t __d1 = __d / __c; 6242: static constexpr uintmax_t __d0 = __d % __c; 6242: 6242: static constexpr uintmax_t __q1x = __n1 / __d1; 6242: static constexpr uintmax_t __r1x = __n1 % __d1; 6242: static constexpr uintmax_t __m = __q1x * __d0; 6242: static constexpr uintmax_t __r1y = __r1x * __c + __n0 / __c; 6242: static constexpr uintmax_t __r1z = __r1y + __d; 6242: static constexpr uintmax_t __r1 6242: = ((__r1y < __m) ? ((__r1z >= __d) && (__r1z < __m)) 6242: ? (__r1z + __d) : __r1z : __r1y) - __m; 6242: static constexpr uintmax_t __q1 6242: = __q1x - ((__r1y < __m) 6242: ? ((__r1z >= __d) && (__r1z < __m)) ? 2 : 1 : 0); 6242: static constexpr uintmax_t __q0x = __r1 / __d1; 6242: static constexpr uintmax_t __r0x = __r1 % __d1; 6242: static constexpr uintmax_t __n = __q0x * __d0; 6242: static constexpr uintmax_t __r0y = __r0x * __c + __n0 % __c; 6242: static constexpr uintmax_t __r0z = __r0y + __d; 6242: static constexpr uintmax_t __r0 6242: = ((__r0y < __n) ? ((__r0z >= __d) && (__r0z < __n)) 6242: ? (__r0z + __d) : __r0z : __r0y) - __n; 6242: static constexpr uintmax_t __q0 6242: = __q0x - ((__r0y < __n) ? ((__r0z >= __d) 6242: && (__r0z < __n)) ? 2 : 1 : 0); 6242: 6242: public: 6242: static constexpr uintmax_t __quot = __q1 * __c + __q0; 6242: static constexpr uintmax_t __rem = __r0; 6242: 6242: private: 6242: typedef __big_mul<__quot, __d> _Prod; 6242: typedef __big_add<_Prod::__hi, _Prod::__lo, 0, __rem> _Sum; 6242: static_assert(_Sum::__hi == __n1 && _Sum::__lo == __n0, 6242: "Internal library error"); 6242: }; 6242: 6242: template 6242: struct __big_div 6242: { 6242: private: 6242: static_assert(__d != 0, "Internal library error"); 6242: static_assert(sizeof (uintmax_t) == sizeof (unsigned long long), 6242: "This library calls __builtin_clzll on uintmax_t, which " 6242: "is unsafe on your platform. Please complain to " 6242: "http://gcc.gnu.org/bugzilla/"); 6242: static constexpr int __shift = __builtin_clzll(__d); 6242: static constexpr int __coshift_ = sizeof(uintmax_t) * 8 - __shift; 6242: static constexpr int __coshift = (__shift != 0) ? __coshift_ : 0; 6242: static constexpr uintmax_t __c1 = uintmax_t(1) << __shift; 6242: static constexpr uintmax_t __c2 = uintmax_t(1) << __coshift; 6242: static constexpr uintmax_t __new_d = __d * __c1; 6242: static constexpr uintmax_t __new_n0 = __n0 * __c1; 6242: static constexpr uintmax_t __n1_shifted = (__n1 % __d) * __c1; 6242: static constexpr uintmax_t __n0_top = (__shift != 0) ? (__n0 / __c2) : 0; 6242: static constexpr uintmax_t __new_n1 = __n1_shifted + __n0_top; 6242: typedef __big_div_impl<__new_n1, __new_n0, __new_d> _Res; 6242: 6242: public: 6242: static constexpr uintmax_t __quot_hi = __n1 / __d; 6242: static constexpr uintmax_t __quot_lo = _Res::__quot; 6242: static constexpr uintmax_t __rem = _Res::__rem / __c1; 6242: 6242: private: 6242: typedef __big_mul<__quot_lo, __d> _P0; 6242: typedef __big_mul<__quot_hi, __d> _P1; 6242: typedef __big_add<_P0::__hi, _P0::__lo, _P1::__lo, __rem> _Sum; 6242: 6242: static_assert(_P1::__hi == 0, "Internal library error"); 6242: static_assert(_Sum::__hi >= _P0::__hi, "Internal library error"); 6242: 6242: static_assert(_Sum::__hi == __n1 && _Sum::__lo == __n0, 6242: "Internal library error"); 6242: static_assert(__rem < __d, "Internal library error"); 6242: }; 6242: # 262 "/usr/include/c++/8/ratio" 3 6242: template 6242: struct ratio 6242: { 6242: static_assert(_Den != 0, "denominator cannot be zero"); 6242: static_assert(_Num >= -0x7fffffffffffffffL && _Den >= -0x7fffffffffffffffL, 6242: "out of range"); 6242: 6242: 6242: static constexpr intmax_t num = 6242: _Num * __static_sign<_Den>::value / __static_gcd<_Num, _Den>::value; 6242: 6242: static constexpr intmax_t den = 6242: __static_abs<_Den>::value / __static_gcd<_Num, _Den>::value; 6242: 6242: typedef ratio type; 6242: }; 6242: 6242: template 6242: constexpr intmax_t ratio<_Num, _Den>::num; 6242: 6242: template 6242: constexpr intmax_t ratio<_Num, _Den>::den; 6242: 6242: template 6242: struct __ratio_multiply 6242: { 6242: private: 6242: static const intmax_t __gcd1 = 6242: __static_gcd<_R1::num, _R2::den>::value; 6242: static const intmax_t __gcd2 = 6242: __static_gcd<_R2::num, _R1::den>::value; 6242: 6242: public: 6242: typedef ratio< 6242: __safe_multiply<(_R1::num / __gcd1), 6242: (_R2::num / __gcd2)>::value, 6242: __safe_multiply<(_R1::den / __gcd2), 6242: (_R2::den / __gcd1)>::value> type; 6242: 6242: static constexpr intmax_t num = type::num; 6242: static constexpr intmax_t den = type::den; 6242: }; 6242: 6242: template 6242: constexpr intmax_t __ratio_multiply<_R1, _R2>::num; 6242: 6242: template 6242: constexpr intmax_t __ratio_multiply<_R1, _R2>::den; 6242: 6242: 6242: template 6242: using ratio_multiply = typename __ratio_multiply<_R1, _R2>::type; 6242: 6242: template 6242: struct __ratio_divide 6242: { 6242: static_assert(_R2::num != 0, "division by 0"); 6242: 6242: typedef typename __ratio_multiply< 6242: _R1, 6242: ratio<_R2::den, _R2::num>>::type type; 6242: 6242: static constexpr intmax_t num = type::num; 6242: static constexpr intmax_t den = type::den; 6242: }; 6242: 6242: template 6242: constexpr intmax_t __ratio_divide<_R1, _R2>::num; 6242: 6242: template 6242: constexpr intmax_t __ratio_divide<_R1, _R2>::den; 6242: 6242: 6242: template 6242: using ratio_divide = typename __ratio_divide<_R1, _R2>::type; 6242: 6242: 6242: template 6242: struct ratio_equal 6242: : integral_constant 6242: { }; 6242: 6242: 6242: template 6242: struct ratio_not_equal 6242: : integral_constant::value> 6242: { }; 6242: 6242: 6242: template, 6242: typename _Right = __big_mul<_R2::num,_R1::den> > 6242: struct __ratio_less_impl_1 6242: : integral_constant::value> 6242: { }; 6242: 6242: template::value 6242: != __static_sign<_R2::num>::value)), 6242: bool = (__static_sign<_R1::num>::value == -1 6242: && __static_sign<_R2::num>::value == -1)> 6242: struct __ratio_less_impl 6242: : __ratio_less_impl_1<_R1, _R2>::type 6242: { }; 6242: 6242: template 6242: struct __ratio_less_impl<_R1, _R2, true, false> 6242: : integral_constant 6242: { }; 6242: 6242: template 6242: struct __ratio_less_impl<_R1, _R2, false, true> 6242: : __ratio_less_impl_1, 6242: ratio<-_R1::num, _R1::den> >::type 6242: { }; 6242: 6242: 6242: template 6242: struct ratio_less 6242: : __ratio_less_impl<_R1, _R2>::type 6242: { }; 6242: 6242: 6242: template 6242: struct ratio_less_equal 6242: : integral_constant::value> 6242: { }; 6242: 6242: 6242: template 6242: struct ratio_greater 6242: : integral_constant::value> 6242: { }; 6242: 6242: 6242: template 6242: struct ratio_greater_equal 6242: : integral_constant::value> 6242: { }; 6242: # 421 "/usr/include/c++/8/ratio" 3 6242: template= 0), 6242: bool = (_R2::num >= 0), 6242: bool = ratio_less::value, _R1::den>, 6242: ratio<__static_abs<_R2::num>::value, _R2::den> >::value> 6242: struct __ratio_add_impl 6242: { 6242: private: 6242: typedef typename __ratio_add_impl< 6242: ratio<-_R1::num, _R1::den>, 6242: ratio<-_R2::num, _R2::den> >::type __t; 6242: public: 6242: typedef ratio<-__t::num, __t::den> type; 6242: }; 6242: 6242: 6242: template 6242: struct __ratio_add_impl<_R1, _R2, true, true, __b> 6242: { 6242: private: 6242: static constexpr uintmax_t __g = __static_gcd<_R1::den, _R2::den>::value; 6242: static constexpr uintmax_t __d2 = _R2::den / __g; 6242: typedef __big_mul<_R1::den, __d2> __d; 6242: typedef __big_mul<_R1::num, _R2::den / __g> __x; 6242: typedef __big_mul<_R2::num, _R1::den / __g> __y; 6242: typedef __big_add<__x::__hi, __x::__lo, __y::__hi, __y::__lo> __n; 6242: static_assert(__n::__hi >= __x::__hi, "Internal library error"); 6242: typedef __big_div<__n::__hi, __n::__lo, __g> __ng; 6242: static constexpr uintmax_t __g2 = __static_gcd<__ng::__rem, __g>::value; 6242: typedef __big_div<__n::__hi, __n::__lo, __g2> __n_final; 6242: static_assert(__n_final::__rem == 0, "Internal library error"); 6242: static_assert(__n_final::__quot_hi == 0 && 6242: __n_final::__quot_lo <= 0x7fffffffffffffffL, "overflow in addition"); 6242: typedef __big_mul<_R1::den / __g2, __d2> __d_final; 6242: static_assert(__d_final::__hi == 0 && 6242: __d_final::__lo <= 0x7fffffffffffffffL, "overflow in addition"); 6242: public: 6242: typedef ratio<__n_final::__quot_lo, __d_final::__lo> type; 6242: }; 6242: 6242: template 6242: struct __ratio_add_impl<_R1, _R2, false, true, true> 6242: : __ratio_add_impl<_R2, _R1> 6242: { }; 6242: 6242: 6242: template 6242: struct __ratio_add_impl<_R1, _R2, true, false, false> 6242: { 6242: private: 6242: static constexpr uintmax_t __g = __static_gcd<_R1::den, _R2::den>::value; 6242: static constexpr uintmax_t __d2 = _R2::den / __g; 6242: typedef __big_mul<_R1::den, __d2> __d; 6242: typedef __big_mul<_R1::num, _R2::den / __g> __x; 6242: typedef __big_mul<-_R2::num, _R1::den / __g> __y; 6242: typedef __big_sub<__x::__hi, __x::__lo, __y::__hi, __y::__lo> __n; 6242: typedef __big_div<__n::__hi, __n::__lo, __g> __ng; 6242: static constexpr uintmax_t __g2 = __static_gcd<__ng::__rem, __g>::value; 6242: typedef __big_div<__n::__hi, __n::__lo, __g2> __n_final; 6242: static_assert(__n_final::__rem == 0, "Internal library error"); 6242: static_assert(__n_final::__quot_hi == 0 && 6242: __n_final::__quot_lo <= 0x7fffffffffffffffL, "overflow in addition"); 6242: typedef __big_mul<_R1::den / __g2, __d2> __d_final; 6242: static_assert(__d_final::__hi == 0 && 6242: __d_final::__lo <= 0x7fffffffffffffffL, "overflow in addition"); 6242: public: 6242: typedef ratio<__n_final::__quot_lo, __d_final::__lo> type; 6242: }; 6242: 6242: template 6242: struct __ratio_add 6242: { 6242: typedef typename __ratio_add_impl<_R1, _R2>::type type; 6242: static constexpr intmax_t num = type::num; 6242: static constexpr intmax_t den = type::den; 6242: }; 6242: 6242: template 6242: constexpr intmax_t __ratio_add<_R1, _R2>::num; 6242: 6242: template 6242: constexpr intmax_t __ratio_add<_R1, _R2>::den; 6242: 6242: 6242: template 6242: using ratio_add = typename __ratio_add<_R1, _R2>::type; 6242: 6242: template 6242: struct __ratio_subtract 6242: { 6242: typedef typename __ratio_add< 6242: _R1, 6242: ratio<-_R2::num, _R2::den>>::type type; 6242: 6242: static constexpr intmax_t num = type::num; 6242: static constexpr intmax_t den = type::den; 6242: }; 6242: 6242: template 6242: constexpr intmax_t __ratio_subtract<_R1, _R2>::num; 6242: 6242: template 6242: constexpr intmax_t __ratio_subtract<_R1, _R2>::den; 6242: 6242: 6242: template 6242: using ratio_subtract = typename __ratio_subtract<_R1, _R2>::type; 6242: 6242: 6242: typedef ratio<1, 1000000000000000000> atto; 6242: typedef ratio<1, 1000000000000000> femto; 6242: typedef ratio<1, 1000000000000> pico; 6242: typedef ratio<1, 1000000000> nano; 6242: typedef ratio<1, 1000000> micro; 6242: typedef ratio<1, 1000> milli; 6242: typedef ratio<1, 100> centi; 6242: typedef ratio<1, 10> deci; 6242: typedef ratio< 10, 1> deca; 6242: typedef ratio< 100, 1> hecto; 6242: typedef ratio< 1000, 1> kilo; 6242: typedef ratio< 1000000, 1> mega; 6242: typedef ratio< 1000000000, 1> giga; 6242: typedef ratio< 1000000000000, 1> tera; 6242: typedef ratio< 1000000000000000, 1> peta; 6242: typedef ratio< 1000000000000000000, 1> exa; 6242: 6242: 6242: 6242: } 6242: # 39 "/usr/include/c++/8/chrono" 2 3 6242: 6242: # 1 "/usr/include/c++/8/limits" 1 3 6242: # 40 "/usr/include/c++/8/limits" 3 6242: 6242: # 41 "/usr/include/c++/8/limits" 3 6242: # 158 "/usr/include/c++/8/limits" 3 6242: namespace std __attribute__ ((__visibility__ ("default"))) 6242: { 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: enum float_round_style 6242: { 6242: round_indeterminate = -1, 6242: round_toward_zero = 0, 6242: round_to_nearest = 1, 6242: round_toward_infinity = 2, 6242: round_toward_neg_infinity = 3 6242: }; 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: enum float_denorm_style 6242: { 6242: 6242: denorm_indeterminate = -1, 6242: 6242: denorm_absent = 0, 6242: 6242: denorm_present = 1 6242: }; 6242: # 202 "/usr/include/c++/8/limits" 3 6242: struct __numeric_limits_base 6242: { 6242: 6242: 6242: static constexpr bool is_specialized = false; 6242: 6242: 6242: 6242: 6242: static constexpr int digits = 0; 6242: 6242: 6242: static constexpr int digits10 = 0; 6242: 6242: 6242: 6242: 6242: static constexpr int max_digits10 = 0; 6242: 6242: 6242: 6242: static constexpr bool is_signed = false; 6242: 6242: 6242: static constexpr bool is_integer = false; 6242: 6242: 6242: 6242: 6242: static constexpr bool is_exact = false; 6242: 6242: 6242: 6242: static constexpr int radix = 0; 6242: 6242: 6242: 6242: static constexpr int min_exponent = 0; 6242: 6242: 6242: 6242: static constexpr int min_exponent10 = 0; 6242: 6242: 6242: 6242: 6242: static constexpr int max_exponent = 0; 6242: 6242: 6242: 6242: static constexpr int max_exponent10 = 0; 6242: 6242: 6242: static constexpr bool has_infinity = false; 6242: 6242: 6242: 6242: static constexpr bool has_quiet_NaN = false; 6242: 6242: 6242: 6242: static constexpr bool has_signaling_NaN = false; 6242: 6242: 6242: static constexpr float_denorm_style has_denorm = denorm_absent; 6242: 6242: 6242: 6242: static constexpr bool has_denorm_loss = false; 6242: 6242: 6242: 6242: static constexpr bool is_iec559 = false; 6242: 6242: 6242: 6242: 6242: static constexpr bool is_bounded = false; 6242: # 288 "/usr/include/c++/8/limits" 3 6242: static constexpr bool is_modulo = false; 6242: 6242: 6242: static constexpr bool traps = false; 6242: 6242: 6242: static constexpr bool tinyness_before = false; 6242: 6242: 6242: 6242: 6242: static constexpr float_round_style round_style = 6242: round_toward_zero; 6242: }; 6242: # 311 "/usr/include/c++/8/limits" 3 6242: template 6242: struct numeric_limits : public __numeric_limits_base 6242: { 6242: 6242: 6242: static constexpr _Tp 6242: min() noexcept { return _Tp(); } 6242: 6242: 6242: static constexpr _Tp 6242: max() noexcept { return _Tp(); } 6242: 6242: 6242: 6242: 6242: static constexpr _Tp 6242: lowest() noexcept { return _Tp(); } 6242: 6242: 6242: 6242: 6242: static constexpr _Tp 6242: epsilon() noexcept { return _Tp(); } 6242: 6242: 6242: static constexpr _Tp 6242: round_error() noexcept { return _Tp(); } 6242: 6242: 6242: static constexpr _Tp 6242: infinity() noexcept { return _Tp(); } 6242: 6242: 6242: 6242: static constexpr _Tp 6242: quiet_NaN() noexcept { return _Tp(); } 6242: 6242: 6242: 6242: static constexpr _Tp 6242: signaling_NaN() noexcept { return _Tp(); } 6242: 6242: 6242: 6242: 6242: static constexpr _Tp 6242: denorm_min() noexcept { return _Tp(); } 6242: }; 6242: 6242: 6242: 6242: 6242: template 6242: struct numeric_limits 6242: : public numeric_limits<_Tp> { }; 6242: 6242: template 6242: struct numeric_limits 6242: : public numeric_limits<_Tp> { }; 6242: 6242: template 6242: struct numeric_limits 6242: : public numeric_limits<_Tp> { }; 6242: # 382 "/usr/include/c++/8/limits" 3 6242: template<> 6242: struct numeric_limits 6242: { 6242: static constexpr bool is_specialized = true; 6242: 6242: static constexpr bool 6242: min() noexcept { return false; } 6242: 6242: static constexpr bool 6242: max() noexcept { return true; } 6242: 6242: 6242: static constexpr bool 6242: lowest() noexcept { return min(); } 6242: 6242: static constexpr int digits = 1; 6242: static constexpr int digits10 = 0; 6242: 6242: static constexpr int max_digits10 = 0; 6242: 6242: static constexpr bool is_signed = false; 6242: static constexpr bool is_integer = true; 6242: static constexpr bool is_exact = true; 6242: static constexpr int radix = 2; 6242: 6242: static constexpr bool 6242: epsilon() noexcept { return false; } 6242: 6242: static constexpr bool 6242: round_error() noexcept { return false; } 6242: 6242: static constexpr int min_exponent = 0; 6242: static constexpr int min_exponent10 = 0; 6242: static constexpr int max_exponent = 0; 6242: static constexpr int max_exponent10 = 0; 6242: 6242: static constexpr bool has_infinity = false; 6242: static constexpr bool has_quiet_NaN = false; 6242: static constexpr bool has_signaling_NaN = false; 6242: static constexpr float_denorm_style has_denorm 6242: = denorm_absent; 6242: static constexpr bool has_denorm_loss = false; 6242: 6242: static constexpr bool 6242: infinity() noexcept { return false; } 6242: 6242: static constexpr bool 6242: quiet_NaN() noexcept { return false; } 6242: 6242: static constexpr bool 6242: signaling_NaN() noexcept { return false; } 6242: 6242: static constexpr bool 6242: denorm_min() noexcept { return false; } 6242: 6242: static constexpr bool is_iec559 = false; 6242: static constexpr bool is_bounded = true; 6242: static constexpr bool is_modulo = false; 6242: 6242: 6242: 6242: 6242: static constexpr bool traps = true; 6242: static constexpr bool tinyness_before = false; 6242: static constexpr float_round_style round_style 6242: = round_toward_zero; 6242: }; 6242: 6242: 6242: template<> 6242: struct numeric_limits 6242: { 6242: static constexpr bool is_specialized = true; 6242: 6242: static constexpr char 6242: min() noexcept { return (((char)(-1) < 0) ? -(((char)(-1) < 0) ? (((((char)1 << ((sizeof(char) * 8 - ((char)(-1) < 0)) - 1)) - 1) << 1) + 1) : ~(char)0) - 1 : (char)0); } 6242: 6242: static constexpr char 6242: max() noexcept { return (((char)(-1) < 0) ? (((((char)1 << ((sizeof(char) * 8 - ((char)(-1) < 0)) - 1)) - 1) << 1) + 1) : ~(char)0); } 6242: 6242: 6242: static constexpr char 6242: lowest() noexcept { return min(); } 6242: 6242: 6242: static constexpr int digits = (sizeof(char) * 8 - ((char)(-1) < 0)); 6242: static constexpr int digits10 = ((sizeof(char) * 8 - ((char)(-1) < 0)) * 643L / 2136); 6242: 6242: static constexpr int max_digits10 = 0; 6242: 6242: static constexpr bool is_signed = ((char)(-1) < 0); 6242: static constexpr bool is_integer = true; 6242: static constexpr bool is_exact = true; 6242: static constexpr int radix = 2; 6242: 6242: static constexpr char 6242: epsilon() noexcept { return 0; } 6242: 6242: static constexpr char 6242: round_error() noexcept { return 0; } 6242: 6242: static constexpr int min_exponent = 0; 6242: static constexpr int min_exponent10 = 0; 6242: static constexpr int max_exponent = 0; 6242: static constexpr int max_exponent10 = 0; 6242: 6242: static constexpr bool has_infinity = false; 6242: static constexpr bool has_quiet_NaN = false; 6242: static constexpr bool has_signaling_NaN = false; 6242: static constexpr float_denorm_style has_denorm 6242: = denorm_absent; 6242: static constexpr bool has_denorm_loss = false; 6242: 6242: static constexpr 6242: char infinity() noexcept { return char(); } 6242: 6242: static constexpr char 6242: quiet_NaN() noexcept { return char(); } 6242: 6242: static constexpr char 6242: signaling_NaN() noexcept { return char(); } 6242: 6242: static constexpr char 6242: denorm_min() noexcept { return static_cast(0); } 6242: 6242: static constexpr bool is_iec559 = false; 6242: static constexpr bool is_bounded = true; 6242: static constexpr bool is_modulo = !is_signed; 6242: 6242: static constexpr bool traps = true; 6242: static constexpr bool tinyness_before = false; 6242: static constexpr float_round_style round_style 6242: = round_toward_zero; 6242: }; 6242: 6242: 6242: template<> 6242: struct numeric_limits 6242: { 6242: static constexpr bool is_specialized = true; 6242: 6242: static constexpr signed char 6242: min() noexcept { return -0x7f - 1; } 6242: 6242: static constexpr signed char 6242: max() noexcept { return 0x7f; } 6242: 6242: 6242: static constexpr signed char 6242: lowest() noexcept { return min(); } 6242: 6242: 6242: static constexpr int digits = (sizeof(signed char) * 8 - ((signed char)(-1) < 0)); 6242: static constexpr int digits10 6242: = ((sizeof(signed char) * 8 - ((signed char)(-1) < 0)) * 643L / 2136); 6242: 6242: static constexpr int max_digits10 = 0; 6242: 6242: static constexpr bool is_signed = true; 6242: static constexpr bool is_integer = true; 6242: static constexpr bool is_exact = true; 6242: static constexpr int radix = 2; 6242: 6242: static constexpr signed char 6242: epsilon() noexcept { return 0; } 6242: 6242: static constexpr signed char 6242: round_error() noexcept { return 0; } 6242: 6242: static constexpr int min_exponent = 0; 6242: static constexpr int min_exponent10 = 0; 6242: static constexpr int max_exponent = 0; 6242: static constexpr int max_exponent10 = 0; 6242: 6242: static constexpr bool has_infinity = false; 6242: static constexpr bool has_quiet_NaN = false; 6242: static constexpr bool has_signaling_NaN = false; 6242: static constexpr float_denorm_style has_denorm 6242: = denorm_absent; 6242: static constexpr bool has_denorm_loss = false; 6242: 6242: static constexpr signed char 6242: infinity() noexcept { return static_cast(0); } 6242: 6242: static constexpr signed char 6242: quiet_NaN() noexcept { return static_cast(0); } 6242: 6242: static constexpr signed char 6242: signaling_NaN() noexcept 6242: { return static_cast(0); } 6242: 6242: static constexpr signed char 6242: denorm_min() noexcept 6242: { return static_cast(0); } 6242: 6242: static constexpr bool is_iec559 = false; 6242: static constexpr bool is_bounded = true; 6242: static constexpr bool is_modulo = false; 6242: 6242: static constexpr bool traps = true; 6242: static constexpr bool tinyness_before = false; 6242: static constexpr float_round_style round_style 6242: = round_toward_zero; 6242: }; 6242: 6242: 6242: template<> 6242: struct numeric_limits 6242: { 6242: static constexpr bool is_specialized = true; 6242: 6242: static constexpr unsigned char 6242: min() noexcept { return 0; } 6242: 6242: static constexpr unsigned char 6242: max() noexcept { return 0x7f * 2U + 1; } 6242: 6242: 6242: static constexpr unsigned char 6242: lowest() noexcept { return min(); } 6242: 6242: 6242: static constexpr int digits 6242: = (sizeof(unsigned char) * 8 - ((unsigned char)(-1) < 0)); 6242: static constexpr int digits10 6242: = ((sizeof(unsigned char) * 8 - ((unsigned char)(-1) < 0)) * 643L / 2136); 6242: 6242: static constexpr int max_digits10 = 0; 6242: 6242: static constexpr bool is_signed = false; 6242: static constexpr bool is_integer = true; 6242: static constexpr bool is_exact = true; 6242: static constexpr int radix = 2; 6242: 6242: static constexpr unsigned char 6242: epsilon() noexcept { return 0; } 6242: 6242: static constexpr unsigned char 6242: round_error() noexcept { return 0; } 6242: 6242: static constexpr int min_exponent = 0; 6242: static constexpr int min_exponent10 = 0; 6242: static constexpr int max_exponent = 0; 6242: static constexpr int max_exponent10 = 0; 6242: 6242: static constexpr bool has_infinity = false; 6242: static constexpr bool has_quiet_NaN = false; 6242: static constexpr bool has_signaling_NaN = false; 6242: static constexpr float_denorm_style has_denorm 6242: = denorm_absent; 6242: static constexpr bool has_denorm_loss = false; 6242: 6242: static constexpr unsigned char 6242: infinity() noexcept 6242: { return static_cast(0); } 6242: 6242: static constexpr unsigned char 6242: quiet_NaN() noexcept 6242: { return static_cast(0); } 6242: 6242: static constexpr unsigned char 6242: signaling_NaN() noexcept 6242: { return static_cast(0); } 6242: 6242: static constexpr unsigned char 6242: denorm_min() noexcept 6242: { return static_cast(0); } 6242: 6242: static constexpr bool is_iec559 = false; 6242: static constexpr bool is_bounded = true; 6242: static constexpr bool is_modulo = true; 6242: 6242: static constexpr bool traps = true; 6242: static constexpr bool tinyness_before = false; 6242: static constexpr float_round_style round_style 6242: = round_toward_zero; 6242: }; 6242: 6242: 6242: template<> 6242: struct numeric_limits 6242: { 6242: static constexpr bool is_specialized = true; 6242: 6242: static constexpr wchar_t 6242: min() noexcept { return (((wchar_t)(-1) < 0) ? -(((wchar_t)(-1) < 0) ? (((((wchar_t)1 << ((sizeof(wchar_t) * 8 - ((wchar_t)(-1) < 0)) - 1)) - 1) << 1) + 1) : ~(wchar_t)0) - 1 : (wchar_t)0); } 6242: 6242: static constexpr wchar_t 6242: max() noexcept { return (((wchar_t)(-1) < 0) ? (((((wchar_t)1 << ((sizeof(wchar_t) * 8 - ((wchar_t)(-1) < 0)) - 1)) - 1) << 1) + 1) : ~(wchar_t)0); } 6242: 6242: 6242: static constexpr wchar_t 6242: lowest() noexcept { return min(); } 6242: 6242: 6242: static constexpr int digits = (sizeof(wchar_t) * 8 - ((wchar_t)(-1) < 0)); 6242: static constexpr int digits10 6242: = ((sizeof(wchar_t) * 8 - ((wchar_t)(-1) < 0)) * 643L / 2136); 6242: 6242: static constexpr int max_digits10 = 0; 6242: 6242: static constexpr bool is_signed = ((wchar_t)(-1) < 0); 6242: static constexpr bool is_integer = true; 6242: static constexpr bool is_exact = true; 6242: static constexpr int radix = 2; 6242: 6242: static constexpr wchar_t 6242: epsilon() noexcept { return 0; } 6242: 6242: static constexpr wchar_t 6242: round_error() noexcept { return 0; } 6242: 6242: static constexpr int min_exponent = 0; 6242: static constexpr int min_exponent10 = 0; 6242: static constexpr int max_exponent = 0; 6242: static constexpr int max_exponent10 = 0; 6242: 6242: static constexpr bool has_infinity = false; 6242: static constexpr bool has_quiet_NaN = false; 6242: static constexpr bool has_signaling_NaN = false; 6242: static constexpr float_denorm_style has_denorm 6242: = denorm_absent; 6242: static constexpr bool has_denorm_loss = false; 6242: 6242: static constexpr wchar_t 6242: infinity() noexcept { return wchar_t(); } 6242: 6242: static constexpr wchar_t 6242: quiet_NaN() noexcept { return wchar_t(); } 6242: 6242: static constexpr wchar_t 6242: signaling_NaN() noexcept { return wchar_t(); } 6242: 6242: static constexpr wchar_t 6242: denorm_min() noexcept { return wchar_t(); } 6242: 6242: static constexpr bool is_iec559 = false; 6242: static constexpr bool is_bounded = true; 6242: static constexpr bool is_modulo = !is_signed; 6242: 6242: static constexpr bool traps = true; 6242: static constexpr bool tinyness_before = false; 6242: static constexpr float_round_style round_style 6242: = round_toward_zero; 6242: }; 6242: 6242: 6242: 6242: template<> 6242: struct numeric_limits 6242: { 6242: static constexpr bool is_specialized = true; 6242: 6242: static constexpr char16_t 6242: min() noexcept { return (((char16_t)(-1) < 0) ? -(((char16_t)(-1) < 0) ? (((((char16_t)1 << ((sizeof(char16_t) * 8 - ((char16_t)(-1) < 0)) - 1)) - 1) << 1) + 1) : ~(char16_t)0) - 1 : (char16_t)0); } 6242: 6242: static constexpr char16_t 6242: max() noexcept { return (((char16_t)(-1) < 0) ? (((((char16_t)1 << ((sizeof(char16_t) * 8 - ((char16_t)(-1) < 0)) - 1)) - 1) << 1) + 1) : ~(char16_t)0); } 6242: 6242: static constexpr char16_t 6242: lowest() noexcept { return min(); } 6242: 6242: static constexpr int digits = (sizeof(char16_t) * 8 - ((char16_t)(-1) < 0)); 6242: static constexpr int digits10 = ((sizeof(char16_t) * 8 - ((char16_t)(-1) < 0)) * 643L / 2136); 6242: static constexpr int max_digits10 = 0; 6242: static constexpr bool is_signed = ((char16_t)(-1) < 0); 6242: static constexpr bool is_integer = true; 6242: static constexpr bool is_exact = true; 6242: static constexpr int radix = 2; 6242: 6242: static constexpr char16_t 6242: epsilon() noexcept { return 0; } 6242: 6242: static constexpr char16_t 6242: round_error() noexcept { return 0; } 6242: 6242: static constexpr int min_exponent = 0; 6242: static constexpr int min_exponent10 = 0; 6242: static constexpr int max_exponent = 0; 6242: static constexpr int max_exponent10 = 0; 6242: 6242: static constexpr bool has_infinity = false; 6242: static constexpr bool has_quiet_NaN = false; 6242: static constexpr bool has_signaling_NaN = false; 6242: static constexpr float_denorm_style has_denorm = denorm_absent; 6242: static constexpr bool has_denorm_loss = false; 6242: 6242: static constexpr char16_t 6242: infinity() noexcept { return char16_t(); } 6242: 6242: static constexpr char16_t 6242: quiet_NaN() noexcept { return char16_t(); } 6242: 6242: static constexpr char16_t 6242: signaling_NaN() noexcept { return char16_t(); } 6242: 6242: static constexpr char16_t 6242: denorm_min() noexcept { return char16_t(); } 6242: 6242: static constexpr bool is_iec559 = false; 6242: static constexpr bool is_bounded = true; 6242: static constexpr bool is_modulo = !is_signed; 6242: 6242: static constexpr bool traps = true; 6242: static constexpr bool tinyness_before = false; 6242: static constexpr float_round_style round_style = round_toward_zero; 6242: }; 6242: 6242: 6242: template<> 6242: struct numeric_limits 6242: { 6242: static constexpr bool is_specialized = true; 6242: 6242: static constexpr char32_t 6242: min() noexcept { return (((char32_t)(-1) < 0) ? -(((char32_t)(-1) < 0) ? (((((char32_t)1 << ((sizeof(char32_t) * 8 - ((char32_t)(-1) < 0)) - 1)) - 1) << 1) + 1) : ~(char32_t)0) - 1 : (char32_t)0); } 6242: 6242: static constexpr char32_t 6242: max() noexcept { return (((char32_t)(-1) < 0) ? (((((char32_t)1 << ((sizeof(char32_t) * 8 - ((char32_t)(-1) < 0)) - 1)) - 1) << 1) + 1) : ~(char32_t)0); } 6242: 6242: static constexpr char32_t 6242: lowest() noexcept { return min(); } 6242: 6242: static constexpr int digits = (sizeof(char32_t) * 8 - ((char32_t)(-1) < 0)); 6242: static constexpr int digits10 = ((sizeof(char32_t) * 8 - ((char32_t)(-1) < 0)) * 643L / 2136); 6242: static constexpr int max_digits10 = 0; 6242: static constexpr bool is_signed = ((char32_t)(-1) < 0); 6242: static constexpr bool is_integer = true; 6242: static constexpr bool is_exact = true; 6242: static constexpr int radix = 2; 6242: 6242: static constexpr char32_t 6242: epsilon() noexcept { return 0; } 6242: 6242: static constexpr char32_t 6242: round_error() noexcept { return 0; } 6242: 6242: static constexpr int min_exponent = 0; 6242: static constexpr int min_exponent10 = 0; 6242: static constexpr int max_exponent = 0; 6242: static constexpr int max_exponent10 = 0; 6242: 6242: static constexpr bool has_infinity = false; 6242: static constexpr bool has_quiet_NaN = false; 6242: static constexpr bool has_signaling_NaN = false; 6242: static constexpr float_denorm_style has_denorm = denorm_absent; 6242: static constexpr bool has_denorm_loss = false; 6242: 6242: static constexpr char32_t 6242: infinity() noexcept { return char32_t(); } 6242: 6242: static constexpr char32_t 6242: quiet_NaN() noexcept { return char32_t(); } 6242: 6242: static constexpr char32_t 6242: signaling_NaN() noexcept { return char32_t(); } 6242: 6242: static constexpr char32_t 6242: denorm_min() noexcept { return char32_t(); } 6242: 6242: static constexpr bool is_iec559 = false; 6242: static constexpr bool is_bounded = true; 6242: static constexpr bool is_modulo = !is_signed; 6242: 6242: static constexpr bool traps = true; 6242: static constexpr bool tinyness_before = false; 6242: static constexpr float_round_style round_style = round_toward_zero; 6242: }; 6242: 6242: 6242: 6242: template<> 6242: struct numeric_limits 6242: { 6242: static constexpr bool is_specialized = true; 6242: 6242: static constexpr short 6242: min() noexcept { return -0x7fff - 1; } 6242: 6242: static constexpr short 6242: max() noexcept { return 0x7fff; } 6242: 6242: 6242: static constexpr short 6242: lowest() noexcept { return min(); } 6242: 6242: 6242: static constexpr int digits = (sizeof(short) * 8 - ((short)(-1) < 0)); 6242: static constexpr int digits10 = ((sizeof(short) * 8 - ((short)(-1) < 0)) * 643L / 2136); 6242: 6242: static constexpr int max_digits10 = 0; 6242: 6242: static constexpr bool is_signed = true; 6242: static constexpr bool is_integer = true; 6242: static constexpr bool is_exact = true; 6242: static constexpr int radix = 2; 6242: 6242: static constexpr short 6242: epsilon() noexcept { return 0; } 6242: 6242: static constexpr short 6242: round_error() noexcept { return 0; } 6242: 6242: static constexpr int min_exponent = 0; 6242: static constexpr int min_exponent10 = 0; 6242: static constexpr int max_exponent = 0; 6242: static constexpr int max_exponent10 = 0; 6242: 6242: static constexpr bool has_infinity = false; 6242: static constexpr bool has_quiet_NaN = false; 6242: static constexpr bool has_signaling_NaN = false; 6242: static constexpr float_denorm_style has_denorm 6242: = denorm_absent; 6242: static constexpr bool has_denorm_loss = false; 6242: 6242: static constexpr short 6242: infinity() noexcept { return short(); } 6242: 6242: static constexpr short 6242: quiet_NaN() noexcept { return short(); } 6242: 6242: static constexpr short 6242: signaling_NaN() noexcept { return short(); } 6242: 6242: static constexpr short 6242: denorm_min() noexcept { return short(); } 6242: 6242: static constexpr bool is_iec559 = false; 6242: static constexpr bool is_bounded = true; 6242: static constexpr bool is_modulo = false; 6242: 6242: static constexpr bool traps = true; 6242: static constexpr bool tinyness_before = false; 6242: static constexpr float_round_style round_style 6242: = round_toward_zero; 6242: }; 6242: 6242: 6242: template<> 6242: struct numeric_limits 6242: { 6242: static constexpr bool is_specialized = true; 6242: 6242: static constexpr unsigned short 6242: min() noexcept { return 0; } 6242: 6242: static constexpr unsigned short 6242: max() noexcept { return 0x7fff * 2U + 1; } 6242: 6242: 6242: static constexpr unsigned short 6242: lowest() noexcept { return min(); } 6242: 6242: 6242: static constexpr int digits 6242: = (sizeof(unsigned short) * 8 - ((unsigned short)(-1) < 0)); 6242: static constexpr int digits10 6242: = ((sizeof(unsigned short) * 8 - ((unsigned short)(-1) < 0)) * 643L / 2136); 6242: 6242: static constexpr int max_digits10 = 0; 6242: 6242: static constexpr bool is_signed = false; 6242: static constexpr bool is_integer = true; 6242: static constexpr bool is_exact = true; 6242: static constexpr int radix = 2; 6242: 6242: static constexpr unsigned short 6242: epsilon() noexcept { return 0; } 6242: 6242: static constexpr unsigned short 6242: round_error() noexcept { return 0; } 6242: 6242: static constexpr int min_exponent = 0; 6242: static constexpr int min_exponent10 = 0; 6242: static constexpr int max_exponent = 0; 6242: static constexpr int max_exponent10 = 0; 6242: 6242: static constexpr bool has_infinity = false; 6242: static constexpr bool has_quiet_NaN = false; 6242: static constexpr bool has_signaling_NaN = false; 6242: static constexpr float_denorm_style has_denorm 6242: = denorm_absent; 6242: static constexpr bool has_denorm_loss = false; 6242: 6242: static constexpr unsigned short 6242: infinity() noexcept 6242: { return static_cast(0); } 6242: 6242: static constexpr unsigned short 6242: quiet_NaN() noexcept 6242: { return static_cast(0); } 6242: 6242: static constexpr unsigned short 6242: signaling_NaN() noexcept 6242: { return static_cast(0); } 6242: 6242: static constexpr unsigned short 6242: denorm_min() noexcept 6242: { return static_cast(0); } 6242: 6242: static constexpr bool is_iec559 = false; 6242: static constexpr bool is_bounded = true; 6242: static constexpr bool is_modulo = true; 6242: 6242: static constexpr bool traps = true; 6242: static constexpr bool tinyness_before = false; 6242: static constexpr float_round_style round_style 6242: = round_toward_zero; 6242: }; 6242: 6242: 6242: template<> 6242: struct numeric_limits 6242: { 6242: static constexpr bool is_specialized = true; 6242: 6242: static constexpr int 6242: min() noexcept { return -0x7fffffff - 1; } 6242: 6242: static constexpr int 6242: max() noexcept { return 0x7fffffff; } 6242: 6242: 6242: static constexpr int 6242: lowest() noexcept { return min(); } 6242: 6242: 6242: static constexpr int digits = (sizeof(int) * 8 - ((int)(-1) < 0)); 6242: static constexpr int digits10 = ((sizeof(int) * 8 - ((int)(-1) < 0)) * 643L / 2136); 6242: 6242: static constexpr int max_digits10 = 0; 6242: 6242: static constexpr bool is_signed = true; 6242: static constexpr bool is_integer = true; 6242: static constexpr bool is_exact = true; 6242: static constexpr int radix = 2; 6242: 6242: static constexpr int 6242: epsilon() noexcept { return 0; } 6242: 6242: static constexpr int 6242: round_error() noexcept { return 0; } 6242: 6242: static constexpr int min_exponent = 0; 6242: static constexpr int min_exponent10 = 0; 6242: static constexpr int max_exponent = 0; 6242: static constexpr int max_exponent10 = 0; 6242: 6242: static constexpr bool has_infinity = false; 6242: static constexpr bool has_quiet_NaN = false; 6242: static constexpr bool has_signaling_NaN = false; 6242: static constexpr float_denorm_style has_denorm 6242: = denorm_absent; 6242: static constexpr bool has_denorm_loss = false; 6242: 6242: static constexpr int 6242: infinity() noexcept { return static_cast(0); } 6242: 6242: static constexpr int 6242: quiet_NaN() noexcept { return static_cast(0); } 6242: 6242: static constexpr int 6242: signaling_NaN() noexcept { return static_cast(0); } 6242: 6242: static constexpr int 6242: denorm_min() noexcept { return static_cast(0); } 6242: 6242: static constexpr bool is_iec559 = false; 6242: static constexpr bool is_bounded = true; 6242: static constexpr bool is_modulo = false; 6242: 6242: static constexpr bool traps = true; 6242: static constexpr bool tinyness_before = false; 6242: static constexpr float_round_style round_style 6242: = round_toward_zero; 6242: }; 6242: 6242: 6242: template<> 6242: struct numeric_limits 6242: { 6242: static constexpr bool is_specialized = true; 6242: 6242: static constexpr unsigned int 6242: min() noexcept { return 0; } 6242: 6242: static constexpr unsigned int 6242: max() noexcept { return 0x7fffffff * 2U + 1; } 6242: 6242: 6242: static constexpr unsigned int 6242: lowest() noexcept { return min(); } 6242: 6242: 6242: static constexpr int digits 6242: = (sizeof(unsigned int) * 8 - ((unsigned int)(-1) < 0)); 6242: static constexpr int digits10 6242: = ((sizeof(unsigned int) * 8 - ((unsigned int)(-1) < 0)) * 643L / 2136); 6242: 6242: static constexpr int max_digits10 = 0; 6242: 6242: static constexpr bool is_signed = false; 6242: static constexpr bool is_integer = true; 6242: static constexpr bool is_exact = true; 6242: static constexpr int radix = 2; 6242: 6242: static constexpr unsigned int 6242: epsilon() noexcept { return 0; } 6242: 6242: static constexpr unsigned int 6242: round_error() noexcept { return 0; } 6242: 6242: static constexpr int min_exponent = 0; 6242: static constexpr int min_exponent10 = 0; 6242: static constexpr int max_exponent = 0; 6242: static constexpr int max_exponent10 = 0; 6242: 6242: static constexpr bool has_infinity = false; 6242: static constexpr bool has_quiet_NaN = false; 6242: static constexpr bool has_signaling_NaN = false; 6242: static constexpr float_denorm_style has_denorm 6242: = denorm_absent; 6242: static constexpr bool has_denorm_loss = false; 6242: 6242: static constexpr unsigned int 6242: infinity() noexcept { return static_cast(0); } 6242: 6242: static constexpr unsigned int 6242: quiet_NaN() noexcept 6242: { return static_cast(0); } 6242: 6242: static constexpr unsigned int 6242: signaling_NaN() noexcept 6242: { return static_cast(0); } 6242: 6242: static constexpr unsigned int 6242: denorm_min() noexcept 6242: { return static_cast(0); } 6242: 6242: static constexpr bool is_iec559 = false; 6242: static constexpr bool is_bounded = true; 6242: static constexpr bool is_modulo = true; 6242: 6242: static constexpr bool traps = true; 6242: static constexpr bool tinyness_before = false; 6242: static constexpr float_round_style round_style 6242: = round_toward_zero; 6242: }; 6242: 6242: 6242: template<> 6242: struct numeric_limits 6242: { 6242: static constexpr bool is_specialized = true; 6242: 6242: static constexpr long 6242: min() noexcept { return -0x7fffffffffffffffL - 1; } 6242: 6242: static constexpr long 6242: max() noexcept { return 0x7fffffffffffffffL; } 6242: 6242: 6242: static constexpr long 6242: lowest() noexcept { return min(); } 6242: 6242: 6242: static constexpr int digits = (sizeof(long) * 8 - ((long)(-1) < 0)); 6242: static constexpr int digits10 = ((sizeof(long) * 8 - ((long)(-1) < 0)) * 643L / 2136); 6242: 6242: static constexpr int max_digits10 = 0; 6242: 6242: static constexpr bool is_signed = true; 6242: static constexpr bool is_integer = true; 6242: static constexpr bool is_exact = true; 6242: static constexpr int radix = 2; 6242: 6242: static constexpr long 6242: epsilon() noexcept { return 0; } 6242: 6242: static constexpr long 6242: round_error() noexcept { return 0; } 6242: 6242: static constexpr int min_exponent = 0; 6242: static constexpr int min_exponent10 = 0; 6242: static constexpr int max_exponent = 0; 6242: static constexpr int max_exponent10 = 0; 6242: 6242: static constexpr bool has_infinity = false; 6242: static constexpr bool has_quiet_NaN = false; 6242: static constexpr bool has_signaling_NaN = false; 6242: static constexpr float_denorm_style has_denorm 6242: = denorm_absent; 6242: static constexpr bool has_denorm_loss = false; 6242: 6242: static constexpr long 6242: infinity() noexcept { return static_cast(0); } 6242: 6242: static constexpr long 6242: quiet_NaN() noexcept { return static_cast(0); } 6242: 6242: static constexpr long 6242: signaling_NaN() noexcept { return static_cast(0); } 6242: 6242: static constexpr long 6242: denorm_min() noexcept { return static_cast(0); } 6242: 6242: static constexpr bool is_iec559 = false; 6242: static constexpr bool is_bounded = true; 6242: static constexpr bool is_modulo = false; 6242: 6242: static constexpr bool traps = true; 6242: static constexpr bool tinyness_before = false; 6242: static constexpr float_round_style round_style 6242: = round_toward_zero; 6242: }; 6242: 6242: 6242: template<> 6242: struct numeric_limits 6242: { 6242: static constexpr bool is_specialized = true; 6242: 6242: static constexpr unsigned long 6242: min() noexcept { return 0; } 6242: 6242: static constexpr unsigned long 6242: max() noexcept { return 0x7fffffffffffffffL * 2UL + 1; } 6242: 6242: 6242: static constexpr unsigned long 6242: lowest() noexcept { return min(); } 6242: 6242: 6242: static constexpr int digits 6242: = (sizeof(unsigned long) * 8 - ((unsigned long)(-1) < 0)); 6242: static constexpr int digits10 6242: = ((sizeof(unsigned long) * 8 - ((unsigned long)(-1) < 0)) * 643L / 2136); 6242: 6242: static constexpr int max_digits10 = 0; 6242: 6242: static constexpr bool is_signed = false; 6242: static constexpr bool is_integer = true; 6242: static constexpr bool is_exact = true; 6242: static constexpr int radix = 2; 6242: 6242: static constexpr unsigned long 6242: epsilon() noexcept { return 0; } 6242: 6242: static constexpr unsigned long 6242: round_error() noexcept { return 0; } 6242: 6242: static constexpr int min_exponent = 0; 6242: static constexpr int min_exponent10 = 0; 6242: static constexpr int max_exponent = 0; 6242: static constexpr int max_exponent10 = 0; 6242: 6242: static constexpr bool has_infinity = false; 6242: static constexpr bool has_quiet_NaN = false; 6242: static constexpr bool has_signaling_NaN = false; 6242: static constexpr float_denorm_style has_denorm 6242: = denorm_absent; 6242: static constexpr bool has_denorm_loss = false; 6242: 6242: static constexpr unsigned long 6242: infinity() noexcept 6242: { return static_cast(0); } 6242: 6242: static constexpr unsigned long 6242: quiet_NaN() noexcept 6242: { return static_cast(0); } 6242: 6242: static constexpr unsigned long 6242: signaling_NaN() noexcept 6242: { return static_cast(0); } 6242: 6242: static constexpr unsigned long 6242: denorm_min() noexcept 6242: { return static_cast(0); } 6242: 6242: static constexpr bool is_iec559 = false; 6242: static constexpr bool is_bounded = true; 6242: static constexpr bool is_modulo = true; 6242: 6242: static constexpr bool traps = true; 6242: static constexpr bool tinyness_before = false; 6242: static constexpr float_round_style round_style 6242: = round_toward_zero; 6242: }; 6242: 6242: 6242: template<> 6242: struct numeric_limits 6242: { 6242: static constexpr bool is_specialized = true; 6242: 6242: static constexpr long long 6242: min() noexcept { return -0x7fffffffffffffffLL - 1; } 6242: 6242: static constexpr long long 6242: max() noexcept { return 0x7fffffffffffffffLL; } 6242: 6242: 6242: static constexpr long long 6242: lowest() noexcept { return min(); } 6242: 6242: 6242: static constexpr int digits 6242: = (sizeof(long long) * 8 - ((long long)(-1) < 0)); 6242: static constexpr int digits10 6242: = ((sizeof(long long) * 8 - ((long long)(-1) < 0)) * 643L / 2136); 6242: 6242: static constexpr int max_digits10 = 0; 6242: 6242: static constexpr bool is_signed = true; 6242: static constexpr bool is_integer = true; 6242: static constexpr bool is_exact = true; 6242: static constexpr int radix = 2; 6242: 6242: static constexpr long long 6242: epsilon() noexcept { return 0; } 6242: 6242: static constexpr long long 6242: round_error() noexcept { return 0; } 6242: 6242: static constexpr int min_exponent = 0; 6242: static constexpr int min_exponent10 = 0; 6242: static constexpr int max_exponent = 0; 6242: static constexpr int max_exponent10 = 0; 6242: 6242: static constexpr bool has_infinity = false; 6242: static constexpr bool has_quiet_NaN = false; 6242: static constexpr bool has_signaling_NaN = false; 6242: static constexpr float_denorm_style has_denorm 6242: = denorm_absent; 6242: static constexpr bool has_denorm_loss = false; 6242: 6242: static constexpr long long 6242: infinity() noexcept { return static_cast(0); } 6242: 6242: static constexpr long long 6242: quiet_NaN() noexcept { return static_cast(0); } 6242: 6242: static constexpr long long 6242: signaling_NaN() noexcept 6242: { return static_cast(0); } 6242: 6242: static constexpr long long 6242: denorm_min() noexcept { return static_cast(0); } 6242: 6242: static constexpr bool is_iec559 = false; 6242: static constexpr bool is_bounded = true; 6242: static constexpr bool is_modulo = false; 6242: 6242: static constexpr bool traps = true; 6242: static constexpr bool tinyness_before = false; 6242: static constexpr float_round_style round_style 6242: = round_toward_zero; 6242: }; 6242: 6242: 6242: template<> 6242: struct numeric_limits 6242: { 6242: static constexpr bool is_specialized = true; 6242: 6242: static constexpr unsigned long long 6242: min() noexcept { return 0; } 6242: 6242: static constexpr unsigned long long 6242: max() noexcept { return 0x7fffffffffffffffLL * 2ULL + 1; } 6242: 6242: 6242: static constexpr unsigned long long 6242: lowest() noexcept { return min(); } 6242: 6242: 6242: static constexpr int digits 6242: = (sizeof(unsigned long long) * 8 - ((unsigned long long)(-1) < 0)); 6242: static constexpr int digits10 6242: = ((sizeof(unsigned long long) * 8 - ((unsigned long long)(-1) < 0)) * 643L / 2136); 6242: 6242: static constexpr int max_digits10 = 0; 6242: 6242: static constexpr bool is_signed = false; 6242: static constexpr bool is_integer = true; 6242: static constexpr bool is_exact = true; 6242: static constexpr int radix = 2; 6242: 6242: static constexpr unsigned long long 6242: epsilon() noexcept { return 0; } 6242: 6242: static constexpr unsigned long long 6242: round_error() noexcept { return 0; } 6242: 6242: static constexpr int min_exponent = 0; 6242: static constexpr int min_exponent10 = 0; 6242: static constexpr int max_exponent = 0; 6242: static constexpr int max_exponent10 = 0; 6242: 6242: static constexpr bool has_infinity = false; 6242: static constexpr bool has_quiet_NaN = false; 6242: static constexpr bool has_signaling_NaN = false; 6242: static constexpr float_denorm_style has_denorm 6242: = denorm_absent; 6242: static constexpr bool has_denorm_loss = false; 6242: 6242: static constexpr unsigned long long 6242: infinity() noexcept 6242: { return static_cast(0); } 6242: 6242: static constexpr unsigned long long 6242: quiet_NaN() noexcept 6242: { return static_cast(0); } 6242: 6242: static constexpr unsigned long long 6242: signaling_NaN() noexcept 6242: { return static_cast(0); } 6242: 6242: static constexpr unsigned long long 6242: denorm_min() noexcept 6242: { return static_cast(0); } 6242: 6242: static constexpr bool is_iec559 = false; 6242: static constexpr bool is_bounded = true; 6242: static constexpr bool is_modulo = true; 6242: 6242: static constexpr bool traps = true; 6242: static constexpr bool tinyness_before = false; 6242: static constexpr float_round_style round_style 6242: = round_toward_zero; 6242: }; 6242: # 1570 "/usr/include/c++/8/limits" 3 6242: template<> struct numeric_limits<__int128> { static constexpr bool is_specialized = true; static constexpr __int128 min() noexcept { return (((__int128)(-1) < 0) ? -(((__int128)(-1) < 0) ? (((((__int128)1 << ((128 - ((__int128)(-1) < 0)) - 1)) - 1) << 1) + 1) : ~(__int128)0) - 1 : (__int128)0); } static constexpr __int128 max() noexcept { return (((__int128)(-1) < 0) ? (((((__int128)1 << ((128 - ((__int128)(-1) < 0)) - 1)) - 1) << 1) + 1) : ~(__int128)0); } static constexpr int digits = 128 - 1; static constexpr int digits10 = (128 - 1) * 643L / 2136; static constexpr bool is_signed = true; static constexpr bool is_integer = true; static constexpr bool is_exact = true; static constexpr int radix = 2; static constexpr __int128 epsilon() noexcept { return 0; } static constexpr __int128 round_error() noexcept { return 0; } static constexpr __int128 lowest() noexcept { return min(); } static constexpr int max_digits10 = 0; static constexpr int min_exponent = 0; static constexpr int min_exponent10 = 0; static constexpr int max_exponent = 0; static constexpr int max_exponent10 = 0; static constexpr bool has_infinity = false; static constexpr bool has_quiet_NaN = false; static constexpr bool has_signaling_NaN = false; static constexpr float_denorm_style has_denorm = denorm_absent; static constexpr bool has_denorm_loss = false; static constexpr __int128 infinity() noexcept { return static_cast<__int128>(0); } static constexpr __int128 quiet_NaN() noexcept { return static_cast<__int128>(0); } static constexpr __int128 signaling_NaN() noexcept { return static_cast<__int128>(0); } static constexpr __int128 denorm_min() noexcept { return static_cast<__int128>(0); } static constexpr bool is_iec559 = false; static constexpr bool is_bounded = true; static constexpr bool is_modulo = false; static constexpr bool traps = true; static constexpr bool tinyness_before = false; static constexpr float_round_style round_style = round_toward_zero; }; template<> struct numeric_limits { static constexpr bool is_specialized = true; static constexpr unsigned __int128 min() noexcept { return 0; } static constexpr unsigned __int128 max() noexcept { return (((unsigned __int128)(-1) < 0) ? (((((unsigned __int128)1 << ((128 - ((unsigned __int128)(-1) < 0)) - 1)) - 1) << 1) + 1) : ~(unsigned __int128)0); } static constexpr unsigned __int128 lowest() noexcept { return min(); } static constexpr int max_digits10 = 0; static constexpr int digits = 128; static constexpr int digits10 = 128 * 643L / 2136; static constexpr bool is_signed = false; static constexpr bool is_integer = true; static constexpr bool is_exact = true; static constexpr int radix = 2; static constexpr unsigned __int128 epsilon() noexcept { return 0; } static constexpr unsigned __int128 round_error() noexcept { return 0; } static constexpr int min_exponent = 0; static constexpr int min_exponent10 = 0; static constexpr int max_exponent = 0; static constexpr int max_exponent10 = 0; static constexpr bool has_infinity = false; static constexpr bool has_quiet_NaN = false; static constexpr bool has_signaling_NaN = false; static constexpr float_denorm_style has_denorm = denorm_absent; static constexpr bool has_denorm_loss = false; static constexpr unsigned __int128 infinity() noexcept { return static_cast(0); } static constexpr unsigned __int128 quiet_NaN() noexcept { return static_cast(0); } static constexpr unsigned __int128 signaling_NaN() noexcept { return static_cast(0); } static constexpr unsigned __int128 denorm_min() noexcept { return static_cast(0); } static constexpr bool is_iec559 = false; static constexpr bool is_bounded = true; static constexpr bool is_modulo = true; static constexpr bool traps = true; static constexpr bool tinyness_before = false; static constexpr float_round_style round_style = round_toward_zero; }; 6242: # 1593 "/usr/include/c++/8/limits" 3 6242: template<> 6242: struct numeric_limits 6242: { 6242: static constexpr bool is_specialized = true; 6242: 6242: static constexpr float 6242: min() noexcept { return 1.17549435082228750796873653722224568e-38F; } 6242: 6242: static constexpr float 6242: max() noexcept { return 3.40282346638528859811704183484516925e+38F; } 6242: 6242: 6242: static constexpr float 6242: lowest() noexcept { return -3.40282346638528859811704183484516925e+38F; } 6242: 6242: 6242: static constexpr int digits = 24; 6242: static constexpr int digits10 = 6; 6242: 6242: static constexpr int max_digits10 6242: = (2 + (24) * 643L / 2136); 6242: 6242: static constexpr bool is_signed = true; 6242: static constexpr bool is_integer = false; 6242: static constexpr bool is_exact = false; 6242: static constexpr int radix = 2; 6242: 6242: static constexpr float 6242: epsilon() noexcept { return 1.19209289550781250000000000000000000e-7F; } 6242: 6242: static constexpr float 6242: round_error() noexcept { return 0.5F; } 6242: 6242: static constexpr int min_exponent = (-125); 6242: static constexpr int min_exponent10 = (-37); 6242: static constexpr int max_exponent = 128; 6242: static constexpr int max_exponent10 = 38; 6242: 6242: static constexpr bool has_infinity = 1; 6242: static constexpr bool has_quiet_NaN = 1; 6242: static constexpr bool has_signaling_NaN = has_quiet_NaN; 6242: static constexpr float_denorm_style has_denorm 6242: = bool(1) ? denorm_present : denorm_absent; 6242: static constexpr bool has_denorm_loss 6242: = false; 6242: 6242: static constexpr float 6242: infinity() noexcept { return __builtin_huge_valf(); } 6242: 6242: static constexpr float 6242: quiet_NaN() noexcept { return __builtin_nanf(""); } 6242: 6242: static constexpr float 6242: signaling_NaN() noexcept { return __builtin_nansf(""); } 6242: 6242: static constexpr float 6242: denorm_min() noexcept { return 1.40129846432481707092372958328991613e-45F; } 6242: 6242: static constexpr bool is_iec559 6242: = has_infinity && has_quiet_NaN && has_denorm == denorm_present; 6242: static constexpr bool is_bounded = true; 6242: static constexpr bool is_modulo = false; 6242: 6242: static constexpr bool traps = false; 6242: static constexpr bool tinyness_before 6242: = false; 6242: static constexpr float_round_style round_style 6242: = round_to_nearest; 6242: }; 6242: 6242: 6242: 6242: 6242: 6242: 6242: template<> 6242: struct numeric_limits 6242: { 6242: static constexpr bool is_specialized = true; 6242: 6242: static constexpr double 6242: min() noexcept { return double(2.22507385850720138309023271733240406e-308L); } 6242: 6242: static constexpr double 6242: max() noexcept { return double(1.79769313486231570814527423731704357e+308L); } 6242: 6242: 6242: static constexpr double 6242: lowest() noexcept { return -double(1.79769313486231570814527423731704357e+308L); } 6242: 6242: 6242: static constexpr int digits = 53; 6242: static constexpr int digits10 = 15; 6242: 6242: static constexpr int max_digits10 6242: = (2 + (53) * 643L / 2136); 6242: 6242: static constexpr bool is_signed = true; 6242: static constexpr bool is_integer = false; 6242: static constexpr bool is_exact = false; 6242: static constexpr int radix = 2; 6242: 6242: static constexpr double 6242: epsilon() noexcept { return double(2.22044604925031308084726333618164062e-16L); } 6242: 6242: static constexpr double 6242: round_error() noexcept { return 0.5; } 6242: 6242: static constexpr int min_exponent = (-1021); 6242: static constexpr int min_exponent10 = (-307); 6242: static constexpr int max_exponent = 1024; 6242: static constexpr int max_exponent10 = 308; 6242: 6242: static constexpr bool has_infinity = 1; 6242: static constexpr bool has_quiet_NaN = 1; 6242: static constexpr bool has_signaling_NaN = has_quiet_NaN; 6242: static constexpr float_denorm_style has_denorm 6242: = bool(1) ? denorm_present : denorm_absent; 6242: static constexpr bool has_denorm_loss 6242: = false; 6242: 6242: static constexpr double 6242: infinity() noexcept { return __builtin_huge_val(); } 6242: 6242: static constexpr double 6242: quiet_NaN() noexcept { return __builtin_nan(""); } 6242: 6242: static constexpr double 6242: signaling_NaN() noexcept { return __builtin_nans(""); } 6242: 6242: static constexpr double 6242: denorm_min() noexcept { return double(4.94065645841246544176568792868221372e-324L); } 6242: 6242: static constexpr bool is_iec559 6242: = has_infinity && has_quiet_NaN && has_denorm == denorm_present; 6242: static constexpr bool is_bounded = true; 6242: static constexpr bool is_modulo = false; 6242: 6242: static constexpr bool traps = false; 6242: static constexpr bool tinyness_before 6242: = false; 6242: static constexpr float_round_style round_style 6242: = round_to_nearest; 6242: }; 6242: 6242: 6242: 6242: 6242: 6242: 6242: template<> 6242: struct numeric_limits 6242: { 6242: static constexpr bool is_specialized = true; 6242: 6242: static constexpr long double 6242: min() noexcept { return 3.36210314311209350626267781732175260e-4932L; } 6242: 6242: static constexpr long double 6242: max() noexcept { return 1.18973149535723176508575932662800702e+4932L; } 6242: 6242: 6242: static constexpr long double 6242: lowest() noexcept { return -1.18973149535723176508575932662800702e+4932L; } 6242: 6242: 6242: static constexpr int digits = 113; 6242: static constexpr int digits10 = 33; 6242: 6242: static constexpr int max_digits10 6242: = (2 + (113) * 643L / 2136); 6242: 6242: static constexpr bool is_signed = true; 6242: static constexpr bool is_integer = false; 6242: static constexpr bool is_exact = false; 6242: static constexpr int radix = 2; 6242: 6242: static constexpr long double 6242: epsilon() noexcept { return 1.92592994438723585305597794258492732e-34L; } 6242: 6242: static constexpr long double 6242: round_error() noexcept { return 0.5L; } 6242: 6242: static constexpr int min_exponent = (-16381); 6242: static constexpr int min_exponent10 = (-4931); 6242: static constexpr int max_exponent = 16384; 6242: static constexpr int max_exponent10 = 4932; 6242: 6242: static constexpr bool has_infinity = 1; 6242: static constexpr bool has_quiet_NaN = 1; 6242: static constexpr bool has_signaling_NaN = has_quiet_NaN; 6242: static constexpr float_denorm_style has_denorm 6242: = bool(1) ? denorm_present : denorm_absent; 6242: static constexpr bool has_denorm_loss 6242: = false; 6242: 6242: static constexpr long double 6242: infinity() noexcept { return __builtin_huge_vall(); } 6242: 6242: static constexpr long double 6242: quiet_NaN() noexcept { return __builtin_nanl(""); } 6242: 6242: static constexpr long double 6242: signaling_NaN() noexcept { return __builtin_nansl(""); } 6242: 6242: static constexpr long double 6242: denorm_min() noexcept { return 6.47517511943802511092443895822764655e-4966L; } 6242: 6242: static constexpr bool is_iec559 6242: = has_infinity && has_quiet_NaN && has_denorm == denorm_present; 6242: static constexpr bool is_bounded = true; 6242: static constexpr bool is_modulo = false; 6242: 6242: static constexpr bool traps = false; 6242: static constexpr bool tinyness_before = 6242: false; 6242: static constexpr float_round_style round_style = 6242: round_to_nearest; 6242: }; 6242: 6242: 6242: 6242: 6242: 6242: 6242: } 6242: # 41 "/usr/include/c++/8/chrono" 2 3 6242: # 1 "/usr/include/c++/8/ctime" 1 3 6242: # 39 "/usr/include/c++/8/ctime" 3 6242: 6242: # 40 "/usr/include/c++/8/ctime" 3 6242: # 42 "/usr/include/c++/8/chrono" 2 3 6242: # 1 "/usr/include/c++/8/bits/parse_numbers.h" 1 3 6242: # 33 "/usr/include/c++/8/bits/parse_numbers.h" 3 6242: 6242: # 34 "/usr/include/c++/8/bits/parse_numbers.h" 3 6242: # 43 "/usr/include/c++/8/chrono" 2 3 6242: 6242: 6242: 6242: namespace std __attribute__ ((__visibility__ ("default"))) 6242: { 6242: 6242: # 61 "/usr/include/c++/8/chrono" 3 6242: namespace chrono 6242: { 6242: template> 6242: struct duration; 6242: 6242: template 6242: struct time_point; 6242: } 6242: 6242: 6242: 6242: template 6242: struct __duration_common_type_wrapper 6242: { 6242: private: 6242: typedef __static_gcd<_Period1::num, _Period2::num> __gcd_num; 6242: typedef __static_gcd<_Period1::den, _Period2::den> __gcd_den; 6242: typedef typename _CT::type __cr; 6242: typedef ratio<__gcd_num::value, 6242: (_Period1::den / __gcd_den::value) * _Period2::den> __r; 6242: public: 6242: typedef __success_type> type; 6242: }; 6242: 6242: template 6242: struct __duration_common_type_wrapper<__failure_type, _Period1, _Period2> 6242: { typedef __failure_type type; }; 6242: 6242: template 6242: struct common_type, 6242: chrono::duration<_Rep2, _Period2>> 6242: : public __duration_common_type_wrapper>::type, _Period1, _Period2>::type 6242: { }; 6242: 6242: 6242: 6242: template 6242: struct __timepoint_common_type_wrapper 6242: { 6242: typedef __success_type> 6242: type; 6242: }; 6242: 6242: template 6242: struct __timepoint_common_type_wrapper<__failure_type, _Clock> 6242: { typedef __failure_type type; }; 6242: 6242: template 6242: struct common_type, 6242: chrono::time_point<_Clock, _Duration2>> 6242: : public __timepoint_common_type_wrapper>::type, _Clock>::type 6242: { }; 6242: 6242: namespace chrono 6242: { 6242: 6242: template 6242: struct __duration_cast_impl 6242: { 6242: template 6242: static constexpr _ToDur 6242: __cast(const duration<_Rep, _Period>& __d) 6242: { 6242: typedef typename _ToDur::rep __to_rep; 6242: return _ToDur(static_cast<__to_rep>(static_cast<_CR>(__d.count()) 6242: * static_cast<_CR>(_CF::num) 6242: / static_cast<_CR>(_CF::den))); 6242: } 6242: }; 6242: 6242: template 6242: struct __duration_cast_impl<_ToDur, _CF, _CR, true, true> 6242: { 6242: template 6242: static constexpr _ToDur 6242: __cast(const duration<_Rep, _Period>& __d) 6242: { 6242: typedef typename _ToDur::rep __to_rep; 6242: return _ToDur(static_cast<__to_rep>(__d.count())); 6242: } 6242: }; 6242: 6242: template 6242: struct __duration_cast_impl<_ToDur, _CF, _CR, true, false> 6242: { 6242: template 6242: static constexpr _ToDur 6242: __cast(const duration<_Rep, _Period>& __d) 6242: { 6242: typedef typename _ToDur::rep __to_rep; 6242: return _ToDur(static_cast<__to_rep>( 6242: static_cast<_CR>(__d.count()) / static_cast<_CR>(_CF::den))); 6242: } 6242: }; 6242: 6242: template 6242: struct __duration_cast_impl<_ToDur, _CF, _CR, false, true> 6242: { 6242: template 6242: static constexpr _ToDur 6242: __cast(const duration<_Rep, _Period>& __d) 6242: { 6242: typedef typename _ToDur::rep __to_rep; 6242: return _ToDur(static_cast<__to_rep>( 6242: static_cast<_CR>(__d.count()) * static_cast<_CR>(_CF::num))); 6242: } 6242: }; 6242: 6242: template 6242: struct __is_duration 6242: : std::false_type 6242: { }; 6242: 6242: template 6242: struct __is_duration> 6242: : std::true_type 6242: { }; 6242: 6242: template 6242: using __enable_if_is_duration 6242: = typename enable_if<__is_duration<_Tp>::value, _Tp>::type; 6242: 6242: template 6242: using __disable_if_is_duration 6242: = typename enable_if::value, _Tp>::type; 6242: 6242: 6242: template 6242: constexpr __enable_if_is_duration<_ToDur> 6242: duration_cast(const duration<_Rep, _Period>& __d) 6242: { 6242: typedef typename _ToDur::period __to_period; 6242: typedef typename _ToDur::rep __to_rep; 6242: typedef ratio_divide<_Period, __to_period> __cf; 6242: typedef typename common_type<__to_rep, _Rep, intmax_t>::type 6242: __cr; 6242: typedef __duration_cast_impl<_ToDur, __cf, __cr, 6242: __cf::num == 1, __cf::den == 1> __dc; 6242: return __dc::__cast(__d); 6242: } 6242: 6242: 6242: template 6242: struct treat_as_floating_point 6242: : is_floating_point<_Rep> 6242: { }; 6242: # 274 "/usr/include/c++/8/chrono" 3 6242: template 6242: struct duration_values 6242: { 6242: static constexpr _Rep 6242: zero() 6242: { return _Rep(0); } 6242: 6242: static constexpr _Rep 6242: max() 6242: { return numeric_limits<_Rep>::max(); } 6242: 6242: static constexpr _Rep 6242: min() 6242: { return numeric_limits<_Rep>::lowest(); } 6242: }; 6242: 6242: template 6242: struct __is_ratio 6242: : std::false_type 6242: { }; 6242: 6242: template 6242: struct __is_ratio> 6242: : std::true_type 6242: { }; 6242: 6242: 6242: template 6242: struct duration 6242: { 6242: private: 6242: template 6242: using __is_float = treat_as_floating_point<_Rep2>; 6242: 6242: 6242: template 6242: using __is_harmonic 6242: = __bool_constant::den == 1>; 6242: 6242: public: 6242: 6242: typedef _Rep rep; 6242: typedef _Period period; 6242: 6242: static_assert(!__is_duration<_Rep>::value, "rep cannot be a duration"); 6242: static_assert(__is_ratio<_Period>::value, 6242: "period must be a specialization of ratio"); 6242: static_assert(_Period::num > 0, "period must be positive"); 6242: 6242: 6242: constexpr duration() = default; 6242: 6242: duration(const duration&) = default; 6242: 6242: template, 6242: __or_<__is_float, __not_<__is_float<_Rep2>>>>> 6242: constexpr explicit duration(const _Rep2& __rep) 6242: : __r(static_cast(__rep)) { } 6242: 6242: template, 6242: __and_<__is_harmonic<_Period2>, 6242: __not_<__is_float<_Rep2>>>>>> 6242: constexpr duration(const duration<_Rep2, _Period2>& __d) 6242: : __r(duration_cast(__d).count()) { } 6242: 6242: ~duration() = default; 6242: duration& operator=(const duration&) = default; 6242: 6242: 6242: constexpr rep 6242: count() const 6242: { return __r; } 6242: 6242: 6242: constexpr duration 6242: operator+() const 6242: { return *this; } 6242: 6242: constexpr duration 6242: operator-() const 6242: { return duration(-__r); } 6242: 6242: duration& 6242: operator++() 6242: { 6242: ++__r; 6242: return *this; 6242: } 6242: 6242: duration 6242: operator++(int) 6242: { return duration(__r++); } 6242: 6242: duration& 6242: operator--() 6242: { 6242: --__r; 6242: return *this; 6242: } 6242: 6242: duration 6242: operator--(int) 6242: { return duration(__r--); } 6242: 6242: duration& 6242: operator+=(const duration& __d) 6242: { 6242: __r += __d.count(); 6242: return *this; 6242: } 6242: 6242: duration& 6242: operator-=(const duration& __d) 6242: { 6242: __r -= __d.count(); 6242: return *this; 6242: } 6242: 6242: duration& 6242: operator*=(const rep& __rhs) 6242: { 6242: __r *= __rhs; 6242: return *this; 6242: } 6242: 6242: duration& 6242: operator/=(const rep& __rhs) 6242: { 6242: __r /= __rhs; 6242: return *this; 6242: } 6242: 6242: 6242: template 6242: 6242: typename enable_if::value, 6242: duration&>::type 6242: operator%=(const rep& __rhs) 6242: { 6242: __r %= __rhs; 6242: return *this; 6242: } 6242: 6242: template 6242: 6242: typename enable_if::value, 6242: duration&>::type 6242: operator%=(const duration& __d) 6242: { 6242: __r %= __d.count(); 6242: return *this; 6242: } 6242: 6242: 6242: static constexpr duration 6242: zero() 6242: { return duration(duration_values::zero()); } 6242: 6242: static constexpr duration 6242: min() 6242: { return duration(duration_values::min()); } 6242: 6242: static constexpr duration 6242: max() 6242: { return duration(duration_values::max()); } 6242: 6242: private: 6242: rep __r; 6242: }; 6242: 6242: template 6242: constexpr typename common_type, 6242: duration<_Rep2, _Period2>>::type 6242: operator+(const duration<_Rep1, _Period1>& __lhs, 6242: const duration<_Rep2, _Period2>& __rhs) 6242: { 6242: typedef duration<_Rep1, _Period1> __dur1; 6242: typedef duration<_Rep2, _Period2> __dur2; 6242: typedef typename common_type<__dur1,__dur2>::type __cd; 6242: return __cd(__cd(__lhs).count() + __cd(__rhs).count()); 6242: } 6242: 6242: template 6242: constexpr typename common_type, 6242: duration<_Rep2, _Period2>>::type 6242: operator-(const duration<_Rep1, _Period1>& __lhs, 6242: const duration<_Rep2, _Period2>& __rhs) 6242: { 6242: typedef duration<_Rep1, _Period1> __dur1; 6242: typedef duration<_Rep2, _Period2> __dur2; 6242: typedef typename common_type<__dur1,__dur2>::type __cd; 6242: return __cd(__cd(__lhs).count() - __cd(__rhs).count()); 6242: } 6242: 6242: 6242: 6242: template::type> 6242: using __common_rep_t 6242: = typename enable_if::value, _CRep>::type; 6242: 6242: template 6242: constexpr duration<__common_rep_t<_Rep1, _Rep2>, _Period> 6242: operator*(const duration<_Rep1, _Period>& __d, const _Rep2& __s) 6242: { 6242: typedef duration::type, _Period> 6242: __cd; 6242: return __cd(__cd(__d).count() * __s); 6242: } 6242: 6242: template 6242: constexpr duration<__common_rep_t<_Rep2, _Rep1>, _Period> 6242: operator*(const _Rep1& __s, const duration<_Rep2, _Period>& __d) 6242: { return __d * __s; } 6242: 6242: template 6242: constexpr 6242: duration<__common_rep_t<_Rep1, __disable_if_is_duration<_Rep2>>, _Period> 6242: operator/(const duration<_Rep1, _Period>& __d, const _Rep2& __s) 6242: { 6242: typedef duration::type, _Period> 6242: __cd; 6242: return __cd(__cd(__d).count() / __s); 6242: } 6242: 6242: template 6242: constexpr typename common_type<_Rep1, _Rep2>::type 6242: operator/(const duration<_Rep1, _Period1>& __lhs, 6242: const duration<_Rep2, _Period2>& __rhs) 6242: { 6242: typedef duration<_Rep1, _Period1> __dur1; 6242: typedef duration<_Rep2, _Period2> __dur2; 6242: typedef typename common_type<__dur1,__dur2>::type __cd; 6242: return __cd(__lhs).count() / __cd(__rhs).count(); 6242: } 6242: 6242: 6242: template 6242: constexpr 6242: duration<__common_rep_t<_Rep1, __disable_if_is_duration<_Rep2>>, _Period> 6242: operator%(const duration<_Rep1, _Period>& __d, const _Rep2& __s) 6242: { 6242: typedef duration::type, _Period> 6242: __cd; 6242: return __cd(__cd(__d).count() % __s); 6242: } 6242: 6242: template 6242: constexpr typename common_type, 6242: duration<_Rep2, _Period2>>::type 6242: operator%(const duration<_Rep1, _Period1>& __lhs, 6242: const duration<_Rep2, _Period2>& __rhs) 6242: { 6242: typedef duration<_Rep1, _Period1> __dur1; 6242: typedef duration<_Rep2, _Period2> __dur2; 6242: typedef typename common_type<__dur1,__dur2>::type __cd; 6242: return __cd(__cd(__lhs).count() % __cd(__rhs).count()); 6242: } 6242: 6242: 6242: template 6242: constexpr bool 6242: operator==(const duration<_Rep1, _Period1>& __lhs, 6242: const duration<_Rep2, _Period2>& __rhs) 6242: { 6242: typedef duration<_Rep1, _Period1> __dur1; 6242: typedef duration<_Rep2, _Period2> __dur2; 6242: typedef typename common_type<__dur1,__dur2>::type __ct; 6242: return __ct(__lhs).count() == __ct(__rhs).count(); 6242: } 6242: 6242: template 6242: constexpr bool 6242: operator<(const duration<_Rep1, _Period1>& __lhs, 6242: const duration<_Rep2, _Period2>& __rhs) 6242: { 6242: typedef duration<_Rep1, _Period1> __dur1; 6242: typedef duration<_Rep2, _Period2> __dur2; 6242: typedef typename common_type<__dur1,__dur2>::type __ct; 6242: return __ct(__lhs).count() < __ct(__rhs).count(); 6242: } 6242: 6242: template 6242: constexpr bool 6242: operator!=(const duration<_Rep1, _Period1>& __lhs, 6242: const duration<_Rep2, _Period2>& __rhs) 6242: { return !(__lhs == __rhs); } 6242: 6242: template 6242: constexpr bool 6242: operator<=(const duration<_Rep1, _Period1>& __lhs, 6242: const duration<_Rep2, _Period2>& __rhs) 6242: { return !(__rhs < __lhs); } 6242: 6242: template 6242: constexpr bool 6242: operator>(const duration<_Rep1, _Period1>& __lhs, 6242: const duration<_Rep2, _Period2>& __rhs) 6242: { return __rhs < __lhs; } 6242: 6242: template 6242: constexpr bool 6242: operator>=(const duration<_Rep1, _Period1>& __lhs, 6242: const duration<_Rep2, _Period2>& __rhs) 6242: { return !(__lhs < __rhs); } 6242: 6242: 6242: typedef duration nanoseconds; 6242: 6242: 6242: typedef duration microseconds; 6242: 6242: 6242: typedef duration milliseconds; 6242: 6242: 6242: typedef duration seconds; 6242: 6242: 6242: typedef duration> minutes; 6242: 6242: 6242: typedef duration> hours; 6242: 6242: 6242: template 6242: struct time_point 6242: { 6242: typedef _Clock clock; 6242: typedef _Dur duration; 6242: typedef typename duration::rep rep; 6242: typedef typename duration::period period; 6242: 6242: constexpr time_point() : __d(duration::zero()) 6242: { } 6242: 6242: constexpr explicit time_point(const duration& __dur) 6242: : __d(__dur) 6242: { } 6242: 6242: 6242: template>> 6242: constexpr time_point(const time_point& __t) 6242: : __d(__t.time_since_epoch()) 6242: { } 6242: 6242: 6242: constexpr duration 6242: time_since_epoch() const 6242: { return __d; } 6242: 6242: 6242: time_point& 6242: operator+=(const duration& __dur) 6242: { 6242: __d += __dur; 6242: return *this; 6242: } 6242: 6242: time_point& 6242: operator-=(const duration& __dur) 6242: { 6242: __d -= __dur; 6242: return *this; 6242: } 6242: 6242: 6242: static constexpr time_point 6242: min() 6242: { return time_point(duration::min()); } 6242: 6242: static constexpr time_point 6242: max() 6242: { return time_point(duration::max()); } 6242: 6242: private: 6242: duration __d; 6242: }; 6242: 6242: 6242: template 6242: constexpr typename enable_if<__is_duration<_ToDur>::value, 6242: time_point<_Clock, _ToDur>>::type 6242: time_point_cast(const time_point<_Clock, _Dur>& __t) 6242: { 6242: typedef time_point<_Clock, _ToDur> __time_point; 6242: return __time_point(duration_cast<_ToDur>(__t.time_since_epoch())); 6242: } 6242: # 707 "/usr/include/c++/8/chrono" 3 6242: template 6242: constexpr time_point<_Clock, 6242: typename common_type<_Dur1, duration<_Rep2, _Period2>>::type> 6242: operator+(const time_point<_Clock, _Dur1>& __lhs, 6242: const duration<_Rep2, _Period2>& __rhs) 6242: { 6242: typedef duration<_Rep2, _Period2> __dur2; 6242: typedef typename common_type<_Dur1,__dur2>::type __ct; 6242: typedef time_point<_Clock, __ct> __time_point; 6242: return __time_point(__lhs.time_since_epoch() + __rhs); 6242: } 6242: 6242: template 6242: constexpr time_point<_Clock, 6242: typename common_type, _Dur2>::type> 6242: operator+(const duration<_Rep1, _Period1>& __lhs, 6242: const time_point<_Clock, _Dur2>& __rhs) 6242: { 6242: typedef duration<_Rep1, _Period1> __dur1; 6242: typedef typename common_type<__dur1,_Dur2>::type __ct; 6242: typedef time_point<_Clock, __ct> __time_point; 6242: return __time_point(__rhs.time_since_epoch() + __lhs); 6242: } 6242: 6242: template 6242: constexpr time_point<_Clock, 6242: typename common_type<_Dur1, duration<_Rep2, _Period2>>::type> 6242: operator-(const time_point<_Clock, _Dur1>& __lhs, 6242: const duration<_Rep2, _Period2>& __rhs) 6242: { 6242: typedef duration<_Rep2, _Period2> __dur2; 6242: typedef typename common_type<_Dur1,__dur2>::type __ct; 6242: typedef time_point<_Clock, __ct> __time_point; 6242: return __time_point(__lhs.time_since_epoch() -__rhs); 6242: } 6242: 6242: template 6242: constexpr typename common_type<_Dur1, _Dur2>::type 6242: operator-(const time_point<_Clock, _Dur1>& __lhs, 6242: const time_point<_Clock, _Dur2>& __rhs) 6242: { return __lhs.time_since_epoch() - __rhs.time_since_epoch(); } 6242: 6242: template 6242: constexpr bool 6242: operator==(const time_point<_Clock, _Dur1>& __lhs, 6242: const time_point<_Clock, _Dur2>& __rhs) 6242: { return __lhs.time_since_epoch() == __rhs.time_since_epoch(); } 6242: 6242: template 6242: constexpr bool 6242: operator!=(const time_point<_Clock, _Dur1>& __lhs, 6242: const time_point<_Clock, _Dur2>& __rhs) 6242: { return !(__lhs == __rhs); } 6242: 6242: template 6242: constexpr bool 6242: operator<(const time_point<_Clock, _Dur1>& __lhs, 6242: const time_point<_Clock, _Dur2>& __rhs) 6242: { return __lhs.time_since_epoch() < __rhs.time_since_epoch(); } 6242: 6242: template 6242: constexpr bool 6242: operator<=(const time_point<_Clock, _Dur1>& __lhs, 6242: const time_point<_Clock, _Dur2>& __rhs) 6242: { return !(__rhs < __lhs); } 6242: 6242: template 6242: constexpr bool 6242: operator>(const time_point<_Clock, _Dur1>& __lhs, 6242: const time_point<_Clock, _Dur2>& __rhs) 6242: { return __rhs < __lhs; } 6242: 6242: template 6242: constexpr bool 6242: operator>=(const time_point<_Clock, _Dur1>& __lhs, 6242: const time_point<_Clock, _Dur2>& __rhs) 6242: { return !(__lhs < __rhs); } 6242: # 807 "/usr/include/c++/8/chrono" 3 6242: inline namespace _V2 { 6242: 6242: 6242: 6242: 6242: 6242: 6242: struct system_clock 6242: { 6242: typedef chrono::nanoseconds duration; 6242: typedef duration::rep rep; 6242: typedef duration::period period; 6242: typedef chrono::time_point time_point; 6242: 6242: static_assert(system_clock::duration::min() 6242: < system_clock::duration::zero(), 6242: "a clock's minimum duration cannot be less than its epoch"); 6242: 6242: static constexpr bool is_steady = false; 6242: 6242: static time_point 6242: now() noexcept; 6242: 6242: 6242: static std::time_t 6242: to_time_t(const time_point& __t) noexcept 6242: { 6242: return std::time_t(duration_cast 6242: (__t.time_since_epoch()).count()); 6242: } 6242: 6242: static time_point 6242: from_time_t(std::time_t __t) noexcept 6242: { 6242: typedef chrono::time_point __from; 6242: return time_point_cast 6242: (__from(chrono::seconds(__t))); 6242: } 6242: }; 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: struct steady_clock 6242: { 6242: typedef chrono::nanoseconds duration; 6242: typedef duration::rep rep; 6242: typedef duration::period period; 6242: typedef chrono::time_point time_point; 6242: 6242: static constexpr bool is_steady = true; 6242: 6242: static time_point 6242: now() noexcept; 6242: }; 6242: # 874 "/usr/include/c++/8/chrono" 3 6242: using high_resolution_clock = system_clock; 6242: 6242: } 6242: } 6242: # 976 "/usr/include/c++/8/chrono" 3 6242: 6242: } 6242: # 5 "clock.hh" 2 6242: 6242: 6242: # 6 "clock.hh" 6242: namespace Kakoune 6242: { 6242: 6242: using Clock = std::chrono::steady_clock; 6242: using TimePoint = Clock::time_point; 6242: 6242: } 6242: # 5 "buffer.hh" 2 6242: 6242: 6242: # 1 "safe_ptr.hh" 1 6242: 6242: 6242: 6242: 6242: 6242: 6242: # 1 "ref_ptr.hh" 1 6242: 6242: 6242: 6242: 6242: 6242: namespace Kakoune 6242: { 6242: 6242: struct RefCountable 6242: { 6242: int refcount = 0; 6242: virtual ~RefCountable() = default; 6242: }; 6242: 6242: struct RefCountablePolicy 6242: { 6242: static void inc_ref(RefCountable* r, void*) { ++r->refcount; } 6242: static void dec_ref(RefCountable* r, void*) { if (--r->refcount == 0) delete r; } 6242: static void ptr_moved(RefCountable*, void*, void*) noexcept {} 6242: }; 6242: 6242: template 6242: struct RefPtr 6242: { 6242: RefPtr() = default; 6242: explicit RefPtr(T* ptr) : m_ptr(ptr) { acquire(); } 6242: ~RefPtr() { release(); } 6242: RefPtr(const RefPtr& other) : m_ptr(other.m_ptr) { acquire(); } 6242: RefPtr(RefPtr&& other) 6242: noexcept(noexcept(std::declval().moved(nullptr))) 6242: : m_ptr(other.m_ptr) { other.m_ptr = nullptr; moved(&other); } 6242: 6242: RefPtr& operator=(const RefPtr& other) 6242: { 6242: if (other.m_ptr != m_ptr) 6242: { 6242: release(); 6242: m_ptr = other.m_ptr; 6242: acquire(); 6242: } 6242: return *this; 6242: } 6242: 6242: RefPtr& operator=(RefPtr&& other) 6242: { 6242: release(); 6242: m_ptr = other.m_ptr; 6242: other.m_ptr = nullptr; 6242: moved(&other); 6242: return *this; 6242: } 6242: 6242: RefPtr& operator=(T* ptr) 6242: { 6242: if (ptr != m_ptr) 6242: { 6242: release(); 6242: m_ptr = ptr; 6242: acquire(); 6242: } 6242: return *this; 6242: } 6242: 6242: [[gnu::always_inline]] 6242: T* operator->() const { return m_ptr; } 6242: [[gnu::always_inline]] 6242: T& operator*() const { return *m_ptr; } 6242: 6242: [[gnu::always_inline]] 6242: T* get() const { return m_ptr; } 6242: 6242: [[gnu::always_inline]] 6242: explicit operator bool() const { return m_ptr; } 6242: 6242: void reset(T* ptr = nullptr) 6242: { 6242: if (ptr == m_ptr) 6242: return; 6242: release(); 6242: m_ptr = ptr; 6242: acquire(); 6242: } 6242: 6242: friend bool operator==(const RefPtr& lhs, const RefPtr& rhs) { return lhs.m_ptr == rhs.m_ptr; } 6242: friend bool operator!=(const RefPtr& lhs, const RefPtr& rhs) { return lhs.m_ptr != rhs.m_ptr; } 6242: 6242: private: 6242: T* m_ptr = nullptr; 6242: 6242: [[gnu::always_inline]] 6242: void acquire() 6242: { 6242: if (m_ptr) 6242: Policy::inc_ref(m_ptr, this); 6242: } 6242: 6242: [[gnu::always_inline]] 6242: void release() 6242: { 6242: if (m_ptr) 6242: Policy::dec_ref(m_ptr, this); 6242: m_ptr = nullptr; 6242: } 6242: 6242: [[gnu::always_inline]] 6242: void moved(void* from) 6242: noexcept(noexcept(Policy::ptr_moved(nullptr, nullptr, nullptr))) 6242: { 6242: if (m_ptr) 6242: Policy::ptr_moved(m_ptr, from, this); 6242: } 6242: }; 6242: 6242: } 6242: # 8 "safe_ptr.hh" 2 6242: # 18 "safe_ptr.hh" 6242: namespace Kakoune 6242: { 6242: 6242: 6242: 6242: class SafeCountable 6242: { 6242: public: 6242: 6242: SafeCountable() : m_count(0) {} 6242: ~SafeCountable() 6242: { 6242: if (not (m_count == 0)) on_assert_failed("assert failed \"" "m_count == 0" "\" at " "safe_ptr.hh" ":" "30"); 6242: 6242: 6242: 6242: } 6242: 6242: private: 6242: friend struct SafeCountablePolicy; 6242: # 48 "safe_ptr.hh" 6242: mutable int m_count; 6242: 6242: }; 6242: 6242: struct SafeCountablePolicy 6242: { 6242: 6242: static void inc_ref(const SafeCountable* sc, void* ptr) 6242: { 6242: ++sc->m_count; 6242: 6242: 6242: 6242: } 6242: 6242: static void dec_ref(const SafeCountable* sc, void* ptr) 6242: { 6242: --sc->m_count; 6242: if (not (sc->m_count >= 0)) on_assert_failed("assert failed \"" "sc->m_count >= 0" "\" at " "safe_ptr.hh" ":" "66"); 6242: 6242: 6242: 6242: 6242: 6242: 6242: } 6242: 6242: static void ptr_moved(const SafeCountable* sc, void* from, void* to) 6242: { 6242: 6242: 6242: 6242: 6242: 6242: 6242: } 6242: 6242: 6242: 6242: 6242: 6242: }; 6242: 6242: template 6242: using SafePtr = RefPtr; 6242: 6242: } 6242: # 8 "buffer.hh" 2 6242: # 1 "scope.hh" 1 6242: 6242: 6242: 6242: # 1 "alias_registry.hh" 1 6242: 6242: 6242: 6242: 6242: 6242: # 1 "id_map.hh" 1 6242: 6242: 6242: 6242: 6242: 6242: 6242: # 1 "/usr/include/c++/8/algorithm" 1 3 6242: # 58 "/usr/include/c++/8/algorithm" 3 6242: 6242: # 59 "/usr/include/c++/8/algorithm" 3 6242: 6242: 6242: 6242: # 1 "/usr/include/c++/8/bits/stl_algo.h" 1 3 6242: # 59 "/usr/include/c++/8/bits/stl_algo.h" 3 6242: # 1 "/usr/include/c++/8/cstdlib" 1 3 6242: # 39 "/usr/include/c++/8/cstdlib" 3 6242: 6242: # 40 "/usr/include/c++/8/cstdlib" 3 6242: # 60 "/usr/include/c++/8/bits/stl_algo.h" 2 3 6242: # 1 "/usr/include/c++/8/bits/algorithmfwd.h" 1 3 6242: # 33 "/usr/include/c++/8/bits/algorithmfwd.h" 3 6242: 6242: # 34 "/usr/include/c++/8/bits/algorithmfwd.h" 3 6242: # 42 "/usr/include/c++/8/bits/algorithmfwd.h" 3 6242: 6242: # 42 "/usr/include/c++/8/bits/algorithmfwd.h" 3 6242: namespace std __attribute__ ((__visibility__ ("default"))) 6242: { 6242: 6242: # 195 "/usr/include/c++/8/bits/algorithmfwd.h" 3 6242: template 6242: bool 6242: all_of(_IIter, _IIter, _Predicate); 6242: 6242: template 6242: bool 6242: any_of(_IIter, _IIter, _Predicate); 6242: 6242: 6242: template 6242: bool 6242: binary_search(_FIter, _FIter, const _Tp&); 6242: 6242: template 6242: bool 6242: binary_search(_FIter, _FIter, const _Tp&, _Compare); 6242: # 224 "/usr/include/c++/8/bits/algorithmfwd.h" 3 6242: template 6242: _OIter 6242: copy(_IIter, _IIter, _OIter); 6242: 6242: template 6242: _BIter2 6242: copy_backward(_BIter1, _BIter1, _BIter2); 6242: 6242: 6242: template 6242: _OIter 6242: copy_if(_IIter, _IIter, _OIter, _Predicate); 6242: 6242: template 6242: _OIter 6242: copy_n(_IIter, _Size, _OIter); 6242: 6242: 6242: 6242: 6242: 6242: template 6242: pair<_FIter, _FIter> 6242: equal_range(_FIter, _FIter, const _Tp&); 6242: 6242: template 6242: pair<_FIter, _FIter> 6242: equal_range(_FIter, _FIter, const _Tp&, _Compare); 6242: 6242: template 6242: void 6242: fill(_FIter, _FIter, const _Tp&); 6242: 6242: template 6242: _OIter 6242: fill_n(_OIter, _Size, const _Tp&); 6242: 6242: 6242: 6242: template 6242: _FIter1 6242: find_end(_FIter1, _FIter1, _FIter2, _FIter2); 6242: 6242: template 6242: _FIter1 6242: find_end(_FIter1, _FIter1, _FIter2, _FIter2, _BinaryPredicate); 6242: 6242: 6242: 6242: 6242: 6242: template 6242: _IIter 6242: find_if_not(_IIter, _IIter, _Predicate); 6242: 6242: 6242: 6242: 6242: 6242: 6242: template 6242: bool 6242: includes(_IIter1, _IIter1, _IIter2, _IIter2); 6242: 6242: template 6242: bool 6242: includes(_IIter1, _IIter1, _IIter2, _IIter2, _Compare); 6242: 6242: template 6242: void 6242: inplace_merge(_BIter, _BIter, _BIter); 6242: 6242: template 6242: void 6242: inplace_merge(_BIter, _BIter, _BIter, _Compare); 6242: 6242: 6242: template 6242: bool 6242: is_heap(_RAIter, _RAIter); 6242: 6242: template 6242: bool 6242: is_heap(_RAIter, _RAIter, _Compare); 6242: 6242: template 6242: _RAIter 6242: is_heap_until(_RAIter, _RAIter); 6242: 6242: template 6242: _RAIter 6242: is_heap_until(_RAIter, _RAIter, _Compare); 6242: 6242: template 6242: bool 6242: is_partitioned(_IIter, _IIter, _Predicate); 6242: 6242: template 6242: bool 6242: is_permutation(_FIter1, _FIter1, _FIter2); 6242: 6242: template 6242: bool 6242: is_permutation(_FIter1, _FIter1, _FIter2, _BinaryPredicate); 6242: 6242: template 6242: bool 6242: is_sorted(_FIter, _FIter); 6242: 6242: template 6242: bool 6242: is_sorted(_FIter, _FIter, _Compare); 6242: 6242: template 6242: _FIter 6242: is_sorted_until(_FIter, _FIter); 6242: 6242: template 6242: _FIter 6242: is_sorted_until(_FIter, _FIter, _Compare); 6242: 6242: 6242: template 6242: void 6242: iter_swap(_FIter1, _FIter2); 6242: 6242: template 6242: _FIter 6242: lower_bound(_FIter, _FIter, const _Tp&); 6242: 6242: template 6242: _FIter 6242: lower_bound(_FIter, _FIter, const _Tp&, _Compare); 6242: 6242: template 6242: void 6242: make_heap(_RAIter, _RAIter); 6242: 6242: template 6242: void 6242: make_heap(_RAIter, _RAIter, _Compare); 6242: 6242: template 6242: 6242: const _Tp& 6242: max(const _Tp&, const _Tp&); 6242: 6242: template 6242: 6242: const _Tp& 6242: max(const _Tp&, const _Tp&, _Compare); 6242: 6242: 6242: 6242: 6242: template 6242: 6242: const _Tp& 6242: min(const _Tp&, const _Tp&); 6242: 6242: template 6242: 6242: const _Tp& 6242: min(const _Tp&, const _Tp&, _Compare); 6242: 6242: 6242: 6242: 6242: template 6242: 6242: pair 6242: minmax(const _Tp&, const _Tp&); 6242: 6242: template 6242: 6242: pair 6242: minmax(const _Tp&, const _Tp&, _Compare); 6242: 6242: template 6242: 6242: pair<_FIter, _FIter> 6242: minmax_element(_FIter, _FIter); 6242: 6242: template 6242: 6242: pair<_FIter, _FIter> 6242: minmax_element(_FIter, _FIter, _Compare); 6242: 6242: template 6242: 6242: _Tp 6242: min(initializer_list<_Tp>); 6242: 6242: template 6242: 6242: _Tp 6242: min(initializer_list<_Tp>, _Compare); 6242: 6242: template 6242: 6242: _Tp 6242: max(initializer_list<_Tp>); 6242: 6242: template 6242: 6242: _Tp 6242: max(initializer_list<_Tp>, _Compare); 6242: 6242: template 6242: 6242: pair<_Tp, _Tp> 6242: minmax(initializer_list<_Tp>); 6242: 6242: template 6242: 6242: pair<_Tp, _Tp> 6242: minmax(initializer_list<_Tp>, _Compare); 6242: 6242: 6242: 6242: 6242: template 6242: bool 6242: next_permutation(_BIter, _BIter); 6242: 6242: template 6242: bool 6242: next_permutation(_BIter, _BIter, _Compare); 6242: 6242: 6242: template 6242: bool 6242: none_of(_IIter, _IIter, _Predicate); 6242: 6242: 6242: 6242: 6242: 6242: template 6242: _RAIter 6242: partial_sort_copy(_IIter, _IIter, _RAIter, _RAIter); 6242: 6242: template 6242: _RAIter 6242: partial_sort_copy(_IIter, _IIter, _RAIter, _RAIter, _Compare); 6242: 6242: 6242: 6242: 6242: template 6242: pair<_OIter1, _OIter2> 6242: partition_copy(_IIter, _IIter, _OIter1, _OIter2, _Predicate); 6242: 6242: template 6242: _FIter 6242: partition_point(_FIter, _FIter, _Predicate); 6242: 6242: 6242: template 6242: void 6242: pop_heap(_RAIter, _RAIter); 6242: 6242: template 6242: void 6242: pop_heap(_RAIter, _RAIter, _Compare); 6242: 6242: template 6242: bool 6242: prev_permutation(_BIter, _BIter); 6242: 6242: template 6242: bool 6242: prev_permutation(_BIter, _BIter, _Compare); 6242: 6242: template 6242: void 6242: push_heap(_RAIter, _RAIter); 6242: 6242: template 6242: void 6242: push_heap(_RAIter, _RAIter, _Compare); 6242: 6242: 6242: 6242: template 6242: _FIter 6242: remove(_FIter, _FIter, const _Tp&); 6242: 6242: template 6242: _FIter 6242: remove_if(_FIter, _FIter, _Predicate); 6242: 6242: template 6242: _OIter 6242: remove_copy(_IIter, _IIter, _OIter, const _Tp&); 6242: 6242: template 6242: _OIter 6242: remove_copy_if(_IIter, _IIter, _OIter, _Predicate); 6242: 6242: 6242: 6242: template 6242: _OIter 6242: replace_copy(_IIter, _IIter, _OIter, const _Tp&, const _Tp&); 6242: 6242: template 6242: _OIter 6242: replace_copy_if(_Iter, _Iter, _OIter, _Predicate, const _Tp&); 6242: 6242: 6242: 6242: template 6242: void 6242: reverse(_BIter, _BIter); 6242: 6242: template 6242: _OIter 6242: reverse_copy(_BIter, _BIter, _OIter); 6242: 6242: inline namespace _V2 6242: { 6242: template 6242: _FIter 6242: rotate(_FIter, _FIter, _FIter); 6242: } 6242: 6242: template 6242: _OIter 6242: rotate_copy(_FIter, _FIter, _FIter, _OIter); 6242: # 565 "/usr/include/c++/8/bits/algorithmfwd.h" 3 6242: template 6242: void 6242: shuffle(_RAIter, _RAIter, _UGenerator&&); 6242: 6242: 6242: template 6242: void 6242: sort_heap(_RAIter, _RAIter); 6242: 6242: template 6242: void 6242: sort_heap(_RAIter, _RAIter, _Compare); 6242: 6242: template 6242: _BIter 6242: stable_partition(_BIter, _BIter, _Predicate); 6242: # 594 "/usr/include/c++/8/bits/algorithmfwd.h" 3 6242: template 6242: _FIter2 6242: swap_ranges(_FIter1, _FIter1, _FIter2); 6242: 6242: 6242: 6242: template 6242: _FIter 6242: unique(_FIter, _FIter); 6242: 6242: template 6242: _FIter 6242: unique(_FIter, _FIter, _BinaryPredicate); 6242: 6242: 6242: 6242: template 6242: _FIter 6242: upper_bound(_FIter, _FIter, const _Tp&); 6242: 6242: template 6242: _FIter 6242: upper_bound(_FIter, _FIter, const _Tp&, _Compare); 6242: 6242: 6242: 6242: template 6242: _FIter 6242: adjacent_find(_FIter, _FIter); 6242: 6242: template 6242: _FIter 6242: adjacent_find(_FIter, _FIter, _BinaryPredicate); 6242: 6242: template 6242: typename iterator_traits<_IIter>::difference_type 6242: count(_IIter, _IIter, const _Tp&); 6242: 6242: template 6242: typename iterator_traits<_IIter>::difference_type 6242: count_if(_IIter, _IIter, _Predicate); 6242: 6242: template 6242: bool 6242: equal(_IIter1, _IIter1, _IIter2); 6242: 6242: template 6242: bool 6242: equal(_IIter1, _IIter1, _IIter2, _BinaryPredicate); 6242: 6242: template 6242: _IIter 6242: find(_IIter, _IIter, const _Tp&); 6242: 6242: template 6242: _FIter1 6242: find_first_of(_FIter1, _FIter1, _FIter2, _FIter2); 6242: 6242: template 6242: _FIter1 6242: find_first_of(_FIter1, _FIter1, _FIter2, _FIter2, _BinaryPredicate); 6242: 6242: template 6242: _IIter 6242: find_if(_IIter, _IIter, _Predicate); 6242: 6242: template 6242: _Funct 6242: for_each(_IIter, _IIter, _Funct); 6242: 6242: template 6242: void 6242: generate(_FIter, _FIter, _Generator); 6242: 6242: template 6242: _OIter 6242: generate_n(_OIter, _Size, _Generator); 6242: 6242: template 6242: bool 6242: lexicographical_compare(_IIter1, _IIter1, _IIter2, _IIter2); 6242: 6242: template 6242: bool 6242: lexicographical_compare(_IIter1, _IIter1, _IIter2, _IIter2, _Compare); 6242: 6242: template 6242: 6242: _FIter 6242: max_element(_FIter, _FIter); 6242: 6242: template 6242: 6242: _FIter 6242: max_element(_FIter, _FIter, _Compare); 6242: 6242: template 6242: _OIter 6242: merge(_IIter1, _IIter1, _IIter2, _IIter2, _OIter); 6242: 6242: template 6242: _OIter 6242: merge(_IIter1, _IIter1, _IIter2, _IIter2, _OIter, _Compare); 6242: 6242: template 6242: 6242: _FIter 6242: min_element(_FIter, _FIter); 6242: 6242: template 6242: 6242: _FIter 6242: min_element(_FIter, _FIter, _Compare); 6242: 6242: template 6242: pair<_IIter1, _IIter2> 6242: mismatch(_IIter1, _IIter1, _IIter2); 6242: 6242: template 6242: pair<_IIter1, _IIter2> 6242: mismatch(_IIter1, _IIter1, _IIter2, _BinaryPredicate); 6242: 6242: template 6242: void 6242: nth_element(_RAIter, _RAIter, _RAIter); 6242: 6242: template 6242: void 6242: nth_element(_RAIter, _RAIter, _RAIter, _Compare); 6242: 6242: template 6242: void 6242: partial_sort(_RAIter, _RAIter, _RAIter); 6242: 6242: template 6242: void 6242: partial_sort(_RAIter, _RAIter, _RAIter, _Compare); 6242: 6242: template 6242: _BIter 6242: partition(_BIter, _BIter, _Predicate); 6242: 6242: template 6242: void 6242: random_shuffle(_RAIter, _RAIter); 6242: 6242: template 6242: void 6242: random_shuffle(_RAIter, _RAIter, 6242: 6242: _Generator&&); 6242: 6242: 6242: 6242: 6242: template 6242: void 6242: replace(_FIter, _FIter, const _Tp&, const _Tp&); 6242: 6242: template 6242: void 6242: replace_if(_FIter, _FIter, _Predicate, const _Tp&); 6242: 6242: template 6242: _FIter1 6242: search(_FIter1, _FIter1, _FIter2, _FIter2); 6242: 6242: template 6242: _FIter1 6242: search(_FIter1, _FIter1, _FIter2, _FIter2, _BinaryPredicate); 6242: 6242: template 6242: _FIter 6242: search_n(_FIter, _FIter, _Size, const _Tp&); 6242: 6242: template 6242: _FIter 6242: search_n(_FIter, _FIter, _Size, const _Tp&, _BinaryPredicate); 6242: 6242: template 6242: _OIter 6242: set_difference(_IIter1, _IIter1, _IIter2, _IIter2, _OIter); 6242: 6242: template 6242: _OIter 6242: set_difference(_IIter1, _IIter1, _IIter2, _IIter2, _OIter, _Compare); 6242: 6242: template 6242: _OIter 6242: set_intersection(_IIter1, _IIter1, _IIter2, _IIter2, _OIter); 6242: 6242: template 6242: _OIter 6242: set_intersection(_IIter1, _IIter1, _IIter2, _IIter2, _OIter, _Compare); 6242: 6242: template 6242: _OIter 6242: set_symmetric_difference(_IIter1, _IIter1, _IIter2, _IIter2, _OIter); 6242: 6242: template 6242: _OIter 6242: set_symmetric_difference(_IIter1, _IIter1, _IIter2, _IIter2, 6242: _OIter, _Compare); 6242: 6242: template 6242: _OIter 6242: set_union(_IIter1, _IIter1, _IIter2, _IIter2, _OIter); 6242: 6242: template 6242: _OIter 6242: set_union(_IIter1, _IIter1, _IIter2, _IIter2, _OIter, _Compare); 6242: 6242: template 6242: void 6242: sort(_RAIter, _RAIter); 6242: 6242: template 6242: void 6242: sort(_RAIter, _RAIter, _Compare); 6242: 6242: template 6242: void 6242: stable_sort(_RAIter, _RAIter); 6242: 6242: template 6242: void 6242: stable_sort(_RAIter, _RAIter, _Compare); 6242: 6242: template 6242: _OIter 6242: transform(_IIter, _IIter, _OIter, _UnaryOperation); 6242: 6242: template 6242: _OIter 6242: transform(_IIter1, _IIter1, _IIter2, _OIter, _BinaryOperation); 6242: 6242: template 6242: _OIter 6242: unique_copy(_IIter, _IIter, _OIter); 6242: 6242: template 6242: _OIter 6242: unique_copy(_IIter, _IIter, _OIter, _BinaryPredicate); 6242: 6242: 6242: 6242: } 6242: # 61 "/usr/include/c++/8/bits/stl_algo.h" 2 3 6242: # 1 "/usr/include/c++/8/bits/stl_heap.h" 1 3 6242: # 62 "/usr/include/c++/8/bits/stl_heap.h" 3 6242: namespace std __attribute__ ((__visibility__ ("default"))) 6242: { 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: template 6242: _Distance 6242: __is_heap_until(_RandomAccessIterator __first, _Distance __n, 6242: _Compare& __comp) 6242: { 6242: _Distance __parent = 0; 6242: for (_Distance __child = 1; __child < __n; ++__child) 6242: { 6242: if (__comp(__first + __parent, __first + __child)) 6242: return __child; 6242: if ((__child & 1) == 0) 6242: ++__parent; 6242: } 6242: return __n; 6242: } 6242: 6242: 6242: 6242: template 6242: inline bool 6242: __is_heap(_RandomAccessIterator __first, _Distance __n) 6242: { 6242: __gnu_cxx::__ops::_Iter_less_iter __comp; 6242: return std::__is_heap_until(__first, __n, __comp) == __n; 6242: } 6242: 6242: template 6242: inline bool 6242: __is_heap(_RandomAccessIterator __first, _Compare __comp, _Distance __n) 6242: { 6242: typedef __decltype(__comp) _Cmp; 6242: __gnu_cxx::__ops::_Iter_comp_iter<_Cmp> __cmp(std::move(__comp)); 6242: return std::__is_heap_until(__first, __n, __cmp) == __n; 6242: } 6242: 6242: template 6242: inline bool 6242: __is_heap(_RandomAccessIterator __first, _RandomAccessIterator __last) 6242: { return std::__is_heap(__first, std::distance(__first, __last)); } 6242: 6242: template 6242: inline bool 6242: __is_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, 6242: _Compare __comp) 6242: { 6242: return std::__is_heap(__first, std::move(__comp), 6242: std::distance(__first, __last)); 6242: } 6242: 6242: 6242: 6242: 6242: template 6242: void 6242: __push_heap(_RandomAccessIterator __first, 6242: _Distance __holeIndex, _Distance __topIndex, _Tp __value, 6242: _Compare& __comp) 6242: { 6242: _Distance __parent = (__holeIndex - 1) / 2; 6242: while (__holeIndex > __topIndex && __comp(__first + __parent, __value)) 6242: { 6242: *(__first + __holeIndex) = std::move(*(__first + __parent)); 6242: __holeIndex = __parent; 6242: __parent = (__holeIndex - 1) / 2; 6242: } 6242: *(__first + __holeIndex) = std::move(__value); 6242: } 6242: # 152 "/usr/include/c++/8/bits/stl_heap.h" 3 6242: template 6242: inline void 6242: push_heap(_RandomAccessIterator __first, _RandomAccessIterator __last) 6242: { 6242: typedef typename iterator_traits<_RandomAccessIterator>::value_type 6242: _ValueType; 6242: typedef typename iterator_traits<_RandomAccessIterator>::difference_type 6242: _DistanceType; 6242: 6242: 6242: 6242: 6242: 6242: ; 6242: ; 6242: ; 6242: 6242: __gnu_cxx::__ops::_Iter_less_val __comp; 6242: _ValueType __value = std::move(*(__last - 1)); 6242: std::__push_heap(__first, _DistanceType((__last - __first) - 1), 6242: _DistanceType(0), std::move(__value), __comp); 6242: } 6242: # 187 "/usr/include/c++/8/bits/stl_heap.h" 3 6242: template 6242: inline void 6242: push_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, 6242: _Compare __comp) 6242: { 6242: typedef typename iterator_traits<_RandomAccessIterator>::value_type 6242: _ValueType; 6242: typedef typename iterator_traits<_RandomAccessIterator>::difference_type 6242: _DistanceType; 6242: 6242: 6242: 6242: 6242: ; 6242: ; 6242: ; 6242: 6242: __decltype(__gnu_cxx::__ops::__iter_comp_val(std::move(__comp))) 6242: __cmp(std::move(__comp)); 6242: _ValueType __value = std::move(*(__last - 1)); 6242: std::__push_heap(__first, _DistanceType((__last - __first) - 1), 6242: _DistanceType(0), std::move(__value), __cmp); 6242: } 6242: 6242: template 6242: void 6242: __adjust_heap(_RandomAccessIterator __first, _Distance __holeIndex, 6242: _Distance __len, _Tp __value, _Compare __comp) 6242: { 6242: const _Distance __topIndex = __holeIndex; 6242: _Distance __secondChild = __holeIndex; 6242: while (__secondChild < (__len - 1) / 2) 6242: { 6242: __secondChild = 2 * (__secondChild + 1); 6242: if (__comp(__first + __secondChild, 6242: __first + (__secondChild - 1))) 6242: __secondChild--; 6242: *(__first + __holeIndex) = std::move(*(__first + __secondChild)); 6242: __holeIndex = __secondChild; 6242: } 6242: if ((__len & 1) == 0 && __secondChild == (__len - 2) / 2) 6242: { 6242: __secondChild = 2 * (__secondChild + 1); 6242: *(__first + __holeIndex) = std::move(*(__first + (__secondChild - 1))) 6242: ; 6242: __holeIndex = __secondChild - 1; 6242: } 6242: __decltype(__gnu_cxx::__ops::__iter_comp_val(std::move(__comp))) 6242: __cmp(std::move(__comp)); 6242: std::__push_heap(__first, __holeIndex, __topIndex, 6242: std::move(__value), __cmp); 6242: } 6242: 6242: template 6242: inline void 6242: __pop_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, 6242: _RandomAccessIterator __result, _Compare& __comp) 6242: { 6242: typedef typename iterator_traits<_RandomAccessIterator>::value_type 6242: _ValueType; 6242: typedef typename iterator_traits<_RandomAccessIterator>::difference_type 6242: _DistanceType; 6242: 6242: _ValueType __value = std::move(*__result); 6242: *__result = std::move(*__first); 6242: std::__adjust_heap(__first, _DistanceType(0), 6242: _DistanceType(__last - __first), 6242: std::move(__value), __comp); 6242: } 6242: # 269 "/usr/include/c++/8/bits/stl_heap.h" 3 6242: template 6242: inline void 6242: pop_heap(_RandomAccessIterator __first, _RandomAccessIterator __last) 6242: { 6242: 6242: 6242: 6242: 6242: 6242: ; 6242: ; 6242: ; 6242: ; 6242: 6242: if (__last - __first > 1) 6242: { 6242: --__last; 6242: __gnu_cxx::__ops::_Iter_less_iter __comp; 6242: std::__pop_heap(__first, __last, __last, __comp); 6242: } 6242: } 6242: # 302 "/usr/include/c++/8/bits/stl_heap.h" 3 6242: template 6242: inline void 6242: pop_heap(_RandomAccessIterator __first, 6242: _RandomAccessIterator __last, _Compare __comp) 6242: { 6242: 6242: 6242: 6242: ; 6242: ; 6242: ; 6242: ; 6242: 6242: if (__last - __first > 1) 6242: { 6242: typedef __decltype(__comp) _Cmp; 6242: __gnu_cxx::__ops::_Iter_comp_iter<_Cmp> __cmp(std::move(__comp)); 6242: --__last; 6242: std::__pop_heap(__first, __last, __last, __cmp); 6242: } 6242: } 6242: 6242: template 6242: void 6242: __make_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, 6242: _Compare& __comp) 6242: { 6242: typedef typename iterator_traits<_RandomAccessIterator>::value_type 6242: _ValueType; 6242: typedef typename iterator_traits<_RandomAccessIterator>::difference_type 6242: _DistanceType; 6242: 6242: if (__last - __first < 2) 6242: return; 6242: 6242: const _DistanceType __len = __last - __first; 6242: _DistanceType __parent = (__len - 2) / 2; 6242: while (true) 6242: { 6242: _ValueType __value = std::move(*(__first + __parent)); 6242: std::__adjust_heap(__first, __parent, __len, std::move(__value), 6242: __comp); 6242: if (__parent == 0) 6242: return; 6242: __parent--; 6242: } 6242: } 6242: # 358 "/usr/include/c++/8/bits/stl_heap.h" 3 6242: template 6242: inline void 6242: make_heap(_RandomAccessIterator __first, _RandomAccessIterator __last) 6242: { 6242: 6242: 6242: 6242: 6242: 6242: ; 6242: ; 6242: 6242: __gnu_cxx::__ops::_Iter_less_iter __comp; 6242: std::__make_heap(__first, __last, __comp); 6242: } 6242: # 384 "/usr/include/c++/8/bits/stl_heap.h" 3 6242: template 6242: inline void 6242: make_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, 6242: _Compare __comp) 6242: { 6242: 6242: 6242: 6242: ; 6242: ; 6242: 6242: typedef __decltype(__comp) _Cmp; 6242: __gnu_cxx::__ops::_Iter_comp_iter<_Cmp> __cmp(std::move(__comp)); 6242: std::__make_heap(__first, __last, __cmp); 6242: } 6242: 6242: template 6242: void 6242: __sort_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, 6242: _Compare& __comp) 6242: { 6242: while (__last - __first > 1) 6242: { 6242: --__last; 6242: std::__pop_heap(__first, __last, __last, __comp); 6242: } 6242: } 6242: # 420 "/usr/include/c++/8/bits/stl_heap.h" 3 6242: template 6242: inline void 6242: sort_heap(_RandomAccessIterator __first, _RandomAccessIterator __last) 6242: { 6242: 6242: 6242: 6242: 6242: 6242: ; 6242: ; 6242: ; 6242: 6242: __gnu_cxx::__ops::_Iter_less_iter __comp; 6242: std::__sort_heap(__first, __last, __comp); 6242: } 6242: # 447 "/usr/include/c++/8/bits/stl_heap.h" 3 6242: template 6242: inline void 6242: sort_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, 6242: _Compare __comp) 6242: { 6242: 6242: 6242: 6242: ; 6242: ; 6242: ; 6242: 6242: typedef __decltype(__comp) _Cmp; 6242: __gnu_cxx::__ops::_Iter_comp_iter<_Cmp> __cmp(std::move(__comp)); 6242: std::__sort_heap(__first, __last, __cmp); 6242: } 6242: # 475 "/usr/include/c++/8/bits/stl_heap.h" 3 6242: template 6242: inline _RandomAccessIterator 6242: is_heap_until(_RandomAccessIterator __first, _RandomAccessIterator __last) 6242: { 6242: 6242: 6242: 6242: 6242: 6242: ; 6242: ; 6242: 6242: __gnu_cxx::__ops::_Iter_less_iter __comp; 6242: return __first + 6242: std::__is_heap_until(__first, std::distance(__first, __last), __comp); 6242: } 6242: # 503 "/usr/include/c++/8/bits/stl_heap.h" 3 6242: template 6242: inline _RandomAccessIterator 6242: is_heap_until(_RandomAccessIterator __first, _RandomAccessIterator __last, 6242: _Compare __comp) 6242: { 6242: 6242: 6242: 6242: ; 6242: ; 6242: 6242: typedef __decltype(__comp) _Cmp; 6242: __gnu_cxx::__ops::_Iter_comp_iter<_Cmp> __cmp(std::move(__comp)); 6242: return __first 6242: + std::__is_heap_until(__first, std::distance(__first, __last), __cmp); 6242: } 6242: # 527 "/usr/include/c++/8/bits/stl_heap.h" 3 6242: template 6242: inline bool 6242: is_heap(_RandomAccessIterator __first, _RandomAccessIterator __last) 6242: { return std::is_heap_until(__first, __last) == __last; } 6242: # 540 "/usr/include/c++/8/bits/stl_heap.h" 3 6242: template 6242: inline bool 6242: is_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, 6242: _Compare __comp) 6242: { 6242: 6242: 6242: 6242: ; 6242: ; 6242: 6242: const auto __dist = std::distance(__first, __last); 6242: typedef __decltype(__comp) _Cmp; 6242: __gnu_cxx::__ops::_Iter_comp_iter<_Cmp> __cmp(std::move(__comp)); 6242: return std::__is_heap_until(__first, __dist, __cmp) == __dist; 6242: } 6242: 6242: 6242: 6242: } 6242: # 62 "/usr/include/c++/8/bits/stl_algo.h" 2 3 6242: # 1 "/usr/include/c++/8/bits/stl_tempbuf.h" 1 3 6242: # 62 "/usr/include/c++/8/bits/stl_tempbuf.h" 3 6242: namespace std __attribute__ ((__visibility__ ("default"))) 6242: { 6242: 6242: # 83 "/usr/include/c++/8/bits/stl_tempbuf.h" 3 6242: template 6242: pair<_Tp*, ptrdiff_t> 6242: get_temporary_buffer(ptrdiff_t __len) noexcept 6242: { 6242: const ptrdiff_t __max = 6242: __gnu_cxx::__numeric_traits::__max / sizeof(_Tp); 6242: if (__len > __max) 6242: __len = __max; 6242: 6242: while (__len > 0) 6242: { 6242: _Tp* __tmp = static_cast<_Tp*>(::operator new(__len * sizeof(_Tp), 6242: std::nothrow)); 6242: if (__tmp != 0) 6242: return std::pair<_Tp*, ptrdiff_t>(__tmp, __len); 6242: __len /= 2; 6242: } 6242: return std::pair<_Tp*, ptrdiff_t>(static_cast<_Tp*>(0), 0); 6242: } 6242: # 110 "/usr/include/c++/8/bits/stl_tempbuf.h" 3 6242: template 6242: inline void 6242: return_temporary_buffer(_Tp* __p) 6242: { ::operator delete(__p, std::nothrow); } 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: template 6242: class _Temporary_buffer 6242: { 6242: 6242: 6242: 6242: public: 6242: typedef _Tp value_type; 6242: typedef value_type* pointer; 6242: typedef pointer iterator; 6242: typedef ptrdiff_t size_type; 6242: 6242: protected: 6242: size_type _M_original_len; 6242: size_type _M_len; 6242: pointer _M_buffer; 6242: 6242: public: 6242: 6242: size_type 6242: size() const 6242: { return _M_len; } 6242: 6242: 6242: size_type 6242: requested_size() const 6242: { return _M_original_len; } 6242: 6242: 6242: iterator 6242: begin() 6242: { return _M_buffer; } 6242: 6242: 6242: iterator 6242: end() 6242: { return _M_buffer + _M_len; } 6242: 6242: 6242: 6242: 6242: 6242: _Temporary_buffer(_ForwardIterator __first, _ForwardIterator __last); 6242: 6242: ~_Temporary_buffer() 6242: { 6242: std::_Destroy(_M_buffer, _M_buffer + _M_len); 6242: std::return_temporary_buffer(_M_buffer); 6242: } 6242: 6242: private: 6242: 6242: _Temporary_buffer(const _Temporary_buffer&); 6242: 6242: void 6242: operator=(const _Temporary_buffer&); 6242: }; 6242: 6242: 6242: template 6242: struct __uninitialized_construct_buf_dispatch 6242: { 6242: template 6242: static void 6242: __ucr(_Pointer __first, _Pointer __last, 6242: _ForwardIterator __seed) 6242: { 6242: if(__first == __last) 6242: return; 6242: 6242: _Pointer __cur = __first; 6242: try 6242: { 6242: std::_Construct(std::__addressof(*__first), 6242: std::move(*__seed)); 6242: _Pointer __prev = __cur; 6242: ++__cur; 6242: for(; __cur != __last; ++__cur, ++__prev) 6242: std::_Construct(std::__addressof(*__cur), 6242: std::move(*__prev)); 6242: *__seed = std::move(*__prev); 6242: } 6242: catch(...) 6242: { 6242: std::_Destroy(__first, __cur); 6242: throw; 6242: } 6242: } 6242: }; 6242: 6242: template<> 6242: struct __uninitialized_construct_buf_dispatch 6242: { 6242: template 6242: static void 6242: __ucr(_Pointer, _Pointer, _ForwardIterator) { } 6242: }; 6242: # 229 "/usr/include/c++/8/bits/stl_tempbuf.h" 3 6242: template 6242: inline void 6242: __uninitialized_construct_buf(_Pointer __first, _Pointer __last, 6242: _ForwardIterator __seed) 6242: { 6242: typedef typename std::iterator_traits<_Pointer>::value_type 6242: _ValueType; 6242: 6242: std::__uninitialized_construct_buf_dispatch< 6242: __has_trivial_constructor(_ValueType)>:: 6242: __ucr(__first, __last, __seed); 6242: } 6242: 6242: template 6242: _Temporary_buffer<_ForwardIterator, _Tp>:: 6242: _Temporary_buffer(_ForwardIterator __first, _ForwardIterator __last) 6242: : _M_original_len(std::distance(__first, __last)), 6242: _M_len(0), _M_buffer(0) 6242: { 6242: try 6242: { 6242: std::pair __p(std::get_temporary_buffer< 6242: value_type>(_M_original_len)); 6242: _M_buffer = __p.first; 6242: _M_len = __p.second; 6242: if (_M_buffer) 6242: std::__uninitialized_construct_buf(_M_buffer, _M_buffer + _M_len, 6242: __first); 6242: } 6242: catch(...) 6242: { 6242: std::return_temporary_buffer(_M_buffer); 6242: _M_buffer = 0; 6242: _M_len = 0; 6242: throw; 6242: } 6242: } 6242: 6242: 6242: } 6242: # 63 "/usr/include/c++/8/bits/stl_algo.h" 2 3 6242: 6242: 6242: 6242: # 1 "/usr/include/c++/8/bits/uniform_int_dist.h" 1 3 6242: # 37 "/usr/include/c++/8/bits/uniform_int_dist.h" 3 6242: namespace std __attribute__ ((__visibility__ ("default"))) 6242: { 6242: 6242: 6242: namespace __detail 6242: { 6242: 6242: template 6242: inline bool 6242: _Power_of_2(_Tp __x) 6242: { 6242: return ((__x - 1) & __x) == 0; 6242: } 6242: } 6242: 6242: 6242: 6242: 6242: 6242: 6242: template 6242: class uniform_int_distribution 6242: { 6242: static_assert(std::is_integral<_IntType>::value, 6242: "template argument must be an integral type"); 6242: 6242: public: 6242: 6242: typedef _IntType result_type; 6242: 6242: struct param_type 6242: { 6242: typedef uniform_int_distribution<_IntType> distribution_type; 6242: 6242: explicit 6242: param_type(_IntType __a = 0, 6242: _IntType __b = std::numeric_limits<_IntType>::max()) 6242: : _M_a(__a), _M_b(__b) 6242: { 6242: ; 6242: } 6242: 6242: result_type 6242: a() const 6242: { return _M_a; } 6242: 6242: result_type 6242: b() const 6242: { return _M_b; } 6242: 6242: friend bool 6242: operator==(const param_type& __p1, const param_type& __p2) 6242: { return __p1._M_a == __p2._M_a && __p1._M_b == __p2._M_b; } 6242: 6242: friend bool 6242: operator!=(const param_type& __p1, const param_type& __p2) 6242: { return !(__p1 == __p2); } 6242: 6242: private: 6242: _IntType _M_a; 6242: _IntType _M_b; 6242: }; 6242: 6242: public: 6242: 6242: 6242: 6242: explicit 6242: uniform_int_distribution(_IntType __a = 0, 6242: _IntType __b = std::numeric_limits<_IntType>::max()) 6242: : _M_param(__a, __b) 6242: { } 6242: 6242: explicit 6242: uniform_int_distribution(const param_type& __p) 6242: : _M_param(__p) 6242: { } 6242: 6242: 6242: 6242: 6242: 6242: 6242: void 6242: reset() { } 6242: 6242: result_type 6242: a() const 6242: { return _M_param.a(); } 6242: 6242: result_type 6242: b() const 6242: { return _M_param.b(); } 6242: 6242: 6242: 6242: 6242: param_type 6242: param() const 6242: { return _M_param; } 6242: 6242: 6242: 6242: 6242: 6242: void 6242: param(const param_type& __param) 6242: { _M_param = __param; } 6242: 6242: 6242: 6242: 6242: result_type 6242: min() const 6242: { return this->a(); } 6242: 6242: 6242: 6242: 6242: result_type 6242: max() const 6242: { return this->b(); } 6242: 6242: 6242: 6242: 6242: template 6242: result_type 6242: operator()(_UniformRandomNumberGenerator& __urng) 6242: { return this->operator()(__urng, _M_param); } 6242: 6242: template 6242: result_type 6242: operator()(_UniformRandomNumberGenerator& __urng, 6242: const param_type& __p); 6242: 6242: template 6242: void 6242: __generate(_ForwardIterator __f, _ForwardIterator __t, 6242: _UniformRandomNumberGenerator& __urng) 6242: { this->__generate(__f, __t, __urng, _M_param); } 6242: 6242: template 6242: void 6242: __generate(_ForwardIterator __f, _ForwardIterator __t, 6242: _UniformRandomNumberGenerator& __urng, 6242: const param_type& __p) 6242: { this->__generate_impl(__f, __t, __urng, __p); } 6242: 6242: template 6242: void 6242: __generate(result_type* __f, result_type* __t, 6242: _UniformRandomNumberGenerator& __urng, 6242: const param_type& __p) 6242: { this->__generate_impl(__f, __t, __urng, __p); } 6242: 6242: 6242: 6242: 6242: 6242: friend bool 6242: operator==(const uniform_int_distribution& __d1, 6242: const uniform_int_distribution& __d2) 6242: { return __d1._M_param == __d2._M_param; } 6242: 6242: private: 6242: template 6242: void 6242: __generate_impl(_ForwardIterator __f, _ForwardIterator __t, 6242: _UniformRandomNumberGenerator& __urng, 6242: const param_type& __p); 6242: 6242: param_type _M_param; 6242: }; 6242: 6242: template 6242: template 6242: typename uniform_int_distribution<_IntType>::result_type 6242: uniform_int_distribution<_IntType>:: 6242: operator()(_UniformRandomNumberGenerator& __urng, 6242: const param_type& __param) 6242: { 6242: typedef typename _UniformRandomNumberGenerator::result_type 6242: _Gresult_type; 6242: typedef typename std::make_unsigned::type __utype; 6242: typedef typename std::common_type<_Gresult_type, __utype>::type 6242: __uctype; 6242: 6242: const __uctype __urngmin = __urng.min(); 6242: const __uctype __urngmax = __urng.max(); 6242: const __uctype __urngrange = __urngmax - __urngmin; 6242: const __uctype __urange 6242: = __uctype(__param.b()) - __uctype(__param.a()); 6242: 6242: __uctype __ret; 6242: 6242: if (__urngrange > __urange) 6242: { 6242: 6242: const __uctype __uerange = __urange + 1; 6242: const __uctype __scaling = __urngrange / __uerange; 6242: const __uctype __past = __uerange * __scaling; 6242: do 6242: __ret = __uctype(__urng()) - __urngmin; 6242: while (__ret >= __past); 6242: __ret /= __scaling; 6242: } 6242: else if (__urngrange < __urange) 6242: { 6242: # 264 "/usr/include/c++/8/bits/uniform_int_dist.h" 3 6242: __uctype __tmp; 6242: do 6242: { 6242: const __uctype __uerngrange = __urngrange + 1; 6242: __tmp = (__uerngrange * operator() 6242: (__urng, param_type(0, __urange / __uerngrange))); 6242: __ret = __tmp + (__uctype(__urng()) - __urngmin); 6242: } 6242: while (__ret > __urange || __ret < __tmp); 6242: } 6242: else 6242: __ret = __uctype(__urng()) - __urngmin; 6242: 6242: return __ret + __param.a(); 6242: } 6242: 6242: 6242: template 6242: template 6242: void 6242: uniform_int_distribution<_IntType>:: 6242: __generate_impl(_ForwardIterator __f, _ForwardIterator __t, 6242: _UniformRandomNumberGenerator& __urng, 6242: const param_type& __param) 6242: { 6242: 6242: typedef typename _UniformRandomNumberGenerator::result_type 6242: _Gresult_type; 6242: typedef typename std::make_unsigned::type __utype; 6242: typedef typename std::common_type<_Gresult_type, __utype>::type 6242: __uctype; 6242: 6242: const __uctype __urngmin = __urng.min(); 6242: const __uctype __urngmax = __urng.max(); 6242: const __uctype __urngrange = __urngmax - __urngmin; 6242: const __uctype __urange 6242: = __uctype(__param.b()) - __uctype(__param.a()); 6242: 6242: __uctype __ret; 6242: 6242: if (__urngrange > __urange) 6242: { 6242: if (__detail::_Power_of_2(__urngrange + 1) 6242: && __detail::_Power_of_2(__urange + 1)) 6242: { 6242: while (__f != __t) 6242: { 6242: __ret = __uctype(__urng()) - __urngmin; 6242: *__f++ = (__ret & __urange) + __param.a(); 6242: } 6242: } 6242: else 6242: { 6242: 6242: const __uctype __uerange = __urange + 1; 6242: const __uctype __scaling = __urngrange / __uerange; 6242: const __uctype __past = __uerange * __scaling; 6242: while (__f != __t) 6242: { 6242: do 6242: __ret = __uctype(__urng()) - __urngmin; 6242: while (__ret >= __past); 6242: *__f++ = __ret / __scaling + __param.a(); 6242: } 6242: } 6242: } 6242: else if (__urngrange < __urange) 6242: { 6242: # 348 "/usr/include/c++/8/bits/uniform_int_dist.h" 3 6242: __uctype __tmp; 6242: while (__f != __t) 6242: { 6242: do 6242: { 6242: const __uctype __uerngrange = __urngrange + 1; 6242: __tmp = (__uerngrange * operator() 6242: (__urng, param_type(0, __urange / __uerngrange))); 6242: __ret = __tmp + (__uctype(__urng()) - __urngmin); 6242: } 6242: while (__ret > __urange || __ret < __tmp); 6242: *__f++ = __ret; 6242: } 6242: } 6242: else 6242: while (__f != __t) 6242: *__f++ = __uctype(__urng()) - __urngmin + __param.a(); 6242: } 6242: 6242: 6242: 6242: 6242: } 6242: # 67 "/usr/include/c++/8/bits/stl_algo.h" 2 3 6242: 6242: 6242: 6242: 6242: namespace std __attribute__ ((__visibility__ ("default"))) 6242: { 6242: 6242: 6242: 6242: template 6242: void 6242: __move_median_to_first(_Iterator __result,_Iterator __a, _Iterator __b, 6242: _Iterator __c, _Compare __comp) 6242: { 6242: if (__comp(__a, __b)) 6242: { 6242: if (__comp(__b, __c)) 6242: std::iter_swap(__result, __b); 6242: else if (__comp(__a, __c)) 6242: std::iter_swap(__result, __c); 6242: else 6242: std::iter_swap(__result, __a); 6242: } 6242: else if (__comp(__a, __c)) 6242: std::iter_swap(__result, __a); 6242: else if (__comp(__b, __c)) 6242: std::iter_swap(__result, __c); 6242: else 6242: std::iter_swap(__result, __b); 6242: } 6242: 6242: 6242: template 6242: inline _InputIterator 6242: __find_if(_InputIterator __first, _InputIterator __last, 6242: _Predicate __pred, input_iterator_tag) 6242: { 6242: while (__first != __last && !__pred(__first)) 6242: ++__first; 6242: return __first; 6242: } 6242: 6242: 6242: template 6242: _RandomAccessIterator 6242: __find_if(_RandomAccessIterator __first, _RandomAccessIterator __last, 6242: _Predicate __pred, random_access_iterator_tag) 6242: { 6242: typename iterator_traits<_RandomAccessIterator>::difference_type 6242: __trip_count = (__last - __first) >> 2; 6242: 6242: for (; __trip_count > 0; --__trip_count) 6242: { 6242: if (__pred(__first)) 6242: return __first; 6242: ++__first; 6242: 6242: if (__pred(__first)) 6242: return __first; 6242: ++__first; 6242: 6242: if (__pred(__first)) 6242: return __first; 6242: ++__first; 6242: 6242: if (__pred(__first)) 6242: return __first; 6242: ++__first; 6242: } 6242: 6242: switch (__last - __first) 6242: { 6242: case 3: 6242: if (__pred(__first)) 6242: return __first; 6242: ++__first; 6242: case 2: 6242: if (__pred(__first)) 6242: return __first; 6242: ++__first; 6242: case 1: 6242: if (__pred(__first)) 6242: return __first; 6242: ++__first; 6242: case 0: 6242: default: 6242: return __last; 6242: } 6242: } 6242: 6242: template 6242: inline _Iterator 6242: __find_if(_Iterator __first, _Iterator __last, _Predicate __pred) 6242: { 6242: return __find_if(__first, __last, __pred, 6242: std::__iterator_category(__first)); 6242: } 6242: 6242: 6242: template 6242: inline _InputIterator 6242: __find_if_not(_InputIterator __first, _InputIterator __last, 6242: _Predicate __pred) 6242: { 6242: return std::__find_if(__first, __last, 6242: __gnu_cxx::__ops::__negate(__pred), 6242: std::__iterator_category(__first)); 6242: } 6242: 6242: 6242: 6242: 6242: template 6242: _InputIterator 6242: __find_if_not_n(_InputIterator __first, _Distance& __len, _Predicate __pred) 6242: { 6242: for (; __len; --__len, (void) ++__first) 6242: if (!__pred(__first)) 6242: break; 6242: return __first; 6242: } 6242: # 202 "/usr/include/c++/8/bits/stl_algo.h" 3 6242: template 6242: _ForwardIterator1 6242: __search(_ForwardIterator1 __first1, _ForwardIterator1 __last1, 6242: _ForwardIterator2 __first2, _ForwardIterator2 __last2, 6242: _BinaryPredicate __predicate) 6242: { 6242: 6242: if (__first1 == __last1 || __first2 == __last2) 6242: return __first1; 6242: 6242: 6242: _ForwardIterator2 __p1(__first2); 6242: if (++__p1 == __last2) 6242: return std::__find_if(__first1, __last1, 6242: __gnu_cxx::__ops::__iter_comp_iter(__predicate, __first2)); 6242: 6242: 6242: _ForwardIterator2 __p; 6242: _ForwardIterator1 __current = __first1; 6242: 6242: for (;;) 6242: { 6242: __first1 = 6242: std::__find_if(__first1, __last1, 6242: __gnu_cxx::__ops::__iter_comp_iter(__predicate, __first2)); 6242: 6242: if (__first1 == __last1) 6242: return __last1; 6242: 6242: __p = __p1; 6242: __current = __first1; 6242: if (++__current == __last1) 6242: return __last1; 6242: 6242: while (__predicate(__current, __p)) 6242: { 6242: if (++__p == __last2) 6242: return __first1; 6242: if (++__current == __last1) 6242: return __last1; 6242: } 6242: ++__first1; 6242: } 6242: return __first1; 6242: } 6242: 6242: 6242: 6242: 6242: 6242: 6242: template 6242: _ForwardIterator 6242: __search_n_aux(_ForwardIterator __first, _ForwardIterator __last, 6242: _Integer __count, _UnaryPredicate __unary_pred, 6242: std::forward_iterator_tag) 6242: { 6242: __first = std::__find_if(__first, __last, __unary_pred); 6242: while (__first != __last) 6242: { 6242: typename iterator_traits<_ForwardIterator>::difference_type 6242: __n = __count; 6242: _ForwardIterator __i = __first; 6242: ++__i; 6242: while (__i != __last && __n != 1 && __unary_pred(__i)) 6242: { 6242: ++__i; 6242: --__n; 6242: } 6242: if (__n == 1) 6242: return __first; 6242: if (__i == __last) 6242: return __last; 6242: __first = std::__find_if(++__i, __last, __unary_pred); 6242: } 6242: return __last; 6242: } 6242: 6242: 6242: 6242: 6242: 6242: template 6242: _RandomAccessIter 6242: __search_n_aux(_RandomAccessIter __first, _RandomAccessIter __last, 6242: _Integer __count, _UnaryPredicate __unary_pred, 6242: std::random_access_iterator_tag) 6242: { 6242: typedef typename std::iterator_traits<_RandomAccessIter>::difference_type 6242: _DistanceType; 6242: 6242: _DistanceType __tailSize = __last - __first; 6242: _DistanceType __remainder = __count; 6242: 6242: while (__remainder <= __tailSize) 6242: { 6242: __first += __remainder; 6242: __tailSize -= __remainder; 6242: 6242: 6242: _RandomAccessIter __backTrack = __first; 6242: while (__unary_pred(--__backTrack)) 6242: { 6242: if (--__remainder == 0) 6242: return (__first - __count); 6242: } 6242: __remainder = __count + 1 - (__first - __backTrack); 6242: } 6242: return __last; 6242: } 6242: 6242: template 6242: _ForwardIterator 6242: __search_n(_ForwardIterator __first, _ForwardIterator __last, 6242: _Integer __count, 6242: _UnaryPredicate __unary_pred) 6242: { 6242: if (__count <= 0) 6242: return __first; 6242: 6242: if (__count == 1) 6242: return std::__find_if(__first, __last, __unary_pred); 6242: 6242: return std::__search_n_aux(__first, __last, __count, __unary_pred, 6242: std::__iterator_category(__first)); 6242: } 6242: 6242: 6242: template 6242: _ForwardIterator1 6242: __find_end(_ForwardIterator1 __first1, _ForwardIterator1 __last1, 6242: _ForwardIterator2 __first2, _ForwardIterator2 __last2, 6242: forward_iterator_tag, forward_iterator_tag, 6242: _BinaryPredicate __comp) 6242: { 6242: if (__first2 == __last2) 6242: return __last1; 6242: 6242: _ForwardIterator1 __result = __last1; 6242: while (1) 6242: { 6242: _ForwardIterator1 __new_result 6242: = std::__search(__first1, __last1, __first2, __last2, __comp); 6242: if (__new_result == __last1) 6242: return __result; 6242: else 6242: { 6242: __result = __new_result; 6242: __first1 = __new_result; 6242: ++__first1; 6242: } 6242: } 6242: } 6242: 6242: 6242: template 6242: _BidirectionalIterator1 6242: __find_end(_BidirectionalIterator1 __first1, 6242: _BidirectionalIterator1 __last1, 6242: _BidirectionalIterator2 __first2, 6242: _BidirectionalIterator2 __last2, 6242: bidirectional_iterator_tag, bidirectional_iterator_tag, 6242: _BinaryPredicate __comp) 6242: { 6242: 6242: 6242: 6242: 6242: 6242: 6242: typedef reverse_iterator<_BidirectionalIterator1> _RevIterator1; 6242: typedef reverse_iterator<_BidirectionalIterator2> _RevIterator2; 6242: 6242: _RevIterator1 __rlast1(__first1); 6242: _RevIterator2 __rlast2(__first2); 6242: _RevIterator1 __rresult = std::__search(_RevIterator1(__last1), __rlast1, 6242: _RevIterator2(__last2), __rlast2, 6242: __comp); 6242: 6242: if (__rresult == __rlast1) 6242: return __last1; 6242: else 6242: { 6242: _BidirectionalIterator1 __result = __rresult.base(); 6242: std::advance(__result, -std::distance(__first2, __last2)); 6242: return __result; 6242: } 6242: } 6242: # 423 "/usr/include/c++/8/bits/stl_algo.h" 3 6242: template 6242: inline _ForwardIterator1 6242: find_end(_ForwardIterator1 __first1, _ForwardIterator1 __last1, 6242: _ForwardIterator2 __first2, _ForwardIterator2 __last2) 6242: { 6242: 6242: 6242: 6242: 6242: 6242: 6242: ; 6242: ; 6242: 6242: return std::__find_end(__first1, __last1, __first2, __last2, 6242: std::__iterator_category(__first1), 6242: std::__iterator_category(__first2), 6242: __gnu_cxx::__ops::__iter_equal_to_iter()); 6242: } 6242: # 471 "/usr/include/c++/8/bits/stl_algo.h" 3 6242: template 6242: inline _ForwardIterator1 6242: find_end(_ForwardIterator1 __first1, _ForwardIterator1 __last1, 6242: _ForwardIterator2 __first2, _ForwardIterator2 __last2, 6242: _BinaryPredicate __comp) 6242: { 6242: 6242: 6242: 6242: 6242: 6242: 6242: ; 6242: ; 6242: 6242: return std::__find_end(__first1, __last1, __first2, __last2, 6242: std::__iterator_category(__first1), 6242: std::__iterator_category(__first2), 6242: __gnu_cxx::__ops::__iter_comp_iter(__comp)); 6242: } 6242: # 506 "/usr/include/c++/8/bits/stl_algo.h" 3 6242: template 6242: inline bool 6242: all_of(_InputIterator __first, _InputIterator __last, _Predicate __pred) 6242: { return __last == std::find_if_not(__first, __last, __pred); } 6242: # 523 "/usr/include/c++/8/bits/stl_algo.h" 3 6242: template 6242: inline bool 6242: none_of(_InputIterator __first, _InputIterator __last, _Predicate __pred) 6242: { return __last == std::find_if(__first, __last, __pred); } 6242: # 541 "/usr/include/c++/8/bits/stl_algo.h" 3 6242: template 6242: inline bool 6242: any_of(_InputIterator __first, _InputIterator __last, _Predicate __pred) 6242: { return !std::none_of(__first, __last, __pred); } 6242: # 556 "/usr/include/c++/8/bits/stl_algo.h" 3 6242: template 6242: inline _InputIterator 6242: find_if_not(_InputIterator __first, _InputIterator __last, 6242: _Predicate __pred) 6242: { 6242: 6242: 6242: 6242: 6242: ; 6242: return std::__find_if_not(__first, __last, 6242: __gnu_cxx::__ops::__pred_iter(__pred)); 6242: } 6242: # 580 "/usr/include/c++/8/bits/stl_algo.h" 3 6242: template 6242: inline bool 6242: is_partitioned(_InputIterator __first, _InputIterator __last, 6242: _Predicate __pred) 6242: { 6242: __first = std::find_if_not(__first, __last, __pred); 6242: if (__first == __last) 6242: return true; 6242: ++__first; 6242: return std::none_of(__first, __last, __pred); 6242: } 6242: # 601 "/usr/include/c++/8/bits/stl_algo.h" 3 6242: template 6242: _ForwardIterator 6242: partition_point(_ForwardIterator __first, _ForwardIterator __last, 6242: _Predicate __pred) 6242: { 6242: 6242: 6242: 6242: 6242: 6242: 6242: ; 6242: 6242: typedef typename iterator_traits<_ForwardIterator>::difference_type 6242: _DistanceType; 6242: 6242: _DistanceType __len = std::distance(__first, __last); 6242: _DistanceType __half; 6242: _ForwardIterator __middle; 6242: 6242: while (__len > 0) 6242: { 6242: __half = __len >> 1; 6242: __middle = __first; 6242: std::advance(__middle, __half); 6242: if (__pred(*__middle)) 6242: { 6242: __first = __middle; 6242: ++__first; 6242: __len = __len - __half - 1; 6242: } 6242: else 6242: __len = __half; 6242: } 6242: return __first; 6242: } 6242: 6242: 6242: template 6242: _OutputIterator 6242: __remove_copy_if(_InputIterator __first, _InputIterator __last, 6242: _OutputIterator __result, _Predicate __pred) 6242: { 6242: for (; __first != __last; ++__first) 6242: if (!__pred(__first)) 6242: { 6242: *__result = *__first; 6242: ++__result; 6242: } 6242: return __result; 6242: } 6242: # 668 "/usr/include/c++/8/bits/stl_algo.h" 3 6242: template 6242: inline _OutputIterator 6242: remove_copy(_InputIterator __first, _InputIterator __last, 6242: _OutputIterator __result, const _Tp& __value) 6242: { 6242: 6242: 6242: 6242: 6242: 6242: 6242: ; 6242: 6242: return std::__remove_copy_if(__first, __last, __result, 6242: __gnu_cxx::__ops::__iter_equals_val(__value)); 6242: } 6242: # 700 "/usr/include/c++/8/bits/stl_algo.h" 3 6242: template 6242: inline _OutputIterator 6242: remove_copy_if(_InputIterator __first, _InputIterator __last, 6242: _OutputIterator __result, _Predicate __pred) 6242: { 6242: 6242: 6242: 6242: 6242: 6242: 6242: ; 6242: 6242: return std::__remove_copy_if(__first, __last, __result, 6242: __gnu_cxx::__ops::__pred_iter(__pred)); 6242: } 6242: # 734 "/usr/include/c++/8/bits/stl_algo.h" 3 6242: template 6242: _OutputIterator 6242: copy_if(_InputIterator __first, _InputIterator __last, 6242: _OutputIterator __result, _Predicate __pred) 6242: { 6242: 6242: 6242: 6242: 6242: 6242: 6242: ; 6242: 6242: for (; __first != __last; ++__first) 6242: if (__pred(*__first)) 6242: { 6242: *__result = *__first; 6242: ++__result; 6242: } 6242: return __result; 6242: } 6242: 6242: template 6242: _OutputIterator 6242: __copy_n(_InputIterator __first, _Size __n, 6242: _OutputIterator __result, input_iterator_tag) 6242: { 6242: if (__n > 0) 6242: { 6242: while (true) 6242: { 6242: *__result = *__first; 6242: ++__result; 6242: if (--__n > 0) 6242: ++__first; 6242: else 6242: break; 6242: } 6242: } 6242: return __result; 6242: } 6242: 6242: template 6242: inline _OutputIterator 6242: __copy_n(_RandomAccessIterator __first, _Size __n, 6242: _OutputIterator __result, random_access_iterator_tag) 6242: { return std::copy(__first, __first + __n, __result); } 6242: # 797 "/usr/include/c++/8/bits/stl_algo.h" 3 6242: template 6242: inline _OutputIterator 6242: copy_n(_InputIterator __first, _Size __n, _OutputIterator __result) 6242: { 6242: 6242: 6242: 6242: 6242: 6242: return std::__copy_n(__first, __n, __result, 6242: std::__iterator_category(__first)); 6242: } 6242: # 825 "/usr/include/c++/8/bits/stl_algo.h" 3 6242: template 6242: pair<_OutputIterator1, _OutputIterator2> 6242: partition_copy(_InputIterator __first, _InputIterator __last, 6242: _OutputIterator1 __out_true, _OutputIterator2 __out_false, 6242: _Predicate __pred) 6242: { 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: ; 6242: 6242: for (; __first != __last; ++__first) 6242: if (__pred(*__first)) 6242: { 6242: *__out_true = *__first; 6242: ++__out_true; 6242: } 6242: else 6242: { 6242: *__out_false = *__first; 6242: ++__out_false; 6242: } 6242: 6242: return pair<_OutputIterator1, _OutputIterator2>(__out_true, __out_false); 6242: } 6242: 6242: 6242: template 6242: _ForwardIterator 6242: __remove_if(_ForwardIterator __first, _ForwardIterator __last, 6242: _Predicate __pred) 6242: { 6242: __first = std::__find_if(__first, __last, __pred); 6242: if (__first == __last) 6242: return __first; 6242: _ForwardIterator __result = __first; 6242: ++__first; 6242: for (; __first != __last; ++__first) 6242: if (!__pred(__first)) 6242: { 6242: *__result = std::move(*__first); 6242: ++__result; 6242: } 6242: return __result; 6242: } 6242: # 894 "/usr/include/c++/8/bits/stl_algo.h" 3 6242: template 6242: inline _ForwardIterator 6242: remove(_ForwardIterator __first, _ForwardIterator __last, 6242: const _Tp& __value) 6242: { 6242: 6242: 6242: 6242: 6242: 6242: ; 6242: 6242: return std::__remove_if(__first, __last, 6242: __gnu_cxx::__ops::__iter_equals_val(__value)); 6242: } 6242: # 927 "/usr/include/c++/8/bits/stl_algo.h" 3 6242: template 6242: inline _ForwardIterator 6242: remove_if(_ForwardIterator __first, _ForwardIterator __last, 6242: _Predicate __pred) 6242: { 6242: 6242: 6242: 6242: 6242: 6242: ; 6242: 6242: return std::__remove_if(__first, __last, 6242: __gnu_cxx::__ops::__pred_iter(__pred)); 6242: } 6242: 6242: template 6242: _ForwardIterator 6242: __adjacent_find(_ForwardIterator __first, _ForwardIterator __last, 6242: _BinaryPredicate __binary_pred) 6242: { 6242: if (__first == __last) 6242: return __last; 6242: _ForwardIterator __next = __first; 6242: while (++__next != __last) 6242: { 6242: if (__binary_pred(__first, __next)) 6242: return __first; 6242: __first = __next; 6242: } 6242: return __last; 6242: } 6242: 6242: template 6242: _ForwardIterator 6242: __unique(_ForwardIterator __first, _ForwardIterator __last, 6242: _BinaryPredicate __binary_pred) 6242: { 6242: 6242: __first = std::__adjacent_find(__first, __last, __binary_pred); 6242: if (__first == __last) 6242: return __last; 6242: 6242: 6242: _ForwardIterator __dest = __first; 6242: ++__first; 6242: while (++__first != __last) 6242: if (!__binary_pred(__dest, __first)) 6242: *++__dest = std::move(*__first); 6242: return ++__dest; 6242: } 6242: # 993 "/usr/include/c++/8/bits/stl_algo.h" 3 6242: template 6242: inline _ForwardIterator 6242: unique(_ForwardIterator __first, _ForwardIterator __last) 6242: { 6242: 6242: 6242: 6242: 6242: 6242: ; 6242: 6242: return std::__unique(__first, __last, 6242: __gnu_cxx::__ops::__iter_equal_to_iter()); 6242: } 6242: # 1023 "/usr/include/c++/8/bits/stl_algo.h" 3 6242: template 6242: inline _ForwardIterator 6242: unique(_ForwardIterator __first, _ForwardIterator __last, 6242: _BinaryPredicate __binary_pred) 6242: { 6242: 6242: 6242: 6242: 6242: 6242: 6242: ; 6242: 6242: return std::__unique(__first, __last, 6242: __gnu_cxx::__ops::__iter_comp_iter(__binary_pred)); 6242: } 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: template 6242: _OutputIterator 6242: __unique_copy(_ForwardIterator __first, _ForwardIterator __last, 6242: _OutputIterator __result, _BinaryPredicate __binary_pred, 6242: forward_iterator_tag, output_iterator_tag) 6242: { 6242: 6242: 6242: 6242: 6242: 6242: _ForwardIterator __next = __first; 6242: *__result = *__first; 6242: while (++__next != __last) 6242: if (!__binary_pred(__first, __next)) 6242: { 6242: __first = __next; 6242: *++__result = *__first; 6242: } 6242: return ++__result; 6242: } 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: template 6242: _OutputIterator 6242: __unique_copy(_InputIterator __first, _InputIterator __last, 6242: _OutputIterator __result, _BinaryPredicate __binary_pred, 6242: input_iterator_tag, output_iterator_tag) 6242: { 6242: 6242: 6242: 6242: 6242: 6242: typename iterator_traits<_InputIterator>::value_type __value = *__first; 6242: __decltype(__gnu_cxx::__ops::__iter_comp_val(__binary_pred)) 6242: __rebound_pred 6242: = __gnu_cxx::__ops::__iter_comp_val(__binary_pred); 6242: *__result = __value; 6242: while (++__first != __last) 6242: if (!__rebound_pred(__first, __value)) 6242: { 6242: __value = *__first; 6242: *++__result = __value; 6242: } 6242: return ++__result; 6242: } 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: template 6242: _ForwardIterator 6242: __unique_copy(_InputIterator __first, _InputIterator __last, 6242: _ForwardIterator __result, _BinaryPredicate __binary_pred, 6242: input_iterator_tag, forward_iterator_tag) 6242: { 6242: 6242: 6242: 6242: 6242: *__result = *__first; 6242: while (++__first != __last) 6242: if (!__binary_pred(__result, __first)) 6242: *++__result = *__first; 6242: return ++__result; 6242: } 6242: 6242: 6242: 6242: 6242: 6242: 6242: template 6242: void 6242: __reverse(_BidirectionalIterator __first, _BidirectionalIterator __last, 6242: bidirectional_iterator_tag) 6242: { 6242: while (true) 6242: if (__first == __last || __first == --__last) 6242: return; 6242: else 6242: { 6242: std::iter_swap(__first, __last); 6242: ++__first; 6242: } 6242: } 6242: 6242: 6242: 6242: 6242: 6242: 6242: template 6242: void 6242: __reverse(_RandomAccessIterator __first, _RandomAccessIterator __last, 6242: random_access_iterator_tag) 6242: { 6242: if (__first == __last) 6242: return; 6242: --__last; 6242: while (__first < __last) 6242: { 6242: std::iter_swap(__first, __last); 6242: ++__first; 6242: --__last; 6242: } 6242: } 6242: # 1178 "/usr/include/c++/8/bits/stl_algo.h" 3 6242: template 6242: inline void 6242: reverse(_BidirectionalIterator __first, _BidirectionalIterator __last) 6242: { 6242: 6242: 6242: 6242: ; 6242: std::__reverse(__first, __last, std::__iterator_category(__first)); 6242: } 6242: # 1205 "/usr/include/c++/8/bits/stl_algo.h" 3 6242: template 6242: _OutputIterator 6242: reverse_copy(_BidirectionalIterator __first, _BidirectionalIterator __last, 6242: _OutputIterator __result) 6242: { 6242: 6242: 6242: 6242: 6242: 6242: ; 6242: 6242: while (__first != __last) 6242: { 6242: --__last; 6242: *__result = *__last; 6242: ++__result; 6242: } 6242: return __result; 6242: } 6242: 6242: 6242: 6242: 6242: 6242: template 6242: _EuclideanRingElement 6242: __gcd(_EuclideanRingElement __m, _EuclideanRingElement __n) 6242: { 6242: while (__n != 0) 6242: { 6242: _EuclideanRingElement __t = __m % __n; 6242: __m = __n; 6242: __n = __t; 6242: } 6242: return __m; 6242: } 6242: 6242: inline namespace _V2 6242: { 6242: 6242: 6242: template 6242: _ForwardIterator 6242: __rotate(_ForwardIterator __first, 6242: _ForwardIterator __middle, 6242: _ForwardIterator __last, 6242: forward_iterator_tag) 6242: { 6242: if (__first == __middle) 6242: return __last; 6242: else if (__last == __middle) 6242: return __first; 6242: 6242: _ForwardIterator __first2 = __middle; 6242: do 6242: { 6242: std::iter_swap(__first, __first2); 6242: ++__first; 6242: ++__first2; 6242: if (__first == __middle) 6242: __middle = __first2; 6242: } 6242: while (__first2 != __last); 6242: 6242: _ForwardIterator __ret = __first; 6242: 6242: __first2 = __middle; 6242: 6242: while (__first2 != __last) 6242: { 6242: std::iter_swap(__first, __first2); 6242: ++__first; 6242: ++__first2; 6242: if (__first == __middle) 6242: __middle = __first2; 6242: else if (__first2 == __last) 6242: __first2 = __middle; 6242: } 6242: return __ret; 6242: } 6242: 6242: 6242: template 6242: _BidirectionalIterator 6242: __rotate(_BidirectionalIterator __first, 6242: _BidirectionalIterator __middle, 6242: _BidirectionalIterator __last, 6242: bidirectional_iterator_tag) 6242: { 6242: 6242: 6242: 6242: 6242: if (__first == __middle) 6242: return __last; 6242: else if (__last == __middle) 6242: return __first; 6242: 6242: std::__reverse(__first, __middle, bidirectional_iterator_tag()); 6242: std::__reverse(__middle, __last, bidirectional_iterator_tag()); 6242: 6242: while (__first != __middle && __middle != __last) 6242: { 6242: std::iter_swap(__first, --__last); 6242: ++__first; 6242: } 6242: 6242: if (__first == __middle) 6242: { 6242: std::__reverse(__middle, __last, bidirectional_iterator_tag()); 6242: return __last; 6242: } 6242: else 6242: { 6242: std::__reverse(__first, __middle, bidirectional_iterator_tag()); 6242: return __first; 6242: } 6242: } 6242: 6242: 6242: template 6242: _RandomAccessIterator 6242: __rotate(_RandomAccessIterator __first, 6242: _RandomAccessIterator __middle, 6242: _RandomAccessIterator __last, 6242: random_access_iterator_tag) 6242: { 6242: 6242: 6242: 6242: 6242: if (__first == __middle) 6242: return __last; 6242: else if (__last == __middle) 6242: return __first; 6242: 6242: typedef typename iterator_traits<_RandomAccessIterator>::difference_type 6242: _Distance; 6242: typedef typename iterator_traits<_RandomAccessIterator>::value_type 6242: _ValueType; 6242: 6242: _Distance __n = __last - __first; 6242: _Distance __k = __middle - __first; 6242: 6242: if (__k == __n - __k) 6242: { 6242: std::swap_ranges(__first, __middle, __middle); 6242: return __middle; 6242: } 6242: 6242: _RandomAccessIterator __p = __first; 6242: _RandomAccessIterator __ret = __first + (__last - __middle); 6242: 6242: for (;;) 6242: { 6242: if (__k < __n - __k) 6242: { 6242: if (__is_pod(_ValueType) && __k == 1) 6242: { 6242: _ValueType __t = std::move(*__p); 6242: std::move(__p + 1, __p + __n, __p); 6242: *(__p + __n - 1) = std::move(__t); 6242: return __ret; 6242: } 6242: _RandomAccessIterator __q = __p + __k; 6242: for (_Distance __i = 0; __i < __n - __k; ++ __i) 6242: { 6242: std::iter_swap(__p, __q); 6242: ++__p; 6242: ++__q; 6242: } 6242: __n %= __k; 6242: if (__n == 0) 6242: return __ret; 6242: std::swap(__n, __k); 6242: __k = __n - __k; 6242: } 6242: else 6242: { 6242: __k = __n - __k; 6242: if (__is_pod(_ValueType) && __k == 1) 6242: { 6242: _ValueType __t = std::move(*(__p + __n - 1)); 6242: std::move_backward(__p, __p + __n - 1, __p + __n); 6242: *__p = std::move(__t); 6242: return __ret; 6242: } 6242: _RandomAccessIterator __q = __p + __n; 6242: __p = __q - __k; 6242: for (_Distance __i = 0; __i < __n - __k; ++ __i) 6242: { 6242: --__p; 6242: --__q; 6242: std::iter_swap(__p, __q); 6242: } 6242: __n %= __k; 6242: if (__n == 0) 6242: return __ret; 6242: std::swap(__n, __k); 6242: } 6242: } 6242: } 6242: # 1432 "/usr/include/c++/8/bits/stl_algo.h" 3 6242: template 6242: inline _ForwardIterator 6242: rotate(_ForwardIterator __first, _ForwardIterator __middle, 6242: _ForwardIterator __last) 6242: { 6242: 6242: 6242: 6242: ; 6242: ; 6242: 6242: return std::__rotate(__first, __middle, __last, 6242: std::__iterator_category(__first)); 6242: } 6242: 6242: } 6242: # 1469 "/usr/include/c++/8/bits/stl_algo.h" 3 6242: template 6242: inline _OutputIterator 6242: rotate_copy(_ForwardIterator __first, _ForwardIterator __middle, 6242: _ForwardIterator __last, _OutputIterator __result) 6242: { 6242: 6242: 6242: 6242: 6242: ; 6242: ; 6242: 6242: return std::copy(__first, __middle, 6242: std::copy(__middle, __last, __result)); 6242: } 6242: 6242: 6242: template 6242: _ForwardIterator 6242: __partition(_ForwardIterator __first, _ForwardIterator __last, 6242: _Predicate __pred, forward_iterator_tag) 6242: { 6242: if (__first == __last) 6242: return __first; 6242: 6242: while (__pred(*__first)) 6242: if (++__first == __last) 6242: return __first; 6242: 6242: _ForwardIterator __next = __first; 6242: 6242: while (++__next != __last) 6242: if (__pred(*__next)) 6242: { 6242: std::iter_swap(__first, __next); 6242: ++__first; 6242: } 6242: 6242: return __first; 6242: } 6242: 6242: 6242: template 6242: _BidirectionalIterator 6242: __partition(_BidirectionalIterator __first, _BidirectionalIterator __last, 6242: _Predicate __pred, bidirectional_iterator_tag) 6242: { 6242: while (true) 6242: { 6242: while (true) 6242: if (__first == __last) 6242: return __first; 6242: else if (__pred(*__first)) 6242: ++__first; 6242: else 6242: break; 6242: --__last; 6242: while (true) 6242: if (__first == __last) 6242: return __first; 6242: else if (!bool(__pred(*__last))) 6242: --__last; 6242: else 6242: break; 6242: std::iter_swap(__first, __last); 6242: ++__first; 6242: } 6242: } 6242: # 1546 "/usr/include/c++/8/bits/stl_algo.h" 3 6242: template 6242: _ForwardIterator 6242: __stable_partition_adaptive(_ForwardIterator __first, 6242: _ForwardIterator __last, 6242: _Predicate __pred, _Distance __len, 6242: _Pointer __buffer, 6242: _Distance __buffer_size) 6242: { 6242: if (__len == 1) 6242: return __first; 6242: 6242: if (__len <= __buffer_size) 6242: { 6242: _ForwardIterator __result1 = __first; 6242: _Pointer __result2 = __buffer; 6242: 6242: 6242: 6242: 6242: *__result2 = std::move(*__first); 6242: ++__result2; 6242: ++__first; 6242: for (; __first != __last; ++__first) 6242: if (__pred(__first)) 6242: { 6242: *__result1 = std::move(*__first); 6242: ++__result1; 6242: } 6242: else 6242: { 6242: *__result2 = std::move(*__first); 6242: ++__result2; 6242: } 6242: 6242: std::move(__buffer, __result2, __result1); 6242: return __result1; 6242: } 6242: 6242: _ForwardIterator __middle = __first; 6242: std::advance(__middle, __len / 2); 6242: _ForwardIterator __left_split = 6242: std::__stable_partition_adaptive(__first, __middle, __pred, 6242: __len / 2, __buffer, 6242: __buffer_size); 6242: 6242: 6242: 6242: _Distance __right_len = __len - __len / 2; 6242: _ForwardIterator __right_split = 6242: std::__find_if_not_n(__middle, __right_len, __pred); 6242: 6242: if (__right_len) 6242: __right_split = 6242: std::__stable_partition_adaptive(__right_split, __last, __pred, 6242: __right_len, 6242: __buffer, __buffer_size); 6242: 6242: std::rotate(__left_split, __middle, __right_split); 6242: std::advance(__left_split, std::distance(__middle, __right_split)); 6242: return __left_split; 6242: } 6242: 6242: template 6242: _ForwardIterator 6242: __stable_partition(_ForwardIterator __first, _ForwardIterator __last, 6242: _Predicate __pred) 6242: { 6242: __first = std::__find_if_not(__first, __last, __pred); 6242: 6242: if (__first == __last) 6242: return __first; 6242: 6242: typedef typename iterator_traits<_ForwardIterator>::value_type 6242: _ValueType; 6242: typedef typename iterator_traits<_ForwardIterator>::difference_type 6242: _DistanceType; 6242: 6242: _Temporary_buffer<_ForwardIterator, _ValueType> __buf(__first, __last); 6242: return 6242: std::__stable_partition_adaptive(__first, __last, __pred, 6242: _DistanceType(__buf.requested_size()), 6242: __buf.begin(), 6242: _DistanceType(__buf.size())); 6242: } 6242: # 1649 "/usr/include/c++/8/bits/stl_algo.h" 3 6242: template 6242: inline _ForwardIterator 6242: stable_partition(_ForwardIterator __first, _ForwardIterator __last, 6242: _Predicate __pred) 6242: { 6242: 6242: 6242: 6242: 6242: 6242: ; 6242: 6242: return std::__stable_partition(__first, __last, 6242: __gnu_cxx::__ops::__pred_iter(__pred)); 6242: } 6242: 6242: 6242: template 6242: void 6242: __heap_select(_RandomAccessIterator __first, 6242: _RandomAccessIterator __middle, 6242: _RandomAccessIterator __last, _Compare __comp) 6242: { 6242: std::__make_heap(__first, __middle, __comp); 6242: for (_RandomAccessIterator __i = __middle; __i < __last; ++__i) 6242: if (__comp(__i, __first)) 6242: std::__pop_heap(__first, __middle, __i, __comp); 6242: } 6242: 6242: 6242: 6242: template 6242: _RandomAccessIterator 6242: __partial_sort_copy(_InputIterator __first, _InputIterator __last, 6242: _RandomAccessIterator __result_first, 6242: _RandomAccessIterator __result_last, 6242: _Compare __comp) 6242: { 6242: typedef typename iterator_traits<_InputIterator>::value_type 6242: _InputValueType; 6242: typedef iterator_traits<_RandomAccessIterator> _RItTraits; 6242: typedef typename _RItTraits::difference_type _DistanceType; 6242: 6242: if (__result_first == __result_last) 6242: return __result_last; 6242: _RandomAccessIterator __result_real_last = __result_first; 6242: while (__first != __last && __result_real_last != __result_last) 6242: { 6242: *__result_real_last = *__first; 6242: ++__result_real_last; 6242: ++__first; 6242: } 6242: 6242: std::__make_heap(__result_first, __result_real_last, __comp); 6242: while (__first != __last) 6242: { 6242: if (__comp(__first, __result_first)) 6242: std::__adjust_heap(__result_first, _DistanceType(0), 6242: _DistanceType(__result_real_last 6242: - __result_first), 6242: _InputValueType(*__first), __comp); 6242: ++__first; 6242: } 6242: std::__sort_heap(__result_first, __result_real_last, __comp); 6242: return __result_real_last; 6242: } 6242: # 1735 "/usr/include/c++/8/bits/stl_algo.h" 3 6242: template 6242: inline _RandomAccessIterator 6242: partial_sort_copy(_InputIterator __first, _InputIterator __last, 6242: _RandomAccessIterator __result_first, 6242: _RandomAccessIterator __result_last) 6242: { 6242: # 1749 "/usr/include/c++/8/bits/stl_algo.h" 3 6242: 6242: 6242: 6242: 6242: 6242: 6242: ; 6242: ; 6242: ; 6242: 6242: return std::__partial_sort_copy(__first, __last, 6242: __result_first, __result_last, 6242: __gnu_cxx::__ops::__iter_less_iter()); 6242: } 6242: # 1784 "/usr/include/c++/8/bits/stl_algo.h" 3 6242: template 6242: inline _RandomAccessIterator 6242: partial_sort_copy(_InputIterator __first, _InputIterator __last, 6242: _RandomAccessIterator __result_first, 6242: _RandomAccessIterator __result_last, 6242: _Compare __comp) 6242: { 6242: # 1800 "/usr/include/c++/8/bits/stl_algo.h" 3 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: ; 6242: ; 6242: ; 6242: 6242: return std::__partial_sort_copy(__first, __last, 6242: __result_first, __result_last, 6242: __gnu_cxx::__ops::__iter_comp_iter(__comp)); 6242: } 6242: 6242: 6242: template 6242: void 6242: __unguarded_linear_insert(_RandomAccessIterator __last, 6242: _Compare __comp) 6242: { 6242: typename iterator_traits<_RandomAccessIterator>::value_type 6242: __val = std::move(*__last); 6242: _RandomAccessIterator __next = __last; 6242: --__next; 6242: while (__comp(__val, __next)) 6242: { 6242: *__last = std::move(*__next); 6242: __last = __next; 6242: --__next; 6242: } 6242: *__last = std::move(__val); 6242: } 6242: 6242: 6242: template 6242: void 6242: __insertion_sort(_RandomAccessIterator __first, 6242: _RandomAccessIterator __last, _Compare __comp) 6242: { 6242: if (__first == __last) return; 6242: 6242: for (_RandomAccessIterator __i = __first + 1; __i != __last; ++__i) 6242: { 6242: if (__comp(__i, __first)) 6242: { 6242: typename iterator_traits<_RandomAccessIterator>::value_type 6242: __val = std::move(*__i); 6242: std::move_backward(__first, __i, __i + 1); 6242: *__first = std::move(__val); 6242: } 6242: else 6242: std::__unguarded_linear_insert(__i, 6242: __gnu_cxx::__ops::__val_comp_iter(__comp)); 6242: } 6242: } 6242: 6242: 6242: template 6242: inline void 6242: __unguarded_insertion_sort(_RandomAccessIterator __first, 6242: _RandomAccessIterator __last, _Compare __comp) 6242: { 6242: for (_RandomAccessIterator __i = __first; __i != __last; ++__i) 6242: std::__unguarded_linear_insert(__i, 6242: __gnu_cxx::__ops::__val_comp_iter(__comp)); 6242: } 6242: 6242: 6242: 6242: 6242: 6242: enum { _S_threshold = 16 }; 6242: 6242: 6242: template 6242: void 6242: __final_insertion_sort(_RandomAccessIterator __first, 6242: _RandomAccessIterator __last, _Compare __comp) 6242: { 6242: if (__last - __first > int(_S_threshold)) 6242: { 6242: std::__insertion_sort(__first, __first + int(_S_threshold), __comp); 6242: std::__unguarded_insertion_sort(__first + int(_S_threshold), __last, 6242: __comp); 6242: } 6242: else 6242: std::__insertion_sort(__first, __last, __comp); 6242: } 6242: 6242: 6242: template 6242: _RandomAccessIterator 6242: __unguarded_partition(_RandomAccessIterator __first, 6242: _RandomAccessIterator __last, 6242: _RandomAccessIterator __pivot, _Compare __comp) 6242: { 6242: while (true) 6242: { 6242: while (__comp(__first, __pivot)) 6242: ++__first; 6242: --__last; 6242: while (__comp(__pivot, __last)) 6242: --__last; 6242: if (!(__first < __last)) 6242: return __first; 6242: std::iter_swap(__first, __last); 6242: ++__first; 6242: } 6242: } 6242: 6242: 6242: template 6242: inline _RandomAccessIterator 6242: __unguarded_partition_pivot(_RandomAccessIterator __first, 6242: _RandomAccessIterator __last, _Compare __comp) 6242: { 6242: _RandomAccessIterator __mid = __first + (__last - __first) / 2; 6242: std::__move_median_to_first(__first, __first + 1, __mid, __last - 1, 6242: __comp); 6242: return std::__unguarded_partition(__first + 1, __last, __first, __comp); 6242: } 6242: 6242: template 6242: inline void 6242: __partial_sort(_RandomAccessIterator __first, 6242: _RandomAccessIterator __middle, 6242: _RandomAccessIterator __last, 6242: _Compare __comp) 6242: { 6242: std::__heap_select(__first, __middle, __last, __comp); 6242: std::__sort_heap(__first, __middle, __comp); 6242: } 6242: 6242: 6242: template 6242: void 6242: __introsort_loop(_RandomAccessIterator __first, 6242: _RandomAccessIterator __last, 6242: _Size __depth_limit, _Compare __comp) 6242: { 6242: while (__last - __first > int(_S_threshold)) 6242: { 6242: if (__depth_limit == 0) 6242: { 6242: std::__partial_sort(__first, __last, __last, __comp); 6242: return; 6242: } 6242: --__depth_limit; 6242: _RandomAccessIterator __cut = 6242: std::__unguarded_partition_pivot(__first, __last, __comp); 6242: std::__introsort_loop(__cut, __last, __depth_limit, __comp); 6242: __last = __cut; 6242: } 6242: } 6242: 6242: 6242: 6242: template 6242: inline void 6242: __sort(_RandomAccessIterator __first, _RandomAccessIterator __last, 6242: _Compare __comp) 6242: { 6242: if (__first != __last) 6242: { 6242: std::__introsort_loop(__first, __last, 6242: std::__lg(__last - __first) * 2, 6242: __comp); 6242: std::__final_insertion_sort(__first, __last, __comp); 6242: } 6242: } 6242: 6242: template 6242: void 6242: __introselect(_RandomAccessIterator __first, _RandomAccessIterator __nth, 6242: _RandomAccessIterator __last, _Size __depth_limit, 6242: _Compare __comp) 6242: { 6242: while (__last - __first > 3) 6242: { 6242: if (__depth_limit == 0) 6242: { 6242: std::__heap_select(__first, __nth + 1, __last, __comp); 6242: 6242: std::iter_swap(__first, __nth); 6242: return; 6242: } 6242: --__depth_limit; 6242: _RandomAccessIterator __cut = 6242: std::__unguarded_partition_pivot(__first, __last, __comp); 6242: if (__cut <= __nth) 6242: __first = __cut; 6242: else 6242: __last = __cut; 6242: } 6242: std::__insertion_sort(__first, __last, __comp); 6242: } 6242: # 2021 "/usr/include/c++/8/bits/stl_algo.h" 3 6242: template 6242: inline _ForwardIterator 6242: lower_bound(_ForwardIterator __first, _ForwardIterator __last, 6242: const _Tp& __val, _Compare __comp) 6242: { 6242: 6242: 6242: 6242: 6242: 6242: ; 6242: 6242: return std::__lower_bound(__first, __last, __val, 6242: __gnu_cxx::__ops::__iter_comp_val(__comp)); 6242: } 6242: 6242: template 6242: _ForwardIterator 6242: __upper_bound(_ForwardIterator __first, _ForwardIterator __last, 6242: const _Tp& __val, _Compare __comp) 6242: { 6242: typedef typename iterator_traits<_ForwardIterator>::difference_type 6242: _DistanceType; 6242: 6242: _DistanceType __len = std::distance(__first, __last); 6242: 6242: while (__len > 0) 6242: { 6242: _DistanceType __half = __len >> 1; 6242: _ForwardIterator __middle = __first; 6242: std::advance(__middle, __half); 6242: if (__comp(__val, __middle)) 6242: __len = __half; 6242: else 6242: { 6242: __first = __middle; 6242: ++__first; 6242: __len = __len - __half - 1; 6242: } 6242: } 6242: return __first; 6242: } 6242: # 2075 "/usr/include/c++/8/bits/stl_algo.h" 3 6242: template 6242: inline _ForwardIterator 6242: upper_bound(_ForwardIterator __first, _ForwardIterator __last, 6242: const _Tp& __val) 6242: { 6242: 6242: 6242: 6242: 6242: ; 6242: 6242: return std::__upper_bound(__first, __last, __val, 6242: __gnu_cxx::__ops::__val_less_iter()); 6242: } 6242: # 2105 "/usr/include/c++/8/bits/stl_algo.h" 3 6242: template 6242: inline _ForwardIterator 6242: upper_bound(_ForwardIterator __first, _ForwardIterator __last, 6242: const _Tp& __val, _Compare __comp) 6242: { 6242: 6242: 6242: 6242: 6242: 6242: ; 6242: 6242: return std::__upper_bound(__first, __last, __val, 6242: __gnu_cxx::__ops::__val_comp_iter(__comp)); 6242: } 6242: 6242: template 6242: pair<_ForwardIterator, _ForwardIterator> 6242: __equal_range(_ForwardIterator __first, _ForwardIterator __last, 6242: const _Tp& __val, 6242: _CompareItTp __comp_it_val, _CompareTpIt __comp_val_it) 6242: { 6242: typedef typename iterator_traits<_ForwardIterator>::difference_type 6242: _DistanceType; 6242: 6242: _DistanceType __len = std::distance(__first, __last); 6242: 6242: while (__len > 0) 6242: { 6242: _DistanceType __half = __len >> 1; 6242: _ForwardIterator __middle = __first; 6242: std::advance(__middle, __half); 6242: if (__comp_it_val(__middle, __val)) 6242: { 6242: __first = __middle; 6242: ++__first; 6242: __len = __len - __half - 1; 6242: } 6242: else if (__comp_val_it(__val, __middle)) 6242: __len = __half; 6242: else 6242: { 6242: _ForwardIterator __left 6242: = std::__lower_bound(__first, __middle, __val, __comp_it_val); 6242: std::advance(__first, __len); 6242: _ForwardIterator __right 6242: = std::__upper_bound(++__middle, __first, __val, __comp_val_it); 6242: return pair<_ForwardIterator, _ForwardIterator>(__left, __right); 6242: } 6242: } 6242: return pair<_ForwardIterator, _ForwardIterator>(__first, __first); 6242: } 6242: # 2176 "/usr/include/c++/8/bits/stl_algo.h" 3 6242: template 6242: inline pair<_ForwardIterator, _ForwardIterator> 6242: equal_range(_ForwardIterator __first, _ForwardIterator __last, 6242: const _Tp& __val) 6242: { 6242: 6242: 6242: 6242: 6242: 6242: 6242: ; 6242: ; 6242: 6242: return std::__equal_range(__first, __last, __val, 6242: __gnu_cxx::__ops::__iter_less_val(), 6242: __gnu_cxx::__ops::__val_less_iter()); 6242: } 6242: # 2212 "/usr/include/c++/8/bits/stl_algo.h" 3 6242: template 6242: inline pair<_ForwardIterator, _ForwardIterator> 6242: equal_range(_ForwardIterator __first, _ForwardIterator __last, 6242: const _Tp& __val, _Compare __comp) 6242: { 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: ; 6242: 6242: ; 6242: 6242: return std::__equal_range(__first, __last, __val, 6242: __gnu_cxx::__ops::__iter_comp_val(__comp), 6242: __gnu_cxx::__ops::__val_comp_iter(__comp)); 6242: } 6242: # 2245 "/usr/include/c++/8/bits/stl_algo.h" 3 6242: template 6242: bool 6242: binary_search(_ForwardIterator __first, _ForwardIterator __last, 6242: const _Tp& __val) 6242: { 6242: 6242: 6242: 6242: 6242: ; 6242: ; 6242: 6242: _ForwardIterator __i 6242: = std::__lower_bound(__first, __last, __val, 6242: __gnu_cxx::__ops::__iter_less_val()); 6242: return __i != __last && !(__val < *__i); 6242: } 6242: # 2278 "/usr/include/c++/8/bits/stl_algo.h" 3 6242: template 6242: bool 6242: binary_search(_ForwardIterator __first, _ForwardIterator __last, 6242: const _Tp& __val, _Compare __comp) 6242: { 6242: 6242: 6242: 6242: 6242: 6242: ; 6242: 6242: ; 6242: 6242: _ForwardIterator __i 6242: = std::__lower_bound(__first, __last, __val, 6242: __gnu_cxx::__ops::__iter_comp_val(__comp)); 6242: return __i != __last && !bool(__comp(__val, *__i)); 6242: } 6242: 6242: 6242: 6242: 6242: template 6242: void 6242: __move_merge_adaptive(_InputIterator1 __first1, _InputIterator1 __last1, 6242: _InputIterator2 __first2, _InputIterator2 __last2, 6242: _OutputIterator __result, _Compare __comp) 6242: { 6242: while (__first1 != __last1 && __first2 != __last2) 6242: { 6242: if (__comp(__first2, __first1)) 6242: { 6242: *__result = std::move(*__first2); 6242: ++__first2; 6242: } 6242: else 6242: { 6242: *__result = std::move(*__first1); 6242: ++__first1; 6242: } 6242: ++__result; 6242: } 6242: if (__first1 != __last1) 6242: std::move(__first1, __last1, __result); 6242: } 6242: 6242: 6242: template 6242: void 6242: __move_merge_adaptive_backward(_BidirectionalIterator1 __first1, 6242: _BidirectionalIterator1 __last1, 6242: _BidirectionalIterator2 __first2, 6242: _BidirectionalIterator2 __last2, 6242: _BidirectionalIterator3 __result, 6242: _Compare __comp) 6242: { 6242: if (__first1 == __last1) 6242: { 6242: std::move_backward(__first2, __last2, __result); 6242: return; 6242: } 6242: else if (__first2 == __last2) 6242: return; 6242: 6242: --__last1; 6242: --__last2; 6242: while (true) 6242: { 6242: if (__comp(__last2, __last1)) 6242: { 6242: *--__result = std::move(*__last1); 6242: if (__first1 == __last1) 6242: { 6242: std::move_backward(__first2, ++__last2, __result); 6242: return; 6242: } 6242: --__last1; 6242: } 6242: else 6242: { 6242: *--__result = std::move(*__last2); 6242: if (__first2 == __last2) 6242: return; 6242: --__last2; 6242: } 6242: } 6242: } 6242: 6242: 6242: template 6242: _BidirectionalIterator1 6242: __rotate_adaptive(_BidirectionalIterator1 __first, 6242: _BidirectionalIterator1 __middle, 6242: _BidirectionalIterator1 __last, 6242: _Distance __len1, _Distance __len2, 6242: _BidirectionalIterator2 __buffer, 6242: _Distance __buffer_size) 6242: { 6242: _BidirectionalIterator2 __buffer_end; 6242: if (__len1 > __len2 && __len2 <= __buffer_size) 6242: { 6242: if (__len2) 6242: { 6242: __buffer_end = std::move(__middle, __last, __buffer); 6242: std::move_backward(__first, __middle, __last); 6242: return std::move(__buffer, __buffer_end, __first); 6242: } 6242: else 6242: return __first; 6242: } 6242: else if (__len1 <= __buffer_size) 6242: { 6242: if (__len1) 6242: { 6242: __buffer_end = std::move(__first, __middle, __buffer); 6242: std::move(__middle, __last, __first); 6242: return std::move_backward(__buffer, __buffer_end, __last); 6242: } 6242: else 6242: return __last; 6242: } 6242: else 6242: { 6242: std::rotate(__first, __middle, __last); 6242: std::advance(__first, std::distance(__middle, __last)); 6242: return __first; 6242: } 6242: } 6242: 6242: 6242: template 6242: void 6242: __merge_adaptive(_BidirectionalIterator __first, 6242: _BidirectionalIterator __middle, 6242: _BidirectionalIterator __last, 6242: _Distance __len1, _Distance __len2, 6242: _Pointer __buffer, _Distance __buffer_size, 6242: _Compare __comp) 6242: { 6242: if (__len1 <= __len2 && __len1 <= __buffer_size) 6242: { 6242: _Pointer __buffer_end = std::move(__first, __middle, __buffer); 6242: std::__move_merge_adaptive(__buffer, __buffer_end, __middle, __last, 6242: __first, __comp); 6242: } 6242: else if (__len2 <= __buffer_size) 6242: { 6242: _Pointer __buffer_end = std::move(__middle, __last, __buffer); 6242: std::__move_merge_adaptive_backward(__first, __middle, __buffer, 6242: __buffer_end, __last, __comp); 6242: } 6242: else 6242: { 6242: _BidirectionalIterator __first_cut = __first; 6242: _BidirectionalIterator __second_cut = __middle; 6242: _Distance __len11 = 0; 6242: _Distance __len22 = 0; 6242: if (__len1 > __len2) 6242: { 6242: __len11 = __len1 / 2; 6242: std::advance(__first_cut, __len11); 6242: __second_cut 6242: = std::__lower_bound(__middle, __last, *__first_cut, 6242: __gnu_cxx::__ops::__iter_comp_val(__comp)); 6242: __len22 = std::distance(__middle, __second_cut); 6242: } 6242: else 6242: { 6242: __len22 = __len2 / 2; 6242: std::advance(__second_cut, __len22); 6242: __first_cut 6242: = std::__upper_bound(__first, __middle, *__second_cut, 6242: __gnu_cxx::__ops::__val_comp_iter(__comp)); 6242: __len11 = std::distance(__first, __first_cut); 6242: } 6242: 6242: _BidirectionalIterator __new_middle 6242: = std::__rotate_adaptive(__first_cut, __middle, __second_cut, 6242: __len1 - __len11, __len22, __buffer, 6242: __buffer_size); 6242: std::__merge_adaptive(__first, __first_cut, __new_middle, __len11, 6242: __len22, __buffer, __buffer_size, __comp); 6242: std::__merge_adaptive(__new_middle, __second_cut, __last, 6242: __len1 - __len11, 6242: __len2 - __len22, __buffer, 6242: __buffer_size, __comp); 6242: } 6242: } 6242: 6242: 6242: template 6242: void 6242: __merge_without_buffer(_BidirectionalIterator __first, 6242: _BidirectionalIterator __middle, 6242: _BidirectionalIterator __last, 6242: _Distance __len1, _Distance __len2, 6242: _Compare __comp) 6242: { 6242: if (__len1 == 0 || __len2 == 0) 6242: return; 6242: 6242: if (__len1 + __len2 == 2) 6242: { 6242: if (__comp(__middle, __first)) 6242: std::iter_swap(__first, __middle); 6242: return; 6242: } 6242: 6242: _BidirectionalIterator __first_cut = __first; 6242: _BidirectionalIterator __second_cut = __middle; 6242: _Distance __len11 = 0; 6242: _Distance __len22 = 0; 6242: if (__len1 > __len2) 6242: { 6242: __len11 = __len1 / 2; 6242: std::advance(__first_cut, __len11); 6242: __second_cut 6242: = std::__lower_bound(__middle, __last, *__first_cut, 6242: __gnu_cxx::__ops::__iter_comp_val(__comp)); 6242: __len22 = std::distance(__middle, __second_cut); 6242: } 6242: else 6242: { 6242: __len22 = __len2 / 2; 6242: std::advance(__second_cut, __len22); 6242: __first_cut 6242: = std::__upper_bound(__first, __middle, *__second_cut, 6242: __gnu_cxx::__ops::__val_comp_iter(__comp)); 6242: __len11 = std::distance(__first, __first_cut); 6242: } 6242: 6242: std::rotate(__first_cut, __middle, __second_cut); 6242: _BidirectionalIterator __new_middle = __first_cut; 6242: std::advance(__new_middle, std::distance(__middle, __second_cut)); 6242: std::__merge_without_buffer(__first, __first_cut, __new_middle, 6242: __len11, __len22, __comp); 6242: std::__merge_without_buffer(__new_middle, __second_cut, __last, 6242: __len1 - __len11, __len2 - __len22, __comp); 6242: } 6242: 6242: template 6242: void 6242: __inplace_merge(_BidirectionalIterator __first, 6242: _BidirectionalIterator __middle, 6242: _BidirectionalIterator __last, 6242: _Compare __comp) 6242: { 6242: typedef typename iterator_traits<_BidirectionalIterator>::value_type 6242: _ValueType; 6242: typedef typename iterator_traits<_BidirectionalIterator>::difference_type 6242: _DistanceType; 6242: 6242: if (__first == __middle || __middle == __last) 6242: return; 6242: 6242: const _DistanceType __len1 = std::distance(__first, __middle); 6242: const _DistanceType __len2 = std::distance(__middle, __last); 6242: 6242: typedef _Temporary_buffer<_BidirectionalIterator, _ValueType> _TmpBuf; 6242: _TmpBuf __buf(__first, __last); 6242: 6242: if (__buf.begin() == 0) 6242: std::__merge_without_buffer 6242: (__first, __middle, __last, __len1, __len2, __comp); 6242: else 6242: std::__merge_adaptive 6242: (__first, __middle, __last, __len1, __len2, __buf.begin(), 6242: _DistanceType(__buf.size()), __comp); 6242: } 6242: # 2572 "/usr/include/c++/8/bits/stl_algo.h" 3 6242: template 6242: inline void 6242: inplace_merge(_BidirectionalIterator __first, 6242: _BidirectionalIterator __middle, 6242: _BidirectionalIterator __last) 6242: { 6242: 6242: 6242: 6242: 6242: 6242: ; 6242: ; 6242: ; 6242: 6242: std::__inplace_merge(__first, __middle, __last, 6242: __gnu_cxx::__ops::__iter_less_iter()); 6242: } 6242: # 2613 "/usr/include/c++/8/bits/stl_algo.h" 3 6242: template 6242: inline void 6242: inplace_merge(_BidirectionalIterator __first, 6242: _BidirectionalIterator __middle, 6242: _BidirectionalIterator __last, 6242: _Compare __comp) 6242: { 6242: 6242: 6242: 6242: 6242: 6242: 6242: ; 6242: ; 6242: ; 6242: 6242: std::__inplace_merge(__first, __middle, __last, 6242: __gnu_cxx::__ops::__iter_comp_iter(__comp)); 6242: } 6242: 6242: 6242: 6242: template 6242: _OutputIterator 6242: __move_merge(_InputIterator __first1, _InputIterator __last1, 6242: _InputIterator __first2, _InputIterator __last2, 6242: _OutputIterator __result, _Compare __comp) 6242: { 6242: while (__first1 != __last1 && __first2 != __last2) 6242: { 6242: if (__comp(__first2, __first1)) 6242: { 6242: *__result = std::move(*__first2); 6242: ++__first2; 6242: } 6242: else 6242: { 6242: *__result = std::move(*__first1); 6242: ++__first1; 6242: } 6242: ++__result; 6242: } 6242: return std::move(__first2, __last2, std::move(__first1, __last1, __result)) 6242: 6242: ; 6242: } 6242: 6242: template 6242: void 6242: __merge_sort_loop(_RandomAccessIterator1 __first, 6242: _RandomAccessIterator1 __last, 6242: _RandomAccessIterator2 __result, _Distance __step_size, 6242: _Compare __comp) 6242: { 6242: const _Distance __two_step = 2 * __step_size; 6242: 6242: while (__last - __first >= __two_step) 6242: { 6242: __result = std::__move_merge(__first, __first + __step_size, 6242: __first + __step_size, 6242: __first + __two_step, 6242: __result, __comp); 6242: __first += __two_step; 6242: } 6242: __step_size = std::min(_Distance(__last - __first), __step_size); 6242: 6242: std::__move_merge(__first, __first + __step_size, 6242: __first + __step_size, __last, __result, __comp); 6242: } 6242: 6242: template 6242: void 6242: __chunk_insertion_sort(_RandomAccessIterator __first, 6242: _RandomAccessIterator __last, 6242: _Distance __chunk_size, _Compare __comp) 6242: { 6242: while (__last - __first >= __chunk_size) 6242: { 6242: std::__insertion_sort(__first, __first + __chunk_size, __comp); 6242: __first += __chunk_size; 6242: } 6242: std::__insertion_sort(__first, __last, __comp); 6242: } 6242: 6242: enum { _S_chunk_size = 7 }; 6242: 6242: template 6242: void 6242: __merge_sort_with_buffer(_RandomAccessIterator __first, 6242: _RandomAccessIterator __last, 6242: _Pointer __buffer, _Compare __comp) 6242: { 6242: typedef typename iterator_traits<_RandomAccessIterator>::difference_type 6242: _Distance; 6242: 6242: const _Distance __len = __last - __first; 6242: const _Pointer __buffer_last = __buffer + __len; 6242: 6242: _Distance __step_size = _S_chunk_size; 6242: std::__chunk_insertion_sort(__first, __last, __step_size, __comp); 6242: 6242: while (__step_size < __len) 6242: { 6242: std::__merge_sort_loop(__first, __last, __buffer, 6242: __step_size, __comp); 6242: __step_size *= 2; 6242: std::__merge_sort_loop(__buffer, __buffer_last, __first, 6242: __step_size, __comp); 6242: __step_size *= 2; 6242: } 6242: } 6242: 6242: template 6242: void 6242: __stable_sort_adaptive(_RandomAccessIterator __first, 6242: _RandomAccessIterator __last, 6242: _Pointer __buffer, _Distance __buffer_size, 6242: _Compare __comp) 6242: { 6242: const _Distance __len = (__last - __first + 1) / 2; 6242: const _RandomAccessIterator __middle = __first + __len; 6242: if (__len > __buffer_size) 6242: { 6242: std::__stable_sort_adaptive(__first, __middle, __buffer, 6242: __buffer_size, __comp); 6242: std::__stable_sort_adaptive(__middle, __last, __buffer, 6242: __buffer_size, __comp); 6242: } 6242: else 6242: { 6242: std::__merge_sort_with_buffer(__first, __middle, __buffer, __comp); 6242: std::__merge_sort_with_buffer(__middle, __last, __buffer, __comp); 6242: } 6242: std::__merge_adaptive(__first, __middle, __last, 6242: _Distance(__middle - __first), 6242: _Distance(__last - __middle), 6242: __buffer, __buffer_size, 6242: __comp); 6242: } 6242: 6242: 6242: template 6242: void 6242: __inplace_stable_sort(_RandomAccessIterator __first, 6242: _RandomAccessIterator __last, _Compare __comp) 6242: { 6242: if (__last - __first < 15) 6242: { 6242: std::__insertion_sort(__first, __last, __comp); 6242: return; 6242: } 6242: _RandomAccessIterator __middle = __first + (__last - __first) / 2; 6242: std::__inplace_stable_sort(__first, __middle, __comp); 6242: std::__inplace_stable_sort(__middle, __last, __comp); 6242: std::__merge_without_buffer(__first, __middle, __last, 6242: __middle - __first, 6242: __last - __middle, 6242: __comp); 6242: } 6242: # 2785 "/usr/include/c++/8/bits/stl_algo.h" 3 6242: template 6242: bool 6242: __includes(_InputIterator1 __first1, _InputIterator1 __last1, 6242: _InputIterator2 __first2, _InputIterator2 __last2, 6242: _Compare __comp) 6242: { 6242: while (__first1 != __last1 && __first2 != __last2) 6242: if (__comp(__first2, __first1)) 6242: return false; 6242: else if (__comp(__first1, __first2)) 6242: ++__first1; 6242: else 6242: { 6242: ++__first1; 6242: ++__first2; 6242: } 6242: 6242: return __first2 == __last2; 6242: } 6242: # 2824 "/usr/include/c++/8/bits/stl_algo.h" 3 6242: template 6242: inline bool 6242: includes(_InputIterator1 __first1, _InputIterator1 __last1, 6242: _InputIterator2 __first2, _InputIterator2 __last2) 6242: { 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: ; 6242: ; 6242: ; 6242: ; 6242: 6242: return std::__includes(__first1, __last1, __first2, __last2, 6242: __gnu_cxx::__ops::__iter_less_iter()); 6242: } 6242: # 2868 "/usr/include/c++/8/bits/stl_algo.h" 3 6242: template 6242: inline bool 6242: includes(_InputIterator1 __first1, _InputIterator1 __last1, 6242: _InputIterator2 __first2, _InputIterator2 __last2, 6242: _Compare __comp) 6242: { 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: ; 6242: ; 6242: ; 6242: ; 6242: 6242: return std::__includes(__first1, __last1, __first2, __last2, 6242: __gnu_cxx::__ops::__iter_comp_iter(__comp)); 6242: } 6242: # 2903 "/usr/include/c++/8/bits/stl_algo.h" 3 6242: template 6242: bool 6242: __next_permutation(_BidirectionalIterator __first, 6242: _BidirectionalIterator __last, _Compare __comp) 6242: { 6242: if (__first == __last) 6242: return false; 6242: _BidirectionalIterator __i = __first; 6242: ++__i; 6242: if (__i == __last) 6242: return false; 6242: __i = __last; 6242: --__i; 6242: 6242: for(;;) 6242: { 6242: _BidirectionalIterator __ii = __i; 6242: --__i; 6242: if (__comp(__i, __ii)) 6242: { 6242: _BidirectionalIterator __j = __last; 6242: while (!__comp(__i, --__j)) 6242: {} 6242: std::iter_swap(__i, __j); 6242: std::__reverse(__ii, __last, 6242: std::__iterator_category(__first)); 6242: return true; 6242: } 6242: if (__i == __first) 6242: { 6242: std::__reverse(__first, __last, 6242: std::__iterator_category(__first)); 6242: return false; 6242: } 6242: } 6242: } 6242: # 2952 "/usr/include/c++/8/bits/stl_algo.h" 3 6242: template 6242: inline bool 6242: next_permutation(_BidirectionalIterator __first, 6242: _BidirectionalIterator __last) 6242: { 6242: 6242: 6242: 6242: 6242: 6242: ; 6242: ; 6242: 6242: return std::__next_permutation 6242: (__first, __last, __gnu_cxx::__ops::__iter_less_iter()); 6242: } 6242: # 2984 "/usr/include/c++/8/bits/stl_algo.h" 3 6242: template 6242: inline bool 6242: next_permutation(_BidirectionalIterator __first, 6242: _BidirectionalIterator __last, _Compare __comp) 6242: { 6242: 6242: 6242: 6242: 6242: 6242: 6242: ; 6242: ; 6242: 6242: return std::__next_permutation 6242: (__first, __last, __gnu_cxx::__ops::__iter_comp_iter(__comp)); 6242: } 6242: 6242: template 6242: bool 6242: __prev_permutation(_BidirectionalIterator __first, 6242: _BidirectionalIterator __last, _Compare __comp) 6242: { 6242: if (__first == __last) 6242: return false; 6242: _BidirectionalIterator __i = __first; 6242: ++__i; 6242: if (__i == __last) 6242: return false; 6242: __i = __last; 6242: --__i; 6242: 6242: for(;;) 6242: { 6242: _BidirectionalIterator __ii = __i; 6242: --__i; 6242: if (__comp(__ii, __i)) 6242: { 6242: _BidirectionalIterator __j = __last; 6242: while (!__comp(--__j, __i)) 6242: {} 6242: std::iter_swap(__i, __j); 6242: std::__reverse(__ii, __last, 6242: std::__iterator_category(__first)); 6242: return true; 6242: } 6242: if (__i == __first) 6242: { 6242: std::__reverse(__first, __last, 6242: std::__iterator_category(__first)); 6242: return false; 6242: } 6242: } 6242: } 6242: # 3052 "/usr/include/c++/8/bits/stl_algo.h" 3 6242: template 6242: inline bool 6242: prev_permutation(_BidirectionalIterator __first, 6242: _BidirectionalIterator __last) 6242: { 6242: 6242: 6242: 6242: 6242: 6242: ; 6242: ; 6242: 6242: return std::__prev_permutation(__first, __last, 6242: __gnu_cxx::__ops::__iter_less_iter()); 6242: } 6242: # 3084 "/usr/include/c++/8/bits/stl_algo.h" 3 6242: template 6242: inline bool 6242: prev_permutation(_BidirectionalIterator __first, 6242: _BidirectionalIterator __last, _Compare __comp) 6242: { 6242: 6242: 6242: 6242: 6242: 6242: 6242: ; 6242: ; 6242: 6242: return std::__prev_permutation(__first, __last, 6242: __gnu_cxx::__ops::__iter_comp_iter(__comp)); 6242: } 6242: 6242: 6242: 6242: 6242: template 6242: _OutputIterator 6242: __replace_copy_if(_InputIterator __first, _InputIterator __last, 6242: _OutputIterator __result, 6242: _Predicate __pred, const _Tp& __new_value) 6242: { 6242: for (; __first != __last; ++__first, (void)++__result) 6242: if (__pred(__first)) 6242: *__result = __new_value; 6242: else 6242: *__result = *__first; 6242: return __result; 6242: } 6242: # 3134 "/usr/include/c++/8/bits/stl_algo.h" 3 6242: template 6242: inline _OutputIterator 6242: replace_copy(_InputIterator __first, _InputIterator __last, 6242: _OutputIterator __result, 6242: const _Tp& __old_value, const _Tp& __new_value) 6242: { 6242: 6242: 6242: 6242: 6242: 6242: 6242: ; 6242: 6242: return std::__replace_copy_if(__first, __last, __result, 6242: __gnu_cxx::__ops::__iter_equals_val(__old_value), 6242: __new_value); 6242: } 6242: # 3168 "/usr/include/c++/8/bits/stl_algo.h" 3 6242: template 6242: inline _OutputIterator 6242: replace_copy_if(_InputIterator __first, _InputIterator __last, 6242: _OutputIterator __result, 6242: _Predicate __pred, const _Tp& __new_value) 6242: { 6242: 6242: 6242: 6242: 6242: 6242: 6242: ; 6242: 6242: return std::__replace_copy_if(__first, __last, __result, 6242: __gnu_cxx::__ops::__pred_iter(__pred), 6242: __new_value); 6242: } 6242: 6242: template 6242: typename iterator_traits<_InputIterator>::difference_type 6242: __count_if(_InputIterator __first, _InputIterator __last, _Predicate __pred) 6242: { 6242: typename iterator_traits<_InputIterator>::difference_type __n = 0; 6242: for (; __first != __last; ++__first) 6242: if (__pred(__first)) 6242: ++__n; 6242: return __n; 6242: } 6242: # 3207 "/usr/include/c++/8/bits/stl_algo.h" 3 6242: template 6242: inline bool 6242: is_sorted(_ForwardIterator __first, _ForwardIterator __last) 6242: { return std::is_sorted_until(__first, __last) == __last; } 6242: # 3221 "/usr/include/c++/8/bits/stl_algo.h" 3 6242: template 6242: inline bool 6242: is_sorted(_ForwardIterator __first, _ForwardIterator __last, 6242: _Compare __comp) 6242: { return std::is_sorted_until(__first, __last, __comp) == __last; } 6242: 6242: template 6242: _ForwardIterator 6242: __is_sorted_until(_ForwardIterator __first, _ForwardIterator __last, 6242: _Compare __comp) 6242: { 6242: if (__first == __last) 6242: return __last; 6242: 6242: _ForwardIterator __next = __first; 6242: for (++__next; __next != __last; __first = __next, (void)++__next) 6242: if (__comp(__next, __first)) 6242: return __next; 6242: return __next; 6242: } 6242: # 3250 "/usr/include/c++/8/bits/stl_algo.h" 3 6242: template 6242: inline _ForwardIterator 6242: is_sorted_until(_ForwardIterator __first, _ForwardIterator __last) 6242: { 6242: 6242: 6242: 6242: 6242: ; 6242: ; 6242: 6242: return std::__is_sorted_until(__first, __last, 6242: __gnu_cxx::__ops::__iter_less_iter()); 6242: } 6242: # 3274 "/usr/include/c++/8/bits/stl_algo.h" 3 6242: template 6242: inline _ForwardIterator 6242: is_sorted_until(_ForwardIterator __first, _ForwardIterator __last, 6242: _Compare __comp) 6242: { 6242: 6242: 6242: 6242: 6242: 6242: ; 6242: ; 6242: 6242: return std::__is_sorted_until(__first, __last, 6242: __gnu_cxx::__ops::__iter_comp_iter(__comp)); 6242: } 6242: # 3299 "/usr/include/c++/8/bits/stl_algo.h" 3 6242: template 6242: 6242: inline pair 6242: minmax(const _Tp& __a, const _Tp& __b) 6242: { 6242: 6242: 6242: 6242: return __b < __a ? pair(__b, __a) 6242: : pair(__a, __b); 6242: } 6242: # 3320 "/usr/include/c++/8/bits/stl_algo.h" 3 6242: template 6242: 6242: inline pair 6242: minmax(const _Tp& __a, const _Tp& __b, _Compare __comp) 6242: { 6242: return __comp(__b, __a) ? pair(__b, __a) 6242: : pair(__a, __b); 6242: } 6242: 6242: template 6242: 6242: pair<_ForwardIterator, _ForwardIterator> 6242: __minmax_element(_ForwardIterator __first, _ForwardIterator __last, 6242: _Compare __comp) 6242: { 6242: _ForwardIterator __next = __first; 6242: if (__first == __last 6242: || ++__next == __last) 6242: return std::make_pair(__first, __first); 6242: 6242: _ForwardIterator __min{}, __max{}; 6242: if (__comp(__next, __first)) 6242: { 6242: __min = __next; 6242: __max = __first; 6242: } 6242: else 6242: { 6242: __min = __first; 6242: __max = __next; 6242: } 6242: 6242: __first = __next; 6242: ++__first; 6242: 6242: while (__first != __last) 6242: { 6242: __next = __first; 6242: if (++__next == __last) 6242: { 6242: if (__comp(__first, __min)) 6242: __min = __first; 6242: else if (!__comp(__first, __max)) 6242: __max = __first; 6242: break; 6242: } 6242: 6242: if (__comp(__next, __first)) 6242: { 6242: if (__comp(__next, __min)) 6242: __min = __next; 6242: if (!__comp(__first, __max)) 6242: __max = __first; 6242: } 6242: else 6242: { 6242: if (__comp(__first, __min)) 6242: __min = __first; 6242: if (!__comp(__next, __max)) 6242: __max = __next; 6242: } 6242: 6242: __first = __next; 6242: ++__first; 6242: } 6242: 6242: return std::make_pair(__min, __max); 6242: } 6242: # 3400 "/usr/include/c++/8/bits/stl_algo.h" 3 6242: template 6242: 6242: inline pair<_ForwardIterator, _ForwardIterator> 6242: minmax_element(_ForwardIterator __first, _ForwardIterator __last) 6242: { 6242: 6242: 6242: 6242: 6242: ; 6242: ; 6242: 6242: return std::__minmax_element(__first, __last, 6242: __gnu_cxx::__ops::__iter_less_iter()); 6242: } 6242: # 3428 "/usr/include/c++/8/bits/stl_algo.h" 3 6242: template 6242: 6242: inline pair<_ForwardIterator, _ForwardIterator> 6242: minmax_element(_ForwardIterator __first, _ForwardIterator __last, 6242: _Compare __comp) 6242: { 6242: 6242: 6242: 6242: 6242: 6242: ; 6242: ; 6242: 6242: return std::__minmax_element(__first, __last, 6242: __gnu_cxx::__ops::__iter_comp_iter(__comp)); 6242: } 6242: 6242: 6242: template 6242: 6242: inline _Tp 6242: min(initializer_list<_Tp> __l) 6242: { return *std::min_element(__l.begin(), __l.end()); } 6242: 6242: template 6242: 6242: inline _Tp 6242: min(initializer_list<_Tp> __l, _Compare __comp) 6242: { return *std::min_element(__l.begin(), __l.end(), __comp); } 6242: 6242: template 6242: 6242: inline _Tp 6242: max(initializer_list<_Tp> __l) 6242: { return *std::max_element(__l.begin(), __l.end()); } 6242: 6242: template 6242: 6242: inline _Tp 6242: max(initializer_list<_Tp> __l, _Compare __comp) 6242: { return *std::max_element(__l.begin(), __l.end(), __comp); } 6242: 6242: template 6242: 6242: inline pair<_Tp, _Tp> 6242: minmax(initializer_list<_Tp> __l) 6242: { 6242: pair __p = 6242: std::minmax_element(__l.begin(), __l.end()); 6242: return std::make_pair(*__p.first, *__p.second); 6242: } 6242: 6242: template 6242: 6242: inline pair<_Tp, _Tp> 6242: minmax(initializer_list<_Tp> __l, _Compare __comp) 6242: { 6242: pair __p = 6242: std::minmax_element(__l.begin(), __l.end(), __comp); 6242: return std::make_pair(*__p.first, *__p.second); 6242: } 6242: 6242: template 6242: bool 6242: __is_permutation(_ForwardIterator1 __first1, _ForwardIterator1 __last1, 6242: _ForwardIterator2 __first2, _BinaryPredicate __pred) 6242: { 6242: 6242: 6242: for (; __first1 != __last1; ++__first1, (void)++__first2) 6242: if (!__pred(__first1, __first2)) 6242: break; 6242: 6242: if (__first1 == __last1) 6242: return true; 6242: 6242: 6242: 6242: _ForwardIterator2 __last2 = __first2; 6242: std::advance(__last2, std::distance(__first1, __last1)); 6242: for (_ForwardIterator1 __scan = __first1; __scan != __last1; ++__scan) 6242: { 6242: if (__scan != std::__find_if(__first1, __scan, 6242: __gnu_cxx::__ops::__iter_comp_iter(__pred, __scan))) 6242: continue; 6242: 6242: auto __matches 6242: = std::__count_if(__first2, __last2, 6242: __gnu_cxx::__ops::__iter_comp_iter(__pred, __scan)); 6242: if (0 == __matches || 6242: std::__count_if(__scan, __last1, 6242: __gnu_cxx::__ops::__iter_comp_iter(__pred, __scan)) 6242: != __matches) 6242: return false; 6242: } 6242: return true; 6242: } 6242: # 3540 "/usr/include/c++/8/bits/stl_algo.h" 3 6242: template 6242: inline bool 6242: is_permutation(_ForwardIterator1 __first1, _ForwardIterator1 __last1, 6242: _ForwardIterator2 __first2) 6242: { 6242: 6242: 6242: 6242: 6242: 6242: 6242: ; 6242: 6242: return std::__is_permutation(__first1, __last1, __first2, 6242: __gnu_cxx::__ops::__iter_equal_to_iter()); 6242: } 6242: # 3571 "/usr/include/c++/8/bits/stl_algo.h" 3 6242: template 6242: inline bool 6242: is_permutation(_ForwardIterator1 __first1, _ForwardIterator1 __last1, 6242: _ForwardIterator2 __first2, _BinaryPredicate __pred) 6242: { 6242: 6242: 6242: 6242: 6242: 6242: 6242: ; 6242: 6242: return std::__is_permutation(__first1, __last1, __first2, 6242: __gnu_cxx::__ops::__iter_comp_iter(__pred)); 6242: } 6242: # 3767 "/usr/include/c++/8/bits/stl_algo.h" 3 6242: template 6242: pair<_IntType, _IntType> 6242: __gen_two_uniform_ints(_IntType __b0, _IntType __b1, 6242: _UniformRandomBitGenerator&& __g) 6242: { 6242: _IntType __x 6242: = uniform_int_distribution<_IntType>{0, (__b0 * __b1) - 1}(__g); 6242: return std::make_pair(__x / __b1, __x % __b1); 6242: } 6242: # 3789 "/usr/include/c++/8/bits/stl_algo.h" 3 6242: template 6242: void 6242: shuffle(_RandomAccessIterator __first, _RandomAccessIterator __last, 6242: _UniformRandomNumberGenerator&& __g) 6242: { 6242: 6242: 6242: 6242: ; 6242: 6242: if (__first == __last) 6242: return; 6242: 6242: typedef typename iterator_traits<_RandomAccessIterator>::difference_type 6242: _DistanceType; 6242: 6242: typedef typename std::make_unsigned<_DistanceType>::type __ud_type; 6242: typedef typename std::uniform_int_distribution<__ud_type> __distr_type; 6242: typedef typename __distr_type::param_type __p_type; 6242: 6242: typedef typename remove_reference<_UniformRandomNumberGenerator>::type 6242: _Gen; 6242: typedef typename common_type::type 6242: __uc_type; 6242: 6242: const __uc_type __urngrange = __g.max() - __g.min(); 6242: const __uc_type __urange = __uc_type(__last - __first); 6242: 6242: if (__urngrange / __urange >= __urange) 6242: 6242: { 6242: _RandomAccessIterator __i = __first + 1; 6242: 6242: 6242: 6242: 6242: 6242: if ((__urange % 2) == 0) 6242: { 6242: __distr_type __d{0, 1}; 6242: std::iter_swap(__i++, __first + __d(__g)); 6242: } 6242: 6242: 6242: 6242: 6242: 6242: while (__i != __last) 6242: { 6242: const __uc_type __swap_range = __uc_type(__i - __first) + 1; 6242: 6242: const pair<__uc_type, __uc_type> __pospos = 6242: __gen_two_uniform_ints(__swap_range, __swap_range + 1, __g); 6242: 6242: std::iter_swap(__i++, __first + __pospos.first); 6242: std::iter_swap(__i++, __first + __pospos.second); 6242: } 6242: 6242: return; 6242: } 6242: 6242: __distr_type __d; 6242: 6242: for (_RandomAccessIterator __i = __first + 1; __i != __last; ++__i) 6242: std::iter_swap(__i, __first + __d(__g, __p_type(0, __i - __first))); 6242: } 6242: 6242: 6242: 6242: 6242: 6242: # 3874 "/usr/include/c++/8/bits/stl_algo.h" 3 6242: template 6242: _Function 6242: for_each(_InputIterator __first, _InputIterator __last, _Function __f) 6242: { 6242: 6242: 6242: ; 6242: for (; __first != __last; ++__first) 6242: __f(*__first); 6242: return __f; 6242: } 6242: # 3895 "/usr/include/c++/8/bits/stl_algo.h" 3 6242: template 6242: inline _InputIterator 6242: find(_InputIterator __first, _InputIterator __last, 6242: const _Tp& __val) 6242: { 6242: 6242: 6242: 6242: 6242: ; 6242: return std::__find_if(__first, __last, 6242: __gnu_cxx::__ops::__iter_equals_val(__val)); 6242: } 6242: # 3919 "/usr/include/c++/8/bits/stl_algo.h" 3 6242: template 6242: inline _InputIterator 6242: find_if(_InputIterator __first, _InputIterator __last, 6242: _Predicate __pred) 6242: { 6242: 6242: 6242: 6242: 6242: ; 6242: 6242: return std::__find_if(__first, __last, 6242: __gnu_cxx::__ops::__pred_iter(__pred)); 6242: } 6242: # 3950 "/usr/include/c++/8/bits/stl_algo.h" 3 6242: template 6242: _InputIterator 6242: find_first_of(_InputIterator __first1, _InputIterator __last1, 6242: _ForwardIterator __first2, _ForwardIterator __last2) 6242: { 6242: 6242: 6242: 6242: 6242: 6242: 6242: ; 6242: ; 6242: 6242: for (; __first1 != __last1; ++__first1) 6242: for (_ForwardIterator __iter = __first2; __iter != __last2; ++__iter) 6242: if (*__first1 == *__iter) 6242: return __first1; 6242: return __last1; 6242: } 6242: # 3990 "/usr/include/c++/8/bits/stl_algo.h" 3 6242: template 6242: _InputIterator 6242: find_first_of(_InputIterator __first1, _InputIterator __last1, 6242: _ForwardIterator __first2, _ForwardIterator __last2, 6242: _BinaryPredicate __comp) 6242: { 6242: 6242: 6242: 6242: 6242: 6242: 6242: ; 6242: ; 6242: 6242: for (; __first1 != __last1; ++__first1) 6242: for (_ForwardIterator __iter = __first2; __iter != __last2; ++__iter) 6242: if (__comp(*__first1, *__iter)) 6242: return __first1; 6242: return __last1; 6242: } 6242: # 4022 "/usr/include/c++/8/bits/stl_algo.h" 3 6242: template 6242: inline _ForwardIterator 6242: adjacent_find(_ForwardIterator __first, _ForwardIterator __last) 6242: { 6242: 6242: 6242: 6242: 6242: ; 6242: 6242: return std::__adjacent_find(__first, __last, 6242: __gnu_cxx::__ops::__iter_equal_to_iter()); 6242: } 6242: # 4047 "/usr/include/c++/8/bits/stl_algo.h" 3 6242: template 6242: inline _ForwardIterator 6242: adjacent_find(_ForwardIterator __first, _ForwardIterator __last, 6242: _BinaryPredicate __binary_pred) 6242: { 6242: 6242: 6242: 6242: 6242: 6242: ; 6242: 6242: return std::__adjacent_find(__first, __last, 6242: __gnu_cxx::__ops::__iter_comp_iter(__binary_pred)); 6242: } 6242: # 4072 "/usr/include/c++/8/bits/stl_algo.h" 3 6242: template 6242: inline typename iterator_traits<_InputIterator>::difference_type 6242: count(_InputIterator __first, _InputIterator __last, const _Tp& __value) 6242: { 6242: 6242: 6242: 6242: 6242: ; 6242: 6242: return std::__count_if(__first, __last, 6242: __gnu_cxx::__ops::__iter_equals_val(__value)); 6242: } 6242: # 4095 "/usr/include/c++/8/bits/stl_algo.h" 3 6242: template 6242: inline typename iterator_traits<_InputIterator>::difference_type 6242: count_if(_InputIterator __first, _InputIterator __last, _Predicate __pred) 6242: { 6242: 6242: 6242: 6242: 6242: ; 6242: 6242: return std::__count_if(__first, __last, 6242: __gnu_cxx::__ops::__pred_iter(__pred)); 6242: } 6242: # 4135 "/usr/include/c++/8/bits/stl_algo.h" 3 6242: template 6242: inline _ForwardIterator1 6242: search(_ForwardIterator1 __first1, _ForwardIterator1 __last1, 6242: _ForwardIterator2 __first2, _ForwardIterator2 __last2) 6242: { 6242: 6242: 6242: 6242: 6242: 6242: 6242: ; 6242: ; 6242: 6242: return std::__search(__first1, __last1, __first2, __last2, 6242: __gnu_cxx::__ops::__iter_equal_to_iter()); 6242: } 6242: # 4174 "/usr/include/c++/8/bits/stl_algo.h" 3 6242: template 6242: inline _ForwardIterator1 6242: search(_ForwardIterator1 __first1, _ForwardIterator1 __last1, 6242: _ForwardIterator2 __first2, _ForwardIterator2 __last2, 6242: _BinaryPredicate __predicate) 6242: { 6242: 6242: 6242: 6242: 6242: 6242: 6242: ; 6242: ; 6242: 6242: return std::__search(__first1, __last1, __first2, __last2, 6242: __gnu_cxx::__ops::__iter_comp_iter(__predicate)); 6242: } 6242: # 4209 "/usr/include/c++/8/bits/stl_algo.h" 3 6242: template 6242: inline _ForwardIterator 6242: search_n(_ForwardIterator __first, _ForwardIterator __last, 6242: _Integer __count, const _Tp& __val) 6242: { 6242: 6242: 6242: 6242: 6242: ; 6242: 6242: return std::__search_n(__first, __last, __count, 6242: __gnu_cxx::__ops::__iter_equals_val(__val)); 6242: } 6242: # 4242 "/usr/include/c++/8/bits/stl_algo.h" 3 6242: template 6242: inline _ForwardIterator 6242: search_n(_ForwardIterator __first, _ForwardIterator __last, 6242: _Integer __count, const _Tp& __val, 6242: _BinaryPredicate __binary_pred) 6242: { 6242: 6242: 6242: 6242: 6242: ; 6242: 6242: return std::__search_n(__first, __last, __count, 6242: __gnu_cxx::__ops::__iter_comp_val(__binary_pred, __val)); 6242: } 6242: # 4290 "/usr/include/c++/8/bits/stl_algo.h" 3 6242: template 6242: _OutputIterator 6242: transform(_InputIterator __first, _InputIterator __last, 6242: _OutputIterator __result, _UnaryOperation __unary_op) 6242: { 6242: 6242: 6242: 6242: 6242: 6242: ; 6242: 6242: for (; __first != __last; ++__first, (void)++__result) 6242: *__result = __unary_op(*__first); 6242: return __result; 6242: } 6242: # 4327 "/usr/include/c++/8/bits/stl_algo.h" 3 6242: template 6242: _OutputIterator 6242: transform(_InputIterator1 __first1, _InputIterator1 __last1, 6242: _InputIterator2 __first2, _OutputIterator __result, 6242: _BinaryOperation __binary_op) 6242: { 6242: 6242: 6242: 6242: 6242: 6242: 6242: ; 6242: 6242: for (; __first1 != __last1; ++__first1, (void)++__first2, ++__result) 6242: *__result = __binary_op(*__first1, *__first2); 6242: return __result; 6242: } 6242: # 4360 "/usr/include/c++/8/bits/stl_algo.h" 3 6242: template 6242: void 6242: replace(_ForwardIterator __first, _ForwardIterator __last, 6242: const _Tp& __old_value, const _Tp& __new_value) 6242: { 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: ; 6242: 6242: for (; __first != __last; ++__first) 6242: if (*__first == __old_value) 6242: *__first = __new_value; 6242: } 6242: # 4392 "/usr/include/c++/8/bits/stl_algo.h" 3 6242: template 6242: void 6242: replace_if(_ForwardIterator __first, _ForwardIterator __last, 6242: _Predicate __pred, const _Tp& __new_value) 6242: { 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: ; 6242: 6242: for (; __first != __last; ++__first) 6242: if (__pred(*__first)) 6242: *__first = __new_value; 6242: } 6242: # 4424 "/usr/include/c++/8/bits/stl_algo.h" 3 6242: template 6242: void 6242: generate(_ForwardIterator __first, _ForwardIterator __last, 6242: _Generator __gen) 6242: { 6242: 6242: 6242: 6242: 6242: ; 6242: 6242: for (; __first != __last; ++__first) 6242: *__first = __gen(); 6242: } 6242: # 4455 "/usr/include/c++/8/bits/stl_algo.h" 3 6242: template 6242: _OutputIterator 6242: generate_n(_OutputIterator __first, _Size __n, _Generator __gen) 6242: { 6242: 6242: 6242: 6242: 6242: 6242: for (__decltype(__n + 0) __niter = __n; 6242: __niter > 0; --__niter, (void) ++__first) 6242: *__first = __gen(); 6242: return __first; 6242: } 6242: # 4491 "/usr/include/c++/8/bits/stl_algo.h" 3 6242: template 6242: inline _OutputIterator 6242: unique_copy(_InputIterator __first, _InputIterator __last, 6242: _OutputIterator __result) 6242: { 6242: 6242: 6242: 6242: 6242: 6242: 6242: ; 6242: 6242: if (__first == __last) 6242: return __result; 6242: return std::__unique_copy(__first, __last, __result, 6242: __gnu_cxx::__ops::__iter_equal_to_iter(), 6242: std::__iterator_category(__first), 6242: std::__iterator_category(__result)); 6242: } 6242: # 4531 "/usr/include/c++/8/bits/stl_algo.h" 3 6242: template 6242: inline _OutputIterator 6242: unique_copy(_InputIterator __first, _InputIterator __last, 6242: _OutputIterator __result, 6242: _BinaryPredicate __binary_pred) 6242: { 6242: 6242: 6242: 6242: 6242: ; 6242: 6242: if (__first == __last) 6242: return __result; 6242: return std::__unique_copy(__first, __last, __result, 6242: __gnu_cxx::__ops::__iter_comp_iter(__binary_pred), 6242: std::__iterator_category(__first), 6242: std::__iterator_category(__result)); 6242: } 6242: # 4564 "/usr/include/c++/8/bits/stl_algo.h" 3 6242: template 6242: inline void 6242: random_shuffle(_RandomAccessIterator __first, _RandomAccessIterator __last) 6242: { 6242: 6242: 6242: 6242: ; 6242: 6242: if (__first != __last) 6242: for (_RandomAccessIterator __i = __first + 1; __i != __last; ++__i) 6242: { 6242: 6242: _RandomAccessIterator __j = __first 6242: + std::rand() % ((__i - __first) + 1); 6242: if (__i != __j) 6242: std::iter_swap(__i, __j); 6242: } 6242: } 6242: # 4599 "/usr/include/c++/8/bits/stl_algo.h" 3 6242: template 6242: void 6242: random_shuffle(_RandomAccessIterator __first, _RandomAccessIterator __last, 6242: 6242: _RandomNumberGenerator&& __rand) 6242: 6242: 6242: 6242: { 6242: 6242: 6242: 6242: ; 6242: 6242: if (__first == __last) 6242: return; 6242: for (_RandomAccessIterator __i = __first + 1; __i != __last; ++__i) 6242: { 6242: _RandomAccessIterator __j = __first + __rand((__i - __first) + 1); 6242: if (__i != __j) 6242: std::iter_swap(__i, __j); 6242: } 6242: } 6242: # 4639 "/usr/include/c++/8/bits/stl_algo.h" 3 6242: template 6242: inline _ForwardIterator 6242: partition(_ForwardIterator __first, _ForwardIterator __last, 6242: _Predicate __pred) 6242: { 6242: 6242: 6242: 6242: 6242: 6242: ; 6242: 6242: return std::__partition(__first, __last, __pred, 6242: std::__iterator_category(__first)); 6242: } 6242: # 4672 "/usr/include/c++/8/bits/stl_algo.h" 3 6242: template 6242: inline void 6242: partial_sort(_RandomAccessIterator __first, 6242: _RandomAccessIterator __middle, 6242: _RandomAccessIterator __last) 6242: { 6242: 6242: 6242: 6242: 6242: 6242: ; 6242: ; 6242: ; 6242: 6242: std::__partial_sort(__first, __middle, __last, 6242: __gnu_cxx::__ops::__iter_less_iter()); 6242: } 6242: # 4710 "/usr/include/c++/8/bits/stl_algo.h" 3 6242: template 6242: inline void 6242: partial_sort(_RandomAccessIterator __first, 6242: _RandomAccessIterator __middle, 6242: _RandomAccessIterator __last, 6242: _Compare __comp) 6242: { 6242: 6242: 6242: 6242: 6242: 6242: 6242: ; 6242: ; 6242: ; 6242: 6242: std::__partial_sort(__first, __middle, __last, 6242: __gnu_cxx::__ops::__iter_comp_iter(__comp)); 6242: } 6242: # 4746 "/usr/include/c++/8/bits/stl_algo.h" 3 6242: template 6242: inline void 6242: nth_element(_RandomAccessIterator __first, _RandomAccessIterator __nth, 6242: _RandomAccessIterator __last) 6242: { 6242: 6242: 6242: 6242: 6242: 6242: ; 6242: ; 6242: ; 6242: 6242: if (__first == __last || __nth == __last) 6242: return; 6242: 6242: std::__introselect(__first, __nth, __last, 6242: std::__lg(__last - __first) * 2, 6242: __gnu_cxx::__ops::__iter_less_iter()); 6242: } 6242: # 4785 "/usr/include/c++/8/bits/stl_algo.h" 3 6242: template 6242: inline void 6242: nth_element(_RandomAccessIterator __first, _RandomAccessIterator __nth, 6242: _RandomAccessIterator __last, _Compare __comp) 6242: { 6242: 6242: 6242: 6242: 6242: 6242: 6242: ; 6242: ; 6242: ; 6242: 6242: if (__first == __last || __nth == __last) 6242: return; 6242: 6242: std::__introselect(__first, __nth, __last, 6242: std::__lg(__last - __first) * 2, 6242: __gnu_cxx::__ops::__iter_comp_iter(__comp)); 6242: } 6242: # 4822 "/usr/include/c++/8/bits/stl_algo.h" 3 6242: template 6242: inline void 6242: sort(_RandomAccessIterator __first, _RandomAccessIterator __last) 6242: { 6242: 6242: 6242: 6242: 6242: 6242: ; 6242: ; 6242: 6242: std::__sort(__first, __last, __gnu_cxx::__ops::__iter_less_iter()); 6242: } 6242: # 4852 "/usr/include/c++/8/bits/stl_algo.h" 3 6242: template 6242: inline void 6242: sort(_RandomAccessIterator __first, _RandomAccessIterator __last, 6242: _Compare __comp) 6242: { 6242: 6242: 6242: 6242: 6242: 6242: 6242: ; 6242: ; 6242: 6242: std::__sort(__first, __last, __gnu_cxx::__ops::__iter_comp_iter(__comp)); 6242: } 6242: 6242: template 6242: _OutputIterator 6242: __merge(_InputIterator1 __first1, _InputIterator1 __last1, 6242: _InputIterator2 __first2, _InputIterator2 __last2, 6242: _OutputIterator __result, _Compare __comp) 6242: { 6242: while (__first1 != __last1 && __first2 != __last2) 6242: { 6242: if (__comp(__first2, __first1)) 6242: { 6242: *__result = *__first2; 6242: ++__first2; 6242: } 6242: else 6242: { 6242: *__result = *__first1; 6242: ++__first1; 6242: } 6242: ++__result; 6242: } 6242: return std::copy(__first2, __last2, 6242: std::copy(__first1, __last1, __result)); 6242: } 6242: # 4913 "/usr/include/c++/8/bits/stl_algo.h" 3 6242: template 6242: inline _OutputIterator 6242: merge(_InputIterator1 __first1, _InputIterator1 __last1, 6242: _InputIterator2 __first2, _InputIterator2 __last2, 6242: _OutputIterator __result) 6242: { 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: ; 6242: ; 6242: ; 6242: ; 6242: 6242: return std::__merge(__first1, __last1, 6242: __first2, __last2, __result, 6242: __gnu_cxx::__ops::__iter_less_iter()); 6242: } 6242: # 4963 "/usr/include/c++/8/bits/stl_algo.h" 3 6242: template 6242: inline _OutputIterator 6242: merge(_InputIterator1 __first1, _InputIterator1 __last1, 6242: _InputIterator2 __first2, _InputIterator2 __last2, 6242: _OutputIterator __result, _Compare __comp) 6242: { 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: ; 6242: ; 6242: ; 6242: ; 6242: 6242: return std::__merge(__first1, __last1, 6242: __first2, __last2, __result, 6242: __gnu_cxx::__ops::__iter_comp_iter(__comp)); 6242: } 6242: 6242: template 6242: inline void 6242: __stable_sort(_RandomAccessIterator __first, _RandomAccessIterator __last, 6242: _Compare __comp) 6242: { 6242: typedef typename iterator_traits<_RandomAccessIterator>::value_type 6242: _ValueType; 6242: typedef typename iterator_traits<_RandomAccessIterator>::difference_type 6242: _DistanceType; 6242: 6242: typedef _Temporary_buffer<_RandomAccessIterator, _ValueType> _TmpBuf; 6242: _TmpBuf __buf(__first, __last); 6242: 6242: if (__buf.begin() == 0) 6242: std::__inplace_stable_sort(__first, __last, __comp); 6242: else 6242: std::__stable_sort_adaptive(__first, __last, __buf.begin(), 6242: _DistanceType(__buf.size()), __comp); 6242: } 6242: # 5027 "/usr/include/c++/8/bits/stl_algo.h" 3 6242: template 6242: inline void 6242: stable_sort(_RandomAccessIterator __first, _RandomAccessIterator __last) 6242: { 6242: 6242: 6242: 6242: 6242: 6242: ; 6242: ; 6242: 6242: std::__stable_sort(__first, __last, 6242: __gnu_cxx::__ops::__iter_less_iter()); 6242: } 6242: # 5061 "/usr/include/c++/8/bits/stl_algo.h" 3 6242: template 6242: inline void 6242: stable_sort(_RandomAccessIterator __first, _RandomAccessIterator __last, 6242: _Compare __comp) 6242: { 6242: 6242: 6242: 6242: 6242: 6242: 6242: ; 6242: ; 6242: 6242: std::__stable_sort(__first, __last, 6242: __gnu_cxx::__ops::__iter_comp_iter(__comp)); 6242: } 6242: 6242: template 6242: _OutputIterator 6242: __set_union(_InputIterator1 __first1, _InputIterator1 __last1, 6242: _InputIterator2 __first2, _InputIterator2 __last2, 6242: _OutputIterator __result, _Compare __comp) 6242: { 6242: while (__first1 != __last1 && __first2 != __last2) 6242: { 6242: if (__comp(__first1, __first2)) 6242: { 6242: *__result = *__first1; 6242: ++__first1; 6242: } 6242: else if (__comp(__first2, __first1)) 6242: { 6242: *__result = *__first2; 6242: ++__first2; 6242: } 6242: else 6242: { 6242: *__result = *__first1; 6242: ++__first1; 6242: ++__first2; 6242: } 6242: ++__result; 6242: } 6242: return std::copy(__first2, __last2, 6242: std::copy(__first1, __last1, __result)); 6242: } 6242: # 5130 "/usr/include/c++/8/bits/stl_algo.h" 3 6242: template 6242: inline _OutputIterator 6242: set_union(_InputIterator1 __first1, _InputIterator1 __last1, 6242: _InputIterator2 __first2, _InputIterator2 __last2, 6242: _OutputIterator __result) 6242: { 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: ; 6242: ; 6242: ; 6242: ; 6242: 6242: return std::__set_union(__first1, __last1, 6242: __first2, __last2, __result, 6242: __gnu_cxx::__ops::__iter_less_iter()); 6242: } 6242: # 5180 "/usr/include/c++/8/bits/stl_algo.h" 3 6242: template 6242: inline _OutputIterator 6242: set_union(_InputIterator1 __first1, _InputIterator1 __last1, 6242: _InputIterator2 __first2, _InputIterator2 __last2, 6242: _OutputIterator __result, _Compare __comp) 6242: { 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: ; 6242: ; 6242: ; 6242: ; 6242: 6242: return std::__set_union(__first1, __last1, 6242: __first2, __last2, __result, 6242: __gnu_cxx::__ops::__iter_comp_iter(__comp)); 6242: } 6242: 6242: template 6242: _OutputIterator 6242: __set_intersection(_InputIterator1 __first1, _InputIterator1 __last1, 6242: _InputIterator2 __first2, _InputIterator2 __last2, 6242: _OutputIterator __result, _Compare __comp) 6242: { 6242: while (__first1 != __last1 && __first2 != __last2) 6242: if (__comp(__first1, __first2)) 6242: ++__first1; 6242: else if (__comp(__first2, __first1)) 6242: ++__first2; 6242: else 6242: { 6242: *__result = *__first1; 6242: ++__first1; 6242: ++__first2; 6242: ++__result; 6242: } 6242: return __result; 6242: } 6242: # 5251 "/usr/include/c++/8/bits/stl_algo.h" 3 6242: template 6242: inline _OutputIterator 6242: set_intersection(_InputIterator1 __first1, _InputIterator1 __last1, 6242: _InputIterator2 __first2, _InputIterator2 __last2, 6242: _OutputIterator __result) 6242: { 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: ; 6242: ; 6242: ; 6242: ; 6242: 6242: return std::__set_intersection(__first1, __last1, 6242: __first2, __last2, __result, 6242: __gnu_cxx::__ops::__iter_less_iter()); 6242: } 6242: # 5300 "/usr/include/c++/8/bits/stl_algo.h" 3 6242: template 6242: inline _OutputIterator 6242: set_intersection(_InputIterator1 __first1, _InputIterator1 __last1, 6242: _InputIterator2 __first2, _InputIterator2 __last2, 6242: _OutputIterator __result, _Compare __comp) 6242: { 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: ; 6242: ; 6242: ; 6242: ; 6242: 6242: return std::__set_intersection(__first1, __last1, 6242: __first2, __last2, __result, 6242: __gnu_cxx::__ops::__iter_comp_iter(__comp)); 6242: } 6242: 6242: template 6242: _OutputIterator 6242: __set_difference(_InputIterator1 __first1, _InputIterator1 __last1, 6242: _InputIterator2 __first2, _InputIterator2 __last2, 6242: _OutputIterator __result, _Compare __comp) 6242: { 6242: while (__first1 != __last1 && __first2 != __last2) 6242: if (__comp(__first1, __first2)) 6242: { 6242: *__result = *__first1; 6242: ++__first1; 6242: ++__result; 6242: } 6242: else if (__comp(__first2, __first1)) 6242: ++__first2; 6242: else 6242: { 6242: ++__first1; 6242: ++__first2; 6242: } 6242: return std::copy(__first1, __last1, __result); 6242: } 6242: # 5373 "/usr/include/c++/8/bits/stl_algo.h" 3 6242: template 6242: inline _OutputIterator 6242: set_difference(_InputIterator1 __first1, _InputIterator1 __last1, 6242: _InputIterator2 __first2, _InputIterator2 __last2, 6242: _OutputIterator __result) 6242: { 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: ; 6242: ; 6242: ; 6242: ; 6242: 6242: return std::__set_difference(__first1, __last1, 6242: __first2, __last2, __result, 6242: __gnu_cxx::__ops::__iter_less_iter()); 6242: } 6242: # 5424 "/usr/include/c++/8/bits/stl_algo.h" 3 6242: template 6242: inline _OutputIterator 6242: set_difference(_InputIterator1 __first1, _InputIterator1 __last1, 6242: _InputIterator2 __first2, _InputIterator2 __last2, 6242: _OutputIterator __result, _Compare __comp) 6242: { 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: ; 6242: ; 6242: ; 6242: ; 6242: 6242: return std::__set_difference(__first1, __last1, 6242: __first2, __last2, __result, 6242: __gnu_cxx::__ops::__iter_comp_iter(__comp)); 6242: } 6242: 6242: template 6242: _OutputIterator 6242: __set_symmetric_difference(_InputIterator1 __first1, 6242: _InputIterator1 __last1, 6242: _InputIterator2 __first2, 6242: _InputIterator2 __last2, 6242: _OutputIterator __result, 6242: _Compare __comp) 6242: { 6242: while (__first1 != __last1 && __first2 != __last2) 6242: if (__comp(__first1, __first2)) 6242: { 6242: *__result = *__first1; 6242: ++__first1; 6242: ++__result; 6242: } 6242: else if (__comp(__first2, __first1)) 6242: { 6242: *__result = *__first2; 6242: ++__first2; 6242: ++__result; 6242: } 6242: else 6242: { 6242: ++__first1; 6242: ++__first2; 6242: } 6242: return std::copy(__first2, __last2, 6242: std::copy(__first1, __last1, __result)); 6242: } 6242: # 5503 "/usr/include/c++/8/bits/stl_algo.h" 3 6242: template 6242: inline _OutputIterator 6242: set_symmetric_difference(_InputIterator1 __first1, _InputIterator1 __last1, 6242: _InputIterator2 __first2, _InputIterator2 __last2, 6242: _OutputIterator __result) 6242: { 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: ; 6242: ; 6242: ; 6242: ; 6242: 6242: return std::__set_symmetric_difference(__first1, __last1, 6242: __first2, __last2, __result, 6242: __gnu_cxx::__ops::__iter_less_iter()); 6242: } 6242: # 5554 "/usr/include/c++/8/bits/stl_algo.h" 3 6242: template 6242: inline _OutputIterator 6242: set_symmetric_difference(_InputIterator1 __first1, _InputIterator1 __last1, 6242: _InputIterator2 __first2, _InputIterator2 __last2, 6242: _OutputIterator __result, 6242: _Compare __comp) 6242: { 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: ; 6242: ; 6242: ; 6242: ; 6242: 6242: return std::__set_symmetric_difference(__first1, __last1, 6242: __first2, __last2, __result, 6242: __gnu_cxx::__ops::__iter_comp_iter(__comp)); 6242: } 6242: 6242: template 6242: 6242: _ForwardIterator 6242: __min_element(_ForwardIterator __first, _ForwardIterator __last, 6242: _Compare __comp) 6242: { 6242: if (__first == __last) 6242: return __first; 6242: _ForwardIterator __result = __first; 6242: while (++__first != __last) 6242: if (__comp(__first, __result)) 6242: __result = __first; 6242: return __result; 6242: } 6242: # 5607 "/usr/include/c++/8/bits/stl_algo.h" 3 6242: template 6242: 6242: _ForwardIterator 6242: inline min_element(_ForwardIterator __first, _ForwardIterator __last) 6242: { 6242: 6242: 6242: 6242: 6242: ; 6242: ; 6242: 6242: return std::__min_element(__first, __last, 6242: __gnu_cxx::__ops::__iter_less_iter()); 6242: } 6242: # 5632 "/usr/include/c++/8/bits/stl_algo.h" 3 6242: template 6242: 6242: inline _ForwardIterator 6242: min_element(_ForwardIterator __first, _ForwardIterator __last, 6242: _Compare __comp) 6242: { 6242: 6242: 6242: 6242: 6242: 6242: ; 6242: ; 6242: 6242: return std::__min_element(__first, __last, 6242: __gnu_cxx::__ops::__iter_comp_iter(__comp)); 6242: } 6242: 6242: template 6242: 6242: _ForwardIterator 6242: __max_element(_ForwardIterator __first, _ForwardIterator __last, 6242: _Compare __comp) 6242: { 6242: if (__first == __last) return __first; 6242: _ForwardIterator __result = __first; 6242: while (++__first != __last) 6242: if (__comp(__result, __first)) 6242: __result = __first; 6242: return __result; 6242: } 6242: # 5671 "/usr/include/c++/8/bits/stl_algo.h" 3 6242: template 6242: 6242: inline _ForwardIterator 6242: max_element(_ForwardIterator __first, _ForwardIterator __last) 6242: { 6242: 6242: 6242: 6242: 6242: ; 6242: ; 6242: 6242: return std::__max_element(__first, __last, 6242: __gnu_cxx::__ops::__iter_less_iter()); 6242: } 6242: # 5696 "/usr/include/c++/8/bits/stl_algo.h" 3 6242: template 6242: 6242: inline _ForwardIterator 6242: max_element(_ForwardIterator __first, _ForwardIterator __last, 6242: _Compare __comp) 6242: { 6242: 6242: 6242: 6242: 6242: 6242: ; 6242: ; 6242: 6242: return std::__max_element(__first, __last, 6242: __gnu_cxx::__ops::__iter_comp_iter(__comp)); 6242: } 6242: # 5839 "/usr/include/c++/8/bits/stl_algo.h" 3 6242: 6242: 6242: } 6242: # 63 "/usr/include/c++/8/algorithm" 2 3 6242: # 8 "id_map.hh" 2 6242: 6242: 6242: # 9 "id_map.hh" 6242: namespace Kakoune 6242: { 6242: 6242: template 6242: class IdMap 6242: { 6242: public: 6242: struct Element 6242: { 6242: Element(String k, Value v) 6242: : hash(hash_value(k)), key(std::move(k)), value(std::move(v)) {} 6242: 6242: size_t hash; 6242: String key; 6242: Value value; 6242: 6242: bool operator==(const Element& other) const 6242: { 6242: return hash == other.hash and key == other.key and value == other.value; 6242: } 6242: }; 6242: 6242: using container_type = Vector; 6242: using iterator = typename container_type::iterator; 6242: using const_iterator = typename container_type::const_iterator; 6242: 6242: IdMap() = default; 6242: 6242: IdMap(std::initializer_list val) : m_content{val} {} 6242: 6242: void append(const Element& value) 6242: { 6242: m_content.push_back(value); 6242: } 6242: 6242: void append(Element&& value) 6242: { 6242: m_content.push_back(std::move(value)); 6242: } 6242: 6242: iterator find(StringView id) 6242: { 6242: const size_t hash = hash_value(id); 6242: return std::find_if(begin(), end(), 6242: [id, hash](const Element& e) 6242: { return e.hash == hash and e.key == id; }); 6242: } 6242: 6242: const_iterator find(StringView id) const 6242: { 6242: return const_cast(this)->find(id); 6242: } 6242: 6242: bool contains(StringView id) const 6242: { 6242: return find(id) != end(); 6242: } 6242: 6242: void remove(StringView id) 6242: { 6242: auto it = find(id); 6242: if (it != end()) 6242: m_content.erase(it); 6242: } 6242: 6242: void remove_all(StringView id) 6242: { 6242: const size_t hash = hash_value(id); 6242: auto it = std::remove_if(begin(), end(), [id, hash](const Element& e) 6242: { return e.hash == hash and e.key == id; }); 6242: m_content.erase(it, end()); 6242: } 6242: 6242: Value& operator[](StringView id) 6242: { 6242: auto it = find(id); 6242: if (it != m_content.end()) 6242: return it->value; 6242: 6242: append({ id.str(), Value{} }); 6242: return (m_content.end()-1)->value; 6242: } 6242: 6242: template 6242: bool operator==(const IdMap& other) const 6242: { 6242: return size() == other.size() and std::equal(begin(), end(), other.begin()); 6242: } 6242: 6242: template 6242: bool operator!=(const IdMap& other) const 6242: { 6242: return not (*this == other); 6242: } 6242: 6242: void reserve(size_t size) { m_content.reserve(size); } 6242: size_t size() const { return m_content.size(); } 6242: void clear() { m_content.clear(); } 6242: void erase(iterator it) { m_content.erase(it); } 6242: 6242: static const String& get_id(const Element& e) { return e.key; } 6242: 6242: bool empty() const { return m_content.empty(); } 6242: 6242: iterator begin() { return m_content.begin(); } 6242: iterator end() { return m_content.end(); } 6242: const_iterator begin() const { return m_content.begin(); } 6242: const_iterator end() const { return m_content.end(); } 6242: 6242: private: 6242: container_type m_content; 6242: }; 6242: 6242: } 6242: # 7 "alias_registry.hh" 2 6242: 6242: namespace Kakoune 6242: { 6242: 6242: class AliasRegistry : public SafeCountable 6242: { 6242: public: 6242: AliasRegistry(AliasRegistry& parent) : m_parent(&parent) {} 6242: void add_alias(String alias, String command); 6242: void remove_alias(StringView alias); 6242: StringView operator[](StringView name) const; 6242: 6242: using AliasMap = IdMap; 6242: using iterator = AliasMap::const_iterator; 6242: 6242: Vector aliases_for(StringView command) const; 6242: using AliasDesc = std::pair; 6242: Vector flatten_aliases() const; 6242: 6242: private: 6242: friend class Scope; 6242: AliasRegistry() {} 6242: 6242: SafePtr m_parent; 6242: AliasMap m_aliases; 6242: }; 6242: 6242: } 6242: # 5 "scope.hh" 2 6242: # 1 "hook_manager.hh" 1 6242: 6242: 6242: 6242: 6242: # 1 "completion.hh" 1 6242: # 11 "completion.hh" 6242: # 1 "ranked_match.hh" 1 6242: 6242: 6242: 6242: 6242: 6242: namespace Kakoune 6242: { 6242: 6242: using UsedLetters = uint64_t; 6242: UsedLetters used_letters(StringView str); 6242: 6242: constexpr UsedLetters upper_mask = 0xFFFFFFC000000; 6242: 6242: inline UsedLetters to_lower(UsedLetters letters) 6242: { 6242: return ((letters & upper_mask) >> 26) | (letters & (~upper_mask)); 6242: } 6242: 6242: struct RankedMatch 6242: { 6242: RankedMatch(StringView candidate, StringView query); 6242: RankedMatch(StringView candidate, UsedLetters candidate_letters, 6242: StringView query, UsedLetters query_letters); 6242: 6242: const StringView& candidate() const { return m_candidate; } 6242: bool operator<(const RankedMatch& other) const; 6242: bool operator==(const RankedMatch& other) const { return m_candidate == other.m_candidate; } 6242: 6242: explicit operator bool() const { return not m_candidate.empty(); } 6242: 6242: private: 6242: template 6242: RankedMatch(StringView candidate, StringView query, TestFunc test); 6242: 6242: enum class Flags : int 6242: { 6242: None = 0, 6242: 6242: FirstCharMatch = 1 << 0, 6242: SingleWord = 1 << 1, 6242: Contiguous = 1 << 2, 6242: OnlyWordBoundary = 1 << 3, 6242: Prefix = 1 << 4, 6242: FullMatch = 1 << 5, 6242: }; 6242: 6242: StringView m_candidate; 6242: Flags m_flags = Flags::None; 6242: int m_word_boundary_match_count = 0; 6242: int m_max_index = 0; 6242: }; 6242: 6242: } 6242: # 12 "completion.hh" 2 6242: 6242: namespace Kakoune 6242: { 6242: 6242: class Context; 6242: 6242: using CandidateList = Vector; 6242: 6242: struct Completions 6242: { 6242: CandidateList candidates; 6242: ByteCount start; 6242: ByteCount end; 6242: 6242: Completions() 6242: : start(0), end(0) {} 6242: 6242: Completions(ByteCount start, ByteCount end) 6242: : start(start), end(end) {} 6242: 6242: Completions(ByteCount start, ByteCount end, CandidateList candidates) 6242: : start(start), end(end), candidates(std::move(candidates)) {} 6242: }; 6242: 6242: enum class CompletionFlags 6242: { 6242: None = 0, 6242: Fast = 1 << 0, 6242: Start = 1 << 2, 6242: }; 6242: 6242: template<> struct WithBitOps : std::true_type {}; 6242: 6242: using Completer = std::function; 6242: 6242: inline Completions complete_nothing(const Context& context, CompletionFlags, 6242: StringView, ByteCount cursor_pos) 6242: { 6242: return {cursor_pos, cursor_pos}; 6242: } 6242: 6242: Completions shell_complete(const Context& context, CompletionFlags, 6242: StringView, ByteCount cursor_pos); 6242: 6242: inline Completions offset_pos(Completions completion, ByteCount offset) 6242: { 6242: return { completion.start + offset, completion.end + offset, 6242: std::move(completion.candidates) }; 6242: } 6242: 6242: template 6242: CandidateList complete(StringView query, ByteCount cursor_pos, 6242: const Container& container) 6242: { 6242: using std::begin; 6242: static_assert(not std::is_same::value, 6242: "complete require long lived strings, not temporaries"); 6242: 6242: query = query.substr(0, cursor_pos); 6242: Vector matches; 6242: for (const auto& str : container) 6242: { 6242: if (RankedMatch match{str, query}) 6242: matches.push_back(match); 6242: } 6242: std::sort(matches.begin(), matches.end()); 6242: CandidateList res; 6242: for (auto& m : matches) 6242: res.push_back(m.candidate().str()); 6242: return res; 6242: } 6242: 6242: } 6242: # 6 "hook_manager.hh" 2 6242: 6242: 6242: namespace Kakoune 6242: { 6242: 6242: class Context; 6242: using HookFunc = std::function; 6242: 6242: class HookManager : public SafeCountable 6242: { 6242: public: 6242: HookManager(HookManager& parent) : m_parent(&parent) {} 6242: 6242: void add_hook(StringView hook_name, String group, HookFunc hook); 6242: void remove_hooks(StringView group); 6242: CandidateList complete_hook_group(StringView prefix, ByteCount pos_in_token); 6242: void run_hook(StringView hook_name, StringView param, 6242: Context& context) const; 6242: 6242: private: 6242: HookManager() 6242: : m_parent(nullptr) {} 6242: 6242: friend class Scope; 6242: 6242: SafePtr m_parent; 6242: IdMap, MemoryDomain::Hooks> m_hook; 6242: mutable Vector, MemoryDomain::Hooks> m_running_hooks; 6242: }; 6242: 6242: } 6242: # 6 "scope.hh" 2 6242: # 1 "keymap_manager.hh" 1 6242: 6242: 6242: 6242: 6242: 6242: 6242: # 1 "unordered_map.hh" 1 6242: 6242: 6242: 6242: 6242: 6242: 6242: # 1 "/usr/include/c++/8/unordered_map" 1 3 6242: # 32 "/usr/include/c++/8/unordered_map" 3 6242: 6242: # 33 "/usr/include/c++/8/unordered_map" 3 6242: # 42 "/usr/include/c++/8/unordered_map" 3 6242: # 1 "/usr/include/c++/8/ext/aligned_buffer.h" 1 3 6242: # 32 "/usr/include/c++/8/ext/aligned_buffer.h" 3 6242: 6242: # 33 "/usr/include/c++/8/ext/aligned_buffer.h" 3 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: # 40 "/usr/include/c++/8/ext/aligned_buffer.h" 3 6242: namespace __gnu_cxx 6242: { 6242: 6242: 6242: 6242: 6242: template 6242: struct __aligned_membuf 6242: { 6242: 6242: 6242: 6242: struct _Tp2 { _Tp _M_t; }; 6242: 6242: alignas(__alignof__(_Tp2::_M_t)) unsigned char _M_storage[sizeof(_Tp)]; 6242: 6242: __aligned_membuf() = default; 6242: 6242: 6242: __aligned_membuf(std::nullptr_t) { } 6242: 6242: void* 6242: _M_addr() noexcept 6242: { return static_cast(&_M_storage); } 6242: 6242: const void* 6242: _M_addr() const noexcept 6242: { return static_cast(&_M_storage); } 6242: 6242: _Tp* 6242: _M_ptr() noexcept 6242: { return static_cast<_Tp*>(_M_addr()); } 6242: 6242: const _Tp* 6242: _M_ptr() const noexcept 6242: { return static_cast(_M_addr()); } 6242: }; 6242: 6242: 6242: 6242: 6242: 6242: 6242: template 6242: struct __aligned_buffer 6242: : std::aligned_storage::value> 6242: { 6242: typename 6242: std::aligned_storage::value>::type 6242: _M_storage; 6242: 6242: __aligned_buffer() = default; 6242: 6242: 6242: __aligned_buffer(std::nullptr_t) { } 6242: 6242: void* 6242: _M_addr() noexcept 6242: { 6242: return static_cast(&_M_storage); 6242: } 6242: 6242: const void* 6242: _M_addr() const noexcept 6242: { 6242: return static_cast(&_M_storage); 6242: } 6242: 6242: _Tp* 6242: _M_ptr() noexcept 6242: { return static_cast<_Tp*>(_M_addr()); } 6242: 6242: const _Tp* 6242: _M_ptr() const noexcept 6242: { return static_cast(_M_addr()); } 6242: }; 6242: 6242: } 6242: # 43 "/usr/include/c++/8/unordered_map" 2 3 6242: 6242: 6242: 6242: # 1 "/usr/include/c++/8/bits/hashtable.h" 1 3 6242: # 33 "/usr/include/c++/8/bits/hashtable.h" 3 6242: 6242: # 34 "/usr/include/c++/8/bits/hashtable.h" 3 6242: 6242: # 1 "/usr/include/c++/8/bits/hashtable_policy.h" 1 3 6242: # 38 "/usr/include/c++/8/bits/hashtable_policy.h" 3 6242: namespace std __attribute__ ((__visibility__ ("default"))) 6242: { 6242: 6242: 6242: template 6242: class _Hashtable; 6242: 6242: namespace __detail 6242: { 6242: 6242: 6242: 6242: 6242: 6242: template 6242: struct _Hashtable_base; 6242: 6242: 6242: 6242: template 6242: inline typename std::iterator_traits<_Iterator>::difference_type 6242: __distance_fw(_Iterator __first, _Iterator __last, 6242: std::input_iterator_tag) 6242: { return __first != __last ? 1 : 0; } 6242: 6242: template 6242: inline typename std::iterator_traits<_Iterator>::difference_type 6242: __distance_fw(_Iterator __first, _Iterator __last, 6242: std::forward_iterator_tag) 6242: { return std::distance(__first, __last); } 6242: 6242: template 6242: inline typename std::iterator_traits<_Iterator>::difference_type 6242: __distance_fw(_Iterator __first, _Iterator __last) 6242: { return __distance_fw(__first, __last, 6242: std::__iterator_category(__first)); } 6242: 6242: struct _Identity 6242: { 6242: template 6242: _Tp&& 6242: operator()(_Tp&& __x) const 6242: { return std::forward<_Tp>(__x); } 6242: }; 6242: 6242: struct _Select1st 6242: { 6242: template 6242: auto 6242: operator()(_Tp&& __x) const 6242: -> decltype(std::get<0>(std::forward<_Tp>(__x))) 6242: { return std::get<0>(std::forward<_Tp>(__x)); } 6242: }; 6242: 6242: template 6242: struct _Hashtable_alloc; 6242: 6242: 6242: 6242: template 6242: struct _ReuseOrAllocNode 6242: { 6242: private: 6242: using __node_alloc_type = _NodeAlloc; 6242: using __hashtable_alloc = _Hashtable_alloc<__node_alloc_type>; 6242: using __node_alloc_traits = 6242: typename __hashtable_alloc::__node_alloc_traits; 6242: using __node_type = typename __hashtable_alloc::__node_type; 6242: 6242: public: 6242: _ReuseOrAllocNode(__node_type* __nodes, __hashtable_alloc& __h) 6242: : _M_nodes(__nodes), _M_h(__h) { } 6242: _ReuseOrAllocNode(const _ReuseOrAllocNode&) = delete; 6242: 6242: ~_ReuseOrAllocNode() 6242: { _M_h._M_deallocate_nodes(_M_nodes); } 6242: 6242: template 6242: __node_type* 6242: operator()(_Arg&& __arg) const 6242: { 6242: if (_M_nodes) 6242: { 6242: __node_type* __node = _M_nodes; 6242: _M_nodes = _M_nodes->_M_next(); 6242: __node->_M_nxt = nullptr; 6242: auto& __a = _M_h._M_node_allocator(); 6242: __node_alloc_traits::destroy(__a, __node->_M_valptr()); 6242: try 6242: { 6242: __node_alloc_traits::construct(__a, __node->_M_valptr(), 6242: std::forward<_Arg>(__arg)); 6242: } 6242: catch(...) 6242: { 6242: __node->~__node_type(); 6242: __node_alloc_traits::deallocate(__a, __node, 1); 6242: throw; 6242: } 6242: return __node; 6242: } 6242: return _M_h._M_allocate_node(std::forward<_Arg>(__arg)); 6242: } 6242: 6242: private: 6242: mutable __node_type* _M_nodes; 6242: __hashtable_alloc& _M_h; 6242: }; 6242: 6242: 6242: 6242: template 6242: struct _AllocNode 6242: { 6242: private: 6242: using __hashtable_alloc = _Hashtable_alloc<_NodeAlloc>; 6242: using __node_type = typename __hashtable_alloc::__node_type; 6242: 6242: public: 6242: _AllocNode(__hashtable_alloc& __h) 6242: : _M_h(__h) { } 6242: 6242: template 6242: __node_type* 6242: operator()(_Arg&& __arg) const 6242: { return _M_h._M_allocate_node(std::forward<_Arg>(__arg)); } 6242: 6242: private: 6242: __hashtable_alloc& _M_h; 6242: }; 6242: # 199 "/usr/include/c++/8/bits/hashtable_policy.h" 3 6242: template 6242: struct _Hashtable_traits 6242: { 6242: using __hash_cached = __bool_constant<_Cache_hash_code>; 6242: using __constant_iterators = __bool_constant<_Constant_iterators>; 6242: using __unique_keys = __bool_constant<_Unique_keys>; 6242: }; 6242: # 215 "/usr/include/c++/8/bits/hashtable_policy.h" 3 6242: struct _Hash_node_base 6242: { 6242: _Hash_node_base* _M_nxt; 6242: 6242: _Hash_node_base() noexcept : _M_nxt() { } 6242: 6242: _Hash_node_base(_Hash_node_base* __next) noexcept : _M_nxt(__next) { } 6242: }; 6242: 6242: 6242: 6242: 6242: 6242: 6242: template 6242: struct _Hash_node_value_base : _Hash_node_base 6242: { 6242: typedef _Value value_type; 6242: 6242: __gnu_cxx::__aligned_buffer<_Value> _M_storage; 6242: 6242: _Value* 6242: _M_valptr() noexcept 6242: { return _M_storage._M_ptr(); } 6242: 6242: const _Value* 6242: _M_valptr() const noexcept 6242: { return _M_storage._M_ptr(); } 6242: 6242: _Value& 6242: _M_v() noexcept 6242: { return *_M_valptr(); } 6242: 6242: const _Value& 6242: _M_v() const noexcept 6242: { return *_M_valptr(); } 6242: }; 6242: 6242: 6242: 6242: 6242: template 6242: struct _Hash_node; 6242: 6242: 6242: 6242: 6242: 6242: 6242: template 6242: struct _Hash_node<_Value, true> : _Hash_node_value_base<_Value> 6242: { 6242: std::size_t _M_hash_code; 6242: 6242: _Hash_node* 6242: _M_next() const noexcept 6242: { return static_cast<_Hash_node*>(this->_M_nxt); } 6242: }; 6242: 6242: 6242: 6242: 6242: 6242: 6242: template 6242: struct _Hash_node<_Value, false> : _Hash_node_value_base<_Value> 6242: { 6242: _Hash_node* 6242: _M_next() const noexcept 6242: { return static_cast<_Hash_node*>(this->_M_nxt); } 6242: }; 6242: 6242: 6242: template 6242: struct _Node_iterator_base 6242: { 6242: using __node_type = _Hash_node<_Value, _Cache_hash_code>; 6242: 6242: __node_type* _M_cur; 6242: 6242: _Node_iterator_base(__node_type* __p) noexcept 6242: : _M_cur(__p) { } 6242: 6242: void 6242: _M_incr() noexcept 6242: { _M_cur = _M_cur->_M_next(); } 6242: }; 6242: 6242: template 6242: inline bool 6242: operator==(const _Node_iterator_base<_Value, _Cache_hash_code>& __x, 6242: const _Node_iterator_base<_Value, _Cache_hash_code >& __y) 6242: noexcept 6242: { return __x._M_cur == __y._M_cur; } 6242: 6242: template 6242: inline bool 6242: operator!=(const _Node_iterator_base<_Value, _Cache_hash_code>& __x, 6242: const _Node_iterator_base<_Value, _Cache_hash_code>& __y) 6242: noexcept 6242: { return __x._M_cur != __y._M_cur; } 6242: 6242: 6242: template 6242: struct _Node_iterator 6242: : public _Node_iterator_base<_Value, __cache> 6242: { 6242: private: 6242: using __base_type = _Node_iterator_base<_Value, __cache>; 6242: using __node_type = typename __base_type::__node_type; 6242: 6242: public: 6242: typedef _Value value_type; 6242: typedef std::ptrdiff_t difference_type; 6242: typedef std::forward_iterator_tag iterator_category; 6242: 6242: using pointer = typename std::conditional<__constant_iterators, 6242: const _Value*, _Value*>::type; 6242: 6242: using reference = typename std::conditional<__constant_iterators, 6242: const _Value&, _Value&>::type; 6242: 6242: _Node_iterator() noexcept 6242: : __base_type(0) { } 6242: 6242: explicit 6242: _Node_iterator(__node_type* __p) noexcept 6242: : __base_type(__p) { } 6242: 6242: reference 6242: operator*() const noexcept 6242: { return this->_M_cur->_M_v(); } 6242: 6242: pointer 6242: operator->() const noexcept 6242: { return this->_M_cur->_M_valptr(); } 6242: 6242: _Node_iterator& 6242: operator++() noexcept 6242: { 6242: this->_M_incr(); 6242: return *this; 6242: } 6242: 6242: _Node_iterator 6242: operator++(int) noexcept 6242: { 6242: _Node_iterator __tmp(*this); 6242: this->_M_incr(); 6242: return __tmp; 6242: } 6242: }; 6242: 6242: 6242: template 6242: struct _Node_const_iterator 6242: : public _Node_iterator_base<_Value, __cache> 6242: { 6242: private: 6242: using __base_type = _Node_iterator_base<_Value, __cache>; 6242: using __node_type = typename __base_type::__node_type; 6242: 6242: public: 6242: typedef _Value value_type; 6242: typedef std::ptrdiff_t difference_type; 6242: typedef std::forward_iterator_tag iterator_category; 6242: 6242: typedef const _Value* pointer; 6242: typedef const _Value& reference; 6242: 6242: _Node_const_iterator() noexcept 6242: : __base_type(0) { } 6242: 6242: explicit 6242: _Node_const_iterator(__node_type* __p) noexcept 6242: : __base_type(__p) { } 6242: 6242: _Node_const_iterator(const _Node_iterator<_Value, __constant_iterators, 6242: __cache>& __x) noexcept 6242: : __base_type(__x._M_cur) { } 6242: 6242: reference 6242: operator*() const noexcept 6242: { return this->_M_cur->_M_v(); } 6242: 6242: pointer 6242: operator->() const noexcept 6242: { return this->_M_cur->_M_valptr(); } 6242: 6242: _Node_const_iterator& 6242: operator++() noexcept 6242: { 6242: this->_M_incr(); 6242: return *this; 6242: } 6242: 6242: _Node_const_iterator 6242: operator++(int) noexcept 6242: { 6242: _Node_const_iterator __tmp(*this); 6242: this->_M_incr(); 6242: return __tmp; 6242: } 6242: }; 6242: 6242: 6242: 6242: 6242: 6242: 6242: struct _Mod_range_hashing 6242: { 6242: typedef std::size_t first_argument_type; 6242: typedef std::size_t second_argument_type; 6242: typedef std::size_t result_type; 6242: 6242: result_type 6242: operator()(first_argument_type __num, 6242: second_argument_type __den) const noexcept 6242: { return __num % __den; } 6242: }; 6242: 6242: 6242: 6242: 6242: 6242: 6242: struct _Default_ranged_hash { }; 6242: 6242: 6242: 6242: struct _Prime_rehash_policy 6242: { 6242: using __has_load_factor = std::true_type; 6242: 6242: _Prime_rehash_policy(float __z = 1.0) noexcept 6242: : _M_max_load_factor(__z), _M_next_resize(0) { } 6242: 6242: float 6242: max_load_factor() const noexcept 6242: { return _M_max_load_factor; } 6242: 6242: 6242: std::size_t 6242: _M_next_bkt(std::size_t __n) const; 6242: 6242: 6242: std::size_t 6242: _M_bkt_for_elements(std::size_t __n) const 6242: { return __builtin_ceil(__n / (long double)_M_max_load_factor); } 6242: 6242: 6242: 6242: 6242: 6242: std::pair 6242: _M_need_rehash(std::size_t __n_bkt, std::size_t __n_elt, 6242: std::size_t __n_ins) const; 6242: 6242: typedef std::size_t _State; 6242: 6242: _State 6242: _M_state() const 6242: { return _M_next_resize; } 6242: 6242: void 6242: _M_reset() noexcept 6242: { _M_next_resize = 0; } 6242: 6242: void 6242: _M_reset(_State __state) 6242: { _M_next_resize = __state; } 6242: 6242: static const std::size_t _S_growth_factor = 2; 6242: 6242: float _M_max_load_factor; 6242: mutable std::size_t _M_next_resize; 6242: }; 6242: 6242: 6242: struct _Mask_range_hashing 6242: { 6242: typedef std::size_t first_argument_type; 6242: typedef std::size_t second_argument_type; 6242: typedef std::size_t result_type; 6242: 6242: result_type 6242: operator()(first_argument_type __num, 6242: second_argument_type __den) const noexcept 6242: { return __num & (__den - 1); } 6242: }; 6242: 6242: 6242: 6242: inline std::size_t 6242: __clp2(std::size_t __n) noexcept 6242: { 6242: 6242: std::uint_fast64_t __x = __n; 6242: 6242: 6242: 6242: 6242: __x = __x - 1; 6242: __x = __x | (__x >> 1); 6242: __x = __x | (__x >> 2); 6242: __x = __x | (__x >> 4); 6242: __x = __x | (__x >> 8); 6242: __x = __x | (__x >>16); 6242: 6242: __x = __x | (__x >>32); 6242: 6242: return __x + 1; 6242: } 6242: 6242: 6242: 6242: struct _Power2_rehash_policy 6242: { 6242: using __has_load_factor = std::true_type; 6242: 6242: _Power2_rehash_policy(float __z = 1.0) noexcept 6242: : _M_max_load_factor(__z), _M_next_resize(0) { } 6242: 6242: float 6242: max_load_factor() const noexcept 6242: { return _M_max_load_factor; } 6242: 6242: 6242: 6242: std::size_t 6242: _M_next_bkt(std::size_t __n) noexcept 6242: { 6242: const auto __max_width = std::min(sizeof(size_t), 8); 6242: const auto __max_bkt = size_t(1) << (__max_width * 8 - 1); 6242: std::size_t __res = __clp2(__n); 6242: 6242: if (__res == __n) 6242: __res <<= 1; 6242: 6242: if (__res == 0) 6242: __res = __max_bkt; 6242: 6242: if (__res == __max_bkt) 6242: 6242: 6242: 6242: _M_next_resize = std::size_t(-1); 6242: else 6242: _M_next_resize 6242: = __builtin_ceil(__res * (long double)_M_max_load_factor); 6242: 6242: return __res; 6242: } 6242: 6242: 6242: std::size_t 6242: _M_bkt_for_elements(std::size_t __n) const noexcept 6242: { return __builtin_ceil(__n / (long double)_M_max_load_factor); } 6242: 6242: 6242: 6242: 6242: 6242: std::pair 6242: _M_need_rehash(std::size_t __n_bkt, std::size_t __n_elt, 6242: std::size_t __n_ins) noexcept 6242: { 6242: if (__n_elt + __n_ins >= _M_next_resize) 6242: { 6242: long double __min_bkts = (__n_elt + __n_ins) 6242: / (long double)_M_max_load_factor; 6242: if (__min_bkts >= __n_bkt) 6242: return std::make_pair(true, 6242: _M_next_bkt(std::max(__builtin_floor(__min_bkts) + 1, 6242: __n_bkt * _S_growth_factor))); 6242: 6242: _M_next_resize 6242: = __builtin_floor(__n_bkt * (long double)_M_max_load_factor); 6242: return std::make_pair(false, 0); 6242: } 6242: else 6242: return std::make_pair(false, 0); 6242: } 6242: 6242: typedef std::size_t _State; 6242: 6242: _State 6242: _M_state() const noexcept 6242: { return _M_next_resize; } 6242: 6242: void 6242: _M_reset() noexcept 6242: { _M_next_resize = 0; } 6242: 6242: void 6242: _M_reset(_State __state) noexcept 6242: { _M_next_resize = __state; } 6242: 6242: static const std::size_t _S_growth_factor = 2; 6242: 6242: float _M_max_load_factor; 6242: std::size_t _M_next_resize; 6242: }; 6242: # 638 "/usr/include/c++/8/bits/hashtable_policy.h" 3 6242: template 6242: struct _Map_base { }; 6242: 6242: 6242: template 6242: struct _Map_base<_Key, _Pair, _Alloc, _Select1st, _Equal, 6242: _H1, _H2, _Hash, _RehashPolicy, _Traits, false> 6242: { 6242: using mapped_type = typename std::tuple_element<1, _Pair>::type; 6242: }; 6242: 6242: 6242: template 6242: struct _Map_base<_Key, _Pair, _Alloc, _Select1st, _Equal, 6242: _H1, _H2, _Hash, _RehashPolicy, _Traits, true> 6242: { 6242: private: 6242: using __hashtable_base = __detail::_Hashtable_base<_Key, _Pair, 6242: _Select1st, 6242: _Equal, _H1, _H2, _Hash, 6242: _Traits>; 6242: 6242: using __hashtable = _Hashtable<_Key, _Pair, _Alloc, 6242: _Select1st, _Equal, 6242: _H1, _H2, _Hash, _RehashPolicy, _Traits>; 6242: 6242: using __hash_code = typename __hashtable_base::__hash_code; 6242: using __node_type = typename __hashtable_base::__node_type; 6242: 6242: public: 6242: using key_type = typename __hashtable_base::key_type; 6242: using iterator = typename __hashtable_base::iterator; 6242: using mapped_type = typename std::tuple_element<1, _Pair>::type; 6242: 6242: mapped_type& 6242: operator[](const key_type& __k); 6242: 6242: mapped_type& 6242: operator[](key_type&& __k); 6242: 6242: 6242: 6242: mapped_type& 6242: at(const key_type& __k); 6242: 6242: const mapped_type& 6242: at(const key_type& __k) const; 6242: }; 6242: 6242: template 6242: auto 6242: _Map_base<_Key, _Pair, _Alloc, _Select1st, _Equal, 6242: _H1, _H2, _Hash, _RehashPolicy, _Traits, true>:: 6242: operator[](const key_type& __k) 6242: -> mapped_type& 6242: { 6242: __hashtable* __h = static_cast<__hashtable*>(this); 6242: __hash_code __code = __h->_M_hash_code(__k); 6242: std::size_t __n = __h->_M_bucket_index(__k, __code); 6242: __node_type* __p = __h->_M_find_node(__n, __k, __code); 6242: 6242: if (!__p) 6242: { 6242: __p = __h->_M_allocate_node(std::piecewise_construct, 6242: std::tuple(__k), 6242: std::tuple<>()); 6242: return __h->_M_insert_unique_node(__n, __code, __p)->second; 6242: } 6242: 6242: return __p->_M_v().second; 6242: } 6242: 6242: template 6242: auto 6242: _Map_base<_Key, _Pair, _Alloc, _Select1st, _Equal, 6242: _H1, _H2, _Hash, _RehashPolicy, _Traits, true>:: 6242: operator[](key_type&& __k) 6242: -> mapped_type& 6242: { 6242: __hashtable* __h = static_cast<__hashtable*>(this); 6242: __hash_code __code = __h->_M_hash_code(__k); 6242: std::size_t __n = __h->_M_bucket_index(__k, __code); 6242: __node_type* __p = __h->_M_find_node(__n, __k, __code); 6242: 6242: if (!__p) 6242: { 6242: __p = __h->_M_allocate_node(std::piecewise_construct, 6242: std::forward_as_tuple(std::move(__k)), 6242: std::tuple<>()); 6242: return __h->_M_insert_unique_node(__n, __code, __p)->second; 6242: } 6242: 6242: return __p->_M_v().second; 6242: } 6242: 6242: template 6242: auto 6242: _Map_base<_Key, _Pair, _Alloc, _Select1st, _Equal, 6242: _H1, _H2, _Hash, _RehashPolicy, _Traits, true>:: 6242: at(const key_type& __k) 6242: -> mapped_type& 6242: { 6242: __hashtable* __h = static_cast<__hashtable*>(this); 6242: __hash_code __code = __h->_M_hash_code(__k); 6242: std::size_t __n = __h->_M_bucket_index(__k, __code); 6242: __node_type* __p = __h->_M_find_node(__n, __k, __code); 6242: 6242: if (!__p) 6242: __throw_out_of_range(("_Map_base::at")); 6242: return __p->_M_v().second; 6242: } 6242: 6242: template 6242: auto 6242: _Map_base<_Key, _Pair, _Alloc, _Select1st, _Equal, 6242: _H1, _H2, _Hash, _RehashPolicy, _Traits, true>:: 6242: at(const key_type& __k) const 6242: -> const mapped_type& 6242: { 6242: const __hashtable* __h = static_cast(this); 6242: __hash_code __code = __h->_M_hash_code(__k); 6242: std::size_t __n = __h->_M_bucket_index(__k, __code); 6242: __node_type* __p = __h->_M_find_node(__n, __k, __code); 6242: 6242: if (!__p) 6242: __throw_out_of_range(("_Map_base::at")); 6242: return __p->_M_v().second; 6242: } 6242: 6242: 6242: 6242: 6242: 6242: 6242: template 6242: struct _Insert_base 6242: { 6242: protected: 6242: using __hashtable = _Hashtable<_Key, _Value, _Alloc, _ExtractKey, 6242: _Equal, _H1, _H2, _Hash, 6242: _RehashPolicy, _Traits>; 6242: 6242: using __hashtable_base = _Hashtable_base<_Key, _Value, _ExtractKey, 6242: _Equal, _H1, _H2, _Hash, 6242: _Traits>; 6242: 6242: using value_type = typename __hashtable_base::value_type; 6242: using iterator = typename __hashtable_base::iterator; 6242: using const_iterator = typename __hashtable_base::const_iterator; 6242: using size_type = typename __hashtable_base::size_type; 6242: 6242: using __unique_keys = typename __hashtable_base::__unique_keys; 6242: using __ireturn_type = typename __hashtable_base::__ireturn_type; 6242: using __node_type = _Hash_node<_Value, _Traits::__hash_cached::value>; 6242: using __node_alloc_type = __alloc_rebind<_Alloc, __node_type>; 6242: using __node_gen_type = _AllocNode<__node_alloc_type>; 6242: 6242: __hashtable& 6242: _M_conjure_hashtable() 6242: { return *(static_cast<__hashtable*>(this)); } 6242: 6242: template 6242: void 6242: _M_insert_range(_InputIterator __first, _InputIterator __last, 6242: const _NodeGetter&, true_type); 6242: 6242: template 6242: void 6242: _M_insert_range(_InputIterator __first, _InputIterator __last, 6242: const _NodeGetter&, false_type); 6242: 6242: public: 6242: __ireturn_type 6242: insert(const value_type& __v) 6242: { 6242: __hashtable& __h = _M_conjure_hashtable(); 6242: __node_gen_type __node_gen(__h); 6242: return __h._M_insert(__v, __node_gen, __unique_keys()); 6242: } 6242: 6242: iterator 6242: insert(const_iterator __hint, const value_type& __v) 6242: { 6242: __hashtable& __h = _M_conjure_hashtable(); 6242: __node_gen_type __node_gen(__h); 6242: return __h._M_insert(__hint, __v, __node_gen, __unique_keys()); 6242: } 6242: 6242: void 6242: insert(initializer_list __l) 6242: { this->insert(__l.begin(), __l.end()); } 6242: 6242: template 6242: void 6242: insert(_InputIterator __first, _InputIterator __last) 6242: { 6242: __hashtable& __h = _M_conjure_hashtable(); 6242: __node_gen_type __node_gen(__h); 6242: return _M_insert_range(__first, __last, __node_gen, __unique_keys()); 6242: } 6242: }; 6242: 6242: template 6242: template 6242: void 6242: _Insert_base<_Key, _Value, _Alloc, _ExtractKey, _Equal, _H1, _H2, _Hash, 6242: _RehashPolicy, _Traits>:: 6242: _M_insert_range(_InputIterator __first, _InputIterator __last, 6242: const _NodeGetter& __node_gen, true_type) 6242: { 6242: size_type __n_elt = __detail::__distance_fw(__first, __last); 6242: if (__n_elt == 0) 6242: return; 6242: 6242: __hashtable& __h = _M_conjure_hashtable(); 6242: for (; __first != __last; ++__first) 6242: { 6242: if (__h._M_insert(*__first, __node_gen, __unique_keys(), 6242: __n_elt).second) 6242: __n_elt = 1; 6242: else if (__n_elt != 1) 6242: --__n_elt; 6242: } 6242: } 6242: 6242: template 6242: template 6242: void 6242: _Insert_base<_Key, _Value, _Alloc, _ExtractKey, _Equal, _H1, _H2, _Hash, 6242: _RehashPolicy, _Traits>:: 6242: _M_insert_range(_InputIterator __first, _InputIterator __last, 6242: const _NodeGetter& __node_gen, false_type) 6242: { 6242: using __rehash_type = typename __hashtable::__rehash_type; 6242: using __rehash_state = typename __hashtable::__rehash_state; 6242: using pair_type = std::pair; 6242: 6242: size_type __n_elt = __detail::__distance_fw(__first, __last); 6242: if (__n_elt == 0) 6242: return; 6242: 6242: __hashtable& __h = _M_conjure_hashtable(); 6242: __rehash_type& __rehash = __h._M_rehash_policy; 6242: const __rehash_state& __saved_state = __rehash._M_state(); 6242: pair_type __do_rehash = __rehash._M_need_rehash(__h._M_bucket_count, 6242: __h._M_element_count, 6242: __n_elt); 6242: 6242: if (__do_rehash.first) 6242: __h._M_rehash(__do_rehash.second, __saved_state); 6242: 6242: for (; __first != __last; ++__first) 6242: __h._M_insert(*__first, __node_gen, __unique_keys()); 6242: } 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: template 6242: struct _Insert; 6242: 6242: 6242: template 6242: struct _Insert<_Key, _Value, _Alloc, _ExtractKey, _Equal, _H1, _H2, _Hash, 6242: _RehashPolicy, _Traits, true> 6242: : public _Insert_base<_Key, _Value, _Alloc, _ExtractKey, _Equal, 6242: _H1, _H2, _Hash, _RehashPolicy, _Traits> 6242: { 6242: using __base_type = _Insert_base<_Key, _Value, _Alloc, _ExtractKey, 6242: _Equal, _H1, _H2, _Hash, 6242: _RehashPolicy, _Traits>; 6242: 6242: using __hashtable_base = _Hashtable_base<_Key, _Value, _ExtractKey, 6242: _Equal, _H1, _H2, _Hash, 6242: _Traits>; 6242: 6242: using value_type = typename __base_type::value_type; 6242: using iterator = typename __base_type::iterator; 6242: using const_iterator = typename __base_type::const_iterator; 6242: 6242: using __unique_keys = typename __base_type::__unique_keys; 6242: using __ireturn_type = typename __hashtable_base::__ireturn_type; 6242: using __hashtable = typename __base_type::__hashtable; 6242: using __node_gen_type = typename __base_type::__node_gen_type; 6242: 6242: using __base_type::insert; 6242: 6242: __ireturn_type 6242: insert(value_type&& __v) 6242: { 6242: __hashtable& __h = this->_M_conjure_hashtable(); 6242: __node_gen_type __node_gen(__h); 6242: return __h._M_insert(std::move(__v), __node_gen, __unique_keys()); 6242: } 6242: 6242: iterator 6242: insert(const_iterator __hint, value_type&& __v) 6242: { 6242: __hashtable& __h = this->_M_conjure_hashtable(); 6242: __node_gen_type __node_gen(__h); 6242: return __h._M_insert(__hint, std::move(__v), __node_gen, 6242: __unique_keys()); 6242: } 6242: }; 6242: 6242: 6242: template 6242: struct _Insert<_Key, _Value, _Alloc, _ExtractKey, _Equal, _H1, _H2, _Hash, 6242: _RehashPolicy, _Traits, false> 6242: : public _Insert_base<_Key, _Value, _Alloc, _ExtractKey, _Equal, 6242: _H1, _H2, _Hash, _RehashPolicy, _Traits> 6242: { 6242: using __base_type = _Insert_base<_Key, _Value, _Alloc, _ExtractKey, 6242: _Equal, _H1, _H2, _Hash, 6242: _RehashPolicy, _Traits>; 6242: using value_type = typename __base_type::value_type; 6242: using iterator = typename __base_type::iterator; 6242: using const_iterator = typename __base_type::const_iterator; 6242: 6242: using __unique_keys = typename __base_type::__unique_keys; 6242: using __hashtable = typename __base_type::__hashtable; 6242: using __ireturn_type = typename __base_type::__ireturn_type; 6242: 6242: using __base_type::insert; 6242: 6242: template 6242: using __is_cons = std::is_constructible; 6242: 6242: template 6242: using _IFcons = std::enable_if<__is_cons<_Pair>::value>; 6242: 6242: template 6242: using _IFconsp = typename _IFcons<_Pair>::type; 6242: 6242: template> 6242: __ireturn_type 6242: insert(_Pair&& __v) 6242: { 6242: __hashtable& __h = this->_M_conjure_hashtable(); 6242: return __h._M_emplace(__unique_keys(), std::forward<_Pair>(__v)); 6242: } 6242: 6242: template> 6242: iterator 6242: insert(const_iterator __hint, _Pair&& __v) 6242: { 6242: __hashtable& __h = this->_M_conjure_hashtable(); 6242: return __h._M_emplace(__hint, __unique_keys(), 6242: std::forward<_Pair>(__v)); 6242: } 6242: }; 6242: 6242: template 6242: using __has_load_factor = typename _Policy::__has_load_factor; 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: template> 6242: struct _Rehash_base; 6242: 6242: 6242: template 6242: struct _Rehash_base<_Key, _Value, _Alloc, _ExtractKey, _Equal, 6242: _H1, _H2, _Hash, _RehashPolicy, _Traits, 6242: std::false_type> 6242: { 6242: }; 6242: 6242: 6242: template 6242: struct _Rehash_base<_Key, _Value, _Alloc, _ExtractKey, _Equal, 6242: _H1, _H2, _Hash, _RehashPolicy, _Traits, 6242: std::true_type> 6242: { 6242: using __hashtable = _Hashtable<_Key, _Value, _Alloc, _ExtractKey, 6242: _Equal, _H1, _H2, _Hash, 6242: _RehashPolicy, _Traits>; 6242: 6242: float 6242: max_load_factor() const noexcept 6242: { 6242: const __hashtable* __this = static_cast(this); 6242: return __this->__rehash_policy().max_load_factor(); 6242: } 6242: 6242: void 6242: max_load_factor(float __z) 6242: { 6242: __hashtable* __this = static_cast<__hashtable*>(this); 6242: __this->__rehash_policy(_RehashPolicy(__z)); 6242: } 6242: 6242: void 6242: reserve(std::size_t __n) 6242: { 6242: __hashtable* __this = static_cast<__hashtable*>(this); 6242: __this->rehash(__builtin_ceil(__n / max_load_factor())); 6242: } 6242: }; 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: template 6242: struct _Hashtable_ebo_helper; 6242: 6242: 6242: template 6242: struct _Hashtable_ebo_helper<_Nm, _Tp, true> 6242: : private _Tp 6242: { 6242: _Hashtable_ebo_helper() = default; 6242: 6242: template 6242: _Hashtable_ebo_helper(_OtherTp&& __tp) 6242: : _Tp(std::forward<_OtherTp>(__tp)) 6242: { } 6242: 6242: static const _Tp& 6242: _S_cget(const _Hashtable_ebo_helper& __eboh) 6242: { return static_cast(__eboh); } 6242: 6242: static _Tp& 6242: _S_get(_Hashtable_ebo_helper& __eboh) 6242: { return static_cast<_Tp&>(__eboh); } 6242: }; 6242: 6242: 6242: template 6242: struct _Hashtable_ebo_helper<_Nm, _Tp, false> 6242: { 6242: _Hashtable_ebo_helper() = default; 6242: 6242: template 6242: _Hashtable_ebo_helper(_OtherTp&& __tp) 6242: : _M_tp(std::forward<_OtherTp>(__tp)) 6242: { } 6242: 6242: static const _Tp& 6242: _S_cget(const _Hashtable_ebo_helper& __eboh) 6242: { return __eboh._M_tp; } 6242: 6242: static _Tp& 6242: _S_get(_Hashtable_ebo_helper& __eboh) 6242: { return __eboh._M_tp; } 6242: 6242: private: 6242: _Tp _M_tp; 6242: }; 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: template 6242: struct _Local_iterator_base; 6242: # 1176 "/usr/include/c++/8/bits/hashtable_policy.h" 3 6242: template 6242: struct _Hash_code_base; 6242: 6242: 6242: 6242: template 6242: struct _Hash_code_base<_Key, _Value, _ExtractKey, _H1, _H2, _Hash, false> 6242: : private _Hashtable_ebo_helper<0, _ExtractKey>, 6242: private _Hashtable_ebo_helper<1, _Hash> 6242: { 6242: private: 6242: using __ebo_extract_key = _Hashtable_ebo_helper<0, _ExtractKey>; 6242: using __ebo_hash = _Hashtable_ebo_helper<1, _Hash>; 6242: 6242: protected: 6242: typedef void* __hash_code; 6242: typedef _Hash_node<_Value, false> __node_type; 6242: 6242: 6242: 6242: _Hash_code_base() = default; 6242: 6242: _Hash_code_base(const _ExtractKey& __ex, const _H1&, const _H2&, 6242: const _Hash& __h) 6242: : __ebo_extract_key(__ex), __ebo_hash(__h) { } 6242: 6242: __hash_code 6242: _M_hash_code(const _Key& __key) const 6242: { return 0; } 6242: 6242: std::size_t 6242: _M_bucket_index(const _Key& __k, __hash_code, std::size_t __n) const 6242: { return _M_ranged_hash()(__k, __n); } 6242: 6242: std::size_t 6242: _M_bucket_index(const __node_type* __p, std::size_t __n) const 6242: noexcept( noexcept(declval()(declval(), 6242: (std::size_t)0)) ) 6242: { return _M_ranged_hash()(_M_extract()(__p->_M_v()), __n); } 6242: 6242: void 6242: _M_store_code(__node_type*, __hash_code) const 6242: { } 6242: 6242: void 6242: _M_copy_code(__node_type*, const __node_type*) const 6242: { } 6242: 6242: void 6242: _M_swap(_Hash_code_base& __x) 6242: { 6242: std::swap(_M_extract(), __x._M_extract()); 6242: std::swap(_M_ranged_hash(), __x._M_ranged_hash()); 6242: } 6242: 6242: const _ExtractKey& 6242: _M_extract() const { return __ebo_extract_key::_S_cget(*this); } 6242: 6242: _ExtractKey& 6242: _M_extract() { return __ebo_extract_key::_S_get(*this); } 6242: 6242: const _Hash& 6242: _M_ranged_hash() const { return __ebo_hash::_S_cget(*this); } 6242: 6242: _Hash& 6242: _M_ranged_hash() { return __ebo_hash::_S_get(*this); } 6242: }; 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: template 6242: struct _Hash_code_base<_Key, _Value, _ExtractKey, _H1, _H2, _Hash, true>; 6242: 6242: 6242: 6242: 6242: template 6242: struct _Hash_code_base<_Key, _Value, _ExtractKey, _H1, _H2, 6242: _Default_ranged_hash, false> 6242: : private _Hashtable_ebo_helper<0, _ExtractKey>, 6242: private _Hashtable_ebo_helper<1, _H1>, 6242: private _Hashtable_ebo_helper<2, _H2> 6242: { 6242: private: 6242: using __ebo_extract_key = _Hashtable_ebo_helper<0, _ExtractKey>; 6242: using __ebo_h1 = _Hashtable_ebo_helper<1, _H1>; 6242: using __ebo_h2 = _Hashtable_ebo_helper<2, _H2>; 6242: 6242: 6242: friend struct _Local_iterator_base<_Key, _Value, _ExtractKey, _H1, _H2, 6242: _Default_ranged_hash, false>; 6242: 6242: public: 6242: typedef _H1 hasher; 6242: 6242: hasher 6242: hash_function() const 6242: { return _M_h1(); } 6242: 6242: protected: 6242: typedef std::size_t __hash_code; 6242: typedef _Hash_node<_Value, false> __node_type; 6242: 6242: 6242: 6242: _Hash_code_base() = default; 6242: 6242: _Hash_code_base(const _ExtractKey& __ex, 6242: const _H1& __h1, const _H2& __h2, 6242: const _Default_ranged_hash&) 6242: : __ebo_extract_key(__ex), __ebo_h1(__h1), __ebo_h2(__h2) { } 6242: 6242: __hash_code 6242: _M_hash_code(const _Key& __k) const 6242: { return _M_h1()(__k); } 6242: 6242: std::size_t 6242: _M_bucket_index(const _Key&, __hash_code __c, std::size_t __n) const 6242: { return _M_h2()(__c, __n); } 6242: 6242: std::size_t 6242: _M_bucket_index(const __node_type* __p, std::size_t __n) const 6242: noexcept( noexcept(declval()(declval())) 6242: && noexcept(declval()((__hash_code)0, 6242: (std::size_t)0)) ) 6242: { return _M_h2()(_M_h1()(_M_extract()(__p->_M_v())), __n); } 6242: 6242: void 6242: _M_store_code(__node_type*, __hash_code) const 6242: { } 6242: 6242: void 6242: _M_copy_code(__node_type*, const __node_type*) const 6242: { } 6242: 6242: void 6242: _M_swap(_Hash_code_base& __x) 6242: { 6242: std::swap(_M_extract(), __x._M_extract()); 6242: std::swap(_M_h1(), __x._M_h1()); 6242: std::swap(_M_h2(), __x._M_h2()); 6242: } 6242: 6242: const _ExtractKey& 6242: _M_extract() const { return __ebo_extract_key::_S_cget(*this); } 6242: 6242: _ExtractKey& 6242: _M_extract() { return __ebo_extract_key::_S_get(*this); } 6242: 6242: const _H1& 6242: _M_h1() const { return __ebo_h1::_S_cget(*this); } 6242: 6242: _H1& 6242: _M_h1() { return __ebo_h1::_S_get(*this); } 6242: 6242: const _H2& 6242: _M_h2() const { return __ebo_h2::_S_cget(*this); } 6242: 6242: _H2& 6242: _M_h2() { return __ebo_h2::_S_get(*this); } 6242: }; 6242: 6242: 6242: 6242: 6242: template 6242: struct _Hash_code_base<_Key, _Value, _ExtractKey, _H1, _H2, 6242: _Default_ranged_hash, true> 6242: : private _Hashtable_ebo_helper<0, _ExtractKey>, 6242: private _Hashtable_ebo_helper<1, _H1>, 6242: private _Hashtable_ebo_helper<2, _H2> 6242: { 6242: private: 6242: 6242: friend struct _Local_iterator_base<_Key, _Value, _ExtractKey, _H1, _H2, 6242: _Default_ranged_hash, true>; 6242: 6242: using __ebo_extract_key = _Hashtable_ebo_helper<0, _ExtractKey>; 6242: using __ebo_h1 = _Hashtable_ebo_helper<1, _H1>; 6242: using __ebo_h2 = _Hashtable_ebo_helper<2, _H2>; 6242: 6242: public: 6242: typedef _H1 hasher; 6242: 6242: hasher 6242: hash_function() const 6242: { return _M_h1(); } 6242: 6242: protected: 6242: typedef std::size_t __hash_code; 6242: typedef _Hash_node<_Value, true> __node_type; 6242: 6242: 6242: _Hash_code_base() = default; 6242: _Hash_code_base(const _ExtractKey& __ex, 6242: const _H1& __h1, const _H2& __h2, 6242: const _Default_ranged_hash&) 6242: : __ebo_extract_key(__ex), __ebo_h1(__h1), __ebo_h2(__h2) { } 6242: 6242: __hash_code 6242: _M_hash_code(const _Key& __k) const 6242: { return _M_h1()(__k); } 6242: 6242: std::size_t 6242: _M_bucket_index(const _Key&, __hash_code __c, 6242: std::size_t __n) const 6242: { return _M_h2()(__c, __n); } 6242: 6242: std::size_t 6242: _M_bucket_index(const __node_type* __p, std::size_t __n) const 6242: noexcept( noexcept(declval()((__hash_code)0, 6242: (std::size_t)0)) ) 6242: { return _M_h2()(__p->_M_hash_code, __n); } 6242: 6242: void 6242: _M_store_code(__node_type* __n, __hash_code __c) const 6242: { __n->_M_hash_code = __c; } 6242: 6242: void 6242: _M_copy_code(__node_type* __to, const __node_type* __from) const 6242: { __to->_M_hash_code = __from->_M_hash_code; } 6242: 6242: void 6242: _M_swap(_Hash_code_base& __x) 6242: { 6242: std::swap(_M_extract(), __x._M_extract()); 6242: std::swap(_M_h1(), __x._M_h1()); 6242: std::swap(_M_h2(), __x._M_h2()); 6242: } 6242: 6242: const _ExtractKey& 6242: _M_extract() const { return __ebo_extract_key::_S_cget(*this); } 6242: 6242: _ExtractKey& 6242: _M_extract() { return __ebo_extract_key::_S_get(*this); } 6242: 6242: const _H1& 6242: _M_h1() const { return __ebo_h1::_S_cget(*this); } 6242: 6242: _H1& 6242: _M_h1() { return __ebo_h1::_S_get(*this); } 6242: 6242: const _H2& 6242: _M_h2() const { return __ebo_h2::_S_cget(*this); } 6242: 6242: _H2& 6242: _M_h2() { return __ebo_h2::_S_get(*this); } 6242: }; 6242: 6242: 6242: 6242: 6242: 6242: template 6242: struct _Equal_helper; 6242: 6242: 6242: template 6242: struct _Equal_helper<_Key, _Value, _ExtractKey, _Equal, _HashCodeType, true> 6242: { 6242: static bool 6242: _S_equals(const _Equal& __eq, const _ExtractKey& __extract, 6242: const _Key& __k, _HashCodeType __c, _Hash_node<_Value, true>* __n) 6242: { return __c == __n->_M_hash_code && __eq(__k, __extract(__n->_M_v())); } 6242: }; 6242: 6242: 6242: template 6242: struct _Equal_helper<_Key, _Value, _ExtractKey, _Equal, _HashCodeType, false> 6242: { 6242: static bool 6242: _S_equals(const _Equal& __eq, const _ExtractKey& __extract, 6242: const _Key& __k, _HashCodeType, _Hash_node<_Value, false>* __n) 6242: { return __eq(__k, __extract(__n->_M_v())); } 6242: }; 6242: 6242: 6242: 6242: template 6242: struct _Local_iterator_base<_Key, _Value, _ExtractKey, 6242: _H1, _H2, _Hash, true> 6242: : private _Hashtable_ebo_helper<0, _H2> 6242: { 6242: protected: 6242: using __base_type = _Hashtable_ebo_helper<0, _H2>; 6242: using __hash_code_base = _Hash_code_base<_Key, _Value, _ExtractKey, 6242: _H1, _H2, _Hash, true>; 6242: 6242: _Local_iterator_base() = default; 6242: _Local_iterator_base(const __hash_code_base& __base, 6242: _Hash_node<_Value, true>* __p, 6242: std::size_t __bkt, std::size_t __bkt_count) 6242: : __base_type(__base._M_h2()), 6242: _M_cur(__p), _M_bucket(__bkt), _M_bucket_count(__bkt_count) { } 6242: 6242: void 6242: _M_incr() 6242: { 6242: _M_cur = _M_cur->_M_next(); 6242: if (_M_cur) 6242: { 6242: std::size_t __bkt 6242: = __base_type::_S_get(*this)(_M_cur->_M_hash_code, 6242: _M_bucket_count); 6242: if (__bkt != _M_bucket) 6242: _M_cur = nullptr; 6242: } 6242: } 6242: 6242: _Hash_node<_Value, true>* _M_cur; 6242: std::size_t _M_bucket; 6242: std::size_t _M_bucket_count; 6242: 6242: public: 6242: const void* 6242: _M_curr() const { return _M_cur; } 6242: 6242: std::size_t 6242: _M_get_bucket() const { return _M_bucket; } 6242: }; 6242: 6242: 6242: 6242: 6242: 6242: template::value> 6242: struct _Hash_code_storage 6242: { 6242: __gnu_cxx::__aligned_buffer<_Tp> _M_storage; 6242: 6242: _Tp* 6242: _M_h() { return _M_storage._M_ptr(); } 6242: 6242: const _Tp* 6242: _M_h() const { return _M_storage._M_ptr(); } 6242: }; 6242: 6242: 6242: template 6242: struct _Hash_code_storage<_Tp, true> 6242: { 6242: static_assert( std::is_empty<_Tp>::value, "Type must be empty" ); 6242: 6242: 6242: 6242: _Tp* 6242: _M_h() { return reinterpret_cast<_Tp*>(this); } 6242: 6242: const _Tp* 6242: _M_h() const { return reinterpret_cast(this); } 6242: }; 6242: 6242: template 6242: using __hash_code_for_local_iter 6242: = _Hash_code_storage<_Hash_code_base<_Key, _Value, _ExtractKey, 6242: _H1, _H2, _Hash, false>>; 6242: 6242: 6242: template 6242: struct _Local_iterator_base<_Key, _Value, _ExtractKey, 6242: _H1, _H2, _Hash, false> 6242: : __hash_code_for_local_iter<_Key, _Value, _ExtractKey, _H1, _H2, _Hash> 6242: { 6242: protected: 6242: using __hash_code_base = _Hash_code_base<_Key, _Value, _ExtractKey, 6242: _H1, _H2, _Hash, false>; 6242: 6242: _Local_iterator_base() : _M_bucket_count(-1) { } 6242: 6242: _Local_iterator_base(const __hash_code_base& __base, 6242: _Hash_node<_Value, false>* __p, 6242: std::size_t __bkt, std::size_t __bkt_count) 6242: : _M_cur(__p), _M_bucket(__bkt), _M_bucket_count(__bkt_count) 6242: { _M_init(__base); } 6242: 6242: ~_Local_iterator_base() 6242: { 6242: if (_M_bucket_count != -1) 6242: _M_destroy(); 6242: } 6242: 6242: _Local_iterator_base(const _Local_iterator_base& __iter) 6242: : _M_cur(__iter._M_cur), _M_bucket(__iter._M_bucket), 6242: _M_bucket_count(__iter._M_bucket_count) 6242: { 6242: if (_M_bucket_count != -1) 6242: _M_init(*__iter._M_h()); 6242: } 6242: 6242: _Local_iterator_base& 6242: operator=(const _Local_iterator_base& __iter) 6242: { 6242: if (_M_bucket_count != -1) 6242: _M_destroy(); 6242: _M_cur = __iter._M_cur; 6242: _M_bucket = __iter._M_bucket; 6242: _M_bucket_count = __iter._M_bucket_count; 6242: if (_M_bucket_count != -1) 6242: _M_init(*__iter._M_h()); 6242: return *this; 6242: } 6242: 6242: void 6242: _M_incr() 6242: { 6242: _M_cur = _M_cur->_M_next(); 6242: if (_M_cur) 6242: { 6242: std::size_t __bkt = this->_M_h()->_M_bucket_index(_M_cur, 6242: _M_bucket_count); 6242: if (__bkt != _M_bucket) 6242: _M_cur = nullptr; 6242: } 6242: } 6242: 6242: _Hash_node<_Value, false>* _M_cur; 6242: std::size_t _M_bucket; 6242: std::size_t _M_bucket_count; 6242: 6242: void 6242: _M_init(const __hash_code_base& __base) 6242: { ::new(this->_M_h()) __hash_code_base(__base); } 6242: 6242: void 6242: _M_destroy() { this->_M_h()->~__hash_code_base(); } 6242: 6242: public: 6242: const void* 6242: _M_curr() const { return _M_cur; } 6242: 6242: std::size_t 6242: _M_get_bucket() const { return _M_bucket; } 6242: }; 6242: 6242: template 6242: inline bool 6242: operator==(const _Local_iterator_base<_Key, _Value, _ExtractKey, 6242: _H1, _H2, _Hash, __cache>& __x, 6242: const _Local_iterator_base<_Key, _Value, _ExtractKey, 6242: _H1, _H2, _Hash, __cache>& __y) 6242: { return __x._M_curr() == __y._M_curr(); } 6242: 6242: template 6242: inline bool 6242: operator!=(const _Local_iterator_base<_Key, _Value, _ExtractKey, 6242: _H1, _H2, _Hash, __cache>& __x, 6242: const _Local_iterator_base<_Key, _Value, _ExtractKey, 6242: _H1, _H2, _Hash, __cache>& __y) 6242: { return __x._M_curr() != __y._M_curr(); } 6242: 6242: 6242: template 6242: struct _Local_iterator 6242: : public _Local_iterator_base<_Key, _Value, _ExtractKey, 6242: _H1, _H2, _Hash, __cache> 6242: { 6242: private: 6242: using __base_type = _Local_iterator_base<_Key, _Value, _ExtractKey, 6242: _H1, _H2, _Hash, __cache>; 6242: using __hash_code_base = typename __base_type::__hash_code_base; 6242: public: 6242: typedef _Value value_type; 6242: typedef typename std::conditional<__constant_iterators, 6242: const _Value*, _Value*>::type 6242: pointer; 6242: typedef typename std::conditional<__constant_iterators, 6242: const _Value&, _Value&>::type 6242: reference; 6242: typedef std::ptrdiff_t difference_type; 6242: typedef std::forward_iterator_tag iterator_category; 6242: 6242: _Local_iterator() = default; 6242: 6242: _Local_iterator(const __hash_code_base& __base, 6242: _Hash_node<_Value, __cache>* __p, 6242: std::size_t __bkt, std::size_t __bkt_count) 6242: : __base_type(__base, __p, __bkt, __bkt_count) 6242: { } 6242: 6242: reference 6242: operator*() const 6242: { return this->_M_cur->_M_v(); } 6242: 6242: pointer 6242: operator->() const 6242: { return this->_M_cur->_M_valptr(); } 6242: 6242: _Local_iterator& 6242: operator++() 6242: { 6242: this->_M_incr(); 6242: return *this; 6242: } 6242: 6242: _Local_iterator 6242: operator++(int) 6242: { 6242: _Local_iterator __tmp(*this); 6242: this->_M_incr(); 6242: return __tmp; 6242: } 6242: }; 6242: 6242: 6242: template 6242: struct _Local_const_iterator 6242: : public _Local_iterator_base<_Key, _Value, _ExtractKey, 6242: _H1, _H2, _Hash, __cache> 6242: { 6242: private: 6242: using __base_type = _Local_iterator_base<_Key, _Value, _ExtractKey, 6242: _H1, _H2, _Hash, __cache>; 6242: using __hash_code_base = typename __base_type::__hash_code_base; 6242: 6242: public: 6242: typedef _Value value_type; 6242: typedef const _Value* pointer; 6242: typedef const _Value& reference; 6242: typedef std::ptrdiff_t difference_type; 6242: typedef std::forward_iterator_tag iterator_category; 6242: 6242: _Local_const_iterator() = default; 6242: 6242: _Local_const_iterator(const __hash_code_base& __base, 6242: _Hash_node<_Value, __cache>* __p, 6242: std::size_t __bkt, std::size_t __bkt_count) 6242: : __base_type(__base, __p, __bkt, __bkt_count) 6242: { } 6242: 6242: _Local_const_iterator(const _Local_iterator<_Key, _Value, _ExtractKey, 6242: _H1, _H2, _Hash, 6242: __constant_iterators, 6242: __cache>& __x) 6242: : __base_type(__x) 6242: { } 6242: 6242: reference 6242: operator*() const 6242: { return this->_M_cur->_M_v(); } 6242: 6242: pointer 6242: operator->() const 6242: { return this->_M_cur->_M_valptr(); } 6242: 6242: _Local_const_iterator& 6242: operator++() 6242: { 6242: this->_M_incr(); 6242: return *this; 6242: } 6242: 6242: _Local_const_iterator 6242: operator++(int) 6242: { 6242: _Local_const_iterator __tmp(*this); 6242: this->_M_incr(); 6242: return __tmp; 6242: } 6242: }; 6242: # 1769 "/usr/include/c++/8/bits/hashtable_policy.h" 3 6242: template 6242: struct _Hashtable_base 6242: : public _Hash_code_base<_Key, _Value, _ExtractKey, _H1, _H2, _Hash, 6242: _Traits::__hash_cached::value>, 6242: private _Hashtable_ebo_helper<0, _Equal> 6242: { 6242: public: 6242: typedef _Key key_type; 6242: typedef _Value value_type; 6242: typedef _Equal key_equal; 6242: typedef std::size_t size_type; 6242: typedef std::ptrdiff_t difference_type; 6242: 6242: using __traits_type = _Traits; 6242: using __hash_cached = typename __traits_type::__hash_cached; 6242: using __constant_iterators = typename __traits_type::__constant_iterators; 6242: using __unique_keys = typename __traits_type::__unique_keys; 6242: 6242: using __hash_code_base = _Hash_code_base<_Key, _Value, _ExtractKey, 6242: _H1, _H2, _Hash, 6242: __hash_cached::value>; 6242: 6242: using __hash_code = typename __hash_code_base::__hash_code; 6242: using __node_type = typename __hash_code_base::__node_type; 6242: 6242: using iterator = __detail::_Node_iterator; 6242: 6242: using const_iterator = __detail::_Node_const_iterator; 6242: 6242: using local_iterator = __detail::_Local_iterator; 6242: 6242: using const_local_iterator = __detail::_Local_const_iterator; 6242: 6242: using __ireturn_type = typename std::conditional<__unique_keys::value, 6242: std::pair, 6242: iterator>::type; 6242: private: 6242: using _EqualEBO = _Hashtable_ebo_helper<0, _Equal>; 6242: using _EqualHelper = _Equal_helper<_Key, _Value, _ExtractKey, _Equal, 6242: __hash_code, __hash_cached::value>; 6242: 6242: protected: 6242: _Hashtable_base() = default; 6242: _Hashtable_base(const _ExtractKey& __ex, const _H1& __h1, const _H2& __h2, 6242: const _Hash& __hash, const _Equal& __eq) 6242: : __hash_code_base(__ex, __h1, __h2, __hash), _EqualEBO(__eq) 6242: { } 6242: 6242: bool 6242: _M_equals(const _Key& __k, __hash_code __c, __node_type* __n) const 6242: { 6242: return _EqualHelper::_S_equals(_M_eq(), this->_M_extract(), 6242: __k, __c, __n); 6242: } 6242: 6242: void 6242: _M_swap(_Hashtable_base& __x) 6242: { 6242: __hash_code_base::_M_swap(__x); 6242: std::swap(_M_eq(), __x._M_eq()); 6242: } 6242: 6242: const _Equal& 6242: _M_eq() const { return _EqualEBO::_S_cget(*this); } 6242: 6242: _Equal& 6242: _M_eq() { return _EqualEBO::_S_get(*this); } 6242: }; 6242: 6242: 6242: 6242: 6242: 6242: 6242: struct _Equality_base 6242: { 6242: protected: 6242: template 6242: static bool 6242: _S_is_permutation(_Uiterator, _Uiterator, _Uiterator); 6242: }; 6242: 6242: 6242: template 6242: bool 6242: _Equality_base:: 6242: _S_is_permutation(_Uiterator __first1, _Uiterator __last1, 6242: _Uiterator __first2) 6242: { 6242: for (; __first1 != __last1; ++__first1, ++__first2) 6242: if (!(*__first1 == *__first2)) 6242: break; 6242: 6242: if (__first1 == __last1) 6242: return true; 6242: 6242: _Uiterator __last2 = __first2; 6242: std::advance(__last2, std::distance(__first1, __last1)); 6242: 6242: for (_Uiterator __it1 = __first1; __it1 != __last1; ++__it1) 6242: { 6242: _Uiterator __tmp = __first1; 6242: while (__tmp != __it1 && !bool(*__tmp == *__it1)) 6242: ++__tmp; 6242: 6242: 6242: if (__tmp != __it1) 6242: continue; 6242: 6242: std::ptrdiff_t __n2 = 0; 6242: for (__tmp = __first2; __tmp != __last2; ++__tmp) 6242: if (*__tmp == *__it1) 6242: ++__n2; 6242: 6242: if (!__n2) 6242: return false; 6242: 6242: std::ptrdiff_t __n1 = 0; 6242: for (__tmp = __it1; __tmp != __last1; ++__tmp) 6242: if (*__tmp == *__it1) 6242: ++__n1; 6242: 6242: if (__n1 != __n2) 6242: return false; 6242: } 6242: return true; 6242: } 6242: # 1918 "/usr/include/c++/8/bits/hashtable_policy.h" 3 6242: template 6242: struct _Equality; 6242: 6242: 6242: template 6242: struct _Equality<_Key, _Value, _Alloc, _ExtractKey, _Equal, 6242: _H1, _H2, _Hash, _RehashPolicy, _Traits, true> 6242: { 6242: using __hashtable = _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, 6242: _H1, _H2, _Hash, _RehashPolicy, _Traits>; 6242: 6242: bool 6242: _M_equal(const __hashtable&) const; 6242: }; 6242: 6242: template 6242: bool 6242: _Equality<_Key, _Value, _Alloc, _ExtractKey, _Equal, 6242: _H1, _H2, _Hash, _RehashPolicy, _Traits, true>:: 6242: _M_equal(const __hashtable& __other) const 6242: { 6242: const __hashtable* __this = static_cast(this); 6242: 6242: if (__this->size() != __other.size()) 6242: return false; 6242: 6242: for (auto __itx = __this->begin(); __itx != __this->end(); ++__itx) 6242: { 6242: const auto __ity = __other.find(_ExtractKey()(*__itx)); 6242: if (__ity == __other.end() || !bool(*__ity == *__itx)) 6242: return false; 6242: } 6242: return true; 6242: } 6242: 6242: 6242: template 6242: struct _Equality<_Key, _Value, _Alloc, _ExtractKey, _Equal, 6242: _H1, _H2, _Hash, _RehashPolicy, _Traits, false> 6242: : public _Equality_base 6242: { 6242: using __hashtable = _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, 6242: _H1, _H2, _Hash, _RehashPolicy, _Traits>; 6242: 6242: bool 6242: _M_equal(const __hashtable&) const; 6242: }; 6242: 6242: template 6242: bool 6242: _Equality<_Key, _Value, _Alloc, _ExtractKey, _Equal, 6242: _H1, _H2, _Hash, _RehashPolicy, _Traits, false>:: 6242: _M_equal(const __hashtable& __other) const 6242: { 6242: const __hashtable* __this = static_cast(this); 6242: 6242: if (__this->size() != __other.size()) 6242: return false; 6242: 6242: for (auto __itx = __this->begin(); __itx != __this->end();) 6242: { 6242: const auto __xrange = __this->equal_range(_ExtractKey()(*__itx)); 6242: const auto __yrange = __other.equal_range(_ExtractKey()(*__itx)); 6242: 6242: if (std::distance(__xrange.first, __xrange.second) 6242: != std::distance(__yrange.first, __yrange.second)) 6242: return false; 6242: 6242: if (!_S_is_permutation(__xrange.first, __xrange.second, 6242: __yrange.first)) 6242: return false; 6242: 6242: __itx = __xrange.second; 6242: } 6242: return true; 6242: } 6242: 6242: 6242: 6242: 6242: 6242: template 6242: struct _Hashtable_alloc : private _Hashtable_ebo_helper<0, _NodeAlloc> 6242: { 6242: private: 6242: using __ebo_node_alloc = _Hashtable_ebo_helper<0, _NodeAlloc>; 6242: public: 6242: using __node_type = typename _NodeAlloc::value_type; 6242: using __node_alloc_type = _NodeAlloc; 6242: 6242: using __node_alloc_traits = __gnu_cxx::__alloc_traits<__node_alloc_type>; 6242: 6242: using __value_alloc_traits = typename __node_alloc_traits::template 6242: rebind_traits; 6242: 6242: using __node_base = __detail::_Hash_node_base; 6242: using __bucket_type = __node_base*; 6242: using __bucket_alloc_type = 6242: __alloc_rebind<__node_alloc_type, __bucket_type>; 6242: using __bucket_alloc_traits = std::allocator_traits<__bucket_alloc_type>; 6242: 6242: _Hashtable_alloc() = default; 6242: _Hashtable_alloc(const _Hashtable_alloc&) = default; 6242: _Hashtable_alloc(_Hashtable_alloc&&) = default; 6242: 6242: template 6242: _Hashtable_alloc(_Alloc&& __a) 6242: : __ebo_node_alloc(std::forward<_Alloc>(__a)) 6242: { } 6242: 6242: __node_alloc_type& 6242: _M_node_allocator() 6242: { return __ebo_node_alloc::_S_get(*this); } 6242: 6242: const __node_alloc_type& 6242: _M_node_allocator() const 6242: { return __ebo_node_alloc::_S_cget(*this); } 6242: 6242: template 6242: __node_type* 6242: _M_allocate_node(_Args&&... __args); 6242: 6242: void 6242: _M_deallocate_node(__node_type* __n); 6242: 6242: 6242: void 6242: _M_deallocate_nodes(__node_type* __n); 6242: 6242: __bucket_type* 6242: _M_allocate_buckets(std::size_t __n); 6242: 6242: void 6242: _M_deallocate_buckets(__bucket_type*, std::size_t __n); 6242: }; 6242: 6242: 6242: 6242: template 6242: template 6242: typename _Hashtable_alloc<_NodeAlloc>::__node_type* 6242: _Hashtable_alloc<_NodeAlloc>::_M_allocate_node(_Args&&... __args) 6242: { 6242: auto __nptr = __node_alloc_traits::allocate(_M_node_allocator(), 1); 6242: __node_type* __n = std::__to_address(__nptr); 6242: try 6242: { 6242: ::new ((void*)__n) __node_type; 6242: __node_alloc_traits::construct(_M_node_allocator(), 6242: __n->_M_valptr(), 6242: std::forward<_Args>(__args)...); 6242: return __n; 6242: } 6242: catch(...) 6242: { 6242: __node_alloc_traits::deallocate(_M_node_allocator(), __nptr, 1); 6242: throw; 6242: } 6242: } 6242: 6242: template 6242: void 6242: _Hashtable_alloc<_NodeAlloc>::_M_deallocate_node(__node_type* __n) 6242: { 6242: typedef typename __node_alloc_traits::pointer _Ptr; 6242: auto __ptr = std::pointer_traits<_Ptr>::pointer_to(*__n); 6242: __node_alloc_traits::destroy(_M_node_allocator(), __n->_M_valptr()); 6242: __n->~__node_type(); 6242: __node_alloc_traits::deallocate(_M_node_allocator(), __ptr, 1); 6242: } 6242: 6242: template 6242: void 6242: _Hashtable_alloc<_NodeAlloc>::_M_deallocate_nodes(__node_type* __n) 6242: { 6242: while (__n) 6242: { 6242: __node_type* __tmp = __n; 6242: __n = __n->_M_next(); 6242: _M_deallocate_node(__tmp); 6242: } 6242: } 6242: 6242: template 6242: typename _Hashtable_alloc<_NodeAlloc>::__bucket_type* 6242: _Hashtable_alloc<_NodeAlloc>::_M_allocate_buckets(std::size_t __n) 6242: { 6242: __bucket_alloc_type __alloc(_M_node_allocator()); 6242: 6242: auto __ptr = __bucket_alloc_traits::allocate(__alloc, __n); 6242: __bucket_type* __p = std::__to_address(__ptr); 6242: __builtin_memset(__p, 0, __n * sizeof(__bucket_type)); 6242: return __p; 6242: } 6242: 6242: template 6242: void 6242: _Hashtable_alloc<_NodeAlloc>::_M_deallocate_buckets(__bucket_type* __bkts, 6242: std::size_t __n) 6242: { 6242: typedef typename __bucket_alloc_traits::pointer _Ptr; 6242: auto __ptr = std::pointer_traits<_Ptr>::pointer_to(*__bkts); 6242: __bucket_alloc_type __alloc(_M_node_allocator()); 6242: __bucket_alloc_traits::deallocate(__alloc, __ptr, __n); 6242: } 6242: 6242: 6242: } 6242: 6242: } 6242: # 36 "/usr/include/c++/8/bits/hashtable.h" 2 3 6242: 6242: 6242: 6242: 6242: namespace std __attribute__ ((__visibility__ ("default"))) 6242: { 6242: 6242: 6242: template 6242: using __cache_default 6242: = __not_<__and_< 6242: __is_fast_hash<_Hash>, 6242: 6242: __is_nothrow_invocable>>; 6242: # 169 "/usr/include/c++/8/bits/hashtable.h" 3 6242: template 6242: class _Hashtable 6242: : public __detail::_Hashtable_base<_Key, _Value, _ExtractKey, _Equal, 6242: _H1, _H2, _Hash, _Traits>, 6242: public __detail::_Map_base<_Key, _Value, _Alloc, _ExtractKey, _Equal, 6242: _H1, _H2, _Hash, _RehashPolicy, _Traits>, 6242: public __detail::_Insert<_Key, _Value, _Alloc, _ExtractKey, _Equal, 6242: _H1, _H2, _Hash, _RehashPolicy, _Traits>, 6242: public __detail::_Rehash_base<_Key, _Value, _Alloc, _ExtractKey, _Equal, 6242: _H1, _H2, _Hash, _RehashPolicy, _Traits>, 6242: public __detail::_Equality<_Key, _Value, _Alloc, _ExtractKey, _Equal, 6242: _H1, _H2, _Hash, _RehashPolicy, _Traits>, 6242: private __detail::_Hashtable_alloc< 6242: __alloc_rebind<_Alloc, 6242: __detail::_Hash_node<_Value, 6242: _Traits::__hash_cached::value>>> 6242: { 6242: static_assert(is_same::type, _Value>::value, 6242: "unordered container must have a non-const, non-volatile value_type"); 6242: 6242: 6242: 6242: 6242: static_assert(__is_invocable{}, 6242: "hash function must be invocable with an argument of key type"); 6242: static_assert(__is_invocable{}, 6242: "key equality predicate must be invocable with two arguments of " 6242: "key type"); 6242: 6242: using __traits_type = _Traits; 6242: using __hash_cached = typename __traits_type::__hash_cached; 6242: using __node_type = __detail::_Hash_node<_Value, __hash_cached::value>; 6242: using __node_alloc_type = __alloc_rebind<_Alloc, __node_type>; 6242: 6242: using __hashtable_alloc = __detail::_Hashtable_alloc<__node_alloc_type>; 6242: 6242: using __value_alloc_traits = 6242: typename __hashtable_alloc::__value_alloc_traits; 6242: using __node_alloc_traits = 6242: typename __hashtable_alloc::__node_alloc_traits; 6242: using __node_base = typename __hashtable_alloc::__node_base; 6242: using __bucket_type = typename __hashtable_alloc::__bucket_type; 6242: 6242: public: 6242: typedef _Key key_type; 6242: typedef _Value value_type; 6242: typedef _Alloc allocator_type; 6242: typedef _Equal key_equal; 6242: 6242: 6242: 6242: typedef typename __value_alloc_traits::pointer pointer; 6242: typedef typename __value_alloc_traits::const_pointer const_pointer; 6242: typedef value_type& reference; 6242: typedef const value_type& const_reference; 6242: 6242: private: 6242: using __rehash_type = _RehashPolicy; 6242: using __rehash_state = typename __rehash_type::_State; 6242: 6242: using __constant_iterators = typename __traits_type::__constant_iterators; 6242: using __unique_keys = typename __traits_type::__unique_keys; 6242: 6242: using __key_extract = typename std::conditional< 6242: __constant_iterators::value, 6242: __detail::_Identity, 6242: __detail::_Select1st>::type; 6242: 6242: using __hashtable_base = __detail:: 6242: _Hashtable_base<_Key, _Value, _ExtractKey, 6242: _Equal, _H1, _H2, _Hash, _Traits>; 6242: 6242: using __hash_code_base = typename __hashtable_base::__hash_code_base; 6242: using __hash_code = typename __hashtable_base::__hash_code; 6242: using __ireturn_type = typename __hashtable_base::__ireturn_type; 6242: 6242: using __map_base = __detail::_Map_base<_Key, _Value, _Alloc, _ExtractKey, 6242: _Equal, _H1, _H2, _Hash, 6242: _RehashPolicy, _Traits>; 6242: 6242: using __rehash_base = __detail::_Rehash_base<_Key, _Value, _Alloc, 6242: _ExtractKey, _Equal, 6242: _H1, _H2, _Hash, 6242: _RehashPolicy, _Traits>; 6242: 6242: using __eq_base = __detail::_Equality<_Key, _Value, _Alloc, _ExtractKey, 6242: _Equal, _H1, _H2, _Hash, 6242: _RehashPolicy, _Traits>; 6242: 6242: using __reuse_or_alloc_node_type = 6242: __detail::_ReuseOrAllocNode<__node_alloc_type>; 6242: 6242: 6242: template 6242: using __if_hash_cached = __or_<__not_<__hash_cached>, _Cond>; 6242: 6242: template 6242: using __if_hash_not_cached = __or_<__hash_cached, _Cond>; 6242: 6242: 6242: 6242: 6242: 6242: struct __hash_code_base_access : __hash_code_base 6242: { using __hash_code_base::_M_bucket_index; }; 6242: 6242: 6242: 6242: static_assert(noexcept(declval() 6242: ._M_bucket_index((const __node_type*)nullptr, 6242: (std::size_t)0)), 6242: "Cache the hash code or qualify your functors involved" 6242: " in hash code and bucket index computation with noexcept"); 6242: 6242: 6242: 6242: 6242: 6242: 6242: static_assert(__if_hash_cached>::value, 6242: "Functor used to map hash code to bucket index" 6242: " must be default constructible"); 6242: 6242: template 6242: friend struct __detail::_Map_base; 6242: 6242: template 6242: friend struct __detail::_Insert_base; 6242: 6242: template 6242: friend struct __detail::_Insert; 6242: 6242: public: 6242: using size_type = typename __hashtable_base::size_type; 6242: using difference_type = typename __hashtable_base::difference_type; 6242: 6242: using iterator = typename __hashtable_base::iterator; 6242: using const_iterator = typename __hashtable_base::const_iterator; 6242: 6242: using local_iterator = typename __hashtable_base::local_iterator; 6242: using const_local_iterator = typename __hashtable_base:: 6242: const_local_iterator; 6242: 6242: 6242: 6242: 6242: 6242: 6242: private: 6242: __bucket_type* _M_buckets = &_M_single_bucket; 6242: size_type _M_bucket_count = 1; 6242: __node_base _M_before_begin; 6242: size_type _M_element_count = 0; 6242: _RehashPolicy _M_rehash_policy; 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: __bucket_type _M_single_bucket = nullptr; 6242: 6242: bool 6242: _M_uses_single_bucket(__bucket_type* __bkts) const 6242: { return __builtin_expect(__bkts == &_M_single_bucket, false); } 6242: 6242: bool 6242: _M_uses_single_bucket() const 6242: { return _M_uses_single_bucket(_M_buckets); } 6242: 6242: __hashtable_alloc& 6242: _M_base_alloc() { return *this; } 6242: 6242: __bucket_type* 6242: _M_allocate_buckets(size_type __n) 6242: { 6242: if (__builtin_expect(__n == 1, false)) 6242: { 6242: _M_single_bucket = nullptr; 6242: return &_M_single_bucket; 6242: } 6242: 6242: return __hashtable_alloc::_M_allocate_buckets(__n); 6242: } 6242: 6242: void 6242: _M_deallocate_buckets(__bucket_type* __bkts, size_type __n) 6242: { 6242: if (_M_uses_single_bucket(__bkts)) 6242: return; 6242: 6242: __hashtable_alloc::_M_deallocate_buckets(__bkts, __n); 6242: } 6242: 6242: void 6242: _M_deallocate_buckets() 6242: { _M_deallocate_buckets(_M_buckets, _M_bucket_count); } 6242: 6242: 6242: 6242: __node_type* 6242: _M_bucket_begin(size_type __bkt) const; 6242: 6242: __node_type* 6242: _M_begin() const 6242: { return static_cast<__node_type*>(_M_before_begin._M_nxt); } 6242: 6242: template 6242: void 6242: _M_assign(const _Hashtable&, const _NodeGenerator&); 6242: 6242: void 6242: _M_move_assign(_Hashtable&&, std::true_type); 6242: 6242: void 6242: _M_move_assign(_Hashtable&&, std::false_type); 6242: 6242: void 6242: _M_reset() noexcept; 6242: 6242: _Hashtable(const _H1& __h1, const _H2& __h2, const _Hash& __h, 6242: const _Equal& __eq, const _ExtractKey& __exk, 6242: const allocator_type& __a) 6242: : __hashtable_base(__exk, __h1, __h2, __h, __eq), 6242: __hashtable_alloc(__node_alloc_type(__a)) 6242: { } 6242: 6242: public: 6242: 6242: _Hashtable() = default; 6242: _Hashtable(size_type __bucket_hint, 6242: const _H1&, const _H2&, const _Hash&, 6242: const _Equal&, const _ExtractKey&, 6242: const allocator_type&); 6242: 6242: template 6242: _Hashtable(_InputIterator __first, _InputIterator __last, 6242: size_type __bucket_hint, 6242: const _H1&, const _H2&, const _Hash&, 6242: const _Equal&, const _ExtractKey&, 6242: const allocator_type&); 6242: 6242: _Hashtable(const _Hashtable&); 6242: 6242: _Hashtable(_Hashtable&&) noexcept; 6242: 6242: _Hashtable(const _Hashtable&, const allocator_type&); 6242: 6242: _Hashtable(_Hashtable&&, const allocator_type&); 6242: 6242: 6242: explicit 6242: _Hashtable(const allocator_type& __a) 6242: : __hashtable_alloc(__node_alloc_type(__a)) 6242: { } 6242: 6242: explicit 6242: _Hashtable(size_type __n, 6242: const _H1& __hf = _H1(), 6242: const key_equal& __eql = key_equal(), 6242: const allocator_type& __a = allocator_type()) 6242: : _Hashtable(__n, __hf, _H2(), _Hash(), __eql, 6242: __key_extract(), __a) 6242: { } 6242: 6242: template 6242: _Hashtable(_InputIterator __f, _InputIterator __l, 6242: size_type __n = 0, 6242: const _H1& __hf = _H1(), 6242: const key_equal& __eql = key_equal(), 6242: const allocator_type& __a = allocator_type()) 6242: : _Hashtable(__f, __l, __n, __hf, _H2(), _Hash(), __eql, 6242: __key_extract(), __a) 6242: { } 6242: 6242: _Hashtable(initializer_list __l, 6242: size_type __n = 0, 6242: const _H1& __hf = _H1(), 6242: const key_equal& __eql = key_equal(), 6242: const allocator_type& __a = allocator_type()) 6242: : _Hashtable(__l.begin(), __l.end(), __n, __hf, _H2(), _Hash(), __eql, 6242: __key_extract(), __a) 6242: { } 6242: 6242: _Hashtable& 6242: operator=(const _Hashtable& __ht); 6242: 6242: _Hashtable& 6242: operator=(_Hashtable&& __ht) 6242: noexcept(__node_alloc_traits::_S_nothrow_move() 6242: && is_nothrow_move_assignable<_H1>::value 6242: && is_nothrow_move_assignable<_Equal>::value) 6242: { 6242: constexpr bool __move_storage = 6242: __node_alloc_traits::_S_propagate_on_move_assign() 6242: || __node_alloc_traits::_S_always_equal(); 6242: _M_move_assign(std::move(__ht), __bool_constant<__move_storage>()); 6242: return *this; 6242: } 6242: 6242: _Hashtable& 6242: operator=(initializer_list __l) 6242: { 6242: __reuse_or_alloc_node_type __roan(_M_begin(), *this); 6242: _M_before_begin._M_nxt = nullptr; 6242: clear(); 6242: this->_M_insert_range(__l.begin(), __l.end(), __roan, __unique_keys()); 6242: return *this; 6242: } 6242: 6242: ~_Hashtable() noexcept; 6242: 6242: void 6242: swap(_Hashtable&) 6242: noexcept(__and_<__is_nothrow_swappable<_H1>, 6242: __is_nothrow_swappable<_Equal>>::value); 6242: 6242: 6242: iterator 6242: begin() noexcept 6242: { return iterator(_M_begin()); } 6242: 6242: const_iterator 6242: begin() const noexcept 6242: { return const_iterator(_M_begin()); } 6242: 6242: iterator 6242: end() noexcept 6242: { return iterator(nullptr); } 6242: 6242: const_iterator 6242: end() const noexcept 6242: { return const_iterator(nullptr); } 6242: 6242: const_iterator 6242: cbegin() const noexcept 6242: { return const_iterator(_M_begin()); } 6242: 6242: const_iterator 6242: cend() const noexcept 6242: { return const_iterator(nullptr); } 6242: 6242: size_type 6242: size() const noexcept 6242: { return _M_element_count; } 6242: 6242: bool 6242: empty() const noexcept 6242: { return size() == 0; } 6242: 6242: allocator_type 6242: get_allocator() const noexcept 6242: { return allocator_type(this->_M_node_allocator()); } 6242: 6242: size_type 6242: max_size() const noexcept 6242: { return __node_alloc_traits::max_size(this->_M_node_allocator()); } 6242: 6242: 6242: key_equal 6242: key_eq() const 6242: { return this->_M_eq(); } 6242: 6242: 6242: 6242: 6242: size_type 6242: bucket_count() const noexcept 6242: { return _M_bucket_count; } 6242: 6242: size_type 6242: max_bucket_count() const noexcept 6242: { return max_size(); } 6242: 6242: size_type 6242: bucket_size(size_type __n) const 6242: { return std::distance(begin(__n), end(__n)); } 6242: 6242: size_type 6242: bucket(const key_type& __k) const 6242: { return _M_bucket_index(__k, this->_M_hash_code(__k)); } 6242: 6242: local_iterator 6242: begin(size_type __n) 6242: { 6242: return local_iterator(*this, _M_bucket_begin(__n), 6242: __n, _M_bucket_count); 6242: } 6242: 6242: local_iterator 6242: end(size_type __n) 6242: { return local_iterator(*this, nullptr, __n, _M_bucket_count); } 6242: 6242: const_local_iterator 6242: begin(size_type __n) const 6242: { 6242: return const_local_iterator(*this, _M_bucket_begin(__n), 6242: __n, _M_bucket_count); 6242: } 6242: 6242: const_local_iterator 6242: end(size_type __n) const 6242: { return const_local_iterator(*this, nullptr, __n, _M_bucket_count); } 6242: 6242: 6242: const_local_iterator 6242: cbegin(size_type __n) const 6242: { 6242: return const_local_iterator(*this, _M_bucket_begin(__n), 6242: __n, _M_bucket_count); 6242: } 6242: 6242: const_local_iterator 6242: cend(size_type __n) const 6242: { return const_local_iterator(*this, nullptr, __n, _M_bucket_count); } 6242: 6242: float 6242: load_factor() const noexcept 6242: { 6242: return static_cast(size()) / static_cast(bucket_count()); 6242: } 6242: 6242: 6242: 6242: 6242: 6242: 6242: const _RehashPolicy& 6242: __rehash_policy() const 6242: { return _M_rehash_policy; } 6242: 6242: void 6242: __rehash_policy(const _RehashPolicy& __pol) 6242: { _M_rehash_policy = __pol; } 6242: 6242: 6242: iterator 6242: find(const key_type& __k); 6242: 6242: const_iterator 6242: find(const key_type& __k) const; 6242: 6242: size_type 6242: count(const key_type& __k) const; 6242: 6242: std::pair 6242: equal_range(const key_type& __k); 6242: 6242: std::pair 6242: equal_range(const key_type& __k) const; 6242: 6242: protected: 6242: 6242: size_type 6242: _M_bucket_index(__node_type* __n) const noexcept 6242: { return __hash_code_base::_M_bucket_index(__n, _M_bucket_count); } 6242: 6242: size_type 6242: _M_bucket_index(const key_type& __k, __hash_code __c) const 6242: { return __hash_code_base::_M_bucket_index(__k, __c, _M_bucket_count); } 6242: 6242: 6242: 6242: __node_base* 6242: _M_find_before_node(size_type, const key_type&, __hash_code) const; 6242: 6242: __node_type* 6242: _M_find_node(size_type __bkt, const key_type& __key, 6242: __hash_code __c) const 6242: { 6242: __node_base* __before_n = _M_find_before_node(__bkt, __key, __c); 6242: if (__before_n) 6242: return static_cast<__node_type*>(__before_n->_M_nxt); 6242: return nullptr; 6242: } 6242: 6242: 6242: void 6242: _M_insert_bucket_begin(size_type, __node_type*); 6242: 6242: 6242: void 6242: _M_remove_bucket_begin(size_type __bkt, __node_type* __next_n, 6242: size_type __next_bkt); 6242: 6242: 6242: __node_base* 6242: _M_get_previous_node(size_type __bkt, __node_base* __n); 6242: 6242: 6242: 6242: 6242: iterator 6242: _M_insert_unique_node(size_type __bkt, __hash_code __code, 6242: __node_type* __n, size_type __n_elt = 1); 6242: 6242: 6242: 6242: iterator 6242: _M_insert_multi_node(__node_type* __hint, 6242: __hash_code __code, __node_type* __n); 6242: 6242: template 6242: std::pair 6242: _M_emplace(std::true_type, _Args&&... __args); 6242: 6242: template 6242: iterator 6242: _M_emplace(std::false_type __uk, _Args&&... __args) 6242: { return _M_emplace(cend(), __uk, std::forward<_Args>(__args)...); } 6242: 6242: 6242: template 6242: iterator 6242: _M_emplace(const_iterator, std::true_type __uk, _Args&&... __args) 6242: { return _M_emplace(__uk, std::forward<_Args>(__args)...).first; } 6242: 6242: template 6242: iterator 6242: _M_emplace(const_iterator, std::false_type, _Args&&... __args); 6242: 6242: template 6242: std::pair 6242: _M_insert(_Arg&&, const _NodeGenerator&, true_type, size_type = 1); 6242: 6242: template 6242: iterator 6242: _M_insert(_Arg&& __arg, const _NodeGenerator& __node_gen, 6242: false_type __uk) 6242: { 6242: return _M_insert(cend(), std::forward<_Arg>(__arg), __node_gen, 6242: __uk); 6242: } 6242: 6242: 6242: template 6242: iterator 6242: _M_insert(const_iterator, _Arg&& __arg, 6242: const _NodeGenerator& __node_gen, true_type __uk) 6242: { 6242: return 6242: _M_insert(std::forward<_Arg>(__arg), __node_gen, __uk).first; 6242: } 6242: 6242: 6242: template 6242: iterator 6242: _M_insert(const_iterator, _Arg&&, 6242: const _NodeGenerator&, false_type); 6242: 6242: size_type 6242: _M_erase(std::true_type, const key_type&); 6242: 6242: size_type 6242: _M_erase(std::false_type, const key_type&); 6242: 6242: iterator 6242: _M_erase(size_type __bkt, __node_base* __prev_n, __node_type* __n); 6242: 6242: public: 6242: 6242: template 6242: __ireturn_type 6242: emplace(_Args&&... __args) 6242: { return _M_emplace(__unique_keys(), std::forward<_Args>(__args)...); } 6242: 6242: template 6242: iterator 6242: emplace_hint(const_iterator __hint, _Args&&... __args) 6242: { 6242: return _M_emplace(__hint, __unique_keys(), 6242: std::forward<_Args>(__args)...); 6242: } 6242: 6242: 6242: 6242: 6242: iterator 6242: erase(const_iterator); 6242: 6242: 6242: iterator 6242: erase(iterator __it) 6242: { return erase(const_iterator(__it)); } 6242: 6242: size_type 6242: erase(const key_type& __k) 6242: { return _M_erase(__unique_keys(), __k); } 6242: 6242: iterator 6242: erase(const_iterator, const_iterator); 6242: 6242: void 6242: clear() noexcept; 6242: 6242: 6242: void rehash(size_type __n); 6242: # 918 "/usr/include/c++/8/bits/hashtable.h" 3 6242: private: 6242: 6242: void _M_rehash_aux(size_type __n, std::true_type); 6242: 6242: 6242: void _M_rehash_aux(size_type __n, std::false_type); 6242: 6242: 6242: 6242: void _M_rehash(size_type __n, const __rehash_state& __state); 6242: }; 6242: 6242: 6242: 6242: template 6242: auto 6242: _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, 6242: _H1, _H2, _Hash, _RehashPolicy, _Traits>:: 6242: _M_bucket_begin(size_type __bkt) const 6242: -> __node_type* 6242: { 6242: __node_base* __n = _M_buckets[__bkt]; 6242: return __n ? static_cast<__node_type*>(__n->_M_nxt) : nullptr; 6242: } 6242: 6242: template 6242: _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, 6242: _H1, _H2, _Hash, _RehashPolicy, _Traits>:: 6242: _Hashtable(size_type __bucket_hint, 6242: const _H1& __h1, const _H2& __h2, const _Hash& __h, 6242: const _Equal& __eq, const _ExtractKey& __exk, 6242: const allocator_type& __a) 6242: : _Hashtable(__h1, __h2, __h, __eq, __exk, __a) 6242: { 6242: auto __bkt = _M_rehash_policy._M_next_bkt(__bucket_hint); 6242: if (__bkt > _M_bucket_count) 6242: { 6242: _M_buckets = _M_allocate_buckets(__bkt); 6242: _M_bucket_count = __bkt; 6242: } 6242: } 6242: 6242: template 6242: template 6242: _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, 6242: _H1, _H2, _Hash, _RehashPolicy, _Traits>:: 6242: _Hashtable(_InputIterator __f, _InputIterator __l, 6242: size_type __bucket_hint, 6242: const _H1& __h1, const _H2& __h2, const _Hash& __h, 6242: const _Equal& __eq, const _ExtractKey& __exk, 6242: const allocator_type& __a) 6242: : _Hashtable(__h1, __h2, __h, __eq, __exk, __a) 6242: { 6242: auto __nb_elems = __detail::__distance_fw(__f, __l); 6242: auto __bkt_count = 6242: _M_rehash_policy._M_next_bkt( 6242: std::max(_M_rehash_policy._M_bkt_for_elements(__nb_elems), 6242: __bucket_hint)); 6242: 6242: if (__bkt_count > _M_bucket_count) 6242: { 6242: _M_buckets = _M_allocate_buckets(__bkt_count); 6242: _M_bucket_count = __bkt_count; 6242: } 6242: 6242: for (; __f != __l; ++__f) 6242: this->insert(*__f); 6242: } 6242: 6242: template 6242: auto 6242: _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, 6242: _H1, _H2, _Hash, _RehashPolicy, _Traits>:: 6242: operator=(const _Hashtable& __ht) 6242: -> _Hashtable& 6242: { 6242: if (&__ht == this) 6242: return *this; 6242: 6242: if (__node_alloc_traits::_S_propagate_on_copy_assign()) 6242: { 6242: auto& __this_alloc = this->_M_node_allocator(); 6242: auto& __that_alloc = __ht._M_node_allocator(); 6242: if (!__node_alloc_traits::_S_always_equal() 6242: && __this_alloc != __that_alloc) 6242: { 6242: 6242: this->_M_deallocate_nodes(_M_begin()); 6242: _M_before_begin._M_nxt = nullptr; 6242: _M_deallocate_buckets(); 6242: _M_buckets = nullptr; 6242: std::__alloc_on_copy(__this_alloc, __that_alloc); 6242: __hashtable_base::operator=(__ht); 6242: _M_bucket_count = __ht._M_bucket_count; 6242: _M_element_count = __ht._M_element_count; 6242: _M_rehash_policy = __ht._M_rehash_policy; 6242: try 6242: { 6242: _M_assign(__ht, 6242: [this](const __node_type* __n) 6242: { return this->_M_allocate_node(__n->_M_v()); }); 6242: } 6242: catch(...) 6242: { 6242: 6242: 6242: _M_reset(); 6242: throw; 6242: } 6242: return *this; 6242: } 6242: std::__alloc_on_copy(__this_alloc, __that_alloc); 6242: } 6242: 6242: 6242: __bucket_type* __former_buckets = nullptr; 6242: std::size_t __former_bucket_count = _M_bucket_count; 6242: const __rehash_state& __former_state = _M_rehash_policy._M_state(); 6242: 6242: if (_M_bucket_count != __ht._M_bucket_count) 6242: { 6242: __former_buckets = _M_buckets; 6242: _M_buckets = _M_allocate_buckets(__ht._M_bucket_count); 6242: _M_bucket_count = __ht._M_bucket_count; 6242: } 6242: else 6242: __builtin_memset(_M_buckets, 0, 6242: _M_bucket_count * sizeof(__bucket_type)); 6242: 6242: try 6242: { 6242: __hashtable_base::operator=(__ht); 6242: _M_element_count = __ht._M_element_count; 6242: _M_rehash_policy = __ht._M_rehash_policy; 6242: __reuse_or_alloc_node_type __roan(_M_begin(), *this); 6242: _M_before_begin._M_nxt = nullptr; 6242: _M_assign(__ht, 6242: [&__roan](const __node_type* __n) 6242: { return __roan(__n->_M_v()); }); 6242: if (__former_buckets) 6242: _M_deallocate_buckets(__former_buckets, __former_bucket_count); 6242: } 6242: catch(...) 6242: { 6242: if (__former_buckets) 6242: { 6242: 6242: _M_deallocate_buckets(); 6242: _M_rehash_policy._M_reset(__former_state); 6242: _M_buckets = __former_buckets; 6242: _M_bucket_count = __former_bucket_count; 6242: } 6242: __builtin_memset(_M_buckets, 0, 6242: _M_bucket_count * sizeof(__bucket_type)); 6242: throw; 6242: } 6242: return *this; 6242: } 6242: 6242: template 6242: template 6242: void 6242: _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, 6242: _H1, _H2, _Hash, _RehashPolicy, _Traits>:: 6242: _M_assign(const _Hashtable& __ht, const _NodeGenerator& __node_gen) 6242: { 6242: __bucket_type* __buckets = nullptr; 6242: if (!_M_buckets) 6242: _M_buckets = __buckets = _M_allocate_buckets(_M_bucket_count); 6242: 6242: try 6242: { 6242: if (!__ht._M_before_begin._M_nxt) 6242: return; 6242: 6242: 6242: 6242: __node_type* __ht_n = __ht._M_begin(); 6242: __node_type* __this_n = __node_gen(__ht_n); 6242: this->_M_copy_code(__this_n, __ht_n); 6242: _M_before_begin._M_nxt = __this_n; 6242: _M_buckets[_M_bucket_index(__this_n)] = &_M_before_begin; 6242: 6242: 6242: __node_base* __prev_n = __this_n; 6242: for (__ht_n = __ht_n->_M_next(); __ht_n; __ht_n = __ht_n->_M_next()) 6242: { 6242: __this_n = __node_gen(__ht_n); 6242: __prev_n->_M_nxt = __this_n; 6242: this->_M_copy_code(__this_n, __ht_n); 6242: size_type __bkt = _M_bucket_index(__this_n); 6242: if (!_M_buckets[__bkt]) 6242: _M_buckets[__bkt] = __prev_n; 6242: __prev_n = __this_n; 6242: } 6242: } 6242: catch(...) 6242: { 6242: clear(); 6242: if (__buckets) 6242: _M_deallocate_buckets(); 6242: throw; 6242: } 6242: } 6242: 6242: template 6242: void 6242: _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, 6242: _H1, _H2, _Hash, _RehashPolicy, _Traits>:: 6242: _M_reset() noexcept 6242: { 6242: _M_rehash_policy._M_reset(); 6242: _M_bucket_count = 1; 6242: _M_single_bucket = nullptr; 6242: _M_buckets = &_M_single_bucket; 6242: _M_before_begin._M_nxt = nullptr; 6242: _M_element_count = 0; 6242: } 6242: 6242: template 6242: void 6242: _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, 6242: _H1, _H2, _Hash, _RehashPolicy, _Traits>:: 6242: _M_move_assign(_Hashtable&& __ht, std::true_type) 6242: { 6242: this->_M_deallocate_nodes(_M_begin()); 6242: _M_deallocate_buckets(); 6242: __hashtable_base::operator=(std::move(__ht)); 6242: _M_rehash_policy = __ht._M_rehash_policy; 6242: if (!__ht._M_uses_single_bucket()) 6242: _M_buckets = __ht._M_buckets; 6242: else 6242: { 6242: _M_buckets = &_M_single_bucket; 6242: _M_single_bucket = __ht._M_single_bucket; 6242: } 6242: _M_bucket_count = __ht._M_bucket_count; 6242: _M_before_begin._M_nxt = __ht._M_before_begin._M_nxt; 6242: _M_element_count = __ht._M_element_count; 6242: std::__alloc_on_move(this->_M_node_allocator(), __ht._M_node_allocator()); 6242: 6242: 6242: 6242: if (_M_begin()) 6242: _M_buckets[_M_bucket_index(_M_begin())] = &_M_before_begin; 6242: __ht._M_reset(); 6242: } 6242: 6242: template 6242: void 6242: _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, 6242: _H1, _H2, _Hash, _RehashPolicy, _Traits>:: 6242: _M_move_assign(_Hashtable&& __ht, std::false_type) 6242: { 6242: if (__ht._M_node_allocator() == this->_M_node_allocator()) 6242: _M_move_assign(std::move(__ht), std::true_type()); 6242: else 6242: { 6242: 6242: __bucket_type* __former_buckets = nullptr; 6242: size_type __former_bucket_count = _M_bucket_count; 6242: const __rehash_state& __former_state = _M_rehash_policy._M_state(); 6242: 6242: if (_M_bucket_count != __ht._M_bucket_count) 6242: { 6242: __former_buckets = _M_buckets; 6242: _M_buckets = _M_allocate_buckets(__ht._M_bucket_count); 6242: _M_bucket_count = __ht._M_bucket_count; 6242: } 6242: else 6242: __builtin_memset(_M_buckets, 0, 6242: _M_bucket_count * sizeof(__bucket_type)); 6242: 6242: try 6242: { 6242: __hashtable_base::operator=(std::move(__ht)); 6242: _M_element_count = __ht._M_element_count; 6242: _M_rehash_policy = __ht._M_rehash_policy; 6242: __reuse_or_alloc_node_type __roan(_M_begin(), *this); 6242: _M_before_begin._M_nxt = nullptr; 6242: _M_assign(__ht, 6242: [&__roan](__node_type* __n) 6242: { return __roan(std::move_if_noexcept(__n->_M_v())); }); 6242: __ht.clear(); 6242: } 6242: catch(...) 6242: { 6242: if (__former_buckets) 6242: { 6242: _M_deallocate_buckets(); 6242: _M_rehash_policy._M_reset(__former_state); 6242: _M_buckets = __former_buckets; 6242: _M_bucket_count = __former_bucket_count; 6242: } 6242: __builtin_memset(_M_buckets, 0, 6242: _M_bucket_count * sizeof(__bucket_type)); 6242: throw; 6242: } 6242: } 6242: } 6242: 6242: template 6242: _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, 6242: _H1, _H2, _Hash, _RehashPolicy, _Traits>:: 6242: _Hashtable(const _Hashtable& __ht) 6242: : __hashtable_base(__ht), 6242: __map_base(__ht), 6242: __rehash_base(__ht), 6242: __hashtable_alloc( 6242: __node_alloc_traits::_S_select_on_copy(__ht._M_node_allocator())), 6242: _M_buckets(nullptr), 6242: _M_bucket_count(__ht._M_bucket_count), 6242: _M_element_count(__ht._M_element_count), 6242: _M_rehash_policy(__ht._M_rehash_policy) 6242: { 6242: _M_assign(__ht, 6242: [this](const __node_type* __n) 6242: { return this->_M_allocate_node(__n->_M_v()); }); 6242: } 6242: 6242: template 6242: _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, 6242: _H1, _H2, _Hash, _RehashPolicy, _Traits>:: 6242: _Hashtable(_Hashtable&& __ht) noexcept 6242: : __hashtable_base(__ht), 6242: __map_base(__ht), 6242: __rehash_base(__ht), 6242: __hashtable_alloc(std::move(__ht._M_base_alloc())), 6242: _M_buckets(__ht._M_buckets), 6242: _M_bucket_count(__ht._M_bucket_count), 6242: _M_before_begin(__ht._M_before_begin._M_nxt), 6242: _M_element_count(__ht._M_element_count), 6242: _M_rehash_policy(__ht._M_rehash_policy) 6242: { 6242: 6242: if (__ht._M_uses_single_bucket()) 6242: { 6242: _M_buckets = &_M_single_bucket; 6242: _M_single_bucket = __ht._M_single_bucket; 6242: } 6242: 6242: 6242: 6242: if (_M_begin()) 6242: _M_buckets[_M_bucket_index(_M_begin())] = &_M_before_begin; 6242: 6242: __ht._M_reset(); 6242: } 6242: 6242: template 6242: _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, 6242: _H1, _H2, _Hash, _RehashPolicy, _Traits>:: 6242: _Hashtable(const _Hashtable& __ht, const allocator_type& __a) 6242: : __hashtable_base(__ht), 6242: __map_base(__ht), 6242: __rehash_base(__ht), 6242: __hashtable_alloc(__node_alloc_type(__a)), 6242: _M_buckets(), 6242: _M_bucket_count(__ht._M_bucket_count), 6242: _M_element_count(__ht._M_element_count), 6242: _M_rehash_policy(__ht._M_rehash_policy) 6242: { 6242: _M_assign(__ht, 6242: [this](const __node_type* __n) 6242: { return this->_M_allocate_node(__n->_M_v()); }); 6242: } 6242: 6242: template 6242: _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, 6242: _H1, _H2, _Hash, _RehashPolicy, _Traits>:: 6242: _Hashtable(_Hashtable&& __ht, const allocator_type& __a) 6242: : __hashtable_base(__ht), 6242: __map_base(__ht), 6242: __rehash_base(__ht), 6242: __hashtable_alloc(__node_alloc_type(__a)), 6242: _M_buckets(nullptr), 6242: _M_bucket_count(__ht._M_bucket_count), 6242: _M_element_count(__ht._M_element_count), 6242: _M_rehash_policy(__ht._M_rehash_policy) 6242: { 6242: if (__ht._M_node_allocator() == this->_M_node_allocator()) 6242: { 6242: if (__ht._M_uses_single_bucket()) 6242: { 6242: _M_buckets = &_M_single_bucket; 6242: _M_single_bucket = __ht._M_single_bucket; 6242: } 6242: else 6242: _M_buckets = __ht._M_buckets; 6242: 6242: _M_before_begin._M_nxt = __ht._M_before_begin._M_nxt; 6242: 6242: 6242: if (_M_begin()) 6242: _M_buckets[_M_bucket_index(_M_begin())] = &_M_before_begin; 6242: __ht._M_reset(); 6242: } 6242: else 6242: { 6242: _M_assign(__ht, 6242: [this](__node_type* __n) 6242: { 6242: return this->_M_allocate_node( 6242: std::move_if_noexcept(__n->_M_v())); 6242: }); 6242: __ht.clear(); 6242: } 6242: } 6242: 6242: template 6242: _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, 6242: _H1, _H2, _Hash, _RehashPolicy, _Traits>:: 6242: ~_Hashtable() noexcept 6242: { 6242: clear(); 6242: _M_deallocate_buckets(); 6242: } 6242: 6242: template 6242: void 6242: _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, 6242: _H1, _H2, _Hash, _RehashPolicy, _Traits>:: 6242: swap(_Hashtable& __x) 6242: noexcept(__and_<__is_nothrow_swappable<_H1>, 6242: __is_nothrow_swappable<_Equal>>::value) 6242: { 6242: 6242: 6242: 6242: this->_M_swap(__x); 6242: 6242: std::__alloc_on_swap(this->_M_node_allocator(), __x._M_node_allocator()); 6242: std::swap(_M_rehash_policy, __x._M_rehash_policy); 6242: 6242: 6242: if (this->_M_uses_single_bucket()) 6242: { 6242: if (!__x._M_uses_single_bucket()) 6242: { 6242: _M_buckets = __x._M_buckets; 6242: __x._M_buckets = &__x._M_single_bucket; 6242: } 6242: } 6242: else if (__x._M_uses_single_bucket()) 6242: { 6242: __x._M_buckets = _M_buckets; 6242: _M_buckets = &_M_single_bucket; 6242: } 6242: else 6242: std::swap(_M_buckets, __x._M_buckets); 6242: 6242: std::swap(_M_bucket_count, __x._M_bucket_count); 6242: std::swap(_M_before_begin._M_nxt, __x._M_before_begin._M_nxt); 6242: std::swap(_M_element_count, __x._M_element_count); 6242: std::swap(_M_single_bucket, __x._M_single_bucket); 6242: 6242: 6242: 6242: if (_M_begin()) 6242: _M_buckets[_M_bucket_index(_M_begin())] = &_M_before_begin; 6242: 6242: if (__x._M_begin()) 6242: __x._M_buckets[__x._M_bucket_index(__x._M_begin())] 6242: = &__x._M_before_begin; 6242: } 6242: 6242: template 6242: auto 6242: _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, 6242: _H1, _H2, _Hash, _RehashPolicy, _Traits>:: 6242: find(const key_type& __k) 6242: -> iterator 6242: { 6242: __hash_code __code = this->_M_hash_code(__k); 6242: std::size_t __n = _M_bucket_index(__k, __code); 6242: __node_type* __p = _M_find_node(__n, __k, __code); 6242: return __p ? iterator(__p) : end(); 6242: } 6242: 6242: template 6242: auto 6242: _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, 6242: _H1, _H2, _Hash, _RehashPolicy, _Traits>:: 6242: find(const key_type& __k) const 6242: -> const_iterator 6242: { 6242: __hash_code __code = this->_M_hash_code(__k); 6242: std::size_t __n = _M_bucket_index(__k, __code); 6242: __node_type* __p = _M_find_node(__n, __k, __code); 6242: return __p ? const_iterator(__p) : end(); 6242: } 6242: 6242: template 6242: auto 6242: _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, 6242: _H1, _H2, _Hash, _RehashPolicy, _Traits>:: 6242: count(const key_type& __k) const 6242: -> size_type 6242: { 6242: __hash_code __code = this->_M_hash_code(__k); 6242: std::size_t __n = _M_bucket_index(__k, __code); 6242: __node_type* __p = _M_bucket_begin(__n); 6242: if (!__p) 6242: return 0; 6242: 6242: std::size_t __result = 0; 6242: for (;; __p = __p->_M_next()) 6242: { 6242: if (this->_M_equals(__k, __code, __p)) 6242: ++__result; 6242: else if (__result) 6242: 6242: 6242: 6242: break; 6242: if (!__p->_M_nxt || _M_bucket_index(__p->_M_next()) != __n) 6242: break; 6242: } 6242: return __result; 6242: } 6242: 6242: template 6242: auto 6242: _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, 6242: _H1, _H2, _Hash, _RehashPolicy, _Traits>:: 6242: equal_range(const key_type& __k) 6242: -> pair 6242: { 6242: __hash_code __code = this->_M_hash_code(__k); 6242: std::size_t __n = _M_bucket_index(__k, __code); 6242: __node_type* __p = _M_find_node(__n, __k, __code); 6242: 6242: if (__p) 6242: { 6242: __node_type* __p1 = __p->_M_next(); 6242: while (__p1 && _M_bucket_index(__p1) == __n 6242: && this->_M_equals(__k, __code, __p1)) 6242: __p1 = __p1->_M_next(); 6242: 6242: return std::make_pair(iterator(__p), iterator(__p1)); 6242: } 6242: else 6242: return std::make_pair(end(), end()); 6242: } 6242: 6242: template 6242: auto 6242: _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, 6242: _H1, _H2, _Hash, _RehashPolicy, _Traits>:: 6242: equal_range(const key_type& __k) const 6242: -> pair 6242: { 6242: __hash_code __code = this->_M_hash_code(__k); 6242: std::size_t __n = _M_bucket_index(__k, __code); 6242: __node_type* __p = _M_find_node(__n, __k, __code); 6242: 6242: if (__p) 6242: { 6242: __node_type* __p1 = __p->_M_next(); 6242: while (__p1 && _M_bucket_index(__p1) == __n 6242: && this->_M_equals(__k, __code, __p1)) 6242: __p1 = __p1->_M_next(); 6242: 6242: return std::make_pair(const_iterator(__p), const_iterator(__p1)); 6242: } 6242: else 6242: return std::make_pair(end(), end()); 6242: } 6242: 6242: 6242: 6242: template 6242: auto 6242: _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, 6242: _H1, _H2, _Hash, _RehashPolicy, _Traits>:: 6242: _M_find_before_node(size_type __n, const key_type& __k, 6242: __hash_code __code) const 6242: -> __node_base* 6242: { 6242: __node_base* __prev_p = _M_buckets[__n]; 6242: if (!__prev_p) 6242: return nullptr; 6242: 6242: for (__node_type* __p = static_cast<__node_type*>(__prev_p->_M_nxt);; 6242: __p = __p->_M_next()) 6242: { 6242: if (this->_M_equals(__k, __code, __p)) 6242: return __prev_p; 6242: 6242: if (!__p->_M_nxt || _M_bucket_index(__p->_M_next()) != __n) 6242: break; 6242: __prev_p = __p; 6242: } 6242: return nullptr; 6242: } 6242: 6242: template 6242: void 6242: _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, 6242: _H1, _H2, _Hash, _RehashPolicy, _Traits>:: 6242: _M_insert_bucket_begin(size_type __bkt, __node_type* __node) 6242: { 6242: if (_M_buckets[__bkt]) 6242: { 6242: 6242: 6242: __node->_M_nxt = _M_buckets[__bkt]->_M_nxt; 6242: _M_buckets[__bkt]->_M_nxt = __node; 6242: } 6242: else 6242: { 6242: 6242: 6242: 6242: __node->_M_nxt = _M_before_begin._M_nxt; 6242: _M_before_begin._M_nxt = __node; 6242: if (__node->_M_nxt) 6242: 6242: 6242: _M_buckets[_M_bucket_index(__node->_M_next())] = __node; 6242: _M_buckets[__bkt] = &_M_before_begin; 6242: } 6242: } 6242: 6242: template 6242: void 6242: _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, 6242: _H1, _H2, _Hash, _RehashPolicy, _Traits>:: 6242: _M_remove_bucket_begin(size_type __bkt, __node_type* __next, 6242: size_type __next_bkt) 6242: { 6242: if (!__next || __next_bkt != __bkt) 6242: { 6242: 6242: 6242: if (__next) 6242: _M_buckets[__next_bkt] = _M_buckets[__bkt]; 6242: 6242: 6242: if (&_M_before_begin == _M_buckets[__bkt]) 6242: _M_before_begin._M_nxt = __next; 6242: _M_buckets[__bkt] = nullptr; 6242: } 6242: } 6242: 6242: template 6242: auto 6242: _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, 6242: _H1, _H2, _Hash, _RehashPolicy, _Traits>:: 6242: _M_get_previous_node(size_type __bkt, __node_base* __n) 6242: -> __node_base* 6242: { 6242: __node_base* __prev_n = _M_buckets[__bkt]; 6242: while (__prev_n->_M_nxt != __n) 6242: __prev_n = __prev_n->_M_nxt; 6242: return __prev_n; 6242: } 6242: 6242: template 6242: template 6242: auto 6242: _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, 6242: _H1, _H2, _Hash, _RehashPolicy, _Traits>:: 6242: _M_emplace(std::true_type, _Args&&... __args) 6242: -> pair 6242: { 6242: 6242: __node_type* __node = this->_M_allocate_node(std::forward<_Args>(__args)...); 6242: const key_type& __k = this->_M_extract()(__node->_M_v()); 6242: __hash_code __code; 6242: try 6242: { 6242: __code = this->_M_hash_code(__k); 6242: } 6242: catch(...) 6242: { 6242: this->_M_deallocate_node(__node); 6242: throw; 6242: } 6242: 6242: size_type __bkt = _M_bucket_index(__k, __code); 6242: if (__node_type* __p = _M_find_node(__bkt, __k, __code)) 6242: { 6242: 6242: this->_M_deallocate_node(__node); 6242: return std::make_pair(iterator(__p), false); 6242: } 6242: 6242: 6242: return std::make_pair(_M_insert_unique_node(__bkt, __code, __node), 6242: true); 6242: } 6242: 6242: template 6242: template 6242: auto 6242: _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, 6242: _H1, _H2, _Hash, _RehashPolicy, _Traits>:: 6242: _M_emplace(const_iterator __hint, std::false_type, _Args&&... __args) 6242: -> iterator 6242: { 6242: 6242: __node_type* __node = 6242: this->_M_allocate_node(std::forward<_Args>(__args)...); 6242: 6242: __hash_code __code; 6242: try 6242: { 6242: __code = this->_M_hash_code(this->_M_extract()(__node->_M_v())); 6242: } 6242: catch(...) 6242: { 6242: this->_M_deallocate_node(__node); 6242: throw; 6242: } 6242: 6242: return _M_insert_multi_node(__hint._M_cur, __code, __node); 6242: } 6242: 6242: template 6242: auto 6242: _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, 6242: _H1, _H2, _Hash, _RehashPolicy, _Traits>:: 6242: _M_insert_unique_node(size_type __bkt, __hash_code __code, 6242: __node_type* __node, size_type __n_elt) 6242: -> iterator 6242: { 6242: const __rehash_state& __saved_state = _M_rehash_policy._M_state(); 6242: std::pair __do_rehash 6242: = _M_rehash_policy._M_need_rehash(_M_bucket_count, _M_element_count, 6242: __n_elt); 6242: 6242: try 6242: { 6242: if (__do_rehash.first) 6242: { 6242: _M_rehash(__do_rehash.second, __saved_state); 6242: __bkt = _M_bucket_index(this->_M_extract()(__node->_M_v()), __code); 6242: } 6242: 6242: this->_M_store_code(__node, __code); 6242: 6242: 6242: _M_insert_bucket_begin(__bkt, __node); 6242: ++_M_element_count; 6242: return iterator(__node); 6242: } 6242: catch(...) 6242: { 6242: this->_M_deallocate_node(__node); 6242: throw; 6242: } 6242: } 6242: 6242: 6242: 6242: template 6242: auto 6242: _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, 6242: _H1, _H2, _Hash, _RehashPolicy, _Traits>:: 6242: _M_insert_multi_node(__node_type* __hint, __hash_code __code, 6242: __node_type* __node) 6242: -> iterator 6242: { 6242: const __rehash_state& __saved_state = _M_rehash_policy._M_state(); 6242: std::pair __do_rehash 6242: = _M_rehash_policy._M_need_rehash(_M_bucket_count, _M_element_count, 1); 6242: 6242: try 6242: { 6242: if (__do_rehash.first) 6242: _M_rehash(__do_rehash.second, __saved_state); 6242: 6242: this->_M_store_code(__node, __code); 6242: const key_type& __k = this->_M_extract()(__node->_M_v()); 6242: size_type __bkt = _M_bucket_index(__k, __code); 6242: 6242: 6242: 6242: __node_base* __prev 6242: = __builtin_expect(__hint != nullptr, false) 6242: && this->_M_equals(__k, __code, __hint) 6242: ? __hint 6242: : _M_find_before_node(__bkt, __k, __code); 6242: if (__prev) 6242: { 6242: 6242: __node->_M_nxt = __prev->_M_nxt; 6242: __prev->_M_nxt = __node; 6242: if (__builtin_expect(__prev == __hint, false)) 6242: 6242: 6242: if (__node->_M_nxt 6242: && !this->_M_equals(__k, __code, __node->_M_next())) 6242: { 6242: size_type __next_bkt = _M_bucket_index(__node->_M_next()); 6242: if (__next_bkt != __bkt) 6242: _M_buckets[__next_bkt] = __node; 6242: } 6242: } 6242: else 6242: 6242: 6242: 6242: 6242: _M_insert_bucket_begin(__bkt, __node); 6242: ++_M_element_count; 6242: return iterator(__node); 6242: } 6242: catch(...) 6242: { 6242: this->_M_deallocate_node(__node); 6242: throw; 6242: } 6242: } 6242: 6242: 6242: template 6242: template 6242: auto 6242: _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, 6242: _H1, _H2, _Hash, _RehashPolicy, _Traits>:: 6242: _M_insert(_Arg&& __v, const _NodeGenerator& __node_gen, true_type, 6242: size_type __n_elt) 6242: -> pair 6242: { 6242: const key_type& __k = this->_M_extract()(__v); 6242: __hash_code __code = this->_M_hash_code(__k); 6242: size_type __bkt = _M_bucket_index(__k, __code); 6242: 6242: __node_type* __n = _M_find_node(__bkt, __k, __code); 6242: if (__n) 6242: return std::make_pair(iterator(__n), false); 6242: 6242: __n = __node_gen(std::forward<_Arg>(__v)); 6242: return { _M_insert_unique_node(__bkt, __code, __n, __n_elt), true }; 6242: } 6242: 6242: 6242: template 6242: template 6242: auto 6242: _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, 6242: _H1, _H2, _Hash, _RehashPolicy, _Traits>:: 6242: _M_insert(const_iterator __hint, _Arg&& __v, 6242: const _NodeGenerator& __node_gen, false_type) 6242: -> iterator 6242: { 6242: 6242: 6242: __hash_code __code = this->_M_hash_code(this->_M_extract()(__v)); 6242: 6242: 6242: __node_type* __node = __node_gen(std::forward<_Arg>(__v)); 6242: 6242: return _M_insert_multi_node(__hint._M_cur, __code, __node); 6242: } 6242: 6242: template 6242: auto 6242: _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, 6242: _H1, _H2, _Hash, _RehashPolicy, _Traits>:: 6242: erase(const_iterator __it) 6242: -> iterator 6242: { 6242: __node_type* __n = __it._M_cur; 6242: std::size_t __bkt = _M_bucket_index(__n); 6242: 6242: 6242: 6242: 6242: __node_base* __prev_n = _M_get_previous_node(__bkt, __n); 6242: return _M_erase(__bkt, __prev_n, __n); 6242: } 6242: 6242: template 6242: auto 6242: _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, 6242: _H1, _H2, _Hash, _RehashPolicy, _Traits>:: 6242: _M_erase(size_type __bkt, __node_base* __prev_n, __node_type* __n) 6242: -> iterator 6242: { 6242: if (__prev_n == _M_buckets[__bkt]) 6242: _M_remove_bucket_begin(__bkt, __n->_M_next(), 6242: __n->_M_nxt ? _M_bucket_index(__n->_M_next()) : 0); 6242: else if (__n->_M_nxt) 6242: { 6242: size_type __next_bkt = _M_bucket_index(__n->_M_next()); 6242: if (__next_bkt != __bkt) 6242: _M_buckets[__next_bkt] = __prev_n; 6242: } 6242: 6242: __prev_n->_M_nxt = __n->_M_nxt; 6242: iterator __result(__n->_M_next()); 6242: this->_M_deallocate_node(__n); 6242: --_M_element_count; 6242: 6242: return __result; 6242: } 6242: 6242: template 6242: auto 6242: _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, 6242: _H1, _H2, _Hash, _RehashPolicy, _Traits>:: 6242: _M_erase(std::true_type, const key_type& __k) 6242: -> size_type 6242: { 6242: __hash_code __code = this->_M_hash_code(__k); 6242: std::size_t __bkt = _M_bucket_index(__k, __code); 6242: 6242: 6242: __node_base* __prev_n = _M_find_before_node(__bkt, __k, __code); 6242: if (!__prev_n) 6242: return 0; 6242: 6242: 6242: __node_type* __n = static_cast<__node_type*>(__prev_n->_M_nxt); 6242: _M_erase(__bkt, __prev_n, __n); 6242: return 1; 6242: } 6242: 6242: template 6242: auto 6242: _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, 6242: _H1, _H2, _Hash, _RehashPolicy, _Traits>:: 6242: _M_erase(std::false_type, const key_type& __k) 6242: -> size_type 6242: { 6242: __hash_code __code = this->_M_hash_code(__k); 6242: std::size_t __bkt = _M_bucket_index(__k, __code); 6242: 6242: 6242: __node_base* __prev_n = _M_find_before_node(__bkt, __k, __code); 6242: if (!__prev_n) 6242: return 0; 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: __node_type* __n = static_cast<__node_type*>(__prev_n->_M_nxt); 6242: __node_type* __n_last = __n; 6242: std::size_t __n_last_bkt = __bkt; 6242: do 6242: { 6242: __n_last = __n_last->_M_next(); 6242: if (!__n_last) 6242: break; 6242: __n_last_bkt = _M_bucket_index(__n_last); 6242: } 6242: while (__n_last_bkt == __bkt && this->_M_equals(__k, __code, __n_last)); 6242: 6242: 6242: size_type __result = 0; 6242: do 6242: { 6242: __node_type* __p = __n->_M_next(); 6242: this->_M_deallocate_node(__n); 6242: __n = __p; 6242: ++__result; 6242: --_M_element_count; 6242: } 6242: while (__n != __n_last); 6242: 6242: if (__prev_n == _M_buckets[__bkt]) 6242: _M_remove_bucket_begin(__bkt, __n_last, __n_last_bkt); 6242: else if (__n_last && __n_last_bkt != __bkt) 6242: _M_buckets[__n_last_bkt] = __prev_n; 6242: __prev_n->_M_nxt = __n_last; 6242: return __result; 6242: } 6242: 6242: template 6242: auto 6242: _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, 6242: _H1, _H2, _Hash, _RehashPolicy, _Traits>:: 6242: erase(const_iterator __first, const_iterator __last) 6242: -> iterator 6242: { 6242: __node_type* __n = __first._M_cur; 6242: __node_type* __last_n = __last._M_cur; 6242: if (__n == __last_n) 6242: return iterator(__n); 6242: 6242: std::size_t __bkt = _M_bucket_index(__n); 6242: 6242: __node_base* __prev_n = _M_get_previous_node(__bkt, __n); 6242: bool __is_bucket_begin = __n == _M_bucket_begin(__bkt); 6242: std::size_t __n_bkt = __bkt; 6242: for (;;) 6242: { 6242: do 6242: { 6242: __node_type* __tmp = __n; 6242: __n = __n->_M_next(); 6242: this->_M_deallocate_node(__tmp); 6242: --_M_element_count; 6242: if (!__n) 6242: break; 6242: __n_bkt = _M_bucket_index(__n); 6242: } 6242: while (__n != __last_n && __n_bkt == __bkt); 6242: if (__is_bucket_begin) 6242: _M_remove_bucket_begin(__bkt, __n, __n_bkt); 6242: if (__n == __last_n) 6242: break; 6242: __is_bucket_begin = true; 6242: __bkt = __n_bkt; 6242: } 6242: 6242: if (__n && (__n_bkt != __bkt || __is_bucket_begin)) 6242: _M_buckets[__n_bkt] = __prev_n; 6242: __prev_n->_M_nxt = __n; 6242: return iterator(__n); 6242: } 6242: 6242: template 6242: void 6242: _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, 6242: _H1, _H2, _Hash, _RehashPolicy, _Traits>:: 6242: clear() noexcept 6242: { 6242: this->_M_deallocate_nodes(_M_begin()); 6242: __builtin_memset(_M_buckets, 0, _M_bucket_count * sizeof(__bucket_type)); 6242: _M_element_count = 0; 6242: _M_before_begin._M_nxt = nullptr; 6242: } 6242: 6242: template 6242: void 6242: _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, 6242: _H1, _H2, _Hash, _RehashPolicy, _Traits>:: 6242: rehash(size_type __n) 6242: { 6242: const __rehash_state& __saved_state = _M_rehash_policy._M_state(); 6242: std::size_t __buckets 6242: = std::max(_M_rehash_policy._M_bkt_for_elements(_M_element_count + 1), 6242: __n); 6242: __buckets = _M_rehash_policy._M_next_bkt(__buckets); 6242: 6242: if (__buckets != _M_bucket_count) 6242: _M_rehash(__buckets, __saved_state); 6242: else 6242: 6242: _M_rehash_policy._M_reset(__saved_state); 6242: } 6242: 6242: template 6242: void 6242: _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, 6242: _H1, _H2, _Hash, _RehashPolicy, _Traits>:: 6242: _M_rehash(size_type __n, const __rehash_state& __state) 6242: { 6242: try 6242: { 6242: _M_rehash_aux(__n, __unique_keys()); 6242: } 6242: catch(...) 6242: { 6242: 6242: 6242: _M_rehash_policy._M_reset(__state); 6242: throw; 6242: } 6242: } 6242: 6242: 6242: template 6242: void 6242: _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, 6242: _H1, _H2, _Hash, _RehashPolicy, _Traits>:: 6242: _M_rehash_aux(size_type __n, std::true_type) 6242: { 6242: __bucket_type* __new_buckets = _M_allocate_buckets(__n); 6242: __node_type* __p = _M_begin(); 6242: _M_before_begin._M_nxt = nullptr; 6242: std::size_t __bbegin_bkt = 0; 6242: while (__p) 6242: { 6242: __node_type* __next = __p->_M_next(); 6242: std::size_t __bkt = __hash_code_base::_M_bucket_index(__p, __n); 6242: if (!__new_buckets[__bkt]) 6242: { 6242: __p->_M_nxt = _M_before_begin._M_nxt; 6242: _M_before_begin._M_nxt = __p; 6242: __new_buckets[__bkt] = &_M_before_begin; 6242: if (__p->_M_nxt) 6242: __new_buckets[__bbegin_bkt] = __p; 6242: __bbegin_bkt = __bkt; 6242: } 6242: else 6242: { 6242: __p->_M_nxt = __new_buckets[__bkt]->_M_nxt; 6242: __new_buckets[__bkt]->_M_nxt = __p; 6242: } 6242: __p = __next; 6242: } 6242: 6242: _M_deallocate_buckets(); 6242: _M_bucket_count = __n; 6242: _M_buckets = __new_buckets; 6242: } 6242: 6242: 6242: 6242: template 6242: void 6242: _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, 6242: _H1, _H2, _Hash, _RehashPolicy, _Traits>:: 6242: _M_rehash_aux(size_type __n, std::false_type) 6242: { 6242: __bucket_type* __new_buckets = _M_allocate_buckets(__n); 6242: 6242: __node_type* __p = _M_begin(); 6242: _M_before_begin._M_nxt = nullptr; 6242: std::size_t __bbegin_bkt = 0; 6242: std::size_t __prev_bkt = 0; 6242: __node_type* __prev_p = nullptr; 6242: bool __check_bucket = false; 6242: 6242: while (__p) 6242: { 6242: __node_type* __next = __p->_M_next(); 6242: std::size_t __bkt = __hash_code_base::_M_bucket_index(__p, __n); 6242: 6242: if (__prev_p && __prev_bkt == __bkt) 6242: { 6242: 6242: 6242: 6242: __p->_M_nxt = __prev_p->_M_nxt; 6242: __prev_p->_M_nxt = __p; 6242: 6242: 6242: 6242: 6242: 6242: 6242: __check_bucket = true; 6242: } 6242: else 6242: { 6242: if (__check_bucket) 6242: { 6242: 6242: 6242: if (__prev_p->_M_nxt) 6242: { 6242: std::size_t __next_bkt 6242: = __hash_code_base::_M_bucket_index(__prev_p->_M_next(), 6242: __n); 6242: if (__next_bkt != __prev_bkt) 6242: __new_buckets[__next_bkt] = __prev_p; 6242: } 6242: __check_bucket = false; 6242: } 6242: 6242: if (!__new_buckets[__bkt]) 6242: { 6242: __p->_M_nxt = _M_before_begin._M_nxt; 6242: _M_before_begin._M_nxt = __p; 6242: __new_buckets[__bkt] = &_M_before_begin; 6242: if (__p->_M_nxt) 6242: __new_buckets[__bbegin_bkt] = __p; 6242: __bbegin_bkt = __bkt; 6242: } 6242: else 6242: { 6242: __p->_M_nxt = __new_buckets[__bkt]->_M_nxt; 6242: __new_buckets[__bkt]->_M_nxt = __p; 6242: } 6242: } 6242: __prev_p = __p; 6242: __prev_bkt = __bkt; 6242: __p = __next; 6242: } 6242: 6242: if (__check_bucket && __prev_p->_M_nxt) 6242: { 6242: std::size_t __next_bkt 6242: = __hash_code_base::_M_bucket_index(__prev_p->_M_next(), __n); 6242: if (__next_bkt != __prev_bkt) 6242: __new_buckets[__next_bkt] = __prev_p; 6242: } 6242: 6242: _M_deallocate_buckets(); 6242: _M_bucket_count = __n; 6242: _M_buckets = __new_buckets; 6242: } 6242: 6242: 6242: 6242: 6242: 6242: 6242: } 6242: # 47 "/usr/include/c++/8/unordered_map" 2 3 6242: # 1 "/usr/include/c++/8/bits/unordered_map.h" 1 3 6242: # 33 "/usr/include/c++/8/bits/unordered_map.h" 3 6242: namespace std __attribute__ ((__visibility__ ("default"))) 6242: { 6242: 6242: 6242: 6242: 6242: template 6242: using __umap_traits = __detail::_Hashtable_traits<_Cache, false, true>; 6242: 6242: template, 6242: typename _Pred = std::equal_to<_Key>, 6242: typename _Alloc = std::allocator >, 6242: typename _Tr = __umap_traits<__cache_default<_Key, _Hash>::value>> 6242: using __umap_hashtable = _Hashtable<_Key, std::pair, 6242: _Alloc, __detail::_Select1st, 6242: _Pred, _Hash, 6242: __detail::_Mod_range_hashing, 6242: __detail::_Default_ranged_hash, 6242: __detail::_Prime_rehash_policy, _Tr>; 6242: 6242: 6242: template 6242: using __ummap_traits = __detail::_Hashtable_traits<_Cache, false, false>; 6242: 6242: template, 6242: typename _Pred = std::equal_to<_Key>, 6242: typename _Alloc = std::allocator >, 6242: typename _Tr = __ummap_traits<__cache_default<_Key, _Hash>::value>> 6242: using __ummap_hashtable = _Hashtable<_Key, std::pair, 6242: _Alloc, __detail::_Select1st, 6242: _Pred, _Hash, 6242: __detail::_Mod_range_hashing, 6242: __detail::_Default_ranged_hash, 6242: __detail::_Prime_rehash_policy, _Tr>; 6242: 6242: template 6242: class unordered_multimap; 6242: # 98 "/usr/include/c++/8/bits/unordered_map.h" 3 6242: template, 6242: typename _Pred = equal_to<_Key>, 6242: typename _Alloc = allocator>> 6242: class unordered_map 6242: { 6242: typedef __umap_hashtable<_Key, _Tp, _Hash, _Pred, _Alloc> _Hashtable; 6242: _Hashtable _M_h; 6242: 6242: public: 6242: 6242: 6242: 6242: typedef typename _Hashtable::key_type key_type; 6242: typedef typename _Hashtable::value_type value_type; 6242: typedef typename _Hashtable::mapped_type mapped_type; 6242: typedef typename _Hashtable::hasher hasher; 6242: typedef typename _Hashtable::key_equal key_equal; 6242: typedef typename _Hashtable::allocator_type allocator_type; 6242: 6242: 6242: 6242: 6242: typedef typename _Hashtable::pointer pointer; 6242: typedef typename _Hashtable::const_pointer const_pointer; 6242: typedef typename _Hashtable::reference reference; 6242: typedef typename _Hashtable::const_reference const_reference; 6242: typedef typename _Hashtable::iterator iterator; 6242: typedef typename _Hashtable::const_iterator const_iterator; 6242: typedef typename _Hashtable::local_iterator local_iterator; 6242: typedef typename _Hashtable::const_local_iterator const_local_iterator; 6242: typedef typename _Hashtable::size_type size_type; 6242: typedef typename _Hashtable::difference_type difference_type; 6242: # 141 "/usr/include/c++/8/bits/unordered_map.h" 3 6242: unordered_map() = default; 6242: # 150 "/usr/include/c++/8/bits/unordered_map.h" 3 6242: explicit 6242: unordered_map(size_type __n, 6242: const hasher& __hf = hasher(), 6242: const key_equal& __eql = key_equal(), 6242: const allocator_type& __a = allocator_type()) 6242: : _M_h(__n, __hf, __eql, __a) 6242: { } 6242: # 171 "/usr/include/c++/8/bits/unordered_map.h" 3 6242: template 6242: unordered_map(_InputIterator __first, _InputIterator __last, 6242: size_type __n = 0, 6242: const hasher& __hf = hasher(), 6242: const key_equal& __eql = key_equal(), 6242: const allocator_type& __a = allocator_type()) 6242: : _M_h(__first, __last, __n, __hf, __eql, __a) 6242: { } 6242: 6242: 6242: unordered_map(const unordered_map&) = default; 6242: 6242: 6242: unordered_map(unordered_map&&) = default; 6242: 6242: 6242: 6242: 6242: 6242: explicit 6242: unordered_map(const allocator_type& __a) 6242: : _M_h(__a) 6242: { } 6242: 6242: 6242: 6242: 6242: 6242: 6242: unordered_map(const unordered_map& __umap, 6242: const allocator_type& __a) 6242: : _M_h(__umap._M_h, __a) 6242: { } 6242: 6242: 6242: 6242: 6242: 6242: 6242: unordered_map(unordered_map&& __umap, 6242: const allocator_type& __a) 6242: : _M_h(std::move(__umap._M_h), __a) 6242: { } 6242: # 226 "/usr/include/c++/8/bits/unordered_map.h" 3 6242: unordered_map(initializer_list __l, 6242: size_type __n = 0, 6242: const hasher& __hf = hasher(), 6242: const key_equal& __eql = key_equal(), 6242: const allocator_type& __a = allocator_type()) 6242: : _M_h(__l, __n, __hf, __eql, __a) 6242: { } 6242: 6242: unordered_map(size_type __n, const allocator_type& __a) 6242: : unordered_map(__n, hasher(), key_equal(), __a) 6242: { } 6242: 6242: unordered_map(size_type __n, const hasher& __hf, 6242: const allocator_type& __a) 6242: : unordered_map(__n, __hf, key_equal(), __a) 6242: { } 6242: 6242: template 6242: unordered_map(_InputIterator __first, _InputIterator __last, 6242: size_type __n, 6242: const allocator_type& __a) 6242: : unordered_map(__first, __last, __n, hasher(), key_equal(), __a) 6242: { } 6242: 6242: template 6242: unordered_map(_InputIterator __first, _InputIterator __last, 6242: size_type __n, const hasher& __hf, 6242: const allocator_type& __a) 6242: : unordered_map(__first, __last, __n, __hf, key_equal(), __a) 6242: { } 6242: 6242: unordered_map(initializer_list __l, 6242: size_type __n, 6242: const allocator_type& __a) 6242: : unordered_map(__l, __n, hasher(), key_equal(), __a) 6242: { } 6242: 6242: unordered_map(initializer_list __l, 6242: size_type __n, const hasher& __hf, 6242: const allocator_type& __a) 6242: : unordered_map(__l, __n, __hf, key_equal(), __a) 6242: { } 6242: 6242: 6242: unordered_map& 6242: operator=(const unordered_map&) = default; 6242: 6242: 6242: unordered_map& 6242: operator=(unordered_map&&) = default; 6242: # 288 "/usr/include/c++/8/bits/unordered_map.h" 3 6242: unordered_map& 6242: operator=(initializer_list __l) 6242: { 6242: _M_h = __l; 6242: return *this; 6242: } 6242: 6242: 6242: allocator_type 6242: get_allocator() const noexcept 6242: { return _M_h.get_allocator(); } 6242: 6242: 6242: 6242: 6242: bool 6242: empty() const noexcept 6242: { return _M_h.empty(); } 6242: 6242: 6242: size_type 6242: size() const noexcept 6242: { return _M_h.size(); } 6242: 6242: 6242: size_type 6242: max_size() const noexcept 6242: { return _M_h.max_size(); } 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: iterator 6242: begin() noexcept 6242: { return _M_h.begin(); } 6242: 6242: 6242: 6242: 6242: 6242: 6242: const_iterator 6242: begin() const noexcept 6242: { return _M_h.begin(); } 6242: 6242: const_iterator 6242: cbegin() const noexcept 6242: { return _M_h.begin(); } 6242: 6242: 6242: 6242: 6242: 6242: 6242: iterator 6242: end() noexcept 6242: { return _M_h.end(); } 6242: 6242: 6242: 6242: 6242: 6242: 6242: const_iterator 6242: end() const noexcept 6242: { return _M_h.end(); } 6242: 6242: const_iterator 6242: cend() const noexcept 6242: { return _M_h.end(); } 6242: # 385 "/usr/include/c++/8/bits/unordered_map.h" 3 6242: template 6242: std::pair 6242: emplace(_Args&&... __args) 6242: { return _M_h.emplace(std::forward<_Args>(__args)...); } 6242: # 416 "/usr/include/c++/8/bits/unordered_map.h" 3 6242: template 6242: iterator 6242: emplace_hint(const_iterator __pos, _Args&&... __args) 6242: { return _M_h.emplace_hint(__pos, std::forward<_Args>(__args)...); } 6242: # 578 "/usr/include/c++/8/bits/unordered_map.h" 3 6242: std::pair 6242: insert(const value_type& __x) 6242: { return _M_h.insert(__x); } 6242: 6242: 6242: 6242: std::pair 6242: insert(value_type&& __x) 6242: { return _M_h.insert(std::move(__x)); } 6242: 6242: template::value>::type> 6242: std::pair 6242: insert(_Pair&& __x) 6242: { return _M_h.insert(std::forward<_Pair>(__x)); } 6242: # 618 "/usr/include/c++/8/bits/unordered_map.h" 3 6242: iterator 6242: insert(const_iterator __hint, const value_type& __x) 6242: { return _M_h.insert(__hint, __x); } 6242: 6242: 6242: 6242: iterator 6242: insert(const_iterator __hint, value_type&& __x) 6242: { return _M_h.insert(__hint, std::move(__x)); } 6242: 6242: template::value>::type> 6242: iterator 6242: insert(const_iterator __hint, _Pair&& __x) 6242: { return _M_h.insert(__hint, std::forward<_Pair>(__x)); } 6242: # 645 "/usr/include/c++/8/bits/unordered_map.h" 3 6242: template 6242: void 6242: insert(_InputIterator __first, _InputIterator __last) 6242: { _M_h.insert(__first, __last); } 6242: # 657 "/usr/include/c++/8/bits/unordered_map.h" 3 6242: void 6242: insert(initializer_list __l) 6242: { _M_h.insert(__l); } 6242: # 794 "/usr/include/c++/8/bits/unordered_map.h" 3 6242: iterator 6242: erase(const_iterator __position) 6242: { return _M_h.erase(__position); } 6242: 6242: 6242: iterator 6242: erase(iterator __position) 6242: { return _M_h.erase(__position); } 6242: # 816 "/usr/include/c++/8/bits/unordered_map.h" 3 6242: size_type 6242: erase(const key_type& __x) 6242: { return _M_h.erase(__x); } 6242: # 834 "/usr/include/c++/8/bits/unordered_map.h" 3 6242: iterator 6242: erase(const_iterator __first, const_iterator __last) 6242: { return _M_h.erase(__first, __last); } 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: void 6242: clear() noexcept 6242: { _M_h.clear(); } 6242: # 858 "/usr/include/c++/8/bits/unordered_map.h" 3 6242: void 6242: swap(unordered_map& __x) 6242: noexcept( noexcept(_M_h.swap(__x._M_h)) ) 6242: { _M_h.swap(__x._M_h); } 6242: # 898 "/usr/include/c++/8/bits/unordered_map.h" 3 6242: hasher 6242: hash_function() const 6242: { return _M_h.hash_function(); } 6242: 6242: 6242: 6242: key_equal 6242: key_eq() const 6242: { return _M_h.key_eq(); } 6242: # 922 "/usr/include/c++/8/bits/unordered_map.h" 3 6242: iterator 6242: find(const key_type& __x) 6242: { return _M_h.find(__x); } 6242: 6242: const_iterator 6242: find(const key_type& __x) const 6242: { return _M_h.find(__x); } 6242: # 940 "/usr/include/c++/8/bits/unordered_map.h" 3 6242: size_type 6242: count(const key_type& __x) const 6242: { return _M_h.count(__x); } 6242: # 953 "/usr/include/c++/8/bits/unordered_map.h" 3 6242: std::pair 6242: equal_range(const key_type& __x) 6242: { return _M_h.equal_range(__x); } 6242: 6242: std::pair 6242: equal_range(const key_type& __x) const 6242: { return _M_h.equal_range(__x); } 6242: # 975 "/usr/include/c++/8/bits/unordered_map.h" 3 6242: mapped_type& 6242: operator[](const key_type& __k) 6242: { return _M_h[__k]; } 6242: 6242: mapped_type& 6242: operator[](key_type&& __k) 6242: { return _M_h[std::move(__k)]; } 6242: # 992 "/usr/include/c++/8/bits/unordered_map.h" 3 6242: mapped_type& 6242: at(const key_type& __k) 6242: { return _M_h.at(__k); } 6242: 6242: const mapped_type& 6242: at(const key_type& __k) const 6242: { return _M_h.at(__k); } 6242: 6242: 6242: 6242: 6242: 6242: size_type 6242: bucket_count() const noexcept 6242: { return _M_h.bucket_count(); } 6242: 6242: 6242: size_type 6242: max_bucket_count() const noexcept 6242: { return _M_h.max_bucket_count(); } 6242: 6242: 6242: 6242: 6242: 6242: 6242: size_type 6242: bucket_size(size_type __n) const 6242: { return _M_h.bucket_size(__n); } 6242: 6242: 6242: 6242: 6242: 6242: 6242: size_type 6242: bucket(const key_type& __key) const 6242: { return _M_h.bucket(__key); } 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: local_iterator 6242: begin(size_type __n) 6242: { return _M_h.begin(__n); } 6242: # 1048 "/usr/include/c++/8/bits/unordered_map.h" 3 6242: const_local_iterator 6242: begin(size_type __n) const 6242: { return _M_h.begin(__n); } 6242: 6242: const_local_iterator 6242: cbegin(size_type __n) const 6242: { return _M_h.cbegin(__n); } 6242: # 1063 "/usr/include/c++/8/bits/unordered_map.h" 3 6242: local_iterator 6242: end(size_type __n) 6242: { return _M_h.end(__n); } 6242: # 1074 "/usr/include/c++/8/bits/unordered_map.h" 3 6242: const_local_iterator 6242: end(size_type __n) const 6242: { return _M_h.end(__n); } 6242: 6242: const_local_iterator 6242: cend(size_type __n) const 6242: { return _M_h.cend(__n); } 6242: 6242: 6242: 6242: 6242: 6242: float 6242: load_factor() const noexcept 6242: { return _M_h.load_factor(); } 6242: 6242: 6242: 6242: float 6242: max_load_factor() const noexcept 6242: { return _M_h.max_load_factor(); } 6242: 6242: 6242: 6242: 6242: 6242: void 6242: max_load_factor(float __z) 6242: { _M_h.max_load_factor(__z); } 6242: # 1111 "/usr/include/c++/8/bits/unordered_map.h" 3 6242: void 6242: rehash(size_type __n) 6242: { _M_h.rehash(__n); } 6242: # 1122 "/usr/include/c++/8/bits/unordered_map.h" 3 6242: void 6242: reserve(size_type __n) 6242: { _M_h.reserve(__n); } 6242: 6242: template 6242: friend bool 6242: operator==(const unordered_map<_Key1, _Tp1, _Hash1, _Pred1, _Alloc1>&, 6242: const unordered_map<_Key1, _Tp1, _Hash1, _Pred1, _Alloc1>&); 6242: }; 6242: # 1232 "/usr/include/c++/8/bits/unordered_map.h" 3 6242: template, 6242: typename _Pred = equal_to<_Key>, 6242: typename _Alloc = allocator>> 6242: class unordered_multimap 6242: { 6242: typedef __ummap_hashtable<_Key, _Tp, _Hash, _Pred, _Alloc> _Hashtable; 6242: _Hashtable _M_h; 6242: 6242: public: 6242: 6242: 6242: 6242: typedef typename _Hashtable::key_type key_type; 6242: typedef typename _Hashtable::value_type value_type; 6242: typedef typename _Hashtable::mapped_type mapped_type; 6242: typedef typename _Hashtable::hasher hasher; 6242: typedef typename _Hashtable::key_equal key_equal; 6242: typedef typename _Hashtable::allocator_type allocator_type; 6242: 6242: 6242: 6242: 6242: typedef typename _Hashtable::pointer pointer; 6242: typedef typename _Hashtable::const_pointer const_pointer; 6242: typedef typename _Hashtable::reference reference; 6242: typedef typename _Hashtable::const_reference const_reference; 6242: typedef typename _Hashtable::iterator iterator; 6242: typedef typename _Hashtable::const_iterator const_iterator; 6242: typedef typename _Hashtable::local_iterator local_iterator; 6242: typedef typename _Hashtable::const_local_iterator const_local_iterator; 6242: typedef typename _Hashtable::size_type size_type; 6242: typedef typename _Hashtable::difference_type difference_type; 6242: # 1274 "/usr/include/c++/8/bits/unordered_map.h" 3 6242: unordered_multimap() = default; 6242: # 1283 "/usr/include/c++/8/bits/unordered_map.h" 3 6242: explicit 6242: unordered_multimap(size_type __n, 6242: const hasher& __hf = hasher(), 6242: const key_equal& __eql = key_equal(), 6242: const allocator_type& __a = allocator_type()) 6242: : _M_h(__n, __hf, __eql, __a) 6242: { } 6242: # 1304 "/usr/include/c++/8/bits/unordered_map.h" 3 6242: template 6242: unordered_multimap(_InputIterator __first, _InputIterator __last, 6242: size_type __n = 0, 6242: const hasher& __hf = hasher(), 6242: const key_equal& __eql = key_equal(), 6242: const allocator_type& __a = allocator_type()) 6242: : _M_h(__first, __last, __n, __hf, __eql, __a) 6242: { } 6242: 6242: 6242: unordered_multimap(const unordered_multimap&) = default; 6242: 6242: 6242: unordered_multimap(unordered_multimap&&) = default; 6242: 6242: 6242: 6242: 6242: 6242: explicit 6242: unordered_multimap(const allocator_type& __a) 6242: : _M_h(__a) 6242: { } 6242: 6242: 6242: 6242: 6242: 6242: 6242: unordered_multimap(const unordered_multimap& __ummap, 6242: const allocator_type& __a) 6242: : _M_h(__ummap._M_h, __a) 6242: { } 6242: 6242: 6242: 6242: 6242: 6242: 6242: unordered_multimap(unordered_multimap&& __ummap, 6242: const allocator_type& __a) 6242: : _M_h(std::move(__ummap._M_h), __a) 6242: { } 6242: # 1359 "/usr/include/c++/8/bits/unordered_map.h" 3 6242: unordered_multimap(initializer_list __l, 6242: size_type __n = 0, 6242: const hasher& __hf = hasher(), 6242: const key_equal& __eql = key_equal(), 6242: const allocator_type& __a = allocator_type()) 6242: : _M_h(__l, __n, __hf, __eql, __a) 6242: { } 6242: 6242: unordered_multimap(size_type __n, const allocator_type& __a) 6242: : unordered_multimap(__n, hasher(), key_equal(), __a) 6242: { } 6242: 6242: unordered_multimap(size_type __n, const hasher& __hf, 6242: const allocator_type& __a) 6242: : unordered_multimap(__n, __hf, key_equal(), __a) 6242: { } 6242: 6242: template 6242: unordered_multimap(_InputIterator __first, _InputIterator __last, 6242: size_type __n, 6242: const allocator_type& __a) 6242: : unordered_multimap(__first, __last, __n, hasher(), key_equal(), __a) 6242: { } 6242: 6242: template 6242: unordered_multimap(_InputIterator __first, _InputIterator __last, 6242: size_type __n, const hasher& __hf, 6242: const allocator_type& __a) 6242: : unordered_multimap(__first, __last, __n, __hf, key_equal(), __a) 6242: { } 6242: 6242: unordered_multimap(initializer_list __l, 6242: size_type __n, 6242: const allocator_type& __a) 6242: : unordered_multimap(__l, __n, hasher(), key_equal(), __a) 6242: { } 6242: 6242: unordered_multimap(initializer_list __l, 6242: size_type __n, const hasher& __hf, 6242: const allocator_type& __a) 6242: : unordered_multimap(__l, __n, __hf, key_equal(), __a) 6242: { } 6242: 6242: 6242: unordered_multimap& 6242: operator=(const unordered_multimap&) = default; 6242: 6242: 6242: unordered_multimap& 6242: operator=(unordered_multimap&&) = default; 6242: # 1421 "/usr/include/c++/8/bits/unordered_map.h" 3 6242: unordered_multimap& 6242: operator=(initializer_list __l) 6242: { 6242: _M_h = __l; 6242: return *this; 6242: } 6242: 6242: 6242: allocator_type 6242: get_allocator() const noexcept 6242: { return _M_h.get_allocator(); } 6242: 6242: 6242: 6242: 6242: bool 6242: empty() const noexcept 6242: { return _M_h.empty(); } 6242: 6242: 6242: size_type 6242: size() const noexcept 6242: { return _M_h.size(); } 6242: 6242: 6242: size_type 6242: max_size() const noexcept 6242: { return _M_h.max_size(); } 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: iterator 6242: begin() noexcept 6242: { return _M_h.begin(); } 6242: 6242: 6242: 6242: 6242: 6242: 6242: const_iterator 6242: begin() const noexcept 6242: { return _M_h.begin(); } 6242: 6242: const_iterator 6242: cbegin() const noexcept 6242: { return _M_h.begin(); } 6242: 6242: 6242: 6242: 6242: 6242: 6242: iterator 6242: end() noexcept 6242: { return _M_h.end(); } 6242: 6242: 6242: 6242: 6242: 6242: 6242: const_iterator 6242: end() const noexcept 6242: { return _M_h.end(); } 6242: 6242: const_iterator 6242: cend() const noexcept 6242: { return _M_h.end(); } 6242: # 1513 "/usr/include/c++/8/bits/unordered_map.h" 3 6242: template 6242: iterator 6242: emplace(_Args&&... __args) 6242: { return _M_h.emplace(std::forward<_Args>(__args)...); } 6242: # 1540 "/usr/include/c++/8/bits/unordered_map.h" 3 6242: template 6242: iterator 6242: emplace_hint(const_iterator __pos, _Args&&... __args) 6242: { return _M_h.emplace_hint(__pos, std::forward<_Args>(__args)...); } 6242: # 1555 "/usr/include/c++/8/bits/unordered_map.h" 3 6242: iterator 6242: insert(const value_type& __x) 6242: { return _M_h.insert(__x); } 6242: 6242: iterator 6242: insert(value_type&& __x) 6242: { return _M_h.insert(std::move(__x)); } 6242: 6242: template::value>::type> 6242: iterator 6242: insert(_Pair&& __x) 6242: { return _M_h.insert(std::forward<_Pair>(__x)); } 6242: # 1591 "/usr/include/c++/8/bits/unordered_map.h" 3 6242: iterator 6242: insert(const_iterator __hint, const value_type& __x) 6242: { return _M_h.insert(__hint, __x); } 6242: 6242: 6242: 6242: iterator 6242: insert(const_iterator __hint, value_type&& __x) 6242: { return _M_h.insert(__hint, std::move(__x)); } 6242: 6242: template::value>::type> 6242: iterator 6242: insert(const_iterator __hint, _Pair&& __x) 6242: { return _M_h.insert(__hint, std::forward<_Pair>(__x)); } 6242: # 1618 "/usr/include/c++/8/bits/unordered_map.h" 3 6242: template 6242: void 6242: insert(_InputIterator __first, _InputIterator __last) 6242: { _M_h.insert(__first, __last); } 6242: # 1631 "/usr/include/c++/8/bits/unordered_map.h" 3 6242: void 6242: insert(initializer_list __l) 6242: { _M_h.insert(__l); } 6242: # 1674 "/usr/include/c++/8/bits/unordered_map.h" 3 6242: iterator 6242: erase(const_iterator __position) 6242: { return _M_h.erase(__position); } 6242: 6242: 6242: iterator 6242: erase(iterator __position) 6242: { return _M_h.erase(__position); } 6242: # 1695 "/usr/include/c++/8/bits/unordered_map.h" 3 6242: size_type 6242: erase(const key_type& __x) 6242: { return _M_h.erase(__x); } 6242: # 1714 "/usr/include/c++/8/bits/unordered_map.h" 3 6242: iterator 6242: erase(const_iterator __first, const_iterator __last) 6242: { return _M_h.erase(__first, __last); } 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: void 6242: clear() noexcept 6242: { _M_h.clear(); } 6242: # 1738 "/usr/include/c++/8/bits/unordered_map.h" 3 6242: void 6242: swap(unordered_multimap& __x) 6242: noexcept( noexcept(_M_h.swap(__x._M_h)) ) 6242: { _M_h.swap(__x._M_h); } 6242: # 1780 "/usr/include/c++/8/bits/unordered_map.h" 3 6242: hasher 6242: hash_function() const 6242: { return _M_h.hash_function(); } 6242: 6242: 6242: 6242: key_equal 6242: key_eq() const 6242: { return _M_h.key_eq(); } 6242: # 1804 "/usr/include/c++/8/bits/unordered_map.h" 3 6242: iterator 6242: find(const key_type& __x) 6242: { return _M_h.find(__x); } 6242: 6242: const_iterator 6242: find(const key_type& __x) const 6242: { return _M_h.find(__x); } 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: size_type 6242: count(const key_type& __x) const 6242: { return _M_h.count(__x); } 6242: # 1829 "/usr/include/c++/8/bits/unordered_map.h" 3 6242: std::pair 6242: equal_range(const key_type& __x) 6242: { return _M_h.equal_range(__x); } 6242: 6242: std::pair 6242: equal_range(const key_type& __x) const 6242: { return _M_h.equal_range(__x); } 6242: 6242: 6242: 6242: 6242: 6242: size_type 6242: bucket_count() const noexcept 6242: { return _M_h.bucket_count(); } 6242: 6242: 6242: size_type 6242: max_bucket_count() const noexcept 6242: { return _M_h.max_bucket_count(); } 6242: 6242: 6242: 6242: 6242: 6242: 6242: size_type 6242: bucket_size(size_type __n) const 6242: { return _M_h.bucket_size(__n); } 6242: 6242: 6242: 6242: 6242: 6242: 6242: size_type 6242: bucket(const key_type& __key) const 6242: { return _M_h.bucket(__key); } 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: local_iterator 6242: begin(size_type __n) 6242: { return _M_h.begin(__n); } 6242: # 1885 "/usr/include/c++/8/bits/unordered_map.h" 3 6242: const_local_iterator 6242: begin(size_type __n) const 6242: { return _M_h.begin(__n); } 6242: 6242: const_local_iterator 6242: cbegin(size_type __n) const 6242: { return _M_h.cbegin(__n); } 6242: # 1900 "/usr/include/c++/8/bits/unordered_map.h" 3 6242: local_iterator 6242: end(size_type __n) 6242: { return _M_h.end(__n); } 6242: # 1911 "/usr/include/c++/8/bits/unordered_map.h" 3 6242: const_local_iterator 6242: end(size_type __n) const 6242: { return _M_h.end(__n); } 6242: 6242: const_local_iterator 6242: cend(size_type __n) const 6242: { return _M_h.cend(__n); } 6242: 6242: 6242: 6242: 6242: 6242: float 6242: load_factor() const noexcept 6242: { return _M_h.load_factor(); } 6242: 6242: 6242: 6242: float 6242: max_load_factor() const noexcept 6242: { return _M_h.max_load_factor(); } 6242: 6242: 6242: 6242: 6242: 6242: void 6242: max_load_factor(float __z) 6242: { _M_h.max_load_factor(__z); } 6242: # 1948 "/usr/include/c++/8/bits/unordered_map.h" 3 6242: void 6242: rehash(size_type __n) 6242: { _M_h.rehash(__n); } 6242: # 1959 "/usr/include/c++/8/bits/unordered_map.h" 3 6242: void 6242: reserve(size_type __n) 6242: { _M_h.reserve(__n); } 6242: 6242: template 6242: friend bool 6242: operator==(const unordered_multimap<_Key1, _Tp1, 6242: _Hash1, _Pred1, _Alloc1>&, 6242: const unordered_multimap<_Key1, _Tp1, 6242: _Hash1, _Pred1, _Alloc1>&); 6242: }; 6242: # 2048 "/usr/include/c++/8/bits/unordered_map.h" 3 6242: template 6242: inline void 6242: swap(unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>& __x, 6242: unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>& __y) 6242: noexcept(noexcept(__x.swap(__y))) 6242: { __x.swap(__y); } 6242: 6242: template 6242: inline void 6242: swap(unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>& __x, 6242: unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>& __y) 6242: noexcept(noexcept(__x.swap(__y))) 6242: { __x.swap(__y); } 6242: 6242: template 6242: inline bool 6242: operator==(const unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>& __x, 6242: const unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>& __y) 6242: { return __x._M_h._M_equal(__y._M_h); } 6242: 6242: template 6242: inline bool 6242: operator!=(const unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>& __x, 6242: const unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>& __y) 6242: { return !(__x == __y); } 6242: 6242: template 6242: inline bool 6242: operator==(const unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>& __x, 6242: const unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>& __y) 6242: { return __x._M_h._M_equal(__y._M_h); } 6242: 6242: template 6242: inline bool 6242: operator!=(const unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>& __x, 6242: const unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>& __y) 6242: { return !(__x == __y); } 6242: 6242: 6242: # 2138 "/usr/include/c++/8/bits/unordered_map.h" 3 6242: 6242: } 6242: # 48 "/usr/include/c++/8/unordered_map" 2 3 6242: # 8 "unordered_map.hh" 2 6242: # 1 "/usr/include/c++/8/unordered_set" 1 3 6242: # 32 "/usr/include/c++/8/unordered_set" 3 6242: 6242: # 33 "/usr/include/c++/8/unordered_set" 3 6242: # 47 "/usr/include/c++/8/unordered_set" 3 6242: # 1 "/usr/include/c++/8/bits/unordered_set.h" 1 3 6242: # 33 "/usr/include/c++/8/bits/unordered_set.h" 3 6242: namespace std __attribute__ ((__visibility__ ("default"))) 6242: { 6242: 6242: 6242: 6242: 6242: template 6242: using __uset_traits = __detail::_Hashtable_traits<_Cache, true, true>; 6242: 6242: template, 6242: typename _Pred = std::equal_to<_Value>, 6242: typename _Alloc = std::allocator<_Value>, 6242: typename _Tr = __uset_traits<__cache_default<_Value, _Hash>::value>> 6242: using __uset_hashtable = _Hashtable<_Value, _Value, _Alloc, 6242: __detail::_Identity, _Pred, _Hash, 6242: __detail::_Mod_range_hashing, 6242: __detail::_Default_ranged_hash, 6242: __detail::_Prime_rehash_policy, _Tr>; 6242: 6242: 6242: template 6242: using __umset_traits = __detail::_Hashtable_traits<_Cache, true, false>; 6242: 6242: template, 6242: typename _Pred = std::equal_to<_Value>, 6242: typename _Alloc = std::allocator<_Value>, 6242: typename _Tr = __umset_traits<__cache_default<_Value, _Hash>::value>> 6242: using __umset_hashtable = _Hashtable<_Value, _Value, _Alloc, 6242: __detail::_Identity, 6242: _Pred, _Hash, 6242: __detail::_Mod_range_hashing, 6242: __detail::_Default_ranged_hash, 6242: __detail::_Prime_rehash_policy, _Tr>; 6242: 6242: template 6242: class unordered_multiset; 6242: # 93 "/usr/include/c++/8/bits/unordered_set.h" 3 6242: template, 6242: typename _Pred = equal_to<_Value>, 6242: typename _Alloc = allocator<_Value>> 6242: class unordered_set 6242: { 6242: typedef __uset_hashtable<_Value, _Hash, _Pred, _Alloc> _Hashtable; 6242: _Hashtable _M_h; 6242: 6242: public: 6242: 6242: 6242: 6242: typedef typename _Hashtable::key_type key_type; 6242: typedef typename _Hashtable::value_type value_type; 6242: typedef typename _Hashtable::hasher hasher; 6242: typedef typename _Hashtable::key_equal key_equal; 6242: typedef typename _Hashtable::allocator_type allocator_type; 6242: 6242: 6242: 6242: 6242: typedef typename _Hashtable::pointer pointer; 6242: typedef typename _Hashtable::const_pointer const_pointer; 6242: typedef typename _Hashtable::reference reference; 6242: typedef typename _Hashtable::const_reference const_reference; 6242: typedef typename _Hashtable::iterator iterator; 6242: typedef typename _Hashtable::const_iterator const_iterator; 6242: typedef typename _Hashtable::local_iterator local_iterator; 6242: typedef typename _Hashtable::const_local_iterator const_local_iterator; 6242: typedef typename _Hashtable::size_type size_type; 6242: typedef typename _Hashtable::difference_type difference_type; 6242: # 135 "/usr/include/c++/8/bits/unordered_set.h" 3 6242: unordered_set() = default; 6242: # 144 "/usr/include/c++/8/bits/unordered_set.h" 3 6242: explicit 6242: unordered_set(size_type __n, 6242: const hasher& __hf = hasher(), 6242: const key_equal& __eql = key_equal(), 6242: const allocator_type& __a = allocator_type()) 6242: : _M_h(__n, __hf, __eql, __a) 6242: { } 6242: # 165 "/usr/include/c++/8/bits/unordered_set.h" 3 6242: template 6242: unordered_set(_InputIterator __first, _InputIterator __last, 6242: size_type __n = 0, 6242: const hasher& __hf = hasher(), 6242: const key_equal& __eql = key_equal(), 6242: const allocator_type& __a = allocator_type()) 6242: : _M_h(__first, __last, __n, __hf, __eql, __a) 6242: { } 6242: 6242: 6242: unordered_set(const unordered_set&) = default; 6242: 6242: 6242: unordered_set(unordered_set&&) = default; 6242: 6242: 6242: 6242: 6242: 6242: explicit 6242: unordered_set(const allocator_type& __a) 6242: : _M_h(__a) 6242: { } 6242: 6242: 6242: 6242: 6242: 6242: 6242: unordered_set(const unordered_set& __uset, 6242: const allocator_type& __a) 6242: : _M_h(__uset._M_h, __a) 6242: { } 6242: 6242: 6242: 6242: 6242: 6242: 6242: unordered_set(unordered_set&& __uset, 6242: const allocator_type& __a) 6242: : _M_h(std::move(__uset._M_h), __a) 6242: { } 6242: # 220 "/usr/include/c++/8/bits/unordered_set.h" 3 6242: unordered_set(initializer_list __l, 6242: size_type __n = 0, 6242: const hasher& __hf = hasher(), 6242: const key_equal& __eql = key_equal(), 6242: const allocator_type& __a = allocator_type()) 6242: : _M_h(__l, __n, __hf, __eql, __a) 6242: { } 6242: 6242: unordered_set(size_type __n, const allocator_type& __a) 6242: : unordered_set(__n, hasher(), key_equal(), __a) 6242: { } 6242: 6242: unordered_set(size_type __n, const hasher& __hf, 6242: const allocator_type& __a) 6242: : unordered_set(__n, __hf, key_equal(), __a) 6242: { } 6242: 6242: template 6242: unordered_set(_InputIterator __first, _InputIterator __last, 6242: size_type __n, 6242: const allocator_type& __a) 6242: : unordered_set(__first, __last, __n, hasher(), key_equal(), __a) 6242: { } 6242: 6242: template 6242: unordered_set(_InputIterator __first, _InputIterator __last, 6242: size_type __n, const hasher& __hf, 6242: const allocator_type& __a) 6242: : unordered_set(__first, __last, __n, __hf, key_equal(), __a) 6242: { } 6242: 6242: unordered_set(initializer_list __l, 6242: size_type __n, 6242: const allocator_type& __a) 6242: : unordered_set(__l, __n, hasher(), key_equal(), __a) 6242: { } 6242: 6242: unordered_set(initializer_list __l, 6242: size_type __n, const hasher& __hf, 6242: const allocator_type& __a) 6242: : unordered_set(__l, __n, __hf, key_equal(), __a) 6242: { } 6242: 6242: 6242: unordered_set& 6242: operator=(const unordered_set&) = default; 6242: 6242: 6242: unordered_set& 6242: operator=(unordered_set&&) = default; 6242: # 282 "/usr/include/c++/8/bits/unordered_set.h" 3 6242: unordered_set& 6242: operator=(initializer_list __l) 6242: { 6242: _M_h = __l; 6242: return *this; 6242: } 6242: 6242: 6242: allocator_type 6242: get_allocator() const noexcept 6242: { return _M_h.get_allocator(); } 6242: 6242: 6242: 6242: 6242: bool 6242: empty() const noexcept 6242: { return _M_h.empty(); } 6242: 6242: 6242: size_type 6242: size() const noexcept 6242: { return _M_h.size(); } 6242: 6242: 6242: size_type 6242: max_size() const noexcept 6242: { return _M_h.max_size(); } 6242: # 318 "/usr/include/c++/8/bits/unordered_set.h" 3 6242: iterator 6242: begin() noexcept 6242: { return _M_h.begin(); } 6242: 6242: const_iterator 6242: begin() const noexcept 6242: { return _M_h.begin(); } 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: iterator 6242: end() noexcept 6242: { return _M_h.end(); } 6242: 6242: const_iterator 6242: end() const noexcept 6242: { return _M_h.end(); } 6242: 6242: 6242: 6242: 6242: 6242: 6242: const_iterator 6242: cbegin() const noexcept 6242: { return _M_h.begin(); } 6242: 6242: 6242: 6242: 6242: 6242: const_iterator 6242: cend() const noexcept 6242: { return _M_h.end(); } 6242: # 374 "/usr/include/c++/8/bits/unordered_set.h" 3 6242: template 6242: std::pair 6242: emplace(_Args&&... __args) 6242: { return _M_h.emplace(std::forward<_Args>(__args)...); } 6242: # 400 "/usr/include/c++/8/bits/unordered_set.h" 3 6242: template 6242: iterator 6242: emplace_hint(const_iterator __pos, _Args&&... __args) 6242: { return _M_h.emplace_hint(__pos, std::forward<_Args>(__args)...); } 6242: # 419 "/usr/include/c++/8/bits/unordered_set.h" 3 6242: std::pair 6242: insert(const value_type& __x) 6242: { return _M_h.insert(__x); } 6242: 6242: std::pair 6242: insert(value_type&& __x) 6242: { return _M_h.insert(std::move(__x)); } 6242: # 448 "/usr/include/c++/8/bits/unordered_set.h" 3 6242: iterator 6242: insert(const_iterator __hint, const value_type& __x) 6242: { return _M_h.insert(__hint, __x); } 6242: 6242: iterator 6242: insert(const_iterator __hint, value_type&& __x) 6242: { return _M_h.insert(__hint, std::move(__x)); } 6242: # 466 "/usr/include/c++/8/bits/unordered_set.h" 3 6242: template 6242: void 6242: insert(_InputIterator __first, _InputIterator __last) 6242: { _M_h.insert(__first, __last); } 6242: # 478 "/usr/include/c++/8/bits/unordered_set.h" 3 6242: void 6242: insert(initializer_list __l) 6242: { _M_h.insert(__l); } 6242: # 521 "/usr/include/c++/8/bits/unordered_set.h" 3 6242: iterator 6242: erase(const_iterator __position) 6242: { return _M_h.erase(__position); } 6242: 6242: 6242: iterator 6242: erase(iterator __position) 6242: { return _M_h.erase(__position); } 6242: # 543 "/usr/include/c++/8/bits/unordered_set.h" 3 6242: size_type 6242: erase(const key_type& __x) 6242: { return _M_h.erase(__x); } 6242: # 561 "/usr/include/c++/8/bits/unordered_set.h" 3 6242: iterator 6242: erase(const_iterator __first, const_iterator __last) 6242: { return _M_h.erase(__first, __last); } 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: void 6242: clear() noexcept 6242: { _M_h.clear(); } 6242: # 584 "/usr/include/c++/8/bits/unordered_set.h" 3 6242: void 6242: swap(unordered_set& __x) 6242: noexcept( noexcept(_M_h.swap(__x._M_h)) ) 6242: { _M_h.swap(__x._M_h); } 6242: # 624 "/usr/include/c++/8/bits/unordered_set.h" 3 6242: hasher 6242: hash_function() const 6242: { return _M_h.hash_function(); } 6242: 6242: 6242: 6242: key_equal 6242: key_eq() const 6242: { return _M_h.key_eq(); } 6242: # 648 "/usr/include/c++/8/bits/unordered_set.h" 3 6242: iterator 6242: find(const key_type& __x) 6242: { return _M_h.find(__x); } 6242: 6242: const_iterator 6242: find(const key_type& __x) const 6242: { return _M_h.find(__x); } 6242: # 666 "/usr/include/c++/8/bits/unordered_set.h" 3 6242: size_type 6242: count(const key_type& __x) const 6242: { return _M_h.count(__x); } 6242: # 679 "/usr/include/c++/8/bits/unordered_set.h" 3 6242: std::pair 6242: equal_range(const key_type& __x) 6242: { return _M_h.equal_range(__x); } 6242: 6242: std::pair 6242: equal_range(const key_type& __x) const 6242: { return _M_h.equal_range(__x); } 6242: 6242: 6242: 6242: 6242: 6242: size_type 6242: bucket_count() const noexcept 6242: { return _M_h.bucket_count(); } 6242: 6242: 6242: size_type 6242: max_bucket_count() const noexcept 6242: { return _M_h.max_bucket_count(); } 6242: 6242: 6242: 6242: 6242: 6242: 6242: size_type 6242: bucket_size(size_type __n) const 6242: { return _M_h.bucket_size(__n); } 6242: 6242: 6242: 6242: 6242: 6242: 6242: size_type 6242: bucket(const key_type& __key) const 6242: { return _M_h.bucket(__key); } 6242: # 725 "/usr/include/c++/8/bits/unordered_set.h" 3 6242: local_iterator 6242: begin(size_type __n) 6242: { return _M_h.begin(__n); } 6242: 6242: const_local_iterator 6242: begin(size_type __n) const 6242: { return _M_h.begin(__n); } 6242: 6242: const_local_iterator 6242: cbegin(size_type __n) const 6242: { return _M_h.cbegin(__n); } 6242: # 745 "/usr/include/c++/8/bits/unordered_set.h" 3 6242: local_iterator 6242: end(size_type __n) 6242: { return _M_h.end(__n); } 6242: 6242: const_local_iterator 6242: end(size_type __n) const 6242: { return _M_h.end(__n); } 6242: 6242: const_local_iterator 6242: cend(size_type __n) const 6242: { return _M_h.cend(__n); } 6242: 6242: 6242: 6242: 6242: 6242: float 6242: load_factor() const noexcept 6242: { return _M_h.load_factor(); } 6242: 6242: 6242: 6242: float 6242: max_load_factor() const noexcept 6242: { return _M_h.max_load_factor(); } 6242: 6242: 6242: 6242: 6242: 6242: void 6242: max_load_factor(float __z) 6242: { _M_h.max_load_factor(__z); } 6242: # 786 "/usr/include/c++/8/bits/unordered_set.h" 3 6242: void 6242: rehash(size_type __n) 6242: { _M_h.rehash(__n); } 6242: # 797 "/usr/include/c++/8/bits/unordered_set.h" 3 6242: void 6242: reserve(size_type __n) 6242: { _M_h.reserve(__n); } 6242: 6242: template 6242: friend bool 6242: operator==(const unordered_set<_Value1, _Hash1, _Pred1, _Alloc1>&, 6242: const unordered_set<_Value1, _Hash1, _Pred1, _Alloc1>&); 6242: }; 6242: # 891 "/usr/include/c++/8/bits/unordered_set.h" 3 6242: template, 6242: typename _Pred = equal_to<_Value>, 6242: typename _Alloc = allocator<_Value>> 6242: class unordered_multiset 6242: { 6242: typedef __umset_hashtable<_Value, _Hash, _Pred, _Alloc> _Hashtable; 6242: _Hashtable _M_h; 6242: 6242: public: 6242: 6242: 6242: 6242: typedef typename _Hashtable::key_type key_type; 6242: typedef typename _Hashtable::value_type value_type; 6242: typedef typename _Hashtable::hasher hasher; 6242: typedef typename _Hashtable::key_equal key_equal; 6242: typedef typename _Hashtable::allocator_type allocator_type; 6242: 6242: 6242: 6242: 6242: typedef typename _Hashtable::pointer pointer; 6242: typedef typename _Hashtable::const_pointer const_pointer; 6242: typedef typename _Hashtable::reference reference; 6242: typedef typename _Hashtable::const_reference const_reference; 6242: typedef typename _Hashtable::iterator iterator; 6242: typedef typename _Hashtable::const_iterator const_iterator; 6242: typedef typename _Hashtable::local_iterator local_iterator; 6242: typedef typename _Hashtable::const_local_iterator const_local_iterator; 6242: typedef typename _Hashtable::size_type size_type; 6242: typedef typename _Hashtable::difference_type difference_type; 6242: # 932 "/usr/include/c++/8/bits/unordered_set.h" 3 6242: unordered_multiset() = default; 6242: # 941 "/usr/include/c++/8/bits/unordered_set.h" 3 6242: explicit 6242: unordered_multiset(size_type __n, 6242: const hasher& __hf = hasher(), 6242: const key_equal& __eql = key_equal(), 6242: const allocator_type& __a = allocator_type()) 6242: : _M_h(__n, __hf, __eql, __a) 6242: { } 6242: # 962 "/usr/include/c++/8/bits/unordered_set.h" 3 6242: template 6242: unordered_multiset(_InputIterator __first, _InputIterator __last, 6242: size_type __n = 0, 6242: const hasher& __hf = hasher(), 6242: const key_equal& __eql = key_equal(), 6242: const allocator_type& __a = allocator_type()) 6242: : _M_h(__first, __last, __n, __hf, __eql, __a) 6242: { } 6242: 6242: 6242: unordered_multiset(const unordered_multiset&) = default; 6242: 6242: 6242: unordered_multiset(unordered_multiset&&) = default; 6242: # 988 "/usr/include/c++/8/bits/unordered_set.h" 3 6242: unordered_multiset(initializer_list __l, 6242: size_type __n = 0, 6242: const hasher& __hf = hasher(), 6242: const key_equal& __eql = key_equal(), 6242: const allocator_type& __a = allocator_type()) 6242: : _M_h(__l, __n, __hf, __eql, __a) 6242: { } 6242: 6242: 6242: unordered_multiset& 6242: operator=(const unordered_multiset&) = default; 6242: 6242: 6242: unordered_multiset& 6242: operator=(unordered_multiset&&) = default; 6242: 6242: 6242: 6242: 6242: 6242: explicit 6242: unordered_multiset(const allocator_type& __a) 6242: : _M_h(__a) 6242: { } 6242: 6242: 6242: 6242: 6242: 6242: 6242: unordered_multiset(const unordered_multiset& __umset, 6242: const allocator_type& __a) 6242: : _M_h(__umset._M_h, __a) 6242: { } 6242: 6242: 6242: 6242: 6242: 6242: 6242: unordered_multiset(unordered_multiset&& __umset, 6242: const allocator_type& __a) 6242: : _M_h(std::move(__umset._M_h), __a) 6242: { } 6242: 6242: unordered_multiset(size_type __n, const allocator_type& __a) 6242: : unordered_multiset(__n, hasher(), key_equal(), __a) 6242: { } 6242: 6242: unordered_multiset(size_type __n, const hasher& __hf, 6242: const allocator_type& __a) 6242: : unordered_multiset(__n, __hf, key_equal(), __a) 6242: { } 6242: 6242: template 6242: unordered_multiset(_InputIterator __first, _InputIterator __last, 6242: size_type __n, 6242: const allocator_type& __a) 6242: : unordered_multiset(__first, __last, __n, hasher(), key_equal(), __a) 6242: { } 6242: 6242: template 6242: unordered_multiset(_InputIterator __first, _InputIterator __last, 6242: size_type __n, const hasher& __hf, 6242: const allocator_type& __a) 6242: : unordered_multiset(__first, __last, __n, __hf, key_equal(), __a) 6242: { } 6242: 6242: unordered_multiset(initializer_list __l, 6242: size_type __n, 6242: const allocator_type& __a) 6242: : unordered_multiset(__l, __n, hasher(), key_equal(), __a) 6242: { } 6242: 6242: unordered_multiset(initializer_list __l, 6242: size_type __n, const hasher& __hf, 6242: const allocator_type& __a) 6242: : unordered_multiset(__l, __n, __hf, key_equal(), __a) 6242: { } 6242: # 1079 "/usr/include/c++/8/bits/unordered_set.h" 3 6242: unordered_multiset& 6242: operator=(initializer_list __l) 6242: { 6242: _M_h = __l; 6242: return *this; 6242: } 6242: 6242: 6242: allocator_type 6242: get_allocator() const noexcept 6242: { return _M_h.get_allocator(); } 6242: 6242: 6242: 6242: 6242: bool 6242: empty() const noexcept 6242: { return _M_h.empty(); } 6242: 6242: 6242: size_type 6242: size() const noexcept 6242: { return _M_h.size(); } 6242: 6242: 6242: size_type 6242: max_size() const noexcept 6242: { return _M_h.max_size(); } 6242: # 1115 "/usr/include/c++/8/bits/unordered_set.h" 3 6242: iterator 6242: begin() noexcept 6242: { return _M_h.begin(); } 6242: 6242: const_iterator 6242: begin() const noexcept 6242: { return _M_h.begin(); } 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: iterator 6242: end() noexcept 6242: { return _M_h.end(); } 6242: 6242: const_iterator 6242: end() const noexcept 6242: { return _M_h.end(); } 6242: 6242: 6242: 6242: 6242: 6242: 6242: const_iterator 6242: cbegin() const noexcept 6242: { return _M_h.begin(); } 6242: 6242: 6242: 6242: 6242: 6242: const_iterator 6242: cend() const noexcept 6242: { return _M_h.end(); } 6242: # 1163 "/usr/include/c++/8/bits/unordered_set.h" 3 6242: template 6242: iterator 6242: emplace(_Args&&... __args) 6242: { return _M_h.emplace(std::forward<_Args>(__args)...); } 6242: # 1185 "/usr/include/c++/8/bits/unordered_set.h" 3 6242: template 6242: iterator 6242: emplace_hint(const_iterator __pos, _Args&&... __args) 6242: { return _M_h.emplace_hint(__pos, std::forward<_Args>(__args)...); } 6242: # 1198 "/usr/include/c++/8/bits/unordered_set.h" 3 6242: iterator 6242: insert(const value_type& __x) 6242: { return _M_h.insert(__x); } 6242: 6242: iterator 6242: insert(value_type&& __x) 6242: { return _M_h.insert(std::move(__x)); } 6242: # 1224 "/usr/include/c++/8/bits/unordered_set.h" 3 6242: iterator 6242: insert(const_iterator __hint, const value_type& __x) 6242: { return _M_h.insert(__hint, __x); } 6242: 6242: iterator 6242: insert(const_iterator __hint, value_type&& __x) 6242: { return _M_h.insert(__hint, std::move(__x)); } 6242: # 1241 "/usr/include/c++/8/bits/unordered_set.h" 3 6242: template 6242: void 6242: insert(_InputIterator __first, _InputIterator __last) 6242: { _M_h.insert(__first, __last); } 6242: # 1253 "/usr/include/c++/8/bits/unordered_set.h" 3 6242: void 6242: insert(initializer_list __l) 6242: { _M_h.insert(__l); } 6242: # 1297 "/usr/include/c++/8/bits/unordered_set.h" 3 6242: iterator 6242: erase(const_iterator __position) 6242: { return _M_h.erase(__position); } 6242: 6242: 6242: iterator 6242: erase(iterator __position) 6242: { return _M_h.erase(__position); } 6242: # 1320 "/usr/include/c++/8/bits/unordered_set.h" 3 6242: size_type 6242: erase(const key_type& __x) 6242: { return _M_h.erase(__x); } 6242: # 1340 "/usr/include/c++/8/bits/unordered_set.h" 3 6242: iterator 6242: erase(const_iterator __first, const_iterator __last) 6242: { return _M_h.erase(__first, __last); } 6242: # 1351 "/usr/include/c++/8/bits/unordered_set.h" 3 6242: void 6242: clear() noexcept 6242: { _M_h.clear(); } 6242: # 1364 "/usr/include/c++/8/bits/unordered_set.h" 3 6242: void 6242: swap(unordered_multiset& __x) 6242: noexcept( noexcept(_M_h.swap(__x._M_h)) ) 6242: { _M_h.swap(__x._M_h); } 6242: # 1406 "/usr/include/c++/8/bits/unordered_set.h" 3 6242: hasher 6242: hash_function() const 6242: { return _M_h.hash_function(); } 6242: 6242: 6242: 6242: key_equal 6242: key_eq() const 6242: { return _M_h.key_eq(); } 6242: # 1430 "/usr/include/c++/8/bits/unordered_set.h" 3 6242: iterator 6242: find(const key_type& __x) 6242: { return _M_h.find(__x); } 6242: 6242: const_iterator 6242: find(const key_type& __x) const 6242: { return _M_h.find(__x); } 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: size_type 6242: count(const key_type& __x) const 6242: { return _M_h.count(__x); } 6242: # 1455 "/usr/include/c++/8/bits/unordered_set.h" 3 6242: std::pair 6242: equal_range(const key_type& __x) 6242: { return _M_h.equal_range(__x); } 6242: 6242: std::pair 6242: equal_range(const key_type& __x) const 6242: { return _M_h.equal_range(__x); } 6242: 6242: 6242: 6242: 6242: 6242: size_type 6242: bucket_count() const noexcept 6242: { return _M_h.bucket_count(); } 6242: 6242: 6242: size_type 6242: max_bucket_count() const noexcept 6242: { return _M_h.max_bucket_count(); } 6242: 6242: 6242: 6242: 6242: 6242: 6242: size_type 6242: bucket_size(size_type __n) const 6242: { return _M_h.bucket_size(__n); } 6242: 6242: 6242: 6242: 6242: 6242: 6242: size_type 6242: bucket(const key_type& __key) const 6242: { return _M_h.bucket(__key); } 6242: # 1501 "/usr/include/c++/8/bits/unordered_set.h" 3 6242: local_iterator 6242: begin(size_type __n) 6242: { return _M_h.begin(__n); } 6242: 6242: const_local_iterator 6242: begin(size_type __n) const 6242: { return _M_h.begin(__n); } 6242: 6242: const_local_iterator 6242: cbegin(size_type __n) const 6242: { return _M_h.cbegin(__n); } 6242: # 1521 "/usr/include/c++/8/bits/unordered_set.h" 3 6242: local_iterator 6242: end(size_type __n) 6242: { return _M_h.end(__n); } 6242: 6242: const_local_iterator 6242: end(size_type __n) const 6242: { return _M_h.end(__n); } 6242: 6242: const_local_iterator 6242: cend(size_type __n) const 6242: { return _M_h.cend(__n); } 6242: 6242: 6242: 6242: 6242: 6242: float 6242: load_factor() const noexcept 6242: { return _M_h.load_factor(); } 6242: 6242: 6242: 6242: float 6242: max_load_factor() const noexcept 6242: { return _M_h.max_load_factor(); } 6242: 6242: 6242: 6242: 6242: 6242: void 6242: max_load_factor(float __z) 6242: { _M_h.max_load_factor(__z); } 6242: # 1562 "/usr/include/c++/8/bits/unordered_set.h" 3 6242: void 6242: rehash(size_type __n) 6242: { _M_h.rehash(__n); } 6242: # 1573 "/usr/include/c++/8/bits/unordered_set.h" 3 6242: void 6242: reserve(size_type __n) 6242: { _M_h.reserve(__n); } 6242: 6242: template 6242: friend bool 6242: operator==(const unordered_multiset<_Value1, _Hash1, _Pred1, _Alloc1>&, 6242: const unordered_multiset<_Value1, _Hash1, _Pred1, _Alloc1>&); 6242: }; 6242: # 1653 "/usr/include/c++/8/bits/unordered_set.h" 3 6242: template 6242: inline void 6242: swap(unordered_set<_Value, _Hash, _Pred, _Alloc>& __x, 6242: unordered_set<_Value, _Hash, _Pred, _Alloc>& __y) 6242: noexcept(noexcept(__x.swap(__y))) 6242: { __x.swap(__y); } 6242: 6242: template 6242: inline void 6242: swap(unordered_multiset<_Value, _Hash, _Pred, _Alloc>& __x, 6242: unordered_multiset<_Value, _Hash, _Pred, _Alloc>& __y) 6242: noexcept(noexcept(__x.swap(__y))) 6242: { __x.swap(__y); } 6242: 6242: template 6242: inline bool 6242: operator==(const unordered_set<_Value, _Hash, _Pred, _Alloc>& __x, 6242: const unordered_set<_Value, _Hash, _Pred, _Alloc>& __y) 6242: { return __x._M_h._M_equal(__y._M_h); } 6242: 6242: template 6242: inline bool 6242: operator!=(const unordered_set<_Value, _Hash, _Pred, _Alloc>& __x, 6242: const unordered_set<_Value, _Hash, _Pred, _Alloc>& __y) 6242: { return !(__x == __y); } 6242: 6242: template 6242: inline bool 6242: operator==(const unordered_multiset<_Value, _Hash, _Pred, _Alloc>& __x, 6242: const unordered_multiset<_Value, _Hash, _Pred, _Alloc>& __y) 6242: { return __x._M_h._M_equal(__y._M_h); } 6242: 6242: template 6242: inline bool 6242: operator!=(const unordered_multiset<_Value, _Hash, _Pred, _Alloc>& __x, 6242: const unordered_multiset<_Value, _Hash, _Pred, _Alloc>& __y) 6242: { return !(__x == __y); } 6242: 6242: 6242: # 1742 "/usr/include/c++/8/bits/unordered_set.h" 3 6242: 6242: } 6242: # 48 "/usr/include/c++/8/unordered_set" 2 3 6242: # 9 "unordered_map.hh" 2 6242: 6242: 6242: # 10 "unordered_map.hh" 6242: namespace Kakoune 6242: { 6242: 6242: template::domain()> 6242: using UnorderedMap = std::unordered_map, std::equal_to, 6242: Allocator, domain>>; 6242: 6242: template::domain()> 6242: using UnorderedSet = std::unordered_set, std::equal_to, 6242: Allocator>; 6242: 6242: } 6242: # 8 "keymap_manager.hh" 2 6242: 6242: 6242: namespace Kakoune 6242: { 6242: 6242: enum class KeymapMode : char 6242: { 6242: None, 6242: Normal, 6242: Insert, 6242: Prompt, 6242: Menu, 6242: Goto, 6242: View, 6242: User, 6242: Object, 6242: }; 6242: 6242: class KeymapManager 6242: { 6242: public: 6242: KeymapManager(KeymapManager& parent) : m_parent(&parent) {} 6242: 6242: using KeyList = Vector; 6242: void map_key(Key key, KeymapMode mode, KeyList mapping); 6242: void unmap_key(Key key, KeymapMode mode); 6242: 6242: bool is_mapped(Key key, KeymapMode mode) const; 6242: ConstArrayView get_mapping(Key key, KeymapMode mode) const; 6242: private: 6242: KeymapManager() 6242: : m_parent(nullptr) {} 6242: 6242: friend class Scope; 6242: 6242: KeymapManager* m_parent; 6242: 6242: using KeyAndMode = std::pair; 6242: using Keymap = UnorderedMap; 6242: Keymap m_mapping; 6242: }; 6242: 6242: } 6242: # 7 "scope.hh" 2 6242: # 1 "option_manager.hh" 1 6242: 6242: 6242: 6242: 6242: # 1 "containers.hh" 1 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: namespace Kakoune 6242: { 6242: 6242: template 6242: struct ContainerView { Factory factory; }; 6242: 6242: template 6242: auto operator| (Container&& container, ContainerView view) -> 6242: decltype(view.factory(std::forward(container))) 6242: { 6242: return view.factory(std::forward(container)); 6242: } 6242: 6242: template 6242: struct ReverseView 6242: { 6242: using iterator = decltype(std::declval().rbegin()); 6242: 6242: iterator begin() { return m_container.rbegin(); } 6242: iterator end() { return m_container.rend(); } 6242: 6242: Container m_container; 6242: }; 6242: 6242: template 6242: using RemoveReference = typename std::remove_reference::type; 6242: 6242: struct ReverseFactory 6242: { 6242: template 6242: ReverseView> operator()(Container&& container) const 6242: { 6242: return {std::move(container)}; 6242: } 6242: 6242: template 6242: ReverseView operator()(Container& container) const 6242: { 6242: return {container}; 6242: } 6242: }; 6242: 6242: inline ContainerView reverse() { return {}; } 6242: 6242: template 6242: using IteratorOf = decltype(std::begin(std::declval())); 6242: 6242: template 6242: using ValueOf = typename Container::value_type; 6242: 6242: template 6242: struct FilterView 6242: { 6242: using ContainerIt = IteratorOf; 6242: 6242: struct Iterator : std::iterator 6242: { 6242: Iterator(const FilterView& view, ContainerIt it, ContainerIt end) 6242: : m_it{std::move(it)}, m_end{std::move(end)}, m_view{view} 6242: { 6242: do_filter(); 6242: } 6242: 6242: auto operator*() -> decltype(*std::declval()) { return *m_it; } 6242: Iterator& operator++() { ++m_it; do_filter(); return *this; } 6242: Iterator operator++(int) { auto copy = *this; ++(*this); return copy; } 6242: 6242: friend bool operator==(const Iterator& lhs, const Iterator& rhs) 6242: { 6242: return lhs.m_it == rhs.m_it; 6242: } 6242: 6242: friend bool operator!=(const Iterator& lhs, const Iterator& rhs) 6242: { 6242: return not (lhs == rhs); 6242: } 6242: 6242: const ContainerIt& base() const { return m_it; } 6242: 6242: private: 6242: void do_filter() 6242: { 6242: while (m_it != m_end and not m_view.m_filter(*m_it)) 6242: ++m_it; 6242: } 6242: 6242: ContainerIt m_it; 6242: ContainerIt m_end; 6242: const FilterView& m_view; 6242: }; 6242: 6242: Iterator begin() const { return {*this, std::begin(m_container), std::end(m_container)}; } 6242: Iterator end() const { return {*this, std::end(m_container), std::end(m_container)}; } 6242: 6242: Container m_container; 6242: mutable Filter m_filter; 6242: }; 6242: 6242: template 6242: struct FilterFactory 6242: { 6242: template 6242: FilterView operator()(Container& container) const { return {container, std::move(m_filter)}; } 6242: 6242: template 6242: FilterView, Filter> operator()(Container&& container) const { return {std::move(container), std::move(m_filter)}; } 6242: 6242: Filter m_filter; 6242: }; 6242: 6242: template 6242: inline ContainerView> filter(Filter f) { return {{std::move(f)}}; } 6242: 6242: template 6242: using TransformedResult = decltype(std::declval()(*std::declval())); 6242: 6242: template 6242: struct TransformView 6242: { 6242: using ContainerIt = IteratorOf; 6242: 6242: struct Iterator : std::iterator>::type> 6242: { 6242: Iterator(const TransformView& view, ContainerIt it) 6242: : m_it{std::move(it)}, m_view{view} {} 6242: 6242: auto operator*() -> TransformedResult { return m_view.m_transform(*m_it); } 6242: Iterator& operator++() { ++m_it; return *this; } 6242: Iterator operator++(int) { auto copy = *this; ++m_it; return copy; } 6242: 6242: friend bool operator==(const Iterator& lhs, const Iterator& rhs) 6242: { 6242: return lhs.m_it == rhs.m_it; 6242: } 6242: 6242: friend bool operator!=(const Iterator& lhs, const Iterator& rhs) 6242: { 6242: return not (lhs == rhs); 6242: } 6242: 6242: ContainerIt base() const { return m_it; } 6242: 6242: private: 6242: ContainerIt m_it; 6242: const TransformView& m_view; 6242: }; 6242: 6242: Iterator begin() const { return {*this, std::begin(m_container)}; } 6242: Iterator end() const { return {*this, std::end(m_container)}; } 6242: 6242: Container m_container; 6242: mutable Transform m_transform; 6242: }; 6242: 6242: template 6242: struct TransformFactory 6242: { 6242: template 6242: TransformView operator()(Container& container) const { return {container, std::move(m_transform)}; } 6242: 6242: template 6242: TransformView, Transform> operator()(Container&& container) const { return {std::move(container), std::move(m_transform)}; } 6242: 6242: Transform m_transform; 6242: }; 6242: 6242: template 6242: inline ContainerView> transform(Transform t) { return {{std::move(t)}}; } 6242: 6242: template, 6242: typename ValueTypeParam = void> 6242: struct SplitView 6242: { 6242: using ContainerIt = IteratorOf; 6242: using ValueType = typename std::conditional::value, 6242: std::pair, IteratorOf>, 6242: ValueTypeParam>::type; 6242: 6242: struct Iterator : std::iterator 6242: { 6242: Iterator(ContainerIt pos, ContainerIt end, char separator) 6242: : pos(pos), sep(pos), end(end), separator(separator) 6242: { 6242: while (sep != end and *sep != separator) 6242: ++sep; 6242: } 6242: 6242: Iterator& operator++() { advance(); return *this; } 6242: Iterator operator++(int) { auto copy = *this; advance(); return copy; } 6242: 6242: bool operator==(const Iterator& other) const { return pos == other.pos; } 6242: bool operator!=(const Iterator& other) const { return pos != other.pos; } 6242: 6242: ValueType operator*() { return {pos, sep}; } 6242: 6242: private: 6242: void advance() 6242: { 6242: if (sep == end) 6242: { 6242: pos = end; 6242: return; 6242: } 6242: 6242: pos = sep+1; 6242: for (sep = pos; sep != end; ++sep) 6242: { 6242: if (*sep == separator) 6242: break; 6242: } 6242: } 6242: 6242: ContainerIt pos; 6242: ContainerIt sep; 6242: ContainerIt end; 6242: Separator separator; 6242: }; 6242: 6242: Iterator begin() const { return {std::begin(m_container), std::end(m_container), m_separator}; } 6242: Iterator end() const { return {std::end(m_container), std::end(m_container), m_separator}; } 6242: 6242: Container m_container; 6242: Separator m_separator; 6242: }; 6242: 6242: template 6242: struct SplitViewFactory 6242: { 6242: template 6242: SplitView, Separator, ValueType> 6242: operator()(Container&& container) const { return {std::move(container), std::move(separator)}; } 6242: 6242: template 6242: SplitView 6242: operator()(Container& container) const { return {container, std::move(separator)}; } 6242: 6242: Separator separator; 6242: }; 6242: 6242: template 6242: ContainerView> split(Separator separator) { return {{std::move(separator)}}; } 6242: 6242: template 6242: struct ConcatView 6242: { 6242: using ContainerIt1 = decltype(begin(std::declval())); 6242: using ContainerIt2 = decltype(begin(std::declval())); 6242: using ValueType = typename std::common_type::type; 6242: 6242: struct Iterator : std::iterator 6242: { 6242: static_assert(std::is_convertible::value, ""); 6242: static_assert(std::is_convertible::value, ""); 6242: 6242: Iterator(ContainerIt1 it1, ContainerIt1 end1, ContainerIt2 it2) 6242: : m_it1(std::move(it1)), m_end1(std::move(end1)), 6242: m_it2(std::move(it2)) {} 6242: 6242: ValueType operator*() { return is2() ? *m_it2 : *m_it1; } 6242: Iterator& operator++() { if (is2()) ++m_it2; else ++m_it1; return *this; } 6242: Iterator operator++(int) { auto copy = *this; ++*this; return copy; } 6242: 6242: friend bool operator==(const Iterator& lhs, const Iterator& rhs) 6242: { 6242: return lhs.m_it1 == rhs.m_it1 and lhs.m_end1 == rhs.m_end1 and 6242: lhs.m_it2 == rhs.m_it2; 6242: } 6242: 6242: friend bool operator!=(const Iterator& lhs, const Iterator& rhs) 6242: { 6242: return not (lhs == rhs); 6242: } 6242: 6242: private: 6242: bool is2() const { return m_it1 == m_end1; } 6242: 6242: ContainerIt1 m_it1; 6242: ContainerIt1 m_end1; 6242: ContainerIt2 m_it2; 6242: }; 6242: 6242: ConcatView(Container1& container1, Container2& container2) 6242: : m_container1(container1), m_container2(container2) {} 6242: 6242: Iterator begin() const { return {m_container1.begin(), m_container1.end(), m_container2.begin()}; } 6242: Iterator end() const { return {m_container1.end(), m_container1.end(), m_container2.end()}; } 6242: 6242: private: 6242: Container1& m_container1; 6242: Container2& m_container2; 6242: }; 6242: 6242: template 6242: ConcatView concatenated(Container1&& container1, Container2&& container2) 6242: { 6242: return {container1, container2}; 6242: } 6242: 6242: 6242: 6242: using std::begin; 6242: using std::end; 6242: 6242: template 6242: auto find(Container&& container, const T& value) -> decltype(begin(container)) 6242: { 6242: return std::find(begin(container), end(container), value); 6242: } 6242: 6242: template 6242: auto find_if(Container&& container, T op) -> decltype(begin(container)) 6242: { 6242: return std::find_if(begin(container), end(container), op); 6242: } 6242: 6242: template 6242: bool contains(Container&& container, const T& value) 6242: { 6242: return find(container, value) != end(container); 6242: } 6242: 6242: template 6242: bool contains_that(Container&& container, T op) 6242: { 6242: return find_if(container, op) != end(container); 6242: } 6242: 6242: template 6242: void unordered_erase(Container&& vec, U&& value) 6242: { 6242: auto it = find(vec, std::forward(value)); 6242: if (it != vec.end()) 6242: { 6242: using std::swap; 6242: swap(vec.back(), *it); 6242: vec.pop_back(); 6242: } 6242: } 6242: 6242: } 6242: # 6 "option_manager.hh" 2 6242: # 1 "exception.hh" 1 6242: 6242: 6242: 6242: 6242: 6242: namespace Kakoune 6242: { 6242: 6242: struct exception 6242: { 6242: virtual ~exception() {} 6242: virtual StringView what() const; 6242: }; 6242: 6242: struct runtime_error : exception 6242: { 6242: runtime_error(String what) 6242: : m_what(std::move(what)) {} 6242: 6242: StringView what() const override { return m_what; } 6242: 6242: private: 6242: String m_what; 6242: }; 6242: 6242: struct logic_error : exception 6242: { 6242: }; 6242: 6242: } 6242: # 7 "option_manager.hh" 2 6242: 6242: # 1 "option_types.hh" 1 6242: # 11 "option_types.hh" 6242: # 1 "enum.hh" 1 6242: # 9 "enum.hh" 6242: namespace Kakoune 6242: { 6242: 6242: template 6242: struct Array 6242: { 6242: constexpr size_t size() const { return N; } 6242: constexpr const T& operator[](int i) const { return m_data[i]; } 6242: constexpr const T* begin() const { return m_data; } 6242: constexpr const T* end() const { return m_data+N; } 6242: 6242: T m_data[N]; 6242: }; 6242: 6242: template struct EnumDesc { T value; StringView name; }; 6242: 6242: template 6242: EnableIfWithBitOps option_to_string(Flags flags) 6242: { 6242: constexpr auto desc = enum_desc(Flags{}); 6242: String res; 6242: for (int i = 0; i < desc.size(); ++i) 6242: { 6242: if (not (flags & desc[i].value)) 6242: continue; 6242: if (not res.empty()) 6242: res += "|"; 6242: res += desc[i].name; 6242: } 6242: return res; 6242: } 6242: 6242: template 6242: EnableIfWithoutBitOps option_to_string(Enum e) 6242: { 6242: constexpr auto desc = enum_desc(Enum{}); 6242: auto it = find_if(desc, [e](const EnumDesc& d) { return d.value == e; }); 6242: if (it != desc.end()) 6242: return it->name.str(); 6242: if (not (false)) on_assert_failed("assert failed \"" "false" "\" at " "enum.hh" ":" "48"); 6242: return {}; 6242: } 6242: 6242: template 6242: EnableIfWithBitOps option_from_string(StringView str, Flags& flags) 6242: { 6242: constexpr auto desc = enum_desc(Flags{}); 6242: flags = Flags{}; 6242: for (auto s : str | split('|')) 6242: { 6242: auto it = find_if(desc, [s](const EnumDesc& d) { return d.name == s; }); 6242: if (it == desc.end()) 6242: throw runtime_error(format("invalid flag value '{}'", s)); 6242: flags |= it->value; 6242: } 6242: } 6242: 6242: template 6242: EnableIfWithoutBitOps option_from_string(StringView str, Enum& e) 6242: { 6242: constexpr auto desc = enum_desc(Enum{}); 6242: auto it = find_if(desc, [str](const EnumDesc& d) { return d.name == str; }); 6242: if (it == desc.end()) 6242: throw runtime_error(format("invalid enum value '{}'", str)); 6242: e = it->value; 6242: } 6242: 6242: } 6242: # 12 "option_types.hh" 2 6242: 6242: 6242: 6242: 6242: namespace Kakoune 6242: { 6242: 6242: template struct option_type_name; 6242: template using void_t = void; 6242: 6242: template 6242: struct option_type_name> 6242: { 6242: static decltype(T::option_type_name) name() { return T::option_type_name; } 6242: }; 6242: 6242: template 6242: struct option_type_name::value>::type> 6242: { 6242: static String name() 6242: { 6242: constexpr StringView type = WithBitOps::value ? "flags" : "enum"; 6242: auto name = enum_desc(Enum{}); 6242: return type + "(" + join(name | transform(std::mem_fn(&EnumDesc::name)), '|') + ")"; 6242: } 6242: }; 6242: 6242: inline String option_to_string(int opt) { return to_string(opt); } 6242: inline void option_from_string(StringView str, int& opt) { opt = str_to_int(str); } 6242: inline bool option_add(int& opt, StringView str) 6242: { 6242: auto val = str_to_int(str); 6242: opt += val; 6242: return val != 0; 6242: } 6242: template<> struct option_type_name { static StringView name() { return "int"; } }; 6242: 6242: inline String option_to_string(size_t opt) { return to_string(opt); } 6242: inline void option_from_string(StringView str, size_t& opt) { opt = str_to_int(str); } 6242: 6242: inline String option_to_string(bool opt) { return opt ? "true" : "false"; } 6242: inline void option_from_string(StringView str, bool& opt) 6242: { 6242: if (str == "true" or str == "yes") 6242: opt = true; 6242: else if (str == "false" or str == "no") 6242: opt = false; 6242: else 6242: throw runtime_error("boolean values are either true, yes, false or no"); 6242: } 6242: template<> struct option_type_name { static StringView name() { return "bool"; } }; 6242: 6242: constexpr char list_separator = ':'; 6242: 6242: template 6242: String option_to_string(const Vector& opt) 6242: { 6242: String res; 6242: for (size_t i = 0; i < opt.size(); ++i) 6242: { 6242: res += escape(option_to_string(opt[i]), list_separator, '\\'); 6242: if (i != opt.size() - 1) 6242: res += list_separator; 6242: } 6242: return res; 6242: } 6242: 6242: template 6242: void option_from_string(StringView str, Vector& opt) 6242: { 6242: opt.clear(); 6242: Vector elems = split(str, list_separator, '\\'); 6242: for (auto& elem: elems) 6242: { 6242: T opt_elem; 6242: option_from_string(elem, opt_elem); 6242: opt.push_back(opt_elem); 6242: } 6242: } 6242: 6242: template 6242: bool option_add(Vector& opt, StringView str) 6242: { 6242: Vector vec; 6242: option_from_string(str, vec); 6242: std::copy(std::make_move_iterator(vec.begin()), 6242: std::make_move_iterator(vec.end()), 6242: back_inserter(opt)); 6242: return not vec.empty(); 6242: } 6242: 6242: template 6242: struct option_type_name> 6242: { 6242: static String name() { return option_type_name::name() + StringView{"-list"}; } 6242: }; 6242: 6242: template 6242: String option_to_string(const IdMap& opt) 6242: { 6242: String res; 6242: for (auto it = begin(opt); it != end(opt); ++it) 6242: { 6242: if (it != begin(opt)) 6242: res += list_separator; 6242: String elem = escape(option_to_string(it->key), '=', '\\') + "=" + 6242: escape(option_to_string(it->value), '=', '\\'); 6242: res += escape(elem, list_separator, '\\'); 6242: } 6242: return res; 6242: } 6242: 6242: template 6242: void option_from_string(StringView str, IdMap& opt) 6242: { 6242: opt.clear(); 6242: for (auto& elem : split(str, list_separator, '\\')) 6242: { 6242: Vector pair_str = split(elem, '=', '\\'); 6242: if (pair_str.size() != 2) 6242: throw runtime_error("map option expects key=value"); 6242: String key; 6242: Value value; 6242: option_from_string(pair_str[0], key); 6242: option_from_string(pair_str[1], value); 6242: opt.append({ std::move(key), std::move(value) }); 6242: } 6242: } 6242: 6242: template 6242: struct option_type_name> 6242: { 6242: static String name() { return format("str-to-{}-map", option_type_name::name()); } 6242: }; 6242: 6242: constexpr char tuple_separator = '|'; 6242: 6242: template 6242: struct TupleOptionDetail 6242: { 6242: static String to_string(const std::tuple& opt) 6242: { 6242: return TupleOptionDetail::to_string(opt) + 6242: tuple_separator + escape(option_to_string(std::get(opt)), tuple_separator, '\\'); 6242: } 6242: 6242: static void from_string(ConstArrayView elems, std::tuple& opt) 6242: { 6242: option_from_string(elems[I], std::get(opt)); 6242: TupleOptionDetail::from_string(elems, opt); 6242: } 6242: }; 6242: 6242: template 6242: struct TupleOptionDetail<0, Types...> 6242: { 6242: static String to_string(const std::tuple& opt) 6242: { 6242: return option_to_string(std::get<0>(opt)); 6242: } 6242: 6242: static void from_string(ConstArrayView elems, std::tuple& opt) 6242: { 6242: option_from_string(elems[0], std::get<0>(opt)); 6242: } 6242: }; 6242: 6242: template 6242: String option_to_string(const std::tuple& opt) 6242: { 6242: return TupleOptionDetail::to_string(opt); 6242: } 6242: 6242: template 6242: void option_from_string(StringView str, std::tuple& opt) 6242: { 6242: auto elems = split(str, tuple_separator, '\\'); 6242: if (elems.size() != sizeof...(Types)) 6242: throw runtime_error(elems.size() < sizeof...(Types) ? 6242: "not enough elements in tuple" 6242: : "to many elements in tuple"); 6242: TupleOptionDetail::from_string(elems, opt); 6242: } 6242: 6242: template 6242: inline String option_to_string(const StronglyTypedNumber& opt) 6242: { 6242: return to_string(opt); 6242: } 6242: 6242: template 6242: inline void option_from_string(StringView str, StronglyTypedNumber& opt) 6242: { 6242: opt = StronglyTypedNumber{str_to_int(str)}; 6242: } 6242: 6242: template 6242: inline bool option_add(StronglyTypedNumber& opt, 6242: StringView str) 6242: { 6242: int val = str_to_int(str); 6242: opt += val; 6242: return val != 0; 6242: } 6242: 6242: template 6242: bool option_add(T&, StringView str) 6242: { 6242: throw runtime_error("no add operation supported for this option type"); 6242: } 6242: 6242: template 6242: inline void option_from_string(StringView str, LineAndColumn& opt) 6242: { 6242: auto vals = split(str, ','); 6242: if (vals.size() != 2) 6242: throw runtime_error("expected ,"); 6242: opt.line = str_to_int(vals[0]); 6242: opt.column = str_to_int(vals[1]); 6242: } 6242: 6242: template 6242: inline String option_to_string(const LineAndColumn& opt) 6242: { 6242: return format("{},{}", opt.line, opt.column); 6242: } 6242: 6242: enum class DebugFlags 6242: { 6242: None = 0, 6242: Hooks = 1 << 0, 6242: Shell = 1 << 1, 6242: Profile = 1 << 2, 6242: Keys = 1 << 3, 6242: }; 6242: 6242: template<> 6242: struct WithBitOps : std::true_type {}; 6242: 6242: constexpr Array, 4> enum_desc(DebugFlags) 6242: { 6242: return { { 6242: { DebugFlags::Hooks, "hooks" }, 6242: { DebugFlags::Shell, "shell" }, 6242: { DebugFlags::Profile, "profile" }, 6242: { DebugFlags::Keys, "keys" } 6242: } }; 6242: } 6242: 6242: template 6242: struct PrefixedList 6242: { 6242: P prefix; 6242: Vector list; 6242: }; 6242: 6242: template 6242: inline bool operator==(const PrefixedList& lhs, const PrefixedList& rhs) 6242: { 6242: return lhs.prefix == rhs.prefix and lhs.list == rhs.list; 6242: } 6242: 6242: template 6242: inline bool operator!=(const PrefixedList& lhs, const PrefixedList& rhs) 6242: { 6242: return not (lhs == rhs); 6242: } 6242: 6242: template 6242: inline String option_to_string(const PrefixedList& opt) 6242: { 6242: return format("{}:{}", opt.prefix, option_to_string(opt.list)); 6242: } 6242: 6242: template 6242: inline void option_from_string(StringView str, PrefixedList& opt) 6242: { 6242: auto it = find(str, ':'); 6242: option_from_string(StringView{str.begin(), it}, opt.prefix); 6242: if (it != str.end()) 6242: option_from_string({it+1, str.end()}, opt.list); 6242: } 6242: 6242: template 6242: inline bool option_add(PrefixedList& opt, StringView str) 6242: { 6242: return option_add(opt.list, str); 6242: } 6242: 6242: template 6242: using TimestampedList = PrefixedList; 6242: 6242: } 6242: # 9 "option_manager.hh" 2 6242: 6242: 6242: # 1 "/usr/include/c++/8/memory" 1 3 6242: # 46 "/usr/include/c++/8/memory" 3 6242: 6242: # 47 "/usr/include/c++/8/memory" 3 6242: # 67 "/usr/include/c++/8/memory" 3 6242: # 1 "/usr/include/c++/8/bits/stl_raw_storage_iter.h" 1 3 6242: # 59 "/usr/include/c++/8/bits/stl_raw_storage_iter.h" 3 6242: 6242: # 59 "/usr/include/c++/8/bits/stl_raw_storage_iter.h" 3 6242: namespace std __attribute__ ((__visibility__ ("default"))) 6242: { 6242: 6242: 6242: 6242: 6242: 6242: 6242: template 6242: class raw_storage_iterator 6242: : public iterator 6242: { 6242: protected: 6242: _OutputIterator _M_iter; 6242: 6242: public: 6242: explicit 6242: raw_storage_iterator(_OutputIterator __x) 6242: : _M_iter(__x) {} 6242: 6242: raw_storage_iterator& 6242: operator*() { return *this; } 6242: 6242: raw_storage_iterator& 6242: operator=(const _Tp& __element) 6242: { 6242: std::_Construct(std::__addressof(*_M_iter), __element); 6242: return *this; 6242: } 6242: 6242: 6242: 6242: 6242: raw_storage_iterator& 6242: operator=(_Tp&& __element) 6242: { 6242: std::_Construct(std::__addressof(*_M_iter), std::move(__element)); 6242: return *this; 6242: } 6242: 6242: 6242: raw_storage_iterator& 6242: operator++() 6242: { 6242: ++_M_iter; 6242: return *this; 6242: } 6242: 6242: raw_storage_iterator 6242: operator++(int) 6242: { 6242: raw_storage_iterator __tmp = *this; 6242: ++_M_iter; 6242: return __tmp; 6242: } 6242: 6242: 6242: 6242: _OutputIterator base() const { return _M_iter; } 6242: }; 6242: 6242: 6242: } 6242: # 68 "/usr/include/c++/8/memory" 2 3 6242: 6242: 6242: 6242: 6242: 6242: 6242: # 1 "/usr/include/c++/8/ext/concurrence.h" 1 3 6242: # 32 "/usr/include/c++/8/ext/concurrence.h" 3 6242: 6242: # 33 "/usr/include/c++/8/ext/concurrence.h" 3 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) 6242: { 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: enum _Lock_policy { _S_single, _S_mutex, _S_atomic }; 6242: 6242: 6242: 6242: static const _Lock_policy __default_lock_policy = 6242: 6242: 6242: 6242: _S_atomic; 6242: # 67 "/usr/include/c++/8/ext/concurrence.h" 3 6242: class __concurrence_lock_error : public std::exception 6242: { 6242: public: 6242: virtual char const* 6242: what() const throw() 6242: { return "__gnu_cxx::__concurrence_lock_error"; } 6242: }; 6242: 6242: class __concurrence_unlock_error : public std::exception 6242: { 6242: public: 6242: virtual char const* 6242: what() const throw() 6242: { return "__gnu_cxx::__concurrence_unlock_error"; } 6242: }; 6242: 6242: class __concurrence_broadcast_error : public std::exception 6242: { 6242: public: 6242: virtual char const* 6242: what() const throw() 6242: { return "__gnu_cxx::__concurrence_broadcast_error"; } 6242: }; 6242: 6242: class __concurrence_wait_error : public std::exception 6242: { 6242: public: 6242: virtual char const* 6242: what() const throw() 6242: { return "__gnu_cxx::__concurrence_wait_error"; } 6242: }; 6242: 6242: 6242: inline void 6242: __throw_concurrence_lock_error() 6242: { (throw (__concurrence_lock_error())); } 6242: 6242: inline void 6242: __throw_concurrence_unlock_error() 6242: { (throw (__concurrence_unlock_error())); } 6242: 6242: 6242: inline void 6242: __throw_concurrence_broadcast_error() 6242: { (throw (__concurrence_broadcast_error())); } 6242: 6242: inline void 6242: __throw_concurrence_wait_error() 6242: { (throw (__concurrence_wait_error())); } 6242: 6242: 6242: class __mutex 6242: { 6242: private: 6242: 6242: __gthread_mutex_t _M_mutex = { { 0, 0, 0, 0, 0, 0, { 0, 0 } } }; 6242: 6242: 6242: 6242: 6242: __mutex(const __mutex&); 6242: __mutex& operator=(const __mutex&); 6242: 6242: public: 6242: __mutex() 6242: { 6242: 6242: 6242: 6242: 6242: } 6242: # 147 "/usr/include/c++/8/ext/concurrence.h" 3 6242: void lock() 6242: { 6242: 6242: if (__gthread_active_p()) 6242: { 6242: if (__gthread_mutex_lock(&_M_mutex) != 0) 6242: __throw_concurrence_lock_error(); 6242: } 6242: 6242: } 6242: 6242: void unlock() 6242: { 6242: 6242: if (__gthread_active_p()) 6242: { 6242: if (__gthread_mutex_unlock(&_M_mutex) != 0) 6242: __throw_concurrence_unlock_error(); 6242: } 6242: 6242: } 6242: 6242: __gthread_mutex_t* gthread_mutex(void) 6242: { return &_M_mutex; } 6242: }; 6242: 6242: class __recursive_mutex 6242: { 6242: private: 6242: 6242: __gthread_recursive_mutex_t _M_mutex = { { 0, 0, 0, 0, PTHREAD_MUTEX_RECURSIVE_NP, 0, { 0, 0 } } }; 6242: 6242: 6242: 6242: 6242: __recursive_mutex(const __recursive_mutex&); 6242: __recursive_mutex& operator=(const __recursive_mutex&); 6242: 6242: public: 6242: __recursive_mutex() 6242: { 6242: 6242: 6242: 6242: 6242: } 6242: # 202 "/usr/include/c++/8/ext/concurrence.h" 3 6242: void lock() 6242: { 6242: 6242: if (__gthread_active_p()) 6242: { 6242: if (__gthread_recursive_mutex_lock(&_M_mutex) != 0) 6242: __throw_concurrence_lock_error(); 6242: } 6242: 6242: } 6242: 6242: void unlock() 6242: { 6242: 6242: if (__gthread_active_p()) 6242: { 6242: if (__gthread_recursive_mutex_unlock(&_M_mutex) != 0) 6242: __throw_concurrence_unlock_error(); 6242: } 6242: 6242: } 6242: 6242: __gthread_recursive_mutex_t* gthread_recursive_mutex(void) 6242: { return &_M_mutex; } 6242: }; 6242: 6242: 6242: 6242: 6242: class __scoped_lock 6242: { 6242: public: 6242: typedef __mutex __mutex_type; 6242: 6242: private: 6242: __mutex_type& _M_device; 6242: 6242: __scoped_lock(const __scoped_lock&); 6242: __scoped_lock& operator=(const __scoped_lock&); 6242: 6242: public: 6242: explicit __scoped_lock(__mutex_type& __name) : _M_device(__name) 6242: { _M_device.lock(); } 6242: 6242: ~__scoped_lock() throw() 6242: { _M_device.unlock(); } 6242: }; 6242: 6242: 6242: class __cond 6242: { 6242: private: 6242: 6242: __gthread_cond_t _M_cond = { { {0}, {0}, {0, 0}, {0, 0}, 0, 0, {0, 0} } }; 6242: 6242: 6242: 6242: 6242: __cond(const __cond&); 6242: __cond& operator=(const __cond&); 6242: 6242: public: 6242: __cond() 6242: { 6242: 6242: 6242: 6242: 6242: } 6242: # 280 "/usr/include/c++/8/ext/concurrence.h" 3 6242: void broadcast() 6242: { 6242: 6242: if (__gthread_active_p()) 6242: { 6242: if (__gthread_cond_broadcast(&_M_cond) != 0) 6242: __throw_concurrence_broadcast_error(); 6242: } 6242: 6242: } 6242: 6242: void wait(__mutex *mutex) 6242: { 6242: 6242: { 6242: if (__gthread_cond_wait(&_M_cond, mutex->gthread_mutex()) != 0) 6242: __throw_concurrence_wait_error(); 6242: } 6242: 6242: } 6242: 6242: void wait_recursive(__recursive_mutex *mutex) 6242: { 6242: 6242: { 6242: if (__gthread_cond_wait_recursive(&_M_cond, 6242: mutex->gthread_recursive_mutex()) 6242: != 0) 6242: __throw_concurrence_wait_error(); 6242: } 6242: 6242: } 6242: }; 6242: 6242: 6242: 6242: } 6242: # 75 "/usr/include/c++/8/memory" 2 3 6242: 6242: 6242: 6242: 6242: 6242: # 1 "/usr/include/c++/8/bits/unique_ptr.h" 1 3 6242: # 81 "/usr/include/c++/8/memory" 2 3 6242: # 1 "/usr/include/c++/8/bits/shared_ptr.h" 1 3 6242: # 52 "/usr/include/c++/8/bits/shared_ptr.h" 3 6242: # 1 "/usr/include/c++/8/bits/shared_ptr_base.h" 1 3 6242: # 55 "/usr/include/c++/8/bits/shared_ptr_base.h" 3 6242: # 1 "/usr/include/c++/8/bits/allocated_ptr.h" 1 3 6242: # 40 "/usr/include/c++/8/bits/allocated_ptr.h" 3 6242: namespace std __attribute__ ((__visibility__ ("default"))) 6242: { 6242: 6242: 6242: 6242: template 6242: struct __allocated_ptr 6242: { 6242: using pointer = typename allocator_traits<_Alloc>::pointer; 6242: using value_type = typename allocator_traits<_Alloc>::value_type; 6242: 6242: 6242: __allocated_ptr(_Alloc& __a, pointer __ptr) noexcept 6242: : _M_alloc(std::__addressof(__a)), _M_ptr(__ptr) 6242: { } 6242: 6242: 6242: template>> 6242: __allocated_ptr(_Alloc& __a, _Ptr __ptr) 6242: : _M_alloc(std::__addressof(__a)), 6242: _M_ptr(pointer_traits::pointer_to(*__ptr)) 6242: { } 6242: 6242: 6242: __allocated_ptr(__allocated_ptr&& __gd) noexcept 6242: : _M_alloc(__gd._M_alloc), _M_ptr(__gd._M_ptr) 6242: { __gd._M_ptr = nullptr; } 6242: 6242: 6242: ~__allocated_ptr() 6242: { 6242: if (_M_ptr != nullptr) 6242: std::allocator_traits<_Alloc>::deallocate(*_M_alloc, _M_ptr, 1); 6242: } 6242: 6242: 6242: __allocated_ptr& 6242: operator=(std::nullptr_t) noexcept 6242: { 6242: _M_ptr = nullptr; 6242: return *this; 6242: } 6242: 6242: 6242: value_type* get() { return std::__to_address(_M_ptr); } 6242: 6242: private: 6242: _Alloc* _M_alloc; 6242: pointer _M_ptr; 6242: }; 6242: 6242: 6242: template 6242: __allocated_ptr<_Alloc> 6242: __allocate_guarded(_Alloc& __a) 6242: { 6242: return { __a, std::allocator_traits<_Alloc>::allocate(__a, 1) }; 6242: } 6242: 6242: 6242: } 6242: # 56 "/usr/include/c++/8/bits/shared_ptr_base.h" 2 3 6242: 6242: 6242: 6242: 6242: namespace std __attribute__ ((__visibility__ ("default"))) 6242: { 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: #pragma GCC diagnostic push 6242: #pragma GCC diagnostic ignored "-Wdeprecated-declarations" 6242: template class auto_ptr; 6242: #pragma GCC diagnostic pop 6242: 6242: 6242: 6242: 6242: 6242: 6242: class bad_weak_ptr : public std::exception 6242: { 6242: public: 6242: virtual char const* what() const noexcept; 6242: 6242: virtual ~bad_weak_ptr() noexcept; 6242: }; 6242: 6242: 6242: inline void 6242: __throw_bad_weak_ptr() 6242: { (throw (bad_weak_ptr())); } 6242: 6242: using __gnu_cxx::_Lock_policy; 6242: using __gnu_cxx::__default_lock_policy; 6242: using __gnu_cxx::_S_single; 6242: using __gnu_cxx::_S_mutex; 6242: using __gnu_cxx::_S_atomic; 6242: 6242: 6242: template<_Lock_policy _Lp> 6242: class _Mutex_base 6242: { 6242: protected: 6242: 6242: enum { _S_need_barriers = 0 }; 6242: }; 6242: 6242: template<> 6242: class _Mutex_base<_S_mutex> 6242: : public __gnu_cxx::__mutex 6242: { 6242: protected: 6242: 6242: 6242: 6242: enum { _S_need_barriers = 1 }; 6242: }; 6242: 6242: template<_Lock_policy _Lp = __default_lock_policy> 6242: class _Sp_counted_base 6242: : public _Mutex_base<_Lp> 6242: { 6242: public: 6242: _Sp_counted_base() noexcept 6242: : _M_use_count(1), _M_weak_count(1) { } 6242: 6242: virtual 6242: ~_Sp_counted_base() noexcept 6242: { } 6242: 6242: 6242: 6242: virtual void 6242: _M_dispose() noexcept = 0; 6242: 6242: 6242: virtual void 6242: _M_destroy() noexcept 6242: { delete this; } 6242: 6242: virtual void* 6242: _M_get_deleter(const std::type_info&) noexcept = 0; 6242: 6242: void 6242: _M_add_ref_copy() 6242: { __gnu_cxx::__atomic_add_dispatch(&_M_use_count, 1); } 6242: 6242: void 6242: _M_add_ref_lock(); 6242: 6242: bool 6242: _M_add_ref_lock_nothrow(); 6242: 6242: void 6242: _M_release() noexcept 6242: { 6242: 6242: ; 6242: if (__gnu_cxx::__exchange_and_add_dispatch(&_M_use_count, -1) == 1) 6242: { 6242: ; 6242: _M_dispose(); 6242: 6242: 6242: 6242: 6242: if (_Mutex_base<_Lp>::_S_need_barriers) 6242: { 6242: __atomic_thread_fence (4); 6242: } 6242: 6242: 6242: ; 6242: if (__gnu_cxx::__exchange_and_add_dispatch(&_M_weak_count, 6242: -1) == 1) 6242: { 6242: ; 6242: _M_destroy(); 6242: } 6242: } 6242: } 6242: 6242: void 6242: _M_weak_add_ref() noexcept 6242: { __gnu_cxx::__atomic_add_dispatch(&_M_weak_count, 1); } 6242: 6242: void 6242: _M_weak_release() noexcept 6242: { 6242: 6242: ; 6242: if (__gnu_cxx::__exchange_and_add_dispatch(&_M_weak_count, -1) == 1) 6242: { 6242: ; 6242: if (_Mutex_base<_Lp>::_S_need_barriers) 6242: { 6242: 6242: 6242: __atomic_thread_fence (4); 6242: } 6242: _M_destroy(); 6242: } 6242: } 6242: 6242: long 6242: _M_get_use_count() const noexcept 6242: { 6242: 6242: 6242: return __atomic_load_n(&_M_use_count, 0); 6242: } 6242: 6242: private: 6242: _Sp_counted_base(_Sp_counted_base const&) = delete; 6242: _Sp_counted_base& operator=(_Sp_counted_base const&) = delete; 6242: 6242: _Atomic_word _M_use_count; 6242: _Atomic_word _M_weak_count; 6242: }; 6242: 6242: template<> 6242: inline void 6242: _Sp_counted_base<_S_single>:: 6242: _M_add_ref_lock() 6242: { 6242: if (_M_use_count == 0) 6242: __throw_bad_weak_ptr(); 6242: ++_M_use_count; 6242: } 6242: 6242: template<> 6242: inline void 6242: _Sp_counted_base<_S_mutex>:: 6242: _M_add_ref_lock() 6242: { 6242: __gnu_cxx::__scoped_lock sentry(*this); 6242: if (__gnu_cxx::__exchange_and_add_dispatch(&_M_use_count, 1) == 0) 6242: { 6242: _M_use_count = 0; 6242: __throw_bad_weak_ptr(); 6242: } 6242: } 6242: 6242: template<> 6242: inline void 6242: _Sp_counted_base<_S_atomic>:: 6242: _M_add_ref_lock() 6242: { 6242: 6242: _Atomic_word __count = _M_get_use_count(); 6242: do 6242: { 6242: if (__count == 0) 6242: __throw_bad_weak_ptr(); 6242: 6242: 6242: } 6242: while (!__atomic_compare_exchange_n(&_M_use_count, &__count, __count + 1, 6242: true, 4, 6242: 0)); 6242: } 6242: 6242: template<> 6242: inline bool 6242: _Sp_counted_base<_S_single>:: 6242: _M_add_ref_lock_nothrow() 6242: { 6242: if (_M_use_count == 0) 6242: return false; 6242: ++_M_use_count; 6242: return true; 6242: } 6242: 6242: template<> 6242: inline bool 6242: _Sp_counted_base<_S_mutex>:: 6242: _M_add_ref_lock_nothrow() 6242: { 6242: __gnu_cxx::__scoped_lock sentry(*this); 6242: if (__gnu_cxx::__exchange_and_add_dispatch(&_M_use_count, 1) == 0) 6242: { 6242: _M_use_count = 0; 6242: return false; 6242: } 6242: return true; 6242: } 6242: 6242: template<> 6242: inline bool 6242: _Sp_counted_base<_S_atomic>:: 6242: _M_add_ref_lock_nothrow() 6242: { 6242: 6242: _Atomic_word __count = _M_get_use_count(); 6242: do 6242: { 6242: if (__count == 0) 6242: return false; 6242: 6242: 6242: } 6242: while (!__atomic_compare_exchange_n(&_M_use_count, &__count, __count + 1, 6242: true, 4, 6242: 0)); 6242: return true; 6242: } 6242: 6242: template<> 6242: inline void 6242: _Sp_counted_base<_S_single>::_M_add_ref_copy() 6242: { ++_M_use_count; } 6242: 6242: template<> 6242: inline void 6242: _Sp_counted_base<_S_single>::_M_release() noexcept 6242: { 6242: if (--_M_use_count == 0) 6242: { 6242: _M_dispose(); 6242: if (--_M_weak_count == 0) 6242: _M_destroy(); 6242: } 6242: } 6242: 6242: template<> 6242: inline void 6242: _Sp_counted_base<_S_single>::_M_weak_add_ref() noexcept 6242: { ++_M_weak_count; } 6242: 6242: template<> 6242: inline void 6242: _Sp_counted_base<_S_single>::_M_weak_release() noexcept 6242: { 6242: if (--_M_weak_count == 0) 6242: _M_destroy(); 6242: } 6242: 6242: template<> 6242: inline long 6242: _Sp_counted_base<_S_single>::_M_get_use_count() const noexcept 6242: { return _M_use_count; } 6242: 6242: 6242: 6242: template 6242: class __shared_ptr; 6242: 6242: template 6242: class __weak_ptr; 6242: 6242: template 6242: class __enable_shared_from_this; 6242: 6242: template 6242: class shared_ptr; 6242: 6242: template 6242: class weak_ptr; 6242: 6242: template 6242: struct owner_less; 6242: 6242: template 6242: class enable_shared_from_this; 6242: 6242: template<_Lock_policy _Lp = __default_lock_policy> 6242: class __weak_count; 6242: 6242: template<_Lock_policy _Lp = __default_lock_policy> 6242: class __shared_count; 6242: 6242: 6242: 6242: template 6242: class _Sp_counted_ptr final : public _Sp_counted_base<_Lp> 6242: { 6242: public: 6242: explicit 6242: _Sp_counted_ptr(_Ptr __p) noexcept 6242: : _M_ptr(__p) { } 6242: 6242: virtual void 6242: _M_dispose() noexcept 6242: { delete _M_ptr; } 6242: 6242: virtual void 6242: _M_destroy() noexcept 6242: { delete this; } 6242: 6242: virtual void* 6242: _M_get_deleter(const std::type_info&) noexcept 6242: { return nullptr; } 6242: 6242: _Sp_counted_ptr(const _Sp_counted_ptr&) = delete; 6242: _Sp_counted_ptr& operator=(const _Sp_counted_ptr&) = delete; 6242: 6242: private: 6242: _Ptr _M_ptr; 6242: }; 6242: 6242: template<> 6242: inline void 6242: _Sp_counted_ptr::_M_dispose() noexcept { } 6242: 6242: template<> 6242: inline void 6242: _Sp_counted_ptr::_M_dispose() noexcept { } 6242: 6242: template<> 6242: inline void 6242: _Sp_counted_ptr::_M_dispose() noexcept { } 6242: 6242: template 6242: struct _Sp_ebo_helper; 6242: 6242: 6242: template 6242: struct _Sp_ebo_helper<_Nm, _Tp, true> : private _Tp 6242: { 6242: explicit _Sp_ebo_helper(const _Tp& __tp) : _Tp(__tp) { } 6242: explicit _Sp_ebo_helper(_Tp&& __tp) : _Tp(std::move(__tp)) { } 6242: 6242: static _Tp& 6242: _S_get(_Sp_ebo_helper& __eboh) { return static_cast<_Tp&>(__eboh); } 6242: }; 6242: 6242: 6242: template 6242: struct _Sp_ebo_helper<_Nm, _Tp, false> 6242: { 6242: explicit _Sp_ebo_helper(const _Tp& __tp) : _M_tp(__tp) { } 6242: explicit _Sp_ebo_helper(_Tp&& __tp) : _M_tp(std::move(__tp)) { } 6242: 6242: static _Tp& 6242: _S_get(_Sp_ebo_helper& __eboh) 6242: { return __eboh._M_tp; } 6242: 6242: private: 6242: _Tp _M_tp; 6242: }; 6242: 6242: 6242: template 6242: class _Sp_counted_deleter final : public _Sp_counted_base<_Lp> 6242: { 6242: class _Impl : _Sp_ebo_helper<0, _Deleter>, _Sp_ebo_helper<1, _Alloc> 6242: { 6242: typedef _Sp_ebo_helper<0, _Deleter> _Del_base; 6242: typedef _Sp_ebo_helper<1, _Alloc> _Alloc_base; 6242: 6242: public: 6242: _Impl(_Ptr __p, _Deleter __d, const _Alloc& __a) noexcept 6242: : _M_ptr(__p), _Del_base(std::move(__d)), _Alloc_base(__a) 6242: { } 6242: 6242: _Deleter& _M_del() noexcept { return _Del_base::_S_get(*this); } 6242: _Alloc& _M_alloc() noexcept { return _Alloc_base::_S_get(*this); } 6242: 6242: _Ptr _M_ptr; 6242: }; 6242: 6242: public: 6242: using __allocator_type = __alloc_rebind<_Alloc, _Sp_counted_deleter>; 6242: 6242: 6242: _Sp_counted_deleter(_Ptr __p, _Deleter __d) noexcept 6242: : _M_impl(__p, std::move(__d), _Alloc()) { } 6242: 6242: 6242: _Sp_counted_deleter(_Ptr __p, _Deleter __d, const _Alloc& __a) noexcept 6242: : _M_impl(__p, std::move(__d), __a) { } 6242: 6242: ~_Sp_counted_deleter() noexcept { } 6242: 6242: virtual void 6242: _M_dispose() noexcept 6242: { _M_impl._M_del()(_M_impl._M_ptr); } 6242: 6242: virtual void 6242: _M_destroy() noexcept 6242: { 6242: __allocator_type __a(_M_impl._M_alloc()); 6242: __allocated_ptr<__allocator_type> __guard_ptr{ __a, this }; 6242: this->~_Sp_counted_deleter(); 6242: } 6242: 6242: virtual void* 6242: _M_get_deleter(const std::type_info& __ti) noexcept 6242: { 6242: 6242: 6242: 6242: return __ti == typeid(_Deleter) 6242: ? std::__addressof(_M_impl._M_del()) 6242: : nullptr; 6242: 6242: 6242: 6242: } 6242: 6242: private: 6242: _Impl _M_impl; 6242: }; 6242: 6242: 6242: 6242: struct _Sp_make_shared_tag 6242: { 6242: # 523 "/usr/include/c++/8/bits/shared_ptr_base.h" 3 6242: }; 6242: 6242: template 6242: class _Sp_counted_ptr_inplace final : public _Sp_counted_base<_Lp> 6242: { 6242: class _Impl : _Sp_ebo_helper<0, _Alloc> 6242: { 6242: typedef _Sp_ebo_helper<0, _Alloc> _A_base; 6242: 6242: public: 6242: explicit _Impl(_Alloc __a) noexcept : _A_base(__a) { } 6242: 6242: _Alloc& _M_alloc() noexcept { return _A_base::_S_get(*this); } 6242: 6242: __gnu_cxx::__aligned_buffer<_Tp> _M_storage; 6242: }; 6242: 6242: public: 6242: using __allocator_type = __alloc_rebind<_Alloc, _Sp_counted_ptr_inplace>; 6242: 6242: template 6242: _Sp_counted_ptr_inplace(_Alloc __a, _Args&&... __args) 6242: : _M_impl(__a) 6242: { 6242: 6242: 6242: allocator_traits<_Alloc>::construct(__a, _M_ptr(), 6242: std::forward<_Args>(__args)...); 6242: } 6242: 6242: ~_Sp_counted_ptr_inplace() noexcept { } 6242: 6242: virtual void 6242: _M_dispose() noexcept 6242: { 6242: allocator_traits<_Alloc>::destroy(_M_impl._M_alloc(), _M_ptr()); 6242: } 6242: 6242: 6242: virtual void 6242: _M_destroy() noexcept 6242: { 6242: __allocator_type __a(_M_impl._M_alloc()); 6242: __allocated_ptr<__allocator_type> __guard_ptr{ __a, this }; 6242: this->~_Sp_counted_ptr_inplace(); 6242: } 6242: 6242: 6242: virtual void* 6242: _M_get_deleter(const std::type_info& __ti) noexcept 6242: { 6242: 6242: if (__ti == typeid(_Sp_make_shared_tag)) 6242: 6242: 6242: 6242: return const_cast::type*>(_M_ptr()); 6242: return nullptr; 6242: } 6242: 6242: private: 6242: _Tp* _M_ptr() noexcept { return _M_impl._M_storage._M_ptr(); } 6242: 6242: _Impl _M_impl; 6242: }; 6242: 6242: 6242: struct __sp_array_delete 6242: { 6242: template 6242: void operator()(_Yp* __p) const { delete[] __p; } 6242: }; 6242: 6242: template<_Lock_policy _Lp> 6242: class __shared_count 6242: { 6242: public: 6242: constexpr __shared_count() noexcept : _M_pi(0) 6242: { } 6242: 6242: template 6242: explicit 6242: __shared_count(_Ptr __p) : _M_pi(0) 6242: { 6242: try 6242: { 6242: _M_pi = new _Sp_counted_ptr<_Ptr, _Lp>(__p); 6242: } 6242: catch(...) 6242: { 6242: delete __p; 6242: throw; 6242: } 6242: } 6242: 6242: template 6242: __shared_count(_Ptr __p, false_type) 6242: : __shared_count(__p) 6242: { } 6242: 6242: template 6242: __shared_count(_Ptr __p, true_type) 6242: : __shared_count(__p, __sp_array_delete{}, allocator()) 6242: { } 6242: 6242: template 6242: __shared_count(_Ptr __p, _Deleter __d) 6242: : __shared_count(__p, std::move(__d), allocator()) 6242: { } 6242: 6242: template 6242: __shared_count(_Ptr __p, _Deleter __d, _Alloc __a) : _M_pi(0) 6242: { 6242: typedef _Sp_counted_deleter<_Ptr, _Deleter, _Alloc, _Lp> _Sp_cd_type; 6242: try 6242: { 6242: typename _Sp_cd_type::__allocator_type __a2(__a); 6242: auto __guard = std::__allocate_guarded(__a2); 6242: _Sp_cd_type* __mem = __guard.get(); 6242: ::new (__mem) _Sp_cd_type(__p, std::move(__d), std::move(__a)); 6242: _M_pi = __mem; 6242: __guard = nullptr; 6242: } 6242: catch(...) 6242: { 6242: __d(__p); 6242: throw; 6242: } 6242: } 6242: 6242: template 6242: __shared_count(_Sp_make_shared_tag, _Tp*, const _Alloc& __a, 6242: _Args&&... __args) 6242: : _M_pi(0) 6242: { 6242: typedef _Sp_counted_ptr_inplace<_Tp, _Alloc, _Lp> _Sp_cp_type; 6242: typename _Sp_cp_type::__allocator_type __a2(__a); 6242: auto __guard = std::__allocate_guarded(__a2); 6242: _Sp_cp_type* __mem = __guard.get(); 6242: ::new (__mem) _Sp_cp_type(std::move(__a), 6242: std::forward<_Args>(__args)...); 6242: _M_pi = __mem; 6242: __guard = nullptr; 6242: } 6242: 6242: 6242: #pragma GCC diagnostic push 6242: #pragma GCC diagnostic ignored "-Wdeprecated-declarations" 6242: 6242: template 6242: explicit 6242: __shared_count(std::auto_ptr<_Tp>&& __r); 6242: #pragma GCC diagnostic pop 6242: 6242: 6242: 6242: template 6242: explicit 6242: __shared_count(std::unique_ptr<_Tp, _Del>&& __r) : _M_pi(0) 6242: { 6242: 6242: 6242: if (__r.get() == nullptr) 6242: return; 6242: 6242: using _Ptr = typename unique_ptr<_Tp, _Del>::pointer; 6242: using _Del2 = typename conditional::value, 6242: reference_wrapper::type>, 6242: _Del>::type; 6242: using _Sp_cd_type 6242: = _Sp_counted_deleter<_Ptr, _Del2, allocator, _Lp>; 6242: using _Alloc = allocator<_Sp_cd_type>; 6242: using _Alloc_traits = allocator_traits<_Alloc>; 6242: _Alloc __a; 6242: _Sp_cd_type* __mem = _Alloc_traits::allocate(__a, 1); 6242: _Alloc_traits::construct(__a, __mem, __r.release(), 6242: __r.get_deleter()); 6242: _M_pi = __mem; 6242: } 6242: 6242: 6242: explicit __shared_count(const __weak_count<_Lp>& __r); 6242: 6242: 6242: explicit __shared_count(const __weak_count<_Lp>& __r, std::nothrow_t); 6242: 6242: ~__shared_count() noexcept 6242: { 6242: if (_M_pi != nullptr) 6242: _M_pi->_M_release(); 6242: } 6242: 6242: __shared_count(const __shared_count& __r) noexcept 6242: : _M_pi(__r._M_pi) 6242: { 6242: if (_M_pi != 0) 6242: _M_pi->_M_add_ref_copy(); 6242: } 6242: 6242: __shared_count& 6242: operator=(const __shared_count& __r) noexcept 6242: { 6242: _Sp_counted_base<_Lp>* __tmp = __r._M_pi; 6242: if (__tmp != _M_pi) 6242: { 6242: if (__tmp != 0) 6242: __tmp->_M_add_ref_copy(); 6242: if (_M_pi != 0) 6242: _M_pi->_M_release(); 6242: _M_pi = __tmp; 6242: } 6242: return *this; 6242: } 6242: 6242: void 6242: _M_swap(__shared_count& __r) noexcept 6242: { 6242: _Sp_counted_base<_Lp>* __tmp = __r._M_pi; 6242: __r._M_pi = _M_pi; 6242: _M_pi = __tmp; 6242: } 6242: 6242: long 6242: _M_get_use_count() const noexcept 6242: { return _M_pi != 0 ? _M_pi->_M_get_use_count() : 0; } 6242: 6242: bool 6242: _M_unique() const noexcept 6242: { return this->_M_get_use_count() == 1; } 6242: 6242: void* 6242: _M_get_deleter(const std::type_info& __ti) const noexcept 6242: { return _M_pi ? _M_pi->_M_get_deleter(__ti) : nullptr; } 6242: 6242: bool 6242: _M_less(const __shared_count& __rhs) const noexcept 6242: { return std::less<_Sp_counted_base<_Lp>*>()(this->_M_pi, __rhs._M_pi); } 6242: 6242: bool 6242: _M_less(const __weak_count<_Lp>& __rhs) const noexcept 6242: { return std::less<_Sp_counted_base<_Lp>*>()(this->_M_pi, __rhs._M_pi); } 6242: 6242: 6242: friend inline bool 6242: operator==(const __shared_count& __a, const __shared_count& __b) noexcept 6242: { return __a._M_pi == __b._M_pi; } 6242: 6242: private: 6242: friend class __weak_count<_Lp>; 6242: 6242: _Sp_counted_base<_Lp>* _M_pi; 6242: }; 6242: 6242: 6242: template<_Lock_policy _Lp> 6242: class __weak_count 6242: { 6242: public: 6242: constexpr __weak_count() noexcept : _M_pi(nullptr) 6242: { } 6242: 6242: __weak_count(const __shared_count<_Lp>& __r) noexcept 6242: : _M_pi(__r._M_pi) 6242: { 6242: if (_M_pi != nullptr) 6242: _M_pi->_M_weak_add_ref(); 6242: } 6242: 6242: __weak_count(const __weak_count& __r) noexcept 6242: : _M_pi(__r._M_pi) 6242: { 6242: if (_M_pi != nullptr) 6242: _M_pi->_M_weak_add_ref(); 6242: } 6242: 6242: __weak_count(__weak_count&& __r) noexcept 6242: : _M_pi(__r._M_pi) 6242: { __r._M_pi = nullptr; } 6242: 6242: ~__weak_count() noexcept 6242: { 6242: if (_M_pi != nullptr) 6242: _M_pi->_M_weak_release(); 6242: } 6242: 6242: __weak_count& 6242: operator=(const __shared_count<_Lp>& __r) noexcept 6242: { 6242: _Sp_counted_base<_Lp>* __tmp = __r._M_pi; 6242: if (__tmp != nullptr) 6242: __tmp->_M_weak_add_ref(); 6242: if (_M_pi != nullptr) 6242: _M_pi->_M_weak_release(); 6242: _M_pi = __tmp; 6242: return *this; 6242: } 6242: 6242: __weak_count& 6242: operator=(const __weak_count& __r) noexcept 6242: { 6242: _Sp_counted_base<_Lp>* __tmp = __r._M_pi; 6242: if (__tmp != nullptr) 6242: __tmp->_M_weak_add_ref(); 6242: if (_M_pi != nullptr) 6242: _M_pi->_M_weak_release(); 6242: _M_pi = __tmp; 6242: return *this; 6242: } 6242: 6242: __weak_count& 6242: operator=(__weak_count&& __r) noexcept 6242: { 6242: if (_M_pi != nullptr) 6242: _M_pi->_M_weak_release(); 6242: _M_pi = __r._M_pi; 6242: __r._M_pi = nullptr; 6242: return *this; 6242: } 6242: 6242: void 6242: _M_swap(__weak_count& __r) noexcept 6242: { 6242: _Sp_counted_base<_Lp>* __tmp = __r._M_pi; 6242: __r._M_pi = _M_pi; 6242: _M_pi = __tmp; 6242: } 6242: 6242: long 6242: _M_get_use_count() const noexcept 6242: { return _M_pi != nullptr ? _M_pi->_M_get_use_count() : 0; } 6242: 6242: bool 6242: _M_less(const __weak_count& __rhs) const noexcept 6242: { return std::less<_Sp_counted_base<_Lp>*>()(this->_M_pi, __rhs._M_pi); } 6242: 6242: bool 6242: _M_less(const __shared_count<_Lp>& __rhs) const noexcept 6242: { return std::less<_Sp_counted_base<_Lp>*>()(this->_M_pi, __rhs._M_pi); } 6242: 6242: 6242: friend inline bool 6242: operator==(const __weak_count& __a, const __weak_count& __b) noexcept 6242: { return __a._M_pi == __b._M_pi; } 6242: 6242: private: 6242: friend class __shared_count<_Lp>; 6242: 6242: _Sp_counted_base<_Lp>* _M_pi; 6242: }; 6242: 6242: 6242: template<_Lock_policy _Lp> 6242: inline 6242: __shared_count<_Lp>::__shared_count(const __weak_count<_Lp>& __r) 6242: : _M_pi(__r._M_pi) 6242: { 6242: if (_M_pi != nullptr) 6242: _M_pi->_M_add_ref_lock(); 6242: else 6242: __throw_bad_weak_ptr(); 6242: } 6242: 6242: 6242: template<_Lock_policy _Lp> 6242: inline 6242: __shared_count<_Lp>:: 6242: __shared_count(const __weak_count<_Lp>& __r, std::nothrow_t) 6242: : _M_pi(__r._M_pi) 6242: { 6242: if (_M_pi != nullptr) 6242: if (!_M_pi->_M_add_ref_lock_nothrow()) 6242: _M_pi = nullptr; 6242: } 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: template 6242: struct __sp_compatible_with 6242: : false_type 6242: { }; 6242: 6242: template 6242: struct __sp_compatible_with<_Yp*, _Tp*> 6242: : is_convertible<_Yp*, _Tp*>::type 6242: { }; 6242: 6242: template 6242: struct __sp_compatible_with<_Up(*)[_Nm], _Up(*)[]> 6242: : true_type 6242: { }; 6242: 6242: template 6242: struct __sp_compatible_with<_Up(*)[_Nm], const _Up(*)[]> 6242: : true_type 6242: { }; 6242: 6242: template 6242: struct __sp_compatible_with<_Up(*)[_Nm], volatile _Up(*)[]> 6242: : true_type 6242: { }; 6242: 6242: template 6242: struct __sp_compatible_with<_Up(*)[_Nm], const volatile _Up(*)[]> 6242: : true_type 6242: { }; 6242: 6242: 6242: template 6242: struct __sp_is_constructible_arrN 6242: : false_type 6242: { }; 6242: 6242: template 6242: struct __sp_is_constructible_arrN<_Up, _Nm, _Yp, __void_t<_Yp[_Nm]>> 6242: : is_convertible<_Yp(*)[_Nm], _Up(*)[_Nm]>::type 6242: { }; 6242: 6242: 6242: template 6242: struct __sp_is_constructible_arr 6242: : false_type 6242: { }; 6242: 6242: template 6242: struct __sp_is_constructible_arr<_Up, _Yp, __void_t<_Yp[]>> 6242: : is_convertible<_Yp(*)[], _Up(*)[]>::type 6242: { }; 6242: 6242: 6242: template 6242: struct __sp_is_constructible; 6242: 6242: 6242: template 6242: struct __sp_is_constructible<_Up[_Nm], _Yp> 6242: : __sp_is_constructible_arrN<_Up, _Nm, _Yp>::type 6242: { }; 6242: 6242: 6242: template 6242: struct __sp_is_constructible<_Up[], _Yp> 6242: : __sp_is_constructible_arr<_Up, _Yp>::type 6242: { }; 6242: 6242: 6242: template 6242: struct __sp_is_constructible 6242: : is_convertible<_Yp*, _Tp*>::type 6242: { }; 6242: 6242: 6242: 6242: template::value, bool = is_void<_Tp>::value> 6242: class __shared_ptr_access 6242: { 6242: public: 6242: using element_type = _Tp; 6242: 6242: element_type& 6242: operator*() const noexcept 6242: { 6242: ; 6242: return *_M_get(); 6242: } 6242: 6242: element_type* 6242: operator->() const noexcept 6242: { 6242: ; 6242: return _M_get(); 6242: } 6242: 6242: private: 6242: element_type* 6242: _M_get() const noexcept 6242: { return static_cast*>(this)->get(); } 6242: }; 6242: 6242: 6242: template 6242: class __shared_ptr_access<_Tp, _Lp, false, true> 6242: { 6242: public: 6242: using element_type = _Tp; 6242: 6242: element_type* 6242: operator->() const noexcept 6242: { 6242: auto __ptr = static_cast*>(this)->get(); 6242: ; 6242: return __ptr; 6242: } 6242: }; 6242: 6242: 6242: template 6242: class __shared_ptr_access<_Tp, _Lp, true, false> 6242: { 6242: public: 6242: using element_type = typename remove_extent<_Tp>::type; 6242: 6242: 6242: [[__deprecated__("shared_ptr::operator* is absent from C++17")]] 6242: element_type& 6242: operator*() const noexcept 6242: { 6242: ; 6242: return *_M_get(); 6242: } 6242: 6242: [[__deprecated__("shared_ptr::operator-> is absent from C++17")]] 6242: element_type* 6242: operator->() const noexcept 6242: { 6242: ; 6242: return _M_get(); 6242: } 6242: 6242: 6242: element_type& 6242: operator[](ptrdiff_t __i) const 6242: { 6242: ; 6242: ; 6242: return _M_get()[__i]; 6242: } 6242: 6242: private: 6242: element_type* 6242: _M_get() const noexcept 6242: { return static_cast*>(this)->get(); } 6242: }; 6242: 6242: template 6242: class __shared_ptr 6242: : public __shared_ptr_access<_Tp, _Lp> 6242: { 6242: public: 6242: using element_type = typename remove_extent<_Tp>::type; 6242: 6242: private: 6242: 6242: template 6242: using _SafeConv 6242: = typename enable_if<__sp_is_constructible<_Tp, _Yp>::value>::type; 6242: 6242: 6242: template 6242: using _Compatible = typename 6242: enable_if<__sp_compatible_with<_Yp*, _Tp*>::value, _Res>::type; 6242: 6242: 6242: template 6242: using _Assignable = _Compatible<_Yp, __shared_ptr&>; 6242: 6242: 6242: template::pointer> 6242: using _UniqCompatible = typename enable_if<__and_< 6242: __sp_compatible_with<_Yp*, _Tp*>, is_convertible<_Ptr, element_type*> 6242: >::value, _Res>::type; 6242: 6242: 6242: template 6242: using _UniqAssignable = _UniqCompatible<_Yp, _Del, __shared_ptr&>; 6242: 6242: public: 6242: 6242: 6242: 6242: 6242: 6242: constexpr __shared_ptr() noexcept 6242: : _M_ptr(0), _M_refcount() 6242: { } 6242: 6242: template> 6242: explicit 6242: __shared_ptr(_Yp* __p) 6242: : _M_ptr(__p), _M_refcount(__p, typename is_array<_Tp>::type()) 6242: { 6242: static_assert( !is_void<_Yp>::value, "incomplete type" ); 6242: static_assert( sizeof(_Yp) > 0, "incomplete type" ); 6242: _M_enable_shared_from_this_with(__p); 6242: } 6242: 6242: template> 6242: __shared_ptr(_Yp* __p, _Deleter __d) 6242: : _M_ptr(__p), _M_refcount(__p, std::move(__d)) 6242: { 6242: static_assert(__is_invocable<_Deleter&, _Yp*&>::value, 6242: "deleter expression d(p) is well-formed"); 6242: _M_enable_shared_from_this_with(__p); 6242: } 6242: 6242: template> 6242: __shared_ptr(_Yp* __p, _Deleter __d, _Alloc __a) 6242: : _M_ptr(__p), _M_refcount(__p, std::move(__d), std::move(__a)) 6242: { 6242: static_assert(__is_invocable<_Deleter&, _Yp*&>::value, 6242: "deleter expression d(p) is well-formed"); 6242: _M_enable_shared_from_this_with(__p); 6242: } 6242: 6242: template 6242: __shared_ptr(nullptr_t __p, _Deleter __d) 6242: : _M_ptr(0), _M_refcount(__p, std::move(__d)) 6242: { } 6242: 6242: template 6242: __shared_ptr(nullptr_t __p, _Deleter __d, _Alloc __a) 6242: : _M_ptr(0), _M_refcount(__p, std::move(__d), std::move(__a)) 6242: { } 6242: 6242: template 6242: __shared_ptr(const __shared_ptr<_Yp, _Lp>& __r, 6242: element_type* __p) noexcept 6242: : _M_ptr(__p), _M_refcount(__r._M_refcount) 6242: { } 6242: 6242: __shared_ptr(const __shared_ptr&) noexcept = default; 6242: __shared_ptr& operator=(const __shared_ptr&) noexcept = default; 6242: ~__shared_ptr() = default; 6242: 6242: template> 6242: __shared_ptr(const __shared_ptr<_Yp, _Lp>& __r) noexcept 6242: : _M_ptr(__r._M_ptr), _M_refcount(__r._M_refcount) 6242: { } 6242: 6242: __shared_ptr(__shared_ptr&& __r) noexcept 6242: : _M_ptr(__r._M_ptr), _M_refcount() 6242: { 6242: _M_refcount._M_swap(__r._M_refcount); 6242: __r._M_ptr = 0; 6242: } 6242: 6242: template> 6242: __shared_ptr(__shared_ptr<_Yp, _Lp>&& __r) noexcept 6242: : _M_ptr(__r._M_ptr), _M_refcount() 6242: { 6242: _M_refcount._M_swap(__r._M_refcount); 6242: __r._M_ptr = 0; 6242: } 6242: 6242: template> 6242: explicit __shared_ptr(const __weak_ptr<_Yp, _Lp>& __r) 6242: : _M_refcount(__r._M_refcount) 6242: { 6242: 6242: 6242: _M_ptr = __r._M_ptr; 6242: } 6242: 6242: 6242: template> 6242: __shared_ptr(unique_ptr<_Yp, _Del>&& __r) 6242: : _M_ptr(__r.get()), _M_refcount() 6242: { 6242: auto __raw = __to_address(__r.get()); 6242: _M_refcount = __shared_count<_Lp>(std::move(__r)); 6242: _M_enable_shared_from_this_with(__raw); 6242: } 6242: 6242: 6242: protected: 6242: 6242: template>, is_array<_Tp1>, 6242: is_convertible::pointer, _Tp*> 6242: >::value, bool>::type = true> 6242: __shared_ptr(unique_ptr<_Tp1, _Del>&& __r, __sp_array_delete) 6242: : _M_ptr(__r.get()), _M_refcount() 6242: { 6242: auto __raw = __to_address(__r.get()); 6242: _M_refcount = __shared_count<_Lp>(std::move(__r)); 6242: _M_enable_shared_from_this_with(__raw); 6242: } 6242: public: 6242: 6242: 6242: 6242: #pragma GCC diagnostic push 6242: #pragma GCC diagnostic ignored "-Wdeprecated-declarations" 6242: 6242: template> 6242: __shared_ptr(auto_ptr<_Yp>&& __r); 6242: #pragma GCC diagnostic pop 6242: 6242: 6242: constexpr __shared_ptr(nullptr_t) noexcept : __shared_ptr() { } 6242: 6242: template 6242: _Assignable<_Yp> 6242: operator=(const __shared_ptr<_Yp, _Lp>& __r) noexcept 6242: { 6242: _M_ptr = __r._M_ptr; 6242: _M_refcount = __r._M_refcount; 6242: return *this; 6242: } 6242: 6242: 6242: #pragma GCC diagnostic push 6242: #pragma GCC diagnostic ignored "-Wdeprecated-declarations" 6242: template 6242: _Assignable<_Yp> 6242: operator=(auto_ptr<_Yp>&& __r) 6242: { 6242: __shared_ptr(std::move(__r)).swap(*this); 6242: return *this; 6242: } 6242: #pragma GCC diagnostic pop 6242: 6242: 6242: __shared_ptr& 6242: operator=(__shared_ptr&& __r) noexcept 6242: { 6242: __shared_ptr(std::move(__r)).swap(*this); 6242: return *this; 6242: } 6242: 6242: template 6242: _Assignable<_Yp> 6242: operator=(__shared_ptr<_Yp, _Lp>&& __r) noexcept 6242: { 6242: __shared_ptr(std::move(__r)).swap(*this); 6242: return *this; 6242: } 6242: 6242: template 6242: _UniqAssignable<_Yp, _Del> 6242: operator=(unique_ptr<_Yp, _Del>&& __r) 6242: { 6242: __shared_ptr(std::move(__r)).swap(*this); 6242: return *this; 6242: } 6242: 6242: void 6242: reset() noexcept 6242: { __shared_ptr().swap(*this); } 6242: 6242: template 6242: _SafeConv<_Yp> 6242: reset(_Yp* __p) 6242: { 6242: 6242: ; 6242: __shared_ptr(__p).swap(*this); 6242: } 6242: 6242: template 6242: _SafeConv<_Yp> 6242: reset(_Yp* __p, _Deleter __d) 6242: { __shared_ptr(__p, std::move(__d)).swap(*this); } 6242: 6242: template 6242: _SafeConv<_Yp> 6242: reset(_Yp* __p, _Deleter __d, _Alloc __a) 6242: { __shared_ptr(__p, std::move(__d), std::move(__a)).swap(*this); } 6242: 6242: element_type* 6242: get() const noexcept 6242: { return _M_ptr; } 6242: 6242: explicit operator bool() const 6242: { return _M_ptr == 0 ? false : true; } 6242: 6242: bool 6242: unique() const noexcept 6242: { return _M_refcount._M_unique(); } 6242: 6242: long 6242: use_count() const noexcept 6242: { return _M_refcount._M_get_use_count(); } 6242: 6242: void 6242: swap(__shared_ptr<_Tp, _Lp>& __other) noexcept 6242: { 6242: std::swap(_M_ptr, __other._M_ptr); 6242: _M_refcount._M_swap(__other._M_refcount); 6242: } 6242: 6242: template 6242: bool 6242: owner_before(__shared_ptr<_Tp1, _Lp> const& __rhs) const noexcept 6242: { return _M_refcount._M_less(__rhs._M_refcount); } 6242: 6242: template 6242: bool 6242: owner_before(__weak_ptr<_Tp1, _Lp> const& __rhs) const noexcept 6242: { return _M_refcount._M_less(__rhs._M_refcount); } 6242: 6242: protected: 6242: 6242: template 6242: __shared_ptr(_Sp_make_shared_tag __tag, const _Alloc& __a, 6242: _Args&&... __args) 6242: : _M_ptr(), _M_refcount(__tag, (_Tp*)0, __a, 6242: std::forward<_Args>(__args)...) 6242: { 6242: 6242: 6242: 6242: void* __p = _M_refcount._M_get_deleter(typeid(__tag)); 6242: 6242: 6242: 6242: _M_ptr = static_cast<_Tp*>(__p); 6242: _M_enable_shared_from_this_with(_M_ptr); 6242: } 6242: 6242: template 6242: friend __shared_ptr<_Tp1, _Lp1> 6242: __allocate_shared(const _Alloc& __a, _Args&&... __args); 6242: 6242: 6242: 6242: __shared_ptr(const __weak_ptr<_Tp, _Lp>& __r, std::nothrow_t) 6242: : _M_refcount(__r._M_refcount, std::nothrow) 6242: { 6242: _M_ptr = _M_refcount._M_get_use_count() ? __r._M_ptr : nullptr; 6242: } 6242: 6242: friend class __weak_ptr<_Tp, _Lp>; 6242: 6242: private: 6242: 6242: template 6242: using __esft_base_t = decltype(__enable_shared_from_this_base( 6242: std::declval&>(), 6242: std::declval<_Yp*>())); 6242: 6242: 6242: template 6242: struct __has_esft_base 6242: : false_type { }; 6242: 6242: template 6242: struct __has_esft_base<_Yp, __void_t<__esft_base_t<_Yp>>> 6242: : __not_> { }; 6242: 6242: template::type> 6242: typename enable_if<__has_esft_base<_Yp2>::value>::type 6242: _M_enable_shared_from_this_with(_Yp* __p) noexcept 6242: { 6242: if (auto __base = __enable_shared_from_this_base(_M_refcount, __p)) 6242: __base->_M_weak_assign(const_cast<_Yp2*>(__p), _M_refcount); 6242: } 6242: 6242: template::type> 6242: typename enable_if::value>::type 6242: _M_enable_shared_from_this_with(_Yp*) noexcept 6242: { } 6242: 6242: void* 6242: _M_get_deleter(const std::type_info& __ti) const noexcept 6242: { return _M_refcount._M_get_deleter(__ti); } 6242: 6242: template friend class __shared_ptr; 6242: template friend class __weak_ptr; 6242: 6242: template 6242: friend _Del* get_deleter(const __shared_ptr<_Tp1, _Lp1>&) noexcept; 6242: 6242: template 6242: friend _Del* get_deleter(const shared_ptr<_Tp1>&) noexcept; 6242: 6242: element_type* _M_ptr; 6242: __shared_count<_Lp> _M_refcount; 6242: }; 6242: 6242: 6242: 6242: template 6242: inline bool 6242: operator==(const __shared_ptr<_Tp1, _Lp>& __a, 6242: const __shared_ptr<_Tp2, _Lp>& __b) noexcept 6242: { return __a.get() == __b.get(); } 6242: 6242: template 6242: inline bool 6242: operator==(const __shared_ptr<_Tp, _Lp>& __a, nullptr_t) noexcept 6242: { return !__a; } 6242: 6242: template 6242: inline bool 6242: operator==(nullptr_t, const __shared_ptr<_Tp, _Lp>& __a) noexcept 6242: { return !__a; } 6242: 6242: template 6242: inline bool 6242: operator!=(const __shared_ptr<_Tp1, _Lp>& __a, 6242: const __shared_ptr<_Tp2, _Lp>& __b) noexcept 6242: { return __a.get() != __b.get(); } 6242: 6242: template 6242: inline bool 6242: operator!=(const __shared_ptr<_Tp, _Lp>& __a, nullptr_t) noexcept 6242: { return (bool)__a; } 6242: 6242: template 6242: inline bool 6242: operator!=(nullptr_t, const __shared_ptr<_Tp, _Lp>& __a) noexcept 6242: { return (bool)__a; } 6242: 6242: template 6242: inline bool 6242: operator<(const __shared_ptr<_Tp, _Lp>& __a, 6242: const __shared_ptr<_Up, _Lp>& __b) noexcept 6242: { 6242: using _Tp_elt = typename __shared_ptr<_Tp, _Lp>::element_type; 6242: using _Up_elt = typename __shared_ptr<_Up, _Lp>::element_type; 6242: using _Vp = typename common_type<_Tp_elt*, _Up_elt*>::type; 6242: return less<_Vp>()(__a.get(), __b.get()); 6242: } 6242: 6242: template 6242: inline bool 6242: operator<(const __shared_ptr<_Tp, _Lp>& __a, nullptr_t) noexcept 6242: { 6242: using _Tp_elt = typename __shared_ptr<_Tp, _Lp>::element_type; 6242: return less<_Tp_elt*>()(__a.get(), nullptr); 6242: } 6242: 6242: template 6242: inline bool 6242: operator<(nullptr_t, const __shared_ptr<_Tp, _Lp>& __a) noexcept 6242: { 6242: using _Tp_elt = typename __shared_ptr<_Tp, _Lp>::element_type; 6242: return less<_Tp_elt*>()(nullptr, __a.get()); 6242: } 6242: 6242: template 6242: inline bool 6242: operator<=(const __shared_ptr<_Tp1, _Lp>& __a, 6242: const __shared_ptr<_Tp2, _Lp>& __b) noexcept 6242: { return !(__b < __a); } 6242: 6242: template 6242: inline bool 6242: operator<=(const __shared_ptr<_Tp, _Lp>& __a, nullptr_t) noexcept 6242: { return !(nullptr < __a); } 6242: 6242: template 6242: inline bool 6242: operator<=(nullptr_t, const __shared_ptr<_Tp, _Lp>& __a) noexcept 6242: { return !(__a < nullptr); } 6242: 6242: template 6242: inline bool 6242: operator>(const __shared_ptr<_Tp1, _Lp>& __a, 6242: const __shared_ptr<_Tp2, _Lp>& __b) noexcept 6242: { return (__b < __a); } 6242: 6242: template 6242: inline bool 6242: operator>(const __shared_ptr<_Tp, _Lp>& __a, nullptr_t) noexcept 6242: { return nullptr < __a; } 6242: 6242: template 6242: inline bool 6242: operator>(nullptr_t, const __shared_ptr<_Tp, _Lp>& __a) noexcept 6242: { return __a < nullptr; } 6242: 6242: template 6242: inline bool 6242: operator>=(const __shared_ptr<_Tp1, _Lp>& __a, 6242: const __shared_ptr<_Tp2, _Lp>& __b) noexcept 6242: { return !(__a < __b); } 6242: 6242: template 6242: inline bool 6242: operator>=(const __shared_ptr<_Tp, _Lp>& __a, nullptr_t) noexcept 6242: { return !(__a < nullptr); } 6242: 6242: template 6242: inline bool 6242: operator>=(nullptr_t, const __shared_ptr<_Tp, _Lp>& __a) noexcept 6242: { return !(nullptr < __a); } 6242: 6242: template 6242: struct _Sp_less : public binary_function<_Sp, _Sp, bool> 6242: { 6242: bool 6242: operator()(const _Sp& __lhs, const _Sp& __rhs) const noexcept 6242: { 6242: typedef typename _Sp::element_type element_type; 6242: return std::less()(__lhs.get(), __rhs.get()); 6242: } 6242: }; 6242: 6242: template 6242: struct less<__shared_ptr<_Tp, _Lp>> 6242: : public _Sp_less<__shared_ptr<_Tp, _Lp>> 6242: { }; 6242: 6242: 6242: template 6242: inline void 6242: swap(__shared_ptr<_Tp, _Lp>& __a, __shared_ptr<_Tp, _Lp>& __b) noexcept 6242: { __a.swap(__b); } 6242: # 1540 "/usr/include/c++/8/bits/shared_ptr_base.h" 3 6242: template 6242: inline __shared_ptr<_Tp, _Lp> 6242: static_pointer_cast(const __shared_ptr<_Tp1, _Lp>& __r) noexcept 6242: { 6242: using _Sp = __shared_ptr<_Tp, _Lp>; 6242: return _Sp(__r, static_cast(__r.get())); 6242: } 6242: 6242: 6242: 6242: 6242: 6242: 6242: template 6242: inline __shared_ptr<_Tp, _Lp> 6242: const_pointer_cast(const __shared_ptr<_Tp1, _Lp>& __r) noexcept 6242: { 6242: using _Sp = __shared_ptr<_Tp, _Lp>; 6242: return _Sp(__r, const_cast(__r.get())); 6242: } 6242: 6242: 6242: 6242: 6242: 6242: 6242: template 6242: inline __shared_ptr<_Tp, _Lp> 6242: dynamic_pointer_cast(const __shared_ptr<_Tp1, _Lp>& __r) noexcept 6242: { 6242: using _Sp = __shared_ptr<_Tp, _Lp>; 6242: if (auto* __p = dynamic_cast(__r.get())) 6242: return _Sp(__r, __p); 6242: return _Sp(); 6242: } 6242: # 1586 "/usr/include/c++/8/bits/shared_ptr_base.h" 3 6242: template 6242: class __weak_ptr 6242: { 6242: template 6242: using _Compatible = typename 6242: enable_if<__sp_compatible_with<_Yp*, _Tp*>::value, _Res>::type; 6242: 6242: 6242: template 6242: using _Assignable = _Compatible<_Yp, __weak_ptr&>; 6242: 6242: public: 6242: using element_type = typename remove_extent<_Tp>::type; 6242: 6242: constexpr __weak_ptr() noexcept 6242: : _M_ptr(nullptr), _M_refcount() 6242: { } 6242: 6242: __weak_ptr(const __weak_ptr&) noexcept = default; 6242: 6242: ~__weak_ptr() = default; 6242: # 1622 "/usr/include/c++/8/bits/shared_ptr_base.h" 3 6242: template> 6242: __weak_ptr(const __weak_ptr<_Yp, _Lp>& __r) noexcept 6242: : _M_refcount(__r._M_refcount) 6242: { _M_ptr = __r.lock().get(); } 6242: 6242: template> 6242: __weak_ptr(const __shared_ptr<_Yp, _Lp>& __r) noexcept 6242: : _M_ptr(__r._M_ptr), _M_refcount(__r._M_refcount) 6242: { } 6242: 6242: __weak_ptr(__weak_ptr&& __r) noexcept 6242: : _M_ptr(__r._M_ptr), _M_refcount(std::move(__r._M_refcount)) 6242: { __r._M_ptr = nullptr; } 6242: 6242: template> 6242: __weak_ptr(__weak_ptr<_Yp, _Lp>&& __r) noexcept 6242: : _M_ptr(__r.lock().get()), _M_refcount(std::move(__r._M_refcount)) 6242: { __r._M_ptr = nullptr; } 6242: 6242: __weak_ptr& 6242: operator=(const __weak_ptr& __r) noexcept = default; 6242: 6242: template 6242: _Assignable<_Yp> 6242: operator=(const __weak_ptr<_Yp, _Lp>& __r) noexcept 6242: { 6242: _M_ptr = __r.lock().get(); 6242: _M_refcount = __r._M_refcount; 6242: return *this; 6242: } 6242: 6242: template 6242: _Assignable<_Yp> 6242: operator=(const __shared_ptr<_Yp, _Lp>& __r) noexcept 6242: { 6242: _M_ptr = __r._M_ptr; 6242: _M_refcount = __r._M_refcount; 6242: return *this; 6242: } 6242: 6242: __weak_ptr& 6242: operator=(__weak_ptr&& __r) noexcept 6242: { 6242: _M_ptr = __r._M_ptr; 6242: _M_refcount = std::move(__r._M_refcount); 6242: __r._M_ptr = nullptr; 6242: return *this; 6242: } 6242: 6242: template 6242: _Assignable<_Yp> 6242: operator=(__weak_ptr<_Yp, _Lp>&& __r) noexcept 6242: { 6242: _M_ptr = __r.lock().get(); 6242: _M_refcount = std::move(__r._M_refcount); 6242: __r._M_ptr = nullptr; 6242: return *this; 6242: } 6242: 6242: __shared_ptr<_Tp, _Lp> 6242: lock() const noexcept 6242: { return __shared_ptr(*this, std::nothrow); } 6242: 6242: long 6242: use_count() const noexcept 6242: { return _M_refcount._M_get_use_count(); } 6242: 6242: bool 6242: expired() const noexcept 6242: { return _M_refcount._M_get_use_count() == 0; } 6242: 6242: template 6242: bool 6242: owner_before(const __shared_ptr<_Tp1, _Lp>& __rhs) const noexcept 6242: { return _M_refcount._M_less(__rhs._M_refcount); } 6242: 6242: template 6242: bool 6242: owner_before(const __weak_ptr<_Tp1, _Lp>& __rhs) const noexcept 6242: { return _M_refcount._M_less(__rhs._M_refcount); } 6242: 6242: void 6242: reset() noexcept 6242: { __weak_ptr().swap(*this); } 6242: 6242: void 6242: swap(__weak_ptr& __s) noexcept 6242: { 6242: std::swap(_M_ptr, __s._M_ptr); 6242: _M_refcount._M_swap(__s._M_refcount); 6242: } 6242: 6242: private: 6242: 6242: void 6242: _M_assign(_Tp* __ptr, const __shared_count<_Lp>& __refcount) noexcept 6242: { 6242: if (use_count() == 0) 6242: { 6242: _M_ptr = __ptr; 6242: _M_refcount = __refcount; 6242: } 6242: } 6242: 6242: template friend class __shared_ptr; 6242: template friend class __weak_ptr; 6242: friend class __enable_shared_from_this<_Tp, _Lp>; 6242: friend class enable_shared_from_this<_Tp>; 6242: 6242: element_type* _M_ptr; 6242: __weak_count<_Lp> _M_refcount; 6242: }; 6242: 6242: 6242: template 6242: inline void 6242: swap(__weak_ptr<_Tp, _Lp>& __a, __weak_ptr<_Tp, _Lp>& __b) noexcept 6242: { __a.swap(__b); } 6242: 6242: template 6242: struct _Sp_owner_less : public binary_function<_Tp, _Tp, bool> 6242: { 6242: bool 6242: operator()(const _Tp& __lhs, const _Tp& __rhs) const noexcept 6242: { return __lhs.owner_before(__rhs); } 6242: 6242: bool 6242: operator()(const _Tp& __lhs, const _Tp1& __rhs) const noexcept 6242: { return __lhs.owner_before(__rhs); } 6242: 6242: bool 6242: operator()(const _Tp1& __lhs, const _Tp& __rhs) const noexcept 6242: { return __lhs.owner_before(__rhs); } 6242: }; 6242: 6242: template<> 6242: struct _Sp_owner_less 6242: { 6242: template 6242: auto 6242: operator()(const _Tp& __lhs, const _Up& __rhs) const noexcept 6242: -> decltype(__lhs.owner_before(__rhs)) 6242: { return __lhs.owner_before(__rhs); } 6242: 6242: using is_transparent = void; 6242: }; 6242: 6242: template 6242: struct owner_less<__shared_ptr<_Tp, _Lp>> 6242: : public _Sp_owner_less<__shared_ptr<_Tp, _Lp>, __weak_ptr<_Tp, _Lp>> 6242: { }; 6242: 6242: template 6242: struct owner_less<__weak_ptr<_Tp, _Lp>> 6242: : public _Sp_owner_less<__weak_ptr<_Tp, _Lp>, __shared_ptr<_Tp, _Lp>> 6242: { }; 6242: 6242: 6242: template 6242: class __enable_shared_from_this 6242: { 6242: protected: 6242: constexpr __enable_shared_from_this() noexcept { } 6242: 6242: __enable_shared_from_this(const __enable_shared_from_this&) noexcept { } 6242: 6242: __enable_shared_from_this& 6242: operator=(const __enable_shared_from_this&) noexcept 6242: { return *this; } 6242: 6242: ~__enable_shared_from_this() { } 6242: 6242: public: 6242: __shared_ptr<_Tp, _Lp> 6242: shared_from_this() 6242: { return __shared_ptr<_Tp, _Lp>(this->_M_weak_this); } 6242: 6242: __shared_ptr 6242: shared_from_this() const 6242: { return __shared_ptr(this->_M_weak_this); } 6242: 6242: 6242: __weak_ptr<_Tp, _Lp> 6242: weak_from_this() noexcept 6242: { return this->_M_weak_this; } 6242: 6242: __weak_ptr 6242: weak_from_this() const noexcept 6242: { return this->_M_weak_this; } 6242: 6242: 6242: private: 6242: template 6242: void 6242: _M_weak_assign(_Tp1* __p, const __shared_count<_Lp>& __n) const noexcept 6242: { _M_weak_this._M_assign(__p, __n); } 6242: 6242: friend const __enable_shared_from_this* 6242: __enable_shared_from_this_base(const __shared_count<_Lp>&, 6242: const __enable_shared_from_this* __p) 6242: { return __p; } 6242: 6242: template 6242: friend class __shared_ptr; 6242: 6242: mutable __weak_ptr<_Tp, _Lp> _M_weak_this; 6242: }; 6242: 6242: template 6242: inline __shared_ptr<_Tp, _Lp> 6242: __allocate_shared(const _Alloc& __a, _Args&&... __args) 6242: { 6242: return __shared_ptr<_Tp, _Lp>(_Sp_make_shared_tag(), __a, 6242: std::forward<_Args>(__args)...); 6242: } 6242: 6242: template 6242: inline __shared_ptr<_Tp, _Lp> 6242: __make_shared(_Args&&... __args) 6242: { 6242: typedef typename std::remove_const<_Tp>::type _Tp_nc; 6242: return std::__allocate_shared<_Tp, _Lp>(std::allocator<_Tp_nc>(), 6242: std::forward<_Args>(__args)...); 6242: } 6242: 6242: 6242: template 6242: struct hash<__shared_ptr<_Tp, _Lp>> 6242: : public __hash_base> 6242: { 6242: size_t 6242: operator()(const __shared_ptr<_Tp, _Lp>& __s) const noexcept 6242: { 6242: return hash::element_type*>()( 6242: __s.get()); 6242: } 6242: }; 6242: 6242: 6242: } 6242: # 53 "/usr/include/c++/8/bits/shared_ptr.h" 2 3 6242: 6242: namespace std __attribute__ ((__visibility__ ("default"))) 6242: { 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: template 6242: inline std::basic_ostream<_Ch, _Tr>& 6242: operator<<(std::basic_ostream<_Ch, _Tr>& __os, 6242: const __shared_ptr<_Tp, _Lp>& __p) 6242: { 6242: __os << __p.get(); 6242: return __os; 6242: } 6242: 6242: template 6242: inline _Del* 6242: get_deleter(const __shared_ptr<_Tp, _Lp>& __p) noexcept 6242: { 6242: 6242: return static_cast<_Del*>(__p._M_get_deleter(typeid(_Del))); 6242: 6242: 6242: 6242: } 6242: 6242: 6242: template 6242: inline _Del* 6242: get_deleter(const shared_ptr<_Tp>& __p) noexcept 6242: { 6242: 6242: return static_cast<_Del*>(__p._M_get_deleter(typeid(_Del))); 6242: 6242: 6242: 6242: } 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: template 6242: class shared_ptr : public __shared_ptr<_Tp> 6242: { 6242: template 6242: using _Constructible = typename enable_if< 6242: is_constructible<__shared_ptr<_Tp>, _Args...>::value 6242: >::type; 6242: 6242: template 6242: using _Assignable = typename enable_if< 6242: is_assignable<__shared_ptr<_Tp>&, _Arg>::value, shared_ptr& 6242: >::type; 6242: 6242: public: 6242: 6242: using element_type = typename __shared_ptr<_Tp>::element_type; 6242: # 127 "/usr/include/c++/8/bits/shared_ptr.h" 3 6242: constexpr shared_ptr() noexcept : __shared_ptr<_Tp>() { } 6242: 6242: shared_ptr(const shared_ptr&) noexcept = default; 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: template> 6242: explicit 6242: shared_ptr(_Yp* __p) : __shared_ptr<_Tp>(__p) { } 6242: # 154 "/usr/include/c++/8/bits/shared_ptr.h" 3 6242: template> 6242: shared_ptr(_Yp* __p, _Deleter __d) 6242: : __shared_ptr<_Tp>(__p, std::move(__d)) { } 6242: # 172 "/usr/include/c++/8/bits/shared_ptr.h" 3 6242: template 6242: shared_ptr(nullptr_t __p, _Deleter __d) 6242: : __shared_ptr<_Tp>(__p, std::move(__d)) { } 6242: # 191 "/usr/include/c++/8/bits/shared_ptr.h" 3 6242: template> 6242: shared_ptr(_Yp* __p, _Deleter __d, _Alloc __a) 6242: : __shared_ptr<_Tp>(__p, std::move(__d), std::move(__a)) { } 6242: # 211 "/usr/include/c++/8/bits/shared_ptr.h" 3 6242: template 6242: shared_ptr(nullptr_t __p, _Deleter __d, _Alloc __a) 6242: : __shared_ptr<_Tp>(__p, std::move(__d), std::move(__a)) { } 6242: # 233 "/usr/include/c++/8/bits/shared_ptr.h" 3 6242: template 6242: shared_ptr(const shared_ptr<_Yp>& __r, element_type* __p) noexcept 6242: : __shared_ptr<_Tp>(__r, __p) { } 6242: # 244 "/usr/include/c++/8/bits/shared_ptr.h" 3 6242: template&>> 6242: shared_ptr(const shared_ptr<_Yp>& __r) noexcept 6242: : __shared_ptr<_Tp>(__r) { } 6242: 6242: 6242: 6242: 6242: 6242: 6242: shared_ptr(shared_ptr&& __r) noexcept 6242: : __shared_ptr<_Tp>(std::move(__r)) { } 6242: 6242: 6242: 6242: 6242: 6242: 6242: template>> 6242: shared_ptr(shared_ptr<_Yp>&& __r) noexcept 6242: : __shared_ptr<_Tp>(std::move(__r)) { } 6242: # 274 "/usr/include/c++/8/bits/shared_ptr.h" 3 6242: template&>> 6242: explicit shared_ptr(const weak_ptr<_Yp>& __r) 6242: : __shared_ptr<_Tp>(__r) { } 6242: 6242: 6242: #pragma GCC diagnostic push 6242: #pragma GCC diagnostic ignored "-Wdeprecated-declarations" 6242: template>> 6242: shared_ptr(auto_ptr<_Yp>&& __r); 6242: #pragma GCC diagnostic pop 6242: 6242: 6242: 6242: 6242: template>> 6242: shared_ptr(unique_ptr<_Yp, _Del>&& __r) 6242: : __shared_ptr<_Tp>(std::move(__r)) { } 6242: 6242: 6242: 6242: 6242: 6242: template, __sp_array_delete>* = 0> 6242: shared_ptr(unique_ptr<_Yp, _Del>&& __r) 6242: : __shared_ptr<_Tp>(std::move(__r), __sp_array_delete()) { } 6242: 6242: 6242: 6242: 6242: 6242: 6242: constexpr shared_ptr(nullptr_t) noexcept : shared_ptr() { } 6242: 6242: shared_ptr& operator=(const shared_ptr&) noexcept = default; 6242: 6242: template 6242: _Assignable&> 6242: operator=(const shared_ptr<_Yp>& __r) noexcept 6242: { 6242: this->__shared_ptr<_Tp>::operator=(__r); 6242: return *this; 6242: } 6242: 6242: 6242: #pragma GCC diagnostic push 6242: #pragma GCC diagnostic ignored "-Wdeprecated-declarations" 6242: template 6242: _Assignable> 6242: operator=(auto_ptr<_Yp>&& __r) 6242: { 6242: this->__shared_ptr<_Tp>::operator=(std::move(__r)); 6242: return *this; 6242: } 6242: #pragma GCC diagnostic pop 6242: 6242: 6242: shared_ptr& 6242: operator=(shared_ptr&& __r) noexcept 6242: { 6242: this->__shared_ptr<_Tp>::operator=(std::move(__r)); 6242: return *this; 6242: } 6242: 6242: template 6242: _Assignable> 6242: operator=(shared_ptr<_Yp>&& __r) noexcept 6242: { 6242: this->__shared_ptr<_Tp>::operator=(std::move(__r)); 6242: return *this; 6242: } 6242: 6242: template 6242: _Assignable> 6242: operator=(unique_ptr<_Yp, _Del>&& __r) 6242: { 6242: this->__shared_ptr<_Tp>::operator=(std::move(__r)); 6242: return *this; 6242: } 6242: 6242: private: 6242: 6242: template 6242: shared_ptr(_Sp_make_shared_tag __tag, const _Alloc& __a, 6242: _Args&&... __args) 6242: : __shared_ptr<_Tp>(__tag, __a, std::forward<_Args>(__args)...) 6242: { } 6242: 6242: template 6242: friend shared_ptr<_Yp> 6242: allocate_shared(const _Alloc& __a, _Args&&... __args); 6242: 6242: 6242: shared_ptr(const weak_ptr<_Tp>& __r, std::nothrow_t) 6242: : __shared_ptr<_Tp>(__r, std::nothrow) { } 6242: 6242: friend class weak_ptr<_Tp>; 6242: }; 6242: # 382 "/usr/include/c++/8/bits/shared_ptr.h" 3 6242: template 6242: inline bool 6242: operator==(const shared_ptr<_Tp>& __a, const shared_ptr<_Up>& __b) noexcept 6242: { return __a.get() == __b.get(); } 6242: 6242: template 6242: inline bool 6242: operator==(const shared_ptr<_Tp>& __a, nullptr_t) noexcept 6242: { return !__a; } 6242: 6242: template 6242: inline bool 6242: operator==(nullptr_t, const shared_ptr<_Tp>& __a) noexcept 6242: { return !__a; } 6242: 6242: template 6242: inline bool 6242: operator!=(const shared_ptr<_Tp>& __a, const shared_ptr<_Up>& __b) noexcept 6242: { return __a.get() != __b.get(); } 6242: 6242: template 6242: inline bool 6242: operator!=(const shared_ptr<_Tp>& __a, nullptr_t) noexcept 6242: { return (bool)__a; } 6242: 6242: template 6242: inline bool 6242: operator!=(nullptr_t, const shared_ptr<_Tp>& __a) noexcept 6242: { return (bool)__a; } 6242: 6242: template 6242: inline bool 6242: operator<(const shared_ptr<_Tp>& __a, const shared_ptr<_Up>& __b) noexcept 6242: { 6242: using _Tp_elt = typename shared_ptr<_Tp>::element_type; 6242: using _Up_elt = typename shared_ptr<_Up>::element_type; 6242: using _Vp = typename common_type<_Tp_elt*, _Up_elt*>::type; 6242: return less<_Vp>()(__a.get(), __b.get()); 6242: } 6242: 6242: template 6242: inline bool 6242: operator<(const shared_ptr<_Tp>& __a, nullptr_t) noexcept 6242: { 6242: using _Tp_elt = typename shared_ptr<_Tp>::element_type; 6242: return less<_Tp_elt*>()(__a.get(), nullptr); 6242: } 6242: 6242: template 6242: inline bool 6242: operator<(nullptr_t, const shared_ptr<_Tp>& __a) noexcept 6242: { 6242: using _Tp_elt = typename shared_ptr<_Tp>::element_type; 6242: return less<_Tp_elt*>()(nullptr, __a.get()); 6242: } 6242: 6242: template 6242: inline bool 6242: operator<=(const shared_ptr<_Tp>& __a, const shared_ptr<_Up>& __b) noexcept 6242: { return !(__b < __a); } 6242: 6242: template 6242: inline bool 6242: operator<=(const shared_ptr<_Tp>& __a, nullptr_t) noexcept 6242: { return !(nullptr < __a); } 6242: 6242: template 6242: inline bool 6242: operator<=(nullptr_t, const shared_ptr<_Tp>& __a) noexcept 6242: { return !(__a < nullptr); } 6242: 6242: template 6242: inline bool 6242: operator>(const shared_ptr<_Tp>& __a, const shared_ptr<_Up>& __b) noexcept 6242: { return (__b < __a); } 6242: 6242: template 6242: inline bool 6242: operator>(const shared_ptr<_Tp>& __a, nullptr_t) noexcept 6242: { return nullptr < __a; } 6242: 6242: template 6242: inline bool 6242: operator>(nullptr_t, const shared_ptr<_Tp>& __a) noexcept 6242: { return __a < nullptr; } 6242: 6242: template 6242: inline bool 6242: operator>=(const shared_ptr<_Tp>& __a, const shared_ptr<_Up>& __b) noexcept 6242: { return !(__a < __b); } 6242: 6242: template 6242: inline bool 6242: operator>=(const shared_ptr<_Tp>& __a, nullptr_t) noexcept 6242: { return !(__a < nullptr); } 6242: 6242: template 6242: inline bool 6242: operator>=(nullptr_t, const shared_ptr<_Tp>& __a) noexcept 6242: { return !(nullptr < __a); } 6242: 6242: template 6242: struct less> : public _Sp_less> 6242: { }; 6242: 6242: 6242: template 6242: inline void 6242: swap(shared_ptr<_Tp>& __a, shared_ptr<_Tp>& __b) noexcept 6242: { __a.swap(__b); } 6242: 6242: 6242: template 6242: inline shared_ptr<_Tp> 6242: static_pointer_cast(const shared_ptr<_Up>& __r) noexcept 6242: { 6242: using _Sp = shared_ptr<_Tp>; 6242: return _Sp(__r, static_cast(__r.get())); 6242: } 6242: 6242: template 6242: inline shared_ptr<_Tp> 6242: const_pointer_cast(const shared_ptr<_Up>& __r) noexcept 6242: { 6242: using _Sp = shared_ptr<_Tp>; 6242: return _Sp(__r, const_cast(__r.get())); 6242: } 6242: 6242: template 6242: inline shared_ptr<_Tp> 6242: dynamic_pointer_cast(const shared_ptr<_Up>& __r) noexcept 6242: { 6242: using _Sp = shared_ptr<_Tp>; 6242: if (auto* __p = dynamic_cast(__r.get())) 6242: return _Sp(__r, __p); 6242: return _Sp(); 6242: } 6242: # 535 "/usr/include/c++/8/bits/shared_ptr.h" 3 6242: template 6242: class weak_ptr : public __weak_ptr<_Tp> 6242: { 6242: template 6242: using _Constructible = typename enable_if< 6242: is_constructible<__weak_ptr<_Tp>, _Arg>::value 6242: >::type; 6242: 6242: template 6242: using _Assignable = typename enable_if< 6242: is_assignable<__weak_ptr<_Tp>&, _Arg>::value, weak_ptr& 6242: >::type; 6242: 6242: public: 6242: constexpr weak_ptr() noexcept = default; 6242: 6242: template&>> 6242: weak_ptr(const shared_ptr<_Yp>& __r) noexcept 6242: : __weak_ptr<_Tp>(__r) { } 6242: 6242: weak_ptr(const weak_ptr&) noexcept = default; 6242: 6242: template&>> 6242: weak_ptr(const weak_ptr<_Yp>& __r) noexcept 6242: : __weak_ptr<_Tp>(__r) { } 6242: 6242: weak_ptr(weak_ptr&&) noexcept = default; 6242: 6242: template>> 6242: weak_ptr(weak_ptr<_Yp>&& __r) noexcept 6242: : __weak_ptr<_Tp>(std::move(__r)) { } 6242: 6242: weak_ptr& 6242: operator=(const weak_ptr& __r) noexcept = default; 6242: 6242: template 6242: _Assignable&> 6242: operator=(const weak_ptr<_Yp>& __r) noexcept 6242: { 6242: this->__weak_ptr<_Tp>::operator=(__r); 6242: return *this; 6242: } 6242: 6242: template 6242: _Assignable&> 6242: operator=(const shared_ptr<_Yp>& __r) noexcept 6242: { 6242: this->__weak_ptr<_Tp>::operator=(__r); 6242: return *this; 6242: } 6242: 6242: weak_ptr& 6242: operator=(weak_ptr&& __r) noexcept = default; 6242: 6242: template 6242: _Assignable> 6242: operator=(weak_ptr<_Yp>&& __r) noexcept 6242: { 6242: this->__weak_ptr<_Tp>::operator=(std::move(__r)); 6242: return *this; 6242: } 6242: 6242: shared_ptr<_Tp> 6242: lock() const noexcept 6242: { return shared_ptr<_Tp>(*this, std::nothrow); } 6242: }; 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: template 6242: inline void 6242: swap(weak_ptr<_Tp>& __a, weak_ptr<_Tp>& __b) noexcept 6242: { __a.swap(__b); } 6242: 6242: 6242: 6242: template 6242: struct owner_less; 6242: 6242: 6242: template<> 6242: struct owner_less : _Sp_owner_less 6242: { }; 6242: 6242: 6242: template 6242: struct owner_less> 6242: : public _Sp_owner_less, weak_ptr<_Tp>> 6242: { }; 6242: 6242: 6242: template 6242: struct owner_less> 6242: : public _Sp_owner_less, shared_ptr<_Tp>> 6242: { }; 6242: 6242: 6242: 6242: 6242: template 6242: class enable_shared_from_this 6242: { 6242: protected: 6242: constexpr enable_shared_from_this() noexcept { } 6242: 6242: enable_shared_from_this(const enable_shared_from_this&) noexcept { } 6242: 6242: enable_shared_from_this& 6242: operator=(const enable_shared_from_this&) noexcept 6242: { return *this; } 6242: 6242: ~enable_shared_from_this() { } 6242: 6242: public: 6242: shared_ptr<_Tp> 6242: shared_from_this() 6242: { return shared_ptr<_Tp>(this->_M_weak_this); } 6242: 6242: shared_ptr 6242: shared_from_this() const 6242: { return shared_ptr(this->_M_weak_this); } 6242: 6242: 6242: 6242: weak_ptr<_Tp> 6242: weak_from_this() noexcept 6242: { return this->_M_weak_this; } 6242: 6242: weak_ptr 6242: weak_from_this() const noexcept 6242: { return this->_M_weak_this; } 6242: 6242: 6242: private: 6242: template 6242: void 6242: _M_weak_assign(_Tp1* __p, const __shared_count<>& __n) const noexcept 6242: { _M_weak_this._M_assign(__p, __n); } 6242: 6242: 6242: friend const enable_shared_from_this* 6242: __enable_shared_from_this_base(const __shared_count<>&, 6242: const enable_shared_from_this* __p) 6242: { return __p; } 6242: 6242: template 6242: friend class __shared_ptr; 6242: 6242: mutable weak_ptr<_Tp> _M_weak_this; 6242: }; 6242: # 702 "/usr/include/c++/8/bits/shared_ptr.h" 3 6242: template 6242: inline shared_ptr<_Tp> 6242: allocate_shared(const _Alloc& __a, _Args&&... __args) 6242: { 6242: return shared_ptr<_Tp>(_Sp_make_shared_tag(), __a, 6242: std::forward<_Args>(__args)...); 6242: } 6242: # 717 "/usr/include/c++/8/bits/shared_ptr.h" 3 6242: template 6242: inline shared_ptr<_Tp> 6242: make_shared(_Args&&... __args) 6242: { 6242: typedef typename std::remove_const<_Tp>::type _Tp_nc; 6242: return std::allocate_shared<_Tp>(std::allocator<_Tp_nc>(), 6242: std::forward<_Args>(__args)...); 6242: } 6242: 6242: 6242: template 6242: struct hash> 6242: : public __hash_base> 6242: { 6242: size_t 6242: operator()(const shared_ptr<_Tp>& __s) const noexcept 6242: { 6242: return std::hash::element_type*>()(__s.get()); 6242: } 6242: }; 6242: 6242: 6242: 6242: 6242: } 6242: # 82 "/usr/include/c++/8/memory" 2 3 6242: # 1 "/usr/include/c++/8/bits/shared_ptr_atomic.h" 1 3 6242: # 33 "/usr/include/c++/8/bits/shared_ptr_atomic.h" 3 6242: # 1 "/usr/include/c++/8/bits/atomic_base.h" 1 3 6242: # 33 "/usr/include/c++/8/bits/atomic_base.h" 3 6242: 6242: # 34 "/usr/include/c++/8/bits/atomic_base.h" 3 6242: 6242: 6242: 6242: # 1 "/usr/include/c++/8/bits/atomic_lockfree_defines.h" 1 3 6242: # 33 "/usr/include/c++/8/bits/atomic_lockfree_defines.h" 3 6242: 6242: # 34 "/usr/include/c++/8/bits/atomic_lockfree_defines.h" 3 6242: # 38 "/usr/include/c++/8/bits/atomic_base.h" 2 3 6242: 6242: 6242: 6242: 6242: 6242: namespace std __attribute__ ((__visibility__ ("default"))) 6242: { 6242: 6242: # 55 "/usr/include/c++/8/bits/atomic_base.h" 3 6242: typedef enum memory_order 6242: { 6242: memory_order_relaxed, 6242: memory_order_consume, 6242: memory_order_acquire, 6242: memory_order_release, 6242: memory_order_acq_rel, 6242: memory_order_seq_cst 6242: } memory_order; 6242: 6242: enum __memory_order_modifier 6242: { 6242: __memory_order_mask = 0x0ffff, 6242: __memory_order_modifier_mask = 0xffff0000, 6242: __memory_order_hle_acquire = 0x10000, 6242: __memory_order_hle_release = 0x20000 6242: }; 6242: 6242: constexpr memory_order 6242: operator|(memory_order __m, __memory_order_modifier __mod) 6242: { 6242: return memory_order(__m | int(__mod)); 6242: } 6242: 6242: constexpr memory_order 6242: operator&(memory_order __m, __memory_order_modifier __mod) 6242: { 6242: return memory_order(__m & int(__mod)); 6242: } 6242: 6242: 6242: constexpr memory_order 6242: __cmpexch_failure_order2(memory_order __m) noexcept 6242: { 6242: return __m == memory_order_acq_rel ? memory_order_acquire 6242: : __m == memory_order_release ? memory_order_relaxed : __m; 6242: } 6242: 6242: constexpr memory_order 6242: __cmpexch_failure_order(memory_order __m) noexcept 6242: { 6242: return memory_order(__cmpexch_failure_order2(__m & __memory_order_mask) 6242: | (__m & __memory_order_modifier_mask)); 6242: } 6242: 6242: inline __attribute__((__always_inline__)) void 6242: atomic_thread_fence(memory_order __m) noexcept 6242: { __atomic_thread_fence(__m); } 6242: 6242: inline __attribute__((__always_inline__)) void 6242: atomic_signal_fence(memory_order __m) noexcept 6242: { __atomic_signal_fence(__m); } 6242: 6242: 6242: template 6242: inline _Tp 6242: kill_dependency(_Tp __y) noexcept 6242: { 6242: _Tp __ret(__y); 6242: return __ret; 6242: } 6242: 6242: 6242: 6242: template 6242: struct __atomic_base; 6242: 6242: 6242: 6242: 6242: template 6242: struct atomic; 6242: 6242: template 6242: struct atomic<_Tp*>; 6242: 6242: 6242: 6242: typedef bool __atomic_flag_data_type; 6242: # 148 "/usr/include/c++/8/bits/atomic_base.h" 3 6242: extern "C" { 6242: 6242: struct __atomic_flag_base 6242: { 6242: __atomic_flag_data_type _M_i; 6242: }; 6242: 6242: } 6242: 6242: 6242: 6242: 6242: struct atomic_flag : public __atomic_flag_base 6242: { 6242: atomic_flag() noexcept = default; 6242: ~atomic_flag() noexcept = default; 6242: atomic_flag(const atomic_flag&) = delete; 6242: atomic_flag& operator=(const atomic_flag&) = delete; 6242: atomic_flag& operator=(const atomic_flag&) volatile = delete; 6242: 6242: 6242: constexpr atomic_flag(bool __i) noexcept 6242: : __atomic_flag_base{ _S_init(__i) } 6242: { } 6242: 6242: inline __attribute__((__always_inline__)) bool 6242: test_and_set(memory_order __m = memory_order_seq_cst) noexcept 6242: { 6242: return __atomic_test_and_set (&_M_i, __m); 6242: } 6242: 6242: inline __attribute__((__always_inline__)) bool 6242: test_and_set(memory_order __m = memory_order_seq_cst) volatile noexcept 6242: { 6242: return __atomic_test_and_set (&_M_i, __m); 6242: } 6242: 6242: inline __attribute__((__always_inline__)) void 6242: clear(memory_order __m = memory_order_seq_cst) noexcept 6242: { 6242: memory_order __b = __m & __memory_order_mask; 6242: ; 6242: ; 6242: ; 6242: 6242: __atomic_clear (&_M_i, __m); 6242: } 6242: 6242: inline __attribute__((__always_inline__)) void 6242: clear(memory_order __m = memory_order_seq_cst) volatile noexcept 6242: { 6242: memory_order __b = __m & __memory_order_mask; 6242: ; 6242: ; 6242: ; 6242: 6242: __atomic_clear (&_M_i, __m); 6242: } 6242: 6242: private: 6242: static constexpr __atomic_flag_data_type 6242: _S_init(bool __i) 6242: { return __i ? 1 : 0; } 6242: }; 6242: # 237 "/usr/include/c++/8/bits/atomic_base.h" 3 6242: template 6242: struct __atomic_base 6242: { 6242: private: 6242: typedef _ITp __int_type; 6242: 6242: static constexpr int _S_alignment = 6242: sizeof(_ITp) > alignof(_ITp) ? sizeof(_ITp) : alignof(_ITp); 6242: 6242: alignas(_S_alignment) __int_type _M_i; 6242: 6242: public: 6242: __atomic_base() noexcept = default; 6242: ~__atomic_base() noexcept = default; 6242: __atomic_base(const __atomic_base&) = delete; 6242: __atomic_base& operator=(const __atomic_base&) = delete; 6242: __atomic_base& operator=(const __atomic_base&) volatile = delete; 6242: 6242: 6242: constexpr __atomic_base(__int_type __i) noexcept : _M_i (__i) { } 6242: 6242: operator __int_type() const noexcept 6242: { return load(); } 6242: 6242: operator __int_type() const volatile noexcept 6242: { return load(); } 6242: 6242: __int_type 6242: operator=(__int_type __i) noexcept 6242: { 6242: store(__i); 6242: return __i; 6242: } 6242: 6242: __int_type 6242: operator=(__int_type __i) volatile noexcept 6242: { 6242: store(__i); 6242: return __i; 6242: } 6242: 6242: __int_type 6242: operator++(int) noexcept 6242: { return fetch_add(1); } 6242: 6242: __int_type 6242: operator++(int) volatile noexcept 6242: { return fetch_add(1); } 6242: 6242: __int_type 6242: operator--(int) noexcept 6242: { return fetch_sub(1); } 6242: 6242: __int_type 6242: operator--(int) volatile noexcept 6242: { return fetch_sub(1); } 6242: 6242: __int_type 6242: operator++() noexcept 6242: { return __atomic_add_fetch(&_M_i, 1, memory_order_seq_cst); } 6242: 6242: __int_type 6242: operator++() volatile noexcept 6242: { return __atomic_add_fetch(&_M_i, 1, memory_order_seq_cst); } 6242: 6242: __int_type 6242: operator--() noexcept 6242: { return __atomic_sub_fetch(&_M_i, 1, memory_order_seq_cst); } 6242: 6242: __int_type 6242: operator--() volatile noexcept 6242: { return __atomic_sub_fetch(&_M_i, 1, memory_order_seq_cst); } 6242: 6242: __int_type 6242: operator+=(__int_type __i) noexcept 6242: { return __atomic_add_fetch(&_M_i, __i, memory_order_seq_cst); } 6242: 6242: __int_type 6242: operator+=(__int_type __i) volatile noexcept 6242: { return __atomic_add_fetch(&_M_i, __i, memory_order_seq_cst); } 6242: 6242: __int_type 6242: operator-=(__int_type __i) noexcept 6242: { return __atomic_sub_fetch(&_M_i, __i, memory_order_seq_cst); } 6242: 6242: __int_type 6242: operator-=(__int_type __i) volatile noexcept 6242: { return __atomic_sub_fetch(&_M_i, __i, memory_order_seq_cst); } 6242: 6242: __int_type 6242: operator&=(__int_type __i) noexcept 6242: { return __atomic_and_fetch(&_M_i, __i, memory_order_seq_cst); } 6242: 6242: __int_type 6242: operator&=(__int_type __i) volatile noexcept 6242: { return __atomic_and_fetch(&_M_i, __i, memory_order_seq_cst); } 6242: 6242: __int_type 6242: operator|=(__int_type __i) noexcept 6242: { return __atomic_or_fetch(&_M_i, __i, memory_order_seq_cst); } 6242: 6242: __int_type 6242: operator|=(__int_type __i) volatile noexcept 6242: { return __atomic_or_fetch(&_M_i, __i, memory_order_seq_cst); } 6242: 6242: __int_type 6242: operator^=(__int_type __i) noexcept 6242: { return __atomic_xor_fetch(&_M_i, __i, memory_order_seq_cst); } 6242: 6242: __int_type 6242: operator^=(__int_type __i) volatile noexcept 6242: { return __atomic_xor_fetch(&_M_i, __i, memory_order_seq_cst); } 6242: 6242: bool 6242: is_lock_free() const noexcept 6242: { 6242: 6242: return __atomic_is_lock_free(sizeof(_M_i), 6242: reinterpret_cast(-__alignof(_M_i))); 6242: } 6242: 6242: bool 6242: is_lock_free() const volatile noexcept 6242: { 6242: 6242: return __atomic_is_lock_free(sizeof(_M_i), 6242: reinterpret_cast(-__alignof(_M_i))); 6242: } 6242: 6242: inline __attribute__((__always_inline__)) void 6242: store(__int_type __i, memory_order __m = memory_order_seq_cst) noexcept 6242: { 6242: memory_order __b = __m & __memory_order_mask; 6242: ; 6242: ; 6242: ; 6242: 6242: __atomic_store_n(&_M_i, __i, __m); 6242: } 6242: 6242: inline __attribute__((__always_inline__)) void 6242: store(__int_type __i, 6242: memory_order __m = memory_order_seq_cst) volatile noexcept 6242: { 6242: memory_order __b = __m & __memory_order_mask; 6242: ; 6242: ; 6242: ; 6242: 6242: __atomic_store_n(&_M_i, __i, __m); 6242: } 6242: 6242: inline __attribute__((__always_inline__)) __int_type 6242: load(memory_order __m = memory_order_seq_cst) const noexcept 6242: { 6242: memory_order __b = __m & __memory_order_mask; 6242: ; 6242: ; 6242: 6242: return __atomic_load_n(&_M_i, __m); 6242: } 6242: 6242: inline __attribute__((__always_inline__)) __int_type 6242: load(memory_order __m = memory_order_seq_cst) const volatile noexcept 6242: { 6242: memory_order __b = __m & __memory_order_mask; 6242: ; 6242: ; 6242: 6242: return __atomic_load_n(&_M_i, __m); 6242: } 6242: 6242: inline __attribute__((__always_inline__)) __int_type 6242: exchange(__int_type __i, 6242: memory_order __m = memory_order_seq_cst) noexcept 6242: { 6242: return __atomic_exchange_n(&_M_i, __i, __m); 6242: } 6242: 6242: 6242: inline __attribute__((__always_inline__)) __int_type 6242: exchange(__int_type __i, 6242: memory_order __m = memory_order_seq_cst) volatile noexcept 6242: { 6242: return __atomic_exchange_n(&_M_i, __i, __m); 6242: } 6242: 6242: inline __attribute__((__always_inline__)) bool 6242: compare_exchange_weak(__int_type& __i1, __int_type __i2, 6242: memory_order __m1, memory_order __m2) noexcept 6242: { 6242: memory_order __b2 = __m2 & __memory_order_mask; 6242: memory_order __b1 = __m1 & __memory_order_mask; 6242: ; 6242: ; 6242: ; 6242: 6242: return __atomic_compare_exchange_n(&_M_i, &__i1, __i2, 1, __m1, __m2); 6242: } 6242: 6242: inline __attribute__((__always_inline__)) bool 6242: compare_exchange_weak(__int_type& __i1, __int_type __i2, 6242: memory_order __m1, 6242: memory_order __m2) volatile noexcept 6242: { 6242: memory_order __b2 = __m2 & __memory_order_mask; 6242: memory_order __b1 = __m1 & __memory_order_mask; 6242: ; 6242: ; 6242: ; 6242: 6242: return __atomic_compare_exchange_n(&_M_i, &__i1, __i2, 1, __m1, __m2); 6242: } 6242: 6242: inline __attribute__((__always_inline__)) bool 6242: compare_exchange_weak(__int_type& __i1, __int_type __i2, 6242: memory_order __m = memory_order_seq_cst) noexcept 6242: { 6242: return compare_exchange_weak(__i1, __i2, __m, 6242: __cmpexch_failure_order(__m)); 6242: } 6242: 6242: inline __attribute__((__always_inline__)) bool 6242: compare_exchange_weak(__int_type& __i1, __int_type __i2, 6242: memory_order __m = memory_order_seq_cst) volatile noexcept 6242: { 6242: return compare_exchange_weak(__i1, __i2, __m, 6242: __cmpexch_failure_order(__m)); 6242: } 6242: 6242: inline __attribute__((__always_inline__)) bool 6242: compare_exchange_strong(__int_type& __i1, __int_type __i2, 6242: memory_order __m1, memory_order __m2) noexcept 6242: { 6242: memory_order __b2 = __m2 & __memory_order_mask; 6242: memory_order __b1 = __m1 & __memory_order_mask; 6242: ; 6242: ; 6242: ; 6242: 6242: return __atomic_compare_exchange_n(&_M_i, &__i1, __i2, 0, __m1, __m2); 6242: } 6242: 6242: inline __attribute__((__always_inline__)) bool 6242: compare_exchange_strong(__int_type& __i1, __int_type __i2, 6242: memory_order __m1, 6242: memory_order __m2) volatile noexcept 6242: { 6242: memory_order __b2 = __m2 & __memory_order_mask; 6242: memory_order __b1 = __m1 & __memory_order_mask; 6242: 6242: ; 6242: ; 6242: ; 6242: 6242: return __atomic_compare_exchange_n(&_M_i, &__i1, __i2, 0, __m1, __m2); 6242: } 6242: 6242: inline __attribute__((__always_inline__)) bool 6242: compare_exchange_strong(__int_type& __i1, __int_type __i2, 6242: memory_order __m = memory_order_seq_cst) noexcept 6242: { 6242: return compare_exchange_strong(__i1, __i2, __m, 6242: __cmpexch_failure_order(__m)); 6242: } 6242: 6242: inline __attribute__((__always_inline__)) bool 6242: compare_exchange_strong(__int_type& __i1, __int_type __i2, 6242: memory_order __m = memory_order_seq_cst) volatile noexcept 6242: { 6242: return compare_exchange_strong(__i1, __i2, __m, 6242: __cmpexch_failure_order(__m)); 6242: } 6242: 6242: inline __attribute__((__always_inline__)) __int_type 6242: fetch_add(__int_type __i, 6242: memory_order __m = memory_order_seq_cst) noexcept 6242: { return __atomic_fetch_add(&_M_i, __i, __m); } 6242: 6242: inline __attribute__((__always_inline__)) __int_type 6242: fetch_add(__int_type __i, 6242: memory_order __m = memory_order_seq_cst) volatile noexcept 6242: { return __atomic_fetch_add(&_M_i, __i, __m); } 6242: 6242: inline __attribute__((__always_inline__)) __int_type 6242: fetch_sub(__int_type __i, 6242: memory_order __m = memory_order_seq_cst) noexcept 6242: { return __atomic_fetch_sub(&_M_i, __i, __m); } 6242: 6242: inline __attribute__((__always_inline__)) __int_type 6242: fetch_sub(__int_type __i, 6242: memory_order __m = memory_order_seq_cst) volatile noexcept 6242: { return __atomic_fetch_sub(&_M_i, __i, __m); } 6242: 6242: inline __attribute__((__always_inline__)) __int_type 6242: fetch_and(__int_type __i, 6242: memory_order __m = memory_order_seq_cst) noexcept 6242: { return __atomic_fetch_and(&_M_i, __i, __m); } 6242: 6242: inline __attribute__((__always_inline__)) __int_type 6242: fetch_and(__int_type __i, 6242: memory_order __m = memory_order_seq_cst) volatile noexcept 6242: { return __atomic_fetch_and(&_M_i, __i, __m); } 6242: 6242: inline __attribute__((__always_inline__)) __int_type 6242: fetch_or(__int_type __i, 6242: memory_order __m = memory_order_seq_cst) noexcept 6242: { return __atomic_fetch_or(&_M_i, __i, __m); } 6242: 6242: inline __attribute__((__always_inline__)) __int_type 6242: fetch_or(__int_type __i, 6242: memory_order __m = memory_order_seq_cst) volatile noexcept 6242: { return __atomic_fetch_or(&_M_i, __i, __m); } 6242: 6242: inline __attribute__((__always_inline__)) __int_type 6242: fetch_xor(__int_type __i, 6242: memory_order __m = memory_order_seq_cst) noexcept 6242: { return __atomic_fetch_xor(&_M_i, __i, __m); } 6242: 6242: inline __attribute__((__always_inline__)) __int_type 6242: fetch_xor(__int_type __i, 6242: memory_order __m = memory_order_seq_cst) volatile noexcept 6242: { return __atomic_fetch_xor(&_M_i, __i, __m); } 6242: }; 6242: 6242: 6242: 6242: template 6242: struct __atomic_base<_PTp*> 6242: { 6242: private: 6242: typedef _PTp* __pointer_type; 6242: 6242: __pointer_type _M_p; 6242: 6242: 6242: constexpr ptrdiff_t 6242: _M_type_size(ptrdiff_t __d) const { return __d * sizeof(_PTp); } 6242: 6242: constexpr ptrdiff_t 6242: _M_type_size(ptrdiff_t __d) const volatile { return __d * sizeof(_PTp); } 6242: 6242: public: 6242: __atomic_base() noexcept = default; 6242: ~__atomic_base() noexcept = default; 6242: __atomic_base(const __atomic_base&) = delete; 6242: __atomic_base& operator=(const __atomic_base&) = delete; 6242: __atomic_base& operator=(const __atomic_base&) volatile = delete; 6242: 6242: 6242: constexpr __atomic_base(__pointer_type __p) noexcept : _M_p (__p) { } 6242: 6242: operator __pointer_type() const noexcept 6242: { return load(); } 6242: 6242: operator __pointer_type() const volatile noexcept 6242: { return load(); } 6242: 6242: __pointer_type 6242: operator=(__pointer_type __p) noexcept 6242: { 6242: store(__p); 6242: return __p; 6242: } 6242: 6242: __pointer_type 6242: operator=(__pointer_type __p) volatile noexcept 6242: { 6242: store(__p); 6242: return __p; 6242: } 6242: 6242: __pointer_type 6242: operator++(int) noexcept 6242: { return fetch_add(1); } 6242: 6242: __pointer_type 6242: operator++(int) volatile noexcept 6242: { return fetch_add(1); } 6242: 6242: __pointer_type 6242: operator--(int) noexcept 6242: { return fetch_sub(1); } 6242: 6242: __pointer_type 6242: operator--(int) volatile noexcept 6242: { return fetch_sub(1); } 6242: 6242: __pointer_type 6242: operator++() noexcept 6242: { return __atomic_add_fetch(&_M_p, _M_type_size(1), 6242: memory_order_seq_cst); } 6242: 6242: __pointer_type 6242: operator++() volatile noexcept 6242: { return __atomic_add_fetch(&_M_p, _M_type_size(1), 6242: memory_order_seq_cst); } 6242: 6242: __pointer_type 6242: operator--() noexcept 6242: { return __atomic_sub_fetch(&_M_p, _M_type_size(1), 6242: memory_order_seq_cst); } 6242: 6242: __pointer_type 6242: operator--() volatile noexcept 6242: { return __atomic_sub_fetch(&_M_p, _M_type_size(1), 6242: memory_order_seq_cst); } 6242: 6242: __pointer_type 6242: operator+=(ptrdiff_t __d) noexcept 6242: { return __atomic_add_fetch(&_M_p, _M_type_size(__d), 6242: memory_order_seq_cst); } 6242: 6242: __pointer_type 6242: operator+=(ptrdiff_t __d) volatile noexcept 6242: { return __atomic_add_fetch(&_M_p, _M_type_size(__d), 6242: memory_order_seq_cst); } 6242: 6242: __pointer_type 6242: operator-=(ptrdiff_t __d) noexcept 6242: { return __atomic_sub_fetch(&_M_p, _M_type_size(__d), 6242: memory_order_seq_cst); } 6242: 6242: __pointer_type 6242: operator-=(ptrdiff_t __d) volatile noexcept 6242: { return __atomic_sub_fetch(&_M_p, _M_type_size(__d), 6242: memory_order_seq_cst); } 6242: 6242: bool 6242: is_lock_free() const noexcept 6242: { 6242: 6242: return __atomic_is_lock_free(sizeof(_M_p), 6242: reinterpret_cast(-__alignof(_M_p))); 6242: } 6242: 6242: bool 6242: is_lock_free() const volatile noexcept 6242: { 6242: 6242: return __atomic_is_lock_free(sizeof(_M_p), 6242: reinterpret_cast(-__alignof(_M_p))); 6242: } 6242: 6242: inline __attribute__((__always_inline__)) void 6242: store(__pointer_type __p, 6242: memory_order __m = memory_order_seq_cst) noexcept 6242: { 6242: memory_order __b = __m & __memory_order_mask; 6242: 6242: ; 6242: ; 6242: ; 6242: 6242: __atomic_store_n(&_M_p, __p, __m); 6242: } 6242: 6242: inline __attribute__((__always_inline__)) void 6242: store(__pointer_type __p, 6242: memory_order __m = memory_order_seq_cst) volatile noexcept 6242: { 6242: memory_order __b = __m & __memory_order_mask; 6242: ; 6242: ; 6242: ; 6242: 6242: __atomic_store_n(&_M_p, __p, __m); 6242: } 6242: 6242: inline __attribute__((__always_inline__)) __pointer_type 6242: load(memory_order __m = memory_order_seq_cst) const noexcept 6242: { 6242: memory_order __b = __m & __memory_order_mask; 6242: ; 6242: ; 6242: 6242: return __atomic_load_n(&_M_p, __m); 6242: } 6242: 6242: inline __attribute__((__always_inline__)) __pointer_type 6242: load(memory_order __m = memory_order_seq_cst) const volatile noexcept 6242: { 6242: memory_order __b = __m & __memory_order_mask; 6242: ; 6242: ; 6242: 6242: return __atomic_load_n(&_M_p, __m); 6242: } 6242: 6242: inline __attribute__((__always_inline__)) __pointer_type 6242: exchange(__pointer_type __p, 6242: memory_order __m = memory_order_seq_cst) noexcept 6242: { 6242: return __atomic_exchange_n(&_M_p, __p, __m); 6242: } 6242: 6242: 6242: inline __attribute__((__always_inline__)) __pointer_type 6242: exchange(__pointer_type __p, 6242: memory_order __m = memory_order_seq_cst) volatile noexcept 6242: { 6242: return __atomic_exchange_n(&_M_p, __p, __m); 6242: } 6242: 6242: inline __attribute__((__always_inline__)) bool 6242: compare_exchange_strong(__pointer_type& __p1, __pointer_type __p2, 6242: memory_order __m1, 6242: memory_order __m2) noexcept 6242: { 6242: memory_order __b2 = __m2 & __memory_order_mask; 6242: memory_order __b1 = __m1 & __memory_order_mask; 6242: ; 6242: ; 6242: ; 6242: 6242: return __atomic_compare_exchange_n(&_M_p, &__p1, __p2, 0, __m1, __m2); 6242: } 6242: 6242: inline __attribute__((__always_inline__)) bool 6242: compare_exchange_strong(__pointer_type& __p1, __pointer_type __p2, 6242: memory_order __m1, 6242: memory_order __m2) volatile noexcept 6242: { 6242: memory_order __b2 = __m2 & __memory_order_mask; 6242: memory_order __b1 = __m1 & __memory_order_mask; 6242: 6242: ; 6242: ; 6242: ; 6242: 6242: return __atomic_compare_exchange_n(&_M_p, &__p1, __p2, 0, __m1, __m2); 6242: } 6242: 6242: inline __attribute__((__always_inline__)) __pointer_type 6242: fetch_add(ptrdiff_t __d, 6242: memory_order __m = memory_order_seq_cst) noexcept 6242: { return __atomic_fetch_add(&_M_p, _M_type_size(__d), __m); } 6242: 6242: inline __attribute__((__always_inline__)) __pointer_type 6242: fetch_add(ptrdiff_t __d, 6242: memory_order __m = memory_order_seq_cst) volatile noexcept 6242: { return __atomic_fetch_add(&_M_p, _M_type_size(__d), __m); } 6242: 6242: inline __attribute__((__always_inline__)) __pointer_type 6242: fetch_sub(ptrdiff_t __d, 6242: memory_order __m = memory_order_seq_cst) noexcept 6242: { return __atomic_fetch_sub(&_M_p, _M_type_size(__d), __m); } 6242: 6242: inline __attribute__((__always_inline__)) __pointer_type 6242: fetch_sub(ptrdiff_t __d, 6242: memory_order __m = memory_order_seq_cst) volatile noexcept 6242: { return __atomic_fetch_sub(&_M_p, _M_type_size(__d), __m); } 6242: }; 6242: 6242: 6242: 6242: 6242: } 6242: # 34 "/usr/include/c++/8/bits/shared_ptr_atomic.h" 2 3 6242: 6242: namespace std __attribute__ ((__visibility__ ("default"))) 6242: { 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: struct _Sp_locker 6242: { 6242: _Sp_locker(const _Sp_locker&) = delete; 6242: _Sp_locker& operator=(const _Sp_locker&) = delete; 6242: 6242: 6242: explicit 6242: _Sp_locker(const void*) noexcept; 6242: _Sp_locker(const void*, const void*) noexcept; 6242: ~_Sp_locker(); 6242: 6242: private: 6242: unsigned char _M_key1; 6242: unsigned char _M_key2; 6242: 6242: 6242: 6242: }; 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: template 6242: inline bool 6242: atomic_is_lock_free(const __shared_ptr<_Tp, _Lp>* __p) 6242: { 6242: 6242: return __gthread_active_p() == 0; 6242: 6242: 6242: 6242: } 6242: 6242: template 6242: inline bool 6242: atomic_is_lock_free(const shared_ptr<_Tp>* __p) 6242: { return std::atomic_is_lock_free<_Tp, __default_lock_policy>(__p); } 6242: # 96 "/usr/include/c++/8/bits/shared_ptr_atomic.h" 3 6242: template 6242: inline shared_ptr<_Tp> 6242: atomic_load_explicit(const shared_ptr<_Tp>* __p, memory_order) 6242: { 6242: _Sp_locker __lock{__p}; 6242: return *__p; 6242: } 6242: 6242: template 6242: inline shared_ptr<_Tp> 6242: atomic_load(const shared_ptr<_Tp>* __p) 6242: { return std::atomic_load_explicit(__p, memory_order_seq_cst); } 6242: 6242: template 6242: inline __shared_ptr<_Tp, _Lp> 6242: atomic_load_explicit(const __shared_ptr<_Tp, _Lp>* __p, memory_order) 6242: { 6242: _Sp_locker __lock{__p}; 6242: return *__p; 6242: } 6242: 6242: template 6242: inline __shared_ptr<_Tp, _Lp> 6242: atomic_load(const __shared_ptr<_Tp, _Lp>* __p) 6242: { return std::atomic_load_explicit(__p, memory_order_seq_cst); } 6242: # 132 "/usr/include/c++/8/bits/shared_ptr_atomic.h" 3 6242: template 6242: inline void 6242: atomic_store_explicit(shared_ptr<_Tp>* __p, shared_ptr<_Tp> __r, 6242: memory_order) 6242: { 6242: _Sp_locker __lock{__p}; 6242: __p->swap(__r); 6242: } 6242: 6242: template 6242: inline void 6242: atomic_store(shared_ptr<_Tp>* __p, shared_ptr<_Tp> __r) 6242: { std::atomic_store_explicit(__p, std::move(__r), memory_order_seq_cst); } 6242: 6242: template 6242: inline void 6242: atomic_store_explicit(__shared_ptr<_Tp, _Lp>* __p, 6242: __shared_ptr<_Tp, _Lp> __r, 6242: memory_order) 6242: { 6242: _Sp_locker __lock{__p}; 6242: __p->swap(__r); 6242: } 6242: 6242: template 6242: inline void 6242: atomic_store(__shared_ptr<_Tp, _Lp>* __p, __shared_ptr<_Tp, _Lp> __r) 6242: { std::atomic_store_explicit(__p, std::move(__r), memory_order_seq_cst); } 6242: # 169 "/usr/include/c++/8/bits/shared_ptr_atomic.h" 3 6242: template 6242: inline shared_ptr<_Tp> 6242: atomic_exchange_explicit(shared_ptr<_Tp>* __p, shared_ptr<_Tp> __r, 6242: memory_order) 6242: { 6242: _Sp_locker __lock{__p}; 6242: __p->swap(__r); 6242: return __r; 6242: } 6242: 6242: template 6242: inline shared_ptr<_Tp> 6242: atomic_exchange(shared_ptr<_Tp>* __p, shared_ptr<_Tp> __r) 6242: { 6242: return std::atomic_exchange_explicit(__p, std::move(__r), 6242: memory_order_seq_cst); 6242: } 6242: 6242: template 6242: inline __shared_ptr<_Tp, _Lp> 6242: atomic_exchange_explicit(__shared_ptr<_Tp, _Lp>* __p, 6242: __shared_ptr<_Tp, _Lp> __r, 6242: memory_order) 6242: { 6242: _Sp_locker __lock{__p}; 6242: __p->swap(__r); 6242: return __r; 6242: } 6242: 6242: template 6242: inline __shared_ptr<_Tp, _Lp> 6242: atomic_exchange(__shared_ptr<_Tp, _Lp>* __p, __shared_ptr<_Tp, _Lp> __r) 6242: { 6242: return std::atomic_exchange_explicit(__p, std::move(__r), 6242: memory_order_seq_cst); 6242: } 6242: # 218 "/usr/include/c++/8/bits/shared_ptr_atomic.h" 3 6242: template 6242: bool 6242: atomic_compare_exchange_strong_explicit(shared_ptr<_Tp>* __p, 6242: shared_ptr<_Tp>* __v, 6242: shared_ptr<_Tp> __w, 6242: memory_order, 6242: memory_order) 6242: { 6242: shared_ptr<_Tp> __x; 6242: _Sp_locker __lock{__p, __v}; 6242: owner_less> __less; 6242: if (*__p == *__v && !__less(*__p, *__v) && !__less(*__v, *__p)) 6242: { 6242: __x = std::move(*__p); 6242: *__p = std::move(__w); 6242: return true; 6242: } 6242: __x = std::move(*__v); 6242: *__v = *__p; 6242: return false; 6242: } 6242: 6242: template 6242: inline bool 6242: atomic_compare_exchange_strong(shared_ptr<_Tp>* __p, shared_ptr<_Tp>* __v, 6242: shared_ptr<_Tp> __w) 6242: { 6242: return std::atomic_compare_exchange_strong_explicit(__p, __v, 6242: std::move(__w), memory_order_seq_cst, memory_order_seq_cst); 6242: } 6242: 6242: template 6242: inline bool 6242: atomic_compare_exchange_weak_explicit(shared_ptr<_Tp>* __p, 6242: shared_ptr<_Tp>* __v, 6242: shared_ptr<_Tp> __w, 6242: memory_order __success, 6242: memory_order __failure) 6242: { 6242: return std::atomic_compare_exchange_strong_explicit(__p, __v, 6242: std::move(__w), __success, __failure); 6242: } 6242: 6242: template 6242: inline bool 6242: atomic_compare_exchange_weak(shared_ptr<_Tp>* __p, shared_ptr<_Tp>* __v, 6242: shared_ptr<_Tp> __w) 6242: { 6242: return std::atomic_compare_exchange_weak_explicit(__p, __v, 6242: std::move(__w), memory_order_seq_cst, memory_order_seq_cst); 6242: } 6242: 6242: template 6242: bool 6242: atomic_compare_exchange_strong_explicit(__shared_ptr<_Tp, _Lp>* __p, 6242: __shared_ptr<_Tp, _Lp>* __v, 6242: __shared_ptr<_Tp, _Lp> __w, 6242: memory_order, 6242: memory_order) 6242: { 6242: __shared_ptr<_Tp, _Lp> __x; 6242: _Sp_locker __lock{__p, __v}; 6242: owner_less<__shared_ptr<_Tp, _Lp>> __less; 6242: if (*__p == *__v && !__less(*__p, *__v) && !__less(*__v, *__p)) 6242: { 6242: __x = std::move(*__p); 6242: *__p = std::move(__w); 6242: return true; 6242: } 6242: __x = std::move(*__v); 6242: *__v = *__p; 6242: return false; 6242: } 6242: 6242: template 6242: inline bool 6242: atomic_compare_exchange_strong(__shared_ptr<_Tp, _Lp>* __p, 6242: __shared_ptr<_Tp, _Lp>* __v, 6242: __shared_ptr<_Tp, _Lp> __w) 6242: { 6242: return std::atomic_compare_exchange_strong_explicit(__p, __v, 6242: std::move(__w), memory_order_seq_cst, memory_order_seq_cst); 6242: } 6242: 6242: template 6242: inline bool 6242: atomic_compare_exchange_weak_explicit(__shared_ptr<_Tp, _Lp>* __p, 6242: __shared_ptr<_Tp, _Lp>* __v, 6242: __shared_ptr<_Tp, _Lp> __w, 6242: memory_order __success, 6242: memory_order __failure) 6242: { 6242: return std::atomic_compare_exchange_strong_explicit(__p, __v, 6242: std::move(__w), __success, __failure); 6242: } 6242: 6242: template 6242: inline bool 6242: atomic_compare_exchange_weak(__shared_ptr<_Tp, _Lp>* __p, 6242: __shared_ptr<_Tp, _Lp>* __v, 6242: __shared_ptr<_Tp, _Lp> __w) 6242: { 6242: return std::atomic_compare_exchange_weak_explicit(__p, __v, 6242: std::move(__w), memory_order_seq_cst, memory_order_seq_cst); 6242: } 6242: 6242: 6242: 6242: 6242: 6242: } 6242: # 83 "/usr/include/c++/8/memory" 2 3 6242: 6242: # 1 "/usr/include/c++/8/backward/auto_ptr.h" 1 3 6242: # 36 "/usr/include/c++/8/backward/auto_ptr.h" 3 6242: namespace std __attribute__ ((__visibility__ ("default"))) 6242: { 6242: 6242: # 47 "/usr/include/c++/8/backward/auto_ptr.h" 3 6242: template 6242: struct auto_ptr_ref 6242: { 6242: _Tp1* _M_ptr; 6242: 6242: explicit 6242: auto_ptr_ref(_Tp1* __p): _M_ptr(__p) { } 6242: } __attribute__ ((__deprecated__)); 6242: 6242: #pragma GCC diagnostic push 6242: #pragma GCC diagnostic ignored "-Wdeprecated-declarations" 6242: # 88 "/usr/include/c++/8/backward/auto_ptr.h" 3 6242: template 6242: class auto_ptr 6242: { 6242: private: 6242: _Tp* _M_ptr; 6242: 6242: public: 6242: 6242: typedef _Tp element_type; 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: explicit 6242: auto_ptr(element_type* __p = 0) throw() : _M_ptr(__p) { } 6242: # 114 "/usr/include/c++/8/backward/auto_ptr.h" 3 6242: auto_ptr(auto_ptr& __a) throw() : _M_ptr(__a.release()) { } 6242: # 126 "/usr/include/c++/8/backward/auto_ptr.h" 3 6242: template 6242: auto_ptr(auto_ptr<_Tp1>& __a) throw() : _M_ptr(__a.release()) { } 6242: # 137 "/usr/include/c++/8/backward/auto_ptr.h" 3 6242: auto_ptr& 6242: operator=(auto_ptr& __a) throw() 6242: { 6242: reset(__a.release()); 6242: return *this; 6242: } 6242: # 154 "/usr/include/c++/8/backward/auto_ptr.h" 3 6242: template 6242: auto_ptr& 6242: operator=(auto_ptr<_Tp1>& __a) throw() 6242: { 6242: reset(__a.release()); 6242: return *this; 6242: } 6242: # 172 "/usr/include/c++/8/backward/auto_ptr.h" 3 6242: ~auto_ptr() { delete _M_ptr; } 6242: # 182 "/usr/include/c++/8/backward/auto_ptr.h" 3 6242: element_type& 6242: operator*() const throw() 6242: { 6242: ; 6242: return *_M_ptr; 6242: } 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: element_type* 6242: operator->() const throw() 6242: { 6242: ; 6242: return _M_ptr; 6242: } 6242: # 212 "/usr/include/c++/8/backward/auto_ptr.h" 3 6242: element_type* 6242: get() const throw() { return _M_ptr; } 6242: # 226 "/usr/include/c++/8/backward/auto_ptr.h" 3 6242: element_type* 6242: release() throw() 6242: { 6242: element_type* __tmp = _M_ptr; 6242: _M_ptr = 0; 6242: return __tmp; 6242: } 6242: # 241 "/usr/include/c++/8/backward/auto_ptr.h" 3 6242: void 6242: reset(element_type* __p = 0) throw() 6242: { 6242: if (__p != _M_ptr) 6242: { 6242: delete _M_ptr; 6242: _M_ptr = __p; 6242: } 6242: } 6242: # 266 "/usr/include/c++/8/backward/auto_ptr.h" 3 6242: auto_ptr(auto_ptr_ref __ref) throw() 6242: : _M_ptr(__ref._M_ptr) { } 6242: 6242: auto_ptr& 6242: operator=(auto_ptr_ref __ref) throw() 6242: { 6242: if (__ref._M_ptr != this->get()) 6242: { 6242: delete _M_ptr; 6242: _M_ptr = __ref._M_ptr; 6242: } 6242: return *this; 6242: } 6242: 6242: template 6242: operator auto_ptr_ref<_Tp1>() throw() 6242: { return auto_ptr_ref<_Tp1>(this->release()); } 6242: 6242: template 6242: operator auto_ptr<_Tp1>() throw() 6242: { return auto_ptr<_Tp1>(this->release()); } 6242: } __attribute__ ((__deprecated__)); 6242: 6242: 6242: 6242: template<> 6242: class auto_ptr 6242: { 6242: public: 6242: typedef void element_type; 6242: } __attribute__ ((__deprecated__)); 6242: 6242: 6242: template<_Lock_policy _Lp> 6242: template 6242: inline 6242: __shared_count<_Lp>::__shared_count(std::auto_ptr<_Tp>&& __r) 6242: : _M_pi(new _Sp_counted_ptr<_Tp*, _Lp>(__r.get())) 6242: { __r.release(); } 6242: 6242: template 6242: template 6242: inline 6242: __shared_ptr<_Tp, _Lp>::__shared_ptr(std::auto_ptr<_Tp1>&& __r) 6242: : _M_ptr(__r.get()), _M_refcount() 6242: { 6242: 6242: static_assert( sizeof(_Tp1) > 0, "incomplete type" ); 6242: _Tp1* __tmp = __r.get(); 6242: _M_refcount = __shared_count<_Lp>(std::move(__r)); 6242: _M_enable_shared_from_this_with(__tmp); 6242: } 6242: 6242: template 6242: template 6242: inline 6242: shared_ptr<_Tp>::shared_ptr(std::auto_ptr<_Tp1>&& __r) 6242: : __shared_ptr<_Tp>(std::move(__r)) { } 6242: 6242: template 6242: template 6242: inline 6242: unique_ptr<_Tp, _Dp>::unique_ptr(auto_ptr<_Up>&& __u) noexcept 6242: : _M_t(__u.release(), deleter_type()) { } 6242: 6242: 6242: #pragma GCC diagnostic pop 6242: 6242: 6242: } 6242: # 85 "/usr/include/c++/8/memory" 2 3 6242: # 93 "/usr/include/c++/8/memory" 3 6242: namespace std __attribute__ ((__visibility__ ("default"))) 6242: { 6242: 6242: # 113 "/usr/include/c++/8/memory" 3 6242: inline void* 6242: align(size_t __align, size_t __size, void*& __ptr, size_t& __space) noexcept 6242: { 6242: const auto __intptr = reinterpret_cast(__ptr); 6242: const auto __aligned = (__intptr - 1u + __align) & -__align; 6242: const auto __diff = __aligned - __intptr; 6242: if ((__size + __diff) > __space) 6242: return nullptr; 6242: else 6242: { 6242: __space -= __diff; 6242: return __ptr = reinterpret_cast(__aligned); 6242: } 6242: } 6242: 6242: 6242: 6242: enum class pointer_safety { relaxed, preferred, strict }; 6242: 6242: inline void 6242: declare_reachable(void*) { } 6242: 6242: template 6242: inline _Tp* 6242: undeclare_reachable(_Tp* __p) { return __p; } 6242: 6242: inline void 6242: declare_no_pointers(char*, size_t) { } 6242: 6242: inline void 6242: undeclare_no_pointers(char*, size_t) { } 6242: 6242: inline pointer_safety 6242: get_pointer_safety() noexcept { return pointer_safety::relaxed; } 6242: 6242: 6242: } 6242: # 12 "option_manager.hh" 2 6242: 6242: 6242: 6242: # 14 "option_manager.hh" 6242: namespace Kakoune 6242: { 6242: 6242: class OptionManager; 6242: 6242: enum class OptionFlags 6242: { 6242: None = 0, 6242: Hidden = 1, 6242: }; 6242: 6242: template<> struct WithBitOps : std::true_type {}; 6242: 6242: class OptionDesc 6242: { 6242: public: 6242: OptionDesc(String name, String docstring, OptionFlags flags); 6242: 6242: const String& name() const { return m_name; } 6242: const String& docstring() const { return m_docstring; } 6242: 6242: OptionFlags flags() const { return m_flags; } 6242: 6242: private: 6242: String m_name; 6242: String m_docstring; 6242: OptionFlags m_flags; 6242: }; 6242: 6242: class Option 6242: { 6242: public: 6242: virtual ~Option() = default; 6242: 6242: template const T& get() const; 6242: template T& get_mutable(); 6242: template void set(const T& val, bool notify=true); 6242: template bool is_of_type() const; 6242: 6242: virtual String get_as_string() const = 0; 6242: virtual void set_from_string(StringView str) = 0; 6242: virtual void add_from_string(StringView str) = 0; 6242: 6242: virtual Option* clone(OptionManager& manager) const = 0; 6242: OptionManager& manager() const { return m_manager; } 6242: 6242: const String& name() const { return m_desc.name(); } 6242: const String& docstring() const { return m_desc.docstring(); } 6242: OptionFlags flags() const { return m_desc.flags(); } 6242: 6242: protected: 6242: Option(const OptionDesc& desc, OptionManager& manager); 6242: 6242: OptionManager& m_manager; 6242: const OptionDesc& m_desc; 6242: }; 6242: 6242: class OptionManagerWatcher 6242: { 6242: public: 6242: virtual ~OptionManagerWatcher() {} 6242: 6242: virtual void on_option_changed(const Option& option) = 0; 6242: }; 6242: 6242: class OptionManager : private OptionManagerWatcher 6242: { 6242: public: 6242: OptionManager(OptionManager& parent); 6242: ~OptionManager(); 6242: 6242: Option& operator[] (StringView name); 6242: const Option& operator[] (StringView name) const; 6242: Option& get_local_option(StringView name); 6242: 6242: void unset_option(StringView name); 6242: 6242: using OptionList = Vector; 6242: OptionList flatten_options() const; 6242: 6242: void register_watcher(OptionManagerWatcher& watcher) const; 6242: void unregister_watcher(OptionManagerWatcher& watcher) const; 6242: 6242: void on_option_changed(const Option& option) override; 6242: private: 6242: OptionManager() 6242: : m_parent(nullptr) {} 6242: 6242: friend class Scope; 6242: friend class OptionsRegistry; 6242: 6242: Vector, MemoryDomain::Options> m_options; 6242: OptionManager* m_parent; 6242: 6242: mutable Vector m_watchers; 6242: }; 6242: 6242: template 6242: class TypedOption : public Option 6242: { 6242: public: 6242: TypedOption(OptionManager& manager, const OptionDesc& desc, const T& value) 6242: : Option(desc, manager), m_value(value) {} 6242: 6242: void set(T value, bool notify = true) 6242: { 6242: validate(value); 6242: if (m_value != value) 6242: { 6242: m_value = std::move(value); 6242: if (notify) 6242: manager().on_option_changed(*this); 6242: } 6242: } 6242: const T& get() const { return m_value; } 6242: T& get_mutable() { return m_value; } 6242: 6242: String get_as_string() const override 6242: { 6242: return option_to_string(m_value); 6242: } 6242: void set_from_string(StringView str) override 6242: { 6242: T val; 6242: option_from_string(str, val); 6242: set(std::move(val)); 6242: } 6242: void add_from_string(StringView str) override 6242: { 6242: if (option_add(m_value, str)) 6242: m_manager.on_option_changed(*this); 6242: } 6242: 6242: using Alloc = Allocator; 6242: static void* operator new (std::size_t sz) 6242: { 6242: if (not (sz == sizeof(TypedOption))) on_assert_failed("assert failed \"" "sz == sizeof(TypedOption)" "\" at " "option_manager.hh" ":" "150"); 6242: return Alloc{}.allocate(1); 6242: } 6242: 6242: static void operator delete (void* ptr) 6242: { 6242: return Alloc{}.deallocate(reinterpret_cast(ptr), 1); 6242: } 6242: private: 6242: virtual void validate(const T& value) const {} 6242: T m_value; 6242: }; 6242: 6242: template 6242: class TypedCheckedOption : public TypedOption 6242: { 6242: using TypedOption::TypedOption; 6242: 6242: Option* clone(OptionManager& manager) const override 6242: { 6242: return new TypedCheckedOption{manager, this->m_desc, this->get()}; 6242: } 6242: 6242: void validate(const T& value) const override { if (validator != nullptr) validator(value); } 6242: }; 6242: 6242: template const T& Option::get() const 6242: { 6242: auto* typed_opt = dynamic_cast*>(this); 6242: if (not typed_opt) 6242: throw runtime_error(format("option '{}' is not of type '{}'", name(), typeid(T).name())); 6242: return typed_opt->get(); 6242: } 6242: 6242: template T& Option::get_mutable() 6242: { 6242: return const_cast(get()); 6242: } 6242: 6242: template void Option::set(const T& val, bool notify) 6242: { 6242: auto* typed_opt = dynamic_cast*>(this); 6242: if (not typed_opt) 6242: throw runtime_error(format("option '{}' is not of type '{}'", name(), typeid(T).name())); 6242: return typed_opt->set(val, notify); 6242: } 6242: 6242: template bool Option::is_of_type() const 6242: { 6242: return dynamic_cast*>(this) != nullptr; 6242: } 6242: 6242: template 6242: auto find_option(T& container, StringView name) -> decltype(container.begin()) 6242: { 6242: using ptr_type = decltype(*container.begin()); 6242: return find_if(container, [&name](const ptr_type& opt) { return opt->name() == name; }); 6242: } 6242: 6242: class OptionsRegistry 6242: { 6242: public: 6242: OptionsRegistry(OptionManager& global_manager) : m_global_manager(global_manager) {} 6242: 6242: template 6242: Option& declare_option(StringView name, StringView docstring, 6242: const T& value, 6242: OptionFlags flags = OptionFlags::None) 6242: { 6242: auto is_not_identifier = [](char c) { 6242: return (c < 'a' or c > 'z') and 6242: (c < 'A' or c > 'Z') and 6242: (c < '0' or c > '9') and c != '_'; 6242: }; 6242: 6242: if (contains_that(name, is_not_identifier)) 6242: throw runtime_error{format("name '{}' contains char out of [a-zA-Z0-9_]", name)}; 6242: 6242: auto& opts = m_global_manager.m_options; 6242: auto it = find_option(opts, name); 6242: if (it != opts.end()) 6242: { 6242: if ((*it)->is_of_type() and (*it)->flags() == flags) 6242: return **it; 6242: throw runtime_error{format("option '{}' already declared with different type or flags", name)}; 6242: } 6242: String doc = docstring.empty() ? format("[{}]", option_type_name::name()) 6242: : format("[{}] - {}", option_type_name::name(), docstring); 6242: m_descs.emplace_back(new OptionDesc{name.str(), std::move(doc), flags}); 6242: opts.emplace_back(new TypedCheckedOption{m_global_manager, *m_descs.back(), value}); 6242: return *opts.back(); 6242: } 6242: 6242: const OptionDesc* option_desc(StringView name) const 6242: { 6242: auto it = find_if(m_descs, 6242: [&name](const std::unique_ptr& opt) 6242: { return opt->name() == name; }); 6242: return it != m_descs.end() ? it->get() : nullptr; 6242: } 6242: 6242: bool option_exists(StringView name) const { return option_desc(name) != nullptr; } 6242: 6242: CandidateList complete_option_name(StringView prefix, ByteCount cursor_pos) const; 6242: private: 6242: OptionManager& m_global_manager; 6242: Vector, MemoryDomain::Options> m_descs; 6242: }; 6242: 6242: } 6242: # 8 "scope.hh" 2 6242: # 1 "utils.hh" 1 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: namespace Kakoune 6242: { 6242: 6242: 6242: 6242: 6242: 6242: template 6242: class Singleton 6242: { 6242: public: 6242: Singleton(const Singleton&) = delete; 6242: Singleton& operator=(const Singleton&) = delete; 6242: 6242: static T& instance() 6242: { 6242: if (not (ms_instance)) on_assert_failed("assert failed \"" "ms_instance" "\" at " "utils.hh" ":" "24"); 6242: return *ms_instance; 6242: } 6242: 6242: static bool has_instance() 6242: { 6242: return ms_instance != nullptr; 6242: } 6242: 6242: protected: 6242: Singleton() 6242: { 6242: if (not (not ms_instance)) on_assert_failed("assert failed \"" "not ms_instance" "\" at " "utils.hh" ":" "36"); 6242: ms_instance = static_cast(this); 6242: } 6242: 6242: ~Singleton() 6242: { 6242: if (not (ms_instance == this)) on_assert_failed("assert failed \"" "ms_instance == this" "\" at " "utils.hh" ":" "42"); 6242: ms_instance = nullptr; 6242: } 6242: 6242: private: 6242: static T* ms_instance; 6242: }; 6242: 6242: template 6242: T* Singleton::ms_instance = nullptr; 6242: # 63 "utils.hh" 6242: template 6242: class OnScopeEnd 6242: { 6242: public: 6242: [[gnu::always_inline]] 6242: OnScopeEnd(T func) : m_func(std::move(func)) {} 6242: 6242: [[gnu::always_inline]] 6242: ~OnScopeEnd() { m_func(); } 6242: private: 6242: T m_func; 6242: }; 6242: 6242: template 6242: OnScopeEnd on_scope_end(T t) 6242: { 6242: return OnScopeEnd(t); 6242: } 6242: 6242: 6242: 6242: template 6242: std::unique_ptr make_unique(Args&&... args) 6242: { 6242: return std::unique_ptr(new T(std::forward(args)...)); 6242: } 6242: 6242: template 6242: bool operator== (const std::unique_ptr& lhs, T* rhs) 6242: { 6242: return lhs.get() == rhs; 6242: } 6242: 6242: template 6242: const T& clamp(const T& val, const T& min, const T& max) 6242: { 6242: return (val < min ? min : (val > max ? max : val)); 6242: } 6242: 6242: template 6242: bool skip_while(Iterator& it, const EndIterator& end, T condition) 6242: { 6242: while (it != end and condition(*it)) 6242: ++it; 6242: return it != end; 6242: } 6242: 6242: template 6242: bool skip_while_reverse(Iterator& it, const BeginIterator& begin, T condition) 6242: { 6242: while (it != begin and condition(*it)) 6242: --it; 6242: return condition(*it); 6242: } 6242: 6242: } 6242: # 9 "scope.hh" 2 6242: 6242: namespace Kakoune 6242: { 6242: 6242: class Scope 6242: { 6242: public: 6242: Scope(Scope& parent) 6242: : m_options(parent.options()), 6242: m_hooks(parent.hooks()), 6242: m_keymaps(parent.keymaps()), 6242: m_aliases(parent.aliases()) {} 6242: 6242: OptionManager& options() { return m_options; } 6242: const OptionManager& options() const { return m_options; } 6242: HookManager& hooks() { return m_hooks; } 6242: const HookManager& hooks() const { return m_hooks; } 6242: KeymapManager& keymaps() { return m_keymaps; } 6242: const KeymapManager& keymaps() const { return m_keymaps; } 6242: AliasRegistry& aliases() { return m_aliases; } 6242: const AliasRegistry& aliases() const { return m_aliases; } 6242: 6242: private: 6242: friend class GlobalScope; 6242: Scope() = default; 6242: 6242: OptionManager m_options; 6242: HookManager m_hooks; 6242: KeymapManager m_keymaps; 6242: AliasRegistry m_aliases; 6242: }; 6242: 6242: class GlobalScope : public Scope, public Singleton 6242: { 6242: public: 6242: GlobalScope() : m_option_registry(m_options) {} 6242: 6242: OptionsRegistry& option_registry() { return m_option_registry; } 6242: const OptionsRegistry& option_registry() const { return m_option_registry; } 6242: private: 6242: OptionsRegistry m_option_registry; 6242: }; 6242: 6242: } 6242: # 9 "buffer.hh" 2 6242: # 1 "shared_string.hh" 1 6242: # 9 "shared_string.hh" 6242: namespace Kakoune 6242: { 6242: 6242: struct StringData : UseMemoryDomain 6242: { 6242: int refcount; 6242: int length; 6242: uint32_t hash; 6242: 6242: StringData(int ref, int len) : refcount(ref), length(len) {} 6242: 6242: [[gnu::always_inline]] 6242: char* data() { return reinterpret_cast(this + 1); } 6242: [[gnu::always_inline]] 6242: const char* data() const { return reinterpret_cast(this + 1); } 6242: [[gnu::always_inline]] 6242: StringView strview() const { return {data(), length}; } 6242: 6242: struct PtrPolicy 6242: { 6242: static void inc_ref(StringData* r, void*) { ++r->refcount; } 6242: static void dec_ref(StringData* r, void*) { if (--r->refcount == 0) delete r; } 6242: static void ptr_moved(StringData*, void*, void*) noexcept {} 6242: }; 6242: 6242: static RefPtr create(StringView str, char back = 0) 6242: { 6242: const int len = (int)str.length() + (back != 0 ? 1 : 0); 6242: void* ptr = StringData::operator new(sizeof(StringData) + len + 1); 6242: StringData* res = new (ptr) StringData(0, len); 6242: std::copy(str.begin(), str.end(), res->data()); 6242: if (back != 0) 6242: res->data()[len-1] = back; 6242: res->data()[len] = 0; 6242: res->hash = hash_data(res->data(), res->length); 6242: return RefPtr{res}; 6242: } 6242: 6242: static void destroy(StringData* s) 6242: { 6242: StringData::operator delete(s, sizeof(StringData) + s->length + 1); 6242: } 6242: 6242: friend void inc_ref_count(StringData* s, void*) 6242: { 6242: ++s->refcount; 6242: } 6242: 6242: friend void dec_ref_count(StringData* s, void*) 6242: { 6242: if (--s->refcount == 0) 6242: StringData::destroy(s); 6242: } 6242: }; 6242: 6242: using StringDataPtr = RefPtr; 6242: 6242: class StringRegistry : public Singleton 6242: { 6242: public: 6242: void debug_stats() const; 6242: StringDataPtr intern(StringView str); 6242: void purge_unused(); 6242: 6242: private: 6242: UnorderedMap m_strings; 6242: }; 6242: 6242: inline StringDataPtr intern(StringView str) 6242: { 6242: return StringRegistry::instance().intern(str); 6242: } 6242: 6242: } 6242: # 10 "buffer.hh" 2 6242: # 1 "value.hh" 1 6242: # 10 "value.hh" 6242: namespace Kakoune 6242: { 6242: 6242: struct bad_value_cast {}; 6242: 6242: struct Value 6242: { 6242: Value() = default; 6242: 6242: template::value>::type> 6242: Value(T&& val) 6242: : m_value{new Model::type>{std::forward(val)}} {} 6242: 6242: Value(const Value& val) = delete; 6242: Value(Value&&) = default; 6242: 6242: Value& operator=(const Value& val) = delete; 6242: Value& operator=(Value&& val) = default; 6242: 6242: explicit operator bool() const { return (bool)m_value; } 6242: 6242: template 6242: bool is_a() const 6242: { 6242: return m_value and m_value->type() == typeid(T); 6242: } 6242: 6242: template 6242: T& as() 6242: { 6242: if (not is_a()) 6242: throw bad_value_cast{}; 6242: return static_cast*>(m_value.get())->m_content; 6242: } 6242: 6242: template 6242: const T& as() const 6242: { 6242: return const_cast(this)->as(); 6242: } 6242: 6242: private: 6242: struct Concept 6242: { 6242: virtual ~Concept() {} 6242: virtual const std::type_info& type() const = 0; 6242: }; 6242: 6242: template 6242: struct Model : public Concept, public UseMemoryDomain 6242: { 6242: Model(T&& val) : m_content(std::move(val)) {} 6242: const std::type_info& type() const override { return typeid(T); } 6242: 6242: T m_content; 6242: }; 6242: 6242: std::unique_ptr m_value; 6242: }; 6242: 6242: enum class ValueId : int {}; 6242: 6242: inline ValueId get_free_value_id() 6242: { 6242: static int next = 0; 6242: return (ValueId)(next++); 6242: } 6242: 6242: using ValueMap = UnorderedMap; 6242: 6242: } 6242: # 11 "buffer.hh" 2 6242: 6242: 6242: 6242: 6242: namespace Kakoune 6242: { 6242: 6242: enum class EolFormat 6242: { 6242: Lf, 6242: Crlf 6242: }; 6242: 6242: constexpr Array, 2> enum_desc(EolFormat) 6242: { 6242: return { { 6242: { EolFormat::Lf, "lf" }, 6242: { EolFormat::Crlf, "crlf" }, 6242: } }; 6242: } 6242: 6242: enum class ByteOrderMark 6242: { 6242: None, 6242: Utf8 6242: }; 6242: 6242: constexpr Array, 2> enum_desc(ByteOrderMark) 6242: { 6242: return { { 6242: { ByteOrderMark::None, "none" }, 6242: { ByteOrderMark::Utf8, "utf8" }, 6242: } }; 6242: } 6242: 6242: class Buffer; 6242: 6242: constexpr timespec InvalidTime = { -1, -1 }; 6242: 6242: 6242: class BufferIterator 6242: { 6242: public: 6242: using value_type = char; 6242: using difference_type = ssize_t; 6242: using pointer = const value_type*; 6242: using reference = const value_type&; 6242: using iterator_category = std::random_access_iterator_tag; 6242: 6242: BufferIterator() : m_buffer(nullptr) {} 6242: BufferIterator(const Buffer& buffer, BufferCoord coord); 6242: 6242: bool operator== (const BufferIterator& iterator) const; 6242: bool operator!= (const BufferIterator& iterator) const; 6242: bool operator< (const BufferIterator& iterator) const; 6242: bool operator<= (const BufferIterator& iterator) const; 6242: bool operator> (const BufferIterator& iterator) const; 6242: bool operator>= (const BufferIterator& iterator) const; 6242: 6242: const char& operator* () const; 6242: const char& operator[](size_t n) const; 6242: size_t operator- (const BufferIterator& iterator) const; 6242: 6242: BufferIterator operator+ (ByteCount size) const; 6242: BufferIterator operator- (ByteCount size) const; 6242: 6242: BufferIterator& operator+= (ByteCount size); 6242: BufferIterator& operator-= (ByteCount size); 6242: 6242: BufferIterator& operator++ (); 6242: BufferIterator& operator-- (); 6242: 6242: BufferIterator operator++ (int); 6242: BufferIterator operator-- (int); 6242: 6242: const BufferCoord& coord() const { return m_coord; } 6242: 6242: private: 6242: SafePtr m_buffer; 6242: StringView m_line; 6242: BufferCoord m_coord; 6242: LineCount m_last_line; 6242: }; 6242: 6242: using BufferLines = Vector; 6242: 6242: 6242: 6242: 6242: 6242: 6242: class Buffer : public SafeCountable, public OptionManagerWatcher, public Scope 6242: { 6242: public: 6242: enum class Flags 6242: { 6242: None = 0, 6242: File = 1 << 0, 6242: New = 1 << 1, 6242: Fifo = 1 << 2, 6242: NoUndo = 1 << 3, 6242: NoHooks = 1 << 4, 6242: Debug = 1 << 5, 6242: ReadOnly = 1 << 6, 6242: }; 6242: 6242: Buffer(String name, Flags flags, StringView data = {}, 6242: timespec fs_timestamp = InvalidTime); 6242: Buffer(const Buffer&) = delete; 6242: Buffer& operator= (const Buffer&) = delete; 6242: ~Buffer(); 6242: 6242: Flags flags() const { return m_flags; } 6242: Flags& flags() { return m_flags; } 6242: 6242: bool set_name(String name); 6242: void update_display_name(); 6242: 6242: BufferCoord insert(BufferCoord pos, StringView content); 6242: BufferCoord erase(BufferCoord begin, BufferCoord end); 6242: BufferCoord replace(BufferCoord begin, BufferCoord end, StringView content); 6242: 6242: size_t timestamp() const; 6242: timespec fs_timestamp() const; 6242: void set_fs_timestamp(timespec ts); 6242: 6242: void commit_undo_group(); 6242: bool undo(size_t count = 1) noexcept; 6242: bool redo(size_t count = 1) noexcept; 6242: bool move_to(size_t history_id) noexcept; 6242: size_t current_history_id() const noexcept; 6242: 6242: String string(BufferCoord begin, BufferCoord end) const; 6242: 6242: const char& byte_at(BufferCoord c) const; 6242: ByteCount distance(BufferCoord begin, BufferCoord end) const; 6242: BufferCoord advance(BufferCoord coord, ByteCount count) const; 6242: BufferCoord next(BufferCoord coord) const; 6242: BufferCoord prev(BufferCoord coord) const; 6242: 6242: BufferCoord char_next(BufferCoord coord) const; 6242: BufferCoord char_prev(BufferCoord coord) const; 6242: 6242: BufferCoord back_coord() const; 6242: BufferCoord end_coord() const; 6242: 6242: bool is_valid(BufferCoord c) const; 6242: bool is_end(BufferCoord c) const; 6242: 6242: BufferCoord last_modification_coord() const; 6242: 6242: BufferIterator begin() const; 6242: BufferIterator end() const; 6242: LineCount line_count() const; 6242: 6242: StringView operator[](LineCount line) const 6242: { return m_lines[line]; } 6242: 6242: const StringDataPtr& line_storage(LineCount line) const 6242: { return m_lines.get_storage(line); } 6242: 6242: 6242: BufferIterator iterator_at(BufferCoord coord) const; 6242: 6242: 6242: BufferCoord clamp(BufferCoord coord) const; 6242: 6242: BufferCoord offset_coord(BufferCoord coord, CharCount offset); 6242: BufferCoordAndTarget offset_coord(BufferCoordAndTarget coord, LineCount offset); 6242: 6242: const String& name() const { return m_name; } 6242: const String& display_name() const { return m_display_name; } 6242: 6242: 6242: 6242: bool is_modified() const; 6242: 6242: 6242: void notify_saved(); 6242: 6242: ValueMap& values() const { return m_values; } 6242: 6242: void run_hook_in_own_context(StringView hook_name, StringView param, 6242: String client_name = ""); 6242: 6242: void reload(StringView data, timespec fs_timestamp = InvalidTime); 6242: 6242: void check_invariant() const; 6242: 6242: struct Change 6242: { 6242: enum Type : char { Insert, Erase }; 6242: Type type; 6242: bool at_end; 6242: BufferCoord begin; 6242: BufferCoord end; 6242: }; 6242: ConstArrayView changes_since(size_t timestamp) const; 6242: 6242: String debug_description() const; 6242: 6242: 6242: void on_registered(); 6242: void on_unregistered(); 6242: private: 6242: 6242: void on_option_changed(const Option& option) override; 6242: 6242: BufferCoord do_insert(BufferCoord pos, StringView content); 6242: BufferCoord do_erase(BufferCoord begin, BufferCoord end); 6242: 6242: struct Modification; 6242: 6242: void apply_modification(const Modification& modification); 6242: void revert_modification(const Modification& modification); 6242: 6242: struct LineList : BufferLines 6242: { 6242: [[gnu::always_inline]] 6242: StringDataPtr& get_storage(LineCount line) 6242: { return BufferLines::operator[]((int)line); } 6242: 6242: [[gnu::always_inline]] 6242: const StringDataPtr& get_storage(LineCount line) const 6242: { return BufferLines::operator[]((int)line); } 6242: 6242: [[gnu::always_inline]] 6242: StringView operator[](LineCount line) const 6242: { return get_storage(line)->strview(); } 6242: 6242: StringView front() const { return BufferLines::front()->strview(); } 6242: StringView back() const { return BufferLines::back()->strview(); } 6242: }; 6242: LineList m_lines; 6242: 6242: String m_name; 6242: String m_display_name; 6242: Flags m_flags; 6242: 6242: using UndoGroup = Vector; 6242: 6242: struct HistoryNode : SafeCountable, UseMemoryDomain 6242: { 6242: HistoryNode(size_t id, HistoryNode* parent); 6242: 6242: size_t id; 6242: SafePtr parent; 6242: UndoGroup undo_group; 6242: Vector, MemoryDomain::BufferMeta> children; 6242: SafePtr redo_child; 6242: TimePoint timepoint; 6242: }; 6242: 6242: size_t m_next_history_id = 0; 6242: HistoryNode m_history; 6242: SafePtr m_history_cursor; 6242: SafePtr m_last_save_history_cursor; 6242: UndoGroup m_current_undo_group; 6242: 6242: void move_to(HistoryNode* history_node) noexcept; 6242: 6242: template HistoryNode* find_history_node(HistoryNode* node, const Func& func); 6242: 6242: Vector m_changes; 6242: 6242: timespec m_fs_timestamp; 6242: 6242: 6242: 6242: mutable ValueMap m_values; 6242: }; 6242: 6242: template<> struct WithBitOps : std::true_type {}; 6242: 6242: } 6242: 6242: # 1 "buffer.inl.hh" 1 6242: 6242: 6242: 6242: 6242: 6242: namespace Kakoune 6242: { 6242: 6242: [[gnu::always_inline]] 6242: inline const char& Buffer::byte_at(BufferCoord c) const 6242: { 6242: if (not (c.line < line_count() and c.column < m_lines[c.line].length())) on_assert_failed("assert failed \"" "c.line < line_count() and c.column < m_lines[c.line].length()" "\" at " "buffer.inl.hh" ":" "12"); 6242: return m_lines[c.line][c.column]; 6242: } 6242: 6242: inline BufferCoord Buffer::next(BufferCoord coord) const 6242: { 6242: if (coord.column < m_lines[coord.line].length() - 1) 6242: ++coord.column; 6242: else if (coord.line == m_lines.size() - 1) 6242: coord.column = m_lines.back().length(); 6242: else 6242: { 6242: ++coord.line; 6242: coord.column = 0; 6242: } 6242: return coord; 6242: } 6242: 6242: inline BufferCoord Buffer::prev(BufferCoord coord) const 6242: { 6242: if (coord.column == 0) 6242: { 6242: if (coord.line > 0) 6242: coord.column = m_lines[--coord.line].length() - 1; 6242: } 6242: else 6242: --coord.column; 6242: return coord; 6242: } 6242: 6242: inline ByteCount Buffer::distance(BufferCoord begin, BufferCoord end) const 6242: { 6242: if (begin > end) 6242: return -distance(end, begin); 6242: if (begin.line == end.line) 6242: return end.column - begin.column; 6242: 6242: ByteCount res = m_lines[begin.line].length() - begin.column; 6242: for (LineCount l = begin.line+1; l < end.line; ++l) 6242: res += m_lines[l].length(); 6242: res += end.column; 6242: return res; 6242: } 6242: 6242: inline bool Buffer::is_valid(BufferCoord c) const 6242: { 6242: if (c.line < 0 or c.column < 0) 6242: return false; 6242: 6242: return (c.line < line_count() and c.column < m_lines[c.line].length()) or 6242: (c.line == line_count() - 1 and c.column == m_lines.back().length()) or 6242: (c.line == line_count() and c.column == 0); 6242: } 6242: 6242: inline bool Buffer::is_end(BufferCoord c) const 6242: { 6242: return c >= end_coord(); 6242: } 6242: 6242: inline BufferIterator Buffer::begin() const 6242: { 6242: return {*this, { 0_line, 0 }}; 6242: } 6242: 6242: inline BufferIterator Buffer::end() const 6242: { 6242: return {*this, end_coord()}; 6242: } 6242: 6242: [[gnu::always_inline]] 6242: inline LineCount Buffer::line_count() const 6242: { 6242: return LineCount(m_lines.size()); 6242: } 6242: 6242: inline size_t Buffer::timestamp() const 6242: { 6242: return m_changes.size(); 6242: } 6242: 6242: inline ConstArrayView Buffer::changes_since(size_t timestamp) const 6242: { 6242: if (timestamp < m_changes.size()) 6242: return { m_changes.data() + timestamp, 6242: m_changes.data() + m_changes.size() }; 6242: return {}; 6242: } 6242: 6242: inline BufferCoord Buffer::back_coord() const 6242: { 6242: return { line_count() - 1, m_lines.back().length() - 1 }; 6242: } 6242: 6242: inline BufferCoord Buffer::end_coord() const 6242: { 6242: return m_lines.empty() ? 6242: BufferCoord{0,0} : BufferCoord{ line_count() - 1, m_lines.back().length() }; 6242: } 6242: 6242: inline BufferIterator::BufferIterator(const Buffer& buffer, BufferCoord coord) 6242: : m_buffer(&buffer), m_coord(coord), 6242: m_line((*m_buffer)[coord.line]), 6242: m_last_line(buffer.line_count()-1) 6242: { 6242: if (not (m_buffer and m_buffer->is_valid(m_coord))) on_assert_failed("assert failed \"" "m_buffer and m_buffer->is_valid(m_coord)" "\" at " "buffer.inl.hh" ":" "116"); 6242: } 6242: 6242: inline bool BufferIterator::operator==(const BufferIterator& iterator) const 6242: { 6242: return m_buffer == iterator.m_buffer and m_coord == iterator.m_coord; 6242: } 6242: 6242: inline bool BufferIterator::operator!=(const BufferIterator& iterator) const 6242: { 6242: return m_buffer != iterator.m_buffer or m_coord != iterator.m_coord; 6242: } 6242: 6242: inline bool BufferIterator::operator<(const BufferIterator& iterator) const 6242: { 6242: if (not (m_buffer == iterator.m_buffer)) on_assert_failed("assert failed \"" "m_buffer == iterator.m_buffer" "\" at " "buffer.inl.hh" ":" "131"); 6242: return (m_coord < iterator.m_coord); 6242: } 6242: 6242: inline bool BufferIterator::operator<=(const BufferIterator& iterator) const 6242: { 6242: if (not (m_buffer == iterator.m_buffer)) on_assert_failed("assert failed \"" "m_buffer == iterator.m_buffer" "\" at " "buffer.inl.hh" ":" "137"); 6242: return (m_coord <= iterator.m_coord); 6242: } 6242: 6242: inline bool BufferIterator::operator>(const BufferIterator& iterator) const 6242: { 6242: if (not (m_buffer == iterator.m_buffer)) on_assert_failed("assert failed \"" "m_buffer == iterator.m_buffer" "\" at " "buffer.inl.hh" ":" "143"); 6242: return (m_coord > iterator.m_coord); 6242: } 6242: 6242: inline bool BufferIterator::operator>=(const BufferIterator& iterator) const 6242: { 6242: if (not (m_buffer == iterator.m_buffer)) on_assert_failed("assert failed \"" "m_buffer == iterator.m_buffer" "\" at " "buffer.inl.hh" ":" "149"); 6242: return (m_coord >= iterator.m_coord); 6242: } 6242: 6242: [[gnu::always_inline]] 6242: inline const char& BufferIterator::operator*() const 6242: { 6242: return m_line[m_coord.column]; 6242: } 6242: 6242: inline const char& BufferIterator::operator[](size_t n) const 6242: { 6242: return m_buffer->byte_at(m_buffer->advance(m_coord, n)); 6242: } 6242: 6242: inline size_t BufferIterator::operator-(const BufferIterator& iterator) const 6242: { 6242: if (not (m_buffer == iterator.m_buffer)) on_assert_failed("assert failed \"" "m_buffer == iterator.m_buffer" "\" at " "buffer.inl.hh" ":" "166"); 6242: return (size_t)m_buffer->distance(iterator.m_coord, m_coord); 6242: } 6242: 6242: inline BufferIterator BufferIterator::operator+(ByteCount size) const 6242: { 6242: if (not (m_buffer)) on_assert_failed("assert failed \"" "m_buffer" "\" at " "buffer.inl.hh" ":" "172"); 6242: return { *m_buffer, m_buffer->advance(m_coord, size) }; 6242: } 6242: 6242: inline BufferIterator BufferIterator::operator-(ByteCount size) const 6242: { 6242: return { *m_buffer, m_buffer->advance(m_coord, -size) }; 6242: } 6242: 6242: inline BufferIterator& BufferIterator::operator+=(ByteCount size) 6242: { 6242: m_coord = m_buffer->advance(m_coord, size); 6242: m_line = (*m_buffer)[m_coord.line]; 6242: return *this; 6242: } 6242: 6242: inline BufferIterator& BufferIterator::operator-=(ByteCount size) 6242: { 6242: m_coord = m_buffer->advance(m_coord, -size); 6242: m_line = (*m_buffer)[m_coord.line]; 6242: return *this; 6242: } 6242: 6242: inline BufferIterator& BufferIterator::operator++() 6242: { 6242: if (++m_coord.column == m_line.length() and m_coord.line != m_last_line) 6242: { 6242: m_line = (*m_buffer)[++m_coord.line]; 6242: m_coord.column = 0; 6242: } 6242: return *this; 6242: } 6242: 6242: inline BufferIterator& BufferIterator::operator--() 6242: { 6242: if (m_coord.column == 0 and m_coord.line > 0) 6242: { 6242: m_line = (*m_buffer)[--m_coord.line]; 6242: m_coord.column = m_line.length() - 1; 6242: } 6242: else 6242: --m_coord.column; 6242: return *this; 6242: } 6242: 6242: inline BufferIterator BufferIterator::operator++(int) 6242: { 6242: BufferIterator save = *this; 6242: ++*this; 6242: return save; 6242: } 6242: 6242: inline BufferIterator BufferIterator::operator--(int) 6242: { 6242: BufferIterator save = *this; 6242: --*this; 6242: return save; 6242: } 6242: 6242: } 6242: # 288 "buffer.hh" 2 6242: # 4 "normal.cc" 2 6242: # 1 "buffer_manager.hh" 1 6242: # 9 "buffer_manager.hh" 6242: namespace Kakoune 6242: { 6242: 6242: class BufferManager : public Singleton 6242: { 6242: public: 6242: using BufferList = Vector, MemoryDomain::BufferMeta>; 6242: using iterator = BufferList::const_iterator; 6242: 6242: ~BufferManager(); 6242: 6242: Buffer* create_buffer(String name, Buffer::Flags flags, 6242: StringView data = {}, 6242: timespec fs_timestamp = InvalidTime); 6242: 6242: void delete_buffer(Buffer& buffer); 6242: 6242: iterator begin() const { return m_buffers.cbegin(); } 6242: iterator end() const { return m_buffers.cend(); } 6242: size_t count() const { return m_buffers.size(); } 6242: 6242: Buffer* get_buffer_ifp(StringView name); 6242: Buffer& get_buffer(StringView name); 6242: 6242: Buffer& get_first_buffer(); 6242: 6242: void backup_modified_buffers(); 6242: 6242: void clear_buffer_trash(); 6242: private: 6242: BufferList m_buffers; 6242: BufferList m_buffer_trash; 6242: }; 6242: 6242: } 6242: # 5 "normal.cc" 2 6242: # 1 "buffer_utils.hh" 1 6242: 6242: 6242: 6242: 6242: # 1 "selection.hh" 1 6242: 6242: 6242: 6242: 6242: 6242: namespace Kakoune 6242: { 6242: 6242: using CaptureList = Vector; 6242: 6242: 6242: struct Selection 6242: { 6242: static constexpr MemoryDomain Domain = MemoryDomain::Selections; 6242: 6242: Selection() = default; 6242: Selection(BufferCoord pos) : Selection(pos,pos) {} 6242: Selection(BufferCoord anchor, BufferCoord cursor, 6242: CaptureList captures = {}) 6242: : m_anchor{anchor}, m_cursor{cursor}, 6242: m_captures(std::move(captures)) {} 6242: 6242: void merge_with(const Selection& range); 6242: 6242: BufferCoord& anchor() { return m_anchor; } 6242: BufferCoordAndTarget& cursor() { return m_cursor; } 6242: 6242: const BufferCoord& anchor() const { return m_anchor; } 6242: const BufferCoordAndTarget& cursor() const { return m_cursor; } 6242: 6242: CaptureList& captures() { return m_captures; } 6242: const CaptureList& captures() const { return m_captures; } 6242: 6242: bool operator== (const Selection& other) const 6242: { 6242: return m_anchor == other.m_anchor and m_cursor == other.m_cursor; 6242: } 6242: 6242: const BufferCoord& min() const { return m_anchor < m_cursor ? m_anchor : m_cursor; } 6242: const BufferCoord& max() const { return m_anchor < m_cursor ? m_cursor : m_anchor; } 6242: 6242: BufferCoord& min() { return m_anchor < m_cursor ? m_anchor : m_cursor; } 6242: BufferCoord& max() { return m_anchor < m_cursor ? m_cursor : m_anchor; } 6242: 6242: private: 6242: BufferCoord m_anchor; 6242: BufferCoordAndTarget m_cursor; 6242: 6242: CaptureList m_captures; 6242: }; 6242: 6242: inline bool overlaps(const Selection& lhs, const Selection& rhs) 6242: { 6242: return lhs.min() <= rhs.min() ? lhs.max() >= rhs.min() 6242: : lhs.min() <= rhs.max(); 6242: } 6242: 6242: void update_selections(Vector& selections, size_t& main, 6242: Buffer& buffer, size_t timestamp); 6242: 6242: enum class InsertMode : unsigned 6242: { 6242: Insert, 6242: InsertCursor, 6242: Append, 6242: Replace, 6242: InsertAtLineBegin, 6242: InsertAtNextLineBegin, 6242: AppendAtLineEnd, 6242: OpenLineBelow, 6242: OpenLineAbove 6242: }; 6242: 6242: struct SelectionList 6242: { 6242: static constexpr MemoryDomain Domain = MemoryDomain::Selections; 6242: 6242: SelectionList(Buffer& buffer, Selection s); 6242: SelectionList(Buffer& buffer, Selection s, size_t timestamp); 6242: SelectionList(Buffer& buffer, Vector s); 6242: SelectionList(Buffer& buffer, Vector s, size_t timestamp); 6242: 6242: void update(); 6242: 6242: void check_invariant() const; 6242: 6242: const Selection& main() const { return (*this)[m_main]; } 6242: Selection& main() { return (*this)[m_main]; } 6242: size_t main_index() const { return m_main; } 6242: void set_main_index(size_t main) { if (not (main < size())) on_assert_failed("assert failed \"" "main < size()" "\" at " "selection.hh" ":" "90"); m_main = main; } 6242: 6242: void rotate_main(int count) { m_main = (m_main + count) % size(); } 6242: 6242: void avoid_eol(); 6242: 6242: void push_back(const Selection& sel) { m_selections.push_back(sel); } 6242: void push_back(Selection&& sel) { m_selections.push_back(std::move(sel)); } 6242: 6242: Selection& operator[](size_t i) { return m_selections[i]; } 6242: const Selection& operator[](size_t i) const { return m_selections[i]; } 6242: 6242: SelectionList& operator=(Vector list) 6242: { 6242: m_selections = std::move(list); 6242: m_main = size()-1; 6242: sort_and_merge_overlapping(); 6242: update_timestamp(); 6242: check_invariant(); 6242: return *this; 6242: } 6242: 6242: using iterator = Vector::iterator; 6242: iterator begin() { return m_selections.begin(); } 6242: iterator end() { return m_selections.end(); } 6242: 6242: using const_iterator = Vector::const_iterator; 6242: const_iterator begin() const { return m_selections.begin(); } 6242: const_iterator end() const { return m_selections.end(); } 6242: 6242: void remove(size_t index) { m_selections.erase(begin() + index); } 6242: 6242: size_t size() const { return m_selections.size(); } 6242: 6242: bool operator==(const SelectionList& other) const { return m_buffer == other.m_buffer and m_selections == other.m_selections; } 6242: bool operator!=(const SelectionList& other) const { return not ((*this) == other); } 6242: 6242: void sort(); 6242: void merge_overlapping(); 6242: void merge_consecutive(); 6242: void sort_and_merge_overlapping(); 6242: 6242: Buffer& buffer() const { return *m_buffer; } 6242: 6242: size_t timestamp() const { return m_timestamp; } 6242: void update_timestamp() { m_timestamp = m_buffer->timestamp(); } 6242: 6242: void insert(ConstArrayView strings, InsertMode mode, 6242: bool select_inserted = false); 6242: void erase(); 6242: 6242: private: 6242: size_t m_main = 0; 6242: Vector m_selections; 6242: 6242: SafePtr m_buffer; 6242: size_t m_timestamp; 6242: }; 6242: 6242: Vector compute_modified_ranges(Buffer& buffer, size_t timestamp); 6242: 6242: String selection_to_string(const Selection& selection); 6242: String selection_list_to_string(const SelectionList& selection); 6242: Selection selection_from_string(StringView desc); 6242: SelectionList selection_list_from_string(Buffer& buffer, StringView desc); 6242: 6242: } 6242: # 6 "buffer_utils.hh" 2 6242: 6242: # 1 "utf8_iterator.hh" 1 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: namespace Kakoune 6242: { 6242: 6242: namespace utf8 6242: { 6242: 6242: 6242: 6242: template 6242: class iterator : public std::iterator 6242: { 6242: public: 6242: iterator() = default; 6242: 6242: iterator(Iterator it, Iterator begin, Iterator end) 6242: : m_it{std::move(it)}, m_begin{std::move(begin)}, m_end{std::move(end)} 6242: {} 6242: 6242: template 6242: iterator(Iterator it, const Container& c) 6242: : m_it{std::move(it)}, m_begin{std::begin(c)}, m_end{std::end(c)} 6242: {} 6242: 6242: iterator& operator++() 6242: { 6242: utf8::to_next(m_it, m_end); 6242: invalidate_value(); 6242: return *this; 6242: } 6242: 6242: iterator operator++(int) 6242: { 6242: iterator save = *this; 6242: ++*this; 6242: return save; 6242: } 6242: 6242: iterator& operator--() 6242: { 6242: utf8::to_previous(m_it, m_begin); 6242: invalidate_value(); 6242: return *this; 6242: } 6242: 6242: iterator operator--(int) 6242: { 6242: iterator save = *this; 6242: --*this; 6242: return save; 6242: } 6242: 6242: iterator operator+(DifferenceType count) const 6242: { 6242: if (count < 0) 6242: return operator-(-count); 6242: 6242: iterator res = *this; 6242: while (count--) 6242: ++res; 6242: return res; 6242: } 6242: 6242: iterator operator-(DifferenceType count) const 6242: { 6242: if (count < 0) 6242: return operator+(-count); 6242: 6242: iterator res = *this; 6242: while (count--) 6242: --res; 6242: return res; 6242: } 6242: 6242: bool operator==(const iterator& other) const { return m_it == other.m_it; } 6242: bool operator!=(const iterator& other) const { return m_it != other.m_it; } 6242: 6242: bool operator< (const iterator& other) const { return m_it < other.m_it; } 6242: bool operator<= (const iterator& other) const { return m_it <= other.m_it; } 6242: 6242: bool operator> (const iterator& other) const { return m_it > other.m_it; } 6242: bool operator>= (const iterator& other) const { return m_it >= other.m_it; } 6242: 6242: bool operator==(const Iterator& other) { return m_it == other; } 6242: bool operator!=(const Iterator& other) { return m_it != other; } 6242: 6242: bool operator< (const Iterator& other) const { return m_it < other; } 6242: bool operator<= (const Iterator& other) const { return m_it <= other; } 6242: 6242: bool operator> (const Iterator& other) const { return m_it > other; } 6242: bool operator>= (const Iterator& other) const { return m_it >= other; } 6242: 6242: DifferenceType operator-(const iterator& other) const 6242: { 6242: return (DifferenceType)utf8::distance(other.m_it, m_it); 6242: } 6242: 6242: CodepointType operator*() const 6242: { 6242: return get_value(); 6242: } 6242: 6242: const Iterator& base() const { return m_it; } 6242: Iterator& base() { return m_it; } 6242: 6242: private: 6242: void invalidate_value() { m_value = -1; } 6242: CodepointType get_value() const 6242: { 6242: if (m_value == (CodepointType)-1) 6242: m_value = (CodepointType)utf8::codepoint(m_it, m_end); 6242: return m_value; 6242: } 6242: 6242: Iterator m_it; 6242: Iterator m_begin; 6242: Iterator m_end; 6242: mutable CodepointType m_value = -1; 6242: }; 6242: 6242: } 6242: 6242: } 6242: # 8 "buffer_utils.hh" 2 6242: 6242: 6242: namespace Kakoune 6242: { 6242: 6242: inline String content(const Buffer& buffer, const Selection& range) 6242: { 6242: return buffer.string(range.min(), buffer.char_next(range.max())); 6242: } 6242: 6242: inline BufferCoord erase(Buffer& buffer, const Selection& range) 6242: { 6242: return buffer.erase(range.min(), buffer.char_next(range.max())); 6242: } 6242: 6242: inline BufferCoord replace(Buffer& buffer, const Selection& range, StringView content) 6242: { 6242: return buffer.replace(range.min(), buffer.char_next(range.max()), content); 6242: } 6242: 6242: inline CharCount char_length(const Buffer& buffer, const Selection& range) 6242: { 6242: return utf8::distance(buffer.iterator_at(range.min()), 6242: buffer.iterator_at(buffer.char_next(range.max()))); 6242: } 6242: 6242: inline CharCount char_length(const Buffer& buffer, const BufferCoord& begin, const BufferCoord& end) 6242: { 6242: return utf8::distance(buffer.iterator_at(begin), buffer.iterator_at(end)); 6242: } 6242: 6242: inline ColumnCount column_length(const Buffer& buffer, const BufferCoord& begin, const BufferCoord& end) 6242: { 6242: return utf8::column_distance(buffer.iterator_at(begin), buffer.iterator_at(end)); 6242: } 6242: 6242: inline bool is_bol(BufferCoord coord) 6242: { 6242: return coord.column == 0; 6242: } 6242: 6242: inline bool is_eol(const Buffer& buffer, BufferCoord coord) 6242: { 6242: return buffer.is_end(coord) or buffer[coord.line].length() == coord.column+1; 6242: } 6242: 6242: inline bool is_bow(const Buffer& buffer, BufferCoord coord) 6242: { 6242: auto it = utf8::iterator(buffer.iterator_at(coord), buffer); 6242: if (coord == BufferCoord{0,0}) 6242: return is_word(*it); 6242: 6242: return not is_word(*(it-1)) and is_word(*it); 6242: } 6242: 6242: inline bool is_eow(const Buffer& buffer, BufferCoord coord) 6242: { 6242: if (buffer.is_end(coord) or coord == BufferCoord{0,0}) 6242: return true; 6242: 6242: auto it = utf8::iterator(buffer.iterator_at(coord), buffer); 6242: return is_word(*(it-1)) and not is_word(*it); 6242: } 6242: 6242: ColumnCount get_column(const Buffer& buffer, 6242: ColumnCount tabstop, BufferCoord coord); 6242: 6242: ByteCount get_byte_to_column(const Buffer& buffer, ColumnCount tabstop, 6242: DisplayCoord coord); 6242: 6242: Buffer* create_fifo_buffer(String name, int fd, bool scroll = false); 6242: Buffer* open_file_buffer(StringView filename, 6242: Buffer::Flags flags = Buffer::Flags::None); 6242: Buffer* open_or_create_file_buffer(StringView filename, 6242: Buffer::Flags flags = Buffer::Flags::None); 6242: void reload_file_buffer(Buffer& buffer); 6242: 6242: void write_to_debug_buffer(StringView str); 6242: 6242: } 6242: # 6 "normal.cc" 2 6242: # 1 "client_manager.hh" 1 6242: 6242: 6242: 6242: # 1 "client.hh" 1 6242: 6242: 6242: 6242: # 1 "display_buffer.hh" 1 6242: 6242: 6242: 6242: # 1 "face.hh" 1 6242: 6242: 6242: 6242: # 1 "color.hh" 1 6242: 6242: 6242: 6242: 6242: 6242: namespace Kakoune 6242: { 6242: 6242: class String; 6242: class StringView; 6242: 6242: struct Color 6242: { 6242: enum NamedColor : char 6242: { 6242: Default, 6242: Black, 6242: Red, 6242: Green, 6242: Yellow, 6242: Blue, 6242: Magenta, 6242: Cyan, 6242: White, 6242: RGB, 6242: }; 6242: 6242: NamedColor color; 6242: unsigned char r = 0; 6242: unsigned char g = 0; 6242: unsigned char b = 0; 6242: 6242: constexpr Color() : Color{Default} {} 6242: constexpr Color(NamedColor c) : color{c} {} 6242: constexpr Color(unsigned char r, unsigned char g, unsigned char b) 6242: : color{RGB}, r{r}, g{g}, b{b} {} 6242: }; 6242: 6242: constexpr bool operator==(Color lhs, Color rhs) 6242: { 6242: return lhs.color == rhs.color and 6242: lhs.r == rhs.r and lhs.g == rhs.g and lhs.b == rhs.b; 6242: } 6242: 6242: constexpr bool operator!=(Color lhs, Color rhs) 6242: { 6242: return not (lhs == rhs); 6242: } 6242: 6242: Color str_to_color(StringView color); 6242: String color_to_str(Color color); 6242: 6242: String option_to_string(Color color); 6242: void option_from_string(StringView str, Color& color); 6242: 6242: bool is_color_name(StringView color); 6242: 6242: inline size_t hash_value(const Color& val) 6242: { 6242: return val.color == Color::RGB ? 6242: hash_values(val.color, val.r, val.g, val.b) 6242: : hash_value(val.color); 6242: } 6242: 6242: } 6242: # 5 "face.hh" 2 6242: 6242: 6242: namespace Kakoune 6242: { 6242: 6242: enum class Attribute : int 6242: { 6242: Normal = 0, 6242: Exclusive = 1 << 1, 6242: Underline = 1 << 2, 6242: Reverse = 1 << 3, 6242: Blink = 1 << 4, 6242: Bold = 1 << 5, 6242: Dim = 1 << 6, 6242: Italic = 1 << 7, 6242: }; 6242: 6242: template<> struct WithBitOps : std::true_type {}; 6242: 6242: struct Face 6242: { 6242: Color fg; 6242: Color bg; 6242: Attribute attributes; 6242: 6242: constexpr Face(Color fg = Color::Default, Color bg = Color::Default, 6242: Attribute attributes = Attribute::Normal) 6242: : fg{fg}, bg{bg}, attributes{attributes} {} 6242: }; 6242: 6242: constexpr bool operator==(const Face& lhs, const Face& rhs) 6242: { 6242: return lhs.fg == rhs.fg and 6242: lhs.bg == rhs.bg and 6242: lhs.attributes == rhs.attributes; 6242: } 6242: 6242: constexpr bool operator!=(const Face& lhs, const Face& rhs) 6242: { 6242: return not (lhs == rhs); 6242: } 6242: 6242: constexpr Face merge_faces(const Face& base, const Face& face) 6242: { 6242: return face.attributes & Attribute::Exclusive ? 6242: face : Face{ face.fg == Color::Default ? base.fg : face.fg, 6242: face.bg == Color::Default ? base.bg : face.bg, 6242: face.attributes | base.attributes }; 6242: } 6242: 6242: } 6242: # 5 "display_buffer.hh" 2 6242: 6242: 6242: 6242: 6242: 6242: namespace Kakoune 6242: { 6242: 6242: class Buffer; 6242: struct BufferRange{ BufferCoord begin, end; }; 6242: 6242: String option_to_string(BufferRange range); 6242: void option_from_string(StringView str, BufferRange& opt); 6242: 6242: inline bool operator==(const BufferRange& lhs, const BufferRange& rhs) 6242: { 6242: return lhs.begin == rhs.begin and lhs.end == rhs.end; 6242: } 6242: 6242: inline 6242: size_t hash_value(const BufferRange& range) 6242: { 6242: return hash_values(range.begin, range.end); 6242: } 6242: 6242: struct DisplayAtom : public UseMemoryDomain 6242: { 6242: public: 6242: enum Type { Range, ReplacedRange, Text }; 6242: 6242: DisplayAtom(const Buffer& buffer, BufferCoord begin, BufferCoord end) 6242: : m_type(Range), m_buffer(&buffer), m_range{begin, end} 6242: { check_invariant(); } 6242: 6242: DisplayAtom(String str, Face face = Face{}) 6242: : m_type(Text), m_text(std::move(str)), face(face) 6242: { check_invariant(); } 6242: 6242: StringView content() const; 6242: ColumnCount length() const; 6242: 6242: const BufferCoord& begin() const 6242: { 6242: if (not (has_buffer_range())) on_assert_failed("assert failed \"" "has_buffer_range()" "\" at " "display_buffer.hh" ":" "48"); 6242: return m_range.begin; 6242: } 6242: 6242: const BufferCoord& end() const 6242: { 6242: if (not (has_buffer_range())) on_assert_failed("assert failed \"" "has_buffer_range()" "\" at " "display_buffer.hh" ":" "54"); 6242: return m_range.end; 6242: } 6242: 6242: void replace(String text) 6242: { 6242: if (not (m_type == Range)) on_assert_failed("assert failed \"" "m_type == Range" "\" at " "display_buffer.hh" ":" "60"); 6242: m_type = ReplacedRange; 6242: m_text = std::move(text); 6242: } 6242: 6242: bool has_buffer_range() const 6242: { 6242: return m_type == Range or m_type == ReplacedRange; 6242: } 6242: 6242: const Buffer& buffer() const { if (not (m_buffer)) on_assert_failed("assert failed \"" "m_buffer" "\" at " "display_buffer.hh" ":" "70"); return *m_buffer; } 6242: 6242: Type type() const { return m_type; } 6242: 6242: void trim_begin(ColumnCount count); 6242: void trim_end(ColumnCount count); 6242: 6242: void check_invariant() const; 6242: 6242: bool operator==(const DisplayAtom& other) const 6242: { 6242: return face == other.face and type() == other.type() and 6242: content() == other.content(); 6242: } 6242: 6242: public: 6242: Face face; 6242: 6242: private: 6242: friend class DisplayLine; 6242: 6242: Type m_type; 6242: 6242: const Buffer* m_buffer = nullptr; 6242: BufferRange m_range; 6242: String m_text; 6242: }; 6242: 6242: using AtomList = Vector; 6242: 6242: class DisplayLine : public UseMemoryDomain 6242: { 6242: public: 6242: using iterator = AtomList::iterator; 6242: using const_iterator = AtomList::const_iterator; 6242: using value_type = AtomList::value_type; 6242: 6242: DisplayLine() = default; 6242: DisplayLine(AtomList atoms); 6242: DisplayLine(String str, Face face = Face{}) 6242: { push_back({ std::move(str), face }); } 6242: 6242: iterator begin() { return m_atoms.begin(); } 6242: iterator end() { return m_atoms.end(); } 6242: 6242: const_iterator begin() const { return m_atoms.begin(); } 6242: const_iterator end() const { return m_atoms.end(); } 6242: 6242: const AtomList& atoms() const { return m_atoms; } 6242: 6242: ColumnCount length() const; 6242: const BufferRange& range() const { return m_range; } 6242: 6242: 6242: 6242: iterator split(iterator it, BufferCoord pos); 6242: 6242: 6242: 6242: iterator split(iterator it, ColumnCount pos); 6242: 6242: iterator insert(iterator it, DisplayAtom atom); 6242: iterator erase(iterator beg, iterator end); 6242: void push_back(DisplayAtom atom); 6242: 6242: 6242: 6242: void trim(ColumnCount first_col, ColumnCount col_count, bool only_buffer); 6242: 6242: void optimize(); 6242: private: 6242: void compute_range(); 6242: BufferRange m_range = { { 0x7fffffff, 0x7fffffff }, { 6242: # 142 "display_buffer.hh" 3 4 6242: (-0x7fffffff - 1) 6242: # 142 "display_buffer.hh" 6242: , 6242: # 142 "display_buffer.hh" 3 4 6242: (-0x7fffffff - 1) 6242: # 142 "display_buffer.hh" 6242: } }; 6242: AtomList m_atoms; 6242: }; 6242: 6242: DisplayLine parse_display_line(StringView line); 6242: 6242: class DisplayBuffer : public UseMemoryDomain 6242: { 6242: public: 6242: using LineList = Vector; 6242: DisplayBuffer() {} 6242: 6242: LineList& lines() { return m_lines; } 6242: const LineList& lines() const { return m_lines; } 6242: 6242: 6242: const BufferRange& range() const { return m_range; } 6242: void optimize(); 6242: void compute_range(); 6242: 6242: private: 6242: LineList m_lines; 6242: BufferRange m_range; 6242: }; 6242: 6242: } 6242: # 5 "client.hh" 2 6242: # 1 "env_vars.hh" 1 6242: 6242: 6242: 6242: 6242: 6242: namespace Kakoune 6242: { 6242: 6242: class String; 6242: using EnvVarMap = IdMap; 6242: 6242: EnvVarMap get_env_vars(); 6242: 6242: } 6242: # 6 "client.hh" 2 6242: # 1 "input_handler.hh" 1 6242: 6242: 6242: 6242: 6242: # 1 "context.hh" 1 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: namespace Kakoune 6242: { 6242: 6242: class Window; 6242: class Buffer; 6242: class Client; 6242: class Scope; 6242: class InputHandler; 6242: class UserInterface; 6242: class DisplayLine; 6242: class KeymapManager; 6242: class AliasRegistry; 6242: 6242: 6242: 6242: struct NestedBool 6242: { 6242: void set() { m_count++; } 6242: void unset() { if (not (m_count > 0)) on_assert_failed("assert failed \"" "m_count > 0" "\" at " "context.hh" ":" "26"); m_count--; } 6242: 6242: operator bool() const { return m_count > 0; } 6242: private: 6242: int m_count = 0; 6242: }; 6242: 6242: struct ScopedSetBool 6242: { 6242: ScopedSetBool(NestedBool& nested_bool, bool condition = true) 6242: : m_nested_bool(nested_bool), m_condition(condition) 6242: { 6242: if (m_condition) 6242: m_nested_bool.set(); 6242: } 6242: 6242: ~ScopedSetBool() 6242: { 6242: if (m_condition) 6242: m_nested_bool.unset(); 6242: } 6242: 6242: private: 6242: NestedBool& m_nested_bool; 6242: bool m_condition; 6242: }; 6242: 6242: struct JumpList 6242: { 6242: void push(SelectionList jump); 6242: const SelectionList& forward(); 6242: const SelectionList& backward(const SelectionList& current); 6242: void forget_buffer(Buffer& buffer); 6242: 6242: friend bool operator==(const JumpList& lhs, const JumpList& rhs) 6242: { 6242: return lhs.m_jumps == rhs.m_jumps and lhs.m_current == rhs.m_current; 6242: } 6242: 6242: friend bool operator!=(const JumpList& lhs, const JumpList& rhs) { return not (lhs == rhs); } 6242: 6242: private: 6242: using Contents = Vector; 6242: Contents m_jumps; 6242: size_t m_current = 0; 6242: }; 6242: 6242: using LastSelectFunc = std::function; 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: class Context 6242: { 6242: public: 6242: enum class Flags 6242: { 6242: None = 0, 6242: Transient = 1, 6242: }; 6242: 6242: Context(InputHandler& input_handler, SelectionList selections, 6242: Flags flags, String name = ""); 6242: 6242: struct EmptyContextFlag {}; 6242: explicit Context(EmptyContextFlag); 6242: ~Context(); 6242: 6242: Context(const Context&) = delete; 6242: Context& operator=(const Context&) = delete; 6242: 6242: Buffer& buffer() const; 6242: bool has_buffer() const { return (bool)m_selections; } 6242: 6242: Window& window() const; 6242: bool has_window() const { return (bool)m_window; } 6242: 6242: Client& client() const; 6242: bool has_client() const { return (bool)m_client; } 6242: 6242: InputHandler& input_handler() const; 6242: bool has_input_handler() const { return (bool)m_input_handler; } 6242: 6242: SelectionList& selections(); 6242: const SelectionList& selections() const; 6242: Vector selections_content() const; 6242: 6242: 6242: SelectionList& selections_write_only(); 6242: 6242: void change_buffer(Buffer& buffer); 6242: 6242: void set_client(Client& client); 6242: void set_window(Window& window); 6242: 6242: Scope& scope() const; 6242: 6242: OptionManager& options() const { return scope().options(); } 6242: HookManager& hooks() const { return scope().hooks(); } 6242: KeymapManager& keymaps() const { return scope().keymaps(); } 6242: AliasRegistry& aliases() const { return scope().aliases(); } 6242: 6242: void print_status(DisplayLine status, bool immediate = false) const; 6242: 6242: StringView main_sel_register_value(StringView reg) const; 6242: 6242: const String& name() const { return m_name; } 6242: void set_name(String name) { m_name = std::move(name); } 6242: 6242: bool is_editing() const { return m_edition_level!= 0; } 6242: void disable_undo_handling() { m_edition_level = -1; } 6242: 6242: NestedBool& hooks_disabled() { return m_hooks_disabled; } 6242: const NestedBool& hooks_disabled() const { return m_hooks_disabled; } 6242: 6242: NestedBool& keymaps_disabled() { return m_keymaps_disabled; } 6242: const NestedBool& keymaps_disabled() const { return m_keymaps_disabled; } 6242: 6242: NestedBool& history_disabled() { return m_history_disabled; } 6242: const NestedBool& history_disabled() const { return m_history_disabled; } 6242: 6242: Flags flags() const { return m_flags; } 6242: 6242: JumpList& jump_list() { return m_jump_list; } 6242: void push_jump() { m_jump_list.push(selections()); } 6242: 6242: template 6242: void set_last_select(Func&& last_select) { m_last_select = std::forward(last_select); } 6242: 6242: void repeat_last_select() { if (m_last_select) m_last_select(*this); } 6242: 6242: private: 6242: void begin_edition(); 6242: void end_edition(); 6242: int m_edition_level = 0; 6242: 6242: friend struct ScopedEdition; 6242: 6242: Flags m_flags; 6242: 6242: SafePtr m_input_handler; 6242: SafePtr m_window; 6242: SafePtr m_client; 6242: 6242: Optional m_selections; 6242: 6242: String m_name; 6242: 6242: JumpList m_jump_list; 6242: 6242: LastSelectFunc m_last_select; 6242: 6242: NestedBool m_hooks_disabled; 6242: NestedBool m_keymaps_disabled; 6242: NestedBool m_history_disabled; 6242: }; 6242: 6242: template<> 6242: struct WithBitOps : std::true_type {}; 6242: 6242: struct ScopedEdition 6242: { 6242: ScopedEdition(Context& context) 6242: : m_context(context), m_buffer(&context.buffer()) 6242: { m_context.begin_edition(); } 6242: 6242: ~ScopedEdition() { m_context.end_edition(); } 6242: 6242: Context& context() const { return m_context; } 6242: private: 6242: Context& m_context; 6242: SafePtr m_buffer; 6242: }; 6242: 6242: } 6242: # 6 "input_handler.hh" 2 6242: # 14 "input_handler.hh" 6242: namespace Kakoune 6242: { 6242: 6242: enum class MenuEvent 6242: { 6242: Select, 6242: Abort, 6242: Validate 6242: }; 6242: using MenuCallback = std::function; 6242: 6242: enum class PromptEvent 6242: { 6242: Change, 6242: Abort, 6242: Validate 6242: }; 6242: using PromptCallback = std::function; 6242: enum class PromptFlags 6242: { 6242: None = 0, 6242: Password = 1 << 0, 6242: DropHistoryEntriesWithBlankPrefix = 1 << 1 6242: }; 6242: template<> struct WithBitOps : std::true_type {}; 6242: 6242: 6242: using KeyCallback = std::function; 6242: 6242: class InputMode; 6242: enum class InsertMode : unsigned; 6242: enum class KeymapMode : char; 6242: 6242: class InputHandler : public SafeCountable 6242: { 6242: public: 6242: InputHandler(SelectionList selections, 6242: Context::Flags flags = Context::Flags::None, 6242: String name = ""); 6242: ~InputHandler(); 6242: 6242: 6242: void insert(InsertMode mode, int count); 6242: 6242: void repeat_last_insert(); 6242: 6242: 6242: 6242: 6242: 6242: void prompt(StringView prompt, String initstr, 6242: Face prompt_face, PromptFlags flags, 6242: Completer completer, PromptCallback callback); 6242: void set_prompt_face(Face prompt_face); 6242: 6242: 6242: 6242: 6242: 6242: void menu(Vector choices, MenuCallback callback); 6242: 6242: 6242: 6242: void on_next_key(KeymapMode mode, KeyCallback callback); 6242: 6242: 6242: void handle_key(Key key); 6242: 6242: void start_recording(char reg); 6242: bool is_recording() const; 6242: void stop_recording(); 6242: char recording_reg() const { return m_recording_reg; } 6242: 6242: void reset_normal_mode(); 6242: 6242: Context& context() { return m_context; } 6242: const Context& context() const { return m_context; } 6242: 6242: DisplayLine mode_line() const; 6242: 6242: 6242: struct ScopedForceNormal 6242: { 6242: ScopedForceNormal(InputHandler& handler, NormalParams params); 6242: ~ScopedForceNormal(); 6242: 6242: private: 6242: InputHandler& m_handler; 6242: InputMode* m_mode; 6242: }; 6242: 6242: private: 6242: Context m_context; 6242: 6242: friend class InputMode; 6242: Vector, MemoryDomain::Client> m_mode_stack; 6242: 6242: InputMode& current_mode() const { return *m_mode_stack.back(); } 6242: 6242: void push_mode(InputMode* new_mode); 6242: void pop_mode(InputMode* current_mode); 6242: 6242: struct Insertion{ InsertMode mode; Vector keys; bool disable_hooks; }; 6242: Insertion m_last_insert = { InsertMode::Insert, {}, false }; 6242: 6242: char m_recording_reg = 0; 6242: String m_recorded_keys; 6242: int m_recording_level = -1; 6242: 6242: int m_handle_key_level = 0; 6242: }; 6242: 6242: enum class AutoInfo 6242: { 6242: None = 0, 6242: Command = 1 << 0, 6242: OnKey = 1 << 1, 6242: Normal = 1 << 2 6242: }; 6242: 6242: template<> 6242: struct WithBitOps : std::true_type {}; 6242: 6242: constexpr Array, 3> enum_desc(AutoInfo) 6242: { 6242: return { { 6242: { AutoInfo::Command, "command"}, 6242: { AutoInfo::OnKey, "onkey"}, 6242: { AutoInfo::Normal, "normal" } 6242: } }; 6242: } 6242: 6242: bool show_auto_info_ifn(StringView title, StringView info, AutoInfo mask, const Context& context); 6242: void hide_auto_info_ifn(const Context& context, bool hide); 6242: 6242: template 6242: void on_next_key_with_autoinfo(const Context& context, KeymapMode keymap_mode, Cmd cmd, 6242: StringView title, StringView info) 6242: { 6242: const bool hide = show_auto_info_ifn(title, info, AutoInfo::OnKey, context); 6242: context.input_handler().on_next_key( 6242: keymap_mode, [hide,cmd](Key key, Context& context) mutable { 6242: hide_auto_info_ifn(context, hide); 6242: cmd(key, context); 6242: }); 6242: } 6242: 6242: void scroll_window(Context& context, LineCount offset); 6242: 6242: } 6242: # 7 "client.hh" 2 6242: 6242: 6242: 6242: 6242: 6242: namespace Kakoune 6242: { 6242: 6242: class Window; 6242: class UserInterface; 6242: class String; 6242: struct Key; 6242: 6242: enum class EventMode; 6242: enum class InfoStyle; 6242: enum class MenuStyle; 6242: 6242: 6242: class Client : public SafeCountable, public OptionManagerWatcher 6242: { 6242: public: 6242: Client(std::unique_ptr&& ui, 6242: std::unique_ptr&& window, 6242: SelectionList selections, 6242: EnvVarMap env_vars, 6242: String name); 6242: ~Client(); 6242: 6242: Client(Client&&) = delete; 6242: 6242: bool process_pending_inputs(); 6242: 6242: void menu_show(Vector choices, BufferCoord anchor, MenuStyle style); 6242: void menu_select(int selected); 6242: void menu_hide(); 6242: 6242: void info_show(String title, String content, BufferCoord anchor, InfoStyle style); 6242: void info_hide(); 6242: 6242: void print_status(DisplayLine status_line, bool immediate = false); 6242: 6242: DisplayCoord dimensions() const; 6242: 6242: void force_redraw(); 6242: void redraw_ifn(); 6242: 6242: void check_if_buffer_needs_reloading(); 6242: 6242: Context& context() { return m_input_handler.context(); } 6242: const Context& context() const { return m_input_handler.context(); } 6242: 6242: InputHandler& input_handler() { return m_input_handler; } 6242: const InputHandler& input_handler() const { return m_input_handler; } 6242: 6242: void change_buffer(Buffer& buffer); 6242: 6242: StringView get_env_var(StringView name) const; 6242: 6242: Buffer* last_buffer() const { return m_last_buffer.get(); } 6242: void set_last_buffer(Buffer* last_buffer) { m_last_buffer = last_buffer; } 6242: 6242: private: 6242: void on_option_changed(const Option& option) override; 6242: 6242: void on_buffer_reload_key(Key key); 6242: void close_buffer_reload_dialog(); 6242: void reload_buffer(); 6242: 6242: Optional get_next_key(EventMode mode); 6242: 6242: DisplayLine generate_mode_line() const; 6242: 6242: std::unique_ptr m_ui; 6242: std::unique_ptr m_window; 6242: 6242: EnvVarMap m_env_vars; 6242: 6242: InputHandler m_input_handler; 6242: 6242: DisplayLine m_status_line; 6242: DisplayLine m_mode_line; 6242: 6242: enum PendingUI : int 6242: { 6242: MenuShow = 1 << 0, 6242: MenuSelect = 1 << 1, 6242: MenuHide = 1 << 2, 6242: InfoShow = 1 << 3, 6242: InfoHide = 1 << 4, 6242: StatusLine = 1 << 5, 6242: Draw = 1 << 6, 6242: Refresh = 1 << 7, 6242: }; 6242: int m_ui_pending = 0; 6242: 6242: struct Menu 6242: { 6242: Vector items; 6242: BufferCoord anchor; 6242: DisplayCoord ui_anchor; 6242: MenuStyle style; 6242: int selected; 6242: } m_menu; 6242: 6242: struct Info 6242: { 6242: String title; 6242: String content; 6242: BufferCoord anchor; 6242: DisplayCoord ui_anchor; 6242: InfoStyle style; 6242: } m_info; 6242: 6242: Vector m_pending_keys; 6242: 6242: bool m_buffer_reload_dialog_opened = false; 6242: 6242: SafePtr m_last_buffer; 6242: }; 6242: 6242: enum class Autoreload 6242: { 6242: Yes, 6242: No, 6242: Ask 6242: }; 6242: 6242: constexpr Array, 5> enum_desc(Autoreload) 6242: { 6242: return { { 6242: { Autoreload::Yes, "yes" }, 6242: { Autoreload::No, "no" }, 6242: { Autoreload::Ask, "ask" }, 6242: { Autoreload::Yes, "true" }, 6242: { Autoreload::No, "false" } 6242: } }; 6242: } 6242: 6242: } 6242: # 5 "client_manager.hh" 2 6242: 6242: 6242: namespace Kakoune 6242: { 6242: 6242: struct WindowAndSelections 6242: { 6242: std::unique_ptr window; 6242: SelectionList selections; 6242: size_t timestamp; 6242: }; 6242: 6242: class ClientManager : public Singleton 6242: { 6242: public: 6242: ClientManager(); 6242: ~ClientManager(); 6242: 6242: Client* create_client(std::unique_ptr&& ui, 6242: EnvVarMap env_vars, StringView init_cmds, 6242: BufferCoord init_coord); 6242: 6242: bool empty() const { return m_clients.empty(); } 6242: size_t count() const { return m_clients.size(); } 6242: 6242: void clear(); 6242: 6242: void ensure_no_client_uses_buffer(Buffer& buffer); 6242: 6242: WindowAndSelections get_free_window(Buffer& buffer); 6242: void add_free_window(std::unique_ptr&& window, SelectionList selections); 6242: 6242: void redraw_clients() const; 6242: void process_pending_inputs() const; 6242: 6242: Client* get_client_ifp(StringView name); 6242: Client& get_client(StringView name); 6242: bool validate_client_name(StringView name) const; 6242: void remove_client(Client& client, bool graceful); 6242: 6242: using ClientList = Vector, MemoryDomain::Client>; 6242: using iterator = ClientList::const_iterator; 6242: 6242: iterator begin() const { return m_clients.begin(); } 6242: iterator end() const { return m_clients.end(); } 6242: 6242: CandidateList complete_client_name(StringView name, 6242: ByteCount cursor_pos = -1) const; 6242: 6242: void clear_window_trash(); 6242: void clear_client_trash(); 6242: private: 6242: String generate_name() const; 6242: 6242: ClientList m_clients; 6242: ClientList m_client_trash; 6242: Vector m_free_windows; 6242: Vector, MemoryDomain::Client> m_window_trash; 6242: }; 6242: 6242: } 6242: # 7 "normal.cc" 2 6242: # 1 "command_manager.hh" 1 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: # 1 "shell_manager.hh" 1 6242: # 11 "shell_manager.hh" 6242: namespace Kakoune 6242: { 6242: 6242: class Context; 6242: 6242: using EnvVarRetriever = std::function; 6242: 6242: struct ShellContext 6242: { 6242: ConstArrayView params; 6242: EnvVarMap env_vars; 6242: }; 6242: 6242: class ShellManager : public Singleton 6242: { 6242: public: 6242: ShellManager(); 6242: 6242: enum class Flags 6242: { 6242: None = 0, 6242: WaitForStdout = 1 6242: }; 6242: 6242: std::pair eval(StringView cmdline, const Context& context, 6242: StringView input = {}, 6242: Flags flags = Flags::WaitForStdout, 6242: const ShellContext& shell_context = {}); 6242: 6242: void register_env_var(StringView str, bool prefix, EnvVarRetriever retriever); 6242: String get_val(StringView name, const Context& context) const; 6242: 6242: CandidateList complete_env_var(StringView prefix, ByteCount cursor_pos) const; 6242: 6242: private: 6242: String m_shell; 6242: 6242: struct EnvVarDesc { String str; bool prefix; EnvVarRetriever func; }; 6242: Vector m_env_vars; 6242: }; 6242: 6242: template<> struct WithBitOps : std::true_type {}; 6242: 6242: } 6242: # 9 "command_manager.hh" 2 6242: # 1 "parameters_parser.hh" 1 6242: # 11 "parameters_parser.hh" 6242: namespace Kakoune 6242: { 6242: 6242: using ParameterList = ConstArrayView; 6242: 6242: struct parameter_error : public runtime_error 6242: { 6242: using runtime_error::runtime_error; 6242: }; 6242: 6242: struct unknown_option : public parameter_error 6242: { 6242: unknown_option(StringView name) 6242: : parameter_error(format("unknown option '{}'", name)) {} 6242: }; 6242: 6242: struct missing_option_value: public parameter_error 6242: { 6242: missing_option_value(StringView name) 6242: : parameter_error(format("missing value for option '{}'", name)) {} 6242: }; 6242: 6242: struct wrong_argument_count : public parameter_error 6242: { 6242: wrong_argument_count() : parameter_error("wrong argument count") {} 6242: }; 6242: 6242: struct SwitchDesc 6242: { 6242: bool takes_arg; 6242: String description; 6242: }; 6242: 6242: using SwitchMap = IdMap; 6242: 6242: String generate_switches_doc(const SwitchMap& opts); 6242: 6242: struct ParameterDesc 6242: { 6242: enum class Flags 6242: { 6242: None = 0, 6242: SwitchesOnlyAtStart = 1, 6242: SwitchesAsPositional = 2, 6242: }; 6242: 6242: ParameterDesc() = default; 6242: ParameterDesc(SwitchMap switches, Flags flags = Flags::None, 6242: size_t min_positionals = 0, size_t max_positionals = -1) 6242: : switches(std::move(switches)), flags(flags), 6242: min_positionals(min_positionals), max_positionals(max_positionals) {} 6242: 6242: SwitchMap switches; 6242: Flags flags = Flags::None; 6242: size_t min_positionals = 0; 6242: size_t max_positionals = -1; 6242: }; 6242: 6242: template<> struct WithBitOps : std::true_type {}; 6242: 6242: 6242: 6242: 6242: 6242: 6242: struct ParametersParser 6242: { 6242: 6242: 6242: 6242: ParametersParser(ParameterList params, const ParameterDesc& desc); 6242: 6242: 6242: 6242: Optional get_switch(StringView name) const; 6242: 6242: struct iterator : std::iterator 6242: { 6242: iterator(const ParametersParser& parser, size_t index) 6242: : m_parser(parser), m_index(index) {} 6242: 6242: const String& operator*() const { return m_parser[m_index]; } 6242: const String* operator->() const { return &m_parser[m_index]; } 6242: 6242: iterator& operator++() { ++m_index; return *this; } 6242: iterator operator++(int) { auto copy = *this; ++m_index; return copy; } 6242: 6242: bool operator==(const iterator& other) const 6242: { 6242: if (not (&m_parser == &other.m_parser)) on_assert_failed("assert failed \"" "&m_parser == &other.m_parser" "\" at " "parameters_parser.hh" ":" "100"); 6242: return m_index == other.m_index; 6242: } 6242: 6242: bool operator!=(const iterator& other) const 6242: { 6242: return not (*this == other); 6242: } 6242: 6242: private: 6242: const ParametersParser& m_parser; 6242: size_t m_index; 6242: }; 6242: 6242: 6242: size_t positional_count() const { return m_positional_indices.size(); } 6242: 6242: 6242: const String& operator[] (size_t index) const 6242: { 6242: if (not (index < positional_count())) on_assert_failed("assert failed \"" "index < positional_count()" "\" at " "parameters_parser.hh" ":" "120"); 6242: return m_params[m_positional_indices[index]]; 6242: } 6242: 6242: iterator begin() const { return iterator(*this, 0); } 6242: iterator end() const { return iterator(*this, m_positional_indices.size()); } 6242: 6242: private: 6242: ParameterList m_params; 6242: Vector m_positional_indices; 6242: const ParameterDesc& m_desc; 6242: }; 6242: 6242: } 6242: # 10 "command_manager.hh" 2 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: namespace Kakoune 6242: { 6242: 6242: class Context; 6242: using CommandParameters = ConstArrayView; 6242: using Command = std::function; 6242: 6242: using CommandCompleter = std::function; 6242: 6242: using CommandHelper = std::function; 6242: 6242: enum class CommandFlags 6242: { 6242: None = 0, 6242: Hidden = 1, 6242: }; 6242: 6242: template<> struct WithBitOps : std::true_type {}; 6242: 6242: using CommandInfo = std::pair; 6242: 6242: struct Token 6242: { 6242: enum class Type 6242: { 6242: Raw, 6242: RawQuoted, 6242: RawEval, 6242: ShellExpand, 6242: RegisterExpand, 6242: OptionExpand, 6242: ValExpand, 6242: ArgExpand, 6242: CommandSeparator 6242: }; 6242: Token() : m_type(Type::Raw) {} 6242: 6242: Token(Type type, ByteCount b, ByteCount e, DisplayCoord coord, String str = "") 6242: : m_type(type), m_begin(b), m_end(e), m_coord(coord), m_content(std::move(str)) {} 6242: 6242: Type type() const { return m_type; } 6242: ByteCount begin() const { return m_begin; } 6242: ByteCount end() const { return m_end; } 6242: DisplayCoord coord() const { return m_coord; } 6242: const String& content() const { return m_content; } 6242: 6242: private: 6242: Type m_type; 6242: ByteCount m_begin; 6242: ByteCount m_end; 6242: DisplayCoord m_coord; 6242: String m_content; 6242: }; 6242: 6242: using TokenList = Vector; 6242: 6242: template 6242: TokenList parse(StringView line); 6242: 6242: class CommandManager : public Singleton 6242: { 6242: public: 6242: void execute(StringView command_line, Context& context, 6242: const ShellContext& shell_context = ShellContext{}); 6242: 6242: Completions complete(const Context& context, CompletionFlags flags, 6242: StringView command_line, ByteCount cursor_pos); 6242: 6242: Completions complete(const Context& context, CompletionFlags flags, 6242: CommandParameters params, 6242: size_t token_to_complete, ByteCount pos_in_token); 6242: 6242: CommandInfo command_info(const Context& context, 6242: StringView command_line) const; 6242: 6242: bool command_defined(const String& command_name) const; 6242: 6242: void register_command(String command_name, Command command, 6242: String docstring, 6242: ParameterDesc param_desc, 6242: CommandFlags flags = CommandFlags::None, 6242: CommandHelper helper = CommandHelper(), 6242: CommandCompleter completer = CommandCompleter()); 6242: 6242: Completions complete_command_name(const Context& context, StringView query, bool with_aliases) const; 6242: 6242: void clear_last_complete_command() { m_last_complete_command = String{}; } 6242: 6242: private: 6242: void execute_single_command(CommandParameters params, 6242: Context& context, 6242: const ShellContext& shell_context, 6242: DisplayCoord pos) const; 6242: 6242: struct CommandDescriptor 6242: { 6242: Command command; 6242: String docstring; 6242: ParameterDesc param_desc; 6242: CommandFlags flags; 6242: CommandHelper helper; 6242: CommandCompleter completer; 6242: }; 6242: using CommandMap = UnorderedMap; 6242: CommandMap m_commands; 6242: String m_last_complete_command; 6242: 6242: CommandMap::const_iterator find_command(const Context& context, 6242: const String& name) const; 6242: }; 6242: 6242: String expand(StringView str, const Context& context, 6242: const ShellContext& shell_context = ShellContext{}); 6242: 6242: String expand(StringView str, const Context& context, 6242: const ShellContext& shell_context, 6242: std::function postprocess); 6242: 6242: } 6242: # 8 "normal.cc" 2 6242: # 1 "commands.hh" 1 6242: 6242: 6242: 6242: namespace Kakoune 6242: { 6242: 6242: void register_commands(); 6242: 6242: struct kill_session {}; 6242: 6242: } 6242: # 9 "normal.cc" 2 6242: 6242: 6242: # 1 "face_registry.hh" 1 6242: # 9 "face_registry.hh" 6242: namespace Kakoune 6242: { 6242: 6242: class FaceRegistry : public Singleton 6242: { 6242: public: 6242: FaceRegistry(); 6242: 6242: Face operator[](const String& facedesc); 6242: void register_alias(const String& name, const String& facedesc, 6242: bool override = false); 6242: 6242: CandidateList complete_alias_name(StringView prefix, 6242: ByteCount cursor_pos) const; 6242: private: 6242: struct FaceOrAlias 6242: { 6242: Face face; 6242: String alias; 6242: 6242: FaceOrAlias(Face face = Face{}) : face(face) {} 6242: }; 6242: 6242: using AliasMap = UnorderedMap; 6242: AliasMap m_aliases; 6242: }; 6242: 6242: inline Face get_face(const String& facedesc) 6242: { 6242: if (FaceRegistry::has_instance()) 6242: return FaceRegistry::instance()[facedesc]; 6242: return Face{}; 6242: } 6242: 6242: } 6242: # 12 "normal.cc" 2 6242: # 1 "file.hh" 1 6242: # 10 "file.hh" 6242: # 1 "/usr/include/s390x-linux-gnu/sys/stat.h" 1 3 4 6242: # 99 "/usr/include/s390x-linux-gnu/sys/stat.h" 3 4 6242: 6242: # 99 "/usr/include/s390x-linux-gnu/sys/stat.h" 3 4 6242: extern "C" { 6242: 6242: # 1 "/usr/include/s390x-linux-gnu/bits/stat.h" 1 3 4 6242: # 25 "/usr/include/s390x-linux-gnu/bits/stat.h" 3 4 6242: # 1 "/usr/include/s390x-linux-gnu/bits/wordsize.h" 1 3 4 6242: # 26 "/usr/include/s390x-linux-gnu/bits/stat.h" 2 3 4 6242: # 50 "/usr/include/s390x-linux-gnu/bits/stat.h" 3 4 6242: struct stat 6242: { 6242: __dev_t st_dev; 6242: __ino_t st_ino; 6242: __nlink_t st_nlink; 6242: __mode_t st_mode; 6242: __uid_t st_uid; 6242: __gid_t st_gid; 6242: int __glibc_reserved0; 6242: __dev_t st_rdev; 6242: __off_t st_size; 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: struct timespec st_atim; 6242: struct timespec st_mtim; 6242: struct timespec st_ctim; 6242: # 82 "/usr/include/s390x-linux-gnu/bits/stat.h" 3 4 6242: __blksize_t st_blksize; 6242: __blkcnt_t st_blocks; 6242: long int __glibc_reserved[3]; 6242: }; 6242: # 147 "/usr/include/s390x-linux-gnu/bits/stat.h" 3 4 6242: struct stat64 6242: { 6242: __dev_t st_dev; 6242: __ino64_t st_ino; 6242: __nlink_t st_nlink; 6242: __mode_t st_mode; 6242: __uid_t st_uid; 6242: __gid_t st_gid; 6242: int __glibc_reserved0; 6242: __dev_t st_rdev; 6242: __off_t st_size; 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: struct timespec st_atim; 6242: struct timespec st_mtim; 6242: struct timespec st_ctim; 6242: # 179 "/usr/include/s390x-linux-gnu/bits/stat.h" 3 4 6242: __blksize_t st_blksize; 6242: __blkcnt64_t st_blocks; 6242: long int __glibc_reserved[3]; 6242: }; 6242: # 102 "/usr/include/s390x-linux-gnu/sys/stat.h" 2 3 4 6242: # 205 "/usr/include/s390x-linux-gnu/sys/stat.h" 3 4 6242: extern int stat (const char *__restrict __file, 6242: struct stat *__restrict __buf) throw () __attribute__ ((__nonnull__ (1, 2))); 6242: 6242: 6242: 6242: extern int fstat (int __fd, struct stat *__buf) throw () __attribute__ ((__nonnull__ (2))); 6242: # 224 "/usr/include/s390x-linux-gnu/sys/stat.h" 3 4 6242: extern int stat64 (const char *__restrict __file, 6242: struct stat64 *__restrict __buf) throw () __attribute__ ((__nonnull__ (1, 2))); 6242: extern int fstat64 (int __fd, struct stat64 *__buf) throw () __attribute__ ((__nonnull__ (2))); 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: extern int fstatat (int __fd, const char *__restrict __file, 6242: struct stat *__restrict __buf, int __flag) 6242: throw () __attribute__ ((__nonnull__ (2, 3))); 6242: # 249 "/usr/include/s390x-linux-gnu/sys/stat.h" 3 4 6242: extern int fstatat64 (int __fd, const char *__restrict __file, 6242: struct stat64 *__restrict __buf, int __flag) 6242: throw () __attribute__ ((__nonnull__ (2, 3))); 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: extern int lstat (const char *__restrict __file, 6242: struct stat *__restrict __buf) throw () __attribute__ ((__nonnull__ (1, 2))); 6242: # 272 "/usr/include/s390x-linux-gnu/sys/stat.h" 3 4 6242: extern int lstat64 (const char *__restrict __file, 6242: struct stat64 *__restrict __buf) 6242: throw () __attribute__ ((__nonnull__ (1, 2))); 6242: 6242: 6242: 6242: 6242: 6242: extern int chmod (const char *__file, __mode_t __mode) 6242: throw () __attribute__ ((__nonnull__ (1))); 6242: 6242: 6242: 6242: 6242: 6242: extern int lchmod (const char *__file, __mode_t __mode) 6242: throw () __attribute__ ((__nonnull__ (1))); 6242: 6242: 6242: 6242: 6242: extern int fchmod (int __fd, __mode_t __mode) throw (); 6242: 6242: 6242: 6242: 6242: 6242: extern int fchmodat (int __fd, const char *__file, __mode_t __mode, 6242: int __flag) 6242: throw () __attribute__ ((__nonnull__ (2))) __attribute__ ((__warn_unused_result__)); 6242: 6242: 6242: 6242: 6242: 6242: 6242: extern __mode_t umask (__mode_t __mask) throw (); 6242: 6242: 6242: 6242: 6242: extern __mode_t getumask (void) throw (); 6242: 6242: 6242: 6242: extern int mkdir (const char *__path, __mode_t __mode) 6242: throw () __attribute__ ((__nonnull__ (1))); 6242: 6242: 6242: 6242: 6242: 6242: extern int mkdirat (int __fd, const char *__path, __mode_t __mode) 6242: throw () __attribute__ ((__nonnull__ (2))); 6242: 6242: 6242: 6242: 6242: 6242: 6242: extern int mknod (const char *__path, __mode_t __mode, __dev_t __dev) 6242: throw () __attribute__ ((__nonnull__ (1))); 6242: 6242: 6242: 6242: 6242: 6242: extern int mknodat (int __fd, const char *__path, __mode_t __mode, 6242: __dev_t __dev) throw () __attribute__ ((__nonnull__ (2))); 6242: 6242: 6242: 6242: 6242: 6242: extern int mkfifo (const char *__path, __mode_t __mode) 6242: throw () __attribute__ ((__nonnull__ (1))); 6242: 6242: 6242: 6242: 6242: 6242: extern int mkfifoat (int __fd, const char *__path, __mode_t __mode) 6242: throw () __attribute__ ((__nonnull__ (2))); 6242: 6242: 6242: 6242: 6242: 6242: extern int utimensat (int __fd, const char *__path, 6242: const struct timespec __times[2], 6242: int __flags) 6242: throw () __attribute__ ((__nonnull__ (2))); 6242: 6242: 6242: 6242: 6242: extern int futimens (int __fd, const struct timespec __times[2]) throw (); 6242: # 395 "/usr/include/s390x-linux-gnu/sys/stat.h" 3 4 6242: extern int __fxstat (int __ver, int __fildes, struct stat *__stat_buf) 6242: throw () __attribute__ ((__nonnull__ (3))); 6242: extern int __xstat (int __ver, const char *__filename, 6242: struct stat *__stat_buf) throw () __attribute__ ((__nonnull__ (2, 3))); 6242: extern int __lxstat (int __ver, const char *__filename, 6242: struct stat *__stat_buf) throw () __attribute__ ((__nonnull__ (2, 3))); 6242: extern int __fxstatat (int __ver, int __fildes, const char *__filename, 6242: struct stat *__stat_buf, int __flag) 6242: throw () __attribute__ ((__nonnull__ (3, 4))); 6242: # 428 "/usr/include/s390x-linux-gnu/sys/stat.h" 3 4 6242: extern int __fxstat64 (int __ver, int __fildes, struct stat64 *__stat_buf) 6242: throw () __attribute__ ((__nonnull__ (3))); 6242: extern int __xstat64 (int __ver, const char *__filename, 6242: struct stat64 *__stat_buf) throw () __attribute__ ((__nonnull__ (2, 3))); 6242: extern int __lxstat64 (int __ver, const char *__filename, 6242: struct stat64 *__stat_buf) throw () __attribute__ ((__nonnull__ (2, 3))); 6242: extern int __fxstatat64 (int __ver, int __fildes, const char *__filename, 6242: struct stat64 *__stat_buf, int __flag) 6242: throw () __attribute__ ((__nonnull__ (3, 4))); 6242: 6242: extern int __xmknod (int __ver, const char *__path, __mode_t __mode, 6242: __dev_t *__dev) throw () __attribute__ ((__nonnull__ (2, 4))); 6242: 6242: extern int __xmknodat (int __ver, int __fd, const char *__path, 6242: __mode_t __mode, __dev_t *__dev) 6242: throw () __attribute__ ((__nonnull__ (3, 5))); 6242: 6242: 6242: 6242: 6242: extern __inline __attribute__ ((__gnu_inline__)) int 6242: __attribute__ ((__leaf__)) stat (const char *__path, struct stat *__statbuf) throw () 6242: { 6242: return __xstat (1, __path, __statbuf); 6242: } 6242: 6242: 6242: extern __inline __attribute__ ((__gnu_inline__)) int 6242: __attribute__ ((__leaf__)) lstat (const char *__path, struct stat *__statbuf) throw () 6242: { 6242: return __lxstat (1, __path, __statbuf); 6242: } 6242: 6242: 6242: extern __inline __attribute__ ((__gnu_inline__)) int 6242: __attribute__ ((__leaf__)) fstat (int __fd, struct stat *__statbuf) throw () 6242: { 6242: return __fxstat (1, __fd, __statbuf); 6242: } 6242: 6242: 6242: extern __inline __attribute__ ((__gnu_inline__)) int 6242: __attribute__ ((__leaf__)) fstatat (int __fd, const char *__filename, struct stat *__statbuf, int __flag) throw () 6242: 6242: { 6242: return __fxstatat (1, __fd, __filename, __statbuf, __flag); 6242: } 6242: 6242: 6242: 6242: extern __inline __attribute__ ((__gnu_inline__)) int 6242: __attribute__ ((__leaf__)) mknod (const char *__path, __mode_t __mode, __dev_t __dev) throw () 6242: { 6242: return __xmknod (0, __path, __mode, &__dev); 6242: } 6242: 6242: 6242: 6242: extern __inline __attribute__ ((__gnu_inline__)) int 6242: __attribute__ ((__leaf__)) mknodat (int __fd, const char *__path, __mode_t __mode, __dev_t __dev) throw () 6242: 6242: { 6242: return __xmknodat (0, __fd, __path, __mode, &__dev); 6242: } 6242: 6242: 6242: 6242: 6242: 6242: extern __inline __attribute__ ((__gnu_inline__)) int 6242: __attribute__ ((__leaf__)) stat64 (const char *__path, struct stat64 *__statbuf) throw () 6242: { 6242: return __xstat64 (1, __path, __statbuf); 6242: } 6242: 6242: 6242: extern __inline __attribute__ ((__gnu_inline__)) int 6242: __attribute__ ((__leaf__)) lstat64 (const char *__path, struct stat64 *__statbuf) throw () 6242: { 6242: return __lxstat64 (1, __path, __statbuf); 6242: } 6242: 6242: 6242: extern __inline __attribute__ ((__gnu_inline__)) int 6242: __attribute__ ((__leaf__)) fstat64 (int __fd, struct stat64 *__statbuf) throw () 6242: { 6242: return __fxstat64 (1, __fd, __statbuf); 6242: } 6242: 6242: 6242: extern __inline __attribute__ ((__gnu_inline__)) int 6242: __attribute__ ((__leaf__)) fstatat64 (int __fd, const char *__filename, struct stat64 *__statbuf, int __flag) throw () 6242: 6242: { 6242: return __fxstatat64 (1, __fd, __filename, __statbuf, __flag); 6242: } 6242: 6242: 6242: 6242: 6242: 6242: 6242: } 6242: # 11 "file.hh" 2 6242: 6242: 6242: # 12 "file.hh" 6242: namespace Kakoune 6242: { 6242: 6242: class Buffer; 6242: class String; 6242: class StringView; 6242: class Regex; 6242: 6242: using CandidateList = Vector; 6242: 6242: 6242: String parse_filename(StringView filename); 6242: String real_path(StringView filename); 6242: String compact_path(StringView filename); 6242: 6242: 6242: std::pair split_path(StringView path); 6242: 6242: String get_kak_binary_path(); 6242: 6242: bool fd_readable(int fd); 6242: bool fd_writable(int fd); 6242: String read_fd(int fd, bool text = false); 6242: String read_file(StringView filename, bool text = false); 6242: void write(int fd, StringView data); 6242: 6242: struct MappedFile 6242: { 6242: MappedFile(StringView filename); 6242: ~MappedFile(); 6242: 6242: operator StringView() const; 6242: 6242: int fd; 6242: const char* data; 6242: struct stat st {}; 6242: }; 6242: 6242: void write_buffer_to_file(Buffer& buffer, StringView filename); 6242: void write_buffer_to_fd(Buffer& buffer, int fd); 6242: void write_buffer_to_backup_file(Buffer& buffer); 6242: 6242: String find_file(StringView filename, ConstArrayView paths); 6242: bool file_exists(StringView filename); 6242: 6242: Vector list_files(StringView directory); 6242: 6242: void make_directory(StringView dir, mode_t mode); 6242: 6242: timespec get_fs_timestamp(StringView filename); 6242: 6242: constexpr bool operator==(const timespec& lhs, const timespec& rhs) 6242: { 6242: return lhs.tv_sec == rhs.tv_sec and lhs.tv_nsec == rhs.tv_nsec; 6242: } 6242: 6242: constexpr bool operator!=(const timespec& lhs, const timespec& rhs) 6242: { 6242: return not (lhs == rhs); 6242: } 6242: 6242: enum class FilenameFlags 6242: { 6242: None = 0, 6242: OnlyDirectories = 1 << 0, 6242: Expand = 1 << 1 6242: }; 6242: 6242: template<> struct WithBitOps : std::true_type {}; 6242: 6242: CandidateList complete_filename(StringView prefix, const Regex& ignore_regex, 6242: ByteCount cursor_pos = -1, 6242: FilenameFlags flags = FilenameFlags::None); 6242: 6242: CandidateList complete_command(StringView prefix, ByteCount cursor_pos = -1); 6242: 6242: } 6242: # 13 "normal.cc" 2 6242: 6242: 6242: # 1 "register_manager.hh" 1 6242: # 11 "register_manager.hh" 6242: namespace Kakoune 6242: { 6242: 6242: class Context; 6242: 6242: class Register 6242: { 6242: public: 6242: virtual ~Register() {} 6242: virtual Register& operator=(ConstArrayView values) = 0; 6242: 6242: virtual ConstArrayView values(const Context& context) = 0; 6242: }; 6242: 6242: 6242: 6242: class StaticRegister : public Register 6242: { 6242: public: 6242: Register& operator=(ConstArrayView values) override 6242: { 6242: m_content = Vector(values.begin(), values.end()); 6242: return *this; 6242: } 6242: 6242: ConstArrayView values(const Context&) override 6242: { 6242: if (m_content.empty()) 6242: return ConstArrayView(String::ms_empty); 6242: else 6242: return ConstArrayView(m_content); 6242: } 6242: protected: 6242: Vector m_content; 6242: }; 6242: 6242: 6242: 6242: template 6242: class DynamicRegister : public StaticRegister 6242: { 6242: public: 6242: DynamicRegister(Func function) 6242: : m_function(std::move(function)) {} 6242: 6242: Register& operator=(ConstArrayView values) override 6242: { 6242: throw runtime_error("this register is not assignable"); 6242: } 6242: 6242: ConstArrayView values(const Context& context) override 6242: { 6242: m_content = m_function(context); 6242: return StaticRegister::values(context); 6242: } 6242: 6242: private: 6242: Func m_function; 6242: }; 6242: 6242: template 6242: std::unique_ptr make_dyn_reg(Func func) 6242: { 6242: return make_unique>(std::move(func)); 6242: } 6242: 6242: class NullRegister : public Register 6242: { 6242: public: 6242: Register& operator=(ConstArrayView values) override 6242: { 6242: return *this; 6242: } 6242: 6242: ConstArrayView values(const Context& context) override 6242: { 6242: return ConstArrayView(String::ms_empty); 6242: } 6242: }; 6242: 6242: class RegisterManager : public Singleton 6242: { 6242: public: 6242: Register& operator[](StringView reg) const; 6242: Register& operator[](Codepoint c) const; 6242: void add_register(char c, std::unique_ptr reg); 6242: 6242: protected: 6242: UnorderedMap, MemoryDomain::Registers> m_registers; 6242: }; 6242: 6242: } 6242: # 16 "normal.cc" 2 6242: # 1 "selectors.hh" 1 6242: # 9 "selectors.hh" 6242: # 1 "regex.hh" 1 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: # 1 "/usr/include/boost/regex.hpp" 1 3 4 6242: # 28 "/usr/include/boost/regex.hpp" 3 4 6242: # 1 "/usr/include/boost/regex/config.hpp" 1 3 4 6242: # 28 "/usr/include/boost/regex/config.hpp" 3 4 6242: # 1 "/usr/include/boost/version.hpp" 1 3 4 6242: # 29 "/usr/include/boost/regex/config.hpp" 2 3 4 6242: # 42 "/usr/include/boost/regex/config.hpp" 3 4 6242: # 1 "/usr/include/boost/regex/user.hpp" 1 3 4 6242: # 43 "/usr/include/boost/regex/config.hpp" 2 3 4 6242: 6242: # 1 "/usr/include/boost/config.hpp" 1 3 4 6242: # 30 "/usr/include/boost/config.hpp" 3 4 6242: # 1 "/usr/include/boost/config/user.hpp" 1 3 4 6242: # 31 "/usr/include/boost/config.hpp" 2 3 4 6242: 6242: 6242: 6242: 6242: # 1 "/usr/include/boost/config/detail/select_compiler_config.hpp" 1 3 4 6242: # 36 "/usr/include/boost/config.hpp" 2 3 4 6242: 6242: 6242: 6242: # 1 "/usr/include/boost/config/compiler/gcc.hpp" 1 3 4 6242: # 40 "/usr/include/boost/config.hpp" 2 3 4 6242: 6242: 6242: 6242: 6242: # 1 "/usr/include/boost/config/detail/select_stdlib_config.hpp" 1 3 4 6242: # 45 "/usr/include/boost/config.hpp" 2 3 4 6242: 6242: 6242: 6242: # 1 "/usr/include/boost/config/stdlib/libstdcpp3.hpp" 1 3 4 6242: # 78 "/usr/include/boost/config/stdlib/libstdcpp3.hpp" 3 4 6242: # 1 "/usr/include/unistd.h" 1 3 4 6242: # 27 "/usr/include/unistd.h" 3 4 6242: 6242: # 27 "/usr/include/unistd.h" 3 4 6242: extern "C" { 6242: # 205 "/usr/include/unistd.h" 3 4 6242: # 1 "/usr/include/s390x-linux-gnu/bits/posix_opt.h" 1 3 4 6242: # 206 "/usr/include/unistd.h" 2 3 4 6242: 6242: 6242: 6242: # 1 "/usr/include/s390x-linux-gnu/bits/environments.h" 1 3 4 6242: # 22 "/usr/include/s390x-linux-gnu/bits/environments.h" 3 4 6242: # 1 "/usr/include/s390x-linux-gnu/bits/wordsize.h" 1 3 4 6242: # 23 "/usr/include/s390x-linux-gnu/bits/environments.h" 2 3 4 6242: # 210 "/usr/include/unistd.h" 2 3 4 6242: # 229 "/usr/include/unistd.h" 3 4 6242: # 1 "/usr/lib/gcc/s390x-linux-gnu/8/include/stddef.h" 1 3 4 6242: # 230 "/usr/include/unistd.h" 2 3 4 6242: # 277 "/usr/include/unistd.h" 3 4 6242: typedef __socklen_t socklen_t; 6242: # 290 "/usr/include/unistd.h" 3 4 6242: extern int access (const char *__name, int __type) throw () __attribute__ ((__nonnull__ (1))); 6242: 6242: 6242: 6242: 6242: extern int euidaccess (const char *__name, int __type) 6242: throw () __attribute__ ((__nonnull__ (1))); 6242: 6242: 6242: extern int eaccess (const char *__name, int __type) 6242: throw () __attribute__ ((__nonnull__ (1))); 6242: 6242: 6242: 6242: 6242: 6242: 6242: extern int faccessat (int __fd, const char *__file, int __type, int __flag) 6242: throw () __attribute__ ((__nonnull__ (2))) __attribute__ ((__warn_unused_result__)); 6242: # 337 "/usr/include/unistd.h" 3 4 6242: extern __off_t lseek (int __fd, __off_t __offset, int __whence) throw (); 6242: # 348 "/usr/include/unistd.h" 3 4 6242: extern __off64_t lseek64 (int __fd, __off64_t __offset, int __whence) 6242: throw (); 6242: 6242: 6242: 6242: 6242: 6242: 6242: extern int close (int __fd); 6242: 6242: 6242: 6242: 6242: 6242: 6242: extern ssize_t read (int __fd, void *__buf, size_t __nbytes) __attribute__ ((__warn_unused_result__)); 6242: 6242: 6242: 6242: 6242: 6242: extern ssize_t write (int __fd, const void *__buf, size_t __n) __attribute__ ((__warn_unused_result__)); 6242: # 379 "/usr/include/unistd.h" 3 4 6242: extern ssize_t pread (int __fd, void *__buf, size_t __nbytes, 6242: __off_t __offset) __attribute__ ((__warn_unused_result__)); 6242: 6242: 6242: 6242: 6242: 6242: 6242: extern ssize_t pwrite (int __fd, const void *__buf, size_t __n, 6242: __off_t __offset) __attribute__ ((__warn_unused_result__)); 6242: # 407 "/usr/include/unistd.h" 3 4 6242: extern ssize_t pread64 (int __fd, void *__buf, size_t __nbytes, 6242: __off64_t __offset) __attribute__ ((__warn_unused_result__)); 6242: 6242: 6242: extern ssize_t pwrite64 (int __fd, const void *__buf, size_t __n, 6242: __off64_t __offset) __attribute__ ((__warn_unused_result__)); 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: extern int pipe (int __pipedes[2]) throw () __attribute__ ((__warn_unused_result__)); 6242: 6242: 6242: 6242: 6242: extern int pipe2 (int __pipedes[2], int __flags) throw () __attribute__ ((__warn_unused_result__)); 6242: # 435 "/usr/include/unistd.h" 3 4 6242: extern unsigned int alarm (unsigned int __seconds) throw (); 6242: # 447 "/usr/include/unistd.h" 3 4 6242: extern unsigned int sleep (unsigned int __seconds); 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: extern __useconds_t ualarm (__useconds_t __value, __useconds_t __interval) 6242: throw (); 6242: 6242: 6242: 6242: 6242: 6242: 6242: extern int usleep (__useconds_t __useconds); 6242: # 472 "/usr/include/unistd.h" 3 4 6242: extern int pause (void); 6242: 6242: 6242: 6242: extern int chown (const char *__file, __uid_t __owner, __gid_t __group) 6242: throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); 6242: 6242: 6242: 6242: extern int fchown (int __fd, __uid_t __owner, __gid_t __group) throw () __attribute__ ((__warn_unused_result__)); 6242: 6242: 6242: 6242: 6242: extern int lchown (const char *__file, __uid_t __owner, __gid_t __group) 6242: throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); 6242: 6242: 6242: 6242: 6242: 6242: 6242: extern int fchownat (int __fd, const char *__file, __uid_t __owner, 6242: __gid_t __group, int __flag) 6242: throw () __attribute__ ((__nonnull__ (2))) __attribute__ ((__warn_unused_result__)); 6242: 6242: 6242: 6242: extern int chdir (const char *__path) throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); 6242: 6242: 6242: 6242: extern int fchdir (int __fd) throw () __attribute__ ((__warn_unused_result__)); 6242: # 514 "/usr/include/unistd.h" 3 4 6242: extern char *getcwd (char *__buf, size_t __size) throw () __attribute__ ((__warn_unused_result__)); 6242: 6242: 6242: 6242: 6242: 6242: extern char *get_current_dir_name (void) throw (); 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: extern char *getwd (char *__buf) 6242: throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__deprecated__)) __attribute__ ((__warn_unused_result__)); 6242: 6242: 6242: 6242: 6242: extern int dup (int __fd) throw () __attribute__ ((__warn_unused_result__)); 6242: 6242: 6242: extern int dup2 (int __fd, int __fd2) throw (); 6242: 6242: 6242: 6242: 6242: extern int dup3 (int __fd, int __fd2, int __flags) throw (); 6242: 6242: 6242: 6242: extern char **__environ; 6242: 6242: extern char **environ; 6242: 6242: 6242: 6242: 6242: 6242: extern int execve (const char *__path, char *const __argv[], 6242: char *const __envp[]) throw () __attribute__ ((__nonnull__ (1, 2))); 6242: 6242: 6242: 6242: 6242: extern int fexecve (int __fd, char *const __argv[], char *const __envp[]) 6242: throw () __attribute__ ((__nonnull__ (2))); 6242: 6242: 6242: 6242: 6242: extern int execv (const char *__path, char *const __argv[]) 6242: throw () __attribute__ ((__nonnull__ (1, 2))); 6242: 6242: 6242: 6242: extern int execle (const char *__path, const char *__arg, ...) 6242: throw () __attribute__ ((__nonnull__ (1, 2))); 6242: 6242: 6242: 6242: extern int execl (const char *__path, const char *__arg, ...) 6242: throw () __attribute__ ((__nonnull__ (1, 2))); 6242: 6242: 6242: 6242: extern int execvp (const char *__file, char *const __argv[]) 6242: throw () __attribute__ ((__nonnull__ (1, 2))); 6242: 6242: 6242: 6242: 6242: extern int execlp (const char *__file, const char *__arg, ...) 6242: throw () __attribute__ ((__nonnull__ (1, 2))); 6242: 6242: 6242: 6242: 6242: extern int execvpe (const char *__file, char *const __argv[], 6242: char *const __envp[]) 6242: throw () __attribute__ ((__nonnull__ (1, 2))); 6242: 6242: 6242: 6242: 6242: 6242: extern int nice (int __inc) throw () __attribute__ ((__warn_unused_result__)); 6242: 6242: 6242: 6242: 6242: extern void _exit (int __status) __attribute__ ((__noreturn__)); 6242: 6242: 6242: 6242: 6242: 6242: # 1 "/usr/include/s390x-linux-gnu/bits/confname.h" 1 3 4 6242: # 24 "/usr/include/s390x-linux-gnu/bits/confname.h" 3 4 6242: enum 6242: { 6242: _PC_LINK_MAX, 6242: 6242: _PC_MAX_CANON, 6242: 6242: _PC_MAX_INPUT, 6242: 6242: _PC_NAME_MAX, 6242: 6242: _PC_PATH_MAX, 6242: 6242: _PC_PIPE_BUF, 6242: 6242: _PC_CHOWN_RESTRICTED, 6242: 6242: _PC_NO_TRUNC, 6242: 6242: _PC_VDISABLE, 6242: 6242: _PC_SYNC_IO, 6242: 6242: _PC_ASYNC_IO, 6242: 6242: _PC_PRIO_IO, 6242: 6242: _PC_SOCK_MAXBUF, 6242: 6242: _PC_FILESIZEBITS, 6242: 6242: _PC_REC_INCR_XFER_SIZE, 6242: 6242: _PC_REC_MAX_XFER_SIZE, 6242: 6242: _PC_REC_MIN_XFER_SIZE, 6242: 6242: _PC_REC_XFER_ALIGN, 6242: 6242: _PC_ALLOC_SIZE_MIN, 6242: 6242: _PC_SYMLINK_MAX, 6242: 6242: _PC_2_SYMLINKS 6242: 6242: }; 6242: 6242: 6242: enum 6242: { 6242: _SC_ARG_MAX, 6242: 6242: _SC_CHILD_MAX, 6242: 6242: _SC_CLK_TCK, 6242: 6242: _SC_NGROUPS_MAX, 6242: 6242: _SC_OPEN_MAX, 6242: 6242: _SC_STREAM_MAX, 6242: 6242: _SC_TZNAME_MAX, 6242: 6242: _SC_JOB_CONTROL, 6242: 6242: _SC_SAVED_IDS, 6242: 6242: _SC_REALTIME_SIGNALS, 6242: 6242: _SC_PRIORITY_SCHEDULING, 6242: 6242: _SC_TIMERS, 6242: 6242: _SC_ASYNCHRONOUS_IO, 6242: 6242: _SC_PRIORITIZED_IO, 6242: 6242: _SC_SYNCHRONIZED_IO, 6242: 6242: _SC_FSYNC, 6242: 6242: _SC_MAPPED_FILES, 6242: 6242: _SC_MEMLOCK, 6242: 6242: _SC_MEMLOCK_RANGE, 6242: 6242: _SC_MEMORY_PROTECTION, 6242: 6242: _SC_MESSAGE_PASSING, 6242: 6242: _SC_SEMAPHORES, 6242: 6242: _SC_SHARED_MEMORY_OBJECTS, 6242: 6242: _SC_AIO_LISTIO_MAX, 6242: 6242: _SC_AIO_MAX, 6242: 6242: _SC_AIO_PRIO_DELTA_MAX, 6242: 6242: _SC_DELAYTIMER_MAX, 6242: 6242: _SC_MQ_OPEN_MAX, 6242: 6242: _SC_MQ_PRIO_MAX, 6242: 6242: _SC_VERSION, 6242: 6242: _SC_PAGESIZE, 6242: 6242: 6242: _SC_RTSIG_MAX, 6242: 6242: _SC_SEM_NSEMS_MAX, 6242: 6242: _SC_SEM_VALUE_MAX, 6242: 6242: _SC_SIGQUEUE_MAX, 6242: 6242: _SC_TIMER_MAX, 6242: 6242: 6242: 6242: 6242: _SC_BC_BASE_MAX, 6242: 6242: _SC_BC_DIM_MAX, 6242: 6242: _SC_BC_SCALE_MAX, 6242: 6242: _SC_BC_STRING_MAX, 6242: 6242: _SC_COLL_WEIGHTS_MAX, 6242: 6242: _SC_EQUIV_CLASS_MAX, 6242: 6242: _SC_EXPR_NEST_MAX, 6242: 6242: _SC_LINE_MAX, 6242: 6242: _SC_RE_DUP_MAX, 6242: 6242: _SC_CHARCLASS_NAME_MAX, 6242: 6242: 6242: _SC_2_VERSION, 6242: 6242: _SC_2_C_BIND, 6242: 6242: _SC_2_C_DEV, 6242: 6242: _SC_2_FORT_DEV, 6242: 6242: _SC_2_FORT_RUN, 6242: 6242: _SC_2_SW_DEV, 6242: 6242: _SC_2_LOCALEDEF, 6242: 6242: 6242: _SC_PII, 6242: 6242: _SC_PII_XTI, 6242: 6242: _SC_PII_SOCKET, 6242: 6242: _SC_PII_INTERNET, 6242: 6242: _SC_PII_OSI, 6242: 6242: _SC_POLL, 6242: 6242: _SC_SELECT, 6242: 6242: _SC_UIO_MAXIOV, 6242: 6242: _SC_IOV_MAX = _SC_UIO_MAXIOV, 6242: 6242: _SC_PII_INTERNET_STREAM, 6242: 6242: _SC_PII_INTERNET_DGRAM, 6242: 6242: _SC_PII_OSI_COTS, 6242: 6242: _SC_PII_OSI_CLTS, 6242: 6242: _SC_PII_OSI_M, 6242: 6242: _SC_T_IOV_MAX, 6242: 6242: 6242: 6242: _SC_THREADS, 6242: 6242: _SC_THREAD_SAFE_FUNCTIONS, 6242: 6242: _SC_GETGR_R_SIZE_MAX, 6242: 6242: _SC_GETPW_R_SIZE_MAX, 6242: 6242: _SC_LOGIN_NAME_MAX, 6242: 6242: _SC_TTY_NAME_MAX, 6242: 6242: _SC_THREAD_DESTRUCTOR_ITERATIONS, 6242: 6242: _SC_THREAD_KEYS_MAX, 6242: 6242: _SC_THREAD_STACK_MIN, 6242: 6242: _SC_THREAD_THREADS_MAX, 6242: 6242: _SC_THREAD_ATTR_STACKADDR, 6242: 6242: _SC_THREAD_ATTR_STACKSIZE, 6242: 6242: _SC_THREAD_PRIORITY_SCHEDULING, 6242: 6242: _SC_THREAD_PRIO_INHERIT, 6242: 6242: _SC_THREAD_PRIO_PROTECT, 6242: 6242: _SC_THREAD_PROCESS_SHARED, 6242: 6242: 6242: _SC_NPROCESSORS_CONF, 6242: 6242: _SC_NPROCESSORS_ONLN, 6242: 6242: _SC_PHYS_PAGES, 6242: 6242: _SC_AVPHYS_PAGES, 6242: 6242: _SC_ATEXIT_MAX, 6242: 6242: _SC_PASS_MAX, 6242: 6242: 6242: _SC_XOPEN_VERSION, 6242: 6242: _SC_XOPEN_XCU_VERSION, 6242: 6242: _SC_XOPEN_UNIX, 6242: 6242: _SC_XOPEN_CRYPT, 6242: 6242: _SC_XOPEN_ENH_I18N, 6242: 6242: _SC_XOPEN_SHM, 6242: 6242: 6242: _SC_2_CHAR_TERM, 6242: 6242: _SC_2_C_VERSION, 6242: 6242: _SC_2_UPE, 6242: 6242: 6242: _SC_XOPEN_XPG2, 6242: 6242: _SC_XOPEN_XPG3, 6242: 6242: _SC_XOPEN_XPG4, 6242: 6242: 6242: _SC_CHAR_BIT, 6242: 6242: _SC_CHAR_MAX, 6242: 6242: _SC_CHAR_MIN, 6242: 6242: _SC_INT_MAX, 6242: 6242: _SC_INT_MIN, 6242: 6242: _SC_LONG_BIT, 6242: 6242: _SC_WORD_BIT, 6242: 6242: _SC_MB_LEN_MAX, 6242: 6242: _SC_NZERO, 6242: 6242: _SC_SSIZE_MAX, 6242: 6242: _SC_SCHAR_MAX, 6242: 6242: _SC_SCHAR_MIN, 6242: 6242: _SC_SHRT_MAX, 6242: 6242: _SC_SHRT_MIN, 6242: 6242: _SC_UCHAR_MAX, 6242: 6242: _SC_UINT_MAX, 6242: 6242: _SC_ULONG_MAX, 6242: 6242: _SC_USHRT_MAX, 6242: 6242: 6242: _SC_NL_ARGMAX, 6242: 6242: _SC_NL_LANGMAX, 6242: 6242: _SC_NL_MSGMAX, 6242: 6242: _SC_NL_NMAX, 6242: 6242: _SC_NL_SETMAX, 6242: 6242: _SC_NL_TEXTMAX, 6242: 6242: 6242: _SC_XBS5_ILP32_OFF32, 6242: 6242: _SC_XBS5_ILP32_OFFBIG, 6242: 6242: _SC_XBS5_LP64_OFF64, 6242: 6242: _SC_XBS5_LPBIG_OFFBIG, 6242: 6242: 6242: _SC_XOPEN_LEGACY, 6242: 6242: _SC_XOPEN_REALTIME, 6242: 6242: _SC_XOPEN_REALTIME_THREADS, 6242: 6242: 6242: _SC_ADVISORY_INFO, 6242: 6242: _SC_BARRIERS, 6242: 6242: _SC_BASE, 6242: 6242: _SC_C_LANG_SUPPORT, 6242: 6242: _SC_C_LANG_SUPPORT_R, 6242: 6242: _SC_CLOCK_SELECTION, 6242: 6242: _SC_CPUTIME, 6242: 6242: _SC_THREAD_CPUTIME, 6242: 6242: _SC_DEVICE_IO, 6242: 6242: _SC_DEVICE_SPECIFIC, 6242: 6242: _SC_DEVICE_SPECIFIC_R, 6242: 6242: _SC_FD_MGMT, 6242: 6242: _SC_FIFO, 6242: 6242: _SC_PIPE, 6242: 6242: _SC_FILE_ATTRIBUTES, 6242: 6242: _SC_FILE_LOCKING, 6242: 6242: _SC_FILE_SYSTEM, 6242: 6242: _SC_MONOTONIC_CLOCK, 6242: 6242: _SC_MULTI_PROCESS, 6242: 6242: _SC_SINGLE_PROCESS, 6242: 6242: _SC_NETWORKING, 6242: 6242: _SC_READER_WRITER_LOCKS, 6242: 6242: _SC_SPIN_LOCKS, 6242: 6242: _SC_REGEXP, 6242: 6242: _SC_REGEX_VERSION, 6242: 6242: _SC_SHELL, 6242: 6242: _SC_SIGNALS, 6242: 6242: _SC_SPAWN, 6242: 6242: _SC_SPORADIC_SERVER, 6242: 6242: _SC_THREAD_SPORADIC_SERVER, 6242: 6242: _SC_SYSTEM_DATABASE, 6242: 6242: _SC_SYSTEM_DATABASE_R, 6242: 6242: _SC_TIMEOUTS, 6242: 6242: _SC_TYPED_MEMORY_OBJECTS, 6242: 6242: _SC_USER_GROUPS, 6242: 6242: _SC_USER_GROUPS_R, 6242: 6242: _SC_2_PBS, 6242: 6242: _SC_2_PBS_ACCOUNTING, 6242: 6242: _SC_2_PBS_LOCATE, 6242: 6242: _SC_2_PBS_MESSAGE, 6242: 6242: _SC_2_PBS_TRACK, 6242: 6242: _SC_SYMLOOP_MAX, 6242: 6242: _SC_STREAMS, 6242: 6242: _SC_2_PBS_CHECKPOINT, 6242: 6242: 6242: _SC_V6_ILP32_OFF32, 6242: 6242: _SC_V6_ILP32_OFFBIG, 6242: 6242: _SC_V6_LP64_OFF64, 6242: 6242: _SC_V6_LPBIG_OFFBIG, 6242: 6242: 6242: _SC_HOST_NAME_MAX, 6242: 6242: _SC_TRACE, 6242: 6242: _SC_TRACE_EVENT_FILTER, 6242: 6242: _SC_TRACE_INHERIT, 6242: 6242: _SC_TRACE_LOG, 6242: 6242: 6242: _SC_LEVEL1_ICACHE_SIZE, 6242: 6242: _SC_LEVEL1_ICACHE_ASSOC, 6242: 6242: _SC_LEVEL1_ICACHE_LINESIZE, 6242: 6242: _SC_LEVEL1_DCACHE_SIZE, 6242: 6242: _SC_LEVEL1_DCACHE_ASSOC, 6242: 6242: _SC_LEVEL1_DCACHE_LINESIZE, 6242: 6242: _SC_LEVEL2_CACHE_SIZE, 6242: 6242: _SC_LEVEL2_CACHE_ASSOC, 6242: 6242: _SC_LEVEL2_CACHE_LINESIZE, 6242: 6242: _SC_LEVEL3_CACHE_SIZE, 6242: 6242: _SC_LEVEL3_CACHE_ASSOC, 6242: 6242: _SC_LEVEL3_CACHE_LINESIZE, 6242: 6242: _SC_LEVEL4_CACHE_SIZE, 6242: 6242: _SC_LEVEL4_CACHE_ASSOC, 6242: 6242: _SC_LEVEL4_CACHE_LINESIZE, 6242: 6242: 6242: 6242: _SC_IPV6 = _SC_LEVEL1_ICACHE_SIZE + 50, 6242: 6242: _SC_RAW_SOCKETS, 6242: 6242: 6242: _SC_V7_ILP32_OFF32, 6242: 6242: _SC_V7_ILP32_OFFBIG, 6242: 6242: _SC_V7_LP64_OFF64, 6242: 6242: _SC_V7_LPBIG_OFFBIG, 6242: 6242: 6242: _SC_SS_REPL_MAX, 6242: 6242: 6242: _SC_TRACE_EVENT_NAME_MAX, 6242: 6242: _SC_TRACE_NAME_MAX, 6242: 6242: _SC_TRACE_SYS_MAX, 6242: 6242: _SC_TRACE_USER_EVENT_MAX, 6242: 6242: 6242: _SC_XOPEN_STREAMS, 6242: 6242: 6242: _SC_THREAD_ROBUST_PRIO_INHERIT, 6242: 6242: _SC_THREAD_ROBUST_PRIO_PROTECT 6242: 6242: }; 6242: 6242: 6242: enum 6242: { 6242: _CS_PATH, 6242: 6242: 6242: _CS_V6_WIDTH_RESTRICTED_ENVS, 6242: 6242: 6242: 6242: _CS_GNU_LIBC_VERSION, 6242: 6242: _CS_GNU_LIBPTHREAD_VERSION, 6242: 6242: 6242: _CS_V5_WIDTH_RESTRICTED_ENVS, 6242: 6242: 6242: 6242: _CS_V7_WIDTH_RESTRICTED_ENVS, 6242: 6242: 6242: 6242: _CS_LFS_CFLAGS = 1000, 6242: 6242: _CS_LFS_LDFLAGS, 6242: 6242: _CS_LFS_LIBS, 6242: 6242: _CS_LFS_LINTFLAGS, 6242: 6242: _CS_LFS64_CFLAGS, 6242: 6242: _CS_LFS64_LDFLAGS, 6242: 6242: _CS_LFS64_LIBS, 6242: 6242: _CS_LFS64_LINTFLAGS, 6242: 6242: 6242: _CS_XBS5_ILP32_OFF32_CFLAGS = 1100, 6242: 6242: _CS_XBS5_ILP32_OFF32_LDFLAGS, 6242: 6242: _CS_XBS5_ILP32_OFF32_LIBS, 6242: 6242: _CS_XBS5_ILP32_OFF32_LINTFLAGS, 6242: 6242: _CS_XBS5_ILP32_OFFBIG_CFLAGS, 6242: 6242: _CS_XBS5_ILP32_OFFBIG_LDFLAGS, 6242: 6242: _CS_XBS5_ILP32_OFFBIG_LIBS, 6242: 6242: _CS_XBS5_ILP32_OFFBIG_LINTFLAGS, 6242: 6242: _CS_XBS5_LP64_OFF64_CFLAGS, 6242: 6242: _CS_XBS5_LP64_OFF64_LDFLAGS, 6242: 6242: _CS_XBS5_LP64_OFF64_LIBS, 6242: 6242: _CS_XBS5_LP64_OFF64_LINTFLAGS, 6242: 6242: _CS_XBS5_LPBIG_OFFBIG_CFLAGS, 6242: 6242: _CS_XBS5_LPBIG_OFFBIG_LDFLAGS, 6242: 6242: _CS_XBS5_LPBIG_OFFBIG_LIBS, 6242: 6242: _CS_XBS5_LPBIG_OFFBIG_LINTFLAGS, 6242: 6242: 6242: _CS_POSIX_V6_ILP32_OFF32_CFLAGS, 6242: 6242: _CS_POSIX_V6_ILP32_OFF32_LDFLAGS, 6242: 6242: _CS_POSIX_V6_ILP32_OFF32_LIBS, 6242: 6242: _CS_POSIX_V6_ILP32_OFF32_LINTFLAGS, 6242: 6242: _CS_POSIX_V6_ILP32_OFFBIG_CFLAGS, 6242: 6242: _CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS, 6242: 6242: _CS_POSIX_V6_ILP32_OFFBIG_LIBS, 6242: 6242: _CS_POSIX_V6_ILP32_OFFBIG_LINTFLAGS, 6242: 6242: _CS_POSIX_V6_LP64_OFF64_CFLAGS, 6242: 6242: _CS_POSIX_V6_LP64_OFF64_LDFLAGS, 6242: 6242: _CS_POSIX_V6_LP64_OFF64_LIBS, 6242: 6242: _CS_POSIX_V6_LP64_OFF64_LINTFLAGS, 6242: 6242: _CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS, 6242: 6242: _CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS, 6242: 6242: _CS_POSIX_V6_LPBIG_OFFBIG_LIBS, 6242: 6242: _CS_POSIX_V6_LPBIG_OFFBIG_LINTFLAGS, 6242: 6242: 6242: _CS_POSIX_V7_ILP32_OFF32_CFLAGS, 6242: 6242: _CS_POSIX_V7_ILP32_OFF32_LDFLAGS, 6242: 6242: _CS_POSIX_V7_ILP32_OFF32_LIBS, 6242: 6242: _CS_POSIX_V7_ILP32_OFF32_LINTFLAGS, 6242: 6242: _CS_POSIX_V7_ILP32_OFFBIG_CFLAGS, 6242: 6242: _CS_POSIX_V7_ILP32_OFFBIG_LDFLAGS, 6242: 6242: _CS_POSIX_V7_ILP32_OFFBIG_LIBS, 6242: 6242: _CS_POSIX_V7_ILP32_OFFBIG_LINTFLAGS, 6242: 6242: _CS_POSIX_V7_LP64_OFF64_CFLAGS, 6242: 6242: _CS_POSIX_V7_LP64_OFF64_LDFLAGS, 6242: 6242: _CS_POSIX_V7_LP64_OFF64_LIBS, 6242: 6242: _CS_POSIX_V7_LP64_OFF64_LINTFLAGS, 6242: 6242: _CS_POSIX_V7_LPBIG_OFFBIG_CFLAGS, 6242: 6242: _CS_POSIX_V7_LPBIG_OFFBIG_LDFLAGS, 6242: 6242: _CS_POSIX_V7_LPBIG_OFFBIG_LIBS, 6242: 6242: _CS_POSIX_V7_LPBIG_OFFBIG_LINTFLAGS, 6242: 6242: 6242: _CS_V6_ENV, 6242: 6242: _CS_V7_ENV 6242: 6242: }; 6242: # 613 "/usr/include/unistd.h" 2 3 4 6242: 6242: 6242: extern long int pathconf (const char *__path, int __name) 6242: throw () __attribute__ ((__nonnull__ (1))); 6242: 6242: 6242: extern long int fpathconf (int __fd, int __name) throw (); 6242: 6242: 6242: extern long int sysconf (int __name) throw (); 6242: 6242: 6242: 6242: extern size_t confstr (int __name, char *__buf, size_t __len) throw (); 6242: 6242: 6242: 6242: 6242: extern __pid_t getpid (void) throw (); 6242: 6242: 6242: extern __pid_t getppid (void) throw (); 6242: 6242: 6242: extern __pid_t getpgrp (void) throw (); 6242: 6242: 6242: extern __pid_t __getpgid (__pid_t __pid) throw (); 6242: 6242: extern __pid_t getpgid (__pid_t __pid) throw (); 6242: 6242: 6242: 6242: 6242: 6242: 6242: extern int setpgid (__pid_t __pid, __pid_t __pgid) throw (); 6242: # 663 "/usr/include/unistd.h" 3 4 6242: extern int setpgrp (void) throw (); 6242: 6242: 6242: 6242: 6242: 6242: 6242: extern __pid_t setsid (void) throw (); 6242: 6242: 6242: 6242: extern __pid_t getsid (__pid_t __pid) throw (); 6242: 6242: 6242: 6242: extern __uid_t getuid (void) throw (); 6242: 6242: 6242: extern __uid_t geteuid (void) throw (); 6242: 6242: 6242: extern __gid_t getgid (void) throw (); 6242: 6242: 6242: extern __gid_t getegid (void) throw (); 6242: 6242: 6242: 6242: 6242: extern int getgroups (int __size, __gid_t __list[]) throw () __attribute__ ((__warn_unused_result__)); 6242: 6242: 6242: 6242: extern int group_member (__gid_t __gid) throw (); 6242: 6242: 6242: 6242: 6242: 6242: 6242: extern int setuid (__uid_t __uid) throw () __attribute__ ((__warn_unused_result__)); 6242: 6242: 6242: 6242: 6242: extern int setreuid (__uid_t __ruid, __uid_t __euid) throw () __attribute__ ((__warn_unused_result__)); 6242: 6242: 6242: 6242: 6242: extern int seteuid (__uid_t __uid) throw () __attribute__ ((__warn_unused_result__)); 6242: 6242: 6242: 6242: 6242: 6242: 6242: extern int setgid (__gid_t __gid) throw () __attribute__ ((__warn_unused_result__)); 6242: 6242: 6242: 6242: 6242: extern int setregid (__gid_t __rgid, __gid_t __egid) throw () __attribute__ ((__warn_unused_result__)); 6242: 6242: 6242: 6242: 6242: extern int setegid (__gid_t __gid) throw () __attribute__ ((__warn_unused_result__)); 6242: 6242: 6242: 6242: 6242: 6242: extern int getresuid (__uid_t *__ruid, __uid_t *__euid, __uid_t *__suid) 6242: throw (); 6242: 6242: 6242: 6242: extern int getresgid (__gid_t *__rgid, __gid_t *__egid, __gid_t *__sgid) 6242: throw (); 6242: 6242: 6242: 6242: extern int setresuid (__uid_t __ruid, __uid_t __euid, __uid_t __suid) 6242: throw () __attribute__ ((__warn_unused_result__)); 6242: 6242: 6242: 6242: extern int setresgid (__gid_t __rgid, __gid_t __egid, __gid_t __sgid) 6242: throw () __attribute__ ((__warn_unused_result__)); 6242: 6242: 6242: 6242: 6242: 6242: 6242: extern __pid_t fork (void) throw (); 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: extern __pid_t vfork (void) throw (); 6242: 6242: 6242: 6242: 6242: 6242: extern char *ttyname (int __fd) throw (); 6242: 6242: 6242: 6242: extern int ttyname_r (int __fd, char *__buf, size_t __buflen) 6242: throw () __attribute__ ((__nonnull__ (2))) __attribute__ ((__warn_unused_result__)); 6242: 6242: 6242: 6242: extern int isatty (int __fd) throw (); 6242: 6242: 6242: 6242: 6242: extern int ttyslot (void) throw (); 6242: 6242: 6242: 6242: 6242: extern int link (const char *__from, const char *__to) 6242: throw () __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__warn_unused_result__)); 6242: 6242: 6242: 6242: 6242: extern int linkat (int __fromfd, const char *__from, int __tofd, 6242: const char *__to, int __flags) 6242: throw () __attribute__ ((__nonnull__ (2, 4))) __attribute__ ((__warn_unused_result__)); 6242: 6242: 6242: 6242: 6242: extern int symlink (const char *__from, const char *__to) 6242: throw () __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__warn_unused_result__)); 6242: 6242: 6242: 6242: 6242: extern ssize_t readlink (const char *__restrict __path, 6242: char *__restrict __buf, size_t __len) 6242: throw () __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__warn_unused_result__)); 6242: 6242: 6242: 6242: 6242: extern int symlinkat (const char *__from, int __tofd, 6242: const char *__to) throw () __attribute__ ((__nonnull__ (1, 3))) __attribute__ ((__warn_unused_result__)); 6242: 6242: 6242: extern ssize_t readlinkat (int __fd, const char *__restrict __path, 6242: char *__restrict __buf, size_t __len) 6242: throw () __attribute__ ((__nonnull__ (2, 3))) __attribute__ ((__warn_unused_result__)); 6242: 6242: 6242: 6242: extern int unlink (const char *__name) throw () __attribute__ ((__nonnull__ (1))); 6242: 6242: 6242: 6242: extern int unlinkat (int __fd, const char *__name, int __flag) 6242: throw () __attribute__ ((__nonnull__ (2))); 6242: 6242: 6242: 6242: extern int rmdir (const char *__path) throw () __attribute__ ((__nonnull__ (1))); 6242: 6242: 6242: 6242: extern __pid_t tcgetpgrp (int __fd) throw (); 6242: 6242: 6242: extern int tcsetpgrp (int __fd, __pid_t __pgrp_id) throw (); 6242: 6242: 6242: 6242: 6242: 6242: 6242: extern char *getlogin (void); 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: extern int getlogin_r (char *__name, size_t __name_len) __attribute__ ((__nonnull__ (1))); 6242: 6242: 6242: 6242: 6242: extern int setlogin (const char *__name) throw () __attribute__ ((__nonnull__ (1))); 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: # 1 "/usr/include/s390x-linux-gnu/bits/getopt_posix.h" 1 3 4 6242: # 27 "/usr/include/s390x-linux-gnu/bits/getopt_posix.h" 3 4 6242: # 1 "/usr/include/s390x-linux-gnu/bits/getopt_core.h" 1 3 4 6242: # 28 "/usr/include/s390x-linux-gnu/bits/getopt_core.h" 3 4 6242: extern "C" { 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: extern char *optarg; 6242: # 50 "/usr/include/s390x-linux-gnu/bits/getopt_core.h" 3 4 6242: extern int optind; 6242: 6242: 6242: 6242: 6242: extern int opterr; 6242: 6242: 6242: 6242: extern int optopt; 6242: # 91 "/usr/include/s390x-linux-gnu/bits/getopt_core.h" 3 4 6242: extern int getopt (int ___argc, char *const *___argv, const char *__shortopts) 6242: throw () __attribute__ ((__nonnull__ (2, 3))); 6242: 6242: } 6242: # 28 "/usr/include/s390x-linux-gnu/bits/getopt_posix.h" 2 3 4 6242: 6242: extern "C" { 6242: # 49 "/usr/include/s390x-linux-gnu/bits/getopt_posix.h" 3 4 6242: } 6242: # 873 "/usr/include/unistd.h" 2 3 4 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: extern int gethostname (char *__name, size_t __len) throw () __attribute__ ((__nonnull__ (1))); 6242: 6242: 6242: 6242: 6242: 6242: 6242: extern int sethostname (const char *__name, size_t __len) 6242: throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); 6242: 6242: 6242: 6242: extern int sethostid (long int __id) throw () __attribute__ ((__warn_unused_result__)); 6242: 6242: 6242: 6242: 6242: 6242: extern int getdomainname (char *__name, size_t __len) 6242: throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); 6242: extern int setdomainname (const char *__name, size_t __len) 6242: throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); 6242: 6242: 6242: 6242: 6242: 6242: extern int vhangup (void) throw (); 6242: 6242: 6242: extern int revoke (const char *__file) throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: extern int profil (unsigned short int *__sample_buffer, size_t __size, 6242: size_t __offset, unsigned int __scale) 6242: throw () __attribute__ ((__nonnull__ (1))); 6242: 6242: 6242: 6242: 6242: 6242: extern int acct (const char *__name) throw (); 6242: 6242: 6242: 6242: extern char *getusershell (void) throw (); 6242: extern void endusershell (void) throw (); 6242: extern void setusershell (void) throw (); 6242: 6242: 6242: 6242: 6242: 6242: extern int daemon (int __nochdir, int __noclose) throw () __attribute__ ((__warn_unused_result__)); 6242: 6242: 6242: 6242: 6242: 6242: 6242: extern int chroot (const char *__path) throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); 6242: 6242: 6242: 6242: extern char *getpass (const char *__prompt) __attribute__ ((__nonnull__ (1))); 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: extern int fsync (int __fd); 6242: 6242: 6242: 6242: 6242: 6242: extern int syncfs (int __fd) throw (); 6242: 6242: 6242: 6242: 6242: 6242: 6242: extern long int gethostid (void); 6242: 6242: 6242: extern void sync (void) throw (); 6242: 6242: 6242: 6242: 6242: 6242: extern int getpagesize (void) throw () __attribute__ ((__const__)); 6242: 6242: 6242: 6242: 6242: extern int getdtablesize (void) throw (); 6242: # 994 "/usr/include/unistd.h" 3 4 6242: extern int truncate (const char *__file, __off_t __length) 6242: throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); 6242: # 1006 "/usr/include/unistd.h" 3 4 6242: extern int truncate64 (const char *__file, __off64_t __length) 6242: throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); 6242: # 1017 "/usr/include/unistd.h" 3 4 6242: extern int ftruncate (int __fd, __off_t __length) throw () __attribute__ ((__warn_unused_result__)); 6242: # 1027 "/usr/include/unistd.h" 3 4 6242: extern int ftruncate64 (int __fd, __off64_t __length) throw () __attribute__ ((__warn_unused_result__)); 6242: # 1038 "/usr/include/unistd.h" 3 4 6242: extern int brk (void *__addr) throw () __attribute__ ((__warn_unused_result__)); 6242: 6242: 6242: 6242: 6242: 6242: extern void *sbrk (intptr_t __delta) throw (); 6242: # 1059 "/usr/include/unistd.h" 3 4 6242: extern long int syscall (long int __sysno, ...) throw (); 6242: # 1082 "/usr/include/unistd.h" 3 4 6242: extern int lockf (int __fd, int __cmd, __off_t __len) __attribute__ ((__warn_unused_result__)); 6242: # 1092 "/usr/include/unistd.h" 3 4 6242: extern int lockf64 (int __fd, int __cmd, __off64_t __len) __attribute__ ((__warn_unused_result__)); 6242: # 1113 "/usr/include/unistd.h" 3 4 6242: extern int fdatasync (int __fildes); 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: extern char *crypt (const char *__key, const char *__salt) 6242: throw () __attribute__ ((__nonnull__ (1, 2))); 6242: 6242: 6242: 6242: extern void encrypt (char *__glibc_block, int __edflag) 6242: throw () __attribute__ ((__nonnull__ (1))); 6242: 6242: 6242: 6242: 6242: 6242: 6242: extern void swab (const void *__restrict __from, void *__restrict __to, 6242: ssize_t __n) throw () __attribute__ ((__nonnull__ (1, 2))); 6242: # 1162 "/usr/include/unistd.h" 3 4 6242: int getentropy (void *__buffer, size_t __length) __attribute__ ((__warn_unused_result__)); 6242: 6242: 6242: 6242: 6242: # 1 "/usr/include/s390x-linux-gnu/bits/unistd.h" 1 3 4 6242: # 23 "/usr/include/s390x-linux-gnu/bits/unistd.h" 3 4 6242: extern ssize_t __read_chk (int __fd, void *__buf, size_t __nbytes, 6242: size_t __buflen) __attribute__ ((__warn_unused_result__)); 6242: extern ssize_t __read_alias (int __fd, void *__buf, size_t __nbytes) __asm__ ("" "read") 6242: __attribute__ ((__warn_unused_result__)); 6242: extern ssize_t __read_chk_warn (int __fd, void *__buf, size_t __nbytes, size_t __buflen) __asm__ ("" "__read_chk") 6242: 6242: 6242: __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("read called with bigger length than size of " "the destination buffer"))) 6242: ; 6242: 6242: extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__warn_unused_result__)) ssize_t 6242: read (int __fd, void *__buf, size_t __nbytes) 6242: { 6242: if (__builtin_object_size (__buf, 0) != (size_t) -1) 6242: { 6242: if (!__builtin_constant_p (__nbytes)) 6242: return __read_chk (__fd, __buf, __nbytes, __builtin_object_size (__buf, 0)); 6242: 6242: if (__nbytes > __builtin_object_size (__buf, 0)) 6242: return __read_chk_warn (__fd, __buf, __nbytes, __builtin_object_size (__buf, 0)); 6242: } 6242: return __read_alias (__fd, __buf, __nbytes); 6242: } 6242: 6242: 6242: extern ssize_t __pread_chk (int __fd, void *__buf, size_t __nbytes, 6242: __off_t __offset, size_t __bufsize) __attribute__ ((__warn_unused_result__)); 6242: extern ssize_t __pread64_chk (int __fd, void *__buf, size_t __nbytes, 6242: __off64_t __offset, size_t __bufsize) __attribute__ ((__warn_unused_result__)); 6242: extern ssize_t __pread_alias (int __fd, void *__buf, size_t __nbytes, __off_t __offset) __asm__ ("" "pread") 6242: 6242: __attribute__ ((__warn_unused_result__)); 6242: extern ssize_t __pread64_alias (int __fd, void *__buf, size_t __nbytes, __off64_t __offset) __asm__ ("" "pread64") 6242: 6242: __attribute__ ((__warn_unused_result__)); 6242: extern ssize_t __pread_chk_warn (int __fd, void *__buf, size_t __nbytes, __off_t __offset, size_t __bufsize) __asm__ ("" "__pread_chk") 6242: 6242: 6242: __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("pread called with bigger length than size of " "the destination buffer"))) 6242: ; 6242: extern ssize_t __pread64_chk_warn (int __fd, void *__buf, size_t __nbytes, __off64_t __offset, size_t __bufsize) __asm__ ("" "__pread64_chk") 6242: 6242: 6242: 6242: __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("pread64 called with bigger length than size of " "the destination buffer"))) 6242: ; 6242: 6242: 6242: extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__warn_unused_result__)) ssize_t 6242: pread (int __fd, void *__buf, size_t __nbytes, __off_t __offset) 6242: { 6242: if (__builtin_object_size (__buf, 0) != (size_t) -1) 6242: { 6242: if (!__builtin_constant_p (__nbytes)) 6242: return __pread_chk (__fd, __buf, __nbytes, __offset, __builtin_object_size (__buf, 0)); 6242: 6242: if ( __nbytes > __builtin_object_size (__buf, 0)) 6242: return __pread_chk_warn (__fd, __buf, __nbytes, __offset, 6242: __builtin_object_size (__buf, 0)); 6242: } 6242: return __pread_alias (__fd, __buf, __nbytes, __offset); 6242: } 6242: # 104 "/usr/include/s390x-linux-gnu/bits/unistd.h" 3 4 6242: extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__warn_unused_result__)) ssize_t 6242: pread64 (int __fd, void *__buf, size_t __nbytes, __off64_t __offset) 6242: { 6242: if (__builtin_object_size (__buf, 0) != (size_t) -1) 6242: { 6242: if (!__builtin_constant_p (__nbytes)) 6242: return __pread64_chk (__fd, __buf, __nbytes, __offset, __builtin_object_size (__buf, 0)); 6242: 6242: if ( __nbytes > __builtin_object_size (__buf, 0)) 6242: return __pread64_chk_warn (__fd, __buf, __nbytes, __offset, 6242: __builtin_object_size (__buf, 0)); 6242: } 6242: 6242: return __pread64_alias (__fd, __buf, __nbytes, __offset); 6242: } 6242: 6242: 6242: 6242: 6242: extern ssize_t __readlink_chk (const char *__restrict __path, 6242: char *__restrict __buf, size_t __len, 6242: size_t __buflen) 6242: throw () __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__warn_unused_result__)); 6242: extern ssize_t __readlink_alias (const char *__restrict __path, char *__restrict __buf, size_t __len) throw () __asm__ ("" "readlink") 6242: 6242: 6242: __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__warn_unused_result__)); 6242: extern ssize_t __readlink_chk_warn (const char *__restrict __path, char *__restrict __buf, size_t __len, size_t __buflen) throw () __asm__ ("" "__readlink_chk") 6242: 6242: 6242: 6242: __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("readlink called with bigger length " "than size of destination buffer"))) 6242: ; 6242: 6242: extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__warn_unused_result__)) ssize_t 6242: __attribute__ ((__leaf__)) readlink (const char *__restrict __path, char *__restrict __buf, size_t __len) throw () 6242: 6242: { 6242: if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1) 6242: { 6242: if (!__builtin_constant_p (__len)) 6242: return __readlink_chk (__path, __buf, __len, __builtin_object_size (__buf, 2 > 1)); 6242: 6242: if ( __len > __builtin_object_size (__buf, 2 > 1)) 6242: return __readlink_chk_warn (__path, __buf, __len, __builtin_object_size (__buf, 2 > 1)); 6242: } 6242: return __readlink_alias (__path, __buf, __len); 6242: } 6242: 6242: 6242: 6242: extern ssize_t __readlinkat_chk (int __fd, const char *__restrict __path, 6242: char *__restrict __buf, size_t __len, 6242: size_t __buflen) 6242: throw () __attribute__ ((__nonnull__ (2, 3))) __attribute__ ((__warn_unused_result__)); 6242: extern ssize_t __readlinkat_alias (int __fd, const char *__restrict __path, char *__restrict __buf, size_t __len) throw () __asm__ ("" "readlinkat") 6242: 6242: 6242: 6242: __attribute__ ((__nonnull__ (2, 3))) __attribute__ ((__warn_unused_result__)); 6242: extern ssize_t __readlinkat_chk_warn (int __fd, const char *__restrict __path, char *__restrict __buf, size_t __len, size_t __buflen) throw () __asm__ ("" "__readlinkat_chk") 6242: 6242: 6242: 6242: __attribute__ ((__nonnull__ (2, 3))) __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("readlinkat called with bigger " "length than size of destination " "buffer"))) 6242: 6242: ; 6242: 6242: extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__nonnull__ (2, 3))) __attribute__ ((__warn_unused_result__)) ssize_t 6242: __attribute__ ((__leaf__)) readlinkat (int __fd, const char *__restrict __path, char *__restrict __buf, size_t __len) throw () 6242: 6242: { 6242: if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1) 6242: { 6242: if (!__builtin_constant_p (__len)) 6242: return __readlinkat_chk (__fd, __path, __buf, __len, __builtin_object_size (__buf, 2 > 1)); 6242: 6242: if (__len > __builtin_object_size (__buf, 2 > 1)) 6242: return __readlinkat_chk_warn (__fd, __path, __buf, __len, 6242: __builtin_object_size (__buf, 2 > 1)); 6242: } 6242: return __readlinkat_alias (__fd, __path, __buf, __len); 6242: } 6242: 6242: 6242: extern char *__getcwd_chk (char *__buf, size_t __size, size_t __buflen) 6242: throw () __attribute__ ((__warn_unused_result__)); 6242: extern char *__getcwd_alias (char *__buf, size_t __size) throw () __asm__ ("" "getcwd") 6242: __attribute__ ((__warn_unused_result__)); 6242: extern char *__getcwd_chk_warn (char *__buf, size_t __size, size_t __buflen) throw () __asm__ ("" "__getcwd_chk") 6242: 6242: 6242: __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("getcwd caller with bigger length than size of " "destination buffer"))) 6242: ; 6242: 6242: extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__warn_unused_result__)) char * 6242: __attribute__ ((__leaf__)) getcwd (char *__buf, size_t __size) throw () 6242: { 6242: if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1) 6242: { 6242: if (!__builtin_constant_p (__size)) 6242: return __getcwd_chk (__buf, __size, __builtin_object_size (__buf, 2 > 1)); 6242: 6242: if (__size > __builtin_object_size (__buf, 2 > 1)) 6242: return __getcwd_chk_warn (__buf, __size, __builtin_object_size (__buf, 2 > 1)); 6242: } 6242: return __getcwd_alias (__buf, __size); 6242: } 6242: 6242: 6242: extern char *__getwd_chk (char *__buf, size_t buflen) 6242: throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); 6242: extern char *__getwd_warn (char *__buf) throw () __asm__ ("" "getwd") 6242: __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("please use getcwd instead, as getwd " "doesn't specify buffer size"))) 6242: ; 6242: 6242: extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__deprecated__)) __attribute__ ((__warn_unused_result__)) char * 6242: __attribute__ ((__leaf__)) getwd (char *__buf) throw () 6242: { 6242: if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1) 6242: return __getwd_chk (__buf, __builtin_object_size (__buf, 2 > 1)); 6242: return __getwd_warn (__buf); 6242: } 6242: 6242: 6242: extern size_t __confstr_chk (int __name, char *__buf, size_t __len, 6242: size_t __buflen) throw (); 6242: extern size_t __confstr_alias (int __name, char *__buf, size_t __len) throw () __asm__ ("" "confstr") 6242: ; 6242: extern size_t __confstr_chk_warn (int __name, char *__buf, size_t __len, size_t __buflen) throw () __asm__ ("" "__confstr_chk") 6242: 6242: 6242: __attribute__((__warning__ ("confstr called with bigger length than size of destination " "buffer"))) 6242: ; 6242: 6242: extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) size_t 6242: __attribute__ ((__leaf__)) confstr (int __name, char *__buf, size_t __len) throw () 6242: { 6242: if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1) 6242: { 6242: if (!__builtin_constant_p (__len)) 6242: return __confstr_chk (__name, __buf, __len, __builtin_object_size (__buf, 2 > 1)); 6242: 6242: if (__builtin_object_size (__buf, 2 > 1) < __len) 6242: return __confstr_chk_warn (__name, __buf, __len, __builtin_object_size (__buf, 2 > 1)); 6242: } 6242: return __confstr_alias (__name, __buf, __len); 6242: } 6242: 6242: 6242: extern int __getgroups_chk (int __size, __gid_t __list[], size_t __listlen) 6242: throw () __attribute__ ((__warn_unused_result__)); 6242: extern int __getgroups_alias (int __size, __gid_t __list[]) throw () __asm__ ("" "getgroups") 6242: __attribute__ ((__warn_unused_result__)); 6242: extern int __getgroups_chk_warn (int __size, __gid_t __list[], size_t __listlen) throw () __asm__ ("" "__getgroups_chk") 6242: 6242: 6242: __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("getgroups called with bigger group count than what " "can fit into destination buffer"))) 6242: ; 6242: 6242: extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int 6242: __attribute__ ((__leaf__)) getgroups (int __size, __gid_t __list[]) throw () 6242: { 6242: if (__builtin_object_size (__list, 2 > 1) != (size_t) -1) 6242: { 6242: if (!__builtin_constant_p (__size) || __size < 0) 6242: return __getgroups_chk (__size, __list, __builtin_object_size (__list, 2 > 1)); 6242: 6242: if (__size * sizeof (__gid_t) > __builtin_object_size (__list, 2 > 1)) 6242: return __getgroups_chk_warn (__size, __list, __builtin_object_size (__list, 2 > 1)); 6242: } 6242: return __getgroups_alias (__size, __list); 6242: } 6242: 6242: 6242: extern int __ttyname_r_chk (int __fd, char *__buf, size_t __buflen, 6242: size_t __nreal) throw () __attribute__ ((__nonnull__ (2))); 6242: extern int __ttyname_r_alias (int __fd, char *__buf, size_t __buflen) throw () __asm__ ("" "ttyname_r") 6242: 6242: __attribute__ ((__nonnull__ (2))); 6242: extern int __ttyname_r_chk_warn (int __fd, char *__buf, size_t __buflen, size_t __nreal) throw () __asm__ ("" "__ttyname_r_chk") 6242: 6242: 6242: __attribute__ ((__nonnull__ (2))) __attribute__((__warning__ ("ttyname_r called with bigger buflen than " "size of destination buffer"))) 6242: ; 6242: 6242: extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int 6242: __attribute__ ((__leaf__)) ttyname_r (int __fd, char *__buf, size_t __buflen) throw () 6242: { 6242: if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1) 6242: { 6242: if (!__builtin_constant_p (__buflen)) 6242: return __ttyname_r_chk (__fd, __buf, __buflen, __builtin_object_size (__buf, 2 > 1)); 6242: 6242: if (__buflen > __builtin_object_size (__buf, 2 > 1)) 6242: return __ttyname_r_chk_warn (__fd, __buf, __buflen, __builtin_object_size (__buf, 2 > 1)); 6242: } 6242: return __ttyname_r_alias (__fd, __buf, __buflen); 6242: } 6242: 6242: 6242: 6242: extern int __getlogin_r_chk (char *__buf, size_t __buflen, size_t __nreal) 6242: __attribute__ ((__nonnull__ (1))); 6242: extern int __getlogin_r_alias (char *__buf, size_t __buflen) __asm__ ("" "getlogin_r") 6242: __attribute__ ((__nonnull__ (1))); 6242: extern int __getlogin_r_chk_warn (char *__buf, size_t __buflen, size_t __nreal) __asm__ ("" "__getlogin_r_chk") 6242: 6242: 6242: __attribute__ ((__nonnull__ (1))) __attribute__((__warning__ ("getlogin_r called with bigger buflen than " "size of destination buffer"))) 6242: ; 6242: 6242: extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int 6242: getlogin_r (char *__buf, size_t __buflen) 6242: { 6242: if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1) 6242: { 6242: if (!__builtin_constant_p (__buflen)) 6242: return __getlogin_r_chk (__buf, __buflen, __builtin_object_size (__buf, 2 > 1)); 6242: 6242: if (__buflen > __builtin_object_size (__buf, 2 > 1)) 6242: return __getlogin_r_chk_warn (__buf, __buflen, __builtin_object_size (__buf, 2 > 1)); 6242: } 6242: return __getlogin_r_alias (__buf, __buflen); 6242: } 6242: 6242: 6242: 6242: 6242: extern int __gethostname_chk (char *__buf, size_t __buflen, size_t __nreal) 6242: throw () __attribute__ ((__nonnull__ (1))); 6242: extern int __gethostname_alias (char *__buf, size_t __buflen) throw () __asm__ ("" "gethostname") 6242: __attribute__ ((__nonnull__ (1))); 6242: extern int __gethostname_chk_warn (char *__buf, size_t __buflen, size_t __nreal) throw () __asm__ ("" "__gethostname_chk") 6242: 6242: 6242: __attribute__ ((__nonnull__ (1))) __attribute__((__warning__ ("gethostname called with bigger buflen than " "size of destination buffer"))) 6242: ; 6242: 6242: extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int 6242: __attribute__ ((__leaf__)) gethostname (char *__buf, size_t __buflen) throw () 6242: { 6242: if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1) 6242: { 6242: if (!__builtin_constant_p (__buflen)) 6242: return __gethostname_chk (__buf, __buflen, __builtin_object_size (__buf, 2 > 1)); 6242: 6242: if (__buflen > __builtin_object_size (__buf, 2 > 1)) 6242: return __gethostname_chk_warn (__buf, __buflen, __builtin_object_size (__buf, 2 > 1)); 6242: } 6242: return __gethostname_alias (__buf, __buflen); 6242: } 6242: 6242: 6242: 6242: 6242: extern int __getdomainname_chk (char *__buf, size_t __buflen, size_t __nreal) 6242: throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); 6242: extern int __getdomainname_alias (char *__buf, size_t __buflen) throw () __asm__ ("" "getdomainname") 6242: 6242: __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); 6242: extern int __getdomainname_chk_warn (char *__buf, size_t __buflen, size_t __nreal) throw () __asm__ ("" "__getdomainname_chk") 6242: 6242: 6242: __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("getdomainname called with bigger " "buflen than size of destination " "buffer"))) 6242: 6242: ; 6242: 6242: extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int 6242: __attribute__ ((__leaf__)) getdomainname (char *__buf, size_t __buflen) throw () 6242: { 6242: if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1) 6242: { 6242: if (!__builtin_constant_p (__buflen)) 6242: return __getdomainname_chk (__buf, __buflen, __builtin_object_size (__buf, 2 > 1)); 6242: 6242: if (__buflen > __builtin_object_size (__buf, 2 > 1)) 6242: return __getdomainname_chk_warn (__buf, __buflen, __builtin_object_size (__buf, 2 > 1)); 6242: } 6242: return __getdomainname_alias (__buf, __buflen); 6242: } 6242: # 1168 "/usr/include/unistd.h" 2 3 4 6242: 6242: 6242: } 6242: # 79 "/usr/include/boost/config/stdlib/libstdcpp3.hpp" 2 3 4 6242: # 49 "/usr/include/boost/config.hpp" 2 3 4 6242: 6242: 6242: 6242: 6242: # 1 "/usr/include/boost/config/detail/select_platform_config.hpp" 1 3 4 6242: # 54 "/usr/include/boost/config.hpp" 2 3 4 6242: 6242: 6242: 6242: # 1 "/usr/include/boost/config/platform/linux.hpp" 1 3 4 6242: # 15 "/usr/include/boost/config/platform/linux.hpp" 3 4 6242: # 1 "/usr/include/c++/8/cstdlib" 1 3 4 6242: # 39 "/usr/include/c++/8/cstdlib" 3 4 6242: 6242: # 40 "/usr/include/c++/8/cstdlib" 3 6242: # 16 "/usr/include/boost/config/platform/linux.hpp" 2 3 4 6242: # 75 "/usr/include/boost/config/platform/linux.hpp" 3 4 6242: # 1 "/usr/include/boost/config/detail/posix_features.hpp" 1 3 4 6242: # 76 "/usr/include/boost/config/platform/linux.hpp" 2 3 4 6242: # 58 "/usr/include/boost/config.hpp" 2 3 4 6242: 6242: 6242: 6242: # 1 "/usr/include/boost/config/detail/suffix.hpp" 1 3 4 6242: # 34 "/usr/include/boost/config/detail/suffix.hpp" 3 4 6242: 6242: # 35 "/usr/include/boost/config/detail/suffix.hpp" 3 6242: # 484 "/usr/include/boost/config/detail/suffix.hpp" 3 6242: namespace boost{ 6242: 6242: __extension__ typedef long long long_long_type; 6242: __extension__ typedef unsigned long long ulong_long_type; 6242: 6242: 6242: 6242: 6242: } 6242: 6242: 6242: 6242: namespace boost{ 6242: 6242: __extension__ typedef __int128 int128_type; 6242: __extension__ typedef unsigned __int128 uint128_type; 6242: 6242: 6242: 6242: 6242: } 6242: # 62 "/usr/include/boost/config.hpp" 2 3 4 6242: 6242: 6242: 6242: # 45 "/usr/include/boost/regex/config.hpp" 2 3 4 6242: # 1 "/usr/include/boost/predef.h" 1 3 4 6242: # 13 "/usr/include/boost/predef.h" 3 4 6242: # 1 "/usr/include/boost/predef/language.h" 1 3 4 6242: # 13 "/usr/include/boost/predef/language.h" 3 4 6242: # 1 "/usr/include/boost/predef/language/stdc.h" 1 3 4 6242: # 11 "/usr/include/boost/predef/language/stdc.h" 3 4 6242: # 1 "/usr/include/boost/predef/version_number.h" 1 3 4 6242: # 12 "/usr/include/boost/predef/language/stdc.h" 2 3 4 6242: # 1 "/usr/include/boost/predef/make.h" 1 3 4 6242: 6242: 6242: 6242: 6242: 6242: 6242: # 1 "/usr/include/boost/predef/detail/test.h" 1 3 4 6242: # 8 "/usr/include/boost/predef/make.h" 2 3 4 6242: # 13 "/usr/include/boost/predef/language/stdc.h" 2 3 4 6242: # 53 "/usr/include/boost/predef/language/stdc.h" 3 4 6242: 6242: # 14 "/usr/include/boost/predef/language.h" 2 3 4 6242: # 1 "/usr/include/boost/predef/language/stdcpp.h" 1 3 4 6242: # 12 "/usr/include/boost/predef/language/stdcpp.h" 3 4 6242: # 1 "/usr/include/boost/predef/make.h" 1 3 4 6242: # 13 "/usr/include/boost/predef/language/stdcpp.h" 2 3 4 6242: # 115 "/usr/include/boost/predef/language/stdcpp.h" 3 4 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: # 15 "/usr/include/boost/predef/language.h" 2 3 4 6242: # 1 "/usr/include/boost/predef/language/objc.h" 1 3 4 6242: # 12 "/usr/include/boost/predef/language/objc.h" 3 4 6242: # 1 "/usr/include/boost/predef/make.h" 1 3 4 6242: # 13 "/usr/include/boost/predef/language/objc.h" 2 3 4 6242: # 42 "/usr/include/boost/predef/language/objc.h" 3 4 6242: 6242: # 16 "/usr/include/boost/predef/language.h" 2 3 4 6242: # 14 "/usr/include/boost/predef.h" 2 3 4 6242: # 1 "/usr/include/boost/predef/architecture.h" 1 3 4 6242: # 13 "/usr/include/boost/predef/architecture.h" 3 4 6242: # 1 "/usr/include/boost/predef/architecture/alpha.h" 1 3 4 6242: # 12 "/usr/include/boost/predef/architecture/alpha.h" 3 4 6242: # 1 "/usr/include/boost/predef/make.h" 1 3 4 6242: # 13 "/usr/include/boost/predef/architecture/alpha.h" 2 3 4 6242: # 59 "/usr/include/boost/predef/architecture/alpha.h" 3 4 6242: 6242: # 14 "/usr/include/boost/predef/architecture.h" 2 3 4 6242: # 1 "/usr/include/boost/predef/architecture/arm.h" 1 3 4 6242: # 14 "/usr/include/boost/predef/architecture/arm.h" 3 4 6242: # 1 "/usr/include/boost/predef/make.h" 1 3 4 6242: # 15 "/usr/include/boost/predef/architecture/arm.h" 2 3 4 6242: # 75 "/usr/include/boost/predef/architecture/arm.h" 3 4 6242: 6242: # 15 "/usr/include/boost/predef/architecture.h" 2 3 4 6242: # 1 "/usr/include/boost/predef/architecture/blackfin.h" 1 3 4 6242: # 12 "/usr/include/boost/predef/architecture/blackfin.h" 3 4 6242: # 1 "/usr/include/boost/predef/make.h" 1 3 4 6242: # 13 "/usr/include/boost/predef/architecture/blackfin.h" 2 3 4 6242: # 46 "/usr/include/boost/predef/architecture/blackfin.h" 3 4 6242: 6242: # 16 "/usr/include/boost/predef/architecture.h" 2 3 4 6242: # 1 "/usr/include/boost/predef/architecture/convex.h" 1 3 4 6242: # 12 "/usr/include/boost/predef/architecture/convex.h" 3 4 6242: # 1 "/usr/include/boost/predef/make.h" 1 3 4 6242: # 13 "/usr/include/boost/predef/architecture/convex.h" 2 3 4 6242: # 65 "/usr/include/boost/predef/architecture/convex.h" 3 4 6242: 6242: # 17 "/usr/include/boost/predef/architecture.h" 2 3 4 6242: # 1 "/usr/include/boost/predef/architecture/ia64.h" 1 3 4 6242: # 12 "/usr/include/boost/predef/architecture/ia64.h" 3 4 6242: # 1 "/usr/include/boost/predef/make.h" 1 3 4 6242: # 13 "/usr/include/boost/predef/architecture/ia64.h" 2 3 4 6242: # 49 "/usr/include/boost/predef/architecture/ia64.h" 3 4 6242: 6242: # 18 "/usr/include/boost/predef/architecture.h" 2 3 4 6242: # 1 "/usr/include/boost/predef/architecture/m68k.h" 1 3 4 6242: # 12 "/usr/include/boost/predef/architecture/m68k.h" 3 4 6242: # 1 "/usr/include/boost/predef/make.h" 1 3 4 6242: # 13 "/usr/include/boost/predef/architecture/m68k.h" 2 3 4 6242: # 82 "/usr/include/boost/predef/architecture/m68k.h" 3 4 6242: 6242: # 19 "/usr/include/boost/predef/architecture.h" 2 3 4 6242: # 1 "/usr/include/boost/predef/architecture/mips.h" 1 3 4 6242: # 12 "/usr/include/boost/predef/architecture/mips.h" 3 4 6242: # 1 "/usr/include/boost/predef/make.h" 1 3 4 6242: # 13 "/usr/include/boost/predef/architecture/mips.h" 2 3 4 6242: # 73 "/usr/include/boost/predef/architecture/mips.h" 3 4 6242: 6242: # 20 "/usr/include/boost/predef/architecture.h" 2 3 4 6242: # 1 "/usr/include/boost/predef/architecture/parisc.h" 1 3 4 6242: # 12 "/usr/include/boost/predef/architecture/parisc.h" 3 4 6242: # 1 "/usr/include/boost/predef/make.h" 1 3 4 6242: # 13 "/usr/include/boost/predef/architecture/parisc.h" 2 3 4 6242: # 64 "/usr/include/boost/predef/architecture/parisc.h" 3 4 6242: 6242: # 21 "/usr/include/boost/predef/architecture.h" 2 3 4 6242: # 1 "/usr/include/boost/predef/architecture/ppc.h" 1 3 4 6242: # 12 "/usr/include/boost/predef/architecture/ppc.h" 3 4 6242: # 1 "/usr/include/boost/predef/make.h" 1 3 4 6242: # 13 "/usr/include/boost/predef/architecture/ppc.h" 2 3 4 6242: # 72 "/usr/include/boost/predef/architecture/ppc.h" 3 4 6242: 6242: # 22 "/usr/include/boost/predef/architecture.h" 2 3 4 6242: # 1 "/usr/include/boost/predef/architecture/pyramid.h" 1 3 4 6242: # 12 "/usr/include/boost/predef/architecture/pyramid.h" 3 4 6242: # 1 "/usr/include/boost/predef/make.h" 1 3 4 6242: # 13 "/usr/include/boost/predef/architecture/pyramid.h" 2 3 4 6242: # 42 "/usr/include/boost/predef/architecture/pyramid.h" 3 4 6242: 6242: # 23 "/usr/include/boost/predef/architecture.h" 2 3 4 6242: # 1 "/usr/include/boost/predef/architecture/rs6k.h" 1 3 4 6242: # 12 "/usr/include/boost/predef/architecture/rs6k.h" 3 4 6242: # 1 "/usr/include/boost/predef/make.h" 1 3 4 6242: # 13 "/usr/include/boost/predef/architecture/rs6k.h" 2 3 4 6242: # 56 "/usr/include/boost/predef/architecture/rs6k.h" 3 4 6242: 6242: # 24 "/usr/include/boost/predef/architecture.h" 2 3 4 6242: # 1 "/usr/include/boost/predef/architecture/sparc.h" 1 3 4 6242: # 12 "/usr/include/boost/predef/architecture/sparc.h" 3 4 6242: # 1 "/usr/include/boost/predef/make.h" 1 3 4 6242: # 13 "/usr/include/boost/predef/architecture/sparc.h" 2 3 4 6242: # 54 "/usr/include/boost/predef/architecture/sparc.h" 3 4 6242: 6242: # 25 "/usr/include/boost/predef/architecture.h" 2 3 4 6242: # 1 "/usr/include/boost/predef/architecture/superh.h" 1 3 4 6242: # 12 "/usr/include/boost/predef/architecture/superh.h" 3 4 6242: # 1 "/usr/include/boost/predef/make.h" 1 3 4 6242: # 13 "/usr/include/boost/predef/architecture/superh.h" 2 3 4 6242: # 67 "/usr/include/boost/predef/architecture/superh.h" 3 4 6242: 6242: # 26 "/usr/include/boost/predef/architecture.h" 2 3 4 6242: # 1 "/usr/include/boost/predef/architecture/sys370.h" 1 3 4 6242: # 12 "/usr/include/boost/predef/architecture/sys370.h" 3 4 6242: # 1 "/usr/include/boost/predef/make.h" 1 3 4 6242: # 13 "/usr/include/boost/predef/architecture/sys370.h" 2 3 4 6242: # 43 "/usr/include/boost/predef/architecture/sys370.h" 3 4 6242: 6242: # 27 "/usr/include/boost/predef/architecture.h" 2 3 4 6242: # 1 "/usr/include/boost/predef/architecture/sys390.h" 1 3 4 6242: # 12 "/usr/include/boost/predef/architecture/sys390.h" 3 4 6242: # 1 "/usr/include/boost/predef/make.h" 1 3 4 6242: # 13 "/usr/include/boost/predef/architecture/sys390.h" 2 3 4 6242: # 43 "/usr/include/boost/predef/architecture/sys390.h" 3 4 6242: 6242: # 28 "/usr/include/boost/predef/architecture.h" 2 3 4 6242: # 1 "/usr/include/boost/predef/architecture/x86.h" 1 3 4 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: # 1 "/usr/include/boost/predef/architecture/x86/32.h" 1 3 4 6242: # 12 "/usr/include/boost/predef/architecture/x86/32.h" 3 4 6242: # 1 "/usr/include/boost/predef/make.h" 1 3 4 6242: # 13 "/usr/include/boost/predef/architecture/x86/32.h" 2 3 4 6242: # 82 "/usr/include/boost/predef/architecture/x86/32.h" 3 4 6242: # 1 "/usr/include/boost/predef/architecture/x86.h" 1 3 4 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: # 1 "/usr/include/boost/predef/architecture/x86/32.h" 1 3 4 6242: # 87 "/usr/include/boost/predef/architecture/x86/32.h" 3 4 6242: 6242: # 9 "/usr/include/boost/predef/architecture/x86.h" 2 3 4 6242: # 1 "/usr/include/boost/predef/architecture/x86/64.h" 1 3 4 6242: # 12 "/usr/include/boost/predef/architecture/x86/64.h" 3 4 6242: # 1 "/usr/include/boost/predef/make.h" 1 3 4 6242: # 13 "/usr/include/boost/predef/architecture/x86/64.h" 2 3 4 6242: # 45 "/usr/include/boost/predef/architecture/x86/64.h" 3 4 6242: # 1 "/usr/include/boost/predef/architecture/x86.h" 1 3 4 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: # 1 "/usr/include/boost/predef/architecture/x86/32.h" 1 3 4 6242: # 87 "/usr/include/boost/predef/architecture/x86/32.h" 3 4 6242: 6242: # 9 "/usr/include/boost/predef/architecture/x86.h" 2 3 4 6242: # 1 "/usr/include/boost/predef/architecture/x86/64.h" 1 3 4 6242: # 50 "/usr/include/boost/predef/architecture/x86/64.h" 3 4 6242: 6242: # 10 "/usr/include/boost/predef/architecture/x86.h" 2 3 4 6242: # 38 "/usr/include/boost/predef/architecture/x86.h" 3 4 6242: 6242: # 46 "/usr/include/boost/predef/architecture/x86/64.h" 2 3 4 6242: 6242: 6242: 6242: 6242: 6242: # 10 "/usr/include/boost/predef/architecture/x86.h" 2 3 4 6242: # 38 "/usr/include/boost/predef/architecture/x86.h" 3 4 6242: 6242: # 83 "/usr/include/boost/predef/architecture/x86/32.h" 2 3 4 6242: 6242: 6242: 6242: 6242: 6242: # 9 "/usr/include/boost/predef/architecture/x86.h" 2 3 4 6242: # 1 "/usr/include/boost/predef/architecture/x86/64.h" 1 3 4 6242: # 50 "/usr/include/boost/predef/architecture/x86/64.h" 3 4 6242: 6242: # 10 "/usr/include/boost/predef/architecture/x86.h" 2 3 4 6242: # 38 "/usr/include/boost/predef/architecture/x86.h" 3 4 6242: 6242: # 29 "/usr/include/boost/predef/architecture.h" 2 3 4 6242: # 1 "/usr/include/boost/predef/architecture/z.h" 1 3 4 6242: # 12 "/usr/include/boost/predef/architecture/z.h" 3 4 6242: # 1 "/usr/include/boost/predef/make.h" 1 3 4 6242: # 13 "/usr/include/boost/predef/architecture/z.h" 2 3 4 6242: # 42 "/usr/include/boost/predef/architecture/z.h" 3 4 6242: 6242: # 30 "/usr/include/boost/predef/architecture.h" 2 3 4 6242: # 15 "/usr/include/boost/predef.h" 2 3 4 6242: # 1 "/usr/include/boost/predef/compiler.h" 1 3 4 6242: # 13 "/usr/include/boost/predef/compiler.h" 3 4 6242: # 1 "/usr/include/boost/predef/compiler/borland.h" 1 3 4 6242: # 12 "/usr/include/boost/predef/compiler/borland.h" 3 4 6242: # 1 "/usr/include/boost/predef/make.h" 1 3 4 6242: # 13 "/usr/include/boost/predef/compiler/borland.h" 2 3 4 6242: # 58 "/usr/include/boost/predef/compiler/borland.h" 3 4 6242: 6242: # 14 "/usr/include/boost/predef/compiler.h" 2 3 4 6242: # 1 "/usr/include/boost/predef/compiler/clang.h" 1 3 4 6242: # 12 "/usr/include/boost/predef/compiler/clang.h" 3 4 6242: # 1 "/usr/include/boost/predef/make.h" 1 3 4 6242: # 13 "/usr/include/boost/predef/compiler/clang.h" 2 3 4 6242: # 51 "/usr/include/boost/predef/compiler/clang.h" 3 4 6242: 6242: # 15 "/usr/include/boost/predef/compiler.h" 2 3 4 6242: # 1 "/usr/include/boost/predef/compiler/comeau.h" 1 3 4 6242: # 12 "/usr/include/boost/predef/compiler/comeau.h" 3 4 6242: # 1 "/usr/include/boost/predef/make.h" 1 3 4 6242: # 13 "/usr/include/boost/predef/compiler/comeau.h" 2 3 4 6242: # 56 "/usr/include/boost/predef/compiler/comeau.h" 3 4 6242: 6242: # 16 "/usr/include/boost/predef/compiler.h" 2 3 4 6242: # 1 "/usr/include/boost/predef/compiler/compaq.h" 1 3 4 6242: # 12 "/usr/include/boost/predef/compiler/compaq.h" 3 4 6242: # 1 "/usr/include/boost/predef/make.h" 1 3 4 6242: # 13 "/usr/include/boost/predef/compiler/compaq.h" 2 3 4 6242: # 61 "/usr/include/boost/predef/compiler/compaq.h" 3 4 6242: 6242: # 17 "/usr/include/boost/predef/compiler.h" 2 3 4 6242: # 1 "/usr/include/boost/predef/compiler/diab.h" 1 3 4 6242: # 12 "/usr/include/boost/predef/compiler/diab.h" 3 4 6242: # 1 "/usr/include/boost/predef/make.h" 1 3 4 6242: # 13 "/usr/include/boost/predef/compiler/diab.h" 2 3 4 6242: # 51 "/usr/include/boost/predef/compiler/diab.h" 3 4 6242: 6242: # 18 "/usr/include/boost/predef/compiler.h" 2 3 4 6242: # 1 "/usr/include/boost/predef/compiler/digitalmars.h" 1 3 4 6242: # 12 "/usr/include/boost/predef/compiler/digitalmars.h" 3 4 6242: # 1 "/usr/include/boost/predef/make.h" 1 3 4 6242: # 13 "/usr/include/boost/predef/compiler/digitalmars.h" 2 3 4 6242: # 51 "/usr/include/boost/predef/compiler/digitalmars.h" 3 4 6242: 6242: # 19 "/usr/include/boost/predef/compiler.h" 2 3 4 6242: # 1 "/usr/include/boost/predef/compiler/dignus.h" 1 3 4 6242: # 12 "/usr/include/boost/predef/compiler/dignus.h" 3 4 6242: # 1 "/usr/include/boost/predef/make.h" 1 3 4 6242: # 13 "/usr/include/boost/predef/compiler/dignus.h" 2 3 4 6242: # 51 "/usr/include/boost/predef/compiler/dignus.h" 3 4 6242: 6242: # 20 "/usr/include/boost/predef/compiler.h" 2 3 4 6242: # 1 "/usr/include/boost/predef/compiler/edg.h" 1 3 4 6242: # 12 "/usr/include/boost/predef/compiler/edg.h" 3 4 6242: # 1 "/usr/include/boost/predef/make.h" 1 3 4 6242: # 13 "/usr/include/boost/predef/compiler/edg.h" 2 3 4 6242: # 51 "/usr/include/boost/predef/compiler/edg.h" 3 4 6242: 6242: # 21 "/usr/include/boost/predef/compiler.h" 2 3 4 6242: # 1 "/usr/include/boost/predef/compiler/ekopath.h" 1 3 4 6242: # 12 "/usr/include/boost/predef/compiler/ekopath.h" 3 4 6242: # 1 "/usr/include/boost/predef/make.h" 1 3 4 6242: # 13 "/usr/include/boost/predef/compiler/ekopath.h" 2 3 4 6242: # 52 "/usr/include/boost/predef/compiler/ekopath.h" 3 4 6242: 6242: # 22 "/usr/include/boost/predef/compiler.h" 2 3 4 6242: # 1 "/usr/include/boost/predef/compiler/gcc_xml.h" 1 3 4 6242: # 12 "/usr/include/boost/predef/compiler/gcc_xml.h" 3 4 6242: # 1 "/usr/include/boost/predef/make.h" 1 3 4 6242: # 13 "/usr/include/boost/predef/compiler/gcc_xml.h" 2 3 4 6242: # 48 "/usr/include/boost/predef/compiler/gcc_xml.h" 3 4 6242: 6242: # 23 "/usr/include/boost/predef/compiler.h" 2 3 4 6242: # 1 "/usr/include/boost/predef/compiler/gcc.h" 1 3 4 6242: # 13 "/usr/include/boost/predef/compiler/gcc.h" 3 4 6242: # 1 "/usr/include/boost/predef/compiler/clang.h" 1 3 4 6242: # 51 "/usr/include/boost/predef/compiler/clang.h" 3 4 6242: 6242: # 14 "/usr/include/boost/predef/compiler/gcc.h" 2 3 4 6242: 6242: 6242: # 1 "/usr/include/boost/predef/make.h" 1 3 4 6242: # 17 "/usr/include/boost/predef/compiler/gcc.h" 2 3 4 6242: # 55 "/usr/include/boost/predef/compiler/gcc.h" 3 4 6242: # 1 "/usr/include/boost/predef/detail/comp_detected.h" 1 3 4 6242: # 56 "/usr/include/boost/predef/compiler/gcc.h" 2 3 4 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: # 24 "/usr/include/boost/predef/compiler.h" 2 3 4 6242: # 1 "/usr/include/boost/predef/compiler/greenhills.h" 1 3 4 6242: # 12 "/usr/include/boost/predef/compiler/greenhills.h" 3 4 6242: # 1 "/usr/include/boost/predef/make.h" 1 3 4 6242: # 13 "/usr/include/boost/predef/compiler/greenhills.h" 2 3 4 6242: # 61 "/usr/include/boost/predef/compiler/greenhills.h" 3 4 6242: 6242: # 25 "/usr/include/boost/predef/compiler.h" 2 3 4 6242: # 1 "/usr/include/boost/predef/compiler/hp_acc.h" 1 3 4 6242: # 12 "/usr/include/boost/predef/compiler/hp_acc.h" 3 4 6242: # 1 "/usr/include/boost/predef/make.h" 1 3 4 6242: # 13 "/usr/include/boost/predef/compiler/hp_acc.h" 2 3 4 6242: # 56 "/usr/include/boost/predef/compiler/hp_acc.h" 3 4 6242: 6242: # 26 "/usr/include/boost/predef/compiler.h" 2 3 4 6242: # 1 "/usr/include/boost/predef/compiler/iar.h" 1 3 4 6242: # 12 "/usr/include/boost/predef/compiler/iar.h" 3 4 6242: # 1 "/usr/include/boost/predef/make.h" 1 3 4 6242: # 13 "/usr/include/boost/predef/compiler/iar.h" 2 3 4 6242: # 51 "/usr/include/boost/predef/compiler/iar.h" 3 4 6242: 6242: # 27 "/usr/include/boost/predef/compiler.h" 2 3 4 6242: # 1 "/usr/include/boost/predef/compiler/ibm.h" 1 3 4 6242: # 12 "/usr/include/boost/predef/compiler/ibm.h" 3 4 6242: # 1 "/usr/include/boost/predef/make.h" 1 3 4 6242: # 13 "/usr/include/boost/predef/compiler/ibm.h" 2 3 4 6242: # 67 "/usr/include/boost/predef/compiler/ibm.h" 3 4 6242: 6242: # 28 "/usr/include/boost/predef/compiler.h" 2 3 4 6242: # 1 "/usr/include/boost/predef/compiler/intel.h" 1 3 4 6242: # 12 "/usr/include/boost/predef/compiler/intel.h" 3 4 6242: # 1 "/usr/include/boost/predef/make.h" 1 3 4 6242: # 13 "/usr/include/boost/predef/compiler/intel.h" 2 3 4 6242: # 74 "/usr/include/boost/predef/compiler/intel.h" 3 4 6242: 6242: # 29 "/usr/include/boost/predef/compiler.h" 2 3 4 6242: # 1 "/usr/include/boost/predef/compiler/kai.h" 1 3 4 6242: # 12 "/usr/include/boost/predef/compiler/kai.h" 3 4 6242: # 1 "/usr/include/boost/predef/make.h" 1 3 4 6242: # 13 "/usr/include/boost/predef/compiler/kai.h" 2 3 4 6242: # 51 "/usr/include/boost/predef/compiler/kai.h" 3 4 6242: 6242: # 30 "/usr/include/boost/predef/compiler.h" 2 3 4 6242: # 1 "/usr/include/boost/predef/compiler/llvm.h" 1 3 4 6242: # 13 "/usr/include/boost/predef/compiler/llvm.h" 3 4 6242: # 1 "/usr/include/boost/predef/compiler/clang.h" 1 3 4 6242: # 51 "/usr/include/boost/predef/compiler/clang.h" 3 4 6242: 6242: # 14 "/usr/include/boost/predef/compiler/llvm.h" 2 3 4 6242: 6242: 6242: # 1 "/usr/include/boost/predef/make.h" 1 3 4 6242: # 17 "/usr/include/boost/predef/compiler/llvm.h" 2 3 4 6242: # 52 "/usr/include/boost/predef/compiler/llvm.h" 3 4 6242: 6242: # 31 "/usr/include/boost/predef/compiler.h" 2 3 4 6242: # 1 "/usr/include/boost/predef/compiler/metaware.h" 1 3 4 6242: # 12 "/usr/include/boost/predef/compiler/metaware.h" 3 4 6242: # 1 "/usr/include/boost/predef/make.h" 1 3 4 6242: # 13 "/usr/include/boost/predef/compiler/metaware.h" 2 3 4 6242: # 48 "/usr/include/boost/predef/compiler/metaware.h" 3 4 6242: 6242: # 32 "/usr/include/boost/predef/compiler.h" 2 3 4 6242: # 1 "/usr/include/boost/predef/compiler/metrowerks.h" 1 3 4 6242: # 12 "/usr/include/boost/predef/compiler/metrowerks.h" 3 4 6242: # 1 "/usr/include/boost/predef/make.h" 1 3 4 6242: # 13 "/usr/include/boost/predef/compiler/metrowerks.h" 2 3 4 6242: # 72 "/usr/include/boost/predef/compiler/metrowerks.h" 3 4 6242: 6242: # 33 "/usr/include/boost/predef/compiler.h" 2 3 4 6242: # 1 "/usr/include/boost/predef/compiler/microtec.h" 1 3 4 6242: # 12 "/usr/include/boost/predef/compiler/microtec.h" 3 4 6242: # 1 "/usr/include/boost/predef/make.h" 1 3 4 6242: # 13 "/usr/include/boost/predef/compiler/microtec.h" 2 3 4 6242: # 48 "/usr/include/boost/predef/compiler/microtec.h" 3 4 6242: 6242: # 34 "/usr/include/boost/predef/compiler.h" 2 3 4 6242: # 1 "/usr/include/boost/predef/compiler/mpw.h" 1 3 4 6242: # 12 "/usr/include/boost/predef/compiler/mpw.h" 3 4 6242: # 1 "/usr/include/boost/predef/make.h" 1 3 4 6242: # 13 "/usr/include/boost/predef/compiler/mpw.h" 2 3 4 6242: # 58 "/usr/include/boost/predef/compiler/mpw.h" 3 4 6242: 6242: # 35 "/usr/include/boost/predef/compiler.h" 2 3 4 6242: # 1 "/usr/include/boost/predef/compiler/palm.h" 1 3 4 6242: # 12 "/usr/include/boost/predef/compiler/palm.h" 3 4 6242: # 1 "/usr/include/boost/predef/make.h" 1 3 4 6242: # 13 "/usr/include/boost/predef/compiler/palm.h" 2 3 4 6242: # 51 "/usr/include/boost/predef/compiler/palm.h" 3 4 6242: 6242: # 36 "/usr/include/boost/predef/compiler.h" 2 3 4 6242: # 1 "/usr/include/boost/predef/compiler/pgi.h" 1 3 4 6242: # 12 "/usr/include/boost/predef/compiler/pgi.h" 3 4 6242: # 1 "/usr/include/boost/predef/make.h" 1 3 4 6242: # 13 "/usr/include/boost/predef/compiler/pgi.h" 2 3 4 6242: # 55 "/usr/include/boost/predef/compiler/pgi.h" 3 4 6242: 6242: # 37 "/usr/include/boost/predef/compiler.h" 2 3 4 6242: # 1 "/usr/include/boost/predef/compiler/sgi_mipspro.h" 1 3 4 6242: # 12 "/usr/include/boost/predef/compiler/sgi_mipspro.h" 3 4 6242: # 1 "/usr/include/boost/predef/make.h" 1 3 4 6242: # 13 "/usr/include/boost/predef/compiler/sgi_mipspro.h" 2 3 4 6242: # 61 "/usr/include/boost/predef/compiler/sgi_mipspro.h" 3 4 6242: 6242: # 38 "/usr/include/boost/predef/compiler.h" 2 3 4 6242: # 1 "/usr/include/boost/predef/compiler/sunpro.h" 1 3 4 6242: # 12 "/usr/include/boost/predef/compiler/sunpro.h" 3 4 6242: # 1 "/usr/include/boost/predef/make.h" 1 3 4 6242: # 13 "/usr/include/boost/predef/compiler/sunpro.h" 2 3 4 6242: # 71 "/usr/include/boost/predef/compiler/sunpro.h" 3 4 6242: 6242: # 39 "/usr/include/boost/predef/compiler.h" 2 3 4 6242: # 1 "/usr/include/boost/predef/compiler/tendra.h" 1 3 4 6242: # 12 "/usr/include/boost/predef/compiler/tendra.h" 3 4 6242: # 1 "/usr/include/boost/predef/make.h" 1 3 4 6242: # 13 "/usr/include/boost/predef/compiler/tendra.h" 2 3 4 6242: # 48 "/usr/include/boost/predef/compiler/tendra.h" 3 4 6242: 6242: # 40 "/usr/include/boost/predef/compiler.h" 2 3 4 6242: # 1 "/usr/include/boost/predef/compiler/visualc.h" 1 3 4 6242: # 13 "/usr/include/boost/predef/compiler/visualc.h" 3 4 6242: # 1 "/usr/include/boost/predef/compiler/clang.h" 1 3 4 6242: # 51 "/usr/include/boost/predef/compiler/clang.h" 3 4 6242: 6242: # 14 "/usr/include/boost/predef/compiler/visualc.h" 2 3 4 6242: 6242: 6242: # 1 "/usr/include/boost/predef/make.h" 1 3 4 6242: # 17 "/usr/include/boost/predef/compiler/visualc.h" 2 3 4 6242: # 100 "/usr/include/boost/predef/compiler/visualc.h" 3 4 6242: 6242: # 41 "/usr/include/boost/predef/compiler.h" 2 3 4 6242: # 1 "/usr/include/boost/predef/compiler/watcom.h" 1 3 4 6242: # 12 "/usr/include/boost/predef/compiler/watcom.h" 3 4 6242: # 1 "/usr/include/boost/predef/make.h" 1 3 4 6242: # 13 "/usr/include/boost/predef/compiler/watcom.h" 2 3 4 6242: # 51 "/usr/include/boost/predef/compiler/watcom.h" 3 4 6242: 6242: # 42 "/usr/include/boost/predef/compiler.h" 2 3 4 6242: # 16 "/usr/include/boost/predef.h" 2 3 4 6242: # 1 "/usr/include/boost/predef/library.h" 1 3 4 6242: # 13 "/usr/include/boost/predef/library.h" 3 4 6242: # 1 "/usr/include/boost/predef/library/c.h" 1 3 4 6242: # 13 "/usr/include/boost/predef/library/c.h" 3 4 6242: # 1 "/usr/include/boost/predef/library/c/_prefix.h" 1 3 4 6242: # 11 "/usr/include/boost/predef/library/c/_prefix.h" 3 4 6242: # 1 "/usr/include/boost/predef/detail/_cassert.h" 1 3 4 6242: # 12 "/usr/include/boost/predef/detail/_cassert.h" 3 4 6242: # 1 "/usr/include/c++/8/cassert" 1 3 4 6242: # 41 "/usr/include/c++/8/cassert" 3 4 6242: 6242: # 42 "/usr/include/c++/8/cassert" 3 6242: 6242: 6242: # 1 "/usr/include/assert.h" 1 3 4 6242: # 66 "/usr/include/assert.h" 3 4 6242: extern "C" { 6242: 6242: 6242: extern void __assert_fail (const char *__assertion, const char *__file, 6242: unsigned int __line, const char *__function) 6242: throw () __attribute__ ((__noreturn__)); 6242: 6242: 6242: extern void __assert_perror_fail (int __errnum, const char *__file, 6242: unsigned int __line, const char *__function) 6242: throw () __attribute__ ((__noreturn__)); 6242: 6242: 6242: 6242: 6242: extern void __assert (const char *__assertion, const char *__file, int __line) 6242: throw () __attribute__ ((__noreturn__)); 6242: 6242: 6242: } 6242: # 44 "/usr/include/c++/8/cassert" 2 3 6242: # 13 "/usr/include/boost/predef/detail/_cassert.h" 2 3 4 6242: # 12 "/usr/include/boost/predef/library/c/_prefix.h" 2 3 4 6242: # 14 "/usr/include/boost/predef/library/c.h" 2 3 4 6242: 6242: # 1 "/usr/include/boost/predef/library/c/gnu.h" 1 3 4 6242: # 12 "/usr/include/boost/predef/library/c/gnu.h" 3 4 6242: # 1 "/usr/include/boost/predef/make.h" 1 3 4 6242: # 13 "/usr/include/boost/predef/library/c/gnu.h" 2 3 4 6242: 6242: 6242: 6242: 6242: # 1 "/usr/lib/gcc/s390x-linux-gnu/8/include/stddef.h" 1 3 4 6242: # 18 "/usr/include/boost/predef/library/c/gnu.h" 2 3 4 6242: # 61 "/usr/include/boost/predef/library/c/gnu.h" 3 4 6242: 6242: # 16 "/usr/include/boost/predef/library/c.h" 2 3 4 6242: # 1 "/usr/include/boost/predef/library/c/uc.h" 1 3 4 6242: # 14 "/usr/include/boost/predef/library/c/uc.h" 3 4 6242: # 1 "/usr/include/boost/predef/make.h" 1 3 4 6242: # 15 "/usr/include/boost/predef/library/c/uc.h" 2 3 4 6242: # 47 "/usr/include/boost/predef/library/c/uc.h" 3 4 6242: 6242: # 17 "/usr/include/boost/predef/library/c.h" 2 3 4 6242: # 1 "/usr/include/boost/predef/library/c/vms.h" 1 3 4 6242: # 14 "/usr/include/boost/predef/library/c/vms.h" 3 4 6242: # 1 "/usr/include/boost/predef/make.h" 1 3 4 6242: # 15 "/usr/include/boost/predef/library/c/vms.h" 2 3 4 6242: # 47 "/usr/include/boost/predef/library/c/vms.h" 3 4 6242: 6242: # 18 "/usr/include/boost/predef/library/c.h" 2 3 4 6242: # 1 "/usr/include/boost/predef/library/c/zos.h" 1 3 4 6242: # 14 "/usr/include/boost/predef/library/c/zos.h" 3 4 6242: # 1 "/usr/include/boost/predef/make.h" 1 3 4 6242: # 15 "/usr/include/boost/predef/library/c/zos.h" 2 3 4 6242: # 56 "/usr/include/boost/predef/library/c/zos.h" 3 4 6242: 6242: # 19 "/usr/include/boost/predef/library/c.h" 2 3 4 6242: # 14 "/usr/include/boost/predef/library.h" 2 3 4 6242: # 1 "/usr/include/boost/predef/library/std.h" 1 3 4 6242: # 12 "/usr/include/boost/predef/library/std.h" 3 4 6242: # 1 "/usr/include/boost/predef/library/std/_prefix.h" 1 3 4 6242: # 21 "/usr/include/boost/predef/library/std/_prefix.h" 3 4 6242: # 1 "/usr/include/boost/predef/detail/_exception.h" 1 3 4 6242: # 22 "/usr/include/boost/predef/library/std/_prefix.h" 2 3 4 6242: # 13 "/usr/include/boost/predef/library/std.h" 2 3 4 6242: 6242: # 1 "/usr/include/boost/predef/library/std/cxx.h" 1 3 4 6242: # 14 "/usr/include/boost/predef/library/std/cxx.h" 3 4 6242: # 1 "/usr/include/boost/predef/make.h" 1 3 4 6242: # 15 "/usr/include/boost/predef/library/std/cxx.h" 2 3 4 6242: # 46 "/usr/include/boost/predef/library/std/cxx.h" 3 4 6242: 6242: # 15 "/usr/include/boost/predef/library/std.h" 2 3 4 6242: # 1 "/usr/include/boost/predef/library/std/dinkumware.h" 1 3 4 6242: # 14 "/usr/include/boost/predef/library/std/dinkumware.h" 3 4 6242: # 1 "/usr/include/boost/predef/make.h" 1 3 4 6242: # 15 "/usr/include/boost/predef/library/std/dinkumware.h" 2 3 4 6242: # 52 "/usr/include/boost/predef/library/std/dinkumware.h" 3 4 6242: 6242: # 16 "/usr/include/boost/predef/library/std.h" 2 3 4 6242: # 1 "/usr/include/boost/predef/library/std/libcomo.h" 1 3 4 6242: # 14 "/usr/include/boost/predef/library/std/libcomo.h" 3 4 6242: # 1 "/usr/include/boost/predef/make.h" 1 3 4 6242: # 15 "/usr/include/boost/predef/library/std/libcomo.h" 2 3 4 6242: # 47 "/usr/include/boost/predef/library/std/libcomo.h" 3 4 6242: 6242: # 17 "/usr/include/boost/predef/library/std.h" 2 3 4 6242: # 1 "/usr/include/boost/predef/library/std/modena.h" 1 3 4 6242: # 14 "/usr/include/boost/predef/library/std/modena.h" 3 4 6242: # 1 "/usr/include/boost/predef/make.h" 1 3 4 6242: # 15 "/usr/include/boost/predef/library/std/modena.h" 2 3 4 6242: # 45 "/usr/include/boost/predef/library/std/modena.h" 3 4 6242: 6242: # 18 "/usr/include/boost/predef/library/std.h" 2 3 4 6242: # 1 "/usr/include/boost/predef/library/std/msl.h" 1 3 4 6242: # 14 "/usr/include/boost/predef/library/std/msl.h" 3 4 6242: # 1 "/usr/include/boost/predef/make.h" 1 3 4 6242: # 15 "/usr/include/boost/predef/library/std/msl.h" 2 3 4 6242: # 53 "/usr/include/boost/predef/library/std/msl.h" 3 4 6242: 6242: # 19 "/usr/include/boost/predef/library/std.h" 2 3 4 6242: # 1 "/usr/include/boost/predef/library/std/roguewave.h" 1 3 4 6242: # 14 "/usr/include/boost/predef/library/std/roguewave.h" 3 4 6242: # 1 "/usr/include/boost/predef/make.h" 1 3 4 6242: # 15 "/usr/include/boost/predef/library/std/roguewave.h" 2 3 4 6242: # 56 "/usr/include/boost/predef/library/std/roguewave.h" 3 4 6242: 6242: # 20 "/usr/include/boost/predef/library/std.h" 2 3 4 6242: # 1 "/usr/include/boost/predef/library/std/sgi.h" 1 3 4 6242: # 14 "/usr/include/boost/predef/library/std/sgi.h" 3 4 6242: # 1 "/usr/include/boost/predef/make.h" 1 3 4 6242: # 15 "/usr/include/boost/predef/library/std/sgi.h" 2 3 4 6242: # 51 "/usr/include/boost/predef/library/std/sgi.h" 3 4 6242: 6242: # 21 "/usr/include/boost/predef/library/std.h" 2 3 4 6242: # 1 "/usr/include/boost/predef/library/std/stdcpp3.h" 1 3 4 6242: # 14 "/usr/include/boost/predef/library/std/stdcpp3.h" 3 4 6242: # 1 "/usr/include/boost/predef/make.h" 1 3 4 6242: # 15 "/usr/include/boost/predef/library/std/stdcpp3.h" 2 3 4 6242: # 53 "/usr/include/boost/predef/library/std/stdcpp3.h" 3 4 6242: 6242: # 22 "/usr/include/boost/predef/library/std.h" 2 3 4 6242: # 1 "/usr/include/boost/predef/library/std/stlport.h" 1 3 4 6242: # 14 "/usr/include/boost/predef/library/std/stlport.h" 3 4 6242: # 1 "/usr/include/boost/predef/make.h" 1 3 4 6242: # 15 "/usr/include/boost/predef/library/std/stlport.h" 2 3 4 6242: # 59 "/usr/include/boost/predef/library/std/stlport.h" 3 4 6242: 6242: # 23 "/usr/include/boost/predef/library/std.h" 2 3 4 6242: # 1 "/usr/include/boost/predef/library/std/vacpp.h" 1 3 4 6242: # 14 "/usr/include/boost/predef/library/std/vacpp.h" 3 4 6242: # 1 "/usr/include/boost/predef/make.h" 1 3 4 6242: # 15 "/usr/include/boost/predef/library/std/vacpp.h" 2 3 4 6242: # 44 "/usr/include/boost/predef/library/std/vacpp.h" 3 4 6242: 6242: # 24 "/usr/include/boost/predef/library/std.h" 2 3 4 6242: # 15 "/usr/include/boost/predef/library.h" 2 3 4 6242: # 17 "/usr/include/boost/predef.h" 2 3 4 6242: # 1 "/usr/include/boost/predef/os.h" 1 3 4 6242: # 14 "/usr/include/boost/predef/os.h" 3 4 6242: # 1 "/usr/include/boost/predef/os/aix.h" 1 3 4 6242: # 12 "/usr/include/boost/predef/os/aix.h" 3 4 6242: # 1 "/usr/include/boost/predef/make.h" 1 3 4 6242: # 13 "/usr/include/boost/predef/os/aix.h" 2 3 4 6242: # 66 "/usr/include/boost/predef/os/aix.h" 3 4 6242: 6242: # 15 "/usr/include/boost/predef/os.h" 2 3 4 6242: # 1 "/usr/include/boost/predef/os/amigaos.h" 1 3 4 6242: # 12 "/usr/include/boost/predef/os/amigaos.h" 3 4 6242: # 1 "/usr/include/boost/predef/make.h" 1 3 4 6242: # 13 "/usr/include/boost/predef/os/amigaos.h" 2 3 4 6242: # 46 "/usr/include/boost/predef/os/amigaos.h" 3 4 6242: 6242: # 16 "/usr/include/boost/predef/os.h" 2 3 4 6242: # 1 "/usr/include/boost/predef/os/android.h" 1 3 4 6242: # 12 "/usr/include/boost/predef/os/android.h" 3 4 6242: # 1 "/usr/include/boost/predef/make.h" 1 3 4 6242: # 13 "/usr/include/boost/predef/os/android.h" 2 3 4 6242: # 45 "/usr/include/boost/predef/os/android.h" 3 4 6242: 6242: # 17 "/usr/include/boost/predef/os.h" 2 3 4 6242: # 1 "/usr/include/boost/predef/os/beos.h" 1 3 4 6242: # 12 "/usr/include/boost/predef/os/beos.h" 3 4 6242: # 1 "/usr/include/boost/predef/make.h" 1 3 4 6242: # 13 "/usr/include/boost/predef/os/beos.h" 2 3 4 6242: # 45 "/usr/include/boost/predef/os/beos.h" 3 4 6242: 6242: # 18 "/usr/include/boost/predef/os.h" 2 3 4 6242: # 1 "/usr/include/boost/predef/os/bsd.h" 1 3 4 6242: # 16 "/usr/include/boost/predef/os/bsd.h" 3 4 6242: # 1 "/usr/include/boost/predef/os/macos.h" 1 3 4 6242: # 17 "/usr/include/boost/predef/os/macos.h" 3 4 6242: # 1 "/usr/include/boost/predef/os/ios.h" 1 3 4 6242: # 13 "/usr/include/boost/predef/os/ios.h" 3 4 6242: # 1 "/usr/include/boost/predef/make.h" 1 3 4 6242: # 14 "/usr/include/boost/predef/os/ios.h" 2 3 4 6242: # 51 "/usr/include/boost/predef/os/ios.h" 3 4 6242: 6242: # 18 "/usr/include/boost/predef/os/macos.h" 2 3 4 6242: 6242: 6242: # 1 "/usr/include/boost/predef/make.h" 1 3 4 6242: # 21 "/usr/include/boost/predef/os/macos.h" 2 3 4 6242: # 65 "/usr/include/boost/predef/os/macos.h" 3 4 6242: 6242: # 17 "/usr/include/boost/predef/os/bsd.h" 2 3 4 6242: 6242: 6242: # 1 "/usr/include/boost/predef/make.h" 1 3 4 6242: # 20 "/usr/include/boost/predef/os/bsd.h" 2 3 4 6242: # 52 "/usr/include/boost/predef/os/bsd.h" 3 4 6242: # 1 "/usr/include/boost/predef/os/bsd/bsdi.h" 1 3 4 6242: # 11 "/usr/include/boost/predef/os/bsd/bsdi.h" 3 4 6242: # 1 "/usr/include/boost/predef/os/bsd.h" 1 3 4 6242: # 94 "/usr/include/boost/predef/os/bsd.h" 3 4 6242: # 1 "/usr/include/boost/predef/os/bsd/bsdi.h" 1 3 4 6242: # 48 "/usr/include/boost/predef/os/bsd/bsdi.h" 3 4 6242: 6242: # 95 "/usr/include/boost/predef/os/bsd.h" 2 3 4 6242: # 1 "/usr/include/boost/predef/os/bsd/dragonfly.h" 1 3 4 6242: # 11 "/usr/include/boost/predef/os/bsd/dragonfly.h" 3 4 6242: # 1 "/usr/include/boost/predef/os/bsd.h" 1 3 4 6242: # 94 "/usr/include/boost/predef/os/bsd.h" 3 4 6242: # 1 "/usr/include/boost/predef/os/bsd/bsdi.h" 1 3 4 6242: # 48 "/usr/include/boost/predef/os/bsd/bsdi.h" 3 4 6242: 6242: # 95 "/usr/include/boost/predef/os/bsd.h" 2 3 4 6242: # 1 "/usr/include/boost/predef/os/bsd/dragonfly.h" 1 3 4 6242: # 50 "/usr/include/boost/predef/os/bsd/dragonfly.h" 3 4 6242: 6242: # 96 "/usr/include/boost/predef/os/bsd.h" 2 3 4 6242: # 1 "/usr/include/boost/predef/os/bsd/free.h" 1 3 4 6242: # 11 "/usr/include/boost/predef/os/bsd/free.h" 3 4 6242: # 1 "/usr/include/boost/predef/os/bsd.h" 1 3 4 6242: # 94 "/usr/include/boost/predef/os/bsd.h" 3 4 6242: # 1 "/usr/include/boost/predef/os/bsd/bsdi.h" 1 3 4 6242: # 48 "/usr/include/boost/predef/os/bsd/bsdi.h" 3 4 6242: 6242: # 95 "/usr/include/boost/predef/os/bsd.h" 2 3 4 6242: # 1 "/usr/include/boost/predef/os/bsd/dragonfly.h" 1 3 4 6242: # 50 "/usr/include/boost/predef/os/bsd/dragonfly.h" 3 4 6242: 6242: # 96 "/usr/include/boost/predef/os/bsd.h" 2 3 4 6242: # 1 "/usr/include/boost/predef/os/bsd/free.h" 1 3 4 6242: # 60 "/usr/include/boost/predef/os/bsd/free.h" 3 4 6242: 6242: # 97 "/usr/include/boost/predef/os/bsd.h" 2 3 4 6242: # 1 "/usr/include/boost/predef/os/bsd/open.h" 1 3 4 6242: # 11 "/usr/include/boost/predef/os/bsd/open.h" 3 4 6242: # 1 "/usr/include/boost/predef/os/bsd.h" 1 3 4 6242: # 94 "/usr/include/boost/predef/os/bsd.h" 3 4 6242: # 1 "/usr/include/boost/predef/os/bsd/bsdi.h" 1 3 4 6242: # 48 "/usr/include/boost/predef/os/bsd/bsdi.h" 3 4 6242: 6242: # 95 "/usr/include/boost/predef/os/bsd.h" 2 3 4 6242: # 1 "/usr/include/boost/predef/os/bsd/dragonfly.h" 1 3 4 6242: # 50 "/usr/include/boost/predef/os/bsd/dragonfly.h" 3 4 6242: 6242: # 96 "/usr/include/boost/predef/os/bsd.h" 2 3 4 6242: # 1 "/usr/include/boost/predef/os/bsd/free.h" 1 3 4 6242: # 60 "/usr/include/boost/predef/os/bsd/free.h" 3 4 6242: 6242: # 97 "/usr/include/boost/predef/os/bsd.h" 2 3 4 6242: # 1 "/usr/include/boost/predef/os/bsd/open.h" 1 3 4 6242: # 171 "/usr/include/boost/predef/os/bsd/open.h" 3 4 6242: 6242: # 98 "/usr/include/boost/predef/os/bsd.h" 2 3 4 6242: # 1 "/usr/include/boost/predef/os/bsd/net.h" 1 3 4 6242: # 11 "/usr/include/boost/predef/os/bsd/net.h" 3 4 6242: # 1 "/usr/include/boost/predef/os/bsd.h" 1 3 4 6242: # 94 "/usr/include/boost/predef/os/bsd.h" 3 4 6242: # 1 "/usr/include/boost/predef/os/bsd/bsdi.h" 1 3 4 6242: # 48 "/usr/include/boost/predef/os/bsd/bsdi.h" 3 4 6242: 6242: # 95 "/usr/include/boost/predef/os/bsd.h" 2 3 4 6242: # 1 "/usr/include/boost/predef/os/bsd/dragonfly.h" 1 3 4 6242: # 50 "/usr/include/boost/predef/os/bsd/dragonfly.h" 3 4 6242: 6242: # 96 "/usr/include/boost/predef/os/bsd.h" 2 3 4 6242: # 1 "/usr/include/boost/predef/os/bsd/free.h" 1 3 4 6242: # 60 "/usr/include/boost/predef/os/bsd/free.h" 3 4 6242: 6242: # 97 "/usr/include/boost/predef/os/bsd.h" 2 3 4 6242: # 1 "/usr/include/boost/predef/os/bsd/open.h" 1 3 4 6242: # 171 "/usr/include/boost/predef/os/bsd/open.h" 3 4 6242: 6242: # 98 "/usr/include/boost/predef/os/bsd.h" 2 3 4 6242: # 1 "/usr/include/boost/predef/os/bsd/net.h" 1 3 4 6242: # 84 "/usr/include/boost/predef/os/bsd/net.h" 3 4 6242: 6242: # 99 "/usr/include/boost/predef/os/bsd.h" 2 3 4 6242: 6242: 6242: 6242: 6242: 6242: # 12 "/usr/include/boost/predef/os/bsd/net.h" 2 3 4 6242: # 84 "/usr/include/boost/predef/os/bsd/net.h" 3 4 6242: 6242: # 99 "/usr/include/boost/predef/os/bsd.h" 2 3 4 6242: 6242: 6242: 6242: 6242: 6242: # 12 "/usr/include/boost/predef/os/bsd/open.h" 2 3 4 6242: # 171 "/usr/include/boost/predef/os/bsd/open.h" 3 4 6242: 6242: # 98 "/usr/include/boost/predef/os/bsd.h" 2 3 4 6242: # 1 "/usr/include/boost/predef/os/bsd/net.h" 1 3 4 6242: # 84 "/usr/include/boost/predef/os/bsd/net.h" 3 4 6242: 6242: # 99 "/usr/include/boost/predef/os/bsd.h" 2 3 4 6242: 6242: 6242: 6242: 6242: 6242: # 12 "/usr/include/boost/predef/os/bsd/free.h" 2 3 4 6242: # 60 "/usr/include/boost/predef/os/bsd/free.h" 3 4 6242: 6242: # 97 "/usr/include/boost/predef/os/bsd.h" 2 3 4 6242: # 1 "/usr/include/boost/predef/os/bsd/open.h" 1 3 4 6242: # 171 "/usr/include/boost/predef/os/bsd/open.h" 3 4 6242: 6242: # 98 "/usr/include/boost/predef/os/bsd.h" 2 3 4 6242: # 1 "/usr/include/boost/predef/os/bsd/net.h" 1 3 4 6242: # 84 "/usr/include/boost/predef/os/bsd/net.h" 3 4 6242: 6242: # 99 "/usr/include/boost/predef/os/bsd.h" 2 3 4 6242: 6242: 6242: 6242: 6242: 6242: # 12 "/usr/include/boost/predef/os/bsd/dragonfly.h" 2 3 4 6242: # 50 "/usr/include/boost/predef/os/bsd/dragonfly.h" 3 4 6242: 6242: # 96 "/usr/include/boost/predef/os/bsd.h" 2 3 4 6242: # 1 "/usr/include/boost/predef/os/bsd/free.h" 1 3 4 6242: # 60 "/usr/include/boost/predef/os/bsd/free.h" 3 4 6242: 6242: # 97 "/usr/include/boost/predef/os/bsd.h" 2 3 4 6242: # 1 "/usr/include/boost/predef/os/bsd/open.h" 1 3 4 6242: # 171 "/usr/include/boost/predef/os/bsd/open.h" 3 4 6242: 6242: # 98 "/usr/include/boost/predef/os/bsd.h" 2 3 4 6242: # 1 "/usr/include/boost/predef/os/bsd/net.h" 1 3 4 6242: # 84 "/usr/include/boost/predef/os/bsd/net.h" 3 4 6242: 6242: # 99 "/usr/include/boost/predef/os/bsd.h" 2 3 4 6242: 6242: 6242: 6242: 6242: 6242: # 12 "/usr/include/boost/predef/os/bsd/bsdi.h" 2 3 4 6242: # 48 "/usr/include/boost/predef/os/bsd/bsdi.h" 3 4 6242: 6242: # 53 "/usr/include/boost/predef/os/bsd.h" 2 3 4 6242: # 1 "/usr/include/boost/predef/os/bsd/dragonfly.h" 1 3 4 6242: # 50 "/usr/include/boost/predef/os/bsd/dragonfly.h" 3 4 6242: 6242: # 54 "/usr/include/boost/predef/os/bsd.h" 2 3 4 6242: # 1 "/usr/include/boost/predef/os/bsd/free.h" 1 3 4 6242: # 60 "/usr/include/boost/predef/os/bsd/free.h" 3 4 6242: 6242: # 55 "/usr/include/boost/predef/os/bsd.h" 2 3 4 6242: # 1 "/usr/include/boost/predef/os/bsd/open.h" 1 3 4 6242: # 171 "/usr/include/boost/predef/os/bsd/open.h" 3 4 6242: 6242: # 56 "/usr/include/boost/predef/os/bsd.h" 2 3 4 6242: # 1 "/usr/include/boost/predef/os/bsd/net.h" 1 3 4 6242: # 84 "/usr/include/boost/predef/os/bsd/net.h" 3 4 6242: 6242: # 57 "/usr/include/boost/predef/os/bsd.h" 2 3 4 6242: # 103 "/usr/include/boost/predef/os/bsd.h" 3 4 6242: 6242: # 19 "/usr/include/boost/predef/os.h" 2 3 4 6242: # 1 "/usr/include/boost/predef/os/cygwin.h" 1 3 4 6242: # 12 "/usr/include/boost/predef/os/cygwin.h" 3 4 6242: # 1 "/usr/include/boost/predef/make.h" 1 3 4 6242: # 13 "/usr/include/boost/predef/os/cygwin.h" 2 3 4 6242: # 45 "/usr/include/boost/predef/os/cygwin.h" 3 4 6242: 6242: # 20 "/usr/include/boost/predef/os.h" 2 3 4 6242: # 1 "/usr/include/boost/predef/os/haiku.h" 1 3 4 6242: # 13 "/usr/include/boost/predef/os/haiku.h" 3 4 6242: # 1 "/usr/include/boost/predef/make.h" 1 3 4 6242: # 14 "/usr/include/boost/predef/os/haiku.h" 2 3 4 6242: # 46 "/usr/include/boost/predef/os/haiku.h" 3 4 6242: 6242: # 21 "/usr/include/boost/predef/os.h" 2 3 4 6242: # 1 "/usr/include/boost/predef/os/hpux.h" 1 3 4 6242: # 12 "/usr/include/boost/predef/os/hpux.h" 3 4 6242: # 1 "/usr/include/boost/predef/make.h" 1 3 4 6242: # 13 "/usr/include/boost/predef/os/hpux.h" 2 3 4 6242: # 47 "/usr/include/boost/predef/os/hpux.h" 3 4 6242: 6242: # 22 "/usr/include/boost/predef/os.h" 2 3 4 6242: # 1 "/usr/include/boost/predef/os/irix.h" 1 3 4 6242: # 12 "/usr/include/boost/predef/os/irix.h" 3 4 6242: # 1 "/usr/include/boost/predef/make.h" 1 3 4 6242: # 13 "/usr/include/boost/predef/os/irix.h" 2 3 4 6242: # 46 "/usr/include/boost/predef/os/irix.h" 3 4 6242: 6242: # 23 "/usr/include/boost/predef/os.h" 2 3 4 6242: # 1 "/usr/include/boost/predef/os/ios.h" 1 3 4 6242: # 51 "/usr/include/boost/predef/os/ios.h" 3 4 6242: 6242: # 24 "/usr/include/boost/predef/os.h" 2 3 4 6242: # 1 "/usr/include/boost/predef/os/linux.h" 1 3 4 6242: # 12 "/usr/include/boost/predef/os/linux.h" 3 4 6242: # 1 "/usr/include/boost/predef/make.h" 1 3 4 6242: # 13 "/usr/include/boost/predef/os/linux.h" 2 3 4 6242: # 38 "/usr/include/boost/predef/os/linux.h" 3 4 6242: # 1 "/usr/include/boost/predef/detail/os_detected.h" 1 3 4 6242: # 39 "/usr/include/boost/predef/os/linux.h" 2 3 4 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: # 25 "/usr/include/boost/predef/os.h" 2 3 4 6242: # 1 "/usr/include/boost/predef/os/macos.h" 1 3 4 6242: # 65 "/usr/include/boost/predef/os/macos.h" 3 4 6242: 6242: # 26 "/usr/include/boost/predef/os.h" 2 3 4 6242: # 1 "/usr/include/boost/predef/os/os400.h" 1 3 4 6242: # 12 "/usr/include/boost/predef/os/os400.h" 3 4 6242: # 1 "/usr/include/boost/predef/make.h" 1 3 4 6242: # 13 "/usr/include/boost/predef/os/os400.h" 2 3 4 6242: # 45 "/usr/include/boost/predef/os/os400.h" 3 4 6242: 6242: # 27 "/usr/include/boost/predef/os.h" 2 3 4 6242: # 1 "/usr/include/boost/predef/os/qnxnto.h" 1 3 4 6242: # 12 "/usr/include/boost/predef/os/qnxnto.h" 3 4 6242: # 1 "/usr/include/boost/predef/make.h" 1 3 4 6242: # 13 "/usr/include/boost/predef/os/qnxnto.h" 2 3 4 6242: # 59 "/usr/include/boost/predef/os/qnxnto.h" 3 4 6242: 6242: # 28 "/usr/include/boost/predef/os.h" 2 3 4 6242: # 1 "/usr/include/boost/predef/os/solaris.h" 1 3 4 6242: # 12 "/usr/include/boost/predef/os/solaris.h" 3 4 6242: # 1 "/usr/include/boost/predef/make.h" 1 3 4 6242: # 13 "/usr/include/boost/predef/os/solaris.h" 2 3 4 6242: # 46 "/usr/include/boost/predef/os/solaris.h" 3 4 6242: 6242: # 29 "/usr/include/boost/predef/os.h" 2 3 4 6242: # 1 "/usr/include/boost/predef/os/unix.h" 1 3 4 6242: # 12 "/usr/include/boost/predef/os/unix.h" 3 4 6242: # 1 "/usr/include/boost/predef/make.h" 1 3 4 6242: # 13 "/usr/include/boost/predef/os/unix.h" 2 3 4 6242: # 75 "/usr/include/boost/predef/os/unix.h" 3 4 6242: 6242: 6242: # 30 "/usr/include/boost/predef/os.h" 2 3 4 6242: # 1 "/usr/include/boost/predef/os/vms.h" 1 3 4 6242: # 12 "/usr/include/boost/predef/os/vms.h" 3 4 6242: # 1 "/usr/include/boost/predef/make.h" 1 3 4 6242: # 13 "/usr/include/boost/predef/os/vms.h" 2 3 4 6242: # 52 "/usr/include/boost/predef/os/vms.h" 3 4 6242: 6242: # 31 "/usr/include/boost/predef/os.h" 2 3 4 6242: # 1 "/usr/include/boost/predef/os/windows.h" 1 3 4 6242: # 12 "/usr/include/boost/predef/os/windows.h" 3 4 6242: # 1 "/usr/include/boost/predef/make.h" 1 3 4 6242: # 13 "/usr/include/boost/predef/os/windows.h" 2 3 4 6242: # 51 "/usr/include/boost/predef/os/windows.h" 3 4 6242: 6242: # 32 "/usr/include/boost/predef/os.h" 2 3 4 6242: # 18 "/usr/include/boost/predef.h" 2 3 4 6242: # 1 "/usr/include/boost/predef/other.h" 1 3 4 6242: # 13 "/usr/include/boost/predef/other.h" 3 4 6242: # 1 "/usr/include/boost/predef/other/endian.h" 1 3 4 6242: # 12 "/usr/include/boost/predef/other/endian.h" 3 4 6242: # 1 "/usr/include/boost/predef/make.h" 1 3 4 6242: # 13 "/usr/include/boost/predef/other/endian.h" 2 3 4 6242: # 1 "/usr/include/boost/predef/library/c/gnu.h" 1 3 4 6242: # 61 "/usr/include/boost/predef/library/c/gnu.h" 3 4 6242: 6242: # 14 "/usr/include/boost/predef/other/endian.h" 2 3 4 6242: # 1 "/usr/include/boost/predef/os/macos.h" 1 3 4 6242: # 65 "/usr/include/boost/predef/os/macos.h" 3 4 6242: 6242: # 15 "/usr/include/boost/predef/other/endian.h" 2 3 4 6242: # 1 "/usr/include/boost/predef/os/bsd.h" 1 3 4 6242: # 94 "/usr/include/boost/predef/os/bsd.h" 3 4 6242: # 1 "/usr/include/boost/predef/os/bsd/bsdi.h" 1 3 4 6242: # 48 "/usr/include/boost/predef/os/bsd/bsdi.h" 3 4 6242: 6242: # 95 "/usr/include/boost/predef/os/bsd.h" 2 3 4 6242: # 1 "/usr/include/boost/predef/os/bsd/dragonfly.h" 1 3 4 6242: # 50 "/usr/include/boost/predef/os/bsd/dragonfly.h" 3 4 6242: 6242: # 96 "/usr/include/boost/predef/os/bsd.h" 2 3 4 6242: # 1 "/usr/include/boost/predef/os/bsd/free.h" 1 3 4 6242: # 60 "/usr/include/boost/predef/os/bsd/free.h" 3 4 6242: 6242: # 97 "/usr/include/boost/predef/os/bsd.h" 2 3 4 6242: # 1 "/usr/include/boost/predef/os/bsd/open.h" 1 3 4 6242: # 171 "/usr/include/boost/predef/os/bsd/open.h" 3 4 6242: 6242: # 98 "/usr/include/boost/predef/os/bsd.h" 2 3 4 6242: # 1 "/usr/include/boost/predef/os/bsd/net.h" 1 3 4 6242: # 84 "/usr/include/boost/predef/os/bsd/net.h" 3 4 6242: 6242: # 99 "/usr/include/boost/predef/os/bsd.h" 2 3 4 6242: 6242: 6242: 6242: 6242: 6242: # 16 "/usr/include/boost/predef/other/endian.h" 2 3 4 6242: # 1 "/usr/include/boost/predef/os/android.h" 1 3 4 6242: # 45 "/usr/include/boost/predef/os/android.h" 3 4 6242: 6242: # 17 "/usr/include/boost/predef/other/endian.h" 2 3 4 6242: # 195 "/usr/include/boost/predef/other/endian.h" 3 4 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: # 14 "/usr/include/boost/predef/other.h" 2 3 4 6242: # 19 "/usr/include/boost/predef.h" 2 3 4 6242: # 1 "/usr/include/boost/predef/platform.h" 1 3 4 6242: # 14 "/usr/include/boost/predef/platform.h" 3 4 6242: # 1 "/usr/include/boost/predef/platform/mingw.h" 1 3 4 6242: # 12 "/usr/include/boost/predef/platform/mingw.h" 3 4 6242: # 1 "/usr/include/boost/predef/make.h" 1 3 4 6242: # 13 "/usr/include/boost/predef/platform/mingw.h" 2 3 4 6242: # 64 "/usr/include/boost/predef/platform/mingw.h" 3 4 6242: 6242: # 15 "/usr/include/boost/predef/platform.h" 2 3 4 6242: # 1 "/usr/include/boost/predef/platform/windows_desktop.h" 1 3 4 6242: # 13 "/usr/include/boost/predef/platform/windows_desktop.h" 3 4 6242: # 1 "/usr/include/boost/predef/make.h" 1 3 4 6242: # 14 "/usr/include/boost/predef/platform/windows_desktop.h" 2 3 4 6242: # 1 "/usr/include/boost/predef/os/windows.h" 1 3 4 6242: # 51 "/usr/include/boost/predef/os/windows.h" 3 4 6242: 6242: # 15 "/usr/include/boost/predef/platform/windows_desktop.h" 2 3 4 6242: # 45 "/usr/include/boost/predef/platform/windows_desktop.h" 3 4 6242: 6242: # 16 "/usr/include/boost/predef/platform.h" 2 3 4 6242: # 1 "/usr/include/boost/predef/platform/windows_store.h" 1 3 4 6242: # 13 "/usr/include/boost/predef/platform/windows_store.h" 3 4 6242: # 1 "/usr/include/boost/predef/make.h" 1 3 4 6242: # 14 "/usr/include/boost/predef/platform/windows_store.h" 2 3 4 6242: # 1 "/usr/include/boost/predef/os/windows.h" 1 3 4 6242: # 51 "/usr/include/boost/predef/os/windows.h" 3 4 6242: 6242: # 15 "/usr/include/boost/predef/platform/windows_store.h" 2 3 4 6242: # 43 "/usr/include/boost/predef/platform/windows_store.h" 3 4 6242: 6242: # 17 "/usr/include/boost/predef/platform.h" 2 3 4 6242: # 1 "/usr/include/boost/predef/platform/windows_phone.h" 1 3 4 6242: # 13 "/usr/include/boost/predef/platform/windows_phone.h" 3 4 6242: # 1 "/usr/include/boost/predef/make.h" 1 3 4 6242: # 14 "/usr/include/boost/predef/platform/windows_phone.h" 2 3 4 6242: # 1 "/usr/include/boost/predef/os/windows.h" 1 3 4 6242: # 51 "/usr/include/boost/predef/os/windows.h" 3 4 6242: 6242: # 15 "/usr/include/boost/predef/platform/windows_phone.h" 2 3 4 6242: # 43 "/usr/include/boost/predef/platform/windows_phone.h" 3 4 6242: 6242: # 18 "/usr/include/boost/predef/platform.h" 2 3 4 6242: # 1 "/usr/include/boost/predef/platform/windows_runtime.h" 1 3 4 6242: # 13 "/usr/include/boost/predef/platform/windows_runtime.h" 3 4 6242: # 1 "/usr/include/boost/predef/make.h" 1 3 4 6242: # 14 "/usr/include/boost/predef/platform/windows_runtime.h" 2 3 4 6242: # 1 "/usr/include/boost/predef/os/windows.h" 1 3 4 6242: # 51 "/usr/include/boost/predef/os/windows.h" 3 4 6242: 6242: # 15 "/usr/include/boost/predef/platform/windows_runtime.h" 2 3 4 6242: # 45 "/usr/include/boost/predef/platform/windows_runtime.h" 3 4 6242: 6242: # 19 "/usr/include/boost/predef/platform.h" 2 3 4 6242: # 1 "/usr/include/boost/predef/platform/ios.h" 1 3 4 6242: # 12 "/usr/include/boost/predef/platform/ios.h" 3 4 6242: # 1 "/usr/include/boost/predef/os/ios.h" 1 3 4 6242: # 51 "/usr/include/boost/predef/os/ios.h" 3 4 6242: 6242: # 13 "/usr/include/boost/predef/platform/ios.h" 2 3 4 6242: # 57 "/usr/include/boost/predef/platform/ios.h" 3 4 6242: 6242: 6242: # 20 "/usr/include/boost/predef/platform.h" 2 3 4 6242: # 20 "/usr/include/boost/predef.h" 2 3 4 6242: # 1 "/usr/include/boost/predef/hardware.h" 1 3 4 6242: # 14 "/usr/include/boost/predef/hardware.h" 3 4 6242: # 1 "/usr/include/boost/predef/hardware/simd.h" 1 3 4 6242: # 9 "/usr/include/boost/predef/hardware/simd.h" 3 4 6242: # 1 "/usr/include/boost/predef/hardware/simd/x86.h" 1 3 4 6242: # 13 "/usr/include/boost/predef/hardware/simd/x86.h" 3 4 6242: # 1 "/usr/include/boost/predef/hardware/simd/x86/versions.h" 1 3 4 6242: # 14 "/usr/include/boost/predef/hardware/simd/x86.h" 2 3 4 6242: # 123 "/usr/include/boost/predef/hardware/simd/x86.h" 3 4 6242: 6242: # 10 "/usr/include/boost/predef/hardware/simd.h" 2 3 4 6242: # 1 "/usr/include/boost/predef/hardware/simd/x86_amd.h" 1 3 4 6242: # 13 "/usr/include/boost/predef/hardware/simd/x86_amd.h" 3 4 6242: # 1 "/usr/include/boost/predef/hardware/simd/x86_amd/versions.h" 1 3 4 6242: # 14 "/usr/include/boost/predef/hardware/simd/x86_amd.h" 2 3 4 6242: # 87 "/usr/include/boost/predef/hardware/simd/x86_amd.h" 3 4 6242: 6242: # 11 "/usr/include/boost/predef/hardware/simd.h" 2 3 4 6242: # 1 "/usr/include/boost/predef/hardware/simd/arm.h" 1 3 4 6242: # 13 "/usr/include/boost/predef/hardware/simd/arm.h" 3 4 6242: # 1 "/usr/include/boost/predef/hardware/simd/arm/versions.h" 1 3 4 6242: # 14 "/usr/include/boost/predef/hardware/simd/arm.h" 2 3 4 6242: # 59 "/usr/include/boost/predef/hardware/simd/arm.h" 3 4 6242: 6242: # 12 "/usr/include/boost/predef/hardware/simd.h" 2 3 4 6242: # 1 "/usr/include/boost/predef/hardware/simd/ppc.h" 1 3 4 6242: # 13 "/usr/include/boost/predef/hardware/simd/ppc.h" 3 4 6242: # 1 "/usr/include/boost/predef/hardware/simd/ppc/versions.h" 1 3 4 6242: # 14 "/usr/include/boost/predef/hardware/simd/ppc.h" 2 3 4 6242: # 69 "/usr/include/boost/predef/hardware/simd/ppc.h" 3 4 6242: 6242: # 13 "/usr/include/boost/predef/hardware/simd.h" 2 3 4 6242: # 119 "/usr/include/boost/predef/hardware/simd.h" 3 4 6242: 6242: # 15 "/usr/include/boost/predef/hardware.h" 2 3 4 6242: # 21 "/usr/include/boost/predef.h" 2 3 4 6242: 6242: # 1 "/usr/include/boost/predef/version.h" 1 3 4 6242: # 23 "/usr/include/boost/predef.h" 2 3 4 6242: # 46 "/usr/include/boost/regex/config.hpp" 2 3 4 6242: # 136 "/usr/include/boost/regex/config.hpp" 3 4 6242: # 1 "/usr/include/boost/regex/config/cwchar.hpp" 1 3 4 6242: # 22 "/usr/include/boost/regex/config/cwchar.hpp" 3 4 6242: # 1 "/usr/include/c++/8/cwchar" 1 3 4 6242: # 39 "/usr/include/c++/8/cwchar" 3 4 6242: 6242: # 40 "/usr/include/c++/8/cwchar" 3 6242: # 23 "/usr/include/boost/regex/config/cwchar.hpp" 2 3 4 6242: # 1 "/usr/include/c++/8/cwctype" 1 3 4 6242: # 39 "/usr/include/c++/8/cwctype" 3 4 6242: 6242: # 40 "/usr/include/c++/8/cwctype" 3 6242: # 24 "/usr/include/boost/regex/config/cwchar.hpp" 2 3 4 6242: # 49 "/usr/include/boost/regex/config/cwchar.hpp" 3 4 6242: namespace std{ 6242: 6242: 6242: extern "C"{ 6242: # 201 "/usr/include/boost/regex/config/cwchar.hpp" 3 4 6242: } 6242: 6242: 6242: } 6242: # 137 "/usr/include/boost/regex/config.hpp" 2 3 4 6242: # 249 "/usr/include/boost/regex/config.hpp" 3 4 6242: # 1 "/usr/include/boost/config/auto_link.hpp" 1 3 4 6242: # 250 "/usr/include/boost/regex/config.hpp" 2 3 4 6242: # 432 "/usr/include/boost/regex/config.hpp" 3 4 6242: namespace boost{ namespace re_detail_106501{ 6242: 6242: void* get_mem_block(); 6242: void put_mem_block(void*); 6242: 6242: }} 6242: # 29 "/usr/include/boost/regex.hpp" 2 3 4 6242: 6242: 6242: # 1 "/usr/include/boost/regex/v4/regex.hpp" 1 3 4 6242: # 32 "/usr/include/boost/regex/v4/regex.hpp" 3 4 6242: # 1 "/usr/include/boost/regex/v4/regex_workaround.hpp" 1 3 4 6242: # 24 "/usr/include/boost/regex/v4/regex_workaround.hpp" 3 4 6242: # 1 "/usr/include/c++/8/cstring" 1 3 4 6242: # 39 "/usr/include/c++/8/cstring" 3 4 6242: 6242: # 40 "/usr/include/c++/8/cstring" 3 6242: # 71 "/usr/include/c++/8/cstring" 3 6242: namespace std __attribute__ ((__visibility__ ("default"))) 6242: { 6242: 6242: 6242: using ::memchr; 6242: using ::memcmp; 6242: using ::memcpy; 6242: using ::memmove; 6242: using ::memset; 6242: using ::strcat; 6242: using ::strcmp; 6242: using ::strcoll; 6242: using ::strcpy; 6242: using ::strcspn; 6242: using ::strerror; 6242: using ::strlen; 6242: using ::strncat; 6242: using ::strncmp; 6242: using ::strncpy; 6242: using ::strspn; 6242: using ::strtok; 6242: using ::strxfrm; 6242: using ::strchr; 6242: using ::strpbrk; 6242: using ::strrchr; 6242: using ::strstr; 6242: # 120 "/usr/include/c++/8/cstring" 3 6242: 6242: } 6242: # 25 "/usr/include/boost/regex/v4/regex_workaround.hpp" 2 3 4 6242: # 1 "/usr/include/c++/8/cstdlib" 1 3 4 6242: # 39 "/usr/include/c++/8/cstdlib" 3 4 6242: 6242: # 40 "/usr/include/c++/8/cstdlib" 3 6242: # 26 "/usr/include/boost/regex/v4/regex_workaround.hpp" 2 3 4 6242: 6242: # 1 "/usr/include/c++/8/cassert" 1 3 4 6242: # 41 "/usr/include/c++/8/cassert" 3 4 6242: 6242: # 42 "/usr/include/c++/8/cassert" 3 6242: 6242: 6242: # 1 "/usr/include/assert.h" 1 3 4 6242: # 44 "/usr/include/c++/8/cassert" 2 3 6242: # 28 "/usr/include/boost/regex/v4/regex_workaround.hpp" 2 3 4 6242: # 1 "/usr/include/c++/8/cstdio" 1 3 4 6242: # 39 "/usr/include/c++/8/cstdio" 3 4 6242: 6242: # 40 "/usr/include/c++/8/cstdio" 3 6242: # 29 "/usr/include/boost/regex/v4/regex_workaround.hpp" 2 3 4 6242: # 1 "/usr/include/c++/8/climits" 1 3 4 6242: # 39 "/usr/include/c++/8/climits" 3 4 6242: 6242: # 40 "/usr/include/c++/8/climits" 3 6242: 6242: 6242: # 1 "/usr/lib/gcc/s390x-linux-gnu/8/include-fixed/limits.h" 1 3 4 6242: # 43 "/usr/include/c++/8/climits" 2 3 6242: # 30 "/usr/include/boost/regex/v4/regex_workaround.hpp" 2 3 4 6242: 6242: 6242: 6242: 6242: 6242: 6242: # 1 "/usr/include/c++/8/set" 1 3 4 6242: # 58 "/usr/include/c++/8/set" 3 4 6242: 6242: # 59 "/usr/include/c++/8/set" 3 6242: 6242: # 1 "/usr/include/c++/8/bits/stl_tree.h" 1 3 6242: # 61 "/usr/include/c++/8/bits/stl_tree.h" 3 6242: 6242: # 62 "/usr/include/c++/8/bits/stl_tree.h" 3 6242: # 75 "/usr/include/c++/8/bits/stl_tree.h" 3 6242: namespace std __attribute__ ((__visibility__ ("default"))) 6242: { 6242: 6242: # 99 "/usr/include/c++/8/bits/stl_tree.h" 3 6242: enum _Rb_tree_color { _S_red = false, _S_black = true }; 6242: 6242: struct _Rb_tree_node_base 6242: { 6242: typedef _Rb_tree_node_base* _Base_ptr; 6242: typedef const _Rb_tree_node_base* _Const_Base_ptr; 6242: 6242: _Rb_tree_color _M_color; 6242: _Base_ptr _M_parent; 6242: _Base_ptr _M_left; 6242: _Base_ptr _M_right; 6242: 6242: static _Base_ptr 6242: _S_minimum(_Base_ptr __x) noexcept 6242: { 6242: while (__x->_M_left != 0) __x = __x->_M_left; 6242: return __x; 6242: } 6242: 6242: static _Const_Base_ptr 6242: _S_minimum(_Const_Base_ptr __x) noexcept 6242: { 6242: while (__x->_M_left != 0) __x = __x->_M_left; 6242: return __x; 6242: } 6242: 6242: static _Base_ptr 6242: _S_maximum(_Base_ptr __x) noexcept 6242: { 6242: while (__x->_M_right != 0) __x = __x->_M_right; 6242: return __x; 6242: } 6242: 6242: static _Const_Base_ptr 6242: _S_maximum(_Const_Base_ptr __x) noexcept 6242: { 6242: while (__x->_M_right != 0) __x = __x->_M_right; 6242: return __x; 6242: } 6242: }; 6242: 6242: 6242: template 6242: struct _Rb_tree_key_compare 6242: { 6242: _Key_compare _M_key_compare; 6242: 6242: _Rb_tree_key_compare() 6242: noexcept(is_nothrow_default_constructible<_Key_compare>::value) 6242: 6242: : _M_key_compare() 6242: { } 6242: 6242: _Rb_tree_key_compare(const _Key_compare& __comp) 6242: : _M_key_compare(__comp) 6242: { } 6242: 6242: 6242: 6242: _Rb_tree_key_compare(const _Rb_tree_key_compare&) = default; 6242: 6242: _Rb_tree_key_compare(_Rb_tree_key_compare&& __x) 6242: noexcept(is_nothrow_copy_constructible<_Key_compare>::value) 6242: : _M_key_compare(__x._M_key_compare) 6242: { } 6242: 6242: }; 6242: 6242: 6242: struct _Rb_tree_header 6242: { 6242: _Rb_tree_node_base _M_header; 6242: size_t _M_node_count; 6242: 6242: _Rb_tree_header() noexcept 6242: { 6242: _M_header._M_color = _S_red; 6242: _M_reset(); 6242: } 6242: 6242: 6242: _Rb_tree_header(_Rb_tree_header&& __x) noexcept 6242: { 6242: if (__x._M_header._M_parent != nullptr) 6242: _M_move_data(__x); 6242: else 6242: { 6242: _M_header._M_color = _S_red; 6242: _M_reset(); 6242: } 6242: } 6242: 6242: 6242: void 6242: _M_move_data(_Rb_tree_header& __from) 6242: { 6242: _M_header._M_color = __from._M_header._M_color; 6242: _M_header._M_parent = __from._M_header._M_parent; 6242: _M_header._M_left = __from._M_header._M_left; 6242: _M_header._M_right = __from._M_header._M_right; 6242: _M_header._M_parent->_M_parent = &_M_header; 6242: _M_node_count = __from._M_node_count; 6242: 6242: __from._M_reset(); 6242: } 6242: 6242: void 6242: _M_reset() 6242: { 6242: _M_header._M_parent = 0; 6242: _M_header._M_left = &_M_header; 6242: _M_header._M_right = &_M_header; 6242: _M_node_count = 0; 6242: } 6242: }; 6242: 6242: template 6242: struct _Rb_tree_node : public _Rb_tree_node_base 6242: { 6242: typedef _Rb_tree_node<_Val>* _Link_type; 6242: # 231 "/usr/include/c++/8/bits/stl_tree.h" 3 6242: __gnu_cxx::__aligned_membuf<_Val> _M_storage; 6242: 6242: _Val* 6242: _M_valptr() 6242: { return _M_storage._M_ptr(); } 6242: 6242: const _Val* 6242: _M_valptr() const 6242: { return _M_storage._M_ptr(); } 6242: 6242: }; 6242: 6242: __attribute__ ((__pure__)) _Rb_tree_node_base* 6242: _Rb_tree_increment(_Rb_tree_node_base* __x) throw (); 6242: 6242: __attribute__ ((__pure__)) const _Rb_tree_node_base* 6242: _Rb_tree_increment(const _Rb_tree_node_base* __x) throw (); 6242: 6242: __attribute__ ((__pure__)) _Rb_tree_node_base* 6242: _Rb_tree_decrement(_Rb_tree_node_base* __x) throw (); 6242: 6242: __attribute__ ((__pure__)) const _Rb_tree_node_base* 6242: _Rb_tree_decrement(const _Rb_tree_node_base* __x) throw (); 6242: 6242: template 6242: struct _Rb_tree_iterator 6242: { 6242: typedef _Tp value_type; 6242: typedef _Tp& reference; 6242: typedef _Tp* pointer; 6242: 6242: typedef bidirectional_iterator_tag iterator_category; 6242: typedef ptrdiff_t difference_type; 6242: 6242: typedef _Rb_tree_iterator<_Tp> _Self; 6242: typedef _Rb_tree_node_base::_Base_ptr _Base_ptr; 6242: typedef _Rb_tree_node<_Tp>* _Link_type; 6242: 6242: _Rb_tree_iterator() noexcept 6242: : _M_node() { } 6242: 6242: explicit 6242: _Rb_tree_iterator(_Base_ptr __x) noexcept 6242: : _M_node(__x) { } 6242: 6242: reference 6242: operator*() const noexcept 6242: { return *static_cast<_Link_type>(_M_node)->_M_valptr(); } 6242: 6242: pointer 6242: operator->() const noexcept 6242: { return static_cast<_Link_type> (_M_node)->_M_valptr(); } 6242: 6242: _Self& 6242: operator++() noexcept 6242: { 6242: _M_node = _Rb_tree_increment(_M_node); 6242: return *this; 6242: } 6242: 6242: _Self 6242: operator++(int) noexcept 6242: { 6242: _Self __tmp = *this; 6242: _M_node = _Rb_tree_increment(_M_node); 6242: return __tmp; 6242: } 6242: 6242: _Self& 6242: operator--() noexcept 6242: { 6242: _M_node = _Rb_tree_decrement(_M_node); 6242: return *this; 6242: } 6242: 6242: _Self 6242: operator--(int) noexcept 6242: { 6242: _Self __tmp = *this; 6242: _M_node = _Rb_tree_decrement(_M_node); 6242: return __tmp; 6242: } 6242: 6242: bool 6242: operator==(const _Self& __x) const noexcept 6242: { return _M_node == __x._M_node; } 6242: 6242: bool 6242: operator!=(const _Self& __x) const noexcept 6242: { return _M_node != __x._M_node; } 6242: 6242: _Base_ptr _M_node; 6242: }; 6242: 6242: template 6242: struct _Rb_tree_const_iterator 6242: { 6242: typedef _Tp value_type; 6242: typedef const _Tp& reference; 6242: typedef const _Tp* pointer; 6242: 6242: typedef _Rb_tree_iterator<_Tp> iterator; 6242: 6242: typedef bidirectional_iterator_tag iterator_category; 6242: typedef ptrdiff_t difference_type; 6242: 6242: typedef _Rb_tree_const_iterator<_Tp> _Self; 6242: typedef _Rb_tree_node_base::_Const_Base_ptr _Base_ptr; 6242: typedef const _Rb_tree_node<_Tp>* _Link_type; 6242: 6242: _Rb_tree_const_iterator() noexcept 6242: : _M_node() { } 6242: 6242: explicit 6242: _Rb_tree_const_iterator(_Base_ptr __x) noexcept 6242: : _M_node(__x) { } 6242: 6242: _Rb_tree_const_iterator(const iterator& __it) noexcept 6242: : _M_node(__it._M_node) { } 6242: 6242: iterator 6242: _M_const_cast() const noexcept 6242: { return iterator(const_cast(_M_node)); } 6242: 6242: reference 6242: operator*() const noexcept 6242: { return *static_cast<_Link_type>(_M_node)->_M_valptr(); } 6242: 6242: pointer 6242: operator->() const noexcept 6242: { return static_cast<_Link_type>(_M_node)->_M_valptr(); } 6242: 6242: _Self& 6242: operator++() noexcept 6242: { 6242: _M_node = _Rb_tree_increment(_M_node); 6242: return *this; 6242: } 6242: 6242: _Self 6242: operator++(int) noexcept 6242: { 6242: _Self __tmp = *this; 6242: _M_node = _Rb_tree_increment(_M_node); 6242: return __tmp; 6242: } 6242: 6242: _Self& 6242: operator--() noexcept 6242: { 6242: _M_node = _Rb_tree_decrement(_M_node); 6242: return *this; 6242: } 6242: 6242: _Self 6242: operator--(int) noexcept 6242: { 6242: _Self __tmp = *this; 6242: _M_node = _Rb_tree_decrement(_M_node); 6242: return __tmp; 6242: } 6242: 6242: bool 6242: operator==(const _Self& __x) const noexcept 6242: { return _M_node == __x._M_node; } 6242: 6242: bool 6242: operator!=(const _Self& __x) const noexcept 6242: { return _M_node != __x._M_node; } 6242: 6242: _Base_ptr _M_node; 6242: }; 6242: 6242: template 6242: inline bool 6242: operator==(const _Rb_tree_iterator<_Val>& __x, 6242: const _Rb_tree_const_iterator<_Val>& __y) noexcept 6242: { return __x._M_node == __y._M_node; } 6242: 6242: template 6242: inline bool 6242: operator!=(const _Rb_tree_iterator<_Val>& __x, 6242: const _Rb_tree_const_iterator<_Val>& __y) noexcept 6242: { return __x._M_node != __y._M_node; } 6242: 6242: void 6242: _Rb_tree_insert_and_rebalance(const bool __insert_left, 6242: _Rb_tree_node_base* __x, 6242: _Rb_tree_node_base* __p, 6242: _Rb_tree_node_base& __header) throw (); 6242: 6242: _Rb_tree_node_base* 6242: _Rb_tree_rebalance_for_erase(_Rb_tree_node_base* const __z, 6242: _Rb_tree_node_base& __header) throw (); 6242: # 442 "/usr/include/c++/8/bits/stl_tree.h" 3 6242: template > 6242: class _Rb_tree 6242: { 6242: typedef typename __gnu_cxx::__alloc_traits<_Alloc>::template 6242: rebind<_Rb_tree_node<_Val> >::other _Node_allocator; 6242: 6242: typedef __gnu_cxx::__alloc_traits<_Node_allocator> _Alloc_traits; 6242: 6242: 6242: static_assert(__is_invocable<_Compare&, const _Key&, const _Key&>{}, 6242: "comparison object must be invocable with two arguments of key type"); 6242: # 462 "/usr/include/c++/8/bits/stl_tree.h" 3 6242: protected: 6242: typedef _Rb_tree_node_base* _Base_ptr; 6242: typedef const _Rb_tree_node_base* _Const_Base_ptr; 6242: typedef _Rb_tree_node<_Val>* _Link_type; 6242: typedef const _Rb_tree_node<_Val>* _Const_Link_type; 6242: 6242: private: 6242: 6242: 6242: struct _Reuse_or_alloc_node 6242: { 6242: _Reuse_or_alloc_node(_Rb_tree& __t) 6242: : _M_root(__t._M_root()), _M_nodes(__t._M_rightmost()), _M_t(__t) 6242: { 6242: if (_M_root) 6242: { 6242: _M_root->_M_parent = 0; 6242: 6242: if (_M_nodes->_M_left) 6242: _M_nodes = _M_nodes->_M_left; 6242: } 6242: else 6242: _M_nodes = 0; 6242: } 6242: 6242: 6242: _Reuse_or_alloc_node(const _Reuse_or_alloc_node&) = delete; 6242: 6242: 6242: ~_Reuse_or_alloc_node() 6242: { _M_t._M_erase(static_cast<_Link_type>(_M_root)); } 6242: 6242: template 6242: _Link_type 6242: 6242: 6242: 6242: operator()(_Arg&& __arg) 6242: 6242: { 6242: _Link_type __node = static_cast<_Link_type>(_M_extract()); 6242: if (__node) 6242: { 6242: _M_t._M_destroy_node(__node); 6242: _M_t._M_construct_node(__node, std::forward<_Arg>(__arg)); 6242: return __node; 6242: } 6242: 6242: return _M_t._M_create_node(std::forward<_Arg>(__arg)); 6242: } 6242: 6242: private: 6242: _Base_ptr 6242: _M_extract() 6242: { 6242: if (!_M_nodes) 6242: return _M_nodes; 6242: 6242: _Base_ptr __node = _M_nodes; 6242: _M_nodes = _M_nodes->_M_parent; 6242: if (_M_nodes) 6242: { 6242: if (_M_nodes->_M_right == __node) 6242: { 6242: _M_nodes->_M_right = 0; 6242: 6242: if (_M_nodes->_M_left) 6242: { 6242: _M_nodes = _M_nodes->_M_left; 6242: 6242: while (_M_nodes->_M_right) 6242: _M_nodes = _M_nodes->_M_right; 6242: 6242: if (_M_nodes->_M_left) 6242: _M_nodes = _M_nodes->_M_left; 6242: } 6242: } 6242: else 6242: _M_nodes->_M_left = 0; 6242: } 6242: else 6242: _M_root = 0; 6242: 6242: return __node; 6242: } 6242: 6242: _Base_ptr _M_root; 6242: _Base_ptr _M_nodes; 6242: _Rb_tree& _M_t; 6242: }; 6242: 6242: 6242: 6242: struct _Alloc_node 6242: { 6242: _Alloc_node(_Rb_tree& __t) 6242: : _M_t(__t) { } 6242: 6242: template 6242: _Link_type 6242: 6242: 6242: 6242: operator()(_Arg&& __arg) const 6242: 6242: { return _M_t._M_create_node(std::forward<_Arg>(__arg)); } 6242: 6242: private: 6242: _Rb_tree& _M_t; 6242: }; 6242: 6242: public: 6242: typedef _Key key_type; 6242: typedef _Val value_type; 6242: typedef value_type* pointer; 6242: typedef const value_type* const_pointer; 6242: typedef value_type& reference; 6242: typedef const value_type& const_reference; 6242: typedef size_t size_type; 6242: typedef ptrdiff_t difference_type; 6242: typedef _Alloc allocator_type; 6242: 6242: _Node_allocator& 6242: _M_get_Node_allocator() noexcept 6242: { return this->_M_impl; } 6242: 6242: const _Node_allocator& 6242: _M_get_Node_allocator() const noexcept 6242: { return this->_M_impl; } 6242: 6242: allocator_type 6242: get_allocator() const noexcept 6242: { return allocator_type(_M_get_Node_allocator()); } 6242: 6242: protected: 6242: _Link_type 6242: _M_get_node() 6242: { return _Alloc_traits::allocate(_M_get_Node_allocator(), 1); } 6242: 6242: void 6242: _M_put_node(_Link_type __p) noexcept 6242: { _Alloc_traits::deallocate(_M_get_Node_allocator(), __p, 1); } 6242: # 630 "/usr/include/c++/8/bits/stl_tree.h" 3 6242: template 6242: void 6242: _M_construct_node(_Link_type __node, _Args&&... __args) 6242: { 6242: try 6242: { 6242: ::new(__node) _Rb_tree_node<_Val>; 6242: _Alloc_traits::construct(_M_get_Node_allocator(), 6242: __node->_M_valptr(), 6242: std::forward<_Args>(__args)...); 6242: } 6242: catch(...) 6242: { 6242: __node->~_Rb_tree_node<_Val>(); 6242: _M_put_node(__node); 6242: throw; 6242: } 6242: } 6242: 6242: template 6242: _Link_type 6242: _M_create_node(_Args&&... __args) 6242: { 6242: _Link_type __tmp = _M_get_node(); 6242: _M_construct_node(__tmp, std::forward<_Args>(__args)...); 6242: return __tmp; 6242: } 6242: 6242: void 6242: _M_destroy_node(_Link_type __p) noexcept 6242: { 6242: _Alloc_traits::destroy(_M_get_Node_allocator(), __p->_M_valptr()); 6242: __p->~_Rb_tree_node<_Val>(); 6242: } 6242: 6242: 6242: void 6242: _M_drop_node(_Link_type __p) noexcept 6242: { 6242: _M_destroy_node(__p); 6242: _M_put_node(__p); 6242: } 6242: 6242: template 6242: _Link_type 6242: _M_clone_node(_Const_Link_type __x, _NodeGen& __node_gen) 6242: { 6242: _Link_type __tmp = __node_gen(*__x->_M_valptr()); 6242: __tmp->_M_color = __x->_M_color; 6242: __tmp->_M_left = 0; 6242: __tmp->_M_right = 0; 6242: return __tmp; 6242: } 6242: 6242: protected: 6242: 6242: 6242: 6242: 6242: template 6242: 6242: struct _Rb_tree_impl 6242: : public _Node_allocator 6242: , public _Rb_tree_key_compare<_Key_compare> 6242: , public _Rb_tree_header 6242: { 6242: typedef _Rb_tree_key_compare<_Key_compare> _Base_key_compare; 6242: 6242: _Rb_tree_impl() 6242: noexcept(is_nothrow_default_constructible<_Node_allocator>::value && is_nothrow_default_constructible<_Base_key_compare>::value) 6242: 6242: 6242: : _Node_allocator() 6242: { } 6242: 6242: _Rb_tree_impl(const _Rb_tree_impl& __x) 6242: : _Node_allocator(_Alloc_traits::_S_select_on_copy(__x)) 6242: , _Base_key_compare(__x._M_key_compare) 6242: { } 6242: 6242: 6242: 6242: 6242: 6242: 6242: _Rb_tree_impl(_Rb_tree_impl&&) = default; 6242: 6242: _Rb_tree_impl(const _Key_compare& __comp, _Node_allocator&& __a) 6242: : _Node_allocator(std::move(__a)), _Base_key_compare(__comp) 6242: { } 6242: 6242: }; 6242: 6242: _Rb_tree_impl<_Compare> _M_impl; 6242: 6242: protected: 6242: _Base_ptr& 6242: _M_root() noexcept 6242: { return this->_M_impl._M_header._M_parent; } 6242: 6242: _Const_Base_ptr 6242: _M_root() const noexcept 6242: { return this->_M_impl._M_header._M_parent; } 6242: 6242: _Base_ptr& 6242: _M_leftmost() noexcept 6242: { return this->_M_impl._M_header._M_left; } 6242: 6242: _Const_Base_ptr 6242: _M_leftmost() const noexcept 6242: { return this->_M_impl._M_header._M_left; } 6242: 6242: _Base_ptr& 6242: _M_rightmost() noexcept 6242: { return this->_M_impl._M_header._M_right; } 6242: 6242: _Const_Base_ptr 6242: _M_rightmost() const noexcept 6242: { return this->_M_impl._M_header._M_right; } 6242: 6242: _Link_type 6242: _M_begin() noexcept 6242: { return static_cast<_Link_type>(this->_M_impl._M_header._M_parent); } 6242: 6242: _Const_Link_type 6242: _M_begin() const noexcept 6242: { 6242: return static_cast<_Const_Link_type> 6242: (this->_M_impl._M_header._M_parent); 6242: } 6242: 6242: _Base_ptr 6242: _M_end() noexcept 6242: { return &this->_M_impl._M_header; } 6242: 6242: _Const_Base_ptr 6242: _M_end() const noexcept 6242: { return &this->_M_impl._M_header; } 6242: 6242: static const_reference 6242: _S_value(_Const_Link_type __x) 6242: { return *__x->_M_valptr(); } 6242: 6242: static const _Key& 6242: _S_key(_Const_Link_type __x) 6242: { return _KeyOfValue()(_S_value(__x)); } 6242: 6242: static _Link_type 6242: _S_left(_Base_ptr __x) noexcept 6242: { return static_cast<_Link_type>(__x->_M_left); } 6242: 6242: static _Const_Link_type 6242: _S_left(_Const_Base_ptr __x) noexcept 6242: { return static_cast<_Const_Link_type>(__x->_M_left); } 6242: 6242: static _Link_type 6242: _S_right(_Base_ptr __x) noexcept 6242: { return static_cast<_Link_type>(__x->_M_right); } 6242: 6242: static _Const_Link_type 6242: _S_right(_Const_Base_ptr __x) noexcept 6242: { return static_cast<_Const_Link_type>(__x->_M_right); } 6242: 6242: static const_reference 6242: _S_value(_Const_Base_ptr __x) 6242: { return *static_cast<_Const_Link_type>(__x)->_M_valptr(); } 6242: 6242: static const _Key& 6242: _S_key(_Const_Base_ptr __x) 6242: { return _KeyOfValue()(_S_value(__x)); } 6242: 6242: static _Base_ptr 6242: _S_minimum(_Base_ptr __x) noexcept 6242: { return _Rb_tree_node_base::_S_minimum(__x); } 6242: 6242: static _Const_Base_ptr 6242: _S_minimum(_Const_Base_ptr __x) noexcept 6242: { return _Rb_tree_node_base::_S_minimum(__x); } 6242: 6242: static _Base_ptr 6242: _S_maximum(_Base_ptr __x) noexcept 6242: { return _Rb_tree_node_base::_S_maximum(__x); } 6242: 6242: static _Const_Base_ptr 6242: _S_maximum(_Const_Base_ptr __x) noexcept 6242: { return _Rb_tree_node_base::_S_maximum(__x); } 6242: 6242: public: 6242: typedef _Rb_tree_iterator iterator; 6242: typedef _Rb_tree_const_iterator const_iterator; 6242: 6242: typedef std::reverse_iterator reverse_iterator; 6242: typedef std::reverse_iterator const_reverse_iterator; 6242: # 832 "/usr/include/c++/8/bits/stl_tree.h" 3 6242: pair<_Base_ptr, _Base_ptr> 6242: _M_get_insert_unique_pos(const key_type& __k); 6242: 6242: pair<_Base_ptr, _Base_ptr> 6242: _M_get_insert_equal_pos(const key_type& __k); 6242: 6242: pair<_Base_ptr, _Base_ptr> 6242: _M_get_insert_hint_unique_pos(const_iterator __pos, 6242: const key_type& __k); 6242: 6242: pair<_Base_ptr, _Base_ptr> 6242: _M_get_insert_hint_equal_pos(const_iterator __pos, 6242: const key_type& __k); 6242: 6242: private: 6242: 6242: template 6242: iterator 6242: _M_insert_(_Base_ptr __x, _Base_ptr __y, _Arg&& __v, _NodeGen&); 6242: 6242: iterator 6242: _M_insert_node(_Base_ptr __x, _Base_ptr __y, _Link_type __z); 6242: 6242: template 6242: iterator 6242: _M_insert_lower(_Base_ptr __y, _Arg&& __v); 6242: 6242: template 6242: iterator 6242: _M_insert_equal_lower(_Arg&& __x); 6242: 6242: iterator 6242: _M_insert_lower_node(_Base_ptr __p, _Link_type __z); 6242: 6242: iterator 6242: _M_insert_equal_lower_node(_Link_type __z); 6242: # 883 "/usr/include/c++/8/bits/stl_tree.h" 3 6242: template 6242: _Link_type 6242: _M_copy(_Const_Link_type __x, _Base_ptr __p, _NodeGen&); 6242: 6242: template 6242: _Link_type 6242: _M_copy(const _Rb_tree& __x, _NodeGen& __gen) 6242: { 6242: _Link_type __root = _M_copy(__x._M_begin(), _M_end(), __gen); 6242: _M_leftmost() = _S_minimum(__root); 6242: _M_rightmost() = _S_maximum(__root); 6242: _M_impl._M_node_count = __x._M_impl._M_node_count; 6242: return __root; 6242: } 6242: 6242: _Link_type 6242: _M_copy(const _Rb_tree& __x) 6242: { 6242: _Alloc_node __an(*this); 6242: return _M_copy(__x, __an); 6242: } 6242: 6242: void 6242: _M_erase(_Link_type __x); 6242: 6242: iterator 6242: _M_lower_bound(_Link_type __x, _Base_ptr __y, 6242: const _Key& __k); 6242: 6242: const_iterator 6242: _M_lower_bound(_Const_Link_type __x, _Const_Base_ptr __y, 6242: const _Key& __k) const; 6242: 6242: iterator 6242: _M_upper_bound(_Link_type __x, _Base_ptr __y, 6242: const _Key& __k); 6242: 6242: const_iterator 6242: _M_upper_bound(_Const_Link_type __x, _Const_Base_ptr __y, 6242: const _Key& __k) const; 6242: 6242: public: 6242: 6242: 6242: 6242: 6242: _Rb_tree() = default; 6242: 6242: 6242: _Rb_tree(const _Compare& __comp, 6242: const allocator_type& __a = allocator_type()) 6242: : _M_impl(__comp, _Node_allocator(__a)) { } 6242: 6242: _Rb_tree(const _Rb_tree& __x) 6242: : _M_impl(__x._M_impl) 6242: { 6242: if (__x._M_root() != 0) 6242: _M_root() = _M_copy(__x); 6242: } 6242: 6242: 6242: _Rb_tree(const allocator_type& __a) 6242: : _M_impl(_Compare(), _Node_allocator(__a)) 6242: { } 6242: 6242: _Rb_tree(const _Rb_tree& __x, const allocator_type& __a) 6242: : _M_impl(__x._M_impl._M_key_compare, _Node_allocator(__a)) 6242: { 6242: if (__x._M_root() != nullptr) 6242: _M_root() = _M_copy(__x); 6242: } 6242: 6242: _Rb_tree(_Rb_tree&&) = default; 6242: 6242: _Rb_tree(_Rb_tree&& __x, const allocator_type& __a) 6242: : _Rb_tree(std::move(__x), _Node_allocator(__a)) 6242: { } 6242: 6242: _Rb_tree(_Rb_tree&& __x, _Node_allocator&& __a); 6242: 6242: 6242: ~_Rb_tree() noexcept 6242: { _M_erase(_M_begin()); } 6242: 6242: _Rb_tree& 6242: operator=(const _Rb_tree& __x); 6242: 6242: 6242: _Compare 6242: key_comp() const 6242: { return _M_impl._M_key_compare; } 6242: 6242: iterator 6242: begin() noexcept 6242: { return iterator(this->_M_impl._M_header._M_left); } 6242: 6242: const_iterator 6242: begin() const noexcept 6242: { return const_iterator(this->_M_impl._M_header._M_left); } 6242: 6242: iterator 6242: end() noexcept 6242: { return iterator(&this->_M_impl._M_header); } 6242: 6242: const_iterator 6242: end() const noexcept 6242: { return const_iterator(&this->_M_impl._M_header); } 6242: 6242: reverse_iterator 6242: rbegin() noexcept 6242: { return reverse_iterator(end()); } 6242: 6242: const_reverse_iterator 6242: rbegin() const noexcept 6242: { return const_reverse_iterator(end()); } 6242: 6242: reverse_iterator 6242: rend() noexcept 6242: { return reverse_iterator(begin()); } 6242: 6242: const_reverse_iterator 6242: rend() const noexcept 6242: { return const_reverse_iterator(begin()); } 6242: 6242: bool 6242: empty() const noexcept 6242: { return _M_impl._M_node_count == 0; } 6242: 6242: size_type 6242: size() const noexcept 6242: { return _M_impl._M_node_count; } 6242: 6242: size_type 6242: max_size() const noexcept 6242: { return _Alloc_traits::max_size(_M_get_Node_allocator()); } 6242: 6242: void 6242: swap(_Rb_tree& __t) 6242: noexcept(__is_nothrow_swappable<_Compare>::value); 6242: 6242: 6242: 6242: template 6242: pair 6242: _M_insert_unique(_Arg&& __x); 6242: 6242: template 6242: iterator 6242: _M_insert_equal(_Arg&& __x); 6242: 6242: template 6242: iterator 6242: _M_insert_unique_(const_iterator __pos, _Arg&& __x, _NodeGen&); 6242: 6242: template 6242: iterator 6242: _M_insert_unique_(const_iterator __pos, _Arg&& __x) 6242: { 6242: _Alloc_node __an(*this); 6242: return _M_insert_unique_(__pos, std::forward<_Arg>(__x), __an); 6242: } 6242: 6242: template 6242: iterator 6242: _M_insert_equal_(const_iterator __pos, _Arg&& __x, _NodeGen&); 6242: 6242: template 6242: iterator 6242: _M_insert_equal_(const_iterator __pos, _Arg&& __x) 6242: { 6242: _Alloc_node __an(*this); 6242: return _M_insert_equal_(__pos, std::forward<_Arg>(__x), __an); 6242: } 6242: 6242: template 6242: pair 6242: _M_emplace_unique(_Args&&... __args); 6242: 6242: template 6242: iterator 6242: _M_emplace_equal(_Args&&... __args); 6242: 6242: template 6242: iterator 6242: _M_emplace_hint_unique(const_iterator __pos, _Args&&... __args); 6242: 6242: template 6242: iterator 6242: _M_emplace_hint_equal(const_iterator __pos, _Args&&... __args); 6242: # 1103 "/usr/include/c++/8/bits/stl_tree.h" 3 6242: template 6242: void 6242: _M_insert_unique(_InputIterator __first, _InputIterator __last); 6242: 6242: template 6242: void 6242: _M_insert_equal(_InputIterator __first, _InputIterator __last); 6242: 6242: private: 6242: void 6242: _M_erase_aux(const_iterator __position); 6242: 6242: void 6242: _M_erase_aux(const_iterator __first, const_iterator __last); 6242: 6242: public: 6242: 6242: 6242: 6242: __attribute ((__abi_tag__ ("cxx11"))) 6242: iterator 6242: erase(const_iterator __position) 6242: { 6242: ; 6242: const_iterator __result = __position; 6242: ++__result; 6242: _M_erase_aux(__position); 6242: return __result._M_const_cast(); 6242: } 6242: 6242: 6242: __attribute ((__abi_tag__ ("cxx11"))) 6242: iterator 6242: erase(iterator __position) 6242: { 6242: ; 6242: iterator __result = __position; 6242: ++__result; 6242: _M_erase_aux(__position); 6242: return __result; 6242: } 6242: # 1159 "/usr/include/c++/8/bits/stl_tree.h" 3 6242: size_type 6242: erase(const key_type& __x); 6242: 6242: 6242: 6242: 6242: __attribute ((__abi_tag__ ("cxx11"))) 6242: iterator 6242: erase(const_iterator __first, const_iterator __last) 6242: { 6242: _M_erase_aux(__first, __last); 6242: return __last._M_const_cast(); 6242: } 6242: # 1181 "/usr/include/c++/8/bits/stl_tree.h" 3 6242: void 6242: erase(const key_type* __first, const key_type* __last); 6242: 6242: void 6242: clear() noexcept 6242: { 6242: _M_erase(_M_begin()); 6242: _M_impl._M_reset(); 6242: } 6242: 6242: 6242: iterator 6242: find(const key_type& __k); 6242: 6242: const_iterator 6242: find(const key_type& __k) const; 6242: 6242: size_type 6242: count(const key_type& __k) const; 6242: 6242: iterator 6242: lower_bound(const key_type& __k) 6242: { return _M_lower_bound(_M_begin(), _M_end(), __k); } 6242: 6242: const_iterator 6242: lower_bound(const key_type& __k) const 6242: { return _M_lower_bound(_M_begin(), _M_end(), __k); } 6242: 6242: iterator 6242: upper_bound(const key_type& __k) 6242: { return _M_upper_bound(_M_begin(), _M_end(), __k); } 6242: 6242: const_iterator 6242: upper_bound(const key_type& __k) const 6242: { return _M_upper_bound(_M_begin(), _M_end(), __k); } 6242: 6242: pair 6242: equal_range(const key_type& __k); 6242: 6242: pair 6242: equal_range(const key_type& __k) const; 6242: # 1341 "/usr/include/c++/8/bits/stl_tree.h" 3 6242: bool 6242: __rb_verify() const; 6242: 6242: 6242: _Rb_tree& 6242: operator=(_Rb_tree&&) 6242: noexcept(_Alloc_traits::_S_nothrow_move() 6242: && is_nothrow_move_assignable<_Compare>::value); 6242: 6242: template 6242: void 6242: _M_assign_unique(_Iterator, _Iterator); 6242: 6242: template 6242: void 6242: _M_assign_equal(_Iterator, _Iterator); 6242: 6242: private: 6242: 6242: void 6242: _M_move_data(_Rb_tree& __x, std::true_type) 6242: { _M_impl._M_move_data(__x._M_impl); } 6242: 6242: 6242: 6242: void 6242: _M_move_data(_Rb_tree&, std::false_type); 6242: 6242: 6242: void 6242: _M_move_assign(_Rb_tree&, std::true_type); 6242: 6242: 6242: 6242: void 6242: _M_move_assign(_Rb_tree&, std::false_type); 6242: # 1544 "/usr/include/c++/8/bits/stl_tree.h" 3 6242: }; 6242: 6242: template 6242: inline bool 6242: operator==(const _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __x, 6242: const _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __y) 6242: { 6242: return __x.size() == __y.size() 6242: && std::equal(__x.begin(), __x.end(), __y.begin()); 6242: } 6242: 6242: template 6242: inline bool 6242: operator<(const _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __x, 6242: const _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __y) 6242: { 6242: return std::lexicographical_compare(__x.begin(), __x.end(), 6242: __y.begin(), __y.end()); 6242: } 6242: 6242: template 6242: inline bool 6242: operator!=(const _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __x, 6242: const _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __y) 6242: { return !(__x == __y); } 6242: 6242: template 6242: inline bool 6242: operator>(const _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __x, 6242: const _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __y) 6242: { return __y < __x; } 6242: 6242: template 6242: inline bool 6242: operator<=(const _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __x, 6242: const _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __y) 6242: { return !(__y < __x); } 6242: 6242: template 6242: inline bool 6242: operator>=(const _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __x, 6242: const _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __y) 6242: { return !(__x < __y); } 6242: 6242: template 6242: inline void 6242: swap(_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __x, 6242: _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __y) 6242: { __x.swap(__y); } 6242: 6242: 6242: template 6242: _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: 6242: _Rb_tree(_Rb_tree&& __x, _Node_allocator&& __a) 6242: : _M_impl(__x._M_impl._M_key_compare, std::move(__a)) 6242: { 6242: using __eq = typename _Alloc_traits::is_always_equal; 6242: if (__x._M_root() != nullptr) 6242: _M_move_data(__x, __eq()); 6242: } 6242: 6242: template 6242: void 6242: _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: 6242: _M_move_data(_Rb_tree& __x, std::false_type) 6242: { 6242: if (_M_get_Node_allocator() == __x._M_get_Node_allocator()) 6242: _M_move_data(__x, std::true_type()); 6242: else 6242: { 6242: _Alloc_node __an(*this); 6242: auto __lbd = 6242: [&__an](const value_type& __cval) 6242: { 6242: auto& __val = const_cast(__cval); 6242: return __an(std::move_if_noexcept(__val)); 6242: }; 6242: _M_root() = _M_copy(__x, __lbd); 6242: } 6242: } 6242: 6242: template 6242: inline void 6242: _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: 6242: _M_move_assign(_Rb_tree& __x, true_type) 6242: { 6242: clear(); 6242: if (__x._M_root() != nullptr) 6242: _M_move_data(__x, std::true_type()); 6242: std::__alloc_on_move(_M_get_Node_allocator(), 6242: __x._M_get_Node_allocator()); 6242: } 6242: 6242: template 6242: void 6242: _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: 6242: _M_move_assign(_Rb_tree& __x, false_type) 6242: { 6242: if (_M_get_Node_allocator() == __x._M_get_Node_allocator()) 6242: return _M_move_assign(__x, true_type{}); 6242: 6242: 6242: 6242: _Reuse_or_alloc_node __roan(*this); 6242: _M_impl._M_reset(); 6242: if (__x._M_root() != nullptr) 6242: { 6242: auto __lbd = 6242: [&__roan](const value_type& __cval) 6242: { 6242: auto& __val = const_cast(__cval); 6242: return __roan(std::move_if_noexcept(__val)); 6242: }; 6242: _M_root() = _M_copy(__x, __lbd); 6242: __x.clear(); 6242: } 6242: } 6242: 6242: template 6242: inline _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& 6242: _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: 6242: operator=(_Rb_tree&& __x) 6242: noexcept(_Alloc_traits::_S_nothrow_move() 6242: && is_nothrow_move_assignable<_Compare>::value) 6242: { 6242: _M_impl._M_key_compare = std::move(__x._M_impl._M_key_compare); 6242: _M_move_assign(__x, __bool_constant<_Alloc_traits::_S_nothrow_move()>()); 6242: return *this; 6242: } 6242: 6242: template 6242: template 6242: void 6242: _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: 6242: _M_assign_unique(_Iterator __first, _Iterator __last) 6242: { 6242: _Reuse_or_alloc_node __roan(*this); 6242: _M_impl._M_reset(); 6242: for (; __first != __last; ++__first) 6242: _M_insert_unique_(end(), *__first, __roan); 6242: } 6242: 6242: template 6242: template 6242: void 6242: _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: 6242: _M_assign_equal(_Iterator __first, _Iterator __last) 6242: { 6242: _Reuse_or_alloc_node __roan(*this); 6242: _M_impl._M_reset(); 6242: for (; __first != __last; ++__first) 6242: _M_insert_equal_(end(), *__first, __roan); 6242: } 6242: 6242: 6242: template 6242: _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& 6242: _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: 6242: operator=(const _Rb_tree& __x) 6242: { 6242: if (this != &__x) 6242: { 6242: 6242: 6242: if (_Alloc_traits::_S_propagate_on_copy_assign()) 6242: { 6242: auto& __this_alloc = this->_M_get_Node_allocator(); 6242: auto& __that_alloc = __x._M_get_Node_allocator(); 6242: if (!_Alloc_traits::_S_always_equal() 6242: && __this_alloc != __that_alloc) 6242: { 6242: 6242: 6242: clear(); 6242: std::__alloc_on_copy(__this_alloc, __that_alloc); 6242: } 6242: } 6242: 6242: 6242: _Reuse_or_alloc_node __roan(*this); 6242: _M_impl._M_reset(); 6242: _M_impl._M_key_compare = __x._M_impl._M_key_compare; 6242: if (__x._M_root() != 0) 6242: _M_root() = _M_copy(__x, __roan); 6242: } 6242: 6242: return *this; 6242: } 6242: 6242: template 6242: 6242: template 6242: 6242: 6242: 6242: typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator 6242: _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: 6242: _M_insert_(_Base_ptr __x, _Base_ptr __p, 6242: 6242: _Arg&& __v, 6242: 6242: 6242: 6242: _NodeGen& __node_gen) 6242: { 6242: bool __insert_left = (__x != 0 || __p == _M_end() 6242: || _M_impl._M_key_compare(_KeyOfValue()(__v), 6242: _S_key(__p))); 6242: 6242: _Link_type __z = __node_gen(std::forward<_Arg>(__v)); 6242: 6242: _Rb_tree_insert_and_rebalance(__insert_left, __z, __p, 6242: this->_M_impl._M_header); 6242: ++_M_impl._M_node_count; 6242: return iterator(__z); 6242: } 6242: 6242: template 6242: 6242: template 6242: 6242: typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator 6242: _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: 6242: 6242: _M_insert_lower(_Base_ptr __p, _Arg&& __v) 6242: 6242: 6242: 6242: { 6242: bool __insert_left = (__p == _M_end() 6242: || !_M_impl._M_key_compare(_S_key(__p), 6242: _KeyOfValue()(__v))); 6242: 6242: _Link_type __z = _M_create_node(std::forward<_Arg>(__v)); 6242: 6242: _Rb_tree_insert_and_rebalance(__insert_left, __z, __p, 6242: this->_M_impl._M_header); 6242: ++_M_impl._M_node_count; 6242: return iterator(__z); 6242: } 6242: 6242: template 6242: 6242: template 6242: 6242: typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator 6242: _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: 6242: 6242: _M_insert_equal_lower(_Arg&& __v) 6242: 6242: 6242: 6242: { 6242: _Link_type __x = _M_begin(); 6242: _Base_ptr __y = _M_end(); 6242: while (__x != 0) 6242: { 6242: __y = __x; 6242: __x = !_M_impl._M_key_compare(_S_key(__x), _KeyOfValue()(__v)) ? 6242: _S_left(__x) : _S_right(__x); 6242: } 6242: return _M_insert_lower(__y, std::forward<_Arg>(__v)); 6242: } 6242: 6242: template 6242: template 6242: typename _Rb_tree<_Key, _Val, _KoV, _Compare, _Alloc>::_Link_type 6242: _Rb_tree<_Key, _Val, _KoV, _Compare, _Alloc>:: 6242: _M_copy(_Const_Link_type __x, _Base_ptr __p, _NodeGen& __node_gen) 6242: { 6242: 6242: _Link_type __top = _M_clone_node(__x, __node_gen); 6242: __top->_M_parent = __p; 6242: 6242: try 6242: { 6242: if (__x->_M_right) 6242: __top->_M_right = _M_copy(_S_right(__x), __top, __node_gen); 6242: __p = __top; 6242: __x = _S_left(__x); 6242: 6242: while (__x != 0) 6242: { 6242: _Link_type __y = _M_clone_node(__x, __node_gen); 6242: __p->_M_left = __y; 6242: __y->_M_parent = __p; 6242: if (__x->_M_right) 6242: __y->_M_right = _M_copy(_S_right(__x), __y, __node_gen); 6242: __p = __y; 6242: __x = _S_left(__x); 6242: } 6242: } 6242: catch(...) 6242: { 6242: _M_erase(__top); 6242: throw; 6242: } 6242: return __top; 6242: } 6242: 6242: template 6242: void 6242: _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: 6242: _M_erase(_Link_type __x) 6242: { 6242: 6242: while (__x != 0) 6242: { 6242: _M_erase(_S_right(__x)); 6242: _Link_type __y = _S_left(__x); 6242: _M_drop_node(__x); 6242: __x = __y; 6242: } 6242: } 6242: 6242: template 6242: typename _Rb_tree<_Key, _Val, _KeyOfValue, 6242: _Compare, _Alloc>::iterator 6242: _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: 6242: _M_lower_bound(_Link_type __x, _Base_ptr __y, 6242: const _Key& __k) 6242: { 6242: while (__x != 0) 6242: if (!_M_impl._M_key_compare(_S_key(__x), __k)) 6242: __y = __x, __x = _S_left(__x); 6242: else 6242: __x = _S_right(__x); 6242: return iterator(__y); 6242: } 6242: 6242: template 6242: typename _Rb_tree<_Key, _Val, _KeyOfValue, 6242: _Compare, _Alloc>::const_iterator 6242: _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: 6242: _M_lower_bound(_Const_Link_type __x, _Const_Base_ptr __y, 6242: const _Key& __k) const 6242: { 6242: while (__x != 0) 6242: if (!_M_impl._M_key_compare(_S_key(__x), __k)) 6242: __y = __x, __x = _S_left(__x); 6242: else 6242: __x = _S_right(__x); 6242: return const_iterator(__y); 6242: } 6242: 6242: template 6242: typename _Rb_tree<_Key, _Val, _KeyOfValue, 6242: _Compare, _Alloc>::iterator 6242: _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: 6242: _M_upper_bound(_Link_type __x, _Base_ptr __y, 6242: const _Key& __k) 6242: { 6242: while (__x != 0) 6242: if (_M_impl._M_key_compare(__k, _S_key(__x))) 6242: __y = __x, __x = _S_left(__x); 6242: else 6242: __x = _S_right(__x); 6242: return iterator(__y); 6242: } 6242: 6242: template 6242: typename _Rb_tree<_Key, _Val, _KeyOfValue, 6242: _Compare, _Alloc>::const_iterator 6242: _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: 6242: _M_upper_bound(_Const_Link_type __x, _Const_Base_ptr __y, 6242: const _Key& __k) const 6242: { 6242: while (__x != 0) 6242: if (_M_impl._M_key_compare(__k, _S_key(__x))) 6242: __y = __x, __x = _S_left(__x); 6242: else 6242: __x = _S_right(__x); 6242: return const_iterator(__y); 6242: } 6242: 6242: template 6242: pair::iterator, 6242: typename _Rb_tree<_Key, _Val, _KeyOfValue, 6242: _Compare, _Alloc>::iterator> 6242: _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: 6242: equal_range(const _Key& __k) 6242: { 6242: _Link_type __x = _M_begin(); 6242: _Base_ptr __y = _M_end(); 6242: while (__x != 0) 6242: { 6242: if (_M_impl._M_key_compare(_S_key(__x), __k)) 6242: __x = _S_right(__x); 6242: else if (_M_impl._M_key_compare(__k, _S_key(__x))) 6242: __y = __x, __x = _S_left(__x); 6242: else 6242: { 6242: _Link_type __xu(__x); 6242: _Base_ptr __yu(__y); 6242: __y = __x, __x = _S_left(__x); 6242: __xu = _S_right(__xu); 6242: return pair(_M_lower_bound(__x, __y, __k), 6242: _M_upper_bound(__xu, __yu, __k)); 6242: } 6242: } 6242: return pair(iterator(__y), 6242: iterator(__y)); 6242: } 6242: 6242: template 6242: pair::const_iterator, 6242: typename _Rb_tree<_Key, _Val, _KeyOfValue, 6242: _Compare, _Alloc>::const_iterator> 6242: _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: 6242: equal_range(const _Key& __k) const 6242: { 6242: _Const_Link_type __x = _M_begin(); 6242: _Const_Base_ptr __y = _M_end(); 6242: while (__x != 0) 6242: { 6242: if (_M_impl._M_key_compare(_S_key(__x), __k)) 6242: __x = _S_right(__x); 6242: else if (_M_impl._M_key_compare(__k, _S_key(__x))) 6242: __y = __x, __x = _S_left(__x); 6242: else 6242: { 6242: _Const_Link_type __xu(__x); 6242: _Const_Base_ptr __yu(__y); 6242: __y = __x, __x = _S_left(__x); 6242: __xu = _S_right(__xu); 6242: return pair(_M_lower_bound(__x, __y, __k), 6242: _M_upper_bound(__xu, __yu, __k)); 6242: } 6242: } 6242: return pair(const_iterator(__y), 6242: const_iterator(__y)); 6242: } 6242: 6242: template 6242: void 6242: _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: 6242: swap(_Rb_tree& __t) 6242: noexcept(__is_nothrow_swappable<_Compare>::value) 6242: { 6242: if (_M_root() == 0) 6242: { 6242: if (__t._M_root() != 0) 6242: _M_impl._M_move_data(__t._M_impl); 6242: } 6242: else if (__t._M_root() == 0) 6242: __t._M_impl._M_move_data(_M_impl); 6242: else 6242: { 6242: std::swap(_M_root(),__t._M_root()); 6242: std::swap(_M_leftmost(),__t._M_leftmost()); 6242: std::swap(_M_rightmost(),__t._M_rightmost()); 6242: 6242: _M_root()->_M_parent = _M_end(); 6242: __t._M_root()->_M_parent = __t._M_end(); 6242: std::swap(this->_M_impl._M_node_count, __t._M_impl._M_node_count); 6242: } 6242: 6242: std::swap(this->_M_impl._M_key_compare, __t._M_impl._M_key_compare); 6242: 6242: _Alloc_traits::_S_on_swap(_M_get_Node_allocator(), 6242: __t._M_get_Node_allocator()); 6242: } 6242: 6242: template 6242: pair::_Base_ptr, 6242: typename _Rb_tree<_Key, _Val, _KeyOfValue, 6242: _Compare, _Alloc>::_Base_ptr> 6242: _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: 6242: _M_get_insert_unique_pos(const key_type& __k) 6242: { 6242: typedef pair<_Base_ptr, _Base_ptr> _Res; 6242: _Link_type __x = _M_begin(); 6242: _Base_ptr __y = _M_end(); 6242: bool __comp = true; 6242: while (__x != 0) 6242: { 6242: __y = __x; 6242: __comp = _M_impl._M_key_compare(__k, _S_key(__x)); 6242: __x = __comp ? _S_left(__x) : _S_right(__x); 6242: } 6242: iterator __j = iterator(__y); 6242: if (__comp) 6242: { 6242: if (__j == begin()) 6242: return _Res(__x, __y); 6242: else 6242: --__j; 6242: } 6242: if (_M_impl._M_key_compare(_S_key(__j._M_node), __k)) 6242: return _Res(__x, __y); 6242: return _Res(__j._M_node, 0); 6242: } 6242: 6242: template 6242: pair::_Base_ptr, 6242: typename _Rb_tree<_Key, _Val, _KeyOfValue, 6242: _Compare, _Alloc>::_Base_ptr> 6242: _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: 6242: _M_get_insert_equal_pos(const key_type& __k) 6242: { 6242: typedef pair<_Base_ptr, _Base_ptr> _Res; 6242: _Link_type __x = _M_begin(); 6242: _Base_ptr __y = _M_end(); 6242: while (__x != 0) 6242: { 6242: __y = __x; 6242: __x = _M_impl._M_key_compare(__k, _S_key(__x)) ? 6242: _S_left(__x) : _S_right(__x); 6242: } 6242: return _Res(__x, __y); 6242: } 6242: 6242: template 6242: 6242: template 6242: 6242: pair::iterator, bool> 6242: _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: 6242: 6242: _M_insert_unique(_Arg&& __v) 6242: 6242: 6242: 6242: { 6242: typedef pair _Res; 6242: pair<_Base_ptr, _Base_ptr> __res 6242: = _M_get_insert_unique_pos(_KeyOfValue()(__v)); 6242: 6242: if (__res.second) 6242: { 6242: _Alloc_node __an(*this); 6242: return _Res(_M_insert_(__res.first, __res.second, 6242: std::forward<_Arg>(__v), __an), 6242: true); 6242: } 6242: 6242: return _Res(iterator(__res.first), false); 6242: } 6242: 6242: template 6242: 6242: template 6242: 6242: typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator 6242: _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: 6242: 6242: _M_insert_equal(_Arg&& __v) 6242: 6242: 6242: 6242: { 6242: pair<_Base_ptr, _Base_ptr> __res 6242: = _M_get_insert_equal_pos(_KeyOfValue()(__v)); 6242: _Alloc_node __an(*this); 6242: return _M_insert_(__res.first, __res.second, 6242: std::forward<_Arg>(__v), __an); 6242: } 6242: 6242: template 6242: pair::_Base_ptr, 6242: typename _Rb_tree<_Key, _Val, _KeyOfValue, 6242: _Compare, _Alloc>::_Base_ptr> 6242: _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: 6242: _M_get_insert_hint_unique_pos(const_iterator __position, 6242: const key_type& __k) 6242: { 6242: iterator __pos = __position._M_const_cast(); 6242: typedef pair<_Base_ptr, _Base_ptr> _Res; 6242: 6242: 6242: if (__pos._M_node == _M_end()) 6242: { 6242: if (size() > 0 6242: && _M_impl._M_key_compare(_S_key(_M_rightmost()), __k)) 6242: return _Res(0, _M_rightmost()); 6242: else 6242: return _M_get_insert_unique_pos(__k); 6242: } 6242: else if (_M_impl._M_key_compare(__k, _S_key(__pos._M_node))) 6242: { 6242: 6242: iterator __before = __pos; 6242: if (__pos._M_node == _M_leftmost()) 6242: return _Res(_M_leftmost(), _M_leftmost()); 6242: else if (_M_impl._M_key_compare(_S_key((--__before)._M_node), __k)) 6242: { 6242: if (_S_right(__before._M_node) == 0) 6242: return _Res(0, __before._M_node); 6242: else 6242: return _Res(__pos._M_node, __pos._M_node); 6242: } 6242: else 6242: return _M_get_insert_unique_pos(__k); 6242: } 6242: else if (_M_impl._M_key_compare(_S_key(__pos._M_node), __k)) 6242: { 6242: 6242: iterator __after = __pos; 6242: if (__pos._M_node == _M_rightmost()) 6242: return _Res(0, _M_rightmost()); 6242: else if (_M_impl._M_key_compare(__k, _S_key((++__after)._M_node))) 6242: { 6242: if (_S_right(__pos._M_node) == 0) 6242: return _Res(0, __pos._M_node); 6242: else 6242: return _Res(__after._M_node, __after._M_node); 6242: } 6242: else 6242: return _M_get_insert_unique_pos(__k); 6242: } 6242: else 6242: 6242: return _Res(__pos._M_node, 0); 6242: } 6242: 6242: template 6242: 6242: template 6242: 6242: 6242: 6242: typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator 6242: _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: 6242: _M_insert_unique_(const_iterator __position, 6242: 6242: _Arg&& __v, 6242: 6242: 6242: 6242: _NodeGen& __node_gen) 6242: { 6242: pair<_Base_ptr, _Base_ptr> __res 6242: = _M_get_insert_hint_unique_pos(__position, _KeyOfValue()(__v)); 6242: 6242: if (__res.second) 6242: return _M_insert_(__res.first, __res.second, 6242: std::forward<_Arg>(__v), 6242: __node_gen); 6242: return iterator(__res.first); 6242: } 6242: 6242: template 6242: pair::_Base_ptr, 6242: typename _Rb_tree<_Key, _Val, _KeyOfValue, 6242: _Compare, _Alloc>::_Base_ptr> 6242: _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: 6242: _M_get_insert_hint_equal_pos(const_iterator __position, const key_type& __k) 6242: { 6242: iterator __pos = __position._M_const_cast(); 6242: typedef pair<_Base_ptr, _Base_ptr> _Res; 6242: 6242: 6242: if (__pos._M_node == _M_end()) 6242: { 6242: if (size() > 0 6242: && !_M_impl._M_key_compare(__k, _S_key(_M_rightmost()))) 6242: return _Res(0, _M_rightmost()); 6242: else 6242: return _M_get_insert_equal_pos(__k); 6242: } 6242: else if (!_M_impl._M_key_compare(_S_key(__pos._M_node), __k)) 6242: { 6242: 6242: iterator __before = __pos; 6242: if (__pos._M_node == _M_leftmost()) 6242: return _Res(_M_leftmost(), _M_leftmost()); 6242: else if (!_M_impl._M_key_compare(__k, _S_key((--__before)._M_node))) 6242: { 6242: if (_S_right(__before._M_node) == 0) 6242: return _Res(0, __before._M_node); 6242: else 6242: return _Res(__pos._M_node, __pos._M_node); 6242: } 6242: else 6242: return _M_get_insert_equal_pos(__k); 6242: } 6242: else 6242: { 6242: 6242: iterator __after = __pos; 6242: if (__pos._M_node == _M_rightmost()) 6242: return _Res(0, _M_rightmost()); 6242: else if (!_M_impl._M_key_compare(_S_key((++__after)._M_node), __k)) 6242: { 6242: if (_S_right(__pos._M_node) == 0) 6242: return _Res(0, __pos._M_node); 6242: else 6242: return _Res(__after._M_node, __after._M_node); 6242: } 6242: else 6242: return _Res(0, 0); 6242: } 6242: } 6242: 6242: template 6242: 6242: template 6242: 6242: 6242: 6242: typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator 6242: _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: 6242: _M_insert_equal_(const_iterator __position, 6242: 6242: _Arg&& __v, 6242: 6242: 6242: 6242: _NodeGen& __node_gen) 6242: { 6242: pair<_Base_ptr, _Base_ptr> __res 6242: = _M_get_insert_hint_equal_pos(__position, _KeyOfValue()(__v)); 6242: 6242: if (__res.second) 6242: return _M_insert_(__res.first, __res.second, 6242: std::forward<_Arg>(__v), 6242: __node_gen); 6242: 6242: return _M_insert_equal_lower(std::forward<_Arg>(__v)); 6242: } 6242: 6242: 6242: template 6242: typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator 6242: _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: 6242: _M_insert_node(_Base_ptr __x, _Base_ptr __p, _Link_type __z) 6242: { 6242: bool __insert_left = (__x != 0 || __p == _M_end() 6242: || _M_impl._M_key_compare(_S_key(__z), 6242: _S_key(__p))); 6242: 6242: _Rb_tree_insert_and_rebalance(__insert_left, __z, __p, 6242: this->_M_impl._M_header); 6242: ++_M_impl._M_node_count; 6242: return iterator(__z); 6242: } 6242: 6242: template 6242: typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator 6242: _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: 6242: _M_insert_lower_node(_Base_ptr __p, _Link_type __z) 6242: { 6242: bool __insert_left = (__p == _M_end() 6242: || !_M_impl._M_key_compare(_S_key(__p), 6242: _S_key(__z))); 6242: 6242: _Rb_tree_insert_and_rebalance(__insert_left, __z, __p, 6242: this->_M_impl._M_header); 6242: ++_M_impl._M_node_count; 6242: return iterator(__z); 6242: } 6242: 6242: template 6242: typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator 6242: _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: 6242: _M_insert_equal_lower_node(_Link_type __z) 6242: { 6242: _Link_type __x = _M_begin(); 6242: _Base_ptr __y = _M_end(); 6242: while (__x != 0) 6242: { 6242: __y = __x; 6242: __x = !_M_impl._M_key_compare(_S_key(__x), _S_key(__z)) ? 6242: _S_left(__x) : _S_right(__x); 6242: } 6242: return _M_insert_lower_node(__y, __z); 6242: } 6242: 6242: template 6242: template 6242: pair::iterator, bool> 6242: _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: 6242: _M_emplace_unique(_Args&&... __args) 6242: { 6242: _Link_type __z = _M_create_node(std::forward<_Args>(__args)...); 6242: 6242: try 6242: { 6242: typedef pair _Res; 6242: auto __res = _M_get_insert_unique_pos(_S_key(__z)); 6242: if (__res.second) 6242: return _Res(_M_insert_node(__res.first, __res.second, __z), true); 6242: 6242: _M_drop_node(__z); 6242: return _Res(iterator(__res.first), false); 6242: } 6242: catch(...) 6242: { 6242: _M_drop_node(__z); 6242: throw; 6242: } 6242: } 6242: 6242: template 6242: template 6242: typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator 6242: _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: 6242: _M_emplace_equal(_Args&&... __args) 6242: { 6242: _Link_type __z = _M_create_node(std::forward<_Args>(__args)...); 6242: 6242: try 6242: { 6242: auto __res = _M_get_insert_equal_pos(_S_key(__z)); 6242: return _M_insert_node(__res.first, __res.second, __z); 6242: } 6242: catch(...) 6242: { 6242: _M_drop_node(__z); 6242: throw; 6242: } 6242: } 6242: 6242: template 6242: template 6242: typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator 6242: _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: 6242: _M_emplace_hint_unique(const_iterator __pos, _Args&&... __args) 6242: { 6242: _Link_type __z = _M_create_node(std::forward<_Args>(__args)...); 6242: 6242: try 6242: { 6242: auto __res = _M_get_insert_hint_unique_pos(__pos, _S_key(__z)); 6242: 6242: if (__res.second) 6242: return _M_insert_node(__res.first, __res.second, __z); 6242: 6242: _M_drop_node(__z); 6242: return iterator(__res.first); 6242: } 6242: catch(...) 6242: { 6242: _M_drop_node(__z); 6242: throw; 6242: } 6242: } 6242: 6242: template 6242: template 6242: typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator 6242: _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: 6242: _M_emplace_hint_equal(const_iterator __pos, _Args&&... __args) 6242: { 6242: _Link_type __z = _M_create_node(std::forward<_Args>(__args)...); 6242: 6242: try 6242: { 6242: auto __res = _M_get_insert_hint_equal_pos(__pos, _S_key(__z)); 6242: 6242: if (__res.second) 6242: return _M_insert_node(__res.first, __res.second, __z); 6242: 6242: return _M_insert_equal_lower_node(__z); 6242: } 6242: catch(...) 6242: { 6242: _M_drop_node(__z); 6242: throw; 6242: } 6242: } 6242: 6242: 6242: template 6242: template 6242: void 6242: _Rb_tree<_Key, _Val, _KoV, _Cmp, _Alloc>:: 6242: _M_insert_unique(_II __first, _II __last) 6242: { 6242: _Alloc_node __an(*this); 6242: for (; __first != __last; ++__first) 6242: _M_insert_unique_(end(), *__first, __an); 6242: } 6242: 6242: template 6242: template 6242: void 6242: _Rb_tree<_Key, _Val, _KoV, _Cmp, _Alloc>:: 6242: _M_insert_equal(_II __first, _II __last) 6242: { 6242: _Alloc_node __an(*this); 6242: for (; __first != __last; ++__first) 6242: _M_insert_equal_(end(), *__first, __an); 6242: } 6242: 6242: template 6242: void 6242: _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: 6242: _M_erase_aux(const_iterator __position) 6242: { 6242: _Link_type __y = 6242: static_cast<_Link_type>(_Rb_tree_rebalance_for_erase 6242: (const_cast<_Base_ptr>(__position._M_node), 6242: this->_M_impl._M_header)); 6242: _M_drop_node(__y); 6242: --_M_impl._M_node_count; 6242: } 6242: 6242: template 6242: void 6242: _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: 6242: _M_erase_aux(const_iterator __first, const_iterator __last) 6242: { 6242: if (__first == begin() && __last == end()) 6242: clear(); 6242: else 6242: while (__first != __last) 6242: _M_erase_aux(__first++); 6242: } 6242: 6242: template 6242: typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::size_type 6242: _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: 6242: erase(const _Key& __x) 6242: { 6242: pair __p = equal_range(__x); 6242: const size_type __old_size = size(); 6242: _M_erase_aux(__p.first, __p.second); 6242: return __old_size - size(); 6242: } 6242: 6242: template 6242: void 6242: _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: 6242: erase(const _Key* __first, const _Key* __last) 6242: { 6242: while (__first != __last) 6242: erase(*__first++); 6242: } 6242: 6242: template 6242: typename _Rb_tree<_Key, _Val, _KeyOfValue, 6242: _Compare, _Alloc>::iterator 6242: _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: 6242: find(const _Key& __k) 6242: { 6242: iterator __j = _M_lower_bound(_M_begin(), _M_end(), __k); 6242: return (__j == end() 6242: || _M_impl._M_key_compare(__k, 6242: _S_key(__j._M_node))) ? end() : __j; 6242: } 6242: 6242: template 6242: typename _Rb_tree<_Key, _Val, _KeyOfValue, 6242: _Compare, _Alloc>::const_iterator 6242: _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: 6242: find(const _Key& __k) const 6242: { 6242: const_iterator __j = _M_lower_bound(_M_begin(), _M_end(), __k); 6242: return (__j == end() 6242: || _M_impl._M_key_compare(__k, 6242: _S_key(__j._M_node))) ? end() : __j; 6242: } 6242: 6242: template 6242: typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::size_type 6242: _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: 6242: count(const _Key& __k) const 6242: { 6242: pair __p = equal_range(__k); 6242: const size_type __n = std::distance(__p.first, __p.second); 6242: return __n; 6242: } 6242: 6242: __attribute__ ((__pure__)) unsigned int 6242: _Rb_tree_black_count(const _Rb_tree_node_base* __node, 6242: const _Rb_tree_node_base* __root) throw (); 6242: 6242: template 6242: bool 6242: _Rb_tree<_Key,_Val,_KeyOfValue,_Compare,_Alloc>::__rb_verify() const 6242: { 6242: if (_M_impl._M_node_count == 0 || begin() == end()) 6242: return _M_impl._M_node_count == 0 && begin() == end() 6242: && this->_M_impl._M_header._M_left == _M_end() 6242: && this->_M_impl._M_header._M_right == _M_end(); 6242: 6242: unsigned int __len = _Rb_tree_black_count(_M_leftmost(), _M_root()); 6242: for (const_iterator __it = begin(); __it != end(); ++__it) 6242: { 6242: _Const_Link_type __x = static_cast<_Const_Link_type>(__it._M_node); 6242: _Const_Link_type __L = _S_left(__x); 6242: _Const_Link_type __R = _S_right(__x); 6242: 6242: if (__x->_M_color == _S_red) 6242: if ((__L && __L->_M_color == _S_red) 6242: || (__R && __R->_M_color == _S_red)) 6242: return false; 6242: 6242: if (__L && _M_impl._M_key_compare(_S_key(__x), _S_key(__L))) 6242: return false; 6242: if (__R && _M_impl._M_key_compare(_S_key(__R), _S_key(__x))) 6242: return false; 6242: 6242: if (!__L && !__R && _Rb_tree_black_count(__x, _M_root()) != __len) 6242: return false; 6242: } 6242: 6242: if (_M_leftmost() != _Rb_tree_node_base::_S_minimum(_M_root())) 6242: return false; 6242: if (_M_rightmost() != _Rb_tree_node_base::_S_maximum(_M_root())) 6242: return false; 6242: return true; 6242: } 6242: # 2627 "/usr/include/c++/8/bits/stl_tree.h" 3 6242: 6242: } 6242: # 61 "/usr/include/c++/8/set" 2 3 6242: # 1 "/usr/include/c++/8/bits/stl_set.h" 1 3 6242: # 64 "/usr/include/c++/8/bits/stl_set.h" 3 6242: namespace std __attribute__ ((__visibility__ ("default"))) 6242: { 6242: 6242: 6242: 6242: template 6242: class multiset; 6242: # 92 "/usr/include/c++/8/bits/stl_set.h" 3 6242: template, 6242: typename _Alloc = std::allocator<_Key> > 6242: class set 6242: { 6242: # 108 "/usr/include/c++/8/bits/stl_set.h" 3 6242: static_assert(is_same::type, _Key>::value, 6242: "std::set must have a non-const, non-volatile value_type"); 6242: 6242: 6242: 6242: 6242: 6242: 6242: public: 6242: 6242: 6242: 6242: typedef _Key key_type; 6242: typedef _Key value_type; 6242: typedef _Compare key_compare; 6242: typedef _Compare value_compare; 6242: typedef _Alloc allocator_type; 6242: 6242: 6242: private: 6242: typedef typename __gnu_cxx::__alloc_traits<_Alloc>::template 6242: rebind<_Key>::other _Key_alloc_type; 6242: 6242: typedef _Rb_tree, 6242: key_compare, _Key_alloc_type> _Rep_type; 6242: _Rep_type _M_t; 6242: 6242: typedef __gnu_cxx::__alloc_traits<_Key_alloc_type> _Alloc_traits; 6242: 6242: public: 6242: 6242: 6242: typedef typename _Alloc_traits::pointer pointer; 6242: typedef typename _Alloc_traits::const_pointer const_pointer; 6242: typedef typename _Alloc_traits::reference reference; 6242: typedef typename _Alloc_traits::const_reference const_reference; 6242: 6242: 6242: 6242: typedef typename _Rep_type::const_iterator iterator; 6242: typedef typename _Rep_type::const_iterator const_iterator; 6242: typedef typename _Rep_type::const_reverse_iterator reverse_iterator; 6242: typedef typename _Rep_type::const_reverse_iterator const_reverse_iterator; 6242: typedef typename _Rep_type::size_type size_type; 6242: typedef typename _Rep_type::difference_type difference_type; 6242: # 167 "/usr/include/c++/8/bits/stl_set.h" 3 6242: set() = default; 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: explicit 6242: set(const _Compare& __comp, 6242: const allocator_type& __a = allocator_type()) 6242: : _M_t(__comp, _Key_alloc_type(__a)) { } 6242: # 190 "/usr/include/c++/8/bits/stl_set.h" 3 6242: template 6242: set(_InputIterator __first, _InputIterator __last) 6242: : _M_t() 6242: { _M_t._M_insert_unique(__first, __last); } 6242: # 207 "/usr/include/c++/8/bits/stl_set.h" 3 6242: template 6242: set(_InputIterator __first, _InputIterator __last, 6242: const _Compare& __comp, 6242: const allocator_type& __a = allocator_type()) 6242: : _M_t(__comp, _Key_alloc_type(__a)) 6242: { _M_t._M_insert_unique(__first, __last); } 6242: # 223 "/usr/include/c++/8/bits/stl_set.h" 3 6242: set(const set&) = default; 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: set(set&&) = default; 6242: # 243 "/usr/include/c++/8/bits/stl_set.h" 3 6242: set(initializer_list __l, 6242: const _Compare& __comp = _Compare(), 6242: const allocator_type& __a = allocator_type()) 6242: : _M_t(__comp, _Key_alloc_type(__a)) 6242: { _M_t._M_insert_unique(__l.begin(), __l.end()); } 6242: 6242: 6242: explicit 6242: set(const allocator_type& __a) 6242: : _M_t(_Compare(), _Key_alloc_type(__a)) { } 6242: 6242: 6242: set(const set& __x, const allocator_type& __a) 6242: : _M_t(__x._M_t, _Key_alloc_type(__a)) { } 6242: 6242: 6242: set(set&& __x, const allocator_type& __a) 6242: noexcept(is_nothrow_copy_constructible<_Compare>::value 6242: && _Alloc_traits::_S_always_equal()) 6242: : _M_t(std::move(__x._M_t), _Key_alloc_type(__a)) { } 6242: 6242: 6242: set(initializer_list __l, const allocator_type& __a) 6242: : _M_t(_Compare(), _Key_alloc_type(__a)) 6242: { _M_t._M_insert_unique(__l.begin(), __l.end()); } 6242: 6242: 6242: template 6242: set(_InputIterator __first, _InputIterator __last, 6242: const allocator_type& __a) 6242: : _M_t(_Compare(), _Key_alloc_type(__a)) 6242: { _M_t._M_insert_unique(__first, __last); } 6242: 6242: 6242: 6242: 6242: 6242: 6242: ~set() = default; 6242: # 297 "/usr/include/c++/8/bits/stl_set.h" 3 6242: set& 6242: operator=(const set&) = default; 6242: 6242: 6242: set& 6242: operator=(set&&) = default; 6242: # 315 "/usr/include/c++/8/bits/stl_set.h" 3 6242: set& 6242: operator=(initializer_list __l) 6242: { 6242: _M_t._M_assign_unique(__l.begin(), __l.end()); 6242: return *this; 6242: } 6242: 6242: 6242: 6242: 6242: 6242: key_compare 6242: key_comp() const 6242: { return _M_t.key_comp(); } 6242: 6242: value_compare 6242: value_comp() const 6242: { return _M_t.key_comp(); } 6242: 6242: allocator_type 6242: get_allocator() const noexcept 6242: { return allocator_type(_M_t.get_allocator()); } 6242: 6242: 6242: 6242: 6242: 6242: 6242: iterator 6242: begin() const noexcept 6242: { return _M_t.begin(); } 6242: 6242: 6242: 6242: 6242: 6242: 6242: iterator 6242: end() const noexcept 6242: { return _M_t.end(); } 6242: 6242: 6242: 6242: 6242: 6242: 6242: reverse_iterator 6242: rbegin() const noexcept 6242: { return _M_t.rbegin(); } 6242: 6242: 6242: 6242: 6242: 6242: 6242: reverse_iterator 6242: rend() const noexcept 6242: { return _M_t.rend(); } 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: iterator 6242: cbegin() const noexcept 6242: { return _M_t.begin(); } 6242: 6242: 6242: 6242: 6242: 6242: 6242: iterator 6242: cend() const noexcept 6242: { return _M_t.end(); } 6242: 6242: 6242: 6242: 6242: 6242: 6242: reverse_iterator 6242: crbegin() const noexcept 6242: { return _M_t.rbegin(); } 6242: 6242: 6242: 6242: 6242: 6242: 6242: reverse_iterator 6242: crend() const noexcept 6242: { return _M_t.rend(); } 6242: 6242: 6242: 6242: bool 6242: empty() const noexcept 6242: { return _M_t.empty(); } 6242: 6242: 6242: size_type 6242: size() const noexcept 6242: { return _M_t.size(); } 6242: 6242: 6242: size_type 6242: max_size() const noexcept 6242: { return _M_t.max_size(); } 6242: # 440 "/usr/include/c++/8/bits/stl_set.h" 3 6242: void 6242: swap(set& __x) 6242: noexcept(__is_nothrow_swappable<_Compare>::value) 6242: { _M_t.swap(__x._M_t); } 6242: # 460 "/usr/include/c++/8/bits/stl_set.h" 3 6242: template 6242: std::pair 6242: emplace(_Args&&... __args) 6242: { return _M_t._M_emplace_unique(std::forward<_Args>(__args)...); } 6242: # 486 "/usr/include/c++/8/bits/stl_set.h" 3 6242: template 6242: iterator 6242: emplace_hint(const_iterator __pos, _Args&&... __args) 6242: { 6242: return _M_t._M_emplace_hint_unique(__pos, 6242: std::forward<_Args>(__args)...); 6242: } 6242: # 508 "/usr/include/c++/8/bits/stl_set.h" 3 6242: std::pair 6242: insert(const value_type& __x) 6242: { 6242: std::pair __p = 6242: _M_t._M_insert_unique(__x); 6242: return std::pair(__p.first, __p.second); 6242: } 6242: 6242: 6242: std::pair 6242: insert(value_type&& __x) 6242: { 6242: std::pair __p = 6242: _M_t._M_insert_unique(std::move(__x)); 6242: return std::pair(__p.first, __p.second); 6242: } 6242: # 545 "/usr/include/c++/8/bits/stl_set.h" 3 6242: iterator 6242: insert(const_iterator __position, const value_type& __x) 6242: { return _M_t._M_insert_unique_(__position, __x); } 6242: 6242: 6242: iterator 6242: insert(const_iterator __position, value_type&& __x) 6242: { return _M_t._M_insert_unique_(__position, std::move(__x)); } 6242: # 564 "/usr/include/c++/8/bits/stl_set.h" 3 6242: template 6242: void 6242: insert(_InputIterator __first, _InputIterator __last) 6242: { _M_t._M_insert_unique(__first, __last); } 6242: # 577 "/usr/include/c++/8/bits/stl_set.h" 3 6242: void 6242: insert(initializer_list __l) 6242: { this->insert(__l.begin(), __l.end()); } 6242: # 652 "/usr/include/c++/8/bits/stl_set.h" 3 6242: __attribute ((__abi_tag__ ("cxx11"))) 6242: iterator 6242: erase(const_iterator __position) 6242: { return _M_t.erase(__position); } 6242: # 683 "/usr/include/c++/8/bits/stl_set.h" 3 6242: size_type 6242: erase(const key_type& __x) 6242: { return _M_t.erase(__x); } 6242: # 704 "/usr/include/c++/8/bits/stl_set.h" 3 6242: __attribute ((__abi_tag__ ("cxx11"))) 6242: iterator 6242: erase(const_iterator __first, const_iterator __last) 6242: { return _M_t.erase(__first, __last); } 6242: # 732 "/usr/include/c++/8/bits/stl_set.h" 3 6242: void 6242: clear() noexcept 6242: { _M_t.clear(); } 6242: # 747 "/usr/include/c++/8/bits/stl_set.h" 3 6242: size_type 6242: count(const key_type& __x) const 6242: { return _M_t.find(__x) == _M_t.end() ? 0 : 1; } 6242: # 774 "/usr/include/c++/8/bits/stl_set.h" 3 6242: iterator 6242: find(const key_type& __x) 6242: { return _M_t.find(__x); } 6242: 6242: const_iterator 6242: find(const key_type& __x) const 6242: { return _M_t.find(__x); } 6242: # 809 "/usr/include/c++/8/bits/stl_set.h" 3 6242: iterator 6242: lower_bound(const key_type& __x) 6242: { return _M_t.lower_bound(__x); } 6242: 6242: const_iterator 6242: lower_bound(const key_type& __x) const 6242: { return _M_t.lower_bound(__x); } 6242: # 839 "/usr/include/c++/8/bits/stl_set.h" 3 6242: iterator 6242: upper_bound(const key_type& __x) 6242: { return _M_t.upper_bound(__x); } 6242: 6242: const_iterator 6242: upper_bound(const key_type& __x) const 6242: { return _M_t.upper_bound(__x); } 6242: # 878 "/usr/include/c++/8/bits/stl_set.h" 3 6242: std::pair 6242: equal_range(const key_type& __x) 6242: { return _M_t.equal_range(__x); } 6242: 6242: std::pair 6242: equal_range(const key_type& __x) const 6242: { return _M_t.equal_range(__x); } 6242: # 901 "/usr/include/c++/8/bits/stl_set.h" 3 6242: template 6242: friend bool 6242: operator==(const set<_K1, _C1, _A1>&, const set<_K1, _C1, _A1>&); 6242: 6242: template 6242: friend bool 6242: operator<(const set<_K1, _C1, _A1>&, const set<_K1, _C1, _A1>&); 6242: }; 6242: # 956 "/usr/include/c++/8/bits/stl_set.h" 3 6242: template 6242: inline bool 6242: operator==(const set<_Key, _Compare, _Alloc>& __x, 6242: const set<_Key, _Compare, _Alloc>& __y) 6242: { return __x._M_t == __y._M_t; } 6242: # 973 "/usr/include/c++/8/bits/stl_set.h" 3 6242: template 6242: inline bool 6242: operator<(const set<_Key, _Compare, _Alloc>& __x, 6242: const set<_Key, _Compare, _Alloc>& __y) 6242: { return __x._M_t < __y._M_t; } 6242: 6242: 6242: template 6242: inline bool 6242: operator!=(const set<_Key, _Compare, _Alloc>& __x, 6242: const set<_Key, _Compare, _Alloc>& __y) 6242: { return !(__x == __y); } 6242: 6242: 6242: template 6242: inline bool 6242: operator>(const set<_Key, _Compare, _Alloc>& __x, 6242: const set<_Key, _Compare, _Alloc>& __y) 6242: { return __y < __x; } 6242: 6242: 6242: template 6242: inline bool 6242: operator<=(const set<_Key, _Compare, _Alloc>& __x, 6242: const set<_Key, _Compare, _Alloc>& __y) 6242: { return !(__y < __x); } 6242: 6242: 6242: template 6242: inline bool 6242: operator>=(const set<_Key, _Compare, _Alloc>& __x, 6242: const set<_Key, _Compare, _Alloc>& __y) 6242: { return !(__x < __y); } 6242: 6242: 6242: template 6242: inline void 6242: swap(set<_Key, _Compare, _Alloc>& __x, set<_Key, _Compare, _Alloc>& __y) 6242: noexcept(noexcept(__x.swap(__y))) 6242: { __x.swap(__y); } 6242: 6242: 6242: # 1035 "/usr/include/c++/8/bits/stl_set.h" 3 6242: 6242: } 6242: # 62 "/usr/include/c++/8/set" 2 3 6242: # 1 "/usr/include/c++/8/bits/stl_multiset.h" 1 3 6242: # 64 "/usr/include/c++/8/bits/stl_multiset.h" 3 6242: namespace std __attribute__ ((__visibility__ ("default"))) 6242: { 6242: 6242: 6242: 6242: template 6242: class set; 6242: # 94 "/usr/include/c++/8/bits/stl_multiset.h" 3 6242: template , 6242: typename _Alloc = std::allocator<_Key> > 6242: class multiset 6242: { 6242: # 110 "/usr/include/c++/8/bits/stl_multiset.h" 3 6242: static_assert(is_same::type, _Key>::value, 6242: "std::multiset must have a non-const, non-volatile value_type"); 6242: 6242: 6242: 6242: 6242: 6242: 6242: public: 6242: 6242: typedef _Key key_type; 6242: typedef _Key value_type; 6242: typedef _Compare key_compare; 6242: typedef _Compare value_compare; 6242: typedef _Alloc allocator_type; 6242: 6242: private: 6242: 6242: typedef typename __gnu_cxx::__alloc_traits<_Alloc>::template 6242: rebind<_Key>::other _Key_alloc_type; 6242: 6242: typedef _Rb_tree, 6242: key_compare, _Key_alloc_type> _Rep_type; 6242: 6242: _Rep_type _M_t; 6242: 6242: typedef __gnu_cxx::__alloc_traits<_Key_alloc_type> _Alloc_traits; 6242: 6242: public: 6242: typedef typename _Alloc_traits::pointer pointer; 6242: typedef typename _Alloc_traits::const_pointer const_pointer; 6242: typedef typename _Alloc_traits::reference reference; 6242: typedef typename _Alloc_traits::const_reference const_reference; 6242: 6242: 6242: 6242: typedef typename _Rep_type::const_iterator iterator; 6242: typedef typename _Rep_type::const_iterator const_iterator; 6242: typedef typename _Rep_type::const_reverse_iterator reverse_iterator; 6242: typedef typename _Rep_type::const_reverse_iterator const_reverse_iterator; 6242: typedef typename _Rep_type::size_type size_type; 6242: typedef typename _Rep_type::difference_type difference_type; 6242: # 164 "/usr/include/c++/8/bits/stl_multiset.h" 3 6242: multiset() = default; 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: explicit 6242: multiset(const _Compare& __comp, 6242: const allocator_type& __a = allocator_type()) 6242: : _M_t(__comp, _Key_alloc_type(__a)) { } 6242: # 186 "/usr/include/c++/8/bits/stl_multiset.h" 3 6242: template 6242: multiset(_InputIterator __first, _InputIterator __last) 6242: : _M_t() 6242: { _M_t._M_insert_equal(__first, __last); } 6242: # 202 "/usr/include/c++/8/bits/stl_multiset.h" 3 6242: template 6242: multiset(_InputIterator __first, _InputIterator __last, 6242: const _Compare& __comp, 6242: const allocator_type& __a = allocator_type()) 6242: : _M_t(__comp, _Key_alloc_type(__a)) 6242: { _M_t._M_insert_equal(__first, __last); } 6242: # 218 "/usr/include/c++/8/bits/stl_multiset.h" 3 6242: multiset(const multiset&) = default; 6242: # 227 "/usr/include/c++/8/bits/stl_multiset.h" 3 6242: multiset(multiset&&) = default; 6242: # 239 "/usr/include/c++/8/bits/stl_multiset.h" 3 6242: multiset(initializer_list __l, 6242: const _Compare& __comp = _Compare(), 6242: const allocator_type& __a = allocator_type()) 6242: : _M_t(__comp, _Key_alloc_type(__a)) 6242: { _M_t._M_insert_equal(__l.begin(), __l.end()); } 6242: 6242: 6242: explicit 6242: multiset(const allocator_type& __a) 6242: : _M_t(_Compare(), _Key_alloc_type(__a)) { } 6242: 6242: 6242: multiset(const multiset& __m, const allocator_type& __a) 6242: : _M_t(__m._M_t, _Key_alloc_type(__a)) { } 6242: 6242: 6242: multiset(multiset&& __m, const allocator_type& __a) 6242: noexcept(is_nothrow_copy_constructible<_Compare>::value 6242: && _Alloc_traits::_S_always_equal()) 6242: : _M_t(std::move(__m._M_t), _Key_alloc_type(__a)) { } 6242: 6242: 6242: multiset(initializer_list __l, const allocator_type& __a) 6242: : _M_t(_Compare(), _Key_alloc_type(__a)) 6242: { _M_t._M_insert_equal(__l.begin(), __l.end()); } 6242: 6242: 6242: template 6242: multiset(_InputIterator __first, _InputIterator __last, 6242: const allocator_type& __a) 6242: : _M_t(_Compare(), _Key_alloc_type(__a)) 6242: { _M_t._M_insert_equal(__first, __last); } 6242: 6242: 6242: 6242: 6242: 6242: 6242: ~multiset() = default; 6242: # 293 "/usr/include/c++/8/bits/stl_multiset.h" 3 6242: multiset& 6242: operator=(const multiset&) = default; 6242: 6242: 6242: multiset& 6242: operator=(multiset&&) = default; 6242: # 311 "/usr/include/c++/8/bits/stl_multiset.h" 3 6242: multiset& 6242: operator=(initializer_list __l) 6242: { 6242: _M_t._M_assign_equal(__l.begin(), __l.end()); 6242: return *this; 6242: } 6242: 6242: 6242: 6242: 6242: 6242: key_compare 6242: key_comp() const 6242: { return _M_t.key_comp(); } 6242: 6242: value_compare 6242: value_comp() const 6242: { return _M_t.key_comp(); } 6242: 6242: allocator_type 6242: get_allocator() const noexcept 6242: { return allocator_type(_M_t.get_allocator()); } 6242: 6242: 6242: 6242: 6242: 6242: 6242: iterator 6242: begin() const noexcept 6242: { return _M_t.begin(); } 6242: 6242: 6242: 6242: 6242: 6242: 6242: iterator 6242: end() const noexcept 6242: { return _M_t.end(); } 6242: 6242: 6242: 6242: 6242: 6242: 6242: reverse_iterator 6242: rbegin() const noexcept 6242: { return _M_t.rbegin(); } 6242: 6242: 6242: 6242: 6242: 6242: 6242: reverse_iterator 6242: rend() const noexcept 6242: { return _M_t.rend(); } 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: iterator 6242: cbegin() const noexcept 6242: { return _M_t.begin(); } 6242: 6242: 6242: 6242: 6242: 6242: 6242: iterator 6242: cend() const noexcept 6242: { return _M_t.end(); } 6242: 6242: 6242: 6242: 6242: 6242: 6242: reverse_iterator 6242: crbegin() const noexcept 6242: { return _M_t.rbegin(); } 6242: 6242: 6242: 6242: 6242: 6242: 6242: reverse_iterator 6242: crend() const noexcept 6242: { return _M_t.rend(); } 6242: 6242: 6242: 6242: bool 6242: empty() const noexcept 6242: { return _M_t.empty(); } 6242: 6242: 6242: size_type 6242: size() const noexcept 6242: { return _M_t.size(); } 6242: 6242: 6242: size_type 6242: max_size() const noexcept 6242: { return _M_t.max_size(); } 6242: # 436 "/usr/include/c++/8/bits/stl_multiset.h" 3 6242: void 6242: swap(multiset& __x) 6242: noexcept(__is_nothrow_swappable<_Compare>::value) 6242: { _M_t.swap(__x._M_t); } 6242: # 455 "/usr/include/c++/8/bits/stl_multiset.h" 3 6242: template 6242: iterator 6242: emplace(_Args&&... __args) 6242: { return _M_t._M_emplace_equal(std::forward<_Args>(__args)...); } 6242: # 481 "/usr/include/c++/8/bits/stl_multiset.h" 3 6242: template 6242: iterator 6242: emplace_hint(const_iterator __pos, _Args&&... __args) 6242: { 6242: return _M_t._M_emplace_hint_equal(__pos, 6242: std::forward<_Args>(__args)...); 6242: } 6242: # 501 "/usr/include/c++/8/bits/stl_multiset.h" 3 6242: iterator 6242: insert(const value_type& __x) 6242: { return _M_t._M_insert_equal(__x); } 6242: 6242: 6242: iterator 6242: insert(value_type&& __x) 6242: { return _M_t._M_insert_equal(std::move(__x)); } 6242: # 531 "/usr/include/c++/8/bits/stl_multiset.h" 3 6242: iterator 6242: insert(const_iterator __position, const value_type& __x) 6242: { return _M_t._M_insert_equal_(__position, __x); } 6242: 6242: 6242: iterator 6242: insert(const_iterator __position, value_type&& __x) 6242: { return _M_t._M_insert_equal_(__position, std::move(__x)); } 6242: # 549 "/usr/include/c++/8/bits/stl_multiset.h" 3 6242: template 6242: void 6242: insert(_InputIterator __first, _InputIterator __last) 6242: { _M_t._M_insert_equal(__first, __last); } 6242: # 562 "/usr/include/c++/8/bits/stl_multiset.h" 3 6242: void 6242: insert(initializer_list __l) 6242: { this->insert(__l.begin(), __l.end()); } 6242: # 637 "/usr/include/c++/8/bits/stl_multiset.h" 3 6242: __attribute ((__abi_tag__ ("cxx11"))) 6242: iterator 6242: erase(const_iterator __position) 6242: { return _M_t.erase(__position); } 6242: # 668 "/usr/include/c++/8/bits/stl_multiset.h" 3 6242: size_type 6242: erase(const key_type& __x) 6242: { return _M_t.erase(__x); } 6242: # 689 "/usr/include/c++/8/bits/stl_multiset.h" 3 6242: __attribute ((__abi_tag__ ("cxx11"))) 6242: iterator 6242: erase(const_iterator __first, const_iterator __last) 6242: { return _M_t.erase(__first, __last); } 6242: # 717 "/usr/include/c++/8/bits/stl_multiset.h" 3 6242: void 6242: clear() noexcept 6242: { _M_t.clear(); } 6242: # 729 "/usr/include/c++/8/bits/stl_multiset.h" 3 6242: size_type 6242: count(const key_type& __x) const 6242: { return _M_t.count(__x); } 6242: # 755 "/usr/include/c++/8/bits/stl_multiset.h" 3 6242: iterator 6242: find(const key_type& __x) 6242: { return _M_t.find(__x); } 6242: 6242: const_iterator 6242: find(const key_type& __x) const 6242: { return _M_t.find(__x); } 6242: # 790 "/usr/include/c++/8/bits/stl_multiset.h" 3 6242: iterator 6242: lower_bound(const key_type& __x) 6242: { return _M_t.lower_bound(__x); } 6242: 6242: const_iterator 6242: lower_bound(const key_type& __x) const 6242: { return _M_t.lower_bound(__x); } 6242: # 820 "/usr/include/c++/8/bits/stl_multiset.h" 3 6242: iterator 6242: upper_bound(const key_type& __x) 6242: { return _M_t.upper_bound(__x); } 6242: 6242: const_iterator 6242: upper_bound(const key_type& __x) const 6242: { return _M_t.upper_bound(__x); } 6242: # 859 "/usr/include/c++/8/bits/stl_multiset.h" 3 6242: std::pair 6242: equal_range(const key_type& __x) 6242: { return _M_t.equal_range(__x); } 6242: 6242: std::pair 6242: equal_range(const key_type& __x) const 6242: { return _M_t.equal_range(__x); } 6242: # 882 "/usr/include/c++/8/bits/stl_multiset.h" 3 6242: template 6242: friend bool 6242: operator==(const multiset<_K1, _C1, _A1>&, 6242: const multiset<_K1, _C1, _A1>&); 6242: 6242: template 6242: friend bool 6242: operator< (const multiset<_K1, _C1, _A1>&, 6242: const multiset<_K1, _C1, _A1>&); 6242: }; 6242: # 941 "/usr/include/c++/8/bits/stl_multiset.h" 3 6242: template 6242: inline bool 6242: operator==(const multiset<_Key, _Compare, _Alloc>& __x, 6242: const multiset<_Key, _Compare, _Alloc>& __y) 6242: { return __x._M_t == __y._M_t; } 6242: # 958 "/usr/include/c++/8/bits/stl_multiset.h" 3 6242: template 6242: inline bool 6242: operator<(const multiset<_Key, _Compare, _Alloc>& __x, 6242: const multiset<_Key, _Compare, _Alloc>& __y) 6242: { return __x._M_t < __y._M_t; } 6242: 6242: 6242: template 6242: inline bool 6242: operator!=(const multiset<_Key, _Compare, _Alloc>& __x, 6242: const multiset<_Key, _Compare, _Alloc>& __y) 6242: { return !(__x == __y); } 6242: 6242: 6242: template 6242: inline bool 6242: operator>(const multiset<_Key,_Compare,_Alloc>& __x, 6242: const multiset<_Key,_Compare,_Alloc>& __y) 6242: { return __y < __x; } 6242: 6242: 6242: template 6242: inline bool 6242: operator<=(const multiset<_Key, _Compare, _Alloc>& __x, 6242: const multiset<_Key, _Compare, _Alloc>& __y) 6242: { return !(__y < __x); } 6242: 6242: 6242: template 6242: inline bool 6242: operator>=(const multiset<_Key, _Compare, _Alloc>& __x, 6242: const multiset<_Key, _Compare, _Alloc>& __y) 6242: { return !(__x < __y); } 6242: 6242: 6242: template 6242: inline void 6242: swap(multiset<_Key, _Compare, _Alloc>& __x, 6242: multiset<_Key, _Compare, _Alloc>& __y) 6242: noexcept(noexcept(__x.swap(__y))) 6242: { __x.swap(__y); } 6242: 6242: 6242: # 1023 "/usr/include/c++/8/bits/stl_multiset.h" 3 6242: 6242: } 6242: # 63 "/usr/include/c++/8/set" 2 3 6242: # 37 "/usr/include/boost/regex/v4/regex_workaround.hpp" 2 3 4 6242: # 1 "/usr/include/c++/8/map" 1 3 4 6242: # 58 "/usr/include/c++/8/map" 3 4 6242: 6242: # 59 "/usr/include/c++/8/map" 3 6242: 6242: 6242: # 1 "/usr/include/c++/8/bits/stl_map.h" 1 3 6242: # 66 "/usr/include/c++/8/bits/stl_map.h" 3 6242: namespace std __attribute__ ((__visibility__ ("default"))) 6242: { 6242: 6242: 6242: 6242: template 6242: class multimap; 6242: # 98 "/usr/include/c++/8/bits/stl_map.h" 3 6242: template , 6242: typename _Alloc = std::allocator > > 6242: class map 6242: { 6242: public: 6242: typedef _Key key_type; 6242: typedef _Tp mapped_type; 6242: typedef std::pair value_type; 6242: typedef _Compare key_compare; 6242: typedef _Alloc allocator_type; 6242: 6242: private: 6242: # 126 "/usr/include/c++/8/bits/stl_map.h" 3 6242: public: 6242: class value_compare 6242: : public std::binary_function 6242: { 6242: friend class map<_Key, _Tp, _Compare, _Alloc>; 6242: protected: 6242: _Compare comp; 6242: 6242: value_compare(_Compare __c) 6242: : comp(__c) { } 6242: 6242: public: 6242: bool operator()(const value_type& __x, const value_type& __y) const 6242: { return comp(__x.first, __y.first); } 6242: }; 6242: 6242: private: 6242: 6242: typedef typename __gnu_cxx::__alloc_traits<_Alloc>::template 6242: rebind::other _Pair_alloc_type; 6242: 6242: typedef _Rb_tree, 6242: key_compare, _Pair_alloc_type> _Rep_type; 6242: 6242: 6242: _Rep_type _M_t; 6242: 6242: typedef __gnu_cxx::__alloc_traits<_Pair_alloc_type> _Alloc_traits; 6242: 6242: public: 6242: 6242: 6242: typedef typename _Alloc_traits::pointer pointer; 6242: typedef typename _Alloc_traits::const_pointer const_pointer; 6242: typedef typename _Alloc_traits::reference reference; 6242: typedef typename _Alloc_traits::const_reference const_reference; 6242: typedef typename _Rep_type::iterator iterator; 6242: typedef typename _Rep_type::const_iterator const_iterator; 6242: typedef typename _Rep_type::size_type size_type; 6242: typedef typename _Rep_type::difference_type difference_type; 6242: typedef typename _Rep_type::reverse_iterator reverse_iterator; 6242: typedef typename _Rep_type::const_reverse_iterator const_reverse_iterator; 6242: # 183 "/usr/include/c++/8/bits/stl_map.h" 3 6242: map() = default; 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: explicit 6242: map(const _Compare& __comp, 6242: const allocator_type& __a = allocator_type()) 6242: : _M_t(__comp, _Pair_alloc_type(__a)) { } 6242: # 205 "/usr/include/c++/8/bits/stl_map.h" 3 6242: map(const map&) = default; 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: map(map&&) = default; 6242: # 226 "/usr/include/c++/8/bits/stl_map.h" 3 6242: map(initializer_list __l, 6242: const _Compare& __comp = _Compare(), 6242: const allocator_type& __a = allocator_type()) 6242: : _M_t(__comp, _Pair_alloc_type(__a)) 6242: { _M_t._M_insert_unique(__l.begin(), __l.end()); } 6242: 6242: 6242: explicit 6242: map(const allocator_type& __a) 6242: : _M_t(_Compare(), _Pair_alloc_type(__a)) { } 6242: 6242: 6242: map(const map& __m, const allocator_type& __a) 6242: : _M_t(__m._M_t, _Pair_alloc_type(__a)) { } 6242: 6242: 6242: map(map&& __m, const allocator_type& __a) 6242: noexcept(is_nothrow_copy_constructible<_Compare>::value 6242: && _Alloc_traits::_S_always_equal()) 6242: : _M_t(std::move(__m._M_t), _Pair_alloc_type(__a)) { } 6242: 6242: 6242: map(initializer_list __l, const allocator_type& __a) 6242: : _M_t(_Compare(), _Pair_alloc_type(__a)) 6242: { _M_t._M_insert_unique(__l.begin(), __l.end()); } 6242: 6242: 6242: template 6242: map(_InputIterator __first, _InputIterator __last, 6242: const allocator_type& __a) 6242: : _M_t(_Compare(), _Pair_alloc_type(__a)) 6242: { _M_t._M_insert_unique(__first, __last); } 6242: # 270 "/usr/include/c++/8/bits/stl_map.h" 3 6242: template 6242: map(_InputIterator __first, _InputIterator __last) 6242: : _M_t() 6242: { _M_t._M_insert_unique(__first, __last); } 6242: # 287 "/usr/include/c++/8/bits/stl_map.h" 3 6242: template 6242: map(_InputIterator __first, _InputIterator __last, 6242: const _Compare& __comp, 6242: const allocator_type& __a = allocator_type()) 6242: : _M_t(__comp, _Pair_alloc_type(__a)) 6242: { _M_t._M_insert_unique(__first, __last); } 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: ~map() = default; 6242: # 316 "/usr/include/c++/8/bits/stl_map.h" 3 6242: map& 6242: operator=(const map&) = default; 6242: 6242: 6242: map& 6242: operator=(map&&) = default; 6242: # 334 "/usr/include/c++/8/bits/stl_map.h" 3 6242: map& 6242: operator=(initializer_list __l) 6242: { 6242: _M_t._M_assign_unique(__l.begin(), __l.end()); 6242: return *this; 6242: } 6242: 6242: 6242: 6242: allocator_type 6242: get_allocator() const noexcept 6242: { return allocator_type(_M_t.get_allocator()); } 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: iterator 6242: begin() noexcept 6242: { return _M_t.begin(); } 6242: 6242: 6242: 6242: 6242: 6242: 6242: const_iterator 6242: begin() const noexcept 6242: { return _M_t.begin(); } 6242: 6242: 6242: 6242: 6242: 6242: 6242: iterator 6242: end() noexcept 6242: { return _M_t.end(); } 6242: 6242: 6242: 6242: 6242: 6242: 6242: const_iterator 6242: end() const noexcept 6242: { return _M_t.end(); } 6242: 6242: 6242: 6242: 6242: 6242: 6242: reverse_iterator 6242: rbegin() noexcept 6242: { return _M_t.rbegin(); } 6242: 6242: 6242: 6242: 6242: 6242: 6242: const_reverse_iterator 6242: rbegin() const noexcept 6242: { return _M_t.rbegin(); } 6242: 6242: 6242: 6242: 6242: 6242: 6242: reverse_iterator 6242: rend() noexcept 6242: { return _M_t.rend(); } 6242: 6242: 6242: 6242: 6242: 6242: 6242: const_reverse_iterator 6242: rend() const noexcept 6242: { return _M_t.rend(); } 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: const_iterator 6242: cbegin() const noexcept 6242: { return _M_t.begin(); } 6242: 6242: 6242: 6242: 6242: 6242: 6242: const_iterator 6242: cend() const noexcept 6242: { return _M_t.end(); } 6242: 6242: 6242: 6242: 6242: 6242: 6242: const_reverse_iterator 6242: crbegin() const noexcept 6242: { return _M_t.rbegin(); } 6242: 6242: 6242: 6242: 6242: 6242: 6242: const_reverse_iterator 6242: crend() const noexcept 6242: { return _M_t.rend(); } 6242: 6242: 6242: 6242: 6242: 6242: 6242: bool 6242: empty() const noexcept 6242: { return _M_t.empty(); } 6242: 6242: 6242: size_type 6242: size() const noexcept 6242: { return _M_t.size(); } 6242: 6242: 6242: size_type 6242: max_size() const noexcept 6242: { return _M_t.max_size(); } 6242: # 489 "/usr/include/c++/8/bits/stl_map.h" 3 6242: mapped_type& 6242: operator[](const key_type& __k) 6242: { 6242: 6242: 6242: 6242: iterator __i = lower_bound(__k); 6242: 6242: if (__i == end() || key_comp()(__k, (*__i).first)) 6242: 6242: __i = _M_t._M_emplace_hint_unique(__i, std::piecewise_construct, 6242: std::tuple(__k), 6242: std::tuple<>()); 6242: 6242: 6242: 6242: return (*__i).second; 6242: } 6242: 6242: 6242: mapped_type& 6242: operator[](key_type&& __k) 6242: { 6242: 6242: 6242: 6242: iterator __i = lower_bound(__k); 6242: 6242: if (__i == end() || key_comp()(__k, (*__i).first)) 6242: __i = _M_t._M_emplace_hint_unique(__i, std::piecewise_construct, 6242: std::forward_as_tuple(std::move(__k)), 6242: std::tuple<>()); 6242: return (*__i).second; 6242: } 6242: # 534 "/usr/include/c++/8/bits/stl_map.h" 3 6242: mapped_type& 6242: at(const key_type& __k) 6242: { 6242: iterator __i = lower_bound(__k); 6242: if (__i == end() || key_comp()(__k, (*__i).first)) 6242: __throw_out_of_range(("map::at")); 6242: return (*__i).second; 6242: } 6242: 6242: const mapped_type& 6242: at(const key_type& __k) const 6242: { 6242: const_iterator __i = lower_bound(__k); 6242: if (__i == end() || key_comp()(__k, (*__i).first)) 6242: __throw_out_of_range(("map::at")); 6242: return (*__i).second; 6242: } 6242: # 572 "/usr/include/c++/8/bits/stl_map.h" 3 6242: template 6242: std::pair 6242: emplace(_Args&&... __args) 6242: { return _M_t._M_emplace_unique(std::forward<_Args>(__args)...); } 6242: # 602 "/usr/include/c++/8/bits/stl_map.h" 3 6242: template 6242: iterator 6242: emplace_hint(const_iterator __pos, _Args&&... __args) 6242: { 6242: return _M_t._M_emplace_hint_unique(__pos, 6242: std::forward<_Args>(__args)...); 6242: } 6242: # 800 "/usr/include/c++/8/bits/stl_map.h" 3 6242: std::pair 6242: insert(const value_type& __x) 6242: { return _M_t._M_insert_unique(__x); } 6242: 6242: 6242: 6242: 6242: std::pair 6242: insert(value_type&& __x) 6242: { return _M_t._M_insert_unique(std::move(__x)); } 6242: 6242: template::value>::type> 6242: std::pair 6242: insert(_Pair&& __x) 6242: { return _M_t._M_insert_unique(std::forward<_Pair>(__x)); } 6242: # 828 "/usr/include/c++/8/bits/stl_map.h" 3 6242: void 6242: insert(std::initializer_list __list) 6242: { insert(__list.begin(), __list.end()); } 6242: # 857 "/usr/include/c++/8/bits/stl_map.h" 3 6242: iterator 6242: 6242: insert(const_iterator __position, const value_type& __x) 6242: 6242: 6242: 6242: { return _M_t._M_insert_unique_(__position, __x); } 6242: 6242: 6242: 6242: 6242: iterator 6242: insert(const_iterator __position, value_type&& __x) 6242: { return _M_t._M_insert_unique_(__position, std::move(__x)); } 6242: 6242: template::value>::type> 6242: iterator 6242: insert(const_iterator __position, _Pair&& __x) 6242: { return _M_t._M_insert_unique_(__position, 6242: std::forward<_Pair>(__x)); } 6242: # 890 "/usr/include/c++/8/bits/stl_map.h" 3 6242: template 6242: void 6242: insert(_InputIterator __first, _InputIterator __last) 6242: { _M_t._M_insert_unique(__first, __last); } 6242: # 1030 "/usr/include/c++/8/bits/stl_map.h" 3 6242: iterator 6242: erase(const_iterator __position) 6242: { return _M_t.erase(__position); } 6242: 6242: 6242: __attribute ((__abi_tag__ ("cxx11"))) 6242: iterator 6242: erase(iterator __position) 6242: { return _M_t.erase(__position); } 6242: # 1067 "/usr/include/c++/8/bits/stl_map.h" 3 6242: size_type 6242: erase(const key_type& __x) 6242: { return _M_t.erase(__x); } 6242: # 1087 "/usr/include/c++/8/bits/stl_map.h" 3 6242: iterator 6242: erase(const_iterator __first, const_iterator __last) 6242: { return _M_t.erase(__first, __last); } 6242: # 1121 "/usr/include/c++/8/bits/stl_map.h" 3 6242: void 6242: swap(map& __x) 6242: noexcept(__is_nothrow_swappable<_Compare>::value) 6242: { _M_t.swap(__x._M_t); } 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: void 6242: clear() noexcept 6242: { _M_t.clear(); } 6242: 6242: 6242: 6242: 6242: 6242: 6242: key_compare 6242: key_comp() const 6242: { return _M_t.key_comp(); } 6242: 6242: 6242: 6242: 6242: 6242: value_compare 6242: value_comp() const 6242: { return value_compare(_M_t.key_comp()); } 6242: # 1168 "/usr/include/c++/8/bits/stl_map.h" 3 6242: iterator 6242: find(const key_type& __x) 6242: { return _M_t.find(__x); } 6242: # 1193 "/usr/include/c++/8/bits/stl_map.h" 3 6242: const_iterator 6242: find(const key_type& __x) const 6242: { return _M_t.find(__x); } 6242: # 1214 "/usr/include/c++/8/bits/stl_map.h" 3 6242: size_type 6242: count(const key_type& __x) const 6242: { return _M_t.find(__x) == _M_t.end() ? 0 : 1; } 6242: # 1238 "/usr/include/c++/8/bits/stl_map.h" 3 6242: iterator 6242: lower_bound(const key_type& __x) 6242: { return _M_t.lower_bound(__x); } 6242: # 1263 "/usr/include/c++/8/bits/stl_map.h" 3 6242: const_iterator 6242: lower_bound(const key_type& __x) const 6242: { return _M_t.lower_bound(__x); } 6242: # 1283 "/usr/include/c++/8/bits/stl_map.h" 3 6242: iterator 6242: upper_bound(const key_type& __x) 6242: { return _M_t.upper_bound(__x); } 6242: # 1303 "/usr/include/c++/8/bits/stl_map.h" 3 6242: const_iterator 6242: upper_bound(const key_type& __x) const 6242: { return _M_t.upper_bound(__x); } 6242: # 1332 "/usr/include/c++/8/bits/stl_map.h" 3 6242: std::pair 6242: equal_range(const key_type& __x) 6242: { return _M_t.equal_range(__x); } 6242: # 1361 "/usr/include/c++/8/bits/stl_map.h" 3 6242: std::pair 6242: equal_range(const key_type& __x) const 6242: { return _M_t.equal_range(__x); } 6242: # 1378 "/usr/include/c++/8/bits/stl_map.h" 3 6242: template 6242: friend bool 6242: operator==(const map<_K1, _T1, _C1, _A1>&, 6242: const map<_K1, _T1, _C1, _A1>&); 6242: 6242: template 6242: friend bool 6242: operator<(const map<_K1, _T1, _C1, _A1>&, 6242: const map<_K1, _T1, _C1, _A1>&); 6242: }; 6242: # 1433 "/usr/include/c++/8/bits/stl_map.h" 3 6242: template 6242: inline bool 6242: operator==(const map<_Key, _Tp, _Compare, _Alloc>& __x, 6242: const map<_Key, _Tp, _Compare, _Alloc>& __y) 6242: { return __x._M_t == __y._M_t; } 6242: # 1450 "/usr/include/c++/8/bits/stl_map.h" 3 6242: template 6242: inline bool 6242: operator<(const map<_Key, _Tp, _Compare, _Alloc>& __x, 6242: const map<_Key, _Tp, _Compare, _Alloc>& __y) 6242: { return __x._M_t < __y._M_t; } 6242: 6242: 6242: template 6242: inline bool 6242: operator!=(const map<_Key, _Tp, _Compare, _Alloc>& __x, 6242: const map<_Key, _Tp, _Compare, _Alloc>& __y) 6242: { return !(__x == __y); } 6242: 6242: 6242: template 6242: inline bool 6242: operator>(const map<_Key, _Tp, _Compare, _Alloc>& __x, 6242: const map<_Key, _Tp, _Compare, _Alloc>& __y) 6242: { return __y < __x; } 6242: 6242: 6242: template 6242: inline bool 6242: operator<=(const map<_Key, _Tp, _Compare, _Alloc>& __x, 6242: const map<_Key, _Tp, _Compare, _Alloc>& __y) 6242: { return !(__y < __x); } 6242: 6242: 6242: template 6242: inline bool 6242: operator>=(const map<_Key, _Tp, _Compare, _Alloc>& __x, 6242: const map<_Key, _Tp, _Compare, _Alloc>& __y) 6242: { return !(__x < __y); } 6242: 6242: 6242: template 6242: inline void 6242: swap(map<_Key, _Tp, _Compare, _Alloc>& __x, 6242: map<_Key, _Tp, _Compare, _Alloc>& __y) 6242: noexcept(noexcept(__x.swap(__y))) 6242: { __x.swap(__y); } 6242: 6242: 6242: # 1515 "/usr/include/c++/8/bits/stl_map.h" 3 6242: 6242: } 6242: # 62 "/usr/include/c++/8/map" 2 3 6242: # 1 "/usr/include/c++/8/bits/stl_multimap.h" 1 3 6242: # 64 "/usr/include/c++/8/bits/stl_multimap.h" 3 6242: namespace std __attribute__ ((__visibility__ ("default"))) 6242: { 6242: 6242: 6242: 6242: template 6242: class map; 6242: # 96 "/usr/include/c++/8/bits/stl_multimap.h" 3 6242: template , 6242: typename _Alloc = std::allocator > > 6242: class multimap 6242: { 6242: public: 6242: typedef _Key key_type; 6242: typedef _Tp mapped_type; 6242: typedef std::pair value_type; 6242: typedef _Compare key_compare; 6242: typedef _Alloc allocator_type; 6242: 6242: private: 6242: # 125 "/usr/include/c++/8/bits/stl_multimap.h" 3 6242: public: 6242: class value_compare 6242: : public std::binary_function 6242: { 6242: friend class multimap<_Key, _Tp, _Compare, _Alloc>; 6242: protected: 6242: _Compare comp; 6242: 6242: value_compare(_Compare __c) 6242: : comp(__c) { } 6242: 6242: public: 6242: bool operator()(const value_type& __x, const value_type& __y) const 6242: { return comp(__x.first, __y.first); } 6242: }; 6242: 6242: private: 6242: 6242: typedef typename __gnu_cxx::__alloc_traits<_Alloc>::template 6242: rebind::other _Pair_alloc_type; 6242: 6242: typedef _Rb_tree, 6242: key_compare, _Pair_alloc_type> _Rep_type; 6242: 6242: _Rep_type _M_t; 6242: 6242: typedef __gnu_cxx::__alloc_traits<_Pair_alloc_type> _Alloc_traits; 6242: 6242: public: 6242: 6242: 6242: typedef typename _Alloc_traits::pointer pointer; 6242: typedef typename _Alloc_traits::const_pointer const_pointer; 6242: typedef typename _Alloc_traits::reference reference; 6242: typedef typename _Alloc_traits::const_reference const_reference; 6242: typedef typename _Rep_type::iterator iterator; 6242: typedef typename _Rep_type::const_iterator const_iterator; 6242: typedef typename _Rep_type::size_type size_type; 6242: typedef typename _Rep_type::difference_type difference_type; 6242: typedef typename _Rep_type::reverse_iterator reverse_iterator; 6242: typedef typename _Rep_type::const_reverse_iterator const_reverse_iterator; 6242: # 180 "/usr/include/c++/8/bits/stl_multimap.h" 3 6242: multimap() = default; 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: explicit 6242: multimap(const _Compare& __comp, 6242: const allocator_type& __a = allocator_type()) 6242: : _M_t(__comp, _Pair_alloc_type(__a)) { } 6242: # 202 "/usr/include/c++/8/bits/stl_multimap.h" 3 6242: multimap(const multimap&) = default; 6242: # 211 "/usr/include/c++/8/bits/stl_multimap.h" 3 6242: multimap(multimap&&) = default; 6242: # 223 "/usr/include/c++/8/bits/stl_multimap.h" 3 6242: multimap(initializer_list __l, 6242: const _Compare& __comp = _Compare(), 6242: const allocator_type& __a = allocator_type()) 6242: : _M_t(__comp, _Pair_alloc_type(__a)) 6242: { _M_t._M_insert_equal(__l.begin(), __l.end()); } 6242: 6242: 6242: explicit 6242: multimap(const allocator_type& __a) 6242: : _M_t(_Compare(), _Pair_alloc_type(__a)) { } 6242: 6242: 6242: multimap(const multimap& __m, const allocator_type& __a) 6242: : _M_t(__m._M_t, _Pair_alloc_type(__a)) { } 6242: 6242: 6242: multimap(multimap&& __m, const allocator_type& __a) 6242: noexcept(is_nothrow_copy_constructible<_Compare>::value 6242: && _Alloc_traits::_S_always_equal()) 6242: : _M_t(std::move(__m._M_t), _Pair_alloc_type(__a)) { } 6242: 6242: 6242: multimap(initializer_list __l, const allocator_type& __a) 6242: : _M_t(_Compare(), _Pair_alloc_type(__a)) 6242: { _M_t._M_insert_equal(__l.begin(), __l.end()); } 6242: 6242: 6242: template 6242: multimap(_InputIterator __first, _InputIterator __last, 6242: const allocator_type& __a) 6242: : _M_t(_Compare(), _Pair_alloc_type(__a)) 6242: { _M_t._M_insert_equal(__first, __last); } 6242: # 266 "/usr/include/c++/8/bits/stl_multimap.h" 3 6242: template 6242: multimap(_InputIterator __first, _InputIterator __last) 6242: : _M_t() 6242: { _M_t._M_insert_equal(__first, __last); } 6242: # 282 "/usr/include/c++/8/bits/stl_multimap.h" 3 6242: template 6242: multimap(_InputIterator __first, _InputIterator __last, 6242: const _Compare& __comp, 6242: const allocator_type& __a = allocator_type()) 6242: : _M_t(__comp, _Pair_alloc_type(__a)) 6242: { _M_t._M_insert_equal(__first, __last); } 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: ~multimap() = default; 6242: # 311 "/usr/include/c++/8/bits/stl_multimap.h" 3 6242: multimap& 6242: operator=(const multimap&) = default; 6242: 6242: 6242: multimap& 6242: operator=(multimap&&) = default; 6242: # 329 "/usr/include/c++/8/bits/stl_multimap.h" 3 6242: multimap& 6242: operator=(initializer_list __l) 6242: { 6242: _M_t._M_assign_equal(__l.begin(), __l.end()); 6242: return *this; 6242: } 6242: 6242: 6242: 6242: allocator_type 6242: get_allocator() const noexcept 6242: { return allocator_type(_M_t.get_allocator()); } 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: iterator 6242: begin() noexcept 6242: { return _M_t.begin(); } 6242: 6242: 6242: 6242: 6242: 6242: 6242: const_iterator 6242: begin() const noexcept 6242: { return _M_t.begin(); } 6242: 6242: 6242: 6242: 6242: 6242: 6242: iterator 6242: end() noexcept 6242: { return _M_t.end(); } 6242: 6242: 6242: 6242: 6242: 6242: 6242: const_iterator 6242: end() const noexcept 6242: { return _M_t.end(); } 6242: 6242: 6242: 6242: 6242: 6242: 6242: reverse_iterator 6242: rbegin() noexcept 6242: { return _M_t.rbegin(); } 6242: 6242: 6242: 6242: 6242: 6242: 6242: const_reverse_iterator 6242: rbegin() const noexcept 6242: { return _M_t.rbegin(); } 6242: 6242: 6242: 6242: 6242: 6242: 6242: reverse_iterator 6242: rend() noexcept 6242: { return _M_t.rend(); } 6242: 6242: 6242: 6242: 6242: 6242: 6242: const_reverse_iterator 6242: rend() const noexcept 6242: { return _M_t.rend(); } 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: const_iterator 6242: cbegin() const noexcept 6242: { return _M_t.begin(); } 6242: 6242: 6242: 6242: 6242: 6242: 6242: const_iterator 6242: cend() const noexcept 6242: { return _M_t.end(); } 6242: 6242: 6242: 6242: 6242: 6242: 6242: const_reverse_iterator 6242: crbegin() const noexcept 6242: { return _M_t.rbegin(); } 6242: 6242: 6242: 6242: 6242: 6242: 6242: const_reverse_iterator 6242: crend() const noexcept 6242: { return _M_t.rend(); } 6242: 6242: 6242: 6242: 6242: bool 6242: empty() const noexcept 6242: { return _M_t.empty(); } 6242: 6242: 6242: size_type 6242: size() const noexcept 6242: { return _M_t.size(); } 6242: 6242: 6242: size_type 6242: max_size() const noexcept 6242: { return _M_t.max_size(); } 6242: # 487 "/usr/include/c++/8/bits/stl_multimap.h" 3 6242: template 6242: iterator 6242: emplace(_Args&&... __args) 6242: { return _M_t._M_emplace_equal(std::forward<_Args>(__args)...); } 6242: # 514 "/usr/include/c++/8/bits/stl_multimap.h" 3 6242: template 6242: iterator 6242: emplace_hint(const_iterator __pos, _Args&&... __args) 6242: { 6242: return _M_t._M_emplace_hint_equal(__pos, 6242: std::forward<_Args>(__args)...); 6242: } 6242: # 536 "/usr/include/c++/8/bits/stl_multimap.h" 3 6242: iterator 6242: insert(const value_type& __x) 6242: { return _M_t._M_insert_equal(__x); } 6242: 6242: 6242: 6242: 6242: iterator 6242: insert(value_type&& __x) 6242: { return _M_t._M_insert_equal(std::move(__x)); } 6242: 6242: template::value>::type> 6242: iterator 6242: insert(_Pair&& __x) 6242: { return _M_t._M_insert_equal(std::forward<_Pair>(__x)); } 6242: # 577 "/usr/include/c++/8/bits/stl_multimap.h" 3 6242: iterator 6242: 6242: insert(const_iterator __position, const value_type& __x) 6242: 6242: 6242: 6242: { return _M_t._M_insert_equal_(__position, __x); } 6242: 6242: 6242: 6242: 6242: iterator 6242: insert(const_iterator __position, value_type&& __x) 6242: { return _M_t._M_insert_equal_(__position, std::move(__x)); } 6242: 6242: template::value>::type> 6242: iterator 6242: insert(const_iterator __position, _Pair&& __x) 6242: { return _M_t._M_insert_equal_(__position, 6242: std::forward<_Pair>(__x)); } 6242: # 611 "/usr/include/c++/8/bits/stl_multimap.h" 3 6242: template 6242: void 6242: insert(_InputIterator __first, _InputIterator __last) 6242: { _M_t._M_insert_equal(__first, __last); } 6242: # 624 "/usr/include/c++/8/bits/stl_multimap.h" 3 6242: void 6242: insert(initializer_list __l) 6242: { this->insert(__l.begin(), __l.end()); } 6242: # 701 "/usr/include/c++/8/bits/stl_multimap.h" 3 6242: iterator 6242: erase(const_iterator __position) 6242: { return _M_t.erase(__position); } 6242: 6242: 6242: __attribute ((__abi_tag__ ("cxx11"))) 6242: iterator 6242: erase(iterator __position) 6242: { return _M_t.erase(__position); } 6242: # 738 "/usr/include/c++/8/bits/stl_multimap.h" 3 6242: size_type 6242: erase(const key_type& __x) 6242: { return _M_t.erase(__x); } 6242: # 759 "/usr/include/c++/8/bits/stl_multimap.h" 3 6242: iterator 6242: erase(const_iterator __first, const_iterator __last) 6242: { return _M_t.erase(__first, __last); } 6242: # 796 "/usr/include/c++/8/bits/stl_multimap.h" 3 6242: void 6242: swap(multimap& __x) 6242: noexcept(__is_nothrow_swappable<_Compare>::value) 6242: { _M_t.swap(__x._M_t); } 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: void 6242: clear() noexcept 6242: { _M_t.clear(); } 6242: 6242: 6242: 6242: 6242: 6242: 6242: key_compare 6242: key_comp() const 6242: { return _M_t.key_comp(); } 6242: 6242: 6242: 6242: 6242: 6242: value_compare 6242: value_comp() const 6242: { return value_compare(_M_t.key_comp()); } 6242: # 842 "/usr/include/c++/8/bits/stl_multimap.h" 3 6242: iterator 6242: find(const key_type& __x) 6242: { return _M_t.find(__x); } 6242: # 866 "/usr/include/c++/8/bits/stl_multimap.h" 3 6242: const_iterator 6242: find(const key_type& __x) const 6242: { return _M_t.find(__x); } 6242: # 884 "/usr/include/c++/8/bits/stl_multimap.h" 3 6242: size_type 6242: count(const key_type& __x) const 6242: { return _M_t.count(__x); } 6242: # 908 "/usr/include/c++/8/bits/stl_multimap.h" 3 6242: iterator 6242: lower_bound(const key_type& __x) 6242: { return _M_t.lower_bound(__x); } 6242: # 933 "/usr/include/c++/8/bits/stl_multimap.h" 3 6242: const_iterator 6242: lower_bound(const key_type& __x) const 6242: { return _M_t.lower_bound(__x); } 6242: # 953 "/usr/include/c++/8/bits/stl_multimap.h" 3 6242: iterator 6242: upper_bound(const key_type& __x) 6242: { return _M_t.upper_bound(__x); } 6242: # 973 "/usr/include/c++/8/bits/stl_multimap.h" 3 6242: const_iterator 6242: upper_bound(const key_type& __x) const 6242: { return _M_t.upper_bound(__x); } 6242: # 1000 "/usr/include/c++/8/bits/stl_multimap.h" 3 6242: std::pair 6242: equal_range(const key_type& __x) 6242: { return _M_t.equal_range(__x); } 6242: # 1027 "/usr/include/c++/8/bits/stl_multimap.h" 3 6242: std::pair 6242: equal_range(const key_type& __x) const 6242: { return _M_t.equal_range(__x); } 6242: # 1044 "/usr/include/c++/8/bits/stl_multimap.h" 3 6242: template 6242: friend bool 6242: operator==(const multimap<_K1, _T1, _C1, _A1>&, 6242: const multimap<_K1, _T1, _C1, _A1>&); 6242: 6242: template 6242: friend bool 6242: operator<(const multimap<_K1, _T1, _C1, _A1>&, 6242: const multimap<_K1, _T1, _C1, _A1>&); 6242: }; 6242: # 1098 "/usr/include/c++/8/bits/stl_multimap.h" 3 6242: template 6242: inline bool 6242: operator==(const multimap<_Key, _Tp, _Compare, _Alloc>& __x, 6242: const multimap<_Key, _Tp, _Compare, _Alloc>& __y) 6242: { return __x._M_t == __y._M_t; } 6242: # 1115 "/usr/include/c++/8/bits/stl_multimap.h" 3 6242: template 6242: inline bool 6242: operator<(const multimap<_Key, _Tp, _Compare, _Alloc>& __x, 6242: const multimap<_Key, _Tp, _Compare, _Alloc>& __y) 6242: { return __x._M_t < __y._M_t; } 6242: 6242: 6242: template 6242: inline bool 6242: operator!=(const multimap<_Key, _Tp, _Compare, _Alloc>& __x, 6242: const multimap<_Key, _Tp, _Compare, _Alloc>& __y) 6242: { return !(__x == __y); } 6242: 6242: 6242: template 6242: inline bool 6242: operator>(const multimap<_Key, _Tp, _Compare, _Alloc>& __x, 6242: const multimap<_Key, _Tp, _Compare, _Alloc>& __y) 6242: { return __y < __x; } 6242: 6242: 6242: template 6242: inline bool 6242: operator<=(const multimap<_Key, _Tp, _Compare, _Alloc>& __x, 6242: const multimap<_Key, _Tp, _Compare, _Alloc>& __y) 6242: { return !(__y < __x); } 6242: 6242: 6242: template 6242: inline bool 6242: operator>=(const multimap<_Key, _Tp, _Compare, _Alloc>& __x, 6242: const multimap<_Key, _Tp, _Compare, _Alloc>& __y) 6242: { return !(__x < __y); } 6242: 6242: 6242: template 6242: inline void 6242: swap(multimap<_Key, _Tp, _Compare, _Alloc>& __x, 6242: multimap<_Key, _Tp, _Compare, _Alloc>& __y) 6242: noexcept(noexcept(__x.swap(__y))) 6242: { __x.swap(__y); } 6242: 6242: 6242: # 1180 "/usr/include/c++/8/bits/stl_multimap.h" 3 6242: 6242: } 6242: # 63 "/usr/include/c++/8/map" 2 3 6242: # 38 "/usr/include/boost/regex/v4/regex_workaround.hpp" 2 3 4 6242: # 1 "/usr/include/boost/limits.hpp" 1 3 4 6242: # 39 "/usr/include/boost/regex/v4/regex_workaround.hpp" 2 3 4 6242: # 1 "/usr/include/boost/assert.hpp" 1 3 4 6242: # 58 "/usr/include/boost/assert.hpp" 3 4 6242: # 1 "/usr/include/assert.h" 1 3 4 6242: # 59 "/usr/include/boost/assert.hpp" 2 3 4 6242: # 40 "/usr/include/boost/regex/v4/regex_workaround.hpp" 2 3 4 6242: # 1 "/usr/include/boost/cstdint.hpp" 1 3 4 6242: # 103 "/usr/include/boost/cstdint.hpp" 3 4 6242: namespace boost 6242: { 6242: 6242: using ::int8_t; 6242: using ::int_least8_t; 6242: using ::int_fast8_t; 6242: using ::uint8_t; 6242: using ::uint_least8_t; 6242: using ::uint_fast8_t; 6242: 6242: using ::int16_t; 6242: using ::int_least16_t; 6242: using ::int_fast16_t; 6242: using ::uint16_t; 6242: using ::uint_least16_t; 6242: using ::uint_fast16_t; 6242: 6242: using ::int32_t; 6242: using ::int_least32_t; 6242: using ::int_fast32_t; 6242: using ::uint32_t; 6242: using ::uint_least32_t; 6242: using ::uint_fast32_t; 6242: 6242: 6242: 6242: using ::int64_t; 6242: using ::int_least64_t; 6242: using ::int_fast64_t; 6242: using ::uint64_t; 6242: using ::uint_least64_t; 6242: using ::uint_fast64_t; 6242: 6242: 6242: 6242: using ::intmax_t; 6242: using ::uintmax_t; 6242: 6242: } 6242: # 379 "/usr/include/boost/cstdint.hpp" 3 4 6242: namespace boost { 6242: using ::intptr_t; 6242: using ::uintptr_t; 6242: } 6242: # 41 "/usr/include/boost/regex/v4/regex_workaround.hpp" 2 3 4 6242: # 1 "/usr/include/boost/throw_exception.hpp" 1 3 4 6242: 6242: 6242: 6242: 6242: # 5 "/usr/include/boost/throw_exception.hpp" 3 6242: # 29 "/usr/include/boost/throw_exception.hpp" 3 6242: # 1 "/usr/include/boost/detail/workaround.hpp" 1 3 4 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: # 1 "/usr/include/boost/config/workaround.hpp" 1 3 4 6242: # 9 "/usr/include/boost/detail/workaround.hpp" 2 3 4 6242: # 30 "/usr/include/boost/throw_exception.hpp" 2 3 6242: # 42 "/usr/include/boost/throw_exception.hpp" 3 6242: # 1 "/usr/include/boost/exception/exception.hpp" 1 3 4 6242: # 9 "/usr/include/boost/exception/exception.hpp" 3 4 6242: 6242: # 10 "/usr/include/boost/exception/exception.hpp" 3 6242: # 19 "/usr/include/boost/exception/exception.hpp" 3 6242: namespace boost { template class shared_ptr; }; 6242: namespace boost { namespace exception_detail { using boost::shared_ptr; } } 6242: 6242: 6242: namespace 6242: boost 6242: { 6242: namespace 6242: exception_detail 6242: { 6242: template 6242: class 6242: refcount_ptr 6242: { 6242: public: 6242: 6242: refcount_ptr(): 6242: px_(0) 6242: { 6242: } 6242: 6242: ~refcount_ptr() 6242: { 6242: release(); 6242: } 6242: 6242: refcount_ptr( refcount_ptr const & x ): 6242: px_(x.px_) 6242: { 6242: add_ref(); 6242: } 6242: 6242: refcount_ptr & 6242: operator=( refcount_ptr const & x ) 6242: { 6242: adopt(x.px_); 6242: return *this; 6242: } 6242: 6242: void 6242: adopt( T * px ) 6242: { 6242: release(); 6242: px_=px; 6242: add_ref(); 6242: } 6242: 6242: T * 6242: get() const 6242: { 6242: return px_; 6242: } 6242: 6242: private: 6242: 6242: T * px_; 6242: 6242: void 6242: add_ref() 6242: { 6242: if( px_ ) 6242: px_->add_ref(); 6242: } 6242: 6242: void 6242: release() 6242: { 6242: if( px_ && px_->release() ) 6242: px_=0; 6242: } 6242: }; 6242: } 6242: 6242: 6242: 6242: template 6242: class error_info; 6242: 6242: typedef error_info throw_function; 6242: typedef error_info throw_file; 6242: typedef error_info throw_line; 6242: 6242: template <> 6242: class 6242: error_info 6242: { 6242: public: 6242: typedef char const * value_type; 6242: value_type v_; 6242: explicit 6242: error_info( value_type v ): 6242: v_(v) 6242: { 6242: } 6242: }; 6242: 6242: template <> 6242: class 6242: error_info 6242: { 6242: public: 6242: typedef char const * value_type; 6242: value_type v_; 6242: explicit 6242: error_info( value_type v ): 6242: v_(v) 6242: { 6242: } 6242: }; 6242: 6242: template <> 6242: class 6242: error_info 6242: { 6242: public: 6242: typedef int value_type; 6242: value_type v_; 6242: explicit 6242: error_info( value_type v ): 6242: v_(v) 6242: { 6242: } 6242: }; 6242: 6242: 6242: 6242: #pragma GCC visibility push (default) 6242: 6242: 6242: class exception; 6242: 6242: 6242: #pragma GCC visibility pop 6242: 6242: 6242: 6242: namespace 6242: exception_detail 6242: { 6242: class error_info_base; 6242: struct type_info_; 6242: 6242: struct 6242: error_info_container 6242: { 6242: virtual char const * diagnostic_information( char const * ) const = 0; 6242: virtual shared_ptr get( type_info_ const & ) const = 0; 6242: virtual void set( shared_ptr const &, type_info_ const & ) = 0; 6242: virtual void add_ref() const = 0; 6242: virtual bool release() const = 0; 6242: virtual refcount_ptr clone() const = 0; 6242: 6242: protected: 6242: 6242: ~error_info_container() throw() 6242: { 6242: } 6242: }; 6242: 6242: template 6242: struct get_info; 6242: 6242: template <> 6242: struct get_info; 6242: 6242: template <> 6242: struct get_info; 6242: 6242: template <> 6242: struct get_info; 6242: 6242: template 6242: struct set_info_rv; 6242: 6242: template <> 6242: struct set_info_rv; 6242: 6242: template <> 6242: struct set_info_rv; 6242: 6242: template <> 6242: struct set_info_rv; 6242: 6242: char const * get_diagnostic_information( exception const &, char const * ); 6242: 6242: void copy_boost_exception( exception *, exception const * ); 6242: 6242: template 6242: E const & set_info( E const &, error_info const & ); 6242: 6242: template 6242: E const & set_info( E const &, throw_function const & ); 6242: 6242: template 6242: E const & set_info( E const &, throw_file const & ); 6242: 6242: template 6242: E const & set_info( E const &, throw_line const & ); 6242: } 6242: 6242: 6242: 6242: #pragma GCC visibility push (default) 6242: 6242: 6242: class 6242: exception 6242: { 6242: 6242: public: 6242: template void set( typename Tag::type const & ); 6242: template typename Tag::type const * get() const; 6242: 6242: 6242: protected: 6242: 6242: exception(): 6242: throw_function_(0), 6242: throw_file_(0), 6242: throw_line_(-1) 6242: { 6242: } 6242: # 254 "/usr/include/boost/exception/exception.hpp" 3 6242: virtual ~exception() throw() 6242: 6242: = 0 6242: 6242: ; 6242: 6242: 6242: 6242: 6242: private: 6242: 6242: template 6242: friend E const & exception_detail::set_info( E const &, throw_function const & ); 6242: 6242: template 6242: friend E const & exception_detail::set_info( E const &, throw_file const & ); 6242: 6242: template 6242: friend E const & exception_detail::set_info( E const &, throw_line const & ); 6242: 6242: template 6242: friend E const & exception_detail::set_info( E const &, error_info const & ); 6242: 6242: friend char const * exception_detail::get_diagnostic_information( exception const &, char const * ); 6242: 6242: template 6242: friend struct exception_detail::get_info; 6242: friend struct exception_detail::get_info; 6242: friend struct exception_detail::get_info; 6242: friend struct exception_detail::get_info; 6242: template 6242: friend struct exception_detail::set_info_rv; 6242: friend struct exception_detail::set_info_rv; 6242: friend struct exception_detail::set_info_rv; 6242: friend struct exception_detail::set_info_rv; 6242: friend void exception_detail::copy_boost_exception( exception *, exception const * ); 6242: 6242: mutable exception_detail::refcount_ptr data_; 6242: mutable char const * throw_function_; 6242: mutable char const * throw_file_; 6242: mutable int throw_line_; 6242: }; 6242: 6242: 6242: #pragma GCC visibility pop 6242: 6242: 6242: 6242: inline 6242: exception:: 6242: ~exception() throw() 6242: { 6242: } 6242: 6242: namespace 6242: exception_detail 6242: { 6242: template 6242: E const & 6242: set_info( E const & x, throw_function const & y ) 6242: { 6242: x.throw_function_=y.v_; 6242: return x; 6242: } 6242: 6242: template 6242: E const & 6242: set_info( E const & x, throw_file const & y ) 6242: { 6242: x.throw_file_=y.v_; 6242: return x; 6242: } 6242: 6242: template 6242: E const & 6242: set_info( E const & x, throw_line const & y ) 6242: { 6242: x.throw_line_=y.v_; 6242: return x; 6242: } 6242: } 6242: 6242: 6242: 6242: namespace 6242: exception_detail 6242: { 6242: 6242: 6242: #pragma GCC visibility push (default) 6242: 6242: 6242: template 6242: struct 6242: error_info_injector: 6242: public T, 6242: public exception 6242: { 6242: explicit 6242: error_info_injector( T const & x ): 6242: T(x) 6242: { 6242: } 6242: 6242: ~error_info_injector() throw() 6242: { 6242: } 6242: }; 6242: 6242: 6242: #pragma GCC visibility pop 6242: 6242: 6242: 6242: struct large_size { char c[256]; }; 6242: large_size dispatch_boost_exception( exception const * ); 6242: 6242: struct small_size { }; 6242: small_size dispatch_boost_exception( void const * ); 6242: 6242: template 6242: struct enable_error_info_helper; 6242: 6242: template 6242: struct 6242: enable_error_info_helper 6242: { 6242: typedef T type; 6242: }; 6242: 6242: template 6242: struct 6242: enable_error_info_helper 6242: { 6242: typedef error_info_injector type; 6242: }; 6242: 6242: template 6242: struct 6242: enable_error_info_return_type 6242: { 6242: typedef typename enable_error_info_helper(0)))>::type type; 6242: }; 6242: } 6242: 6242: template 6242: inline 6242: typename 6242: exception_detail::enable_error_info_return_type::type 6242: enable_error_info( T const & x ) 6242: { 6242: typedef typename exception_detail::enable_error_info_return_type::type rt; 6242: return rt(x); 6242: } 6242: 6242: 6242: 6242: namespace 6242: exception_detail 6242: { 6242: 6242: 6242: #pragma GCC visibility push (default) 6242: 6242: 6242: class 6242: clone_base 6242: { 6242: public: 6242: 6242: virtual clone_base const * clone() const = 0; 6242: virtual void rethrow() const = 0; 6242: 6242: virtual 6242: ~clone_base() throw() 6242: { 6242: } 6242: }; 6242: 6242: 6242: #pragma GCC visibility pop 6242: 6242: 6242: 6242: inline 6242: void 6242: copy_boost_exception( exception * a, exception const * b ) 6242: { 6242: refcount_ptr data; 6242: if( error_info_container * d=b->data_.get() ) 6242: data = d->clone(); 6242: a->throw_file_ = b->throw_file_; 6242: a->throw_line_ = b->throw_line_; 6242: a->throw_function_ = b->throw_function_; 6242: a->data_ = data; 6242: } 6242: 6242: inline 6242: void 6242: copy_boost_exception( void *, void const * ) 6242: { 6242: } 6242: 6242: 6242: 6242: #pragma GCC visibility push (default) 6242: 6242: 6242: template 6242: class 6242: clone_impl: 6242: public T, 6242: public virtual clone_base 6242: { 6242: struct clone_tag { }; 6242: clone_impl( clone_impl const & x, clone_tag ): 6242: T(x) 6242: { 6242: copy_boost_exception(this,&x); 6242: } 6242: 6242: public: 6242: 6242: explicit 6242: clone_impl( T const & x ): 6242: T(x) 6242: { 6242: copy_boost_exception(this,&x); 6242: } 6242: 6242: ~clone_impl() throw() 6242: { 6242: } 6242: 6242: private: 6242: 6242: clone_base const * 6242: clone() const 6242: { 6242: return new clone_impl(*this,clone_tag()); 6242: } 6242: 6242: void 6242: rethrow() const 6242: { 6242: throw*this; 6242: } 6242: }; 6242: } 6242: 6242: 6242: #pragma GCC visibility pop 6242: 6242: 6242: 6242: template 6242: inline 6242: exception_detail::clone_impl 6242: enable_current_exception( T const & x ) 6242: { 6242: return exception_detail::clone_impl(x); 6242: } 6242: } 6242: # 43 "/usr/include/boost/throw_exception.hpp" 2 3 6242: 6242: # 1 "/usr/include/boost/current_function.hpp" 1 3 4 6242: # 22 "/usr/include/boost/current_function.hpp" 3 4 6242: namespace boost 6242: { 6242: 6242: namespace detail 6242: { 6242: 6242: inline void current_function_helper() 6242: { 6242: # 69 "/usr/include/boost/current_function.hpp" 3 4 6242: } 6242: 6242: } 6242: 6242: } 6242: # 45 "/usr/include/boost/throw_exception.hpp" 2 3 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: namespace boost 6242: { 6242: 6242: 6242: 6242: 6242: 6242: 6242: inline void throw_exception_assert_compatibility( std::exception const & ) { } 6242: 6242: template __attribute__ ((__noreturn__)) inline void throw_exception( E const & e ) 6242: { 6242: 6242: 6242: throw_exception_assert_compatibility(e); 6242: 6242: 6242: throw enable_current_exception(enable_error_info(e)); 6242: 6242: 6242: 6242: } 6242: 6242: 6242: 6242: 6242: namespace 6242: exception_detail 6242: { 6242: template 6242: __attribute__ ((__noreturn__)) 6242: void 6242: throw_exception_( E const & x, char const * current_function, char const * file, int line ) 6242: { 6242: boost::throw_exception( 6242: set_info( 6242: set_info( 6242: set_info( 6242: enable_error_info(x), 6242: throw_function(current_function)), 6242: throw_file(file)), 6242: throw_line(line))); 6242: } 6242: } 6242: 6242: } 6242: # 42 "/usr/include/boost/regex/v4/regex_workaround.hpp" 2 3 4 6242: # 1 "/usr/include/boost/scoped_ptr.hpp" 1 3 4 6242: # 13 "/usr/include/boost/scoped_ptr.hpp" 3 4 6242: # 1 "/usr/include/boost/smart_ptr/scoped_ptr.hpp" 1 3 4 6242: # 14 "/usr/include/boost/smart_ptr/scoped_ptr.hpp" 3 4 6242: # 1 "/usr/include/boost/assert.hpp" 1 3 4 6242: # 58 "/usr/include/boost/assert.hpp" 3 4 6242: # 1 "/usr/include/assert.h" 1 3 4 6242: # 59 "/usr/include/boost/assert.hpp" 2 3 4 6242: # 15 "/usr/include/boost/smart_ptr/scoped_ptr.hpp" 2 3 4 6242: # 1 "/usr/include/boost/checked_delete.hpp" 1 3 4 6242: # 15 "/usr/include/boost/checked_delete.hpp" 3 4 6242: # 1 "/usr/include/boost/core/checked_delete.hpp" 1 3 4 6242: # 24 "/usr/include/boost/core/checked_delete.hpp" 3 4 6242: namespace boost 6242: { 6242: 6242: 6242: 6242: template inline void checked_delete(T * x) 6242: { 6242: 6242: typedef char type_must_be_complete[ sizeof(T)? 1: -1 ]; 6242: (void) sizeof(type_must_be_complete); 6242: delete x; 6242: } 6242: 6242: template inline void checked_array_delete(T * x) 6242: { 6242: typedef char type_must_be_complete[ sizeof(T)? 1: -1 ]; 6242: (void) sizeof(type_must_be_complete); 6242: delete [] x; 6242: } 6242: 6242: template struct checked_deleter 6242: { 6242: typedef void result_type; 6242: typedef T * argument_type; 6242: 6242: void operator()(T * x) const 6242: { 6242: 6242: boost::checked_delete(x); 6242: } 6242: }; 6242: 6242: template struct checked_array_deleter 6242: { 6242: typedef void result_type; 6242: typedef T * argument_type; 6242: 6242: void operator()(T * x) const 6242: { 6242: boost::checked_array_delete(x); 6242: } 6242: }; 6242: 6242: } 6242: # 16 "/usr/include/boost/checked_delete.hpp" 2 3 4 6242: # 16 "/usr/include/boost/smart_ptr/scoped_ptr.hpp" 2 3 4 6242: # 1 "/usr/include/boost/smart_ptr/detail/sp_nullptr_t.hpp" 1 3 4 6242: # 23 "/usr/include/boost/smart_ptr/detail/sp_nullptr_t.hpp" 3 4 6242: namespace boost 6242: { 6242: 6242: namespace detail 6242: { 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: typedef std::nullptr_t sp_nullptr_t; 6242: 6242: 6242: 6242: } 6242: 6242: } 6242: # 17 "/usr/include/boost/smart_ptr/scoped_ptr.hpp" 2 3 4 6242: # 1 "/usr/include/boost/smart_ptr/detail/sp_disable_deprecated.hpp" 1 3 4 6242: # 18 "/usr/include/boost/smart_ptr/scoped_ptr.hpp" 2 3 4 6242: # 1 "/usr/include/boost/smart_ptr/detail/sp_noexcept.hpp" 1 3 4 6242: # 19 "/usr/include/boost/smart_ptr/scoped_ptr.hpp" 2 3 4 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: #pragma GCC diagnostic push 6242: #pragma GCC diagnostic ignored "-Wdeprecated-declarations" 6242: 6242: 6242: namespace boost 6242: { 6242: # 47 "/usr/include/boost/smart_ptr/scoped_ptr.hpp" 3 4 6242: template class scoped_ptr 6242: { 6242: private: 6242: 6242: T * px; 6242: 6242: scoped_ptr(scoped_ptr const &); 6242: scoped_ptr & operator=(scoped_ptr const &); 6242: 6242: typedef scoped_ptr this_type; 6242: 6242: void operator==( scoped_ptr const& ) const; 6242: void operator!=( scoped_ptr const& ) const; 6242: 6242: public: 6242: 6242: typedef T element_type; 6242: 6242: explicit scoped_ptr( T * p = 0 ) noexcept : px( p ) 6242: { 6242: 6242: 6242: 6242: } 6242: 6242: 6242: 6242: explicit scoped_ptr( std::auto_ptr p ) noexcept : px( p.release() ) 6242: { 6242: 6242: 6242: 6242: } 6242: 6242: 6242: 6242: ~scoped_ptr() noexcept 6242: { 6242: 6242: 6242: 6242: boost::checked_delete( px ); 6242: } 6242: 6242: void reset(T * p = 0) noexcept 6242: { 6242: (static_cast (p == 0 || p != px) ? void (0) : __assert_fail ("p == 0 || p != px", "/usr/include/boost/smart_ptr/scoped_ptr.hpp", 93, __extension__ __PRETTY_FUNCTION__)); 6242: this_type(p).swap(*this); 6242: } 6242: 6242: T & operator*() const noexcept 6242: { 6242: (static_cast (px != 0) ? void (0) : __assert_fail ("px != 0", "/usr/include/boost/smart_ptr/scoped_ptr.hpp", 99, __extension__ __PRETTY_FUNCTION__)); 6242: return *px; 6242: } 6242: 6242: T * operator->() const noexcept 6242: { 6242: (static_cast (px != 0) ? void (0) : __assert_fail ("px != 0", "/usr/include/boost/smart_ptr/scoped_ptr.hpp", 105, __extension__ __PRETTY_FUNCTION__)); 6242: return px; 6242: } 6242: 6242: T * get() const noexcept 6242: { 6242: return px; 6242: } 6242: 6242: 6242: # 1 "/usr/include/boost/smart_ptr/detail/operator_bool.hpp" 1 3 4 6242: # 12 "/usr/include/boost/smart_ptr/detail/operator_bool.hpp" 3 4 6242: explicit operator bool () const noexcept 6242: { 6242: return px != 0; 6242: } 6242: # 61 "/usr/include/boost/smart_ptr/detail/operator_bool.hpp" 3 4 6242: bool operator! () const noexcept 6242: { 6242: return px == 0; 6242: } 6242: # 116 "/usr/include/boost/smart_ptr/scoped_ptr.hpp" 2 3 4 6242: 6242: void swap(scoped_ptr & b) noexcept 6242: { 6242: T * tmp = b.px; 6242: b.px = px; 6242: px = tmp; 6242: } 6242: }; 6242: 6242: 6242: 6242: template inline bool operator==( scoped_ptr const & p, boost::detail::sp_nullptr_t ) noexcept 6242: { 6242: return p.get() == 0; 6242: } 6242: 6242: template inline bool operator==( boost::detail::sp_nullptr_t, scoped_ptr const & p ) noexcept 6242: { 6242: return p.get() == 0; 6242: } 6242: 6242: template inline bool operator!=( scoped_ptr const & p, boost::detail::sp_nullptr_t ) noexcept 6242: { 6242: return p.get() != 0; 6242: } 6242: 6242: template inline bool operator!=( boost::detail::sp_nullptr_t, scoped_ptr const & p ) noexcept 6242: { 6242: return p.get() != 0; 6242: } 6242: 6242: 6242: 6242: template inline void swap(scoped_ptr & a, scoped_ptr & b) noexcept 6242: { 6242: a.swap(b); 6242: } 6242: 6242: 6242: 6242: template inline T * get_pointer(scoped_ptr const & p) noexcept 6242: { 6242: return p.get(); 6242: } 6242: 6242: } 6242: 6242: 6242: #pragma GCC diagnostic pop 6242: # 14 "/usr/include/boost/scoped_ptr.hpp" 2 3 4 6242: # 43 "/usr/include/boost/regex/v4/regex_workaround.hpp" 2 3 4 6242: # 1 "/usr/include/boost/scoped_array.hpp" 1 3 4 6242: # 13 "/usr/include/boost/scoped_array.hpp" 3 4 6242: # 1 "/usr/include/boost/smart_ptr/scoped_array.hpp" 1 3 4 6242: # 14 "/usr/include/boost/smart_ptr/scoped_array.hpp" 3 4 6242: # 1 "/usr/include/boost/assert.hpp" 1 3 4 6242: # 58 "/usr/include/boost/assert.hpp" 3 4 6242: # 1 "/usr/include/assert.h" 1 3 4 6242: # 59 "/usr/include/boost/assert.hpp" 2 3 4 6242: # 15 "/usr/include/boost/smart_ptr/scoped_array.hpp" 2 3 4 6242: # 23 "/usr/include/boost/smart_ptr/scoped_array.hpp" 3 4 6242: namespace boost 6242: { 6242: # 39 "/usr/include/boost/smart_ptr/scoped_array.hpp" 3 4 6242: template class scoped_array 6242: { 6242: private: 6242: 6242: T * px; 6242: 6242: scoped_array(scoped_array const &); 6242: scoped_array & operator=(scoped_array const &); 6242: 6242: typedef scoped_array this_type; 6242: 6242: void operator==( scoped_array const& ) const; 6242: void operator!=( scoped_array const& ) const; 6242: 6242: public: 6242: 6242: typedef T element_type; 6242: 6242: explicit scoped_array( T * p = 0 ) noexcept : px( p ) 6242: { 6242: 6242: 6242: 6242: } 6242: 6242: ~scoped_array() noexcept 6242: { 6242: 6242: 6242: 6242: boost::checked_array_delete( px ); 6242: } 6242: 6242: void reset(T * p = 0) noexcept 6242: { 6242: (static_cast (p == 0 || p != px) ? void (0) : __assert_fail ("p == 0 || p != px", "/usr/include/boost/smart_ptr/scoped_array.hpp", 74, __extension__ __PRETTY_FUNCTION__)); 6242: this_type(p).swap(*this); 6242: } 6242: 6242: T & operator[](std::ptrdiff_t i) const noexcept 6242: { 6242: (static_cast (px != 0) ? void (0) : __assert_fail ("px != 0", "/usr/include/boost/smart_ptr/scoped_array.hpp", 80, __extension__ __PRETTY_FUNCTION__)); 6242: (static_cast (i >= 0) ? void (0) : __assert_fail ("i >= 0", "/usr/include/boost/smart_ptr/scoped_array.hpp", 81, __extension__ __PRETTY_FUNCTION__)); 6242: return px[i]; 6242: } 6242: 6242: T * get() const noexcept 6242: { 6242: return px; 6242: } 6242: 6242: 6242: # 1 "/usr/include/boost/smart_ptr/detail/operator_bool.hpp" 1 3 4 6242: # 12 "/usr/include/boost/smart_ptr/detail/operator_bool.hpp" 3 4 6242: explicit operator bool () const noexcept 6242: { 6242: return px != 0; 6242: } 6242: # 61 "/usr/include/boost/smart_ptr/detail/operator_bool.hpp" 3 4 6242: bool operator! () const noexcept 6242: { 6242: return px == 0; 6242: } 6242: # 92 "/usr/include/boost/smart_ptr/scoped_array.hpp" 2 3 4 6242: 6242: void swap(scoped_array & b) noexcept 6242: { 6242: T * tmp = b.px; 6242: b.px = px; 6242: px = tmp; 6242: } 6242: }; 6242: 6242: 6242: 6242: template inline bool operator==( scoped_array const & p, boost::detail::sp_nullptr_t ) noexcept 6242: { 6242: return p.get() == 0; 6242: } 6242: 6242: template inline bool operator==( boost::detail::sp_nullptr_t, scoped_array const & p ) noexcept 6242: { 6242: return p.get() == 0; 6242: } 6242: 6242: template inline bool operator!=( scoped_array const & p, boost::detail::sp_nullptr_t ) noexcept 6242: { 6242: return p.get() != 0; 6242: } 6242: 6242: template inline bool operator!=( boost::detail::sp_nullptr_t, scoped_array const & p ) noexcept 6242: { 6242: return p.get() != 0; 6242: } 6242: 6242: 6242: 6242: template inline void swap(scoped_array & a, scoped_array & b) noexcept 6242: { 6242: a.swap(b); 6242: } 6242: 6242: } 6242: # 14 "/usr/include/boost/scoped_array.hpp" 2 3 4 6242: # 44 "/usr/include/boost/regex/v4/regex_workaround.hpp" 2 3 4 6242: # 1 "/usr/include/boost/shared_ptr.hpp" 1 3 4 6242: # 17 "/usr/include/boost/shared_ptr.hpp" 3 4 6242: # 1 "/usr/include/boost/smart_ptr/shared_ptr.hpp" 1 3 4 6242: # 23 "/usr/include/boost/smart_ptr/shared_ptr.hpp" 3 4 6242: # 1 "/usr/include/boost/config/no_tr1/memory.hpp" 1 3 4 6242: # 24 "/usr/include/boost/smart_ptr/shared_ptr.hpp" 2 3 4 6242: 6242: # 1 "/usr/include/boost/assert.hpp" 1 3 4 6242: # 58 "/usr/include/boost/assert.hpp" 3 4 6242: # 1 "/usr/include/assert.h" 1 3 4 6242: # 59 "/usr/include/boost/assert.hpp" 2 3 4 6242: # 26 "/usr/include/boost/smart_ptr/shared_ptr.hpp" 2 3 4 6242: 6242: 6242: # 1 "/usr/include/boost/smart_ptr/detail/shared_count.hpp" 1 3 4 6242: # 28 "/usr/include/boost/smart_ptr/detail/shared_count.hpp" 3 4 6242: # 1 "/usr/include/boost/smart_ptr/bad_weak_ptr.hpp" 1 3 4 6242: # 27 "/usr/include/boost/smart_ptr/bad_weak_ptr.hpp" 3 4 6242: namespace boost 6242: { 6242: # 46 "/usr/include/boost/smart_ptr/bad_weak_ptr.hpp" 3 4 6242: class bad_weak_ptr: public std::exception 6242: { 6242: public: 6242: 6242: virtual char const * what() const throw() 6242: { 6242: return "tr1::bad_weak_ptr"; 6242: } 6242: }; 6242: # 64 "/usr/include/boost/smart_ptr/bad_weak_ptr.hpp" 3 4 6242: } 6242: # 29 "/usr/include/boost/smart_ptr/detail/shared_count.hpp" 2 3 4 6242: # 1 "/usr/include/boost/smart_ptr/detail/sp_counted_base.hpp" 1 3 4 6242: # 21 "/usr/include/boost/smart_ptr/detail/sp_counted_base.hpp" 3 4 6242: # 1 "/usr/include/boost/smart_ptr/detail/sp_has_sync.hpp" 1 3 4 6242: # 22 "/usr/include/boost/smart_ptr/detail/sp_counted_base.hpp" 2 3 4 6242: # 48 "/usr/include/boost/smart_ptr/detail/sp_counted_base.hpp" 3 4 6242: # 1 "/usr/include/boost/smart_ptr/detail/sp_counted_base_std_atomic.hpp" 1 3 4 6242: # 18 "/usr/include/boost/smart_ptr/detail/sp_counted_base_std_atomic.hpp" 3 4 6242: # 1 "/usr/include/boost/detail/sp_typeinfo.hpp" 1 3 4 6242: # 20 "/usr/include/boost/detail/sp_typeinfo.hpp" 3 4 6242: # 1 "/usr/include/boost/core/typeinfo.hpp" 1 3 4 6242: # 119 "/usr/include/boost/core/typeinfo.hpp" 3 4 6242: # 1 "/usr/include/boost/core/demangle.hpp" 1 3 4 6242: # 17 "/usr/include/boost/core/demangle.hpp" 3 4 6242: 6242: # 32 "/usr/include/boost/core/demangle.hpp" 3 4 6242: # 1 "/usr/include/c++/8/cxxabi.h" 1 3 4 6242: # 44 "/usr/include/c++/8/cxxabi.h" 3 4 6242: 6242: # 45 "/usr/include/c++/8/cxxabi.h" 3 6242: 6242: #pragma GCC visibility push(default) 6242: 6242: # 1 "/usr/lib/gcc/s390x-linux-gnu/8/include/stddef.h" 1 3 4 6242: # 49 "/usr/include/c++/8/cxxabi.h" 2 3 6242: 6242: # 1 "/usr/include/s390x-linux-gnu/c++/8/bits/cxxabi_tweaks.h" 1 3 6242: # 34 "/usr/include/s390x-linux-gnu/c++/8/bits/cxxabi_tweaks.h" 3 6242: namespace __cxxabiv1 6242: { 6242: extern "C" 6242: { 6242: # 46 "/usr/include/s390x-linux-gnu/c++/8/bits/cxxabi_tweaks.h" 3 6242: __extension__ typedef int __guard __attribute__((mode (__DI__))); 6242: 6242: 6242: typedef void __cxa_vec_ctor_return_type; 6242: 6242: 6242: typedef void __cxa_cdtor_return_type; 6242: 6242: 6242: } 6242: } 6242: # 51 "/usr/include/c++/8/cxxabi.h" 2 3 6242: 6242: 6242: 6242: 6242: namespace __cxxabiv1 6242: { 6242: extern "C" 6242: { 6242: 6242: 6242: typedef __cxa_cdtor_return_type (*__cxa_cdtor_type)(void *); 6242: 6242: 6242: void* 6242: __cxa_vec_new(size_t __element_count, size_t __element_size, 6242: size_t __padding_size, __cxa_cdtor_type __constructor, 6242: __cxa_cdtor_type __destructor); 6242: 6242: void* 6242: __cxa_vec_new2(size_t __element_count, size_t __element_size, 6242: size_t __padding_size, __cxa_cdtor_type __constructor, 6242: __cxa_cdtor_type __destructor, void *(*__alloc) (size_t), 6242: void (*__dealloc) (void*)); 6242: 6242: void* 6242: __cxa_vec_new3(size_t __element_count, size_t __element_size, 6242: size_t __padding_size, __cxa_cdtor_type __constructor, 6242: __cxa_cdtor_type __destructor, void *(*__alloc) (size_t), 6242: void (*__dealloc) (void*, size_t)); 6242: 6242: 6242: __cxa_vec_ctor_return_type 6242: __cxa_vec_ctor(void* __array_address, size_t __element_count, 6242: size_t __element_size, __cxa_cdtor_type __constructor, 6242: __cxa_cdtor_type __destructor); 6242: 6242: __cxa_vec_ctor_return_type 6242: __cxa_vec_cctor(void* __dest_array, void* __src_array, 6242: size_t __element_count, size_t __element_size, 6242: __cxa_cdtor_return_type (*__constructor) (void*, void*), 6242: __cxa_cdtor_type __destructor); 6242: 6242: 6242: void 6242: __cxa_vec_dtor(void* __array_address, size_t __element_count, 6242: size_t __element_size, __cxa_cdtor_type __destructor); 6242: 6242: void 6242: __cxa_vec_cleanup(void* __array_address, size_t __element_count, size_t __s, 6242: __cxa_cdtor_type __destructor) noexcept; 6242: 6242: 6242: void 6242: __cxa_vec_delete(void* __array_address, size_t __element_size, 6242: size_t __padding_size, __cxa_cdtor_type __destructor); 6242: 6242: void 6242: __cxa_vec_delete2(void* __array_address, size_t __element_size, 6242: size_t __padding_size, __cxa_cdtor_type __destructor, 6242: void (*__dealloc) (void*)); 6242: 6242: void 6242: __cxa_vec_delete3(void* __array_address, size_t __element_size, 6242: size_t __padding_size, __cxa_cdtor_type __destructor, 6242: void (*__dealloc) (void*, size_t)); 6242: 6242: int 6242: __cxa_guard_acquire(__guard*); 6242: 6242: void 6242: __cxa_guard_release(__guard*) noexcept; 6242: 6242: void 6242: __cxa_guard_abort(__guard*) noexcept; 6242: 6242: 6242: int 6242: __cxa_atexit(void (*)(void*), void*, void*) noexcept; 6242: 6242: int 6242: __cxa_finalize(void*); 6242: 6242: 6242: int 6242: __cxa_thread_atexit(void (*)(void*), void*, void *) noexcept; 6242: 6242: 6242: void 6242: __cxa_pure_virtual(void) __attribute__ ((__noreturn__)); 6242: 6242: void 6242: __cxa_deleted_virtual(void) __attribute__ ((__noreturn__)); 6242: 6242: 6242: void 6242: __cxa_bad_cast() __attribute__((__noreturn__)); 6242: 6242: void 6242: __cxa_bad_typeid() __attribute__((__noreturn__)); 6242: 6242: void 6242: __cxa_throw_bad_array_new_length() __attribute__((__noreturn__)); 6242: # 194 "/usr/include/c++/8/cxxabi.h" 3 6242: char* 6242: __cxa_demangle(const char* __mangled_name, char* __output_buffer, 6242: size_t* __length, int* __status); 6242: 6242: 6242: } 6242: } 6242: 6242: 6242: 6242: 6242: 6242: 6242: namespace __cxxabiv1 6242: { 6242: 6242: class __fundamental_type_info : public std::type_info 6242: { 6242: public: 6242: explicit 6242: __fundamental_type_info(const char* __n) : std::type_info(__n) { } 6242: 6242: virtual 6242: ~__fundamental_type_info(); 6242: }; 6242: 6242: 6242: class __array_type_info : public std::type_info 6242: { 6242: public: 6242: explicit 6242: __array_type_info(const char* __n) : std::type_info(__n) { } 6242: 6242: virtual 6242: ~__array_type_info(); 6242: }; 6242: 6242: 6242: class __function_type_info : public std::type_info 6242: { 6242: public: 6242: explicit 6242: __function_type_info(const char* __n) : std::type_info(__n) { } 6242: 6242: virtual 6242: ~__function_type_info(); 6242: 6242: protected: 6242: 6242: virtual bool 6242: __is_function_p() const; 6242: }; 6242: 6242: 6242: class __enum_type_info : public std::type_info 6242: { 6242: public: 6242: explicit 6242: __enum_type_info(const char* __n) : std::type_info(__n) { } 6242: 6242: virtual 6242: ~__enum_type_info(); 6242: }; 6242: 6242: 6242: class __pbase_type_info : public std::type_info 6242: { 6242: public: 6242: unsigned int __flags; 6242: const std::type_info* __pointee; 6242: 6242: explicit 6242: __pbase_type_info(const char* __n, int __quals, 6242: const std::type_info* __type) 6242: : std::type_info(__n), __flags(__quals), __pointee(__type) 6242: { } 6242: 6242: virtual 6242: ~__pbase_type_info(); 6242: 6242: 6242: enum __masks 6242: { 6242: __const_mask = 0x1, 6242: __volatile_mask = 0x2, 6242: __restrict_mask = 0x4, 6242: __incomplete_mask = 0x8, 6242: __incomplete_class_mask = 0x10, 6242: __transaction_safe_mask = 0x20, 6242: __noexcept_mask = 0x40 6242: }; 6242: 6242: protected: 6242: __pbase_type_info(const __pbase_type_info&); 6242: 6242: __pbase_type_info& 6242: operator=(const __pbase_type_info&); 6242: 6242: 6242: virtual bool 6242: __do_catch(const std::type_info* __thr_type, void** __thr_obj, 6242: unsigned int __outer) const; 6242: 6242: inline virtual bool 6242: __pointer_catch(const __pbase_type_info* __thr_type, void** __thr_obj, 6242: unsigned __outer) const; 6242: }; 6242: 6242: inline bool __pbase_type_info:: 6242: __pointer_catch (const __pbase_type_info *thrown_type, 6242: void **thr_obj, 6242: unsigned outer) const 6242: { 6242: return __pointee->__do_catch (thrown_type->__pointee, thr_obj, outer + 2); 6242: } 6242: 6242: 6242: class __pointer_type_info : public __pbase_type_info 6242: { 6242: public: 6242: explicit 6242: __pointer_type_info(const char* __n, int __quals, 6242: const std::type_info* __type) 6242: : __pbase_type_info (__n, __quals, __type) { } 6242: 6242: 6242: virtual 6242: ~__pointer_type_info(); 6242: 6242: protected: 6242: 6242: virtual bool 6242: __is_pointer_p() const; 6242: 6242: virtual bool 6242: __pointer_catch(const __pbase_type_info* __thr_type, void** __thr_obj, 6242: unsigned __outer) const; 6242: }; 6242: 6242: class __class_type_info; 6242: 6242: 6242: class __pointer_to_member_type_info : public __pbase_type_info 6242: { 6242: public: 6242: __class_type_info* __context; 6242: 6242: explicit 6242: __pointer_to_member_type_info(const char* __n, int __quals, 6242: const std::type_info* __type, 6242: __class_type_info* __klass) 6242: : __pbase_type_info(__n, __quals, __type), __context(__klass) { } 6242: 6242: virtual 6242: ~__pointer_to_member_type_info(); 6242: 6242: protected: 6242: __pointer_to_member_type_info(const __pointer_to_member_type_info&); 6242: 6242: __pointer_to_member_type_info& 6242: operator=(const __pointer_to_member_type_info&); 6242: 6242: 6242: virtual bool 6242: __pointer_catch(const __pbase_type_info* __thr_type, void** __thr_obj, 6242: unsigned __outer) const; 6242: }; 6242: 6242: 6242: class __base_class_type_info 6242: { 6242: public: 6242: const __class_type_info* __base_type; 6242: 6242: 6242: 6242: long __offset_flags; 6242: 6242: 6242: enum __offset_flags_masks 6242: { 6242: __virtual_mask = 0x1, 6242: __public_mask = 0x2, 6242: __hwm_bit = 2, 6242: __offset_shift = 8 6242: }; 6242: 6242: 6242: bool 6242: __is_virtual_p() const 6242: { return __offset_flags & __virtual_mask; } 6242: 6242: bool 6242: __is_public_p() const 6242: { return __offset_flags & __public_mask; } 6242: 6242: ptrdiff_t 6242: __offset() const 6242: { 6242: 6242: 6242: 6242: return static_cast(__offset_flags) >> __offset_shift; 6242: } 6242: }; 6242: 6242: 6242: class __class_type_info : public std::type_info 6242: { 6242: public: 6242: explicit 6242: __class_type_info (const char *__n) : type_info(__n) { } 6242: 6242: virtual 6242: ~__class_type_info (); 6242: 6242: 6242: 6242: 6242: 6242: 6242: enum __sub_kind 6242: { 6242: 6242: __unknown = 0, 6242: 6242: 6242: 6242: __not_contained, 6242: 6242: 6242: __contained_ambig, 6242: 6242: 6242: __contained_virtual_mask = __base_class_type_info::__virtual_mask, 6242: 6242: 6242: __contained_public_mask = __base_class_type_info::__public_mask, 6242: 6242: 6242: __contained_mask = 1 << __base_class_type_info::__hwm_bit, 6242: 6242: __contained_private = __contained_mask, 6242: __contained_public = __contained_mask | __contained_public_mask 6242: }; 6242: 6242: struct __upcast_result; 6242: struct __dyncast_result; 6242: 6242: protected: 6242: 6242: virtual bool 6242: __do_upcast(const __class_type_info* __dst_type, void**__obj_ptr) const; 6242: 6242: virtual bool 6242: __do_catch(const type_info* __thr_type, void** __thr_obj, 6242: unsigned __outer) const; 6242: 6242: public: 6242: 6242: 6242: virtual bool 6242: __do_upcast(const __class_type_info* __dst, const void* __obj, 6242: __upcast_result& __restrict __result) const; 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: inline __sub_kind 6242: __find_public_src(ptrdiff_t __src2dst, const void* __obj_ptr, 6242: const __class_type_info* __src_type, 6242: const void* __src_ptr) const; 6242: # 477 "/usr/include/c++/8/cxxabi.h" 3 6242: virtual bool 6242: __do_dyncast(ptrdiff_t __src2dst, __sub_kind __access_path, 6242: const __class_type_info* __dst_type, const void* __obj_ptr, 6242: const __class_type_info* __src_type, const void* __src_ptr, 6242: __dyncast_result& __result) const; 6242: 6242: 6242: 6242: 6242: 6242: virtual __sub_kind 6242: __do_find_public_src(ptrdiff_t __src2dst, const void* __obj_ptr, 6242: const __class_type_info* __src_type, 6242: const void* __src_ptr) const; 6242: }; 6242: 6242: 6242: class __si_class_type_info : public __class_type_info 6242: { 6242: public: 6242: const __class_type_info* __base_type; 6242: 6242: explicit 6242: __si_class_type_info(const char *__n, const __class_type_info *__base) 6242: : __class_type_info(__n), __base_type(__base) { } 6242: 6242: virtual 6242: ~__si_class_type_info(); 6242: 6242: protected: 6242: __si_class_type_info(const __si_class_type_info&); 6242: 6242: __si_class_type_info& 6242: operator=(const __si_class_type_info&); 6242: 6242: 6242: virtual bool 6242: __do_dyncast(ptrdiff_t __src2dst, __sub_kind __access_path, 6242: const __class_type_info* __dst_type, const void* __obj_ptr, 6242: const __class_type_info* __src_type, const void* __src_ptr, 6242: __dyncast_result& __result) const; 6242: 6242: virtual __sub_kind 6242: __do_find_public_src(ptrdiff_t __src2dst, const void* __obj_ptr, 6242: const __class_type_info* __src_type, 6242: const void* __sub_ptr) const; 6242: 6242: virtual bool 6242: __do_upcast(const __class_type_info*__dst, const void*__obj, 6242: __upcast_result& __restrict __result) const; 6242: }; 6242: 6242: 6242: class __vmi_class_type_info : public __class_type_info 6242: { 6242: public: 6242: unsigned int __flags; 6242: unsigned int __base_count; 6242: 6242: 6242: 6242: 6242: __base_class_type_info __base_info[1]; 6242: 6242: explicit 6242: __vmi_class_type_info(const char* __n, int ___flags) 6242: : __class_type_info(__n), __flags(___flags), __base_count(0) { } 6242: 6242: virtual 6242: ~__vmi_class_type_info(); 6242: 6242: 6242: enum __flags_masks 6242: { 6242: __non_diamond_repeat_mask = 0x1, 6242: __diamond_shaped_mask = 0x2, 6242: __flags_unknown_mask = 0x10 6242: }; 6242: 6242: protected: 6242: 6242: virtual bool 6242: __do_dyncast(ptrdiff_t __src2dst, __sub_kind __access_path, 6242: const __class_type_info* __dst_type, const void* __obj_ptr, 6242: const __class_type_info* __src_type, const void* __src_ptr, 6242: __dyncast_result& __result) const; 6242: 6242: virtual __sub_kind 6242: __do_find_public_src(ptrdiff_t __src2dst, const void* __obj_ptr, 6242: const __class_type_info* __src_type, 6242: const void* __src_ptr) const; 6242: 6242: virtual bool 6242: __do_upcast(const __class_type_info* __dst, const void* __obj, 6242: __upcast_result& __restrict __result) const; 6242: }; 6242: 6242: 6242: struct __cxa_exception; 6242: struct __cxa_refcounted_exception; 6242: struct __cxa_dependent_exception; 6242: struct __cxa_eh_globals; 6242: 6242: extern "C" 6242: { 6242: # 590 "/usr/include/c++/8/cxxabi.h" 3 6242: void* 6242: __dynamic_cast(const void* __src_ptr, 6242: const __class_type_info* __src_type, 6242: const __class_type_info* __dst_type, 6242: ptrdiff_t __src2dst); 6242: # 603 "/usr/include/c++/8/cxxabi.h" 3 6242: __cxa_eh_globals* 6242: __cxa_get_globals() noexcept __attribute__ ((__const__)); 6242: 6242: __cxa_eh_globals* 6242: __cxa_get_globals_fast() noexcept __attribute__ ((__const__)); 6242: 6242: 6242: void 6242: __cxa_free_exception(void*) noexcept; 6242: 6242: 6242: void 6242: __cxa_throw(void*, std::type_info*, void ( *) (void *)) 6242: __attribute__((__noreturn__)); 6242: 6242: 6242: void* 6242: __cxa_get_exception_ptr(void*) noexcept __attribute__ ((__pure__)); 6242: 6242: void* 6242: __cxa_begin_catch(void*) noexcept; 6242: 6242: void 6242: __cxa_end_catch(); 6242: 6242: void 6242: __cxa_rethrow() __attribute__((__noreturn__)); 6242: 6242: 6242: 6242: std::type_info* 6242: __cxa_current_exception_type() noexcept __attribute__ ((__pure__)); 6242: 6242: 6242: 6242: 6242: __cxa_dependent_exception* 6242: __cxa_allocate_dependent_exception() noexcept; 6242: 6242: 6242: void 6242: __cxa_free_dependent_exception(__cxa_dependent_exception*) noexcept; 6242: 6242: } 6242: 6242: 6242: 6242: class __foreign_exception 6242: { 6242: virtual ~__foreign_exception() throw(); 6242: virtual void __pure_dummy() = 0; 6242: }; 6242: 6242: } 6242: # 678 "/usr/include/c++/8/cxxabi.h" 3 6242: namespace abi = __cxxabiv1; 6242: 6242: namespace __gnu_cxx 6242: { 6242: # 694 "/usr/include/c++/8/cxxabi.h" 3 6242: class recursive_init_error: public std::exception 6242: { 6242: public: 6242: recursive_init_error() throw() { } 6242: virtual ~recursive_init_error() throw (); 6242: }; 6242: } 6242: 6242: 6242: #pragma GCC visibility pop 6242: # 33 "/usr/include/boost/core/demangle.hpp" 2 3 4 6242: 6242: 6242: 6242: 6242: 6242: 6242: # 1 "/usr/include/c++/8/cstdlib" 1 3 4 6242: # 39 "/usr/include/c++/8/cstdlib" 3 4 6242: 6242: # 40 "/usr/include/c++/8/cstdlib" 3 6242: # 40 "/usr/include/boost/core/demangle.hpp" 2 3 4 6242: 6242: 6242: 6242: 6242: namespace boost 6242: { 6242: 6242: namespace core 6242: { 6242: 6242: inline char const * demangle_alloc( char const * name ) noexcept; 6242: inline void demangle_free( char const * name ) noexcept; 6242: 6242: class scoped_demangled_name 6242: { 6242: private: 6242: char const * m_p; 6242: 6242: public: 6242: explicit scoped_demangled_name( char const * name ) noexcept : 6242: m_p( demangle_alloc( name ) ) 6242: { 6242: } 6242: 6242: ~scoped_demangled_name() noexcept 6242: { 6242: demangle_free( m_p ); 6242: } 6242: 6242: char const * get() const noexcept 6242: { 6242: return m_p; 6242: } 6242: 6242: scoped_demangled_name( scoped_demangled_name const& ) = delete; 6242: scoped_demangled_name& operator= ( scoped_demangled_name const& ) = delete; 6242: }; 6242: 6242: 6242: 6242: 6242: inline char const * demangle_alloc( char const * name ) noexcept 6242: { 6242: int status = 0; 6242: std::size_t size = 0; 6242: return abi::__cxa_demangle( name, __null, &size, &status ); 6242: } 6242: 6242: inline void demangle_free( char const * name ) noexcept 6242: { 6242: std::free( const_cast< char* >( name ) ); 6242: } 6242: 6242: inline std::string demangle( char const * name ) 6242: { 6242: scoped_demangled_name demangled_name( name ); 6242: char const * p = demangled_name.get(); 6242: if( !p ) 6242: p = name; 6242: return p; 6242: } 6242: # 120 "/usr/include/boost/core/demangle.hpp" 3 4 6242: } 6242: 6242: } 6242: # 120 "/usr/include/boost/core/typeinfo.hpp" 2 3 4 6242: 6242: 6242: namespace boost 6242: { 6242: 6242: namespace core 6242: { 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: typedef std::type_info typeinfo; 6242: 6242: 6242: 6242: inline std::string demangled_name( core::typeinfo const & ti ) 6242: { 6242: return core::demangle( ti.name() ); 6242: } 6242: 6242: } 6242: 6242: } 6242: # 21 "/usr/include/boost/detail/sp_typeinfo.hpp" 2 3 4 6242: 6242: namespace boost 6242: { 6242: 6242: namespace detail 6242: { 6242: 6242: typedef boost::core::typeinfo sp_typeinfo; 6242: 6242: } 6242: 6242: } 6242: # 19 "/usr/include/boost/smart_ptr/detail/sp_counted_base_std_atomic.hpp" 2 3 4 6242: # 1 "/usr/include/c++/8/atomic" 1 3 4 6242: # 35 "/usr/include/c++/8/atomic" 3 4 6242: 6242: # 36 "/usr/include/c++/8/atomic" 3 6242: # 44 "/usr/include/c++/8/atomic" 3 6242: namespace std __attribute__ ((__visibility__ ("default"))) 6242: { 6242: 6242: # 57 "/usr/include/c++/8/atomic" 3 6242: template 6242: struct atomic; 6242: 6242: 6242: 6242: template<> 6242: struct atomic 6242: { 6242: private: 6242: __atomic_base _M_base; 6242: 6242: public: 6242: atomic() noexcept = default; 6242: ~atomic() noexcept = default; 6242: atomic(const atomic&) = delete; 6242: atomic& operator=(const atomic&) = delete; 6242: atomic& operator=(const atomic&) volatile = delete; 6242: 6242: constexpr atomic(bool __i) noexcept : _M_base(__i) { } 6242: 6242: bool 6242: operator=(bool __i) noexcept 6242: { return _M_base.operator=(__i); } 6242: 6242: bool 6242: operator=(bool __i) volatile noexcept 6242: { return _M_base.operator=(__i); } 6242: 6242: operator bool() const noexcept 6242: { return _M_base.load(); } 6242: 6242: operator bool() const volatile noexcept 6242: { return _M_base.load(); } 6242: 6242: bool 6242: is_lock_free() const noexcept { return _M_base.is_lock_free(); } 6242: 6242: bool 6242: is_lock_free() const volatile noexcept { return _M_base.is_lock_free(); } 6242: 6242: 6242: 6242: 6242: 6242: void 6242: store(bool __i, memory_order __m = memory_order_seq_cst) noexcept 6242: { _M_base.store(__i, __m); } 6242: 6242: void 6242: store(bool __i, memory_order __m = memory_order_seq_cst) volatile noexcept 6242: { _M_base.store(__i, __m); } 6242: 6242: bool 6242: load(memory_order __m = memory_order_seq_cst) const noexcept 6242: { return _M_base.load(__m); } 6242: 6242: bool 6242: load(memory_order __m = memory_order_seq_cst) const volatile noexcept 6242: { return _M_base.load(__m); } 6242: 6242: bool 6242: exchange(bool __i, memory_order __m = memory_order_seq_cst) noexcept 6242: { return _M_base.exchange(__i, __m); } 6242: 6242: bool 6242: exchange(bool __i, 6242: memory_order __m = memory_order_seq_cst) volatile noexcept 6242: { return _M_base.exchange(__i, __m); } 6242: 6242: bool 6242: compare_exchange_weak(bool& __i1, bool __i2, memory_order __m1, 6242: memory_order __m2) noexcept 6242: { return _M_base.compare_exchange_weak(__i1, __i2, __m1, __m2); } 6242: 6242: bool 6242: compare_exchange_weak(bool& __i1, bool __i2, memory_order __m1, 6242: memory_order __m2) volatile noexcept 6242: { return _M_base.compare_exchange_weak(__i1, __i2, __m1, __m2); } 6242: 6242: bool 6242: compare_exchange_weak(bool& __i1, bool __i2, 6242: memory_order __m = memory_order_seq_cst) noexcept 6242: { return _M_base.compare_exchange_weak(__i1, __i2, __m); } 6242: 6242: bool 6242: compare_exchange_weak(bool& __i1, bool __i2, 6242: memory_order __m = memory_order_seq_cst) volatile noexcept 6242: { return _M_base.compare_exchange_weak(__i1, __i2, __m); } 6242: 6242: bool 6242: compare_exchange_strong(bool& __i1, bool __i2, memory_order __m1, 6242: memory_order __m2) noexcept 6242: { return _M_base.compare_exchange_strong(__i1, __i2, __m1, __m2); } 6242: 6242: bool 6242: compare_exchange_strong(bool& __i1, bool __i2, memory_order __m1, 6242: memory_order __m2) volatile noexcept 6242: { return _M_base.compare_exchange_strong(__i1, __i2, __m1, __m2); } 6242: 6242: bool 6242: compare_exchange_strong(bool& __i1, bool __i2, 6242: memory_order __m = memory_order_seq_cst) noexcept 6242: { return _M_base.compare_exchange_strong(__i1, __i2, __m); } 6242: 6242: bool 6242: compare_exchange_strong(bool& __i1, bool __i2, 6242: memory_order __m = memory_order_seq_cst) volatile noexcept 6242: { return _M_base.compare_exchange_strong(__i1, __i2, __m); } 6242: }; 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: template 6242: struct atomic 6242: { 6242: private: 6242: 6242: static constexpr int _S_min_alignment 6242: = (sizeof(_Tp) & (sizeof(_Tp) - 1)) || sizeof(_Tp) > 16 6242: ? 0 : sizeof(_Tp); 6242: 6242: static constexpr int _S_alignment 6242: = _S_min_alignment > alignof(_Tp) ? _S_min_alignment : alignof(_Tp); 6242: 6242: alignas(_S_alignment) _Tp _M_i; 6242: 6242: static_assert(__is_trivially_copyable(_Tp), 6242: "std::atomic requires a trivially copyable type"); 6242: 6242: static_assert(sizeof(_Tp) > 0, 6242: "Incomplete or zero-sized types are not supported"); 6242: 6242: public: 6242: atomic() noexcept = default; 6242: ~atomic() noexcept = default; 6242: atomic(const atomic&) = delete; 6242: atomic& operator=(const atomic&) = delete; 6242: atomic& operator=(const atomic&) volatile = delete; 6242: 6242: constexpr atomic(_Tp __i) noexcept : _M_i(__i) { } 6242: 6242: operator _Tp() const noexcept 6242: { return load(); } 6242: 6242: operator _Tp() const volatile noexcept 6242: { return load(); } 6242: 6242: _Tp 6242: operator=(_Tp __i) noexcept 6242: { store(__i); return __i; } 6242: 6242: _Tp 6242: operator=(_Tp __i) volatile noexcept 6242: { store(__i); return __i; } 6242: 6242: bool 6242: is_lock_free() const noexcept 6242: { 6242: 6242: return __atomic_is_lock_free(sizeof(_M_i), 6242: reinterpret_cast(-__alignof(_M_i))); 6242: } 6242: 6242: bool 6242: is_lock_free() const volatile noexcept 6242: { 6242: 6242: return __atomic_is_lock_free(sizeof(_M_i), 6242: reinterpret_cast(-__alignof(_M_i))); 6242: } 6242: 6242: 6242: 6242: 6242: 6242: 6242: void 6242: store(_Tp __i, memory_order __m = memory_order_seq_cst) noexcept 6242: { __atomic_store(std::__addressof(_M_i), std::__addressof(__i), __m); } 6242: 6242: void 6242: store(_Tp __i, memory_order __m = memory_order_seq_cst) volatile noexcept 6242: { __atomic_store(std::__addressof(_M_i), std::__addressof(__i), __m); } 6242: 6242: _Tp 6242: load(memory_order __m = memory_order_seq_cst) const noexcept 6242: { 6242: alignas(_Tp) unsigned char __buf[sizeof(_Tp)]; 6242: _Tp* __ptr = reinterpret_cast<_Tp*>(__buf); 6242: __atomic_load(std::__addressof(_M_i), __ptr, __m); 6242: return *__ptr; 6242: } 6242: 6242: _Tp 6242: load(memory_order __m = memory_order_seq_cst) const volatile noexcept 6242: { 6242: alignas(_Tp) unsigned char __buf[sizeof(_Tp)]; 6242: _Tp* __ptr = reinterpret_cast<_Tp*>(__buf); 6242: __atomic_load(std::__addressof(_M_i), __ptr, __m); 6242: return *__ptr; 6242: } 6242: 6242: _Tp 6242: exchange(_Tp __i, memory_order __m = memory_order_seq_cst) noexcept 6242: { 6242: alignas(_Tp) unsigned char __buf[sizeof(_Tp)]; 6242: _Tp* __ptr = reinterpret_cast<_Tp*>(__buf); 6242: __atomic_exchange(std::__addressof(_M_i), std::__addressof(__i), 6242: __ptr, __m); 6242: return *__ptr; 6242: } 6242: 6242: _Tp 6242: exchange(_Tp __i, 6242: memory_order __m = memory_order_seq_cst) volatile noexcept 6242: { 6242: alignas(_Tp) unsigned char __buf[sizeof(_Tp)]; 6242: _Tp* __ptr = reinterpret_cast<_Tp*>(__buf); 6242: __atomic_exchange(std::__addressof(_M_i), std::__addressof(__i), 6242: __ptr, __m); 6242: return *__ptr; 6242: } 6242: 6242: bool 6242: compare_exchange_weak(_Tp& __e, _Tp __i, memory_order __s, 6242: memory_order __f) noexcept 6242: { 6242: return __atomic_compare_exchange(std::__addressof(_M_i), 6242: std::__addressof(__e), 6242: std::__addressof(__i), 6242: true, __s, __f); 6242: } 6242: 6242: bool 6242: compare_exchange_weak(_Tp& __e, _Tp __i, memory_order __s, 6242: memory_order __f) volatile noexcept 6242: { 6242: return __atomic_compare_exchange(std::__addressof(_M_i), 6242: std::__addressof(__e), 6242: std::__addressof(__i), 6242: true, __s, __f); 6242: } 6242: 6242: bool 6242: compare_exchange_weak(_Tp& __e, _Tp __i, 6242: memory_order __m = memory_order_seq_cst) noexcept 6242: { return compare_exchange_weak(__e, __i, __m, 6242: __cmpexch_failure_order(__m)); } 6242: 6242: bool 6242: compare_exchange_weak(_Tp& __e, _Tp __i, 6242: memory_order __m = memory_order_seq_cst) volatile noexcept 6242: { return compare_exchange_weak(__e, __i, __m, 6242: __cmpexch_failure_order(__m)); } 6242: 6242: bool 6242: compare_exchange_strong(_Tp& __e, _Tp __i, memory_order __s, 6242: memory_order __f) noexcept 6242: { 6242: return __atomic_compare_exchange(std::__addressof(_M_i), 6242: std::__addressof(__e), 6242: std::__addressof(__i), 6242: false, __s, __f); 6242: } 6242: 6242: bool 6242: compare_exchange_strong(_Tp& __e, _Tp __i, memory_order __s, 6242: memory_order __f) volatile noexcept 6242: { 6242: return __atomic_compare_exchange(std::__addressof(_M_i), 6242: std::__addressof(__e), 6242: std::__addressof(__i), 6242: false, __s, __f); 6242: } 6242: 6242: bool 6242: compare_exchange_strong(_Tp& __e, _Tp __i, 6242: memory_order __m = memory_order_seq_cst) noexcept 6242: { return compare_exchange_strong(__e, __i, __m, 6242: __cmpexch_failure_order(__m)); } 6242: 6242: bool 6242: compare_exchange_strong(_Tp& __e, _Tp __i, 6242: memory_order __m = memory_order_seq_cst) volatile noexcept 6242: { return compare_exchange_strong(__e, __i, __m, 6242: __cmpexch_failure_order(__m)); } 6242: }; 6242: 6242: 6242: 6242: template 6242: struct atomic<_Tp*> 6242: { 6242: typedef _Tp* __pointer_type; 6242: typedef __atomic_base<_Tp*> __base_type; 6242: __base_type _M_b; 6242: 6242: atomic() noexcept = default; 6242: ~atomic() noexcept = default; 6242: atomic(const atomic&) = delete; 6242: atomic& operator=(const atomic&) = delete; 6242: atomic& operator=(const atomic&) volatile = delete; 6242: 6242: constexpr atomic(__pointer_type __p) noexcept : _M_b(__p) { } 6242: 6242: operator __pointer_type() const noexcept 6242: { return __pointer_type(_M_b); } 6242: 6242: operator __pointer_type() const volatile noexcept 6242: { return __pointer_type(_M_b); } 6242: 6242: __pointer_type 6242: operator=(__pointer_type __p) noexcept 6242: { return _M_b.operator=(__p); } 6242: 6242: __pointer_type 6242: operator=(__pointer_type __p) volatile noexcept 6242: { return _M_b.operator=(__p); } 6242: 6242: __pointer_type 6242: operator++(int) noexcept 6242: { return _M_b++; } 6242: 6242: __pointer_type 6242: operator++(int) volatile noexcept 6242: { return _M_b++; } 6242: 6242: __pointer_type 6242: operator--(int) noexcept 6242: { return _M_b--; } 6242: 6242: __pointer_type 6242: operator--(int) volatile noexcept 6242: { return _M_b--; } 6242: 6242: __pointer_type 6242: operator++() noexcept 6242: { return ++_M_b; } 6242: 6242: __pointer_type 6242: operator++() volatile noexcept 6242: { return ++_M_b; } 6242: 6242: __pointer_type 6242: operator--() noexcept 6242: { return --_M_b; } 6242: 6242: __pointer_type 6242: operator--() volatile noexcept 6242: { return --_M_b; } 6242: 6242: __pointer_type 6242: operator+=(ptrdiff_t __d) noexcept 6242: { return _M_b.operator+=(__d); } 6242: 6242: __pointer_type 6242: operator+=(ptrdiff_t __d) volatile noexcept 6242: { return _M_b.operator+=(__d); } 6242: 6242: __pointer_type 6242: operator-=(ptrdiff_t __d) noexcept 6242: { return _M_b.operator-=(__d); } 6242: 6242: __pointer_type 6242: operator-=(ptrdiff_t __d) volatile noexcept 6242: { return _M_b.operator-=(__d); } 6242: 6242: bool 6242: is_lock_free() const noexcept 6242: { return _M_b.is_lock_free(); } 6242: 6242: bool 6242: is_lock_free() const volatile noexcept 6242: { return _M_b.is_lock_free(); } 6242: 6242: 6242: 6242: 6242: 6242: void 6242: store(__pointer_type __p, 6242: memory_order __m = memory_order_seq_cst) noexcept 6242: { return _M_b.store(__p, __m); } 6242: 6242: void 6242: store(__pointer_type __p, 6242: memory_order __m = memory_order_seq_cst) volatile noexcept 6242: { return _M_b.store(__p, __m); } 6242: 6242: __pointer_type 6242: load(memory_order __m = memory_order_seq_cst) const noexcept 6242: { return _M_b.load(__m); } 6242: 6242: __pointer_type 6242: load(memory_order __m = memory_order_seq_cst) const volatile noexcept 6242: { return _M_b.load(__m); } 6242: 6242: __pointer_type 6242: exchange(__pointer_type __p, 6242: memory_order __m = memory_order_seq_cst) noexcept 6242: { return _M_b.exchange(__p, __m); } 6242: 6242: __pointer_type 6242: exchange(__pointer_type __p, 6242: memory_order __m = memory_order_seq_cst) volatile noexcept 6242: { return _M_b.exchange(__p, __m); } 6242: 6242: bool 6242: compare_exchange_weak(__pointer_type& __p1, __pointer_type __p2, 6242: memory_order __m1, memory_order __m2) noexcept 6242: { return _M_b.compare_exchange_strong(__p1, __p2, __m1, __m2); } 6242: 6242: bool 6242: compare_exchange_weak(__pointer_type& __p1, __pointer_type __p2, 6242: memory_order __m1, 6242: memory_order __m2) volatile noexcept 6242: { return _M_b.compare_exchange_strong(__p1, __p2, __m1, __m2); } 6242: 6242: bool 6242: compare_exchange_weak(__pointer_type& __p1, __pointer_type __p2, 6242: memory_order __m = memory_order_seq_cst) noexcept 6242: { 6242: return compare_exchange_weak(__p1, __p2, __m, 6242: __cmpexch_failure_order(__m)); 6242: } 6242: 6242: bool 6242: compare_exchange_weak(__pointer_type& __p1, __pointer_type __p2, 6242: memory_order __m = memory_order_seq_cst) volatile noexcept 6242: { 6242: return compare_exchange_weak(__p1, __p2, __m, 6242: __cmpexch_failure_order(__m)); 6242: } 6242: 6242: bool 6242: compare_exchange_strong(__pointer_type& __p1, __pointer_type __p2, 6242: memory_order __m1, memory_order __m2) noexcept 6242: { return _M_b.compare_exchange_strong(__p1, __p2, __m1, __m2); } 6242: 6242: bool 6242: compare_exchange_strong(__pointer_type& __p1, __pointer_type __p2, 6242: memory_order __m1, 6242: memory_order __m2) volatile noexcept 6242: { return _M_b.compare_exchange_strong(__p1, __p2, __m1, __m2); } 6242: 6242: bool 6242: compare_exchange_strong(__pointer_type& __p1, __pointer_type __p2, 6242: memory_order __m = memory_order_seq_cst) noexcept 6242: { 6242: return _M_b.compare_exchange_strong(__p1, __p2, __m, 6242: __cmpexch_failure_order(__m)); 6242: } 6242: 6242: bool 6242: compare_exchange_strong(__pointer_type& __p1, __pointer_type __p2, 6242: memory_order __m = memory_order_seq_cst) volatile noexcept 6242: { 6242: return _M_b.compare_exchange_strong(__p1, __p2, __m, 6242: __cmpexch_failure_order(__m)); 6242: } 6242: 6242: __pointer_type 6242: fetch_add(ptrdiff_t __d, 6242: memory_order __m = memory_order_seq_cst) noexcept 6242: { return _M_b.fetch_add(__d, __m); } 6242: 6242: __pointer_type 6242: fetch_add(ptrdiff_t __d, 6242: memory_order __m = memory_order_seq_cst) volatile noexcept 6242: { return _M_b.fetch_add(__d, __m); } 6242: 6242: __pointer_type 6242: fetch_sub(ptrdiff_t __d, 6242: memory_order __m = memory_order_seq_cst) noexcept 6242: { return _M_b.fetch_sub(__d, __m); } 6242: 6242: __pointer_type 6242: fetch_sub(ptrdiff_t __d, 6242: memory_order __m = memory_order_seq_cst) volatile noexcept 6242: { return _M_b.fetch_sub(__d, __m); } 6242: }; 6242: 6242: 6242: 6242: template<> 6242: struct atomic : __atomic_base 6242: { 6242: typedef char __integral_type; 6242: typedef __atomic_base __base_type; 6242: 6242: atomic() noexcept = default; 6242: ~atomic() noexcept = default; 6242: atomic(const atomic&) = delete; 6242: atomic& operator=(const atomic&) = delete; 6242: atomic& operator=(const atomic&) volatile = delete; 6242: 6242: constexpr atomic(__integral_type __i) noexcept : __base_type(__i) { } 6242: 6242: using __base_type::operator __integral_type; 6242: using __base_type::operator=; 6242: 6242: 6242: 6242: 6242: }; 6242: 6242: 6242: template<> 6242: struct atomic : __atomic_base 6242: { 6242: typedef signed char __integral_type; 6242: typedef __atomic_base __base_type; 6242: 6242: atomic() noexcept= default; 6242: ~atomic() noexcept = default; 6242: atomic(const atomic&) = delete; 6242: atomic& operator=(const atomic&) = delete; 6242: atomic& operator=(const atomic&) volatile = delete; 6242: 6242: constexpr atomic(__integral_type __i) noexcept : __base_type(__i) { } 6242: 6242: using __base_type::operator __integral_type; 6242: using __base_type::operator=; 6242: 6242: 6242: 6242: 6242: }; 6242: 6242: 6242: template<> 6242: struct atomic : __atomic_base 6242: { 6242: typedef unsigned char __integral_type; 6242: typedef __atomic_base __base_type; 6242: 6242: atomic() noexcept= default; 6242: ~atomic() noexcept = default; 6242: atomic(const atomic&) = delete; 6242: atomic& operator=(const atomic&) = delete; 6242: atomic& operator=(const atomic&) volatile = delete; 6242: 6242: constexpr atomic(__integral_type __i) noexcept : __base_type(__i) { } 6242: 6242: using __base_type::operator __integral_type; 6242: using __base_type::operator=; 6242: 6242: 6242: 6242: 6242: }; 6242: 6242: 6242: template<> 6242: struct atomic : __atomic_base 6242: { 6242: typedef short __integral_type; 6242: typedef __atomic_base __base_type; 6242: 6242: atomic() noexcept = default; 6242: ~atomic() noexcept = default; 6242: atomic(const atomic&) = delete; 6242: atomic& operator=(const atomic&) = delete; 6242: atomic& operator=(const atomic&) volatile = delete; 6242: 6242: constexpr atomic(__integral_type __i) noexcept : __base_type(__i) { } 6242: 6242: using __base_type::operator __integral_type; 6242: using __base_type::operator=; 6242: 6242: 6242: 6242: 6242: }; 6242: 6242: 6242: template<> 6242: struct atomic : __atomic_base 6242: { 6242: typedef unsigned short __integral_type; 6242: typedef __atomic_base __base_type; 6242: 6242: atomic() noexcept = default; 6242: ~atomic() noexcept = default; 6242: atomic(const atomic&) = delete; 6242: atomic& operator=(const atomic&) = delete; 6242: atomic& operator=(const atomic&) volatile = delete; 6242: 6242: constexpr atomic(__integral_type __i) noexcept : __base_type(__i) { } 6242: 6242: using __base_type::operator __integral_type; 6242: using __base_type::operator=; 6242: 6242: 6242: 6242: 6242: }; 6242: 6242: 6242: template<> 6242: struct atomic : __atomic_base 6242: { 6242: typedef int __integral_type; 6242: typedef __atomic_base __base_type; 6242: 6242: atomic() noexcept = default; 6242: ~atomic() noexcept = default; 6242: atomic(const atomic&) = delete; 6242: atomic& operator=(const atomic&) = delete; 6242: atomic& operator=(const atomic&) volatile = delete; 6242: 6242: constexpr atomic(__integral_type __i) noexcept : __base_type(__i) { } 6242: 6242: using __base_type::operator __integral_type; 6242: using __base_type::operator=; 6242: 6242: 6242: 6242: 6242: }; 6242: 6242: 6242: template<> 6242: struct atomic : __atomic_base 6242: { 6242: typedef unsigned int __integral_type; 6242: typedef __atomic_base __base_type; 6242: 6242: atomic() noexcept = default; 6242: ~atomic() noexcept = default; 6242: atomic(const atomic&) = delete; 6242: atomic& operator=(const atomic&) = delete; 6242: atomic& operator=(const atomic&) volatile = delete; 6242: 6242: constexpr atomic(__integral_type __i) noexcept : __base_type(__i) { } 6242: 6242: using __base_type::operator __integral_type; 6242: using __base_type::operator=; 6242: 6242: 6242: 6242: 6242: }; 6242: 6242: 6242: template<> 6242: struct atomic : __atomic_base 6242: { 6242: typedef long __integral_type; 6242: typedef __atomic_base __base_type; 6242: 6242: atomic() noexcept = default; 6242: ~atomic() noexcept = default; 6242: atomic(const atomic&) = delete; 6242: atomic& operator=(const atomic&) = delete; 6242: atomic& operator=(const atomic&) volatile = delete; 6242: 6242: constexpr atomic(__integral_type __i) noexcept : __base_type(__i) { } 6242: 6242: using __base_type::operator __integral_type; 6242: using __base_type::operator=; 6242: 6242: 6242: 6242: 6242: }; 6242: 6242: 6242: template<> 6242: struct atomic : __atomic_base 6242: { 6242: typedef unsigned long __integral_type; 6242: typedef __atomic_base __base_type; 6242: 6242: atomic() noexcept = default; 6242: ~atomic() noexcept = default; 6242: atomic(const atomic&) = delete; 6242: atomic& operator=(const atomic&) = delete; 6242: atomic& operator=(const atomic&) volatile = delete; 6242: 6242: constexpr atomic(__integral_type __i) noexcept : __base_type(__i) { } 6242: 6242: using __base_type::operator __integral_type; 6242: using __base_type::operator=; 6242: 6242: 6242: 6242: 6242: }; 6242: 6242: 6242: template<> 6242: struct atomic : __atomic_base 6242: { 6242: typedef long long __integral_type; 6242: typedef __atomic_base __base_type; 6242: 6242: atomic() noexcept = default; 6242: ~atomic() noexcept = default; 6242: atomic(const atomic&) = delete; 6242: atomic& operator=(const atomic&) = delete; 6242: atomic& operator=(const atomic&) volatile = delete; 6242: 6242: constexpr atomic(__integral_type __i) noexcept : __base_type(__i) { } 6242: 6242: using __base_type::operator __integral_type; 6242: using __base_type::operator=; 6242: 6242: 6242: 6242: 6242: }; 6242: 6242: 6242: template<> 6242: struct atomic : __atomic_base 6242: { 6242: typedef unsigned long long __integral_type; 6242: typedef __atomic_base __base_type; 6242: 6242: atomic() noexcept = default; 6242: ~atomic() noexcept = default; 6242: atomic(const atomic&) = delete; 6242: atomic& operator=(const atomic&) = delete; 6242: atomic& operator=(const atomic&) volatile = delete; 6242: 6242: constexpr atomic(__integral_type __i) noexcept : __base_type(__i) { } 6242: 6242: using __base_type::operator __integral_type; 6242: using __base_type::operator=; 6242: 6242: 6242: 6242: 6242: }; 6242: 6242: 6242: template<> 6242: struct atomic : __atomic_base 6242: { 6242: typedef wchar_t __integral_type; 6242: typedef __atomic_base __base_type; 6242: 6242: atomic() noexcept = default; 6242: ~atomic() noexcept = default; 6242: atomic(const atomic&) = delete; 6242: atomic& operator=(const atomic&) = delete; 6242: atomic& operator=(const atomic&) volatile = delete; 6242: 6242: constexpr atomic(__integral_type __i) noexcept : __base_type(__i) { } 6242: 6242: using __base_type::operator __integral_type; 6242: using __base_type::operator=; 6242: 6242: 6242: 6242: 6242: }; 6242: 6242: 6242: template<> 6242: struct atomic : __atomic_base 6242: { 6242: typedef char16_t __integral_type; 6242: typedef __atomic_base __base_type; 6242: 6242: atomic() noexcept = default; 6242: ~atomic() noexcept = default; 6242: atomic(const atomic&) = delete; 6242: atomic& operator=(const atomic&) = delete; 6242: atomic& operator=(const atomic&) volatile = delete; 6242: 6242: constexpr atomic(__integral_type __i) noexcept : __base_type(__i) { } 6242: 6242: using __base_type::operator __integral_type; 6242: using __base_type::operator=; 6242: 6242: 6242: 6242: 6242: }; 6242: 6242: 6242: template<> 6242: struct atomic : __atomic_base 6242: { 6242: typedef char32_t __integral_type; 6242: typedef __atomic_base __base_type; 6242: 6242: atomic() noexcept = default; 6242: ~atomic() noexcept = default; 6242: atomic(const atomic&) = delete; 6242: atomic& operator=(const atomic&) = delete; 6242: atomic& operator=(const atomic&) volatile = delete; 6242: 6242: constexpr atomic(__integral_type __i) noexcept : __base_type(__i) { } 6242: 6242: using __base_type::operator __integral_type; 6242: using __base_type::operator=; 6242: 6242: 6242: 6242: 6242: }; 6242: 6242: 6242: 6242: typedef atomic atomic_bool; 6242: 6242: 6242: typedef atomic atomic_char; 6242: 6242: 6242: typedef atomic atomic_schar; 6242: 6242: 6242: typedef atomic atomic_uchar; 6242: 6242: 6242: typedef atomic atomic_short; 6242: 6242: 6242: typedef atomic atomic_ushort; 6242: 6242: 6242: typedef atomic atomic_int; 6242: 6242: 6242: typedef atomic atomic_uint; 6242: 6242: 6242: typedef atomic atomic_long; 6242: 6242: 6242: typedef atomic atomic_ulong; 6242: 6242: 6242: typedef atomic atomic_llong; 6242: 6242: 6242: typedef atomic atomic_ullong; 6242: 6242: 6242: typedef atomic atomic_wchar_t; 6242: 6242: 6242: typedef atomic atomic_char16_t; 6242: 6242: 6242: typedef atomic atomic_char32_t; 6242: 6242: 6242: 6242: 6242: 6242: 6242: typedef atomic atomic_int8_t; 6242: 6242: 6242: typedef atomic atomic_uint8_t; 6242: 6242: 6242: typedef atomic atomic_int16_t; 6242: 6242: 6242: typedef atomic atomic_uint16_t; 6242: 6242: 6242: typedef atomic atomic_int32_t; 6242: 6242: 6242: typedef atomic atomic_uint32_t; 6242: 6242: 6242: typedef atomic atomic_int64_t; 6242: 6242: 6242: typedef atomic atomic_uint64_t; 6242: 6242: 6242: 6242: typedef atomic atomic_int_least8_t; 6242: 6242: 6242: typedef atomic atomic_uint_least8_t; 6242: 6242: 6242: typedef atomic atomic_int_least16_t; 6242: 6242: 6242: typedef atomic atomic_uint_least16_t; 6242: 6242: 6242: typedef atomic atomic_int_least32_t; 6242: 6242: 6242: typedef atomic atomic_uint_least32_t; 6242: 6242: 6242: typedef atomic atomic_int_least64_t; 6242: 6242: 6242: typedef atomic atomic_uint_least64_t; 6242: 6242: 6242: 6242: typedef atomic atomic_int_fast8_t; 6242: 6242: 6242: typedef atomic atomic_uint_fast8_t; 6242: 6242: 6242: typedef atomic atomic_int_fast16_t; 6242: 6242: 6242: typedef atomic atomic_uint_fast16_t; 6242: 6242: 6242: typedef atomic atomic_int_fast32_t; 6242: 6242: 6242: typedef atomic atomic_uint_fast32_t; 6242: 6242: 6242: typedef atomic atomic_int_fast64_t; 6242: 6242: 6242: typedef atomic atomic_uint_fast64_t; 6242: 6242: 6242: 6242: 6242: typedef atomic atomic_intptr_t; 6242: 6242: 6242: typedef atomic atomic_uintptr_t; 6242: 6242: 6242: typedef atomic atomic_size_t; 6242: 6242: 6242: typedef atomic atomic_ptrdiff_t; 6242: 6242: 6242: 6242: typedef atomic atomic_intmax_t; 6242: 6242: 6242: typedef atomic atomic_uintmax_t; 6242: 6242: 6242: 6242: inline bool 6242: atomic_flag_test_and_set_explicit(atomic_flag* __a, 6242: memory_order __m) noexcept 6242: { return __a->test_and_set(__m); } 6242: 6242: inline bool 6242: atomic_flag_test_and_set_explicit(volatile atomic_flag* __a, 6242: memory_order __m) noexcept 6242: { return __a->test_and_set(__m); } 6242: 6242: inline void 6242: atomic_flag_clear_explicit(atomic_flag* __a, memory_order __m) noexcept 6242: { __a->clear(__m); } 6242: 6242: inline void 6242: atomic_flag_clear_explicit(volatile atomic_flag* __a, 6242: memory_order __m) noexcept 6242: { __a->clear(__m); } 6242: 6242: inline bool 6242: atomic_flag_test_and_set(atomic_flag* __a) noexcept 6242: { return atomic_flag_test_and_set_explicit(__a, memory_order_seq_cst); } 6242: 6242: inline bool 6242: atomic_flag_test_and_set(volatile atomic_flag* __a) noexcept 6242: { return atomic_flag_test_and_set_explicit(__a, memory_order_seq_cst); } 6242: 6242: inline void 6242: atomic_flag_clear(atomic_flag* __a) noexcept 6242: { atomic_flag_clear_explicit(__a, memory_order_seq_cst); } 6242: 6242: inline void 6242: atomic_flag_clear(volatile atomic_flag* __a) noexcept 6242: { atomic_flag_clear_explicit(__a, memory_order_seq_cst); } 6242: 6242: 6242: 6242: template 6242: inline bool 6242: atomic_is_lock_free(const atomic<_ITp>* __a) noexcept 6242: { return __a->is_lock_free(); } 6242: 6242: template 6242: inline bool 6242: atomic_is_lock_free(const volatile atomic<_ITp>* __a) noexcept 6242: { return __a->is_lock_free(); } 6242: 6242: template 6242: inline void 6242: atomic_init(atomic<_ITp>* __a, _ITp __i) noexcept 6242: { __a->store(__i, memory_order_relaxed); } 6242: 6242: template 6242: inline void 6242: atomic_init(volatile atomic<_ITp>* __a, _ITp __i) noexcept 6242: { __a->store(__i, memory_order_relaxed); } 6242: 6242: template 6242: inline void 6242: atomic_store_explicit(atomic<_ITp>* __a, _ITp __i, 6242: memory_order __m) noexcept 6242: { __a->store(__i, __m); } 6242: 6242: template 6242: inline void 6242: atomic_store_explicit(volatile atomic<_ITp>* __a, _ITp __i, 6242: memory_order __m) noexcept 6242: { __a->store(__i, __m); } 6242: 6242: template 6242: inline _ITp 6242: atomic_load_explicit(const atomic<_ITp>* __a, memory_order __m) noexcept 6242: { return __a->load(__m); } 6242: 6242: template 6242: inline _ITp 6242: atomic_load_explicit(const volatile atomic<_ITp>* __a, 6242: memory_order __m) noexcept 6242: { return __a->load(__m); } 6242: 6242: template 6242: inline _ITp 6242: atomic_exchange_explicit(atomic<_ITp>* __a, _ITp __i, 6242: memory_order __m) noexcept 6242: { return __a->exchange(__i, __m); } 6242: 6242: template 6242: inline _ITp 6242: atomic_exchange_explicit(volatile atomic<_ITp>* __a, _ITp __i, 6242: memory_order __m) noexcept 6242: { return __a->exchange(__i, __m); } 6242: 6242: template 6242: inline bool 6242: atomic_compare_exchange_weak_explicit(atomic<_ITp>* __a, 6242: _ITp* __i1, _ITp __i2, 6242: memory_order __m1, 6242: memory_order __m2) noexcept 6242: { return __a->compare_exchange_weak(*__i1, __i2, __m1, __m2); } 6242: 6242: template 6242: inline bool 6242: atomic_compare_exchange_weak_explicit(volatile atomic<_ITp>* __a, 6242: _ITp* __i1, _ITp __i2, 6242: memory_order __m1, 6242: memory_order __m2) noexcept 6242: { return __a->compare_exchange_weak(*__i1, __i2, __m1, __m2); } 6242: 6242: template 6242: inline bool 6242: atomic_compare_exchange_strong_explicit(atomic<_ITp>* __a, 6242: _ITp* __i1, _ITp __i2, 6242: memory_order __m1, 6242: memory_order __m2) noexcept 6242: { return __a->compare_exchange_strong(*__i1, __i2, __m1, __m2); } 6242: 6242: template 6242: inline bool 6242: atomic_compare_exchange_strong_explicit(volatile atomic<_ITp>* __a, 6242: _ITp* __i1, _ITp __i2, 6242: memory_order __m1, 6242: memory_order __m2) noexcept 6242: { return __a->compare_exchange_strong(*__i1, __i2, __m1, __m2); } 6242: 6242: 6242: template 6242: inline void 6242: atomic_store(atomic<_ITp>* __a, _ITp __i) noexcept 6242: { atomic_store_explicit(__a, __i, memory_order_seq_cst); } 6242: 6242: template 6242: inline void 6242: atomic_store(volatile atomic<_ITp>* __a, _ITp __i) noexcept 6242: { atomic_store_explicit(__a, __i, memory_order_seq_cst); } 6242: 6242: template 6242: inline _ITp 6242: atomic_load(const atomic<_ITp>* __a) noexcept 6242: { return atomic_load_explicit(__a, memory_order_seq_cst); } 6242: 6242: template 6242: inline _ITp 6242: atomic_load(const volatile atomic<_ITp>* __a) noexcept 6242: { return atomic_load_explicit(__a, memory_order_seq_cst); } 6242: 6242: template 6242: inline _ITp 6242: atomic_exchange(atomic<_ITp>* __a, _ITp __i) noexcept 6242: { return atomic_exchange_explicit(__a, __i, memory_order_seq_cst); } 6242: 6242: template 6242: inline _ITp 6242: atomic_exchange(volatile atomic<_ITp>* __a, _ITp __i) noexcept 6242: { return atomic_exchange_explicit(__a, __i, memory_order_seq_cst); } 6242: 6242: template 6242: inline bool 6242: atomic_compare_exchange_weak(atomic<_ITp>* __a, 6242: _ITp* __i1, _ITp __i2) noexcept 6242: { 6242: return atomic_compare_exchange_weak_explicit(__a, __i1, __i2, 6242: memory_order_seq_cst, 6242: memory_order_seq_cst); 6242: } 6242: 6242: template 6242: inline bool 6242: atomic_compare_exchange_weak(volatile atomic<_ITp>* __a, 6242: _ITp* __i1, _ITp __i2) noexcept 6242: { 6242: return atomic_compare_exchange_weak_explicit(__a, __i1, __i2, 6242: memory_order_seq_cst, 6242: memory_order_seq_cst); 6242: } 6242: 6242: template 6242: inline bool 6242: atomic_compare_exchange_strong(atomic<_ITp>* __a, 6242: _ITp* __i1, _ITp __i2) noexcept 6242: { 6242: return atomic_compare_exchange_strong_explicit(__a, __i1, __i2, 6242: memory_order_seq_cst, 6242: memory_order_seq_cst); 6242: } 6242: 6242: template 6242: inline bool 6242: atomic_compare_exchange_strong(volatile atomic<_ITp>* __a, 6242: _ITp* __i1, _ITp __i2) noexcept 6242: { 6242: return atomic_compare_exchange_strong_explicit(__a, __i1, __i2, 6242: memory_order_seq_cst, 6242: memory_order_seq_cst); 6242: } 6242: 6242: 6242: 6242: 6242: 6242: template 6242: inline _ITp 6242: atomic_fetch_add_explicit(__atomic_base<_ITp>* __a, _ITp __i, 6242: memory_order __m) noexcept 6242: { return __a->fetch_add(__i, __m); } 6242: 6242: template 6242: inline _ITp 6242: atomic_fetch_add_explicit(volatile __atomic_base<_ITp>* __a, _ITp __i, 6242: memory_order __m) noexcept 6242: { return __a->fetch_add(__i, __m); } 6242: 6242: template 6242: inline _ITp 6242: atomic_fetch_sub_explicit(__atomic_base<_ITp>* __a, _ITp __i, 6242: memory_order __m) noexcept 6242: { return __a->fetch_sub(__i, __m); } 6242: 6242: template 6242: inline _ITp 6242: atomic_fetch_sub_explicit(volatile __atomic_base<_ITp>* __a, _ITp __i, 6242: memory_order __m) noexcept 6242: { return __a->fetch_sub(__i, __m); } 6242: 6242: template 6242: inline _ITp 6242: atomic_fetch_and_explicit(__atomic_base<_ITp>* __a, _ITp __i, 6242: memory_order __m) noexcept 6242: { return __a->fetch_and(__i, __m); } 6242: 6242: template 6242: inline _ITp 6242: atomic_fetch_and_explicit(volatile __atomic_base<_ITp>* __a, _ITp __i, 6242: memory_order __m) noexcept 6242: { return __a->fetch_and(__i, __m); } 6242: 6242: template 6242: inline _ITp 6242: atomic_fetch_or_explicit(__atomic_base<_ITp>* __a, _ITp __i, 6242: memory_order __m) noexcept 6242: { return __a->fetch_or(__i, __m); } 6242: 6242: template 6242: inline _ITp 6242: atomic_fetch_or_explicit(volatile __atomic_base<_ITp>* __a, _ITp __i, 6242: memory_order __m) noexcept 6242: { return __a->fetch_or(__i, __m); } 6242: 6242: template 6242: inline _ITp 6242: atomic_fetch_xor_explicit(__atomic_base<_ITp>* __a, _ITp __i, 6242: memory_order __m) noexcept 6242: { return __a->fetch_xor(__i, __m); } 6242: 6242: template 6242: inline _ITp 6242: atomic_fetch_xor_explicit(volatile __atomic_base<_ITp>* __a, _ITp __i, 6242: memory_order __m) noexcept 6242: { return __a->fetch_xor(__i, __m); } 6242: 6242: template 6242: inline _ITp 6242: atomic_fetch_add(__atomic_base<_ITp>* __a, _ITp __i) noexcept 6242: { return atomic_fetch_add_explicit(__a, __i, memory_order_seq_cst); } 6242: 6242: template 6242: inline _ITp 6242: atomic_fetch_add(volatile __atomic_base<_ITp>* __a, _ITp __i) noexcept 6242: { return atomic_fetch_add_explicit(__a, __i, memory_order_seq_cst); } 6242: 6242: template 6242: inline _ITp 6242: atomic_fetch_sub(__atomic_base<_ITp>* __a, _ITp __i) noexcept 6242: { return atomic_fetch_sub_explicit(__a, __i, memory_order_seq_cst); } 6242: 6242: template 6242: inline _ITp 6242: atomic_fetch_sub(volatile __atomic_base<_ITp>* __a, _ITp __i) noexcept 6242: { return atomic_fetch_sub_explicit(__a, __i, memory_order_seq_cst); } 6242: 6242: template 6242: inline _ITp 6242: atomic_fetch_and(__atomic_base<_ITp>* __a, _ITp __i) noexcept 6242: { return atomic_fetch_and_explicit(__a, __i, memory_order_seq_cst); } 6242: 6242: template 6242: inline _ITp 6242: atomic_fetch_and(volatile __atomic_base<_ITp>* __a, _ITp __i) noexcept 6242: { return atomic_fetch_and_explicit(__a, __i, memory_order_seq_cst); } 6242: 6242: template 6242: inline _ITp 6242: atomic_fetch_or(__atomic_base<_ITp>* __a, _ITp __i) noexcept 6242: { return atomic_fetch_or_explicit(__a, __i, memory_order_seq_cst); } 6242: 6242: template 6242: inline _ITp 6242: atomic_fetch_or(volatile __atomic_base<_ITp>* __a, _ITp __i) noexcept 6242: { return atomic_fetch_or_explicit(__a, __i, memory_order_seq_cst); } 6242: 6242: template 6242: inline _ITp 6242: atomic_fetch_xor(__atomic_base<_ITp>* __a, _ITp __i) noexcept 6242: { return atomic_fetch_xor_explicit(__a, __i, memory_order_seq_cst); } 6242: 6242: template 6242: inline _ITp 6242: atomic_fetch_xor(volatile __atomic_base<_ITp>* __a, _ITp __i) noexcept 6242: { return atomic_fetch_xor_explicit(__a, __i, memory_order_seq_cst); } 6242: 6242: 6242: 6242: template 6242: inline _ITp* 6242: atomic_fetch_add_explicit(atomic<_ITp*>* __a, ptrdiff_t __d, 6242: memory_order __m) noexcept 6242: { return __a->fetch_add(__d, __m); } 6242: 6242: template 6242: inline _ITp* 6242: atomic_fetch_add_explicit(volatile atomic<_ITp*>* __a, ptrdiff_t __d, 6242: memory_order __m) noexcept 6242: { return __a->fetch_add(__d, __m); } 6242: 6242: template 6242: inline _ITp* 6242: atomic_fetch_add(volatile atomic<_ITp*>* __a, ptrdiff_t __d) noexcept 6242: { return __a->fetch_add(__d); } 6242: 6242: template 6242: inline _ITp* 6242: atomic_fetch_add(atomic<_ITp*>* __a, ptrdiff_t __d) noexcept 6242: { return __a->fetch_add(__d); } 6242: 6242: template 6242: inline _ITp* 6242: atomic_fetch_sub_explicit(volatile atomic<_ITp*>* __a, 6242: ptrdiff_t __d, memory_order __m) noexcept 6242: { return __a->fetch_sub(__d, __m); } 6242: 6242: template 6242: inline _ITp* 6242: atomic_fetch_sub_explicit(atomic<_ITp*>* __a, ptrdiff_t __d, 6242: memory_order __m) noexcept 6242: { return __a->fetch_sub(__d, __m); } 6242: 6242: template 6242: inline _ITp* 6242: atomic_fetch_sub(volatile atomic<_ITp*>* __a, ptrdiff_t __d) noexcept 6242: { return __a->fetch_sub(__d); } 6242: 6242: template 6242: inline _ITp* 6242: atomic_fetch_sub(atomic<_ITp*>* __a, ptrdiff_t __d) noexcept 6242: { return __a->fetch_sub(__d); } 6242: 6242: 6242: 6242: } 6242: # 20 "/usr/include/boost/smart_ptr/detail/sp_counted_base_std_atomic.hpp" 2 3 4 6242: 6242: 6242: namespace boost 6242: { 6242: 6242: namespace detail 6242: { 6242: 6242: inline void atomic_increment( std::atomic_int_least32_t * pw ) 6242: { 6242: pw->fetch_add( 1, std::memory_order_relaxed ); 6242: } 6242: 6242: inline std::int_least32_t atomic_decrement( std::atomic_int_least32_t * pw ) 6242: { 6242: return pw->fetch_sub( 1, std::memory_order_acq_rel ); 6242: } 6242: 6242: inline std::int_least32_t atomic_conditional_increment( std::atomic_int_least32_t * pw ) 6242: { 6242: 6242: 6242: 6242: 6242: std::int_least32_t r = pw->load( std::memory_order_relaxed ); 6242: 6242: for( ;; ) 6242: { 6242: if( r == 0 ) 6242: { 6242: return r; 6242: } 6242: 6242: if( pw->compare_exchange_weak( r, r + 1, std::memory_order_relaxed, std::memory_order_relaxed ) ) 6242: { 6242: return r; 6242: } 6242: } 6242: } 6242: 6242: class sp_counted_base 6242: { 6242: private: 6242: 6242: sp_counted_base( sp_counted_base const & ); 6242: sp_counted_base & operator= ( sp_counted_base const & ); 6242: 6242: std::atomic_int_least32_t use_count_; 6242: std::atomic_int_least32_t weak_count_; 6242: 6242: public: 6242: 6242: sp_counted_base(): use_count_( 1 ), weak_count_( 1 ) 6242: { 6242: } 6242: 6242: virtual ~sp_counted_base() 6242: { 6242: } 6242: 6242: 6242: 6242: 6242: virtual void dispose() = 0; 6242: 6242: 6242: 6242: virtual void destroy() 6242: { 6242: delete this; 6242: } 6242: 6242: virtual void * get_deleter( sp_typeinfo const & ti ) = 0; 6242: virtual void * get_local_deleter( sp_typeinfo const & ti ) = 0; 6242: virtual void * get_untyped_deleter() = 0; 6242: 6242: void add_ref_copy() 6242: { 6242: atomic_increment( &use_count_ ); 6242: } 6242: 6242: bool add_ref_lock() 6242: { 6242: return atomic_conditional_increment( &use_count_ ) != 0; 6242: } 6242: 6242: void release() 6242: { 6242: if( atomic_decrement( &use_count_ ) == 1 ) 6242: { 6242: dispose(); 6242: weak_release(); 6242: } 6242: } 6242: 6242: void weak_add_ref() 6242: { 6242: atomic_increment( &weak_count_ ); 6242: } 6242: 6242: void weak_release() 6242: { 6242: if( atomic_decrement( &weak_count_ ) == 1 ) 6242: { 6242: destroy(); 6242: } 6242: } 6242: 6242: long use_count() const 6242: { 6242: return use_count_.load( std::memory_order_acquire ); 6242: } 6242: }; 6242: 6242: } 6242: 6242: } 6242: # 49 "/usr/include/boost/smart_ptr/detail/sp_counted_base.hpp" 2 3 4 6242: # 30 "/usr/include/boost/smart_ptr/detail/shared_count.hpp" 2 3 4 6242: # 1 "/usr/include/boost/smart_ptr/detail/sp_counted_impl.hpp" 1 3 4 6242: # 29 "/usr/include/boost/smart_ptr/detail/sp_counted_impl.hpp" 3 4 6242: # 1 "/usr/include/boost/core/addressof.hpp" 1 3 4 6242: # 34 "/usr/include/boost/core/addressof.hpp" 3 4 6242: namespace boost { 6242: 6242: template 6242: constexpr inline T* 6242: addressof(T& o) noexcept 6242: { 6242: return __builtin_addressof(o); 6242: } 6242: 6242: } 6242: # 266 "/usr/include/boost/core/addressof.hpp" 3 4 6242: namespace boost { 6242: 6242: template 6242: const T* addressof(const T&&) = delete; 6242: 6242: } 6242: # 30 "/usr/include/boost/smart_ptr/detail/sp_counted_impl.hpp" 2 3 4 6242: # 41 "/usr/include/boost/smart_ptr/detail/sp_counted_impl.hpp" 3 4 6242: namespace boost 6242: { 6242: # 51 "/usr/include/boost/smart_ptr/detail/sp_counted_impl.hpp" 3 4 6242: namespace detail 6242: { 6242: 6242: 6242: 6242: template class local_sp_deleter; 6242: 6242: template D * get_local_deleter( D * ) 6242: { 6242: return 0; 6242: } 6242: 6242: template D * get_local_deleter( local_sp_deleter * p ); 6242: 6242: 6242: 6242: template class sp_counted_impl_p: public sp_counted_base 6242: { 6242: private: 6242: 6242: X * px_; 6242: 6242: sp_counted_impl_p( sp_counted_impl_p const & ); 6242: sp_counted_impl_p & operator= ( sp_counted_impl_p const & ); 6242: 6242: typedef sp_counted_impl_p this_type; 6242: 6242: public: 6242: 6242: explicit sp_counted_impl_p( X * px ): px_( px ) 6242: { 6242: 6242: 6242: 6242: } 6242: 6242: virtual void dispose() 6242: { 6242: 6242: 6242: 6242: boost::checked_delete( px_ ); 6242: } 6242: 6242: virtual void * get_deleter( sp_typeinfo const & ) 6242: { 6242: return 0; 6242: } 6242: 6242: virtual void * get_local_deleter( sp_typeinfo const & ) 6242: { 6242: return 0; 6242: } 6242: 6242: virtual void * get_untyped_deleter() 6242: { 6242: return 0; 6242: } 6242: # 137 "/usr/include/boost/smart_ptr/detail/sp_counted_impl.hpp" 3 4 6242: }; 6242: # 146 "/usr/include/boost/smart_ptr/detail/sp_counted_impl.hpp" 3 4 6242: template class sp_counted_impl_pd: public sp_counted_base 6242: { 6242: private: 6242: 6242: P ptr; 6242: D del; 6242: 6242: sp_counted_impl_pd( sp_counted_impl_pd const & ); 6242: sp_counted_impl_pd & operator= ( sp_counted_impl_pd const & ); 6242: 6242: typedef sp_counted_impl_pd this_type; 6242: 6242: public: 6242: 6242: 6242: 6242: sp_counted_impl_pd( P p, D & d ): ptr( p ), del( d ) 6242: { 6242: } 6242: 6242: sp_counted_impl_pd( P p ): ptr( p ), del() 6242: { 6242: } 6242: 6242: virtual void dispose() 6242: { 6242: del( ptr ); 6242: } 6242: 6242: virtual void * get_deleter( sp_typeinfo const & ti ) 6242: { 6242: return ti == typeid(D)? &reinterpret_cast( del ): 0; 6242: } 6242: 6242: virtual void * get_local_deleter( sp_typeinfo const & ti ) 6242: { 6242: return ti == typeid(D)? boost::detail::get_local_deleter( boost::addressof( del ) ): 0; 6242: } 6242: 6242: virtual void * get_untyped_deleter() 6242: { 6242: return &reinterpret_cast( del ); 6242: } 6242: # 217 "/usr/include/boost/smart_ptr/detail/sp_counted_impl.hpp" 3 4 6242: }; 6242: 6242: template class sp_counted_impl_pda: public sp_counted_base 6242: { 6242: private: 6242: 6242: P p_; 6242: D d_; 6242: A a_; 6242: 6242: sp_counted_impl_pda( sp_counted_impl_pda const & ); 6242: sp_counted_impl_pda & operator= ( sp_counted_impl_pda const & ); 6242: 6242: typedef sp_counted_impl_pda this_type; 6242: 6242: public: 6242: 6242: 6242: 6242: sp_counted_impl_pda( P p, D & d, A a ): p_( p ), d_( d ), a_( a ) 6242: { 6242: } 6242: 6242: sp_counted_impl_pda( P p, A a ): p_( p ), d_( a ), a_( a ) 6242: { 6242: } 6242: 6242: virtual void dispose() 6242: { 6242: d_( p_ ); 6242: } 6242: 6242: virtual void destroy() 6242: { 6242: 6242: 6242: typedef typename std::allocator_traits::template rebind_alloc< this_type > A2; 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: A2 a2( a_ ); 6242: 6242: this->~this_type(); 6242: 6242: a2.deallocate( this, 1 ); 6242: } 6242: 6242: virtual void * get_deleter( sp_typeinfo const & ti ) 6242: { 6242: return ti == typeid(D)? &reinterpret_cast( d_ ): 0; 6242: } 6242: 6242: virtual void * get_local_deleter( sp_typeinfo const & ti ) 6242: { 6242: return ti == typeid(D)? boost::detail::get_local_deleter( boost::addressof( d_ ) ): 0; 6242: } 6242: 6242: virtual void * get_untyped_deleter() 6242: { 6242: return &reinterpret_cast( d_ ); 6242: } 6242: }; 6242: 6242: 6242: 6242: 6242: 6242: } 6242: 6242: } 6242: # 31 "/usr/include/boost/smart_ptr/detail/shared_count.hpp" 2 3 4 6242: # 47 "/usr/include/boost/smart_ptr/detail/shared_count.hpp" 3 4 6242: #pragma GCC diagnostic push 6242: #pragma GCC diagnostic ignored "-Wdeprecated-declarations" 6242: 6242: 6242: namespace boost 6242: { 6242: 6242: namespace movelib 6242: { 6242: 6242: template< class T, class D > class unique_ptr; 6242: 6242: } 6242: 6242: namespace detail 6242: { 6242: # 71 "/usr/include/boost/smart_ptr/detail/shared_count.hpp" 3 4 6242: struct sp_nothrow_tag {}; 6242: 6242: template< class D > struct sp_inplace_tag 6242: { 6242: }; 6242: 6242: template< class T > class sp_reference_wrapper 6242: { 6242: public: 6242: 6242: explicit sp_reference_wrapper( T & t): t_( boost::addressof( t ) ) 6242: { 6242: } 6242: 6242: template< class Y > void operator()( Y * p ) const 6242: { 6242: (*t_)( p ); 6242: } 6242: 6242: private: 6242: 6242: T * t_; 6242: }; 6242: 6242: template< class D > struct sp_convert_reference 6242: { 6242: typedef D type; 6242: }; 6242: 6242: template< class D > struct sp_convert_reference< D& > 6242: { 6242: typedef sp_reference_wrapper< D > type; 6242: }; 6242: 6242: class weak_count; 6242: 6242: class shared_count 6242: { 6242: private: 6242: 6242: sp_counted_base * pi_; 6242: 6242: 6242: 6242: 6242: 6242: friend class weak_count; 6242: 6242: public: 6242: 6242: constexpr shared_count(): pi_(0) 6242: 6242: 6242: 6242: { 6242: } 6242: 6242: constexpr explicit shared_count( sp_counted_base * pi ): pi_( pi ) 6242: 6242: 6242: 6242: { 6242: } 6242: 6242: template explicit shared_count( Y * p ): pi_( 0 ) 6242: 6242: 6242: 6242: { 6242: 6242: 6242: try 6242: { 6242: pi_ = new sp_counted_impl_p( p ); 6242: } 6242: catch(...) 6242: { 6242: boost::checked_delete( p ); 6242: throw; 6242: } 6242: # 163 "/usr/include/boost/smart_ptr/detail/shared_count.hpp" 3 4 6242: } 6242: 6242: 6242: 6242: 6242: template shared_count( P p, D d ): pi_(0) 6242: 6242: 6242: 6242: 6242: { 6242: 6242: 6242: 6242: 6242: 6242: try 6242: { 6242: pi_ = new sp_counted_impl_pd(p, d); 6242: } 6242: catch(...) 6242: { 6242: d(p); 6242: throw; 6242: } 6242: # 200 "/usr/include/boost/smart_ptr/detail/shared_count.hpp" 3 4 6242: } 6242: 6242: 6242: 6242: template< class P, class D > shared_count( P p, sp_inplace_tag ): pi_( 0 ) 6242: 6242: 6242: 6242: { 6242: 6242: 6242: try 6242: { 6242: pi_ = new sp_counted_impl_pd< P, D >( p ); 6242: } 6242: catch( ... ) 6242: { 6242: D::operator_fn( p ); 6242: throw; 6242: } 6242: # 232 "/usr/include/boost/smart_ptr/detail/shared_count.hpp" 3 4 6242: } 6242: 6242: 6242: 6242: template shared_count( P p, D d, A a ): pi_( 0 ) 6242: 6242: 6242: 6242: { 6242: typedef sp_counted_impl_pda impl_type; 6242: 6242: 6242: 6242: typedef typename std::allocator_traits::template rebind_alloc< impl_type > A2; 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: A2 a2( a ); 6242: 6242: 6242: 6242: try 6242: { 6242: pi_ = a2.allocate( 1 ); 6242: ::new( static_cast< void* >( pi_ ) ) impl_type( p, d, a ); 6242: } 6242: catch(...) 6242: { 6242: d( p ); 6242: 6242: if( pi_ != 0 ) 6242: { 6242: a2.deallocate( static_cast< impl_type* >( pi_ ), 1 ); 6242: } 6242: 6242: throw; 6242: } 6242: # 289 "/usr/include/boost/smart_ptr/detail/shared_count.hpp" 3 4 6242: } 6242: 6242: 6242: 6242: template< class P, class D, class A > shared_count( P p, sp_inplace_tag< D >, A a ): pi_( 0 ) 6242: 6242: 6242: 6242: { 6242: typedef sp_counted_impl_pda< P, D, A > impl_type; 6242: 6242: 6242: 6242: typedef typename std::allocator_traits::template rebind_alloc< impl_type > A2; 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: A2 a2( a ); 6242: 6242: 6242: 6242: try 6242: { 6242: pi_ = a2.allocate( 1 ); 6242: ::new( static_cast< void* >( pi_ ) ) impl_type( p, a ); 6242: } 6242: catch(...) 6242: { 6242: D::operator_fn( p ); 6242: 6242: if( pi_ != 0 ) 6242: { 6242: a2.deallocate( static_cast< impl_type* >( pi_ ), 1 ); 6242: } 6242: 6242: throw; 6242: } 6242: # 346 "/usr/include/boost/smart_ptr/detail/shared_count.hpp" 3 4 6242: } 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: template 6242: explicit shared_count( std::auto_ptr & r ): pi_( new sp_counted_impl_p( r.get() ) ) 6242: 6242: 6242: 6242: { 6242: # 369 "/usr/include/boost/smart_ptr/detail/shared_count.hpp" 3 4 6242: r.release(); 6242: } 6242: 6242: 6242: 6242: 6242: 6242: template 6242: explicit shared_count( std::unique_ptr & r ): pi_( 0 ) 6242: 6242: 6242: 6242: { 6242: typedef typename sp_convert_reference::type D2; 6242: 6242: D2 d2( r.get_deleter() ); 6242: pi_ = new sp_counted_impl_pd< typename std::unique_ptr::pointer, D2 >( r.get(), d2 ); 6242: # 396 "/usr/include/boost/smart_ptr/detail/shared_count.hpp" 3 4 6242: r.release(); 6242: } 6242: 6242: 6242: 6242: template 6242: explicit shared_count( boost::movelib::unique_ptr & r ): pi_( 0 ) 6242: 6242: 6242: 6242: { 6242: typedef typename sp_convert_reference::type D2; 6242: 6242: D2 d2( r.get_deleter() ); 6242: pi_ = new sp_counted_impl_pd< typename boost::movelib::unique_ptr::pointer, D2 >( r.get(), d2 ); 6242: # 421 "/usr/include/boost/smart_ptr/detail/shared_count.hpp" 3 4 6242: r.release(); 6242: } 6242: 6242: ~shared_count() 6242: { 6242: if( pi_ != 0 ) pi_->release(); 6242: 6242: 6242: 6242: } 6242: 6242: shared_count(shared_count const & r): pi_(r.pi_) 6242: 6242: 6242: 6242: { 6242: if( pi_ != 0 ) pi_->add_ref_copy(); 6242: } 6242: 6242: 6242: 6242: shared_count(shared_count && r): pi_(r.pi_) 6242: 6242: 6242: 6242: { 6242: r.pi_ = 0; 6242: } 6242: 6242: 6242: 6242: explicit shared_count(weak_count const & r); 6242: shared_count( weak_count const & r, sp_nothrow_tag ); 6242: 6242: shared_count & operator= (shared_count const & r) 6242: { 6242: sp_counted_base * tmp = r.pi_; 6242: 6242: if( tmp != pi_ ) 6242: { 6242: if( tmp != 0 ) tmp->add_ref_copy(); 6242: if( pi_ != 0 ) pi_->release(); 6242: pi_ = tmp; 6242: } 6242: 6242: return *this; 6242: } 6242: 6242: void swap(shared_count & r) 6242: { 6242: sp_counted_base * tmp = r.pi_; 6242: r.pi_ = pi_; 6242: pi_ = tmp; 6242: } 6242: 6242: long use_count() const 6242: { 6242: return pi_ != 0? pi_->use_count(): 0; 6242: } 6242: 6242: bool unique() const 6242: { 6242: return use_count() == 1; 6242: } 6242: 6242: bool empty() const 6242: { 6242: return pi_ == 0; 6242: } 6242: 6242: friend inline bool operator==(shared_count const & a, shared_count const & b) 6242: { 6242: return a.pi_ == b.pi_; 6242: } 6242: 6242: friend inline bool operator<(shared_count const & a, shared_count const & b) 6242: { 6242: return std::less()( a.pi_, b.pi_ ); 6242: } 6242: 6242: void * get_deleter( sp_typeinfo const & ti ) const 6242: { 6242: return pi_? pi_->get_deleter( ti ): 0; 6242: } 6242: 6242: void * get_local_deleter( sp_typeinfo const & ti ) const 6242: { 6242: return pi_? pi_->get_local_deleter( ti ): 0; 6242: } 6242: 6242: void * get_untyped_deleter() const 6242: { 6242: return pi_? pi_->get_untyped_deleter(): 0; 6242: } 6242: }; 6242: 6242: 6242: class weak_count 6242: { 6242: private: 6242: 6242: sp_counted_base * pi_; 6242: 6242: 6242: 6242: 6242: 6242: friend class shared_count; 6242: 6242: public: 6242: 6242: constexpr weak_count(): pi_(0) 6242: 6242: 6242: 6242: { 6242: } 6242: 6242: weak_count(shared_count const & r): pi_(r.pi_) 6242: 6242: 6242: 6242: { 6242: if(pi_ != 0) pi_->weak_add_ref(); 6242: } 6242: 6242: weak_count(weak_count const & r): pi_(r.pi_) 6242: 6242: 6242: 6242: { 6242: if(pi_ != 0) pi_->weak_add_ref(); 6242: } 6242: 6242: 6242: 6242: 6242: 6242: weak_count(weak_count && r): pi_(r.pi_) 6242: 6242: 6242: 6242: { 6242: r.pi_ = 0; 6242: } 6242: 6242: 6242: 6242: ~weak_count() 6242: { 6242: if(pi_ != 0) pi_->weak_release(); 6242: 6242: 6242: 6242: } 6242: 6242: weak_count & operator= (shared_count const & r) 6242: { 6242: sp_counted_base * tmp = r.pi_; 6242: 6242: if( tmp != pi_ ) 6242: { 6242: if(tmp != 0) tmp->weak_add_ref(); 6242: if(pi_ != 0) pi_->weak_release(); 6242: pi_ = tmp; 6242: } 6242: 6242: return *this; 6242: } 6242: 6242: weak_count & operator= (weak_count const & r) 6242: { 6242: sp_counted_base * tmp = r.pi_; 6242: 6242: if( tmp != pi_ ) 6242: { 6242: if(tmp != 0) tmp->weak_add_ref(); 6242: if(pi_ != 0) pi_->weak_release(); 6242: pi_ = tmp; 6242: } 6242: 6242: return *this; 6242: } 6242: 6242: void swap(weak_count & r) 6242: { 6242: sp_counted_base * tmp = r.pi_; 6242: r.pi_ = pi_; 6242: pi_ = tmp; 6242: } 6242: 6242: long use_count() const 6242: { 6242: return pi_ != 0? pi_->use_count(): 0; 6242: } 6242: 6242: bool empty() const 6242: { 6242: return pi_ == 0; 6242: } 6242: 6242: friend inline bool operator==(weak_count const & a, weak_count const & b) 6242: { 6242: return a.pi_ == b.pi_; 6242: } 6242: 6242: friend inline bool operator<(weak_count const & a, weak_count const & b) 6242: { 6242: return std::less()(a.pi_, b.pi_); 6242: } 6242: }; 6242: 6242: inline shared_count::shared_count( weak_count const & r ): pi_( r.pi_ ) 6242: 6242: 6242: 6242: { 6242: if( pi_ == 0 || !pi_->add_ref_lock() ) 6242: { 6242: boost::throw_exception( boost::bad_weak_ptr() ); 6242: } 6242: } 6242: 6242: inline shared_count::shared_count( weak_count const & r, sp_nothrow_tag ): pi_( r.pi_ ) 6242: 6242: 6242: 6242: { 6242: if( pi_ != 0 && !pi_->add_ref_lock() ) 6242: { 6242: pi_ = 0; 6242: } 6242: } 6242: 6242: } 6242: 6242: } 6242: 6242: 6242: #pragma GCC diagnostic pop 6242: # 29 "/usr/include/boost/smart_ptr/shared_ptr.hpp" 2 3 4 6242: 6242: # 1 "/usr/include/boost/smart_ptr/detail/sp_convertible.hpp" 1 3 4 6242: # 35 "/usr/include/boost/smart_ptr/detail/sp_convertible.hpp" 3 4 6242: namespace boost 6242: { 6242: 6242: namespace detail 6242: { 6242: 6242: template< class Y, class T > struct sp_convertible 6242: { 6242: typedef char (&yes) [1]; 6242: typedef char (&no) [2]; 6242: 6242: static yes f( T* ); 6242: static no f( ... ); 6242: 6242: enum _vt { value = sizeof( (f)( static_cast(0) ) ) == sizeof(yes) }; 6242: }; 6242: 6242: template< class Y, class T > struct sp_convertible< Y, T[] > 6242: { 6242: enum _vt { value = false }; 6242: }; 6242: 6242: template< class Y, class T > struct sp_convertible< Y[], T[] > 6242: { 6242: enum _vt { value = sp_convertible< Y[1], T[1] >::value }; 6242: }; 6242: 6242: template< class Y, std::size_t N, class T > struct sp_convertible< Y[N], T[] > 6242: { 6242: enum _vt { value = sp_convertible< Y[1], T[1] >::value }; 6242: }; 6242: 6242: struct sp_empty 6242: { 6242: }; 6242: 6242: template< bool > struct sp_enable_if_convertible_impl; 6242: 6242: template<> struct sp_enable_if_convertible_impl 6242: { 6242: typedef sp_empty type; 6242: }; 6242: 6242: template<> struct sp_enable_if_convertible_impl 6242: { 6242: }; 6242: 6242: template< class Y, class T > struct sp_enable_if_convertible: public sp_enable_if_convertible_impl< sp_convertible< Y, T >::value > 6242: { 6242: }; 6242: 6242: } 6242: 6242: } 6242: # 31 "/usr/include/boost/smart_ptr/shared_ptr.hpp" 2 3 4 6242: 6242: 6242: 6242: 6242: 6242: # 1 "/usr/include/boost/smart_ptr/detail/spinlock_pool.hpp" 1 3 4 6242: # 25 "/usr/include/boost/smart_ptr/detail/spinlock_pool.hpp" 3 4 6242: # 1 "/usr/include/boost/smart_ptr/detail/spinlock.hpp" 1 3 4 6242: # 47 "/usr/include/boost/smart_ptr/detail/spinlock.hpp" 3 4 6242: # 1 "/usr/include/boost/smart_ptr/detail/spinlock_std_atomic.hpp" 1 3 4 6242: # 18 "/usr/include/boost/smart_ptr/detail/spinlock_std_atomic.hpp" 3 4 6242: # 1 "/usr/include/boost/smart_ptr/detail/yield_k.hpp" 1 3 4 6242: # 28 "/usr/include/boost/smart_ptr/detail/yield_k.hpp" 3 4 6242: # 1 "/usr/include/boost/predef.h" 1 3 4 6242: # 29 "/usr/include/boost/smart_ptr/detail/yield_k.hpp" 2 3 4 6242: # 119 "/usr/include/boost/smart_ptr/detail/yield_k.hpp" 3 4 6242: namespace boost 6242: { 6242: 6242: namespace detail 6242: { 6242: 6242: inline void yield( unsigned k ) 6242: { 6242: if( k < 4 ) 6242: { 6242: } 6242: 6242: 6242: 6242: 6242: 6242: 6242: else if( k < 32 || k & 1 ) 6242: { 6242: sched_yield(); 6242: } 6242: else 6242: { 6242: 6242: struct timespec rqtp = { 0, 0 }; 6242: 6242: 6242: 6242: 6242: rqtp.tv_sec = 0; 6242: rqtp.tv_nsec = 1000; 6242: 6242: nanosleep( &rqtp, 0 ); 6242: } 6242: } 6242: 6242: } 6242: 6242: } 6242: # 19 "/usr/include/boost/smart_ptr/detail/spinlock_std_atomic.hpp" 2 3 4 6242: 6242: 6242: namespace boost 6242: { 6242: 6242: namespace detail 6242: { 6242: 6242: class spinlock 6242: { 6242: public: 6242: 6242: std::atomic_flag v_; 6242: 6242: public: 6242: 6242: bool try_lock() 6242: { 6242: return !v_.test_and_set( std::memory_order_acquire ); 6242: } 6242: 6242: void lock() 6242: { 6242: for( unsigned k = 0; !try_lock(); ++k ) 6242: { 6242: boost::detail::yield( k ); 6242: } 6242: } 6242: 6242: void unlock() 6242: { 6242: v_ .clear( std::memory_order_release ); 6242: } 6242: 6242: public: 6242: 6242: class scoped_lock 6242: { 6242: private: 6242: 6242: spinlock & sp_; 6242: 6242: scoped_lock( scoped_lock const & ); 6242: scoped_lock & operator=( scoped_lock const & ); 6242: 6242: public: 6242: 6242: explicit scoped_lock( spinlock & sp ): sp_( sp ) 6242: { 6242: sp.lock(); 6242: } 6242: 6242: ~scoped_lock() 6242: { 6242: sp_.unlock(); 6242: } 6242: }; 6242: }; 6242: 6242: } 6242: } 6242: # 48 "/usr/include/boost/smart_ptr/detail/spinlock.hpp" 2 3 4 6242: # 26 "/usr/include/boost/smart_ptr/detail/spinlock_pool.hpp" 2 3 4 6242: 6242: 6242: namespace boost 6242: { 6242: 6242: namespace detail 6242: { 6242: 6242: template< int M > class spinlock_pool 6242: { 6242: private: 6242: 6242: static spinlock pool_[ 41 ]; 6242: 6242: public: 6242: 6242: static spinlock & spinlock_for( void const * pv ) 6242: { 6242: 6242: 6242: 6242: std::size_t i = reinterpret_cast< std::size_t >( pv ) % 41; 6242: 6242: return pool_[ i ]; 6242: } 6242: 6242: class scoped_lock 6242: { 6242: private: 6242: 6242: spinlock & sp_; 6242: 6242: scoped_lock( scoped_lock const & ); 6242: scoped_lock & operator=( scoped_lock const & ); 6242: 6242: public: 6242: 6242: explicit scoped_lock( void const * pv ): sp_( spinlock_for( pv ) ) 6242: { 6242: sp_.lock(); 6242: } 6242: 6242: ~scoped_lock() 6242: { 6242: sp_.unlock(); 6242: } 6242: }; 6242: }; 6242: 6242: template< int M > spinlock spinlock_pool< M >::pool_[ 41 ] = 6242: { 6242: { { 0 } }, { { 0 } }, { { 0 } }, { { 0 } }, { { 0 } }, 6242: { { 0 } }, { { 0 } }, { { 0 } }, { { 0 } }, { { 0 } }, 6242: { { 0 } }, { { 0 } }, { { 0 } }, { { 0 } }, { { 0 } }, 6242: { { 0 } }, { { 0 } }, { { 0 } }, { { 0 } }, { { 0 } }, 6242: { { 0 } }, { { 0 } }, { { 0 } }, { { 0 } }, { { 0 } }, 6242: { { 0 } }, { { 0 } }, { { 0 } }, { { 0 } }, { { 0 } }, 6242: { { 0 } }, { { 0 } }, { { 0 } }, { { 0 } }, { { 0 } }, 6242: { { 0 } }, { { 0 } }, { { 0 } }, { { 0 } }, { { 0 } }, 6242: { { 0 } } 6242: }; 6242: 6242: } 6242: } 6242: # 37 "/usr/include/boost/smart_ptr/shared_ptr.hpp" 2 3 4 6242: # 53 "/usr/include/boost/smart_ptr/shared_ptr.hpp" 3 4 6242: #pragma GCC diagnostic push 6242: #pragma GCC diagnostic ignored "-Wdeprecated-declarations" 6242: 6242: 6242: namespace boost 6242: { 6242: 6242: template class shared_ptr; 6242: template class weak_ptr; 6242: template class enable_shared_from_this; 6242: class enable_shared_from_raw; 6242: 6242: namespace movelib 6242: { 6242: 6242: template< class T, class D > class unique_ptr; 6242: 6242: } 6242: 6242: namespace detail 6242: { 6242: 6242: 6242: 6242: template< class T > struct sp_element 6242: { 6242: typedef T type; 6242: }; 6242: 6242: 6242: 6242: template< class T > struct sp_element< T[] > 6242: { 6242: typedef T type; 6242: }; 6242: 6242: 6242: 6242: template< class T, std::size_t N > struct sp_element< T[N] > 6242: { 6242: typedef T type; 6242: }; 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: template< class T > struct sp_dereference 6242: { 6242: typedef T & type; 6242: }; 6242: 6242: template<> struct sp_dereference< void > 6242: { 6242: typedef void type; 6242: }; 6242: 6242: 6242: 6242: template<> struct sp_dereference< void const > 6242: { 6242: typedef void type; 6242: }; 6242: 6242: template<> struct sp_dereference< void volatile > 6242: { 6242: typedef void type; 6242: }; 6242: 6242: template<> struct sp_dereference< void const volatile > 6242: { 6242: typedef void type; 6242: }; 6242: 6242: 6242: 6242: 6242: 6242: template< class T > struct sp_dereference< T[] > 6242: { 6242: typedef void type; 6242: }; 6242: 6242: 6242: 6242: template< class T, std::size_t N > struct sp_dereference< T[N] > 6242: { 6242: typedef void type; 6242: }; 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: template< class T > struct sp_member_access 6242: { 6242: typedef T * type; 6242: }; 6242: 6242: 6242: 6242: template< class T > struct sp_member_access< T[] > 6242: { 6242: typedef void type; 6242: }; 6242: 6242: 6242: 6242: template< class T, std::size_t N > struct sp_member_access< T[N] > 6242: { 6242: typedef void type; 6242: }; 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: template< class T > struct sp_array_access 6242: { 6242: typedef void type; 6242: }; 6242: 6242: 6242: 6242: template< class T > struct sp_array_access< T[] > 6242: { 6242: typedef T & type; 6242: }; 6242: 6242: 6242: 6242: template< class T, std::size_t N > struct sp_array_access< T[N] > 6242: { 6242: typedef T & type; 6242: }; 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: template< class T > struct sp_extent 6242: { 6242: enum _vt { value = 0 }; 6242: }; 6242: 6242: 6242: 6242: template< class T, std::size_t N > struct sp_extent< T[N] > 6242: { 6242: enum _vt { value = N }; 6242: }; 6242: 6242: 6242: 6242: 6242: 6242: template< class X, class Y, class T > inline void sp_enable_shared_from_this( boost::shared_ptr const * ppx, Y const * py, boost::enable_shared_from_this< T > const * pe ) 6242: { 6242: if( pe != 0 ) 6242: { 6242: pe->_internal_accept_owner( ppx, const_cast< Y* >( py ) ); 6242: } 6242: } 6242: 6242: template< class X, class Y > inline void sp_enable_shared_from_this( boost::shared_ptr * ppx, Y const * py, boost::enable_shared_from_raw const * pe ); 6242: # 242 "/usr/include/boost/smart_ptr/shared_ptr.hpp" 3 4 6242: inline void sp_enable_shared_from_this( ... ) 6242: { 6242: } 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: template< class T, class R > struct sp_enable_if_auto_ptr 6242: { 6242: }; 6242: 6242: template< class T, class R > struct sp_enable_if_auto_ptr< std::auto_ptr< T >, R > 6242: { 6242: typedef R type; 6242: }; 6242: 6242: 6242: 6242: 6242: 6242: template< class Y, class T > inline void sp_assert_convertible() noexcept 6242: { 6242: 6242: 6242: 6242: typedef char tmp[ sp_convertible< Y, T >::value? 1: -1 ]; 6242: (void)sizeof( tmp ); 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: } 6242: 6242: 6242: 6242: template< class T, class Y > inline void sp_pointer_construct( boost::shared_ptr< T > * ppx, Y * p, boost::detail::shared_count & pn ) 6242: { 6242: boost::detail::shared_count( p ).swap( pn ); 6242: boost::detail::sp_enable_shared_from_this( ppx, p, p ); 6242: } 6242: 6242: 6242: 6242: template< class T, class Y > inline void sp_pointer_construct( boost::shared_ptr< T[] > * , Y * p, boost::detail::shared_count & pn ) 6242: { 6242: sp_assert_convertible< Y[], T[] >(); 6242: boost::detail::shared_count( p, boost::checked_array_deleter< T >() ).swap( pn ); 6242: } 6242: 6242: template< class T, std::size_t N, class Y > inline void sp_pointer_construct( boost::shared_ptr< T[N] > * , Y * p, boost::detail::shared_count & pn ) 6242: { 6242: sp_assert_convertible< Y[N], T[N] >(); 6242: boost::detail::shared_count( p, boost::checked_array_deleter< T >() ).swap( pn ); 6242: } 6242: 6242: 6242: 6242: 6242: 6242: template< class T, class Y > inline void sp_deleter_construct( boost::shared_ptr< T > * ppx, Y * p ) 6242: { 6242: boost::detail::sp_enable_shared_from_this( ppx, p, p ); 6242: } 6242: 6242: 6242: 6242: template< class T, class Y > inline void sp_deleter_construct( boost::shared_ptr< T[] > * , Y * ) 6242: { 6242: sp_assert_convertible< Y[], T[] >(); 6242: } 6242: 6242: template< class T, std::size_t N, class Y > inline void sp_deleter_construct( boost::shared_ptr< T[N] > * , Y * ) 6242: { 6242: sp_assert_convertible< Y[N], T[N] >(); 6242: } 6242: 6242: 6242: 6242: struct sp_internal_constructor_tag 6242: { 6242: }; 6242: 6242: } 6242: # 341 "/usr/include/boost/smart_ptr/shared_ptr.hpp" 3 4 6242: template class shared_ptr 6242: { 6242: private: 6242: 6242: 6242: typedef shared_ptr this_type; 6242: 6242: public: 6242: 6242: typedef typename boost::detail::sp_element< T >::type element_type; 6242: 6242: constexpr shared_ptr() noexcept : px( 0 ), pn() 6242: { 6242: } 6242: 6242: 6242: 6242: constexpr shared_ptr( boost::detail::sp_nullptr_t ) noexcept : px( 0 ), pn() 6242: { 6242: } 6242: 6242: 6242: 6242: constexpr shared_ptr( boost::detail::sp_internal_constructor_tag, element_type * px_, boost::detail::shared_count const & pn_ ) noexcept : px( px_ ), pn( pn_ ) 6242: { 6242: } 6242: 6242: 6242: 6242: constexpr shared_ptr( boost::detail::sp_internal_constructor_tag, element_type * px_, boost::detail::shared_count && pn_ ) noexcept : px( px_ ), pn( std::move( pn_ ) ) 6242: { 6242: } 6242: 6242: 6242: 6242: template 6242: explicit shared_ptr( Y * p ): px( p ), pn() 6242: { 6242: boost::detail::sp_pointer_construct( this, p, pn ); 6242: } 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: template shared_ptr( Y * p, D d ): px( p ), pn( p, d ) 6242: { 6242: boost::detail::sp_deleter_construct( this, p ); 6242: } 6242: 6242: 6242: 6242: template shared_ptr( boost::detail::sp_nullptr_t p, D d ): px( p ), pn( p, d ) 6242: { 6242: } 6242: 6242: 6242: 6242: 6242: 6242: template shared_ptr( Y * p, D d, A a ): px( p ), pn( p, d, a ) 6242: { 6242: boost::detail::sp_deleter_construct( this, p ); 6242: } 6242: 6242: 6242: 6242: template shared_ptr( boost::detail::sp_nullptr_t p, D d, A a ): px( p ), pn( p, d, a ) 6242: { 6242: } 6242: # 422 "/usr/include/boost/smart_ptr/shared_ptr.hpp" 3 4 6242: shared_ptr( shared_ptr const & r ) noexcept : px( r.px ), pn( r.pn ) 6242: { 6242: } 6242: 6242: 6242: 6242: template 6242: explicit shared_ptr( weak_ptr const & r ): pn( r.pn ) 6242: { 6242: boost::detail::sp_assert_convertible< Y, T >(); 6242: 6242: 6242: px = r.px; 6242: } 6242: 6242: template 6242: shared_ptr( weak_ptr const & r, boost::detail::sp_nothrow_tag ) 6242: noexcept : px( 0 ), pn( r.pn, boost::detail::sp_nothrow_tag() ) 6242: { 6242: if( !pn.empty() ) 6242: { 6242: px = r.px; 6242: } 6242: } 6242: 6242: template 6242: 6242: 6242: shared_ptr( shared_ptr const & r, typename boost::detail::sp_enable_if_convertible::type = boost::detail::sp_empty() ) 6242: 6242: 6242: 6242: 6242: 6242: 6242: noexcept : px( r.px ), pn( r.pn ) 6242: { 6242: boost::detail::sp_assert_convertible< Y, T >(); 6242: } 6242: 6242: 6242: template< class Y > 6242: shared_ptr( shared_ptr const & r, element_type * p ) noexcept : px( p ), pn( r.pn ) 6242: { 6242: } 6242: 6242: 6242: 6242: template 6242: explicit shared_ptr( std::auto_ptr & r ): px(r.get()), pn() 6242: { 6242: boost::detail::sp_assert_convertible< Y, T >(); 6242: 6242: Y * tmp = r.get(); 6242: pn = boost::detail::shared_count( r ); 6242: 6242: boost::detail::sp_deleter_construct( this, tmp ); 6242: } 6242: 6242: 6242: 6242: template 6242: shared_ptr( std::auto_ptr && r ): px(r.get()), pn() 6242: { 6242: boost::detail::sp_assert_convertible< Y, T >(); 6242: 6242: Y * tmp = r.get(); 6242: pn = boost::detail::shared_count( r ); 6242: 6242: boost::detail::sp_deleter_construct( this, tmp ); 6242: } 6242: # 515 "/usr/include/boost/smart_ptr/shared_ptr.hpp" 3 4 6242: template< class Y, class D > 6242: shared_ptr( std::unique_ptr< Y, D > && r ): px( r.get() ), pn() 6242: { 6242: boost::detail::sp_assert_convertible< Y, T >(); 6242: 6242: typename std::unique_ptr< Y, D >::pointer tmp = r.get(); 6242: 6242: if( tmp != 0 ) 6242: { 6242: pn = boost::detail::shared_count( r ); 6242: boost::detail::sp_deleter_construct( this, tmp ); 6242: } 6242: } 6242: 6242: 6242: 6242: template< class Y, class D > 6242: shared_ptr( boost::movelib::unique_ptr< Y, D > r ): px( r.get() ), pn() 6242: { 6242: boost::detail::sp_assert_convertible< Y, T >(); 6242: 6242: typename boost::movelib::unique_ptr< Y, D >::pointer tmp = r.get(); 6242: 6242: if( tmp != 0 ) 6242: { 6242: pn = boost::detail::shared_count( r ); 6242: boost::detail::sp_deleter_construct( this, tmp ); 6242: } 6242: } 6242: 6242: 6242: 6242: shared_ptr & operator=( shared_ptr const & r ) noexcept 6242: { 6242: this_type(r).swap(*this); 6242: return *this; 6242: } 6242: 6242: 6242: 6242: template 6242: shared_ptr & operator=(shared_ptr const & r) noexcept 6242: { 6242: this_type(r).swap(*this); 6242: return *this; 6242: } 6242: 6242: 6242: 6242: 6242: 6242: template 6242: shared_ptr & operator=( std::auto_ptr & r ) 6242: { 6242: this_type( r ).swap( *this ); 6242: return *this; 6242: } 6242: 6242: 6242: 6242: template 6242: shared_ptr & operator=( std::auto_ptr && r ) 6242: { 6242: this_type( static_cast< std::auto_ptr && >( r ) ).swap( *this ); 6242: return *this; 6242: } 6242: # 597 "/usr/include/boost/smart_ptr/shared_ptr.hpp" 3 4 6242: template 6242: shared_ptr & operator=( std::unique_ptr && r ) 6242: { 6242: this_type( static_cast< std::unique_ptr && >( r ) ).swap(*this); 6242: return *this; 6242: } 6242: 6242: 6242: 6242: template 6242: shared_ptr & operator=( boost::movelib::unique_ptr r ) 6242: { 6242: 6242: 6242: boost::detail::sp_assert_convertible< Y, T >(); 6242: 6242: typename boost::movelib::unique_ptr< Y, D >::pointer p = r.get(); 6242: 6242: shared_ptr tmp; 6242: 6242: if( p != 0 ) 6242: { 6242: tmp.px = p; 6242: tmp.pn = boost::detail::shared_count( r ); 6242: 6242: boost::detail::sp_deleter_construct( &tmp, p ); 6242: } 6242: 6242: tmp.swap( *this ); 6242: 6242: return *this; 6242: } 6242: 6242: 6242: 6242: 6242: 6242: shared_ptr( shared_ptr && r ) noexcept : px( r.px ), pn() 6242: { 6242: pn.swap( r.pn ); 6242: r.px = 0; 6242: } 6242: 6242: template 6242: 6242: 6242: shared_ptr( shared_ptr && r, typename boost::detail::sp_enable_if_convertible::type = boost::detail::sp_empty() ) 6242: 6242: 6242: 6242: 6242: 6242: 6242: noexcept : px( r.px ), pn() 6242: { 6242: boost::detail::sp_assert_convertible< Y, T >(); 6242: 6242: pn.swap( r.pn ); 6242: r.px = 0; 6242: } 6242: 6242: shared_ptr & operator=( shared_ptr && r ) noexcept 6242: { 6242: this_type( static_cast< shared_ptr && >( r ) ).swap( *this ); 6242: return *this; 6242: } 6242: 6242: template 6242: shared_ptr & operator=( shared_ptr && r ) noexcept 6242: { 6242: this_type( static_cast< shared_ptr && >( r ) ).swap( *this ); 6242: return *this; 6242: } 6242: 6242: 6242: template 6242: shared_ptr( shared_ptr && r, element_type * p ) noexcept : px( p ), pn() 6242: { 6242: pn.swap( r.pn ); 6242: r.px = 0; 6242: } 6242: 6242: 6242: 6242: 6242: 6242: shared_ptr & operator=( boost::detail::sp_nullptr_t ) noexcept 6242: { 6242: this_type().swap(*this); 6242: return *this; 6242: } 6242: 6242: 6242: 6242: void reset() noexcept 6242: { 6242: this_type().swap(*this); 6242: } 6242: 6242: template void reset( Y * p ) 6242: { 6242: (static_cast (p == 0 || p != px) ? void (0) : __assert_fail ("p == 0 || p != px", "/usr/include/boost/smart_ptr/shared_ptr.hpp", 698, __extension__ __PRETTY_FUNCTION__)); 6242: this_type( p ).swap( *this ); 6242: } 6242: 6242: template void reset( Y * p, D d ) 6242: { 6242: this_type( p, d ).swap( *this ); 6242: } 6242: 6242: template void reset( Y * p, D d, A a ) 6242: { 6242: this_type( p, d, a ).swap( *this ); 6242: } 6242: 6242: template void reset( shared_ptr const & r, element_type * p ) noexcept 6242: { 6242: this_type( r, p ).swap( *this ); 6242: } 6242: 6242: 6242: 6242: template void reset( shared_ptr && r, element_type * p ) noexcept 6242: { 6242: this_type( static_cast< shared_ptr && >( r ), p ).swap( *this ); 6242: } 6242: 6242: 6242: 6242: typename boost::detail::sp_dereference< T >::type operator* () const noexcept 6242: { 6242: (static_cast (px != 0) ? void (0) : __assert_fail ("px != 0", "/usr/include/boost/smart_ptr/shared_ptr.hpp", 728, __extension__ __PRETTY_FUNCTION__)); 6242: return *px; 6242: } 6242: 6242: typename boost::detail::sp_member_access< T >::type operator-> () const noexcept 6242: { 6242: (static_cast (px != 0) ? void (0) : __assert_fail ("px != 0", "/usr/include/boost/smart_ptr/shared_ptr.hpp", 734, __extension__ __PRETTY_FUNCTION__)); 6242: return px; 6242: } 6242: 6242: typename boost::detail::sp_array_access< T >::type operator[] ( std::ptrdiff_t i ) const noexcept 6242: { 6242: (static_cast (px != 0) ? void (0) : __assert_fail ("px != 0", "/usr/include/boost/smart_ptr/shared_ptr.hpp", 740, __extension__ __PRETTY_FUNCTION__)); 6242: (static_cast (i >= 0 && ( i < boost::detail::sp_extent< T >::value || boost::detail::sp_extent< T >::value == 0 )) ? void (0) : __assert_fail ("i >= 0 && ( i < boost::detail::sp_extent< T >::value || boost::detail::sp_extent< T >::value == 0 )", "/usr/include/boost/smart_ptr/shared_ptr.hpp", 741, __extension__ __PRETTY_FUNCTION__)); 6242: 6242: return static_cast< typename boost::detail::sp_array_access< T >::type >( px[ i ] ); 6242: } 6242: 6242: element_type * get() const noexcept 6242: { 6242: return px; 6242: } 6242: 6242: 6242: # 1 "/usr/include/boost/smart_ptr/detail/operator_bool.hpp" 1 3 4 6242: # 12 "/usr/include/boost/smart_ptr/detail/operator_bool.hpp" 3 4 6242: explicit operator bool () const noexcept 6242: { 6242: return px != 0; 6242: } 6242: # 61 "/usr/include/boost/smart_ptr/detail/operator_bool.hpp" 3 4 6242: bool operator! () const noexcept 6242: { 6242: return px == 0; 6242: } 6242: # 753 "/usr/include/boost/smart_ptr/shared_ptr.hpp" 2 3 4 6242: 6242: bool unique() const noexcept 6242: { 6242: return pn.unique(); 6242: } 6242: 6242: long use_count() const noexcept 6242: { 6242: return pn.use_count(); 6242: } 6242: 6242: void swap( shared_ptr & other ) noexcept 6242: { 6242: std::swap(px, other.px); 6242: pn.swap(other.pn); 6242: } 6242: 6242: template bool owner_before( shared_ptr const & rhs ) const noexcept 6242: { 6242: return pn < rhs.pn; 6242: } 6242: 6242: template bool owner_before( weak_ptr const & rhs ) const noexcept 6242: { 6242: return pn < rhs.pn; 6242: } 6242: 6242: void * _internal_get_deleter( boost::detail::sp_typeinfo const & ti ) const noexcept 6242: { 6242: return pn.get_deleter( ti ); 6242: } 6242: 6242: void * _internal_get_local_deleter( boost::detail::sp_typeinfo const & ti ) const noexcept 6242: { 6242: return pn.get_local_deleter( ti ); 6242: } 6242: 6242: void * _internal_get_untyped_deleter() const noexcept 6242: { 6242: return pn.get_untyped_deleter(); 6242: } 6242: 6242: bool _internal_equiv( shared_ptr const & r ) const noexcept 6242: { 6242: return px == r.px && pn == r.pn; 6242: } 6242: 6242: boost::detail::shared_count _internal_count() const noexcept 6242: { 6242: return pn; 6242: } 6242: 6242: 6242: 6242: 6242: 6242: 6242: private: 6242: 6242: template friend class shared_ptr; 6242: template friend class weak_ptr; 6242: 6242: 6242: 6242: 6242: element_type * px; 6242: boost::detail::shared_count pn; 6242: 6242: }; 6242: 6242: template inline bool operator==(shared_ptr const & a, shared_ptr const & b) noexcept 6242: { 6242: return a.get() == b.get(); 6242: } 6242: 6242: template inline bool operator!=(shared_ptr const & a, shared_ptr const & b) noexcept 6242: { 6242: return a.get() != b.get(); 6242: } 6242: # 846 "/usr/include/boost/smart_ptr/shared_ptr.hpp" 3 4 6242: template inline bool operator==( shared_ptr const & p, boost::detail::sp_nullptr_t ) noexcept 6242: { 6242: return p.get() == 0; 6242: } 6242: 6242: template inline bool operator==( boost::detail::sp_nullptr_t, shared_ptr const & p ) noexcept 6242: { 6242: return p.get() == 0; 6242: } 6242: 6242: template inline bool operator!=( shared_ptr const & p, boost::detail::sp_nullptr_t ) noexcept 6242: { 6242: return p.get() != 0; 6242: } 6242: 6242: template inline bool operator!=( boost::detail::sp_nullptr_t, shared_ptr const & p ) noexcept 6242: { 6242: return p.get() != 0; 6242: } 6242: 6242: 6242: 6242: template inline bool operator<(shared_ptr const & a, shared_ptr const & b) noexcept 6242: { 6242: return a.owner_before( b ); 6242: } 6242: 6242: template inline void swap(shared_ptr & a, shared_ptr & b) noexcept 6242: { 6242: a.swap(b); 6242: } 6242: 6242: template shared_ptr static_pointer_cast( shared_ptr const & r ) noexcept 6242: { 6242: (void) static_cast< T* >( static_cast< U* >( 0 ) ); 6242: 6242: typedef typename shared_ptr::element_type E; 6242: 6242: E * p = static_cast< E* >( r.get() ); 6242: return shared_ptr( r, p ); 6242: } 6242: 6242: template shared_ptr const_pointer_cast( shared_ptr const & r ) noexcept 6242: { 6242: (void) const_cast< T* >( static_cast< U* >( 0 ) ); 6242: 6242: typedef typename shared_ptr::element_type E; 6242: 6242: E * p = const_cast< E* >( r.get() ); 6242: return shared_ptr( r, p ); 6242: } 6242: 6242: template shared_ptr dynamic_pointer_cast( shared_ptr const & r ) noexcept 6242: { 6242: (void) dynamic_cast< T* >( static_cast< U* >( 0 ) ); 6242: 6242: typedef typename shared_ptr::element_type E; 6242: 6242: E * p = dynamic_cast< E* >( r.get() ); 6242: return p? shared_ptr( r, p ): shared_ptr(); 6242: } 6242: 6242: template shared_ptr reinterpret_pointer_cast( shared_ptr const & r ) noexcept 6242: { 6242: (void) reinterpret_cast< T* >( static_cast< U* >( 0 ) ); 6242: 6242: typedef typename shared_ptr::element_type E; 6242: 6242: E * p = reinterpret_cast< E* >( r.get() ); 6242: return shared_ptr( r, p ); 6242: } 6242: 6242: 6242: 6242: template shared_ptr static_pointer_cast( shared_ptr && r ) noexcept 6242: { 6242: (void) static_cast< T* >( static_cast< U* >( 0 ) ); 6242: 6242: typedef typename shared_ptr::element_type E; 6242: 6242: E * p = static_cast< E* >( r.get() ); 6242: return shared_ptr( std::move(r), p ); 6242: } 6242: 6242: template shared_ptr const_pointer_cast( shared_ptr && r ) noexcept 6242: { 6242: (void) const_cast< T* >( static_cast< U* >( 0 ) ); 6242: 6242: typedef typename shared_ptr::element_type E; 6242: 6242: E * p = const_cast< E* >( r.get() ); 6242: return shared_ptr( std::move(r), p ); 6242: } 6242: 6242: template shared_ptr dynamic_pointer_cast( shared_ptr && r ) noexcept 6242: { 6242: (void) dynamic_cast< T* >( static_cast< U* >( 0 ) ); 6242: 6242: typedef typename shared_ptr::element_type E; 6242: 6242: E * p = dynamic_cast< E* >( r.get() ); 6242: return p? shared_ptr( std::move(r), p ): shared_ptr(); 6242: } 6242: 6242: template shared_ptr reinterpret_pointer_cast( shared_ptr && r ) noexcept 6242: { 6242: (void) reinterpret_cast< T* >( static_cast< U* >( 0 ) ); 6242: 6242: typedef typename shared_ptr::element_type E; 6242: 6242: E * p = reinterpret_cast< E* >( r.get() ); 6242: return shared_ptr( std::move(r), p ); 6242: } 6242: 6242: 6242: 6242: 6242: 6242: template inline typename shared_ptr::element_type * get_pointer(shared_ptr const & p) noexcept 6242: { 6242: return p.get(); 6242: } 6242: # 991 "/usr/include/boost/smart_ptr/shared_ptr.hpp" 3 4 6242: template std::basic_ostream & operator<< (std::basic_ostream & os, shared_ptr const & p) 6242: 6242: { 6242: os << p.get(); 6242: return os; 6242: } 6242: # 1006 "/usr/include/boost/smart_ptr/shared_ptr.hpp" 3 4 6242: namespace detail 6242: { 6242: 6242: template D * basic_get_deleter( shared_ptr const & p ) noexcept 6242: { 6242: return static_cast( p._internal_get_deleter(typeid(D)) ); 6242: } 6242: 6242: template D * basic_get_local_deleter( D *, shared_ptr const & p ) noexcept; 6242: template D const * basic_get_local_deleter( D const *, shared_ptr const & p ) noexcept; 6242: 6242: class esft2_deleter_wrapper 6242: { 6242: private: 6242: 6242: shared_ptr deleter_; 6242: 6242: public: 6242: 6242: esft2_deleter_wrapper() 6242: { 6242: } 6242: 6242: template< class T > void set_deleter( shared_ptr const & deleter ) noexcept 6242: { 6242: deleter_ = deleter; 6242: } 6242: 6242: template D* get_deleter() const noexcept 6242: { 6242: return boost::detail::basic_get_deleter( deleter_ ); 6242: } 6242: 6242: template< class T> void operator()( T* ) noexcept 6242: { 6242: (static_cast (deleter_.use_count() <= 1) ? void (0) : __assert_fail ("deleter_.use_count() <= 1", "/usr/include/boost/smart_ptr/shared_ptr.hpp", 1041, __extension__ __PRETTY_FUNCTION__)); 6242: deleter_.reset(); 6242: } 6242: }; 6242: 6242: } 6242: 6242: template D * get_deleter( shared_ptr const & p ) noexcept 6242: { 6242: D * d = boost::detail::basic_get_deleter( p ); 6242: 6242: if( d == 0 ) 6242: { 6242: d = boost::detail::basic_get_local_deleter( d, p ); 6242: } 6242: 6242: if( d == 0 ) 6242: { 6242: boost::detail::esft2_deleter_wrapper *del_wrapper = boost::detail::basic_get_deleter(p); 6242: 6242: 6242: if(del_wrapper) d = del_wrapper->::boost::detail::esft2_deleter_wrapper::get_deleter(); 6242: } 6242: 6242: return d; 6242: } 6242: 6242: 6242: 6242: 6242: 6242: template inline bool atomic_is_lock_free( shared_ptr const * ) noexcept 6242: { 6242: return false; 6242: } 6242: 6242: template shared_ptr atomic_load( shared_ptr const * p ) noexcept 6242: { 6242: boost::detail::spinlock_pool<2>::scoped_lock lock( p ); 6242: return *p; 6242: } 6242: 6242: template inline shared_ptr atomic_load_explicit( shared_ptr const * p, int ) noexcept 6242: { 6242: return atomic_load( p ); 6242: } 6242: 6242: template void atomic_store( shared_ptr * p, shared_ptr r ) noexcept 6242: { 6242: boost::detail::spinlock_pool<2>::scoped_lock lock( p ); 6242: p->swap( r ); 6242: } 6242: 6242: template inline void atomic_store_explicit( shared_ptr * p, shared_ptr r, int ) noexcept 6242: { 6242: atomic_store( p, r ); 6242: } 6242: 6242: template shared_ptr atomic_exchange( shared_ptr * p, shared_ptr r ) noexcept 6242: { 6242: boost::detail::spinlock & sp = boost::detail::spinlock_pool<2>::spinlock_for( p ); 6242: 6242: sp.lock(); 6242: p->swap( r ); 6242: sp.unlock(); 6242: 6242: return r; 6242: } 6242: 6242: template shared_ptr inline atomic_exchange_explicit( shared_ptr * p, shared_ptr r, int ) noexcept 6242: { 6242: return atomic_exchange( p, r ); 6242: } 6242: 6242: template bool atomic_compare_exchange( shared_ptr * p, shared_ptr * v, shared_ptr w ) noexcept 6242: { 6242: boost::detail::spinlock & sp = boost::detail::spinlock_pool<2>::spinlock_for( p ); 6242: 6242: sp.lock(); 6242: 6242: if( p->_internal_equiv( *v ) ) 6242: { 6242: p->swap( w ); 6242: 6242: sp.unlock(); 6242: 6242: return true; 6242: } 6242: else 6242: { 6242: shared_ptr tmp( *p ); 6242: 6242: sp.unlock(); 6242: 6242: tmp.swap( *v ); 6242: return false; 6242: } 6242: } 6242: 6242: template inline bool atomic_compare_exchange_explicit( shared_ptr * p, shared_ptr * v, shared_ptr w, int, int ) noexcept 6242: { 6242: return atomic_compare_exchange( p, v, w ); 6242: } 6242: 6242: 6242: 6242: 6242: 6242: template< class T > struct hash; 6242: 6242: template< class T > std::size_t hash_value( boost::shared_ptr const & p ) noexcept 6242: { 6242: return boost::hash< typename boost::shared_ptr::element_type* >()( p.get() ); 6242: } 6242: 6242: } 6242: 6242: # 1 "/usr/include/boost/smart_ptr/detail/local_sp_deleter.hpp" 1 3 4 6242: # 20 "/usr/include/boost/smart_ptr/detail/local_sp_deleter.hpp" 3 4 6242: # 1 "/usr/include/boost/smart_ptr/detail/local_counted_base.hpp" 1 3 4 6242: # 24 "/usr/include/boost/smart_ptr/detail/local_counted_base.hpp" 3 4 6242: namespace boost 6242: { 6242: 6242: namespace detail 6242: { 6242: 6242: class local_counted_base 6242: { 6242: private: 6242: 6242: local_counted_base & operator= ( local_counted_base const & ); 6242: 6242: private: 6242: 6242: 6242: enum count_type { min_ = 0, initial_ = 1, max_ = 2147483647 }; 6242: 6242: count_type local_use_count_; 6242: 6242: public: 6242: 6242: constexpr local_counted_base() noexcept: local_use_count_( initial_ ) 6242: { 6242: } 6242: 6242: constexpr local_counted_base( local_counted_base const & ) noexcept: local_use_count_( initial_ ) 6242: { 6242: } 6242: 6242: virtual ~local_counted_base() 6242: { 6242: } 6242: 6242: virtual void local_cb_destroy() noexcept = 0; 6242: 6242: virtual boost::detail::shared_count local_cb_get_shared_count() const noexcept = 0; 6242: 6242: void add_ref() noexcept 6242: { 6242: # 73 "/usr/include/boost/smart_ptr/detail/local_counted_base.hpp" 3 4 6242: local_use_count_ = static_cast( local_use_count_ + 1 ); 6242: } 6242: 6242: void release() noexcept 6242: { 6242: local_use_count_ = static_cast( local_use_count_ - 1 ); 6242: 6242: if( local_use_count_ == 0 ) 6242: { 6242: local_cb_destroy(); 6242: } 6242: } 6242: 6242: long local_use_count() const noexcept 6242: { 6242: return local_use_count_; 6242: } 6242: }; 6242: 6242: class local_counted_impl: public local_counted_base 6242: { 6242: private: 6242: 6242: local_counted_impl( local_counted_impl const & ); 6242: 6242: private: 6242: 6242: shared_count pn_; 6242: 6242: public: 6242: 6242: explicit local_counted_impl( shared_count const& pn ): pn_( pn ) 6242: { 6242: } 6242: 6242: 6242: 6242: explicit local_counted_impl( shared_count && pn ): pn_( std::move(pn) ) 6242: { 6242: } 6242: 6242: 6242: 6242: virtual void local_cb_destroy() noexcept 6242: { 6242: delete this; 6242: } 6242: 6242: virtual boost::detail::shared_count local_cb_get_shared_count() const noexcept 6242: { 6242: return pn_; 6242: } 6242: }; 6242: 6242: class local_counted_impl_em: public local_counted_base 6242: { 6242: public: 6242: 6242: shared_count pn_; 6242: 6242: virtual void local_cb_destroy() noexcept 6242: { 6242: shared_count().swap( pn_ ); 6242: } 6242: 6242: virtual boost::detail::shared_count local_cb_get_shared_count() const noexcept 6242: { 6242: return pn_; 6242: } 6242: }; 6242: 6242: } 6242: 6242: } 6242: # 21 "/usr/include/boost/smart_ptr/detail/local_sp_deleter.hpp" 2 3 4 6242: 6242: 6242: namespace boost 6242: { 6242: 6242: namespace detail 6242: { 6242: 6242: template class local_sp_deleter: public local_counted_impl_em 6242: { 6242: private: 6242: 6242: D d_; 6242: 6242: public: 6242: 6242: local_sp_deleter(): d_() 6242: { 6242: } 6242: 6242: explicit local_sp_deleter( D const& d ) noexcept: d_( d ) 6242: { 6242: } 6242: 6242: 6242: 6242: explicit local_sp_deleter( D&& d ) noexcept: d_( std::move(d) ) 6242: { 6242: } 6242: 6242: 6242: 6242: D& deleter() 6242: { 6242: return d_; 6242: } 6242: 6242: template void operator()( Y* p ) noexcept 6242: { 6242: d_( p ); 6242: } 6242: 6242: 6242: 6242: void operator()( boost::detail::sp_nullptr_t p ) noexcept 6242: { 6242: d_( p ); 6242: } 6242: 6242: 6242: }; 6242: 6242: template<> class local_sp_deleter 6242: { 6242: }; 6242: 6242: template D * get_local_deleter( local_sp_deleter * p ) 6242: { 6242: return &p->deleter(); 6242: } 6242: 6242: inline void * get_local_deleter( local_sp_deleter * ) 6242: { 6242: return 0; 6242: } 6242: 6242: } 6242: 6242: } 6242: # 1159 "/usr/include/boost/smart_ptr/shared_ptr.hpp" 2 3 4 6242: 6242: namespace boost 6242: { 6242: 6242: namespace detail 6242: { 6242: 6242: template D * basic_get_local_deleter( D *, shared_ptr const & p ) noexcept 6242: { 6242: return static_cast( p._internal_get_local_deleter( typeid(local_sp_deleter) ) ); 6242: } 6242: 6242: template D const * basic_get_local_deleter( D const *, shared_ptr const & p ) noexcept 6242: { 6242: return static_cast( p._internal_get_local_deleter( typeid(local_sp_deleter) ) ); 6242: } 6242: 6242: } 6242: 6242: } 6242: 6242: 6242: #pragma GCC diagnostic pop 6242: # 18 "/usr/include/boost/shared_ptr.hpp" 2 3 4 6242: # 45 "/usr/include/boost/regex/v4/regex_workaround.hpp" 2 3 4 6242: # 1 "/usr/include/boost/mpl/bool_fwd.hpp" 1 3 4 6242: # 17 "/usr/include/boost/mpl/bool_fwd.hpp" 3 4 6242: # 1 "/usr/include/boost/mpl/aux_/adl_barrier.hpp" 1 3 4 6242: # 17 "/usr/include/boost/mpl/aux_/adl_barrier.hpp" 3 4 6242: # 1 "/usr/include/boost/mpl/aux_/config/adl.hpp" 1 3 4 6242: # 17 "/usr/include/boost/mpl/aux_/config/adl.hpp" 3 4 6242: # 1 "/usr/include/boost/mpl/aux_/config/msvc.hpp" 1 3 4 6242: # 18 "/usr/include/boost/mpl/aux_/config/adl.hpp" 2 3 4 6242: # 1 "/usr/include/boost/mpl/aux_/config/intel.hpp" 1 3 4 6242: # 19 "/usr/include/boost/mpl/aux_/config/adl.hpp" 2 3 4 6242: # 1 "/usr/include/boost/mpl/aux_/config/gcc.hpp" 1 3 4 6242: # 20 "/usr/include/boost/mpl/aux_/config/adl.hpp" 2 3 4 6242: # 1 "/usr/include/boost/mpl/aux_/config/workaround.hpp" 1 3 4 6242: # 21 "/usr/include/boost/mpl/aux_/config/adl.hpp" 2 3 4 6242: # 18 "/usr/include/boost/mpl/aux_/adl_barrier.hpp" 2 3 4 6242: # 33 "/usr/include/boost/mpl/aux_/adl_barrier.hpp" 3 4 6242: namespace mpl_ { namespace aux {} } 6242: namespace boost { namespace mpl { using namespace mpl_; 6242: namespace aux { using namespace mpl_::aux; } 6242: }} 6242: # 18 "/usr/include/boost/mpl/bool_fwd.hpp" 2 3 4 6242: 6242: namespace mpl_ { 6242: 6242: template< bool C_ > struct bool_; 6242: 6242: 6242: typedef bool_ true_; 6242: typedef bool_ false_; 6242: 6242: } 6242: 6242: namespace boost { namespace mpl { using ::mpl_::bool_; } } 6242: namespace boost { namespace mpl { using ::mpl_::true_; } } 6242: namespace boost { namespace mpl { using ::mpl_::false_; } } 6242: # 46 "/usr/include/boost/regex/v4/regex_workaround.hpp" 2 3 4 6242: # 57 "/usr/include/boost/regex/v4/regex_workaround.hpp" 3 4 6242: namespace boost{ namespace re_detail_106501{ 6242: 6242: 6242: 6242: 6242: 6242: using std::distance; 6242: 6242: }} 6242: # 99 "/usr/include/boost/regex/v4/regex_workaround.hpp" 3 4 6242: namespace boost{ namespace re_detail_106501{ 6242: 6242: 6242: 6242: 6242: 6242: 6242: template 6242: inline void pointer_destroy(T* p) 6242: { p->~T(); (void)p; } 6242: 6242: 6242: 6242: 6242: 6242: template 6242: inline void pointer_construct(T* p, const T& t) 6242: { new (p) T(t); } 6242: 6242: }} 6242: # 128 "/usr/include/boost/regex/v4/regex_workaround.hpp" 3 4 6242: namespace boost{ namespace re_detail_106501{ 6242: # 186 "/usr/include/boost/regex/v4/regex_workaround.hpp" 3 4 6242: using std::copy; 6242: using std::equal; 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: inline std::size_t strcpy_s( 6242: char *strDestination, 6242: std::size_t sizeInBytes, 6242: const char *strSource 6242: ) 6242: { 6242: if(std::strlen(strSource)+1 > sizeInBytes) 6242: return 1; 6242: std::strcpy(strDestination, strSource); 6242: return 0; 6242: } 6242: inline std::size_t strcat_s( 6242: char *strDestination, 6242: std::size_t sizeInBytes, 6242: const char *strSource 6242: ) 6242: { 6242: if(std::strlen(strSource) + std::strlen(strDestination) + 1 > sizeInBytes) 6242: return 1; 6242: std::strcat(strDestination, strSource); 6242: return 0; 6242: } 6242: 6242: 6242: 6242: inline void overflow_error_if_not_zero(std::size_t i) 6242: { 6242: if(i) 6242: { 6242: std::overflow_error e("String buffer too small"); 6242: boost::throw_exception(e); 6242: } 6242: } 6242: 6242: }} 6242: # 33 "/usr/include/boost/regex/v4/regex.hpp" 2 3 4 6242: 6242: 6242: 6242: # 1 "/usr/include/boost/regex_fwd.hpp" 1 3 4 6242: # 27 "/usr/include/boost/regex_fwd.hpp" 3 4 6242: # 1 "/usr/include/boost/regex/v4/regex_fwd.hpp" 1 3 4 6242: # 37 "/usr/include/boost/regex/v4/regex_fwd.hpp" 3 4 6242: namespace boost{ 6242: 6242: template 6242: class cpp_regex_traits; 6242: template 6242: struct c_regex_traits; 6242: template 6242: class w32_regex_traits; 6242: 6242: 6242: 6242: 6242: 6242: template > 6242: struct regex_traits; 6242: 6242: 6242: 6242: 6242: 6242: template > 6242: class basic_regex; 6242: 6242: typedef basic_regex > regex; 6242: 6242: typedef basic_regex > wregex; 6242: 6242: 6242: } 6242: # 28 "/usr/include/boost/regex_fwd.hpp" 2 3 4 6242: # 37 "/usr/include/boost/regex/v4/regex.hpp" 2 3 4 6242: 6242: 6242: # 1 "/usr/include/boost/regex/regex_traits.hpp" 1 3 4 6242: # 27 "/usr/include/boost/regex/regex_traits.hpp" 3 4 6242: # 1 "/usr/include/boost/regex/v4/regex_traits.hpp" 1 3 4 6242: # 29 "/usr/include/boost/regex/v4/regex_traits.hpp" 3 4 6242: # 1 "/usr/include/boost/regex/v4/syntax_type.hpp" 1 3 4 6242: # 22 "/usr/include/boost/regex/v4/syntax_type.hpp" 3 4 6242: namespace boost{ 6242: namespace regex_constants{ 6242: 6242: typedef unsigned char syntax_type; 6242: 6242: 6242: 6242: 6242: static const syntax_type syntax_char = 0; 6242: static const syntax_type syntax_open_mark = 1; 6242: static const syntax_type syntax_close_mark = 2; 6242: static const syntax_type syntax_dollar = 3; 6242: static const syntax_type syntax_caret = 4; 6242: static const syntax_type syntax_dot = 5; 6242: static const syntax_type syntax_star = 6; 6242: static const syntax_type syntax_plus = 7; 6242: static const syntax_type syntax_question = 8; 6242: static const syntax_type syntax_open_set = 9; 6242: static const syntax_type syntax_close_set = 10; 6242: static const syntax_type syntax_or = 11; 6242: static const syntax_type syntax_escape = 12; 6242: static const syntax_type syntax_dash = 14; 6242: static const syntax_type syntax_open_brace = 15; 6242: static const syntax_type syntax_close_brace = 16; 6242: static const syntax_type syntax_digit = 17; 6242: static const syntax_type syntax_comma = 27; 6242: static const syntax_type syntax_equal = 37; 6242: static const syntax_type syntax_colon = 36; 6242: static const syntax_type syntax_not = 53; 6242: 6242: 6242: 6242: static const syntax_type syntax_hash = 13; 6242: static const syntax_type syntax_newline = 26; 6242: 6242: 6242: 6242: typedef syntax_type escape_syntax_type; 6242: 6242: static const escape_syntax_type escape_type_word_assert = 18; 6242: static const escape_syntax_type escape_type_not_word_assert = 19; 6242: static const escape_syntax_type escape_type_control_f = 29; 6242: static const escape_syntax_type escape_type_control_n = 30; 6242: static const escape_syntax_type escape_type_control_r = 31; 6242: static const escape_syntax_type escape_type_control_t = 32; 6242: static const escape_syntax_type escape_type_control_v = 33; 6242: static const escape_syntax_type escape_type_ascii_control = 35; 6242: static const escape_syntax_type escape_type_hex = 34; 6242: static const escape_syntax_type escape_type_unicode = 0; 6242: static const escape_syntax_type escape_type_identity = 0; 6242: static const escape_syntax_type escape_type_backref = syntax_digit; 6242: static const escape_syntax_type escape_type_decimal = syntax_digit; 6242: static const escape_syntax_type escape_type_class = 22; 6242: static const escape_syntax_type escape_type_not_class = 23; 6242: 6242: 6242: 6242: static const escape_syntax_type escape_type_left_word = 20; 6242: static const escape_syntax_type escape_type_right_word = 21; 6242: static const escape_syntax_type escape_type_start_buffer = 24; 6242: static const escape_syntax_type escape_type_end_buffer = 25; 6242: static const escape_syntax_type escape_type_control_a = 28; 6242: static const escape_syntax_type escape_type_e = 38; 6242: static const escape_syntax_type escape_type_E = 47; 6242: static const escape_syntax_type escape_type_Q = 48; 6242: static const escape_syntax_type escape_type_X = 49; 6242: static const escape_syntax_type escape_type_C = 50; 6242: static const escape_syntax_type escape_type_Z = 51; 6242: static const escape_syntax_type escape_type_G = 52; 6242: 6242: static const escape_syntax_type escape_type_property = 54; 6242: static const escape_syntax_type escape_type_not_property = 55; 6242: static const escape_syntax_type escape_type_named_char = 56; 6242: static const escape_syntax_type escape_type_extended_backref = 57; 6242: static const escape_syntax_type escape_type_reset_start_mark = 58; 6242: static const escape_syntax_type escape_type_line_ending = 59; 6242: 6242: static const escape_syntax_type syntax_max = 60; 6242: 6242: } 6242: } 6242: # 30 "/usr/include/boost/regex/v4/regex_traits.hpp" 2 3 4 6242: 6242: 6242: # 1 "/usr/include/boost/regex/v4/error_type.hpp" 1 3 4 6242: # 23 "/usr/include/boost/regex/v4/error_type.hpp" 3 4 6242: namespace boost{ 6242: 6242: 6242: 6242: namespace regex_constants{ 6242: 6242: enum error_type{ 6242: 6242: error_ok = 0, 6242: error_no_match = 1, 6242: error_bad_pattern = 2, 6242: error_collate = 3, 6242: error_ctype = 4, 6242: error_escape = 5, 6242: error_backref = 6, 6242: error_brack = 7, 6242: error_paren = 8, 6242: error_brace = 9, 6242: error_badbrace = 10, 6242: error_range = 11, 6242: error_space = 12, 6242: error_badrepeat = 13, 6242: error_end = 14, 6242: error_size = 15, 6242: error_right_paren = 16, 6242: error_empty = 17, 6242: error_complexity = 18, 6242: error_stack = 19, 6242: error_perl_extension = 20, 6242: error_unknown = 21 6242: }; 6242: 6242: } 6242: } 6242: # 33 "/usr/include/boost/regex/v4/regex_traits.hpp" 2 3 4 6242: 6242: 6242: # 1 "/usr/include/boost/regex/v4/regex_traits_defaults.hpp" 1 3 4 6242: # 41 "/usr/include/boost/regex/v4/regex_traits_defaults.hpp" 3 4 6242: # 1 "/usr/include/boost/type_traits/make_unsigned.hpp" 1 3 4 6242: # 12 "/usr/include/boost/type_traits/make_unsigned.hpp" 3 4 6242: # 1 "/usr/include/boost/type_traits/conditional.hpp" 1 3 4 6242: # 12 "/usr/include/boost/type_traits/conditional.hpp" 3 4 6242: namespace boost { 6242: 6242: template struct conditional { typedef T type; }; 6242: template struct conditional { typedef U type; }; 6242: 6242: 6242: 6242: template using conditional_t = typename conditional::type; 6242: 6242: 6242: 6242: } 6242: # 13 "/usr/include/boost/type_traits/make_unsigned.hpp" 2 3 4 6242: # 1 "/usr/include/boost/type_traits/is_integral.hpp" 1 3 4 6242: # 13 "/usr/include/boost/type_traits/is_integral.hpp" 3 4 6242: # 1 "/usr/include/boost/type_traits/integral_constant.hpp" 1 3 4 6242: # 30 "/usr/include/boost/type_traits/integral_constant.hpp" 3 4 6242: namespace mpl_{ 6242: 6242: template struct bool_; 6242: template struct integral_c; 6242: struct integral_c_tag; 6242: } 6242: 6242: namespace boost 6242: { 6242: namespace mpl 6242: { 6242: using ::mpl_::bool_; 6242: using ::mpl_::integral_c; 6242: using ::mpl_::integral_c_tag; 6242: } 6242: } 6242: 6242: 6242: 6242: namespace boost{ 6242: 6242: template 6242: struct integral_constant 6242: { 6242: typedef mpl::integral_c_tag tag; 6242: typedef T value_type; 6242: typedef integral_constant type; 6242: static const T value = val; 6242: 6242: 6242: 6242: 6242: template 6242: static U& dereference(U* p) { return *p; } 6242: 6242: operator const mpl::integral_c& ()const 6242: { 6242: static const char data[sizeof(long)] = { 0 }; 6242: return dereference(reinterpret_cast*>(&data)); 6242: } 6242: constexpr operator T()const { return val; } 6242: }; 6242: 6242: template 6242: T const integral_constant::value; 6242: 6242: template 6242: struct integral_constant 6242: { 6242: typedef mpl::integral_c_tag tag; 6242: typedef bool value_type; 6242: typedef integral_constant type; 6242: static const bool value = val; 6242: 6242: 6242: 6242: 6242: template 6242: static T& dereference(T* p) { return *p; } 6242: 6242: operator const mpl::bool_& ()const 6242: { 6242: static const char data = 0; 6242: return dereference(reinterpret_cast*>(&data)); 6242: } 6242: constexpr operator bool()const { return val; } 6242: }; 6242: 6242: template 6242: bool const integral_constant::value; 6242: 6242: typedef integral_constant true_type; 6242: typedef integral_constant false_type; 6242: 6242: } 6242: # 14 "/usr/include/boost/type_traits/is_integral.hpp" 2 3 4 6242: 6242: namespace boost { 6242: 6242: 6242: 6242: 6242: 6242: 6242: template struct is_integral : public false_type {}; 6242: template struct is_integral : public is_integral {}; 6242: template struct is_integral : public is_integral{}; 6242: template struct is_integral : public is_integral{}; 6242: 6242: 6242: 6242: 6242: template<> struct is_integral : public true_type {}; 6242: template<> struct is_integral : public true_type{}; 6242: template<> struct is_integral : public true_type{}; 6242: template<> struct is_integral : public true_type{}; 6242: 6242: template<> struct is_integral : public true_type{}; 6242: template<> struct is_integral : public true_type{}; 6242: template<> struct is_integral : public true_type{}; 6242: template<> struct is_integral : public true_type{}; 6242: 6242: template<> struct is_integral : public true_type{}; 6242: template<> struct is_integral : public true_type{}; 6242: 6242: 6242: 6242: 6242: 6242: template<> struct is_integral : public true_type{}; 6242: # 67 "/usr/include/boost/type_traits/is_integral.hpp" 3 4 6242: template<> struct is_integral< ::boost::ulong_long_type> : public true_type{}; 6242: template<> struct is_integral< ::boost::long_long_type> : public true_type{}; 6242: 6242: 6242: 6242: 6242: 6242: 6242: template<> struct is_integral : public true_type{}; 6242: template<> struct is_integral : public true_type{}; 6242: 6242: 6242: template<> struct is_integral : public true_type{}; 6242: 6242: 6242: template<> struct is_integral : public true_type{}; 6242: 6242: 6242: 6242: 6242: } 6242: # 14 "/usr/include/boost/type_traits/make_unsigned.hpp" 2 3 4 6242: # 1 "/usr/include/boost/type_traits/is_signed.hpp" 1 3 4 6242: # 14 "/usr/include/boost/type_traits/is_signed.hpp" 3 4 6242: # 1 "/usr/include/boost/type_traits/remove_cv.hpp" 1 3 4 6242: # 18 "/usr/include/boost/type_traits/remove_cv.hpp" 3 4 6242: namespace boost { 6242: 6242: 6242: template struct remove_cv{ typedef T type; }; 6242: template struct remove_cv{ typedef T type; }; 6242: template struct remove_cv{ typedef T type; }; 6242: template struct remove_cv{ typedef T type; }; 6242: 6242: 6242: template struct remove_cv{ typedef T type[N]; }; 6242: template struct remove_cv{ typedef T type[N]; }; 6242: template struct remove_cv{ typedef T type[N]; }; 6242: 6242: template struct remove_cv{ typedef T type[]; }; 6242: template struct remove_cv{ typedef T type[]; }; 6242: template struct remove_cv{ typedef T type[]; }; 6242: 6242: 6242: 6242: 6242: 6242: template using remove_cv_t = typename remove_cv::type; 6242: 6242: 6242: 6242: } 6242: # 15 "/usr/include/boost/type_traits/is_signed.hpp" 2 3 4 6242: # 1 "/usr/include/boost/type_traits/is_enum.hpp" 1 3 4 6242: # 14 "/usr/include/boost/type_traits/is_enum.hpp" 3 4 6242: # 1 "/usr/include/boost/type_traits/intrinsics.hpp" 1 3 4 6242: # 16 "/usr/include/boost/type_traits/intrinsics.hpp" 3 4 6242: # 1 "/usr/include/boost/type_traits/detail/config.hpp" 1 3 4 6242: # 17 "/usr/include/boost/type_traits/intrinsics.hpp" 2 3 4 6242: # 15 "/usr/include/boost/type_traits/is_enum.hpp" 2 3 4 6242: # 32 "/usr/include/boost/type_traits/is_enum.hpp" 3 4 6242: namespace boost { 6242: # 160 "/usr/include/boost/type_traits/is_enum.hpp" 3 4 6242: template struct is_enum : public integral_constant {}; 6242: 6242: 6242: 6242: } 6242: # 16 "/usr/include/boost/type_traits/is_signed.hpp" 2 3 4 6242: # 1 "/usr/include/c++/8/climits" 1 3 4 6242: # 39 "/usr/include/c++/8/climits" 3 4 6242: 6242: # 40 "/usr/include/c++/8/climits" 3 6242: 6242: 6242: # 1 "/usr/lib/gcc/s390x-linux-gnu/8/include-fixed/limits.h" 1 3 4 6242: # 43 "/usr/include/c++/8/climits" 2 3 6242: # 17 "/usr/include/boost/type_traits/is_signed.hpp" 2 3 4 6242: 6242: namespace boost { 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: namespace detail{ 6242: 6242: template 6242: struct is_signed_values 6242: { 6242: 6242: 6242: 6242: 6242: 6242: typedef typename remove_cv::type no_cv_t; 6242: static const no_cv_t minus_one = (static_cast(-1)); 6242: static const no_cv_t zero = (static_cast(0)); 6242: }; 6242: 6242: template 6242: struct is_signed_helper 6242: { 6242: typedef typename remove_cv::type no_cv_t; 6242: static const bool value = (!(::boost::detail::is_signed_values::minus_one > boost::detail::is_signed_values::zero)); 6242: }; 6242: 6242: template 6242: struct is_signed_select_helper 6242: { 6242: template 6242: struct rebind 6242: { 6242: typedef is_signed_helper type; 6242: }; 6242: }; 6242: 6242: template <> 6242: struct is_signed_select_helper 6242: { 6242: template 6242: struct rebind 6242: { 6242: typedef false_type type; 6242: }; 6242: }; 6242: 6242: template 6242: struct is_signed_impl 6242: { 6242: typedef ::boost::detail::is_signed_select_helper< ::boost::is_integral::value || ::boost::is_enum::value> selector; 6242: typedef typename selector::template rebind binder; 6242: typedef typename binder::type type; 6242: static const bool value = type::value; 6242: }; 6242: 6242: } 6242: 6242: template struct is_signed : public integral_constant::value> {}; 6242: # 91 "/usr/include/boost/type_traits/is_signed.hpp" 3 4 6242: template <> struct is_signed : public true_type{}; 6242: template <> struct is_signed : public true_type{}; 6242: template <> struct is_signed : public true_type{}; 6242: template <> struct is_signed : public true_type{}; 6242: template <> struct is_signed : public true_type{}; 6242: template <> struct is_signed : public true_type{}; 6242: template <> struct is_signed : public true_type{}; 6242: template <> struct is_signed : public true_type{}; 6242: template <> struct is_signed : public true_type{}; 6242: template <> struct is_signed : public true_type{}; 6242: template <> struct is_signed : public true_type{}; 6242: template <> struct is_signed : public true_type{}; 6242: template <> struct is_signed : public true_type{}; 6242: template <> struct is_signed : public true_type{}; 6242: template <> struct is_signed : public true_type{}; 6242: template <> struct is_signed : public true_type{}; 6242: 6242: template <> struct is_signed : public false_type{}; 6242: template <> struct is_signed : public false_type{}; 6242: template <> struct is_signed : public false_type{}; 6242: template <> struct is_signed : public false_type{}; 6242: template <> struct is_signed : public false_type{}; 6242: template <> struct is_signed : public false_type{}; 6242: template <> struct is_signed : public false_type{}; 6242: template <> struct is_signed : public false_type{}; 6242: template <> struct is_signed : public false_type{}; 6242: template <> struct is_signed : public false_type{}; 6242: template <> struct is_signed : public false_type{}; 6242: template <> struct is_signed : public false_type{}; 6242: template <> struct is_signed : public false_type{}; 6242: template <> struct is_signed : public false_type{}; 6242: template <> struct is_signed : public false_type{}; 6242: template <> struct is_signed : public false_type{}; 6242: 6242: template <> struct is_signed< ::boost::long_long_type> : public true_type{}; 6242: template <> struct is_signed : public true_type{}; 6242: template <> struct is_signed : public true_type{}; 6242: template <> struct is_signed : public true_type{}; 6242: 6242: template <> struct is_signed< ::boost::ulong_long_type> : public false_type{}; 6242: template <> struct is_signed : public false_type{}; 6242: template <> struct is_signed : public false_type{}; 6242: template <> struct is_signed : public false_type{}; 6242: # 142 "/usr/include/boost/type_traits/is_signed.hpp" 3 4 6242: template <> struct is_signed : public false_type{}; 6242: template <> struct is_signed : public false_type{}; 6242: template <> struct is_signed : public false_type{}; 6242: template <> struct is_signed : public false_type{}; 6242: 6242: 6242: 6242: 6242: template <> struct is_signed : public true_type{}; 6242: template <> struct is_signed : public true_type{}; 6242: template <> struct is_signed : public true_type{}; 6242: template <> struct is_signed : public true_type{}; 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: } 6242: # 15 "/usr/include/boost/type_traits/make_unsigned.hpp" 2 3 4 6242: # 1 "/usr/include/boost/type_traits/is_unsigned.hpp" 1 3 4 6242: # 17 "/usr/include/boost/type_traits/is_unsigned.hpp" 3 4 6242: # 1 "/usr/include/c++/8/climits" 1 3 4 6242: # 39 "/usr/include/c++/8/climits" 3 4 6242: 6242: # 40 "/usr/include/c++/8/climits" 3 6242: 6242: 6242: # 1 "/usr/lib/gcc/s390x-linux-gnu/8/include-fixed/limits.h" 1 3 4 6242: # 43 "/usr/include/c++/8/climits" 2 3 6242: # 18 "/usr/include/boost/type_traits/is_unsigned.hpp" 2 3 4 6242: 6242: namespace boost { 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: namespace detail{ 6242: 6242: template 6242: struct is_unsigned_values 6242: { 6242: 6242: 6242: 6242: 6242: 6242: typedef typename remove_cv::type no_cv_t; 6242: static const no_cv_t minus_one = (static_cast(-1)); 6242: static const no_cv_t zero = (static_cast(0)); 6242: }; 6242: 6242: template 6242: struct is_ununsigned_helper 6242: { 6242: static const bool value = (::boost::detail::is_unsigned_values::minus_one > ::boost::detail::is_unsigned_values::zero); 6242: }; 6242: 6242: template 6242: struct is_unsigned_select_helper 6242: { 6242: template 6242: struct rebind 6242: { 6242: typedef is_ununsigned_helper type; 6242: }; 6242: }; 6242: 6242: template <> 6242: struct is_unsigned_select_helper 6242: { 6242: template 6242: struct rebind 6242: { 6242: typedef false_type type; 6242: }; 6242: }; 6242: 6242: template 6242: struct is_unsigned 6242: { 6242: typedef ::boost::detail::is_unsigned_select_helper< ::boost::is_integral::value || ::boost::is_enum::value > selector; 6242: typedef typename selector::template rebind binder; 6242: typedef typename binder::type type; 6242: static const bool value = type::value; 6242: }; 6242: 6242: } 6242: 6242: template struct is_unsigned : public integral_constant::value> {}; 6242: # 91 "/usr/include/boost/type_traits/is_unsigned.hpp" 3 4 6242: template <> struct is_unsigned : public true_type{}; 6242: template <> struct is_unsigned : public true_type{}; 6242: template <> struct is_unsigned : public true_type{}; 6242: template <> struct is_unsigned : public true_type{}; 6242: template <> struct is_unsigned : public true_type{}; 6242: template <> struct is_unsigned : public true_type{}; 6242: template <> struct is_unsigned : public true_type{}; 6242: template <> struct is_unsigned : public true_type{}; 6242: template <> struct is_unsigned : public true_type{}; 6242: template <> struct is_unsigned : public true_type{}; 6242: template <> struct is_unsigned : public true_type{}; 6242: template <> struct is_unsigned : public true_type{}; 6242: template <> struct is_unsigned : public true_type{}; 6242: template <> struct is_unsigned : public true_type{}; 6242: template <> struct is_unsigned : public true_type{}; 6242: template <> struct is_unsigned : public true_type{}; 6242: 6242: template <> struct is_unsigned : public false_type{}; 6242: template <> struct is_unsigned : public false_type{}; 6242: template <> struct is_unsigned : public false_type{}; 6242: template <> struct is_unsigned : public false_type{}; 6242: template <> struct is_unsigned< short> : public false_type{}; 6242: template <> struct is_unsigned : public false_type{}; 6242: template <> struct is_unsigned : public false_type{}; 6242: template <> struct is_unsigned : public false_type{}; 6242: template <> struct is_unsigned< int> : public false_type{}; 6242: template <> struct is_unsigned : public false_type{}; 6242: template <> struct is_unsigned : public false_type{}; 6242: template <> struct is_unsigned : public false_type{}; 6242: template <> struct is_unsigned< long> : public false_type{}; 6242: template <> struct is_unsigned : public false_type{}; 6242: template <> struct is_unsigned : public false_type{}; 6242: template <> struct is_unsigned : public false_type{}; 6242: 6242: template <> struct is_unsigned< ::boost::ulong_long_type> : public true_type{}; 6242: template <> struct is_unsigned : public true_type{}; 6242: template <> struct is_unsigned : public true_type{}; 6242: template <> struct is_unsigned : public true_type{}; 6242: 6242: template <> struct is_unsigned< ::boost::long_long_type> : public false_type{}; 6242: template <> struct is_unsigned : public false_type{}; 6242: template <> struct is_unsigned : public false_type{}; 6242: template <> struct is_unsigned : public false_type{}; 6242: 6242: 6242: 6242: template <> struct is_unsigned : public true_type{}; 6242: template <> struct is_unsigned : public true_type{}; 6242: template <> struct is_unsigned : public true_type{}; 6242: template <> struct is_unsigned : public true_type{}; 6242: # 155 "/usr/include/boost/type_traits/is_unsigned.hpp" 3 4 6242: template <> struct is_unsigned : public false_type{}; 6242: template <> struct is_unsigned : public false_type{}; 6242: template <> struct is_unsigned : public false_type{}; 6242: template <> struct is_unsigned : public false_type{}; 6242: 6242: 6242: } 6242: # 16 "/usr/include/boost/type_traits/make_unsigned.hpp" 2 3 4 6242: 6242: # 1 "/usr/include/boost/type_traits/is_same.hpp" 1 3 4 6242: # 26 "/usr/include/boost/type_traits/is_same.hpp" 3 4 6242: namespace boost { 6242: 6242: 6242: template struct is_same : public false_type {}; 6242: template struct is_same : public true_type {}; 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: } 6242: # 18 "/usr/include/boost/type_traits/make_unsigned.hpp" 2 3 4 6242: 6242: # 1 "/usr/include/boost/type_traits/is_const.hpp" 1 3 4 6242: # 27 "/usr/include/boost/type_traits/is_const.hpp" 3 4 6242: namespace boost { 6242: # 36 "/usr/include/boost/type_traits/is_const.hpp" 3 4 6242: template 6242: struct is_const : public false_type {}; 6242: template struct is_const : public true_type{}; 6242: template struct is_const : public true_type{}; 6242: template struct is_const : public true_type{}; 6242: 6242: 6242: 6242: } 6242: # 20 "/usr/include/boost/type_traits/make_unsigned.hpp" 2 3 4 6242: # 1 "/usr/include/boost/type_traits/is_volatile.hpp" 1 3 4 6242: # 27 "/usr/include/boost/type_traits/is_volatile.hpp" 3 4 6242: namespace boost { 6242: # 36 "/usr/include/boost/type_traits/is_volatile.hpp" 3 4 6242: template 6242: struct is_volatile : public false_type {}; 6242: template struct is_volatile : public true_type{}; 6242: template struct is_volatile : public true_type{}; 6242: template struct is_volatile : public true_type{}; 6242: 6242: 6242: 6242: } 6242: # 21 "/usr/include/boost/type_traits/make_unsigned.hpp" 2 3 4 6242: # 1 "/usr/include/boost/type_traits/add_const.hpp" 1 3 4 6242: # 15 "/usr/include/boost/type_traits/add_const.hpp" 3 4 6242: namespace boost { 6242: # 30 "/usr/include/boost/type_traits/add_const.hpp" 3 4 6242: template struct add_const 6242: { 6242: typedef T const type; 6242: }; 6242: 6242: 6242: 6242: 6242: 6242: template struct add_const 6242: { 6242: typedef T& type; 6242: }; 6242: 6242: 6242: 6242: template using add_const_t = typename add_const::type; 6242: 6242: 6242: 6242: } 6242: # 22 "/usr/include/boost/type_traits/make_unsigned.hpp" 2 3 4 6242: # 1 "/usr/include/boost/type_traits/add_volatile.hpp" 1 3 4 6242: # 15 "/usr/include/boost/type_traits/add_volatile.hpp" 3 4 6242: namespace boost { 6242: # 30 "/usr/include/boost/type_traits/add_volatile.hpp" 3 4 6242: template struct add_volatile{ typedef T volatile type; }; 6242: 6242: 6242: 6242: 6242: 6242: template struct add_volatile{ typedef T& type; }; 6242: 6242: 6242: 6242: template using add_volatile_t = typename add_volatile::type; 6242: 6242: 6242: 6242: } 6242: # 23 "/usr/include/boost/type_traits/make_unsigned.hpp" 2 3 4 6242: # 1 "/usr/include/boost/static_assert.hpp" 1 3 4 6242: # 24 "/usr/include/boost/type_traits/make_unsigned.hpp" 2 3 4 6242: 6242: namespace boost { 6242: 6242: template 6242: struct make_unsigned 6242: { 6242: private: 6242: static_assert((::boost::is_integral::value || ::boost::is_enum::value), "The template argument to make_unsigned must be an integer or enum type."); 6242: static_assert((! ::boost::is_same::type, bool>::value), "The template argument to make_unsigned must not be the type bool"); 6242: 6242: typedef typename remove_cv::type t_no_cv; 6242: typedef typename conditional< 6242: (::boost::is_unsigned::value && ::boost::is_integral::value 6242: && ! ::boost::is_same::value 6242: && ! ::boost::is_same::value 6242: && ! ::boost::is_same::value), 6242: T, 6242: typename conditional< 6242: (::boost::is_integral::value 6242: && ! ::boost::is_same::value 6242: && ! ::boost::is_same::value 6242: && ! ::boost::is_same::value), 6242: typename conditional< 6242: is_same::value, 6242: unsigned char, 6242: typename conditional< 6242: is_same::value, 6242: unsigned short, 6242: typename conditional< 6242: is_same::value, 6242: unsigned int, 6242: typename conditional< 6242: is_same::value, 6242: unsigned long, 6242: 6242: 6242: typename conditional< 6242: sizeof(t_no_cv) == sizeof(boost::ulong_long_type), 6242: boost::ulong_long_type, 6242: boost::uint128_type 6242: >::type 6242: # 73 "/usr/include/boost/type_traits/make_unsigned.hpp" 3 4 6242: >::type 6242: >::type 6242: >::type 6242: >::type, 6242: 6242: typename conditional< 6242: sizeof(t_no_cv) == sizeof(unsigned char), 6242: unsigned char, 6242: typename conditional< 6242: sizeof(t_no_cv) == sizeof(unsigned short), 6242: unsigned short, 6242: typename conditional< 6242: sizeof(t_no_cv) == sizeof(unsigned int), 6242: unsigned int, 6242: typename conditional< 6242: sizeof(t_no_cv) == sizeof(unsigned long), 6242: unsigned long, 6242: 6242: 6242: typename conditional< 6242: sizeof(t_no_cv) == sizeof(boost::ulong_long_type), 6242: boost::ulong_long_type, 6242: boost::uint128_type 6242: >::type 6242: # 105 "/usr/include/boost/type_traits/make_unsigned.hpp" 3 4 6242: >::type 6242: >::type 6242: >::type 6242: >::type 6242: >::type 6242: >::type base_integer_type; 6242: 6242: 6242: typedef typename conditional< 6242: is_const::value, 6242: typename add_const::type, 6242: base_integer_type 6242: >::type const_base_integer_type; 6242: public: 6242: 6242: typedef typename conditional< 6242: is_volatile::value, 6242: typename add_volatile::type, 6242: const_base_integer_type 6242: >::type type; 6242: }; 6242: 6242: 6242: 6242: template using make_unsigned_t = typename make_unsigned::type; 6242: 6242: 6242: 6242: } 6242: # 42 "/usr/include/boost/regex/v4/regex_traits_defaults.hpp" 2 3 4 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: namespace boost{ namespace re_detail_106501{ 6242: 6242: 6242: 6242: 6242: 6242: template 6242: inline bool is_extended(charT c) 6242: { 6242: typedef typename make_unsigned::type unsigned_type; 6242: return (sizeof(charT) > 1) && (static_cast(c) >= 256u); 6242: } 6242: inline bool is_extended(char) 6242: { return false; } 6242: 6242: 6242: const char* get_default_syntax(regex_constants::syntax_type n); 6242: const char* get_default_error_string(regex_constants::error_type n); 6242: regex_constants::syntax_type get_default_syntax_type(char c); 6242: regex_constants::escape_syntax_type get_default_escape_syntax_type(char c); 6242: 6242: 6242: bool is_combining_implementation(uint_least16_t s); 6242: 6242: template 6242: inline bool is_combining(charT c) 6242: { 6242: return (c <= static_cast(0)) ? false : ((c >= static_cast((std::numeric_limits::max)())) ? false : is_combining_implementation(static_cast(c))); 6242: } 6242: template <> 6242: inline bool is_combining(char) 6242: { 6242: return false; 6242: } 6242: template <> 6242: inline bool is_combining(signed char) 6242: { 6242: return false; 6242: } 6242: template <> 6242: inline bool is_combining(unsigned char) 6242: { 6242: return false; 6242: } 6242: # 120 "/usr/include/boost/regex/v4/regex_traits_defaults.hpp" 3 4 6242: template 6242: inline bool is_separator(charT c) 6242: { 6242: return static_cast((c == static_cast('\n')) || (c == static_cast('\r')) || (c == static_cast('\f')) || (static_cast(c) == 0x2028u) || (static_cast(c) == 0x2029u) || (static_cast(c) == 0x85u)) 6242: 6242: 6242: 6242: 6242: 6242: ; 6242: } 6242: template <> 6242: inline bool is_separator(char c) 6242: { 6242: return static_cast((c == '\n') || (c == '\r') || (c == '\f')); 6242: } 6242: 6242: 6242: 6242: 6242: std::string lookup_default_collate_name(const std::string& name); 6242: 6242: 6242: 6242: 6242: 6242: template 6242: struct character_pointer_range 6242: { 6242: const charT* p1; 6242: const charT* p2; 6242: 6242: bool operator < (const character_pointer_range& r)const 6242: { 6242: return std::lexicographical_compare(p1, p2, r.p1, r.p2); 6242: } 6242: bool operator == (const character_pointer_range& r)const 6242: { 6242: 6242: 6242: 6242: 6242: return ((p2 - p1) == (r.p2 - r.p1)) && re_detail_106501::equal(p1, p2, r.p1); 6242: } 6242: }; 6242: template 6242: int get_default_class_id(const charT* p1, const charT* p2) 6242: { 6242: static const charT data[73] = { 6242: 'a', 'l', 'n', 'u', 'm', 6242: 'a', 'l', 'p', 'h', 'a', 6242: 'b', 'l', 'a', 'n', 'k', 6242: 'c', 'n', 't', 'r', 'l', 6242: 'd', 'i', 'g', 'i', 't', 6242: 'g', 'r', 'a', 'p', 'h', 6242: 'l', 'o', 'w', 'e', 'r', 6242: 'p', 'r', 'i', 'n', 't', 6242: 'p', 'u', 'n', 'c', 't', 6242: 's', 'p', 'a', 'c', 'e', 6242: 'u', 'n', 'i', 'c', 'o', 'd', 'e', 6242: 'u', 'p', 'p', 'e', 'r', 6242: 'v', 6242: 'w', 'o', 'r', 'd', 6242: 'x', 'd', 'i', 'g', 'i', 't', 6242: }; 6242: 6242: static const character_pointer_range ranges[21] = 6242: { 6242: {data+0, data+5,}, 6242: {data+5, data+10,}, 6242: {data+10, data+15,}, 6242: {data+15, data+20,}, 6242: {data+20, data+21,}, 6242: {data+20, data+25,}, 6242: {data+25, data+30,}, 6242: {data+29, data+30,}, 6242: {data+30, data+31,}, 6242: {data+30, data+35,}, 6242: {data+35, data+40,}, 6242: {data+40, data+45,}, 6242: {data+45, data+46,}, 6242: {data+45, data+50,}, 6242: {data+57, data+58,}, 6242: {data+50, data+57,}, 6242: {data+57, data+62,}, 6242: {data+62, data+63,}, 6242: {data+63, data+64,}, 6242: {data+63, data+67,}, 6242: {data+67, data+73,}, 6242: }; 6242: static const character_pointer_range* ranges_begin = ranges; 6242: static const character_pointer_range* ranges_end = ranges + (sizeof(ranges)/sizeof(ranges[0])); 6242: 6242: character_pointer_range t = { p1, p2, }; 6242: const character_pointer_range* p = std::lower_bound(ranges_begin, ranges_end, t); 6242: if((p != ranges_end) && (t == *p)) 6242: return static_cast(p - ranges); 6242: return -1; 6242: } 6242: 6242: 6242: 6242: 6242: template 6242: std::ptrdiff_t global_length(const charT* p) 6242: { 6242: std::ptrdiff_t n = 0; 6242: while(*p) 6242: { 6242: ++p; 6242: ++n; 6242: } 6242: return n; 6242: } 6242: template<> 6242: inline std::ptrdiff_t global_length(const char* p) 6242: { 6242: return (std::strlen)(p); 6242: } 6242: 6242: template<> 6242: inline std::ptrdiff_t global_length(const wchar_t* p) 6242: { 6242: return (std::wcslen)(p); 6242: } 6242: 6242: template 6242: inline charT global_lower(charT c) 6242: { 6242: return c; 6242: } 6242: template 6242: inline charT global_upper(charT c) 6242: { 6242: return c; 6242: } 6242: 6242: char do_global_lower(char c); 6242: char do_global_upper(char c); 6242: 6242: wchar_t do_global_lower(wchar_t c); 6242: wchar_t do_global_upper(wchar_t c); 6242: # 277 "/usr/include/boost/regex/v4/regex_traits_defaults.hpp" 3 4 6242: template<> inline char global_lower(char c){ return do_global_lower(c); } 6242: template<> inline char global_upper(char c){ return do_global_upper(c); } 6242: 6242: template<> inline wchar_t global_lower(wchar_t c){ return do_global_lower(c); } 6242: template<> inline wchar_t global_upper(wchar_t c){ return do_global_upper(c); } 6242: 6242: 6242: 6242: 6242: 6242: 6242: template 6242: int global_value(charT c) 6242: { 6242: static const charT zero = '0'; 6242: static const charT nine = '9'; 6242: static const charT a = 'a'; 6242: static const charT f = 'f'; 6242: static const charT A = 'A'; 6242: static const charT F = 'F'; 6242: 6242: if(c > f) return -1; 6242: if(c >= a) return 10 + (c - a); 6242: if(c > F) return -1; 6242: if(c >= A) return 10 + (c - A); 6242: if(c > nine) return -1; 6242: if(c >= zero) return c - zero; 6242: return -1; 6242: } 6242: template 6242: boost::intmax_t global_toi(const charT*& p1, const charT* p2, int radix, const traits& t) 6242: { 6242: (void)t; 6242: boost::intmax_t next_value = t.value(*p1, radix); 6242: if((p1 == p2) || (next_value < 0) || (next_value >= radix)) 6242: return -1; 6242: boost::intmax_t result = 0; 6242: while(p1 != p2) 6242: { 6242: next_value = t.value(*p1, radix); 6242: if((next_value < 0) || (next_value >= radix)) 6242: break; 6242: result *= radix; 6242: result += next_value; 6242: ++p1; 6242: } 6242: return result; 6242: } 6242: 6242: template 6242: inline const charT* get_escape_R_string() 6242: { 6242: 6242: 6242: 6242: 6242: static const charT e1[] = { '(', '?', '>', '\x0D', '\x0A', '?', 6242: '|', '[', '\x0A', '\x0B', '\x0C', static_cast('\x85'), '\\', 'x', '{', '2', '0', '2', '8', '}', 6242: '\\', 'x', '{', '2', '0', '2', '9', '}', ']', ')', '\0' }; 6242: static const charT e2[] = { '(', '?', '>', '\x0D', '\x0A', '?', 6242: '|', '[', '\x0A', '\x0B', '\x0C', static_cast('\x85'), ']', ')', '\0' }; 6242: 6242: charT c = static_cast(0x2029u); 6242: bool b = (static_cast(c) == 0x2029u); 6242: 6242: return (b ? e1 : e2); 6242: 6242: 6242: 6242: } 6242: 6242: template <> 6242: inline const char* get_escape_R_string() 6242: { 6242: 6242: 6242: 6242: 6242: static const char e2[] = { '(', '?', '>', '\x0D', '\x0A', '?', 6242: '|', '[', '\x0A', '\x0B', '\x0C', '\x85', ']', ')', '\0' }; 6242: return e2; 6242: 6242: 6242: 6242: } 6242: 6242: } 6242: } 6242: # 36 "/usr/include/boost/regex/v4/regex_traits.hpp" 2 3 4 6242: 6242: 6242: 6242: # 1 "/usr/include/boost/regex/v4/cpp_regex_traits.hpp" 1 3 4 6242: # 23 "/usr/include/boost/regex/v4/cpp_regex_traits.hpp" 3 4 6242: # 1 "/usr/include/boost/integer.hpp" 1 3 4 6242: # 18 "/usr/include/boost/integer.hpp" 3 4 6242: # 1 "/usr/include/boost/integer_fwd.hpp" 1 3 4 6242: # 12 "/usr/include/boost/integer_fwd.hpp" 3 4 6242: # 1 "/usr/include/c++/8/climits" 1 3 4 6242: # 39 "/usr/include/c++/8/climits" 3 4 6242: 6242: # 40 "/usr/include/c++/8/climits" 3 6242: 6242: 6242: # 1 "/usr/lib/gcc/s390x-linux-gnu/8/include-fixed/limits.h" 1 3 4 6242: # 43 "/usr/include/c++/8/climits" 2 3 6242: # 13 "/usr/include/boost/integer_fwd.hpp" 2 3 4 6242: 6242: 6242: 6242: 6242: # 1 "/usr/include/boost/cstdint.hpp" 1 3 4 6242: # 18 "/usr/include/boost/integer_fwd.hpp" 2 3 4 6242: 6242: 6242: namespace boost 6242: { 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: typedef boost::uintmax_t static_min_max_unsigned_type; 6242: typedef boost::intmax_t static_min_max_signed_type; 6242: typedef boost::uintmax_t static_log2_argument_type; 6242: typedef int static_log2_result_type; 6242: # 42 "/usr/include/boost/integer_fwd.hpp" 3 4 6242: template < class T > 6242: class integer_traits; 6242: 6242: template < > 6242: class integer_traits< bool >; 6242: 6242: template < > 6242: class integer_traits< char >; 6242: 6242: template < > 6242: class integer_traits< signed char >; 6242: 6242: template < > 6242: class integer_traits< unsigned char >; 6242: 6242: 6242: template < > 6242: class integer_traits< wchar_t >; 6242: 6242: 6242: template < > 6242: class integer_traits< short >; 6242: 6242: template < > 6242: class integer_traits< unsigned short >; 6242: 6242: template < > 6242: class integer_traits< int >; 6242: 6242: template < > 6242: class integer_traits< unsigned int >; 6242: 6242: template < > 6242: class integer_traits< long >; 6242: 6242: template < > 6242: class integer_traits< unsigned long >; 6242: 6242: 6242: template < > 6242: class integer_traits< ::boost::long_long_type>; 6242: 6242: template < > 6242: class integer_traits< ::boost::ulong_long_type >; 6242: # 97 "/usr/include/boost/integer_fwd.hpp" 3 4 6242: template < typename LeastInt > 6242: struct int_fast_t; 6242: 6242: template< int Bits > 6242: struct int_t; 6242: 6242: template< int Bits > 6242: struct uint_t; 6242: 6242: 6242: template< boost::long_long_type MaxValue > 6242: 6242: 6242: 6242: struct int_max_value_t; 6242: 6242: 6242: template< boost::long_long_type MinValue > 6242: 6242: 6242: 6242: struct int_min_value_t; 6242: 6242: 6242: template< boost::ulong_long_type MaxValue > 6242: 6242: 6242: 6242: struct uint_value_t; 6242: 6242: 6242: 6242: 6242: template < std::size_t Bit > 6242: struct high_bit_mask_t; 6242: 6242: template < std::size_t Bits > 6242: struct low_bits_mask_t; 6242: 6242: template < > 6242: struct low_bits_mask_t< ::std::numeric_limits::digits >; 6242: 6242: 6242: 6242: template 6242: struct static_log2; 6242: 6242: template <> struct static_log2<0u>; 6242: 6242: 6242: 6242: 6242: template 6242: struct static_signed_min; 6242: 6242: template 6242: struct static_signed_max; 6242: 6242: template 6242: struct static_unsigned_min; 6242: 6242: template 6242: struct static_unsigned_max; 6242: 6242: 6242: namespace integer 6242: { 6242: 6242: 6242: 6242: 6242: 6242: typedef boost::uintmax_t static_gcd_type; 6242: 6242: 6242: template < static_gcd_type Value1, static_gcd_type Value2 > 6242: struct static_gcd; 6242: template < static_gcd_type Value1, static_gcd_type Value2 > 6242: struct static_lcm; 6242: 6242: 6242: 6242: 6242: template < typename IntegerType > 6242: class gcd_evaluator; 6242: template < typename IntegerType > 6242: class lcm_evaluator; 6242: 6242: } 6242: 6242: } 6242: # 19 "/usr/include/boost/integer.hpp" 2 3 4 6242: 6242: # 1 "/usr/include/boost/integer_traits.hpp" 1 3 4 6242: # 23 "/usr/include/boost/integer_traits.hpp" 3 4 6242: # 1 "/usr/lib/gcc/s390x-linux-gnu/8/include-fixed/limits.h" 1 3 4 6242: # 24 "/usr/include/boost/integer_traits.hpp" 2 3 4 6242: # 39 "/usr/include/boost/integer_traits.hpp" 3 4 6242: 6242: # 40 "/usr/include/boost/integer_traits.hpp" 3 6242: 6242: 6242: namespace boost { 6242: template 6242: class integer_traits : public std::numeric_limits 6242: { 6242: public: 6242: static const bool is_integral = false; 6242: }; 6242: 6242: namespace detail { 6242: template 6242: class integer_traits_base 6242: { 6242: public: 6242: static const bool is_integral = true; 6242: static const T const_min = min_val; 6242: static const T const_max = max_val; 6242: }; 6242: 6242: 6242: 6242: template 6242: const bool integer_traits_base::is_integral; 6242: 6242: template 6242: const T integer_traits_base::const_min; 6242: 6242: template 6242: const T integer_traits_base::const_max; 6242: 6242: 6242: } 6242: 6242: template<> 6242: class integer_traits 6242: : public std::numeric_limits, 6242: public detail::integer_traits_base 6242: { }; 6242: 6242: template<> 6242: class integer_traits 6242: : public std::numeric_limits, 6242: public detail::integer_traits_base 6242: { }; 6242: 6242: template<> 6242: class integer_traits 6242: : public std::numeric_limits, 6242: public detail::integer_traits_base 6242: { }; 6242: 6242: template<> 6242: class integer_traits 6242: : public std::numeric_limits, 6242: public detail::integer_traits_base 6242: { }; 6242: 6242: 6242: template<> 6242: class integer_traits 6242: : public std::numeric_limits, 6242: 6242: 6242: 6242: public detail::integer_traits_base 6242: # 125 "/usr/include/boost/integer_traits.hpp" 3 6242: { }; 6242: 6242: 6242: template<> 6242: class integer_traits 6242: : public std::numeric_limits, 6242: public detail::integer_traits_base 6242: { }; 6242: 6242: template<> 6242: class integer_traits 6242: : public std::numeric_limits, 6242: public detail::integer_traits_base 6242: { }; 6242: 6242: template<> 6242: class integer_traits 6242: : public std::numeric_limits, 6242: public detail::integer_traits_base 6242: { }; 6242: 6242: template<> 6242: class integer_traits 6242: : public std::numeric_limits, 6242: public detail::integer_traits_base 6242: { }; 6242: 6242: template<> 6242: class integer_traits 6242: : public std::numeric_limits, 6242: public detail::integer_traits_base 6242: { }; 6242: 6242: template<> 6242: class integer_traits 6242: : public std::numeric_limits, 6242: public detail::integer_traits_base 6242: { }; 6242: 6242: 6242: 6242: 6242: template<> 6242: class integer_traits< ::boost::long_long_type> 6242: : public std::numeric_limits< ::boost::long_long_type>, 6242: public detail::integer_traits_base< ::boost::long_long_type, (-0x7fffffffffffffffLL -1), 0x7fffffffffffffffLL> 6242: { }; 6242: 6242: template<> 6242: class integer_traits< ::boost::ulong_long_type> 6242: : public std::numeric_limits< ::boost::ulong_long_type>, 6242: public detail::integer_traits_base< ::boost::ulong_long_type, 0, (0x7fffffffffffffffLL * 2ULL + 1)> 6242: { }; 6242: # 251 "/usr/include/boost/integer_traits.hpp" 3 6242: } 6242: # 21 "/usr/include/boost/integer.hpp" 2 3 4 6242: 6242: # 1 "/usr/include/boost/cstdint.hpp" 1 3 4 6242: # 23 "/usr/include/boost/integer.hpp" 2 3 4 6242: # 34 "/usr/include/boost/integer.hpp" 3 4 6242: 6242: # 35 "/usr/include/boost/integer.hpp" 3 6242: 6242: 6242: namespace boost 6242: { 6242: 6242: 6242: 6242: 6242: 6242: template< typename LeastInt > 6242: struct int_fast_t 6242: { 6242: typedef LeastInt fast; 6242: typedef fast type; 6242: }; 6242: 6242: namespace detail{ 6242: 6242: 6242: template< int Category > struct int_least_helper {}; 6242: template< int Category > struct uint_least_helper {}; 6242: 6242: 6242: 6242: 6242: 6242: template<> struct int_least_helper<1> { typedef boost::long_long_type least; }; 6242: 6242: 6242: 6242: template<> struct int_least_helper<2> { typedef long least; }; 6242: template<> struct int_least_helper<3> { typedef int least; }; 6242: template<> struct int_least_helper<4> { typedef short least; }; 6242: template<> struct int_least_helper<5> { typedef signed char least; }; 6242: 6242: template<> struct uint_least_helper<1> { typedef boost::ulong_long_type least; }; 6242: 6242: 6242: 6242: template<> struct uint_least_helper<2> { typedef unsigned long least; }; 6242: template<> struct uint_least_helper<3> { typedef unsigned int least; }; 6242: template<> struct uint_least_helper<4> { typedef unsigned short least; }; 6242: template<> struct uint_least_helper<5> { typedef unsigned char least; }; 6242: 6242: template 6242: struct exact_signed_base_helper{}; 6242: template 6242: struct exact_unsigned_base_helper{}; 6242: 6242: template <> struct exact_signed_base_helper { typedef signed char exact; }; 6242: template <> struct exact_unsigned_base_helper { typedef unsigned char exact; }; 6242: 6242: template <> struct exact_signed_base_helper { typedef short exact; }; 6242: template <> struct exact_unsigned_base_helper { typedef unsigned short exact; }; 6242: 6242: 6242: template <> struct exact_signed_base_helper { typedef int exact; }; 6242: template <> struct exact_unsigned_base_helper { typedef unsigned int exact; }; 6242: 6242: 6242: 6242: template <> struct exact_signed_base_helper { typedef long exact; }; 6242: template <> struct exact_unsigned_base_helper { typedef unsigned long exact; }; 6242: # 109 "/usr/include/boost/integer.hpp" 3 6242: } 6242: 6242: 6242: 6242: 6242: template< int Bits > 6242: struct int_t : public boost::detail::exact_signed_base_helper 6242: { 6242: static_assert(Bits <= (int)(sizeof(boost::intmax_t) * 8), "No suitable signed integer type with the requested number of bits is available.") 6242: ; 6242: typedef typename boost::detail::int_least_helper 6242: < 6242: 6242: (Bits <= (int)(sizeof(boost::long_long_type) * 8)) + 6242: 6242: 6242: 6242: (Bits-1 <= ::std::numeric_limits::digits) + 6242: (Bits-1 <= ::std::numeric_limits::digits) + 6242: (Bits-1 <= ::std::numeric_limits::digits) + 6242: (Bits-1 <= ::std::numeric_limits::digits) 6242: >::least least; 6242: typedef typename int_fast_t::type fast; 6242: }; 6242: 6242: 6242: template< int Bits > 6242: struct uint_t : public boost::detail::exact_unsigned_base_helper 6242: { 6242: static_assert(Bits <= (int)(sizeof(boost::uintmax_t) * 8), "No suitable unsigned integer type with the requested number of bits is available.") 6242: ; 6242: # 150 "/usr/include/boost/integer.hpp" 3 6242: typedef typename boost::detail::uint_least_helper 6242: < 6242: 6242: (Bits <= (int)(sizeof(boost::long_long_type) * 8)) + 6242: 6242: 6242: 6242: (Bits <= ::std::numeric_limits::digits) + 6242: (Bits <= ::std::numeric_limits::digits) + 6242: (Bits <= ::std::numeric_limits::digits) + 6242: (Bits <= ::std::numeric_limits::digits) 6242: >::least least; 6242: 6242: typedef typename int_fast_t::type fast; 6242: 6242: }; 6242: 6242: 6242: 6242: 6242: 6242: template< boost::long_long_type MaxValue > 6242: 6242: 6242: 6242: struct int_max_value_t 6242: { 6242: typedef typename boost::detail::int_least_helper 6242: < 6242: 6242: (MaxValue <= ::boost::integer_traits::const_max) + 6242: 6242: 6242: 6242: (MaxValue <= ::boost::integer_traits::const_max) + 6242: (MaxValue <= ::boost::integer_traits::const_max) + 6242: (MaxValue <= ::boost::integer_traits::const_max) + 6242: (MaxValue <= ::boost::integer_traits::const_max) 6242: >::least least; 6242: typedef typename int_fast_t::type fast; 6242: }; 6242: 6242: 6242: template< boost::long_long_type MinValue > 6242: 6242: 6242: 6242: struct int_min_value_t 6242: { 6242: typedef typename boost::detail::int_least_helper 6242: < 6242: 6242: (MinValue >= ::boost::integer_traits::const_min) + 6242: 6242: 6242: 6242: (MinValue >= ::boost::integer_traits::const_min) + 6242: (MinValue >= ::boost::integer_traits::const_min) + 6242: (MinValue >= ::boost::integer_traits::const_min) + 6242: (MinValue >= ::boost::integer_traits::const_min) 6242: >::least least; 6242: typedef typename int_fast_t::type fast; 6242: }; 6242: 6242: 6242: 6242: template< boost::ulong_long_type MaxValue > 6242: 6242: 6242: 6242: struct uint_value_t 6242: { 6242: # 243 "/usr/include/boost/integer.hpp" 3 6242: typedef typename boost::detail::uint_least_helper 6242: < 6242: 6242: (MaxValue <= ::boost::integer_traits::const_max) + 6242: 6242: 6242: 6242: (MaxValue <= ::boost::integer_traits::const_max) + 6242: (MaxValue <= ::boost::integer_traits::const_max) + 6242: (MaxValue <= ::boost::integer_traits::const_max) + 6242: (MaxValue <= ::boost::integer_traits::const_max) 6242: >::least least; 6242: 6242: typedef typename int_fast_t::type fast; 6242: }; 6242: 6242: 6242: } 6242: # 24 "/usr/include/boost/regex/v4/cpp_regex_traits.hpp" 2 3 4 6242: 6242: 6242: 6242: 6242: 6242: # 1 "/usr/include/boost/regex/pattern_except.hpp" 1 3 4 6242: # 30 "/usr/include/boost/regex/pattern_except.hpp" 3 4 6242: namespace boost{ 6242: # 47 "/usr/include/boost/regex/pattern_except.hpp" 3 4 6242: class regex_error : public std::runtime_error 6242: { 6242: public: 6242: explicit regex_error(const std::string& s, regex_constants::error_type err = regex_constants::error_unknown, std::ptrdiff_t pos = 0); 6242: explicit regex_error(regex_constants::error_type err); 6242: ~regex_error() throw(); 6242: regex_constants::error_type code()const 6242: { return m_error_code; } 6242: std::ptrdiff_t position()const 6242: { return m_position; } 6242: void raise()const; 6242: private: 6242: regex_constants::error_type m_error_code; 6242: std::ptrdiff_t m_position; 6242: }; 6242: 6242: typedef regex_error bad_pattern; 6242: typedef regex_error bad_expression; 6242: 6242: namespace re_detail_106501{ 6242: 6242: void raise_runtime_error(const std::runtime_error& ex); 6242: 6242: template 6242: void raise_error(const traits& t, regex_constants::error_type code) 6242: { 6242: (void)t; 6242: std::runtime_error e(t.error_string(code)); 6242: ::boost::re_detail_106501::raise_runtime_error(e); 6242: } 6242: 6242: } 6242: # 95 "/usr/include/boost/regex/pattern_except.hpp" 3 4 6242: } 6242: # 30 "/usr/include/boost/regex/v4/cpp_regex_traits.hpp" 2 3 4 6242: 6242: 6242: 6242: 6242: 6242: # 1 "/usr/include/boost/regex/pending/static_mutex.hpp" 1 3 4 6242: # 37 "/usr/include/boost/regex/pending/static_mutex.hpp" 3 4 6242: namespace boost{ 6242: 6242: class static_mutex; 6242: 6242: 6242: 6242: class scoped_static_mutex_lock 6242: { 6242: public: 6242: scoped_static_mutex_lock(static_mutex& mut, bool lk = true); 6242: ~scoped_static_mutex_lock(); 6242: inline bool locked()const 6242: { 6242: return m_have_lock; 6242: } 6242: inline operator void const*()const 6242: { 6242: return locked() ? this : 0; 6242: } 6242: void lock(); 6242: void unlock(); 6242: private: 6242: static_mutex& m_mutex; 6242: bool m_have_lock; 6242: }; 6242: 6242: class static_mutex 6242: { 6242: public: 6242: typedef scoped_static_mutex_lock scoped_lock; 6242: pthread_mutex_t m_mutex; 6242: }; 6242: 6242: } 6242: # 36 "/usr/include/boost/regex/v4/cpp_regex_traits.hpp" 2 3 4 6242: 6242: 6242: # 1 "/usr/include/boost/regex/v4/primary_transform.hpp" 1 3 4 6242: # 34 "/usr/include/boost/regex/v4/primary_transform.hpp" 3 4 6242: namespace boost{ 6242: namespace re_detail_106501{ 6242: 6242: 6242: enum{ 6242: sort_C, 6242: sort_fixed, 6242: sort_delim, 6242: sort_unknown 6242: }; 6242: 6242: template 6242: unsigned count_chars(const S& s, charT c) 6242: { 6242: 6242: 6242: 6242: 6242: 6242: 6242: unsigned int count = 0; 6242: for(unsigned pos = 0; pos < s.size(); ++pos) 6242: { 6242: if(s[pos] == c) ++count; 6242: } 6242: return count; 6242: } 6242: 6242: 6242: template 6242: unsigned find_sort_syntax(const traits* pt, charT* delim) 6242: { 6242: 6242: 6242: 6242: 6242: typedef typename traits::string_type string_type; 6242: typedef typename traits::char_type char_type; 6242: 6242: 6242: (void)pt; 6242: 6242: char_type a[2] = {'a', '\0', }; 6242: string_type sa(pt->transform(a, a+1)); 6242: if(sa == a) 6242: { 6242: *delim = 0; 6242: return sort_C; 6242: } 6242: char_type A[2] = { 'A', '\0', }; 6242: string_type sA(pt->transform(A, A+1)); 6242: char_type c[2] = { ';', '\0', }; 6242: string_type sc(pt->transform(c, c+1)); 6242: 6242: int pos = 0; 6242: while((pos <= static_cast(sa.size())) && (pos <= static_cast(sA.size())) && (sa[pos] == sA[pos])) ++pos; 6242: --pos; 6242: if(pos < 0) 6242: { 6242: *delim = 0; 6242: return sort_unknown; 6242: } 6242: 6242: 6242: 6242: 6242: charT maybe_delim = sa[pos]; 6242: if((pos != 0) && (count_chars(sa, maybe_delim) == count_chars(sA, maybe_delim)) && (count_chars(sa, maybe_delim) == count_chars(sc, maybe_delim))) 6242: { 6242: *delim = maybe_delim; 6242: return sort_delim; 6242: } 6242: 6242: 6242: 6242: if((sa.size() == sA.size()) && (sa.size() == sc.size())) 6242: { 6242: 6242: 6242: 6242: *delim = static_cast(++pos); 6242: return sort_fixed; 6242: } 6242: 6242: 6242: 6242: *delim = 0; 6242: return sort_unknown; 6242: } 6242: 6242: 6242: } 6242: } 6242: # 39 "/usr/include/boost/regex/v4/cpp_regex_traits.hpp" 2 3 4 6242: 6242: 6242: # 1 "/usr/include/boost/regex/pending/object_cache.hpp" 1 3 4 6242: # 23 "/usr/include/boost/regex/pending/object_cache.hpp" 3 4 6242: # 1 "/usr/include/c++/8/list" 1 3 4 6242: # 58 "/usr/include/c++/8/list" 3 4 6242: 6242: # 59 "/usr/include/c++/8/list" 3 6242: 6242: 6242: 6242: 6242: # 1 "/usr/include/c++/8/bits/stl_list.h" 1 3 6242: # 67 "/usr/include/c++/8/bits/stl_list.h" 3 6242: namespace std __attribute__ ((__visibility__ ("default"))) 6242: { 6242: 6242: 6242: namespace __detail 6242: { 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: struct _List_node_base 6242: { 6242: _List_node_base* _M_next; 6242: _List_node_base* _M_prev; 6242: 6242: static void 6242: swap(_List_node_base& __x, _List_node_base& __y) noexcept; 6242: 6242: void 6242: _M_transfer(_List_node_base* const __first, 6242: _List_node_base* const __last) noexcept; 6242: 6242: void 6242: _M_reverse() noexcept; 6242: 6242: void 6242: _M_hook(_List_node_base* const __position) noexcept; 6242: 6242: void 6242: _M_unhook() noexcept; 6242: }; 6242: 6242: 6242: struct _List_node_header : public _List_node_base 6242: { 6242: 6242: std::size_t _M_size; 6242: 6242: 6242: _List_node_header() noexcept 6242: { _M_init(); } 6242: 6242: 6242: _List_node_header(_List_node_header&& __x) noexcept 6242: : _List_node_base{ __x._M_next, __x._M_prev } 6242: 6242: , _M_size(__x._M_size) 6242: 6242: { 6242: if (__x._M_base()->_M_next == __x._M_base()) 6242: this->_M_next = this->_M_prev = this; 6242: else 6242: { 6242: this->_M_next->_M_prev = this->_M_prev->_M_next = this->_M_base(); 6242: __x._M_init(); 6242: } 6242: } 6242: 6242: void 6242: _M_move_nodes(_List_node_header&& __x) 6242: { 6242: _List_node_base* const __xnode = __x._M_base(); 6242: if (__xnode->_M_next == __xnode) 6242: _M_init(); 6242: else 6242: { 6242: _List_node_base* const __node = this->_M_base(); 6242: __node->_M_next = __xnode->_M_next; 6242: __node->_M_prev = __xnode->_M_prev; 6242: __node->_M_next->_M_prev = __node->_M_prev->_M_next = __node; 6242: 6242: _M_size = __x._M_size; 6242: 6242: __x._M_init(); 6242: } 6242: } 6242: 6242: 6242: void 6242: _M_init() noexcept 6242: { 6242: this->_M_next = this->_M_prev = this; 6242: 6242: this->_M_size = 0; 6242: 6242: } 6242: 6242: private: 6242: _List_node_base* _M_base() { return this; } 6242: }; 6242: } 6242: 6242: 6242: 6242: 6242: template 6242: struct _List_node : public __detail::_List_node_base 6242: { 6242: 6242: __gnu_cxx::__aligned_membuf<_Tp> _M_storage; 6242: _Tp* _M_valptr() { return _M_storage._M_ptr(); } 6242: _Tp const* _M_valptr() const { return _M_storage._M_ptr(); } 6242: 6242: 6242: 6242: 6242: 6242: }; 6242: 6242: 6242: 6242: 6242: 6242: 6242: template 6242: struct _List_iterator 6242: { 6242: typedef _List_iterator<_Tp> _Self; 6242: typedef _List_node<_Tp> _Node; 6242: 6242: typedef ptrdiff_t difference_type; 6242: typedef std::bidirectional_iterator_tag iterator_category; 6242: typedef _Tp value_type; 6242: typedef _Tp* pointer; 6242: typedef _Tp& reference; 6242: 6242: _List_iterator() noexcept 6242: : _M_node() { } 6242: 6242: explicit 6242: _List_iterator(__detail::_List_node_base* __x) noexcept 6242: : _M_node(__x) { } 6242: 6242: _Self 6242: _M_const_cast() const noexcept 6242: { return *this; } 6242: 6242: 6242: reference 6242: operator*() const noexcept 6242: { return *static_cast<_Node*>(_M_node)->_M_valptr(); } 6242: 6242: pointer 6242: operator->() const noexcept 6242: { return static_cast<_Node*>(_M_node)->_M_valptr(); } 6242: 6242: _Self& 6242: operator++() noexcept 6242: { 6242: _M_node = _M_node->_M_next; 6242: return *this; 6242: } 6242: 6242: _Self 6242: operator++(int) noexcept 6242: { 6242: _Self __tmp = *this; 6242: _M_node = _M_node->_M_next; 6242: return __tmp; 6242: } 6242: 6242: _Self& 6242: operator--() noexcept 6242: { 6242: _M_node = _M_node->_M_prev; 6242: return *this; 6242: } 6242: 6242: _Self 6242: operator--(int) noexcept 6242: { 6242: _Self __tmp = *this; 6242: _M_node = _M_node->_M_prev; 6242: return __tmp; 6242: } 6242: 6242: bool 6242: operator==(const _Self& __x) const noexcept 6242: { return _M_node == __x._M_node; } 6242: 6242: bool 6242: operator!=(const _Self& __x) const noexcept 6242: { return _M_node != __x._M_node; } 6242: 6242: 6242: __detail::_List_node_base* _M_node; 6242: }; 6242: 6242: 6242: 6242: 6242: 6242: 6242: template 6242: struct _List_const_iterator 6242: { 6242: typedef _List_const_iterator<_Tp> _Self; 6242: typedef const _List_node<_Tp> _Node; 6242: typedef _List_iterator<_Tp> iterator; 6242: 6242: typedef ptrdiff_t difference_type; 6242: typedef std::bidirectional_iterator_tag iterator_category; 6242: typedef _Tp value_type; 6242: typedef const _Tp* pointer; 6242: typedef const _Tp& reference; 6242: 6242: _List_const_iterator() noexcept 6242: : _M_node() { } 6242: 6242: explicit 6242: _List_const_iterator(const __detail::_List_node_base* __x) 6242: noexcept 6242: : _M_node(__x) { } 6242: 6242: _List_const_iterator(const iterator& __x) noexcept 6242: : _M_node(__x._M_node) { } 6242: 6242: iterator 6242: _M_const_cast() const noexcept 6242: { return iterator(const_cast<__detail::_List_node_base*>(_M_node)); } 6242: 6242: 6242: reference 6242: operator*() const noexcept 6242: { return *static_cast<_Node*>(_M_node)->_M_valptr(); } 6242: 6242: pointer 6242: operator->() const noexcept 6242: { return static_cast<_Node*>(_M_node)->_M_valptr(); } 6242: 6242: _Self& 6242: operator++() noexcept 6242: { 6242: _M_node = _M_node->_M_next; 6242: return *this; 6242: } 6242: 6242: _Self 6242: operator++(int) noexcept 6242: { 6242: _Self __tmp = *this; 6242: _M_node = _M_node->_M_next; 6242: return __tmp; 6242: } 6242: 6242: _Self& 6242: operator--() noexcept 6242: { 6242: _M_node = _M_node->_M_prev; 6242: return *this; 6242: } 6242: 6242: _Self 6242: operator--(int) noexcept 6242: { 6242: _Self __tmp = *this; 6242: _M_node = _M_node->_M_prev; 6242: return __tmp; 6242: } 6242: 6242: bool 6242: operator==(const _Self& __x) const noexcept 6242: { return _M_node == __x._M_node; } 6242: 6242: bool 6242: operator!=(const _Self& __x) const noexcept 6242: { return _M_node != __x._M_node; } 6242: 6242: 6242: const __detail::_List_node_base* _M_node; 6242: }; 6242: 6242: template 6242: inline bool 6242: operator==(const _List_iterator<_Val>& __x, 6242: const _List_const_iterator<_Val>& __y) noexcept 6242: { return __x._M_node == __y._M_node; } 6242: 6242: template 6242: inline bool 6242: operator!=(const _List_iterator<_Val>& __x, 6242: const _List_const_iterator<_Val>& __y) noexcept 6242: { return __x._M_node != __y._M_node; } 6242: 6242: namespace __cxx11 { 6242: 6242: template 6242: class _List_base 6242: { 6242: protected: 6242: typedef typename __gnu_cxx::__alloc_traits<_Alloc>::template 6242: rebind<_Tp>::other _Tp_alloc_type; 6242: typedef __gnu_cxx::__alloc_traits<_Tp_alloc_type> _Tp_alloc_traits; 6242: typedef typename _Tp_alloc_traits::template 6242: rebind<_List_node<_Tp> >::other _Node_alloc_type; 6242: typedef __gnu_cxx::__alloc_traits<_Node_alloc_type> _Node_alloc_traits; 6242: 6242: 6242: static size_t 6242: _S_distance(const __detail::_List_node_base* __first, 6242: const __detail::_List_node_base* __last) 6242: { 6242: size_t __n = 0; 6242: while (__first != __last) 6242: { 6242: __first = __first->_M_next; 6242: ++__n; 6242: } 6242: return __n; 6242: } 6242: 6242: 6242: struct _List_impl 6242: : public _Node_alloc_type 6242: { 6242: __detail::_List_node_header _M_node; 6242: 6242: _List_impl() noexcept(noexcept(_Node_alloc_type())) 6242: : _Node_alloc_type() 6242: { } 6242: 6242: _List_impl(const _Node_alloc_type& __a) noexcept 6242: : _Node_alloc_type(__a) 6242: { } 6242: 6242: 6242: _List_impl(_List_impl&&) = default; 6242: 6242: _List_impl(_Node_alloc_type&& __a, _List_impl&& __x) 6242: : _Node_alloc_type(std::move(__a)), _M_node(std::move(__x._M_node)) 6242: { } 6242: 6242: _List_impl(_Node_alloc_type&& __a) noexcept 6242: : _Node_alloc_type(std::move(__a)) 6242: { } 6242: 6242: }; 6242: 6242: _List_impl _M_impl; 6242: 6242: 6242: size_t _M_get_size() const { return _M_impl._M_node._M_size; } 6242: 6242: void _M_set_size(size_t __n) { _M_impl._M_node._M_size = __n; } 6242: 6242: void _M_inc_size(size_t __n) { _M_impl._M_node._M_size += __n; } 6242: 6242: void _M_dec_size(size_t __n) { _M_impl._M_node._M_size -= __n; } 6242: 6242: 6242: size_t 6242: _M_distance(const __detail::_List_node_base* __first, 6242: const __detail::_List_node_base* __last) const 6242: { return _S_distance(__first, __last); } 6242: 6242: 6242: size_t _M_node_count() const { return _M_get_size(); } 6242: # 447 "/usr/include/c++/8/bits/stl_list.h" 3 6242: typename _Node_alloc_traits::pointer 6242: _M_get_node() 6242: { return _Node_alloc_traits::allocate(_M_impl, 1); } 6242: 6242: void 6242: _M_put_node(typename _Node_alloc_traits::pointer __p) noexcept 6242: { _Node_alloc_traits::deallocate(_M_impl, __p, 1); } 6242: 6242: public: 6242: typedef _Alloc allocator_type; 6242: 6242: _Node_alloc_type& 6242: _M_get_Node_allocator() noexcept 6242: { return _M_impl; } 6242: 6242: const _Node_alloc_type& 6242: _M_get_Node_allocator() const noexcept 6242: { return _M_impl; } 6242: 6242: 6242: _List_base() = default; 6242: 6242: 6242: 6242: 6242: _List_base(const _Node_alloc_type& __a) noexcept 6242: : _M_impl(__a) 6242: { } 6242: 6242: 6242: _List_base(_List_base&&) = default; 6242: 6242: 6242: _List_base(_List_base&& __x, _Node_alloc_type&& __a) 6242: : _M_impl(std::move(__a)) 6242: { 6242: if (__x._M_get_Node_allocator() == _M_get_Node_allocator()) 6242: _M_move_nodes(std::move(__x)); 6242: 6242: } 6242: 6242: 6242: 6242: _List_base(_Node_alloc_type&& __a, _List_base&& __x) 6242: : _M_impl(std::move(__a), std::move(__x._M_impl)) 6242: { } 6242: 6242: 6242: _List_base(_Node_alloc_type&& __a) 6242: : _M_impl(std::move(__a)) 6242: { } 6242: 6242: void 6242: _M_move_nodes(_List_base&& __x) 6242: { _M_impl._M_node._M_move_nodes(std::move(__x._M_impl._M_node)); } 6242: 6242: 6242: 6242: ~_List_base() noexcept 6242: { _M_clear(); } 6242: 6242: void 6242: _M_clear() noexcept; 6242: 6242: void 6242: _M_init() noexcept 6242: { this->_M_impl._M_node._M_init(); } 6242: }; 6242: # 562 "/usr/include/c++/8/bits/stl_list.h" 3 6242: template > 6242: class list : protected _List_base<_Tp, _Alloc> 6242: { 6242: # 575 "/usr/include/c++/8/bits/stl_list.h" 3 6242: static_assert(is_same::type, _Tp>::value, 6242: "std::list must have a non-const, non-volatile value_type"); 6242: 6242: 6242: 6242: 6242: 6242: 6242: typedef _List_base<_Tp, _Alloc> _Base; 6242: typedef typename _Base::_Tp_alloc_type _Tp_alloc_type; 6242: typedef typename _Base::_Tp_alloc_traits _Tp_alloc_traits; 6242: typedef typename _Base::_Node_alloc_type _Node_alloc_type; 6242: typedef typename _Base::_Node_alloc_traits _Node_alloc_traits; 6242: 6242: public: 6242: typedef _Tp value_type; 6242: typedef typename _Tp_alloc_traits::pointer pointer; 6242: typedef typename _Tp_alloc_traits::const_pointer const_pointer; 6242: typedef typename _Tp_alloc_traits::reference reference; 6242: typedef typename _Tp_alloc_traits::const_reference const_reference; 6242: typedef _List_iterator<_Tp> iterator; 6242: typedef _List_const_iterator<_Tp> const_iterator; 6242: typedef std::reverse_iterator const_reverse_iterator; 6242: typedef std::reverse_iterator reverse_iterator; 6242: typedef size_t size_type; 6242: typedef ptrdiff_t difference_type; 6242: typedef _Alloc allocator_type; 6242: 6242: protected: 6242: 6242: 6242: typedef _List_node<_Tp> _Node; 6242: 6242: using _Base::_M_impl; 6242: using _Base::_M_put_node; 6242: using _Base::_M_get_node; 6242: using _Base::_M_get_Node_allocator; 6242: # 637 "/usr/include/c++/8/bits/stl_list.h" 3 6242: template 6242: _Node* 6242: _M_create_node(_Args&&... __args) 6242: { 6242: auto __p = this->_M_get_node(); 6242: auto& __alloc = _M_get_Node_allocator(); 6242: __allocated_ptr<_Node_alloc_type> __guard{__alloc, __p}; 6242: _Node_alloc_traits::construct(__alloc, __p->_M_valptr(), 6242: std::forward<_Args>(__args)...); 6242: __guard = nullptr; 6242: return __p; 6242: } 6242: 6242: 6242: 6242: static size_t 6242: _S_distance(const_iterator __first, const_iterator __last) 6242: { return std::distance(__first, __last); } 6242: 6242: 6242: size_t 6242: _M_node_count() const 6242: { return this->_M_get_size(); } 6242: # 672 "/usr/include/c++/8/bits/stl_list.h" 3 6242: public: 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: list() = default; 6242: # 689 "/usr/include/c++/8/bits/stl_list.h" 3 6242: explicit 6242: list(const allocator_type& __a) noexcept 6242: : _Base(_Node_alloc_type(__a)) { } 6242: # 702 "/usr/include/c++/8/bits/stl_list.h" 3 6242: explicit 6242: list(size_type __n, const allocator_type& __a = allocator_type()) 6242: : _Base(_Node_alloc_type(__a)) 6242: { _M_default_initialize(__n); } 6242: # 715 "/usr/include/c++/8/bits/stl_list.h" 3 6242: list(size_type __n, const value_type& __value, 6242: const allocator_type& __a = allocator_type()) 6242: : _Base(_Node_alloc_type(__a)) 6242: { _M_fill_initialize(__n, __value); } 6242: # 742 "/usr/include/c++/8/bits/stl_list.h" 3 6242: list(const list& __x) 6242: : _Base(_Node_alloc_traits:: 6242: _S_select_on_copy(__x._M_get_Node_allocator())) 6242: { _M_initialize_dispatch(__x.begin(), __x.end(), __false_type()); } 6242: # 755 "/usr/include/c++/8/bits/stl_list.h" 3 6242: list(list&&) = default; 6242: # 765 "/usr/include/c++/8/bits/stl_list.h" 3 6242: list(initializer_list __l, 6242: const allocator_type& __a = allocator_type()) 6242: : _Base(_Node_alloc_type(__a)) 6242: { _M_initialize_dispatch(__l.begin(), __l.end(), __false_type()); } 6242: 6242: list(const list& __x, const allocator_type& __a) 6242: : _Base(_Node_alloc_type(__a)) 6242: { _M_initialize_dispatch(__x.begin(), __x.end(), __false_type()); } 6242: 6242: private: 6242: list(list&& __x, const allocator_type& __a, true_type) noexcept 6242: : _Base(_Node_alloc_type(__a), std::move(__x)) 6242: { } 6242: 6242: list(list&& __x, const allocator_type& __a, false_type) 6242: : _Base(_Node_alloc_type(__a)) 6242: { 6242: if (__x._M_get_Node_allocator() == this->_M_get_Node_allocator()) 6242: this->_M_move_nodes(std::move(__x)); 6242: else 6242: insert(begin(), std::__make_move_if_noexcept_iterator(__x.begin()), 6242: std::__make_move_if_noexcept_iterator(__x.end())); 6242: } 6242: 6242: public: 6242: list(list&& __x, const allocator_type& __a) 6242: noexcept(_Node_alloc_traits::_S_always_equal()) 6242: : list(std::move(__x), __a, 6242: typename _Node_alloc_traits::is_always_equal{}) 6242: { } 6242: # 808 "/usr/include/c++/8/bits/stl_list.h" 3 6242: template> 6242: list(_InputIterator __first, _InputIterator __last, 6242: const allocator_type& __a = allocator_type()) 6242: : _Base(_Node_alloc_type(__a)) 6242: { _M_initialize_dispatch(__first, __last, __false_type()); } 6242: # 834 "/usr/include/c++/8/bits/stl_list.h" 3 6242: ~list() = default; 6242: # 845 "/usr/include/c++/8/bits/stl_list.h" 3 6242: list& 6242: operator=(const list& __x); 6242: # 859 "/usr/include/c++/8/bits/stl_list.h" 3 6242: list& 6242: operator=(list&& __x) 6242: noexcept(_Node_alloc_traits::_S_nothrow_move()) 6242: { 6242: constexpr bool __move_storage = 6242: _Node_alloc_traits::_S_propagate_on_move_assign() 6242: || _Node_alloc_traits::_S_always_equal(); 6242: _M_move_assign(std::move(__x), __bool_constant<__move_storage>()); 6242: return *this; 6242: } 6242: # 877 "/usr/include/c++/8/bits/stl_list.h" 3 6242: list& 6242: operator=(initializer_list __l) 6242: { 6242: this->assign(__l.begin(), __l.end()); 6242: return *this; 6242: } 6242: # 895 "/usr/include/c++/8/bits/stl_list.h" 3 6242: void 6242: assign(size_type __n, const value_type& __val) 6242: { _M_fill_assign(__n, __val); } 6242: # 912 "/usr/include/c++/8/bits/stl_list.h" 3 6242: template> 6242: void 6242: assign(_InputIterator __first, _InputIterator __last) 6242: { _M_assign_dispatch(__first, __last, __false_type()); } 6242: # 936 "/usr/include/c++/8/bits/stl_list.h" 3 6242: void 6242: assign(initializer_list __l) 6242: { this->_M_assign_dispatch(__l.begin(), __l.end(), __false_type()); } 6242: 6242: 6242: 6242: allocator_type 6242: get_allocator() const noexcept 6242: { return allocator_type(_Base::_M_get_Node_allocator()); } 6242: 6242: 6242: 6242: 6242: 6242: 6242: iterator 6242: begin() noexcept 6242: { return iterator(this->_M_impl._M_node._M_next); } 6242: 6242: 6242: 6242: 6242: 6242: 6242: const_iterator 6242: begin() const noexcept 6242: { return const_iterator(this->_M_impl._M_node._M_next); } 6242: 6242: 6242: 6242: 6242: 6242: 6242: iterator 6242: end() noexcept 6242: { return iterator(&this->_M_impl._M_node); } 6242: 6242: 6242: 6242: 6242: 6242: 6242: const_iterator 6242: end() const noexcept 6242: { return const_iterator(&this->_M_impl._M_node); } 6242: 6242: 6242: 6242: 6242: 6242: 6242: reverse_iterator 6242: rbegin() noexcept 6242: { return reverse_iterator(end()); } 6242: 6242: 6242: 6242: 6242: 6242: 6242: const_reverse_iterator 6242: rbegin() const noexcept 6242: { return const_reverse_iterator(end()); } 6242: 6242: 6242: 6242: 6242: 6242: 6242: reverse_iterator 6242: rend() noexcept 6242: { return reverse_iterator(begin()); } 6242: 6242: 6242: 6242: 6242: 6242: 6242: const_reverse_iterator 6242: rend() const noexcept 6242: { return const_reverse_iterator(begin()); } 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: const_iterator 6242: cbegin() const noexcept 6242: { return const_iterator(this->_M_impl._M_node._M_next); } 6242: 6242: 6242: 6242: 6242: 6242: 6242: const_iterator 6242: cend() const noexcept 6242: { return const_iterator(&this->_M_impl._M_node); } 6242: 6242: 6242: 6242: 6242: 6242: 6242: const_reverse_iterator 6242: crbegin() const noexcept 6242: { return const_reverse_iterator(end()); } 6242: 6242: 6242: 6242: 6242: 6242: 6242: const_reverse_iterator 6242: crend() const noexcept 6242: { return const_reverse_iterator(begin()); } 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: bool 6242: empty() const noexcept 6242: { return this->_M_impl._M_node._M_next == &this->_M_impl._M_node; } 6242: 6242: 6242: size_type 6242: size() const noexcept 6242: { return _M_node_count(); } 6242: 6242: 6242: size_type 6242: max_size() const noexcept 6242: { return _Node_alloc_traits::max_size(_M_get_Node_allocator()); } 6242: # 1085 "/usr/include/c++/8/bits/stl_list.h" 3 6242: void 6242: resize(size_type __new_size); 6242: # 1098 "/usr/include/c++/8/bits/stl_list.h" 3 6242: void 6242: resize(size_type __new_size, const value_type& __x); 6242: # 1120 "/usr/include/c++/8/bits/stl_list.h" 3 6242: reference 6242: front() noexcept 6242: { return *begin(); } 6242: 6242: 6242: 6242: 6242: 6242: const_reference 6242: front() const noexcept 6242: { return *begin(); } 6242: 6242: 6242: 6242: 6242: 6242: reference 6242: back() noexcept 6242: { 6242: iterator __tmp = end(); 6242: --__tmp; 6242: return *__tmp; 6242: } 6242: 6242: 6242: 6242: 6242: 6242: const_reference 6242: back() const noexcept 6242: { 6242: const_iterator __tmp = end(); 6242: --__tmp; 6242: return *__tmp; 6242: } 6242: # 1167 "/usr/include/c++/8/bits/stl_list.h" 3 6242: void 6242: push_front(const value_type& __x) 6242: { this->_M_insert(begin(), __x); } 6242: 6242: 6242: void 6242: push_front(value_type&& __x) 6242: { this->_M_insert(begin(), std::move(__x)); } 6242: 6242: template 6242: 6242: 6242: 6242: void 6242: 6242: emplace_front(_Args&&... __args) 6242: { 6242: this->_M_insert(begin(), std::forward<_Args>(__args)...); 6242: 6242: 6242: 6242: } 6242: # 1203 "/usr/include/c++/8/bits/stl_list.h" 3 6242: void 6242: pop_front() noexcept 6242: { this->_M_erase(begin()); } 6242: # 1217 "/usr/include/c++/8/bits/stl_list.h" 3 6242: void 6242: push_back(const value_type& __x) 6242: { this->_M_insert(end(), __x); } 6242: 6242: 6242: void 6242: push_back(value_type&& __x) 6242: { this->_M_insert(end(), std::move(__x)); } 6242: 6242: template 6242: 6242: 6242: 6242: void 6242: 6242: emplace_back(_Args&&... __args) 6242: { 6242: this->_M_insert(end(), std::forward<_Args>(__args)...); 6242: 6242: 6242: 6242: } 6242: # 1252 "/usr/include/c++/8/bits/stl_list.h" 3 6242: void 6242: pop_back() noexcept 6242: { this->_M_erase(iterator(this->_M_impl._M_node._M_prev)); } 6242: # 1269 "/usr/include/c++/8/bits/stl_list.h" 3 6242: template 6242: iterator 6242: emplace(const_iterator __position, _Args&&... __args); 6242: # 1284 "/usr/include/c++/8/bits/stl_list.h" 3 6242: iterator 6242: insert(const_iterator __position, const value_type& __x); 6242: # 1314 "/usr/include/c++/8/bits/stl_list.h" 3 6242: iterator 6242: insert(const_iterator __position, value_type&& __x) 6242: { return emplace(__position, std::move(__x)); } 6242: # 1333 "/usr/include/c++/8/bits/stl_list.h" 3 6242: iterator 6242: insert(const_iterator __p, initializer_list __l) 6242: { return this->insert(__p, __l.begin(), __l.end()); } 6242: # 1353 "/usr/include/c++/8/bits/stl_list.h" 3 6242: iterator 6242: insert(const_iterator __position, size_type __n, const value_type& __x); 6242: # 1392 "/usr/include/c++/8/bits/stl_list.h" 3 6242: template> 6242: iterator 6242: insert(const_iterator __position, _InputIterator __first, 6242: _InputIterator __last); 6242: # 1436 "/usr/include/c++/8/bits/stl_list.h" 3 6242: iterator 6242: 6242: erase(const_iterator __position) noexcept; 6242: # 1461 "/usr/include/c++/8/bits/stl_list.h" 3 6242: iterator 6242: 6242: erase(const_iterator __first, const_iterator __last) noexcept 6242: 6242: 6242: 6242: { 6242: while (__first != __last) 6242: __first = erase(__first); 6242: return __last._M_const_cast(); 6242: } 6242: # 1484 "/usr/include/c++/8/bits/stl_list.h" 3 6242: void 6242: swap(list& __x) noexcept 6242: { 6242: __detail::_List_node_base::swap(this->_M_impl._M_node, 6242: __x._M_impl._M_node); 6242: 6242: size_t __xsize = __x._M_get_size(); 6242: __x._M_set_size(this->_M_get_size()); 6242: this->_M_set_size(__xsize); 6242: 6242: _Node_alloc_traits::_S_on_swap(this->_M_get_Node_allocator(), 6242: __x._M_get_Node_allocator()); 6242: } 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: void 6242: clear() noexcept 6242: { 6242: _Base::_M_clear(); 6242: _Base::_M_init(); 6242: } 6242: # 1523 "/usr/include/c++/8/bits/stl_list.h" 3 6242: void 6242: 6242: splice(const_iterator __position, list&& __x) noexcept 6242: 6242: 6242: 6242: { 6242: if (!__x.empty()) 6242: { 6242: _M_check_equal_allocators(__x); 6242: 6242: this->_M_transfer(__position._M_const_cast(), 6242: __x.begin(), __x.end()); 6242: 6242: this->_M_inc_size(__x._M_get_size()); 6242: __x._M_set_size(0); 6242: } 6242: } 6242: 6242: 6242: void 6242: splice(const_iterator __position, list& __x) noexcept 6242: { splice(__position, std::move(__x)); } 6242: # 1559 "/usr/include/c++/8/bits/stl_list.h" 3 6242: void 6242: splice(const_iterator __position, list&& __x, const_iterator __i) noexcept 6242: # 1574 "/usr/include/c++/8/bits/stl_list.h" 3 6242: { 6242: iterator __j = __i._M_const_cast(); 6242: ++__j; 6242: if (__position == __i || __position == __j) 6242: return; 6242: 6242: if (this != std::__addressof(__x)) 6242: _M_check_equal_allocators(__x); 6242: 6242: this->_M_transfer(__position._M_const_cast(), 6242: __i._M_const_cast(), __j); 6242: 6242: this->_M_inc_size(1); 6242: __x._M_dec_size(1); 6242: } 6242: # 1601 "/usr/include/c++/8/bits/stl_list.h" 3 6242: void 6242: splice(const_iterator __position, list& __x, const_iterator __i) noexcept 6242: { splice(__position, std::move(__x), __i); } 6242: # 1620 "/usr/include/c++/8/bits/stl_list.h" 3 6242: void 6242: splice(const_iterator __position, list&& __x, const_iterator __first, 6242: const_iterator __last) noexcept 6242: # 1640 "/usr/include/c++/8/bits/stl_list.h" 3 6242: { 6242: if (__first != __last) 6242: { 6242: if (this != std::__addressof(__x)) 6242: _M_check_equal_allocators(__x); 6242: 6242: size_t __n = _S_distance(__first, __last); 6242: this->_M_inc_size(__n); 6242: __x._M_dec_size(__n); 6242: 6242: this->_M_transfer(__position._M_const_cast(), 6242: __first._M_const_cast(), 6242: __last._M_const_cast()); 6242: } 6242: } 6242: # 1670 "/usr/include/c++/8/bits/stl_list.h" 3 6242: void 6242: splice(const_iterator __position, list& __x, const_iterator __first, 6242: const_iterator __last) noexcept 6242: { splice(__position, std::move(__x), __first, __last); } 6242: # 1687 "/usr/include/c++/8/bits/stl_list.h" 3 6242: void 6242: remove(const _Tp& __value); 6242: # 1701 "/usr/include/c++/8/bits/stl_list.h" 3 6242: template 6242: void 6242: remove_if(_Predicate); 6242: # 1715 "/usr/include/c++/8/bits/stl_list.h" 3 6242: void 6242: unique(); 6242: # 1730 "/usr/include/c++/8/bits/stl_list.h" 3 6242: template 6242: void 6242: unique(_BinaryPredicate); 6242: # 1744 "/usr/include/c++/8/bits/stl_list.h" 3 6242: void 6242: merge(list&& __x); 6242: 6242: void 6242: merge(list& __x) 6242: { merge(std::move(__x)); } 6242: # 1769 "/usr/include/c++/8/bits/stl_list.h" 3 6242: template 6242: void 6242: merge(list&& __x, _StrictWeakOrdering __comp); 6242: 6242: template 6242: void 6242: merge(list& __x, _StrictWeakOrdering __comp) 6242: { merge(std::move(__x), __comp); } 6242: # 1788 "/usr/include/c++/8/bits/stl_list.h" 3 6242: void 6242: reverse() noexcept 6242: { this->_M_impl._M_node._M_reverse(); } 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: void 6242: sort(); 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: template 6242: void 6242: sort(_StrictWeakOrdering); 6242: 6242: protected: 6242: 6242: 6242: 6242: 6242: 6242: 6242: template 6242: void 6242: _M_initialize_dispatch(_Integer __n, _Integer __x, __true_type) 6242: { _M_fill_initialize(static_cast(__n), __x); } 6242: 6242: 6242: template 6242: void 6242: _M_initialize_dispatch(_InputIterator __first, _InputIterator __last, 6242: __false_type) 6242: { 6242: for (; __first != __last; ++__first) 6242: 6242: emplace_back(*__first); 6242: 6242: 6242: 6242: } 6242: 6242: 6242: 6242: void 6242: _M_fill_initialize(size_type __n, const value_type& __x) 6242: { 6242: for (; __n; --__n) 6242: push_back(__x); 6242: } 6242: 6242: 6242: 6242: void 6242: _M_default_initialize(size_type __n) 6242: { 6242: for (; __n; --__n) 6242: emplace_back(); 6242: } 6242: 6242: 6242: void 6242: _M_default_append(size_type __n); 6242: # 1866 "/usr/include/c++/8/bits/stl_list.h" 3 6242: template 6242: void 6242: _M_assign_dispatch(_Integer __n, _Integer __val, __true_type) 6242: { _M_fill_assign(__n, __val); } 6242: 6242: 6242: template 6242: void 6242: _M_assign_dispatch(_InputIterator __first, _InputIterator __last, 6242: __false_type); 6242: 6242: 6242: 6242: void 6242: _M_fill_assign(size_type __n, const value_type& __val); 6242: 6242: 6242: 6242: void 6242: _M_transfer(iterator __position, iterator __first, iterator __last) 6242: { __position._M_node->_M_transfer(__first._M_node, __last._M_node); } 6242: # 1898 "/usr/include/c++/8/bits/stl_list.h" 3 6242: template 6242: void 6242: _M_insert(iterator __position, _Args&&... __args) 6242: { 6242: _Node* __tmp = _M_create_node(std::forward<_Args>(__args)...); 6242: __tmp->_M_hook(__position._M_node); 6242: this->_M_inc_size(1); 6242: } 6242: 6242: 6242: 6242: void 6242: _M_erase(iterator __position) noexcept 6242: { 6242: this->_M_dec_size(1); 6242: __position._M_node->_M_unhook(); 6242: _Node* __n = static_cast<_Node*>(__position._M_node); 6242: 6242: _Node_alloc_traits::destroy(_M_get_Node_allocator(), __n->_M_valptr()); 6242: 6242: 6242: 6242: 6242: _M_put_node(__n); 6242: } 6242: 6242: 6242: void 6242: _M_check_equal_allocators(list& __x) noexcept 6242: { 6242: if (std::__alloc_neq:: 6242: _S_do_it(_M_get_Node_allocator(), __x._M_get_Node_allocator())) 6242: __builtin_abort(); 6242: } 6242: 6242: 6242: const_iterator 6242: _M_resize_pos(size_type& __new_size) const; 6242: 6242: 6242: void 6242: _M_move_assign(list&& __x, true_type) noexcept 6242: { 6242: this->_M_clear(); 6242: this->_M_move_nodes(std::move(__x)); 6242: std::__alloc_on_move(this->_M_get_Node_allocator(), 6242: __x._M_get_Node_allocator()); 6242: } 6242: 6242: void 6242: _M_move_assign(list&& __x, false_type) 6242: { 6242: if (__x._M_get_Node_allocator() == this->_M_get_Node_allocator()) 6242: _M_move_assign(std::move(__x), true_type{}); 6242: else 6242: 6242: 6242: _M_assign_dispatch(std::__make_move_if_noexcept_iterator(__x.begin()), 6242: std::__make_move_if_noexcept_iterator(__x.end()), 6242: __false_type{}); 6242: } 6242: 6242: }; 6242: # 1972 "/usr/include/c++/8/bits/stl_list.h" 3 6242: } 6242: # 1984 "/usr/include/c++/8/bits/stl_list.h" 3 6242: template 6242: inline bool 6242: operator==(const list<_Tp, _Alloc>& __x, const list<_Tp, _Alloc>& __y) 6242: { 6242: 6242: if (__x.size() != __y.size()) 6242: return false; 6242: 6242: 6242: typedef typename list<_Tp, _Alloc>::const_iterator const_iterator; 6242: const_iterator __end1 = __x.end(); 6242: const_iterator __end2 = __y.end(); 6242: 6242: const_iterator __i1 = __x.begin(); 6242: const_iterator __i2 = __y.begin(); 6242: while (__i1 != __end1 && __i2 != __end2 && *__i1 == *__i2) 6242: { 6242: ++__i1; 6242: ++__i2; 6242: } 6242: return __i1 == __end1 && __i2 == __end2; 6242: } 6242: # 2018 "/usr/include/c++/8/bits/stl_list.h" 3 6242: template 6242: inline bool 6242: operator<(const list<_Tp, _Alloc>& __x, const list<_Tp, _Alloc>& __y) 6242: { return std::lexicographical_compare(__x.begin(), __x.end(), 6242: __y.begin(), __y.end()); } 6242: 6242: 6242: template 6242: inline bool 6242: operator!=(const list<_Tp, _Alloc>& __x, const list<_Tp, _Alloc>& __y) 6242: { return !(__x == __y); } 6242: 6242: 6242: template 6242: inline bool 6242: operator>(const list<_Tp, _Alloc>& __x, const list<_Tp, _Alloc>& __y) 6242: { return __y < __x; } 6242: 6242: 6242: template 6242: inline bool 6242: operator<=(const list<_Tp, _Alloc>& __x, const list<_Tp, _Alloc>& __y) 6242: { return !(__y < __x); } 6242: 6242: 6242: template 6242: inline bool 6242: operator>=(const list<_Tp, _Alloc>& __x, const list<_Tp, _Alloc>& __y) 6242: { return !(__x < __y); } 6242: 6242: 6242: template 6242: inline void 6242: swap(list<_Tp, _Alloc>& __x, list<_Tp, _Alloc>& __y) 6242: noexcept(noexcept(__x.swap(__y))) 6242: { __x.swap(__y); } 6242: 6242: 6242: 6242: 6242: 6242: 6242: template 6242: inline ptrdiff_t 6242: __distance(std::_List_iterator<_Tp> __first, 6242: std::_List_iterator<_Tp> __last, 6242: input_iterator_tag __tag) 6242: { 6242: typedef std::_List_const_iterator<_Tp> _CIter; 6242: return std::__distance(_CIter(__first), _CIter(__last), __tag); 6242: } 6242: 6242: template 6242: inline ptrdiff_t 6242: __distance(std::_List_const_iterator<_Tp> __first, 6242: std::_List_const_iterator<_Tp> __last, 6242: input_iterator_tag) 6242: { 6242: typedef __detail::_List_node_header _Sentinel; 6242: std::_List_const_iterator<_Tp> __beyond = __last; 6242: ++__beyond; 6242: const bool __whole = __first == __beyond; 6242: if (__builtin_constant_p (__whole) && __whole) 6242: return static_cast(__last._M_node)->_M_size; 6242: 6242: ptrdiff_t __n = 0; 6242: while (__first != __last) 6242: { 6242: ++__first; 6242: ++__n; 6242: } 6242: return __n; 6242: } 6242: 6242: 6242: 6242: } 6242: # 64 "/usr/include/c++/8/list" 2 3 6242: # 1 "/usr/include/c++/8/bits/list.tcc" 1 3 6242: # 59 "/usr/include/c++/8/bits/list.tcc" 3 6242: namespace std __attribute__ ((__visibility__ ("default"))) 6242: { 6242: 6242: 6242: 6242: template 6242: void 6242: _List_base<_Tp, _Alloc>:: 6242: _M_clear() noexcept 6242: { 6242: typedef _List_node<_Tp> _Node; 6242: __detail::_List_node_base* __cur = _M_impl._M_node._M_next; 6242: while (__cur != &_M_impl._M_node) 6242: { 6242: _Node* __tmp = static_cast<_Node*>(__cur); 6242: __cur = __tmp->_M_next; 6242: _Tp* __val = __tmp->_M_valptr(); 6242: 6242: _Node_alloc_traits::destroy(_M_get_Node_allocator(), __val); 6242: 6242: 6242: 6242: _M_put_node(__tmp); 6242: } 6242: } 6242: 6242: 6242: template 6242: template 6242: typename list<_Tp, _Alloc>::iterator 6242: list<_Tp, _Alloc>:: 6242: emplace(const_iterator __position, _Args&&... __args) 6242: { 6242: _Node* __tmp = _M_create_node(std::forward<_Args>(__args)...); 6242: __tmp->_M_hook(__position._M_const_cast()._M_node); 6242: this->_M_inc_size(1); 6242: return iterator(__tmp); 6242: } 6242: 6242: 6242: template 6242: typename list<_Tp, _Alloc>::iterator 6242: list<_Tp, _Alloc>:: 6242: 6242: insert(const_iterator __position, const value_type& __x) 6242: 6242: 6242: 6242: { 6242: _Node* __tmp = _M_create_node(__x); 6242: __tmp->_M_hook(__position._M_const_cast()._M_node); 6242: this->_M_inc_size(1); 6242: return iterator(__tmp); 6242: } 6242: 6242: 6242: template 6242: typename list<_Tp, _Alloc>::iterator 6242: list<_Tp, _Alloc>:: 6242: insert(const_iterator __position, size_type __n, const value_type& __x) 6242: { 6242: if (__n) 6242: { 6242: list __tmp(__n, __x, get_allocator()); 6242: iterator __it = __tmp.begin(); 6242: splice(__position, __tmp); 6242: return __it; 6242: } 6242: return __position._M_const_cast(); 6242: } 6242: 6242: template 6242: template 6242: typename list<_Tp, _Alloc>::iterator 6242: list<_Tp, _Alloc>:: 6242: insert(const_iterator __position, _InputIterator __first, 6242: _InputIterator __last) 6242: { 6242: list __tmp(__first, __last, get_allocator()); 6242: if (!__tmp.empty()) 6242: { 6242: iterator __it = __tmp.begin(); 6242: splice(__position, __tmp); 6242: return __it; 6242: } 6242: return __position._M_const_cast(); 6242: } 6242: 6242: 6242: template 6242: typename list<_Tp, _Alloc>::iterator 6242: list<_Tp, _Alloc>:: 6242: 6242: erase(const_iterator __position) noexcept 6242: 6242: 6242: 6242: { 6242: iterator __ret = iterator(__position._M_node->_M_next); 6242: _M_erase(__position._M_const_cast()); 6242: return __ret; 6242: } 6242: # 173 "/usr/include/c++/8/bits/list.tcc" 3 6242: template 6242: typename list<_Tp, _Alloc>::const_iterator 6242: list<_Tp, _Alloc>:: 6242: _M_resize_pos(size_type& __new_size) const 6242: { 6242: const_iterator __i; 6242: 6242: const size_type __len = size(); 6242: if (__new_size < __len) 6242: { 6242: if (__new_size <= __len / 2) 6242: { 6242: __i = begin(); 6242: std::advance(__i, __new_size); 6242: } 6242: else 6242: { 6242: __i = end(); 6242: ptrdiff_t __num_erase = __len - __new_size; 6242: std::advance(__i, -__num_erase); 6242: } 6242: __new_size = 0; 6242: return __i; 6242: } 6242: else 6242: __i = end(); 6242: 6242: 6242: 6242: 6242: 6242: __new_size -= __len; 6242: return __i; 6242: } 6242: 6242: 6242: template 6242: void 6242: list<_Tp, _Alloc>:: 6242: _M_default_append(size_type __n) 6242: { 6242: size_type __i = 0; 6242: try 6242: { 6242: for (; __i < __n; ++__i) 6242: emplace_back(); 6242: } 6242: catch(...) 6242: { 6242: for (; __i; --__i) 6242: pop_back(); 6242: throw; 6242: } 6242: } 6242: 6242: template 6242: void 6242: list<_Tp, _Alloc>:: 6242: resize(size_type __new_size) 6242: { 6242: const_iterator __i = _M_resize_pos(__new_size); 6242: if (__new_size) 6242: _M_default_append(__new_size); 6242: else 6242: erase(__i, end()); 6242: } 6242: 6242: template 6242: void 6242: list<_Tp, _Alloc>:: 6242: resize(size_type __new_size, const value_type& __x) 6242: { 6242: const_iterator __i = _M_resize_pos(__new_size); 6242: if (__new_size) 6242: insert(end(), __new_size, __x); 6242: else 6242: erase(__i, end()); 6242: } 6242: # 265 "/usr/include/c++/8/bits/list.tcc" 3 6242: template 6242: list<_Tp, _Alloc>& 6242: list<_Tp, _Alloc>:: 6242: operator=(const list& __x) 6242: { 6242: if (this != std::__addressof(__x)) 6242: { 6242: 6242: if (_Node_alloc_traits::_S_propagate_on_copy_assign()) 6242: { 6242: auto& __this_alloc = this->_M_get_Node_allocator(); 6242: auto& __that_alloc = __x._M_get_Node_allocator(); 6242: if (!_Node_alloc_traits::_S_always_equal() 6242: && __this_alloc != __that_alloc) 6242: { 6242: 6242: clear(); 6242: } 6242: std::__alloc_on_copy(__this_alloc, __that_alloc); 6242: } 6242: 6242: _M_assign_dispatch(__x.begin(), __x.end(), __false_type()); 6242: } 6242: return *this; 6242: } 6242: 6242: template 6242: void 6242: list<_Tp, _Alloc>:: 6242: _M_fill_assign(size_type __n, const value_type& __val) 6242: { 6242: iterator __i = begin(); 6242: for (; __i != end() && __n > 0; ++__i, --__n) 6242: *__i = __val; 6242: if (__n > 0) 6242: insert(end(), __n, __val); 6242: else 6242: erase(__i, end()); 6242: } 6242: 6242: template 6242: template 6242: void 6242: list<_Tp, _Alloc>:: 6242: _M_assign_dispatch(_InputIterator __first2, _InputIterator __last2, 6242: __false_type) 6242: { 6242: iterator __first1 = begin(); 6242: iterator __last1 = end(); 6242: for (; __first1 != __last1 && __first2 != __last2; 6242: ++__first1, ++__first2) 6242: *__first1 = *__first2; 6242: if (__first2 == __last2) 6242: erase(__first1, __last1); 6242: else 6242: insert(__last1, __first2, __last2); 6242: } 6242: 6242: template 6242: void 6242: list<_Tp, _Alloc>:: 6242: remove(const value_type& __value) 6242: { 6242: iterator __first = begin(); 6242: iterator __last = end(); 6242: iterator __extra = __last; 6242: while (__first != __last) 6242: { 6242: iterator __next = __first; 6242: ++__next; 6242: if (*__first == __value) 6242: { 6242: 6242: 6242: 6242: if (std::__addressof(*__first) != std::__addressof(__value)) 6242: _M_erase(__first); 6242: else 6242: __extra = __first; 6242: } 6242: __first = __next; 6242: } 6242: if (__extra != __last) 6242: _M_erase(__extra); 6242: } 6242: 6242: template 6242: void 6242: list<_Tp, _Alloc>:: 6242: unique() 6242: { 6242: iterator __first = begin(); 6242: iterator __last = end(); 6242: if (__first == __last) 6242: return; 6242: iterator __next = __first; 6242: while (++__next != __last) 6242: { 6242: if (*__first == *__next) 6242: _M_erase(__next); 6242: else 6242: __first = __next; 6242: __next = __first; 6242: } 6242: } 6242: 6242: template 6242: void 6242: list<_Tp, _Alloc>:: 6242: 6242: merge(list&& __x) 6242: 6242: 6242: 6242: { 6242: 6242: 6242: if (this != std::__addressof(__x)) 6242: { 6242: _M_check_equal_allocators(__x); 6242: 6242: iterator __first1 = begin(); 6242: iterator __last1 = end(); 6242: iterator __first2 = __x.begin(); 6242: iterator __last2 = __x.end(); 6242: const size_t __orig_size = __x.size(); 6242: try { 6242: while (__first1 != __last1 && __first2 != __last2) 6242: if (*__first2 < *__first1) 6242: { 6242: iterator __next = __first2; 6242: _M_transfer(__first1, __first2, ++__next); 6242: __first2 = __next; 6242: } 6242: else 6242: ++__first1; 6242: if (__first2 != __last2) 6242: _M_transfer(__last1, __first2, __last2); 6242: 6242: this->_M_inc_size(__x._M_get_size()); 6242: __x._M_set_size(0); 6242: } 6242: catch(...) 6242: { 6242: const size_t __dist = std::distance(__first2, __last2); 6242: this->_M_inc_size(__orig_size - __dist); 6242: __x._M_set_size(__dist); 6242: throw; 6242: } 6242: } 6242: } 6242: 6242: template 6242: template 6242: void 6242: list<_Tp, _Alloc>:: 6242: 6242: merge(list&& __x, _StrictWeakOrdering __comp) 6242: 6242: 6242: 6242: { 6242: 6242: 6242: if (this != std::__addressof(__x)) 6242: { 6242: _M_check_equal_allocators(__x); 6242: 6242: iterator __first1 = begin(); 6242: iterator __last1 = end(); 6242: iterator __first2 = __x.begin(); 6242: iterator __last2 = __x.end(); 6242: const size_t __orig_size = __x.size(); 6242: try 6242: { 6242: while (__first1 != __last1 && __first2 != __last2) 6242: if (__comp(*__first2, *__first1)) 6242: { 6242: iterator __next = __first2; 6242: _M_transfer(__first1, __first2, ++__next); 6242: __first2 = __next; 6242: } 6242: else 6242: ++__first1; 6242: if (__first2 != __last2) 6242: _M_transfer(__last1, __first2, __last2); 6242: 6242: this->_M_inc_size(__x._M_get_size()); 6242: __x._M_set_size(0); 6242: } 6242: catch(...) 6242: { 6242: const size_t __dist = std::distance(__first2, __last2); 6242: this->_M_inc_size(__orig_size - __dist); 6242: __x._M_set_size(__dist); 6242: throw; 6242: } 6242: } 6242: } 6242: 6242: template 6242: void 6242: list<_Tp, _Alloc>:: 6242: sort() 6242: { 6242: 6242: if (this->_M_impl._M_node._M_next != &this->_M_impl._M_node 6242: && this->_M_impl._M_node._M_next->_M_next != &this->_M_impl._M_node) 6242: { 6242: list __carry; 6242: list __tmp[64]; 6242: list * __fill = __tmp; 6242: list * __counter; 6242: try 6242: { 6242: do 6242: { 6242: __carry.splice(__carry.begin(), *this, begin()); 6242: 6242: for(__counter = __tmp; 6242: __counter != __fill && !__counter->empty(); 6242: ++__counter) 6242: { 6242: __counter->merge(__carry); 6242: __carry.swap(*__counter); 6242: } 6242: __carry.swap(*__counter); 6242: if (__counter == __fill) 6242: ++__fill; 6242: } 6242: while ( !empty() ); 6242: 6242: for (__counter = __tmp + 1; __counter != __fill; ++__counter) 6242: __counter->merge(*(__counter - 1)); 6242: swap( *(__fill - 1) ); 6242: } 6242: catch(...) 6242: { 6242: this->splice(this->end(), __carry); 6242: for (int __i = 0; __i < sizeof(__tmp)/sizeof(__tmp[0]); ++__i) 6242: this->splice(this->end(), __tmp[__i]); 6242: throw; 6242: } 6242: } 6242: } 6242: 6242: template 6242: template 6242: void 6242: list<_Tp, _Alloc>:: 6242: remove_if(_Predicate __pred) 6242: { 6242: iterator __first = begin(); 6242: iterator __last = end(); 6242: while (__first != __last) 6242: { 6242: iterator __next = __first; 6242: ++__next; 6242: if (__pred(*__first)) 6242: _M_erase(__first); 6242: __first = __next; 6242: } 6242: } 6242: 6242: template 6242: template 6242: void 6242: list<_Tp, _Alloc>:: 6242: unique(_BinaryPredicate __binary_pred) 6242: { 6242: iterator __first = begin(); 6242: iterator __last = end(); 6242: if (__first == __last) 6242: return; 6242: iterator __next = __first; 6242: while (++__next != __last) 6242: { 6242: if (__binary_pred(*__first, *__next)) 6242: _M_erase(__next); 6242: else 6242: __first = __next; 6242: __next = __first; 6242: } 6242: } 6242: 6242: template 6242: template 6242: void 6242: list<_Tp, _Alloc>:: 6242: sort(_StrictWeakOrdering __comp) 6242: { 6242: 6242: if (this->_M_impl._M_node._M_next != &this->_M_impl._M_node 6242: && this->_M_impl._M_node._M_next->_M_next != &this->_M_impl._M_node) 6242: { 6242: list __carry; 6242: list __tmp[64]; 6242: list * __fill = __tmp; 6242: list * __counter; 6242: try 6242: { 6242: do 6242: { 6242: __carry.splice(__carry.begin(), *this, begin()); 6242: 6242: for(__counter = __tmp; 6242: __counter != __fill && !__counter->empty(); 6242: ++__counter) 6242: { 6242: __counter->merge(__carry, __comp); 6242: __carry.swap(*__counter); 6242: } 6242: __carry.swap(*__counter); 6242: if (__counter == __fill) 6242: ++__fill; 6242: } 6242: while ( !empty() ); 6242: 6242: for (__counter = __tmp + 1; __counter != __fill; ++__counter) 6242: __counter->merge(*(__counter - 1), __comp); 6242: swap(*(__fill - 1)); 6242: } 6242: catch(...) 6242: { 6242: this->splice(this->end(), __carry); 6242: for (int __i = 0; __i < sizeof(__tmp)/sizeof(__tmp[0]); ++__i) 6242: this->splice(this->end(), __tmp[__i]); 6242: throw; 6242: } 6242: } 6242: } 6242: 6242: 6242: 6242: } 6242: # 65 "/usr/include/c++/8/list" 2 3 6242: # 24 "/usr/include/boost/regex/pending/object_cache.hpp" 2 3 4 6242: # 32 "/usr/include/boost/regex/pending/object_cache.hpp" 3 4 6242: namespace boost{ 6242: 6242: template 6242: class object_cache 6242: { 6242: public: 6242: typedef std::pair< ::boost::shared_ptr, Key const*> value_type; 6242: typedef std::list list_type; 6242: typedef typename list_type::iterator list_iterator; 6242: typedef std::map map_type; 6242: typedef typename map_type::iterator map_iterator; 6242: typedef typename list_type::size_type size_type; 6242: static boost::shared_ptr get(const Key& k, size_type l_max_cache_size); 6242: 6242: private: 6242: static boost::shared_ptr do_get(const Key& k, size_type l_max_cache_size); 6242: 6242: struct data 6242: { 6242: list_type cont; 6242: map_type index; 6242: }; 6242: 6242: 6242: 6242: friend struct data; 6242: }; 6242: 6242: template 6242: boost::shared_ptr object_cache::get(const Key& k, size_type l_max_cache_size) 6242: { 6242: 6242: static boost::static_mutex mut = { { { 0, 0, 0, 0, 0, 0, { 0, 0 } } }, }; 6242: 6242: boost::static_mutex::scoped_lock l(mut); 6242: if(l) 6242: { 6242: return do_get(k, l_max_cache_size); 6242: } 6242: 6242: 6242: 6242: 6242: ::boost::throw_exception(std::runtime_error("Error in thread safety code: could not acquire a lock")); 6242: 6242: 6242: 6242: 6242: 6242: 6242: } 6242: 6242: template 6242: boost::shared_ptr object_cache::do_get(const Key& k, size_type l_max_cache_size) 6242: { 6242: typedef typename object_cache::data object_data; 6242: typedef typename map_type::size_type map_size_type; 6242: static object_data s_data; 6242: 6242: 6242: 6242: 6242: map_iterator mpos = s_data.index.find(k); 6242: if(mpos != s_data.index.end()) 6242: { 6242: 6242: 6242: 6242: 6242: if(--(s_data.cont.end()) != mpos->second) 6242: { 6242: 6242: list_type temp; 6242: temp.splice(temp.end(), s_data.cont, mpos->second); 6242: 6242: s_data.cont.splice(s_data.cont.end(), temp, temp.begin()); 6242: (static_cast (*(s_data.cont.back().second) == k) ? void (0) : __assert_fail ("*(s_data.cont.back().second) == k", "/usr/include/boost/regex/pending/object_cache.hpp", 108, __extension__ __PRETTY_FUNCTION__)); 6242: 6242: mpos->second = --(s_data.cont.end()); 6242: (static_cast (&(mpos->first) == mpos->second->second) ? void (0) : __assert_fail ("&(mpos->first) == mpos->second->second", "/usr/include/boost/regex/pending/object_cache.hpp", 111, __extension__ __PRETTY_FUNCTION__)); 6242: (static_cast (&(mpos->first) == s_data.cont.back().second) ? void (0) : __assert_fail ("&(mpos->first) == s_data.cont.back().second", "/usr/include/boost/regex/pending/object_cache.hpp", 112, __extension__ __PRETTY_FUNCTION__)); 6242: } 6242: return s_data.cont.back().first; 6242: } 6242: 6242: 6242: 6242: 6242: boost::shared_ptr result(new Object(k)); 6242: 6242: 6242: 6242: s_data.cont.push_back(value_type(result, static_cast(0))); 6242: s_data.index.insert(std::make_pair(k, --(s_data.cont.end()))); 6242: s_data.cont.back().second = &(s_data.index.find(k)->first); 6242: map_size_type s = s_data.index.size(); 6242: (static_cast (s_data.index[k]->first.get() == result.get()) ? void (0) : __assert_fail ("s_data.index[k]->first.get() == result.get()", "/usr/include/boost/regex/pending/object_cache.hpp", 128, __extension__ __PRETTY_FUNCTION__)); 6242: (static_cast (&(s_data.index.find(k)->first) == s_data.cont.back().second) ? void (0) : __assert_fail ("&(s_data.index.find(k)->first) == s_data.cont.back().second", "/usr/include/boost/regex/pending/object_cache.hpp", 129, __extension__ __PRETTY_FUNCTION__)); 6242: (static_cast (s_data.index.find(k)->first == k) ? void (0) : __assert_fail ("s_data.index.find(k)->first == k", "/usr/include/boost/regex/pending/object_cache.hpp", 130, __extension__ __PRETTY_FUNCTION__)); 6242: if(s > l_max_cache_size) 6242: { 6242: 6242: 6242: 6242: 6242: 6242: list_iterator pos = s_data.cont.begin(); 6242: list_iterator last = s_data.cont.end(); 6242: while((pos != last) && (s > l_max_cache_size)) 6242: { 6242: if(pos->first.unique()) 6242: { 6242: list_iterator condemmed(pos); 6242: ++pos; 6242: 6242: 6242: (static_cast (s_data.index.find(*(condemmed->second)) != s_data.index.end()) ? void (0) : __assert_fail ("s_data.index.find(*(condemmed->second)) != s_data.index.end()", "/usr/include/boost/regex/pending/object_cache.hpp", 148, __extension__ __PRETTY_FUNCTION__)); 6242: s_data.index.erase(*(condemmed->second)); 6242: s_data.cont.erase(condemmed); 6242: --s; 6242: } 6242: else 6242: ++pos; 6242: } 6242: (static_cast (s_data.index[k]->first.get() == result.get()) ? void (0) : __assert_fail ("s_data.index[k]->first.get() == result.get()", "/usr/include/boost/regex/pending/object_cache.hpp", 156, __extension__ __PRETTY_FUNCTION__)); 6242: (static_cast (&(s_data.index.find(k)->first) == s_data.cont.back().second) ? void (0) : __assert_fail ("&(s_data.index.find(k)->first) == s_data.cont.back().second", "/usr/include/boost/regex/pending/object_cache.hpp", 157, __extension__ __PRETTY_FUNCTION__)); 6242: (static_cast (s_data.index.find(k)->first == k) ? void (0) : __assert_fail ("s_data.index.find(k)->first == k", "/usr/include/boost/regex/pending/object_cache.hpp", 158, __extension__ __PRETTY_FUNCTION__)); 6242: } 6242: return result; 6242: } 6242: 6242: } 6242: # 42 "/usr/include/boost/regex/v4/cpp_regex_traits.hpp" 2 3 4 6242: 6242: 6242: 6242: 6242: # 1 "/usr/include/c++/8/climits" 1 3 4 6242: # 39 "/usr/include/c++/8/climits" 3 4 6242: 6242: # 40 "/usr/include/c++/8/climits" 3 6242: 6242: 6242: # 1 "/usr/lib/gcc/s390x-linux-gnu/8/include-fixed/limits.h" 1 3 4 6242: # 43 "/usr/include/c++/8/climits" 2 3 6242: # 47 "/usr/include/boost/regex/v4/cpp_regex_traits.hpp" 2 3 4 6242: # 64 "/usr/include/boost/regex/v4/cpp_regex_traits.hpp" 3 4 6242: namespace boost{ 6242: 6242: 6242: 6242: 6242: template 6242: class cpp_regex_traits; 6242: 6242: namespace re_detail_106501{ 6242: 6242: 6242: 6242: 6242: 6242: template > 6242: class parser_buf : public ::std::basic_streambuf 6242: { 6242: typedef ::std::basic_streambuf base_type; 6242: typedef typename base_type::int_type int_type; 6242: typedef typename base_type::char_type char_type; 6242: typedef typename base_type::pos_type pos_type; 6242: typedef ::std::streamsize streamsize; 6242: typedef typename base_type::off_type off_type; 6242: public: 6242: parser_buf() : base_type() { setbuf(0, 0); } 6242: const charT* getnext() { return this->gptr(); } 6242: protected: 6242: std::basic_streambuf* setbuf(char_type* s, streamsize n); 6242: typename parser_buf::pos_type seekpos(pos_type sp, ::std::ios_base::openmode which); 6242: typename parser_buf::pos_type seekoff(off_type off, ::std::ios_base::seekdir way, ::std::ios_base::openmode which); 6242: private: 6242: parser_buf& operator=(const parser_buf&); 6242: parser_buf(const parser_buf&); 6242: }; 6242: 6242: template 6242: std::basic_streambuf* 6242: parser_buf::setbuf(char_type* s, streamsize n) 6242: { 6242: this->setg(s, s, s + n); 6242: return this; 6242: } 6242: 6242: template 6242: typename parser_buf::pos_type 6242: parser_buf::seekoff(off_type off, ::std::ios_base::seekdir way, ::std::ios_base::openmode which) 6242: { 6242: typedef typename boost::int_t::least cast_type; 6242: 6242: if(which & ::std::ios_base::out) 6242: return pos_type(off_type(-1)); 6242: std::ptrdiff_t size = this->egptr() - this->eback(); 6242: std::ptrdiff_t pos = this->gptr() - this->eback(); 6242: charT* g = this->eback(); 6242: switch(static_cast(way)) 6242: { 6242: case ::std::ios_base::beg: 6242: if((off < 0) || (off > size)) 6242: return pos_type(off_type(-1)); 6242: else 6242: this->setg(g, g + off, g + size); 6242: break; 6242: case ::std::ios_base::end: 6242: if((off < 0) || (off > size)) 6242: return pos_type(off_type(-1)); 6242: else 6242: this->setg(g, g + size - off, g + size); 6242: break; 6242: case ::std::ios_base::cur: 6242: { 6242: std::ptrdiff_t newpos = static_cast(pos + off); 6242: if((newpos < 0) || (newpos > size)) 6242: return pos_type(off_type(-1)); 6242: else 6242: this->setg(g, g + newpos, g + size); 6242: break; 6242: } 6242: default: ; 6242: } 6242: 6242: 6242: 6242: 6242: return static_cast(this->gptr() - this->eback()); 6242: 6242: 6242: 6242: } 6242: 6242: template 6242: typename parser_buf::pos_type 6242: parser_buf::seekpos(pos_type sp, ::std::ios_base::openmode which) 6242: { 6242: if(which & ::std::ios_base::out) 6242: return pos_type(off_type(-1)); 6242: off_type size = static_cast(this->egptr() - this->eback()); 6242: charT* g = this->eback(); 6242: if(off_type(sp) <= size) 6242: { 6242: this->setg(g, g + off_type(sp), g + size); 6242: } 6242: return pos_type(off_type(-1)); 6242: } 6242: 6242: 6242: 6242: 6242: 6242: template 6242: struct cpp_regex_traits_base 6242: { 6242: cpp_regex_traits_base(const std::locale& l) 6242: { imbue(l); } 6242: std::locale imbue(const std::locale& l); 6242: 6242: std::locale m_locale; 6242: std::ctype const* m_pctype; 6242: 6242: std::messages const* m_pmessages; 6242: 6242: std::collate const* m_pcollate; 6242: 6242: bool operator<(const cpp_regex_traits_base& b)const 6242: { 6242: if(m_pctype == b.m_pctype) 6242: { 6242: 6242: if(m_pmessages == b.m_pmessages) 6242: { 6242: return m_pcollate < b.m_pcollate; 6242: } 6242: return m_pmessages < b.m_pmessages; 6242: 6242: 6242: 6242: } 6242: return m_pctype < b.m_pctype; 6242: } 6242: bool operator==(const cpp_regex_traits_base& b)const 6242: { 6242: return (m_pctype == b.m_pctype) 6242: 6242: && (m_pmessages == b.m_pmessages) 6242: 6242: && (m_pcollate == b.m_pcollate); 6242: } 6242: }; 6242: 6242: template 6242: std::locale cpp_regex_traits_base::imbue(const std::locale& l) 6242: { 6242: std::locale result(m_locale); 6242: m_locale = l; 6242: m_pctype = &std::use_facet< std::ctype >(l); 6242: 6242: m_pmessages = std::has_facet< std::messages >(l) ? &std::use_facet< std::messages >(l) : 0; 6242: 6242: m_pcollate = &std::use_facet< std::collate >(l); 6242: return result; 6242: } 6242: 6242: 6242: 6242: 6242: 6242: template 6242: class cpp_regex_traits_char_layer : public cpp_regex_traits_base 6242: { 6242: typedef std::basic_string string_type; 6242: typedef std::map map_type; 6242: typedef typename map_type::const_iterator map_iterator_type; 6242: public: 6242: cpp_regex_traits_char_layer(const std::locale& l) 6242: : cpp_regex_traits_base(l) 6242: { 6242: init(); 6242: } 6242: cpp_regex_traits_char_layer(const cpp_regex_traits_base& b) 6242: : cpp_regex_traits_base(b) 6242: { 6242: init(); 6242: } 6242: void init(); 6242: 6242: regex_constants::syntax_type syntax_type(charT c)const 6242: { 6242: map_iterator_type i = m_char_map.find(c); 6242: return ((i == m_char_map.end()) ? 0 : i->second); 6242: } 6242: regex_constants::escape_syntax_type escape_syntax_type(charT c) const 6242: { 6242: map_iterator_type i = m_char_map.find(c); 6242: if(i == m_char_map.end()) 6242: { 6242: if(this->m_pctype->is(std::ctype_base::lower, c)) return regex_constants::escape_type_class; 6242: if(this->m_pctype->is(std::ctype_base::upper, c)) return regex_constants::escape_type_not_class; 6242: return 0; 6242: } 6242: return i->second; 6242: } 6242: 6242: private: 6242: string_type get_default_message(regex_constants::syntax_type); 6242: 6242: map_type m_char_map; 6242: }; 6242: 6242: template 6242: void cpp_regex_traits_char_layer::init() 6242: { 6242: 6242: 6242: 6242: 6242: typename std::messages::catalog cat = static_cast::catalog>(-1); 6242: 6242: 6242: 6242: std::string cat_name(cpp_regex_traits::get_catalog_name()); 6242: if(cat_name.size() && (this->m_pmessages != 0)) 6242: { 6242: cat = this->m_pmessages->open( 6242: cat_name, 6242: this->m_locale); 6242: if((int)cat < 0) 6242: { 6242: std::string m("Unable to open message catalog: "); 6242: std::runtime_error err(m + cat_name); 6242: boost::re_detail_106501::raise_runtime_error(err); 6242: } 6242: } 6242: 6242: 6242: 6242: if((int)cat >= 0) 6242: { 6242: 6242: try{ 6242: 6242: for(regex_constants::syntax_type i = 1; i < regex_constants::syntax_max; ++i) 6242: { 6242: string_type mss = this->m_pmessages->get(cat, 0, i, get_default_message(i)); 6242: for(typename string_type::size_type j = 0; j < mss.size(); ++j) 6242: { 6242: m_char_map[mss[j]] = i; 6242: } 6242: } 6242: this->m_pmessages->close(cat); 6242: 6242: } 6242: catch(...) 6242: { 6242: if(this->m_pmessages) 6242: this->m_pmessages->close(cat); 6242: throw; 6242: } 6242: 6242: } 6242: else 6242: { 6242: 6242: for(regex_constants::syntax_type i = 1; i < regex_constants::syntax_max; ++i) 6242: { 6242: const char* ptr = get_default_syntax(i); 6242: while(ptr && *ptr) 6242: { 6242: m_char_map[this->m_pctype->widen(*ptr)] = i; 6242: ++ptr; 6242: } 6242: } 6242: 6242: } 6242: 6242: } 6242: 6242: template 6242: typename cpp_regex_traits_char_layer::string_type 6242: cpp_regex_traits_char_layer::get_default_message(regex_constants::syntax_type i) 6242: { 6242: const char* ptr = get_default_syntax(i); 6242: string_type result; 6242: while(ptr && *ptr) 6242: { 6242: result.append(1, this->m_pctype->widen(*ptr)); 6242: ++ptr; 6242: } 6242: return result; 6242: } 6242: 6242: 6242: 6242: 6242: template <> 6242: class cpp_regex_traits_char_layer : public cpp_regex_traits_base 6242: { 6242: typedef std::string string_type; 6242: public: 6242: cpp_regex_traits_char_layer(const std::locale& l) 6242: : cpp_regex_traits_base(l) 6242: { 6242: init(); 6242: } 6242: cpp_regex_traits_char_layer(const cpp_regex_traits_base& l) 6242: : cpp_regex_traits_base(l) 6242: { 6242: init(); 6242: } 6242: 6242: regex_constants::syntax_type syntax_type(char c)const 6242: { 6242: return m_char_map[static_cast(c)]; 6242: } 6242: regex_constants::escape_syntax_type escape_syntax_type(char c) const 6242: { 6242: return m_char_map[static_cast(c)]; 6242: } 6242: 6242: private: 6242: regex_constants::syntax_type m_char_map[1u << 8]; 6242: void init(); 6242: }; 6242: # 414 "/usr/include/boost/regex/v4/cpp_regex_traits.hpp" 3 4 6242: template 6242: class cpp_regex_traits_implementation : public cpp_regex_traits_char_layer 6242: { 6242: public: 6242: typedef typename cpp_regex_traits::char_class_type char_class_type; 6242: typedef typename std::ctype::mask native_mask_type; 6242: typedef typename boost::make_unsigned::type unsigned_native_mask_type; 6242: 6242: static const char_class_type mask_blank = 1u << 24; 6242: static const char_class_type mask_word = 1u << 25; 6242: static const char_class_type mask_unicode = 1u << 26; 6242: static const char_class_type mask_horizontal = 1u << 27; 6242: static const char_class_type mask_vertical = 1u << 28; 6242: 6242: 6242: typedef std::basic_string string_type; 6242: typedef charT char_type; 6242: 6242: cpp_regex_traits_implementation(const std::locale& l) 6242: : cpp_regex_traits_char_layer(l) 6242: { 6242: init(); 6242: } 6242: cpp_regex_traits_implementation(const cpp_regex_traits_base& l) 6242: : cpp_regex_traits_char_layer(l) 6242: { 6242: init(); 6242: } 6242: std::string error_string(regex_constants::error_type n) const 6242: { 6242: if(!m_error_strings.empty()) 6242: { 6242: std::map::const_iterator p = m_error_strings.find(n); 6242: return (p == m_error_strings.end()) ? std::string(get_default_error_string(n)) : p->second; 6242: } 6242: return get_default_error_string(n); 6242: } 6242: char_class_type lookup_classname(const charT* p1, const charT* p2) const 6242: { 6242: char_class_type result = lookup_classname_imp(p1, p2); 6242: if(result == 0) 6242: { 6242: string_type temp(p1, p2); 6242: this->m_pctype->tolower(&*temp.begin(), &*temp.begin() + temp.size()); 6242: result = lookup_classname_imp(&*temp.begin(), &*temp.begin() + temp.size()); 6242: } 6242: return result; 6242: } 6242: string_type lookup_collatename(const charT* p1, const charT* p2) const; 6242: string_type transform_primary(const charT* p1, const charT* p2) const; 6242: string_type transform(const charT* p1, const charT* p2) const; 6242: private: 6242: std::map m_error_strings; 6242: std::map m_custom_class_names; 6242: std::map m_custom_collate_names; 6242: unsigned m_collate_type; 6242: charT m_collate_delim; 6242: 6242: 6242: 6242: char_class_type lookup_classname_imp(const charT* p1, const charT* p2) const; 6242: void init(); 6242: 6242: 6242: 6242: 6242: }; 6242: 6242: 6242: 6242: 6242: template 6242: typename cpp_regex_traits_implementation::char_class_type const cpp_regex_traits_implementation::mask_blank; 6242: template 6242: typename cpp_regex_traits_implementation::char_class_type const cpp_regex_traits_implementation::mask_word; 6242: template 6242: typename cpp_regex_traits_implementation::char_class_type const cpp_regex_traits_implementation::mask_unicode; 6242: template 6242: typename cpp_regex_traits_implementation::char_class_type const cpp_regex_traits_implementation::mask_vertical; 6242: template 6242: typename cpp_regex_traits_implementation::char_class_type const cpp_regex_traits_implementation::mask_horizontal; 6242: 6242: 6242: 6242: 6242: template 6242: typename cpp_regex_traits_implementation::string_type 6242: cpp_regex_traits_implementation::transform_primary(const charT* p1, const charT* p2) const 6242: { 6242: # 511 "/usr/include/boost/regex/v4/cpp_regex_traits.hpp" 3 4 6242: (static_cast (*p2 == 0) ? void (0) : __assert_fail ("*p2 == 0", "/usr/include/boost/regex/v4/cpp_regex_traits.hpp", 511, __extension__ __PRETTY_FUNCTION__)); 6242: string_type result; 6242: # 530 "/usr/include/boost/regex/v4/cpp_regex_traits.hpp" 3 4 6242: try{ 6242: 6242: 6242: 6242: 6242: 6242: switch(m_collate_type) 6242: { 6242: case sort_C: 6242: case sort_unknown: 6242: 6242: { 6242: result.assign(p1, p2); 6242: this->m_pctype->tolower(&*result.begin(), &*result.begin() + result.size()); 6242: result = this->m_pcollate->transform(&*result.begin(), &*result.begin() + result.size()); 6242: break; 6242: } 6242: case sort_fixed: 6242: { 6242: 6242: result.assign(this->m_pcollate->transform(p1, p2)); 6242: result.erase(this->m_collate_delim); 6242: break; 6242: } 6242: case sort_delim: 6242: 6242: result.assign(this->m_pcollate->transform(p1, p2)); 6242: std::size_t i; 6242: for(i = 0; i < result.size(); ++i) 6242: { 6242: if(result[i] == m_collate_delim) 6242: break; 6242: } 6242: result.erase(i); 6242: break; 6242: } 6242: 6242: }catch(...){} 6242: 6242: while(result.size() && (charT(0) == *result.rbegin())) 6242: result.erase(result.size() - 1); 6242: if(result.empty()) 6242: { 6242: 6242: result = string_type(1, charT(0)); 6242: } 6242: return result; 6242: } 6242: 6242: template 6242: typename cpp_regex_traits_implementation::string_type 6242: cpp_regex_traits_implementation::transform(const charT* p1, const charT* p2) const 6242: { 6242: # 591 "/usr/include/boost/regex/v4/cpp_regex_traits.hpp" 3 4 6242: (static_cast (*p2 == 0) ? void (0) : __assert_fail ("*p2 == 0", "/usr/include/boost/regex/v4/cpp_regex_traits.hpp", 591, __extension__ __PRETTY_FUNCTION__)); 6242: 6242: 6242: 6242: 6242: 6242: string_type result, result2; 6242: # 610 "/usr/include/boost/regex/v4/cpp_regex_traits.hpp" 3 4 6242: try{ 6242: 6242: result = this->m_pcollate->transform(p1, p2); 6242: # 624 "/usr/include/boost/regex/v4/cpp_regex_traits.hpp" 3 4 6242: while(result.size() && (charT(0) == *result.rbegin())) 6242: result.erase(result.size() - 1); 6242: # 636 "/usr/include/boost/regex/v4/cpp_regex_traits.hpp" 3 4 6242: typedef typename make_unsigned::type uchar_type; 6242: result2.reserve(result.size() * 2 + 2); 6242: for(unsigned i = 0; i < result.size(); ++i) 6242: { 6242: if(static_cast(result[i]) == (std::numeric_limits::max)()) 6242: { 6242: result2.append(1, charT((std::numeric_limits::max)())).append(1, charT('b')); 6242: } 6242: else 6242: { 6242: result2.append(1, static_cast(1 + static_cast(result[i]))).append(1, charT('b') - 1); 6242: } 6242: } 6242: (static_cast (std::find(result2.begin(), result2.end(), charT(0)) == result2.end()) ? void (0) : __assert_fail ("std::find(result2.begin(), result2.end(), charT(0)) == result2.end()", "/usr/include/boost/regex/v4/cpp_regex_traits.hpp", 649, __extension__ __PRETTY_FUNCTION__)); 6242: 6242: } 6242: catch(...) 6242: { 6242: } 6242: 6242: return result2; 6242: } 6242: 6242: 6242: template 6242: typename cpp_regex_traits_implementation::string_type 6242: cpp_regex_traits_implementation::lookup_collatename(const charT* p1, const charT* p2) const 6242: { 6242: typedef typename std::map::const_iterator iter_type; 6242: if(m_custom_collate_names.size()) 6242: { 6242: iter_type pos = m_custom_collate_names.find(string_type(p1, p2)); 6242: if(pos != m_custom_collate_names.end()) 6242: return pos->second; 6242: } 6242: 6242: 6242: std::string name(p1, p2); 6242: 6242: 6242: 6242: 6242: 6242: 6242: name = lookup_default_collate_name(name); 6242: 6242: 6242: if(name.size()) 6242: return string_type(name.begin(), name.end()); 6242: # 697 "/usr/include/boost/regex/v4/cpp_regex_traits.hpp" 3 4 6242: if(p2 - p1 == 1) 6242: return string_type(1, *p1); 6242: return string_type(); 6242: } 6242: 6242: template 6242: void cpp_regex_traits_implementation::init() 6242: { 6242: 6242: 6242: typename std::messages::catalog cat = static_cast::catalog>(-1); 6242: 6242: 6242: 6242: std::string cat_name(cpp_regex_traits::get_catalog_name()); 6242: if(cat_name.size() && (this->m_pmessages != 0)) 6242: { 6242: cat = this->m_pmessages->open( 6242: cat_name, 6242: this->m_locale); 6242: if((int)cat < 0) 6242: { 6242: std::string m("Unable to open message catalog: "); 6242: std::runtime_error err(m + cat_name); 6242: boost::re_detail_106501::raise_runtime_error(err); 6242: } 6242: } 6242: 6242: 6242: 6242: if((int)cat >= 0) 6242: { 6242: 6242: 6242: 6242: for(boost::regex_constants::error_type i = static_cast(0); 6242: i <= boost::regex_constants::error_unknown; 6242: i = static_cast(i + 1)) 6242: { 6242: const char* p = get_default_error_string(i); 6242: string_type default_message; 6242: while(*p) 6242: { 6242: default_message.append(1, this->m_pctype->widen(*p)); 6242: ++p; 6242: } 6242: string_type s = this->m_pmessages->get(cat, 0, i+200, default_message); 6242: std::string result; 6242: for(std::string::size_type j = 0; j < s.size(); ++j) 6242: { 6242: result.append(1, this->m_pctype->narrow(s[j], 0)); 6242: } 6242: m_error_strings[i] = result; 6242: } 6242: 6242: 6242: 6242: 6242: static const char_class_type masks[16] = 6242: { 6242: static_cast(std::ctype::alnum), 6242: static_cast(std::ctype::alpha), 6242: static_cast(std::ctype::cntrl), 6242: static_cast(std::ctype::digit), 6242: static_cast(std::ctype::graph), 6242: cpp_regex_traits_implementation::mask_horizontal, 6242: static_cast(std::ctype::lower), 6242: static_cast(std::ctype::print), 6242: static_cast(std::ctype::punct), 6242: static_cast(std::ctype::space), 6242: static_cast(std::ctype::upper), 6242: cpp_regex_traits_implementation::mask_vertical, 6242: static_cast(std::ctype::xdigit), 6242: cpp_regex_traits_implementation::mask_blank, 6242: cpp_regex_traits_implementation::mask_word, 6242: cpp_regex_traits_implementation::mask_unicode, 6242: }; 6242: # 795 "/usr/include/boost/regex/v4/cpp_regex_traits.hpp" 3 4 6242: static const string_type null_string; 6242: for(unsigned int j = 0; j <= 13; ++j) 6242: { 6242: string_type s(this->m_pmessages->get(cat, 0, j+300, null_string)); 6242: if(s.size()) 6242: this->m_custom_class_names[s] = masks[j]; 6242: } 6242: } 6242: 6242: 6242: 6242: 6242: m_collate_type = re_detail_106501::find_sort_syntax(this, &m_collate_delim); 6242: } 6242: 6242: template 6242: typename cpp_regex_traits_implementation::char_class_type 6242: cpp_regex_traits_implementation::lookup_classname_imp(const charT* p1, const charT* p2) const 6242: { 6242: 6242: static const char_class_type masks[22] = 6242: { 6242: 0, 6242: static_cast(std::ctype::alnum), 6242: static_cast(std::ctype::alpha), 6242: cpp_regex_traits_implementation::mask_blank, 6242: static_cast(std::ctype::cntrl), 6242: static_cast(std::ctype::digit), 6242: static_cast(std::ctype::digit), 6242: static_cast(std::ctype::graph), 6242: cpp_regex_traits_implementation::mask_horizontal, 6242: static_cast(std::ctype::lower), 6242: static_cast(std::ctype::lower), 6242: static_cast(std::ctype::print), 6242: static_cast(std::ctype::punct), 6242: static_cast(std::ctype::space), 6242: static_cast(std::ctype::space), 6242: static_cast(std::ctype::upper), 6242: cpp_regex_traits_implementation::mask_unicode, 6242: static_cast(std::ctype::upper), 6242: cpp_regex_traits_implementation::mask_vertical, 6242: static_cast(std::ctype::alnum) | cpp_regex_traits_implementation::mask_word, 6242: static_cast(std::ctype::alnum) | cpp_regex_traits_implementation::mask_word, 6242: static_cast(std::ctype::xdigit), 6242: }; 6242: # 867 "/usr/include/boost/regex/v4/cpp_regex_traits.hpp" 3 4 6242: if(m_custom_class_names.size()) 6242: { 6242: typedef typename std::map, char_class_type>::const_iterator map_iter; 6242: map_iter pos = m_custom_class_names.find(string_type(p1, p2)); 6242: if(pos != m_custom_class_names.end()) 6242: return pos->second; 6242: } 6242: std::size_t state_id = 1 + re_detail_106501::get_default_class_id(p1, p2); 6242: (static_cast (state_id < sizeof(masks) / sizeof(masks[0])) ? void (0) : __assert_fail ("state_id < sizeof(masks) / sizeof(masks[0])", "/usr/include/boost/regex/v4/cpp_regex_traits.hpp", 875, __extension__ __PRETTY_FUNCTION__)); 6242: return masks[state_id]; 6242: } 6242: # 902 "/usr/include/boost/regex/v4/cpp_regex_traits.hpp" 3 4 6242: template 6242: inline boost::shared_ptr > create_cpp_regex_traits(const std::locale& l) 6242: { 6242: cpp_regex_traits_base key(l); 6242: return ::boost::object_cache, cpp_regex_traits_implementation >::get(key, 5); 6242: } 6242: 6242: } 6242: 6242: template 6242: class cpp_regex_traits 6242: { 6242: private: 6242: typedef std::ctype ctype_type; 6242: public: 6242: typedef charT char_type; 6242: typedef std::size_t size_type; 6242: typedef std::basic_string string_type; 6242: typedef std::locale locale_type; 6242: typedef boost::uint_least32_t char_class_type; 6242: 6242: struct boost_extensions_tag{}; 6242: 6242: cpp_regex_traits() 6242: : m_pimpl(re_detail_106501::create_cpp_regex_traits(std::locale())) 6242: { } 6242: static size_type length(const char_type* p) 6242: { 6242: return std::char_traits::length(p); 6242: } 6242: regex_constants::syntax_type syntax_type(charT c)const 6242: { 6242: return m_pimpl->syntax_type(c); 6242: } 6242: regex_constants::escape_syntax_type escape_syntax_type(charT c) const 6242: { 6242: return m_pimpl->escape_syntax_type(c); 6242: } 6242: charT translate(charT c) const 6242: { 6242: return c; 6242: } 6242: charT translate_nocase(charT c) const 6242: { 6242: return m_pimpl->m_pctype->tolower(c); 6242: } 6242: charT translate(charT c, bool icase) const 6242: { 6242: return icase ? m_pimpl->m_pctype->tolower(c) : c; 6242: } 6242: charT tolower(charT c) const 6242: { 6242: return m_pimpl->m_pctype->tolower(c); 6242: } 6242: charT toupper(charT c) const 6242: { 6242: return m_pimpl->m_pctype->toupper(c); 6242: } 6242: string_type transform(const charT* p1, const charT* p2) const 6242: { 6242: return m_pimpl->transform(p1, p2); 6242: } 6242: string_type transform_primary(const charT* p1, const charT* p2) const 6242: { 6242: return m_pimpl->transform_primary(p1, p2); 6242: } 6242: char_class_type lookup_classname(const charT* p1, const charT* p2) const 6242: { 6242: return m_pimpl->lookup_classname(p1, p2); 6242: } 6242: string_type lookup_collatename(const charT* p1, const charT* p2) const 6242: { 6242: return m_pimpl->lookup_collatename(p1, p2); 6242: } 6242: bool isctype(charT c, char_class_type f) const 6242: { 6242: 6242: typedef typename std::ctype::mask ctype_mask; 6242: 6242: static const ctype_mask mask_base = 6242: static_cast( 6242: std::ctype::alnum 6242: | std::ctype::alpha 6242: | std::ctype::cntrl 6242: | std::ctype::digit 6242: | std::ctype::graph 6242: | std::ctype::lower 6242: | std::ctype::print 6242: | std::ctype::punct 6242: | std::ctype::space 6242: | std::ctype::upper 6242: | std::ctype::xdigit); 6242: 6242: if((f & mask_base) 6242: && (m_pimpl->m_pctype->is( 6242: static_cast(f & mask_base), c))) 6242: return true; 6242: else if((f & re_detail_106501::cpp_regex_traits_implementation::mask_unicode) && re_detail_106501::is_extended(c)) 6242: return true; 6242: else if((f & re_detail_106501::cpp_regex_traits_implementation::mask_word) && (c == '_')) 6242: return true; 6242: else if((f & re_detail_106501::cpp_regex_traits_implementation::mask_blank) 6242: && m_pimpl->m_pctype->is(std::ctype::space, c) 6242: && !re_detail_106501::is_separator(c)) 6242: return true; 6242: else if((f & re_detail_106501::cpp_regex_traits_implementation::mask_vertical) 6242: && (::boost::re_detail_106501::is_separator(c) || (c == '\v'))) 6242: return true; 6242: else if((f & re_detail_106501::cpp_regex_traits_implementation::mask_horizontal) 6242: && this->isctype(c, std::ctype::space) && !this->isctype(c, re_detail_106501::cpp_regex_traits_implementation::mask_vertical)) 6242: return true; 6242: # 1025 "/usr/include/boost/regex/v4/cpp_regex_traits.hpp" 3 4 6242: return false; 6242: 6242: 6242: 6242: } 6242: boost::intmax_t toi(const charT*& p1, const charT* p2, int radix)const; 6242: int value(charT c, int radix)const 6242: { 6242: const charT* pc = &c; 6242: return (int)toi(pc, pc + 1, radix); 6242: } 6242: locale_type imbue(locale_type l) 6242: { 6242: std::locale result(getloc()); 6242: m_pimpl = re_detail_106501::create_cpp_regex_traits(l); 6242: return result; 6242: } 6242: locale_type getloc()const 6242: { 6242: return m_pimpl->m_locale; 6242: } 6242: std::string error_string(regex_constants::error_type n) const 6242: { 6242: return m_pimpl->error_string(n); 6242: } 6242: 6242: 6242: 6242: 6242: 6242: static std::string catalog_name(const std::string& name); 6242: static std::string get_catalog_name(); 6242: 6242: private: 6242: boost::shared_ptr > m_pimpl; 6242: 6242: 6242: 6242: static std::string& get_catalog_name_inst(); 6242: 6242: 6242: static static_mutex& get_mutex_inst(); 6242: 6242: }; 6242: 6242: 6242: template 6242: boost::intmax_t cpp_regex_traits::toi(const charT*& first, const charT* last, int radix)const 6242: { 6242: re_detail_106501::parser_buf sbuf; 6242: std::basic_istream is(&sbuf); 6242: 6242: 6242: last = std::find(first, last, std::use_facet< std::numpunct >(is.getloc()).thousands_sep()); 6242: 6242: sbuf.pubsetbuf(const_cast(static_cast(first)), static_cast(last-first)); 6242: is.clear(); 6242: if(std::abs(radix) == 16) is >> std::hex; 6242: else if(std::abs(radix) == 8) is >> std::oct; 6242: else is >> std::dec; 6242: boost::intmax_t val; 6242: if(is >> val) 6242: { 6242: first = first + ((last - first) - sbuf.in_avail()); 6242: return val; 6242: } 6242: else 6242: return -1; 6242: } 6242: 6242: template 6242: std::string cpp_regex_traits::catalog_name(const std::string& name) 6242: { 6242: 6242: static_mutex::scoped_lock lk(get_mutex_inst()); 6242: 6242: std::string result(get_catalog_name_inst()); 6242: get_catalog_name_inst() = name; 6242: return result; 6242: } 6242: 6242: template 6242: std::string& cpp_regex_traits::get_catalog_name_inst() 6242: { 6242: static std::string s_name; 6242: return s_name; 6242: } 6242: 6242: template 6242: std::string cpp_regex_traits::get_catalog_name() 6242: { 6242: 6242: static_mutex::scoped_lock lk(get_mutex_inst()); 6242: 6242: std::string result(get_catalog_name_inst()); 6242: return result; 6242: } 6242: 6242: 6242: template 6242: static_mutex& cpp_regex_traits::get_mutex_inst() 6242: { 6242: static static_mutex s_mutex = { { { 0, 0, 0, 0, 0, 0, { 0, 0 } } }, }; 6242: return s_mutex; 6242: } 6242: 6242: 6242: 6242: } 6242: # 40 "/usr/include/boost/regex/v4/regex_traits.hpp" 2 3 4 6242: 6242: 6242: 6242: 6242: # 1 "/usr/include/boost/regex/v4/c_regex_traits.hpp" 1 3 4 6242: # 29 "/usr/include/boost/regex/v4/c_regex_traits.hpp" 3 4 6242: # 1 "/usr/include/c++/8/cctype" 1 3 4 6242: # 39 "/usr/include/c++/8/cctype" 3 4 6242: 6242: # 40 "/usr/include/c++/8/cctype" 3 6242: # 30 "/usr/include/boost/regex/v4/c_regex_traits.hpp" 2 3 4 6242: # 48 "/usr/include/boost/regex/v4/c_regex_traits.hpp" 3 4 6242: namespace boost{ 6242: 6242: template 6242: struct c_regex_traits; 6242: 6242: template<> 6242: struct c_regex_traits 6242: { 6242: c_regex_traits(){} 6242: typedef char char_type; 6242: typedef std::size_t size_type; 6242: typedef std::string string_type; 6242: struct locale_type{}; 6242: typedef boost::uint32_t char_class_type; 6242: 6242: static size_type length(const char_type* p) 6242: { 6242: return (std::strlen)(p); 6242: } 6242: 6242: char translate(char c) const 6242: { 6242: return c; 6242: } 6242: char translate_nocase(char c) const 6242: { 6242: return static_cast((std::tolower)(static_cast(c))); 6242: } 6242: 6242: static string_type transform(const char* p1, const char* p2); 6242: static string_type transform_primary(const char* p1, const char* p2); 6242: 6242: static char_class_type lookup_classname(const char* p1, const char* p2); 6242: static string_type lookup_collatename(const char* p1, const char* p2); 6242: 6242: static bool isctype(char, char_class_type); 6242: static int value(char, int); 6242: 6242: locale_type imbue(locale_type l) 6242: { return l; } 6242: locale_type getloc()const 6242: { return locale_type(); } 6242: 6242: private: 6242: 6242: c_regex_traits(const c_regex_traits&); 6242: c_regex_traits& operator=(const c_regex_traits&); 6242: }; 6242: 6242: 6242: template<> 6242: struct c_regex_traits 6242: { 6242: c_regex_traits(){} 6242: typedef wchar_t char_type; 6242: typedef std::size_t size_type; 6242: typedef std::wstring string_type; 6242: struct locale_type{}; 6242: typedef boost::uint32_t char_class_type; 6242: 6242: static size_type length(const char_type* p) 6242: { 6242: return (std::wcslen)(p); 6242: } 6242: 6242: wchar_t translate(wchar_t c) const 6242: { 6242: return c; 6242: } 6242: wchar_t translate_nocase(wchar_t c) const 6242: { 6242: return (std::towlower)(c); 6242: } 6242: 6242: static string_type transform(const wchar_t* p1, const wchar_t* p2); 6242: static string_type transform_primary(const wchar_t* p1, const wchar_t* p2); 6242: 6242: static char_class_type lookup_classname(const wchar_t* p1, const wchar_t* p2); 6242: static string_type lookup_collatename(const wchar_t* p1, const wchar_t* p2); 6242: 6242: static bool isctype(wchar_t, char_class_type); 6242: static int value(wchar_t, int); 6242: 6242: locale_type imbue(locale_type l) 6242: { return l; } 6242: locale_type getloc()const 6242: { return locale_type(); } 6242: 6242: private: 6242: 6242: c_regex_traits(const c_regex_traits&); 6242: c_regex_traits& operator=(const c_regex_traits&); 6242: }; 6242: # 195 "/usr/include/boost/regex/v4/c_regex_traits.hpp" 3 4 6242: } 6242: # 45 "/usr/include/boost/regex/v4/regex_traits.hpp" 2 3 4 6242: # 56 "/usr/include/boost/regex/v4/regex_traits.hpp" 3 4 6242: # 1 "/usr/include/boost/mpl/has_xxx.hpp" 1 3 4 6242: # 19 "/usr/include/boost/mpl/has_xxx.hpp" 3 4 6242: # 1 "/usr/include/boost/mpl/bool.hpp" 1 3 4 6242: # 18 "/usr/include/boost/mpl/bool.hpp" 3 4 6242: # 1 "/usr/include/boost/mpl/integral_c_tag.hpp" 1 3 4 6242: # 19 "/usr/include/boost/mpl/integral_c_tag.hpp" 3 4 6242: # 1 "/usr/include/boost/mpl/aux_/config/static_constant.hpp" 1 3 4 6242: # 20 "/usr/include/boost/mpl/integral_c_tag.hpp" 2 3 4 6242: 6242: namespace mpl_ { 6242: struct integral_c_tag { static const int value = 0; }; 6242: } 6242: namespace boost { namespace mpl { using ::mpl_::integral_c_tag; } } 6242: # 19 "/usr/include/boost/mpl/bool.hpp" 2 3 4 6242: 6242: 6242: namespace mpl_ { 6242: 6242: template< bool C_ > struct bool_ 6242: { 6242: static const bool value = C_; 6242: typedef integral_c_tag tag; 6242: typedef bool_ type; 6242: typedef bool value_type; 6242: constexpr operator bool() const { return this->value; } 6242: }; 6242: 6242: 6242: template< bool C_ > 6242: bool const bool_::value; 6242: 6242: 6242: } 6242: # 20 "/usr/include/boost/mpl/has_xxx.hpp" 2 3 4 6242: # 1 "/usr/include/boost/mpl/aux_/na_spec.hpp" 1 3 4 6242: # 18 "/usr/include/boost/mpl/aux_/na_spec.hpp" 3 4 6242: # 1 "/usr/include/boost/mpl/lambda_fwd.hpp" 1 3 4 6242: # 17 "/usr/include/boost/mpl/lambda_fwd.hpp" 3 4 6242: # 1 "/usr/include/boost/mpl/void_fwd.hpp" 1 3 4 6242: # 19 "/usr/include/boost/mpl/void_fwd.hpp" 3 4 6242: namespace mpl_ { 6242: 6242: struct void_; 6242: 6242: } 6242: namespace boost { namespace mpl { using ::mpl_::void_; } } 6242: # 18 "/usr/include/boost/mpl/lambda_fwd.hpp" 2 3 4 6242: # 1 "/usr/include/boost/mpl/aux_/na.hpp" 1 3 4 6242: # 18 "/usr/include/boost/mpl/aux_/na.hpp" 3 4 6242: # 1 "/usr/include/boost/mpl/aux_/na_fwd.hpp" 1 3 4 6242: # 19 "/usr/include/boost/mpl/aux_/na_fwd.hpp" 3 4 6242: namespace mpl_ { 6242: 6242: 6242: struct na 6242: { 6242: typedef na type; 6242: enum { value = 0 }; 6242: }; 6242: 6242: } 6242: namespace boost { namespace mpl { using ::mpl_::na; } } 6242: # 19 "/usr/include/boost/mpl/aux_/na.hpp" 2 3 4 6242: 6242: # 1 "/usr/include/boost/mpl/aux_/config/ctps.hpp" 1 3 4 6242: # 21 "/usr/include/boost/mpl/aux_/na.hpp" 2 3 4 6242: 6242: namespace boost { namespace mpl { 6242: 6242: template< typename T > 6242: struct is_na 6242: : false_ 6242: { 6242: 6242: 6242: 6242: }; 6242: 6242: template<> 6242: struct is_na 6242: : true_ 6242: { 6242: 6242: 6242: 6242: }; 6242: 6242: template< typename T > 6242: struct is_not_na 6242: : true_ 6242: { 6242: 6242: 6242: 6242: }; 6242: 6242: template<> 6242: struct is_not_na 6242: : false_ 6242: { 6242: 6242: 6242: 6242: }; 6242: 6242: 6242: template< typename T, typename U > struct if_na 6242: { 6242: typedef T type; 6242: }; 6242: 6242: template< typename U > struct if_na 6242: { 6242: typedef U type; 6242: }; 6242: # 93 "/usr/include/boost/mpl/aux_/na.hpp" 3 4 6242: }} 6242: # 19 "/usr/include/boost/mpl/lambda_fwd.hpp" 2 3 4 6242: # 1 "/usr/include/boost/mpl/aux_/config/lambda.hpp" 1 3 4 6242: # 17 "/usr/include/boost/mpl/aux_/config/lambda.hpp" 3 4 6242: # 1 "/usr/include/boost/mpl/aux_/config/ttp.hpp" 1 3 4 6242: # 18 "/usr/include/boost/mpl/aux_/config/lambda.hpp" 2 3 4 6242: # 20 "/usr/include/boost/mpl/lambda_fwd.hpp" 2 3 4 6242: 6242: 6242: 6242: # 1 "/usr/include/boost/mpl/int.hpp" 1 3 4 6242: # 17 "/usr/include/boost/mpl/int.hpp" 3 4 6242: # 1 "/usr/include/boost/mpl/int_fwd.hpp" 1 3 4 6242: # 18 "/usr/include/boost/mpl/int_fwd.hpp" 3 4 6242: # 1 "/usr/include/boost/mpl/aux_/nttp_decl.hpp" 1 3 4 6242: # 17 "/usr/include/boost/mpl/aux_/nttp_decl.hpp" 3 4 6242: # 1 "/usr/include/boost/mpl/aux_/config/nttp.hpp" 1 3 4 6242: # 18 "/usr/include/boost/mpl/aux_/nttp_decl.hpp" 2 3 4 6242: # 19 "/usr/include/boost/mpl/int_fwd.hpp" 2 3 4 6242: 6242: namespace mpl_ { 6242: 6242: template< int N > struct int_; 6242: 6242: } 6242: namespace boost { namespace mpl { using ::mpl_::int_; } } 6242: # 18 "/usr/include/boost/mpl/int.hpp" 2 3 4 6242: 6242: 6242: # 1 "/usr/include/boost/mpl/aux_/integral_wrapper.hpp" 1 3 4 6242: # 17 "/usr/include/boost/mpl/aux_/integral_wrapper.hpp" 3 4 6242: # 1 "/usr/include/boost/mpl/aux_/static_cast.hpp" 1 3 4 6242: # 18 "/usr/include/boost/mpl/aux_/integral_wrapper.hpp" 2 3 4 6242: 6242: 6242: 6242: 6242: # 1 "/usr/include/boost/preprocessor/cat.hpp" 1 3 4 6242: # 17 "/usr/include/boost/preprocessor/cat.hpp" 3 4 6242: # 1 "/usr/include/boost/preprocessor/config/config.hpp" 1 3 4 6242: # 18 "/usr/include/boost/preprocessor/cat.hpp" 2 3 4 6242: # 23 "/usr/include/boost/mpl/aux_/integral_wrapper.hpp" 2 3 4 6242: # 40 "/usr/include/boost/mpl/aux_/integral_wrapper.hpp" 3 4 6242: namespace mpl_ { 6242: 6242: template< int N > 6242: struct int_ 6242: { 6242: static const int value = N; 6242: 6242: 6242: 6242: 6242: 6242: typedef int_ type; 6242: 6242: typedef int value_type; 6242: typedef integral_c_tag tag; 6242: # 72 "/usr/include/boost/mpl/aux_/integral_wrapper.hpp" 3 4 6242: typedef mpl_::int_< static_cast((value + 1)) > next; 6242: typedef mpl_::int_< static_cast((value - 1)) > prior; 6242: 6242: 6242: 6242: 6242: 6242: 6242: constexpr operator int() const { return static_cast(this->value); } 6242: }; 6242: 6242: 6242: template< int N > 6242: int const mpl_::int_< N >::value; 6242: 6242: 6242: } 6242: # 21 "/usr/include/boost/mpl/int.hpp" 2 3 4 6242: # 24 "/usr/include/boost/mpl/lambda_fwd.hpp" 2 3 4 6242: # 1 "/usr/include/boost/mpl/aux_/lambda_arity_param.hpp" 1 3 4 6242: # 25 "/usr/include/boost/mpl/lambda_fwd.hpp" 2 3 4 6242: # 1 "/usr/include/boost/mpl/aux_/template_arity_fwd.hpp" 1 3 4 6242: # 17 "/usr/include/boost/mpl/aux_/template_arity_fwd.hpp" 3 4 6242: namespace boost { namespace mpl { namespace aux { 6242: 6242: template< typename F > struct template_arity; 6242: 6242: }}} 6242: # 26 "/usr/include/boost/mpl/lambda_fwd.hpp" 2 3 4 6242: 6242: namespace boost { namespace mpl { 6242: 6242: template< 6242: typename T = na 6242: , typename Tag = void_ 6242: , typename Arity = int_< aux::template_arity::value > 6242: 6242: 6242: > 6242: struct lambda; 6242: 6242: }} 6242: # 19 "/usr/include/boost/mpl/aux_/na_spec.hpp" 2 3 4 6242: 6242: 6242: 6242: # 1 "/usr/include/boost/mpl/aux_/arity.hpp" 1 3 4 6242: # 17 "/usr/include/boost/mpl/aux_/arity.hpp" 3 4 6242: # 1 "/usr/include/boost/mpl/aux_/config/dtp.hpp" 1 3 4 6242: # 18 "/usr/include/boost/mpl/aux_/arity.hpp" 2 3 4 6242: # 23 "/usr/include/boost/mpl/aux_/na_spec.hpp" 2 3 4 6242: 6242: 6242: 6242: # 1 "/usr/include/boost/mpl/aux_/preprocessor/params.hpp" 1 3 4 6242: # 17 "/usr/include/boost/mpl/aux_/preprocessor/params.hpp" 3 4 6242: # 1 "/usr/include/boost/mpl/aux_/config/preprocessor.hpp" 1 3 4 6242: # 18 "/usr/include/boost/mpl/aux_/preprocessor/params.hpp" 2 3 4 6242: # 45 "/usr/include/boost/mpl/aux_/preprocessor/params.hpp" 3 4 6242: # 1 "/usr/include/boost/preprocessor/comma_if.hpp" 1 3 4 6242: # 15 "/usr/include/boost/preprocessor/comma_if.hpp" 3 4 6242: # 1 "/usr/include/boost/preprocessor/punctuation/comma_if.hpp" 1 3 4 6242: # 18 "/usr/include/boost/preprocessor/punctuation/comma_if.hpp" 3 4 6242: # 1 "/usr/include/boost/preprocessor/control/if.hpp" 1 3 4 6242: # 18 "/usr/include/boost/preprocessor/control/if.hpp" 3 4 6242: # 1 "/usr/include/boost/preprocessor/control/iif.hpp" 1 3 4 6242: # 19 "/usr/include/boost/preprocessor/control/if.hpp" 2 3 4 6242: # 1 "/usr/include/boost/preprocessor/logical/bool.hpp" 1 3 4 6242: # 20 "/usr/include/boost/preprocessor/control/if.hpp" 2 3 4 6242: # 19 "/usr/include/boost/preprocessor/punctuation/comma_if.hpp" 2 3 4 6242: # 1 "/usr/include/boost/preprocessor/facilities/empty.hpp" 1 3 4 6242: # 20 "/usr/include/boost/preprocessor/punctuation/comma_if.hpp" 2 3 4 6242: # 1 "/usr/include/boost/preprocessor/punctuation/comma.hpp" 1 3 4 6242: # 21 "/usr/include/boost/preprocessor/punctuation/comma_if.hpp" 2 3 4 6242: # 16 "/usr/include/boost/preprocessor/comma_if.hpp" 2 3 4 6242: # 46 "/usr/include/boost/mpl/aux_/preprocessor/params.hpp" 2 3 4 6242: # 1 "/usr/include/boost/preprocessor/repeat.hpp" 1 3 4 6242: # 15 "/usr/include/boost/preprocessor/repeat.hpp" 3 4 6242: # 1 "/usr/include/boost/preprocessor/repetition/repeat.hpp" 1 3 4 6242: # 19 "/usr/include/boost/preprocessor/repetition/repeat.hpp" 3 4 6242: # 1 "/usr/include/boost/preprocessor/debug/error.hpp" 1 3 4 6242: # 20 "/usr/include/boost/preprocessor/repetition/repeat.hpp" 2 3 4 6242: # 1 "/usr/include/boost/preprocessor/detail/auto_rec.hpp" 1 3 4 6242: # 21 "/usr/include/boost/preprocessor/repetition/repeat.hpp" 2 3 4 6242: # 1 "/usr/include/boost/preprocessor/tuple/eat.hpp" 1 3 4 6242: # 22 "/usr/include/boost/preprocessor/repetition/repeat.hpp" 2 3 4 6242: # 16 "/usr/include/boost/preprocessor/repeat.hpp" 2 3 4 6242: # 47 "/usr/include/boost/mpl/aux_/preprocessor/params.hpp" 2 3 4 6242: # 1 "/usr/include/boost/preprocessor/inc.hpp" 1 3 4 6242: # 15 "/usr/include/boost/preprocessor/inc.hpp" 3 4 6242: # 1 "/usr/include/boost/preprocessor/arithmetic/inc.hpp" 1 3 4 6242: # 16 "/usr/include/boost/preprocessor/inc.hpp" 2 3 4 6242: # 48 "/usr/include/boost/mpl/aux_/preprocessor/params.hpp" 2 3 4 6242: # 27 "/usr/include/boost/mpl/aux_/na_spec.hpp" 2 3 4 6242: # 1 "/usr/include/boost/mpl/aux_/preprocessor/enum.hpp" 1 3 4 6242: # 28 "/usr/include/boost/mpl/aux_/na_spec.hpp" 2 3 4 6242: # 1 "/usr/include/boost/mpl/aux_/preprocessor/def_params_tail.hpp" 1 3 4 6242: # 17 "/usr/include/boost/mpl/aux_/preprocessor/def_params_tail.hpp" 3 4 6242: # 1 "/usr/include/boost/mpl/limits/arity.hpp" 1 3 4 6242: # 18 "/usr/include/boost/mpl/aux_/preprocessor/def_params_tail.hpp" 2 3 4 6242: 6242: 6242: 6242: 6242: # 1 "/usr/include/boost/preprocessor/logical/and.hpp" 1 3 4 6242: # 19 "/usr/include/boost/preprocessor/logical/and.hpp" 3 4 6242: # 1 "/usr/include/boost/preprocessor/logical/bitand.hpp" 1 3 4 6242: # 20 "/usr/include/boost/preprocessor/logical/and.hpp" 2 3 4 6242: # 23 "/usr/include/boost/mpl/aux_/preprocessor/def_params_tail.hpp" 2 3 4 6242: # 1 "/usr/include/boost/preprocessor/identity.hpp" 1 3 4 6242: # 15 "/usr/include/boost/preprocessor/identity.hpp" 3 4 6242: # 1 "/usr/include/boost/preprocessor/facilities/identity.hpp" 1 3 4 6242: # 16 "/usr/include/boost/preprocessor/identity.hpp" 2 3 4 6242: # 24 "/usr/include/boost/mpl/aux_/preprocessor/def_params_tail.hpp" 2 3 4 6242: # 1 "/usr/include/boost/preprocessor/empty.hpp" 1 3 4 6242: # 25 "/usr/include/boost/mpl/aux_/preprocessor/def_params_tail.hpp" 2 3 4 6242: # 66 "/usr/include/boost/mpl/aux_/preprocessor/def_params_tail.hpp" 3 4 6242: # 1 "/usr/include/boost/preprocessor/arithmetic/add.hpp" 1 3 4 6242: # 17 "/usr/include/boost/preprocessor/arithmetic/add.hpp" 3 4 6242: # 1 "/usr/include/boost/preprocessor/arithmetic/dec.hpp" 1 3 4 6242: # 18 "/usr/include/boost/preprocessor/arithmetic/add.hpp" 2 3 4 6242: 6242: 6242: # 1 "/usr/include/boost/preprocessor/control/while.hpp" 1 3 4 6242: # 20 "/usr/include/boost/preprocessor/control/while.hpp" 3 4 6242: # 1 "/usr/include/boost/preprocessor/detail/auto_rec.hpp" 1 3 4 6242: # 21 "/usr/include/boost/preprocessor/control/while.hpp" 2 3 4 6242: # 1 "/usr/include/boost/preprocessor/list/fold_left.hpp" 1 3 4 6242: # 18 "/usr/include/boost/preprocessor/list/fold_left.hpp" 3 4 6242: # 1 "/usr/include/boost/preprocessor/control/while.hpp" 1 3 4 6242: # 19 "/usr/include/boost/preprocessor/list/fold_left.hpp" 2 3 4 6242: 6242: # 1 "/usr/include/boost/preprocessor/detail/auto_rec.hpp" 1 3 4 6242: # 21 "/usr/include/boost/preprocessor/list/fold_left.hpp" 2 3 4 6242: # 41 "/usr/include/boost/preprocessor/list/fold_left.hpp" 3 4 6242: # 1 "/usr/include/boost/preprocessor/list/detail/fold_left.hpp" 1 3 4 6242: # 17 "/usr/include/boost/preprocessor/list/detail/fold_left.hpp" 3 4 6242: # 1 "/usr/include/boost/preprocessor/control/expr_iif.hpp" 1 3 4 6242: # 18 "/usr/include/boost/preprocessor/list/detail/fold_left.hpp" 2 3 4 6242: 6242: # 1 "/usr/include/boost/preprocessor/list/adt.hpp" 1 3 4 6242: # 18 "/usr/include/boost/preprocessor/list/adt.hpp" 3 4 6242: # 1 "/usr/include/boost/preprocessor/detail/is_binary.hpp" 1 3 4 6242: # 16 "/usr/include/boost/preprocessor/detail/is_binary.hpp" 3 4 6242: # 1 "/usr/include/boost/preprocessor/detail/check.hpp" 1 3 4 6242: # 17 "/usr/include/boost/preprocessor/detail/is_binary.hpp" 2 3 4 6242: # 19 "/usr/include/boost/preprocessor/list/adt.hpp" 2 3 4 6242: # 1 "/usr/include/boost/preprocessor/logical/compl.hpp" 1 3 4 6242: # 20 "/usr/include/boost/preprocessor/list/adt.hpp" 2 3 4 6242: # 20 "/usr/include/boost/preprocessor/list/detail/fold_left.hpp" 2 3 4 6242: # 42 "/usr/include/boost/preprocessor/list/fold_left.hpp" 2 3 4 6242: # 22 "/usr/include/boost/preprocessor/control/while.hpp" 2 3 4 6242: # 1 "/usr/include/boost/preprocessor/list/fold_right.hpp" 1 3 4 6242: # 20 "/usr/include/boost/preprocessor/list/fold_right.hpp" 3 4 6242: # 1 "/usr/include/boost/preprocessor/detail/auto_rec.hpp" 1 3 4 6242: # 21 "/usr/include/boost/preprocessor/list/fold_right.hpp" 2 3 4 6242: # 37 "/usr/include/boost/preprocessor/list/fold_right.hpp" 3 4 6242: # 1 "/usr/include/boost/preprocessor/list/detail/fold_right.hpp" 1 3 4 6242: # 18 "/usr/include/boost/preprocessor/list/detail/fold_right.hpp" 3 4 6242: # 1 "/usr/include/boost/preprocessor/list/reverse.hpp" 1 3 4 6242: # 19 "/usr/include/boost/preprocessor/list/detail/fold_right.hpp" 2 3 4 6242: # 38 "/usr/include/boost/preprocessor/list/fold_right.hpp" 2 3 4 6242: # 23 "/usr/include/boost/preprocessor/control/while.hpp" 2 3 4 6242: # 48 "/usr/include/boost/preprocessor/control/while.hpp" 3 4 6242: # 1 "/usr/include/boost/preprocessor/control/detail/while.hpp" 1 3 4 6242: # 49 "/usr/include/boost/preprocessor/control/while.hpp" 2 3 4 6242: # 21 "/usr/include/boost/preprocessor/arithmetic/add.hpp" 2 3 4 6242: # 1 "/usr/include/boost/preprocessor/tuple/elem.hpp" 1 3 4 6242: # 20 "/usr/include/boost/preprocessor/tuple/elem.hpp" 3 4 6242: # 1 "/usr/include/boost/preprocessor/facilities/expand.hpp" 1 3 4 6242: # 21 "/usr/include/boost/preprocessor/tuple/elem.hpp" 2 3 4 6242: # 1 "/usr/include/boost/preprocessor/facilities/overload.hpp" 1 3 4 6242: # 17 "/usr/include/boost/preprocessor/facilities/overload.hpp" 3 4 6242: # 1 "/usr/include/boost/preprocessor/variadic/size.hpp" 1 3 4 6242: # 18 "/usr/include/boost/preprocessor/facilities/overload.hpp" 2 3 4 6242: # 22 "/usr/include/boost/preprocessor/tuple/elem.hpp" 2 3 4 6242: # 1 "/usr/include/boost/preprocessor/tuple/rem.hpp" 1 3 4 6242: # 20 "/usr/include/boost/preprocessor/tuple/rem.hpp" 3 4 6242: # 1 "/usr/include/boost/preprocessor/tuple/detail/is_single_return.hpp" 1 3 4 6242: # 21 "/usr/include/boost/preprocessor/tuple/rem.hpp" 2 3 4 6242: # 23 "/usr/include/boost/preprocessor/tuple/elem.hpp" 2 3 4 6242: # 1 "/usr/include/boost/preprocessor/variadic/elem.hpp" 1 3 4 6242: # 24 "/usr/include/boost/preprocessor/tuple/elem.hpp" 2 3 4 6242: # 22 "/usr/include/boost/preprocessor/arithmetic/add.hpp" 2 3 4 6242: # 67 "/usr/include/boost/mpl/aux_/preprocessor/def_params_tail.hpp" 2 3 4 6242: # 1 "/usr/include/boost/preprocessor/arithmetic/sub.hpp" 1 3 4 6242: # 68 "/usr/include/boost/mpl/aux_/preprocessor/def_params_tail.hpp" 2 3 4 6242: # 29 "/usr/include/boost/mpl/aux_/na_spec.hpp" 2 3 4 6242: 6242: 6242: # 1 "/usr/include/boost/mpl/aux_/config/eti.hpp" 1 3 4 6242: # 32 "/usr/include/boost/mpl/aux_/na_spec.hpp" 2 3 4 6242: 6242: 6242: 6242: # 1 "/usr/include/boost/mpl/aux_/config/overload_resolution.hpp" 1 3 4 6242: # 36 "/usr/include/boost/mpl/aux_/na_spec.hpp" 2 3 4 6242: # 21 "/usr/include/boost/mpl/has_xxx.hpp" 2 3 4 6242: # 1 "/usr/include/boost/mpl/aux_/type_wrapper.hpp" 1 3 4 6242: # 20 "/usr/include/boost/mpl/aux_/type_wrapper.hpp" 3 4 6242: namespace boost { namespace mpl { namespace aux { 6242: 6242: template< typename T > struct type_wrapper 6242: { 6242: typedef T type; 6242: }; 6242: 6242: 6242: 6242: 6242: 6242: 6242: template< typename T > struct wrapped_type; 6242: 6242: template< typename T > struct wrapped_type< type_wrapper > 6242: { 6242: typedef T type; 6242: }; 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: }}} 6242: # 22 "/usr/include/boost/mpl/has_xxx.hpp" 2 3 4 6242: # 1 "/usr/include/boost/mpl/aux_/yes_no.hpp" 1 3 4 6242: # 18 "/usr/include/boost/mpl/aux_/yes_no.hpp" 3 4 6242: # 1 "/usr/include/boost/mpl/aux_/config/arrays.hpp" 1 3 4 6242: # 19 "/usr/include/boost/mpl/aux_/yes_no.hpp" 2 3 4 6242: 6242: 6242: 6242: 6242: namespace boost { namespace mpl { namespace aux { 6242: 6242: typedef char (&no_tag)[1]; 6242: typedef char (&yes_tag)[2]; 6242: 6242: template< bool C_ > struct yes_no_tag 6242: { 6242: typedef no_tag type; 6242: }; 6242: 6242: template<> struct yes_no_tag 6242: { 6242: typedef yes_tag type; 6242: }; 6242: 6242: 6242: template< long n > struct weighted_tag 6242: { 6242: 6242: typedef char (&type)[n]; 6242: 6242: 6242: 6242: 6242: }; 6242: # 56 "/usr/include/boost/mpl/aux_/yes_no.hpp" 3 4 6242: }}} 6242: # 23 "/usr/include/boost/mpl/has_xxx.hpp" 2 3 4 6242: 6242: # 1 "/usr/include/boost/mpl/aux_/config/has_xxx.hpp" 1 3 4 6242: # 25 "/usr/include/boost/mpl/has_xxx.hpp" 2 3 4 6242: # 1 "/usr/include/boost/mpl/aux_/config/msvc_typename.hpp" 1 3 4 6242: # 26 "/usr/include/boost/mpl/has_xxx.hpp" 2 3 4 6242: 6242: 6242: 6242: 6242: # 1 "/usr/include/boost/preprocessor/array/elem.hpp" 1 3 4 6242: # 15 "/usr/include/boost/preprocessor/array/elem.hpp" 3 4 6242: # 1 "/usr/include/boost/preprocessor/array/data.hpp" 1 3 4 6242: # 16 "/usr/include/boost/preprocessor/array/elem.hpp" 2 3 4 6242: # 1 "/usr/include/boost/preprocessor/array/size.hpp" 1 3 4 6242: # 17 "/usr/include/boost/preprocessor/array/elem.hpp" 2 3 4 6242: # 31 "/usr/include/boost/mpl/has_xxx.hpp" 2 3 4 6242: 6242: 6242: # 1 "/usr/include/boost/preprocessor/repetition/enum_params.hpp" 1 3 4 6242: # 34 "/usr/include/boost/mpl/has_xxx.hpp" 2 3 4 6242: # 1 "/usr/include/boost/preprocessor/repetition/enum_trailing_params.hpp" 1 3 4 6242: # 35 "/usr/include/boost/mpl/has_xxx.hpp" 2 3 4 6242: # 57 "/usr/include/boost/regex/v4/regex_traits.hpp" 2 3 4 6242: # 70 "/usr/include/boost/regex/v4/regex_traits.hpp" 3 4 6242: namespace boost{ 6242: 6242: template 6242: struct regex_traits : public implementationT 6242: { 6242: regex_traits() : implementationT() {} 6242: }; 6242: # 85 "/usr/include/boost/regex/v4/regex_traits.hpp" 3 4 6242: namespace re_detail_106501{ 6242: 6242: template< typename T, typename fallback_ = boost::mpl::bool_ > struct has_boost_extensions_tag { struct gcc_3_2_wknd { template< typename U > static boost::mpl::aux::yes_tag test( boost::mpl::aux::type_wrapper const volatile* , boost::mpl::aux::type_wrapper* = 0 ); static boost::mpl::aux::no_tag test(...); }; typedef boost::mpl::aux::type_wrapper t_; static const bool value = sizeof(gcc_3_2_wknd::test(static_cast(0))) == sizeof(boost::mpl::aux::yes_tag); typedef boost::mpl::bool_ type; }; 6242: # 96 "/usr/include/boost/regex/v4/regex_traits.hpp" 3 4 6242: template 6242: struct default_wrapper : public BaseT 6242: { 6242: typedef typename BaseT::char_type char_type; 6242: std::string error_string(::boost::regex_constants::error_type e)const 6242: { 6242: return ::boost::re_detail_106501::get_default_error_string(e); 6242: } 6242: ::boost::regex_constants::syntax_type syntax_type(char_type c)const 6242: { 6242: return ((c & 0x7f) == c) ? get_default_syntax_type(static_cast(c)) : ::boost::regex_constants::syntax_char; 6242: } 6242: ::boost::regex_constants::escape_syntax_type escape_syntax_type(char_type c)const 6242: { 6242: return ((c & 0x7f) == c) ? get_default_escape_syntax_type(static_cast(c)) : ::boost::regex_constants::escape_type_identity; 6242: } 6242: boost::intmax_t toi(const char_type*& p1, const char_type* p2, int radix)const 6242: { 6242: return ::boost::re_detail_106501::global_toi(p1, p2, radix, *this); 6242: } 6242: char_type translate(char_type c, bool icase)const 6242: { 6242: return (icase ? this->translate_nocase(c) : this->translate(c)); 6242: } 6242: char_type translate(char_type c)const 6242: { 6242: return BaseT::translate(c); 6242: } 6242: char_type tolower(char_type c)const 6242: { 6242: return ::boost::re_detail_106501::global_lower(c); 6242: } 6242: char_type toupper(char_type c)const 6242: { 6242: return ::boost::re_detail_106501::global_upper(c); 6242: } 6242: }; 6242: 6242: template 6242: struct compute_wrapper_base 6242: { 6242: typedef BaseT type; 6242: }; 6242: 6242: template 6242: struct compute_wrapper_base 6242: { 6242: typedef default_wrapper type; 6242: }; 6242: # 160 "/usr/include/boost/regex/v4/regex_traits.hpp" 3 4 6242: } 6242: 6242: template 6242: struct regex_traits_wrapper 6242: : public ::boost::re_detail_106501::compute_wrapper_base< 6242: BaseT, 6242: ::boost::re_detail_106501::has_boost_extensions_tag::value 6242: >::type 6242: { 6242: regex_traits_wrapper(){} 6242: private: 6242: regex_traits_wrapper(const regex_traits_wrapper&); 6242: regex_traits_wrapper& operator=(const regex_traits_wrapper&); 6242: }; 6242: 6242: } 6242: # 28 "/usr/include/boost/regex/regex_traits.hpp" 2 3 4 6242: # 40 "/usr/include/boost/regex/v4/regex.hpp" 2 3 4 6242: 6242: 6242: 6242: 6242: 6242: # 1 "/usr/include/boost/regex/v4/match_flags.hpp" 1 3 4 6242: # 23 "/usr/include/boost/regex/v4/match_flags.hpp" 3 4 6242: # 1 "/usr/include/boost/cstdint.hpp" 1 3 4 6242: # 24 "/usr/include/boost/regex/v4/match_flags.hpp" 2 3 4 6242: 6242: 6242: 6242: 6242: namespace boost{ 6242: namespace regex_constants{ 6242: 6242: 6242: typedef enum _match_flags 6242: { 6242: match_default = 0, 6242: match_not_bol = 1, 6242: match_not_eol = match_not_bol << 1, 6242: match_not_bob = match_not_eol << 1, 6242: match_not_eob = match_not_bob << 1, 6242: match_not_bow = match_not_eob << 1, 6242: match_not_eow = match_not_bow << 1, 6242: match_not_dot_newline = match_not_eow << 1, 6242: match_not_dot_null = match_not_dot_newline << 1, 6242: match_prev_avail = match_not_dot_null << 1, 6242: match_init = match_prev_avail << 1, 6242: match_any = match_init << 1, 6242: match_not_null = match_any << 1, 6242: match_continuous = match_not_null << 1, 6242: 6242: match_partial = match_continuous << 1, 6242: 6242: match_stop = match_partial << 1, 6242: match_not_initial_null = match_stop, 6242: match_all = match_stop << 1, 6242: match_perl = match_all << 1, 6242: match_posix = match_perl << 1, 6242: match_nosubs = match_posix << 1, 6242: match_extra = match_nosubs << 1, 6242: match_single_line = match_extra << 1, 6242: match_unused1 = match_single_line << 1, 6242: match_unused2 = match_unused1 << 1, 6242: match_unused3 = match_unused2 << 1, 6242: match_max = match_unused3, 6242: 6242: format_perl = 0, 6242: format_default = 0, 6242: format_sed = match_max << 1, 6242: format_all = format_sed << 1, 6242: format_no_copy = format_all << 1, 6242: format_first_only = format_no_copy << 1, 6242: format_is_if = format_first_only << 1, 6242: format_literal = format_is_if << 1, 6242: 6242: match_not_any = match_not_bol | match_not_eol | match_not_bob 6242: | match_not_eob | match_not_bow | match_not_eow | match_not_dot_newline 6242: | match_not_dot_null | match_prev_avail | match_init | match_not_null 6242: | match_continuous | match_partial | match_stop | match_not_initial_null 6242: | match_stop | match_all | match_perl | match_posix | match_nosubs 6242: | match_extra | match_single_line | match_unused1 | match_unused2 6242: | match_unused3 | match_max | format_perl | format_default | format_sed 6242: | format_all | format_no_copy | format_first_only | format_is_if 6242: | format_literal 6242: 6242: 6242: } match_flags; 6242: 6242: 6242: 6242: 6242: typedef match_flags match_flag_type; 6242: 6242: 6242: 6242: inline match_flags operator&(match_flags m1, match_flags m2) 6242: { return static_cast(static_cast(m1) & static_cast(m2)); } 6242: inline match_flags operator|(match_flags m1, match_flags m2) 6242: { return static_cast(static_cast(m1) | static_cast(m2)); } 6242: inline match_flags operator^(match_flags m1, match_flags m2) 6242: { return static_cast(static_cast(m1) ^ static_cast(m2)); } 6242: inline match_flags operator~(match_flags m1) 6242: { return static_cast(~static_cast(m1)); } 6242: inline match_flags& operator&=(match_flags& m1, match_flags m2) 6242: { m1 = m1&m2; return m1; } 6242: inline match_flags& operator|=(match_flags& m1, match_flags m2) 6242: { m1 = m1|m2; return m1; } 6242: inline match_flags& operator^=(match_flags& m1, match_flags m2) 6242: { m1 = m1^m2; return m1; } 6242: 6242: 6242: 6242: 6242: } 6242: 6242: 6242: 6242: using regex_constants::match_flag_type; 6242: using regex_constants::match_default; 6242: using regex_constants::match_not_bol; 6242: using regex_constants::match_not_eol; 6242: using regex_constants::match_not_bob; 6242: using regex_constants::match_not_eob; 6242: using regex_constants::match_not_bow; 6242: using regex_constants::match_not_eow; 6242: using regex_constants::match_not_dot_newline; 6242: using regex_constants::match_not_dot_null; 6242: using regex_constants::match_prev_avail; 6242: 6242: using regex_constants::match_any; 6242: using regex_constants::match_not_null; 6242: using regex_constants::match_continuous; 6242: using regex_constants::match_partial; 6242: 6242: using regex_constants::match_all; 6242: using regex_constants::match_perl; 6242: using regex_constants::match_posix; 6242: using regex_constants::match_nosubs; 6242: using regex_constants::match_extra; 6242: using regex_constants::match_single_line; 6242: 6242: using regex_constants::format_all; 6242: using regex_constants::format_sed; 6242: using regex_constants::format_perl; 6242: using regex_constants::format_default; 6242: using regex_constants::format_no_copy; 6242: using regex_constants::format_first_only; 6242: 6242: 6242: } 6242: # 46 "/usr/include/boost/regex/v4/regex.hpp" 2 3 4 6242: 6242: 6242: # 1 "/usr/include/boost/regex/v4/regex_raw_buffer.hpp" 1 3 4 6242: # 31 "/usr/include/boost/regex/v4/regex_raw_buffer.hpp" 3 4 6242: namespace boost{ 6242: namespace re_detail_106501{ 6242: # 45 "/usr/include/boost/regex/v4/regex_raw_buffer.hpp" 3 4 6242: struct empty_padding{}; 6242: 6242: union padding 6242: { 6242: void* p; 6242: unsigned int i; 6242: }; 6242: 6242: template 6242: struct padding3 6242: { 6242: enum{ 6242: padding_size = 8, 6242: padding_mask = 7 6242: }; 6242: }; 6242: 6242: template<> 6242: struct padding3<2> 6242: { 6242: enum{ 6242: padding_size = 2, 6242: padding_mask = 1 6242: }; 6242: }; 6242: 6242: template<> 6242: struct padding3<4> 6242: { 6242: enum{ 6242: padding_size = 4, 6242: padding_mask = 3 6242: }; 6242: }; 6242: 6242: template<> 6242: struct padding3<8> 6242: { 6242: enum{ 6242: padding_size = 8, 6242: padding_mask = 7 6242: }; 6242: }; 6242: 6242: template<> 6242: struct padding3<16> 6242: { 6242: enum{ 6242: padding_size = 16, 6242: padding_mask = 15 6242: }; 6242: }; 6242: 6242: enum{ 6242: padding_size = padding3::padding_size, 6242: padding_mask = padding3::padding_mask 6242: }; 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: class raw_storage 6242: { 6242: public: 6242: typedef std::size_t size_type; 6242: typedef unsigned char* pointer; 6242: private: 6242: pointer last, start, end; 6242: public: 6242: 6242: raw_storage(); 6242: raw_storage(size_type n); 6242: 6242: ~raw_storage() 6242: { 6242: ::operator delete(start); 6242: } 6242: 6242: void resize(size_type n); 6242: 6242: void* extend(size_type n) 6242: { 6242: if(size_type(last - end) < n) 6242: resize(n + (end - start)); 6242: pointer result = end; 6242: end += n; 6242: return result; 6242: } 6242: 6242: void* insert(size_type pos, size_type n); 6242: 6242: size_type size() 6242: { 6242: return end - start; 6242: } 6242: 6242: size_type capacity() 6242: { 6242: return last - start; 6242: } 6242: 6242: void* data()const 6242: { 6242: return start; 6242: } 6242: 6242: size_type index(void* ptr) 6242: { 6242: return static_cast(ptr) - static_cast(data()); 6242: } 6242: 6242: void clear() 6242: { 6242: end = start; 6242: } 6242: 6242: void align() 6242: { 6242: 6242: end = start + (((end - start) + padding_mask) & ~padding_mask); 6242: } 6242: void swap(raw_storage& that) 6242: { 6242: std::swap(start, that.start); 6242: std::swap(end, that.end); 6242: std::swap(last, that.last); 6242: } 6242: }; 6242: 6242: inline raw_storage::raw_storage() 6242: { 6242: last = start = end = 0; 6242: } 6242: 6242: inline raw_storage::raw_storage(size_type n) 6242: { 6242: start = end = static_cast(::operator new(n)); 6242: 6242: last = start + n; 6242: } 6242: # 201 "/usr/include/boost/regex/v4/regex_raw_buffer.hpp" 3 4 6242: } 6242: } 6242: # 49 "/usr/include/boost/regex/v4/regex.hpp" 2 3 4 6242: 6242: 6242: 6242: 6242: 6242: 6242: # 1 "/usr/include/boost/regex/v4/char_regex_traits.hpp" 1 3 4 6242: # 34 "/usr/include/boost/regex/v4/char_regex_traits.hpp" 3 4 6242: namespace boost{ 6242: 6242: namespace deprecated{ 6242: 6242: 6242: 6242: template 6242: class char_regex_traits_i : public regex_traits {}; 6242: 6242: template<> 6242: class char_regex_traits_i : public regex_traits 6242: { 6242: public: 6242: typedef char char_type; 6242: typedef unsigned char uchar_type; 6242: typedef unsigned int size_type; 6242: typedef regex_traits base_type; 6242: 6242: }; 6242: 6242: 6242: template<> 6242: class char_regex_traits_i : public regex_traits 6242: { 6242: public: 6242: typedef wchar_t char_type; 6242: typedef unsigned short uchar_type; 6242: typedef unsigned int size_type; 6242: typedef regex_traits base_type; 6242: 6242: }; 6242: 6242: } 6242: } 6242: # 56 "/usr/include/boost/regex/v4/regex.hpp" 2 3 4 6242: 6242: 6242: # 1 "/usr/include/boost/regex/v4/states.hpp" 1 3 4 6242: # 33 "/usr/include/boost/regex/v4/states.hpp" 3 4 6242: namespace boost{ 6242: namespace re_detail_106501{ 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: enum mask_type 6242: { 6242: mask_take = 1, 6242: mask_skip = 2, 6242: mask_init = 4, 6242: mask_any = mask_skip | mask_take, 6242: mask_all = mask_any 6242: }; 6242: 6242: 6242: 6242: 6242: 6242: struct _narrow_type{}; 6242: struct _wide_type{}; 6242: template struct is_byte; 6242: template<> struct is_byte { typedef _narrow_type width_type; }; 6242: template<> struct is_byte{ typedef _narrow_type width_type; }; 6242: template<> struct is_byte { typedef _narrow_type width_type; }; 6242: template struct is_byte { typedef _wide_type width_type; }; 6242: 6242: 6242: 6242: 6242: enum syntax_element_type 6242: { 6242: 6242: syntax_element_startmark = 0, 6242: 6242: syntax_element_endmark = syntax_element_startmark + 1, 6242: 6242: syntax_element_literal = syntax_element_endmark + 1, 6242: 6242: syntax_element_start_line = syntax_element_literal + 1, 6242: 6242: syntax_element_end_line = syntax_element_start_line + 1, 6242: 6242: syntax_element_wild = syntax_element_end_line + 1, 6242: 6242: syntax_element_match = syntax_element_wild + 1, 6242: 6242: syntax_element_word_boundary = syntax_element_match + 1, 6242: 6242: syntax_element_within_word = syntax_element_word_boundary + 1, 6242: 6242: syntax_element_word_start = syntax_element_within_word + 1, 6242: 6242: syntax_element_word_end = syntax_element_word_start + 1, 6242: 6242: syntax_element_buffer_start = syntax_element_word_end + 1, 6242: 6242: syntax_element_buffer_end = syntax_element_buffer_start + 1, 6242: 6242: syntax_element_backref = syntax_element_buffer_end + 1, 6242: 6242: syntax_element_long_set = syntax_element_backref + 1, 6242: 6242: syntax_element_set = syntax_element_long_set + 1, 6242: 6242: syntax_element_jump = syntax_element_set + 1, 6242: 6242: syntax_element_alt = syntax_element_jump + 1, 6242: 6242: syntax_element_rep = syntax_element_alt + 1, 6242: 6242: syntax_element_combining = syntax_element_rep + 1, 6242: 6242: syntax_element_soft_buffer_end = syntax_element_combining + 1, 6242: 6242: syntax_element_restart_continue = syntax_element_soft_buffer_end + 1, 6242: 6242: syntax_element_dot_rep = syntax_element_restart_continue + 1, 6242: syntax_element_char_rep = syntax_element_dot_rep + 1, 6242: syntax_element_short_set_rep = syntax_element_char_rep + 1, 6242: syntax_element_long_set_rep = syntax_element_short_set_rep + 1, 6242: 6242: syntax_element_backstep = syntax_element_long_set_rep + 1, 6242: 6242: syntax_element_assert_backref = syntax_element_backstep + 1, 6242: syntax_element_toggle_case = syntax_element_assert_backref + 1, 6242: 6242: syntax_element_recurse = syntax_element_toggle_case + 1, 6242: 6242: syntax_element_fail = syntax_element_recurse + 1, 6242: syntax_element_accept = syntax_element_fail + 1, 6242: syntax_element_commit = syntax_element_accept + 1, 6242: syntax_element_then = syntax_element_commit + 1 6242: }; 6242: 6242: 6242: 6242: 6242: 6242: 6242: struct re_syntax_base; 6242: 6242: 6242: 6242: 6242: 6242: 6242: union offset_type 6242: { 6242: re_syntax_base* p; 6242: std::ptrdiff_t i; 6242: }; 6242: 6242: 6242: 6242: 6242: struct re_syntax_base 6242: { 6242: syntax_element_type type; 6242: offset_type next; 6242: }; 6242: 6242: 6242: 6242: 6242: struct re_brace : public re_syntax_base 6242: { 6242: 6242: 6242: int index; 6242: bool icase; 6242: }; 6242: 6242: 6242: 6242: 6242: enum 6242: { 6242: dont_care = 1, 6242: force_not_newline = 0, 6242: force_newline = 2, 6242: 6242: test_not_newline = 2, 6242: test_newline = 3 6242: }; 6242: struct re_dot : public re_syntax_base 6242: { 6242: unsigned char mask; 6242: }; 6242: 6242: 6242: 6242: 6242: 6242: struct re_literal : public re_syntax_base 6242: { 6242: unsigned int length; 6242: }; 6242: 6242: 6242: 6242: 6242: struct re_case : public re_syntax_base 6242: { 6242: bool icase; 6242: }; 6242: # 210 "/usr/include/boost/regex/v4/states.hpp" 3 4 6242: template 6242: struct re_set_long : public re_syntax_base 6242: { 6242: unsigned int csingles, cranges, cequivalents; 6242: mask_type cclasses; 6242: mask_type cnclasses; 6242: bool isnot; 6242: bool singleton; 6242: }; 6242: 6242: 6242: 6242: 6242: struct re_set : public re_syntax_base 6242: { 6242: unsigned char _map[1 << 8]; 6242: }; 6242: 6242: 6242: 6242: 6242: struct re_jump : public re_syntax_base 6242: { 6242: offset_type alt; 6242: }; 6242: 6242: 6242: 6242: 6242: struct re_alt : public re_jump 6242: { 6242: unsigned char _map[1 << 8]; 6242: unsigned int can_be_null; 6242: }; 6242: 6242: 6242: 6242: 6242: struct re_repeat : public re_alt 6242: { 6242: std::size_t min, max; 6242: int state_id; 6242: bool leading; 6242: bool greedy; 6242: }; 6242: 6242: 6242: 6242: 6242: struct re_recurse : public re_jump 6242: { 6242: int state_id; 6242: }; 6242: 6242: 6242: 6242: 6242: 6242: enum commit_type 6242: { 6242: commit_prune, 6242: commit_skip, 6242: commit_commit 6242: }; 6242: struct re_commit : public re_syntax_base 6242: { 6242: commit_type action; 6242: }; 6242: 6242: 6242: 6242: 6242: 6242: 6242: enum re_jump_size_type 6242: { 6242: re_jump_size = (sizeof(re_jump) + padding_mask) & ~(padding_mask), 6242: re_repeater_size = (sizeof(re_repeat) + padding_mask) & ~(padding_mask), 6242: re_alt_size = (sizeof(re_alt) + padding_mask) & ~(padding_mask) 6242: }; 6242: 6242: 6242: 6242: 6242: 6242: template 6242: struct regex_data; 6242: 6242: template 6242: iterator re_is_set_member(iterator next, 6242: iterator last, 6242: const re_set_long* set_, 6242: const regex_data& e, bool icase); 6242: 6242: } 6242: 6242: } 6242: # 59 "/usr/include/boost/regex/v4/regex.hpp" 2 3 4 6242: 6242: 6242: # 1 "/usr/include/boost/regex/v4/regbase.hpp" 1 3 4 6242: # 33 "/usr/include/boost/regex/v4/regbase.hpp" 3 4 6242: namespace boost{ 6242: 6242: 6242: 6242: 6242: class regbase 6242: { 6242: public: 6242: enum flag_type_ 6242: { 6242: # 53 "/usr/include/boost/regex/v4/regbase.hpp" 3 4 6242: perl_syntax_group = 0, 6242: basic_syntax_group = 1, 6242: literal = 2, 6242: main_option_type = literal | basic_syntax_group | perl_syntax_group, 6242: 6242: 6242: 6242: no_bk_refs = 1 << 8, 6242: no_perl_ex = 1 << 9, 6242: no_mod_m = 1 << 10, 6242: mod_x = 1 << 11, 6242: mod_s = 1 << 12, 6242: no_mod_s = 1 << 13, 6242: 6242: 6242: 6242: 6242: no_char_classes = 1 << 8, 6242: no_intervals = 1 << 9, 6242: bk_plus_qm = 1 << 10, 6242: bk_vbar = 1 << 11, 6242: emacs_ex = 1 << 12, 6242: 6242: 6242: 6242: 6242: no_escape_in_lists = 1 << 16, 6242: newline_alt = 1 << 17, 6242: no_except = 1 << 18, 6242: failbit = 1 << 19, 6242: icase = 1 << 20, 6242: nocollate = 0, 6242: collate = 1 << 21, 6242: nosubs = 1 << 22, 6242: save_subexpression_location = 1 << 23, 6242: no_empty_expressions = 1 << 24, 6242: optimize = 0, 6242: 6242: 6242: 6242: basic = basic_syntax_group | collate | no_escape_in_lists, 6242: extended = no_bk_refs | collate | no_perl_ex | no_escape_in_lists, 6242: normal = 0, 6242: emacs = basic_syntax_group | collate | emacs_ex | bk_vbar, 6242: awk = no_bk_refs | collate | no_perl_ex, 6242: grep = basic | newline_alt, 6242: egrep = extended | newline_alt, 6242: sed = basic, 6242: perl = normal, 6242: ECMAScript = normal, 6242: JavaScript = normal, 6242: JScript = normal 6242: }; 6242: typedef unsigned int flag_type; 6242: 6242: enum restart_info 6242: { 6242: restart_any = 0, 6242: restart_word = 1, 6242: restart_line = 2, 6242: restart_buf = 3, 6242: restart_continue = 4, 6242: restart_lit = 5, 6242: restart_fixed_lit = 6, 6242: restart_count = 7 6242: }; 6242: }; 6242: 6242: 6242: 6242: 6242: namespace regex_constants{ 6242: 6242: enum flag_type_ 6242: { 6242: 6242: no_except = ::boost::regbase::no_except, 6242: failbit = ::boost::regbase::failbit, 6242: literal = ::boost::regbase::literal, 6242: icase = ::boost::regbase::icase, 6242: nocollate = ::boost::regbase::nocollate, 6242: collate = ::boost::regbase::collate, 6242: nosubs = ::boost::regbase::nosubs, 6242: optimize = ::boost::regbase::optimize, 6242: bk_plus_qm = ::boost::regbase::bk_plus_qm, 6242: bk_vbar = ::boost::regbase::bk_vbar, 6242: no_intervals = ::boost::regbase::no_intervals, 6242: no_char_classes = ::boost::regbase::no_char_classes, 6242: no_escape_in_lists = ::boost::regbase::no_escape_in_lists, 6242: no_mod_m = ::boost::regbase::no_mod_m, 6242: mod_x = ::boost::regbase::mod_x, 6242: mod_s = ::boost::regbase::mod_s, 6242: no_mod_s = ::boost::regbase::no_mod_s, 6242: save_subexpression_location = ::boost::regbase::save_subexpression_location, 6242: no_empty_expressions = ::boost::regbase::no_empty_expressions, 6242: 6242: basic = ::boost::regbase::basic, 6242: extended = ::boost::regbase::extended, 6242: normal = ::boost::regbase::normal, 6242: emacs = ::boost::regbase::emacs, 6242: awk = ::boost::regbase::awk, 6242: grep = ::boost::regbase::grep, 6242: egrep = ::boost::regbase::egrep, 6242: sed = basic, 6242: perl = normal, 6242: ECMAScript = normal, 6242: JavaScript = normal, 6242: JScript = normal 6242: }; 6242: typedef ::boost::regbase::flag_type syntax_option_type; 6242: 6242: } 6242: 6242: } 6242: # 62 "/usr/include/boost/regex/v4/regex.hpp" 2 3 4 6242: 6242: 6242: # 1 "/usr/include/boost/regex/v4/iterator_traits.hpp" 1 3 4 6242: # 33 "/usr/include/boost/regex/v4/iterator_traits.hpp" 3 4 6242: namespace boost{ 6242: namespace re_detail_106501{ 6242: # 115 "/usr/include/boost/regex/v4/iterator_traits.hpp" 3 4 6242: template 6242: struct regex_iterator_traits : public std::iterator_traits {}; 6242: 6242: 6242: 6242: } 6242: } 6242: # 65 "/usr/include/boost/regex/v4/regex.hpp" 2 3 4 6242: 6242: 6242: # 1 "/usr/include/boost/regex/v4/basic_regex.hpp" 1 3 4 6242: # 23 "/usr/include/boost/regex/v4/basic_regex.hpp" 3 4 6242: # 1 "/usr/include/boost/functional/hash.hpp" 1 3 4 6242: 6242: 6242: 6242: 6242: 6242: # 1 "/usr/include/boost/functional/hash/hash.hpp" 1 3 4 6242: # 19 "/usr/include/boost/functional/hash/hash.hpp" 3 4 6242: # 1 "/usr/include/boost/functional/hash/hash_fwd.hpp" 1 3 4 6242: # 15 "/usr/include/boost/functional/hash/hash_fwd.hpp" 3 4 6242: 6242: 6242: 6242: 6242: 6242: 6242: namespace boost 6242: { 6242: template struct hash; 6242: 6242: template void hash_combine(std::size_t& seed, T const& v); 6242: 6242: template std::size_t hash_range(It, It); 6242: template void hash_range(std::size_t&, It, It); 6242: 6242: 6242: 6242: 6242: 6242: } 6242: # 20 "/usr/include/boost/functional/hash/hash.hpp" 2 3 4 6242: 6242: # 1 "/usr/include/boost/functional/hash/detail/hash_float.hpp" 1 3 4 6242: # 11 "/usr/include/boost/functional/hash/detail/hash_float.hpp" 3 4 6242: 6242: 6242: 6242: # 1 "/usr/include/boost/functional/hash/detail/float_functions.hpp" 1 3 4 6242: # 11 "/usr/include/boost/functional/hash/detail/float_functions.hpp" 3 4 6242: 6242: 6242: 6242: # 1 "/usr/include/boost/config/no_tr1/cmath.hpp" 1 3 4 6242: # 21 "/usr/include/boost/config/no_tr1/cmath.hpp" 3 4 6242: # 1 "/usr/include/c++/8/cmath" 1 3 4 6242: # 39 "/usr/include/c++/8/cmath" 3 4 6242: 6242: # 40 "/usr/include/c++/8/cmath" 3 6242: 6242: 6242: 6242: 6242: 6242: # 1 "/usr/include/math.h" 1 3 4 6242: # 27 "/usr/include/math.h" 3 4 6242: # 1 "/usr/include/s390x-linux-gnu/bits/libc-header-start.h" 1 3 4 6242: # 28 "/usr/include/math.h" 2 3 4 6242: 6242: extern "C" { 6242: 6242: 6242: 6242: 6242: 6242: # 1 "/usr/include/s390x-linux-gnu/bits/math-vector.h" 1 3 4 6242: # 27 "/usr/include/s390x-linux-gnu/bits/math-vector.h" 3 4 6242: # 1 "/usr/include/s390x-linux-gnu/bits/libm-simd-decl-stubs.h" 1 3 4 6242: # 27 "/usr/include/s390x-linux-gnu/bits/math-vector.h" 2 3 4 6242: # 36 "/usr/include/math.h" 2 3 4 6242: 6242: 6242: # 1 "/usr/include/s390x-linux-gnu/bits/floatn.h" 1 3 4 6242: # 39 "/usr/include/math.h" 2 3 4 6242: 6242: 6242: 6242: # 1 "/usr/include/s390x-linux-gnu/bits/huge_val.h" 1 3 4 6242: # 43 "/usr/include/math.h" 2 3 4 6242: 6242: 6242: 6242: 6242: 6242: 6242: # 1 "/usr/include/s390x-linux-gnu/bits/huge_valf.h" 1 3 4 6242: # 50 "/usr/include/math.h" 2 3 4 6242: # 1 "/usr/include/s390x-linux-gnu/bits/huge_vall.h" 1 3 4 6242: # 51 "/usr/include/math.h" 2 3 4 6242: 6242: 6242: # 1 "/usr/include/s390x-linux-gnu/bits/inf.h" 1 3 4 6242: # 54 "/usr/include/math.h" 2 3 4 6242: 6242: 6242: # 1 "/usr/include/s390x-linux-gnu/bits/nan.h" 1 3 4 6242: # 57 "/usr/include/math.h" 2 3 4 6242: # 72 "/usr/include/math.h" 3 4 6242: # 1 "/usr/include/s390x-linux-gnu/bits/flt-eval-method.h" 1 3 4 6242: # 73 "/usr/include/math.h" 2 3 4 6242: # 86 "/usr/include/math.h" 3 4 6242: typedef double float_t; 6242: typedef double double_t; 6242: # 124 "/usr/include/math.h" 3 4 6242: # 1 "/usr/include/s390x-linux-gnu/bits/fp-logb.h" 1 3 4 6242: # 125 "/usr/include/math.h" 2 3 4 6242: # 167 "/usr/include/math.h" 3 4 6242: # 1 "/usr/include/s390x-linux-gnu/bits/fp-fast.h" 1 3 4 6242: # 168 "/usr/include/math.h" 2 3 4 6242: 6242: 6242: 6242: enum 6242: { 6242: FP_INT_UPWARD = 6242: 6242: 0, 6242: FP_INT_DOWNWARD = 6242: 6242: 1, 6242: FP_INT_TOWARDZERO = 6242: 6242: 2, 6242: FP_INT_TONEARESTFROMZERO = 6242: 6242: 3, 6242: FP_INT_TONEAREST = 6242: 6242: 4, 6242: }; 6242: # 223 "/usr/include/math.h" 3 4 6242: # 1 "/usr/include/s390x-linux-gnu/bits/mathcalls-helper-functions.h" 1 3 4 6242: # 21 "/usr/include/s390x-linux-gnu/bits/mathcalls-helper-functions.h" 3 4 6242: extern int __fpclassify (double __value) throw () 6242: __attribute__ ((__const__)); 6242: 6242: 6242: extern int __signbit (double __value) throw () 6242: __attribute__ ((__const__)); 6242: 6242: 6242: 6242: extern int __isinf (double __value) throw () __attribute__ ((__const__)); 6242: 6242: 6242: extern int __finite (double __value) throw () __attribute__ ((__const__)); 6242: 6242: 6242: extern int __isnan (double __value) throw () __attribute__ ((__const__)); 6242: 6242: 6242: extern int __iseqsig (double __x, double __y) throw (); 6242: 6242: 6242: extern int __issignaling (double __value) throw () 6242: __attribute__ ((__const__)); 6242: # 224 "/usr/include/math.h" 2 3 4 6242: # 1 "/usr/include/s390x-linux-gnu/bits/mathcalls.h" 1 3 4 6242: # 53 "/usr/include/s390x-linux-gnu/bits/mathcalls.h" 3 4 6242: extern double acos (double __x) throw (); extern double __acos (double __x) throw (); 6242: 6242: extern double asin (double __x) throw (); extern double __asin (double __x) throw (); 6242: 6242: extern double atan (double __x) throw (); extern double __atan (double __x) throw (); 6242: 6242: extern double atan2 (double __y, double __x) throw (); extern double __atan2 (double __y, double __x) throw (); 6242: 6242: 6242: extern double cos (double __x) throw (); extern double __cos (double __x) throw (); 6242: 6242: extern double sin (double __x) throw (); extern double __sin (double __x) throw (); 6242: 6242: extern double tan (double __x) throw (); extern double __tan (double __x) throw (); 6242: 6242: 6242: 6242: 6242: extern double cosh (double __x) throw (); extern double __cosh (double __x) throw (); 6242: 6242: extern double sinh (double __x) throw (); extern double __sinh (double __x) throw (); 6242: 6242: extern double tanh (double __x) throw (); extern double __tanh (double __x) throw (); 6242: 6242: 6242: 6242: extern void sincos (double __x, double *__sinx, double *__cosx) throw (); extern void __sincos (double __x, double *__sinx, double *__cosx) throw () 6242: ; 6242: 6242: 6242: 6242: 6242: extern double acosh (double __x) throw (); extern double __acosh (double __x) throw (); 6242: 6242: extern double asinh (double __x) throw (); extern double __asinh (double __x) throw (); 6242: 6242: extern double atanh (double __x) throw (); extern double __atanh (double __x) throw (); 6242: 6242: 6242: 6242: 6242: 6242: extern double exp (double __x) throw (); extern double __exp (double __x) throw (); 6242: 6242: 6242: extern double frexp (double __x, int *__exponent) throw (); extern double __frexp (double __x, int *__exponent) throw (); 6242: 6242: 6242: extern double ldexp (double __x, int __exponent) throw (); extern double __ldexp (double __x, int __exponent) throw (); 6242: 6242: 6242: extern double log (double __x) throw (); extern double __log (double __x) throw (); 6242: 6242: 6242: extern double log10 (double __x) throw (); extern double __log10 (double __x) throw (); 6242: 6242: 6242: extern double modf (double __x, double *__iptr) throw (); extern double __modf (double __x, double *__iptr) throw () __attribute__ ((__nonnull__ (2))); 6242: 6242: 6242: 6242: extern double exp10 (double __x) throw (); extern double __exp10 (double __x) throw (); 6242: 6242: 6242: 6242: 6242: extern double pow10 (double __x) throw (); extern double __pow10 (double __x) throw (); 6242: 6242: 6242: 6242: 6242: 6242: extern double expm1 (double __x) throw (); extern double __expm1 (double __x) throw (); 6242: 6242: 6242: extern double log1p (double __x) throw (); extern double __log1p (double __x) throw (); 6242: 6242: 6242: extern double logb (double __x) throw (); extern double __logb (double __x) throw (); 6242: 6242: 6242: 6242: 6242: extern double exp2 (double __x) throw (); extern double __exp2 (double __x) throw (); 6242: 6242: 6242: extern double log2 (double __x) throw (); extern double __log2 (double __x) throw (); 6242: 6242: 6242: 6242: 6242: 6242: 6242: extern double pow (double __x, double __y) throw (); extern double __pow (double __x, double __y) throw (); 6242: 6242: 6242: extern double sqrt (double __x) throw (); extern double __sqrt (double __x) throw (); 6242: 6242: 6242: 6242: extern double hypot (double __x, double __y) throw (); extern double __hypot (double __x, double __y) throw (); 6242: 6242: 6242: 6242: 6242: extern double cbrt (double __x) throw (); extern double __cbrt (double __x) throw (); 6242: 6242: 6242: 6242: 6242: 6242: 6242: extern double ceil (double __x) throw () __attribute__ ((__const__)); extern double __ceil (double __x) throw () __attribute__ ((__const__)); 6242: 6242: 6242: extern double fabs (double __x) throw () __attribute__ ((__const__)); extern double __fabs (double __x) throw () __attribute__ ((__const__)); 6242: 6242: 6242: extern double floor (double __x) throw () __attribute__ ((__const__)); extern double __floor (double __x) throw () __attribute__ ((__const__)); 6242: 6242: 6242: extern double fmod (double __x, double __y) throw (); extern double __fmod (double __x, double __y) throw (); 6242: # 188 "/usr/include/s390x-linux-gnu/bits/mathcalls.h" 3 4 6242: extern int finite (double __value) throw () __attribute__ ((__const__)); 6242: 6242: 6242: extern double drem (double __x, double __y) throw (); extern double __drem (double __x, double __y) throw (); 6242: 6242: 6242: 6242: extern double significand (double __x) throw (); extern double __significand (double __x) throw (); 6242: 6242: 6242: 6242: 6242: 6242: 6242: extern double copysign (double __x, double __y) throw () __attribute__ ((__const__)); extern double __copysign (double __x, double __y) throw () __attribute__ ((__const__)); 6242: 6242: 6242: 6242: 6242: extern double nan (const char *__tagb) throw () __attribute__ ((__const__)); extern double __nan (const char *__tagb) throw () __attribute__ ((__const__)); 6242: # 223 "/usr/include/s390x-linux-gnu/bits/mathcalls.h" 3 4 6242: extern double j0 (double) throw (); extern double __j0 (double) throw (); 6242: extern double j1 (double) throw (); extern double __j1 (double) throw (); 6242: extern double jn (int, double) throw (); extern double __jn (int, double) throw (); 6242: extern double y0 (double) throw (); extern double __y0 (double) throw (); 6242: extern double y1 (double) throw (); extern double __y1 (double) throw (); 6242: extern double yn (int, double) throw (); extern double __yn (int, double) throw (); 6242: 6242: 6242: 6242: 6242: 6242: extern double erf (double) throw (); extern double __erf (double) throw (); 6242: extern double erfc (double) throw (); extern double __erfc (double) throw (); 6242: extern double lgamma (double) throw (); extern double __lgamma (double) throw (); 6242: 6242: 6242: 6242: 6242: extern double tgamma (double) throw (); extern double __tgamma (double) throw (); 6242: 6242: 6242: 6242: 6242: 6242: extern double gamma (double) throw (); extern double __gamma (double) throw (); 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: extern double lgamma_r (double, int *__signgamp) throw (); extern double __lgamma_r (double, int *__signgamp) throw (); 6242: 6242: 6242: 6242: 6242: 6242: 6242: extern double rint (double __x) throw (); extern double __rint (double __x) throw (); 6242: 6242: 6242: extern double nextafter (double __x, double __y) throw () __attribute__ ((__const__)); extern double __nextafter (double __x, double __y) throw () __attribute__ ((__const__)); 6242: 6242: extern double nexttoward (double __x, long double __y) throw () __attribute__ ((__const__)); extern double __nexttoward (double __x, long double __y) throw () __attribute__ ((__const__)); 6242: 6242: 6242: 6242: 6242: extern double nextdown (double __x) throw (); extern double __nextdown (double __x) throw (); 6242: 6242: extern double nextup (double __x) throw (); extern double __nextup (double __x) throw (); 6242: 6242: 6242: 6242: extern double remainder (double __x, double __y) throw (); extern double __remainder (double __x, double __y) throw (); 6242: 6242: 6242: 6242: extern double scalbn (double __x, int __n) throw (); extern double __scalbn (double __x, int __n) throw (); 6242: 6242: 6242: 6242: extern int ilogb (double __x) throw (); extern int __ilogb (double __x) throw (); 6242: 6242: 6242: 6242: 6242: extern long int llogb (double __x) throw (); extern long int __llogb (double __x) throw (); 6242: 6242: 6242: 6242: 6242: extern double scalbln (double __x, long int __n) throw (); extern double __scalbln (double __x, long int __n) throw (); 6242: 6242: 6242: 6242: extern double nearbyint (double __x) throw (); extern double __nearbyint (double __x) throw (); 6242: 6242: 6242: 6242: extern double round (double __x) throw () __attribute__ ((__const__)); extern double __round (double __x) throw () __attribute__ ((__const__)); 6242: 6242: 6242: 6242: extern double trunc (double __x) throw () __attribute__ ((__const__)); extern double __trunc (double __x) throw () __attribute__ ((__const__)); 6242: 6242: 6242: 6242: 6242: extern double remquo (double __x, double __y, int *__quo) throw (); extern double __remquo (double __x, double __y, int *__quo) throw (); 6242: 6242: 6242: 6242: 6242: 6242: 6242: extern long int lrint (double __x) throw (); extern long int __lrint (double __x) throw (); 6242: __extension__ 6242: extern long long int llrint (double __x) throw (); extern long long int __llrint (double __x) throw (); 6242: 6242: 6242: 6242: extern long int lround (double __x) throw (); extern long int __lround (double __x) throw (); 6242: __extension__ 6242: extern long long int llround (double __x) throw (); extern long long int __llround (double __x) throw (); 6242: 6242: 6242: 6242: extern double fdim (double __x, double __y) throw (); extern double __fdim (double __x, double __y) throw (); 6242: 6242: 6242: extern double fmax (double __x, double __y) throw () __attribute__ ((__const__)); extern double __fmax (double __x, double __y) throw () __attribute__ ((__const__)); 6242: 6242: 6242: extern double fmin (double __x, double __y) throw () __attribute__ ((__const__)); extern double __fmin (double __x, double __y) throw () __attribute__ ((__const__)); 6242: 6242: 6242: extern double fma (double __x, double __y, double __z) throw (); extern double __fma (double __x, double __y, double __z) throw (); 6242: 6242: 6242: 6242: 6242: extern double roundeven (double __x) throw () __attribute__ ((__const__)); extern double __roundeven (double __x) throw () __attribute__ ((__const__)); 6242: 6242: 6242: 6242: extern __intmax_t fromfp (double __x, int __round, unsigned int __width) throw (); extern __intmax_t __fromfp (double __x, int __round, unsigned int __width) throw () 6242: ; 6242: 6242: 6242: 6242: extern __uintmax_t ufromfp (double __x, int __round, unsigned int __width) throw (); extern __uintmax_t __ufromfp (double __x, int __round, unsigned int __width) throw () 6242: ; 6242: 6242: 6242: 6242: 6242: extern __intmax_t fromfpx (double __x, int __round, unsigned int __width) throw (); extern __intmax_t __fromfpx (double __x, int __round, unsigned int __width) throw () 6242: ; 6242: 6242: 6242: 6242: 6242: extern __uintmax_t ufromfpx (double __x, int __round, unsigned int __width) throw (); extern __uintmax_t __ufromfpx (double __x, int __round, unsigned int __width) throw () 6242: ; 6242: 6242: 6242: extern double fmaxmag (double __x, double __y) throw () __attribute__ ((__const__)); extern double __fmaxmag (double __x, double __y) throw () __attribute__ ((__const__)); 6242: 6242: 6242: extern double fminmag (double __x, double __y) throw () __attribute__ ((__const__)); extern double __fminmag (double __x, double __y) throw () __attribute__ ((__const__)); 6242: 6242: 6242: extern int totalorder (double __x, double __y) throw () 6242: __attribute__ ((__const__)); 6242: 6242: 6242: extern int totalordermag (double __x, double __y) throw () 6242: __attribute__ ((__const__)); 6242: 6242: 6242: extern int canonicalize (double *__cx, const double *__x) throw (); 6242: 6242: 6242: extern double getpayload (const double *__x) throw (); extern double __getpayload (const double *__x) throw (); 6242: 6242: 6242: extern int setpayload (double *__x, double __payload) throw (); 6242: 6242: 6242: extern int setpayloadsig (double *__x, double __payload) throw (); 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: extern double scalb (double __x, double __n) throw (); extern double __scalb (double __x, double __n) throw (); 6242: # 225 "/usr/include/math.h" 2 3 4 6242: # 243 "/usr/include/math.h" 3 4 6242: # 1 "/usr/include/s390x-linux-gnu/bits/mathcalls-helper-functions.h" 1 3 4 6242: # 21 "/usr/include/s390x-linux-gnu/bits/mathcalls-helper-functions.h" 3 4 6242: extern int __fpclassifyf (float __value) throw () 6242: __attribute__ ((__const__)); 6242: 6242: 6242: extern int __signbitf (float __value) throw () 6242: __attribute__ ((__const__)); 6242: 6242: 6242: 6242: extern int __isinff (float __value) throw () __attribute__ ((__const__)); 6242: 6242: 6242: extern int __finitef (float __value) throw () __attribute__ ((__const__)); 6242: 6242: 6242: extern int __isnanf (float __value) throw () __attribute__ ((__const__)); 6242: 6242: 6242: extern int __iseqsigf (float __x, float __y) throw (); 6242: 6242: 6242: extern int __issignalingf (float __value) throw () 6242: __attribute__ ((__const__)); 6242: # 244 "/usr/include/math.h" 2 3 4 6242: # 1 "/usr/include/s390x-linux-gnu/bits/mathcalls.h" 1 3 4 6242: # 53 "/usr/include/s390x-linux-gnu/bits/mathcalls.h" 3 4 6242: extern float acosf (float __x) throw (); extern float __acosf (float __x) throw (); 6242: 6242: extern float asinf (float __x) throw (); extern float __asinf (float __x) throw (); 6242: 6242: extern float atanf (float __x) throw (); extern float __atanf (float __x) throw (); 6242: 6242: extern float atan2f (float __y, float __x) throw (); extern float __atan2f (float __y, float __x) throw (); 6242: 6242: 6242: extern float cosf (float __x) throw (); extern float __cosf (float __x) throw (); 6242: 6242: extern float sinf (float __x) throw (); extern float __sinf (float __x) throw (); 6242: 6242: extern float tanf (float __x) throw (); extern float __tanf (float __x) throw (); 6242: 6242: 6242: 6242: 6242: extern float coshf (float __x) throw (); extern float __coshf (float __x) throw (); 6242: 6242: extern float sinhf (float __x) throw (); extern float __sinhf (float __x) throw (); 6242: 6242: extern float tanhf (float __x) throw (); extern float __tanhf (float __x) throw (); 6242: 6242: 6242: 6242: extern void sincosf (float __x, float *__sinx, float *__cosx) throw (); extern void __sincosf (float __x, float *__sinx, float *__cosx) throw () 6242: ; 6242: 6242: 6242: 6242: 6242: extern float acoshf (float __x) throw (); extern float __acoshf (float __x) throw (); 6242: 6242: extern float asinhf (float __x) throw (); extern float __asinhf (float __x) throw (); 6242: 6242: extern float atanhf (float __x) throw (); extern float __atanhf (float __x) throw (); 6242: 6242: 6242: 6242: 6242: 6242: extern float expf (float __x) throw (); extern float __expf (float __x) throw (); 6242: 6242: 6242: extern float frexpf (float __x, int *__exponent) throw (); extern float __frexpf (float __x, int *__exponent) throw (); 6242: 6242: 6242: extern float ldexpf (float __x, int __exponent) throw (); extern float __ldexpf (float __x, int __exponent) throw (); 6242: 6242: 6242: extern float logf (float __x) throw (); extern float __logf (float __x) throw (); 6242: 6242: 6242: extern float log10f (float __x) throw (); extern float __log10f (float __x) throw (); 6242: 6242: 6242: extern float modff (float __x, float *__iptr) throw (); extern float __modff (float __x, float *__iptr) throw () __attribute__ ((__nonnull__ (2))); 6242: 6242: 6242: 6242: extern float exp10f (float __x) throw (); extern float __exp10f (float __x) throw (); 6242: 6242: 6242: 6242: 6242: extern float pow10f (float __x) throw (); extern float __pow10f (float __x) throw (); 6242: 6242: 6242: 6242: 6242: 6242: extern float expm1f (float __x) throw (); extern float __expm1f (float __x) throw (); 6242: 6242: 6242: extern float log1pf (float __x) throw (); extern float __log1pf (float __x) throw (); 6242: 6242: 6242: extern float logbf (float __x) throw (); extern float __logbf (float __x) throw (); 6242: 6242: 6242: 6242: 6242: extern float exp2f (float __x) throw (); extern float __exp2f (float __x) throw (); 6242: 6242: 6242: extern float log2f (float __x) throw (); extern float __log2f (float __x) throw (); 6242: 6242: 6242: 6242: 6242: 6242: 6242: extern float powf (float __x, float __y) throw (); extern float __powf (float __x, float __y) throw (); 6242: 6242: 6242: extern float sqrtf (float __x) throw (); extern float __sqrtf (float __x) throw (); 6242: 6242: 6242: 6242: extern float hypotf (float __x, float __y) throw (); extern float __hypotf (float __x, float __y) throw (); 6242: 6242: 6242: 6242: 6242: extern float cbrtf (float __x) throw (); extern float __cbrtf (float __x) throw (); 6242: 6242: 6242: 6242: 6242: 6242: 6242: extern float ceilf (float __x) throw () __attribute__ ((__const__)); extern float __ceilf (float __x) throw () __attribute__ ((__const__)); 6242: 6242: 6242: extern float fabsf (float __x) throw () __attribute__ ((__const__)); extern float __fabsf (float __x) throw () __attribute__ ((__const__)); 6242: 6242: 6242: extern float floorf (float __x) throw () __attribute__ ((__const__)); extern float __floorf (float __x) throw () __attribute__ ((__const__)); 6242: 6242: 6242: extern float fmodf (float __x, float __y) throw (); extern float __fmodf (float __x, float __y) throw (); 6242: # 183 "/usr/include/s390x-linux-gnu/bits/mathcalls.h" 3 4 6242: extern int isinff (float __value) throw () __attribute__ ((__const__)); 6242: 6242: 6242: 6242: 6242: extern int finitef (float __value) throw () __attribute__ ((__const__)); 6242: 6242: 6242: extern float dremf (float __x, float __y) throw (); extern float __dremf (float __x, float __y) throw (); 6242: 6242: 6242: 6242: extern float significandf (float __x) throw (); extern float __significandf (float __x) throw (); 6242: 6242: 6242: 6242: 6242: 6242: 6242: extern float copysignf (float __x, float __y) throw () __attribute__ ((__const__)); extern float __copysignf (float __x, float __y) throw () __attribute__ ((__const__)); 6242: 6242: 6242: 6242: 6242: extern float nanf (const char *__tagb) throw () __attribute__ ((__const__)); extern float __nanf (const char *__tagb) throw () __attribute__ ((__const__)); 6242: # 217 "/usr/include/s390x-linux-gnu/bits/mathcalls.h" 3 4 6242: extern int isnanf (float __value) throw () __attribute__ ((__const__)); 6242: 6242: 6242: 6242: 6242: 6242: extern float j0f (float) throw (); extern float __j0f (float) throw (); 6242: extern float j1f (float) throw (); extern float __j1f (float) throw (); 6242: extern float jnf (int, float) throw (); extern float __jnf (int, float) throw (); 6242: extern float y0f (float) throw (); extern float __y0f (float) throw (); 6242: extern float y1f (float) throw (); extern float __y1f (float) throw (); 6242: extern float ynf (int, float) throw (); extern float __ynf (int, float) throw (); 6242: 6242: 6242: 6242: 6242: 6242: extern float erff (float) throw (); extern float __erff (float) throw (); 6242: extern float erfcf (float) throw (); extern float __erfcf (float) throw (); 6242: extern float lgammaf (float) throw (); extern float __lgammaf (float) throw (); 6242: 6242: 6242: 6242: 6242: extern float tgammaf (float) throw (); extern float __tgammaf (float) throw (); 6242: 6242: 6242: 6242: 6242: 6242: extern float gammaf (float) throw (); extern float __gammaf (float) throw (); 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: extern float lgammaf_r (float, int *__signgamp) throw (); extern float __lgammaf_r (float, int *__signgamp) throw (); 6242: 6242: 6242: 6242: 6242: 6242: 6242: extern float rintf (float __x) throw (); extern float __rintf (float __x) throw (); 6242: 6242: 6242: extern float nextafterf (float __x, float __y) throw () __attribute__ ((__const__)); extern float __nextafterf (float __x, float __y) throw () __attribute__ ((__const__)); 6242: 6242: extern float nexttowardf (float __x, long double __y) throw () __attribute__ ((__const__)); extern float __nexttowardf (float __x, long double __y) throw () __attribute__ ((__const__)); 6242: 6242: 6242: 6242: 6242: extern float nextdownf (float __x) throw (); extern float __nextdownf (float __x) throw (); 6242: 6242: extern float nextupf (float __x) throw (); extern float __nextupf (float __x) throw (); 6242: 6242: 6242: 6242: extern float remainderf (float __x, float __y) throw (); extern float __remainderf (float __x, float __y) throw (); 6242: 6242: 6242: 6242: extern float scalbnf (float __x, int __n) throw (); extern float __scalbnf (float __x, int __n) throw (); 6242: 6242: 6242: 6242: extern int ilogbf (float __x) throw (); extern int __ilogbf (float __x) throw (); 6242: 6242: 6242: 6242: 6242: extern long int llogbf (float __x) throw (); extern long int __llogbf (float __x) throw (); 6242: 6242: 6242: 6242: 6242: extern float scalblnf (float __x, long int __n) throw (); extern float __scalblnf (float __x, long int __n) throw (); 6242: 6242: 6242: 6242: extern float nearbyintf (float __x) throw (); extern float __nearbyintf (float __x) throw (); 6242: 6242: 6242: 6242: extern float roundf (float __x) throw () __attribute__ ((__const__)); extern float __roundf (float __x) throw () __attribute__ ((__const__)); 6242: 6242: 6242: 6242: extern float truncf (float __x) throw () __attribute__ ((__const__)); extern float __truncf (float __x) throw () __attribute__ ((__const__)); 6242: 6242: 6242: 6242: 6242: extern float remquof (float __x, float __y, int *__quo) throw (); extern float __remquof (float __x, float __y, int *__quo) throw (); 6242: 6242: 6242: 6242: 6242: 6242: 6242: extern long int lrintf (float __x) throw (); extern long int __lrintf (float __x) throw (); 6242: __extension__ 6242: extern long long int llrintf (float __x) throw (); extern long long int __llrintf (float __x) throw (); 6242: 6242: 6242: 6242: extern long int lroundf (float __x) throw (); extern long int __lroundf (float __x) throw (); 6242: __extension__ 6242: extern long long int llroundf (float __x) throw (); extern long long int __llroundf (float __x) throw (); 6242: 6242: 6242: 6242: extern float fdimf (float __x, float __y) throw (); extern float __fdimf (float __x, float __y) throw (); 6242: 6242: 6242: extern float fmaxf (float __x, float __y) throw () __attribute__ ((__const__)); extern float __fmaxf (float __x, float __y) throw () __attribute__ ((__const__)); 6242: 6242: 6242: extern float fminf (float __x, float __y) throw () __attribute__ ((__const__)); extern float __fminf (float __x, float __y) throw () __attribute__ ((__const__)); 6242: 6242: 6242: extern float fmaf (float __x, float __y, float __z) throw (); extern float __fmaf (float __x, float __y, float __z) throw (); 6242: 6242: 6242: 6242: 6242: extern float roundevenf (float __x) throw () __attribute__ ((__const__)); extern float __roundevenf (float __x) throw () __attribute__ ((__const__)); 6242: 6242: 6242: 6242: extern __intmax_t fromfpf (float __x, int __round, unsigned int __width) throw (); extern __intmax_t __fromfpf (float __x, int __round, unsigned int __width) throw () 6242: ; 6242: 6242: 6242: 6242: extern __uintmax_t ufromfpf (float __x, int __round, unsigned int __width) throw (); extern __uintmax_t __ufromfpf (float __x, int __round, unsigned int __width) throw () 6242: ; 6242: 6242: 6242: 6242: 6242: extern __intmax_t fromfpxf (float __x, int __round, unsigned int __width) throw (); extern __intmax_t __fromfpxf (float __x, int __round, unsigned int __width) throw () 6242: ; 6242: 6242: 6242: 6242: 6242: extern __uintmax_t ufromfpxf (float __x, int __round, unsigned int __width) throw (); extern __uintmax_t __ufromfpxf (float __x, int __round, unsigned int __width) throw () 6242: ; 6242: 6242: 6242: extern float fmaxmagf (float __x, float __y) throw () __attribute__ ((__const__)); extern float __fmaxmagf (float __x, float __y) throw () __attribute__ ((__const__)); 6242: 6242: 6242: extern float fminmagf (float __x, float __y) throw () __attribute__ ((__const__)); extern float __fminmagf (float __x, float __y) throw () __attribute__ ((__const__)); 6242: 6242: 6242: extern int totalorderf (float __x, float __y) throw () 6242: __attribute__ ((__const__)); 6242: 6242: 6242: extern int totalordermagf (float __x, float __y) throw () 6242: __attribute__ ((__const__)); 6242: 6242: 6242: extern int canonicalizef (float *__cx, const float *__x) throw (); 6242: 6242: 6242: extern float getpayloadf (const float *__x) throw (); extern float __getpayloadf (const float *__x) throw (); 6242: 6242: 6242: extern int setpayloadf (float *__x, float __payload) throw (); 6242: 6242: 6242: extern int setpayloadsigf (float *__x, float __payload) throw (); 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: extern float scalbf (float __x, float __n) throw (); extern float __scalbf (float __x, float __n) throw (); 6242: # 245 "/usr/include/math.h" 2 3 4 6242: # 289 "/usr/include/math.h" 3 4 6242: # 1 "/usr/include/s390x-linux-gnu/bits/mathcalls-helper-functions.h" 1 3 4 6242: # 21 "/usr/include/s390x-linux-gnu/bits/mathcalls-helper-functions.h" 3 4 6242: extern int __fpclassifyl (long double __value) throw () 6242: __attribute__ ((__const__)); 6242: 6242: 6242: extern int __signbitl (long double __value) throw () 6242: __attribute__ ((__const__)); 6242: 6242: 6242: 6242: extern int __isinfl (long double __value) throw () __attribute__ ((__const__)); 6242: 6242: 6242: extern int __finitel (long double __value) throw () __attribute__ ((__const__)); 6242: 6242: 6242: extern int __isnanl (long double __value) throw () __attribute__ ((__const__)); 6242: 6242: 6242: extern int __iseqsigl (long double __x, long double __y) throw (); 6242: 6242: 6242: extern int __issignalingl (long double __value) throw () 6242: __attribute__ ((__const__)); 6242: # 290 "/usr/include/math.h" 2 3 4 6242: # 1 "/usr/include/s390x-linux-gnu/bits/mathcalls.h" 1 3 4 6242: # 53 "/usr/include/s390x-linux-gnu/bits/mathcalls.h" 3 4 6242: extern long double acosl (long double __x) throw (); extern long double __acosl (long double __x) throw (); 6242: 6242: extern long double asinl (long double __x) throw (); extern long double __asinl (long double __x) throw (); 6242: 6242: extern long double atanl (long double __x) throw (); extern long double __atanl (long double __x) throw (); 6242: 6242: extern long double atan2l (long double __y, long double __x) throw (); extern long double __atan2l (long double __y, long double __x) throw (); 6242: 6242: 6242: extern long double cosl (long double __x) throw (); extern long double __cosl (long double __x) throw (); 6242: 6242: extern long double sinl (long double __x) throw (); extern long double __sinl (long double __x) throw (); 6242: 6242: extern long double tanl (long double __x) throw (); extern long double __tanl (long double __x) throw (); 6242: 6242: 6242: 6242: 6242: extern long double coshl (long double __x) throw (); extern long double __coshl (long double __x) throw (); 6242: 6242: extern long double sinhl (long double __x) throw (); extern long double __sinhl (long double __x) throw (); 6242: 6242: extern long double tanhl (long double __x) throw (); extern long double __tanhl (long double __x) throw (); 6242: 6242: 6242: 6242: extern void sincosl (long double __x, long double *__sinx, long double *__cosx) throw (); extern void __sincosl (long double __x, long double *__sinx, long double *__cosx) throw () 6242: ; 6242: 6242: 6242: 6242: 6242: extern long double acoshl (long double __x) throw (); extern long double __acoshl (long double __x) throw (); 6242: 6242: extern long double asinhl (long double __x) throw (); extern long double __asinhl (long double __x) throw (); 6242: 6242: extern long double atanhl (long double __x) throw (); extern long double __atanhl (long double __x) throw (); 6242: 6242: 6242: 6242: 6242: 6242: extern long double expl (long double __x) throw (); extern long double __expl (long double __x) throw (); 6242: 6242: 6242: extern long double frexpl (long double __x, int *__exponent) throw (); extern long double __frexpl (long double __x, int *__exponent) throw (); 6242: 6242: 6242: extern long double ldexpl (long double __x, int __exponent) throw (); extern long double __ldexpl (long double __x, int __exponent) throw (); 6242: 6242: 6242: extern long double logl (long double __x) throw (); extern long double __logl (long double __x) throw (); 6242: 6242: 6242: extern long double log10l (long double __x) throw (); extern long double __log10l (long double __x) throw (); 6242: 6242: 6242: extern long double modfl (long double __x, long double *__iptr) throw (); extern long double __modfl (long double __x, long double *__iptr) throw () __attribute__ ((__nonnull__ (2))); 6242: 6242: 6242: 6242: extern long double exp10l (long double __x) throw (); extern long double __exp10l (long double __x) throw (); 6242: 6242: 6242: 6242: 6242: extern long double pow10l (long double __x) throw (); extern long double __pow10l (long double __x) throw (); 6242: 6242: 6242: 6242: 6242: 6242: extern long double expm1l (long double __x) throw (); extern long double __expm1l (long double __x) throw (); 6242: 6242: 6242: extern long double log1pl (long double __x) throw (); extern long double __log1pl (long double __x) throw (); 6242: 6242: 6242: extern long double logbl (long double __x) throw (); extern long double __logbl (long double __x) throw (); 6242: 6242: 6242: 6242: 6242: extern long double exp2l (long double __x) throw (); extern long double __exp2l (long double __x) throw (); 6242: 6242: 6242: extern long double log2l (long double __x) throw (); extern long double __log2l (long double __x) throw (); 6242: 6242: 6242: 6242: 6242: 6242: 6242: extern long double powl (long double __x, long double __y) throw (); extern long double __powl (long double __x, long double __y) throw (); 6242: 6242: 6242: extern long double sqrtl (long double __x) throw (); extern long double __sqrtl (long double __x) throw (); 6242: 6242: 6242: 6242: extern long double hypotl (long double __x, long double __y) throw (); extern long double __hypotl (long double __x, long double __y) throw (); 6242: 6242: 6242: 6242: 6242: extern long double cbrtl (long double __x) throw (); extern long double __cbrtl (long double __x) throw (); 6242: 6242: 6242: 6242: 6242: 6242: 6242: extern long double ceill (long double __x) throw () __attribute__ ((__const__)); extern long double __ceill (long double __x) throw () __attribute__ ((__const__)); 6242: 6242: 6242: extern long double fabsl (long double __x) throw () __attribute__ ((__const__)); extern long double __fabsl (long double __x) throw () __attribute__ ((__const__)); 6242: 6242: 6242: extern long double floorl (long double __x) throw () __attribute__ ((__const__)); extern long double __floorl (long double __x) throw () __attribute__ ((__const__)); 6242: 6242: 6242: extern long double fmodl (long double __x, long double __y) throw (); extern long double __fmodl (long double __x, long double __y) throw (); 6242: # 183 "/usr/include/s390x-linux-gnu/bits/mathcalls.h" 3 4 6242: extern int isinfl (long double __value) throw () __attribute__ ((__const__)); 6242: 6242: 6242: 6242: 6242: extern int finitel (long double __value) throw () __attribute__ ((__const__)); 6242: 6242: 6242: extern long double dreml (long double __x, long double __y) throw (); extern long double __dreml (long double __x, long double __y) throw (); 6242: 6242: 6242: 6242: extern long double significandl (long double __x) throw (); extern long double __significandl (long double __x) throw (); 6242: 6242: 6242: 6242: 6242: 6242: 6242: extern long double copysignl (long double __x, long double __y) throw () __attribute__ ((__const__)); extern long double __copysignl (long double __x, long double __y) throw () __attribute__ ((__const__)); 6242: 6242: 6242: 6242: 6242: extern long double nanl (const char *__tagb) throw () __attribute__ ((__const__)); extern long double __nanl (const char *__tagb) throw () __attribute__ ((__const__)); 6242: # 217 "/usr/include/s390x-linux-gnu/bits/mathcalls.h" 3 4 6242: extern int isnanl (long double __value) throw () __attribute__ ((__const__)); 6242: 6242: 6242: 6242: 6242: 6242: extern long double j0l (long double) throw (); extern long double __j0l (long double) throw (); 6242: extern long double j1l (long double) throw (); extern long double __j1l (long double) throw (); 6242: extern long double jnl (int, long double) throw (); extern long double __jnl (int, long double) throw (); 6242: extern long double y0l (long double) throw (); extern long double __y0l (long double) throw (); 6242: extern long double y1l (long double) throw (); extern long double __y1l (long double) throw (); 6242: extern long double ynl (int, long double) throw (); extern long double __ynl (int, long double) throw (); 6242: 6242: 6242: 6242: 6242: 6242: extern long double erfl (long double) throw (); extern long double __erfl (long double) throw (); 6242: extern long double erfcl (long double) throw (); extern long double __erfcl (long double) throw (); 6242: extern long double lgammal (long double) throw (); extern long double __lgammal (long double) throw (); 6242: 6242: 6242: 6242: 6242: extern long double tgammal (long double) throw (); extern long double __tgammal (long double) throw (); 6242: 6242: 6242: 6242: 6242: 6242: extern long double gammal (long double) throw (); extern long double __gammal (long double) throw (); 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: extern long double lgammal_r (long double, int *__signgamp) throw (); extern long double __lgammal_r (long double, int *__signgamp) throw (); 6242: 6242: 6242: 6242: 6242: 6242: 6242: extern long double rintl (long double __x) throw (); extern long double __rintl (long double __x) throw (); 6242: 6242: 6242: extern long double nextafterl (long double __x, long double __y) throw () __attribute__ ((__const__)); extern long double __nextafterl (long double __x, long double __y) throw () __attribute__ ((__const__)); 6242: 6242: extern long double nexttowardl (long double __x, long double __y) throw () __attribute__ ((__const__)); extern long double __nexttowardl (long double __x, long double __y) throw () __attribute__ ((__const__)); 6242: 6242: 6242: 6242: 6242: extern long double nextdownl (long double __x) throw (); extern long double __nextdownl (long double __x) throw (); 6242: 6242: extern long double nextupl (long double __x) throw (); extern long double __nextupl (long double __x) throw (); 6242: 6242: 6242: 6242: extern long double remainderl (long double __x, long double __y) throw (); extern long double __remainderl (long double __x, long double __y) throw (); 6242: 6242: 6242: 6242: extern long double scalbnl (long double __x, int __n) throw (); extern long double __scalbnl (long double __x, int __n) throw (); 6242: 6242: 6242: 6242: extern int ilogbl (long double __x) throw (); extern int __ilogbl (long double __x) throw (); 6242: 6242: 6242: 6242: 6242: extern long int llogbl (long double __x) throw (); extern long int __llogbl (long double __x) throw (); 6242: 6242: 6242: 6242: 6242: extern long double scalblnl (long double __x, long int __n) throw (); extern long double __scalblnl (long double __x, long int __n) throw (); 6242: 6242: 6242: 6242: extern long double nearbyintl (long double __x) throw (); extern long double __nearbyintl (long double __x) throw (); 6242: 6242: 6242: 6242: extern long double roundl (long double __x) throw () __attribute__ ((__const__)); extern long double __roundl (long double __x) throw () __attribute__ ((__const__)); 6242: 6242: 6242: 6242: extern long double truncl (long double __x) throw () __attribute__ ((__const__)); extern long double __truncl (long double __x) throw () __attribute__ ((__const__)); 6242: 6242: 6242: 6242: 6242: extern long double remquol (long double __x, long double __y, int *__quo) throw (); extern long double __remquol (long double __x, long double __y, int *__quo) throw (); 6242: 6242: 6242: 6242: 6242: 6242: 6242: extern long int lrintl (long double __x) throw (); extern long int __lrintl (long double __x) throw (); 6242: __extension__ 6242: extern long long int llrintl (long double __x) throw (); extern long long int __llrintl (long double __x) throw (); 6242: 6242: 6242: 6242: extern long int lroundl (long double __x) throw (); extern long int __lroundl (long double __x) throw (); 6242: __extension__ 6242: extern long long int llroundl (long double __x) throw (); extern long long int __llroundl (long double __x) throw (); 6242: 6242: 6242: 6242: extern long double fdiml (long double __x, long double __y) throw (); extern long double __fdiml (long double __x, long double __y) throw (); 6242: 6242: 6242: extern long double fmaxl (long double __x, long double __y) throw () __attribute__ ((__const__)); extern long double __fmaxl (long double __x, long double __y) throw () __attribute__ ((__const__)); 6242: 6242: 6242: extern long double fminl (long double __x, long double __y) throw () __attribute__ ((__const__)); extern long double __fminl (long double __x, long double __y) throw () __attribute__ ((__const__)); 6242: 6242: 6242: extern long double fmal (long double __x, long double __y, long double __z) throw (); extern long double __fmal (long double __x, long double __y, long double __z) throw (); 6242: 6242: 6242: 6242: 6242: extern long double roundevenl (long double __x) throw () __attribute__ ((__const__)); extern long double __roundevenl (long double __x) throw () __attribute__ ((__const__)); 6242: 6242: 6242: 6242: extern __intmax_t fromfpl (long double __x, int __round, unsigned int __width) throw (); extern __intmax_t __fromfpl (long double __x, int __round, unsigned int __width) throw () 6242: ; 6242: 6242: 6242: 6242: extern __uintmax_t ufromfpl (long double __x, int __round, unsigned int __width) throw (); extern __uintmax_t __ufromfpl (long double __x, int __round, unsigned int __width) throw () 6242: ; 6242: 6242: 6242: 6242: 6242: extern __intmax_t fromfpxl (long double __x, int __round, unsigned int __width) throw (); extern __intmax_t __fromfpxl (long double __x, int __round, unsigned int __width) throw () 6242: ; 6242: 6242: 6242: 6242: 6242: extern __uintmax_t ufromfpxl (long double __x, int __round, unsigned int __width) throw (); extern __uintmax_t __ufromfpxl (long double __x, int __round, unsigned int __width) throw () 6242: ; 6242: 6242: 6242: extern long double fmaxmagl (long double __x, long double __y) throw () __attribute__ ((__const__)); extern long double __fmaxmagl (long double __x, long double __y) throw () __attribute__ ((__const__)); 6242: 6242: 6242: extern long double fminmagl (long double __x, long double __y) throw () __attribute__ ((__const__)); extern long double __fminmagl (long double __x, long double __y) throw () __attribute__ ((__const__)); 6242: 6242: 6242: extern int totalorderl (long double __x, long double __y) throw () 6242: __attribute__ ((__const__)); 6242: 6242: 6242: extern int totalordermagl (long double __x, long double __y) throw () 6242: __attribute__ ((__const__)); 6242: 6242: 6242: extern int canonicalizel (long double *__cx, const long double *__x) throw (); 6242: 6242: 6242: extern long double getpayloadl (const long double *__x) throw (); extern long double __getpayloadl (const long double *__x) throw (); 6242: 6242: 6242: extern int setpayloadl (long double *__x, long double __payload) throw (); 6242: 6242: 6242: extern int setpayloadsigl (long double *__x, long double __payload) throw (); 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: extern long double scalbl (long double __x, long double __n) throw (); extern long double __scalbl (long double __x, long double __n) throw (); 6242: # 291 "/usr/include/math.h" 2 3 4 6242: # 330 "/usr/include/math.h" 3 4 6242: extern int signgam; 6242: # 380 "/usr/include/math.h" 3 4 6242: enum 6242: { 6242: FP_NAN = 6242: 6242: 0, 6242: FP_INFINITE = 6242: 6242: 1, 6242: FP_ZERO = 6242: 6242: 2, 6242: FP_SUBNORMAL = 6242: 6242: 3, 6242: FP_NORMAL = 6242: 6242: 4 6242: }; 6242: # 480 "/usr/include/math.h" 3 4 6242: # 1 "/usr/include/s390x-linux-gnu/bits/iscanonical.h" 1 3 4 6242: # 481 "/usr/include/math.h" 2 3 4 6242: # 492 "/usr/include/math.h" 3 4 6242: extern "C++" { 6242: inline int issignaling (float __val) { return __issignalingf (__val); } 6242: inline int issignaling (double __val) { return __issignaling (__val); } 6242: inline int 6242: issignaling (long double __val) 6242: { 6242: 6242: 6242: 6242: return __issignalingl (__val); 6242: 6242: } 6242: 6242: 6242: 6242: } 6242: # 521 "/usr/include/math.h" 3 4 6242: extern "C++" { 6242: # 550 "/usr/include/math.h" 3 4 6242: template inline bool 6242: iszero (__T __val) 6242: { 6242: return __val == 0; 6242: } 6242: 6242: } 6242: 6242: 6242: 6242: 6242: 6242: typedef enum 6242: { 6242: _IEEE_ = -1, 6242: _SVID_, 6242: _XOPEN_, 6242: _POSIX_, 6242: _ISOC_ 6242: } _LIB_VERSION_TYPE; 6242: 6242: 6242: 6242: 6242: extern _LIB_VERSION_TYPE _LIB_VERSION; 6242: # 585 "/usr/include/math.h" 3 4 6242: struct __exception 6242: 6242: 6242: 6242: { 6242: int type; 6242: char *name; 6242: double arg1; 6242: double arg2; 6242: double retval; 6242: }; 6242: 6242: 6242: extern int matherr (struct __exception *__exc) throw (); 6242: # 702 "/usr/include/math.h" 3 4 6242: # 1 "/usr/include/s390x-linux-gnu/bits/mathinline.h" 1 3 4 6242: # 35 "/usr/include/s390x-linux-gnu/bits/mathinline.h" 3 4 6242: extern __inline __attribute__ ((__gnu_inline__)) int 6242: __attribute__ ((__leaf__)) __signbitf (float __x) throw () 6242: { 6242: __extension__ union { float __f; int __i; } __u = { __f: __x }; 6242: return __u.__i < 0; 6242: } 6242: 6242: extern __inline __attribute__ ((__gnu_inline__)) int 6242: __attribute__ ((__leaf__)) __signbit (double __x) throw () 6242: { 6242: __extension__ union { double __d; long __i; } __u = { __d: __x }; 6242: return __u.__i < 0; 6242: } 6242: 6242: 6242: extern __inline __attribute__ ((__gnu_inline__)) int 6242: __attribute__ ((__leaf__)) __signbitl (long double __x) throw () 6242: { 6242: __extension__ union { long double __l; int __i[4]; } __u = { __l: __x }; 6242: return __u.__i[0] < 0; 6242: } 6242: # 703 "/usr/include/math.h" 2 3 4 6242: # 843 "/usr/include/math.h" 3 4 6242: } 6242: # 46 "/usr/include/c++/8/cmath" 2 3 6242: # 77 "/usr/include/c++/8/cmath" 3 6242: extern "C++" 6242: { 6242: namespace std __attribute__ ((__visibility__ ("default"))) 6242: { 6242: 6242: 6242: using ::acos; 6242: 6242: 6242: inline constexpr float 6242: acos(float __x) 6242: { return __builtin_acosf(__x); } 6242: 6242: inline constexpr long double 6242: acos(long double __x) 6242: { return __builtin_acosl(__x); } 6242: 6242: 6242: template 6242: inline constexpr 6242: typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, 6242: double>::__type 6242: acos(_Tp __x) 6242: { return __builtin_acos(__x); } 6242: 6242: using ::asin; 6242: 6242: 6242: inline constexpr float 6242: asin(float __x) 6242: { return __builtin_asinf(__x); } 6242: 6242: inline constexpr long double 6242: asin(long double __x) 6242: { return __builtin_asinl(__x); } 6242: 6242: 6242: template 6242: inline constexpr 6242: typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, 6242: double>::__type 6242: asin(_Tp __x) 6242: { return __builtin_asin(__x); } 6242: 6242: using ::atan; 6242: 6242: 6242: inline constexpr float 6242: atan(float __x) 6242: { return __builtin_atanf(__x); } 6242: 6242: inline constexpr long double 6242: atan(long double __x) 6242: { return __builtin_atanl(__x); } 6242: 6242: 6242: template 6242: inline constexpr 6242: typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, 6242: double>::__type 6242: atan(_Tp __x) 6242: { return __builtin_atan(__x); } 6242: 6242: using ::atan2; 6242: 6242: 6242: inline constexpr float 6242: atan2(float __y, float __x) 6242: { return __builtin_atan2f(__y, __x); } 6242: 6242: inline constexpr long double 6242: atan2(long double __y, long double __x) 6242: { return __builtin_atan2l(__y, __x); } 6242: 6242: 6242: template 6242: inline constexpr 6242: typename __gnu_cxx::__promote_2<_Tp, _Up>::__type 6242: atan2(_Tp __y, _Up __x) 6242: { 6242: typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; 6242: return atan2(__type(__y), __type(__x)); 6242: } 6242: 6242: using ::ceil; 6242: 6242: 6242: inline constexpr float 6242: ceil(float __x) 6242: { return __builtin_ceilf(__x); } 6242: 6242: inline constexpr long double 6242: ceil(long double __x) 6242: { return __builtin_ceill(__x); } 6242: 6242: 6242: template 6242: inline constexpr 6242: typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, 6242: double>::__type 6242: ceil(_Tp __x) 6242: { return __builtin_ceil(__x); } 6242: 6242: using ::cos; 6242: 6242: 6242: inline constexpr float 6242: cos(float __x) 6242: { return __builtin_cosf(__x); } 6242: 6242: inline constexpr long double 6242: cos(long double __x) 6242: { return __builtin_cosl(__x); } 6242: 6242: 6242: template 6242: inline constexpr 6242: typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, 6242: double>::__type 6242: cos(_Tp __x) 6242: { return __builtin_cos(__x); } 6242: 6242: using ::cosh; 6242: 6242: 6242: inline constexpr float 6242: cosh(float __x) 6242: { return __builtin_coshf(__x); } 6242: 6242: inline constexpr long double 6242: cosh(long double __x) 6242: { return __builtin_coshl(__x); } 6242: 6242: 6242: template 6242: inline constexpr 6242: typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, 6242: double>::__type 6242: cosh(_Tp __x) 6242: { return __builtin_cosh(__x); } 6242: 6242: using ::exp; 6242: 6242: 6242: inline constexpr float 6242: exp(float __x) 6242: { return __builtin_expf(__x); } 6242: 6242: inline constexpr long double 6242: exp(long double __x) 6242: { return __builtin_expl(__x); } 6242: 6242: 6242: template 6242: inline constexpr 6242: typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, 6242: double>::__type 6242: exp(_Tp __x) 6242: { return __builtin_exp(__x); } 6242: 6242: using ::fabs; 6242: 6242: 6242: inline constexpr float 6242: fabs(float __x) 6242: { return __builtin_fabsf(__x); } 6242: 6242: inline constexpr long double 6242: fabs(long double __x) 6242: { return __builtin_fabsl(__x); } 6242: 6242: 6242: template 6242: inline constexpr 6242: typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, 6242: double>::__type 6242: fabs(_Tp __x) 6242: { return __builtin_fabs(__x); } 6242: 6242: using ::floor; 6242: 6242: 6242: inline constexpr float 6242: floor(float __x) 6242: { return __builtin_floorf(__x); } 6242: 6242: inline constexpr long double 6242: floor(long double __x) 6242: { return __builtin_floorl(__x); } 6242: 6242: 6242: template 6242: inline constexpr 6242: typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, 6242: double>::__type 6242: floor(_Tp __x) 6242: { return __builtin_floor(__x); } 6242: 6242: using ::fmod; 6242: 6242: 6242: inline constexpr float 6242: fmod(float __x, float __y) 6242: { return __builtin_fmodf(__x, __y); } 6242: 6242: inline constexpr long double 6242: fmod(long double __x, long double __y) 6242: { return __builtin_fmodl(__x, __y); } 6242: 6242: 6242: template 6242: inline constexpr 6242: typename __gnu_cxx::__promote_2<_Tp, _Up>::__type 6242: fmod(_Tp __x, _Up __y) 6242: { 6242: typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; 6242: return fmod(__type(__x), __type(__y)); 6242: } 6242: 6242: using ::frexp; 6242: 6242: 6242: inline float 6242: frexp(float __x, int* __exp) 6242: { return __builtin_frexpf(__x, __exp); } 6242: 6242: inline long double 6242: frexp(long double __x, int* __exp) 6242: { return __builtin_frexpl(__x, __exp); } 6242: 6242: 6242: template 6242: inline constexpr 6242: typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, 6242: double>::__type 6242: frexp(_Tp __x, int* __exp) 6242: { return __builtin_frexp(__x, __exp); } 6242: 6242: using ::ldexp; 6242: 6242: 6242: inline constexpr float 6242: ldexp(float __x, int __exp) 6242: { return __builtin_ldexpf(__x, __exp); } 6242: 6242: inline constexpr long double 6242: ldexp(long double __x, int __exp) 6242: { return __builtin_ldexpl(__x, __exp); } 6242: 6242: 6242: template 6242: inline constexpr 6242: typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, 6242: double>::__type 6242: ldexp(_Tp __x, int __exp) 6242: { return __builtin_ldexp(__x, __exp); } 6242: 6242: using ::log; 6242: 6242: 6242: inline constexpr float 6242: log(float __x) 6242: { return __builtin_logf(__x); } 6242: 6242: inline constexpr long double 6242: log(long double __x) 6242: { return __builtin_logl(__x); } 6242: 6242: 6242: template 6242: inline constexpr 6242: typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, 6242: double>::__type 6242: log(_Tp __x) 6242: { return __builtin_log(__x); } 6242: 6242: using ::log10; 6242: 6242: 6242: inline constexpr float 6242: log10(float __x) 6242: { return __builtin_log10f(__x); } 6242: 6242: inline constexpr long double 6242: log10(long double __x) 6242: { return __builtin_log10l(__x); } 6242: 6242: 6242: template 6242: inline constexpr 6242: typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, 6242: double>::__type 6242: log10(_Tp __x) 6242: { return __builtin_log10(__x); } 6242: 6242: using ::modf; 6242: 6242: 6242: inline float 6242: modf(float __x, float* __iptr) 6242: { return __builtin_modff(__x, __iptr); } 6242: 6242: inline long double 6242: modf(long double __x, long double* __iptr) 6242: { return __builtin_modfl(__x, __iptr); } 6242: 6242: 6242: using ::pow; 6242: 6242: 6242: inline constexpr float 6242: pow(float __x, float __y) 6242: { return __builtin_powf(__x, __y); } 6242: 6242: inline constexpr long double 6242: pow(long double __x, long double __y) 6242: { return __builtin_powl(__x, __y); } 6242: # 412 "/usr/include/c++/8/cmath" 3 6242: template 6242: inline constexpr 6242: typename __gnu_cxx::__promote_2<_Tp, _Up>::__type 6242: pow(_Tp __x, _Up __y) 6242: { 6242: typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; 6242: return pow(__type(__x), __type(__y)); 6242: } 6242: 6242: using ::sin; 6242: 6242: 6242: inline constexpr float 6242: sin(float __x) 6242: { return __builtin_sinf(__x); } 6242: 6242: inline constexpr long double 6242: sin(long double __x) 6242: { return __builtin_sinl(__x); } 6242: 6242: 6242: template 6242: inline constexpr 6242: typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, 6242: double>::__type 6242: sin(_Tp __x) 6242: { return __builtin_sin(__x); } 6242: 6242: using ::sinh; 6242: 6242: 6242: inline constexpr float 6242: sinh(float __x) 6242: { return __builtin_sinhf(__x); } 6242: 6242: inline constexpr long double 6242: sinh(long double __x) 6242: { return __builtin_sinhl(__x); } 6242: 6242: 6242: template 6242: inline constexpr 6242: typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, 6242: double>::__type 6242: sinh(_Tp __x) 6242: { return __builtin_sinh(__x); } 6242: 6242: using ::sqrt; 6242: 6242: 6242: inline constexpr float 6242: sqrt(float __x) 6242: { return __builtin_sqrtf(__x); } 6242: 6242: inline constexpr long double 6242: sqrt(long double __x) 6242: { return __builtin_sqrtl(__x); } 6242: 6242: 6242: template 6242: inline constexpr 6242: typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, 6242: double>::__type 6242: sqrt(_Tp __x) 6242: { return __builtin_sqrt(__x); } 6242: 6242: using ::tan; 6242: 6242: 6242: inline constexpr float 6242: tan(float __x) 6242: { return __builtin_tanf(__x); } 6242: 6242: inline constexpr long double 6242: tan(long double __x) 6242: { return __builtin_tanl(__x); } 6242: 6242: 6242: template 6242: inline constexpr 6242: typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, 6242: double>::__type 6242: tan(_Tp __x) 6242: { return __builtin_tan(__x); } 6242: 6242: using ::tanh; 6242: 6242: 6242: inline constexpr float 6242: tanh(float __x) 6242: { return __builtin_tanhf(__x); } 6242: 6242: inline constexpr long double 6242: tanh(long double __x) 6242: { return __builtin_tanhl(__x); } 6242: 6242: 6242: template 6242: inline constexpr 6242: typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, 6242: double>::__type 6242: tanh(_Tp __x) 6242: { return __builtin_tanh(__x); } 6242: # 536 "/usr/include/c++/8/cmath" 3 6242: constexpr int 6242: fpclassify(float __x) 6242: { return __builtin_fpclassify(0, 1, 4, 6242: 3, 2, __x); } 6242: 6242: constexpr int 6242: fpclassify(double __x) 6242: { return __builtin_fpclassify(0, 1, 4, 6242: 3, 2, __x); } 6242: 6242: constexpr int 6242: fpclassify(long double __x) 6242: { return __builtin_fpclassify(0, 1, 4, 6242: 3, 2, __x); } 6242: 6242: 6242: 6242: template 6242: constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, 6242: int>::__type 6242: fpclassify(_Tp __x) 6242: { return __x != 0 ? 4 : 2; } 6242: 6242: 6242: 6242: constexpr bool 6242: isfinite(float __x) 6242: { return __builtin_isfinite(__x); } 6242: 6242: constexpr bool 6242: isfinite(double __x) 6242: { return __builtin_isfinite(__x); } 6242: 6242: constexpr bool 6242: isfinite(long double __x) 6242: { return __builtin_isfinite(__x); } 6242: 6242: 6242: 6242: template 6242: constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, 6242: bool>::__type 6242: isfinite(_Tp __x) 6242: { return true; } 6242: 6242: 6242: 6242: constexpr bool 6242: isinf(float __x) 6242: { return __builtin_isinf(__x); } 6242: 6242: 6242: 6242: 6242: 6242: constexpr bool 6242: isinf(double __x) 6242: { return __builtin_isinf(__x); } 6242: 6242: 6242: constexpr bool 6242: isinf(long double __x) 6242: { return __builtin_isinf(__x); } 6242: 6242: 6242: 6242: template 6242: constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, 6242: bool>::__type 6242: isinf(_Tp __x) 6242: { return false; } 6242: 6242: 6242: 6242: constexpr bool 6242: isnan(float __x) 6242: { return __builtin_isnan(__x); } 6242: 6242: 6242: 6242: 6242: 6242: constexpr bool 6242: isnan(double __x) 6242: { return __builtin_isnan(__x); } 6242: 6242: 6242: constexpr bool 6242: isnan(long double __x) 6242: { return __builtin_isnan(__x); } 6242: 6242: 6242: 6242: template 6242: constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, 6242: bool>::__type 6242: isnan(_Tp __x) 6242: { return false; } 6242: 6242: 6242: 6242: constexpr bool 6242: isnormal(float __x) 6242: { return __builtin_isnormal(__x); } 6242: 6242: constexpr bool 6242: isnormal(double __x) 6242: { return __builtin_isnormal(__x); } 6242: 6242: constexpr bool 6242: isnormal(long double __x) 6242: { return __builtin_isnormal(__x); } 6242: 6242: 6242: 6242: template 6242: constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, 6242: bool>::__type 6242: isnormal(_Tp __x) 6242: { return __x != 0 ? true : false; } 6242: 6242: 6242: 6242: 6242: constexpr bool 6242: signbit(float __x) 6242: { return __builtin_signbit(__x); } 6242: 6242: constexpr bool 6242: signbit(double __x) 6242: { return __builtin_signbit(__x); } 6242: 6242: constexpr bool 6242: signbit(long double __x) 6242: { return __builtin_signbit(__x); } 6242: 6242: 6242: 6242: template 6242: constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, 6242: bool>::__type 6242: signbit(_Tp __x) 6242: { return __x < 0 ? true : false; } 6242: 6242: 6242: 6242: constexpr bool 6242: isgreater(float __x, float __y) 6242: { return __builtin_isgreater(__x, __y); } 6242: 6242: constexpr bool 6242: isgreater(double __x, double __y) 6242: { return __builtin_isgreater(__x, __y); } 6242: 6242: constexpr bool 6242: isgreater(long double __x, long double __y) 6242: { return __builtin_isgreater(__x, __y); } 6242: 6242: 6242: 6242: template 6242: constexpr typename 6242: __gnu_cxx::__enable_if<(__is_arithmetic<_Tp>::__value 6242: && __is_arithmetic<_Up>::__value), bool>::__type 6242: isgreater(_Tp __x, _Up __y) 6242: { 6242: typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; 6242: return __builtin_isgreater(__type(__x), __type(__y)); 6242: } 6242: 6242: 6242: 6242: constexpr bool 6242: isgreaterequal(float __x, float __y) 6242: { return __builtin_isgreaterequal(__x, __y); } 6242: 6242: constexpr bool 6242: isgreaterequal(double __x, double __y) 6242: { return __builtin_isgreaterequal(__x, __y); } 6242: 6242: constexpr bool 6242: isgreaterequal(long double __x, long double __y) 6242: { return __builtin_isgreaterequal(__x, __y); } 6242: 6242: 6242: 6242: template 6242: constexpr typename 6242: __gnu_cxx::__enable_if<(__is_arithmetic<_Tp>::__value 6242: && __is_arithmetic<_Up>::__value), bool>::__type 6242: isgreaterequal(_Tp __x, _Up __y) 6242: { 6242: typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; 6242: return __builtin_isgreaterequal(__type(__x), __type(__y)); 6242: } 6242: 6242: 6242: 6242: constexpr bool 6242: isless(float __x, float __y) 6242: { return __builtin_isless(__x, __y); } 6242: 6242: constexpr bool 6242: isless(double __x, double __y) 6242: { return __builtin_isless(__x, __y); } 6242: 6242: constexpr bool 6242: isless(long double __x, long double __y) 6242: { return __builtin_isless(__x, __y); } 6242: 6242: 6242: 6242: template 6242: constexpr typename 6242: __gnu_cxx::__enable_if<(__is_arithmetic<_Tp>::__value 6242: && __is_arithmetic<_Up>::__value), bool>::__type 6242: isless(_Tp __x, _Up __y) 6242: { 6242: typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; 6242: return __builtin_isless(__type(__x), __type(__y)); 6242: } 6242: 6242: 6242: 6242: constexpr bool 6242: islessequal(float __x, float __y) 6242: { return __builtin_islessequal(__x, __y); } 6242: 6242: constexpr bool 6242: islessequal(double __x, double __y) 6242: { return __builtin_islessequal(__x, __y); } 6242: 6242: constexpr bool 6242: islessequal(long double __x, long double __y) 6242: { return __builtin_islessequal(__x, __y); } 6242: 6242: 6242: 6242: template 6242: constexpr typename 6242: __gnu_cxx::__enable_if<(__is_arithmetic<_Tp>::__value 6242: && __is_arithmetic<_Up>::__value), bool>::__type 6242: islessequal(_Tp __x, _Up __y) 6242: { 6242: typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; 6242: return __builtin_islessequal(__type(__x), __type(__y)); 6242: } 6242: 6242: 6242: 6242: constexpr bool 6242: islessgreater(float __x, float __y) 6242: { return __builtin_islessgreater(__x, __y); } 6242: 6242: constexpr bool 6242: islessgreater(double __x, double __y) 6242: { return __builtin_islessgreater(__x, __y); } 6242: 6242: constexpr bool 6242: islessgreater(long double __x, long double __y) 6242: { return __builtin_islessgreater(__x, __y); } 6242: 6242: 6242: 6242: template 6242: constexpr typename 6242: __gnu_cxx::__enable_if<(__is_arithmetic<_Tp>::__value 6242: && __is_arithmetic<_Up>::__value), bool>::__type 6242: islessgreater(_Tp __x, _Up __y) 6242: { 6242: typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; 6242: return __builtin_islessgreater(__type(__x), __type(__y)); 6242: } 6242: 6242: 6242: 6242: constexpr bool 6242: isunordered(float __x, float __y) 6242: { return __builtin_isunordered(__x, __y); } 6242: 6242: constexpr bool 6242: isunordered(double __x, double __y) 6242: { return __builtin_isunordered(__x, __y); } 6242: 6242: constexpr bool 6242: isunordered(long double __x, long double __y) 6242: { return __builtin_isunordered(__x, __y); } 6242: 6242: 6242: 6242: template 6242: constexpr typename 6242: __gnu_cxx::__enable_if<(__is_arithmetic<_Tp>::__value 6242: && __is_arithmetic<_Up>::__value), bool>::__type 6242: isunordered(_Tp __x, _Up __y) 6242: { 6242: typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; 6242: return __builtin_isunordered(__type(__x), __type(__y)); 6242: } 6242: # 1065 "/usr/include/c++/8/cmath" 3 6242: using ::double_t; 6242: using ::float_t; 6242: 6242: 6242: using ::acosh; 6242: using ::acoshf; 6242: using ::acoshl; 6242: 6242: using ::asinh; 6242: using ::asinhf; 6242: using ::asinhl; 6242: 6242: using ::atanh; 6242: using ::atanhf; 6242: using ::atanhl; 6242: 6242: using ::cbrt; 6242: using ::cbrtf; 6242: using ::cbrtl; 6242: 6242: using ::copysign; 6242: using ::copysignf; 6242: using ::copysignl; 6242: 6242: using ::erf; 6242: using ::erff; 6242: using ::erfl; 6242: 6242: using ::erfc; 6242: using ::erfcf; 6242: using ::erfcl; 6242: 6242: using ::exp2; 6242: using ::exp2f; 6242: using ::exp2l; 6242: 6242: using ::expm1; 6242: using ::expm1f; 6242: using ::expm1l; 6242: 6242: using ::fdim; 6242: using ::fdimf; 6242: using ::fdiml; 6242: 6242: using ::fma; 6242: using ::fmaf; 6242: using ::fmal; 6242: 6242: using ::fmax; 6242: using ::fmaxf; 6242: using ::fmaxl; 6242: 6242: using ::fmin; 6242: using ::fminf; 6242: using ::fminl; 6242: 6242: using ::hypot; 6242: using ::hypotf; 6242: using ::hypotl; 6242: 6242: using ::ilogb; 6242: using ::ilogbf; 6242: using ::ilogbl; 6242: 6242: using ::lgamma; 6242: using ::lgammaf; 6242: using ::lgammal; 6242: 6242: 6242: using ::llrint; 6242: using ::llrintf; 6242: using ::llrintl; 6242: 6242: using ::llround; 6242: using ::llroundf; 6242: using ::llroundl; 6242: 6242: 6242: using ::log1p; 6242: using ::log1pf; 6242: using ::log1pl; 6242: 6242: using ::log2; 6242: using ::log2f; 6242: using ::log2l; 6242: 6242: using ::logb; 6242: using ::logbf; 6242: using ::logbl; 6242: 6242: using ::lrint; 6242: using ::lrintf; 6242: using ::lrintl; 6242: 6242: using ::lround; 6242: using ::lroundf; 6242: using ::lroundl; 6242: 6242: using ::nan; 6242: using ::nanf; 6242: using ::nanl; 6242: 6242: using ::nearbyint; 6242: using ::nearbyintf; 6242: using ::nearbyintl; 6242: 6242: using ::nextafter; 6242: using ::nextafterf; 6242: using ::nextafterl; 6242: 6242: using ::nexttoward; 6242: using ::nexttowardf; 6242: using ::nexttowardl; 6242: 6242: using ::remainder; 6242: using ::remainderf; 6242: using ::remainderl; 6242: 6242: using ::remquo; 6242: using ::remquof; 6242: using ::remquol; 6242: 6242: using ::rint; 6242: using ::rintf; 6242: using ::rintl; 6242: 6242: using ::round; 6242: using ::roundf; 6242: using ::roundl; 6242: 6242: using ::scalbln; 6242: using ::scalblnf; 6242: using ::scalblnl; 6242: 6242: using ::scalbn; 6242: using ::scalbnf; 6242: using ::scalbnl; 6242: 6242: using ::tgamma; 6242: using ::tgammaf; 6242: using ::tgammal; 6242: 6242: using ::trunc; 6242: using ::truncf; 6242: using ::truncl; 6242: 6242: 6242: 6242: constexpr float 6242: acosh(float __x) 6242: { return __builtin_acoshf(__x); } 6242: 6242: constexpr long double 6242: acosh(long double __x) 6242: { return __builtin_acoshl(__x); } 6242: 6242: 6242: 6242: template 6242: constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, 6242: double>::__type 6242: acosh(_Tp __x) 6242: { return __builtin_acosh(__x); } 6242: 6242: 6242: 6242: constexpr float 6242: asinh(float __x) 6242: { return __builtin_asinhf(__x); } 6242: 6242: constexpr long double 6242: asinh(long double __x) 6242: { return __builtin_asinhl(__x); } 6242: 6242: 6242: 6242: template 6242: constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, 6242: double>::__type 6242: asinh(_Tp __x) 6242: { return __builtin_asinh(__x); } 6242: 6242: 6242: 6242: constexpr float 6242: atanh(float __x) 6242: { return __builtin_atanhf(__x); } 6242: 6242: constexpr long double 6242: atanh(long double __x) 6242: { return __builtin_atanhl(__x); } 6242: 6242: 6242: 6242: template 6242: constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, 6242: double>::__type 6242: atanh(_Tp __x) 6242: { return __builtin_atanh(__x); } 6242: 6242: 6242: 6242: constexpr float 6242: cbrt(float __x) 6242: { return __builtin_cbrtf(__x); } 6242: 6242: constexpr long double 6242: cbrt(long double __x) 6242: { return __builtin_cbrtl(__x); } 6242: 6242: 6242: 6242: template 6242: constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, 6242: double>::__type 6242: cbrt(_Tp __x) 6242: { return __builtin_cbrt(__x); } 6242: 6242: 6242: 6242: constexpr float 6242: copysign(float __x, float __y) 6242: { return __builtin_copysignf(__x, __y); } 6242: 6242: constexpr long double 6242: copysign(long double __x, long double __y) 6242: { return __builtin_copysignl(__x, __y); } 6242: 6242: 6242: 6242: template 6242: constexpr typename __gnu_cxx::__promote_2<_Tp, _Up>::__type 6242: copysign(_Tp __x, _Up __y) 6242: { 6242: typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; 6242: return copysign(__type(__x), __type(__y)); 6242: } 6242: 6242: 6242: 6242: constexpr float 6242: erf(float __x) 6242: { return __builtin_erff(__x); } 6242: 6242: constexpr long double 6242: erf(long double __x) 6242: { return __builtin_erfl(__x); } 6242: 6242: 6242: 6242: template 6242: constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, 6242: double>::__type 6242: erf(_Tp __x) 6242: { return __builtin_erf(__x); } 6242: 6242: 6242: 6242: constexpr float 6242: erfc(float __x) 6242: { return __builtin_erfcf(__x); } 6242: 6242: constexpr long double 6242: erfc(long double __x) 6242: { return __builtin_erfcl(__x); } 6242: 6242: 6242: 6242: template 6242: constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, 6242: double>::__type 6242: erfc(_Tp __x) 6242: { return __builtin_erfc(__x); } 6242: 6242: 6242: 6242: constexpr float 6242: exp2(float __x) 6242: { return __builtin_exp2f(__x); } 6242: 6242: constexpr long double 6242: exp2(long double __x) 6242: { return __builtin_exp2l(__x); } 6242: 6242: 6242: 6242: template 6242: constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, 6242: double>::__type 6242: exp2(_Tp __x) 6242: { return __builtin_exp2(__x); } 6242: 6242: 6242: 6242: constexpr float 6242: expm1(float __x) 6242: { return __builtin_expm1f(__x); } 6242: 6242: constexpr long double 6242: expm1(long double __x) 6242: { return __builtin_expm1l(__x); } 6242: 6242: 6242: 6242: template 6242: constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, 6242: double>::__type 6242: expm1(_Tp __x) 6242: { return __builtin_expm1(__x); } 6242: 6242: 6242: 6242: constexpr float 6242: fdim(float __x, float __y) 6242: { return __builtin_fdimf(__x, __y); } 6242: 6242: constexpr long double 6242: fdim(long double __x, long double __y) 6242: { return __builtin_fdiml(__x, __y); } 6242: 6242: 6242: 6242: template 6242: constexpr typename __gnu_cxx::__promote_2<_Tp, _Up>::__type 6242: fdim(_Tp __x, _Up __y) 6242: { 6242: typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; 6242: return fdim(__type(__x), __type(__y)); 6242: } 6242: 6242: 6242: 6242: constexpr float 6242: fma(float __x, float __y, float __z) 6242: { return __builtin_fmaf(__x, __y, __z); } 6242: 6242: constexpr long double 6242: fma(long double __x, long double __y, long double __z) 6242: { return __builtin_fmal(__x, __y, __z); } 6242: 6242: 6242: 6242: template 6242: constexpr typename __gnu_cxx::__promote_3<_Tp, _Up, _Vp>::__type 6242: fma(_Tp __x, _Up __y, _Vp __z) 6242: { 6242: typedef typename __gnu_cxx::__promote_3<_Tp, _Up, _Vp>::__type __type; 6242: return fma(__type(__x), __type(__y), __type(__z)); 6242: } 6242: 6242: 6242: 6242: constexpr float 6242: fmax(float __x, float __y) 6242: { return __builtin_fmaxf(__x, __y); } 6242: 6242: constexpr long double 6242: fmax(long double __x, long double __y) 6242: { return __builtin_fmaxl(__x, __y); } 6242: 6242: 6242: 6242: template 6242: constexpr typename __gnu_cxx::__promote_2<_Tp, _Up>::__type 6242: fmax(_Tp __x, _Up __y) 6242: { 6242: typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; 6242: return fmax(__type(__x), __type(__y)); 6242: } 6242: 6242: 6242: 6242: constexpr float 6242: fmin(float __x, float __y) 6242: { return __builtin_fminf(__x, __y); } 6242: 6242: constexpr long double 6242: fmin(long double __x, long double __y) 6242: { return __builtin_fminl(__x, __y); } 6242: 6242: 6242: 6242: template 6242: constexpr typename __gnu_cxx::__promote_2<_Tp, _Up>::__type 6242: fmin(_Tp __x, _Up __y) 6242: { 6242: typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; 6242: return fmin(__type(__x), __type(__y)); 6242: } 6242: 6242: 6242: 6242: constexpr float 6242: hypot(float __x, float __y) 6242: { return __builtin_hypotf(__x, __y); } 6242: 6242: constexpr long double 6242: hypot(long double __x, long double __y) 6242: { return __builtin_hypotl(__x, __y); } 6242: 6242: 6242: 6242: template 6242: constexpr typename __gnu_cxx::__promote_2<_Tp, _Up>::__type 6242: hypot(_Tp __x, _Up __y) 6242: { 6242: typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; 6242: return hypot(__type(__x), __type(__y)); 6242: } 6242: 6242: 6242: 6242: constexpr int 6242: ilogb(float __x) 6242: { return __builtin_ilogbf(__x); } 6242: 6242: constexpr int 6242: ilogb(long double __x) 6242: { return __builtin_ilogbl(__x); } 6242: 6242: 6242: 6242: template 6242: constexpr 6242: typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, 6242: int>::__type 6242: ilogb(_Tp __x) 6242: { return __builtin_ilogb(__x); } 6242: 6242: 6242: 6242: constexpr float 6242: lgamma(float __x) 6242: { return __builtin_lgammaf(__x); } 6242: 6242: constexpr long double 6242: lgamma(long double __x) 6242: { return __builtin_lgammal(__x); } 6242: 6242: 6242: 6242: template 6242: constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, 6242: double>::__type 6242: lgamma(_Tp __x) 6242: { return __builtin_lgamma(__x); } 6242: 6242: 6242: 6242: constexpr long long 6242: llrint(float __x) 6242: { return __builtin_llrintf(__x); } 6242: 6242: constexpr long long 6242: llrint(long double __x) 6242: { return __builtin_llrintl(__x); } 6242: 6242: 6242: 6242: template 6242: constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, 6242: long long>::__type 6242: llrint(_Tp __x) 6242: { return __builtin_llrint(__x); } 6242: 6242: 6242: 6242: constexpr long long 6242: llround(float __x) 6242: { return __builtin_llroundf(__x); } 6242: 6242: constexpr long long 6242: llround(long double __x) 6242: { return __builtin_llroundl(__x); } 6242: 6242: 6242: 6242: template 6242: constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, 6242: long long>::__type 6242: llround(_Tp __x) 6242: { return __builtin_llround(__x); } 6242: 6242: 6242: 6242: constexpr float 6242: log1p(float __x) 6242: { return __builtin_log1pf(__x); } 6242: 6242: constexpr long double 6242: log1p(long double __x) 6242: { return __builtin_log1pl(__x); } 6242: 6242: 6242: 6242: template 6242: constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, 6242: double>::__type 6242: log1p(_Tp __x) 6242: { return __builtin_log1p(__x); } 6242: 6242: 6242: 6242: 6242: constexpr float 6242: log2(float __x) 6242: { return __builtin_log2f(__x); } 6242: 6242: constexpr long double 6242: log2(long double __x) 6242: { return __builtin_log2l(__x); } 6242: 6242: 6242: 6242: template 6242: constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, 6242: double>::__type 6242: log2(_Tp __x) 6242: { return __builtin_log2(__x); } 6242: 6242: 6242: 6242: constexpr float 6242: logb(float __x) 6242: { return __builtin_logbf(__x); } 6242: 6242: constexpr long double 6242: logb(long double __x) 6242: { return __builtin_logbl(__x); } 6242: 6242: 6242: 6242: template 6242: constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, 6242: double>::__type 6242: logb(_Tp __x) 6242: { return __builtin_logb(__x); } 6242: 6242: 6242: 6242: constexpr long 6242: lrint(float __x) 6242: { return __builtin_lrintf(__x); } 6242: 6242: constexpr long 6242: lrint(long double __x) 6242: { return __builtin_lrintl(__x); } 6242: 6242: 6242: 6242: template 6242: constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, 6242: long>::__type 6242: lrint(_Tp __x) 6242: { return __builtin_lrint(__x); } 6242: 6242: 6242: 6242: constexpr long 6242: lround(float __x) 6242: { return __builtin_lroundf(__x); } 6242: 6242: constexpr long 6242: lround(long double __x) 6242: { return __builtin_lroundl(__x); } 6242: 6242: 6242: 6242: template 6242: constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, 6242: long>::__type 6242: lround(_Tp __x) 6242: { return __builtin_lround(__x); } 6242: 6242: 6242: 6242: constexpr float 6242: nearbyint(float __x) 6242: { return __builtin_nearbyintf(__x); } 6242: 6242: constexpr long double 6242: nearbyint(long double __x) 6242: { return __builtin_nearbyintl(__x); } 6242: 6242: 6242: 6242: template 6242: constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, 6242: double>::__type 6242: nearbyint(_Tp __x) 6242: { return __builtin_nearbyint(__x); } 6242: 6242: 6242: 6242: constexpr float 6242: nextafter(float __x, float __y) 6242: { return __builtin_nextafterf(__x, __y); } 6242: 6242: constexpr long double 6242: nextafter(long double __x, long double __y) 6242: { return __builtin_nextafterl(__x, __y); } 6242: 6242: 6242: 6242: template 6242: constexpr typename __gnu_cxx::__promote_2<_Tp, _Up>::__type 6242: nextafter(_Tp __x, _Up __y) 6242: { 6242: typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; 6242: return nextafter(__type(__x), __type(__y)); 6242: } 6242: 6242: 6242: 6242: constexpr float 6242: nexttoward(float __x, long double __y) 6242: { return __builtin_nexttowardf(__x, __y); } 6242: 6242: constexpr long double 6242: nexttoward(long double __x, long double __y) 6242: { return __builtin_nexttowardl(__x, __y); } 6242: 6242: 6242: 6242: template 6242: constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, 6242: double>::__type 6242: nexttoward(_Tp __x, long double __y) 6242: { return __builtin_nexttoward(__x, __y); } 6242: 6242: 6242: 6242: constexpr float 6242: remainder(float __x, float __y) 6242: { return __builtin_remainderf(__x, __y); } 6242: 6242: constexpr long double 6242: remainder(long double __x, long double __y) 6242: { return __builtin_remainderl(__x, __y); } 6242: 6242: 6242: 6242: template 6242: constexpr typename __gnu_cxx::__promote_2<_Tp, _Up>::__type 6242: remainder(_Tp __x, _Up __y) 6242: { 6242: typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; 6242: return remainder(__type(__x), __type(__y)); 6242: } 6242: 6242: 6242: 6242: inline float 6242: remquo(float __x, float __y, int* __pquo) 6242: { return __builtin_remquof(__x, __y, __pquo); } 6242: 6242: inline long double 6242: remquo(long double __x, long double __y, int* __pquo) 6242: { return __builtin_remquol(__x, __y, __pquo); } 6242: 6242: 6242: 6242: template 6242: inline typename __gnu_cxx::__promote_2<_Tp, _Up>::__type 6242: remquo(_Tp __x, _Up __y, int* __pquo) 6242: { 6242: typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; 6242: return remquo(__type(__x), __type(__y), __pquo); 6242: } 6242: 6242: 6242: 6242: constexpr float 6242: rint(float __x) 6242: { return __builtin_rintf(__x); } 6242: 6242: constexpr long double 6242: rint(long double __x) 6242: { return __builtin_rintl(__x); } 6242: 6242: 6242: 6242: template 6242: constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, 6242: double>::__type 6242: rint(_Tp __x) 6242: { return __builtin_rint(__x); } 6242: 6242: 6242: 6242: constexpr float 6242: round(float __x) 6242: { return __builtin_roundf(__x); } 6242: 6242: constexpr long double 6242: round(long double __x) 6242: { return __builtin_roundl(__x); } 6242: 6242: 6242: 6242: template 6242: constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, 6242: double>::__type 6242: round(_Tp __x) 6242: { return __builtin_round(__x); } 6242: 6242: 6242: 6242: constexpr float 6242: scalbln(float __x, long __ex) 6242: { return __builtin_scalblnf(__x, __ex); } 6242: 6242: constexpr long double 6242: scalbln(long double __x, long __ex) 6242: { return __builtin_scalblnl(__x, __ex); } 6242: 6242: 6242: 6242: template 6242: constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, 6242: double>::__type 6242: scalbln(_Tp __x, long __ex) 6242: { return __builtin_scalbln(__x, __ex); } 6242: 6242: 6242: 6242: constexpr float 6242: scalbn(float __x, int __ex) 6242: { return __builtin_scalbnf(__x, __ex); } 6242: 6242: constexpr long double 6242: scalbn(long double __x, int __ex) 6242: { return __builtin_scalbnl(__x, __ex); } 6242: 6242: 6242: 6242: template 6242: constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, 6242: double>::__type 6242: scalbn(_Tp __x, int __ex) 6242: { return __builtin_scalbn(__x, __ex); } 6242: 6242: 6242: 6242: constexpr float 6242: tgamma(float __x) 6242: { return __builtin_tgammaf(__x); } 6242: 6242: constexpr long double 6242: tgamma(long double __x) 6242: { return __builtin_tgammal(__x); } 6242: 6242: 6242: 6242: template 6242: constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, 6242: double>::__type 6242: tgamma(_Tp __x) 6242: { return __builtin_tgamma(__x); } 6242: 6242: 6242: 6242: constexpr float 6242: trunc(float __x) 6242: { return __builtin_truncf(__x); } 6242: 6242: constexpr long double 6242: trunc(long double __x) 6242: { return __builtin_truncl(__x); } 6242: 6242: 6242: 6242: template 6242: constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, 6242: double>::__type 6242: trunc(_Tp __x) 6242: { return __builtin_trunc(__x); } 6242: # 1888 "/usr/include/c++/8/cmath" 3 6242: 6242: } 6242: 6242: 6242: 6242: 6242: 6242: } 6242: # 22 "/usr/include/boost/config/no_tr1/cmath.hpp" 2 3 4 6242: # 15 "/usr/include/boost/functional/hash/detail/float_functions.hpp" 2 3 4 6242: # 76 "/usr/include/boost/functional/hash/detail/float_functions.hpp" 3 4 6242: namespace boost { 6242: namespace hash_detail { 6242: template 6242: struct call_ldexp { 6242: typedef Float float_type; 6242: inline Float operator()(Float x, int y) const { 6242: return std::ldexp(x, y); 6242: } 6242: }; 6242: 6242: template 6242: struct call_frexp { 6242: typedef Float float_type; 6242: inline Float operator()(Float x, int* y) const { 6242: return std::frexp(x, y); 6242: } 6242: }; 6242: 6242: template 6242: struct select_hash_type 6242: { 6242: typedef Float type; 6242: }; 6242: } 6242: } 6242: # 15 "/usr/include/boost/functional/hash/detail/hash_float.hpp" 2 3 4 6242: # 1 "/usr/include/boost/functional/hash/detail/limits.hpp" 1 3 4 6242: # 14 "/usr/include/boost/functional/hash/detail/limits.hpp" 3 4 6242: 6242: # 27 "/usr/include/boost/functional/hash/detail/limits.hpp" 3 4 6242: namespace boost 6242: { 6242: namespace hash_detail 6242: { 6242: template 6242: struct limits : std::numeric_limits {}; 6242: # 59 "/usr/include/boost/functional/hash/detail/limits.hpp" 3 4 6242: } 6242: } 6242: # 16 "/usr/include/boost/functional/hash/detail/hash_float.hpp" 2 3 4 6242: # 1 "/usr/include/boost/utility/enable_if.hpp" 1 3 4 6242: # 15 "/usr/include/boost/utility/enable_if.hpp" 3 4 6242: # 1 "/usr/include/boost/core/enable_if.hpp" 1 3 4 6242: # 24 "/usr/include/boost/core/enable_if.hpp" 3 4 6242: namespace boost 6242: { 6242: template 6242: struct enable_if_has_type 6242: { 6242: typedef R type; 6242: }; 6242: 6242: template 6242: struct enable_if_c { 6242: typedef T type; 6242: }; 6242: 6242: template 6242: struct enable_if_c {}; 6242: 6242: template 6242: struct enable_if : public enable_if_c {}; 6242: 6242: template 6242: struct lazy_enable_if_c { 6242: typedef typename T::type type; 6242: }; 6242: 6242: template 6242: struct lazy_enable_if_c {}; 6242: 6242: template 6242: struct lazy_enable_if : public lazy_enable_if_c {}; 6242: 6242: 6242: template 6242: struct disable_if_c { 6242: typedef T type; 6242: }; 6242: 6242: template 6242: struct disable_if_c {}; 6242: 6242: template 6242: struct disable_if : public disable_if_c {}; 6242: 6242: template 6242: struct lazy_disable_if_c { 6242: typedef typename T::type type; 6242: }; 6242: 6242: template 6242: struct lazy_disable_if_c {}; 6242: 6242: template 6242: struct lazy_disable_if : public lazy_disable_if_c {}; 6242: 6242: } 6242: # 16 "/usr/include/boost/utility/enable_if.hpp" 2 3 4 6242: # 17 "/usr/include/boost/functional/hash/detail/hash_float.hpp" 2 3 4 6242: # 1 "/usr/include/boost/integer/static_log2.hpp" 1 3 4 6242: # 21 "/usr/include/boost/integer/static_log2.hpp" 3 4 6242: namespace boost { 6242: 6242: namespace detail { 6242: 6242: namespace static_log2_impl { 6242: # 44 "/usr/include/boost/integer/static_log2.hpp" 3 4 6242: typedef boost::static_log2_argument_type argument_type; 6242: typedef boost::static_log2_result_type result_type; 6242: 6242: template 6242: struct choose_initial_n { 6242: 6242: static const bool c = (argument_type(1) << n << n) != 0; 6242: static const result_type value = !c*n + choose_initial_n<2*c*n>::value 6242: 6242: 6242: ; 6242: 6242: }; 6242: 6242: template <> 6242: struct choose_initial_n<0> { 6242: static const result_type value = 0; 6242: }; 6242: 6242: 6242: 6242: 6242: const result_type n_zero = 16; 6242: const result_type initial_n = choose_initial_n::value; 6242: # 84 "/usr/include/boost/integer/static_log2.hpp" 3 4 6242: template 6242: struct static_log2_impl { 6242: 6242: static const bool c = (x >> n) > 0; 6242: static const result_type value = c*n + (static_log2_impl< (x>>c*n), n/2 >::value) 6242: 6242: 6242: ; 6242: 6242: }; 6242: 6242: template <> 6242: struct static_log2_impl<1, 0> { 6242: static const result_type value = 0; 6242: }; 6242: 6242: } 6242: } 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: template 6242: struct static_log2 { 6242: 6242: static const static_log2_result_type value = detail::static_log2_impl::static_log2_impl::value 6242: 6242: 6242: ; 6242: 6242: }; 6242: 6242: 6242: template <> 6242: struct static_log2<0> { }; 6242: 6242: } 6242: # 18 "/usr/include/boost/functional/hash/detail/hash_float.hpp" 2 3 4 6242: # 1 "/usr/include/boost/cstdint.hpp" 1 3 4 6242: # 19 "/usr/include/boost/functional/hash/detail/hash_float.hpp" 2 3 4 6242: # 1 "/usr/include/boost/assert.hpp" 1 3 4 6242: # 58 "/usr/include/boost/assert.hpp" 3 4 6242: # 1 "/usr/include/assert.h" 1 3 4 6242: # 59 "/usr/include/boost/assert.hpp" 2 3 4 6242: # 20 "/usr/include/boost/functional/hash/detail/hash_float.hpp" 2 3 4 6242: 6242: # 1 "/usr/include/c++/8/cstring" 1 3 4 6242: # 39 "/usr/include/c++/8/cstring" 3 4 6242: 6242: # 40 "/usr/include/c++/8/cstring" 3 6242: # 22 "/usr/include/boost/functional/hash/detail/hash_float.hpp" 2 3 4 6242: # 51 "/usr/include/boost/functional/hash/detail/hash_float.hpp" 3 4 6242: namespace boost 6242: { 6242: namespace hash_detail 6242: { 6242: inline void hash_float_combine(std::size_t& seed, std::size_t value) 6242: { 6242: seed ^= value + (seed<<6) + (seed>>2); 6242: } 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: inline std::size_t hash_binary(char* ptr, std::size_t length) 6242: { 6242: std::size_t seed = 0; 6242: 6242: if (length >= sizeof(std::size_t)) { 6242: std::memcpy(&seed, ptr, sizeof(std::size_t)); 6242: length -= sizeof(std::size_t); 6242: ptr += sizeof(std::size_t); 6242: 6242: while(length >= sizeof(std::size_t)) { 6242: std::size_t buffer = 0; 6242: std::memcpy(&buffer, ptr, sizeof(std::size_t)); 6242: hash_float_combine(seed, buffer); 6242: length -= sizeof(std::size_t); 6242: ptr += sizeof(std::size_t); 6242: } 6242: } 6242: 6242: if (length > 0) { 6242: std::size_t buffer = 0; 6242: std::memcpy(&buffer, ptr, length); 6242: hash_float_combine(seed, buffer); 6242: } 6242: 6242: return seed; 6242: } 6242: 6242: template 6242: struct enable_binary_hash 6242: { 6242: static const bool value = std::numeric_limits::is_iec559 && std::numeric_limits::digits == digits && std::numeric_limits::radix == 2 && std::numeric_limits::max_exponent == max_exponent 6242: 6242: 6242: 6242: ; 6242: }; 6242: 6242: template 6242: inline std::size_t float_hash_impl(Float v, 6242: typename boost::enable_if_c< 6242: enable_binary_hash::value, 6242: std::size_t>::type) 6242: { 6242: return hash_binary((char*) &v, 4); 6242: } 6242: 6242: 6242: template 6242: inline std::size_t float_hash_impl(Float v, 6242: typename boost::enable_if_c< 6242: enable_binary_hash::value, 6242: std::size_t>::type) 6242: { 6242: return hash_binary((char*) &v, 8); 6242: } 6242: 6242: template 6242: inline std::size_t float_hash_impl(Float v, 6242: typename boost::enable_if_c< 6242: enable_binary_hash::value, 6242: std::size_t>::type) 6242: { 6242: return hash_binary((char*) &v, 10); 6242: } 6242: 6242: template 6242: inline std::size_t float_hash_impl(Float v, 6242: typename boost::enable_if_c< 6242: enable_binary_hash::value, 6242: std::size_t>::type) 6242: { 6242: return hash_binary((char*) &v, 16); 6242: } 6242: 6242: 6242: 6242: 6242: 6242: 6242: template 6242: inline std::size_t float_hash_impl2(T v) 6242: { 6242: boost::hash_detail::call_frexp frexp; 6242: boost::hash_detail::call_ldexp ldexp; 6242: 6242: int exp = 0; 6242: 6242: v = frexp(v, &exp); 6242: 6242: 6242: 6242: if(v < 0) { 6242: v = -v; 6242: exp += limits::max_exponent - 6242: limits::min_exponent; 6242: } 6242: 6242: v = ldexp(v, limits::digits); 6242: std::size_t seed = static_cast(v); 6242: v -= static_cast(seed); 6242: 6242: 6242: std::size_t const length 6242: = (limits::digits * 6242: boost::static_log2::radix>::value 6242: + limits::digits - 1) 6242: / limits::digits; 6242: 6242: for(std::size_t i = 0; i != length; ++i) 6242: { 6242: v = ldexp(v, limits::digits); 6242: std::size_t part = static_cast(v); 6242: v -= static_cast(part); 6242: hash_float_combine(seed, part); 6242: } 6242: 6242: hash_float_combine(seed, static_cast(exp)); 6242: 6242: return seed; 6242: } 6242: 6242: 6242: template 6242: inline std::size_t float_hash_impl(T v, ...) 6242: { 6242: typedef typename select_hash_type::type type; 6242: return float_hash_impl2(static_cast(v)); 6242: } 6242: 6242: } 6242: } 6242: 6242: 6242: 6242: 6242: 6242: namespace boost 6242: { 6242: namespace hash_detail 6242: { 6242: template 6242: inline std::size_t float_hash_value(T v) 6242: { 6242: 6242: 6242: 6242: switch (std::fpclassify(v)) 6242: 6242: 6242: 6242: 6242: { 6242: case 2: 6242: return 0; 6242: case 1: 6242: return (std::size_t)(v > 0 ? -1 : -2); 6242: case 0: 6242: return (std::size_t)(-3); 6242: case 4: 6242: case 3: 6242: return float_hash_impl(v, 0); 6242: default: 6242: (static_cast (0) ? void (0) : __assert_fail ("0", "/usr/include/boost/functional/hash/detail/hash_float.hpp", 228, __extension__ __PRETTY_FUNCTION__)); 6242: return 0; 6242: } 6242: } 6242: } 6242: } 6242: # 22 "/usr/include/boost/functional/hash/hash.hpp" 2 3 4 6242: 6242: 6242: 6242: 6242: 6242: # 1 "/usr/include/boost/cstdint.hpp" 1 3 4 6242: # 28 "/usr/include/boost/functional/hash/hash.hpp" 2 3 4 6242: 6242: 6242: 6242: 6242: 6242: 6242: # 1 "/usr/include/c++/8/typeindex" 1 3 4 6242: # 32 "/usr/include/c++/8/typeindex" 3 4 6242: 6242: # 33 "/usr/include/c++/8/typeindex" 3 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: namespace std __attribute__ ((__visibility__ ("default"))) 6242: { 6242: 6242: # 52 "/usr/include/c++/8/typeindex" 3 6242: struct type_index 6242: { 6242: type_index(const type_info& __rhs) noexcept 6242: : _M_target(&__rhs) { } 6242: 6242: bool 6242: operator==(const type_index& __rhs) const noexcept 6242: { return *_M_target == *__rhs._M_target; } 6242: 6242: bool 6242: operator!=(const type_index& __rhs) const noexcept 6242: { return *_M_target != *__rhs._M_target; } 6242: 6242: bool 6242: operator<(const type_index& __rhs) const noexcept 6242: { return _M_target->before(*__rhs._M_target); } 6242: 6242: bool 6242: operator<=(const type_index& __rhs) const noexcept 6242: { return !__rhs._M_target->before(*_M_target); } 6242: 6242: bool 6242: operator>(const type_index& __rhs) const noexcept 6242: { return __rhs._M_target->before(*_M_target); } 6242: 6242: bool 6242: operator>=(const type_index& __rhs) const noexcept 6242: { return !_M_target->before(*__rhs._M_target); } 6242: 6242: size_t 6242: hash_code() const noexcept 6242: { return _M_target->hash_code(); } 6242: 6242: const char* 6242: name() const noexcept 6242: { return _M_target->name(); } 6242: 6242: private: 6242: const type_info* _M_target; 6242: }; 6242: 6242: template struct hash; 6242: 6242: 6242: template<> 6242: struct hash 6242: { 6242: typedef size_t result_type; 6242: typedef type_index argument_type; 6242: 6242: size_t 6242: operator()(const type_index& __ti) const noexcept 6242: { return __ti.hash_code(); } 6242: }; 6242: 6242: 6242: } 6242: # 35 "/usr/include/boost/functional/hash/hash.hpp" 2 3 4 6242: # 61 "/usr/include/boost/functional/hash/hash.hpp" 3 4 6242: namespace boost 6242: { 6242: namespace hash_detail 6242: { 6242: # 73 "/usr/include/boost/functional/hash/hash.hpp" 3 4 6242: template 6242: struct hash_base : std::unary_function {}; 6242: 6242: 6242: struct enable_hash_value { typedef std::size_t type; }; 6242: 6242: template struct basic_numbers {}; 6242: template struct long_numbers; 6242: template struct ulong_numbers; 6242: template struct float_numbers {}; 6242: 6242: template <> struct basic_numbers : 6242: boost::hash_detail::enable_hash_value {}; 6242: template <> struct basic_numbers : 6242: boost::hash_detail::enable_hash_value {}; 6242: template <> struct basic_numbers : 6242: boost::hash_detail::enable_hash_value {}; 6242: template <> struct basic_numbers : 6242: boost::hash_detail::enable_hash_value {}; 6242: template <> struct basic_numbers : 6242: boost::hash_detail::enable_hash_value {}; 6242: template <> struct basic_numbers : 6242: boost::hash_detail::enable_hash_value {}; 6242: template <> struct basic_numbers : 6242: boost::hash_detail::enable_hash_value {}; 6242: template <> struct basic_numbers : 6242: boost::hash_detail::enable_hash_value {}; 6242: template <> struct basic_numbers : 6242: boost::hash_detail::enable_hash_value {}; 6242: template <> struct basic_numbers : 6242: boost::hash_detail::enable_hash_value {}; 6242: 6242: 6242: template <> struct basic_numbers : 6242: boost::hash_detail::enable_hash_value {}; 6242: 6242: 6242: 6242: template <> struct basic_numbers : 6242: boost::hash_detail::enable_hash_value {}; 6242: 6242: 6242: 6242: template <> struct basic_numbers : 6242: boost::hash_detail::enable_hash_value {}; 6242: 6242: 6242: 6242: 6242: 6242: template struct long_numbers2 {}; 6242: template struct ulong_numbers2 {}; 6242: template struct long_numbers : long_numbers2 {}; 6242: template struct ulong_numbers : ulong_numbers2 {}; 6242: 6242: 6242: template <> struct long_numbers : 6242: boost::hash_detail::enable_hash_value {}; 6242: template <> struct ulong_numbers : 6242: boost::hash_detail::enable_hash_value {}; 6242: 6242: 6242: 6242: template <> struct long_numbers2 : 6242: boost::hash_detail::enable_hash_value {}; 6242: template <> struct ulong_numbers2 : 6242: boost::hash_detail::enable_hash_value {}; 6242: 6242: 6242: template <> struct float_numbers : 6242: boost::hash_detail::enable_hash_value {}; 6242: template <> struct float_numbers : 6242: boost::hash_detail::enable_hash_value {}; 6242: template <> struct float_numbers : 6242: boost::hash_detail::enable_hash_value {}; 6242: } 6242: 6242: template 6242: typename boost::hash_detail::basic_numbers::type hash_value(T); 6242: template 6242: typename boost::hash_detail::long_numbers::type hash_value(T); 6242: template 6242: typename boost::hash_detail::ulong_numbers::type hash_value(T); 6242: 6242: template 6242: typename boost::enable_if, std::size_t>::type 6242: hash_value(T); 6242: 6242: 6242: template std::size_t hash_value(T* const&); 6242: 6242: 6242: 6242: 6242: 6242: template< class T, unsigned N > 6242: std::size_t hash_value(const T (&x)[N]); 6242: 6242: template< class T, unsigned N > 6242: std::size_t hash_value(T (&x)[N]); 6242: 6242: 6242: template 6242: std::size_t hash_value( 6242: std::basic_string, A> const&); 6242: 6242: template 6242: typename boost::hash_detail::float_numbers::type hash_value(T); 6242: 6242: 6242: std::size_t hash_value(std::type_index); 6242: 6242: 6242: 6242: 6242: namespace hash_detail 6242: { 6242: template 6242: inline std::size_t hash_value_signed(T val) 6242: { 6242: const unsigned int size_t_bits = std::numeric_limits::digits; 6242: 6242: const int length = (std::numeric_limits::digits - 1) 6242: / static_cast(size_t_bits); 6242: 6242: std::size_t seed = 0; 6242: T positive = val < 0 ? -1 - val : val; 6242: 6242: 6242: for(unsigned int i = length * size_t_bits; i > 0; i -= size_t_bits) 6242: { 6242: seed ^= (std::size_t) (positive >> i) + (seed<<6) + (seed>>2); 6242: } 6242: seed ^= (std::size_t) val + (seed<<6) + (seed>>2); 6242: 6242: return seed; 6242: } 6242: 6242: template 6242: inline std::size_t hash_value_unsigned(T val) 6242: { 6242: const unsigned int size_t_bits = std::numeric_limits::digits; 6242: 6242: const int length = (std::numeric_limits::digits - 1) 6242: / static_cast(size_t_bits); 6242: 6242: std::size_t seed = 0; 6242: 6242: 6242: for(unsigned int i = length * size_t_bits; i > 0; i -= size_t_bits) 6242: { 6242: seed ^= (std::size_t) (val >> i) + (seed<<6) + (seed>>2); 6242: } 6242: seed ^= (std::size_t) val + (seed<<6) + (seed>>2); 6242: 6242: return seed; 6242: } 6242: 6242: template 6242: inline void hash_combine_impl(SizeT& seed, SizeT value) 6242: { 6242: seed ^= value + 0x9e3779b9 + (seed<<6) + (seed>>2); 6242: } 6242: 6242: inline void hash_combine_impl(boost::uint32_t& h1, 6242: boost::uint32_t k1) 6242: { 6242: const uint32_t c1 = 0xcc9e2d51; 6242: const uint32_t c2 = 0x1b873593; 6242: 6242: k1 *= c1; 6242: k1 = (k1 << 15) | (k1 >> (32 - 15)); 6242: k1 *= c2; 6242: 6242: h1 ^= k1; 6242: h1 = (h1 << 13) | (h1 >> (32 - 13)); 6242: h1 = h1*5+0xe6546b64; 6242: } 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: inline void hash_combine_impl(boost::uint64_t& h, 6242: boost::uint64_t k) 6242: { 6242: const boost::uint64_t m = 0xc6a4a7935bd1e995UL; 6242: const int r = 47; 6242: 6242: k *= m; 6242: k ^= k >> r; 6242: k *= m; 6242: 6242: h ^= k; 6242: h *= m; 6242: 6242: 6242: 6242: h += 0xe6546b64; 6242: } 6242: 6242: 6242: } 6242: 6242: template 6242: typename boost::hash_detail::basic_numbers::type hash_value(T v) 6242: { 6242: return static_cast(v); 6242: } 6242: 6242: template 6242: typename boost::hash_detail::long_numbers::type hash_value(T v) 6242: { 6242: return hash_detail::hash_value_signed(v); 6242: } 6242: 6242: template 6242: typename boost::hash_detail::ulong_numbers::type hash_value(T v) 6242: { 6242: return hash_detail::hash_value_unsigned(v); 6242: } 6242: 6242: template 6242: typename boost::enable_if, std::size_t>::type 6242: hash_value(T v) 6242: { 6242: return static_cast(v); 6242: } 6242: 6242: 6242: 6242: template std::size_t hash_value(T* const& v) 6242: 6242: 6242: 6242: { 6242: 6242: 6242: 6242: 6242: 6242: 6242: std::size_t x = static_cast( 6242: reinterpret_cast(v)); 6242: 6242: return x + (x >> 3); 6242: } 6242: # 333 "/usr/include/boost/functional/hash/hash.hpp" 3 4 6242: template 6242: inline void hash_combine(std::size_t& seed, T const& v) 6242: { 6242: boost::hash hasher; 6242: return boost::hash_detail::hash_combine_impl(seed, hasher(v)); 6242: } 6242: 6242: 6242: 6242: 6242: 6242: template 6242: inline std::size_t hash_range(It first, It last) 6242: { 6242: std::size_t seed = 0; 6242: 6242: for(; first != last; ++first) 6242: { 6242: hash_combine(seed, *first); 6242: } 6242: 6242: return seed; 6242: } 6242: 6242: template 6242: inline void hash_range(std::size_t& seed, It first, It last) 6242: { 6242: for(; first != last; ++first) 6242: { 6242: hash_combine(seed, *first); 6242: } 6242: } 6242: # 393 "/usr/include/boost/functional/hash/hash.hpp" 3 4 6242: template< class T, unsigned N > 6242: inline std::size_t hash_value(const T (&x)[N]) 6242: { 6242: return hash_range(x, x + N); 6242: } 6242: 6242: template< class T, unsigned N > 6242: inline std::size_t hash_value(T (&x)[N]) 6242: { 6242: return hash_range(x, x + N); 6242: } 6242: 6242: 6242: template 6242: inline std::size_t hash_value( 6242: std::basic_string, A> const& v) 6242: { 6242: return hash_range(v.begin(), v.end()); 6242: } 6242: 6242: template 6242: typename boost::hash_detail::float_numbers::type hash_value(T v) 6242: { 6242: return boost::hash_detail::float_hash_value(v); 6242: } 6242: 6242: 6242: inline std::size_t hash_value(std::type_index v) 6242: { 6242: return v.hash_code(); 6242: } 6242: # 462 "/usr/include/boost/functional/hash/hash.hpp" 3 4 6242: template <> struct hash : public boost::hash_detail::hash_base { std::size_t operator()(bool v) const { return boost::hash_value(v); } }; 6242: template <> struct hash : public boost::hash_detail::hash_base { std::size_t operator()(char v) const { return boost::hash_value(v); } }; 6242: template <> struct hash : public boost::hash_detail::hash_base { std::size_t operator()(signed char v) const { return boost::hash_value(v); } }; 6242: template <> struct hash : public boost::hash_detail::hash_base { std::size_t operator()(unsigned char v) const { return boost::hash_value(v); } }; 6242: 6242: template <> struct hash : public boost::hash_detail::hash_base { std::size_t operator()(wchar_t v) const { return boost::hash_value(v); } }; 6242: 6242: 6242: template <> struct hash : public boost::hash_detail::hash_base { std::size_t operator()(char16_t v) const { return boost::hash_value(v); } }; 6242: 6242: 6242: template <> struct hash : public boost::hash_detail::hash_base { std::size_t operator()(char32_t v) const { return boost::hash_value(v); } }; 6242: 6242: template <> struct hash : public boost::hash_detail::hash_base { std::size_t operator()(short v) const { return boost::hash_value(v); } }; 6242: template <> struct hash : public boost::hash_detail::hash_base { std::size_t operator()(unsigned short v) const { return boost::hash_value(v); } }; 6242: template <> struct hash : public boost::hash_detail::hash_base { std::size_t operator()(int v) const { return boost::hash_value(v); } }; 6242: template <> struct hash : public boost::hash_detail::hash_base { std::size_t operator()(unsigned int v) const { return boost::hash_value(v); } }; 6242: template <> struct hash : public boost::hash_detail::hash_base { std::size_t operator()(long v) const { return boost::hash_value(v); } }; 6242: template <> struct hash : public boost::hash_detail::hash_base { std::size_t operator()(unsigned long v) const { return boost::hash_value(v); } }; 6242: 6242: template <> struct hash : public boost::hash_detail::hash_base { std::size_t operator()(float v) const { return boost::hash_value(v); } }; 6242: template <> struct hash : public boost::hash_detail::hash_base { std::size_t operator()(double v) const { return boost::hash_value(v); } }; 6242: template <> struct hash : public boost::hash_detail::hash_base { std::size_t operator()(long double v) const { return boost::hash_value(v); } }; 6242: 6242: template <> struct hash : public boost::hash_detail::hash_base { std::size_t operator()(std::string const& v) const { return boost::hash_value(v); } }; 6242: 6242: template <> struct hash : public boost::hash_detail::hash_base { std::size_t operator()(std::wstring const& v) const { return boost::hash_value(v); } }; 6242: 6242: 6242: template <> struct hash > : public boost::hash_detail::hash_base > { std::size_t operator()(std::basic_string const& v) const { return boost::hash_value(v); } }; 6242: 6242: 6242: template <> struct hash > : public boost::hash_detail::hash_base > { std::size_t operator()(std::basic_string const& v) const { return boost::hash_value(v); } }; 6242: 6242: 6242: 6242: template <> struct hash : public boost::hash_detail::hash_base { std::size_t operator()(boost::long_long_type v) const { return boost::hash_value(v); } }; 6242: template <> struct hash : public boost::hash_detail::hash_base { std::size_t operator()(boost::ulong_long_type v) const { return boost::hash_value(v); } }; 6242: 6242: 6242: 6242: template <> struct hash : public boost::hash_detail::hash_base { std::size_t operator()(boost::int128_type v) const { return boost::hash_value(v); } }; 6242: template <> struct hash : public boost::hash_detail::hash_base { std::size_t operator()(boost::uint128_type v) const { return boost::hash_value(v); } }; 6242: 6242: 6242: 6242: template <> struct hash : public boost::hash_detail::hash_base { std::size_t operator()(std::type_index v) const { return boost::hash_value(v); } }; 6242: # 518 "/usr/include/boost/functional/hash/hash.hpp" 3 4 6242: template 6242: struct hash 6242: : public boost::hash_detail::hash_base 6242: { 6242: std::size_t operator()(T* v) const 6242: { 6242: 6242: return boost::hash_value(v); 6242: 6242: 6242: 6242: 6242: 6242: 6242: } 6242: }; 6242: # 577 "/usr/include/boost/functional/hash/hash.hpp" 3 4 6242: } 6242: # 594 "/usr/include/boost/functional/hash/hash.hpp" 3 4 6242: # 1 "/usr/include/boost/functional/hash/extensions.hpp" 1 3 4 6242: # 18 "/usr/include/boost/functional/hash/extensions.hpp" 3 4 6242: 6242: 6242: 6242: # 1 "/usr/include/boost/functional/hash/hash.hpp" 1 3 4 6242: # 22 "/usr/include/boost/functional/hash/extensions.hpp" 2 3 4 6242: # 1 "/usr/include/boost/detail/container_fwd.hpp" 1 3 4 6242: # 91 "/usr/include/boost/detail/container_fwd.hpp" 3 4 6242: # 1 "/usr/include/c++/8/deque" 1 3 4 6242: # 58 "/usr/include/c++/8/deque" 3 4 6242: 6242: # 59 "/usr/include/c++/8/deque" 3 6242: 6242: 6242: 6242: 6242: 6242: # 1 "/usr/include/c++/8/bits/stl_deque.h" 1 3 6242: # 68 "/usr/include/c++/8/bits/stl_deque.h" 3 6242: namespace std __attribute__ ((__visibility__ ("default"))) 6242: { 6242: 6242: 6242: # 91 "/usr/include/c++/8/bits/stl_deque.h" 3 6242: constexpr inline size_t 6242: __deque_buf_size(size_t __size) 6242: { return (__size < 512 6242: ? size_t(512 / __size) : size_t(1)); } 6242: # 108 "/usr/include/c++/8/bits/stl_deque.h" 3 6242: template 6242: struct _Deque_iterator 6242: { 6242: 6242: 6242: 6242: 6242: 6242: 6242: private: 6242: template 6242: using __ptr_to = typename pointer_traits<_Ptr>::template rebind<_Up>; 6242: template 6242: using __iter = _Deque_iterator<_Tp, _CvTp&, __ptr_to<_CvTp>>; 6242: public: 6242: typedef __iter<_Tp> iterator; 6242: typedef __iter const_iterator; 6242: typedef __ptr_to<_Tp> _Elt_pointer; 6242: typedef __ptr_to<_Elt_pointer> _Map_pointer; 6242: 6242: 6242: static size_t _S_buffer_size() noexcept 6242: { return __deque_buf_size(sizeof(_Tp)); } 6242: 6242: typedef std::random_access_iterator_tag iterator_category; 6242: typedef _Tp value_type; 6242: typedef _Ptr pointer; 6242: typedef _Ref reference; 6242: typedef size_t size_type; 6242: typedef ptrdiff_t difference_type; 6242: typedef _Deque_iterator _Self; 6242: 6242: _Elt_pointer _M_cur; 6242: _Elt_pointer _M_first; 6242: _Elt_pointer _M_last; 6242: _Map_pointer _M_node; 6242: 6242: _Deque_iterator(_Elt_pointer __x, _Map_pointer __y) noexcept 6242: : _M_cur(__x), _M_first(*__y), 6242: _M_last(*__y + _S_buffer_size()), _M_node(__y) { } 6242: 6242: _Deque_iterator() noexcept 6242: : _M_cur(), _M_first(), _M_last(), _M_node() { } 6242: 6242: _Deque_iterator(const iterator& __x) noexcept 6242: : _M_cur(__x._M_cur), _M_first(__x._M_first), 6242: _M_last(__x._M_last), _M_node(__x._M_node) { } 6242: 6242: iterator 6242: _M_const_cast() const noexcept 6242: { return iterator(_M_cur, _M_node); } 6242: 6242: reference 6242: operator*() const noexcept 6242: { return *_M_cur; } 6242: 6242: pointer 6242: operator->() const noexcept 6242: { return _M_cur; } 6242: 6242: _Self& 6242: operator++() noexcept 6242: { 6242: ++_M_cur; 6242: if (_M_cur == _M_last) 6242: { 6242: _M_set_node(_M_node + 1); 6242: _M_cur = _M_first; 6242: } 6242: return *this; 6242: } 6242: 6242: _Self 6242: operator++(int) noexcept 6242: { 6242: _Self __tmp = *this; 6242: ++*this; 6242: return __tmp; 6242: } 6242: 6242: _Self& 6242: operator--() noexcept 6242: { 6242: if (_M_cur == _M_first) 6242: { 6242: _M_set_node(_M_node - 1); 6242: _M_cur = _M_last; 6242: } 6242: --_M_cur; 6242: return *this; 6242: } 6242: 6242: _Self 6242: operator--(int) noexcept 6242: { 6242: _Self __tmp = *this; 6242: --*this; 6242: return __tmp; 6242: } 6242: 6242: _Self& 6242: operator+=(difference_type __n) noexcept 6242: { 6242: const difference_type __offset = __n + (_M_cur - _M_first); 6242: if (__offset >= 0 && __offset < difference_type(_S_buffer_size())) 6242: _M_cur += __n; 6242: else 6242: { 6242: const difference_type __node_offset = 6242: __offset > 0 ? __offset / difference_type(_S_buffer_size()) 6242: : -difference_type((-__offset - 1) 6242: / _S_buffer_size()) - 1; 6242: _M_set_node(_M_node + __node_offset); 6242: _M_cur = _M_first + (__offset - __node_offset 6242: * difference_type(_S_buffer_size())); 6242: } 6242: return *this; 6242: } 6242: 6242: _Self 6242: operator+(difference_type __n) const noexcept 6242: { 6242: _Self __tmp = *this; 6242: return __tmp += __n; 6242: } 6242: 6242: _Self& 6242: operator-=(difference_type __n) noexcept 6242: { return *this += -__n; } 6242: 6242: _Self 6242: operator-(difference_type __n) const noexcept 6242: { 6242: _Self __tmp = *this; 6242: return __tmp -= __n; 6242: } 6242: 6242: reference 6242: operator[](difference_type __n) const noexcept 6242: { return *(*this + __n); } 6242: 6242: 6242: 6242: 6242: 6242: 6242: void 6242: _M_set_node(_Map_pointer __new_node) noexcept 6242: { 6242: _M_node = __new_node; 6242: _M_first = *__new_node; 6242: _M_last = _M_first + difference_type(_S_buffer_size()); 6242: } 6242: }; 6242: 6242: 6242: 6242: 6242: template 6242: inline bool 6242: operator==(const _Deque_iterator<_Tp, _Ref, _Ptr>& __x, 6242: const _Deque_iterator<_Tp, _Ref, _Ptr>& __y) noexcept 6242: { return __x._M_cur == __y._M_cur; } 6242: 6242: template 6242: inline bool 6242: operator==(const _Deque_iterator<_Tp, _RefL, _PtrL>& __x, 6242: const _Deque_iterator<_Tp, _RefR, _PtrR>& __y) noexcept 6242: { return __x._M_cur == __y._M_cur; } 6242: 6242: template 6242: inline bool 6242: operator!=(const _Deque_iterator<_Tp, _Ref, _Ptr>& __x, 6242: const _Deque_iterator<_Tp, _Ref, _Ptr>& __y) noexcept 6242: { return !(__x == __y); } 6242: 6242: template 6242: inline bool 6242: operator!=(const _Deque_iterator<_Tp, _RefL, _PtrL>& __x, 6242: const _Deque_iterator<_Tp, _RefR, _PtrR>& __y) noexcept 6242: { return !(__x == __y); } 6242: 6242: template 6242: inline bool 6242: operator<(const _Deque_iterator<_Tp, _Ref, _Ptr>& __x, 6242: const _Deque_iterator<_Tp, _Ref, _Ptr>& __y) noexcept 6242: { return (__x._M_node == __y._M_node) ? (__x._M_cur < __y._M_cur) 6242: : (__x._M_node < __y._M_node); } 6242: 6242: template 6242: inline bool 6242: operator<(const _Deque_iterator<_Tp, _RefL, _PtrL>& __x, 6242: const _Deque_iterator<_Tp, _RefR, _PtrR>& __y) noexcept 6242: { return (__x._M_node == __y._M_node) ? (__x._M_cur < __y._M_cur) 6242: : (__x._M_node < __y._M_node); } 6242: 6242: template 6242: inline bool 6242: operator>(const _Deque_iterator<_Tp, _Ref, _Ptr>& __x, 6242: const _Deque_iterator<_Tp, _Ref, _Ptr>& __y) noexcept 6242: { return __y < __x; } 6242: 6242: template 6242: inline bool 6242: operator>(const _Deque_iterator<_Tp, _RefL, _PtrL>& __x, 6242: const _Deque_iterator<_Tp, _RefR, _PtrR>& __y) noexcept 6242: { return __y < __x; } 6242: 6242: template 6242: inline bool 6242: operator<=(const _Deque_iterator<_Tp, _Ref, _Ptr>& __x, 6242: const _Deque_iterator<_Tp, _Ref, _Ptr>& __y) noexcept 6242: { return !(__y < __x); } 6242: 6242: template 6242: inline bool 6242: operator<=(const _Deque_iterator<_Tp, _RefL, _PtrL>& __x, 6242: const _Deque_iterator<_Tp, _RefR, _PtrR>& __y) noexcept 6242: { return !(__y < __x); } 6242: 6242: template 6242: inline bool 6242: operator>=(const _Deque_iterator<_Tp, _Ref, _Ptr>& __x, 6242: const _Deque_iterator<_Tp, _Ref, _Ptr>& __y) noexcept 6242: { return !(__x < __y); } 6242: 6242: template 6242: inline bool 6242: operator>=(const _Deque_iterator<_Tp, _RefL, _PtrL>& __x, 6242: const _Deque_iterator<_Tp, _RefR, _PtrR>& __y) noexcept 6242: { return !(__x < __y); } 6242: 6242: 6242: 6242: 6242: 6242: template 6242: inline typename _Deque_iterator<_Tp, _Ref, _Ptr>::difference_type 6242: operator-(const _Deque_iterator<_Tp, _Ref, _Ptr>& __x, 6242: const _Deque_iterator<_Tp, _Ref, _Ptr>& __y) noexcept 6242: { 6242: return typename _Deque_iterator<_Tp, _Ref, _Ptr>::difference_type 6242: (_Deque_iterator<_Tp, _Ref, _Ptr>::_S_buffer_size()) 6242: * (__x._M_node - __y._M_node - 1) + (__x._M_cur - __x._M_first) 6242: + (__y._M_last - __y._M_cur); 6242: } 6242: 6242: template 6242: inline typename _Deque_iterator<_Tp, _RefL, _PtrL>::difference_type 6242: operator-(const _Deque_iterator<_Tp, _RefL, _PtrL>& __x, 6242: const _Deque_iterator<_Tp, _RefR, _PtrR>& __y) noexcept 6242: { 6242: return typename _Deque_iterator<_Tp, _RefL, _PtrL>::difference_type 6242: (_Deque_iterator<_Tp, _RefL, _PtrL>::_S_buffer_size()) 6242: * (__x._M_node - __y._M_node - 1) + (__x._M_cur - __x._M_first) 6242: + (__y._M_last - __y._M_cur); 6242: } 6242: 6242: template 6242: inline _Deque_iterator<_Tp, _Ref, _Ptr> 6242: operator+(ptrdiff_t __n, const _Deque_iterator<_Tp, _Ref, _Ptr>& __x) 6242: noexcept 6242: { return __x + __n; } 6242: 6242: template 6242: void 6242: fill(const _Deque_iterator<_Tp, _Tp&, _Tp*>&, 6242: const _Deque_iterator<_Tp, _Tp&, _Tp*>&, const _Tp&); 6242: 6242: template 6242: _Deque_iterator<_Tp, _Tp&, _Tp*> 6242: copy(_Deque_iterator<_Tp, const _Tp&, const _Tp*>, 6242: _Deque_iterator<_Tp, const _Tp&, const _Tp*>, 6242: _Deque_iterator<_Tp, _Tp&, _Tp*>); 6242: 6242: template 6242: inline _Deque_iterator<_Tp, _Tp&, _Tp*> 6242: copy(_Deque_iterator<_Tp, _Tp&, _Tp*> __first, 6242: _Deque_iterator<_Tp, _Tp&, _Tp*> __last, 6242: _Deque_iterator<_Tp, _Tp&, _Tp*> __result) 6242: { return std::copy(_Deque_iterator<_Tp, const _Tp&, const _Tp*>(__first), 6242: _Deque_iterator<_Tp, const _Tp&, const _Tp*>(__last), 6242: __result); } 6242: 6242: template 6242: _Deque_iterator<_Tp, _Tp&, _Tp*> 6242: copy_backward(_Deque_iterator<_Tp, const _Tp&, const _Tp*>, 6242: _Deque_iterator<_Tp, const _Tp&, const _Tp*>, 6242: _Deque_iterator<_Tp, _Tp&, _Tp*>); 6242: 6242: template 6242: inline _Deque_iterator<_Tp, _Tp&, _Tp*> 6242: copy_backward(_Deque_iterator<_Tp, _Tp&, _Tp*> __first, 6242: _Deque_iterator<_Tp, _Tp&, _Tp*> __last, 6242: _Deque_iterator<_Tp, _Tp&, _Tp*> __result) 6242: { return std::copy_backward(_Deque_iterator<_Tp, 6242: const _Tp&, const _Tp*>(__first), 6242: _Deque_iterator<_Tp, 6242: const _Tp&, const _Tp*>(__last), 6242: __result); } 6242: 6242: 6242: template 6242: _Deque_iterator<_Tp, _Tp&, _Tp*> 6242: move(_Deque_iterator<_Tp, const _Tp&, const _Tp*>, 6242: _Deque_iterator<_Tp, const _Tp&, const _Tp*>, 6242: _Deque_iterator<_Tp, _Tp&, _Tp*>); 6242: 6242: template 6242: inline _Deque_iterator<_Tp, _Tp&, _Tp*> 6242: move(_Deque_iterator<_Tp, _Tp&, _Tp*> __first, 6242: _Deque_iterator<_Tp, _Tp&, _Tp*> __last, 6242: _Deque_iterator<_Tp, _Tp&, _Tp*> __result) 6242: { return std::move(_Deque_iterator<_Tp, const _Tp&, const _Tp*>(__first), 6242: _Deque_iterator<_Tp, const _Tp&, const _Tp*>(__last), 6242: __result); } 6242: 6242: template 6242: _Deque_iterator<_Tp, _Tp&, _Tp*> 6242: move_backward(_Deque_iterator<_Tp, const _Tp&, const _Tp*>, 6242: _Deque_iterator<_Tp, const _Tp&, const _Tp*>, 6242: _Deque_iterator<_Tp, _Tp&, _Tp*>); 6242: 6242: template 6242: inline _Deque_iterator<_Tp, _Tp&, _Tp*> 6242: move_backward(_Deque_iterator<_Tp, _Tp&, _Tp*> __first, 6242: _Deque_iterator<_Tp, _Tp&, _Tp*> __last, 6242: _Deque_iterator<_Tp, _Tp&, _Tp*> __result) 6242: { return std::move_backward(_Deque_iterator<_Tp, 6242: const _Tp&, const _Tp*>(__first), 6242: _Deque_iterator<_Tp, 6242: const _Tp&, const _Tp*>(__last), 6242: __result); } 6242: # 460 "/usr/include/c++/8/bits/stl_deque.h" 3 6242: template 6242: class _Deque_base 6242: { 6242: protected: 6242: typedef typename __gnu_cxx::__alloc_traits<_Alloc>::template 6242: rebind<_Tp>::other _Tp_alloc_type; 6242: typedef __gnu_cxx::__alloc_traits<_Tp_alloc_type> _Alloc_traits; 6242: 6242: 6242: 6242: 6242: 6242: typedef typename _Alloc_traits::pointer _Ptr; 6242: typedef typename _Alloc_traits::const_pointer _Ptr_const; 6242: 6242: 6242: typedef typename _Alloc_traits::template rebind<_Ptr>::other 6242: _Map_alloc_type; 6242: typedef __gnu_cxx::__alloc_traits<_Map_alloc_type> _Map_alloc_traits; 6242: 6242: public: 6242: typedef _Alloc allocator_type; 6242: typedef typename _Alloc_traits::size_type size_type; 6242: 6242: allocator_type 6242: get_allocator() const noexcept 6242: { return allocator_type(_M_get_Tp_allocator()); } 6242: 6242: typedef _Deque_iterator<_Tp, _Tp&, _Ptr> iterator; 6242: typedef _Deque_iterator<_Tp, const _Tp&, _Ptr_const> const_iterator; 6242: 6242: _Deque_base() 6242: : _M_impl() 6242: { _M_initialize_map(0); } 6242: 6242: _Deque_base(size_t __num_elements) 6242: : _M_impl() 6242: { _M_initialize_map(__num_elements); } 6242: 6242: _Deque_base(const allocator_type& __a, size_t __num_elements) 6242: : _M_impl(__a) 6242: { _M_initialize_map(__num_elements); } 6242: 6242: _Deque_base(const allocator_type& __a) 6242: : _M_impl(__a) 6242: { } 6242: 6242: 6242: _Deque_base(_Deque_base&& __x, false_type) 6242: : _M_impl(__x._M_move_impl()) 6242: { } 6242: 6242: _Deque_base(_Deque_base&& __x, true_type) 6242: : _M_impl(std::move(__x._M_get_Tp_allocator())) 6242: { 6242: _M_initialize_map(0); 6242: if (__x._M_impl._M_map) 6242: this->_M_impl._M_swap_data(__x._M_impl); 6242: } 6242: 6242: _Deque_base(_Deque_base&& __x) 6242: : _Deque_base(std::move(__x), typename _Alloc_traits::is_always_equal{}) 6242: { } 6242: 6242: _Deque_base(_Deque_base&& __x, const allocator_type& __a, size_type __n) 6242: : _M_impl(__a) 6242: { 6242: if (__x.get_allocator() == __a) 6242: { 6242: if (__x._M_impl._M_map) 6242: { 6242: _M_initialize_map(0); 6242: this->_M_impl._M_swap_data(__x._M_impl); 6242: } 6242: } 6242: else 6242: { 6242: _M_initialize_map(__n); 6242: } 6242: } 6242: 6242: 6242: ~_Deque_base() noexcept; 6242: 6242: protected: 6242: typedef typename iterator::_Map_pointer _Map_pointer; 6242: 6242: 6242: 6242: 6242: struct _Deque_impl 6242: : public _Tp_alloc_type 6242: { 6242: _Map_pointer _M_map; 6242: size_t _M_map_size; 6242: iterator _M_start; 6242: iterator _M_finish; 6242: 6242: _Deque_impl() 6242: : _Tp_alloc_type(), _M_map(), _M_map_size(0), 6242: _M_start(), _M_finish() 6242: { } 6242: 6242: _Deque_impl(const _Tp_alloc_type& __a) noexcept 6242: : _Tp_alloc_type(__a), _M_map(), _M_map_size(0), 6242: _M_start(), _M_finish() 6242: { } 6242: 6242: 6242: _Deque_impl(_Deque_impl&&) = default; 6242: 6242: _Deque_impl(_Tp_alloc_type&& __a) noexcept 6242: : _Tp_alloc_type(std::move(__a)), _M_map(), _M_map_size(0), 6242: _M_start(), _M_finish() 6242: { } 6242: 6242: 6242: void _M_swap_data(_Deque_impl& __x) noexcept 6242: { 6242: using std::swap; 6242: swap(this->_M_start, __x._M_start); 6242: swap(this->_M_finish, __x._M_finish); 6242: swap(this->_M_map, __x._M_map); 6242: swap(this->_M_map_size, __x._M_map_size); 6242: } 6242: }; 6242: 6242: _Tp_alloc_type& 6242: _M_get_Tp_allocator() noexcept 6242: { return *static_cast<_Tp_alloc_type*>(&this->_M_impl); } 6242: 6242: const _Tp_alloc_type& 6242: _M_get_Tp_allocator() const noexcept 6242: { return *static_cast(&this->_M_impl); } 6242: 6242: _Map_alloc_type 6242: _M_get_map_allocator() const noexcept 6242: { return _Map_alloc_type(_M_get_Tp_allocator()); } 6242: 6242: _Ptr 6242: _M_allocate_node() 6242: { 6242: typedef __gnu_cxx::__alloc_traits<_Tp_alloc_type> _Traits; 6242: return _Traits::allocate(_M_impl, __deque_buf_size(sizeof(_Tp))); 6242: } 6242: 6242: void 6242: _M_deallocate_node(_Ptr __p) noexcept 6242: { 6242: typedef __gnu_cxx::__alloc_traits<_Tp_alloc_type> _Traits; 6242: _Traits::deallocate(_M_impl, __p, __deque_buf_size(sizeof(_Tp))); 6242: } 6242: 6242: _Map_pointer 6242: _M_allocate_map(size_t __n) 6242: { 6242: _Map_alloc_type __map_alloc = _M_get_map_allocator(); 6242: return _Map_alloc_traits::allocate(__map_alloc, __n); 6242: } 6242: 6242: void 6242: _M_deallocate_map(_Map_pointer __p, size_t __n) noexcept 6242: { 6242: _Map_alloc_type __map_alloc = _M_get_map_allocator(); 6242: _Map_alloc_traits::deallocate(__map_alloc, __p, __n); 6242: } 6242: 6242: protected: 6242: void _M_initialize_map(size_t); 6242: void _M_create_nodes(_Map_pointer __nstart, _Map_pointer __nfinish); 6242: void _M_destroy_nodes(_Map_pointer __nstart, 6242: _Map_pointer __nfinish) noexcept; 6242: enum { _S_initial_map_size = 8 }; 6242: 6242: _Deque_impl _M_impl; 6242: 6242: 6242: private: 6242: _Deque_impl 6242: _M_move_impl() 6242: { 6242: if (!_M_impl._M_map) 6242: return std::move(_M_impl); 6242: 6242: 6242: _Tp_alloc_type __alloc{_M_get_Tp_allocator()}; 6242: 6242: _Tp_alloc_type __sink __attribute((__unused__)) {std::move(__alloc)}; 6242: 6242: _Deque_base __empty{__alloc}; 6242: __empty._M_initialize_map(0); 6242: 6242: _Deque_impl __ret{std::move(_M_get_Tp_allocator())}; 6242: _M_impl._M_swap_data(__ret); 6242: _M_impl._M_swap_data(__empty._M_impl); 6242: return __ret; 6242: } 6242: 6242: }; 6242: 6242: template 6242: _Deque_base<_Tp, _Alloc>:: 6242: ~_Deque_base() noexcept 6242: { 6242: if (this->_M_impl._M_map) 6242: { 6242: _M_destroy_nodes(this->_M_impl._M_start._M_node, 6242: this->_M_impl._M_finish._M_node + 1); 6242: _M_deallocate_map(this->_M_impl._M_map, this->_M_impl._M_map_size); 6242: } 6242: } 6242: # 680 "/usr/include/c++/8/bits/stl_deque.h" 3 6242: template 6242: void 6242: _Deque_base<_Tp, _Alloc>:: 6242: _M_initialize_map(size_t __num_elements) 6242: { 6242: const size_t __num_nodes = (__num_elements/ __deque_buf_size(sizeof(_Tp)) 6242: + 1); 6242: 6242: this->_M_impl._M_map_size = std::max((size_t) _S_initial_map_size, 6242: size_t(__num_nodes + 2)); 6242: this->_M_impl._M_map = _M_allocate_map(this->_M_impl._M_map_size); 6242: 6242: 6242: 6242: 6242: 6242: 6242: _Map_pointer __nstart = (this->_M_impl._M_map 6242: + (this->_M_impl._M_map_size - __num_nodes) / 2); 6242: _Map_pointer __nfinish = __nstart + __num_nodes; 6242: 6242: try 6242: { _M_create_nodes(__nstart, __nfinish); } 6242: catch(...) 6242: { 6242: _M_deallocate_map(this->_M_impl._M_map, this->_M_impl._M_map_size); 6242: this->_M_impl._M_map = _Map_pointer(); 6242: this->_M_impl._M_map_size = 0; 6242: throw; 6242: } 6242: 6242: this->_M_impl._M_start._M_set_node(__nstart); 6242: this->_M_impl._M_finish._M_set_node(__nfinish - 1); 6242: this->_M_impl._M_start._M_cur = _M_impl._M_start._M_first; 6242: this->_M_impl._M_finish._M_cur = (this->_M_impl._M_finish._M_first 6242: + __num_elements 6242: % __deque_buf_size(sizeof(_Tp))); 6242: } 6242: 6242: template 6242: void 6242: _Deque_base<_Tp, _Alloc>:: 6242: _M_create_nodes(_Map_pointer __nstart, _Map_pointer __nfinish) 6242: { 6242: _Map_pointer __cur; 6242: try 6242: { 6242: for (__cur = __nstart; __cur < __nfinish; ++__cur) 6242: *__cur = this->_M_allocate_node(); 6242: } 6242: catch(...) 6242: { 6242: _M_destroy_nodes(__nstart, __cur); 6242: throw; 6242: } 6242: } 6242: 6242: template 6242: void 6242: _Deque_base<_Tp, _Alloc>:: 6242: _M_destroy_nodes(_Map_pointer __nstart, 6242: _Map_pointer __nfinish) noexcept 6242: { 6242: for (_Map_pointer __n = __nstart; __n < __nfinish; ++__n) 6242: _M_deallocate_node(*__n); 6242: } 6242: # 831 "/usr/include/c++/8/bits/stl_deque.h" 3 6242: template > 6242: class deque : protected _Deque_base<_Tp, _Alloc> 6242: { 6242: # 844 "/usr/include/c++/8/bits/stl_deque.h" 3 6242: static_assert(is_same::type, _Tp>::value, 6242: "std::deque must have a non-const, non-volatile value_type"); 6242: 6242: 6242: 6242: 6242: 6242: 6242: typedef _Deque_base<_Tp, _Alloc> _Base; 6242: typedef typename _Base::_Tp_alloc_type _Tp_alloc_type; 6242: typedef typename _Base::_Alloc_traits _Alloc_traits; 6242: typedef typename _Base::_Map_pointer _Map_pointer; 6242: 6242: public: 6242: typedef _Tp value_type; 6242: typedef typename _Alloc_traits::pointer pointer; 6242: typedef typename _Alloc_traits::const_pointer const_pointer; 6242: typedef typename _Alloc_traits::reference reference; 6242: typedef typename _Alloc_traits::const_reference const_reference; 6242: typedef typename _Base::iterator iterator; 6242: typedef typename _Base::const_iterator const_iterator; 6242: typedef std::reverse_iterator const_reverse_iterator; 6242: typedef std::reverse_iterator reverse_iterator; 6242: typedef size_t size_type; 6242: typedef ptrdiff_t difference_type; 6242: typedef _Alloc allocator_type; 6242: 6242: protected: 6242: static size_t _S_buffer_size() noexcept 6242: { return __deque_buf_size(sizeof(_Tp)); } 6242: 6242: 6242: using _Base::_M_initialize_map; 6242: using _Base::_M_create_nodes; 6242: using _Base::_M_destroy_nodes; 6242: using _Base::_M_allocate_node; 6242: using _Base::_M_deallocate_node; 6242: using _Base::_M_allocate_map; 6242: using _Base::_M_deallocate_map; 6242: using _Base::_M_get_Tp_allocator; 6242: 6242: 6242: 6242: 6242: 6242: using _Base::_M_impl; 6242: 6242: public: 6242: 6242: 6242: 6242: 6242: 6242: 6242: deque() : _Base() { } 6242: 6242: 6242: 6242: 6242: 6242: explicit 6242: deque(const allocator_type& __a) 6242: : _Base(__a, 0) { } 6242: # 917 "/usr/include/c++/8/bits/stl_deque.h" 3 6242: explicit 6242: deque(size_type __n, const allocator_type& __a = allocator_type()) 6242: : _Base(__a, __n) 6242: { _M_default_initialize(); } 6242: # 930 "/usr/include/c++/8/bits/stl_deque.h" 3 6242: deque(size_type __n, const value_type& __value, 6242: const allocator_type& __a = allocator_type()) 6242: : _Base(__a, __n) 6242: { _M_fill_initialize(__value); } 6242: # 957 "/usr/include/c++/8/bits/stl_deque.h" 3 6242: deque(const deque& __x) 6242: : _Base(_Alloc_traits::_S_select_on_copy(__x._M_get_Tp_allocator()), 6242: __x.size()) 6242: { std::__uninitialized_copy_a(__x.begin(), __x.end(), 6242: this->_M_impl._M_start, 6242: _M_get_Tp_allocator()); } 6242: # 972 "/usr/include/c++/8/bits/stl_deque.h" 3 6242: deque(deque&& __x) 6242: : _Base(std::move(__x)) { } 6242: 6242: 6242: deque(const deque& __x, const allocator_type& __a) 6242: : _Base(__a, __x.size()) 6242: { std::__uninitialized_copy_a(__x.begin(), __x.end(), 6242: this->_M_impl._M_start, 6242: _M_get_Tp_allocator()); } 6242: 6242: 6242: deque(deque&& __x, const allocator_type& __a) 6242: : _Base(std::move(__x), __a, __x.size()) 6242: { 6242: if (__x.get_allocator() != __a) 6242: { 6242: std::__uninitialized_move_a(__x.begin(), __x.end(), 6242: this->_M_impl._M_start, 6242: _M_get_Tp_allocator()); 6242: __x.clear(); 6242: } 6242: } 6242: # 1006 "/usr/include/c++/8/bits/stl_deque.h" 3 6242: deque(initializer_list __l, 6242: const allocator_type& __a = allocator_type()) 6242: : _Base(__a) 6242: { 6242: _M_range_initialize(__l.begin(), __l.end(), 6242: random_access_iterator_tag()); 6242: } 6242: # 1031 "/usr/include/c++/8/bits/stl_deque.h" 3 6242: template> 6242: deque(_InputIterator __first, _InputIterator __last, 6242: const allocator_type& __a = allocator_type()) 6242: : _Base(__a) 6242: { _M_initialize_dispatch(__first, __last, __false_type()); } 6242: # 1054 "/usr/include/c++/8/bits/stl_deque.h" 3 6242: ~deque() 6242: { _M_destroy_data(begin(), end(), _M_get_Tp_allocator()); } 6242: # 1066 "/usr/include/c++/8/bits/stl_deque.h" 3 6242: deque& 6242: operator=(const deque& __x); 6242: # 1078 "/usr/include/c++/8/bits/stl_deque.h" 3 6242: deque& 6242: operator=(deque&& __x) noexcept(_Alloc_traits::_S_always_equal()) 6242: { 6242: using __always_equal = typename _Alloc_traits::is_always_equal; 6242: _M_move_assign1(std::move(__x), __always_equal{}); 6242: return *this; 6242: } 6242: # 1097 "/usr/include/c++/8/bits/stl_deque.h" 3 6242: deque& 6242: operator=(initializer_list __l) 6242: { 6242: _M_assign_aux(__l.begin(), __l.end(), 6242: random_access_iterator_tag()); 6242: return *this; 6242: } 6242: # 1116 "/usr/include/c++/8/bits/stl_deque.h" 3 6242: void 6242: assign(size_type __n, const value_type& __val) 6242: { _M_fill_assign(__n, __val); } 6242: # 1133 "/usr/include/c++/8/bits/stl_deque.h" 3 6242: template> 6242: void 6242: assign(_InputIterator __first, _InputIterator __last) 6242: { _M_assign_dispatch(__first, __last, __false_type()); } 6242: # 1160 "/usr/include/c++/8/bits/stl_deque.h" 3 6242: void 6242: assign(initializer_list __l) 6242: { _M_assign_aux(__l.begin(), __l.end(), random_access_iterator_tag()); } 6242: 6242: 6242: 6242: allocator_type 6242: get_allocator() const noexcept 6242: { return _Base::get_allocator(); } 6242: 6242: 6242: 6242: 6242: 6242: 6242: iterator 6242: begin() noexcept 6242: { return this->_M_impl._M_start; } 6242: 6242: 6242: 6242: 6242: 6242: const_iterator 6242: begin() const noexcept 6242: { return this->_M_impl._M_start; } 6242: 6242: 6242: 6242: 6242: 6242: 6242: iterator 6242: end() noexcept 6242: { return this->_M_impl._M_finish; } 6242: 6242: 6242: 6242: 6242: 6242: 6242: const_iterator 6242: end() const noexcept 6242: { return this->_M_impl._M_finish; } 6242: 6242: 6242: 6242: 6242: 6242: 6242: reverse_iterator 6242: rbegin() noexcept 6242: { return reverse_iterator(this->_M_impl._M_finish); } 6242: 6242: 6242: 6242: 6242: 6242: 6242: const_reverse_iterator 6242: rbegin() const noexcept 6242: { return const_reverse_iterator(this->_M_impl._M_finish); } 6242: 6242: 6242: 6242: 6242: 6242: 6242: reverse_iterator 6242: rend() noexcept 6242: { return reverse_iterator(this->_M_impl._M_start); } 6242: 6242: 6242: 6242: 6242: 6242: 6242: const_reverse_iterator 6242: rend() const noexcept 6242: { return const_reverse_iterator(this->_M_impl._M_start); } 6242: 6242: 6242: 6242: 6242: 6242: 6242: const_iterator 6242: cbegin() const noexcept 6242: { return this->_M_impl._M_start; } 6242: 6242: 6242: 6242: 6242: 6242: 6242: const_iterator 6242: cend() const noexcept 6242: { return this->_M_impl._M_finish; } 6242: 6242: 6242: 6242: 6242: 6242: 6242: const_reverse_iterator 6242: crbegin() const noexcept 6242: { return const_reverse_iterator(this->_M_impl._M_finish); } 6242: 6242: 6242: 6242: 6242: 6242: 6242: const_reverse_iterator 6242: crend() const noexcept 6242: { return const_reverse_iterator(this->_M_impl._M_start); } 6242: 6242: 6242: 6242: 6242: size_type 6242: size() const noexcept 6242: { return this->_M_impl._M_finish - this->_M_impl._M_start; } 6242: 6242: 6242: size_type 6242: max_size() const noexcept 6242: { return _Alloc_traits::max_size(_M_get_Tp_allocator()); } 6242: # 1299 "/usr/include/c++/8/bits/stl_deque.h" 3 6242: void 6242: resize(size_type __new_size) 6242: { 6242: const size_type __len = size(); 6242: if (__new_size > __len) 6242: _M_default_append(__new_size - __len); 6242: else if (__new_size < __len) 6242: _M_erase_at_end(this->_M_impl._M_start 6242: + difference_type(__new_size)); 6242: } 6242: # 1321 "/usr/include/c++/8/bits/stl_deque.h" 3 6242: void 6242: resize(size_type __new_size, const value_type& __x) 6242: { 6242: const size_type __len = size(); 6242: if (__new_size > __len) 6242: _M_fill_insert(this->_M_impl._M_finish, __new_size - __len, __x); 6242: else if (__new_size < __len) 6242: _M_erase_at_end(this->_M_impl._M_start 6242: + difference_type(__new_size)); 6242: } 6242: # 1357 "/usr/include/c++/8/bits/stl_deque.h" 3 6242: void 6242: shrink_to_fit() noexcept 6242: { _M_shrink_to_fit(); } 6242: 6242: 6242: 6242: 6242: 6242: 6242: bool 6242: empty() const noexcept 6242: { return this->_M_impl._M_finish == this->_M_impl._M_start; } 6242: # 1382 "/usr/include/c++/8/bits/stl_deque.h" 3 6242: reference 6242: operator[](size_type __n) noexcept 6242: { 6242: ; 6242: return this->_M_impl._M_start[difference_type(__n)]; 6242: } 6242: # 1400 "/usr/include/c++/8/bits/stl_deque.h" 3 6242: const_reference 6242: operator[](size_type __n) const noexcept 6242: { 6242: ; 6242: return this->_M_impl._M_start[difference_type(__n)]; 6242: } 6242: 6242: protected: 6242: 6242: void 6242: _M_range_check(size_type __n) const 6242: { 6242: if (__n >= this->size()) 6242: __throw_out_of_range_fmt(("deque::_M_range_check: __n " "(which is %zu)>= this->size() " "(which is %zu)") 6242: 6242: , 6242: __n, this->size()); 6242: } 6242: 6242: public: 6242: # 1431 "/usr/include/c++/8/bits/stl_deque.h" 3 6242: reference 6242: at(size_type __n) 6242: { 6242: _M_range_check(__n); 6242: return (*this)[__n]; 6242: } 6242: # 1449 "/usr/include/c++/8/bits/stl_deque.h" 3 6242: const_reference 6242: at(size_type __n) const 6242: { 6242: _M_range_check(__n); 6242: return (*this)[__n]; 6242: } 6242: 6242: 6242: 6242: 6242: 6242: reference 6242: front() noexcept 6242: { 6242: ; 6242: return *begin(); 6242: } 6242: 6242: 6242: 6242: 6242: 6242: const_reference 6242: front() const noexcept 6242: { 6242: ; 6242: return *begin(); 6242: } 6242: 6242: 6242: 6242: 6242: 6242: reference 6242: back() noexcept 6242: { 6242: ; 6242: iterator __tmp = end(); 6242: --__tmp; 6242: return *__tmp; 6242: } 6242: 6242: 6242: 6242: 6242: 6242: const_reference 6242: back() const noexcept 6242: { 6242: ; 6242: const_iterator __tmp = end(); 6242: --__tmp; 6242: return *__tmp; 6242: } 6242: # 1514 "/usr/include/c++/8/bits/stl_deque.h" 3 6242: void 6242: push_front(const value_type& __x) 6242: { 6242: if (this->_M_impl._M_start._M_cur != this->_M_impl._M_start._M_first) 6242: { 6242: _Alloc_traits::construct(this->_M_impl, 6242: this->_M_impl._M_start._M_cur - 1, 6242: __x); 6242: --this->_M_impl._M_start._M_cur; 6242: } 6242: else 6242: _M_push_front_aux(__x); 6242: } 6242: 6242: 6242: void 6242: push_front(value_type&& __x) 6242: { emplace_front(std::move(__x)); } 6242: 6242: template 6242: 6242: 6242: 6242: void 6242: 6242: emplace_front(_Args&&... __args); 6242: # 1551 "/usr/include/c++/8/bits/stl_deque.h" 3 6242: void 6242: push_back(const value_type& __x) 6242: { 6242: if (this->_M_impl._M_finish._M_cur 6242: != this->_M_impl._M_finish._M_last - 1) 6242: { 6242: _Alloc_traits::construct(this->_M_impl, 6242: this->_M_impl._M_finish._M_cur, __x); 6242: ++this->_M_impl._M_finish._M_cur; 6242: } 6242: else 6242: _M_push_back_aux(__x); 6242: } 6242: 6242: 6242: void 6242: push_back(value_type&& __x) 6242: { emplace_back(std::move(__x)); } 6242: 6242: template 6242: 6242: 6242: 6242: void 6242: 6242: emplace_back(_Args&&... __args); 6242: # 1587 "/usr/include/c++/8/bits/stl_deque.h" 3 6242: void 6242: pop_front() noexcept 6242: { 6242: ; 6242: if (this->_M_impl._M_start._M_cur 6242: != this->_M_impl._M_start._M_last - 1) 6242: { 6242: _Alloc_traits::destroy(this->_M_impl, 6242: this->_M_impl._M_start._M_cur); 6242: ++this->_M_impl._M_start._M_cur; 6242: } 6242: else 6242: _M_pop_front_aux(); 6242: } 6242: # 1610 "/usr/include/c++/8/bits/stl_deque.h" 3 6242: void 6242: pop_back() noexcept 6242: { 6242: ; 6242: if (this->_M_impl._M_finish._M_cur 6242: != this->_M_impl._M_finish._M_first) 6242: { 6242: --this->_M_impl._M_finish._M_cur; 6242: _Alloc_traits::destroy(this->_M_impl, 6242: this->_M_impl._M_finish._M_cur); 6242: } 6242: else 6242: _M_pop_back_aux(); 6242: } 6242: # 1635 "/usr/include/c++/8/bits/stl_deque.h" 3 6242: template 6242: iterator 6242: emplace(const_iterator __position, _Args&&... __args); 6242: # 1648 "/usr/include/c++/8/bits/stl_deque.h" 3 6242: iterator 6242: insert(const_iterator __position, const value_type& __x); 6242: # 1674 "/usr/include/c++/8/bits/stl_deque.h" 3 6242: iterator 6242: insert(const_iterator __position, value_type&& __x) 6242: { return emplace(__position, std::move(__x)); } 6242: # 1687 "/usr/include/c++/8/bits/stl_deque.h" 3 6242: iterator 6242: insert(const_iterator __p, initializer_list __l) 6242: { 6242: auto __offset = __p - cbegin(); 6242: _M_range_insert_aux(__p._M_const_cast(), __l.begin(), __l.end(), 6242: std::random_access_iterator_tag()); 6242: return begin() + __offset; 6242: } 6242: # 1708 "/usr/include/c++/8/bits/stl_deque.h" 3 6242: iterator 6242: insert(const_iterator __position, size_type __n, const value_type& __x) 6242: { 6242: difference_type __offset = __position - cbegin(); 6242: _M_fill_insert(__position._M_const_cast(), __n, __x); 6242: return begin() + __offset; 6242: } 6242: # 1742 "/usr/include/c++/8/bits/stl_deque.h" 3 6242: template> 6242: iterator 6242: insert(const_iterator __position, _InputIterator __first, 6242: _InputIterator __last) 6242: { 6242: difference_type __offset = __position - cbegin(); 6242: _M_insert_dispatch(__position._M_const_cast(), 6242: __first, __last, __false_type()); 6242: return begin() + __offset; 6242: } 6242: # 1788 "/usr/include/c++/8/bits/stl_deque.h" 3 6242: iterator 6242: 6242: erase(const_iterator __position) 6242: 6242: 6242: 6242: { return _M_erase(__position._M_const_cast()); } 6242: # 1812 "/usr/include/c++/8/bits/stl_deque.h" 3 6242: iterator 6242: 6242: erase(const_iterator __first, const_iterator __last) 6242: 6242: 6242: 6242: { return _M_erase(__first._M_const_cast(), __last._M_const_cast()); } 6242: # 1831 "/usr/include/c++/8/bits/stl_deque.h" 3 6242: void 6242: swap(deque& __x) noexcept 6242: { 6242: 6242: 6242: ; 6242: 6242: _M_impl._M_swap_data(__x._M_impl); 6242: _Alloc_traits::_S_on_swap(_M_get_Tp_allocator(), 6242: __x._M_get_Tp_allocator()); 6242: } 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: void 6242: clear() noexcept 6242: { _M_erase_at_end(begin()); } 6242: 6242: protected: 6242: 6242: 6242: 6242: 6242: 6242: 6242: template 6242: void 6242: _M_initialize_dispatch(_Integer __n, _Integer __x, __true_type) 6242: { 6242: _M_initialize_map(static_cast(__n)); 6242: _M_fill_initialize(__x); 6242: } 6242: 6242: 6242: template 6242: void 6242: _M_initialize_dispatch(_InputIterator __first, _InputIterator __last, 6242: __false_type) 6242: { 6242: _M_range_initialize(__first, __last, 6242: std::__iterator_category(__first)); 6242: } 6242: # 1890 "/usr/include/c++/8/bits/stl_deque.h" 3 6242: template 6242: void 6242: _M_range_initialize(_InputIterator __first, _InputIterator __last, 6242: std::input_iterator_tag); 6242: 6242: 6242: template 6242: void 6242: _M_range_initialize(_ForwardIterator __first, _ForwardIterator __last, 6242: std::forward_iterator_tag); 6242: # 1912 "/usr/include/c++/8/bits/stl_deque.h" 3 6242: void 6242: _M_fill_initialize(const value_type& __value); 6242: 6242: 6242: 6242: void 6242: _M_default_initialize(); 6242: # 1928 "/usr/include/c++/8/bits/stl_deque.h" 3 6242: template 6242: void 6242: _M_assign_dispatch(_Integer __n, _Integer __val, __true_type) 6242: { _M_fill_assign(__n, __val); } 6242: 6242: 6242: template 6242: void 6242: _M_assign_dispatch(_InputIterator __first, _InputIterator __last, 6242: __false_type) 6242: { _M_assign_aux(__first, __last, std::__iterator_category(__first)); } 6242: 6242: 6242: template 6242: void 6242: _M_assign_aux(_InputIterator __first, _InputIterator __last, 6242: std::input_iterator_tag); 6242: 6242: 6242: template 6242: void 6242: _M_assign_aux(_ForwardIterator __first, _ForwardIterator __last, 6242: std::forward_iterator_tag) 6242: { 6242: const size_type __len = std::distance(__first, __last); 6242: if (__len > size()) 6242: { 6242: _ForwardIterator __mid = __first; 6242: std::advance(__mid, size()); 6242: std::copy(__first, __mid, begin()); 6242: _M_range_insert_aux(end(), __mid, __last, 6242: std::__iterator_category(__first)); 6242: } 6242: else 6242: _M_erase_at_end(std::copy(__first, __last, begin())); 6242: } 6242: 6242: 6242: 6242: void 6242: _M_fill_assign(size_type __n, const value_type& __val) 6242: { 6242: if (__n > size()) 6242: { 6242: std::fill(begin(), end(), __val); 6242: _M_fill_insert(end(), __n - size(), __val); 6242: } 6242: else 6242: { 6242: _M_erase_at_end(begin() + difference_type(__n)); 6242: std::fill(begin(), end(), __val); 6242: } 6242: } 6242: # 1989 "/usr/include/c++/8/bits/stl_deque.h" 3 6242: template 6242: void _M_push_back_aux(_Args&&... __args); 6242: 6242: template 6242: void _M_push_front_aux(_Args&&... __args); 6242: 6242: 6242: void _M_pop_back_aux(); 6242: 6242: void _M_pop_front_aux(); 6242: # 2008 "/usr/include/c++/8/bits/stl_deque.h" 3 6242: template 6242: void 6242: _M_insert_dispatch(iterator __pos, 6242: _Integer __n, _Integer __x, __true_type) 6242: { _M_fill_insert(__pos, __n, __x); } 6242: 6242: 6242: template 6242: void 6242: _M_insert_dispatch(iterator __pos, 6242: _InputIterator __first, _InputIterator __last, 6242: __false_type) 6242: { 6242: _M_range_insert_aux(__pos, __first, __last, 6242: std::__iterator_category(__first)); 6242: } 6242: 6242: 6242: template 6242: void 6242: _M_range_insert_aux(iterator __pos, _InputIterator __first, 6242: _InputIterator __last, std::input_iterator_tag); 6242: 6242: 6242: template 6242: void 6242: _M_range_insert_aux(iterator __pos, _ForwardIterator __first, 6242: _ForwardIterator __last, std::forward_iterator_tag); 6242: 6242: 6242: 6242: 6242: void 6242: _M_fill_insert(iterator __pos, size_type __n, const value_type& __x); 6242: 6242: 6242: 6242: 6242: 6242: 6242: template 6242: iterator 6242: _M_insert_aux(iterator __pos, _Args&&... __args); 6242: 6242: 6242: 6242: void 6242: _M_insert_aux(iterator __pos, size_type __n, const value_type& __x); 6242: 6242: 6242: template 6242: void 6242: _M_insert_aux(iterator __pos, 6242: _ForwardIterator __first, _ForwardIterator __last, 6242: size_type __n); 6242: 6242: 6242: 6242: 6242: void 6242: _M_destroy_data_aux(iterator __first, iterator __last); 6242: 6242: 6242: 6242: template 6242: void 6242: _M_destroy_data(iterator __first, iterator __last, const _Alloc1&) 6242: { _M_destroy_data_aux(__first, __last); } 6242: 6242: void 6242: _M_destroy_data(iterator __first, iterator __last, 6242: const std::allocator<_Tp>&) 6242: { 6242: if (!__has_trivial_destructor(value_type)) 6242: _M_destroy_data_aux(__first, __last); 6242: } 6242: 6242: 6242: void 6242: _M_erase_at_begin(iterator __pos) 6242: { 6242: _M_destroy_data(begin(), __pos, _M_get_Tp_allocator()); 6242: _M_destroy_nodes(this->_M_impl._M_start._M_node, __pos._M_node); 6242: this->_M_impl._M_start = __pos; 6242: } 6242: 6242: 6242: 6242: void 6242: _M_erase_at_end(iterator __pos) 6242: { 6242: _M_destroy_data(__pos, end(), _M_get_Tp_allocator()); 6242: _M_destroy_nodes(__pos._M_node + 1, 6242: this->_M_impl._M_finish._M_node + 1); 6242: this->_M_impl._M_finish = __pos; 6242: } 6242: 6242: iterator 6242: _M_erase(iterator __pos); 6242: 6242: iterator 6242: _M_erase(iterator __first, iterator __last); 6242: 6242: 6242: 6242: void 6242: _M_default_append(size_type __n); 6242: 6242: bool 6242: _M_shrink_to_fit(); 6242: 6242: 6242: 6242: 6242: iterator 6242: _M_reserve_elements_at_front(size_type __n) 6242: { 6242: const size_type __vacancies = this->_M_impl._M_start._M_cur 6242: - this->_M_impl._M_start._M_first; 6242: if (__n > __vacancies) 6242: _M_new_elements_at_front(__n - __vacancies); 6242: return this->_M_impl._M_start - difference_type(__n); 6242: } 6242: 6242: iterator 6242: _M_reserve_elements_at_back(size_type __n) 6242: { 6242: const size_type __vacancies = (this->_M_impl._M_finish._M_last 6242: - this->_M_impl._M_finish._M_cur) - 1; 6242: if (__n > __vacancies) 6242: _M_new_elements_at_back(__n - __vacancies); 6242: return this->_M_impl._M_finish + difference_type(__n); 6242: } 6242: 6242: void 6242: _M_new_elements_at_front(size_type __new_elements); 6242: 6242: void 6242: _M_new_elements_at_back(size_type __new_elements); 6242: # 2158 "/usr/include/c++/8/bits/stl_deque.h" 3 6242: void 6242: _M_reserve_map_at_back(size_type __nodes_to_add = 1) 6242: { 6242: if (__nodes_to_add + 1 > this->_M_impl._M_map_size 6242: - (this->_M_impl._M_finish._M_node - this->_M_impl._M_map)) 6242: _M_reallocate_map(__nodes_to_add, false); 6242: } 6242: 6242: void 6242: _M_reserve_map_at_front(size_type __nodes_to_add = 1) 6242: { 6242: if (__nodes_to_add > size_type(this->_M_impl._M_start._M_node 6242: - this->_M_impl._M_map)) 6242: _M_reallocate_map(__nodes_to_add, true); 6242: } 6242: 6242: void 6242: _M_reallocate_map(size_type __nodes_to_add, bool __add_at_front); 6242: 6242: 6242: 6242: 6242: 6242: void 6242: _M_move_assign1(deque&& __x, true_type) noexcept 6242: { 6242: this->_M_impl._M_swap_data(__x._M_impl); 6242: __x.clear(); 6242: std::__alloc_on_move(_M_get_Tp_allocator(), __x._M_get_Tp_allocator()); 6242: } 6242: 6242: 6242: 6242: 6242: void 6242: _M_move_assign1(deque&& __x, false_type) 6242: { 6242: constexpr bool __move_storage = 6242: _Alloc_traits::_S_propagate_on_move_assign(); 6242: _M_move_assign2(std::move(__x), __bool_constant<__move_storage>()); 6242: } 6242: 6242: 6242: 6242: template 6242: void 6242: _M_replace_map(_Args&&... __args) 6242: { 6242: 6242: deque __newobj(std::forward<_Args>(__args)...); 6242: 6242: clear(); 6242: _M_deallocate_node(*begin()._M_node); 6242: _M_deallocate_map(this->_M_impl._M_map, this->_M_impl._M_map_size); 6242: this->_M_impl._M_map = nullptr; 6242: this->_M_impl._M_map_size = 0; 6242: 6242: this->_M_impl._M_swap_data(__newobj._M_impl); 6242: } 6242: 6242: 6242: void 6242: _M_move_assign2(deque&& __x, true_type) 6242: { 6242: 6242: auto __alloc = __x._M_get_Tp_allocator(); 6242: 6242: 6242: _M_replace_map(std::move(__x)); 6242: 6242: _M_get_Tp_allocator() = std::move(__alloc); 6242: } 6242: 6242: 6242: 6242: void 6242: _M_move_assign2(deque&& __x, false_type) 6242: { 6242: if (__x._M_get_Tp_allocator() == this->_M_get_Tp_allocator()) 6242: { 6242: 6242: 6242: _M_replace_map(std::move(__x), __x.get_allocator()); 6242: } 6242: else 6242: { 6242: 6242: 6242: _M_assign_aux(std::__make_move_if_noexcept_iterator(__x.begin()), 6242: std::__make_move_if_noexcept_iterator(__x.end()), 6242: std::random_access_iterator_tag()); 6242: __x.clear(); 6242: } 6242: } 6242: 6242: }; 6242: # 2275 "/usr/include/c++/8/bits/stl_deque.h" 3 6242: template 6242: inline bool 6242: operator==(const deque<_Tp, _Alloc>& __x, 6242: const deque<_Tp, _Alloc>& __y) 6242: { return __x.size() == __y.size() 6242: && std::equal(__x.begin(), __x.end(), __y.begin()); } 6242: # 2293 "/usr/include/c++/8/bits/stl_deque.h" 3 6242: template 6242: inline bool 6242: operator<(const deque<_Tp, _Alloc>& __x, 6242: const deque<_Tp, _Alloc>& __y) 6242: { return std::lexicographical_compare(__x.begin(), __x.end(), 6242: __y.begin(), __y.end()); } 6242: 6242: 6242: template 6242: inline bool 6242: operator!=(const deque<_Tp, _Alloc>& __x, 6242: const deque<_Tp, _Alloc>& __y) 6242: { return !(__x == __y); } 6242: 6242: 6242: template 6242: inline bool 6242: operator>(const deque<_Tp, _Alloc>& __x, 6242: const deque<_Tp, _Alloc>& __y) 6242: { return __y < __x; } 6242: 6242: 6242: template 6242: inline bool 6242: operator<=(const deque<_Tp, _Alloc>& __x, 6242: const deque<_Tp, _Alloc>& __y) 6242: { return !(__y < __x); } 6242: 6242: 6242: template 6242: inline bool 6242: operator>=(const deque<_Tp, _Alloc>& __x, 6242: const deque<_Tp, _Alloc>& __y) 6242: { return !(__x < __y); } 6242: 6242: 6242: template 6242: inline void 6242: swap(deque<_Tp,_Alloc>& __x, deque<_Tp,_Alloc>& __y) 6242: noexcept(noexcept(__x.swap(__y))) 6242: { __x.swap(__y); } 6242: 6242: 6242: 6242: 6242: 6242: } 6242: # 65 "/usr/include/c++/8/deque" 2 3 6242: 6242: # 1 "/usr/include/c++/8/bits/deque.tcc" 1 3 6242: # 59 "/usr/include/c++/8/bits/deque.tcc" 3 6242: namespace std __attribute__ ((__visibility__ ("default"))) 6242: { 6242: 6242: 6242: 6242: 6242: template 6242: void 6242: deque<_Tp, _Alloc>:: 6242: _M_default_initialize() 6242: { 6242: _Map_pointer __cur; 6242: try 6242: { 6242: for (__cur = this->_M_impl._M_start._M_node; 6242: __cur < this->_M_impl._M_finish._M_node; 6242: ++__cur) 6242: std::__uninitialized_default_a(*__cur, *__cur + _S_buffer_size(), 6242: _M_get_Tp_allocator()); 6242: std::__uninitialized_default_a(this->_M_impl._M_finish._M_first, 6242: this->_M_impl._M_finish._M_cur, 6242: _M_get_Tp_allocator()); 6242: } 6242: catch(...) 6242: { 6242: std::_Destroy(this->_M_impl._M_start, iterator(*__cur, __cur), 6242: _M_get_Tp_allocator()); 6242: throw; 6242: } 6242: } 6242: 6242: 6242: template 6242: deque<_Tp, _Alloc>& 6242: deque<_Tp, _Alloc>:: 6242: operator=(const deque& __x) 6242: { 6242: if (&__x != this) 6242: { 6242: 6242: if (_Alloc_traits::_S_propagate_on_copy_assign()) 6242: { 6242: if (!_Alloc_traits::_S_always_equal() 6242: && _M_get_Tp_allocator() != __x._M_get_Tp_allocator()) 6242: { 6242: 6242: 6242: _M_replace_map(__x, __x.get_allocator()); 6242: std::__alloc_on_copy(_M_get_Tp_allocator(), 6242: __x._M_get_Tp_allocator()); 6242: return *this; 6242: } 6242: std::__alloc_on_copy(_M_get_Tp_allocator(), 6242: __x._M_get_Tp_allocator()); 6242: } 6242: 6242: const size_type __len = size(); 6242: if (__len >= __x.size()) 6242: _M_erase_at_end(std::copy(__x.begin(), __x.end(), 6242: this->_M_impl._M_start)); 6242: else 6242: { 6242: const_iterator __mid = __x.begin() + difference_type(__len); 6242: std::copy(__x.begin(), __mid, this->_M_impl._M_start); 6242: _M_range_insert_aux(this->_M_impl._M_finish, __mid, __x.end(), 6242: std::random_access_iterator_tag()); 6242: } 6242: } 6242: return *this; 6242: } 6242: 6242: 6242: template 6242: template 6242: 6242: 6242: 6242: void 6242: 6242: deque<_Tp, _Alloc>:: 6242: emplace_front(_Args&&... __args) 6242: { 6242: if (this->_M_impl._M_start._M_cur != this->_M_impl._M_start._M_first) 6242: { 6242: _Alloc_traits::construct(this->_M_impl, 6242: this->_M_impl._M_start._M_cur - 1, 6242: std::forward<_Args>(__args)...); 6242: --this->_M_impl._M_start._M_cur; 6242: } 6242: else 6242: _M_push_front_aux(std::forward<_Args>(__args)...); 6242: 6242: 6242: 6242: } 6242: 6242: template 6242: template 6242: 6242: 6242: 6242: void 6242: 6242: deque<_Tp, _Alloc>:: 6242: emplace_back(_Args&&... __args) 6242: { 6242: if (this->_M_impl._M_finish._M_cur 6242: != this->_M_impl._M_finish._M_last - 1) 6242: { 6242: _Alloc_traits::construct(this->_M_impl, 6242: this->_M_impl._M_finish._M_cur, 6242: std::forward<_Args>(__args)...); 6242: ++this->_M_impl._M_finish._M_cur; 6242: } 6242: else 6242: _M_push_back_aux(std::forward<_Args>(__args)...); 6242: 6242: 6242: 6242: } 6242: 6242: 6242: 6242: template 6242: template 6242: typename deque<_Tp, _Alloc>::iterator 6242: deque<_Tp, _Alloc>:: 6242: emplace(const_iterator __position, _Args&&... __args) 6242: { 6242: if (__position._M_cur == this->_M_impl._M_start._M_cur) 6242: { 6242: emplace_front(std::forward<_Args>(__args)...); 6242: return this->_M_impl._M_start; 6242: } 6242: else if (__position._M_cur == this->_M_impl._M_finish._M_cur) 6242: { 6242: emplace_back(std::forward<_Args>(__args)...); 6242: iterator __tmp = this->_M_impl._M_finish; 6242: --__tmp; 6242: return __tmp; 6242: } 6242: else 6242: return _M_insert_aux(__position._M_const_cast(), 6242: std::forward<_Args>(__args)...); 6242: } 6242: 6242: 6242: template 6242: typename deque<_Tp, _Alloc>::iterator 6242: deque<_Tp, _Alloc>:: 6242: 6242: insert(const_iterator __position, const value_type& __x) 6242: 6242: 6242: 6242: { 6242: if (__position._M_cur == this->_M_impl._M_start._M_cur) 6242: { 6242: push_front(__x); 6242: return this->_M_impl._M_start; 6242: } 6242: else if (__position._M_cur == this->_M_impl._M_finish._M_cur) 6242: { 6242: push_back(__x); 6242: iterator __tmp = this->_M_impl._M_finish; 6242: --__tmp; 6242: return __tmp; 6242: } 6242: else 6242: return _M_insert_aux(__position._M_const_cast(), __x); 6242: } 6242: 6242: template 6242: typename deque<_Tp, _Alloc>::iterator 6242: deque<_Tp, _Alloc>:: 6242: _M_erase(iterator __position) 6242: { 6242: iterator __next = __position; 6242: ++__next; 6242: const difference_type __index = __position - begin(); 6242: if (static_cast(__index) < (size() >> 1)) 6242: { 6242: if (__position != begin()) 6242: std::move_backward(begin(), __position, __next); 6242: pop_front(); 6242: } 6242: else 6242: { 6242: if (__next != end()) 6242: std::move(__next, end(), __position); 6242: pop_back(); 6242: } 6242: return begin() + __index; 6242: } 6242: 6242: template 6242: typename deque<_Tp, _Alloc>::iterator 6242: deque<_Tp, _Alloc>:: 6242: _M_erase(iterator __first, iterator __last) 6242: { 6242: if (__first == __last) 6242: return __first; 6242: else if (__first == begin() && __last == end()) 6242: { 6242: clear(); 6242: return end(); 6242: } 6242: else 6242: { 6242: const difference_type __n = __last - __first; 6242: const difference_type __elems_before = __first - begin(); 6242: if (static_cast(__elems_before) <= (size() - __n) / 2) 6242: { 6242: if (__first != begin()) 6242: std::move_backward(begin(), __first, __last); 6242: _M_erase_at_begin(begin() + __n); 6242: } 6242: else 6242: { 6242: if (__last != end()) 6242: std::move(__last, end(), __first); 6242: _M_erase_at_end(end() - __n); 6242: } 6242: return begin() + __elems_before; 6242: } 6242: } 6242: 6242: template 6242: template 6242: void 6242: deque<_Tp, _Alloc>:: 6242: _M_assign_aux(_InputIterator __first, _InputIterator __last, 6242: std::input_iterator_tag) 6242: { 6242: iterator __cur = begin(); 6242: for (; __first != __last && __cur != end(); ++__cur, ++__first) 6242: *__cur = *__first; 6242: if (__first == __last) 6242: _M_erase_at_end(__cur); 6242: else 6242: _M_range_insert_aux(end(), __first, __last, 6242: std::__iterator_category(__first)); 6242: } 6242: 6242: template 6242: void 6242: deque<_Tp, _Alloc>:: 6242: _M_fill_insert(iterator __pos, size_type __n, const value_type& __x) 6242: { 6242: if (__pos._M_cur == this->_M_impl._M_start._M_cur) 6242: { 6242: iterator __new_start = _M_reserve_elements_at_front(__n); 6242: try 6242: { 6242: std::__uninitialized_fill_a(__new_start, this->_M_impl._M_start, 6242: __x, _M_get_Tp_allocator()); 6242: this->_M_impl._M_start = __new_start; 6242: } 6242: catch(...) 6242: { 6242: _M_destroy_nodes(__new_start._M_node, 6242: this->_M_impl._M_start._M_node); 6242: throw; 6242: } 6242: } 6242: else if (__pos._M_cur == this->_M_impl._M_finish._M_cur) 6242: { 6242: iterator __new_finish = _M_reserve_elements_at_back(__n); 6242: try 6242: { 6242: std::__uninitialized_fill_a(this->_M_impl._M_finish, 6242: __new_finish, __x, 6242: _M_get_Tp_allocator()); 6242: this->_M_impl._M_finish = __new_finish; 6242: } 6242: catch(...) 6242: { 6242: _M_destroy_nodes(this->_M_impl._M_finish._M_node + 1, 6242: __new_finish._M_node + 1); 6242: throw; 6242: } 6242: } 6242: else 6242: _M_insert_aux(__pos, __n, __x); 6242: } 6242: 6242: 6242: template 6242: void 6242: deque<_Tp, _Alloc>:: 6242: _M_default_append(size_type __n) 6242: { 6242: if (__n) 6242: { 6242: iterator __new_finish = _M_reserve_elements_at_back(__n); 6242: try 6242: { 6242: std::__uninitialized_default_a(this->_M_impl._M_finish, 6242: __new_finish, 6242: _M_get_Tp_allocator()); 6242: this->_M_impl._M_finish = __new_finish; 6242: } 6242: catch(...) 6242: { 6242: _M_destroy_nodes(this->_M_impl._M_finish._M_node + 1, 6242: __new_finish._M_node + 1); 6242: throw; 6242: } 6242: } 6242: } 6242: 6242: template 6242: bool 6242: deque<_Tp, _Alloc>:: 6242: _M_shrink_to_fit() 6242: { 6242: const difference_type __front_capacity 6242: = (this->_M_impl._M_start._M_cur - this->_M_impl._M_start._M_first); 6242: if (__front_capacity == 0) 6242: return false; 6242: 6242: const difference_type __back_capacity 6242: = (this->_M_impl._M_finish._M_last - this->_M_impl._M_finish._M_cur); 6242: if (__front_capacity + __back_capacity < _S_buffer_size()) 6242: return false; 6242: 6242: return std::__shrink_to_fit_aux::_S_do_it(*this); 6242: } 6242: 6242: 6242: template 6242: void 6242: deque<_Tp, _Alloc>:: 6242: _M_fill_initialize(const value_type& __value) 6242: { 6242: _Map_pointer __cur; 6242: try 6242: { 6242: for (__cur = this->_M_impl._M_start._M_node; 6242: __cur < this->_M_impl._M_finish._M_node; 6242: ++__cur) 6242: std::__uninitialized_fill_a(*__cur, *__cur + _S_buffer_size(), 6242: __value, _M_get_Tp_allocator()); 6242: std::__uninitialized_fill_a(this->_M_impl._M_finish._M_first, 6242: this->_M_impl._M_finish._M_cur, 6242: __value, _M_get_Tp_allocator()); 6242: } 6242: catch(...) 6242: { 6242: std::_Destroy(this->_M_impl._M_start, iterator(*__cur, __cur), 6242: _M_get_Tp_allocator()); 6242: throw; 6242: } 6242: } 6242: 6242: template 6242: template 6242: void 6242: deque<_Tp, _Alloc>:: 6242: _M_range_initialize(_InputIterator __first, _InputIterator __last, 6242: std::input_iterator_tag) 6242: { 6242: this->_M_initialize_map(0); 6242: try 6242: { 6242: for (; __first != __last; ++__first) 6242: 6242: emplace_back(*__first); 6242: 6242: 6242: 6242: } 6242: catch(...) 6242: { 6242: clear(); 6242: throw; 6242: } 6242: } 6242: 6242: template 6242: template 6242: void 6242: deque<_Tp, _Alloc>:: 6242: _M_range_initialize(_ForwardIterator __first, _ForwardIterator __last, 6242: std::forward_iterator_tag) 6242: { 6242: const size_type __n = std::distance(__first, __last); 6242: this->_M_initialize_map(__n); 6242: 6242: _Map_pointer __cur_node; 6242: try 6242: { 6242: for (__cur_node = this->_M_impl._M_start._M_node; 6242: __cur_node < this->_M_impl._M_finish._M_node; 6242: ++__cur_node) 6242: { 6242: _ForwardIterator __mid = __first; 6242: std::advance(__mid, _S_buffer_size()); 6242: std::__uninitialized_copy_a(__first, __mid, *__cur_node, 6242: _M_get_Tp_allocator()); 6242: __first = __mid; 6242: } 6242: std::__uninitialized_copy_a(__first, __last, 6242: this->_M_impl._M_finish._M_first, 6242: _M_get_Tp_allocator()); 6242: } 6242: catch(...) 6242: { 6242: std::_Destroy(this->_M_impl._M_start, 6242: iterator(*__cur_node, __cur_node), 6242: _M_get_Tp_allocator()); 6242: throw; 6242: } 6242: } 6242: 6242: 6242: template 6242: 6242: template 6242: void 6242: deque<_Tp, _Alloc>:: 6242: _M_push_back_aux(_Args&&... __args) 6242: 6242: 6242: 6242: 6242: 6242: { 6242: _M_reserve_map_at_back(); 6242: *(this->_M_impl._M_finish._M_node + 1) = this->_M_allocate_node(); 6242: try 6242: { 6242: 6242: _Alloc_traits::construct(this->_M_impl, 6242: this->_M_impl._M_finish._M_cur, 6242: std::forward<_Args>(__args)...); 6242: 6242: 6242: 6242: this->_M_impl._M_finish._M_set_node(this->_M_impl._M_finish._M_node 6242: + 1); 6242: this->_M_impl._M_finish._M_cur = this->_M_impl._M_finish._M_first; 6242: } 6242: catch(...) 6242: { 6242: _M_deallocate_node(*(this->_M_impl._M_finish._M_node + 1)); 6242: throw; 6242: } 6242: } 6242: 6242: 6242: template 6242: 6242: template 6242: void 6242: deque<_Tp, _Alloc>:: 6242: _M_push_front_aux(_Args&&... __args) 6242: 6242: 6242: 6242: 6242: 6242: { 6242: _M_reserve_map_at_front(); 6242: *(this->_M_impl._M_start._M_node - 1) = this->_M_allocate_node(); 6242: try 6242: { 6242: this->_M_impl._M_start._M_set_node(this->_M_impl._M_start._M_node 6242: - 1); 6242: this->_M_impl._M_start._M_cur = this->_M_impl._M_start._M_last - 1; 6242: 6242: _Alloc_traits::construct(this->_M_impl, 6242: this->_M_impl._M_start._M_cur, 6242: std::forward<_Args>(__args)...); 6242: 6242: 6242: 6242: } 6242: catch(...) 6242: { 6242: ++this->_M_impl._M_start; 6242: _M_deallocate_node(*(this->_M_impl._M_start._M_node - 1)); 6242: throw; 6242: } 6242: } 6242: 6242: 6242: template 6242: void deque<_Tp, _Alloc>:: 6242: _M_pop_back_aux() 6242: { 6242: _M_deallocate_node(this->_M_impl._M_finish._M_first); 6242: this->_M_impl._M_finish._M_set_node(this->_M_impl._M_finish._M_node - 1); 6242: this->_M_impl._M_finish._M_cur = this->_M_impl._M_finish._M_last - 1; 6242: _Alloc_traits::destroy(_M_get_Tp_allocator(), 6242: this->_M_impl._M_finish._M_cur); 6242: } 6242: 6242: 6242: 6242: 6242: 6242: 6242: template 6242: void deque<_Tp, _Alloc>:: 6242: _M_pop_front_aux() 6242: { 6242: _Alloc_traits::destroy(_M_get_Tp_allocator(), 6242: this->_M_impl._M_start._M_cur); 6242: _M_deallocate_node(this->_M_impl._M_start._M_first); 6242: this->_M_impl._M_start._M_set_node(this->_M_impl._M_start._M_node + 1); 6242: this->_M_impl._M_start._M_cur = this->_M_impl._M_start._M_first; 6242: } 6242: 6242: template 6242: template 6242: void 6242: deque<_Tp, _Alloc>:: 6242: _M_range_insert_aux(iterator __pos, 6242: _InputIterator __first, _InputIterator __last, 6242: std::input_iterator_tag) 6242: { std::copy(__first, __last, std::inserter(*this, __pos)); } 6242: 6242: template 6242: template 6242: void 6242: deque<_Tp, _Alloc>:: 6242: _M_range_insert_aux(iterator __pos, 6242: _ForwardIterator __first, _ForwardIterator __last, 6242: std::forward_iterator_tag) 6242: { 6242: const size_type __n = std::distance(__first, __last); 6242: if (__pos._M_cur == this->_M_impl._M_start._M_cur) 6242: { 6242: iterator __new_start = _M_reserve_elements_at_front(__n); 6242: try 6242: { 6242: std::__uninitialized_copy_a(__first, __last, __new_start, 6242: _M_get_Tp_allocator()); 6242: this->_M_impl._M_start = __new_start; 6242: } 6242: catch(...) 6242: { 6242: _M_destroy_nodes(__new_start._M_node, 6242: this->_M_impl._M_start._M_node); 6242: throw; 6242: } 6242: } 6242: else if (__pos._M_cur == this->_M_impl._M_finish._M_cur) 6242: { 6242: iterator __new_finish = _M_reserve_elements_at_back(__n); 6242: try 6242: { 6242: std::__uninitialized_copy_a(__first, __last, 6242: this->_M_impl._M_finish, 6242: _M_get_Tp_allocator()); 6242: this->_M_impl._M_finish = __new_finish; 6242: } 6242: catch(...) 6242: { 6242: _M_destroy_nodes(this->_M_impl._M_finish._M_node + 1, 6242: __new_finish._M_node + 1); 6242: throw; 6242: } 6242: } 6242: else 6242: _M_insert_aux(__pos, __first, __last, __n); 6242: } 6242: 6242: template 6242: 6242: template 6242: typename deque<_Tp, _Alloc>::iterator 6242: deque<_Tp, _Alloc>:: 6242: _M_insert_aux(iterator __pos, _Args&&... __args) 6242: { 6242: value_type __x_copy(std::forward<_Args>(__args)...); 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: difference_type __index = __pos - this->_M_impl._M_start; 6242: if (static_cast(__index) < size() / 2) 6242: { 6242: push_front(std::move(front())); 6242: iterator __front1 = this->_M_impl._M_start; 6242: ++__front1; 6242: iterator __front2 = __front1; 6242: ++__front2; 6242: __pos = this->_M_impl._M_start + __index; 6242: iterator __pos1 = __pos; 6242: ++__pos1; 6242: std::move(__front2, __pos1, __front1); 6242: } 6242: else 6242: { 6242: push_back(std::move(back())); 6242: iterator __back1 = this->_M_impl._M_finish; 6242: --__back1; 6242: iterator __back2 = __back1; 6242: --__back2; 6242: __pos = this->_M_impl._M_start + __index; 6242: std::move_backward(__pos, __back2, __back1); 6242: } 6242: *__pos = std::move(__x_copy); 6242: return __pos; 6242: } 6242: 6242: template 6242: void 6242: deque<_Tp, _Alloc>:: 6242: _M_insert_aux(iterator __pos, size_type __n, const value_type& __x) 6242: { 6242: const difference_type __elems_before = __pos - this->_M_impl._M_start; 6242: const size_type __length = this->size(); 6242: value_type __x_copy = __x; 6242: if (__elems_before < difference_type(__length / 2)) 6242: { 6242: iterator __new_start = _M_reserve_elements_at_front(__n); 6242: iterator __old_start = this->_M_impl._M_start; 6242: __pos = this->_M_impl._M_start + __elems_before; 6242: try 6242: { 6242: if (__elems_before >= difference_type(__n)) 6242: { 6242: iterator __start_n = (this->_M_impl._M_start 6242: + difference_type(__n)); 6242: std::__uninitialized_move_a(this->_M_impl._M_start, 6242: __start_n, __new_start, 6242: _M_get_Tp_allocator()); 6242: this->_M_impl._M_start = __new_start; 6242: std::move(__start_n, __pos, __old_start); 6242: std::fill(__pos - difference_type(__n), __pos, __x_copy); 6242: } 6242: else 6242: { 6242: std::__uninitialized_move_fill(this->_M_impl._M_start, 6242: __pos, __new_start, 6242: this->_M_impl._M_start, 6242: __x_copy, 6242: _M_get_Tp_allocator()); 6242: this->_M_impl._M_start = __new_start; 6242: std::fill(__old_start, __pos, __x_copy); 6242: } 6242: } 6242: catch(...) 6242: { 6242: _M_destroy_nodes(__new_start._M_node, 6242: this->_M_impl._M_start._M_node); 6242: throw; 6242: } 6242: } 6242: else 6242: { 6242: iterator __new_finish = _M_reserve_elements_at_back(__n); 6242: iterator __old_finish = this->_M_impl._M_finish; 6242: const difference_type __elems_after = 6242: difference_type(__length) - __elems_before; 6242: __pos = this->_M_impl._M_finish - __elems_after; 6242: try 6242: { 6242: if (__elems_after > difference_type(__n)) 6242: { 6242: iterator __finish_n = (this->_M_impl._M_finish 6242: - difference_type(__n)); 6242: std::__uninitialized_move_a(__finish_n, 6242: this->_M_impl._M_finish, 6242: this->_M_impl._M_finish, 6242: _M_get_Tp_allocator()); 6242: this->_M_impl._M_finish = __new_finish; 6242: std::move_backward(__pos, __finish_n, __old_finish); 6242: std::fill(__pos, __pos + difference_type(__n), __x_copy); 6242: } 6242: else 6242: { 6242: std::__uninitialized_fill_move(this->_M_impl._M_finish, 6242: __pos + difference_type(__n), 6242: __x_copy, __pos, 6242: this->_M_impl._M_finish, 6242: _M_get_Tp_allocator()); 6242: this->_M_impl._M_finish = __new_finish; 6242: std::fill(__pos, __old_finish, __x_copy); 6242: } 6242: } 6242: catch(...) 6242: { 6242: _M_destroy_nodes(this->_M_impl._M_finish._M_node + 1, 6242: __new_finish._M_node + 1); 6242: throw; 6242: } 6242: } 6242: } 6242: 6242: template 6242: template 6242: void 6242: deque<_Tp, _Alloc>:: 6242: _M_insert_aux(iterator __pos, 6242: _ForwardIterator __first, _ForwardIterator __last, 6242: size_type __n) 6242: { 6242: const difference_type __elemsbefore = __pos - this->_M_impl._M_start; 6242: const size_type __length = size(); 6242: if (static_cast(__elemsbefore) < __length / 2) 6242: { 6242: iterator __new_start = _M_reserve_elements_at_front(__n); 6242: iterator __old_start = this->_M_impl._M_start; 6242: __pos = this->_M_impl._M_start + __elemsbefore; 6242: try 6242: { 6242: if (__elemsbefore >= difference_type(__n)) 6242: { 6242: iterator __start_n = (this->_M_impl._M_start 6242: + difference_type(__n)); 6242: std::__uninitialized_move_a(this->_M_impl._M_start, 6242: __start_n, __new_start, 6242: _M_get_Tp_allocator()); 6242: this->_M_impl._M_start = __new_start; 6242: std::move(__start_n, __pos, __old_start); 6242: std::copy(__first, __last, __pos - difference_type(__n)); 6242: } 6242: else 6242: { 6242: _ForwardIterator __mid = __first; 6242: std::advance(__mid, difference_type(__n) - __elemsbefore); 6242: std::__uninitialized_move_copy(this->_M_impl._M_start, 6242: __pos, __first, __mid, 6242: __new_start, 6242: _M_get_Tp_allocator()); 6242: this->_M_impl._M_start = __new_start; 6242: std::copy(__mid, __last, __old_start); 6242: } 6242: } 6242: catch(...) 6242: { 6242: _M_destroy_nodes(__new_start._M_node, 6242: this->_M_impl._M_start._M_node); 6242: throw; 6242: } 6242: } 6242: else 6242: { 6242: iterator __new_finish = _M_reserve_elements_at_back(__n); 6242: iterator __old_finish = this->_M_impl._M_finish; 6242: const difference_type __elemsafter = 6242: difference_type(__length) - __elemsbefore; 6242: __pos = this->_M_impl._M_finish - __elemsafter; 6242: try 6242: { 6242: if (__elemsafter > difference_type(__n)) 6242: { 6242: iterator __finish_n = (this->_M_impl._M_finish 6242: - difference_type(__n)); 6242: std::__uninitialized_move_a(__finish_n, 6242: this->_M_impl._M_finish, 6242: this->_M_impl._M_finish, 6242: _M_get_Tp_allocator()); 6242: this->_M_impl._M_finish = __new_finish; 6242: std::move_backward(__pos, __finish_n, __old_finish); 6242: std::copy(__first, __last, __pos); 6242: } 6242: else 6242: { 6242: _ForwardIterator __mid = __first; 6242: std::advance(__mid, __elemsafter); 6242: std::__uninitialized_copy_move(__mid, __last, __pos, 6242: this->_M_impl._M_finish, 6242: this->_M_impl._M_finish, 6242: _M_get_Tp_allocator()); 6242: this->_M_impl._M_finish = __new_finish; 6242: std::copy(__first, __mid, __pos); 6242: } 6242: } 6242: catch(...) 6242: { 6242: _M_destroy_nodes(this->_M_impl._M_finish._M_node + 1, 6242: __new_finish._M_node + 1); 6242: throw; 6242: } 6242: } 6242: } 6242: 6242: template 6242: void 6242: deque<_Tp, _Alloc>:: 6242: _M_destroy_data_aux(iterator __first, iterator __last) 6242: { 6242: for (_Map_pointer __node = __first._M_node + 1; 6242: __node < __last._M_node; ++__node) 6242: std::_Destroy(*__node, *__node + _S_buffer_size(), 6242: _M_get_Tp_allocator()); 6242: 6242: if (__first._M_node != __last._M_node) 6242: { 6242: std::_Destroy(__first._M_cur, __first._M_last, 6242: _M_get_Tp_allocator()); 6242: std::_Destroy(__last._M_first, __last._M_cur, 6242: _M_get_Tp_allocator()); 6242: } 6242: else 6242: std::_Destroy(__first._M_cur, __last._M_cur, 6242: _M_get_Tp_allocator()); 6242: } 6242: 6242: template 6242: void 6242: deque<_Tp, _Alloc>:: 6242: _M_new_elements_at_front(size_type __new_elems) 6242: { 6242: if (this->max_size() - this->size() < __new_elems) 6242: __throw_length_error(("deque::_M_new_elements_at_front")); 6242: 6242: const size_type __new_nodes = ((__new_elems + _S_buffer_size() - 1) 6242: / _S_buffer_size()); 6242: _M_reserve_map_at_front(__new_nodes); 6242: size_type __i; 6242: try 6242: { 6242: for (__i = 1; __i <= __new_nodes; ++__i) 6242: *(this->_M_impl._M_start._M_node - __i) = this->_M_allocate_node(); 6242: } 6242: catch(...) 6242: { 6242: for (size_type __j = 1; __j < __i; ++__j) 6242: _M_deallocate_node(*(this->_M_impl._M_start._M_node - __j)); 6242: throw; 6242: } 6242: } 6242: 6242: template 6242: void 6242: deque<_Tp, _Alloc>:: 6242: _M_new_elements_at_back(size_type __new_elems) 6242: { 6242: if (this->max_size() - this->size() < __new_elems) 6242: __throw_length_error(("deque::_M_new_elements_at_back")); 6242: 6242: const size_type __new_nodes = ((__new_elems + _S_buffer_size() - 1) 6242: / _S_buffer_size()); 6242: _M_reserve_map_at_back(__new_nodes); 6242: size_type __i; 6242: try 6242: { 6242: for (__i = 1; __i <= __new_nodes; ++__i) 6242: *(this->_M_impl._M_finish._M_node + __i) = this->_M_allocate_node(); 6242: } 6242: catch(...) 6242: { 6242: for (size_type __j = 1; __j < __i; ++__j) 6242: _M_deallocate_node(*(this->_M_impl._M_finish._M_node + __j)); 6242: throw; 6242: } 6242: } 6242: 6242: template 6242: void 6242: deque<_Tp, _Alloc>:: 6242: _M_reallocate_map(size_type __nodes_to_add, bool __add_at_front) 6242: { 6242: const size_type __old_num_nodes 6242: = this->_M_impl._M_finish._M_node - this->_M_impl._M_start._M_node + 1; 6242: const size_type __new_num_nodes = __old_num_nodes + __nodes_to_add; 6242: 6242: _Map_pointer __new_nstart; 6242: if (this->_M_impl._M_map_size > 2 * __new_num_nodes) 6242: { 6242: __new_nstart = this->_M_impl._M_map + (this->_M_impl._M_map_size 6242: - __new_num_nodes) / 2 6242: + (__add_at_front ? __nodes_to_add : 0); 6242: if (__new_nstart < this->_M_impl._M_start._M_node) 6242: std::copy(this->_M_impl._M_start._M_node, 6242: this->_M_impl._M_finish._M_node + 1, 6242: __new_nstart); 6242: else 6242: std::copy_backward(this->_M_impl._M_start._M_node, 6242: this->_M_impl._M_finish._M_node + 1, 6242: __new_nstart + __old_num_nodes); 6242: } 6242: else 6242: { 6242: size_type __new_map_size = this->_M_impl._M_map_size 6242: + std::max(this->_M_impl._M_map_size, 6242: __nodes_to_add) + 2; 6242: 6242: _Map_pointer __new_map = this->_M_allocate_map(__new_map_size); 6242: __new_nstart = __new_map + (__new_map_size - __new_num_nodes) / 2 6242: + (__add_at_front ? __nodes_to_add : 0); 6242: std::copy(this->_M_impl._M_start._M_node, 6242: this->_M_impl._M_finish._M_node + 1, 6242: __new_nstart); 6242: _M_deallocate_map(this->_M_impl._M_map, this->_M_impl._M_map_size); 6242: 6242: this->_M_impl._M_map = __new_map; 6242: this->_M_impl._M_map_size = __new_map_size; 6242: } 6242: 6242: this->_M_impl._M_start._M_set_node(__new_nstart); 6242: this->_M_impl._M_finish._M_set_node(__new_nstart + __old_num_nodes - 1); 6242: } 6242: 6242: 6242: 6242: template 6242: void 6242: fill(const _Deque_iterator<_Tp, _Tp&, _Tp*>& __first, 6242: const _Deque_iterator<_Tp, _Tp&, _Tp*>& __last, const _Tp& __value) 6242: { 6242: typedef typename _Deque_iterator<_Tp, _Tp&, _Tp*>::_Self _Self; 6242: 6242: for (typename _Self::_Map_pointer __node = __first._M_node + 1; 6242: __node < __last._M_node; ++__node) 6242: std::fill(*__node, *__node + _Self::_S_buffer_size(), __value); 6242: 6242: if (__first._M_node != __last._M_node) 6242: { 6242: std::fill(__first._M_cur, __first._M_last, __value); 6242: std::fill(__last._M_first, __last._M_cur, __value); 6242: } 6242: else 6242: std::fill(__first._M_cur, __last._M_cur, __value); 6242: } 6242: 6242: template 6242: _Deque_iterator<_Tp, _Tp&, _Tp*> 6242: copy(_Deque_iterator<_Tp, const _Tp&, const _Tp*> __first, 6242: _Deque_iterator<_Tp, const _Tp&, const _Tp*> __last, 6242: _Deque_iterator<_Tp, _Tp&, _Tp*> __result) 6242: { 6242: typedef typename _Deque_iterator<_Tp, _Tp&, _Tp*>::_Self _Self; 6242: typedef typename _Self::difference_type difference_type; 6242: 6242: difference_type __len = __last - __first; 6242: while (__len > 0) 6242: { 6242: const difference_type __clen 6242: = std::min(__len, std::min(__first._M_last - __first._M_cur, 6242: __result._M_last - __result._M_cur)); 6242: std::copy(__first._M_cur, __first._M_cur + __clen, __result._M_cur); 6242: __first += __clen; 6242: __result += __clen; 6242: __len -= __clen; 6242: } 6242: return __result; 6242: } 6242: 6242: template 6242: _Deque_iterator<_Tp, _Tp&, _Tp*> 6242: copy_backward(_Deque_iterator<_Tp, const _Tp&, const _Tp*> __first, 6242: _Deque_iterator<_Tp, const _Tp&, const _Tp*> __last, 6242: _Deque_iterator<_Tp, _Tp&, _Tp*> __result) 6242: { 6242: typedef typename _Deque_iterator<_Tp, _Tp&, _Tp*>::_Self _Self; 6242: typedef typename _Self::difference_type difference_type; 6242: 6242: difference_type __len = __last - __first; 6242: while (__len > 0) 6242: { 6242: difference_type __llen = __last._M_cur - __last._M_first; 6242: _Tp* __lend = __last._M_cur; 6242: 6242: difference_type __rlen = __result._M_cur - __result._M_first; 6242: _Tp* __rend = __result._M_cur; 6242: 6242: if (!__llen) 6242: { 6242: __llen = _Self::_S_buffer_size(); 6242: __lend = *(__last._M_node - 1) + __llen; 6242: } 6242: if (!__rlen) 6242: { 6242: __rlen = _Self::_S_buffer_size(); 6242: __rend = *(__result._M_node - 1) + __rlen; 6242: } 6242: 6242: const difference_type __clen = std::min(__len, 6242: std::min(__llen, __rlen)); 6242: std::copy_backward(__lend - __clen, __lend, __rend); 6242: __last -= __clen; 6242: __result -= __clen; 6242: __len -= __clen; 6242: } 6242: return __result; 6242: } 6242: 6242: 6242: template 6242: _Deque_iterator<_Tp, _Tp&, _Tp*> 6242: move(_Deque_iterator<_Tp, const _Tp&, const _Tp*> __first, 6242: _Deque_iterator<_Tp, const _Tp&, const _Tp*> __last, 6242: _Deque_iterator<_Tp, _Tp&, _Tp*> __result) 6242: { 6242: typedef typename _Deque_iterator<_Tp, _Tp&, _Tp*>::_Self _Self; 6242: typedef typename _Self::difference_type difference_type; 6242: 6242: difference_type __len = __last - __first; 6242: while (__len > 0) 6242: { 6242: const difference_type __clen 6242: = std::min(__len, std::min(__first._M_last - __first._M_cur, 6242: __result._M_last - __result._M_cur)); 6242: std::move(__first._M_cur, __first._M_cur + __clen, __result._M_cur); 6242: __first += __clen; 6242: __result += __clen; 6242: __len -= __clen; 6242: } 6242: return __result; 6242: } 6242: 6242: template 6242: _Deque_iterator<_Tp, _Tp&, _Tp*> 6242: move_backward(_Deque_iterator<_Tp, const _Tp&, const _Tp*> __first, 6242: _Deque_iterator<_Tp, const _Tp&, const _Tp*> __last, 6242: _Deque_iterator<_Tp, _Tp&, _Tp*> __result) 6242: { 6242: typedef typename _Deque_iterator<_Tp, _Tp&, _Tp*>::_Self _Self; 6242: typedef typename _Self::difference_type difference_type; 6242: 6242: difference_type __len = __last - __first; 6242: while (__len > 0) 6242: { 6242: difference_type __llen = __last._M_cur - __last._M_first; 6242: _Tp* __lend = __last._M_cur; 6242: 6242: difference_type __rlen = __result._M_cur - __result._M_first; 6242: _Tp* __rend = __result._M_cur; 6242: 6242: if (!__llen) 6242: { 6242: __llen = _Self::_S_buffer_size(); 6242: __lend = *(__last._M_node - 1) + __llen; 6242: } 6242: if (!__rlen) 6242: { 6242: __rlen = _Self::_S_buffer_size(); 6242: __rend = *(__result._M_node - 1) + __rlen; 6242: } 6242: 6242: const difference_type __clen = std::min(__len, 6242: std::min(__llen, __rlen)); 6242: std::move_backward(__lend - __clen, __lend, __rend); 6242: __last -= __clen; 6242: __result -= __clen; 6242: __len -= __clen; 6242: } 6242: return __result; 6242: } 6242: 6242: 6242: 6242: 6242: } 6242: # 67 "/usr/include/c++/8/deque" 2 3 6242: # 92 "/usr/include/boost/detail/container_fwd.hpp" 2 3 4 6242: 6242: 6242: 6242: 6242: # 1 "/usr/include/c++/8/bitset" 1 3 4 6242: # 45 "/usr/include/c++/8/bitset" 3 4 6242: 6242: # 46 "/usr/include/c++/8/bitset" 3 6242: # 60 "/usr/include/c++/8/bitset" 3 6242: namespace std __attribute__ ((__visibility__ ("default"))) 6242: { 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: template 6242: struct _Base_bitset 6242: { 6242: typedef unsigned long _WordT; 6242: 6242: 6242: _WordT _M_w[_Nw]; 6242: 6242: constexpr _Base_bitset() noexcept 6242: : _M_w() { } 6242: 6242: 6242: constexpr _Base_bitset(unsigned long long __val) noexcept 6242: : _M_w{ _WordT(__val) 6242: 6242: 6242: 6242: } { } 6242: 6242: 6242: 6242: 6242: 6242: 6242: static constexpr size_t 6242: _S_whichword(size_t __pos) noexcept 6242: { return __pos / (8 * 8); } 6242: 6242: static constexpr size_t 6242: _S_whichbyte(size_t __pos) noexcept 6242: { return (__pos % (8 * 8)) / 8; } 6242: 6242: static constexpr size_t 6242: _S_whichbit(size_t __pos) noexcept 6242: { return __pos % (8 * 8); } 6242: 6242: static constexpr _WordT 6242: _S_maskbit(size_t __pos) noexcept 6242: { return (static_cast<_WordT>(1)) << _S_whichbit(__pos); } 6242: 6242: _WordT& 6242: _M_getword(size_t __pos) noexcept 6242: { return _M_w[_S_whichword(__pos)]; } 6242: 6242: constexpr _WordT 6242: _M_getword(size_t __pos) const noexcept 6242: { return _M_w[_S_whichword(__pos)]; } 6242: 6242: 6242: const _WordT* 6242: _M_getdata() const noexcept 6242: { return _M_w; } 6242: 6242: 6242: _WordT& 6242: _M_hiword() noexcept 6242: { return _M_w[_Nw - 1]; } 6242: 6242: constexpr _WordT 6242: _M_hiword() const noexcept 6242: { return _M_w[_Nw - 1]; } 6242: 6242: void 6242: _M_do_and(const _Base_bitset<_Nw>& __x) noexcept 6242: { 6242: for (size_t __i = 0; __i < _Nw; __i++) 6242: _M_w[__i] &= __x._M_w[__i]; 6242: } 6242: 6242: void 6242: _M_do_or(const _Base_bitset<_Nw>& __x) noexcept 6242: { 6242: for (size_t __i = 0; __i < _Nw; __i++) 6242: _M_w[__i] |= __x._M_w[__i]; 6242: } 6242: 6242: void 6242: _M_do_xor(const _Base_bitset<_Nw>& __x) noexcept 6242: { 6242: for (size_t __i = 0; __i < _Nw; __i++) 6242: _M_w[__i] ^= __x._M_w[__i]; 6242: } 6242: 6242: void 6242: _M_do_left_shift(size_t __shift) noexcept; 6242: 6242: void 6242: _M_do_right_shift(size_t __shift) noexcept; 6242: 6242: void 6242: _M_do_flip() noexcept 6242: { 6242: for (size_t __i = 0; __i < _Nw; __i++) 6242: _M_w[__i] = ~_M_w[__i]; 6242: } 6242: 6242: void 6242: _M_do_set() noexcept 6242: { 6242: for (size_t __i = 0; __i < _Nw; __i++) 6242: _M_w[__i] = ~static_cast<_WordT>(0); 6242: } 6242: 6242: void 6242: _M_do_reset() noexcept 6242: { __builtin_memset(_M_w, 0, _Nw * sizeof(_WordT)); } 6242: 6242: bool 6242: _M_is_equal(const _Base_bitset<_Nw>& __x) const noexcept 6242: { 6242: for (size_t __i = 0; __i < _Nw; ++__i) 6242: if (_M_w[__i] != __x._M_w[__i]) 6242: return false; 6242: return true; 6242: } 6242: 6242: template 6242: bool 6242: _M_are_all() const noexcept 6242: { 6242: for (size_t __i = 0; __i < _Nw - 1; __i++) 6242: if (_M_w[__i] != ~static_cast<_WordT>(0)) 6242: return false; 6242: return _M_hiword() == (~static_cast<_WordT>(0) 6242: >> (_Nw * (8 * 8) 6242: - _Nb)); 6242: } 6242: 6242: bool 6242: _M_is_any() const noexcept 6242: { 6242: for (size_t __i = 0; __i < _Nw; __i++) 6242: if (_M_w[__i] != static_cast<_WordT>(0)) 6242: return true; 6242: return false; 6242: } 6242: 6242: size_t 6242: _M_do_count() const noexcept 6242: { 6242: size_t __result = 0; 6242: for (size_t __i = 0; __i < _Nw; __i++) 6242: __result += __builtin_popcountl(_M_w[__i]); 6242: return __result; 6242: } 6242: 6242: unsigned long 6242: _M_do_to_ulong() const; 6242: 6242: 6242: unsigned long long 6242: _M_do_to_ullong() const; 6242: 6242: 6242: 6242: size_t 6242: _M_do_find_first(size_t) const noexcept; 6242: 6242: 6242: size_t 6242: _M_do_find_next(size_t, size_t) const noexcept; 6242: }; 6242: 6242: 6242: template 6242: void 6242: _Base_bitset<_Nw>::_M_do_left_shift(size_t __shift) noexcept 6242: { 6242: if (__builtin_expect(__shift != 0, 1)) 6242: { 6242: const size_t __wshift = __shift / (8 * 8); 6242: const size_t __offset = __shift % (8 * 8); 6242: 6242: if (__offset == 0) 6242: for (size_t __n = _Nw - 1; __n >= __wshift; --__n) 6242: _M_w[__n] = _M_w[__n - __wshift]; 6242: else 6242: { 6242: const size_t __sub_offset = ((8 * 8) 6242: - __offset); 6242: for (size_t __n = _Nw - 1; __n > __wshift; --__n) 6242: _M_w[__n] = ((_M_w[__n - __wshift] << __offset) 6242: | (_M_w[__n - __wshift - 1] >> __sub_offset)); 6242: _M_w[__wshift] = _M_w[0] << __offset; 6242: } 6242: 6242: std::fill(_M_w + 0, _M_w + __wshift, static_cast<_WordT>(0)); 6242: } 6242: } 6242: 6242: template 6242: void 6242: _Base_bitset<_Nw>::_M_do_right_shift(size_t __shift) noexcept 6242: { 6242: if (__builtin_expect(__shift != 0, 1)) 6242: { 6242: const size_t __wshift = __shift / (8 * 8); 6242: const size_t __offset = __shift % (8 * 8); 6242: const size_t __limit = _Nw - __wshift - 1; 6242: 6242: if (__offset == 0) 6242: for (size_t __n = 0; __n <= __limit; ++__n) 6242: _M_w[__n] = _M_w[__n + __wshift]; 6242: else 6242: { 6242: const size_t __sub_offset = ((8 * 8) 6242: - __offset); 6242: for (size_t __n = 0; __n < __limit; ++__n) 6242: _M_w[__n] = ((_M_w[__n + __wshift] >> __offset) 6242: | (_M_w[__n + __wshift + 1] << __sub_offset)); 6242: _M_w[__limit] = _M_w[_Nw-1] >> __offset; 6242: } 6242: 6242: std::fill(_M_w + __limit + 1, _M_w + _Nw, static_cast<_WordT>(0)); 6242: } 6242: } 6242: 6242: template 6242: unsigned long 6242: _Base_bitset<_Nw>::_M_do_to_ulong() const 6242: { 6242: for (size_t __i = 1; __i < _Nw; ++__i) 6242: if (_M_w[__i]) 6242: __throw_overflow_error(("_Base_bitset::_M_do_to_ulong")); 6242: return _M_w[0]; 6242: } 6242: 6242: 6242: template 6242: unsigned long long 6242: _Base_bitset<_Nw>::_M_do_to_ullong() const 6242: { 6242: const bool __dw = sizeof(unsigned long long) > sizeof(unsigned long); 6242: for (size_t __i = 1 + __dw; __i < _Nw; ++__i) 6242: if (_M_w[__i]) 6242: __throw_overflow_error(("_Base_bitset::_M_do_to_ullong")); 6242: 6242: if (__dw) 6242: return _M_w[0] + (static_cast(_M_w[1]) 6242: << (8 * 8)); 6242: return _M_w[0]; 6242: } 6242: 6242: 6242: template 6242: size_t 6242: _Base_bitset<_Nw>:: 6242: _M_do_find_first(size_t __not_found) const noexcept 6242: { 6242: for (size_t __i = 0; __i < _Nw; __i++) 6242: { 6242: _WordT __thisword = _M_w[__i]; 6242: if (__thisword != static_cast<_WordT>(0)) 6242: return (__i * (8 * 8) 6242: + __builtin_ctzl(__thisword)); 6242: } 6242: 6242: return __not_found; 6242: } 6242: 6242: template 6242: size_t 6242: _Base_bitset<_Nw>:: 6242: _M_do_find_next(size_t __prev, size_t __not_found) const noexcept 6242: { 6242: 6242: ++__prev; 6242: 6242: 6242: if (__prev >= _Nw * (8 * 8)) 6242: return __not_found; 6242: 6242: 6242: size_t __i = _S_whichword(__prev); 6242: _WordT __thisword = _M_w[__i]; 6242: 6242: 6242: __thisword &= (~static_cast<_WordT>(0)) << _S_whichbit(__prev); 6242: 6242: if (__thisword != static_cast<_WordT>(0)) 6242: return (__i * (8 * 8) 6242: + __builtin_ctzl(__thisword)); 6242: 6242: 6242: __i++; 6242: for (; __i < _Nw; __i++) 6242: { 6242: __thisword = _M_w[__i]; 6242: if (__thisword != static_cast<_WordT>(0)) 6242: return (__i * (8 * 8) 6242: + __builtin_ctzl(__thisword)); 6242: } 6242: 6242: return __not_found; 6242: } 6242: 6242: 6242: 6242: 6242: 6242: 6242: template<> 6242: struct _Base_bitset<1> 6242: { 6242: typedef unsigned long _WordT; 6242: _WordT _M_w; 6242: 6242: constexpr _Base_bitset() noexcept 6242: : _M_w(0) 6242: { } 6242: 6242: 6242: constexpr _Base_bitset(unsigned long long __val) noexcept 6242: 6242: 6242: 6242: : _M_w(__val) 6242: { } 6242: 6242: static constexpr size_t 6242: _S_whichword(size_t __pos) noexcept 6242: { return __pos / (8 * 8); } 6242: 6242: static constexpr size_t 6242: _S_whichbyte(size_t __pos) noexcept 6242: { return (__pos % (8 * 8)) / 8; } 6242: 6242: static constexpr size_t 6242: _S_whichbit(size_t __pos) noexcept 6242: { return __pos % (8 * 8); } 6242: 6242: static constexpr _WordT 6242: _S_maskbit(size_t __pos) noexcept 6242: { return (static_cast<_WordT>(1)) << _S_whichbit(__pos); } 6242: 6242: _WordT& 6242: _M_getword(size_t) noexcept 6242: { return _M_w; } 6242: 6242: constexpr _WordT 6242: _M_getword(size_t) const noexcept 6242: { return _M_w; } 6242: 6242: 6242: const _WordT* 6242: _M_getdata() const noexcept 6242: { return &_M_w; } 6242: 6242: 6242: _WordT& 6242: _M_hiword() noexcept 6242: { return _M_w; } 6242: 6242: constexpr _WordT 6242: _M_hiword() const noexcept 6242: { return _M_w; } 6242: 6242: void 6242: _M_do_and(const _Base_bitset<1>& __x) noexcept 6242: { _M_w &= __x._M_w; } 6242: 6242: void 6242: _M_do_or(const _Base_bitset<1>& __x) noexcept 6242: { _M_w |= __x._M_w; } 6242: 6242: void 6242: _M_do_xor(const _Base_bitset<1>& __x) noexcept 6242: { _M_w ^= __x._M_w; } 6242: 6242: void 6242: _M_do_left_shift(size_t __shift) noexcept 6242: { _M_w <<= __shift; } 6242: 6242: void 6242: _M_do_right_shift(size_t __shift) noexcept 6242: { _M_w >>= __shift; } 6242: 6242: void 6242: _M_do_flip() noexcept 6242: { _M_w = ~_M_w; } 6242: 6242: void 6242: _M_do_set() noexcept 6242: { _M_w = ~static_cast<_WordT>(0); } 6242: 6242: void 6242: _M_do_reset() noexcept 6242: { _M_w = 0; } 6242: 6242: bool 6242: _M_is_equal(const _Base_bitset<1>& __x) const noexcept 6242: { return _M_w == __x._M_w; } 6242: 6242: template 6242: bool 6242: _M_are_all() const noexcept 6242: { return _M_w == (~static_cast<_WordT>(0) 6242: >> ((8 * 8) - _Nb)); } 6242: 6242: bool 6242: _M_is_any() const noexcept 6242: { return _M_w != 0; } 6242: 6242: size_t 6242: _M_do_count() const noexcept 6242: { return __builtin_popcountl(_M_w); } 6242: 6242: unsigned long 6242: _M_do_to_ulong() const noexcept 6242: { return _M_w; } 6242: 6242: 6242: unsigned long long 6242: _M_do_to_ullong() const noexcept 6242: { return _M_w; } 6242: 6242: 6242: size_t 6242: _M_do_find_first(size_t __not_found) const noexcept 6242: { 6242: if (_M_w != 0) 6242: return __builtin_ctzl(_M_w); 6242: else 6242: return __not_found; 6242: } 6242: 6242: 6242: size_t 6242: _M_do_find_next(size_t __prev, size_t __not_found) const 6242: noexcept 6242: { 6242: ++__prev; 6242: if (__prev >= ((size_t) (8 * 8))) 6242: return __not_found; 6242: 6242: _WordT __x = _M_w >> __prev; 6242: if (__x != 0) 6242: return __builtin_ctzl(__x) + __prev; 6242: else 6242: return __not_found; 6242: } 6242: }; 6242: 6242: 6242: 6242: 6242: 6242: 6242: template<> 6242: struct _Base_bitset<0> 6242: { 6242: typedef unsigned long _WordT; 6242: 6242: constexpr _Base_bitset() noexcept 6242: { } 6242: 6242: 6242: constexpr _Base_bitset(unsigned long long) noexcept 6242: 6242: 6242: 6242: { } 6242: 6242: static constexpr size_t 6242: _S_whichword(size_t __pos) noexcept 6242: { return __pos / (8 * 8); } 6242: 6242: static constexpr size_t 6242: _S_whichbyte(size_t __pos) noexcept 6242: { return (__pos % (8 * 8)) / 8; } 6242: 6242: static constexpr size_t 6242: _S_whichbit(size_t __pos) noexcept 6242: { return __pos % (8 * 8); } 6242: 6242: static constexpr _WordT 6242: _S_maskbit(size_t __pos) noexcept 6242: { return (static_cast<_WordT>(1)) << _S_whichbit(__pos); } 6242: # 556 "/usr/include/c++/8/bitset" 3 6242: _WordT& 6242: _M_getword(size_t) noexcept 6242: { 6242: __throw_out_of_range(("_Base_bitset::_M_getword")); 6242: return *new _WordT; 6242: } 6242: 6242: constexpr _WordT 6242: _M_getword(size_t) const noexcept 6242: { return 0; } 6242: 6242: constexpr _WordT 6242: _M_hiword() const noexcept 6242: { return 0; } 6242: 6242: void 6242: _M_do_and(const _Base_bitset<0>&) noexcept 6242: { } 6242: 6242: void 6242: _M_do_or(const _Base_bitset<0>&) noexcept 6242: { } 6242: 6242: void 6242: _M_do_xor(const _Base_bitset<0>&) noexcept 6242: { } 6242: 6242: void 6242: _M_do_left_shift(size_t) noexcept 6242: { } 6242: 6242: void 6242: _M_do_right_shift(size_t) noexcept 6242: { } 6242: 6242: void 6242: _M_do_flip() noexcept 6242: { } 6242: 6242: void 6242: _M_do_set() noexcept 6242: { } 6242: 6242: void 6242: _M_do_reset() noexcept 6242: { } 6242: 6242: 6242: 6242: 6242: bool 6242: _M_is_equal(const _Base_bitset<0>&) const noexcept 6242: { return true; } 6242: 6242: template 6242: bool 6242: _M_are_all() const noexcept 6242: { return true; } 6242: 6242: bool 6242: _M_is_any() const noexcept 6242: { return false; } 6242: 6242: size_t 6242: _M_do_count() const noexcept 6242: { return 0; } 6242: 6242: unsigned long 6242: _M_do_to_ulong() const noexcept 6242: { return 0; } 6242: 6242: 6242: unsigned long long 6242: _M_do_to_ullong() const noexcept 6242: { return 0; } 6242: 6242: 6242: 6242: 6242: size_t 6242: _M_do_find_first(size_t) const noexcept 6242: { return 0; } 6242: 6242: size_t 6242: _M_do_find_next(size_t, size_t) const noexcept 6242: { return 0; } 6242: }; 6242: 6242: 6242: 6242: template 6242: struct _Sanitize 6242: { 6242: typedef unsigned long _WordT; 6242: 6242: static void 6242: _S_do_sanitize(_WordT& __val) noexcept 6242: { __val &= ~((~static_cast<_WordT>(0)) << _Extrabits); } 6242: }; 6242: 6242: template<> 6242: struct _Sanitize<0> 6242: { 6242: typedef unsigned long _WordT; 6242: 6242: static void 6242: _S_do_sanitize(_WordT) noexcept { } 6242: }; 6242: 6242: 6242: template 6242: struct _Sanitize_val 6242: { 6242: static constexpr unsigned long long 6242: _S_do_sanitize_val(unsigned long long __val) 6242: { return __val; } 6242: }; 6242: 6242: template 6242: struct _Sanitize_val<_Nb, true> 6242: { 6242: static constexpr unsigned long long 6242: _S_do_sanitize_val(unsigned long long __val) 6242: { return __val & ~((~static_cast(0)) << _Nb); } 6242: }; 6242: # 746 "/usr/include/c++/8/bitset" 3 6242: template 6242: class bitset 6242: : private _Base_bitset<((_Nb) / (8 * 8) + ((_Nb) % (8 * 8) == 0 ? 0 : 1))> 6242: { 6242: private: 6242: typedef _Base_bitset<((_Nb) / (8 * 8) + ((_Nb) % (8 * 8) == 0 ? 0 : 1))> _Base; 6242: typedef unsigned long _WordT; 6242: 6242: template 6242: void 6242: _M_check_initial_position(const std::basic_string<_CharT, _Traits, _Alloc>& __s, 6242: size_t __position) const 6242: { 6242: if (__position > __s.size()) 6242: __throw_out_of_range_fmt(("bitset::bitset: __position " "(which is %zu) > __s.size() " "(which is %zu)") 6242: 6242: , 6242: __position, __s.size()); 6242: } 6242: 6242: void _M_check(size_t __position, const char *__s) const 6242: { 6242: if (__position >= _Nb) 6242: __throw_out_of_range_fmt(("%s: __position (which is %zu) " ">= _Nb (which is %zu)") 6242: , 6242: __s, __position, _Nb); 6242: } 6242: 6242: void 6242: _M_do_sanitize() noexcept 6242: { 6242: typedef _Sanitize<_Nb % (8 * 8)> __sanitize_type; 6242: __sanitize_type::_S_do_sanitize(this->_M_hiword()); 6242: } 6242: 6242: 6242: template friend struct hash; 6242: 6242: 6242: public: 6242: # 798 "/usr/include/c++/8/bitset" 3 6242: class reference 6242: { 6242: friend class bitset; 6242: 6242: _WordT* _M_wp; 6242: size_t _M_bpos; 6242: 6242: 6242: reference(); 6242: 6242: public: 6242: reference(bitset& __b, size_t __pos) noexcept 6242: { 6242: _M_wp = &__b._M_getword(__pos); 6242: _M_bpos = _Base::_S_whichbit(__pos); 6242: } 6242: 6242: ~reference() noexcept 6242: { } 6242: 6242: 6242: reference& 6242: operator=(bool __x) noexcept 6242: { 6242: if (__x) 6242: *_M_wp |= _Base::_S_maskbit(_M_bpos); 6242: else 6242: *_M_wp &= ~_Base::_S_maskbit(_M_bpos); 6242: return *this; 6242: } 6242: 6242: 6242: reference& 6242: operator=(const reference& __j) noexcept 6242: { 6242: if ((*(__j._M_wp) & _Base::_S_maskbit(__j._M_bpos))) 6242: *_M_wp |= _Base::_S_maskbit(_M_bpos); 6242: else 6242: *_M_wp &= ~_Base::_S_maskbit(_M_bpos); 6242: return *this; 6242: } 6242: 6242: 6242: bool 6242: operator~() const noexcept 6242: { return (*(_M_wp) & _Base::_S_maskbit(_M_bpos)) == 0; } 6242: 6242: 6242: operator bool() const noexcept 6242: { return (*(_M_wp) & _Base::_S_maskbit(_M_bpos)) != 0; } 6242: 6242: 6242: reference& 6242: flip() noexcept 6242: { 6242: *_M_wp ^= _Base::_S_maskbit(_M_bpos); 6242: return *this; 6242: } 6242: }; 6242: friend class reference; 6242: 6242: 6242: 6242: constexpr bitset() noexcept 6242: { } 6242: 6242: 6242: 6242: constexpr bitset(unsigned long long __val) noexcept 6242: : _Base(_Sanitize_val<_Nb>::_S_do_sanitize_val(__val)) { } 6242: # 883 "/usr/include/c++/8/bitset" 3 6242: template 6242: explicit 6242: bitset(const std::basic_string<_CharT, _Traits, _Alloc>& __s, 6242: size_t __position = 0) 6242: : _Base() 6242: { 6242: _M_check_initial_position(__s, __position); 6242: _M_copy_from_string(__s, __position, 6242: std::basic_string<_CharT, _Traits, _Alloc>::npos, 6242: _CharT('0'), _CharT('1')); 6242: } 6242: # 905 "/usr/include/c++/8/bitset" 3 6242: template 6242: bitset(const std::basic_string<_CharT, _Traits, _Alloc>& __s, 6242: size_t __position, size_t __n) 6242: : _Base() 6242: { 6242: _M_check_initial_position(__s, __position); 6242: _M_copy_from_string(__s, __position, __n, _CharT('0'), _CharT('1')); 6242: } 6242: 6242: 6242: 6242: template 6242: bitset(const std::basic_string<_CharT, _Traits, _Alloc>& __s, 6242: size_t __position, size_t __n, 6242: _CharT __zero, _CharT __one = _CharT('1')) 6242: : _Base() 6242: { 6242: _M_check_initial_position(__s, __position); 6242: _M_copy_from_string(__s, __position, __n, __zero, __one); 6242: } 6242: # 936 "/usr/include/c++/8/bitset" 3 6242: template 6242: explicit 6242: bitset(const _CharT* __str, 6242: typename std::basic_string<_CharT>::size_type __n 6242: = std::basic_string<_CharT>::npos, 6242: _CharT __zero = _CharT('0'), _CharT __one = _CharT('1')) 6242: : _Base() 6242: { 6242: if (!__str) 6242: __throw_logic_error(("bitset::bitset(const _CharT*, ...)")); 6242: 6242: if (__n == std::basic_string<_CharT>::npos) 6242: __n = std::char_traits<_CharT>::length(__str); 6242: _M_copy_from_ptr<_CharT, std::char_traits<_CharT>>(__str, __n, 0, 6242: __n, __zero, 6242: __one); 6242: } 6242: # 963 "/usr/include/c++/8/bitset" 3 6242: bitset<_Nb>& 6242: operator&=(const bitset<_Nb>& __rhs) noexcept 6242: { 6242: this->_M_do_and(__rhs); 6242: return *this; 6242: } 6242: 6242: bitset<_Nb>& 6242: operator|=(const bitset<_Nb>& __rhs) noexcept 6242: { 6242: this->_M_do_or(__rhs); 6242: return *this; 6242: } 6242: 6242: bitset<_Nb>& 6242: operator^=(const bitset<_Nb>& __rhs) noexcept 6242: { 6242: this->_M_do_xor(__rhs); 6242: return *this; 6242: } 6242: # 992 "/usr/include/c++/8/bitset" 3 6242: bitset<_Nb>& 6242: operator<<=(size_t __position) noexcept 6242: { 6242: if (__builtin_expect(__position < _Nb, 1)) 6242: { 6242: this->_M_do_left_shift(__position); 6242: this->_M_do_sanitize(); 6242: } 6242: else 6242: this->_M_do_reset(); 6242: return *this; 6242: } 6242: 6242: bitset<_Nb>& 6242: operator>>=(size_t __position) noexcept 6242: { 6242: if (__builtin_expect(__position < _Nb, 1)) 6242: { 6242: this->_M_do_right_shift(__position); 6242: this->_M_do_sanitize(); 6242: } 6242: else 6242: this->_M_do_reset(); 6242: return *this; 6242: } 6242: # 1025 "/usr/include/c++/8/bitset" 3 6242: bitset<_Nb>& 6242: _Unchecked_set(size_t __pos) noexcept 6242: { 6242: this->_M_getword(__pos) |= _Base::_S_maskbit(__pos); 6242: return *this; 6242: } 6242: 6242: bitset<_Nb>& 6242: _Unchecked_set(size_t __pos, int __val) noexcept 6242: { 6242: if (__val) 6242: this->_M_getword(__pos) |= _Base::_S_maskbit(__pos); 6242: else 6242: this->_M_getword(__pos) &= ~_Base::_S_maskbit(__pos); 6242: return *this; 6242: } 6242: 6242: bitset<_Nb>& 6242: _Unchecked_reset(size_t __pos) noexcept 6242: { 6242: this->_M_getword(__pos) &= ~_Base::_S_maskbit(__pos); 6242: return *this; 6242: } 6242: 6242: bitset<_Nb>& 6242: _Unchecked_flip(size_t __pos) noexcept 6242: { 6242: this->_M_getword(__pos) ^= _Base::_S_maskbit(__pos); 6242: return *this; 6242: } 6242: 6242: constexpr bool 6242: _Unchecked_test(size_t __pos) const noexcept 6242: { return ((this->_M_getword(__pos) & _Base::_S_maskbit(__pos)) 6242: != static_cast<_WordT>(0)); } 6242: 6242: 6242: 6242: 6242: 6242: 6242: bitset<_Nb>& 6242: set() noexcept 6242: { 6242: this->_M_do_set(); 6242: this->_M_do_sanitize(); 6242: return *this; 6242: } 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: bitset<_Nb>& 6242: set(size_t __position, bool __val = true) 6242: { 6242: this->_M_check(__position, ("bitset::set")); 6242: return _Unchecked_set(__position, __val); 6242: } 6242: 6242: 6242: 6242: 6242: bitset<_Nb>& 6242: reset() noexcept 6242: { 6242: this->_M_do_reset(); 6242: return *this; 6242: } 6242: # 1104 "/usr/include/c++/8/bitset" 3 6242: bitset<_Nb>& 6242: reset(size_t __position) 6242: { 6242: this->_M_check(__position, ("bitset::reset")); 6242: return _Unchecked_reset(__position); 6242: } 6242: 6242: 6242: 6242: 6242: bitset<_Nb>& 6242: flip() noexcept 6242: { 6242: this->_M_do_flip(); 6242: this->_M_do_sanitize(); 6242: return *this; 6242: } 6242: 6242: 6242: 6242: 6242: 6242: 6242: bitset<_Nb>& 6242: flip(size_t __position) 6242: { 6242: this->_M_check(__position, ("bitset::flip")); 6242: return _Unchecked_flip(__position); 6242: } 6242: 6242: 6242: bitset<_Nb> 6242: operator~() const noexcept 6242: { return bitset<_Nb>(*this).flip(); } 6242: # 1154 "/usr/include/c++/8/bitset" 3 6242: reference 6242: operator[](size_t __position) 6242: { return reference(*this, __position); } 6242: 6242: constexpr bool 6242: operator[](size_t __position) const 6242: { return _Unchecked_test(__position); } 6242: # 1169 "/usr/include/c++/8/bitset" 3 6242: unsigned long 6242: to_ulong() const 6242: { return this->_M_do_to_ulong(); } 6242: 6242: 6242: unsigned long long 6242: to_ullong() const 6242: { return this->_M_do_to_ullong(); } 6242: # 1187 "/usr/include/c++/8/bitset" 3 6242: template 6242: std::basic_string<_CharT, _Traits, _Alloc> 6242: to_string() const 6242: { 6242: std::basic_string<_CharT, _Traits, _Alloc> __result; 6242: _M_copy_to_string(__result, _CharT('0'), _CharT('1')); 6242: return __result; 6242: } 6242: 6242: 6242: 6242: template 6242: std::basic_string<_CharT, _Traits, _Alloc> 6242: to_string(_CharT __zero, _CharT __one = _CharT('1')) const 6242: { 6242: std::basic_string<_CharT, _Traits, _Alloc> __result; 6242: _M_copy_to_string(__result, __zero, __one); 6242: return __result; 6242: } 6242: 6242: 6242: 6242: template 6242: std::basic_string<_CharT, _Traits, std::allocator<_CharT> > 6242: to_string() const 6242: { return to_string<_CharT, _Traits, std::allocator<_CharT> >(); } 6242: 6242: 6242: 6242: template 6242: std::basic_string<_CharT, _Traits, std::allocator<_CharT> > 6242: to_string(_CharT __zero, _CharT __one = _CharT('1')) const 6242: { return to_string<_CharT, _Traits, 6242: std::allocator<_CharT> >(__zero, __one); } 6242: 6242: template 6242: std::basic_string<_CharT, std::char_traits<_CharT>, 6242: std::allocator<_CharT> > 6242: to_string() const 6242: { 6242: return to_string<_CharT, std::char_traits<_CharT>, 6242: std::allocator<_CharT> >(); 6242: } 6242: 6242: template 6242: std::basic_string<_CharT, std::char_traits<_CharT>, 6242: std::allocator<_CharT> > 6242: to_string(_CharT __zero, _CharT __one = _CharT('1')) const 6242: { 6242: return to_string<_CharT, std::char_traits<_CharT>, 6242: std::allocator<_CharT> >(__zero, __one); 6242: } 6242: 6242: std::basic_string, std::allocator > 6242: to_string() const 6242: { 6242: return to_string, 6242: std::allocator >(); 6242: } 6242: 6242: std::basic_string, std::allocator > 6242: to_string(char __zero, char __one = '1') const 6242: { 6242: return to_string, 6242: std::allocator >(__zero, __one); 6242: } 6242: 6242: 6242: template 6242: void 6242: _M_copy_from_ptr(const _CharT*, size_t, size_t, size_t, 6242: _CharT, _CharT); 6242: 6242: template 6242: void 6242: _M_copy_from_string(const std::basic_string<_CharT, 6242: _Traits, _Alloc>& __s, size_t __pos, size_t __n, 6242: _CharT __zero, _CharT __one) 6242: { _M_copy_from_ptr<_CharT, _Traits>(__s.data(), __s.size(), __pos, __n, 6242: __zero, __one); } 6242: 6242: template 6242: void 6242: _M_copy_to_string(std::basic_string<_CharT, _Traits, _Alloc>&, 6242: _CharT, _CharT) const; 6242: 6242: 6242: template 6242: void 6242: _M_copy_from_string(const std::basic_string<_CharT, 6242: _Traits, _Alloc>& __s, size_t __pos, size_t __n) 6242: { _M_copy_from_string(__s, __pos, __n, _CharT('0'), _CharT('1')); } 6242: 6242: template 6242: void 6242: _M_copy_to_string(std::basic_string<_CharT, _Traits,_Alloc>& __s) const 6242: { _M_copy_to_string(__s, _CharT('0'), _CharT('1')); } 6242: 6242: 6242: size_t 6242: count() const noexcept 6242: { return this->_M_do_count(); } 6242: 6242: 6242: constexpr size_t 6242: size() const noexcept 6242: { return _Nb; } 6242: 6242: 6242: 6242: bool 6242: operator==(const bitset<_Nb>& __rhs) const noexcept 6242: { return this->_M_is_equal(__rhs); } 6242: 6242: bool 6242: operator!=(const bitset<_Nb>& __rhs) const noexcept 6242: { return !this->_M_is_equal(__rhs); } 6242: # 1312 "/usr/include/c++/8/bitset" 3 6242: bool 6242: test(size_t __position) const 6242: { 6242: this->_M_check(__position, ("bitset::test")); 6242: return _Unchecked_test(__position); 6242: } 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: bool 6242: all() const noexcept 6242: { return this->template _M_are_all<_Nb>(); } 6242: 6242: 6242: 6242: 6242: 6242: bool 6242: any() const noexcept 6242: { return this->_M_is_any(); } 6242: 6242: 6242: 6242: 6242: 6242: bool 6242: none() const noexcept 6242: { return !this->_M_is_any(); } 6242: 6242: 6242: 6242: bitset<_Nb> 6242: operator<<(size_t __position) const noexcept 6242: { return bitset<_Nb>(*this) <<= __position; } 6242: 6242: bitset<_Nb> 6242: operator>>(size_t __position) const noexcept 6242: { return bitset<_Nb>(*this) >>= __position; } 6242: # 1362 "/usr/include/c++/8/bitset" 3 6242: size_t 6242: _Find_first() const noexcept 6242: { return this->_M_do_find_first(_Nb); } 6242: # 1373 "/usr/include/c++/8/bitset" 3 6242: size_t 6242: _Find_next(size_t __prev) const noexcept 6242: { return this->_M_do_find_next(__prev, _Nb); } 6242: }; 6242: 6242: 6242: template 6242: template 6242: void 6242: bitset<_Nb>:: 6242: _M_copy_from_ptr(const _CharT* __s, size_t __len, 6242: size_t __pos, size_t __n, _CharT __zero, _CharT __one) 6242: { 6242: reset(); 6242: const size_t __nbits = std::min(_Nb, std::min(__n, size_t(__len - __pos))); 6242: for (size_t __i = __nbits; __i > 0; --__i) 6242: { 6242: const _CharT __c = __s[__pos + __nbits - __i]; 6242: if (_Traits::eq(__c, __zero)) 6242: ; 6242: else if (_Traits::eq(__c, __one)) 6242: _Unchecked_set(__i - 1); 6242: else 6242: __throw_invalid_argument(("bitset::_M_copy_from_ptr")); 6242: } 6242: } 6242: 6242: template 6242: template 6242: void 6242: bitset<_Nb>:: 6242: _M_copy_to_string(std::basic_string<_CharT, _Traits, _Alloc>& __s, 6242: _CharT __zero, _CharT __one) const 6242: { 6242: __s.assign(_Nb, __zero); 6242: for (size_t __i = _Nb; __i > 0; --__i) 6242: if (_Unchecked_test(__i - 1)) 6242: _Traits::assign(__s[_Nb - __i], __one); 6242: } 6242: # 1423 "/usr/include/c++/8/bitset" 3 6242: template 6242: inline bitset<_Nb> 6242: operator&(const bitset<_Nb>& __x, const bitset<_Nb>& __y) noexcept 6242: { 6242: bitset<_Nb> __result(__x); 6242: __result &= __y; 6242: return __result; 6242: } 6242: 6242: template 6242: inline bitset<_Nb> 6242: operator|(const bitset<_Nb>& __x, const bitset<_Nb>& __y) noexcept 6242: { 6242: bitset<_Nb> __result(__x); 6242: __result |= __y; 6242: return __result; 6242: } 6242: 6242: template 6242: inline bitset<_Nb> 6242: operator^(const bitset<_Nb>& __x, const bitset<_Nb>& __y) noexcept 6242: { 6242: bitset<_Nb> __result(__x); 6242: __result ^= __y; 6242: return __result; 6242: } 6242: # 1460 "/usr/include/c++/8/bitset" 3 6242: template 6242: std::basic_istream<_CharT, _Traits>& 6242: operator>>(std::basic_istream<_CharT, _Traits>& __is, bitset<_Nb>& __x) 6242: { 6242: typedef typename _Traits::char_type char_type; 6242: typedef std::basic_istream<_CharT, _Traits> __istream_type; 6242: typedef typename __istream_type::ios_base __ios_base; 6242: 6242: std::basic_string<_CharT, _Traits> __tmp; 6242: __tmp.reserve(_Nb); 6242: 6242: 6242: 6242: const char_type __zero = __is.widen('0'); 6242: const char_type __one = __is.widen('1'); 6242: 6242: typename __ios_base::iostate __state = __ios_base::goodbit; 6242: typename __istream_type::sentry __sentry(__is); 6242: if (__sentry) 6242: { 6242: try 6242: { 6242: for (size_t __i = _Nb; __i > 0; --__i) 6242: { 6242: static typename _Traits::int_type __eof = _Traits::eof(); 6242: 6242: typename _Traits::int_type __c1 = __is.rdbuf()->sbumpc(); 6242: if (_Traits::eq_int_type(__c1, __eof)) 6242: { 6242: __state |= __ios_base::eofbit; 6242: break; 6242: } 6242: else 6242: { 6242: const char_type __c2 = _Traits::to_char_type(__c1); 6242: if (_Traits::eq(__c2, __zero)) 6242: __tmp.push_back(__zero); 6242: else if (_Traits::eq(__c2, __one)) 6242: __tmp.push_back(__one); 6242: else if (_Traits:: 6242: eq_int_type(__is.rdbuf()->sputbackc(__c2), 6242: __eof)) 6242: { 6242: __state |= __ios_base::failbit; 6242: break; 6242: } 6242: } 6242: } 6242: } 6242: catch(__cxxabiv1::__forced_unwind&) 6242: { 6242: __is._M_setstate(__ios_base::badbit); 6242: throw; 6242: } 6242: catch(...) 6242: { __is._M_setstate(__ios_base::badbit); } 6242: } 6242: 6242: if (__tmp.empty() && _Nb) 6242: __state |= __ios_base::failbit; 6242: else 6242: __x._M_copy_from_string(__tmp, static_cast(0), _Nb, 6242: __zero, __one); 6242: if (__state) 6242: __is.setstate(__state); 6242: return __is; 6242: } 6242: 6242: template 6242: std::basic_ostream<_CharT, _Traits>& 6242: operator<<(std::basic_ostream<_CharT, _Traits>& __os, 6242: const bitset<_Nb>& __x) 6242: { 6242: std::basic_string<_CharT, _Traits> __tmp; 6242: 6242: 6242: 6242: const ctype<_CharT>& __ct = use_facet >(__os.getloc()); 6242: __x._M_copy_to_string(__tmp, __ct.widen('0'), __ct.widen('1')); 6242: return __os << __tmp; 6242: } 6242: 6242: 6242: 6242: } 6242: # 1554 "/usr/include/c++/8/bitset" 3 6242: namespace std __attribute__ ((__visibility__ ("default"))) 6242: { 6242: 6242: 6242: 6242: 6242: template 6242: struct hash> 6242: : public __hash_base> 6242: { 6242: size_t 6242: operator()(const std::bitset<_Nb>& __b) const noexcept 6242: { 6242: const size_t __clength = (_Nb + 8 - 1) / 8; 6242: return std::_Hash_impl::hash(__b._M_getdata(), __clength); 6242: } 6242: }; 6242: 6242: template<> 6242: struct hash> 6242: : public __hash_base> 6242: { 6242: size_t 6242: operator()(const std::bitset<0>&) const noexcept 6242: { return 0; } 6242: }; 6242: 6242: 6242: } 6242: # 97 "/usr/include/boost/detail/container_fwd.hpp" 2 3 4 6242: 6242: # 1 "/usr/include/c++/8/complex" 1 3 4 6242: # 39 "/usr/include/c++/8/complex" 3 4 6242: 6242: # 40 "/usr/include/c++/8/complex" 3 6242: 6242: 6242: 6242: 6242: # 1 "/usr/include/c++/8/cmath" 1 3 6242: # 39 "/usr/include/c++/8/cmath" 3 6242: 6242: # 40 "/usr/include/c++/8/cmath" 3 6242: # 45 "/usr/include/c++/8/complex" 2 3 6242: # 1 "/usr/include/c++/8/sstream" 1 3 6242: # 36 "/usr/include/c++/8/sstream" 3 6242: 6242: # 37 "/usr/include/c++/8/sstream" 3 6242: 6242: 6242: 6242: 6242: namespace std __attribute__ ((__visibility__ ("default"))) 6242: { 6242: 6242: namespace __cxx11 { 6242: # 64 "/usr/include/c++/8/sstream" 3 6242: template 6242: class basic_stringbuf : public basic_streambuf<_CharT, _Traits> 6242: { 6242: struct __xfer_bufptrs; 6242: public: 6242: 6242: typedef _CharT char_type; 6242: typedef _Traits traits_type; 6242: 6242: 6242: typedef _Alloc allocator_type; 6242: typedef typename traits_type::int_type int_type; 6242: typedef typename traits_type::pos_type pos_type; 6242: typedef typename traits_type::off_type off_type; 6242: 6242: typedef basic_streambuf __streambuf_type; 6242: typedef basic_string __string_type; 6242: typedef typename __string_type::size_type __size_type; 6242: 6242: protected: 6242: 6242: ios_base::openmode _M_mode; 6242: 6242: 6242: __string_type _M_string; 6242: 6242: public: 6242: # 99 "/usr/include/c++/8/sstream" 3 6242: explicit 6242: basic_stringbuf(ios_base::openmode __mode = ios_base::in | ios_base::out) 6242: : __streambuf_type(), _M_mode(__mode), _M_string() 6242: { } 6242: # 112 "/usr/include/c++/8/sstream" 3 6242: explicit 6242: basic_stringbuf(const __string_type& __str, 6242: ios_base::openmode __mode = ios_base::in | ios_base::out) 6242: : __streambuf_type(), _M_mode(), 6242: _M_string(__str.data(), __str.size(), __str.get_allocator()) 6242: { _M_stringbuf_init(__mode); } 6242: 6242: 6242: basic_stringbuf(const basic_stringbuf&) = delete; 6242: 6242: basic_stringbuf(basic_stringbuf&& __rhs) 6242: : basic_stringbuf(std::move(__rhs), __xfer_bufptrs(__rhs, this)) 6242: { __rhs._M_sync(const_cast(__rhs._M_string.data()), 0, 0); } 6242: 6242: 6242: 6242: basic_stringbuf& 6242: operator=(const basic_stringbuf&) = delete; 6242: 6242: basic_stringbuf& 6242: operator=(basic_stringbuf&& __rhs) 6242: { 6242: __xfer_bufptrs __st{__rhs, this}; 6242: const __streambuf_type& __base = __rhs; 6242: __streambuf_type::operator=(__base); 6242: this->pubimbue(__rhs.getloc()); 6242: _M_mode = __rhs._M_mode; 6242: _M_string = std::move(__rhs._M_string); 6242: __rhs._M_sync(const_cast(__rhs._M_string.data()), 0, 0); 6242: return *this; 6242: } 6242: 6242: void 6242: swap(basic_stringbuf& __rhs) 6242: { 6242: __xfer_bufptrs __l_st{*this, std::__addressof(__rhs)}; 6242: __xfer_bufptrs __r_st{__rhs, this}; 6242: __streambuf_type& __base = __rhs; 6242: __streambuf_type::swap(__base); 6242: __rhs.pubimbue(this->pubimbue(__rhs.getloc())); 6242: std::swap(_M_mode, __rhs._M_mode); 6242: std::swap(_M_string, __rhs._M_string); 6242: } 6242: # 166 "/usr/include/c++/8/sstream" 3 6242: __string_type 6242: str() const 6242: { 6242: __string_type __ret(_M_string.get_allocator()); 6242: if (this->pptr()) 6242: { 6242: 6242: if (this->pptr() > this->egptr()) 6242: __ret.assign(this->pbase(), this->pptr()); 6242: else 6242: __ret.assign(this->pbase(), this->egptr()); 6242: } 6242: else 6242: __ret = _M_string; 6242: return __ret; 6242: } 6242: # 190 "/usr/include/c++/8/sstream" 3 6242: void 6242: str(const __string_type& __s) 6242: { 6242: 6242: 6242: _M_string.assign(__s.data(), __s.size()); 6242: _M_stringbuf_init(_M_mode); 6242: } 6242: 6242: protected: 6242: 6242: void 6242: _M_stringbuf_init(ios_base::openmode __mode) 6242: { 6242: _M_mode = __mode; 6242: __size_type __len = 0; 6242: if (_M_mode & (ios_base::ate | ios_base::app)) 6242: __len = _M_string.size(); 6242: _M_sync(const_cast(_M_string.data()), 0, __len); 6242: } 6242: 6242: virtual streamsize 6242: showmanyc() 6242: { 6242: streamsize __ret = -1; 6242: if (_M_mode & ios_base::in) 6242: { 6242: _M_update_egptr(); 6242: __ret = this->egptr() - this->gptr(); 6242: } 6242: return __ret; 6242: } 6242: 6242: virtual int_type 6242: underflow(); 6242: 6242: virtual int_type 6242: pbackfail(int_type __c = traits_type::eof()); 6242: 6242: virtual int_type 6242: overflow(int_type __c = traits_type::eof()); 6242: # 243 "/usr/include/c++/8/sstream" 3 6242: virtual __streambuf_type* 6242: setbuf(char_type* __s, streamsize __n) 6242: { 6242: if (__s && __n >= 0) 6242: { 6242: 6242: 6242: 6242: 6242: 6242: 6242: _M_string.clear(); 6242: 6242: 6242: _M_sync(__s, __n, 0); 6242: } 6242: return this; 6242: } 6242: 6242: virtual pos_type 6242: seekoff(off_type __off, ios_base::seekdir __way, 6242: ios_base::openmode __mode = ios_base::in | ios_base::out); 6242: 6242: virtual pos_type 6242: seekpos(pos_type __sp, 6242: ios_base::openmode __mode = ios_base::in | ios_base::out); 6242: 6242: 6242: 6242: 6242: void 6242: _M_sync(char_type* __base, __size_type __i, __size_type __o); 6242: 6242: 6242: 6242: void 6242: _M_update_egptr() 6242: { 6242: const bool __testin = _M_mode & ios_base::in; 6242: if (this->pptr() && this->pptr() > this->egptr()) 6242: { 6242: if (__testin) 6242: this->setg(this->eback(), this->gptr(), this->pptr()); 6242: else 6242: this->setg(this->pptr(), this->pptr(), this->pptr()); 6242: } 6242: } 6242: 6242: 6242: 6242: void 6242: _M_pbump(char_type* __pbeg, char_type* __pend, off_type __off); 6242: 6242: private: 6242: 6242: 6242: 6242: 6242: struct __xfer_bufptrs 6242: { 6242: __xfer_bufptrs(const basic_stringbuf& __from, basic_stringbuf* __to) 6242: : _M_to{__to}, _M_goff{-1, -1, -1}, _M_poff{-1, -1, -1} 6242: { 6242: const _CharT* const __str = __from._M_string.data(); 6242: const _CharT* __end = nullptr; 6242: if (__from.eback()) 6242: { 6242: _M_goff[0] = __from.eback() - __str; 6242: _M_goff[1] = __from.gptr() - __str; 6242: _M_goff[2] = __from.egptr() - __str; 6242: __end = __from.egptr(); 6242: } 6242: if (__from.pbase()) 6242: { 6242: _M_poff[0] = __from.pbase() - __str; 6242: _M_poff[1] = __from.pptr() - __from.pbase(); 6242: _M_poff[2] = __from.epptr() - __str; 6242: if (__from.pptr() > __end) 6242: __end = __from.pptr(); 6242: } 6242: 6242: 6242: if (__end) 6242: { 6242: 6242: 6242: auto& __mut_from = const_cast(__from); 6242: __mut_from._M_string._M_length(__end - __str); 6242: } 6242: } 6242: 6242: ~__xfer_bufptrs() 6242: { 6242: char_type* __str = const_cast(_M_to->_M_string.data()); 6242: if (_M_goff[0] != -1) 6242: _M_to->setg(__str+_M_goff[0], __str+_M_goff[1], __str+_M_goff[2]); 6242: if (_M_poff[0] != -1) 6242: _M_to->_M_pbump(__str+_M_poff[0], __str+_M_poff[2], _M_poff[1]); 6242: } 6242: 6242: basic_stringbuf* _M_to; 6242: off_type _M_goff[3]; 6242: off_type _M_poff[3]; 6242: }; 6242: # 357 "/usr/include/c++/8/sstream" 3 6242: basic_stringbuf(basic_stringbuf&& __rhs, __xfer_bufptrs&&) 6242: : __streambuf_type(static_cast(__rhs)), 6242: _M_mode(__rhs._M_mode), _M_string(std::move(__rhs._M_string)) 6242: { } 6242: 6242: }; 6242: # 380 "/usr/include/c++/8/sstream" 3 6242: template 6242: class basic_istringstream : public basic_istream<_CharT, _Traits> 6242: { 6242: public: 6242: 6242: typedef _CharT char_type; 6242: typedef _Traits traits_type; 6242: 6242: 6242: typedef _Alloc allocator_type; 6242: typedef typename traits_type::int_type int_type; 6242: typedef typename traits_type::pos_type pos_type; 6242: typedef typename traits_type::off_type off_type; 6242: 6242: 6242: typedef basic_string<_CharT, _Traits, _Alloc> __string_type; 6242: typedef basic_stringbuf<_CharT, _Traits, _Alloc> __stringbuf_type; 6242: typedef basic_istream __istream_type; 6242: 6242: private: 6242: __stringbuf_type _M_stringbuf; 6242: 6242: public: 6242: # 416 "/usr/include/c++/8/sstream" 3 6242: explicit 6242: basic_istringstream(ios_base::openmode __mode = ios_base::in) 6242: : __istream_type(), _M_stringbuf(__mode | ios_base::in) 6242: { this->init(&_M_stringbuf); } 6242: # 434 "/usr/include/c++/8/sstream" 3 6242: explicit 6242: basic_istringstream(const __string_type& __str, 6242: ios_base::openmode __mode = ios_base::in) 6242: : __istream_type(), _M_stringbuf(__str, __mode | ios_base::in) 6242: { this->init(&_M_stringbuf); } 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: ~basic_istringstream() 6242: { } 6242: 6242: 6242: basic_istringstream(const basic_istringstream&) = delete; 6242: 6242: basic_istringstream(basic_istringstream&& __rhs) 6242: : __istream_type(std::move(__rhs)), 6242: _M_stringbuf(std::move(__rhs._M_stringbuf)) 6242: { __istream_type::set_rdbuf(&_M_stringbuf); } 6242: 6242: 6242: 6242: basic_istringstream& 6242: operator=(const basic_istringstream&) = delete; 6242: 6242: basic_istringstream& 6242: operator=(basic_istringstream&& __rhs) 6242: { 6242: __istream_type::operator=(std::move(__rhs)); 6242: _M_stringbuf = std::move(__rhs._M_stringbuf); 6242: return *this; 6242: } 6242: 6242: void 6242: swap(basic_istringstream& __rhs) 6242: { 6242: __istream_type::swap(__rhs); 6242: _M_stringbuf.swap(__rhs._M_stringbuf); 6242: } 6242: # 485 "/usr/include/c++/8/sstream" 3 6242: __stringbuf_type* 6242: rdbuf() const 6242: { return const_cast<__stringbuf_type*>(&_M_stringbuf); } 6242: 6242: 6242: 6242: 6242: 6242: __string_type 6242: str() const 6242: { return _M_stringbuf.str(); } 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: void 6242: str(const __string_type& __s) 6242: { _M_stringbuf.str(__s); } 6242: }; 6242: # 524 "/usr/include/c++/8/sstream" 3 6242: template 6242: class basic_ostringstream : public basic_ostream<_CharT, _Traits> 6242: { 6242: public: 6242: 6242: typedef _CharT char_type; 6242: typedef _Traits traits_type; 6242: 6242: 6242: typedef _Alloc allocator_type; 6242: typedef typename traits_type::int_type int_type; 6242: typedef typename traits_type::pos_type pos_type; 6242: typedef typename traits_type::off_type off_type; 6242: 6242: 6242: typedef basic_string<_CharT, _Traits, _Alloc> __string_type; 6242: typedef basic_stringbuf<_CharT, _Traits, _Alloc> __stringbuf_type; 6242: typedef basic_ostream __ostream_type; 6242: 6242: private: 6242: __stringbuf_type _M_stringbuf; 6242: 6242: public: 6242: # 560 "/usr/include/c++/8/sstream" 3 6242: explicit 6242: basic_ostringstream(ios_base::openmode __mode = ios_base::out) 6242: : __ostream_type(), _M_stringbuf(__mode | ios_base::out) 6242: { this->init(&_M_stringbuf); } 6242: # 578 "/usr/include/c++/8/sstream" 3 6242: explicit 6242: basic_ostringstream(const __string_type& __str, 6242: ios_base::openmode __mode = ios_base::out) 6242: : __ostream_type(), _M_stringbuf(__str, __mode | ios_base::out) 6242: { this->init(&_M_stringbuf); } 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: ~basic_ostringstream() 6242: { } 6242: 6242: 6242: basic_ostringstream(const basic_ostringstream&) = delete; 6242: 6242: basic_ostringstream(basic_ostringstream&& __rhs) 6242: : __ostream_type(std::move(__rhs)), 6242: _M_stringbuf(std::move(__rhs._M_stringbuf)) 6242: { __ostream_type::set_rdbuf(&_M_stringbuf); } 6242: 6242: 6242: 6242: basic_ostringstream& 6242: operator=(const basic_ostringstream&) = delete; 6242: 6242: basic_ostringstream& 6242: operator=(basic_ostringstream&& __rhs) 6242: { 6242: __ostream_type::operator=(std::move(__rhs)); 6242: _M_stringbuf = std::move(__rhs._M_stringbuf); 6242: return *this; 6242: } 6242: 6242: void 6242: swap(basic_ostringstream& __rhs) 6242: { 6242: __ostream_type::swap(__rhs); 6242: _M_stringbuf.swap(__rhs._M_stringbuf); 6242: } 6242: # 629 "/usr/include/c++/8/sstream" 3 6242: __stringbuf_type* 6242: rdbuf() const 6242: { return const_cast<__stringbuf_type*>(&_M_stringbuf); } 6242: 6242: 6242: 6242: 6242: 6242: __string_type 6242: str() const 6242: { return _M_stringbuf.str(); } 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: void 6242: str(const __string_type& __s) 6242: { _M_stringbuf.str(__s); } 6242: }; 6242: # 668 "/usr/include/c++/8/sstream" 3 6242: template 6242: class basic_stringstream : public basic_iostream<_CharT, _Traits> 6242: { 6242: public: 6242: 6242: typedef _CharT char_type; 6242: typedef _Traits traits_type; 6242: 6242: 6242: typedef _Alloc allocator_type; 6242: typedef typename traits_type::int_type int_type; 6242: typedef typename traits_type::pos_type pos_type; 6242: typedef typename traits_type::off_type off_type; 6242: 6242: 6242: typedef basic_string<_CharT, _Traits, _Alloc> __string_type; 6242: typedef basic_stringbuf<_CharT, _Traits, _Alloc> __stringbuf_type; 6242: typedef basic_iostream __iostream_type; 6242: 6242: private: 6242: __stringbuf_type _M_stringbuf; 6242: 6242: public: 6242: # 703 "/usr/include/c++/8/sstream" 3 6242: explicit 6242: basic_stringstream(ios_base::openmode __m = ios_base::out | ios_base::in) 6242: : __iostream_type(), _M_stringbuf(__m) 6242: { this->init(&_M_stringbuf); } 6242: # 719 "/usr/include/c++/8/sstream" 3 6242: explicit 6242: basic_stringstream(const __string_type& __str, 6242: ios_base::openmode __m = ios_base::out | ios_base::in) 6242: : __iostream_type(), _M_stringbuf(__str, __m) 6242: { this->init(&_M_stringbuf); } 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: ~basic_stringstream() 6242: { } 6242: 6242: 6242: basic_stringstream(const basic_stringstream&) = delete; 6242: 6242: basic_stringstream(basic_stringstream&& __rhs) 6242: : __iostream_type(std::move(__rhs)), 6242: _M_stringbuf(std::move(__rhs._M_stringbuf)) 6242: { __iostream_type::set_rdbuf(&_M_stringbuf); } 6242: 6242: 6242: 6242: basic_stringstream& 6242: operator=(const basic_stringstream&) = delete; 6242: 6242: basic_stringstream& 6242: operator=(basic_stringstream&& __rhs) 6242: { 6242: __iostream_type::operator=(std::move(__rhs)); 6242: _M_stringbuf = std::move(__rhs._M_stringbuf); 6242: return *this; 6242: } 6242: 6242: void 6242: swap(basic_stringstream& __rhs) 6242: { 6242: __iostream_type::swap(__rhs); 6242: _M_stringbuf.swap(__rhs._M_stringbuf); 6242: } 6242: # 770 "/usr/include/c++/8/sstream" 3 6242: __stringbuf_type* 6242: rdbuf() const 6242: { return const_cast<__stringbuf_type*>(&_M_stringbuf); } 6242: 6242: 6242: 6242: 6242: 6242: __string_type 6242: str() const 6242: { return _M_stringbuf.str(); } 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: void 6242: str(const __string_type& __s) 6242: { _M_stringbuf.str(__s); } 6242: }; 6242: 6242: 6242: 6242: template 6242: inline void 6242: swap(basic_stringbuf<_CharT, _Traits, _Allocator>& __x, 6242: basic_stringbuf<_CharT, _Traits, _Allocator>& __y) 6242: { __x.swap(__y); } 6242: 6242: 6242: template 6242: inline void 6242: swap(basic_istringstream<_CharT, _Traits, _Allocator>& __x, 6242: basic_istringstream<_CharT, _Traits, _Allocator>& __y) 6242: { __x.swap(__y); } 6242: 6242: 6242: template 6242: inline void 6242: swap(basic_ostringstream<_CharT, _Traits, _Allocator>& __x, 6242: basic_ostringstream<_CharT, _Traits, _Allocator>& __y) 6242: { __x.swap(__y); } 6242: 6242: 6242: template 6242: inline void 6242: swap(basic_stringstream<_CharT, _Traits, _Allocator>& __x, 6242: basic_stringstream<_CharT, _Traits, _Allocator>& __y) 6242: { __x.swap(__y); } 6242: 6242: 6242: } 6242: 6242: } 6242: 6242: # 1 "/usr/include/c++/8/bits/sstream.tcc" 1 3 6242: # 37 "/usr/include/c++/8/bits/sstream.tcc" 3 6242: 6242: # 38 "/usr/include/c++/8/bits/sstream.tcc" 3 6242: 6242: namespace std __attribute__ ((__visibility__ ("default"))) 6242: { 6242: 6242: 6242: template 6242: typename basic_stringbuf<_CharT, _Traits, _Alloc>::int_type 6242: basic_stringbuf<_CharT, _Traits, _Alloc>:: 6242: pbackfail(int_type __c) 6242: { 6242: int_type __ret = traits_type::eof(); 6242: if (this->eback() < this->gptr()) 6242: { 6242: 6242: 6242: const bool __testeof = traits_type::eq_int_type(__c, __ret); 6242: if (!__testeof) 6242: { 6242: const bool __testeq = traits_type::eq(traits_type:: 6242: to_char_type(__c), 6242: this->gptr()[-1]); 6242: const bool __testout = this->_M_mode & ios_base::out; 6242: if (__testeq || __testout) 6242: { 6242: this->gbump(-1); 6242: if (!__testeq) 6242: *this->gptr() = traits_type::to_char_type(__c); 6242: __ret = __c; 6242: } 6242: } 6242: else 6242: { 6242: this->gbump(-1); 6242: __ret = traits_type::not_eof(__c); 6242: } 6242: } 6242: return __ret; 6242: } 6242: 6242: template 6242: typename basic_stringbuf<_CharT, _Traits, _Alloc>::int_type 6242: basic_stringbuf<_CharT, _Traits, _Alloc>:: 6242: overflow(int_type __c) 6242: { 6242: const bool __testout = this->_M_mode & ios_base::out; 6242: if (__builtin_expect(!__testout, false)) 6242: return traits_type::eof(); 6242: 6242: const bool __testeof = traits_type::eq_int_type(__c, traits_type::eof()); 6242: if (__builtin_expect(__testeof, false)) 6242: return traits_type::not_eof(__c); 6242: 6242: const __size_type __capacity = _M_string.capacity(); 6242: 6242: 6242: if ((this->epptr() - this->pbase()) < __capacity) 6242: { 6242: 6242: char_type* __base = const_cast(_M_string.data()); 6242: _M_pbump(__base, __base + __capacity, this->pptr() - this->pbase()); 6242: if (_M_mode & ios_base::in) 6242: { 6242: const __size_type __nget = this->gptr() - this->eback(); 6242: const __size_type __eget = this->egptr() - this->eback(); 6242: this->setg(__base, __base + __nget, __base + __eget + 1); 6242: } 6242: *this->pptr() = traits_type::to_char_type(__c); 6242: this->pbump(1); 6242: return __c; 6242: } 6242: 6242: 6242: const __size_type __max_size = _M_string.max_size(); 6242: const bool __testput = this->pptr() < this->epptr(); 6242: if (__builtin_expect(!__testput && __capacity == __max_size, false)) 6242: return traits_type::eof(); 6242: 6242: 6242: 6242: const char_type __conv = traits_type::to_char_type(__c); 6242: if (!__testput) 6242: { 6242: # 129 "/usr/include/c++/8/bits/sstream.tcc" 3 6242: const __size_type __opt_len = std::max(__size_type(2 * __capacity), 6242: __size_type(512)); 6242: const __size_type __len = std::min(__opt_len, __max_size); 6242: __string_type __tmp(_M_string.get_allocator()); 6242: __tmp.reserve(__len); 6242: if (this->pbase()) 6242: __tmp.assign(this->pbase(), this->epptr() - this->pbase()); 6242: __tmp.push_back(__conv); 6242: _M_string.swap(__tmp); 6242: _M_sync(const_cast(_M_string.data()), 6242: this->gptr() - this->eback(), this->pptr() - this->pbase()); 6242: } 6242: else 6242: *this->pptr() = __conv; 6242: this->pbump(1); 6242: return __c; 6242: } 6242: 6242: template 6242: typename basic_stringbuf<_CharT, _Traits, _Alloc>::int_type 6242: basic_stringbuf<_CharT, _Traits, _Alloc>:: 6242: underflow() 6242: { 6242: int_type __ret = traits_type::eof(); 6242: const bool __testin = this->_M_mode & ios_base::in; 6242: if (__testin) 6242: { 6242: 6242: _M_update_egptr(); 6242: 6242: if (this->gptr() < this->egptr()) 6242: __ret = traits_type::to_int_type(*this->gptr()); 6242: } 6242: return __ret; 6242: } 6242: 6242: template 6242: typename basic_stringbuf<_CharT, _Traits, _Alloc>::pos_type 6242: basic_stringbuf<_CharT, _Traits, _Alloc>:: 6242: seekoff(off_type __off, ios_base::seekdir __way, ios_base::openmode __mode) 6242: { 6242: pos_type __ret = pos_type(off_type(-1)); 6242: bool __testin = (ios_base::in & this->_M_mode & __mode) != 0; 6242: bool __testout = (ios_base::out & this->_M_mode & __mode) != 0; 6242: const bool __testboth = __testin && __testout && __way != ios_base::cur; 6242: __testin &= !(__mode & ios_base::out); 6242: __testout &= !(__mode & ios_base::in); 6242: 6242: 6242: 6242: const char_type* __beg = __testin ? this->eback() : this->pbase(); 6242: if ((__beg || !__off) && (__testin || __testout || __testboth)) 6242: { 6242: _M_update_egptr(); 6242: 6242: off_type __newoffi = __off; 6242: off_type __newoffo = __newoffi; 6242: if (__way == ios_base::cur) 6242: { 6242: __newoffi += this->gptr() - __beg; 6242: __newoffo += this->pptr() - __beg; 6242: } 6242: else if (__way == ios_base::end) 6242: __newoffo = __newoffi += this->egptr() - __beg; 6242: 6242: if ((__testin || __testboth) 6242: && __newoffi >= 0 6242: && this->egptr() - __beg >= __newoffi) 6242: { 6242: this->setg(this->eback(), this->eback() + __newoffi, 6242: this->egptr()); 6242: __ret = pos_type(__newoffi); 6242: } 6242: if ((__testout || __testboth) 6242: && __newoffo >= 0 6242: && this->egptr() - __beg >= __newoffo) 6242: { 6242: _M_pbump(this->pbase(), this->epptr(), __newoffo); 6242: __ret = pos_type(__newoffo); 6242: } 6242: } 6242: return __ret; 6242: } 6242: 6242: template 6242: typename basic_stringbuf<_CharT, _Traits, _Alloc>::pos_type 6242: basic_stringbuf<_CharT, _Traits, _Alloc>:: 6242: seekpos(pos_type __sp, ios_base::openmode __mode) 6242: { 6242: pos_type __ret = pos_type(off_type(-1)); 6242: const bool __testin = (ios_base::in & this->_M_mode & __mode) != 0; 6242: const bool __testout = (ios_base::out & this->_M_mode & __mode) != 0; 6242: 6242: const char_type* __beg = __testin ? this->eback() : this->pbase(); 6242: if ((__beg || !off_type(__sp)) && (__testin || __testout)) 6242: { 6242: _M_update_egptr(); 6242: 6242: const off_type __pos(__sp); 6242: const bool __testpos = (0 <= __pos 6242: && __pos <= this->egptr() - __beg); 6242: if (__testpos) 6242: { 6242: if (__testin) 6242: this->setg(this->eback(), this->eback() + __pos, 6242: this->egptr()); 6242: if (__testout) 6242: _M_pbump(this->pbase(), this->epptr(), __pos); 6242: __ret = __sp; 6242: } 6242: } 6242: return __ret; 6242: } 6242: 6242: template 6242: void 6242: basic_stringbuf<_CharT, _Traits, _Alloc>:: 6242: _M_sync(char_type* __base, __size_type __i, __size_type __o) 6242: { 6242: const bool __testin = _M_mode & ios_base::in; 6242: const bool __testout = _M_mode & ios_base::out; 6242: char_type* __endg = __base + _M_string.size(); 6242: char_type* __endp = __base + _M_string.capacity(); 6242: 6242: if (__base != _M_string.data()) 6242: { 6242: 6242: __endg += __i; 6242: __i = 0; 6242: __endp = __endg; 6242: } 6242: 6242: if (__testin) 6242: this->setg(__base, __base + __i, __endg); 6242: if (__testout) 6242: { 6242: _M_pbump(__base, __endp, __o); 6242: 6242: 6242: 6242: if (!__testin) 6242: this->setg(__endg, __endg, __endg); 6242: } 6242: } 6242: 6242: template 6242: void 6242: basic_stringbuf<_CharT, _Traits, _Alloc>:: 6242: _M_pbump(char_type* __pbeg, char_type* __pend, off_type __off) 6242: { 6242: this->setp(__pbeg, __pend); 6242: while (__off > __gnu_cxx::__numeric_traits::__max) 6242: { 6242: this->pbump(__gnu_cxx::__numeric_traits::__max); 6242: __off -= __gnu_cxx::__numeric_traits::__max; 6242: } 6242: this->pbump(__off); 6242: } 6242: 6242: 6242: 6242: 6242: extern template class basic_stringbuf; 6242: extern template class basic_istringstream; 6242: extern template class basic_ostringstream; 6242: extern template class basic_stringstream; 6242: 6242: 6242: extern template class basic_stringbuf; 6242: extern template class basic_istringstream; 6242: extern template class basic_ostringstream; 6242: extern template class basic_stringstream; 6242: 6242: 6242: 6242: 6242: } 6242: # 828 "/usr/include/c++/8/sstream" 2 3 6242: # 46 "/usr/include/c++/8/complex" 2 3 6242: 6242: 6242: 6242: 6242: namespace std __attribute__ ((__visibility__ ("default"))) 6242: { 6242: 6242: # 63 "/usr/include/c++/8/complex" 3 6242: template class complex; 6242: template<> class complex; 6242: template<> class complex; 6242: template<> class complex; 6242: 6242: 6242: template _Tp abs(const complex<_Tp>&); 6242: 6242: template _Tp arg(const complex<_Tp>&); 6242: 6242: template _Tp norm(const complex<_Tp>&); 6242: 6242: 6242: template complex<_Tp> conj(const complex<_Tp>&); 6242: 6242: template complex<_Tp> polar(const _Tp&, const _Tp& = 0); 6242: 6242: 6242: 6242: template complex<_Tp> cos(const complex<_Tp>&); 6242: 6242: template complex<_Tp> cosh(const complex<_Tp>&); 6242: 6242: template complex<_Tp> exp(const complex<_Tp>&); 6242: 6242: template complex<_Tp> log(const complex<_Tp>&); 6242: 6242: template complex<_Tp> log10(const complex<_Tp>&); 6242: 6242: template complex<_Tp> pow(const complex<_Tp>&, int); 6242: 6242: template complex<_Tp> pow(const complex<_Tp>&, const _Tp&); 6242: 6242: template complex<_Tp> pow(const complex<_Tp>&, 6242: const complex<_Tp>&); 6242: 6242: template complex<_Tp> pow(const _Tp&, const complex<_Tp>&); 6242: 6242: template complex<_Tp> sin(const complex<_Tp>&); 6242: 6242: template complex<_Tp> sinh(const complex<_Tp>&); 6242: 6242: template complex<_Tp> sqrt(const complex<_Tp>&); 6242: 6242: template complex<_Tp> tan(const complex<_Tp>&); 6242: 6242: template complex<_Tp> tanh(const complex<_Tp>&); 6242: # 121 "/usr/include/c++/8/complex" 3 6242: template 6242: struct complex 6242: { 6242: 6242: typedef _Tp value_type; 6242: 6242: 6242: 6242: constexpr complex(const _Tp& __r = _Tp(), const _Tp& __i = _Tp()) 6242: : _M_real(__r), _M_imag(__i) { } 6242: 6242: 6242: 6242: constexpr complex(const complex&) = default; 6242: 6242: 6242: 6242: template 6242: constexpr complex(const complex<_Up>& __z) 6242: : _M_real(__z.real()), _M_imag(__z.imag()) { } 6242: 6242: 6242: 6242: 6242: __attribute ((__abi_tag__ ("cxx11"))) 6242: constexpr _Tp 6242: real() const { return _M_real; } 6242: 6242: __attribute ((__abi_tag__ ("cxx11"))) 6242: constexpr _Tp 6242: imag() const { return _M_imag; } 6242: # 172 "/usr/include/c++/8/complex" 3 6242: void 6242: real(_Tp __val) { _M_real = __val; } 6242: 6242: void 6242: imag(_Tp __val) { _M_imag = __val; } 6242: 6242: 6242: complex<_Tp>& operator=(const _Tp&); 6242: 6242: 6242: 6242: complex<_Tp>& 6242: operator+=(const _Tp& __t) 6242: { 6242: _M_real += __t; 6242: return *this; 6242: } 6242: 6242: 6242: 6242: complex<_Tp>& 6242: operator-=(const _Tp& __t) 6242: { 6242: _M_real -= __t; 6242: return *this; 6242: } 6242: 6242: 6242: complex<_Tp>& operator*=(const _Tp&); 6242: 6242: complex<_Tp>& operator/=(const _Tp&); 6242: 6242: 6242: 6242: complex& operator=(const complex&) = default; 6242: 6242: 6242: 6242: template 6242: complex<_Tp>& operator=(const complex<_Up>&); 6242: 6242: template 6242: complex<_Tp>& operator+=(const complex<_Up>&); 6242: 6242: template 6242: complex<_Tp>& operator-=(const complex<_Up>&); 6242: 6242: template 6242: complex<_Tp>& operator*=(const complex<_Up>&); 6242: 6242: template 6242: complex<_Tp>& operator/=(const complex<_Up>&); 6242: 6242: constexpr complex __rep() const 6242: { return *this; } 6242: 6242: private: 6242: _Tp _M_real; 6242: _Tp _M_imag; 6242: }; 6242: 6242: template 6242: complex<_Tp>& 6242: complex<_Tp>::operator=(const _Tp& __t) 6242: { 6242: _M_real = __t; 6242: _M_imag = _Tp(); 6242: return *this; 6242: } 6242: 6242: 6242: template 6242: complex<_Tp>& 6242: complex<_Tp>::operator*=(const _Tp& __t) 6242: { 6242: _M_real *= __t; 6242: _M_imag *= __t; 6242: return *this; 6242: } 6242: 6242: 6242: template 6242: complex<_Tp>& 6242: complex<_Tp>::operator/=(const _Tp& __t) 6242: { 6242: _M_real /= __t; 6242: _M_imag /= __t; 6242: return *this; 6242: } 6242: 6242: template 6242: template 6242: complex<_Tp>& 6242: complex<_Tp>::operator=(const complex<_Up>& __z) 6242: { 6242: _M_real = __z.real(); 6242: _M_imag = __z.imag(); 6242: return *this; 6242: } 6242: 6242: 6242: template 6242: template 6242: complex<_Tp>& 6242: complex<_Tp>::operator+=(const complex<_Up>& __z) 6242: { 6242: _M_real += __z.real(); 6242: _M_imag += __z.imag(); 6242: return *this; 6242: } 6242: 6242: 6242: template 6242: template 6242: complex<_Tp>& 6242: complex<_Tp>::operator-=(const complex<_Up>& __z) 6242: { 6242: _M_real -= __z.real(); 6242: _M_imag -= __z.imag(); 6242: return *this; 6242: } 6242: 6242: 6242: 6242: template 6242: template 6242: complex<_Tp>& 6242: complex<_Tp>::operator*=(const complex<_Up>& __z) 6242: { 6242: const _Tp __r = _M_real * __z.real() - _M_imag * __z.imag(); 6242: _M_imag = _M_real * __z.imag() + _M_imag * __z.real(); 6242: _M_real = __r; 6242: return *this; 6242: } 6242: 6242: 6242: 6242: template 6242: template 6242: complex<_Tp>& 6242: complex<_Tp>::operator/=(const complex<_Up>& __z) 6242: { 6242: const _Tp __r = _M_real * __z.real() + _M_imag * __z.imag(); 6242: const _Tp __n = std::norm(__z); 6242: _M_imag = (_M_imag * __z.real() - _M_real * __z.imag()) / __n; 6242: _M_real = __r / __n; 6242: return *this; 6242: } 6242: 6242: 6242: 6242: 6242: template 6242: inline complex<_Tp> 6242: operator+(const complex<_Tp>& __x, const complex<_Tp>& __y) 6242: { 6242: complex<_Tp> __r = __x; 6242: __r += __y; 6242: return __r; 6242: } 6242: 6242: template 6242: inline complex<_Tp> 6242: operator+(const complex<_Tp>& __x, const _Tp& __y) 6242: { 6242: complex<_Tp> __r = __x; 6242: __r += __y; 6242: return __r; 6242: } 6242: 6242: template 6242: inline complex<_Tp> 6242: operator+(const _Tp& __x, const complex<_Tp>& __y) 6242: { 6242: complex<_Tp> __r = __y; 6242: __r += __x; 6242: return __r; 6242: } 6242: 6242: 6242: 6242: 6242: template 6242: inline complex<_Tp> 6242: operator-(const complex<_Tp>& __x, const complex<_Tp>& __y) 6242: { 6242: complex<_Tp> __r = __x; 6242: __r -= __y; 6242: return __r; 6242: } 6242: 6242: template 6242: inline complex<_Tp> 6242: operator-(const complex<_Tp>& __x, const _Tp& __y) 6242: { 6242: complex<_Tp> __r = __x; 6242: __r -= __y; 6242: return __r; 6242: } 6242: 6242: template 6242: inline complex<_Tp> 6242: operator-(const _Tp& __x, const complex<_Tp>& __y) 6242: { 6242: complex<_Tp> __r(__x, -__y.imag()); 6242: __r -= __y.real(); 6242: return __r; 6242: } 6242: 6242: 6242: 6242: 6242: template 6242: inline complex<_Tp> 6242: operator*(const complex<_Tp>& __x, const complex<_Tp>& __y) 6242: { 6242: complex<_Tp> __r = __x; 6242: __r *= __y; 6242: return __r; 6242: } 6242: 6242: template 6242: inline complex<_Tp> 6242: operator*(const complex<_Tp>& __x, const _Tp& __y) 6242: { 6242: complex<_Tp> __r = __x; 6242: __r *= __y; 6242: return __r; 6242: } 6242: 6242: template 6242: inline complex<_Tp> 6242: operator*(const _Tp& __x, const complex<_Tp>& __y) 6242: { 6242: complex<_Tp> __r = __y; 6242: __r *= __x; 6242: return __r; 6242: } 6242: 6242: 6242: 6242: 6242: template 6242: inline complex<_Tp> 6242: operator/(const complex<_Tp>& __x, const complex<_Tp>& __y) 6242: { 6242: complex<_Tp> __r = __x; 6242: __r /= __y; 6242: return __r; 6242: } 6242: 6242: template 6242: inline complex<_Tp> 6242: operator/(const complex<_Tp>& __x, const _Tp& __y) 6242: { 6242: complex<_Tp> __r = __x; 6242: __r /= __y; 6242: return __r; 6242: } 6242: 6242: template 6242: inline complex<_Tp> 6242: operator/(const _Tp& __x, const complex<_Tp>& __y) 6242: { 6242: complex<_Tp> __r = __x; 6242: __r /= __y; 6242: return __r; 6242: } 6242: 6242: 6242: 6242: template 6242: inline complex<_Tp> 6242: operator+(const complex<_Tp>& __x) 6242: { return __x; } 6242: 6242: 6242: template 6242: inline complex<_Tp> 6242: operator-(const complex<_Tp>& __x) 6242: { return complex<_Tp>(-__x.real(), -__x.imag()); } 6242: 6242: 6242: 6242: template 6242: inline constexpr bool 6242: operator==(const complex<_Tp>& __x, const complex<_Tp>& __y) 6242: { return __x.real() == __y.real() && __x.imag() == __y.imag(); } 6242: 6242: template 6242: inline constexpr bool 6242: operator==(const complex<_Tp>& __x, const _Tp& __y) 6242: { return __x.real() == __y && __x.imag() == _Tp(); } 6242: 6242: template 6242: inline constexpr bool 6242: operator==(const _Tp& __x, const complex<_Tp>& __y) 6242: { return __x == __y.real() && _Tp() == __y.imag(); } 6242: 6242: 6242: 6242: 6242: template 6242: inline constexpr bool 6242: operator!=(const complex<_Tp>& __x, const complex<_Tp>& __y) 6242: { return __x.real() != __y.real() || __x.imag() != __y.imag(); } 6242: 6242: template 6242: inline constexpr bool 6242: operator!=(const complex<_Tp>& __x, const _Tp& __y) 6242: { return __x.real() != __y || __x.imag() != _Tp(); } 6242: 6242: template 6242: inline constexpr bool 6242: operator!=(const _Tp& __x, const complex<_Tp>& __y) 6242: { return __x != __y.real() || _Tp() != __y.imag(); } 6242: 6242: 6242: 6242: template 6242: basic_istream<_CharT, _Traits>& 6242: operator>>(basic_istream<_CharT, _Traits>& __is, complex<_Tp>& __x) 6242: { 6242: bool __fail = true; 6242: _CharT __ch; 6242: if (__is >> __ch) 6242: { 6242: if (_Traits::eq(__ch, __is.widen('('))) 6242: { 6242: _Tp __u; 6242: if (__is >> __u >> __ch) 6242: { 6242: const _CharT __rparen = __is.widen(')'); 6242: if (_Traits::eq(__ch, __rparen)) 6242: { 6242: __x = __u; 6242: __fail = false; 6242: } 6242: else if (_Traits::eq(__ch, __is.widen(','))) 6242: { 6242: _Tp __v; 6242: if (__is >> __v >> __ch) 6242: { 6242: if (_Traits::eq(__ch, __rparen)) 6242: { 6242: __x = complex<_Tp>(__u, __v); 6242: __fail = false; 6242: } 6242: else 6242: __is.putback(__ch); 6242: } 6242: } 6242: else 6242: __is.putback(__ch); 6242: } 6242: } 6242: else 6242: { 6242: __is.putback(__ch); 6242: _Tp __u; 6242: if (__is >> __u) 6242: { 6242: __x = __u; 6242: __fail = false; 6242: } 6242: } 6242: } 6242: if (__fail) 6242: __is.setstate(ios_base::failbit); 6242: return __is; 6242: } 6242: 6242: 6242: template 6242: basic_ostream<_CharT, _Traits>& 6242: operator<<(basic_ostream<_CharT, _Traits>& __os, const complex<_Tp>& __x) 6242: { 6242: basic_ostringstream<_CharT, _Traits> __s; 6242: __s.flags(__os.flags()); 6242: __s.imbue(__os.getloc()); 6242: __s.precision(__os.precision()); 6242: __s << '(' << __x.real() << ',' << __x.imag() << ')'; 6242: return __os << __s.str(); 6242: } 6242: 6242: 6242: 6242: template 6242: constexpr _Tp 6242: real(const complex<_Tp>& __z) 6242: { return __z.real(); } 6242: 6242: template 6242: constexpr _Tp 6242: imag(const complex<_Tp>& __z) 6242: { return __z.imag(); } 6242: # 591 "/usr/include/c++/8/complex" 3 6242: template 6242: inline _Tp 6242: __complex_abs(const complex<_Tp>& __z) 6242: { 6242: _Tp __x = __z.real(); 6242: _Tp __y = __z.imag(); 6242: const _Tp __s = std::max(abs(__x), abs(__y)); 6242: if (__s == _Tp()) 6242: return __s; 6242: __x /= __s; 6242: __y /= __s; 6242: return __s * sqrt(__x * __x + __y * __y); 6242: } 6242: 6242: 6242: inline float 6242: __complex_abs(__complex__ float __z) { return __builtin_cabsf(__z); } 6242: 6242: inline double 6242: __complex_abs(__complex__ double __z) { return __builtin_cabs(__z); } 6242: 6242: inline long double 6242: __complex_abs(const __complex__ long double& __z) 6242: { return __builtin_cabsl(__z); } 6242: 6242: template 6242: inline _Tp 6242: abs(const complex<_Tp>& __z) { return __complex_abs(__z.__rep()); } 6242: # 627 "/usr/include/c++/8/complex" 3 6242: template 6242: inline _Tp 6242: __complex_arg(const complex<_Tp>& __z) 6242: { return atan2(__z.imag(), __z.real()); } 6242: 6242: 6242: inline float 6242: __complex_arg(__complex__ float __z) { return __builtin_cargf(__z); } 6242: 6242: inline double 6242: __complex_arg(__complex__ double __z) { return __builtin_carg(__z); } 6242: 6242: inline long double 6242: __complex_arg(const __complex__ long double& __z) 6242: { return __builtin_cargl(__z); } 6242: 6242: template 6242: inline _Tp 6242: arg(const complex<_Tp>& __z) { return __complex_arg(__z.__rep()); } 6242: # 657 "/usr/include/c++/8/complex" 3 6242: template 6242: struct _Norm_helper 6242: { 6242: template 6242: static inline _Tp _S_do_it(const complex<_Tp>& __z) 6242: { 6242: const _Tp __x = __z.real(); 6242: const _Tp __y = __z.imag(); 6242: return __x * __x + __y * __y; 6242: } 6242: }; 6242: 6242: template<> 6242: struct _Norm_helper 6242: { 6242: template 6242: static inline _Tp _S_do_it(const complex<_Tp>& __z) 6242: { 6242: _Tp __res = std::abs(__z); 6242: return __res * __res; 6242: } 6242: }; 6242: 6242: template 6242: inline _Tp 6242: norm(const complex<_Tp>& __z) 6242: { 6242: return _Norm_helper<__is_floating<_Tp>::__value 6242: && !0>::_S_do_it(__z); 6242: } 6242: 6242: template 6242: inline complex<_Tp> 6242: polar(const _Tp& __rho, const _Tp& __theta) 6242: { 6242: ; 6242: return complex<_Tp>(__rho * cos(__theta), __rho * sin(__theta)); 6242: } 6242: 6242: template 6242: inline complex<_Tp> 6242: conj(const complex<_Tp>& __z) 6242: { return complex<_Tp>(__z.real(), -__z.imag()); } 6242: 6242: 6242: 6242: 6242: template 6242: inline complex<_Tp> 6242: __complex_cos(const complex<_Tp>& __z) 6242: { 6242: const _Tp __x = __z.real(); 6242: const _Tp __y = __z.imag(); 6242: return complex<_Tp>(cos(__x) * cosh(__y), -sin(__x) * sinh(__y)); 6242: } 6242: 6242: 6242: inline __complex__ float 6242: __complex_cos(__complex__ float __z) { return __builtin_ccosf(__z); } 6242: 6242: inline __complex__ double 6242: __complex_cos(__complex__ double __z) { return __builtin_ccos(__z); } 6242: 6242: inline __complex__ long double 6242: __complex_cos(const __complex__ long double& __z) 6242: { return __builtin_ccosl(__z); } 6242: 6242: template 6242: inline complex<_Tp> 6242: cos(const complex<_Tp>& __z) { return __complex_cos(__z.__rep()); } 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: template 6242: inline complex<_Tp> 6242: __complex_cosh(const complex<_Tp>& __z) 6242: { 6242: const _Tp __x = __z.real(); 6242: const _Tp __y = __z.imag(); 6242: return complex<_Tp>(cosh(__x) * cos(__y), sinh(__x) * sin(__y)); 6242: } 6242: 6242: 6242: inline __complex__ float 6242: __complex_cosh(__complex__ float __z) { return __builtin_ccoshf(__z); } 6242: 6242: inline __complex__ double 6242: __complex_cosh(__complex__ double __z) { return __builtin_ccosh(__z); } 6242: 6242: inline __complex__ long double 6242: __complex_cosh(const __complex__ long double& __z) 6242: { return __builtin_ccoshl(__z); } 6242: 6242: template 6242: inline complex<_Tp> 6242: cosh(const complex<_Tp>& __z) { return __complex_cosh(__z.__rep()); } 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: template 6242: inline complex<_Tp> 6242: __complex_exp(const complex<_Tp>& __z) 6242: { return std::polar<_Tp>(exp(__z.real()), __z.imag()); } 6242: 6242: 6242: inline __complex__ float 6242: __complex_exp(__complex__ float __z) { return __builtin_cexpf(__z); } 6242: 6242: inline __complex__ double 6242: __complex_exp(__complex__ double __z) { return __builtin_cexp(__z); } 6242: 6242: inline __complex__ long double 6242: __complex_exp(const __complex__ long double& __z) 6242: { return __builtin_cexpl(__z); } 6242: 6242: template 6242: inline complex<_Tp> 6242: exp(const complex<_Tp>& __z) { return __complex_exp(__z.__rep()); } 6242: # 791 "/usr/include/c++/8/complex" 3 6242: template 6242: inline complex<_Tp> 6242: __complex_log(const complex<_Tp>& __z) 6242: { return complex<_Tp>(log(std::abs(__z)), std::arg(__z)); } 6242: 6242: 6242: inline __complex__ float 6242: __complex_log(__complex__ float __z) { return __builtin_clogf(__z); } 6242: 6242: inline __complex__ double 6242: __complex_log(__complex__ double __z) { return __builtin_clog(__z); } 6242: 6242: inline __complex__ long double 6242: __complex_log(const __complex__ long double& __z) 6242: { return __builtin_clogl(__z); } 6242: 6242: template 6242: inline complex<_Tp> 6242: log(const complex<_Tp>& __z) { return __complex_log(__z.__rep()); } 6242: 6242: 6242: 6242: 6242: 6242: 6242: template 6242: inline complex<_Tp> 6242: log10(const complex<_Tp>& __z) 6242: { return std::log(__z) / log(_Tp(10.0)); } 6242: 6242: 6242: template 6242: inline complex<_Tp> 6242: __complex_sin(const complex<_Tp>& __z) 6242: { 6242: const _Tp __x = __z.real(); 6242: const _Tp __y = __z.imag(); 6242: return complex<_Tp>(sin(__x) * cosh(__y), cos(__x) * sinh(__y)); 6242: } 6242: 6242: 6242: inline __complex__ float 6242: __complex_sin(__complex__ float __z) { return __builtin_csinf(__z); } 6242: 6242: inline __complex__ double 6242: __complex_sin(__complex__ double __z) { return __builtin_csin(__z); } 6242: 6242: inline __complex__ long double 6242: __complex_sin(const __complex__ long double& __z) 6242: { return __builtin_csinl(__z); } 6242: 6242: template 6242: inline complex<_Tp> 6242: sin(const complex<_Tp>& __z) { return __complex_sin(__z.__rep()); } 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: template 6242: inline complex<_Tp> 6242: __complex_sinh(const complex<_Tp>& __z) 6242: { 6242: const _Tp __x = __z.real(); 6242: const _Tp __y = __z.imag(); 6242: return complex<_Tp>(sinh(__x) * cos(__y), cosh(__x) * sin(__y)); 6242: } 6242: 6242: 6242: inline __complex__ float 6242: __complex_sinh(__complex__ float __z) { return __builtin_csinhf(__z); } 6242: 6242: inline __complex__ double 6242: __complex_sinh(__complex__ double __z) { return __builtin_csinh(__z); } 6242: 6242: inline __complex__ long double 6242: __complex_sinh(const __complex__ long double& __z) 6242: { return __builtin_csinhl(__z); } 6242: 6242: template 6242: inline complex<_Tp> 6242: sinh(const complex<_Tp>& __z) { return __complex_sinh(__z.__rep()); } 6242: # 883 "/usr/include/c++/8/complex" 3 6242: template 6242: complex<_Tp> 6242: __complex_sqrt(const complex<_Tp>& __z) 6242: { 6242: _Tp __x = __z.real(); 6242: _Tp __y = __z.imag(); 6242: 6242: if (__x == _Tp()) 6242: { 6242: _Tp __t = sqrt(abs(__y) / 2); 6242: return complex<_Tp>(__t, __y < _Tp() ? -__t : __t); 6242: } 6242: else 6242: { 6242: _Tp __t = sqrt(2 * (std::abs(__z) + abs(__x))); 6242: _Tp __u = __t / 2; 6242: return __x > _Tp() 6242: ? complex<_Tp>(__u, __y / __t) 6242: : complex<_Tp>(abs(__y) / __t, __y < _Tp() ? -__u : __u); 6242: } 6242: } 6242: 6242: 6242: inline __complex__ float 6242: __complex_sqrt(__complex__ float __z) { return __builtin_csqrtf(__z); } 6242: 6242: inline __complex__ double 6242: __complex_sqrt(__complex__ double __z) { return __builtin_csqrt(__z); } 6242: 6242: inline __complex__ long double 6242: __complex_sqrt(const __complex__ long double& __z) 6242: { return __builtin_csqrtl(__z); } 6242: 6242: template 6242: inline complex<_Tp> 6242: sqrt(const complex<_Tp>& __z) { return __complex_sqrt(__z.__rep()); } 6242: # 927 "/usr/include/c++/8/complex" 3 6242: template 6242: inline complex<_Tp> 6242: __complex_tan(const complex<_Tp>& __z) 6242: { return std::sin(__z) / std::cos(__z); } 6242: 6242: 6242: inline __complex__ float 6242: __complex_tan(__complex__ float __z) { return __builtin_ctanf(__z); } 6242: 6242: inline __complex__ double 6242: __complex_tan(__complex__ double __z) { return __builtin_ctan(__z); } 6242: 6242: inline __complex__ long double 6242: __complex_tan(const __complex__ long double& __z) 6242: { return __builtin_ctanl(__z); } 6242: 6242: template 6242: inline complex<_Tp> 6242: tan(const complex<_Tp>& __z) { return __complex_tan(__z.__rep()); } 6242: # 955 "/usr/include/c++/8/complex" 3 6242: template 6242: inline complex<_Tp> 6242: __complex_tanh(const complex<_Tp>& __z) 6242: { return std::sinh(__z) / std::cosh(__z); } 6242: 6242: 6242: inline __complex__ float 6242: __complex_tanh(__complex__ float __z) { return __builtin_ctanhf(__z); } 6242: 6242: inline __complex__ double 6242: __complex_tanh(__complex__ double __z) { return __builtin_ctanh(__z); } 6242: 6242: inline __complex__ long double 6242: __complex_tanh(const __complex__ long double& __z) 6242: { return __builtin_ctanhl(__z); } 6242: 6242: template 6242: inline complex<_Tp> 6242: tanh(const complex<_Tp>& __z) { return __complex_tanh(__z.__rep()); } 6242: # 984 "/usr/include/c++/8/complex" 3 6242: template 6242: complex<_Tp> 6242: __complex_pow_unsigned(complex<_Tp> __x, unsigned __n) 6242: { 6242: complex<_Tp> __y = __n % 2 ? __x : complex<_Tp>(1); 6242: 6242: while (__n >>= 1) 6242: { 6242: __x *= __x; 6242: if (__n % 2) 6242: __y *= __x; 6242: } 6242: 6242: return __y; 6242: } 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: template 6242: inline complex<_Tp> 6242: pow(const complex<_Tp>& __z, int __n) 6242: { 6242: return __n < 0 6242: ? complex<_Tp>(1) / std::__complex_pow_unsigned(__z, -(unsigned)__n) 6242: : std::__complex_pow_unsigned(__z, __n); 6242: } 6242: 6242: template 6242: complex<_Tp> 6242: pow(const complex<_Tp>& __x, const _Tp& __y) 6242: { 6242: 6242: 6242: 6242: 6242: if (__x.imag() == _Tp() && __x.real() > _Tp()) 6242: return pow(__x.real(), __y); 6242: 6242: complex<_Tp> __t = std::log(__x); 6242: return std::polar<_Tp>(exp(__y * __t.real()), __y * __t.imag()); 6242: } 6242: 6242: template 6242: inline complex<_Tp> 6242: __complex_pow(const complex<_Tp>& __x, const complex<_Tp>& __y) 6242: { return __x == _Tp() ? _Tp() : std::exp(__y * std::log(__x)); } 6242: 6242: 6242: inline __complex__ float 6242: __complex_pow(__complex__ float __x, __complex__ float __y) 6242: { return __builtin_cpowf(__x, __y); } 6242: 6242: inline __complex__ double 6242: __complex_pow(__complex__ double __x, __complex__ double __y) 6242: { return __builtin_cpow(__x, __y); } 6242: 6242: inline __complex__ long double 6242: __complex_pow(const __complex__ long double& __x, 6242: const __complex__ long double& __y) 6242: { return __builtin_cpowl(__x, __y); } 6242: 6242: template 6242: inline complex<_Tp> 6242: pow(const complex<_Tp>& __x, const complex<_Tp>& __y) 6242: { return __complex_pow(__x.__rep(), __y.__rep()); } 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: template 6242: inline complex<_Tp> 6242: pow(const _Tp& __x, const complex<_Tp>& __y) 6242: { 6242: return __x > _Tp() ? std::polar<_Tp>(pow(__x, __y.real()), 6242: __y.imag() * log(__x)) 6242: : std::pow(complex<_Tp>(__x), __y); 6242: } 6242: 6242: 6242: 6242: template<> 6242: struct complex 6242: { 6242: typedef float value_type; 6242: typedef __complex__ float _ComplexT; 6242: 6242: constexpr complex(_ComplexT __z) : _M_value(__z) { } 6242: 6242: constexpr complex(float __r = 0.0f, float __i = 0.0f) 6242: 6242: : _M_value{ __r, __i } { } 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: explicit constexpr complex(const complex&); 6242: explicit constexpr complex(const complex&); 6242: 6242: 6242: 6242: 6242: __attribute ((__abi_tag__ ("cxx11"))) 6242: constexpr float 6242: real() const { return __real__ _M_value; } 6242: 6242: __attribute ((__abi_tag__ ("cxx11"))) 6242: constexpr float 6242: imag() const { return __imag__ _M_value; } 6242: # 1118 "/usr/include/c++/8/complex" 3 6242: void 6242: real(float __val) { __real__ _M_value = __val; } 6242: 6242: void 6242: imag(float __val) { __imag__ _M_value = __val; } 6242: 6242: complex& 6242: operator=(float __f) 6242: { 6242: _M_value = __f; 6242: return *this; 6242: } 6242: 6242: complex& 6242: operator+=(float __f) 6242: { 6242: _M_value += __f; 6242: return *this; 6242: } 6242: 6242: complex& 6242: operator-=(float __f) 6242: { 6242: _M_value -= __f; 6242: return *this; 6242: } 6242: 6242: complex& 6242: operator*=(float __f) 6242: { 6242: _M_value *= __f; 6242: return *this; 6242: } 6242: 6242: complex& 6242: operator/=(float __f) 6242: { 6242: _M_value /= __f; 6242: return *this; 6242: } 6242: 6242: 6242: 6242: 6242: 6242: template 6242: complex& 6242: operator=(const complex<_Tp>& __z) 6242: { 6242: __real__ _M_value = __z.real(); 6242: __imag__ _M_value = __z.imag(); 6242: return *this; 6242: } 6242: 6242: template 6242: complex& 6242: operator+=(const complex<_Tp>& __z) 6242: { 6242: __real__ _M_value += __z.real(); 6242: __imag__ _M_value += __z.imag(); 6242: return *this; 6242: } 6242: 6242: template 6242: complex& 6242: operator-=(const complex<_Tp>& __z) 6242: { 6242: __real__ _M_value -= __z.real(); 6242: __imag__ _M_value -= __z.imag(); 6242: return *this; 6242: } 6242: 6242: template 6242: complex& 6242: operator*=(const complex<_Tp>& __z) 6242: { 6242: _ComplexT __t; 6242: __real__ __t = __z.real(); 6242: __imag__ __t = __z.imag(); 6242: _M_value *= __t; 6242: return *this; 6242: } 6242: 6242: template 6242: complex& 6242: operator/=(const complex<_Tp>& __z) 6242: { 6242: _ComplexT __t; 6242: __real__ __t = __z.real(); 6242: __imag__ __t = __z.imag(); 6242: _M_value /= __t; 6242: return *this; 6242: } 6242: 6242: constexpr _ComplexT __rep() const { return _M_value; } 6242: 6242: private: 6242: _ComplexT _M_value; 6242: }; 6242: 6242: 6242: 6242: template<> 6242: struct complex 6242: { 6242: typedef double value_type; 6242: typedef __complex__ double _ComplexT; 6242: 6242: constexpr complex(_ComplexT __z) : _M_value(__z) { } 6242: 6242: constexpr complex(double __r = 0.0, double __i = 0.0) 6242: 6242: : _M_value{ __r, __i } { } 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: constexpr complex(const complex& __z) 6242: : _M_value(__z.__rep()) { } 6242: 6242: explicit constexpr complex(const complex&); 6242: 6242: 6242: 6242: 6242: __attribute ((__abi_tag__ ("cxx11"))) 6242: constexpr double 6242: real() const { return __real__ _M_value; } 6242: 6242: __attribute ((__abi_tag__ ("cxx11"))) 6242: constexpr double 6242: imag() const { return __imag__ _M_value; } 6242: # 1269 "/usr/include/c++/8/complex" 3 6242: void 6242: real(double __val) { __real__ _M_value = __val; } 6242: 6242: void 6242: imag(double __val) { __imag__ _M_value = __val; } 6242: 6242: complex& 6242: operator=(double __d) 6242: { 6242: _M_value = __d; 6242: return *this; 6242: } 6242: 6242: complex& 6242: operator+=(double __d) 6242: { 6242: _M_value += __d; 6242: return *this; 6242: } 6242: 6242: complex& 6242: operator-=(double __d) 6242: { 6242: _M_value -= __d; 6242: return *this; 6242: } 6242: 6242: complex& 6242: operator*=(double __d) 6242: { 6242: _M_value *= __d; 6242: return *this; 6242: } 6242: 6242: complex& 6242: operator/=(double __d) 6242: { 6242: _M_value /= __d; 6242: return *this; 6242: } 6242: 6242: 6242: 6242: 6242: template 6242: complex& 6242: operator=(const complex<_Tp>& __z) 6242: { 6242: __real__ _M_value = __z.real(); 6242: __imag__ _M_value = __z.imag(); 6242: return *this; 6242: } 6242: 6242: template 6242: complex& 6242: operator+=(const complex<_Tp>& __z) 6242: { 6242: __real__ _M_value += __z.real(); 6242: __imag__ _M_value += __z.imag(); 6242: return *this; 6242: } 6242: 6242: template 6242: complex& 6242: operator-=(const complex<_Tp>& __z) 6242: { 6242: __real__ _M_value -= __z.real(); 6242: __imag__ _M_value -= __z.imag(); 6242: return *this; 6242: } 6242: 6242: template 6242: complex& 6242: operator*=(const complex<_Tp>& __z) 6242: { 6242: _ComplexT __t; 6242: __real__ __t = __z.real(); 6242: __imag__ __t = __z.imag(); 6242: _M_value *= __t; 6242: return *this; 6242: } 6242: 6242: template 6242: complex& 6242: operator/=(const complex<_Tp>& __z) 6242: { 6242: _ComplexT __t; 6242: __real__ __t = __z.real(); 6242: __imag__ __t = __z.imag(); 6242: _M_value /= __t; 6242: return *this; 6242: } 6242: 6242: constexpr _ComplexT __rep() const { return _M_value; } 6242: 6242: private: 6242: _ComplexT _M_value; 6242: }; 6242: 6242: 6242: 6242: template<> 6242: struct complex 6242: { 6242: typedef long double value_type; 6242: typedef __complex__ long double _ComplexT; 6242: 6242: constexpr complex(_ComplexT __z) : _M_value(__z) { } 6242: 6242: constexpr complex(long double __r = 0.0L, 6242: long double __i = 0.0L) 6242: 6242: : _M_value{ __r, __i } { } 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: constexpr complex(const complex& __z) 6242: : _M_value(__z.__rep()) { } 6242: 6242: constexpr complex(const complex& __z) 6242: : _M_value(__z.__rep()) { } 6242: 6242: 6242: 6242: 6242: __attribute ((__abi_tag__ ("cxx11"))) 6242: constexpr long double 6242: real() const { return __real__ _M_value; } 6242: 6242: __attribute ((__abi_tag__ ("cxx11"))) 6242: constexpr long double 6242: imag() const { return __imag__ _M_value; } 6242: # 1421 "/usr/include/c++/8/complex" 3 6242: void 6242: real(long double __val) { __real__ _M_value = __val; } 6242: 6242: void 6242: imag(long double __val) { __imag__ _M_value = __val; } 6242: 6242: complex& 6242: operator=(long double __r) 6242: { 6242: _M_value = __r; 6242: return *this; 6242: } 6242: 6242: complex& 6242: operator+=(long double __r) 6242: { 6242: _M_value += __r; 6242: return *this; 6242: } 6242: 6242: complex& 6242: operator-=(long double __r) 6242: { 6242: _M_value -= __r; 6242: return *this; 6242: } 6242: 6242: complex& 6242: operator*=(long double __r) 6242: { 6242: _M_value *= __r; 6242: return *this; 6242: } 6242: 6242: complex& 6242: operator/=(long double __r) 6242: { 6242: _M_value /= __r; 6242: return *this; 6242: } 6242: 6242: 6242: 6242: 6242: template 6242: complex& 6242: operator=(const complex<_Tp>& __z) 6242: { 6242: __real__ _M_value = __z.real(); 6242: __imag__ _M_value = __z.imag(); 6242: return *this; 6242: } 6242: 6242: template 6242: complex& 6242: operator+=(const complex<_Tp>& __z) 6242: { 6242: __real__ _M_value += __z.real(); 6242: __imag__ _M_value += __z.imag(); 6242: return *this; 6242: } 6242: 6242: template 6242: complex& 6242: operator-=(const complex<_Tp>& __z) 6242: { 6242: __real__ _M_value -= __z.real(); 6242: __imag__ _M_value -= __z.imag(); 6242: return *this; 6242: } 6242: 6242: template 6242: complex& 6242: operator*=(const complex<_Tp>& __z) 6242: { 6242: _ComplexT __t; 6242: __real__ __t = __z.real(); 6242: __imag__ __t = __z.imag(); 6242: _M_value *= __t; 6242: return *this; 6242: } 6242: 6242: template 6242: complex& 6242: operator/=(const complex<_Tp>& __z) 6242: { 6242: _ComplexT __t; 6242: __real__ __t = __z.real(); 6242: __imag__ __t = __z.imag(); 6242: _M_value /= __t; 6242: return *this; 6242: } 6242: 6242: constexpr _ComplexT __rep() const { return _M_value; } 6242: 6242: private: 6242: _ComplexT _M_value; 6242: }; 6242: 6242: 6242: 6242: inline constexpr 6242: complex::complex(const complex& __z) 6242: : _M_value(__z.__rep()) { } 6242: 6242: inline constexpr 6242: complex::complex(const complex& __z) 6242: : _M_value(__z.__rep()) { } 6242: 6242: inline constexpr 6242: complex::complex(const complex& __z) 6242: : _M_value(__z.__rep()) { } 6242: 6242: 6242: 6242: 6242: 6242: extern template istream& operator>>(istream&, complex&); 6242: extern template ostream& operator<<(ostream&, const complex&); 6242: extern template istream& operator>>(istream&, complex&); 6242: extern template ostream& operator<<(ostream&, const complex&); 6242: extern template istream& operator>>(istream&, complex&); 6242: extern template ostream& operator<<(ostream&, const complex&); 6242: 6242: 6242: extern template wistream& operator>>(wistream&, complex&); 6242: extern template wostream& operator<<(wostream&, const complex&); 6242: extern template wistream& operator>>(wistream&, complex&); 6242: extern template wostream& operator<<(wostream&, const complex&); 6242: extern template wistream& operator>>(wistream&, complex&); 6242: extern template wostream& operator<<(wostream&, const complex&); 6242: 6242: 6242: 6242: 6242: 6242: 6242: } 6242: 6242: namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) 6242: { 6242: 6242: 6242: 6242: template 6242: struct __promote_2, _Up> 6242: { 6242: public: 6242: typedef std::complex::__type> __type; 6242: }; 6242: 6242: template 6242: struct __promote_2<_Tp, std::complex<_Up> > 6242: { 6242: public: 6242: typedef std::complex::__type> __type; 6242: }; 6242: 6242: template 6242: struct __promote_2, std::complex<_Up> > 6242: { 6242: public: 6242: typedef std::complex::__type> __type; 6242: }; 6242: 6242: 6242: } 6242: 6242: 6242: 6242: namespace std __attribute__ ((__visibility__ ("default"))) 6242: { 6242: 6242: 6242: 6242: template std::complex<_Tp> acos(const std::complex<_Tp>&); 6242: template std::complex<_Tp> asin(const std::complex<_Tp>&); 6242: template std::complex<_Tp> atan(const std::complex<_Tp>&); 6242: 6242: template std::complex<_Tp> acosh(const std::complex<_Tp>&); 6242: template std::complex<_Tp> asinh(const std::complex<_Tp>&); 6242: template std::complex<_Tp> atanh(const std::complex<_Tp>&); 6242: 6242: template _Tp fabs(const std::complex<_Tp>&); 6242: 6242: template 6242: inline std::complex<_Tp> 6242: __complex_acos(const std::complex<_Tp>& __z) 6242: { 6242: const std::complex<_Tp> __t = std::asin(__z); 6242: const _Tp __pi_2 = 1.5707963267948966192313216916397514L; 6242: return std::complex<_Tp>(__pi_2 - __t.real(), -__t.imag()); 6242: } 6242: 6242: 6242: inline __complex__ float 6242: __complex_acos(__complex__ float __z) 6242: { return __builtin_cacosf(__z); } 6242: 6242: inline __complex__ double 6242: __complex_acos(__complex__ double __z) 6242: { return __builtin_cacos(__z); } 6242: 6242: inline __complex__ long double 6242: __complex_acos(const __complex__ long double& __z) 6242: { return __builtin_cacosl(__z); } 6242: 6242: template 6242: inline std::complex<_Tp> 6242: acos(const std::complex<_Tp>& __z) 6242: { return __complex_acos(__z.__rep()); } 6242: # 1642 "/usr/include/c++/8/complex" 3 6242: template 6242: inline std::complex<_Tp> 6242: __complex_asin(const std::complex<_Tp>& __z) 6242: { 6242: std::complex<_Tp> __t(-__z.imag(), __z.real()); 6242: __t = std::asinh(__t); 6242: return std::complex<_Tp>(__t.imag(), -__t.real()); 6242: } 6242: 6242: 6242: inline __complex__ float 6242: __complex_asin(__complex__ float __z) 6242: { return __builtin_casinf(__z); } 6242: 6242: inline __complex__ double 6242: __complex_asin(__complex__ double __z) 6242: { return __builtin_casin(__z); } 6242: 6242: inline __complex__ long double 6242: __complex_asin(const __complex__ long double& __z) 6242: { return __builtin_casinl(__z); } 6242: 6242: template 6242: inline std::complex<_Tp> 6242: asin(const std::complex<_Tp>& __z) 6242: { return __complex_asin(__z.__rep()); } 6242: # 1678 "/usr/include/c++/8/complex" 3 6242: template 6242: std::complex<_Tp> 6242: __complex_atan(const std::complex<_Tp>& __z) 6242: { 6242: const _Tp __r2 = __z.real() * __z.real(); 6242: const _Tp __x = _Tp(1.0) - __r2 - __z.imag() * __z.imag(); 6242: 6242: _Tp __num = __z.imag() + _Tp(1.0); 6242: _Tp __den = __z.imag() - _Tp(1.0); 6242: 6242: __num = __r2 + __num * __num; 6242: __den = __r2 + __den * __den; 6242: 6242: return std::complex<_Tp>(_Tp(0.5) * atan2(_Tp(2.0) * __z.real(), __x), 6242: _Tp(0.25) * log(__num / __den)); 6242: } 6242: 6242: 6242: inline __complex__ float 6242: __complex_atan(__complex__ float __z) 6242: { return __builtin_catanf(__z); } 6242: 6242: inline __complex__ double 6242: __complex_atan(__complex__ double __z) 6242: { return __builtin_catan(__z); } 6242: 6242: inline __complex__ long double 6242: __complex_atan(const __complex__ long double& __z) 6242: { return __builtin_catanl(__z); } 6242: 6242: template 6242: inline std::complex<_Tp> 6242: atan(const std::complex<_Tp>& __z) 6242: { return __complex_atan(__z.__rep()); } 6242: # 1722 "/usr/include/c++/8/complex" 3 6242: template 6242: std::complex<_Tp> 6242: __complex_acosh(const std::complex<_Tp>& __z) 6242: { 6242: 6242: return _Tp(2.0) * std::log(std::sqrt(_Tp(0.5) * (__z + _Tp(1.0))) 6242: + std::sqrt(_Tp(0.5) * (__z - _Tp(1.0)))); 6242: } 6242: 6242: 6242: inline __complex__ float 6242: __complex_acosh(__complex__ float __z) 6242: { return __builtin_cacoshf(__z); } 6242: 6242: inline __complex__ double 6242: __complex_acosh(__complex__ double __z) 6242: { return __builtin_cacosh(__z); } 6242: 6242: inline __complex__ long double 6242: __complex_acosh(const __complex__ long double& __z) 6242: { return __builtin_cacoshl(__z); } 6242: 6242: template 6242: inline std::complex<_Tp> 6242: acosh(const std::complex<_Tp>& __z) 6242: { return __complex_acosh(__z.__rep()); } 6242: # 1758 "/usr/include/c++/8/complex" 3 6242: template 6242: std::complex<_Tp> 6242: __complex_asinh(const std::complex<_Tp>& __z) 6242: { 6242: std::complex<_Tp> __t((__z.real() - __z.imag()) 6242: * (__z.real() + __z.imag()) + _Tp(1.0), 6242: _Tp(2.0) * __z.real() * __z.imag()); 6242: __t = std::sqrt(__t); 6242: 6242: return std::log(__t + __z); 6242: } 6242: 6242: 6242: inline __complex__ float 6242: __complex_asinh(__complex__ float __z) 6242: { return __builtin_casinhf(__z); } 6242: 6242: inline __complex__ double 6242: __complex_asinh(__complex__ double __z) 6242: { return __builtin_casinh(__z); } 6242: 6242: inline __complex__ long double 6242: __complex_asinh(const __complex__ long double& __z) 6242: { return __builtin_casinhl(__z); } 6242: 6242: template 6242: inline std::complex<_Tp> 6242: asinh(const std::complex<_Tp>& __z) 6242: { return __complex_asinh(__z.__rep()); } 6242: # 1797 "/usr/include/c++/8/complex" 3 6242: template 6242: std::complex<_Tp> 6242: __complex_atanh(const std::complex<_Tp>& __z) 6242: { 6242: const _Tp __i2 = __z.imag() * __z.imag(); 6242: const _Tp __x = _Tp(1.0) - __i2 - __z.real() * __z.real(); 6242: 6242: _Tp __num = _Tp(1.0) + __z.real(); 6242: _Tp __den = _Tp(1.0) - __z.real(); 6242: 6242: __num = __i2 + __num * __num; 6242: __den = __i2 + __den * __den; 6242: 6242: return std::complex<_Tp>(_Tp(0.25) * (log(__num) - log(__den)), 6242: _Tp(0.5) * atan2(_Tp(2.0) * __z.imag(), __x)); 6242: } 6242: 6242: 6242: inline __complex__ float 6242: __complex_atanh(__complex__ float __z) 6242: { return __builtin_catanhf(__z); } 6242: 6242: inline __complex__ double 6242: __complex_atanh(__complex__ double __z) 6242: { return __builtin_catanh(__z); } 6242: 6242: inline __complex__ long double 6242: __complex_atanh(const __complex__ long double& __z) 6242: { return __builtin_catanhl(__z); } 6242: 6242: template 6242: inline std::complex<_Tp> 6242: atanh(const std::complex<_Tp>& __z) 6242: { return __complex_atanh(__z.__rep()); } 6242: # 1841 "/usr/include/c++/8/complex" 3 6242: template 6242: inline _Tp 6242: 6242: 6242: 6242: fabs(const std::complex<_Tp>& __z) 6242: { return std::abs(__z); } 6242: 6242: 6242: template 6242: inline typename __gnu_cxx::__promote<_Tp>::__type 6242: arg(_Tp __x) 6242: { 6242: typedef typename __gnu_cxx::__promote<_Tp>::__type __type; 6242: 6242: return std::signbit(__x) ? __type(3.1415926535897932384626433832795029L) 6242: : __type(); 6242: 6242: 6242: 6242: } 6242: 6242: template 6242: constexpr inline typename __gnu_cxx::__promote<_Tp>::__type 6242: imag(_Tp) 6242: { return _Tp(); } 6242: 6242: template 6242: inline typename __gnu_cxx::__promote<_Tp>::__type 6242: norm(_Tp __x) 6242: { 6242: typedef typename __gnu_cxx::__promote<_Tp>::__type __type; 6242: return __type(__x) * __type(__x); 6242: } 6242: 6242: template 6242: constexpr inline typename __gnu_cxx::__promote<_Tp>::__type 6242: real(_Tp __x) 6242: { return __x; } 6242: 6242: template 6242: inline std::complex::__type> 6242: pow(const std::complex<_Tp>& __x, const _Up& __y) 6242: { 6242: typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; 6242: return std::pow(std::complex<__type>(__x), __type(__y)); 6242: } 6242: 6242: template 6242: inline std::complex::__type> 6242: pow(const _Tp& __x, const std::complex<_Up>& __y) 6242: { 6242: typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; 6242: return std::pow(__type(__x), std::complex<__type>(__y)); 6242: } 6242: 6242: template 6242: inline std::complex::__type> 6242: pow(const std::complex<_Tp>& __x, const std::complex<_Up>& __y) 6242: { 6242: typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; 6242: return std::pow(std::complex<__type>(__x), 6242: std::complex<__type>(__y)); 6242: } 6242: 6242: 6242: 6242: template std::complex<_Tp> proj(const std::complex<_Tp>&); 6242: 6242: template 6242: std::complex<_Tp> 6242: __complex_proj(const std::complex<_Tp>& __z) 6242: { 6242: const _Tp __den = (__z.real() * __z.real() 6242: + __z.imag() * __z.imag() + _Tp(1.0)); 6242: 6242: return std::complex<_Tp>((_Tp(2.0) * __z.real()) / __den, 6242: (_Tp(2.0) * __z.imag()) / __den); 6242: } 6242: 6242: 6242: inline __complex__ float 6242: __complex_proj(__complex__ float __z) 6242: { return __builtin_cprojf(__z); } 6242: 6242: inline __complex__ double 6242: __complex_proj(__complex__ double __z) 6242: { return __builtin_cproj(__z); } 6242: 6242: inline __complex__ long double 6242: __complex_proj(const __complex__ long double& __z) 6242: { return __builtin_cprojl(__z); } 6242: 6242: template 6242: inline std::complex<_Tp> 6242: proj(const std::complex<_Tp>& __z) 6242: { return __complex_proj(__z.__rep()); } 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: template 6242: inline std::complex::__type> 6242: proj(_Tp __x) 6242: { 6242: typedef typename __gnu_cxx::__promote<_Tp>::__type __type; 6242: return std::proj(std::complex<__type>(__x)); 6242: } 6242: 6242: template 6242: inline std::complex::__type> 6242: conj(_Tp __x) 6242: { 6242: typedef typename __gnu_cxx::__promote<_Tp>::__type __type; 6242: return std::complex<__type>(__x, -__type()); 6242: } 6242: # 1999 "/usr/include/c++/8/complex" 3 6242: 6242: } 6242: # 99 "/usr/include/boost/detail/container_fwd.hpp" 2 3 4 6242: # 23 "/usr/include/boost/functional/hash/extensions.hpp" 2 3 4 6242: 6242: 6242: # 1 "/usr/include/boost/preprocessor/repetition/repeat_from_to.hpp" 1 3 4 6242: # 23 "/usr/include/boost/preprocessor/repetition/repeat_from_to.hpp" 3 4 6242: # 1 "/usr/include/boost/preprocessor/detail/auto_rec.hpp" 1 3 4 6242: # 24 "/usr/include/boost/preprocessor/repetition/repeat_from_to.hpp" 2 3 4 6242: # 26 "/usr/include/boost/functional/hash/extensions.hpp" 2 3 4 6242: # 44 "/usr/include/boost/functional/hash/extensions.hpp" 3 4 6242: namespace boost 6242: { 6242: template 6242: std::size_t hash_value(std::pair const&); 6242: template 6242: std::size_t hash_value(std::vector const&); 6242: template 6242: std::size_t hash_value(std::list const& v); 6242: template 6242: std::size_t hash_value(std::deque const& v); 6242: template 6242: std::size_t hash_value(std::set const& v); 6242: template 6242: std::size_t hash_value(std::multiset const& v); 6242: template 6242: std::size_t hash_value(std::map const& v); 6242: template 6242: std::size_t hash_value(std::multimap const& v); 6242: 6242: template 6242: std::size_t hash_value(std::complex const&); 6242: 6242: template 6242: std::size_t hash_value(std::pair const& v) 6242: { 6242: std::size_t seed = 0; 6242: boost::hash_combine(seed, v.first); 6242: boost::hash_combine(seed, v.second); 6242: return seed; 6242: } 6242: 6242: template 6242: std::size_t hash_value(std::vector const& v) 6242: { 6242: return boost::hash_range(v.begin(), v.end()); 6242: } 6242: 6242: template 6242: std::size_t hash_value(std::list const& v) 6242: { 6242: return boost::hash_range(v.begin(), v.end()); 6242: } 6242: 6242: template 6242: std::size_t hash_value(std::deque const& v) 6242: { 6242: return boost::hash_range(v.begin(), v.end()); 6242: } 6242: 6242: template 6242: std::size_t hash_value(std::set const& v) 6242: { 6242: return boost::hash_range(v.begin(), v.end()); 6242: } 6242: 6242: template 6242: std::size_t hash_value(std::multiset const& v) 6242: { 6242: return boost::hash_range(v.begin(), v.end()); 6242: } 6242: 6242: template 6242: std::size_t hash_value(std::map const& v) 6242: { 6242: return boost::hash_range(v.begin(), v.end()); 6242: } 6242: 6242: template 6242: std::size_t hash_value(std::multimap const& v) 6242: { 6242: return boost::hash_range(v.begin(), v.end()); 6242: } 6242: 6242: template 6242: std::size_t hash_value(std::complex const& v) 6242: { 6242: boost::hash hasher; 6242: std::size_t seed = hasher(v.imag()); 6242: seed ^= hasher(v.real()) + (seed<<6) + (seed>>2); 6242: return seed; 6242: } 6242: 6242: 6242: template 6242: std::size_t hash_value(std::array const& v) 6242: { 6242: return boost::hash_range(v.begin(), v.end()); 6242: } 6242: 6242: 6242: 6242: namespace hash_detail { 6242: template 6242: inline typename boost::enable_if_c<(I == std::tuple_size::value), 6242: void>::type 6242: hash_combine_tuple(std::size_t&, T const&) 6242: { 6242: } 6242: 6242: template 6242: inline typename boost::enable_if_c<(I < std::tuple_size::value), 6242: void>::type 6242: hash_combine_tuple(std::size_t& seed, T const& v) 6242: { 6242: boost::hash_combine(seed, std::get(v)); 6242: boost::hash_detail::hash_combine_tuple(seed, v); 6242: } 6242: 6242: template 6242: inline std::size_t hash_tuple(T const& v) 6242: { 6242: std::size_t seed = 0; 6242: boost::hash_detail::hash_combine_tuple<0>(seed, v); 6242: return seed; 6242: } 6242: } 6242: 6242: 6242: template 6242: inline std::size_t hash_value(std::tuple const& v) 6242: { 6242: return boost::hash_detail::hash_tuple(v); 6242: } 6242: # 192 "/usr/include/boost/functional/hash/extensions.hpp" 3 4 6242: template 6242: inline std::size_t hash_value(std::shared_ptr const& x) { 6242: return boost::hash_value(x.get()); 6242: } 6242: 6242: template 6242: inline std::size_t hash_value(std::unique_ptr const& x) { 6242: return boost::hash_value(x.get()); 6242: } 6242: # 256 "/usr/include/boost/functional/hash/extensions.hpp" 3 4 6242: template struct hash 6242: : boost::hash_detail::hash_base 6242: { 6242: 6242: std::size_t operator()(T const& val) const 6242: { 6242: return hash_value(val); 6242: } 6242: 6242: 6242: 6242: 6242: 6242: 6242: }; 6242: # 316 "/usr/include/boost/functional/hash/extensions.hpp" 3 4 6242: } 6242: # 595 "/usr/include/boost/functional/hash/hash.hpp" 2 3 4 6242: # 7 "/usr/include/boost/functional/hash.hpp" 2 3 4 6242: # 24 "/usr/include/boost/regex/v4/basic_regex.hpp" 2 3 4 6242: # 36 "/usr/include/boost/regex/v4/basic_regex.hpp" 3 4 6242: namespace boost{ 6242: # 45 "/usr/include/boost/regex/v4/basic_regex.hpp" 3 4 6242: namespace re_detail_106501{ 6242: 6242: 6242: 6242: 6242: template 6242: class basic_regex_parser; 6242: 6242: template 6242: void bubble_down_one(I first, I last) 6242: { 6242: if(first != last) 6242: { 6242: I next = last - 1; 6242: while((next != first) && (*next < *(next-1))) 6242: { 6242: (next-1)->swap(*next); 6242: --next; 6242: } 6242: } 6242: } 6242: 6242: template 6242: inline int hash_value_from_capture_name(Iterator i, Iterator j) 6242: { 6242: std::size_t r = boost::hash_range(i, j); 6242: r %= ((std::numeric_limits::max)() - 10001); 6242: r += 10000; 6242: return static_cast(r); 6242: } 6242: 6242: class named_subexpressions 6242: { 6242: public: 6242: struct name 6242: { 6242: template 6242: name(const charT* i, const charT* j, int idx) 6242: : index(idx) 6242: { 6242: hash = hash_value_from_capture_name(i, j); 6242: } 6242: name(int h, int idx) 6242: : index(idx), hash(h) 6242: { 6242: } 6242: int index; 6242: int hash; 6242: bool operator < (const name& other)const 6242: { 6242: return hash < other.hash; 6242: } 6242: bool operator == (const name& other)const 6242: { 6242: return hash == other.hash; 6242: } 6242: void swap(name& other) 6242: { 6242: std::swap(index, other.index); 6242: std::swap(hash, other.hash); 6242: } 6242: }; 6242: 6242: typedef std::vector::const_iterator const_iterator; 6242: typedef std::pair range_type; 6242: 6242: named_subexpressions(){} 6242: 6242: template 6242: void set_name(const charT* i, const charT* j, int index) 6242: { 6242: m_sub_names.push_back(name(i, j, index)); 6242: bubble_down_one(m_sub_names.begin(), m_sub_names.end()); 6242: } 6242: template 6242: int get_id(const charT* i, const charT* j)const 6242: { 6242: name t(i, j, 0); 6242: typename std::vector::const_iterator pos = std::lower_bound(m_sub_names.begin(), m_sub_names.end(), t); 6242: if((pos != m_sub_names.end()) && (*pos == t)) 6242: { 6242: return pos->index; 6242: } 6242: return -1; 6242: } 6242: template 6242: range_type equal_range(const charT* i, const charT* j)const 6242: { 6242: name t(i, j, 0); 6242: return std::equal_range(m_sub_names.begin(), m_sub_names.end(), t); 6242: } 6242: int get_id(int h)const 6242: { 6242: name t(h, 0); 6242: std::vector::const_iterator pos = std::lower_bound(m_sub_names.begin(), m_sub_names.end(), t); 6242: if((pos != m_sub_names.end()) && (*pos == t)) 6242: { 6242: return pos->index; 6242: } 6242: return -1; 6242: } 6242: range_type equal_range(int h)const 6242: { 6242: name t(h, 0); 6242: return std::equal_range(m_sub_names.begin(), m_sub_names.end(), t); 6242: } 6242: private: 6242: std::vector m_sub_names; 6242: }; 6242: 6242: 6242: 6242: 6242: 6242: template 6242: struct regex_data : public named_subexpressions 6242: { 6242: typedef regex_constants::syntax_option_type flag_type; 6242: typedef std::size_t size_type; 6242: 6242: regex_data(const ::boost::shared_ptr< 6242: ::boost::regex_traits_wrapper >& t) 6242: : m_ptraits(t), m_expression(0), m_expression_len(0), m_disable_match_any(false) {} 6242: regex_data() 6242: : m_ptraits(new ::boost::regex_traits_wrapper()), m_expression(0), m_expression_len(0), m_disable_match_any(false) {} 6242: 6242: ::boost::shared_ptr< 6242: ::boost::regex_traits_wrapper 6242: > m_ptraits; 6242: flag_type m_flags; 6242: int m_status; 6242: const charT* m_expression; 6242: std::ptrdiff_t m_expression_len; 6242: size_type m_mark_count; 6242: re_detail_106501::re_syntax_base* m_first_state; 6242: unsigned m_restart_type; 6242: unsigned char m_startmap[1 << 8]; 6242: unsigned int m_can_be_null; 6242: re_detail_106501::raw_storage m_data; 6242: typename traits::char_class_type m_word_mask; 6242: std::vector< 6242: std::pair< 6242: std::size_t, std::size_t> > m_subs; 6242: bool m_has_recursions; 6242: bool m_disable_match_any; 6242: }; 6242: 6242: 6242: 6242: 6242: template 6242: class basic_regex_implementation 6242: : public regex_data 6242: { 6242: public: 6242: typedef regex_constants::syntax_option_type flag_type; 6242: typedef std::ptrdiff_t difference_type; 6242: typedef std::size_t size_type; 6242: typedef typename traits::locale_type locale_type; 6242: typedef const charT* const_iterator; 6242: 6242: basic_regex_implementation(){} 6242: basic_regex_implementation(const ::boost::shared_ptr< 6242: ::boost::regex_traits_wrapper >& t) 6242: : regex_data(t) {} 6242: void assign(const charT* arg_first, 6242: const charT* arg_last, 6242: flag_type f) 6242: { 6242: regex_data* pdat = this; 6242: basic_regex_parser parser(pdat); 6242: parser.parse(arg_first, arg_last, f); 6242: } 6242: 6242: locale_type imbue(locale_type l) 6242: { 6242: return this->m_ptraits->imbue(l); 6242: } 6242: locale_type getloc()const 6242: { 6242: return this->m_ptraits->getloc(); 6242: } 6242: std::basic_string str()const 6242: { 6242: std::basic_string result; 6242: if(this->m_status == 0) 6242: result = std::basic_string(this->m_expression, this->m_expression_len); 6242: return result; 6242: } 6242: const_iterator expression()const 6242: { 6242: return this->m_expression; 6242: } 6242: std::pair subexpression(std::size_t n)const 6242: { 6242: const std::pair& pi = this->m_subs.at(n); 6242: std::pair p(expression() + pi.first, expression() + pi.second); 6242: return p; 6242: } 6242: 6242: 6242: const_iterator begin()const 6242: { 6242: return (this->m_status ? 0 : this->m_expression); 6242: } 6242: const_iterator end()const 6242: { 6242: return (this->m_status ? 0 : this->m_expression + this->m_expression_len); 6242: } 6242: flag_type flags()const 6242: { 6242: return this->m_flags; 6242: } 6242: size_type size()const 6242: { 6242: return this->m_expression_len; 6242: } 6242: int status()const 6242: { 6242: return this->m_status; 6242: } 6242: size_type mark_count()const 6242: { 6242: return this->m_mark_count - 1; 6242: } 6242: const re_detail_106501::re_syntax_base* get_first_state()const 6242: { 6242: return this->m_first_state; 6242: } 6242: unsigned get_restart_type()const 6242: { 6242: return this->m_restart_type; 6242: } 6242: const unsigned char* get_map()const 6242: { 6242: return this->m_startmap; 6242: } 6242: const ::boost::regex_traits_wrapper& get_traits()const 6242: { 6242: return *(this->m_ptraits); 6242: } 6242: bool can_be_null()const 6242: { 6242: return this->m_can_be_null; 6242: } 6242: const regex_data& get_data()const 6242: { 6242: basic_regex_implementation const* p = this; 6242: return *static_cast*>(p); 6242: } 6242: }; 6242: 6242: } 6242: # 307 "/usr/include/boost/regex/v4/basic_regex.hpp" 3 4 6242: template 6242: 6242: class basic_regex : public regbase 6242: { 6242: public: 6242: 6242: typedef std::size_t traits_size_type; 6242: typedef typename traits::string_type traits_string_type; 6242: typedef charT char_type; 6242: typedef traits traits_type; 6242: 6242: typedef charT value_type; 6242: typedef charT& reference; 6242: typedef const charT& const_reference; 6242: typedef const charT* const_iterator; 6242: typedef const_iterator iterator; 6242: typedef std::ptrdiff_t difference_type; 6242: typedef std::size_t size_type; 6242: typedef regex_constants::syntax_option_type flag_type; 6242: 6242: 6242: 6242: typedef typename traits::locale_type locale_type; 6242: 6242: public: 6242: explicit basic_regex(){} 6242: explicit basic_regex(const charT* p, flag_type f = regex_constants::normal) 6242: { 6242: assign(p, f); 6242: } 6242: basic_regex(const charT* p1, const charT* p2, flag_type f = regex_constants::normal) 6242: { 6242: assign(p1, p2, f); 6242: } 6242: basic_regex(const charT* p, size_type len, flag_type f) 6242: { 6242: assign(p, len, f); 6242: } 6242: basic_regex(const basic_regex& that) 6242: : m_pimpl(that.m_pimpl) {} 6242: ~basic_regex(){} 6242: basic_regex& operator=(const basic_regex& that) 6242: { 6242: return assign(that); 6242: } 6242: basic_regex& operator=(const charT* ptr) 6242: { 6242: return assign(ptr); 6242: } 6242: 6242: 6242: 6242: basic_regex& assign(const basic_regex& that) 6242: { 6242: m_pimpl = that.m_pimpl; 6242: return *this; 6242: } 6242: basic_regex& assign(const charT* p, flag_type f = regex_constants::normal) 6242: { 6242: return assign(p, p + traits::length(p), f); 6242: } 6242: basic_regex& assign(const charT* p, size_type len, flag_type f) 6242: { 6242: return assign(p, p + len, f); 6242: } 6242: private: 6242: basic_regex& do_assign(const charT* p1, 6242: const charT* p2, 6242: flag_type f); 6242: public: 6242: basic_regex& assign(const charT* p1, 6242: const charT* p2, 6242: flag_type f = regex_constants::normal) 6242: { 6242: return do_assign(p1, p2, f); 6242: } 6242: 6242: 6242: template 6242: unsigned int set_expression(const std::basic_string& p, flag_type f = regex_constants::normal) 6242: { 6242: return set_expression(p.data(), p.data() + p.size(), f); 6242: } 6242: 6242: template 6242: explicit basic_regex(const std::basic_string& p, flag_type f = regex_constants::normal) 6242: { 6242: assign(p, f); 6242: } 6242: 6242: template 6242: basic_regex(InputIterator arg_first, InputIterator arg_last, flag_type f = regex_constants::normal) 6242: { 6242: typedef typename traits::string_type seq_type; 6242: seq_type a(arg_first, arg_last); 6242: if(a.size()) 6242: assign(static_cast(&*a.begin()), static_cast(&*a.begin() + a.size()), f); 6242: else 6242: assign(static_cast(0), static_cast(0), f); 6242: } 6242: 6242: template 6242: basic_regex& operator=(const std::basic_string& p) 6242: { 6242: return assign(p.data(), p.data() + p.size(), regex_constants::normal); 6242: } 6242: 6242: template 6242: basic_regex& assign( 6242: const std::basic_string& s, 6242: flag_type f = regex_constants::normal) 6242: { 6242: return assign(s.data(), s.data() + s.size(), f); 6242: } 6242: 6242: template 6242: basic_regex& assign(InputIterator arg_first, 6242: InputIterator arg_last, 6242: flag_type f = regex_constants::normal) 6242: { 6242: typedef typename traits::string_type seq_type; 6242: seq_type a(arg_first, arg_last); 6242: if(a.size()) 6242: { 6242: const charT* p1 = &*a.begin(); 6242: const charT* p2 = &*a.begin() + a.size(); 6242: return assign(p1, p2, f); 6242: } 6242: return assign(static_cast(0), static_cast(0), f); 6242: } 6242: # 464 "/usr/include/boost/regex/v4/basic_regex.hpp" 3 4 6242: locale_type imbue(locale_type l); 6242: locale_type getloc()const 6242: { 6242: return m_pimpl.get() ? m_pimpl->getloc() : locale_type(); 6242: } 6242: 6242: 6242: 6242: 6242: flag_type getflags()const 6242: { 6242: return flags(); 6242: } 6242: flag_type flags()const 6242: { 6242: return m_pimpl.get() ? m_pimpl->flags() : 0; 6242: } 6242: 6242: 6242: std::basic_string str()const 6242: { 6242: return m_pimpl.get() ? m_pimpl->str() : std::basic_string(); 6242: } 6242: 6242: 6242: std::pair subexpression(std::size_t n)const 6242: { 6242: if(!m_pimpl.get()) 6242: boost::throw_exception(std::logic_error("Can't access subexpressions in an invalid regex.")); 6242: return m_pimpl->subexpression(n); 6242: } 6242: const_iterator begin()const 6242: { 6242: return (m_pimpl.get() ? m_pimpl->begin() : 0); 6242: } 6242: const_iterator end()const 6242: { 6242: return (m_pimpl.get() ? m_pimpl->end() : 0); 6242: } 6242: 6242: 6242: void swap(basic_regex& that)throw() 6242: { 6242: m_pimpl.swap(that.m_pimpl); 6242: } 6242: 6242: 6242: size_type size()const 6242: { 6242: return (m_pimpl.get() ? m_pimpl->size() : 0); 6242: } 6242: 6242: 6242: size_type max_size()const 6242: { 6242: return (0x7fffffff * 2U + 1U); 6242: } 6242: 6242: 6242: bool empty()const 6242: { 6242: return (m_pimpl.get() ? 0 != m_pimpl->status() : true); 6242: } 6242: 6242: size_type mark_count()const 6242: { 6242: return (m_pimpl.get() ? m_pimpl->mark_count() : 0); 6242: } 6242: 6242: int status()const 6242: { 6242: return (m_pimpl.get() ? m_pimpl->status() : regex_constants::error_empty); 6242: } 6242: 6242: int compare(const basic_regex& that) const 6242: { 6242: if(m_pimpl.get() == that.m_pimpl.get()) 6242: return 0; 6242: if(!m_pimpl.get()) 6242: return -1; 6242: if(!that.m_pimpl.get()) 6242: return 1; 6242: if(status() != that.status()) 6242: return status() - that.status(); 6242: if(flags() != that.flags()) 6242: return flags() - that.flags(); 6242: return str().compare(that.str()); 6242: } 6242: bool operator==(const basic_regex& e)const 6242: { 6242: return compare(e) == 0; 6242: } 6242: bool operator != (const basic_regex& e)const 6242: { 6242: return compare(e) != 0; 6242: } 6242: bool operator<(const basic_regex& e)const 6242: { 6242: return compare(e) < 0; 6242: } 6242: bool operator>(const basic_regex& e)const 6242: { 6242: return compare(e) > 0; 6242: } 6242: bool operator<=(const basic_regex& e)const 6242: { 6242: return compare(e) <= 0; 6242: } 6242: bool operator>=(const basic_regex& e)const 6242: { 6242: return compare(e) >= 0; 6242: } 6242: 6242: 6242: 6242: 6242: const charT* expression()const 6242: { 6242: return (m_pimpl.get() && !m_pimpl->status() ? m_pimpl->expression() : 0); 6242: } 6242: unsigned int set_expression(const charT* p1, const charT* p2, flag_type f = regex_constants::normal) 6242: { 6242: assign(p1, p2, f | regex_constants::no_except); 6242: return status(); 6242: } 6242: unsigned int set_expression(const charT* p, flag_type f = regex_constants::normal) 6242: { 6242: assign(p, f | regex_constants::no_except); 6242: return status(); 6242: } 6242: unsigned int error_code()const 6242: { 6242: return status(); 6242: } 6242: 6242: 6242: 6242: const re_detail_106501::re_syntax_base* get_first_state()const 6242: { 6242: (static_cast (0 != m_pimpl.get()) ? void (0) : __assert_fail ("0 != m_pimpl.get()", "/usr/include/boost/regex/v4/basic_regex.hpp", 603, __extension__ __PRETTY_FUNCTION__)); 6242: return m_pimpl->get_first_state(); 6242: } 6242: unsigned get_restart_type()const 6242: { 6242: (static_cast (0 != m_pimpl.get()) ? void (0) : __assert_fail ("0 != m_pimpl.get()", "/usr/include/boost/regex/v4/basic_regex.hpp", 608, __extension__ __PRETTY_FUNCTION__)); 6242: return m_pimpl->get_restart_type(); 6242: } 6242: const unsigned char* get_map()const 6242: { 6242: (static_cast (0 != m_pimpl.get()) ? void (0) : __assert_fail ("0 != m_pimpl.get()", "/usr/include/boost/regex/v4/basic_regex.hpp", 613, __extension__ __PRETTY_FUNCTION__)); 6242: return m_pimpl->get_map(); 6242: } 6242: const ::boost::regex_traits_wrapper& get_traits()const 6242: { 6242: (static_cast (0 != m_pimpl.get()) ? void (0) : __assert_fail ("0 != m_pimpl.get()", "/usr/include/boost/regex/v4/basic_regex.hpp", 618, __extension__ __PRETTY_FUNCTION__)); 6242: return m_pimpl->get_traits(); 6242: } 6242: bool can_be_null()const 6242: { 6242: (static_cast (0 != m_pimpl.get()) ? void (0) : __assert_fail ("0 != m_pimpl.get()", "/usr/include/boost/regex/v4/basic_regex.hpp", 623, __extension__ __PRETTY_FUNCTION__)); 6242: return m_pimpl->can_be_null(); 6242: } 6242: const re_detail_106501::regex_data& get_data()const 6242: { 6242: (static_cast (0 != m_pimpl.get()) ? void (0) : __assert_fail ("0 != m_pimpl.get()", "/usr/include/boost/regex/v4/basic_regex.hpp", 628, __extension__ __PRETTY_FUNCTION__)); 6242: return m_pimpl->get_data(); 6242: } 6242: boost::shared_ptr get_named_subs()const 6242: { 6242: return m_pimpl; 6242: } 6242: 6242: private: 6242: shared_ptr > m_pimpl; 6242: }; 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: template 6242: basic_regex& basic_regex::do_assign(const charT* p1, 6242: const charT* p2, 6242: flag_type f) 6242: { 6242: shared_ptr > temp; 6242: if(!m_pimpl.get()) 6242: { 6242: temp = shared_ptr >(new re_detail_106501::basic_regex_implementation()); 6242: } 6242: else 6242: { 6242: temp = shared_ptr >(new re_detail_106501::basic_regex_implementation(m_pimpl->m_ptraits)); 6242: } 6242: temp->assign(p1, p2, f); 6242: temp.swap(m_pimpl); 6242: return *this; 6242: } 6242: 6242: template 6242: typename basic_regex::locale_type basic_regex::imbue(locale_type l) 6242: { 6242: shared_ptr > temp(new re_detail_106501::basic_regex_implementation()); 6242: locale_type result = temp->imbue(l); 6242: temp.swap(m_pimpl); 6242: return result; 6242: } 6242: 6242: 6242: 6242: 6242: template 6242: void swap(basic_regex& e1, basic_regex& e2) 6242: { 6242: e1.swap(e2); 6242: } 6242: 6242: 6242: template 6242: std::basic_ostream& 6242: operator << (std::basic_ostream& os, 6242: const basic_regex& e) 6242: { 6242: return (os << e.str()); 6242: } 6242: # 707 "/usr/include/boost/regex/v4/basic_regex.hpp" 3 4 6242: template 6242: 6242: class reg_expression : public basic_regex 6242: { 6242: public: 6242: typedef typename basic_regex::flag_type flag_type; 6242: typedef typename basic_regex::size_type size_type; 6242: explicit reg_expression(){} 6242: explicit reg_expression(const charT* p, flag_type f = regex_constants::normal) 6242: : basic_regex(p, f){} 6242: reg_expression(const charT* p1, const charT* p2, flag_type f = regex_constants::normal) 6242: : basic_regex(p1, p2, f){} 6242: reg_expression(const charT* p, size_type len, flag_type f) 6242: : basic_regex(p, len, f){} 6242: reg_expression(const reg_expression& that) 6242: : basic_regex(that) {} 6242: ~reg_expression(){} 6242: reg_expression& operator=(const reg_expression& that) 6242: { 6242: return this->assign(that); 6242: } 6242: 6242: 6242: template 6242: explicit reg_expression(const std::basic_string& p, flag_type f = regex_constants::normal) 6242: : basic_regex(p, f) 6242: { 6242: } 6242: 6242: template 6242: reg_expression(InputIterator arg_first, InputIterator arg_last, flag_type f = regex_constants::normal) 6242: : basic_regex(arg_first, arg_last, f) 6242: { 6242: } 6242: 6242: template 6242: reg_expression& operator=(const std::basic_string& p) 6242: { 6242: this->assign(p); 6242: return *this; 6242: } 6242: # 761 "/usr/include/boost/regex/v4/basic_regex.hpp" 3 4 6242: }; 6242: 6242: 6242: 6242: 6242: 6242: } 6242: # 68 "/usr/include/boost/regex/v4/regex.hpp" 2 3 4 6242: 6242: 6242: # 1 "/usr/include/boost/regex/v4/basic_regex_creator.hpp" 1 3 4 6242: # 39 "/usr/include/boost/regex/v4/basic_regex_creator.hpp" 3 4 6242: namespace boost{ 6242: 6242: namespace re_detail_106501{ 6242: 6242: template 6242: struct digraph : public std::pair 6242: { 6242: digraph() : std::pair(0, 0){} 6242: digraph(charT c1) : std::pair(c1, 0){} 6242: digraph(charT c1, charT c2) : std::pair(c1, c2) 6242: {} 6242: digraph(const digraph& d) : std::pair(d.first, d.second){} 6242: template 6242: digraph(const Seq& s) : std::pair() 6242: { 6242: (static_cast (s.size() <= 2) ? void (0) : __assert_fail ("s.size() <= 2", "/usr/include/boost/regex/v4/basic_regex_creator.hpp", 54, __extension__ __PRETTY_FUNCTION__)); 6242: (static_cast (s.size()) ? void (0) : __assert_fail ("s.size()", "/usr/include/boost/regex/v4/basic_regex_creator.hpp", 55, __extension__ __PRETTY_FUNCTION__)); 6242: this->first = s[0]; 6242: this->second = (s.size() > 1) ? s[1] : 0; 6242: } 6242: }; 6242: 6242: template 6242: class basic_char_set 6242: { 6242: public: 6242: typedef digraph digraph_type; 6242: typedef typename traits::string_type string_type; 6242: typedef typename traits::char_class_type m_type; 6242: 6242: basic_char_set() 6242: { 6242: m_negate = false; 6242: m_has_digraphs = false; 6242: m_classes = 0; 6242: m_negated_classes = 0; 6242: m_empty = true; 6242: } 6242: 6242: void add_single(const digraph_type& s) 6242: { 6242: m_singles.insert(s); 6242: if(s.second) 6242: m_has_digraphs = true; 6242: m_empty = false; 6242: } 6242: void add_range(const digraph_type& first, const digraph_type& end) 6242: { 6242: m_ranges.push_back(first); 6242: m_ranges.push_back(end); 6242: if(first.second) 6242: { 6242: m_has_digraphs = true; 6242: add_single(first); 6242: } 6242: if(end.second) 6242: { 6242: m_has_digraphs = true; 6242: add_single(end); 6242: } 6242: m_empty = false; 6242: } 6242: void add_class(m_type m) 6242: { 6242: m_classes |= m; 6242: m_empty = false; 6242: } 6242: void add_negated_class(m_type m) 6242: { 6242: m_negated_classes |= m; 6242: m_empty = false; 6242: } 6242: void add_equivalent(const digraph_type& s) 6242: { 6242: m_equivalents.insert(s); 6242: if(s.second) 6242: { 6242: m_has_digraphs = true; 6242: add_single(s); 6242: } 6242: m_empty = false; 6242: } 6242: void negate() 6242: { 6242: m_negate = true; 6242: 6242: } 6242: 6242: 6242: 6242: 6242: bool has_digraphs()const 6242: { 6242: return m_has_digraphs; 6242: } 6242: bool is_negated()const 6242: { 6242: return m_negate; 6242: } 6242: typedef typename std::vector::const_iterator list_iterator; 6242: typedef typename std::set::const_iterator set_iterator; 6242: set_iterator singles_begin()const 6242: { 6242: return m_singles.begin(); 6242: } 6242: set_iterator singles_end()const 6242: { 6242: return m_singles.end(); 6242: } 6242: list_iterator ranges_begin()const 6242: { 6242: return m_ranges.begin(); 6242: } 6242: list_iterator ranges_end()const 6242: { 6242: return m_ranges.end(); 6242: } 6242: set_iterator equivalents_begin()const 6242: { 6242: return m_equivalents.begin(); 6242: } 6242: set_iterator equivalents_end()const 6242: { 6242: return m_equivalents.end(); 6242: } 6242: m_type classes()const 6242: { 6242: return m_classes; 6242: } 6242: m_type negated_classes()const 6242: { 6242: return m_negated_classes; 6242: } 6242: bool empty()const 6242: { 6242: return m_empty; 6242: } 6242: private: 6242: std::set m_singles; 6242: std::vector m_ranges; 6242: bool m_negate; 6242: bool m_has_digraphs; 6242: m_type m_classes; 6242: m_type m_negated_classes; 6242: bool m_empty; 6242: std::set m_equivalents; 6242: }; 6242: 6242: template 6242: class basic_regex_creator 6242: { 6242: public: 6242: basic_regex_creator(regex_data* data); 6242: std::ptrdiff_t getoffset(void* addr) 6242: { 6242: return getoffset(addr, m_pdata->m_data.data()); 6242: } 6242: std::ptrdiff_t getoffset(const void* addr, const void* base) 6242: { 6242: return static_cast(addr) - static_cast(base); 6242: } 6242: re_syntax_base* getaddress(std::ptrdiff_t off) 6242: { 6242: return getaddress(off, m_pdata->m_data.data()); 6242: } 6242: re_syntax_base* getaddress(std::ptrdiff_t off, void* base) 6242: { 6242: return static_cast(static_cast(static_cast(base) + off)); 6242: } 6242: void init(unsigned l_flags) 6242: { 6242: m_pdata->m_flags = l_flags; 6242: m_icase = l_flags & regex_constants::icase; 6242: } 6242: regbase::flag_type flags() 6242: { 6242: return m_pdata->m_flags; 6242: } 6242: void flags(regbase::flag_type f) 6242: { 6242: m_pdata->m_flags = f; 6242: if(m_icase != static_cast(f & regbase::icase)) 6242: { 6242: m_icase = static_cast(f & regbase::icase); 6242: } 6242: } 6242: re_syntax_base* append_state(syntax_element_type t, std::size_t s = sizeof(re_syntax_base)); 6242: re_syntax_base* insert_state(std::ptrdiff_t pos, syntax_element_type t, std::size_t s = sizeof(re_syntax_base)); 6242: re_literal* append_literal(charT c); 6242: re_syntax_base* append_set(const basic_char_set& char_set); 6242: re_syntax_base* append_set(const basic_char_set& char_set, mpl::false_*); 6242: re_syntax_base* append_set(const basic_char_set& char_set, mpl::true_*); 6242: void finalize(const charT* p1, const charT* p2); 6242: protected: 6242: regex_data* m_pdata; 6242: const ::boost::regex_traits_wrapper& 6242: m_traits; 6242: re_syntax_base* m_last_state; 6242: bool m_icase; 6242: unsigned m_repeater_id; 6242: bool m_has_backrefs; 6242: unsigned m_backrefs; 6242: boost::uintmax_t m_bad_repeats; 6242: bool m_has_recursions; 6242: std::vector m_recursion_checks; 6242: typename traits::char_class_type m_word_mask; 6242: typename traits::char_class_type m_mask_space; 6242: typename traits::char_class_type m_lower_mask; 6242: typename traits::char_class_type m_upper_mask; 6242: typename traits::char_class_type m_alpha_mask; 6242: private: 6242: basic_regex_creator& operator=(const basic_regex_creator&); 6242: basic_regex_creator(const basic_regex_creator&); 6242: 6242: void fixup_pointers(re_syntax_base* state); 6242: void fixup_recursions(re_syntax_base* state); 6242: void create_startmaps(re_syntax_base* state); 6242: int calculate_backstep(re_syntax_base* state); 6242: void create_startmap(re_syntax_base* state, unsigned char* l_map, unsigned int* pnull, unsigned char mask); 6242: unsigned get_restart_type(re_syntax_base* state); 6242: void set_all_masks(unsigned char* bits, unsigned char); 6242: bool is_bad_repeat(re_syntax_base* pt); 6242: void set_bad_repeat(re_syntax_base* pt); 6242: syntax_element_type get_repeat_type(re_syntax_base* state); 6242: void probe_leading_repeat(re_syntax_base* state); 6242: }; 6242: 6242: template 6242: basic_regex_creator::basic_regex_creator(regex_data* data) 6242: : m_pdata(data), m_traits(*(data->m_ptraits)), m_last_state(0), m_repeater_id(0), m_has_backrefs(false), m_backrefs(0), m_has_recursions(false) 6242: { 6242: m_pdata->m_data.clear(); 6242: m_pdata->m_status = ::boost::regex_constants::error_ok; 6242: static const charT w = 'w'; 6242: static const charT s = 's'; 6242: static const charT l[5] = { 'l', 'o', 'w', 'e', 'r', }; 6242: static const charT u[5] = { 'u', 'p', 'p', 'e', 'r', }; 6242: static const charT a[5] = { 'a', 'l', 'p', 'h', 'a', }; 6242: m_word_mask = m_traits.lookup_classname(&w, &w +1); 6242: m_mask_space = m_traits.lookup_classname(&s, &s +1); 6242: m_lower_mask = m_traits.lookup_classname(l, l + 5); 6242: m_upper_mask = m_traits.lookup_classname(u, u + 5); 6242: m_alpha_mask = m_traits.lookup_classname(a, a + 5); 6242: m_pdata->m_word_mask = m_word_mask; 6242: (static_cast (m_word_mask != 0) ? void (0) : __assert_fail ("m_word_mask != 0", "/usr/include/boost/regex/v4/basic_regex_creator.hpp", 283, __extension__ __PRETTY_FUNCTION__)); 6242: (static_cast (m_mask_space != 0) ? void (0) : __assert_fail ("m_mask_space != 0", "/usr/include/boost/regex/v4/basic_regex_creator.hpp", 284, __extension__ __PRETTY_FUNCTION__)); 6242: (static_cast (m_lower_mask != 0) ? void (0) : __assert_fail ("m_lower_mask != 0", "/usr/include/boost/regex/v4/basic_regex_creator.hpp", 285, __extension__ __PRETTY_FUNCTION__)); 6242: (static_cast (m_upper_mask != 0) ? void (0) : __assert_fail ("m_upper_mask != 0", "/usr/include/boost/regex/v4/basic_regex_creator.hpp", 286, __extension__ __PRETTY_FUNCTION__)); 6242: (static_cast (m_alpha_mask != 0) ? void (0) : __assert_fail ("m_alpha_mask != 0", "/usr/include/boost/regex/v4/basic_regex_creator.hpp", 287, __extension__ __PRETTY_FUNCTION__)); 6242: } 6242: 6242: template 6242: re_syntax_base* basic_regex_creator::append_state(syntax_element_type t, std::size_t s) 6242: { 6242: 6242: if(t == syntax_element_backref) 6242: this->m_has_backrefs = true; 6242: 6242: m_pdata->m_data.align(); 6242: 6242: if(m_last_state) 6242: m_last_state->next.i = m_pdata->m_data.size() - getoffset(m_last_state); 6242: 6242: m_last_state = static_cast(m_pdata->m_data.extend(s)); 6242: 6242: m_last_state->next.i = 0; 6242: m_last_state->type = t; 6242: return m_last_state; 6242: } 6242: 6242: template 6242: re_syntax_base* basic_regex_creator::insert_state(std::ptrdiff_t pos, syntax_element_type t, std::size_t s) 6242: { 6242: 6242: m_pdata->m_data.align(); 6242: 6242: if(m_last_state) 6242: m_last_state->next.i = m_pdata->m_data.size() - getoffset(m_last_state); 6242: 6242: std::ptrdiff_t off = getoffset(m_last_state) + s; 6242: 6242: re_syntax_base* new_state = static_cast(m_pdata->m_data.insert(pos, s)); 6242: 6242: new_state->next.i = s; 6242: new_state->type = t; 6242: m_last_state = getaddress(off); 6242: return new_state; 6242: } 6242: 6242: template 6242: re_literal* basic_regex_creator::append_literal(charT c) 6242: { 6242: re_literal* result; 6242: 6242: if((0 == m_last_state) || (m_last_state->type != syntax_element_literal)) 6242: { 6242: 6242: result = static_cast(append_state(syntax_element_literal, sizeof(re_literal) + sizeof(charT))); 6242: result->length = 1; 6242: *static_cast(static_cast(result+1)) = m_traits.translate(c, m_icase); 6242: } 6242: else 6242: { 6242: 6242: std::ptrdiff_t off = getoffset(m_last_state); 6242: m_pdata->m_data.extend(sizeof(charT)); 6242: m_last_state = result = static_cast(getaddress(off)); 6242: charT* characters = static_cast(static_cast(result+1)); 6242: characters[result->length] = m_traits.translate(c, m_icase); 6242: result->length += 1; 6242: } 6242: return result; 6242: } 6242: 6242: template 6242: inline re_syntax_base* basic_regex_creator::append_set( 6242: const basic_char_set& char_set) 6242: { 6242: typedef mpl::bool_< (sizeof(charT) == 1) > truth_type; 6242: return char_set.has_digraphs() 6242: ? append_set(char_set, static_cast(0)) 6242: : append_set(char_set, static_cast(0)); 6242: } 6242: 6242: template 6242: re_syntax_base* basic_regex_creator::append_set( 6242: const basic_char_set& char_set, mpl::false_*) 6242: { 6242: typedef typename traits::string_type string_type; 6242: typedef typename basic_char_set::list_iterator item_iterator; 6242: typedef typename basic_char_set::set_iterator set_iterator; 6242: typedef typename traits::char_class_type m_type; 6242: 6242: re_set_long* result = static_cast*>(append_state(syntax_element_long_set, sizeof(re_set_long))); 6242: 6242: 6242: 6242: result->csingles = static_cast(::boost::re_detail_106501::distance(char_set.singles_begin(), char_set.singles_end())); 6242: result->cranges = static_cast(::boost::re_detail_106501::distance(char_set.ranges_begin(), char_set.ranges_end())) / 2; 6242: result->cequivalents = static_cast(::boost::re_detail_106501::distance(char_set.equivalents_begin(), char_set.equivalents_end())); 6242: result->cclasses = char_set.classes(); 6242: result->cnclasses = char_set.negated_classes(); 6242: if(flags() & regbase::icase) 6242: { 6242: 6242: if(((result->cclasses & m_lower_mask) == m_lower_mask) || ((result->cclasses & m_upper_mask) == m_upper_mask)) 6242: result->cclasses |= m_alpha_mask; 6242: if(((result->cnclasses & m_lower_mask) == m_lower_mask) || ((result->cnclasses & m_upper_mask) == m_upper_mask)) 6242: result->cnclasses |= m_alpha_mask; 6242: } 6242: 6242: result->isnot = char_set.is_negated(); 6242: result->singleton = !char_set.has_digraphs(); 6242: 6242: 6242: 6242: std::ptrdiff_t offset = getoffset(result); 6242: 6242: 6242: 6242: item_iterator first, last; 6242: set_iterator sfirst, slast; 6242: sfirst = char_set.singles_begin(); 6242: slast = char_set.singles_end(); 6242: while(sfirst != slast) 6242: { 6242: charT* p = static_cast(this->m_pdata->m_data.extend(sizeof(charT) * (sfirst->first == static_cast(0) ? 1 : sfirst->second ? 3 : 2))); 6242: p[0] = m_traits.translate(sfirst->first, m_icase); 6242: if(sfirst->first == static_cast(0)) 6242: { 6242: p[0] = 0; 6242: } 6242: else if(sfirst->second) 6242: { 6242: p[1] = m_traits.translate(sfirst->second, m_icase); 6242: p[2] = 0; 6242: } 6242: else 6242: p[1] = 0; 6242: ++sfirst; 6242: } 6242: 6242: 6242: 6242: first = char_set.ranges_begin(); 6242: last = char_set.ranges_end(); 6242: while(first != last) 6242: { 6242: 6242: digraph c1 = *first; 6242: c1.first = this->m_traits.translate(c1.first, this->m_icase); 6242: c1.second = this->m_traits.translate(c1.second, this->m_icase); 6242: ++first; 6242: digraph c2 = *first; 6242: c2.first = this->m_traits.translate(c2.first, this->m_icase); 6242: c2.second = this->m_traits.translate(c2.second, this->m_icase); 6242: ++first; 6242: string_type s1, s2; 6242: 6242: if(flags() & regex_constants::collate) 6242: { 6242: 6242: charT a1[3] = { c1.first, c1.second, charT(0), }; 6242: charT a2[3] = { c2.first, c2.second, charT(0), }; 6242: s1 = this->m_traits.transform(a1, (a1[1] ? a1+2 : a1+1)); 6242: s2 = this->m_traits.transform(a2, (a2[1] ? a2+2 : a2+1)); 6242: if(s1.size() == 0) 6242: s1 = string_type(1, charT(0)); 6242: if(s2.size() == 0) 6242: s2 = string_type(1, charT(0)); 6242: } 6242: else 6242: { 6242: if(c1.second) 6242: { 6242: s1.insert(s1.end(), c1.first); 6242: s1.insert(s1.end(), c1.second); 6242: } 6242: else 6242: s1 = string_type(1, c1.first); 6242: if(c2.second) 6242: { 6242: s2.insert(s2.end(), c2.first); 6242: s2.insert(s2.end(), c2.second); 6242: } 6242: else 6242: s2.insert(s2.end(), c2.first); 6242: } 6242: if(s1 > s2) 6242: { 6242: 6242: return 0; 6242: } 6242: charT* p = static_cast(this->m_pdata->m_data.extend(sizeof(charT) * (s1.size() + s2.size() + 2) ) ); 6242: re_detail_106501::copy(s1.begin(), s1.end(), p); 6242: p[s1.size()] = charT(0); 6242: p += s1.size() + 1; 6242: re_detail_106501::copy(s2.begin(), s2.end(), p); 6242: p[s2.size()] = charT(0); 6242: } 6242: 6242: 6242: 6242: sfirst = char_set.equivalents_begin(); 6242: slast = char_set.equivalents_end(); 6242: while(sfirst != slast) 6242: { 6242: string_type s; 6242: if(sfirst->second) 6242: { 6242: charT cs[3] = { sfirst->first, sfirst->second, charT(0), }; 6242: s = m_traits.transform_primary(cs, cs+2); 6242: } 6242: else 6242: s = m_traits.transform_primary(&sfirst->first, &sfirst->first+1); 6242: if(s.empty()) 6242: return 0; 6242: charT* p = static_cast(this->m_pdata->m_data.extend(sizeof(charT) * (s.size()+1) ) ); 6242: re_detail_106501::copy(s.begin(), s.end(), p); 6242: p[s.size()] = charT(0); 6242: ++sfirst; 6242: } 6242: 6242: 6242: 6242: m_last_state = result = static_cast*>(getaddress(offset)); 6242: return result; 6242: } 6242: 6242: template 6242: inline bool char_less(T t1, T t2) 6242: { 6242: return t1 < t2; 6242: } 6242: inline bool char_less(char t1, char t2) 6242: { 6242: return static_cast(t1) < static_cast(t2); 6242: } 6242: inline bool char_less(signed char t1, signed char t2) 6242: { 6242: return static_cast(t1) < static_cast(t2); 6242: } 6242: 6242: template 6242: re_syntax_base* basic_regex_creator::append_set( 6242: const basic_char_set& char_set, mpl::true_*) 6242: { 6242: typedef typename traits::string_type string_type; 6242: typedef typename basic_char_set::list_iterator item_iterator; 6242: typedef typename basic_char_set::set_iterator set_iterator; 6242: 6242: re_set* result = static_cast(append_state(syntax_element_set, sizeof(re_set))); 6242: bool negate = char_set.is_negated(); 6242: std::memset(result->_map, 0, sizeof(result->_map)); 6242: 6242: 6242: 6242: item_iterator first, last; 6242: set_iterator sfirst, slast; 6242: sfirst = char_set.singles_begin(); 6242: slast = char_set.singles_end(); 6242: while(sfirst != slast) 6242: { 6242: for(unsigned int i = 0; i < (1 << 8); ++i) 6242: { 6242: if(this->m_traits.translate(static_cast(i), this->m_icase) 6242: == this->m_traits.translate(sfirst->first, this->m_icase)) 6242: result->_map[i] = true; 6242: } 6242: ++sfirst; 6242: } 6242: 6242: 6242: 6242: first = char_set.ranges_begin(); 6242: last = char_set.ranges_end(); 6242: while(first != last) 6242: { 6242: 6242: charT c1 = this->m_traits.translate(first->first, this->m_icase); 6242: ++first; 6242: charT c2 = this->m_traits.translate(first->first, this->m_icase); 6242: ++first; 6242: 6242: if(flags() & regex_constants::collate) 6242: { 6242: 6242: charT c3[2] = { c1, charT(0), }; 6242: string_type s1 = this->m_traits.transform(c3, c3+1); 6242: c3[0] = c2; 6242: string_type s2 = this->m_traits.transform(c3, c3+1); 6242: if(s1 > s2) 6242: { 6242: 6242: return 0; 6242: } 6242: (static_cast (c3[1] == charT(0)) ? void (0) : __assert_fail ("c3[1] == charT(0)", "/usr/include/boost/regex/v4/basic_regex_creator.hpp", 575, __extension__ __PRETTY_FUNCTION__)); 6242: for(unsigned i = 0; i < (1u << 8); ++i) 6242: { 6242: c3[0] = static_cast(i); 6242: string_type s3 = this->m_traits.transform(c3, c3 +1); 6242: if((s1 <= s3) && (s3 <= s2)) 6242: result->_map[i] = true; 6242: } 6242: } 6242: else 6242: { 6242: if(char_less(c2, c1)) 6242: { 6242: 6242: return 0; 6242: } 6242: 6242: std::memset(result->_map + static_cast(c1), true, 1 + static_cast(c2) - static_cast(c1)); 6242: } 6242: } 6242: 6242: 6242: 6242: typedef typename traits::char_class_type m_type; 6242: m_type m = char_set.classes(); 6242: if(flags() & regbase::icase) 6242: { 6242: 6242: if(((m & m_lower_mask) == m_lower_mask) || ((m & m_upper_mask) == m_upper_mask)) 6242: m |= m_alpha_mask; 6242: } 6242: if(m != 0) 6242: { 6242: for(unsigned i = 0; i < (1u << 8); ++i) 6242: { 6242: if(this->m_traits.isctype(static_cast(i), m)) 6242: result->_map[i] = true; 6242: } 6242: } 6242: 6242: 6242: 6242: m = char_set.negated_classes(); 6242: if(flags() & regbase::icase) 6242: { 6242: 6242: if(((m & m_lower_mask) == m_lower_mask) || ((m & m_upper_mask) == m_upper_mask)) 6242: m |= m_alpha_mask; 6242: } 6242: if(m != 0) 6242: { 6242: for(unsigned i = 0; i < (1u << 8); ++i) 6242: { 6242: if(0 == this->m_traits.isctype(static_cast(i), m)) 6242: result->_map[i] = true; 6242: } 6242: } 6242: 6242: 6242: 6242: sfirst = char_set.equivalents_begin(); 6242: slast = char_set.equivalents_end(); 6242: while(sfirst != slast) 6242: { 6242: string_type s; 6242: (static_cast (static_cast(0) == sfirst->second) ? void (0) : __assert_fail ("static_cast(0) == sfirst->second", "/usr/include/boost/regex/v4/basic_regex_creator.hpp", 640, __extension__ __PRETTY_FUNCTION__)); 6242: s = m_traits.transform_primary(&sfirst->first, &sfirst->first+1); 6242: if(s.empty()) 6242: return 0; 6242: for(unsigned i = 0; i < (1u << 8); ++i) 6242: { 6242: charT c[2] = { (static_cast(i)), charT(0), }; 6242: string_type s2 = this->m_traits.transform_primary(c, c+1); 6242: if(s == s2) 6242: result->_map[i] = true; 6242: } 6242: ++sfirst; 6242: } 6242: if(negate) 6242: { 6242: for(unsigned i = 0; i < (1u << 8); ++i) 6242: { 6242: result->_map[i] = !(result->_map[i]); 6242: } 6242: } 6242: return result; 6242: } 6242: 6242: template 6242: void basic_regex_creator::finalize(const charT* p1, const charT* p2) 6242: { 6242: if(this->m_pdata->m_status) 6242: return; 6242: 6242: 6242: append_state(syntax_element_match); 6242: 6242: std::ptrdiff_t len = p2 - p1; 6242: m_pdata->m_expression_len = len; 6242: charT* ps = static_cast(m_pdata->m_data.extend(sizeof(charT) * (1 + (p2 - p1)))); 6242: m_pdata->m_expression = ps; 6242: re_detail_106501::copy(p1, p2, ps); 6242: ps[p2 - p1] = 0; 6242: 6242: 6242: m_pdata->m_status = 0; 6242: 6242: m_pdata->m_first_state = static_cast(m_pdata->m_data.data()); 6242: 6242: fixup_pointers(m_pdata->m_first_state); 6242: if(m_has_recursions) 6242: { 6242: m_pdata->m_has_recursions = true; 6242: fixup_recursions(m_pdata->m_first_state); 6242: if(this->m_pdata->m_status) 6242: return; 6242: } 6242: else 6242: m_pdata->m_has_recursions = false; 6242: 6242: create_startmaps(m_pdata->m_first_state); 6242: 6242: std::memset(m_pdata->m_startmap, 0, sizeof(m_pdata->m_startmap)); 6242: m_pdata->m_can_be_null = 0; 6242: 6242: m_bad_repeats = 0; 6242: if(m_has_recursions) 6242: m_recursion_checks.assign(1 + m_pdata->m_mark_count, 0u); 6242: create_startmap(m_pdata->m_first_state, m_pdata->m_startmap, &(m_pdata->m_can_be_null), mask_all); 6242: 6242: m_pdata->m_restart_type = get_restart_type(m_pdata->m_first_state); 6242: 6242: probe_leading_repeat(m_pdata->m_first_state); 6242: } 6242: 6242: template 6242: void basic_regex_creator::fixup_pointers(re_syntax_base* state) 6242: { 6242: while(state) 6242: { 6242: switch(state->type) 6242: { 6242: case syntax_element_recurse: 6242: m_has_recursions = true; 6242: if(state->next.i) 6242: state->next.p = getaddress(state->next.i, state); 6242: else 6242: state->next.p = 0; 6242: break; 6242: case syntax_element_rep: 6242: case syntax_element_dot_rep: 6242: case syntax_element_char_rep: 6242: case syntax_element_short_set_rep: 6242: case syntax_element_long_set_rep: 6242: 6242: static_cast(state)->state_id = m_repeater_id++; 6242: __attribute__((fallthrough)); 6242: case syntax_element_alt: 6242: std::memset(static_cast(state)->_map, 0, sizeof(static_cast(state)->_map)); 6242: static_cast(state)->can_be_null = 0; 6242: __attribute__((fallthrough)); 6242: case syntax_element_jump: 6242: static_cast(state)->alt.p = getaddress(static_cast(state)->alt.i, state); 6242: __attribute__((fallthrough)); 6242: default: 6242: if(state->next.i) 6242: state->next.p = getaddress(state->next.i, state); 6242: else 6242: state->next.p = 0; 6242: } 6242: state = state->next.p; 6242: } 6242: } 6242: 6242: template 6242: void basic_regex_creator::fixup_recursions(re_syntax_base* state) 6242: { 6242: re_syntax_base* base = state; 6242: while(state) 6242: { 6242: switch(state->type) 6242: { 6242: case syntax_element_assert_backref: 6242: { 6242: 6242: int idx = static_cast(state)->index; 6242: if(idx < 0) 6242: { 6242: idx = -idx-1; 6242: if(idx >= 10000) 6242: { 6242: idx = m_pdata->get_id(idx); 6242: if(idx <= 0) 6242: { 6242: 6242: if(0 == this->m_pdata->m_status) 6242: this->m_pdata->m_status = boost::regex_constants::error_bad_pattern; 6242: 6242: 6242: 6242: this->m_pdata->m_expression = 0; 6242: this->m_pdata->m_expression_len = 0; 6242: 6242: 6242: 6242: if(0 == (this->flags() & regex_constants::no_except)) 6242: { 6242: std::string message = "Encountered a forward reference to a marked sub-expression that does not exist."; 6242: boost::regex_error e(message, boost::regex_constants::error_bad_pattern, 0); 6242: e.raise(); 6242: } 6242: } 6242: } 6242: } 6242: } 6242: break; 6242: case syntax_element_recurse: 6242: { 6242: bool ok = false; 6242: re_syntax_base* p = base; 6242: std::ptrdiff_t idx = static_cast(state)->alt.i; 6242: if(idx > 10000) 6242: { 6242: 6242: 6242: 6242: 6242: idx = m_pdata->get_id(static_cast(idx)); 6242: } 6242: if(idx < 0) 6242: { 6242: ok = false; 6242: } 6242: else 6242: { 6242: while(p) 6242: { 6242: if((p->type == syntax_element_startmark) && (static_cast(p)->index == idx)) 6242: { 6242: 6242: 6242: 6242: static_cast(state)->alt.p = p; 6242: ok = true; 6242: 6242: 6242: 6242: p = p->next.p; 6242: int next_rep_id = 0; 6242: while(p) 6242: { 6242: switch(p->type) 6242: { 6242: case syntax_element_rep: 6242: case syntax_element_dot_rep: 6242: case syntax_element_char_rep: 6242: case syntax_element_short_set_rep: 6242: case syntax_element_long_set_rep: 6242: next_rep_id = static_cast(p)->state_id; 6242: break; 6242: case syntax_element_endmark: 6242: if(static_cast(p)->index == idx) 6242: next_rep_id = -1; 6242: break; 6242: default: 6242: break; 6242: } 6242: if(next_rep_id) 6242: break; 6242: p = p->next.p; 6242: } 6242: if(next_rep_id > 0) 6242: { 6242: static_cast(state)->state_id = next_rep_id - 1; 6242: } 6242: 6242: break; 6242: } 6242: p = p->next.p; 6242: } 6242: } 6242: if(!ok) 6242: { 6242: 6242: if(0 == this->m_pdata->m_status) 6242: this->m_pdata->m_status = boost::regex_constants::error_bad_pattern; 6242: 6242: 6242: 6242: this->m_pdata->m_expression = 0; 6242: this->m_pdata->m_expression_len = 0; 6242: 6242: 6242: 6242: if(0 == (this->flags() & regex_constants::no_except)) 6242: { 6242: std::string message = "Encountered a forward reference to a recursive sub-expression that does not exist."; 6242: boost::regex_error e(message, boost::regex_constants::error_bad_pattern, 0); 6242: e.raise(); 6242: } 6242: } 6242: } 6242: break; 6242: default: 6242: break; 6242: } 6242: state = state->next.p; 6242: } 6242: } 6242: 6242: template 6242: void basic_regex_creator::create_startmaps(re_syntax_base* state) 6242: { 6242: # 896 "/usr/include/boost/regex/v4/basic_regex_creator.hpp" 3 4 6242: bool l_icase = m_icase; 6242: std::vector > v; 6242: 6242: while(state) 6242: { 6242: switch(state->type) 6242: { 6242: case syntax_element_toggle_case: 6242: 6242: m_icase = static_cast(state)->icase; 6242: state = state->next.p; 6242: continue; 6242: case syntax_element_alt: 6242: case syntax_element_rep: 6242: case syntax_element_dot_rep: 6242: case syntax_element_char_rep: 6242: case syntax_element_short_set_rep: 6242: case syntax_element_long_set_rep: 6242: 6242: v.push_back(std::pair(m_icase, state)); 6242: state = state->next.p; 6242: break; 6242: case syntax_element_backstep: 6242: 6242: static_cast(state)->index 6242: = this->calculate_backstep(state->next.p); 6242: if(static_cast(state)->index < 0) 6242: { 6242: 6242: if(0 == this->m_pdata->m_status) 6242: this->m_pdata->m_status = boost::regex_constants::error_bad_pattern; 6242: 6242: 6242: 6242: this->m_pdata->m_expression = 0; 6242: this->m_pdata->m_expression_len = 0; 6242: 6242: 6242: 6242: if(0 == (this->flags() & regex_constants::no_except)) 6242: { 6242: std::string message = "Invalid lookbehind assertion encountered in the regular expression."; 6242: boost::regex_error e(message, boost::regex_constants::error_bad_pattern, 0); 6242: e.raise(); 6242: } 6242: } 6242: __attribute__((fallthrough)); 6242: default: 6242: state = state->next.p; 6242: } 6242: } 6242: 6242: 6242: while(v.size()) 6242: { 6242: 6242: if(m_has_recursions) 6242: m_recursion_checks.assign(1 + m_pdata->m_mark_count, 0u); 6242: 6242: const std::pair& p = v.back(); 6242: m_icase = p.first; 6242: state = p.second; 6242: v.pop_back(); 6242: 6242: 6242: m_bad_repeats = 0; 6242: create_startmap(state->next.p, static_cast(state)->_map, &static_cast(state)->can_be_null, mask_take); 6242: m_bad_repeats = 0; 6242: 6242: if(m_has_recursions) 6242: m_recursion_checks.assign(1 + m_pdata->m_mark_count, 0u); 6242: create_startmap(static_cast(state)->alt.p, static_cast(state)->_map, &static_cast(state)->can_be_null, mask_skip); 6242: 6242: state->type = this->get_repeat_type(state); 6242: } 6242: 6242: m_icase = l_icase; 6242: } 6242: 6242: template 6242: int basic_regex_creator::calculate_backstep(re_syntax_base* state) 6242: { 6242: typedef typename traits::char_class_type m_type; 6242: int result = 0; 6242: while(state) 6242: { 6242: switch(state->type) 6242: { 6242: case syntax_element_startmark: 6242: if((static_cast(state)->index == -1) 6242: || (static_cast(state)->index == -2)) 6242: { 6242: state = static_cast(state->next.p)->alt.p->next.p; 6242: continue; 6242: } 6242: else if(static_cast(state)->index == -3) 6242: { 6242: state = state->next.p->next.p; 6242: continue; 6242: } 6242: break; 6242: case syntax_element_endmark: 6242: if((static_cast(state)->index == -1) 6242: || (static_cast(state)->index == -2)) 6242: return result; 6242: break; 6242: case syntax_element_literal: 6242: result += static_cast(state)->length; 6242: break; 6242: case syntax_element_wild: 6242: case syntax_element_set: 6242: result += 1; 6242: break; 6242: case syntax_element_dot_rep: 6242: case syntax_element_char_rep: 6242: case syntax_element_short_set_rep: 6242: case syntax_element_backref: 6242: case syntax_element_rep: 6242: case syntax_element_combining: 6242: case syntax_element_long_set_rep: 6242: case syntax_element_backstep: 6242: { 6242: re_repeat* rep = static_cast(state); 6242: 6242: state->type = this->get_repeat_type(state); 6242: if((state->type == syntax_element_dot_rep) 6242: || (state->type == syntax_element_char_rep) 6242: || (state->type == syntax_element_short_set_rep)) 6242: { 6242: if(rep->max != rep->min) 6242: return -1; 6242: result += static_cast(rep->min); 6242: state = rep->alt.p; 6242: continue; 6242: } 6242: else if(state->type == syntax_element_long_set_rep) 6242: { 6242: (static_cast (rep->next.p->type == syntax_element_long_set) ? void (0) : __assert_fail ("rep->next.p->type == syntax_element_long_set", "/usr/include/boost/regex/v4/basic_regex_creator.hpp", 1033, __extension__ __PRETTY_FUNCTION__)); 6242: if(static_cast*>(rep->next.p)->singleton == 0) 6242: return -1; 6242: if(rep->max != rep->min) 6242: return -1; 6242: result += static_cast(rep->min); 6242: state = rep->alt.p; 6242: continue; 6242: } 6242: } 6242: return -1; 6242: case syntax_element_long_set: 6242: if(static_cast*>(state)->singleton == 0) 6242: return -1; 6242: result += 1; 6242: break; 6242: case syntax_element_jump: 6242: state = static_cast(state)->alt.p; 6242: continue; 6242: case syntax_element_alt: 6242: { 6242: int r1 = calculate_backstep(state->next.p); 6242: int r2 = calculate_backstep(static_cast(state)->alt.p); 6242: if((r1 < 0) || (r1 != r2)) 6242: return -1; 6242: return result + r1; 6242: } 6242: default: 6242: break; 6242: } 6242: state = state->next.p; 6242: } 6242: return -1; 6242: } 6242: 6242: template 6242: void basic_regex_creator::create_startmap(re_syntax_base* state, unsigned char* l_map, unsigned int* pnull, unsigned char mask) 6242: { 6242: int not_last_jump = 1; 6242: re_syntax_base* recursion_start = 0; 6242: int recursion_sub = 0; 6242: re_syntax_base* recursion_restart = 0; 6242: 6242: 6242: bool l_icase = m_icase; 6242: 6242: while(state) 6242: { 6242: switch(state->type) 6242: { 6242: case syntax_element_toggle_case: 6242: l_icase = static_cast(state)->icase; 6242: state = state->next.p; 6242: break; 6242: case syntax_element_literal: 6242: { 6242: 6242: 6242: if(l_map) 6242: { 6242: l_map[0] |= mask_init; 6242: charT first_char = *static_cast(static_cast(static_cast(state) + 1)); 6242: for(unsigned int i = 0; i < (1u << 8); ++i) 6242: { 6242: if(m_traits.translate(static_cast(i), l_icase) == first_char) 6242: l_map[i] |= mask; 6242: } 6242: } 6242: return; 6242: } 6242: case syntax_element_end_line: 6242: { 6242: 6242: if(l_map) 6242: { 6242: l_map[0] |= mask_init; 6242: l_map[static_cast('\n')] |= mask; 6242: l_map[static_cast('\r')] |= mask; 6242: l_map[static_cast('\f')] |= mask; 6242: l_map[0x85] |= mask; 6242: } 6242: 6242: if(pnull) 6242: create_startmap(state->next.p, 0, pnull, mask); 6242: return; 6242: } 6242: case syntax_element_recurse: 6242: { 6242: (static_cast (static_cast(state)->alt.p->type == syntax_element_startmark) ? void (0) : __assert_fail ("static_cast(state)->alt.p->type == syntax_element_startmark", "/usr/include/boost/regex/v4/basic_regex_creator.hpp", 1121, __extension__ __PRETTY_FUNCTION__)); 6242: recursion_sub = static_cast(static_cast(state)->alt.p)->index; 6242: if(m_recursion_checks[recursion_sub] & 1u) 6242: { 6242: 6242: if(0 == this->m_pdata->m_status) 6242: this->m_pdata->m_status = boost::regex_constants::error_bad_pattern; 6242: 6242: 6242: 6242: this->m_pdata->m_expression = 0; 6242: this->m_pdata->m_expression_len = 0; 6242: 6242: 6242: 6242: if(0 == (this->flags() & regex_constants::no_except)) 6242: { 6242: std::string message = "Encountered an infinite recursion."; 6242: boost::regex_error e(message, boost::regex_constants::error_bad_pattern, 0); 6242: e.raise(); 6242: } 6242: } 6242: else if(recursion_start == 0) 6242: { 6242: recursion_start = state; 6242: recursion_restart = state->next.p; 6242: state = static_cast(state)->alt.p; 6242: m_recursion_checks[recursion_sub] |= 1u; 6242: break; 6242: } 6242: m_recursion_checks[recursion_sub] |= 1u; 6242: 6242: __attribute__((fallthrough)); 6242: } 6242: case syntax_element_backref: 6242: 6242: if(pnull) 6242: *pnull |= mask; 6242: __attribute__((fallthrough)); 6242: case syntax_element_wild: 6242: { 6242: 6242: set_all_masks(l_map, mask); 6242: return; 6242: } 6242: case syntax_element_accept: 6242: case syntax_element_match: 6242: { 6242: 6242: set_all_masks(l_map, mask); 6242: if(pnull) 6242: *pnull |= mask; 6242: return; 6242: } 6242: case syntax_element_word_start: 6242: { 6242: 6242: create_startmap(state->next.p, l_map, pnull, mask); 6242: if(l_map) 6242: { 6242: l_map[0] |= mask_init; 6242: for(unsigned int i = 0; i < (1u << 8); ++i) 6242: { 6242: if(!m_traits.isctype(static_cast(i), m_word_mask)) 6242: l_map[i] &= static_cast(~mask); 6242: } 6242: } 6242: return; 6242: } 6242: case syntax_element_word_end: 6242: { 6242: 6242: create_startmap(state->next.p, l_map, pnull, mask); 6242: if(l_map) 6242: { 6242: l_map[0] |= mask_init; 6242: for(unsigned int i = 0; i < (1u << 8); ++i) 6242: { 6242: if(m_traits.isctype(static_cast(i), m_word_mask)) 6242: l_map[i] &= static_cast(~mask); 6242: } 6242: } 6242: return; 6242: } 6242: case syntax_element_buffer_end: 6242: { 6242: 6242: if(pnull) 6242: *pnull |= mask; 6242: return; 6242: } 6242: case syntax_element_long_set: 6242: if(l_map) 6242: { 6242: typedef typename traits::char_class_type m_type; 6242: if(static_cast*>(state)->singleton) 6242: { 6242: l_map[0] |= mask_init; 6242: for(unsigned int i = 0; i < (1u << 8); ++i) 6242: { 6242: charT c = static_cast(i); 6242: if(&c != re_is_set_member(&c, &c + 1, static_cast*>(state), *m_pdata, l_icase)) 6242: l_map[i] |= mask; 6242: } 6242: } 6242: else 6242: set_all_masks(l_map, mask); 6242: } 6242: return; 6242: case syntax_element_set: 6242: if(l_map) 6242: { 6242: l_map[0] |= mask_init; 6242: for(unsigned int i = 0; i < (1u << 8); ++i) 6242: { 6242: if(static_cast(state)->_map[ 6242: static_cast(m_traits.translate(static_cast(i), l_icase))]) 6242: l_map[i] |= mask; 6242: } 6242: } 6242: return; 6242: case syntax_element_jump: 6242: 6242: state = static_cast(state)->alt.p; 6242: not_last_jump = -1; 6242: break; 6242: case syntax_element_alt: 6242: case syntax_element_rep: 6242: case syntax_element_dot_rep: 6242: case syntax_element_char_rep: 6242: case syntax_element_short_set_rep: 6242: case syntax_element_long_set_rep: 6242: { 6242: re_alt* rep = static_cast(state); 6242: if(rep->_map[0] & mask_init) 6242: { 6242: if(l_map) 6242: { 6242: 6242: l_map[0] |= mask_init; 6242: for(unsigned int i = 0; i <= (0x7f * 2 + 1); ++i) 6242: { 6242: if(rep->_map[i] & mask_any) 6242: l_map[i] |= mask; 6242: } 6242: } 6242: if(pnull) 6242: { 6242: if(rep->can_be_null & mask_any) 6242: *pnull |= mask; 6242: } 6242: } 6242: else 6242: { 6242: 6242: 6242: if(is_bad_repeat(state)) 6242: { 6242: set_all_masks(l_map, mask); 6242: if(pnull) 6242: *pnull |= mask; 6242: return; 6242: } 6242: set_bad_repeat(state); 6242: create_startmap(state->next.p, l_map, pnull, mask); 6242: if((state->type == syntax_element_alt) 6242: || (static_cast(state)->min == 0) 6242: || (not_last_jump == 0)) 6242: create_startmap(rep->alt.p, l_map, pnull, mask); 6242: } 6242: } 6242: return; 6242: case syntax_element_soft_buffer_end: 6242: 6242: if(l_map) 6242: { 6242: l_map[0] |= mask_init; 6242: l_map[static_cast('\n')] |= mask; 6242: l_map[static_cast('\r')] |= mask; 6242: } 6242: if(pnull) 6242: *pnull |= mask; 6242: return; 6242: case syntax_element_endmark: 6242: 6242: if(static_cast(state)->index < 0) 6242: { 6242: 6242: set_all_masks(l_map, mask); 6242: if(pnull) 6242: *pnull |= mask; 6242: return; 6242: } 6242: else if(recursion_start && (recursion_sub != 0) && (recursion_sub == static_cast(state)->index)) 6242: { 6242: 6242: recursion_start = 0; 6242: state = recursion_restart; 6242: break; 6242: } 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: if(m_pdata->m_has_recursions && static_cast(state)->index) 6242: { 6242: bool ok = false; 6242: re_syntax_base* p = m_pdata->m_first_state; 6242: while(p) 6242: { 6242: if(p->type == syntax_element_recurse) 6242: { 6242: re_brace* p2 = static_cast(static_cast(p)->alt.p); 6242: if((p2->type == syntax_element_startmark) && (p2->index == static_cast(state)->index)) 6242: { 6242: ok = true; 6242: break; 6242: } 6242: } 6242: p = p->next.p; 6242: } 6242: if(ok && ((m_recursion_checks[static_cast(state)->index] & 2u) == 0)) 6242: { 6242: m_recursion_checks[static_cast(state)->index] |= 2u; 6242: create_startmap(p->next.p, l_map, pnull, mask); 6242: } 6242: } 6242: state = state->next.p; 6242: break; 6242: 6242: case syntax_element_commit: 6242: set_all_masks(l_map, mask); 6242: 6242: state = state->next.p; 6242: break; 6242: case syntax_element_startmark: 6242: 6242: if(static_cast(state)->index == -3) 6242: { 6242: state = state->next.p->next.p; 6242: break; 6242: } 6242: __attribute__((fallthrough)); 6242: default: 6242: state = state->next.p; 6242: } 6242: ++not_last_jump; 6242: } 6242: } 6242: 6242: template 6242: unsigned basic_regex_creator::get_restart_type(re_syntax_base* state) 6242: { 6242: 6242: 6242: 6242: while(state) 6242: { 6242: switch(state->type) 6242: { 6242: case syntax_element_startmark: 6242: case syntax_element_endmark: 6242: state = state->next.p; 6242: continue; 6242: case syntax_element_start_line: 6242: return regbase::restart_line; 6242: case syntax_element_word_start: 6242: return regbase::restart_word; 6242: case syntax_element_buffer_start: 6242: return regbase::restart_buf; 6242: case syntax_element_restart_continue: 6242: return regbase::restart_continue; 6242: default: 6242: state = 0; 6242: continue; 6242: } 6242: } 6242: return regbase::restart_any; 6242: } 6242: 6242: template 6242: void basic_regex_creator::set_all_masks(unsigned char* bits, unsigned char mask) 6242: { 6242: 6242: 6242: 6242: 6242: 6242: if(bits) 6242: { 6242: if(bits[0] == 0) 6242: (std::memset)(bits, mask, 1u << 8); 6242: else 6242: { 6242: for(unsigned i = 0; i < (1u << 8); ++i) 6242: bits[i] |= mask; 6242: } 6242: bits[0] |= mask_init; 6242: } 6242: } 6242: 6242: template 6242: bool basic_regex_creator::is_bad_repeat(re_syntax_base* pt) 6242: { 6242: switch(pt->type) 6242: { 6242: case syntax_element_rep: 6242: case syntax_element_dot_rep: 6242: case syntax_element_char_rep: 6242: case syntax_element_short_set_rep: 6242: case syntax_element_long_set_rep: 6242: { 6242: unsigned state_id = static_cast(pt)->state_id; 6242: if(state_id >= sizeof(m_bad_repeats) * 8) 6242: return true; 6242: static const boost::uintmax_t one = 1uL; 6242: return m_bad_repeats & (one << state_id); 6242: } 6242: default: 6242: return false; 6242: } 6242: } 6242: 6242: template 6242: void basic_regex_creator::set_bad_repeat(re_syntax_base* pt) 6242: { 6242: switch(pt->type) 6242: { 6242: case syntax_element_rep: 6242: case syntax_element_dot_rep: 6242: case syntax_element_char_rep: 6242: case syntax_element_short_set_rep: 6242: case syntax_element_long_set_rep: 6242: { 6242: unsigned state_id = static_cast(pt)->state_id; 6242: static const boost::uintmax_t one = 1uL; 6242: if(state_id <= sizeof(m_bad_repeats) * 8) 6242: m_bad_repeats |= (one << state_id); 6242: } 6242: break; 6242: default: 6242: break; 6242: } 6242: } 6242: 6242: template 6242: syntax_element_type basic_regex_creator::get_repeat_type(re_syntax_base* state) 6242: { 6242: typedef typename traits::char_class_type m_type; 6242: if(state->type == syntax_element_rep) 6242: { 6242: 6242: if(state->next.p->next.p->next.p == static_cast(state)->alt.p) 6242: { 6242: switch(state->next.p->type) 6242: { 6242: case re_detail_106501::syntax_element_wild: 6242: return re_detail_106501::syntax_element_dot_rep; 6242: case re_detail_106501::syntax_element_literal: 6242: return re_detail_106501::syntax_element_char_rep; 6242: case re_detail_106501::syntax_element_set: 6242: return re_detail_106501::syntax_element_short_set_rep; 6242: case re_detail_106501::syntax_element_long_set: 6242: if(static_cast*>(state->next.p)->singleton) 6242: return re_detail_106501::syntax_element_long_set_rep; 6242: break; 6242: default: 6242: break; 6242: } 6242: } 6242: } 6242: return state->type; 6242: } 6242: 6242: template 6242: void basic_regex_creator::probe_leading_repeat(re_syntax_base* state) 6242: { 6242: 6242: 6242: do 6242: { 6242: switch(state->type) 6242: { 6242: case syntax_element_startmark: 6242: if(static_cast(state)->index >= 0) 6242: { 6242: state = state->next.p; 6242: continue; 6242: } 6242: if((static_cast(state)->index == -1) 6242: || (static_cast(state)->index == -2)) 6242: { 6242: 6242: state = static_cast(state->next.p)->alt.p->next.p; 6242: continue; 6242: } 6242: if(static_cast(state)->index == -3) 6242: { 6242: 6242: state = state->next.p->next.p; 6242: continue; 6242: } 6242: return; 6242: case syntax_element_endmark: 6242: case syntax_element_start_line: 6242: case syntax_element_end_line: 6242: case syntax_element_word_boundary: 6242: case syntax_element_within_word: 6242: case syntax_element_word_start: 6242: case syntax_element_word_end: 6242: case syntax_element_buffer_start: 6242: case syntax_element_buffer_end: 6242: case syntax_element_restart_continue: 6242: state = state->next.p; 6242: break; 6242: case syntax_element_dot_rep: 6242: case syntax_element_char_rep: 6242: case syntax_element_short_set_rep: 6242: case syntax_element_long_set_rep: 6242: if(this->m_has_backrefs == 0) 6242: static_cast(state)->leading = true; 6242: __attribute__((fallthrough)); 6242: default: 6242: return; 6242: } 6242: }while(state); 6242: } 6242: 6242: 6242: } 6242: 6242: } 6242: # 71 "/usr/include/boost/regex/v4/regex.hpp" 2 3 4 6242: 6242: 6242: # 1 "/usr/include/boost/regex/v4/basic_regex_parser.hpp" 1 3 4 6242: # 33 "/usr/include/boost/regex/v4/basic_regex_parser.hpp" 3 4 6242: namespace boost{ 6242: namespace re_detail_106501{ 6242: 6242: 6242: 6242: 6242: 6242: 6242: inline boost::intmax_t umax(mpl::false_ const&) 6242: { 6242: 6242: return std::numeric_limits::is_specialized ? (std::numeric_limits::max)() : 0x7fffffff; 6242: } 6242: inline boost::intmax_t umax(mpl::true_ const&) 6242: { 6242: return (std::numeric_limits::max)(); 6242: } 6242: 6242: inline boost::intmax_t umax() 6242: { 6242: return umax(mpl::bool_::digits >= std::numeric_limits::digits>()); 6242: } 6242: 6242: template 6242: class basic_regex_parser : public basic_regex_creator 6242: { 6242: public: 6242: basic_regex_parser(regex_data* data); 6242: void parse(const charT* p1, const charT* p2, unsigned flags); 6242: void fail(regex_constants::error_type error_code, std::ptrdiff_t position); 6242: void fail(regex_constants::error_type error_code, std::ptrdiff_t position, std::string message, std::ptrdiff_t start_pos); 6242: void fail(regex_constants::error_type error_code, std::ptrdiff_t position, const std::string& message) 6242: { 6242: fail(error_code, position, message, position); 6242: } 6242: 6242: bool parse_all(); 6242: bool parse_basic(); 6242: bool parse_extended(); 6242: bool parse_literal(); 6242: bool parse_open_paren(); 6242: bool parse_basic_escape(); 6242: bool parse_extended_escape(); 6242: bool parse_match_any(); 6242: bool parse_repeat(std::size_t low = 0, std::size_t high = (std::numeric_limits::max)()); 6242: bool parse_repeat_range(bool isbasic); 6242: bool parse_alt(); 6242: bool parse_set(); 6242: bool parse_backref(); 6242: void parse_set_literal(basic_char_set& char_set); 6242: bool parse_inner_set(basic_char_set& char_set); 6242: bool parse_QE(); 6242: bool parse_perl_extension(); 6242: bool parse_perl_verb(); 6242: bool match_verb(const char*); 6242: bool add_emacs_code(bool negate); 6242: bool unwind_alts(std::ptrdiff_t last_paren_start); 6242: digraph get_next_set_literal(basic_char_set& char_set); 6242: charT unescape_character(); 6242: regex_constants::syntax_option_type parse_options(); 6242: 6242: private: 6242: typedef bool (basic_regex_parser::*parser_proc_type)(); 6242: typedef typename traits::string_type string_type; 6242: typedef typename traits::char_class_type char_class_type; 6242: parser_proc_type m_parser_proc; 6242: const charT* m_base; 6242: const charT* m_end; 6242: const charT* m_position; 6242: unsigned m_mark_count; 6242: int m_mark_reset; 6242: unsigned m_max_mark; 6242: std::ptrdiff_t m_paren_start; 6242: std::ptrdiff_t m_alt_insert_point; 6242: bool m_has_case_change; 6242: 6242: 6242: 6242: 6242: 6242: 6242: std::vector m_alt_jumps; 6242: 6242: 6242: basic_regex_parser& operator=(const basic_regex_parser&); 6242: basic_regex_parser(const basic_regex_parser&); 6242: }; 6242: 6242: template 6242: basic_regex_parser::basic_regex_parser(regex_data* data) 6242: : basic_regex_creator(data), m_mark_count(0), m_mark_reset(-1), m_max_mark(0), m_paren_start(0), m_alt_insert_point(0), m_has_case_change(false) 6242: { 6242: } 6242: 6242: template 6242: void basic_regex_parser::parse(const charT* p1, const charT* p2, unsigned l_flags) 6242: { 6242: 6242: this->init(l_flags); 6242: 6242: m_position = m_base = p1; 6242: m_end = p2; 6242: 6242: if((p1 == p2) && 6242: ( 6242: ((l_flags & regbase::main_option_type) != regbase::perl_syntax_group) 6242: || (l_flags & regbase::no_empty_expressions) 6242: ) 6242: ) 6242: { 6242: fail(regex_constants::error_empty, 0); 6242: return; 6242: } 6242: 6242: switch(l_flags & regbase::main_option_type) 6242: { 6242: case regbase::perl_syntax_group: 6242: { 6242: m_parser_proc = &basic_regex_parser::parse_extended; 6242: 6242: 6242: 6242: re_brace* br = static_cast(this->append_state(syntax_element_startmark, sizeof(re_brace))); 6242: br->index = 0; 6242: br->icase = this->flags() & regbase::icase; 6242: break; 6242: } 6242: case regbase::basic_syntax_group: 6242: m_parser_proc = &basic_regex_parser::parse_basic; 6242: break; 6242: case regbase::literal: 6242: m_parser_proc = &basic_regex_parser::parse_literal; 6242: break; 6242: default: 6242: 6242: 6242: fail(regex_constants::error_unknown, 0, "An invalid combination of regular expression syntax flags was used."); 6242: return; 6242: } 6242: 6242: 6242: bool result = parse_all(); 6242: 6242: 6242: 6242: unwind_alts(-1); 6242: 6242: this->flags(l_flags); 6242: 6242: 6242: if(!result) 6242: { 6242: fail(regex_constants::error_paren, ::boost::re_detail_106501::distance(m_base, m_position), "Found a closing ) with no corresponding openening parenthesis."); 6242: return; 6242: } 6242: 6242: if(this->m_pdata->m_status) 6242: return; 6242: 6242: this->m_pdata->m_mark_count = 1 + m_mark_count; 6242: this->finalize(p1, p2); 6242: } 6242: 6242: template 6242: void basic_regex_parser::fail(regex_constants::error_type error_code, std::ptrdiff_t position) 6242: { 6242: 6242: std::string message = this->m_pdata->m_ptraits->error_string(error_code); 6242: fail(error_code, position, message); 6242: } 6242: 6242: template 6242: void basic_regex_parser::fail(regex_constants::error_type error_code, std::ptrdiff_t position, std::string message, std::ptrdiff_t start_pos) 6242: { 6242: if(0 == this->m_pdata->m_status) 6242: this->m_pdata->m_status = error_code; 6242: m_position = m_end; 6242: 6242: 6242: 6242: 6242: 6242: if(start_pos == position) 6242: start_pos = (std::max)(static_cast(0), position - static_cast(10)); 6242: std::ptrdiff_t end_pos = (std::min)(position + static_cast(10), static_cast(m_end - m_base)); 6242: if(error_code != regex_constants::error_empty) 6242: { 6242: if((start_pos != 0) || (end_pos != (m_end - m_base))) 6242: message += " The error occurred while parsing the regular expression fragment: '"; 6242: else 6242: message += " The error occurred while parsing the regular expression: '"; 6242: if(start_pos != end_pos) 6242: { 6242: message += std::string(m_base + start_pos, m_base + position); 6242: message += ">>>HERE>>>"; 6242: message += std::string(m_base + position, m_base + end_pos); 6242: } 6242: message += "'."; 6242: } 6242: 6242: 6242: 6242: if(0 == (this->flags() & regex_constants::no_except)) 6242: { 6242: boost::regex_error e(message, error_code, position); 6242: e.raise(); 6242: } 6242: 6242: 6242: 6242: } 6242: 6242: template 6242: bool basic_regex_parser::parse_all() 6242: { 6242: bool result = true; 6242: while(result && (m_position != m_end)) 6242: { 6242: result = (this->*m_parser_proc)(); 6242: } 6242: return result; 6242: } 6242: 6242: 6242: 6242: 6242: 6242: template 6242: bool basic_regex_parser::parse_basic() 6242: { 6242: switch(this->m_traits.syntax_type(*m_position)) 6242: { 6242: case regex_constants::syntax_escape: 6242: return parse_basic_escape(); 6242: case regex_constants::syntax_dot: 6242: return parse_match_any(); 6242: case regex_constants::syntax_caret: 6242: ++m_position; 6242: this->append_state(syntax_element_start_line); 6242: break; 6242: case regex_constants::syntax_dollar: 6242: ++m_position; 6242: this->append_state(syntax_element_end_line); 6242: break; 6242: case regex_constants::syntax_star: 6242: if(!(this->m_last_state) || (this->m_last_state->type == syntax_element_start_line)) 6242: return parse_literal(); 6242: else 6242: { 6242: ++m_position; 6242: return parse_repeat(); 6242: } 6242: case regex_constants::syntax_plus: 6242: if(!(this->m_last_state) || (this->m_last_state->type == syntax_element_start_line) || !(this->flags() & regbase::emacs_ex)) 6242: return parse_literal(); 6242: else 6242: { 6242: ++m_position; 6242: return parse_repeat(1); 6242: } 6242: case regex_constants::syntax_question: 6242: if(!(this->m_last_state) || (this->m_last_state->type == syntax_element_start_line) || !(this->flags() & regbase::emacs_ex)) 6242: return parse_literal(); 6242: else 6242: { 6242: ++m_position; 6242: return parse_repeat(0, 1); 6242: } 6242: case regex_constants::syntax_open_set: 6242: return parse_set(); 6242: case regex_constants::syntax_newline: 6242: if(this->flags() & regbase::newline_alt) 6242: return parse_alt(); 6242: else 6242: return parse_literal(); 6242: default: 6242: return parse_literal(); 6242: } 6242: return true; 6242: } 6242: 6242: template 6242: bool basic_regex_parser::parse_extended() 6242: { 6242: bool result = true; 6242: switch(this->m_traits.syntax_type(*m_position)) 6242: { 6242: case regex_constants::syntax_open_mark: 6242: return parse_open_paren(); 6242: case regex_constants::syntax_close_mark: 6242: return false; 6242: case regex_constants::syntax_escape: 6242: return parse_extended_escape(); 6242: case regex_constants::syntax_dot: 6242: return parse_match_any(); 6242: case regex_constants::syntax_caret: 6242: ++m_position; 6242: this->append_state( 6242: (this->flags() & regex_constants::no_mod_m ? syntax_element_buffer_start : syntax_element_start_line)); 6242: break; 6242: case regex_constants::syntax_dollar: 6242: ++m_position; 6242: this->append_state( 6242: (this->flags() & regex_constants::no_mod_m ? syntax_element_buffer_end : syntax_element_end_line)); 6242: break; 6242: case regex_constants::syntax_star: 6242: if(m_position == this->m_base) 6242: { 6242: fail(regex_constants::error_badrepeat, 0, "The repeat operator \"*\" cannot start a regular expression."); 6242: return false; 6242: } 6242: ++m_position; 6242: return parse_repeat(); 6242: case regex_constants::syntax_question: 6242: if(m_position == this->m_base) 6242: { 6242: fail(regex_constants::error_badrepeat, 0, "The repeat operator \"?\" cannot start a regular expression."); 6242: return false; 6242: } 6242: ++m_position; 6242: return parse_repeat(0,1); 6242: case regex_constants::syntax_plus: 6242: if(m_position == this->m_base) 6242: { 6242: fail(regex_constants::error_badrepeat, 0, "The repeat operator \"+\" cannot start a regular expression."); 6242: return false; 6242: } 6242: ++m_position; 6242: return parse_repeat(1); 6242: case regex_constants::syntax_open_brace: 6242: ++m_position; 6242: return parse_repeat_range(false); 6242: case regex_constants::syntax_close_brace: 6242: if((this->flags() & regbase::no_perl_ex) == regbase::no_perl_ex) 6242: { 6242: fail(regex_constants::error_brace, this->m_position - this->m_base, "Found a closing repetition operator } with no corresponding {."); 6242: return false; 6242: } 6242: result = parse_literal(); 6242: break; 6242: case regex_constants::syntax_or: 6242: return parse_alt(); 6242: case regex_constants::syntax_open_set: 6242: return parse_set(); 6242: case regex_constants::syntax_newline: 6242: if(this->flags() & regbase::newline_alt) 6242: return parse_alt(); 6242: else 6242: return parse_literal(); 6242: case regex_constants::syntax_hash: 6242: 6242: 6242: 6242: 6242: if((this->flags() 6242: & (regbase::no_perl_ex|regbase::mod_x)) 6242: == regbase::mod_x) 6242: { 6242: while((m_position != m_end) && !is_separator(*m_position++)){} 6242: return true; 6242: } 6242: __attribute__((fallthrough)); 6242: default: 6242: result = parse_literal(); 6242: break; 6242: } 6242: return result; 6242: } 6242: 6242: 6242: 6242: 6242: template 6242: bool basic_regex_parser::parse_literal() 6242: { 6242: 6242: 6242: if( 6242: ((this->flags() 6242: & (regbase::main_option_type|regbase::mod_x|regbase::no_perl_ex)) 6242: != regbase::mod_x) 6242: || !this->m_traits.isctype(*m_position, this->m_mask_space)) 6242: this->append_literal(*m_position); 6242: ++m_position; 6242: return true; 6242: } 6242: 6242: template 6242: bool basic_regex_parser::parse_open_paren() 6242: { 6242: 6242: 6242: 6242: if(++m_position == m_end) 6242: { 6242: fail(regex_constants::error_paren, m_position - m_base); 6242: return false; 6242: } 6242: 6242: 6242: 6242: if( 6242: ((this->flags() & (regbase::main_option_type | regbase::no_perl_ex)) == 0) 6242: || ((this->flags() & (regbase::main_option_type | regbase::emacs_ex)) == (regbase::basic_syntax_group|regbase::emacs_ex)) 6242: ) 6242: { 6242: if(this->m_traits.syntax_type(*m_position) == regex_constants::syntax_question) 6242: return parse_perl_extension(); 6242: if(this->m_traits.syntax_type(*m_position) == regex_constants::syntax_star) 6242: return parse_perl_verb(); 6242: } 6242: 6242: 6242: 6242: unsigned markid = 0; 6242: if(0 == (this->flags() & regbase::nosubs)) 6242: { 6242: markid = ++m_mark_count; 6242: 6242: if(this->flags() & regbase::save_subexpression_location) 6242: this->m_pdata->m_subs.push_back(std::pair(std::distance(m_base, m_position) - 1, 0)); 6242: 6242: 6242: 6242: 6242: } 6242: re_brace* pb = static_cast(this->append_state(syntax_element_startmark, sizeof(re_brace))); 6242: pb->index = markid; 6242: pb->icase = this->flags() & regbase::icase; 6242: std::ptrdiff_t last_paren_start = this->getoffset(pb); 6242: 6242: std::ptrdiff_t last_alt_point = m_alt_insert_point; 6242: this->m_pdata->m_data.align(); 6242: m_alt_insert_point = this->m_pdata->m_data.size(); 6242: 6242: 6242: 6242: regex_constants::syntax_option_type opts = this->flags(); 6242: bool old_case_change = m_has_case_change; 6242: m_has_case_change = false; 6242: 6242: 6242: 6242: int mark_reset = m_mark_reset; 6242: m_mark_reset = -1; 6242: 6242: 6242: 6242: 6242: parse_all(); 6242: 6242: 6242: 6242: if(0 == unwind_alts(last_paren_start)) 6242: return false; 6242: 6242: 6242: 6242: if(m_has_case_change) 6242: { 6242: 6242: 6242: 6242: static_cast( 6242: this->append_state(syntax_element_toggle_case, sizeof(re_case)) 6242: )->icase = opts & regbase::icase; 6242: } 6242: this->flags(opts); 6242: m_has_case_change = old_case_change; 6242: 6242: 6242: 6242: m_mark_reset = mark_reset; 6242: 6242: 6242: 6242: if(m_position == m_end) 6242: { 6242: this->fail(regex_constants::error_paren, ::boost::re_detail_106501::distance(m_base, m_end)); 6242: return false; 6242: } 6242: if(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_close_mark) 6242: return false; 6242: 6242: if(markid && (this->flags() & regbase::save_subexpression_location)) 6242: this->m_pdata->m_subs.at(markid - 1).second = std::distance(m_base, m_position); 6242: 6242: 6242: 6242: 6242: ++m_position; 6242: 6242: 6242: 6242: pb = static_cast(this->append_state(syntax_element_endmark, sizeof(re_brace))); 6242: pb->index = markid; 6242: pb->icase = this->flags() & regbase::icase; 6242: this->m_paren_start = last_paren_start; 6242: 6242: 6242: 6242: this->m_alt_insert_point = last_alt_point; 6242: 6242: 6242: 6242: if((markid > 0) && (markid < sizeof(unsigned) * 8)) 6242: this->m_backrefs |= 1u << (markid - 1); 6242: 6242: return true; 6242: } 6242: 6242: template 6242: bool basic_regex_parser::parse_basic_escape() 6242: { 6242: if(++m_position == m_end) 6242: { 6242: fail(regex_constants::error_paren, m_position - m_base); 6242: return false; 6242: } 6242: bool result = true; 6242: switch(this->m_traits.escape_syntax_type(*m_position)) 6242: { 6242: case regex_constants::syntax_open_mark: 6242: return parse_open_paren(); 6242: case regex_constants::syntax_close_mark: 6242: return false; 6242: case regex_constants::syntax_plus: 6242: if(this->flags() & regex_constants::bk_plus_qm) 6242: { 6242: ++m_position; 6242: return parse_repeat(1); 6242: } 6242: else 6242: return parse_literal(); 6242: case regex_constants::syntax_question: 6242: if(this->flags() & regex_constants::bk_plus_qm) 6242: { 6242: ++m_position; 6242: return parse_repeat(0, 1); 6242: } 6242: else 6242: return parse_literal(); 6242: case regex_constants::syntax_open_brace: 6242: if(this->flags() & regbase::no_intervals) 6242: return parse_literal(); 6242: ++m_position; 6242: return parse_repeat_range(true); 6242: case regex_constants::syntax_close_brace: 6242: if(this->flags() & regbase::no_intervals) 6242: return parse_literal(); 6242: fail(regex_constants::error_brace, this->m_position - this->m_base, "Found a closing repetition operator } with no corresponding {."); 6242: return false; 6242: case regex_constants::syntax_or: 6242: if(this->flags() & regbase::bk_vbar) 6242: return parse_alt(); 6242: else 6242: result = parse_literal(); 6242: break; 6242: case regex_constants::syntax_digit: 6242: return parse_backref(); 6242: case regex_constants::escape_type_start_buffer: 6242: if(this->flags() & regbase::emacs_ex) 6242: { 6242: ++m_position; 6242: this->append_state(syntax_element_buffer_start); 6242: } 6242: else 6242: result = parse_literal(); 6242: break; 6242: case regex_constants::escape_type_end_buffer: 6242: if(this->flags() & regbase::emacs_ex) 6242: { 6242: ++m_position; 6242: this->append_state(syntax_element_buffer_end); 6242: } 6242: else 6242: result = parse_literal(); 6242: break; 6242: case regex_constants::escape_type_word_assert: 6242: if(this->flags() & regbase::emacs_ex) 6242: { 6242: ++m_position; 6242: this->append_state(syntax_element_word_boundary); 6242: } 6242: else 6242: result = parse_literal(); 6242: break; 6242: case regex_constants::escape_type_not_word_assert: 6242: if(this->flags() & regbase::emacs_ex) 6242: { 6242: ++m_position; 6242: this->append_state(syntax_element_within_word); 6242: } 6242: else 6242: result = parse_literal(); 6242: break; 6242: case regex_constants::escape_type_left_word: 6242: if(this->flags() & regbase::emacs_ex) 6242: { 6242: ++m_position; 6242: this->append_state(syntax_element_word_start); 6242: } 6242: else 6242: result = parse_literal(); 6242: break; 6242: case regex_constants::escape_type_right_word: 6242: if(this->flags() & regbase::emacs_ex) 6242: { 6242: ++m_position; 6242: this->append_state(syntax_element_word_end); 6242: } 6242: else 6242: result = parse_literal(); 6242: break; 6242: default: 6242: if(this->flags() & regbase::emacs_ex) 6242: { 6242: bool negate = true; 6242: switch(*m_position) 6242: { 6242: case 'w': 6242: negate = false; 6242: __attribute__((fallthrough)); 6242: case 'W': 6242: { 6242: basic_char_set char_set; 6242: if(negate) 6242: char_set.negate(); 6242: char_set.add_class(this->m_word_mask); 6242: if(0 == this->append_set(char_set)) 6242: { 6242: fail(regex_constants::error_ctype, m_position - m_base); 6242: return false; 6242: } 6242: ++m_position; 6242: return true; 6242: } 6242: case 's': 6242: negate = false; 6242: __attribute__((fallthrough)); 6242: case 'S': 6242: return add_emacs_code(negate); 6242: case 'c': 6242: case 'C': 6242: 6242: fail(regex_constants::error_escape, m_position - m_base, "The \\c and \\C escape sequences are not supported by POSIX basic regular expressions: try the Perl syntax instead."); 6242: return false; 6242: default: 6242: break; 6242: } 6242: } 6242: result = parse_literal(); 6242: break; 6242: } 6242: return result; 6242: } 6242: 6242: template 6242: bool basic_regex_parser::parse_extended_escape() 6242: { 6242: ++m_position; 6242: if(m_position == m_end) 6242: { 6242: fail(regex_constants::error_escape, m_position - m_base, "Incomplete escape sequence found."); 6242: return false; 6242: } 6242: bool negate = false; 6242: switch(this->m_traits.escape_syntax_type(*m_position)) 6242: { 6242: case regex_constants::escape_type_not_class: 6242: negate = true; 6242: __attribute__((fallthrough)); 6242: case regex_constants::escape_type_class: 6242: { 6242: escape_type_class_jump: 6242: typedef typename traits::char_class_type m_type; 6242: m_type m = this->m_traits.lookup_classname(m_position, m_position+1); 6242: if(m != 0) 6242: { 6242: basic_char_set char_set; 6242: if(negate) 6242: char_set.negate(); 6242: char_set.add_class(m); 6242: if(0 == this->append_set(char_set)) 6242: { 6242: fail(regex_constants::error_ctype, m_position - m_base); 6242: return false; 6242: } 6242: ++m_position; 6242: return true; 6242: } 6242: 6242: 6242: 6242: this->append_literal(unescape_character()); 6242: break; 6242: } 6242: case regex_constants::syntax_digit: 6242: return parse_backref(); 6242: case regex_constants::escape_type_left_word: 6242: ++m_position; 6242: this->append_state(syntax_element_word_start); 6242: break; 6242: case regex_constants::escape_type_right_word: 6242: ++m_position; 6242: this->append_state(syntax_element_word_end); 6242: break; 6242: case regex_constants::escape_type_start_buffer: 6242: ++m_position; 6242: this->append_state(syntax_element_buffer_start); 6242: break; 6242: case regex_constants::escape_type_end_buffer: 6242: ++m_position; 6242: this->append_state(syntax_element_buffer_end); 6242: break; 6242: case regex_constants::escape_type_word_assert: 6242: ++m_position; 6242: this->append_state(syntax_element_word_boundary); 6242: break; 6242: case regex_constants::escape_type_not_word_assert: 6242: ++m_position; 6242: this->append_state(syntax_element_within_word); 6242: break; 6242: case regex_constants::escape_type_Z: 6242: ++m_position; 6242: this->append_state(syntax_element_soft_buffer_end); 6242: break; 6242: case regex_constants::escape_type_Q: 6242: return parse_QE(); 6242: case regex_constants::escape_type_C: 6242: return parse_match_any(); 6242: case regex_constants::escape_type_X: 6242: ++m_position; 6242: this->append_state(syntax_element_combining); 6242: break; 6242: case regex_constants::escape_type_G: 6242: ++m_position; 6242: this->append_state(syntax_element_restart_continue); 6242: break; 6242: case regex_constants::escape_type_not_property: 6242: negate = true; 6242: __attribute__((fallthrough)); 6242: case regex_constants::escape_type_property: 6242: { 6242: ++m_position; 6242: char_class_type m; 6242: if(m_position == m_end) 6242: { 6242: fail(regex_constants::error_escape, m_position - m_base, "Incomplete property escape found."); 6242: return false; 6242: } 6242: 6242: if(this->m_traits.syntax_type(*m_position) == regex_constants::syntax_open_brace) 6242: { 6242: const charT* base = m_position; 6242: 6242: while((m_position != m_end) && (this->m_traits.syntax_type(*m_position) != regex_constants::syntax_close_brace)) 6242: ++m_position; 6242: if(m_position == m_end) 6242: { 6242: fail(regex_constants::error_escape, m_position - m_base, "Closing } missing from property escape sequence."); 6242: return false; 6242: } 6242: m = this->m_traits.lookup_classname(++base, m_position++); 6242: } 6242: else 6242: { 6242: m = this->m_traits.lookup_classname(m_position, m_position+1); 6242: ++m_position; 6242: } 6242: if(m != 0) 6242: { 6242: basic_char_set char_set; 6242: if(negate) 6242: char_set.negate(); 6242: char_set.add_class(m); 6242: if(0 == this->append_set(char_set)) 6242: { 6242: fail(regex_constants::error_ctype, m_position - m_base); 6242: return false; 6242: } 6242: return true; 6242: } 6242: fail(regex_constants::error_ctype, m_position - m_base, "Escape sequence was neither a valid property nor a valid character class name."); 6242: return false; 6242: } 6242: case regex_constants::escape_type_reset_start_mark: 6242: if(0 == (this->flags() & (regbase::main_option_type | regbase::no_perl_ex))) 6242: { 6242: re_brace* pb = static_cast(this->append_state(syntax_element_startmark, sizeof(re_brace))); 6242: pb->index = -5; 6242: pb->icase = this->flags() & regbase::icase; 6242: this->m_pdata->m_data.align(); 6242: ++m_position; 6242: return true; 6242: } 6242: goto escape_type_class_jump; 6242: case regex_constants::escape_type_line_ending: 6242: if(0 == (this->flags() & (regbase::main_option_type | regbase::no_perl_ex))) 6242: { 6242: const charT* e = get_escape_R_string(); 6242: const charT* old_position = m_position; 6242: const charT* old_end = m_end; 6242: const charT* old_base = m_base; 6242: m_position = e; 6242: m_base = e; 6242: m_end = e + traits::length(e); 6242: bool r = parse_all(); 6242: m_position = ++old_position; 6242: m_end = old_end; 6242: m_base = old_base; 6242: return r; 6242: } 6242: goto escape_type_class_jump; 6242: case regex_constants::escape_type_extended_backref: 6242: if(0 == (this->flags() & (regbase::main_option_type | regbase::no_perl_ex))) 6242: { 6242: bool have_brace = false; 6242: bool negative = false; 6242: static const char* incomplete_message = "Incomplete \\g escape found."; 6242: if(++m_position == m_end) 6242: { 6242: fail(regex_constants::error_escape, m_position - m_base, incomplete_message); 6242: return false; 6242: } 6242: 6242: regex_constants::syntax_type syn = this->m_traits.syntax_type(*m_position); 6242: regex_constants::syntax_type syn_end = 0; 6242: if((syn == regex_constants::syntax_open_brace) 6242: || (syn == regex_constants::escape_type_left_word) 6242: || (syn == regex_constants::escape_type_end_buffer)) 6242: { 6242: if(++m_position == m_end) 6242: { 6242: fail(regex_constants::error_escape, m_position - m_base, incomplete_message); 6242: return false; 6242: } 6242: have_brace = true; 6242: switch(syn) 6242: { 6242: case regex_constants::syntax_open_brace: 6242: syn_end = regex_constants::syntax_close_brace; 6242: break; 6242: case regex_constants::escape_type_left_word: 6242: syn_end = regex_constants::escape_type_right_word; 6242: break; 6242: default: 6242: syn_end = regex_constants::escape_type_end_buffer; 6242: break; 6242: } 6242: } 6242: negative = (*m_position == static_cast('-')); 6242: if((negative) && (++m_position == m_end)) 6242: { 6242: fail(regex_constants::error_escape, m_position - m_base, incomplete_message); 6242: return false; 6242: } 6242: const charT* pc = m_position; 6242: boost::intmax_t i = this->m_traits.toi(pc, m_end, 10); 6242: if((i < 0) && syn_end) 6242: { 6242: 6242: const charT* base = m_position; 6242: while((m_position != m_end) && (this->m_traits.syntax_type(*m_position) != syn_end)) 6242: { 6242: ++m_position; 6242: } 6242: i = hash_value_from_capture_name(base, m_position); 6242: pc = m_position; 6242: } 6242: if(negative) 6242: i = 1 + m_mark_count - i; 6242: if(((i > 0) && (i < std::numeric_limits::digits) && (i - 1 < static_cast(sizeof(unsigned) * 8)) && (this->m_backrefs & (1u << (i-1)))) || ((i > 10000) && (this->m_pdata->get_id(i) > 0) && (this->m_pdata->get_id(i)-1 < static_cast(sizeof(unsigned) * 8)) && (this->m_backrefs & (1u << (this->m_pdata->get_id(i)-1))))) 6242: { 6242: m_position = pc; 6242: re_brace* pb = static_cast(this->append_state(syntax_element_backref, sizeof(re_brace))); 6242: pb->index = i; 6242: pb->icase = this->flags() & regbase::icase; 6242: } 6242: else 6242: { 6242: fail(regex_constants::error_backref, m_position - m_base); 6242: return false; 6242: } 6242: m_position = pc; 6242: if(have_brace) 6242: { 6242: if((m_position == m_end) || (this->m_traits.syntax_type(*m_position) != syn_end)) 6242: { 6242: fail(regex_constants::error_escape, m_position - m_base, incomplete_message); 6242: return false; 6242: } 6242: ++m_position; 6242: } 6242: return true; 6242: } 6242: goto escape_type_class_jump; 6242: case regex_constants::escape_type_control_v: 6242: if(0 == (this->flags() & (regbase::main_option_type | regbase::no_perl_ex))) 6242: goto escape_type_class_jump; 6242: __attribute__((fallthrough)); 6242: default: 6242: this->append_literal(unescape_character()); 6242: break; 6242: } 6242: return true; 6242: } 6242: 6242: template 6242: bool basic_regex_parser::parse_match_any() 6242: { 6242: 6242: 6242: 6242: ++m_position; 6242: static_cast( 6242: this->append_state(syntax_element_wild, sizeof(re_dot)) 6242: )->mask = static_cast(this->flags() & regbase::no_mod_s 6242: ? re_detail_106501::force_not_newline 6242: : this->flags() & regbase::mod_s ? 6242: re_detail_106501::force_newline : re_detail_106501::dont_care); 6242: return true; 6242: } 6242: 6242: template 6242: bool basic_regex_parser::parse_repeat(std::size_t low, std::size_t high) 6242: { 6242: bool greedy = true; 6242: bool pocessive = false; 6242: std::size_t insert_point; 6242: 6242: 6242: 6242: if((m_position != m_end) 6242: && ( 6242: (0 == (this->flags() & (regbase::main_option_type | regbase::no_perl_ex))) 6242: || ((regbase::basic_syntax_group|regbase::emacs_ex) == (this->flags() & (regbase::main_option_type | regbase::emacs_ex))) 6242: ) 6242: ) 6242: { 6242: 6242: if(this->m_traits.syntax_type(*m_position) == regex_constants::syntax_question) 6242: { 6242: greedy = false; 6242: ++m_position; 6242: } 6242: 6242: if((m_position != m_end) 6242: && (0 == (this->flags() & regbase::main_option_type)) 6242: && (this->m_traits.syntax_type(*m_position) == regex_constants::syntax_plus)) 6242: { 6242: pocessive = true; 6242: ++m_position; 6242: } 6242: } 6242: if(0 == this->m_last_state) 6242: { 6242: fail(regex_constants::error_badrepeat, ::boost::re_detail_106501::distance(m_base, m_position), "Nothing to repeat."); 6242: return false; 6242: } 6242: if(this->m_last_state->type == syntax_element_endmark) 6242: { 6242: 6242: insert_point = this->m_paren_start; 6242: } 6242: else if((this->m_last_state->type == syntax_element_literal) && (static_cast(this->m_last_state)->length > 1)) 6242: { 6242: 6242: re_literal* lit = static_cast(this->m_last_state); 6242: charT c = (static_cast(static_cast(lit+1)))[lit->length - 1]; 6242: lit->length -= 1; 6242: 6242: lit = static_cast(this->append_state(syntax_element_literal, sizeof(re_literal) + sizeof(charT))); 6242: lit->length = 1; 6242: (static_cast(static_cast(lit+1)))[0] = c; 6242: insert_point = this->getoffset(this->m_last_state); 6242: } 6242: else 6242: { 6242: 6242: switch(this->m_last_state->type) 6242: { 6242: case syntax_element_start_line: 6242: case syntax_element_end_line: 6242: case syntax_element_word_boundary: 6242: case syntax_element_within_word: 6242: case syntax_element_word_start: 6242: case syntax_element_word_end: 6242: case syntax_element_buffer_start: 6242: case syntax_element_buffer_end: 6242: case syntax_element_alt: 6242: case syntax_element_soft_buffer_end: 6242: case syntax_element_restart_continue: 6242: case syntax_element_jump: 6242: case syntax_element_startmark: 6242: case syntax_element_backstep: 6242: 6242: fail(regex_constants::error_badrepeat, m_position - m_base); 6242: return false; 6242: default: 6242: 6242: break; 6242: } 6242: insert_point = this->getoffset(this->m_last_state); 6242: } 6242: 6242: 6242: 6242: re_repeat* rep = static_cast(this->insert_state(insert_point, syntax_element_rep, re_repeater_size)); 6242: rep->min = low; 6242: rep->max = high; 6242: rep->greedy = greedy; 6242: rep->leading = false; 6242: 6242: std::ptrdiff_t rep_off = this->getoffset(rep); 6242: 6242: re_jump* jmp = static_cast(this->append_state(syntax_element_jump, sizeof(re_jump))); 6242: jmp->alt.i = rep_off - this->getoffset(jmp); 6242: this->m_pdata->m_data.align(); 6242: 6242: rep = static_cast(this->getaddress(rep_off)); 6242: rep->alt.i = this->m_pdata->m_data.size() - rep_off; 6242: 6242: 6242: 6242: 6242: if(pocessive) 6242: { 6242: if(m_position != m_end) 6242: { 6242: 6242: 6242: 6242: 6242: switch(this->m_traits.syntax_type(*m_position)) 6242: { 6242: case regex_constants::syntax_star: 6242: case regex_constants::syntax_plus: 6242: case regex_constants::syntax_question: 6242: case regex_constants::syntax_open_brace: 6242: fail(regex_constants::error_badrepeat, m_position - m_base); 6242: return false; 6242: } 6242: } 6242: re_brace* pb = static_cast(this->insert_state(insert_point, syntax_element_startmark, sizeof(re_brace))); 6242: pb->index = -3; 6242: pb->icase = this->flags() & regbase::icase; 6242: jmp = static_cast(this->insert_state(insert_point + sizeof(re_brace), syntax_element_jump, sizeof(re_jump))); 6242: this->m_pdata->m_data.align(); 6242: jmp->alt.i = this->m_pdata->m_data.size() - this->getoffset(jmp); 6242: pb = static_cast(this->append_state(syntax_element_endmark, sizeof(re_brace))); 6242: pb->index = -3; 6242: pb->icase = this->flags() & regbase::icase; 6242: } 6242: return true; 6242: } 6242: 6242: template 6242: bool basic_regex_parser::parse_repeat_range(bool isbasic) 6242: { 6242: static const char* incomplete_message = "Missing } in quantified repetition."; 6242: 6242: 6242: 6242: std::size_t min, max; 6242: boost::intmax_t v; 6242: 6242: while((m_position != m_end) && this->m_traits.isctype(*m_position, this->m_mask_space)) 6242: ++m_position; 6242: if(this->m_position == this->m_end) 6242: { 6242: if(this->flags() & (regbase::main_option_type | regbase::no_perl_ex)) 6242: { 6242: fail(regex_constants::error_brace, this->m_position - this->m_base, incomplete_message); 6242: return false; 6242: } 6242: 6242: --m_position; 6242: while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_brace) --m_position; 6242: return parse_literal(); 6242: } 6242: 6242: v = this->m_traits.toi(m_position, m_end, 10); 6242: 6242: if((v < 0) || (v > umax())) 6242: { 6242: if(this->flags() & (regbase::main_option_type | regbase::no_perl_ex)) 6242: { 6242: fail(regex_constants::error_brace, this->m_position - this->m_base, incomplete_message); 6242: return false; 6242: } 6242: 6242: --m_position; 6242: while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_brace) --m_position; 6242: return parse_literal(); 6242: } 6242: while((m_position != m_end) && this->m_traits.isctype(*m_position, this->m_mask_space)) 6242: ++m_position; 6242: if(this->m_position == this->m_end) 6242: { 6242: if(this->flags() & (regbase::main_option_type | regbase::no_perl_ex)) 6242: { 6242: fail(regex_constants::error_brace, this->m_position - this->m_base, incomplete_message); 6242: return false; 6242: } 6242: 6242: --m_position; 6242: while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_brace) --m_position; 6242: return parse_literal(); 6242: } 6242: min = static_cast(v); 6242: 6242: if(this->m_traits.syntax_type(*m_position) == regex_constants::syntax_comma) 6242: { 6242: 6242: ++m_position; 6242: 6242: while((m_position != m_end) && this->m_traits.isctype(*m_position, this->m_mask_space)) 6242: ++m_position; 6242: if(this->m_position == this->m_end) 6242: { 6242: if(this->flags() & (regbase::main_option_type | regbase::no_perl_ex)) 6242: { 6242: fail(regex_constants::error_brace, this->m_position - this->m_base, incomplete_message); 6242: return false; 6242: } 6242: 6242: --m_position; 6242: while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_brace) --m_position; 6242: return parse_literal(); 6242: } 6242: 6242: v = this->m_traits.toi(m_position, m_end, 10); 6242: max = ((v >= 0) && (v < umax())) ? (std::size_t)v : (std::numeric_limits::max)(); 6242: } 6242: else 6242: { 6242: 6242: max = min; 6242: } 6242: 6242: while((m_position != m_end) && this->m_traits.isctype(*m_position, this->m_mask_space)) 6242: ++m_position; 6242: 6242: if(this->m_position == this->m_end) 6242: { 6242: if(this->flags() & (regbase::main_option_type | regbase::no_perl_ex)) 6242: { 6242: fail(regex_constants::error_brace, this->m_position - this->m_base, incomplete_message); 6242: return false; 6242: } 6242: 6242: --m_position; 6242: while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_brace) --m_position; 6242: return parse_literal(); 6242: } 6242: if(isbasic) 6242: { 6242: if(this->m_traits.syntax_type(*m_position) == regex_constants::syntax_escape) 6242: { 6242: ++m_position; 6242: if(this->m_position == this->m_end) 6242: { 6242: fail(regex_constants::error_brace, this->m_position - this->m_base, incomplete_message); 6242: return false; 6242: } 6242: } 6242: else 6242: { 6242: fail(regex_constants::error_brace, this->m_position - this->m_base, incomplete_message); 6242: return false; 6242: } 6242: } 6242: if(this->m_traits.syntax_type(*m_position) == regex_constants::syntax_close_brace) 6242: ++m_position; 6242: else 6242: { 6242: 6242: --m_position; 6242: while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_brace) --m_position; 6242: return parse_literal(); 6242: } 6242: 6242: 6242: 6242: if(min > max) 6242: { 6242: 6242: m_position -= 2; 6242: while(this->m_traits.isctype(*m_position, this->m_word_mask)) --m_position; 6242: ++m_position; 6242: fail(regex_constants::error_badbrace, m_position - m_base); 6242: return false; 6242: } 6242: return parse_repeat(min, max); 6242: } 6242: 6242: template 6242: bool basic_regex_parser::parse_alt() 6242: { 6242: 6242: 6242: 6242: 6242: if( 6242: ((this->m_last_state == 0) || (this->m_last_state->type == syntax_element_startmark)) 6242: && 6242: !( 6242: ((this->flags() & regbase::main_option_type) == regbase::perl_syntax_group) 6242: && 6242: ((this->flags() & regbase::no_empty_expressions) == 0) 6242: ) 6242: ) 6242: { 6242: fail(regex_constants::error_empty, this->m_position - this->m_base, "A regular expression cannot start with the alternation operator |."); 6242: return false; 6242: } 6242: 6242: 6242: 6242: if(m_max_mark < m_mark_count) 6242: m_max_mark = m_mark_count; 6242: if(m_mark_reset >= 0) 6242: m_mark_count = m_mark_reset; 6242: 6242: ++m_position; 6242: 6242: 6242: 6242: re_syntax_base* pj = this->append_state(re_detail_106501::syntax_element_jump, sizeof(re_jump)); 6242: std::ptrdiff_t jump_offset = this->getoffset(pj); 6242: 6242: 6242: 6242: re_alt* palt = static_cast(this->insert_state(this->m_alt_insert_point, syntax_element_alt, re_alt_size)); 6242: jump_offset += re_alt_size; 6242: this->m_pdata->m_data.align(); 6242: palt->alt.i = this->m_pdata->m_data.size() - this->getoffset(palt); 6242: 6242: 6242: 6242: 6242: this->m_alt_insert_point = this->m_pdata->m_data.size(); 6242: 6242: 6242: 6242: 6242: if(m_has_case_change) 6242: { 6242: static_cast( 6242: this->append_state(syntax_element_toggle_case, sizeof(re_case)) 6242: )->icase = this->m_icase; 6242: } 6242: 6242: 6242: 6242: 6242: 6242: 6242: m_alt_jumps.push_back(jump_offset); 6242: return true; 6242: } 6242: 6242: template 6242: bool basic_regex_parser::parse_set() 6242: { 6242: static const char* incomplete_message = "Character set declaration starting with [ terminated prematurely - either no ] was found or the set had no content."; 6242: ++m_position; 6242: if(m_position == m_end) 6242: { 6242: fail(regex_constants::error_brack, m_position - m_base, incomplete_message); 6242: return false; 6242: } 6242: basic_char_set char_set; 6242: 6242: const charT* base = m_position; 6242: const charT* item_base = m_position; 6242: 6242: while(m_position != m_end) 6242: { 6242: switch(this->m_traits.syntax_type(*m_position)) 6242: { 6242: case regex_constants::syntax_caret: 6242: if(m_position == base) 6242: { 6242: char_set.negate(); 6242: ++m_position; 6242: item_base = m_position; 6242: } 6242: else 6242: parse_set_literal(char_set); 6242: break; 6242: case regex_constants::syntax_close_set: 6242: if(m_position == item_base) 6242: { 6242: parse_set_literal(char_set); 6242: break; 6242: } 6242: else 6242: { 6242: ++m_position; 6242: if(0 == this->append_set(char_set)) 6242: { 6242: fail(regex_constants::error_ctype, m_position - m_base); 6242: return false; 6242: } 6242: } 6242: return true; 6242: case regex_constants::syntax_open_set: 6242: if(parse_inner_set(char_set)) 6242: break; 6242: return true; 6242: case regex_constants::syntax_escape: 6242: { 6242: 6242: 6242: 6242: 6242: ++m_position; 6242: if(this->m_traits.escape_syntax_type(*m_position) 6242: == regex_constants::escape_type_class) 6242: { 6242: char_class_type m = this->m_traits.lookup_classname(m_position, m_position+1); 6242: if(m != 0) 6242: { 6242: char_set.add_class(m); 6242: ++m_position; 6242: break; 6242: } 6242: } 6242: else if(this->m_traits.escape_syntax_type(*m_position) 6242: == regex_constants::escape_type_not_class) 6242: { 6242: 6242: char_class_type m = this->m_traits.lookup_classname(m_position, m_position+1); 6242: if(m != 0) 6242: { 6242: char_set.add_negated_class(m); 6242: ++m_position; 6242: break; 6242: } 6242: } 6242: 6242: --m_position; 6242: parse_set_literal(char_set); 6242: break; 6242: } 6242: default: 6242: parse_set_literal(char_set); 6242: break; 6242: } 6242: } 6242: return m_position != m_end; 6242: } 6242: 6242: template 6242: bool basic_regex_parser::parse_inner_set(basic_char_set& char_set) 6242: { 6242: static const char* incomplete_message = "Character class declaration starting with [ terminated prematurely - either no ] was found or the set had no content."; 6242: 6242: 6242: 6242: 6242: 6242: if(m_end == ++m_position) 6242: { 6242: fail(regex_constants::error_brack, m_position - m_base, incomplete_message); 6242: return false; 6242: } 6242: switch(this->m_traits.syntax_type(*m_position)) 6242: { 6242: case regex_constants::syntax_dot: 6242: 6242: 6242: 6242: --m_position; 6242: parse_set_literal(char_set); 6242: return true; 6242: case regex_constants::syntax_colon: 6242: { 6242: 6242: if((this->flags() & (regbase::main_option_type | regbase::no_char_classes)) 6242: == (regbase::basic_syntax_group | regbase::no_char_classes)) 6242: { 6242: --m_position; 6242: parse_set_literal(char_set); 6242: return true; 6242: } 6242: 6242: if(m_end == ++m_position) 6242: { 6242: fail(regex_constants::error_brack, m_position - m_base, incomplete_message); 6242: return false; 6242: } 6242: const charT* name_first = m_position; 6242: 6242: if(m_end == ++m_position) 6242: { 6242: fail(regex_constants::error_brack, m_position - m_base, incomplete_message); 6242: return false; 6242: } 6242: while((m_position != m_end) 6242: && (this->m_traits.syntax_type(*m_position) != regex_constants::syntax_colon)) 6242: ++m_position; 6242: const charT* name_last = m_position; 6242: if(m_end == m_position) 6242: { 6242: fail(regex_constants::error_brack, m_position - m_base, incomplete_message); 6242: return false; 6242: } 6242: if((m_end == ++m_position) 6242: || (this->m_traits.syntax_type(*m_position) != regex_constants::syntax_close_set)) 6242: { 6242: fail(regex_constants::error_brack, m_position - m_base, incomplete_message); 6242: return false; 6242: } 6242: 6242: 6242: 6242: bool negated = false; 6242: if(this->m_traits.syntax_type(*name_first) == regex_constants::syntax_caret) 6242: { 6242: ++name_first; 6242: negated = true; 6242: } 6242: typedef typename traits::char_class_type m_type; 6242: m_type m = this->m_traits.lookup_classname(name_first, name_last); 6242: if(m == 0) 6242: { 6242: if(char_set.empty() && (name_last - name_first == 1)) 6242: { 6242: 6242: ++m_position; 6242: if( (m_position != m_end) 6242: && (this->m_traits.syntax_type(*m_position) 6242: == regex_constants::syntax_close_set)) 6242: { 6242: if(this->m_traits.escape_syntax_type(*name_first) 6242: == regex_constants::escape_type_left_word) 6242: { 6242: ++m_position; 6242: this->append_state(syntax_element_word_start); 6242: return false; 6242: } 6242: if(this->m_traits.escape_syntax_type(*name_first) 6242: == regex_constants::escape_type_right_word) 6242: { 6242: ++m_position; 6242: this->append_state(syntax_element_word_end); 6242: return false; 6242: } 6242: } 6242: } 6242: fail(regex_constants::error_ctype, name_first - m_base); 6242: return false; 6242: } 6242: if(negated == false) 6242: char_set.add_class(m); 6242: else 6242: char_set.add_negated_class(m); 6242: ++m_position; 6242: break; 6242: } 6242: case regex_constants::syntax_equal: 6242: { 6242: 6242: if(m_end == ++m_position) 6242: { 6242: fail(regex_constants::error_brack, m_position - m_base, incomplete_message); 6242: return false; 6242: } 6242: const charT* name_first = m_position; 6242: 6242: if(m_end == ++m_position) 6242: { 6242: fail(regex_constants::error_brack, m_position - m_base, incomplete_message); 6242: return false; 6242: } 6242: while((m_position != m_end) 6242: && (this->m_traits.syntax_type(*m_position) != regex_constants::syntax_equal)) 6242: ++m_position; 6242: const charT* name_last = m_position; 6242: if(m_end == m_position) 6242: { 6242: fail(regex_constants::error_brack, m_position - m_base, incomplete_message); 6242: return false; 6242: } 6242: if((m_end == ++m_position) 6242: || (this->m_traits.syntax_type(*m_position) != regex_constants::syntax_close_set)) 6242: { 6242: fail(regex_constants::error_brack, m_position - m_base, incomplete_message); 6242: return false; 6242: } 6242: string_type m = this->m_traits.lookup_collatename(name_first, name_last); 6242: if((0 == m.size()) || (m.size() > 2)) 6242: { 6242: fail(regex_constants::error_collate, name_first - m_base); 6242: return false; 6242: } 6242: digraph d; 6242: d.first = m[0]; 6242: if(m.size() > 1) 6242: d.second = m[1]; 6242: else 6242: d.second = 0; 6242: char_set.add_equivalent(d); 6242: ++m_position; 6242: break; 6242: } 6242: default: 6242: --m_position; 6242: parse_set_literal(char_set); 6242: break; 6242: } 6242: return true; 6242: } 6242: 6242: template 6242: void basic_regex_parser::parse_set_literal(basic_char_set& char_set) 6242: { 6242: digraph start_range(get_next_set_literal(char_set)); 6242: if(m_end == m_position) 6242: { 6242: fail(regex_constants::error_brack, m_position - m_base); 6242: return; 6242: } 6242: if(this->m_traits.syntax_type(*m_position) == regex_constants::syntax_dash) 6242: { 6242: 6242: if(m_end == ++m_position) 6242: { 6242: fail(regex_constants::error_brack, m_position - m_base); 6242: return; 6242: } 6242: if(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_close_set) 6242: { 6242: digraph end_range = get_next_set_literal(char_set); 6242: char_set.add_range(start_range, end_range); 6242: if(this->m_traits.syntax_type(*m_position) == regex_constants::syntax_dash) 6242: { 6242: if(m_end == ++m_position) 6242: { 6242: fail(regex_constants::error_brack, m_position - m_base); 6242: return; 6242: } 6242: if(this->m_traits.syntax_type(*m_position) == regex_constants::syntax_close_set) 6242: { 6242: 6242: --m_position; 6242: return; 6242: } 6242: fail(regex_constants::error_range, m_position - m_base); 6242: return; 6242: } 6242: return; 6242: } 6242: --m_position; 6242: } 6242: char_set.add_single(start_range); 6242: } 6242: 6242: template 6242: digraph basic_regex_parser::get_next_set_literal(basic_char_set& char_set) 6242: { 6242: digraph result; 6242: switch(this->m_traits.syntax_type(*m_position)) 6242: { 6242: case regex_constants::syntax_dash: 6242: if(!char_set.empty()) 6242: { 6242: 6242: if((++m_position == m_end) || (this->m_traits.syntax_type(*m_position) != regex_constants::syntax_close_set)) 6242: { 6242: fail(regex_constants::error_range, m_position - m_base); 6242: return result; 6242: } 6242: --m_position; 6242: } 6242: result.first = *m_position++; 6242: return result; 6242: case regex_constants::syntax_escape: 6242: 6242: if(this->flags() & regex_constants::no_escape_in_lists) 6242: { 6242: result = *m_position++; 6242: break; 6242: } 6242: ++m_position; 6242: result = unescape_character(); 6242: break; 6242: case regex_constants::syntax_open_set: 6242: { 6242: if(m_end == ++m_position) 6242: { 6242: fail(regex_constants::error_collate, m_position - m_base); 6242: return result; 6242: } 6242: if(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_dot) 6242: { 6242: --m_position; 6242: result.first = *m_position; 6242: ++m_position; 6242: return result; 6242: } 6242: if(m_end == ++m_position) 6242: { 6242: fail(regex_constants::error_collate, m_position - m_base); 6242: return result; 6242: } 6242: const charT* name_first = m_position; 6242: 6242: if(m_end == ++m_position) 6242: { 6242: fail(regex_constants::error_collate, name_first - m_base); 6242: return result; 6242: } 6242: while((m_position != m_end) 6242: && (this->m_traits.syntax_type(*m_position) != regex_constants::syntax_dot)) 6242: ++m_position; 6242: const charT* name_last = m_position; 6242: if(m_end == m_position) 6242: { 6242: fail(regex_constants::error_collate, name_first - m_base); 6242: return result; 6242: } 6242: if((m_end == ++m_position) 6242: || (this->m_traits.syntax_type(*m_position) != regex_constants::syntax_close_set)) 6242: { 6242: fail(regex_constants::error_collate, name_first - m_base); 6242: return result; 6242: } 6242: ++m_position; 6242: string_type s = this->m_traits.lookup_collatename(name_first, name_last); 6242: if(s.empty() || (s.size() > 2)) 6242: { 6242: fail(regex_constants::error_collate, name_first - m_base); 6242: return result; 6242: } 6242: result.first = s[0]; 6242: if(s.size() > 1) 6242: result.second = s[1]; 6242: else 6242: result.second = 0; 6242: return result; 6242: } 6242: default: 6242: result = *m_position++; 6242: } 6242: return result; 6242: } 6242: 6242: 6242: 6242: 6242: template 6242: bool valid_value(charT, boost::intmax_t v, const mpl::true_&) 6242: { 6242: return (v >> (sizeof(charT) * 8)) == 0; 6242: } 6242: template 6242: bool valid_value(charT, boost::intmax_t, const mpl::false_&) 6242: { 6242: return true; 6242: } 6242: template 6242: bool valid_value(charT c, boost::intmax_t v) 6242: { 6242: return valid_value(c, v, mpl::bool_<(sizeof(charT) < sizeof(boost::intmax_t))>()); 6242: } 6242: 6242: template 6242: charT basic_regex_parser::unescape_character() 6242: { 6242: 6242: 6242: 6242: 6242: charT result(0); 6242: if(m_position == m_end) 6242: { 6242: fail(regex_constants::error_escape, m_position - m_base, "Escape sequence terminated prematurely."); 6242: return false; 6242: } 6242: switch(this->m_traits.escape_syntax_type(*m_position)) 6242: { 6242: case regex_constants::escape_type_control_a: 6242: result = charT('\a'); 6242: break; 6242: case regex_constants::escape_type_e: 6242: result = charT(27); 6242: break; 6242: case regex_constants::escape_type_control_f: 6242: result = charT('\f'); 6242: break; 6242: case regex_constants::escape_type_control_n: 6242: result = charT('\n'); 6242: break; 6242: case regex_constants::escape_type_control_r: 6242: result = charT('\r'); 6242: break; 6242: case regex_constants::escape_type_control_t: 6242: result = charT('\t'); 6242: break; 6242: case regex_constants::escape_type_control_v: 6242: result = charT('\v'); 6242: break; 6242: case regex_constants::escape_type_word_assert: 6242: result = charT('\b'); 6242: break; 6242: case regex_constants::escape_type_ascii_control: 6242: ++m_position; 6242: if(m_position == m_end) 6242: { 6242: 6242: --m_position; 6242: while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_escape) --m_position; 6242: fail(regex_constants::error_escape, m_position - m_base, "ASCII escape sequence terminated prematurely."); 6242: return result; 6242: } 6242: result = static_cast(*m_position % 32); 6242: break; 6242: case regex_constants::escape_type_hex: 6242: ++m_position; 6242: if(m_position == m_end) 6242: { 6242: 6242: --m_position; 6242: while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_escape) --m_position; 6242: fail(regex_constants::error_escape, m_position - m_base, "Hexadecimal escape sequence terminated prematurely."); 6242: return result; 6242: } 6242: 6242: if(this->m_traits.syntax_type(*m_position) == regex_constants::syntax_open_brace) 6242: { 6242: ++m_position; 6242: if(m_position == m_end) 6242: { 6242: 6242: --m_position; 6242: while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_escape) --m_position; 6242: fail(regex_constants::error_escape, m_position - m_base, "Missing } in hexadecimal escape sequence."); 6242: return result; 6242: } 6242: boost::intmax_t i = this->m_traits.toi(m_position, m_end, 16); 6242: if((m_position == m_end) 6242: || (i < 0) 6242: || ((std::numeric_limits::is_specialized) && (i > (boost::intmax_t)(std::numeric_limits::max)())) 6242: || (this->m_traits.syntax_type(*m_position) != regex_constants::syntax_close_brace)) 6242: { 6242: 6242: --m_position; 6242: while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_escape) --m_position; 6242: fail(regex_constants::error_badbrace, m_position - m_base, "Hexadecimal escape sequence was invalid."); 6242: return result; 6242: } 6242: ++m_position; 6242: result = charT(i); 6242: } 6242: else 6242: { 6242: std::ptrdiff_t len = (std::min)(static_cast(2), static_cast(m_end - m_position)); 6242: boost::intmax_t i = this->m_traits.toi(m_position, m_position + len, 16); 6242: if((i < 0) 6242: || !valid_value(charT(0), i)) 6242: { 6242: 6242: --m_position; 6242: while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_escape) --m_position; 6242: fail(regex_constants::error_escape, m_position - m_base, "Escape sequence did not encode a valid character."); 6242: return result; 6242: } 6242: result = charT(i); 6242: } 6242: return result; 6242: case regex_constants::syntax_digit: 6242: { 6242: 6242: 6242: std::ptrdiff_t len = (std::min)(::boost::re_detail_106501::distance(m_position, m_end), static_cast(4)); 6242: const charT* bp = m_position; 6242: boost::intmax_t val = this->m_traits.toi(bp, bp + 1, 8); 6242: if(val != 0) 6242: { 6242: 6242: --m_position; 6242: while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_escape) --m_position; 6242: 6242: fail(regex_constants::error_escape, m_position - m_base, "Invalid octal escape sequence."); 6242: return result; 6242: } 6242: val = this->m_traits.toi(m_position, m_position + len, 8); 6242: if((val < 0) || (val > (boost::intmax_t)(std::numeric_limits::max)())) 6242: { 6242: 6242: --m_position; 6242: while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_escape) --m_position; 6242: fail(regex_constants::error_escape, m_position - m_base, "Octal escape sequence is invalid."); 6242: return result; 6242: } 6242: return static_cast(val); 6242: } 6242: case regex_constants::escape_type_named_char: 6242: { 6242: ++m_position; 6242: if(m_position == m_end) 6242: { 6242: 6242: --m_position; 6242: while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_escape) --m_position; 6242: fail(regex_constants::error_escape, m_position - m_base); 6242: return false; 6242: } 6242: 6242: if(this->m_traits.syntax_type(*m_position) == regex_constants::syntax_open_brace) 6242: { 6242: const charT* base = m_position; 6242: 6242: while((m_position != m_end) && (this->m_traits.syntax_type(*m_position) != regex_constants::syntax_close_brace)) 6242: ++m_position; 6242: if(m_position == m_end) 6242: { 6242: 6242: --m_position; 6242: while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_escape) --m_position; 6242: fail(regex_constants::error_escape, m_position - m_base); 6242: return false; 6242: } 6242: string_type s = this->m_traits.lookup_collatename(++base, m_position++); 6242: if(s.empty()) 6242: { 6242: 6242: --m_position; 6242: while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_escape) --m_position; 6242: fail(regex_constants::error_collate, m_position - m_base); 6242: return false; 6242: } 6242: if(s.size() == 1) 6242: { 6242: return s[0]; 6242: } 6242: } 6242: 6242: 6242: --m_position; 6242: while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_escape) --m_position; 6242: fail(regex_constants::error_escape, m_position - m_base); 6242: return false; 6242: } 6242: default: 6242: result = *m_position; 6242: break; 6242: } 6242: ++m_position; 6242: return result; 6242: 6242: 6242: 6242: } 6242: 6242: template 6242: bool basic_regex_parser::parse_backref() 6242: { 6242: (static_cast (m_position != m_end) ? void (0) : __assert_fail ("m_position != m_end", "/usr/include/boost/regex/v4/basic_regex_parser.hpp", 1895, __extension__ __PRETTY_FUNCTION__)); 6242: const charT* pc = m_position; 6242: boost::intmax_t i = this->m_traits.toi(pc, pc + 1, 10); 6242: if((i == 0) || (((this->flags() & regbase::main_option_type) == regbase::perl_syntax_group) && (this->flags() & regbase::no_bk_refs))) 6242: { 6242: 6242: charT c = unescape_character(); 6242: this->append_literal(c); 6242: } 6242: else if((i > 0) && (this->m_backrefs & (1u << (i-1)))) 6242: { 6242: m_position = pc; 6242: re_brace* pb = static_cast(this->append_state(syntax_element_backref, sizeof(re_brace))); 6242: pb->index = i; 6242: pb->icase = this->flags() & regbase::icase; 6242: } 6242: else 6242: { 6242: 6242: --m_position; 6242: while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_escape) --m_position; 6242: fail(regex_constants::error_backref, m_position - m_base); 6242: return false; 6242: } 6242: return true; 6242: } 6242: 6242: template 6242: bool basic_regex_parser::parse_QE() 6242: { 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: ++m_position; 6242: const charT* start = m_position; 6242: const charT* end; 6242: do 6242: { 6242: while((m_position != m_end) 6242: && (this->m_traits.syntax_type(*m_position) != regex_constants::syntax_escape)) 6242: ++m_position; 6242: if(m_position == m_end) 6242: { 6242: 6242: end = m_position; 6242: break; 6242: } 6242: if(++m_position == m_end) 6242: { 6242: fail(regex_constants::error_escape, m_position - m_base, "Unterminated \\Q...\\E sequence."); 6242: return false; 6242: } 6242: 6242: if(this->m_traits.escape_syntax_type(*m_position) == regex_constants::escape_type_E) 6242: { 6242: ++m_position; 6242: end = m_position - 2; 6242: break; 6242: } 6242: 6242: }while(true); 6242: 6242: 6242: 6242: while(start != end) 6242: { 6242: this->append_literal(*start); 6242: ++start; 6242: } 6242: return true; 6242: 6242: 6242: 6242: } 6242: 6242: template 6242: bool basic_regex_parser::parse_perl_extension() 6242: { 6242: if(++m_position == m_end) 6242: { 6242: 6242: --m_position; 6242: while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position; 6242: fail(regex_constants::error_perl_extension, m_position - m_base); 6242: return false; 6242: } 6242: 6242: 6242: 6242: 6242: 6242: if(this->m_traits.syntax_type(*m_position) == regex_constants::syntax_hash) 6242: { 6242: while((m_position != m_end) 6242: && (this->m_traits.syntax_type(*m_position++) != regex_constants::syntax_close_mark)) 6242: {} 6242: return true; 6242: } 6242: 6242: 6242: 6242: int markid = 0; 6242: std::ptrdiff_t jump_offset = 0; 6242: re_brace* pb = static_cast(this->append_state(syntax_element_startmark, sizeof(re_brace))); 6242: pb->icase = this->flags() & regbase::icase; 6242: std::ptrdiff_t last_paren_start = this->getoffset(pb); 6242: 6242: std::ptrdiff_t last_alt_point = m_alt_insert_point; 6242: this->m_pdata->m_data.align(); 6242: m_alt_insert_point = this->m_pdata->m_data.size(); 6242: std::ptrdiff_t expected_alt_point = m_alt_insert_point; 6242: bool restore_flags = true; 6242: regex_constants::syntax_option_type old_flags = this->flags(); 6242: bool old_case_change = m_has_case_change; 6242: m_has_case_change = false; 6242: charT name_delim; 6242: int mark_reset = m_mark_reset; 6242: int max_mark = m_max_mark; 6242: m_mark_reset = -1; 6242: m_max_mark = m_mark_count; 6242: boost::intmax_t v; 6242: 6242: 6242: 6242: switch(this->m_traits.syntax_type(*m_position)) 6242: { 6242: case regex_constants::syntax_or: 6242: m_mark_reset = m_mark_count; 6242: __attribute__((fallthrough)); 6242: case regex_constants::syntax_colon: 6242: 6242: 6242: 6242: pb->index = markid = 0; 6242: ++m_position; 6242: break; 6242: case regex_constants::syntax_digit: 6242: { 6242: 6242: 6242: 6242: v = this->m_traits.toi(m_position, m_end, 10); 6242: if((v < 0) || (this->m_traits.syntax_type(*m_position) != regex_constants::syntax_close_mark)) 6242: { 6242: 6242: --m_position; 6242: while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position; 6242: fail(regex_constants::error_perl_extension, m_position - m_base, "The recursive sub-expression refers to an invalid marking group, or is unterminated."); 6242: return false; 6242: } 6242: insert_recursion: 6242: pb->index = markid = 0; 6242: re_recurse* pr = static_cast(this->append_state(syntax_element_recurse, sizeof(re_recurse))); 6242: pr->alt.i = v; 6242: pr->state_id = 0; 6242: static_cast( 6242: this->append_state(syntax_element_toggle_case, sizeof(re_case)) 6242: )->icase = this->flags() & regbase::icase; 6242: break; 6242: } 6242: case regex_constants::syntax_plus: 6242: 6242: 6242: 6242: ++m_position; 6242: v = this->m_traits.toi(m_position, m_end, 10); 6242: if((v <= 0) || (this->m_traits.syntax_type(*m_position) != regex_constants::syntax_close_mark)) 6242: { 6242: 6242: --m_position; 6242: while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position; 6242: fail(regex_constants::error_perl_extension, m_position - m_base, "An invalid or unterminated recursive sub-expression."); 6242: return false; 6242: } 6242: v += m_mark_count; 6242: goto insert_recursion; 6242: case regex_constants::syntax_dash: 6242: 6242: 6242: 6242: ++m_position; 6242: v = this->m_traits.toi(m_position, m_end, 10); 6242: if(v <= 0) 6242: { 6242: --m_position; 6242: 6242: goto option_group_jump; 6242: } 6242: v = m_mark_count + 1 - v; 6242: if(v <= 0) 6242: { 6242: 6242: --m_position; 6242: while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position; 6242: fail(regex_constants::error_perl_extension, m_position - m_base, "An invalid or unterminated recursive sub-expression."); 6242: return false; 6242: } 6242: goto insert_recursion; 6242: case regex_constants::syntax_equal: 6242: pb->index = markid = -1; 6242: ++m_position; 6242: jump_offset = this->getoffset(this->append_state(syntax_element_jump, sizeof(re_jump))); 6242: this->m_pdata->m_data.align(); 6242: m_alt_insert_point = this->m_pdata->m_data.size(); 6242: break; 6242: case regex_constants::syntax_not: 6242: pb->index = markid = -2; 6242: ++m_position; 6242: jump_offset = this->getoffset(this->append_state(syntax_element_jump, sizeof(re_jump))); 6242: this->m_pdata->m_data.align(); 6242: m_alt_insert_point = this->m_pdata->m_data.size(); 6242: break; 6242: case regex_constants::escape_type_left_word: 6242: { 6242: 6242: if(++m_position == m_end) 6242: { 6242: 6242: --m_position; 6242: while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position; 6242: fail(regex_constants::error_perl_extension, m_position - m_base); 6242: return false; 6242: } 6242: regex_constants::syntax_type t = this->m_traits.syntax_type(*m_position); 6242: if(t == regex_constants::syntax_not) 6242: pb->index = markid = -2; 6242: else if(t == regex_constants::syntax_equal) 6242: pb->index = markid = -1; 6242: else 6242: { 6242: 6242: name_delim = '>'; 6242: --m_position; 6242: goto named_capture_jump; 6242: } 6242: ++m_position; 6242: jump_offset = this->getoffset(this->append_state(syntax_element_jump, sizeof(re_jump))); 6242: this->append_state(syntax_element_backstep, sizeof(re_brace)); 6242: this->m_pdata->m_data.align(); 6242: m_alt_insert_point = this->m_pdata->m_data.size(); 6242: break; 6242: } 6242: case regex_constants::escape_type_right_word: 6242: 6242: 6242: 6242: pb->index = markid = -3; 6242: ++m_position; 6242: jump_offset = this->getoffset(this->append_state(syntax_element_jump, sizeof(re_jump))); 6242: this->m_pdata->m_data.align(); 6242: m_alt_insert_point = this->m_pdata->m_data.size(); 6242: break; 6242: case regex_constants::syntax_open_mark: 6242: { 6242: 6242: pb->index = markid = -4; 6242: if(++m_position == m_end) 6242: { 6242: 6242: --m_position; 6242: while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position; 6242: fail(regex_constants::error_perl_extension, m_position - m_base); 6242: return false; 6242: } 6242: v = this->m_traits.toi(m_position, m_end, 10); 6242: if(m_position == m_end) 6242: { 6242: 6242: --m_position; 6242: while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position; 6242: fail(regex_constants::error_perl_extension, m_position - m_base); 6242: return false; 6242: } 6242: if(*m_position == charT('R')) 6242: { 6242: if(++m_position == m_end) 6242: { 6242: 6242: --m_position; 6242: while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position; 6242: fail(regex_constants::error_perl_extension, m_position - m_base); 6242: return false; 6242: } 6242: if(*m_position == charT('&')) 6242: { 6242: const charT* base = ++m_position; 6242: while((m_position != m_end) && (this->m_traits.syntax_type(*m_position) != regex_constants::syntax_close_mark)) 6242: ++m_position; 6242: if(m_position == m_end) 6242: { 6242: 6242: --m_position; 6242: while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position; 6242: fail(regex_constants::error_perl_extension, m_position - m_base); 6242: return false; 6242: } 6242: v = -static_cast(hash_value_from_capture_name(base, m_position)); 6242: } 6242: else 6242: { 6242: v = -this->m_traits.toi(m_position, m_end, 10); 6242: } 6242: re_brace* br = static_cast(this->append_state(syntax_element_assert_backref, sizeof(re_brace))); 6242: br->index = v < 0 ? (v - 1) : 0; 6242: if(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_close_mark) 6242: { 6242: 6242: --m_position; 6242: while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position; 6242: fail(regex_constants::error_perl_extension, m_position - m_base); 6242: return false; 6242: } 6242: if(++m_position == m_end) 6242: { 6242: 6242: --m_position; 6242: while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position; 6242: fail(regex_constants::error_perl_extension, m_position - m_base); 6242: return false; 6242: } 6242: } 6242: else if((*m_position == charT('\'')) || (*m_position == charT('<'))) 6242: { 6242: const charT* base = ++m_position; 6242: while((m_position != m_end) && (*m_position != charT('>')) && (*m_position != charT('\''))) 6242: ++m_position; 6242: if(m_position == m_end) 6242: { 6242: 6242: --m_position; 6242: while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position; 6242: fail(regex_constants::error_perl_extension, m_position - m_base); 6242: return false; 6242: } 6242: v = static_cast(hash_value_from_capture_name(base, m_position)); 6242: re_brace* br = static_cast(this->append_state(syntax_element_assert_backref, sizeof(re_brace))); 6242: br->index = v; 6242: if(((*m_position != charT('>')) && (*m_position != charT('\''))) || (++m_position == m_end)) 6242: { 6242: 6242: --m_position; 6242: while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position; 6242: fail(regex_constants::error_perl_extension, m_position - m_base, "Unterminated named capture."); 6242: return false; 6242: } 6242: if(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_close_mark) 6242: { 6242: 6242: --m_position; 6242: while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position; 6242: fail(regex_constants::error_perl_extension, m_position - m_base); 6242: return false; 6242: } 6242: if(++m_position == m_end) 6242: { 6242: 6242: --m_position; 6242: while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position; 6242: fail(regex_constants::error_perl_extension, m_position - m_base); 6242: return false; 6242: } 6242: } 6242: else if(*m_position == charT('D')) 6242: { 6242: const char* def = "DEFINE"; 6242: while(*def && (m_position != m_end) && (*m_position == charT(*def))) 6242: ++m_position, ++def; 6242: if((m_position == m_end) || *def) 6242: { 6242: 6242: --m_position; 6242: while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position; 6242: fail(regex_constants::error_perl_extension, m_position - m_base); 6242: return false; 6242: } 6242: re_brace* br = static_cast(this->append_state(syntax_element_assert_backref, sizeof(re_brace))); 6242: br->index = 9999; 6242: if(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_close_mark) 6242: { 6242: 6242: --m_position; 6242: while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position; 6242: fail(regex_constants::error_perl_extension, m_position - m_base); 6242: return false; 6242: } 6242: if(++m_position == m_end) 6242: { 6242: 6242: --m_position; 6242: while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position; 6242: fail(regex_constants::error_perl_extension, m_position - m_base); 6242: return false; 6242: } 6242: } 6242: else if(v > 0) 6242: { 6242: re_brace* br = static_cast(this->append_state(syntax_element_assert_backref, sizeof(re_brace))); 6242: br->index = v; 6242: if(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_close_mark) 6242: { 6242: 6242: --m_position; 6242: while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position; 6242: fail(regex_constants::error_perl_extension, m_position - m_base); 6242: return false; 6242: } 6242: if(++m_position == m_end) 6242: { 6242: 6242: --m_position; 6242: while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position; 6242: fail(regex_constants::error_perl_extension, m_position - m_base); 6242: return false; 6242: } 6242: } 6242: else 6242: { 6242: 6242: if(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_question) 6242: { 6242: 6242: --m_position; 6242: while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position; 6242: fail(regex_constants::error_perl_extension, m_position - m_base); 6242: return false; 6242: } 6242: if(++m_position == m_end) 6242: { 6242: 6242: --m_position; 6242: while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position; 6242: fail(regex_constants::error_perl_extension, m_position - m_base); 6242: return false; 6242: } 6242: if(this->m_traits.syntax_type(*m_position) == regex_constants::escape_type_left_word) 6242: { 6242: if(++m_position == m_end) 6242: { 6242: 6242: --m_position; 6242: while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position; 6242: fail(regex_constants::error_perl_extension, m_position - m_base); 6242: return false; 6242: } 6242: if((this->m_traits.syntax_type(*m_position) != regex_constants::syntax_equal) 6242: && (this->m_traits.syntax_type(*m_position) != regex_constants::syntax_not)) 6242: { 6242: 6242: --m_position; 6242: while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position; 6242: fail(regex_constants::error_perl_extension, m_position - m_base); 6242: return false; 6242: } 6242: m_position -= 3; 6242: } 6242: else 6242: { 6242: if((this->m_traits.syntax_type(*m_position) != regex_constants::syntax_equal) 6242: && (this->m_traits.syntax_type(*m_position) != regex_constants::syntax_not)) 6242: { 6242: 6242: --m_position; 6242: while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position; 6242: fail(regex_constants::error_perl_extension, m_position - m_base); 6242: return false; 6242: } 6242: m_position -= 2; 6242: } 6242: } 6242: break; 6242: } 6242: case regex_constants::syntax_close_mark: 6242: 6242: --m_position; 6242: while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position; 6242: fail(regex_constants::error_perl_extension, m_position - m_base); 6242: return false; 6242: case regex_constants::escape_type_end_buffer: 6242: { 6242: name_delim = *m_position; 6242: named_capture_jump: 6242: markid = 0; 6242: if(0 == (this->flags() & regbase::nosubs)) 6242: { 6242: markid = ++m_mark_count; 6242: 6242: if(this->flags() & regbase::save_subexpression_location) 6242: this->m_pdata->m_subs.push_back(std::pair(std::distance(m_base, m_position) - 2, 0)); 6242: 6242: 6242: 6242: 6242: } 6242: pb->index = markid; 6242: const charT* base = ++m_position; 6242: if(m_position == m_end) 6242: { 6242: 6242: --m_position; 6242: while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position; 6242: fail(regex_constants::error_perl_extension, m_position - m_base); 6242: return false; 6242: } 6242: while((m_position != m_end) && (*m_position != name_delim)) 6242: ++m_position; 6242: if(m_position == m_end) 6242: { 6242: 6242: --m_position; 6242: while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position; 6242: fail(regex_constants::error_perl_extension, m_position - m_base); 6242: return false; 6242: } 6242: this->m_pdata->set_name(base, m_position, markid); 6242: ++m_position; 6242: break; 6242: } 6242: default: 6242: if(*m_position == charT('R')) 6242: { 6242: ++m_position; 6242: v = 0; 6242: if(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_close_mark) 6242: { 6242: 6242: --m_position; 6242: while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position; 6242: fail(regex_constants::error_perl_extension, m_position - m_base); 6242: return false; 6242: } 6242: goto insert_recursion; 6242: } 6242: if(*m_position == charT('&')) 6242: { 6242: ++m_position; 6242: const charT* base = m_position; 6242: while((m_position != m_end) && (this->m_traits.syntax_type(*m_position) != regex_constants::syntax_close_mark)) 6242: ++m_position; 6242: if(m_position == m_end) 6242: { 6242: 6242: --m_position; 6242: while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position; 6242: fail(regex_constants::error_perl_extension, m_position - m_base); 6242: return false; 6242: } 6242: v = static_cast(hash_value_from_capture_name(base, m_position)); 6242: goto insert_recursion; 6242: } 6242: if(*m_position == charT('P')) 6242: { 6242: ++m_position; 6242: if(m_position == m_end) 6242: { 6242: 6242: --m_position; 6242: while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position; 6242: fail(regex_constants::error_perl_extension, m_position - m_base); 6242: return false; 6242: } 6242: if(*m_position == charT('>')) 6242: { 6242: ++m_position; 6242: const charT* base = m_position; 6242: while((m_position != m_end) && (this->m_traits.syntax_type(*m_position) != regex_constants::syntax_close_mark)) 6242: ++m_position; 6242: if(m_position == m_end) 6242: { 6242: 6242: --m_position; 6242: while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position; 6242: fail(regex_constants::error_perl_extension, m_position - m_base); 6242: return false; 6242: } 6242: v = static_cast(hash_value_from_capture_name(base, m_position)); 6242: goto insert_recursion; 6242: } 6242: } 6242: 6242: 6242: 6242: option_group_jump: 6242: regex_constants::syntax_option_type opts = parse_options(); 6242: if(m_position == m_end) 6242: { 6242: 6242: --m_position; 6242: while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position; 6242: fail(regex_constants::error_perl_extension, m_position - m_base); 6242: return false; 6242: } 6242: 6242: m_has_case_change = ((opts & regbase::icase) != (this->flags() & regbase::icase)); 6242: pb->index = markid = 0; 6242: if(this->m_traits.syntax_type(*m_position) == regex_constants::syntax_close_mark) 6242: { 6242: 6242: this->flags(opts); 6242: restore_flags = false; 6242: old_case_change |= m_has_case_change; 6242: } 6242: else if(this->m_traits.syntax_type(*m_position) == regex_constants::syntax_colon) 6242: { 6242: 6242: this->flags(opts); 6242: ++m_position; 6242: } 6242: else 6242: { 6242: 6242: --m_position; 6242: while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position; 6242: fail(regex_constants::error_perl_extension, m_position - m_base); 6242: return false; 6242: } 6242: 6242: 6242: if(m_has_case_change) 6242: { 6242: static_cast( 6242: this->append_state(syntax_element_toggle_case, sizeof(re_case)) 6242: )->icase = opts & regbase::icase; 6242: } 6242: 6242: } 6242: 6242: 6242: 6242: 6242: parse_all(); 6242: 6242: 6242: 6242: if(0 == unwind_alts(last_paren_start)) 6242: { 6242: 6242: --m_position; 6242: while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position; 6242: fail(regex_constants::error_perl_extension, m_position - m_base, "Invalid alternation operators within (?...) block."); 6242: return false; 6242: } 6242: 6242: 6242: 6242: if(m_position == m_end) 6242: { 6242: 6242: --m_position; 6242: while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position; 6242: this->fail(regex_constants::error_paren, ::boost::re_detail_106501::distance(m_base, m_end)); 6242: return false; 6242: } 6242: (static_cast (this->m_traits.syntax_type(*m_position) == regex_constants::syntax_close_mark) ? void (0) : __assert_fail ("this->m_traits.syntax_type(*m_position) == regex_constants::syntax_close_mark", "/usr/include/boost/regex/v4/basic_regex_parser.hpp", 2551, __extension__ __PRETTY_FUNCTION__)); 6242: ++m_position; 6242: 6242: 6242: 6242: if(restore_flags) 6242: { 6242: 6242: if(m_has_case_change) 6242: { 6242: static_cast( 6242: this->append_state(syntax_element_toggle_case, sizeof(re_case)) 6242: )->icase = old_flags & regbase::icase; 6242: } 6242: this->flags(old_flags); 6242: } 6242: 6242: 6242: 6242: if(jump_offset) 6242: { 6242: this->m_pdata->m_data.align(); 6242: re_jump* jmp = static_cast(this->getaddress(jump_offset)); 6242: jmp->alt.i = this->m_pdata->m_data.size() - this->getoffset(jmp); 6242: if((this->m_last_state == jmp) && (markid != -2)) 6242: { 6242: 6242: 6242: 6242: 6242: --m_position; 6242: while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position; 6242: fail(regex_constants::error_perl_extension, m_position - m_base, "Invalid or empty zero width assertion."); 6242: return false; 6242: } 6242: } 6242: 6242: 6242: 6242: 6242: if(markid == -4) 6242: { 6242: re_syntax_base* b = this->getaddress(expected_alt_point); 6242: 6242: if(b->type != syntax_element_alt) 6242: { 6242: re_alt* alt = static_cast(this->insert_state(expected_alt_point, syntax_element_alt, sizeof(re_alt))); 6242: alt->alt.i = this->m_pdata->m_data.size() - this->getoffset(alt); 6242: } 6242: else if(((std::ptrdiff_t)this->m_pdata->m_data.size() > (static_cast(b)->alt.i + this->getoffset(b))) && (static_cast(b)->alt.i > 0) && this->getaddress(static_cast(b)->alt.i, b)->type == syntax_element_alt) 6242: { 6242: 6242: 6242: --m_position; 6242: while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position; 6242: fail(regex_constants::error_bad_pattern, m_position - m_base, "More than one alternation operator | was encountered inside a conditional expression."); 6242: return false; 6242: } 6242: else 6242: { 6242: 6242: b = this->getaddress(b->next.i, b); 6242: if((b->type == syntax_element_assert_backref) && (static_cast(b)->index == 9999)) 6242: { 6242: 6242: --m_position; 6242: while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position; 6242: fail(regex_constants::error_bad_pattern, m_position - m_base, "Alternation operators are not allowed inside a DEFINE block."); 6242: return false; 6242: } 6242: } 6242: 6242: b = this->getaddress(expected_alt_point); 6242: b = this->getaddress(static_cast(b)->next.i, b); 6242: if((b->type != syntax_element_assert_backref) 6242: && (b->type != syntax_element_startmark)) 6242: { 6242: 6242: --m_position; 6242: while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position; 6242: fail(regex_constants::error_badrepeat, m_position - m_base, "A repetition operator cannot be applied to a zero-width assertion."); 6242: return false; 6242: } 6242: } 6242: 6242: 6242: 6242: pb = static_cast(this->append_state(syntax_element_endmark, sizeof(re_brace))); 6242: pb->index = markid; 6242: pb->icase = this->flags() & regbase::icase; 6242: this->m_paren_start = last_paren_start; 6242: 6242: 6242: 6242: this->m_alt_insert_point = last_alt_point; 6242: 6242: 6242: 6242: m_has_case_change = old_case_change; 6242: 6242: 6242: 6242: if(m_max_mark > m_mark_count) 6242: { 6242: m_mark_count = m_max_mark; 6242: } 6242: m_mark_reset = mark_reset; 6242: m_max_mark = max_mark; 6242: 6242: 6242: if(markid > 0) 6242: { 6242: 6242: if(this->flags() & regbase::save_subexpression_location) 6242: this->m_pdata->m_subs.at(markid - 1).second = std::distance(m_base, m_position) - 1; 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: if(markid < (int)(sizeof(unsigned) * 8)) 6242: this->m_backrefs |= 1u << (markid - 1); 6242: } 6242: return true; 6242: } 6242: 6242: template 6242: bool basic_regex_parser::match_verb(const char* verb) 6242: { 6242: while(*verb) 6242: { 6242: if(static_cast(*verb) != *m_position) 6242: { 6242: while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position; 6242: fail(regex_constants::error_perl_extension, m_position - m_base); 6242: return false; 6242: } 6242: if(++m_position == m_end) 6242: { 6242: --m_position; 6242: while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position; 6242: fail(regex_constants::error_perl_extension, m_position - m_base); 6242: return false; 6242: } 6242: ++verb; 6242: } 6242: return true; 6242: } 6242: 6242: template 6242: bool basic_regex_parser::parse_perl_verb() 6242: { 6242: if(++m_position == m_end) 6242: { 6242: 6242: --m_position; 6242: while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position; 6242: fail(regex_constants::error_perl_extension, m_position - m_base); 6242: return false; 6242: } 6242: switch(*m_position) 6242: { 6242: case 'F': 6242: if(++m_position == m_end) 6242: { 6242: 6242: --m_position; 6242: while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position; 6242: fail(regex_constants::error_perl_extension, m_position - m_base); 6242: return false; 6242: } 6242: if((this->m_traits.syntax_type(*m_position) == regex_constants::syntax_close_mark) || match_verb("AIL")) 6242: { 6242: if((m_position == m_end) || (this->m_traits.syntax_type(*m_position) != regex_constants::syntax_close_mark)) 6242: { 6242: 6242: --m_position; 6242: while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position; 6242: fail(regex_constants::error_perl_extension, m_position - m_base); 6242: return false; 6242: } 6242: ++m_position; 6242: this->append_state(syntax_element_fail); 6242: return true; 6242: } 6242: break; 6242: case 'A': 6242: if(++m_position == m_end) 6242: { 6242: 6242: --m_position; 6242: while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position; 6242: fail(regex_constants::error_perl_extension, m_position - m_base); 6242: return false; 6242: } 6242: if(match_verb("CCEPT")) 6242: { 6242: if((m_position == m_end) || (this->m_traits.syntax_type(*m_position) != regex_constants::syntax_close_mark)) 6242: { 6242: 6242: --m_position; 6242: while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position; 6242: fail(regex_constants::error_perl_extension, m_position - m_base); 6242: return false; 6242: } 6242: ++m_position; 6242: this->append_state(syntax_element_accept); 6242: return true; 6242: } 6242: break; 6242: case 'C': 6242: if(++m_position == m_end) 6242: { 6242: 6242: --m_position; 6242: while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position; 6242: fail(regex_constants::error_perl_extension, m_position - m_base); 6242: return false; 6242: } 6242: if(match_verb("OMMIT")) 6242: { 6242: if((m_position == m_end) || (this->m_traits.syntax_type(*m_position) != regex_constants::syntax_close_mark)) 6242: { 6242: 6242: --m_position; 6242: while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position; 6242: fail(regex_constants::error_perl_extension, m_position - m_base); 6242: return false; 6242: } 6242: ++m_position; 6242: static_cast(this->append_state(syntax_element_commit, sizeof(re_commit)))->action = commit_commit; 6242: this->m_pdata->m_disable_match_any = true; 6242: return true; 6242: } 6242: break; 6242: case 'P': 6242: if(++m_position == m_end) 6242: { 6242: 6242: --m_position; 6242: while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position; 6242: fail(regex_constants::error_perl_extension, m_position - m_base); 6242: return false; 6242: } 6242: if(match_verb("RUNE")) 6242: { 6242: if((m_position == m_end) || (this->m_traits.syntax_type(*m_position) != regex_constants::syntax_close_mark)) 6242: { 6242: 6242: --m_position; 6242: while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position; 6242: fail(regex_constants::error_perl_extension, m_position - m_base); 6242: return false; 6242: } 6242: ++m_position; 6242: static_cast(this->append_state(syntax_element_commit, sizeof(re_commit)))->action = commit_prune; 6242: this->m_pdata->m_disable_match_any = true; 6242: return true; 6242: } 6242: break; 6242: case 'S': 6242: if(++m_position == m_end) 6242: { 6242: 6242: --m_position; 6242: while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position; 6242: fail(regex_constants::error_perl_extension, m_position - m_base); 6242: return false; 6242: } 6242: if(match_verb("KIP")) 6242: { 6242: if((m_position == m_end) || (this->m_traits.syntax_type(*m_position) != regex_constants::syntax_close_mark)) 6242: { 6242: 6242: --m_position; 6242: while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position; 6242: fail(regex_constants::error_perl_extension, m_position - m_base); 6242: return false; 6242: } 6242: ++m_position; 6242: static_cast(this->append_state(syntax_element_commit, sizeof(re_commit)))->action = commit_skip; 6242: this->m_pdata->m_disable_match_any = true; 6242: return true; 6242: } 6242: break; 6242: case 'T': 6242: if(++m_position == m_end) 6242: { 6242: 6242: --m_position; 6242: while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position; 6242: fail(regex_constants::error_perl_extension, m_position - m_base); 6242: return false; 6242: } 6242: if(match_verb("HEN")) 6242: { 6242: if((m_position == m_end) || (this->m_traits.syntax_type(*m_position) != regex_constants::syntax_close_mark)) 6242: { 6242: 6242: --m_position; 6242: while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position; 6242: fail(regex_constants::error_perl_extension, m_position - m_base); 6242: return false; 6242: } 6242: ++m_position; 6242: this->append_state(syntax_element_then); 6242: this->m_pdata->m_disable_match_any = true; 6242: return true; 6242: } 6242: break; 6242: } 6242: 6242: --m_position; 6242: while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position; 6242: fail(regex_constants::error_perl_extension, m_position - m_base); 6242: return false; 6242: } 6242: 6242: template 6242: bool basic_regex_parser::add_emacs_code(bool negate) 6242: { 6242: 6242: 6242: 6242: if(++m_position == m_end) 6242: { 6242: 6242: --m_position; 6242: while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_escape) --m_position; 6242: fail(regex_constants::error_escape, m_position - m_base); 6242: return false; 6242: } 6242: basic_char_set char_set; 6242: if(negate) 6242: char_set.negate(); 6242: 6242: static const charT s_punct[5] = { 'p', 'u', 'n', 'c', 't', }; 6242: 6242: switch(*m_position) 6242: { 6242: case 's': 6242: case ' ': 6242: char_set.add_class(this->m_mask_space); 6242: break; 6242: case 'w': 6242: char_set.add_class(this->m_word_mask); 6242: break; 6242: case '_': 6242: char_set.add_single(digraph(charT('$'))); 6242: char_set.add_single(digraph(charT('&'))); 6242: char_set.add_single(digraph(charT('*'))); 6242: char_set.add_single(digraph(charT('+'))); 6242: char_set.add_single(digraph(charT('-'))); 6242: char_set.add_single(digraph(charT('_'))); 6242: char_set.add_single(digraph(charT('<'))); 6242: char_set.add_single(digraph(charT('>'))); 6242: break; 6242: case '.': 6242: char_set.add_class(this->m_traits.lookup_classname(s_punct, s_punct+5)); 6242: break; 6242: case '(': 6242: char_set.add_single(digraph(charT('('))); 6242: char_set.add_single(digraph(charT('['))); 6242: char_set.add_single(digraph(charT('{'))); 6242: break; 6242: case ')': 6242: char_set.add_single(digraph(charT(')'))); 6242: char_set.add_single(digraph(charT(']'))); 6242: char_set.add_single(digraph(charT('}'))); 6242: break; 6242: case '"': 6242: char_set.add_single(digraph(charT('"'))); 6242: char_set.add_single(digraph(charT('\''))); 6242: char_set.add_single(digraph(charT('`'))); 6242: break; 6242: case '\'': 6242: char_set.add_single(digraph(charT('\''))); 6242: char_set.add_single(digraph(charT(','))); 6242: char_set.add_single(digraph(charT('#'))); 6242: break; 6242: case '<': 6242: char_set.add_single(digraph(charT(';'))); 6242: break; 6242: case '>': 6242: char_set.add_single(digraph(charT('\n'))); 6242: char_set.add_single(digraph(charT('\f'))); 6242: break; 6242: default: 6242: fail(regex_constants::error_ctype, m_position - m_base); 6242: return false; 6242: } 6242: if(0 == this->append_set(char_set)) 6242: { 6242: fail(regex_constants::error_ctype, m_position - m_base); 6242: return false; 6242: } 6242: ++m_position; 6242: return true; 6242: } 6242: 6242: template 6242: regex_constants::syntax_option_type basic_regex_parser::parse_options() 6242: { 6242: 6242: regex_constants::syntax_option_type f = this->flags(); 6242: bool breakout = false; 6242: do 6242: { 6242: switch(*m_position) 6242: { 6242: case 's': 6242: f |= regex_constants::mod_s; 6242: f &= ~regex_constants::no_mod_s; 6242: break; 6242: case 'm': 6242: f &= ~regex_constants::no_mod_m; 6242: break; 6242: case 'i': 6242: f |= regex_constants::icase; 6242: break; 6242: case 'x': 6242: f |= regex_constants::mod_x; 6242: break; 6242: default: 6242: breakout = true; 6242: continue; 6242: } 6242: if(++m_position == m_end) 6242: { 6242: 6242: --m_position; 6242: while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position; 6242: fail(regex_constants::error_paren, m_position - m_base); 6242: return false; 6242: } 6242: } 6242: while(!breakout); 6242: 6242: breakout = false; 6242: 6242: if(*m_position == static_cast('-')) 6242: { 6242: if(++m_position == m_end) 6242: { 6242: 6242: --m_position; 6242: while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position; 6242: fail(regex_constants::error_paren, m_position - m_base); 6242: return false; 6242: } 6242: do 6242: { 6242: switch(*m_position) 6242: { 6242: case 's': 6242: f &= ~regex_constants::mod_s; 6242: f |= regex_constants::no_mod_s; 6242: break; 6242: case 'm': 6242: f |= regex_constants::no_mod_m; 6242: break; 6242: case 'i': 6242: f &= ~regex_constants::icase; 6242: break; 6242: case 'x': 6242: f &= ~regex_constants::mod_x; 6242: break; 6242: default: 6242: breakout = true; 6242: continue; 6242: } 6242: if(++m_position == m_end) 6242: { 6242: 6242: --m_position; 6242: while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position; 6242: fail(regex_constants::error_paren, m_position - m_base); 6242: return false; 6242: } 6242: } 6242: while(!breakout); 6242: } 6242: return f; 6242: } 6242: 6242: template 6242: bool basic_regex_parser::unwind_alts(std::ptrdiff_t last_paren_start) 6242: { 6242: 6242: 6242: 6242: 6242: if((this->m_alt_insert_point == static_cast(this->m_pdata->m_data.size())) 6242: && m_alt_jumps.size() && (m_alt_jumps.back() > last_paren_start) 6242: && 6242: !( 6242: ((this->flags() & regbase::main_option_type) == regbase::perl_syntax_group) 6242: && 6242: ((this->flags() & regbase::no_empty_expressions) == 0) 6242: ) 6242: ) 6242: { 6242: fail(regex_constants::error_empty, this->m_position - this->m_base, "Can't terminate a sub-expression with an alternation operator |."); 6242: return false; 6242: } 6242: 6242: 6242: 6242: while(m_alt_jumps.size() && (m_alt_jumps.back() > last_paren_start)) 6242: { 6242: 6242: 6242: 6242: 6242: std::ptrdiff_t jump_offset = m_alt_jumps.back(); 6242: m_alt_jumps.pop_back(); 6242: this->m_pdata->m_data.align(); 6242: re_jump* jmp = static_cast(this->getaddress(jump_offset)); 6242: (static_cast (jmp->type == syntax_element_jump) ? void (0) : __assert_fail ("jmp->type == syntax_element_jump", "/usr/include/boost/regex/v4/basic_regex_parser.hpp", 3071, __extension__ __PRETTY_FUNCTION__)); 6242: jmp->alt.i = this->m_pdata->m_data.size() - jump_offset; 6242: } 6242: return true; 6242: } 6242: 6242: 6242: 6242: 6242: 6242: } 6242: } 6242: # 74 "/usr/include/boost/regex/v4/regex.hpp" 2 3 4 6242: 6242: 6242: # 1 "/usr/include/boost/regex/v4/sub_match.hpp" 1 3 4 6242: # 33 "/usr/include/boost/regex/v4/sub_match.hpp" 3 4 6242: namespace boost{ 6242: 6242: template 6242: struct sub_match : public std::pair 6242: { 6242: typedef typename re_detail_106501::regex_iterator_traits::value_type value_type; 6242: 6242: 6242: 6242: typedef typename re_detail_106501::regex_iterator_traits::difference_type difference_type; 6242: 6242: typedef BidiIterator iterator_type; 6242: typedef BidiIterator iterator; 6242: typedef BidiIterator const_iterator; 6242: 6242: bool matched; 6242: 6242: sub_match() : std::pair(), matched(false) {} 6242: sub_match(BidiIterator i) : std::pair(i, i), matched(false) {} 6242: 6242: 6242: 6242: template 6242: operator std::basic_string ()const 6242: { 6242: return matched ? std::basic_string(this->first, this->second) : std::basic_string(); 6242: } 6242: 6242: 6242: 6242: 6242: 6242: 6242: difference_type length()const 6242: { 6242: difference_type n = matched ? ::boost::re_detail_106501::distance((BidiIterator)this->first, (BidiIterator)this->second) : 0; 6242: return n; 6242: } 6242: std::basic_string str()const 6242: { 6242: std::basic_string result; 6242: if(matched) 6242: { 6242: std::size_t len = ::boost::re_detail_106501::distance((BidiIterator)this->first, (BidiIterator)this->second); 6242: result.reserve(len); 6242: BidiIterator i = this->first; 6242: while(i != this->second) 6242: { 6242: result.append(1, *i); 6242: ++i; 6242: } 6242: } 6242: return result; 6242: } 6242: int compare(const sub_match& s)const 6242: { 6242: if(matched != s.matched) 6242: return static_cast(matched) - static_cast(s.matched); 6242: return str().compare(s.str()); 6242: } 6242: int compare(const std::basic_string& s)const 6242: { 6242: return str().compare(s); 6242: } 6242: int compare(const value_type* p)const 6242: { 6242: return str().compare(p); 6242: } 6242: 6242: bool operator==(const sub_match& that)const 6242: { return compare(that) == 0; } 6242: bool operator !=(const sub_match& that)const 6242: { return compare(that) != 0; } 6242: bool operator<(const sub_match& that)const 6242: { return compare(that) < 0; } 6242: bool operator>(const sub_match& that)const 6242: { return compare(that) > 0; } 6242: bool operator<=(const sub_match& that)const 6242: { return compare(that) <= 0; } 6242: bool operator>=(const sub_match& that)const 6242: { return compare(that) >= 0; } 6242: # 139 "/usr/include/boost/regex/v4/sub_match.hpp" 3 4 6242: sub_match(const sub_match& that, bool 6242: 6242: 6242: 6242: = true 6242: ) 6242: : std::pair(that), 6242: matched(that.matched) 6242: { 6242: 6242: 6242: 6242: 6242: 6242: } 6242: sub_match& operator=(const sub_match& that) 6242: { 6242: this->first = that.first; 6242: this->second = that.second; 6242: matched = that.matched; 6242: 6242: 6242: 6242: 6242: return *this; 6242: } 6242: 6242: 6242: 6242: BidiIterator begin()const { return this->first; } 6242: BidiIterator end()const { return this->second; } 6242: # 187 "/usr/include/boost/regex/v4/sub_match.hpp" 3 4 6242: }; 6242: 6242: typedef sub_match csub_match; 6242: typedef sub_match ssub_match; 6242: 6242: typedef sub_match wcsub_match; 6242: typedef sub_match wssub_match; 6242: 6242: 6242: 6242: template 6242: inline bool operator == (const std::basic_string::value_type, traits, Allocator>& s, 6242: const sub_match& m) 6242: { return s.compare(m.str()) == 0; } 6242: template 6242: inline bool operator != (const std::basic_string::value_type, traits, Allocator>& s, 6242: const sub_match& m) 6242: { return s.compare(m.str()) != 0; } 6242: template 6242: inline bool operator < (const std::basic_string::value_type, traits, Allocator>& s, 6242: const sub_match& m) 6242: { return s.compare(m.str()) < 0; } 6242: template 6242: inline bool operator <= (const std::basic_string::value_type, traits, Allocator>& s, 6242: const sub_match& m) 6242: { return s.compare(m.str()) <= 0; } 6242: template 6242: inline bool operator >= (const std::basic_string::value_type, traits, Allocator>& s, 6242: const sub_match& m) 6242: { return s.compare(m.str()) >= 0; } 6242: template 6242: inline bool operator > (const std::basic_string::value_type, traits, Allocator>& s, 6242: const sub_match& m) 6242: { return s.compare(m.str()) > 0; } 6242: 6242: template 6242: inline bool operator == (const sub_match& m, 6242: const std::basic_string::value_type, traits, Allocator>& s) 6242: { return m.str().compare(s) == 0; } 6242: template 6242: inline bool operator != (const sub_match& m, 6242: const std::basic_string::value_type, traits, Allocator>& s) 6242: { return m.str().compare(s) != 0; } 6242: template 6242: inline bool operator < (const sub_match& m, 6242: const std::basic_string::value_type, traits, Allocator>& s) 6242: { return m.str().compare(s) < 0; } 6242: template 6242: inline bool operator > (const sub_match& m, 6242: const std::basic_string::value_type, traits, Allocator>& s) 6242: { return m.str().compare(s) > 0; } 6242: template 6242: inline bool operator <= (const sub_match& m, 6242: const std::basic_string::value_type, traits, Allocator>& s) 6242: { return m.str().compare(s) <= 0; } 6242: template 6242: inline bool operator >= (const sub_match& m, 6242: const std::basic_string::value_type, traits, Allocator>& s) 6242: { return m.str().compare(s) >= 0; } 6242: 6242: template 6242: inline bool operator == (const sub_match& m, 6242: typename re_detail_106501::regex_iterator_traits::value_type const* s) 6242: { return m.str().compare(s) == 0; } 6242: template 6242: inline bool operator != (const sub_match& m, 6242: typename re_detail_106501::regex_iterator_traits::value_type const* s) 6242: { return m.str().compare(s) != 0; } 6242: template 6242: inline bool operator > (const sub_match& m, 6242: typename re_detail_106501::regex_iterator_traits::value_type const* s) 6242: { return m.str().compare(s) > 0; } 6242: template 6242: inline bool operator < (const sub_match& m, 6242: typename re_detail_106501::regex_iterator_traits::value_type const* s) 6242: { return m.str().compare(s) < 0; } 6242: template 6242: inline bool operator >= (const sub_match& m, 6242: typename re_detail_106501::regex_iterator_traits::value_type const* s) 6242: { return m.str().compare(s) >= 0; } 6242: template 6242: inline bool operator <= (const sub_match& m, 6242: typename re_detail_106501::regex_iterator_traits::value_type const* s) 6242: { return m.str().compare(s) <= 0; } 6242: 6242: template 6242: inline bool operator == (typename re_detail_106501::regex_iterator_traits::value_type const* s, 6242: const sub_match& m) 6242: { return m.str().compare(s) == 0; } 6242: template 6242: inline bool operator != (typename re_detail_106501::regex_iterator_traits::value_type const* s, 6242: const sub_match& m) 6242: { return m.str().compare(s) != 0; } 6242: template 6242: inline bool operator < (typename re_detail_106501::regex_iterator_traits::value_type const* s, 6242: const sub_match& m) 6242: { return m.str().compare(s) > 0; } 6242: template 6242: inline bool operator > (typename re_detail_106501::regex_iterator_traits::value_type const* s, 6242: const sub_match& m) 6242: { return m.str().compare(s) < 0; } 6242: template 6242: inline bool operator <= (typename re_detail_106501::regex_iterator_traits::value_type const* s, 6242: const sub_match& m) 6242: { return m.str().compare(s) >= 0; } 6242: template 6242: inline bool operator >= (typename re_detail_106501::regex_iterator_traits::value_type const* s, 6242: const sub_match& m) 6242: { return m.str().compare(s) <= 0; } 6242: 6242: 6242: template 6242: inline bool operator == (const sub_match& m, 6242: typename re_detail_106501::regex_iterator_traits::value_type const& s) 6242: { return m.str().compare(0, m.length(), &s, 1) == 0; } 6242: template 6242: inline bool operator != (const sub_match& m, 6242: typename re_detail_106501::regex_iterator_traits::value_type const& s) 6242: { return m.str().compare(0, m.length(), &s, 1) != 0; } 6242: template 6242: inline bool operator > (const sub_match& m, 6242: typename re_detail_106501::regex_iterator_traits::value_type const& s) 6242: { return m.str().compare(0, m.length(), &s, 1) > 0; } 6242: template 6242: inline bool operator < (const sub_match& m, 6242: typename re_detail_106501::regex_iterator_traits::value_type const& s) 6242: { return m.str().compare(0, m.length(), &s, 1) < 0; } 6242: template 6242: inline bool operator >= (const sub_match& m, 6242: typename re_detail_106501::regex_iterator_traits::value_type const& s) 6242: { return m.str().compare(0, m.length(), &s, 1) >= 0; } 6242: template 6242: inline bool operator <= (const sub_match& m, 6242: typename re_detail_106501::regex_iterator_traits::value_type const& s) 6242: { return m.str().compare(0, m.length(), &s, 1) <= 0; } 6242: 6242: template 6242: inline bool operator == (typename re_detail_106501::regex_iterator_traits::value_type const& s, 6242: const sub_match& m) 6242: { return m.str().compare(0, m.length(), &s, 1) == 0; } 6242: template 6242: inline bool operator != (typename re_detail_106501::regex_iterator_traits::value_type const& s, 6242: const sub_match& m) 6242: { return m.str().compare(0, m.length(), &s, 1) != 0; } 6242: template 6242: inline bool operator < (typename re_detail_106501::regex_iterator_traits::value_type const& s, 6242: const sub_match& m) 6242: { return m.str().compare(0, m.length(), &s, 1) > 0; } 6242: template 6242: inline bool operator > (typename re_detail_106501::regex_iterator_traits::value_type const& s, 6242: const sub_match& m) 6242: { return m.str().compare(0, m.length(), &s, 1) < 0; } 6242: template 6242: inline bool operator <= (typename re_detail_106501::regex_iterator_traits::value_type const& s, 6242: const sub_match& m) 6242: { return m.str().compare(0, m.length(), &s, 1) >= 0; } 6242: template 6242: inline bool operator >= (typename re_detail_106501::regex_iterator_traits::value_type const& s, 6242: const sub_match& m) 6242: { return m.str().compare(0, m.length(), &s, 1) <= 0; } 6242: 6242: 6242: template 6242: inline std::basic_string::value_type, traits, Allocator> 6242: operator + (const std::basic_string::value_type, traits, Allocator>& s, 6242: const sub_match& m) 6242: { 6242: std::basic_string::value_type, traits, Allocator> result; 6242: result.reserve(s.size() + m.length() + 1); 6242: return result.append(s).append(m.first, m.second); 6242: } 6242: template 6242: inline std::basic_string::value_type, traits, Allocator> 6242: operator + (const sub_match& m, 6242: const std::basic_string::value_type, traits, Allocator>& s) 6242: { 6242: std::basic_string::value_type, traits, Allocator> result; 6242: result.reserve(s.size() + m.length() + 1); 6242: return result.append(m.first, m.second).append(s); 6242: } 6242: 6242: template 6242: inline std::basic_string::value_type> 6242: operator + (typename re_detail_106501::regex_iterator_traits::value_type const* s, 6242: const sub_match& m) 6242: { 6242: std::basic_string::value_type> result; 6242: result.reserve(std::char_traits::value_type>::length(s) + m.length() + 1); 6242: return result.append(s).append(m.first, m.second); 6242: } 6242: template 6242: inline std::basic_string::value_type> 6242: operator + (const sub_match& m, 6242: typename re_detail_106501::regex_iterator_traits::value_type const * s) 6242: { 6242: std::basic_string::value_type> result; 6242: result.reserve(std::char_traits::value_type>::length(s) + m.length() + 1); 6242: return result.append(m.first, m.second).append(s); 6242: } 6242: # 403 "/usr/include/boost/regex/v4/sub_match.hpp" 3 4 6242: template 6242: inline std::basic_string::value_type> 6242: operator + (typename re_detail_106501::regex_iterator_traits::value_type const& s, 6242: const sub_match& m) 6242: { 6242: std::basic_string::value_type> result; 6242: result.reserve(m.length() + 2); 6242: return result.append(1, s).append(m.first, m.second); 6242: } 6242: template 6242: inline std::basic_string::value_type> 6242: operator + (const sub_match& m, 6242: typename re_detail_106501::regex_iterator_traits::value_type const& s) 6242: { 6242: std::basic_string::value_type> result; 6242: result.reserve(m.length() + 2); 6242: return result.append(m.first, m.second).append(1, s); 6242: } 6242: template 6242: inline std::basic_string::value_type> 6242: operator + (const sub_match& m1, 6242: const sub_match& m2) 6242: { 6242: std::basic_string::value_type> result; 6242: result.reserve(m1.length() + m2.length() + 1); 6242: return result.append(m1.first, m1.second).append(m2.first, m2.second); 6242: } 6242: 6242: template 6242: std::basic_ostream& 6242: operator << (std::basic_ostream& os, 6242: const sub_match& s) 6242: { 6242: return (os << s.str()); 6242: } 6242: # 502 "/usr/include/boost/regex/v4/sub_match.hpp" 3 4 6242: } 6242: # 77 "/usr/include/boost/regex/v4/regex.hpp" 2 3 4 6242: 6242: 6242: # 1 "/usr/include/boost/regex/v4/regex_format.hpp" 1 3 4 6242: # 24 "/usr/include/boost/regex/v4/regex_format.hpp" 3 4 6242: # 1 "/usr/include/boost/type_traits/is_pointer.hpp" 1 3 4 6242: # 26 "/usr/include/boost/type_traits/is_pointer.hpp" 3 4 6242: namespace boost { 6242: 6242: 6242: 6242: 6242: template struct is_pointer : public false_type{}; 6242: template struct is_pointer : public true_type{}; 6242: template struct is_pointer : public true_type{}; 6242: template struct is_pointer : public true_type{}; 6242: template struct is_pointer : public true_type{}; 6242: # 45 "/usr/include/boost/type_traits/is_pointer.hpp" 3 4 6242: } 6242: # 25 "/usr/include/boost/regex/v4/regex_format.hpp" 2 3 4 6242: # 1 "/usr/include/boost/type_traits/is_function.hpp" 1 3 4 6242: # 14 "/usr/include/boost/type_traits/is_function.hpp" 3 4 6242: # 1 "/usr/include/boost/type_traits/is_reference.hpp" 1 3 4 6242: # 15 "/usr/include/boost/type_traits/is_reference.hpp" 3 4 6242: # 1 "/usr/include/boost/type_traits/is_lvalue_reference.hpp" 1 3 4 6242: # 26 "/usr/include/boost/type_traits/is_lvalue_reference.hpp" 3 4 6242: namespace boost { 6242: 6242: 6242: 6242: 6242: 6242: template struct is_lvalue_reference : public false_type{}; 6242: template struct is_lvalue_reference : public true_type{}; 6242: # 47 "/usr/include/boost/type_traits/is_lvalue_reference.hpp" 3 4 6242: } 6242: # 16 "/usr/include/boost/type_traits/is_reference.hpp" 2 3 4 6242: # 1 "/usr/include/boost/type_traits/is_rvalue_reference.hpp" 1 3 4 6242: # 15 "/usr/include/boost/type_traits/is_rvalue_reference.hpp" 3 4 6242: namespace boost { 6242: 6242: template struct is_rvalue_reference : public false_type {}; 6242: 6242: template struct is_rvalue_reference : public true_type {}; 6242: 6242: 6242: } 6242: # 17 "/usr/include/boost/type_traits/is_reference.hpp" 2 3 4 6242: 6242: namespace boost { 6242: 6242: template struct is_reference 6242: : public 6242: integral_constant< 6242: bool, 6242: ::boost::is_lvalue_reference::value || ::boost::is_rvalue_reference::value> 6242: {}; 6242: 6242: } 6242: # 15 "/usr/include/boost/type_traits/is_function.hpp" 2 3 4 6242: 6242: 6242: 6242: # 1 "/usr/include/boost/type_traits/detail/is_function_ptr_helper.hpp" 1 3 4 6242: # 34 "/usr/include/boost/type_traits/detail/is_function_ptr_helper.hpp" 3 4 6242: namespace boost { 6242: namespace type_traits { 6242: 6242: template 6242: struct is_function_ptr_helper 6242: { 6242: static const bool value = false; 6242: }; 6242: 6242: 6242: 6242: 6242: template 6242: struct is_function_ptr_helper { static const bool value = true; }; 6242: template 6242: struct is_function_ptr_helper { static const bool value = true; }; 6242: template 6242: struct is_function_ptr_helper { static const bool value = true; }; 6242: template 6242: struct is_function_ptr_helper { static const bool value = true; }; 6242: template 6242: struct is_function_ptr_helper { static const bool value = true; }; 6242: template 6242: struct is_function_ptr_helper { static const bool value = true; }; 6242: template 6242: struct is_function_ptr_helper { static const bool value = true; }; 6242: template 6242: struct is_function_ptr_helper { static const bool value = true; }; 6242: template 6242: struct is_function_ptr_helper { static const bool value = true; }; 6242: template 6242: struct is_function_ptr_helper { static const bool value = true; }; 6242: template 6242: struct is_function_ptr_helper { static const bool value = true; }; 6242: template 6242: struct is_function_ptr_helper { static const bool value = true; }; 6242: template 6242: struct is_function_ptr_helper { static const bool value = true; }; 6242: template 6242: struct is_function_ptr_helper { static const bool value = true; }; 6242: template 6242: struct is_function_ptr_helper { static const bool value = true; }; 6242: template 6242: struct is_function_ptr_helper { static const bool value = true; }; 6242: template 6242: struct is_function_ptr_helper { static const bool value = true; }; 6242: template 6242: struct is_function_ptr_helper { static const bool value = true; }; 6242: template 6242: struct is_function_ptr_helper { static const bool value = true; }; 6242: template 6242: struct is_function_ptr_helper { static const bool value = true; }; 6242: template 6242: struct is_function_ptr_helper { static const bool value = true; }; 6242: template 6242: struct is_function_ptr_helper { static const bool value = true; }; 6242: template 6242: struct is_function_ptr_helper { static const bool value = true; }; 6242: template 6242: struct is_function_ptr_helper { static const bool value = true; }; 6242: template 6242: struct is_function_ptr_helper { static const bool value = true; }; 6242: template 6242: struct is_function_ptr_helper { static const bool value = true; }; 6242: template 6242: struct is_function_ptr_helper { static const bool value = true; }; 6242: template 6242: struct is_function_ptr_helper { static const bool value = true; }; 6242: template 6242: struct is_function_ptr_helper { static const bool value = true; }; 6242: template 6242: struct is_function_ptr_helper { static const bool value = true; }; 6242: template 6242: struct is_function_ptr_helper { static const bool value = true; }; 6242: template 6242: struct is_function_ptr_helper { static const bool value = true; }; 6242: template 6242: struct is_function_ptr_helper { static const bool value = true; }; 6242: template 6242: struct is_function_ptr_helper { static const bool value = true; }; 6242: template 6242: struct is_function_ptr_helper { static const bool value = true; }; 6242: template 6242: struct is_function_ptr_helper { static const bool value = true; }; 6242: template 6242: struct is_function_ptr_helper { static const bool value = true; }; 6242: template 6242: struct is_function_ptr_helper { static const bool value = true; }; 6242: template 6242: struct is_function_ptr_helper { static const bool value = true; }; 6242: template 6242: struct is_function_ptr_helper { static const bool value = true; }; 6242: template 6242: struct is_function_ptr_helper { static const bool value = true; }; 6242: template 6242: struct is_function_ptr_helper { static const bool value = true; }; 6242: template 6242: struct is_function_ptr_helper { static const bool value = true; }; 6242: template 6242: struct is_function_ptr_helper { static const bool value = true; }; 6242: template 6242: struct is_function_ptr_helper { static const bool value = true; }; 6242: template 6242: struct is_function_ptr_helper { static const bool value = true; }; 6242: template 6242: struct is_function_ptr_helper { static const bool value = true; }; 6242: template 6242: struct is_function_ptr_helper { static const bool value = true; }; 6242: template 6242: struct is_function_ptr_helper { static const bool value = true; }; 6242: template 6242: struct is_function_ptr_helper { static const bool value = true; }; 6242: template 6242: struct is_function_ptr_helper { static const bool value = true; }; 6242: template 6242: struct is_function_ptr_helper { static const bool value = true; }; 6242: # 159 "/usr/include/boost/type_traits/detail/is_function_ptr_helper.hpp" 3 4 6242: } 6242: } 6242: # 19 "/usr/include/boost/type_traits/is_function.hpp" 2 3 4 6242: # 30 "/usr/include/boost/type_traits/is_function.hpp" 3 4 6242: namespace boost { 6242: 6242: 6242: 6242: namespace detail { 6242: 6242: 6242: template 6242: struct is_function_chooser 6242: { 6242: template< typename T > struct result_ 6242: : public false_type {}; 6242: }; 6242: 6242: template <> 6242: struct is_function_chooser 6242: { 6242: template< typename T > struct result_ 6242: : public ::boost::type_traits::is_function_ptr_helper {}; 6242: }; 6242: 6242: template 6242: struct is_function_impl 6242: : public is_function_chooser< ::boost::is_reference::value > 6242: ::template result_ 6242: { 6242: }; 6242: # 88 "/usr/include/boost/type_traits/is_function.hpp" 3 4 6242: } 6242: 6242: 6242: 6242: 6242: 6242: 6242: template struct is_function : integral_constant::value> {}; 6242: 6242: template struct is_function : public false_type {}; 6242: 6242: 6242: } 6242: # 26 "/usr/include/boost/regex/v4/regex_format.hpp" 2 3 4 6242: # 1 "/usr/include/boost/type_traits/is_class.hpp" 1 3 4 6242: # 31 "/usr/include/boost/type_traits/is_class.hpp" 3 4 6242: namespace boost { 6242: 6242: namespace detail { 6242: # 96 "/usr/include/boost/type_traits/is_class.hpp" 3 4 6242: template 6242: struct is_class_impl 6242: { 6242: static const bool value = __is_class(T); 6242: }; 6242: 6242: 6242: } 6242: 6242: template struct is_class : public integral_constant::value> {}; 6242: 6242: 6242: 6242: 6242: 6242: 6242: } 6242: # 27 "/usr/include/boost/regex/v4/regex_format.hpp" 2 3 4 6242: 6242: # 1 "/usr/include/boost/type_traits/is_convertible.hpp" 1 3 4 6242: # 18 "/usr/include/boost/type_traits/is_convertible.hpp" 3 4 6242: # 1 "/usr/include/boost/type_traits/detail/yes_no_type.hpp" 1 3 4 6242: # 14 "/usr/include/boost/type_traits/detail/yes_no_type.hpp" 3 4 6242: namespace boost { 6242: namespace type_traits { 6242: 6242: typedef char yes_type; 6242: struct no_type 6242: { 6242: char padding[8]; 6242: }; 6242: 6242: } 6242: } 6242: # 19 "/usr/include/boost/type_traits/is_convertible.hpp" 2 3 4 6242: 6242: # 1 "/usr/include/boost/type_traits/is_array.hpp" 1 3 4 6242: # 20 "/usr/include/boost/type_traits/is_array.hpp" 3 4 6242: namespace boost { 6242: 6242: 6242: 6242: 6242: template struct is_array : public false_type {}; 6242: 6242: template struct is_array : public true_type {}; 6242: template struct is_array : public true_type{}; 6242: template struct is_array : public true_type{}; 6242: template struct is_array : public true_type{}; 6242: 6242: template struct is_array : public true_type{}; 6242: template struct is_array : public true_type{}; 6242: template struct is_array : public true_type{}; 6242: template struct is_array : public true_type{}; 6242: 6242: 6242: 6242: 6242: 6242: } 6242: # 21 "/usr/include/boost/type_traits/is_convertible.hpp" 2 3 4 6242: # 1 "/usr/include/boost/type_traits/is_arithmetic.hpp" 1 3 4 6242: # 13 "/usr/include/boost/type_traits/is_arithmetic.hpp" 3 4 6242: # 1 "/usr/include/boost/type_traits/is_floating_point.hpp" 1 3 4 6242: # 13 "/usr/include/boost/type_traits/is_floating_point.hpp" 3 4 6242: namespace boost { 6242: 6242: 6242: template struct is_floating_point : public false_type{}; 6242: template struct is_floating_point : public is_floating_point{}; 6242: template struct is_floating_point : public is_floating_point{}; 6242: template struct is_floating_point : public is_floating_point{}; 6242: template<> struct is_floating_point : public true_type{}; 6242: template<> struct is_floating_point : public true_type{}; 6242: template<> struct is_floating_point : public true_type{}; 6242: 6242: 6242: 6242: 6242: 6242: } 6242: # 14 "/usr/include/boost/type_traits/is_arithmetic.hpp" 2 3 4 6242: 6242: namespace boost { 6242: 6242: template 6242: struct is_arithmetic : public integral_constant::value || is_floating_point::value> {}; 6242: 6242: } 6242: # 22 "/usr/include/boost/type_traits/is_convertible.hpp" 2 3 4 6242: # 1 "/usr/include/boost/type_traits/is_void.hpp" 1 3 4 6242: # 14 "/usr/include/boost/type_traits/is_void.hpp" 3 4 6242: namespace boost { 6242: 6242: template 6242: struct is_void : public false_type {}; 6242: 6242: template<> struct is_void : public true_type {}; 6242: template<> struct is_void : public true_type{}; 6242: template<> struct is_void : public true_type{}; 6242: template<> struct is_void : public true_type{}; 6242: 6242: } 6242: # 23 "/usr/include/boost/type_traits/is_convertible.hpp" 2 3 4 6242: 6242: # 1 "/usr/include/boost/type_traits/is_abstract.hpp" 1 3 4 6242: # 63 "/usr/include/boost/type_traits/is_abstract.hpp" 3 4 6242: namespace boost { 6242: 6242: namespace detail{ 6242: 6242: 6242: template 6242: struct is_abstract_imp 6242: { 6242: static const bool value = __is_abstract(T); 6242: }; 6242: # 140 "/usr/include/boost/type_traits/is_abstract.hpp" 3 4 6242: } 6242: 6242: 6242: template struct is_abstract : public integral_constant::value> {}; 6242: 6242: 6242: 6242: 6242: } 6242: # 25 "/usr/include/boost/type_traits/is_convertible.hpp" 2 3 4 6242: 6242: # 1 "/usr/include/boost/type_traits/add_lvalue_reference.hpp" 1 3 4 6242: # 9 "/usr/include/boost/type_traits/add_lvalue_reference.hpp" 3 4 6242: # 1 "/usr/include/boost/type_traits/add_reference.hpp" 1 3 4 6242: # 15 "/usr/include/boost/type_traits/add_reference.hpp" 3 4 6242: namespace boost { 6242: 6242: namespace detail { 6242: 6242: 6242: 6242: 6242: 6242: 6242: template 6242: struct add_reference_impl 6242: { 6242: typedef T& type; 6242: }; 6242: 6242: 6242: template 6242: struct add_reference_impl 6242: { 6242: typedef T&& type; 6242: }; 6242: 6242: 6242: } 6242: 6242: template struct add_reference 6242: { 6242: typedef typename boost::detail::add_reference_impl::type type; 6242: }; 6242: template struct add_reference 6242: { 6242: typedef T& type; 6242: }; 6242: 6242: 6242: template <> struct add_reference { typedef void type; }; 6242: 6242: template <> struct add_reference { typedef const void type; }; 6242: template <> struct add_reference { typedef const volatile void type; }; 6242: template <> struct add_reference { typedef volatile void type; }; 6242: 6242: 6242: 6242: 6242: template using add_reference_t = typename add_reference::type; 6242: 6242: 6242: 6242: 6242: } 6242: # 10 "/usr/include/boost/type_traits/add_lvalue_reference.hpp" 2 3 4 6242: 6242: namespace boost{ 6242: 6242: template struct add_lvalue_reference 6242: { 6242: typedef typename boost::add_reference::type type; 6242: }; 6242: 6242: 6242: template struct add_lvalue_reference 6242: { 6242: typedef T& type; 6242: }; 6242: 6242: 6242: 6242: 6242: template using add_lvalue_reference_t = typename add_lvalue_reference::type; 6242: 6242: 6242: 6242: } 6242: # 27 "/usr/include/boost/type_traits/is_convertible.hpp" 2 3 4 6242: # 1 "/usr/include/boost/type_traits/add_rvalue_reference.hpp" 1 3 4 6242: # 31 "/usr/include/boost/type_traits/add_rvalue_reference.hpp" 3 4 6242: namespace boost { 6242: 6242: namespace type_traits_detail { 6242: 6242: template 6242: struct add_rvalue_reference_helper 6242: { typedef T type; }; 6242: 6242: 6242: template 6242: struct add_rvalue_reference_helper 6242: { 6242: typedef T&& type; 6242: }; 6242: 6242: 6242: template 6242: struct add_rvalue_reference_imp 6242: { 6242: typedef typename boost::type_traits_detail::add_rvalue_reference_helper 6242: ::value == false && is_reference::value == false) >::type type; 6242: }; 6242: 6242: } 6242: 6242: template struct add_rvalue_reference 6242: { 6242: typedef typename boost::type_traits_detail::add_rvalue_reference_imp::type type; 6242: }; 6242: 6242: 6242: 6242: template using add_rvalue_reference_t = typename add_rvalue_reference::type; 6242: 6242: 6242: 6242: } 6242: # 28 "/usr/include/boost/type_traits/is_convertible.hpp" 2 3 4 6242: 6242: 6242: 6242: 6242: 6242: 6242: # 1 "/usr/include/boost/type_traits/declval.hpp" 1 3 4 6242: # 37 "/usr/include/boost/type_traits/declval.hpp" 3 4 6242: namespace boost { 6242: 6242: template 6242: typename add_rvalue_reference::type declval() noexcept; 6242: 6242: } 6242: # 35 "/usr/include/boost/type_traits/is_convertible.hpp" 2 3 4 6242: 6242: 6242: 6242: 6242: 6242: 6242: namespace boost { 6242: # 55 "/usr/include/boost/type_traits/is_convertible.hpp" 3 4 6242: namespace detail { 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: template 6242: struct or_helper 6242: { 6242: static const bool value = (A::value || B::value || C::value); 6242: }; 6242: 6242: template, boost::is_function, boost::is_array >::value> 6242: struct is_convertible_basic_impl 6242: { 6242: 6242: static const bool value = is_void::value; 6242: }; 6242: 6242: template 6242: class is_convertible_basic_impl 6242: { 6242: typedef char one; 6242: typedef int two; 6242: 6242: template 6242: static void test_aux(To1); 6242: 6242: template 6242: static decltype(test_aux(boost::declval()), one()) test(int); 6242: 6242: template 6242: static two test(...); 6242: 6242: public: 6242: static const bool value = sizeof(test(0)) == 1; 6242: }; 6242: # 358 "/usr/include/boost/type_traits/is_convertible.hpp" 3 4 6242: template 6242: struct is_convertible_impl 6242: { 6242: static const bool value = ( ::boost::detail::is_convertible_basic_impl::value && !::boost::is_array::value && !::boost::is_function::value); 6242: }; 6242: 6242: 6242: template 6242: struct is_convertible_impl_select 6242: { 6242: template 6242: struct rebind 6242: { 6242: typedef is_convertible_impl type; 6242: }; 6242: }; 6242: 6242: template <> 6242: struct is_convertible_impl_select 6242: { 6242: template 6242: struct rebind 6242: { 6242: typedef true_type type; 6242: }; 6242: }; 6242: 6242: template <> 6242: struct is_convertible_impl_select 6242: { 6242: template 6242: struct rebind 6242: { 6242: typedef false_type type; 6242: }; 6242: }; 6242: 6242: template <> 6242: struct is_convertible_impl_select 6242: { 6242: template 6242: struct rebind 6242: { 6242: typedef false_type type; 6242: }; 6242: }; 6242: 6242: template 6242: struct is_convertible_impl_dispatch_base 6242: { 6242: 6242: typedef is_convertible_impl_select< 6242: ::boost::is_arithmetic::value, 6242: ::boost::is_arithmetic::value, 6242: 6242: 6242: 6242: 6242: false 6242: 6242: > selector; 6242: 6242: 6242: 6242: typedef typename selector::template rebind isc_binder; 6242: typedef typename isc_binder::type type; 6242: }; 6242: 6242: template 6242: struct is_convertible_impl_dispatch 6242: : public is_convertible_impl_dispatch_base::type 6242: {}; 6242: # 438 "/usr/include/boost/type_traits/is_convertible.hpp" 3 4 6242: template <> struct is_convertible_impl_dispatch : public true_type{}; 6242: template <> struct is_convertible_impl_dispatch : public true_type{}; 6242: template <> struct is_convertible_impl_dispatch : public true_type{}; 6242: template <> struct is_convertible_impl_dispatch : public true_type{}; 6242: 6242: template <> struct is_convertible_impl_dispatch : public true_type{}; 6242: template <> struct is_convertible_impl_dispatch : public true_type{}; 6242: template <> struct is_convertible_impl_dispatch : public true_type{}; 6242: template <> struct is_convertible_impl_dispatch : public true_type{}; 6242: 6242: template <> struct is_convertible_impl_dispatch : public true_type{}; 6242: template <> struct is_convertible_impl_dispatch : public true_type{}; 6242: template <> struct is_convertible_impl_dispatch : public true_type{}; 6242: template <> struct is_convertible_impl_dispatch : public true_type{}; 6242: 6242: template <> struct is_convertible_impl_dispatch : public true_type{}; 6242: template <> struct is_convertible_impl_dispatch : public true_type{}; 6242: template <> struct is_convertible_impl_dispatch : public true_type{}; 6242: template <> struct is_convertible_impl_dispatch : public true_type{}; 6242: 6242: 6242: 6242: 6242: 6242: template struct is_convertible_impl_dispatch : public false_type{}; 6242: template struct is_convertible_impl_dispatch : public false_type{}; 6242: 6242: 6242: template struct is_convertible_impl_dispatch : public false_type{}; 6242: template struct is_convertible_impl_dispatch : public false_type{}; 6242: template struct is_convertible_impl_dispatch : public false_type{}; 6242: template struct is_convertible_impl_dispatch : public false_type{}; 6242: template struct is_convertible_impl_dispatch : public false_type{}; 6242: template struct is_convertible_impl_dispatch : public false_type{}; 6242: 6242: 6242: } 6242: 6242: template 6242: struct is_convertible : public integral_constant::value> {}; 6242: # 486 "/usr/include/boost/type_traits/is_convertible.hpp" 3 4 6242: } 6242: # 29 "/usr/include/boost/regex/v4/regex_format.hpp" 2 3 4 6242: # 1 "/usr/include/boost/type_traits/remove_pointer.hpp" 1 3 4 6242: # 19 "/usr/include/boost/type_traits/remove_pointer.hpp" 3 4 6242: namespace boost { 6242: # 67 "/usr/include/boost/type_traits/remove_pointer.hpp" 3 4 6242: template struct remove_pointer{ typedef T type; }; 6242: template struct remove_pointer{ typedef T type; }; 6242: template struct remove_pointer{ typedef T type; }; 6242: template struct remove_pointer{ typedef T type; }; 6242: template struct remove_pointer{ typedef T type; }; 6242: 6242: 6242: 6242: 6242: 6242: template using remove_pointer_t = typename remove_pointer::type; 6242: 6242: 6242: 6242: } 6242: # 30 "/usr/include/boost/regex/v4/regex_format.hpp" 2 3 4 6242: 6242: # 1 "/usr/include/boost/mpl/if.hpp" 1 3 4 6242: # 17 "/usr/include/boost/mpl/if.hpp" 3 4 6242: # 1 "/usr/include/boost/mpl/aux_/value_wknd.hpp" 1 3 4 6242: # 18 "/usr/include/boost/mpl/aux_/value_wknd.hpp" 3 4 6242: # 1 "/usr/include/boost/mpl/aux_/config/integral.hpp" 1 3 4 6242: # 19 "/usr/include/boost/mpl/aux_/value_wknd.hpp" 2 3 4 6242: # 73 "/usr/include/boost/mpl/aux_/value_wknd.hpp" 3 4 6242: namespace boost { namespace mpl { namespace aux { 6242: 6242: template< typename T > struct value_type_wknd 6242: { 6242: typedef typename T::value_type type; 6242: }; 6242: # 87 "/usr/include/boost/mpl/aux_/value_wknd.hpp" 3 4 6242: }}} 6242: # 18 "/usr/include/boost/mpl/if.hpp" 2 3 4 6242: 6242: 6242: # 1 "/usr/include/boost/mpl/aux_/lambda_support.hpp" 1 3 4 6242: # 21 "/usr/include/boost/mpl/if.hpp" 2 3 4 6242: 6242: 6242: 6242: 6242: namespace boost { namespace mpl { 6242: 6242: 6242: 6242: template< 6242: bool C 6242: , typename T1 6242: , typename T2 6242: > 6242: struct if_c 6242: { 6242: typedef T1 type; 6242: }; 6242: 6242: template< 6242: typename T1 6242: , typename T2 6242: > 6242: struct if_c 6242: { 6242: typedef T2 type; 6242: }; 6242: 6242: 6242: 6242: template< 6242: typename T1 = na 6242: , typename T2 = na 6242: , typename T3 = na 6242: > 6242: struct if_ 6242: { 6242: private: 6242: 6242: typedef if_c< 6242: 6242: 6242: 6242: static_cast(T1::value) 6242: 6242: , T2 6242: , T3 6242: > almost_type_; 6242: 6242: public: 6242: typedef typename almost_type_::type type; 6242: 6242: 6242: }; 6242: # 131 "/usr/include/boost/mpl/if.hpp" 3 4 6242: template<> struct if_< na , na , na > { template< typename T1 , typename T2 , typename T3 , typename T4 =na , typename T5 =na > struct apply : if_< T1 , T2 , T3 > { }; }; template< typename Tag > struct lambda< if_< na , na , na > , Tag , int_<-1> > { typedef false_ is_le; typedef if_< na , na , na > result_; typedef if_< na , na , na > type; }; namespace aux { template< typename T1 , typename T2 , typename T3 > struct template_arity< if_< T1 , T2 , T3 > > : int_<3> { }; template<> struct template_arity< if_< na , na , na > > : int_<-1> { }; } 6242: 6242: }} 6242: # 32 "/usr/include/boost/regex/v4/regex_format.hpp" 2 3 4 6242: # 1 "/usr/include/boost/mpl/and.hpp" 1 3 4 6242: # 17 "/usr/include/boost/mpl/and.hpp" 3 4 6242: # 1 "/usr/include/boost/mpl/aux_/config/use_preprocessed.hpp" 1 3 4 6242: # 18 "/usr/include/boost/mpl/and.hpp" 2 3 4 6242: 6242: 6242: 6242: 6242: 6242: # 1 "/usr/include/boost/mpl/aux_/nested_type_wknd.hpp" 1 3 4 6242: # 25 "/usr/include/boost/mpl/aux_/nested_type_wknd.hpp" 3 4 6242: namespace boost { namespace mpl { namespace aux { 6242: template< typename T > struct nested_type_wknd 6242: : T::type 6242: { 6242: }; 6242: }}} 6242: # 24 "/usr/include/boost/mpl/and.hpp" 2 3 4 6242: # 42 "/usr/include/boost/mpl/and.hpp" 3 4 6242: # 1 "/usr/include/boost/mpl/aux_/include_preprocessed.hpp" 1 3 4 6242: # 16 "/usr/include/boost/mpl/aux_/include_preprocessed.hpp" 3 4 6242: # 1 "/usr/include/boost/mpl/aux_/config/compiler.hpp" 1 3 4 6242: # 17 "/usr/include/boost/mpl/aux_/include_preprocessed.hpp" 2 3 4 6242: 6242: 6242: 6242: # 1 "/usr/include/boost/preprocessor/stringize.hpp" 1 3 4 6242: # 21 "/usr/include/boost/mpl/aux_/include_preprocessed.hpp" 2 3 4 6242: # 37 "/usr/include/boost/mpl/aux_/include_preprocessed.hpp" 3 4 6242: # 1 "/usr/include/boost/mpl/aux_/preprocessed/gcc/and.hpp" 1 3 4 6242: # 12 "/usr/include/boost/mpl/aux_/preprocessed/gcc/and.hpp" 3 4 6242: namespace boost { namespace mpl { 6242: 6242: namespace aux { 6242: 6242: template< bool C_, typename T1, typename T2, typename T3, typename T4 > 6242: struct and_impl 6242: : false_ 6242: { 6242: }; 6242: 6242: template< typename T1, typename T2, typename T3, typename T4 > 6242: struct and_impl< true,T1,T2,T3,T4 > 6242: : and_impl< 6242: ::boost::mpl::aux::nested_type_wknd::value 6242: , T2, T3, T4 6242: , true_ 6242: > 6242: { 6242: }; 6242: 6242: template<> 6242: struct and_impl< 6242: true 6242: , true_, true_, true_, true_ 6242: > 6242: : true_ 6242: { 6242: }; 6242: 6242: } 6242: 6242: template< 6242: typename T1 = na 6242: , typename T2 = na 6242: , typename T3 = true_, typename T4 = true_, typename T5 = true_ 6242: > 6242: struct and_ 6242: 6242: : aux::and_impl< 6242: ::boost::mpl::aux::nested_type_wknd::value 6242: , T2, T3, T4, T5 6242: > 6242: 6242: { 6242: 6242: 6242: 6242: 6242: 6242: }; 6242: 6242: template<> struct and_< na , na > { template< typename T1 , typename T2 , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : and_< T1 , T2 > { }; }; template< typename Tag > struct lambda< and_< na , na > , Tag , int_<-1> > { typedef false_ is_le; typedef and_< na , na > result_; typedef and_< na , na > type; }; namespace aux { template< typename T1 , typename T2 , typename T3 , typename T4 , typename T5 > struct template_arity< and_< T1 , T2 , T3 , T4 , T5 > > : int_<5> { }; template<> struct template_arity< and_< na , na > > : int_<-1> { }; } 6242: 6242: 6242: 6242: 6242: 6242: }} 6242: # 38 "/usr/include/boost/mpl/aux_/include_preprocessed.hpp" 2 3 4 6242: # 43 "/usr/include/boost/mpl/and.hpp" 2 3 4 6242: # 33 "/usr/include/boost/regex/v4/regex_format.hpp" 2 3 4 6242: # 1 "/usr/include/boost/mpl/not.hpp" 1 3 4 6242: # 23 "/usr/include/boost/mpl/not.hpp" 3 4 6242: namespace boost { namespace mpl { 6242: 6242: namespace aux { 6242: 6242: template< long C_ > 6242: struct not_impl 6242: : bool_ 6242: { 6242: }; 6242: 6242: } 6242: 6242: 6242: template< 6242: typename T = na 6242: > 6242: struct not_ 6242: : aux::not_impl< 6242: ::boost::mpl::aux::nested_type_wknd::value 6242: > 6242: { 6242: 6242: }; 6242: 6242: template<> struct not_< na > { template< typename T1 , typename T2 =na , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : not_< T1 > { }; }; template< typename Tag > struct lambda< not_< na > , Tag , int_<-1> > { typedef false_ is_le; typedef not_< na > result_; typedef not_< na > type; }; namespace aux { template< typename T1 > struct template_arity< not_< T1 > > : int_<1> { }; template<> struct template_arity< not_< na > > : int_<-1> { }; } 6242: 6242: }} 6242: # 34 "/usr/include/boost/regex/v4/regex_format.hpp" 2 3 4 6242: 6242: 6242: 6242: # 1 "/usr/include/boost/ref.hpp" 1 3 4 6242: # 15 "/usr/include/boost/ref.hpp" 3 4 6242: # 1 "/usr/include/boost/core/ref.hpp" 1 3 4 6242: # 39 "/usr/include/boost/core/ref.hpp" 3 4 6242: namespace boost 6242: { 6242: # 59 "/usr/include/boost/core/ref.hpp" 3 4 6242: template class reference_wrapper 6242: { 6242: public: 6242: 6242: 6242: 6242: typedef T type; 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: inline __attribute__ ((__always_inline__)) explicit reference_wrapper(T& t): t_(boost::addressof(t)) {} 6242: # 85 "/usr/include/boost/core/ref.hpp" 3 4 6242: reference_wrapper(T&& t) = delete; 6242: public: 6242: 6242: 6242: 6242: 6242: 6242: 6242: inline __attribute__ ((__always_inline__)) operator T& () const { return *t_; } 6242: 6242: 6242: 6242: 6242: 6242: inline __attribute__ ((__always_inline__)) T& get() const { return *t_; } 6242: 6242: 6242: 6242: 6242: 6242: 6242: inline __attribute__ ((__always_inline__)) T* get_pointer() const { return t_; } 6242: 6242: private: 6242: 6242: T* t_; 6242: }; 6242: # 131 "/usr/include/boost/core/ref.hpp" 3 4 6242: template inline __attribute__ ((__always_inline__)) reference_wrapper const ref( T & t ) 6242: { 6242: 6242: 6242: 6242: 6242: 6242: 6242: return reference_wrapper( t ); 6242: 6242: 6242: } 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: template inline __attribute__ ((__always_inline__)) reference_wrapper const cref( T const & t ) 6242: { 6242: return reference_wrapper(t); 6242: } 6242: # 174 "/usr/include/boost/core/ref.hpp" 3 4 6242: template void ref(T const&&) = delete; 6242: 6242: 6242: 6242: 6242: template void cref(T const&&) = delete; 6242: # 194 "/usr/include/boost/core/ref.hpp" 3 4 6242: template struct is_reference_wrapper 6242: { 6242: static const bool value = false; 6242: }; 6242: 6242: 6242: 6242: 6242: template struct is_reference_wrapper< reference_wrapper > 6242: { 6242: static const bool value = true; 6242: }; 6242: 6242: 6242: 6242: template struct is_reference_wrapper< reference_wrapper const > 6242: { 6242: static const bool value = true; 6242: }; 6242: 6242: template struct is_reference_wrapper< reference_wrapper volatile > 6242: { 6242: static const bool value = true; 6242: }; 6242: 6242: template struct is_reference_wrapper< reference_wrapper const volatile > 6242: { 6242: static const bool value = true; 6242: }; 6242: # 239 "/usr/include/boost/core/ref.hpp" 3 4 6242: template struct unwrap_reference 6242: { 6242: typedef T type; 6242: }; 6242: 6242: 6242: 6242: 6242: template struct unwrap_reference< reference_wrapper > 6242: { 6242: typedef T type; 6242: }; 6242: 6242: 6242: 6242: template struct unwrap_reference< reference_wrapper const > 6242: { 6242: typedef T type; 6242: }; 6242: 6242: template struct unwrap_reference< reference_wrapper volatile > 6242: { 6242: typedef T type; 6242: }; 6242: 6242: template struct unwrap_reference< reference_wrapper const volatile > 6242: { 6242: typedef T type; 6242: }; 6242: # 281 "/usr/include/boost/core/ref.hpp" 3 4 6242: template inline __attribute__ ((__always_inline__)) typename unwrap_reference::type& unwrap_ref( T & t ) 6242: { 6242: return t; 6242: } 6242: 6242: 6242: 6242: 6242: 6242: 6242: template inline __attribute__ ((__always_inline__)) T* get_pointer( reference_wrapper const & r ) 6242: { 6242: return r.get_pointer(); 6242: } 6242: 6242: 6242: 6242: 6242: } 6242: # 16 "/usr/include/boost/ref.hpp" 2 3 4 6242: # 38 "/usr/include/boost/regex/v4/regex_format.hpp" 2 3 4 6242: 6242: namespace boost{ 6242: # 55 "/usr/include/boost/regex/v4/regex_format.hpp" 3 4 6242: template >::allocator_type > 6242: class match_results; 6242: 6242: namespace re_detail_106501{ 6242: 6242: 6242: 6242: 6242: 6242: 6242: template 6242: struct trivial_format_traits 6242: { 6242: typedef charT char_type; 6242: 6242: static std::ptrdiff_t length(const charT* p) 6242: { 6242: return global_length(p); 6242: } 6242: static charT tolower(charT c) 6242: { 6242: return ::boost::re_detail_106501::global_lower(c); 6242: } 6242: static charT toupper(charT c) 6242: { 6242: return ::boost::re_detail_106501::global_upper(c); 6242: } 6242: static int value(const charT c, int radix) 6242: { 6242: int result = global_value(c); 6242: return result >= radix ? -1 : result; 6242: } 6242: int toi(const charT*& p1, const charT* p2, int radix)const 6242: { 6242: return (int)global_toi(p1, p2, radix, *this); 6242: } 6242: }; 6242: 6242: template 6242: class basic_regex_formatter 6242: { 6242: public: 6242: typedef typename traits::char_type char_type; 6242: basic_regex_formatter(OutputIterator o, const Results& r, const traits& t) 6242: : m_traits(t), m_results(r), m_out(o), m_position(), m_end(), m_flags(), m_state(output_copy), m_restore_state(output_copy), m_have_conditional(false) {} 6242: OutputIterator format(ForwardIter p1, ForwardIter p2, match_flag_type f); 6242: OutputIterator format(ForwardIter p1, match_flag_type f) 6242: { 6242: return format(p1, p1 + m_traits.length(p1), f); 6242: } 6242: private: 6242: typedef typename Results::value_type sub_match_type; 6242: enum output_state 6242: { 6242: output_copy, 6242: output_next_lower, 6242: output_next_upper, 6242: output_lower, 6242: output_upper, 6242: output_none 6242: }; 6242: 6242: void put(char_type c); 6242: void put(const sub_match_type& sub); 6242: void format_all(); 6242: void format_perl(); 6242: void format_escape(); 6242: void format_conditional(); 6242: void format_until_scope_end(); 6242: bool handle_perl_verb(bool have_brace); 6242: 6242: inline typename Results::value_type const& get_named_sub(ForwardIter i, ForwardIter j, const mpl::false_&) 6242: { 6242: std::vector v(i, j); 6242: return (i != j) ? this->m_results.named_subexpression(&v[0], &v[0] + v.size()) 6242: : this->m_results.named_subexpression(static_cast(0), static_cast(0)); 6242: } 6242: inline typename Results::value_type const& get_named_sub(ForwardIter i, ForwardIter j, const mpl::true_&) 6242: { 6242: return this->m_results.named_subexpression(i, j); 6242: } 6242: inline typename Results::value_type const& get_named_sub(ForwardIter i, ForwardIter j) 6242: { 6242: typedef typename boost::is_convertible::type tag_type; 6242: return get_named_sub(i, j, tag_type()); 6242: } 6242: inline int get_named_sub_index(ForwardIter i, ForwardIter j, const mpl::false_&) 6242: { 6242: std::vector v(i, j); 6242: return (i != j) ? this->m_results.named_subexpression_index(&v[0], &v[0] + v.size()) 6242: : this->m_results.named_subexpression_index(static_cast(0), static_cast(0)); 6242: } 6242: inline int get_named_sub_index(ForwardIter i, ForwardIter j, const mpl::true_&) 6242: { 6242: return this->m_results.named_subexpression_index(i, j); 6242: } 6242: inline int get_named_sub_index(ForwardIter i, ForwardIter j) 6242: { 6242: typedef typename boost::is_convertible::type tag_type; 6242: return get_named_sub_index(i, j, tag_type()); 6242: } 6242: 6242: 6242: 6242: 6242: 6242: inline int toi(ForwardIter& i, ForwardIter j, int base, const boost::mpl::false_&) 6242: { 6242: if(i != j) 6242: { 6242: std::vector v(i, j); 6242: const char_type* start = &v[0]; 6242: const char_type* pos = start; 6242: int r = (int)m_traits.toi(pos, &v[0] + v.size(), base); 6242: std::advance(i, pos - start); 6242: return r; 6242: } 6242: return -1; 6242: } 6242: 6242: 6242: 6242: inline int toi(ForwardIter& i, ForwardIter j, int base, const boost::mpl::true_&) 6242: { 6242: return m_traits.toi(i, j, base); 6242: } 6242: inline int toi(ForwardIter& i, ForwardIter j, int base) 6242: { 6242: 6242: 6242: 6242: 6242: 6242: typedef typename boost::is_convertible::type tag_type; 6242: return toi(i, j, base, tag_type()); 6242: 6242: } 6242: 6242: const traits& m_traits; 6242: const Results& m_results; 6242: OutputIterator m_out; 6242: ForwardIter m_position; 6242: ForwardIter m_end; 6242: match_flag_type m_flags; 6242: output_state m_state; 6242: output_state m_restore_state; 6242: bool m_have_conditional; 6242: private: 6242: basic_regex_formatter(const basic_regex_formatter&); 6242: basic_regex_formatter& operator=(const basic_regex_formatter&); 6242: }; 6242: 6242: template 6242: OutputIterator basic_regex_formatter::format(ForwardIter p1, ForwardIter p2, match_flag_type f) 6242: { 6242: m_position = p1; 6242: m_end = p2; 6242: m_flags = f; 6242: format_all(); 6242: return m_out; 6242: } 6242: 6242: template 6242: void basic_regex_formatter::format_all() 6242: { 6242: 6242: while(m_position != m_end) 6242: { 6242: switch(*m_position) 6242: { 6242: case '&': 6242: if(m_flags & ::boost::regex_constants::format_sed) 6242: { 6242: ++m_position; 6242: put(m_results[0]); 6242: break; 6242: } 6242: put(*m_position++); 6242: break; 6242: case '\\': 6242: format_escape(); 6242: break; 6242: case '(': 6242: if(m_flags & boost::regex_constants::format_all) 6242: { 6242: ++m_position; 6242: bool have_conditional = m_have_conditional; 6242: m_have_conditional = false; 6242: format_until_scope_end(); 6242: m_have_conditional = have_conditional; 6242: if(m_position == m_end) 6242: return; 6242: (static_cast (*m_position == static_cast(')')) ? void (0) : __assert_fail ("*m_position == static_cast(')')", "/usr/include/boost/regex/v4/regex_format.hpp", 247, __extension__ __PRETTY_FUNCTION__)); 6242: ++m_position; 6242: break; 6242: } 6242: put(*m_position); 6242: ++m_position; 6242: break; 6242: case ')': 6242: if(m_flags & boost::regex_constants::format_all) 6242: { 6242: return; 6242: } 6242: put(*m_position); 6242: ++m_position; 6242: break; 6242: case ':': 6242: if((m_flags & boost::regex_constants::format_all) && m_have_conditional) 6242: { 6242: return; 6242: } 6242: put(*m_position); 6242: ++m_position; 6242: break; 6242: case '?': 6242: if(m_flags & boost::regex_constants::format_all) 6242: { 6242: ++m_position; 6242: format_conditional(); 6242: break; 6242: } 6242: put(*m_position); 6242: ++m_position; 6242: break; 6242: case '$': 6242: if((m_flags & format_sed) == 0) 6242: { 6242: format_perl(); 6242: break; 6242: } 6242: 6242: __attribute__((fallthrough)); 6242: default: 6242: put(*m_position); 6242: ++m_position; 6242: break; 6242: } 6242: } 6242: } 6242: 6242: template 6242: void basic_regex_formatter::format_perl() 6242: { 6242: 6242: 6242: 6242: 6242: (static_cast (*m_position == '$') ? void (0) : __assert_fail ("*m_position == '$'", "/usr/include/boost/regex/v4/regex_format.hpp", 303, __extension__ __PRETTY_FUNCTION__)); 6242: 6242: 6242: 6242: if(++m_position == m_end) 6242: { 6242: --m_position; 6242: put(*m_position); 6242: ++m_position; 6242: return; 6242: } 6242: 6242: 6242: 6242: bool have_brace = false; 6242: ForwardIter save_position = m_position; 6242: switch(*m_position) 6242: { 6242: case '&': 6242: ++m_position; 6242: put(this->m_results[0]); 6242: break; 6242: case '`': 6242: ++m_position; 6242: put(this->m_results.prefix()); 6242: break; 6242: case '\'': 6242: ++m_position; 6242: put(this->m_results.suffix()); 6242: break; 6242: case '$': 6242: put(*m_position++); 6242: break; 6242: case '+': 6242: if((++m_position != m_end) && (*m_position == '{')) 6242: { 6242: ForwardIter base = ++m_position; 6242: while((m_position != m_end) && (*m_position != '}')) ++m_position; 6242: if(m_position != m_end) 6242: { 6242: 6242: put(get_named_sub(base, m_position)); 6242: ++m_position; 6242: break; 6242: } 6242: else 6242: { 6242: m_position = --base; 6242: } 6242: } 6242: put((this->m_results)[this->m_results.size() > 1 ? static_cast(this->m_results.size() - 1) : 1]); 6242: break; 6242: case '{': 6242: have_brace = true; 6242: ++m_position; 6242: __attribute__((fallthrough)); 6242: default: 6242: 6242: { 6242: std::ptrdiff_t len = ::boost::re_detail_106501::distance(m_position, m_end); 6242: 6242: int v = this->toi(m_position, m_position + len, 10); 6242: if((v < 0) || (have_brace && ((m_position == m_end) || (*m_position != '}')))) 6242: { 6242: 6242: if(!handle_perl_verb(have_brace)) 6242: { 6242: 6242: m_position = --save_position; 6242: put(*m_position); 6242: ++m_position; 6242: } 6242: break; 6242: } 6242: 6242: put(this->m_results[v]); 6242: if(have_brace) 6242: ++m_position; 6242: } 6242: } 6242: } 6242: 6242: template 6242: bool basic_regex_formatter::handle_perl_verb(bool have_brace) 6242: { 6242: 6242: 6242: 6242: static const char_type MATCH[] = { 'M', 'A', 'T', 'C', 'H' }; 6242: static const char_type PREMATCH[] = { 'P', 'R', 'E', 'M', 'A', 'T', 'C', 'H' }; 6242: static const char_type POSTMATCH[] = { 'P', 'O', 'S', 'T', 'M', 'A', 'T', 'C', 'H' }; 6242: static const char_type LAST_PAREN_MATCH[] = { 'L', 'A', 'S', 'T', '_', 'P', 'A', 'R', 'E', 'N', '_', 'M', 'A', 'T', 'C', 'H' }; 6242: static const char_type LAST_SUBMATCH_RESULT[] = { 'L', 'A', 'S', 'T', '_', 'S', 'U', 'B', 'M', 'A', 'T', 'C', 'H', '_', 'R', 'E', 'S', 'U', 'L', 'T' }; 6242: static const char_type LAST_SUBMATCH_RESULT_ALT[] = { '^', 'N' }; 6242: 6242: if(m_position == m_end) 6242: return false; 6242: if(have_brace && (*m_position == '^')) 6242: ++m_position; 6242: 6242: std::ptrdiff_t max_len = m_end - m_position; 6242: 6242: if((max_len >= 5) && std::equal(m_position, m_position + 5, MATCH)) 6242: { 6242: m_position += 5; 6242: if(have_brace) 6242: { 6242: if((m_position != m_end) && (*m_position == '}')) 6242: ++m_position; 6242: else 6242: { 6242: m_position -= 5; 6242: return false; 6242: } 6242: } 6242: put(this->m_results[0]); 6242: return true; 6242: } 6242: if((max_len >= 8) && std::equal(m_position, m_position + 8, PREMATCH)) 6242: { 6242: m_position += 8; 6242: if(have_brace) 6242: { 6242: if((m_position != m_end) && (*m_position == '}')) 6242: ++m_position; 6242: else 6242: { 6242: m_position -= 8; 6242: return false; 6242: } 6242: } 6242: put(this->m_results.prefix()); 6242: return true; 6242: } 6242: if((max_len >= 9) && std::equal(m_position, m_position + 9, POSTMATCH)) 6242: { 6242: m_position += 9; 6242: if(have_brace) 6242: { 6242: if((m_position != m_end) && (*m_position == '}')) 6242: ++m_position; 6242: else 6242: { 6242: m_position -= 9; 6242: return false; 6242: } 6242: } 6242: put(this->m_results.suffix()); 6242: return true; 6242: } 6242: if((max_len >= 16) && std::equal(m_position, m_position + 16, LAST_PAREN_MATCH)) 6242: { 6242: m_position += 16; 6242: if(have_brace) 6242: { 6242: if((m_position != m_end) && (*m_position == '}')) 6242: ++m_position; 6242: else 6242: { 6242: m_position -= 16; 6242: return false; 6242: } 6242: } 6242: put((this->m_results)[this->m_results.size() > 1 ? static_cast(this->m_results.size() - 1) : 1]); 6242: return true; 6242: } 6242: if((max_len >= 20) && std::equal(m_position, m_position + 20, LAST_SUBMATCH_RESULT)) 6242: { 6242: m_position += 20; 6242: if(have_brace) 6242: { 6242: if((m_position != m_end) && (*m_position == '}')) 6242: ++m_position; 6242: else 6242: { 6242: m_position -= 20; 6242: return false; 6242: } 6242: } 6242: put(this->m_results.get_last_closed_paren()); 6242: return true; 6242: } 6242: if((max_len >= 2) && std::equal(m_position, m_position + 2, LAST_SUBMATCH_RESULT_ALT)) 6242: { 6242: m_position += 2; 6242: if(have_brace) 6242: { 6242: if((m_position != m_end) && (*m_position == '}')) 6242: ++m_position; 6242: else 6242: { 6242: m_position -= 2; 6242: return false; 6242: } 6242: } 6242: put(this->m_results.get_last_closed_paren()); 6242: return true; 6242: } 6242: return false; 6242: } 6242: 6242: template 6242: void basic_regex_formatter::format_escape() 6242: { 6242: 6242: if(++m_position == m_end) 6242: { 6242: put(static_cast('\\')); 6242: return; 6242: } 6242: 6242: switch(*m_position) 6242: { 6242: case 'a': 6242: put(static_cast('\a')); 6242: ++m_position; 6242: break; 6242: case 'f': 6242: put(static_cast('\f')); 6242: ++m_position; 6242: break; 6242: case 'n': 6242: put(static_cast('\n')); 6242: ++m_position; 6242: break; 6242: case 'r': 6242: put(static_cast('\r')); 6242: ++m_position; 6242: break; 6242: case 't': 6242: put(static_cast('\t')); 6242: ++m_position; 6242: break; 6242: case 'v': 6242: put(static_cast('\v')); 6242: ++m_position; 6242: break; 6242: case 'x': 6242: if(++m_position == m_end) 6242: { 6242: put(static_cast('x')); 6242: return; 6242: } 6242: 6242: if(*m_position == static_cast('{')) 6242: { 6242: ++m_position; 6242: int val = this->toi(m_position, m_end, 16); 6242: if(val < 0) 6242: { 6242: 6242: put(static_cast('x')); 6242: put(static_cast('{')); 6242: return; 6242: } 6242: if((m_position == m_end) || (*m_position != static_cast('}'))) 6242: { 6242: --m_position; 6242: while(*m_position != static_cast('\\')) 6242: --m_position; 6242: ++m_position; 6242: put(*m_position++); 6242: return; 6242: } 6242: ++m_position; 6242: put(static_cast(val)); 6242: return; 6242: } 6242: else 6242: { 6242: std::ptrdiff_t len = ::boost::re_detail_106501::distance(m_position, m_end); 6242: len = (std::min)(static_cast(2), len); 6242: int val = this->toi(m_position, m_position + len, 16); 6242: if(val < 0) 6242: { 6242: --m_position; 6242: put(*m_position++); 6242: return; 6242: } 6242: put(static_cast(val)); 6242: } 6242: break; 6242: case 'c': 6242: if(++m_position == m_end) 6242: { 6242: --m_position; 6242: put(*m_position++); 6242: return; 6242: } 6242: put(static_cast(*m_position++ % 32)); 6242: break; 6242: case 'e': 6242: put(static_cast(27)); 6242: ++m_position; 6242: break; 6242: default: 6242: 6242: if((m_flags & boost::regex_constants::format_sed) == 0) 6242: { 6242: bool breakout = false; 6242: switch(*m_position) 6242: { 6242: case 'l': 6242: ++m_position; 6242: m_restore_state = m_state; 6242: m_state = output_next_lower; 6242: breakout = true; 6242: break; 6242: case 'L': 6242: ++m_position; 6242: m_state = output_lower; 6242: breakout = true; 6242: break; 6242: case 'u': 6242: ++m_position; 6242: m_restore_state = m_state; 6242: m_state = output_next_upper; 6242: breakout = true; 6242: break; 6242: case 'U': 6242: ++m_position; 6242: m_state = output_upper; 6242: breakout = true; 6242: break; 6242: case 'E': 6242: ++m_position; 6242: m_state = output_copy; 6242: breakout = true; 6242: break; 6242: } 6242: if(breakout) 6242: break; 6242: } 6242: 6242: std::ptrdiff_t len = ::boost::re_detail_106501::distance(m_position, m_end); 6242: len = (std::min)(static_cast(1), len); 6242: int v = this->toi(m_position, m_position+len, 10); 6242: if((v > 0) || ((v == 0) && (m_flags & ::boost::regex_constants::format_sed))) 6242: { 6242: put(m_results[v]); 6242: break; 6242: } 6242: else if(v == 0) 6242: { 6242: 6242: --m_position; 6242: len = ::boost::re_detail_106501::distance(m_position, m_end); 6242: len = (std::min)(static_cast(4), len); 6242: v = this->toi(m_position, m_position + len, 8); 6242: (static_cast (v >= 0) ? void (0) : __assert_fail ("v >= 0", "/usr/include/boost/regex/v4/regex_format.hpp", 652, __extension__ __PRETTY_FUNCTION__)); 6242: put(static_cast(v)); 6242: break; 6242: } 6242: 6242: put(*m_position++); 6242: break; 6242: } 6242: } 6242: 6242: template 6242: void basic_regex_formatter::format_conditional() 6242: { 6242: if(m_position == m_end) 6242: { 6242: 6242: put(static_cast('?')); 6242: return; 6242: } 6242: int v; 6242: if(*m_position == '{') 6242: { 6242: ForwardIter base = m_position; 6242: ++m_position; 6242: v = this->toi(m_position, m_end, 10); 6242: if(v < 0) 6242: { 6242: 6242: while((m_position != m_end) && (*m_position != '}')) 6242: ++m_position; 6242: v = this->get_named_sub_index(base + 1, m_position); 6242: } 6242: if((v < 0) || (*m_position != '}')) 6242: { 6242: m_position = base; 6242: 6242: put(static_cast('?')); 6242: return; 6242: } 6242: 6242: ++m_position; 6242: } 6242: else 6242: { 6242: std::ptrdiff_t len = ::boost::re_detail_106501::distance(m_position, m_end); 6242: len = (std::min)(static_cast(2), len); 6242: v = this->toi(m_position, m_position + len, 10); 6242: } 6242: if(v < 0) 6242: { 6242: 6242: put(static_cast('?')); 6242: return; 6242: } 6242: 6242: 6242: if(m_results[v].matched) 6242: { 6242: m_have_conditional = true; 6242: format_all(); 6242: m_have_conditional = false; 6242: if((m_position != m_end) && (*m_position == static_cast(':'))) 6242: { 6242: 6242: ++m_position; 6242: 6242: output_state saved_state = m_state; 6242: m_state = output_none; 6242: 6242: format_until_scope_end(); 6242: 6242: m_state = saved_state; 6242: } 6242: } 6242: else 6242: { 6242: 6242: output_state saved_state = m_state; 6242: m_state = output_none; 6242: 6242: m_have_conditional = true; 6242: format_all(); 6242: m_have_conditional = false; 6242: 6242: m_state = saved_state; 6242: if((m_position != m_end) && (*m_position == static_cast(':'))) 6242: { 6242: 6242: ++m_position; 6242: 6242: format_until_scope_end(); 6242: } 6242: } 6242: } 6242: 6242: template 6242: void basic_regex_formatter::format_until_scope_end() 6242: { 6242: do 6242: { 6242: format_all(); 6242: if((m_position == m_end) || (*m_position == static_cast(')'))) 6242: return; 6242: put(*m_position++); 6242: }while(m_position != m_end); 6242: } 6242: 6242: template 6242: void basic_regex_formatter::put(char_type c) 6242: { 6242: 6242: 6242: switch(this->m_state) 6242: { 6242: case output_none: 6242: return; 6242: case output_next_lower: 6242: c = m_traits.tolower(c); 6242: this->m_state = m_restore_state; 6242: break; 6242: case output_next_upper: 6242: c = m_traits.toupper(c); 6242: this->m_state = m_restore_state; 6242: break; 6242: case output_lower: 6242: c = m_traits.tolower(c); 6242: break; 6242: case output_upper: 6242: c = m_traits.toupper(c); 6242: break; 6242: default: 6242: break; 6242: } 6242: *m_out = c; 6242: ++m_out; 6242: } 6242: 6242: template 6242: void basic_regex_formatter::put(const sub_match_type& sub) 6242: { 6242: typedef typename sub_match_type::iterator iterator_type; 6242: iterator_type i = sub.first; 6242: while(i != sub.second) 6242: { 6242: put(*i); 6242: ++i; 6242: } 6242: } 6242: 6242: template 6242: class string_out_iterator 6242: 6242: : public std::iterator 6242: 6242: { 6242: S* out; 6242: public: 6242: string_out_iterator(S& s) : out(&s) {} 6242: string_out_iterator& operator++() { return *this; } 6242: string_out_iterator& operator++(int) { return *this; } 6242: string_out_iterator& operator*() { return *this; } 6242: string_out_iterator& operator=(typename S::value_type v) 6242: { 6242: out->append(1, v); 6242: return *this; 6242: } 6242: # 826 "/usr/include/boost/regex/v4/regex_format.hpp" 3 4 6242: }; 6242: 6242: template 6242: OutputIterator regex_format_imp(OutputIterator out, 6242: const match_results& m, 6242: ForwardIter p1, ForwardIter p2, 6242: match_flag_type flags, 6242: const traits& t 6242: ) 6242: { 6242: if(flags & regex_constants::format_literal) 6242: { 6242: return re_detail_106501::copy(p1, p2, out); 6242: } 6242: 6242: re_detail_106501::basic_regex_formatter< 6242: OutputIterator, 6242: match_results, 6242: traits, ForwardIter> f(out, m, t); 6242: return f.format(p1, p2, flags); 6242: } 6242: 6242: 6242: 6242: template< typename T, typename fallback_ = boost::mpl::bool_ > struct has_const_iterator { struct gcc_3_2_wknd { template< typename U > static boost::mpl::aux::yes_tag test( boost::mpl::aux::type_wrapper const volatile* , boost::mpl::aux::type_wrapper* = 0 ); static boost::mpl::aux::no_tag test(...); }; typedef boost::mpl::aux::type_wrapper t_; static const bool value = sizeof(gcc_3_2_wknd::test(static_cast(0))) == sizeof(boost::mpl::aux::yes_tag); typedef boost::mpl::bool_ type; }; 6242: 6242: struct any_type 6242: { 6242: template 6242: any_type(const T&); 6242: template 6242: any_type(const T&, const U&); 6242: template 6242: any_type(const T&, const U&, const V&); 6242: }; 6242: typedef char no_type; 6242: typedef char (&unary_type)[2]; 6242: typedef char (&binary_type)[3]; 6242: typedef char (&ternary_type)[4]; 6242: 6242: no_type check_is_formatter(unary_type, binary_type, ternary_type); 6242: template 6242: unary_type check_is_formatter(T const &, binary_type, ternary_type); 6242: template 6242: binary_type check_is_formatter(unary_type, T const &, ternary_type); 6242: template 6242: binary_type check_is_formatter(T const &, U const &, ternary_type); 6242: template 6242: ternary_type check_is_formatter(unary_type, binary_type, T const &); 6242: template 6242: ternary_type check_is_formatter(T const &, binary_type, U const &); 6242: template 6242: ternary_type check_is_formatter(unary_type, T const &, U const &); 6242: template 6242: ternary_type check_is_formatter(T const &, U const &, V const &); 6242: 6242: struct unary_binary_ternary 6242: { 6242: typedef unary_type (*unary_fun)(any_type); 6242: typedef binary_type (*binary_fun)(any_type, any_type); 6242: typedef ternary_type (*ternary_fun)(any_type, any_type, any_type); 6242: operator unary_fun(); 6242: operator binary_fun(); 6242: operator ternary_fun(); 6242: }; 6242: 6242: template::value> 6242: struct formatter_wrapper 6242: : Formatter 6242: , unary_binary_ternary 6242: { 6242: formatter_wrapper(){} 6242: }; 6242: 6242: template 6242: struct formatter_wrapper 6242: : unary_binary_ternary 6242: { 6242: operator Formatter *(); 6242: }; 6242: 6242: template 6242: struct formatter_wrapper 6242: : unary_binary_ternary 6242: { 6242: operator Formatter *(); 6242: }; 6242: 6242: template 6242: struct format_traits_imp 6242: { 6242: private: 6242: 6242: 6242: 6242: static_assert((::boost::is_pointer::value || ::boost::is_function::value || ::boost::is_class::value), "(::boost::is_pointer::value || ::boost::is_function::value || ::boost::is_class::value)"); 6242: static formatter_wrapper::type> f; 6242: static M m; 6242: static O out; 6242: static boost::regex_constants::match_flag_type flags; 6242: public: 6242: static const int value = sizeof(check_is_formatter(f(m), f(m, out), f(m, out, flags))); 6242: }; 6242: 6242: template 6242: struct format_traits 6242: { 6242: public: 6242: # 943 "/usr/include/boost/regex/v4/regex_format.hpp" 3 4 6242: typedef typename boost::mpl::if_< 6242: boost::mpl::and_, boost::mpl::not_::type> > >, 6242: boost::mpl::int_<0>, 6242: typename boost::mpl::if_< 6242: has_const_iterator, 6242: boost::mpl::int_<1>, 6242: boost::mpl::int_::value> 6242: >::type 6242: >::type type; 6242: 6242: 6242: 6242: 6242: static_assert(boost::is_class::value && !has_const_iterator::value ? (type::value > 1) : true, "boost::is_class::value && !has_const_iterator::value ? (type::value > 1) : true"); 6242: }; 6242: # 983 "/usr/include/boost/regex/v4/regex_format.hpp" 3 4 6242: template 6242: struct format_functor3 6242: { 6242: format_functor3(Base b) : func(b) {} 6242: template 6242: OutputIter operator()(const Match& m, OutputIter i, boost::regex_constants::match_flag_type f) 6242: { 6242: return boost::unwrap_ref(func)(m, i, f); 6242: } 6242: template 6242: OutputIter operator()(const Match& m, OutputIter i, boost::regex_constants::match_flag_type f, const Traits&) 6242: { 6242: return (*this)(m, i, f); 6242: } 6242: private: 6242: Base func; 6242: format_functor3(const format_functor3&); 6242: format_functor3& operator=(const format_functor3&); 6242: }; 6242: 6242: template 6242: struct format_functor2 6242: { 6242: format_functor2(Base b) : func(b) {} 6242: template 6242: OutputIter operator()(const Match& m, OutputIter i, boost::regex_constants::match_flag_type ) 6242: { 6242: return boost::unwrap_ref(func)(m, i); 6242: } 6242: template 6242: OutputIter operator()(const Match& m, OutputIter i, boost::regex_constants::match_flag_type f, const Traits&) 6242: { 6242: return (*this)(m, i, f); 6242: } 6242: private: 6242: Base func; 6242: format_functor2(const format_functor2&); 6242: format_functor2& operator=(const format_functor2&); 6242: }; 6242: 6242: template 6242: struct format_functor1 6242: { 6242: format_functor1(Base b) : func(b) {} 6242: 6242: template 6242: OutputIter do_format_string(const S& s, OutputIter i) 6242: { 6242: return re_detail_106501::copy(s.begin(), s.end(), i); 6242: } 6242: template 6242: inline OutputIter do_format_string(const S* s, OutputIter i) 6242: { 6242: while(s && *s) 6242: { 6242: *i = *s; 6242: ++i; 6242: ++s; 6242: } 6242: return i; 6242: } 6242: template 6242: OutputIter operator()(const Match& m, OutputIter i, boost::regex_constants::match_flag_type ) 6242: { 6242: return do_format_string(boost::unwrap_ref(func)(m), i); 6242: } 6242: template 6242: OutputIter operator()(const Match& m, OutputIter i, boost::regex_constants::match_flag_type f, const Traits&) 6242: { 6242: return (*this)(m, i, f); 6242: } 6242: private: 6242: Base func; 6242: format_functor1(const format_functor1&); 6242: format_functor1& operator=(const format_functor1&); 6242: }; 6242: 6242: template 6242: struct format_functor_c_string 6242: { 6242: format_functor_c_string(const charT* ps) : func(ps) {} 6242: 6242: template 6242: OutputIter operator()(const Match& m, OutputIter i, boost::regex_constants::match_flag_type f, const Traits& t = Traits()) 6242: { 6242: 6242: const charT* end = func; 6242: while(*end) ++end; 6242: return regex_format_imp(i, m, func, end, f, t); 6242: } 6242: private: 6242: const charT* func; 6242: format_functor_c_string(const format_functor_c_string&); 6242: format_functor_c_string& operator=(const format_functor_c_string&); 6242: }; 6242: 6242: template 6242: struct format_functor_container 6242: { 6242: format_functor_container(const Container& c) : func(c) {} 6242: 6242: template 6242: OutputIter operator()(const Match& m, OutputIter i, boost::regex_constants::match_flag_type f, const Traits& t = Traits()) 6242: { 6242: 6242: return re_detail_106501::regex_format_imp(i, m, func.begin(), func.end(), f, t); 6242: } 6242: private: 6242: const Container& func; 6242: format_functor_container(const format_functor_container&); 6242: format_functor_container& operator=(const format_functor_container&); 6242: }; 6242: 6242: template > 6242: struct compute_functor_type 6242: { 6242: typedef typename format_traits::type tag; 6242: typedef typename boost::remove_cv< typename boost::remove_pointer::type>::type maybe_char_type; 6242: 6242: typedef typename mpl::if_< 6242: ::boost::is_same >, format_functor_c_string, 6242: typename mpl::if_< 6242: ::boost::is_same >, format_functor_container, 6242: typename mpl::if_< 6242: ::boost::is_same >, format_functor1, 6242: typename mpl::if_< 6242: ::boost::is_same >, format_functor2, 6242: format_functor3 6242: >::type 6242: >::type 6242: >::type 6242: >::type type; 6242: }; 6242: 6242: } 6242: 6242: template 6242: inline OutputIterator regex_format(OutputIterator out, 6242: const match_results& m, 6242: Functor fmt, 6242: match_flag_type flags = format_all 6242: ) 6242: { 6242: return m.format(out, fmt, flags); 6242: } 6242: 6242: template 6242: inline std::basic_string::char_type> regex_format(const match_results& m, 6242: Functor fmt, 6242: match_flag_type flags = format_all) 6242: { 6242: return m.format(fmt, flags); 6242: } 6242: # 1148 "/usr/include/boost/regex/v4/regex_format.hpp" 3 4 6242: } 6242: # 80 "/usr/include/boost/regex/v4/regex.hpp" 2 3 4 6242: 6242: 6242: # 1 "/usr/include/boost/regex/v4/match_results.hpp" 1 3 4 6242: # 33 "/usr/include/boost/regex/v4/match_results.hpp" 3 4 6242: namespace boost{ 6242: # 42 "/usr/include/boost/regex/v4/match_results.hpp" 3 4 6242: namespace re_detail_106501{ 6242: 6242: class named_subexpressions; 6242: 6242: } 6242: 6242: template 6242: class match_results 6242: { 6242: private: 6242: 6242: typedef std::vector, Allocator> vector_type; 6242: 6242: 6242: 6242: public: 6242: typedef sub_match value_type; 6242: 6242: typedef typename Allocator::const_reference const_reference; 6242: 6242: 6242: 6242: typedef const_reference reference; 6242: typedef typename vector_type::const_iterator const_iterator; 6242: typedef const_iterator iterator; 6242: typedef typename re_detail_106501::regex_iterator_traits< 6242: BidiIterator>::difference_type difference_type; 6242: typedef typename Allocator::size_type size_type; 6242: typedef Allocator allocator_type; 6242: typedef typename re_detail_106501::regex_iterator_traits< 6242: BidiIterator>::value_type char_type; 6242: typedef std::basic_string string_type; 6242: typedef re_detail_106501::named_subexpressions named_sub_type; 6242: 6242: 6242: explicit match_results(const Allocator& a = Allocator()) 6242: 6242: : m_subs(a), m_base(), m_null(), m_last_closed_paren(0), m_is_singular(true) {} 6242: # 88 "/usr/include/boost/regex/v4/match_results.hpp" 3 4 6242: match_results(const match_results& m) 6242: : m_subs(m.m_subs), m_named_subs(m.m_named_subs), m_last_closed_paren(m.m_last_closed_paren), m_is_singular(m.m_is_singular) 6242: { 6242: if(!m_is_singular) 6242: { 6242: m_base = m.m_base; 6242: m_null = m.m_null; 6242: } 6242: } 6242: match_results& operator=(const match_results& m) 6242: { 6242: m_subs = m.m_subs; 6242: m_named_subs = m.m_named_subs; 6242: m_last_closed_paren = m.m_last_closed_paren; 6242: m_is_singular = m.m_is_singular; 6242: if(!m_is_singular) 6242: { 6242: m_base = m.m_base; 6242: m_null = m.m_null; 6242: } 6242: return *this; 6242: } 6242: ~match_results(){} 6242: 6242: 6242: size_type size() const 6242: { return empty() ? 0 : m_subs.size() - 2; } 6242: size_type max_size() const 6242: { return m_subs.max_size(); } 6242: bool empty() const 6242: { return m_subs.size() < 2; } 6242: 6242: difference_type length(int sub = 0) const 6242: { 6242: if(m_is_singular) 6242: raise_logic_error(); 6242: sub += 2; 6242: if((sub < (int)m_subs.size()) && (sub > 0)) 6242: return m_subs[sub].length(); 6242: return 0; 6242: } 6242: difference_type length(const char_type* sub) const 6242: { 6242: if(m_is_singular) 6242: raise_logic_error(); 6242: const char_type* sub_end = sub; 6242: while(*sub_end) ++sub_end; 6242: return length(named_subexpression_index(sub, sub_end)); 6242: } 6242: template 6242: difference_type length(const charT* sub) const 6242: { 6242: if(m_is_singular) 6242: raise_logic_error(); 6242: const charT* sub_end = sub; 6242: while(*sub_end) ++sub_end; 6242: return length(named_subexpression_index(sub, sub_end)); 6242: } 6242: template 6242: difference_type length(const std::basic_string& sub) const 6242: { 6242: return length(sub.c_str()); 6242: } 6242: difference_type position(size_type sub = 0) const 6242: { 6242: if(m_is_singular) 6242: raise_logic_error(); 6242: sub += 2; 6242: if(sub < m_subs.size()) 6242: { 6242: const sub_match& s = m_subs[sub]; 6242: if(s.matched || (sub == 2)) 6242: { 6242: return ::boost::re_detail_106501::distance((BidiIterator)(m_base), (BidiIterator)(s.first)); 6242: } 6242: } 6242: return ~static_cast(0); 6242: } 6242: difference_type position(const char_type* sub) const 6242: { 6242: const char_type* sub_end = sub; 6242: while(*sub_end) ++sub_end; 6242: return position(named_subexpression_index(sub, sub_end)); 6242: } 6242: template 6242: difference_type position(const charT* sub) const 6242: { 6242: const charT* sub_end = sub; 6242: while(*sub_end) ++sub_end; 6242: return position(named_subexpression_index(sub, sub_end)); 6242: } 6242: template 6242: difference_type position(const std::basic_string& sub) const 6242: { 6242: return position(sub.c_str()); 6242: } 6242: string_type str(int sub = 0) const 6242: { 6242: if(m_is_singular) 6242: raise_logic_error(); 6242: sub += 2; 6242: string_type result; 6242: if(sub < (int)m_subs.size() && (sub > 0)) 6242: { 6242: const sub_match& s = m_subs[sub]; 6242: if(s.matched) 6242: { 6242: result = s.str(); 6242: } 6242: } 6242: return result; 6242: } 6242: string_type str(const char_type* sub) const 6242: { 6242: return (*this)[sub].str(); 6242: } 6242: template 6242: string_type str(const std::basic_string& sub) const 6242: { 6242: return (*this)[sub].str(); 6242: } 6242: template 6242: string_type str(const charT* sub) const 6242: { 6242: return (*this)[sub].str(); 6242: } 6242: template 6242: string_type str(const std::basic_string& sub) const 6242: { 6242: return (*this)[sub].str(); 6242: } 6242: const_reference operator[](int sub) const 6242: { 6242: if(m_is_singular && m_subs.empty()) 6242: raise_logic_error(); 6242: sub += 2; 6242: if(sub < (int)m_subs.size() && (sub >= 0)) 6242: { 6242: return m_subs[sub]; 6242: } 6242: return m_null; 6242: } 6242: 6242: 6242: 6242: const_reference named_subexpression(const char_type* i, const char_type* j) const 6242: { 6242: 6242: 6242: 6242: if(m_is_singular) 6242: raise_logic_error(); 6242: re_detail_106501::named_subexpressions::range_type r = m_named_subs->equal_range(i, j); 6242: while((r.first != r.second) && ((*this)[r.first->index].matched == false)) 6242: ++r.first; 6242: return r.first != r.second ? (*this)[r.first->index] : m_null; 6242: } 6242: template 6242: const_reference named_subexpression(const charT* i, const charT* j) const 6242: { 6242: static_assert(sizeof(charT) <= sizeof(char_type), "sizeof(charT) <= sizeof(char_type)"); 6242: if(i == j) 6242: return m_null; 6242: std::vector s; 6242: while(i != j) 6242: s.insert(s.end(), *i++); 6242: return named_subexpression(&*s.begin(), &*s.begin() + s.size()); 6242: } 6242: int named_subexpression_index(const char_type* i, const char_type* j) const 6242: { 6242: 6242: 6242: 6242: 6242: 6242: if(m_is_singular) 6242: raise_logic_error(); 6242: re_detail_106501::named_subexpressions::range_type s, r; 6242: s = r = m_named_subs->equal_range(i, j); 6242: while((r.first != r.second) && ((*this)[r.first->index].matched == false)) 6242: ++r.first; 6242: if(r.first == r.second) 6242: r = s; 6242: return r.first != r.second ? r.first->index : -20; 6242: } 6242: template 6242: int named_subexpression_index(const charT* i, const charT* j) const 6242: { 6242: static_assert(sizeof(charT) <= sizeof(char_type), "sizeof(charT) <= sizeof(char_type)"); 6242: if(i == j) 6242: return -20; 6242: std::vector s; 6242: while(i != j) 6242: s.insert(s.end(), *i++); 6242: return named_subexpression_index(&*s.begin(), &*s.begin() + s.size()); 6242: } 6242: template 6242: const_reference operator[](const std::basic_string& s) const 6242: { 6242: return named_subexpression(s.c_str(), s.c_str() + s.size()); 6242: } 6242: const_reference operator[](const char_type* p) const 6242: { 6242: const char_type* e = p; 6242: while(*e) ++e; 6242: return named_subexpression(p, e); 6242: } 6242: 6242: template 6242: const_reference operator[](const charT* p) const 6242: { 6242: static_assert(sizeof(charT) <= sizeof(char_type), "sizeof(charT) <= sizeof(char_type)"); 6242: if(*p == 0) 6242: return m_null; 6242: std::vector s; 6242: while(*p) 6242: s.insert(s.end(), *p++); 6242: return named_subexpression(&*s.begin(), &*s.begin() + s.size()); 6242: } 6242: template 6242: const_reference operator[](const std::basic_string& ns) const 6242: { 6242: static_assert(sizeof(charT) <= sizeof(char_type), "sizeof(charT) <= sizeof(char_type)"); 6242: if(ns.empty()) 6242: return m_null; 6242: std::vector s; 6242: for(unsigned i = 0; i < ns.size(); ++i) 6242: s.insert(s.end(), ns[i]); 6242: return named_subexpression(&*s.begin(), &*s.begin() + s.size()); 6242: } 6242: 6242: const_reference prefix() const 6242: { 6242: if(m_is_singular) 6242: raise_logic_error(); 6242: return (*this)[-1]; 6242: } 6242: 6242: const_reference suffix() const 6242: { 6242: if(m_is_singular) 6242: raise_logic_error(); 6242: return (*this)[-2]; 6242: } 6242: const_iterator begin() const 6242: { 6242: return (m_subs.size() > 2) ? (m_subs.begin() + 2) : m_subs.end(); 6242: } 6242: const_iterator end() const 6242: { 6242: return m_subs.end(); 6242: } 6242: 6242: template 6242: OutputIterator format(OutputIterator out, 6242: Functor fmt, 6242: match_flag_type flags = format_default) const 6242: { 6242: if(m_is_singular) 6242: raise_logic_error(); 6242: typedef typename re_detail_106501::compute_functor_type, OutputIterator>::type F; 6242: F func(fmt); 6242: return func(*this, out, flags); 6242: } 6242: template 6242: string_type format(Functor fmt, match_flag_type flags = format_default) const 6242: { 6242: if(m_is_singular) 6242: raise_logic_error(); 6242: std::basic_string result; 6242: re_detail_106501::string_out_iterator > i(result); 6242: 6242: typedef typename re_detail_106501::compute_functor_type, re_detail_106501::string_out_iterator > >::type F; 6242: F func(fmt); 6242: 6242: func(*this, i, flags); 6242: return result; 6242: } 6242: 6242: template 6242: OutputIterator format(OutputIterator out, 6242: Functor fmt, 6242: match_flag_type flags, 6242: const RegexT& re) const 6242: { 6242: if(m_is_singular) 6242: raise_logic_error(); 6242: typedef ::boost::regex_traits_wrapper traits_type; 6242: typedef typename re_detail_106501::compute_functor_type, OutputIterator, traits_type>::type F; 6242: F func(fmt); 6242: return func(*this, out, flags, re.get_traits()); 6242: } 6242: template 6242: string_type format(Functor fmt, 6242: match_flag_type flags, 6242: const RegexT& re) const 6242: { 6242: if(m_is_singular) 6242: raise_logic_error(); 6242: typedef ::boost::regex_traits_wrapper traits_type; 6242: std::basic_string result; 6242: re_detail_106501::string_out_iterator > i(result); 6242: 6242: typedef typename re_detail_106501::compute_functor_type, re_detail_106501::string_out_iterator >, traits_type >::type F; 6242: F func(fmt); 6242: 6242: func(*this, i, flags, re.get_traits()); 6242: return result; 6242: } 6242: 6242: const_reference get_last_closed_paren()const 6242: { 6242: if(m_is_singular) 6242: raise_logic_error(); 6242: return m_last_closed_paren == 0 ? m_null : (*this)[m_last_closed_paren]; 6242: } 6242: 6242: allocator_type get_allocator() const 6242: { 6242: 6242: return m_subs.get_allocator(); 6242: 6242: 6242: 6242: } 6242: void swap(match_results& that) 6242: { 6242: std::swap(m_subs, that.m_subs); 6242: std::swap(m_named_subs, that.m_named_subs); 6242: std::swap(m_last_closed_paren, that.m_last_closed_paren); 6242: if(m_is_singular) 6242: { 6242: if(!that.m_is_singular) 6242: { 6242: m_base = that.m_base; 6242: m_null = that.m_null; 6242: } 6242: } 6242: else if(that.m_is_singular) 6242: { 6242: that.m_base = m_base; 6242: that.m_null = m_null; 6242: } 6242: else 6242: { 6242: std::swap(m_base, that.m_base); 6242: std::swap(m_null, that.m_null); 6242: } 6242: std::swap(m_is_singular, that.m_is_singular); 6242: } 6242: bool operator==(const match_results& that)const 6242: { 6242: if(m_is_singular) 6242: { 6242: return that.m_is_singular; 6242: } 6242: else if(that.m_is_singular) 6242: { 6242: return false; 6242: } 6242: return (m_subs == that.m_subs) && (m_base == that.m_base) && (m_last_closed_paren == that.m_last_closed_paren); 6242: } 6242: bool operator!=(const match_results& that)const 6242: { return !(*this == that); } 6242: # 466 "/usr/include/boost/regex/v4/match_results.hpp" 3 4 6242: void set_second(BidiIterator i) 6242: { 6242: (static_cast (m_subs.size() > 2) ? void (0) : __assert_fail ("m_subs.size() > 2", "/usr/include/boost/regex/v4/match_results.hpp", 468, __extension__ __PRETTY_FUNCTION__)); 6242: m_subs[2].second = i; 6242: m_subs[2].matched = true; 6242: m_subs[0].first = i; 6242: m_subs[0].matched = (m_subs[0].first != m_subs[0].second); 6242: m_null.first = i; 6242: m_null.second = i; 6242: m_null.matched = false; 6242: m_is_singular = false; 6242: } 6242: 6242: void set_second(BidiIterator i, size_type pos, bool m = true, bool escape_k = false) 6242: { 6242: if(pos) 6242: m_last_closed_paren = static_cast(pos); 6242: pos += 2; 6242: (static_cast (m_subs.size() > pos) ? void (0) : __assert_fail ("m_subs.size() > pos", "/usr/include/boost/regex/v4/match_results.hpp", 484, __extension__ __PRETTY_FUNCTION__)); 6242: m_subs[pos].second = i; 6242: m_subs[pos].matched = m; 6242: if((pos == 2) && !escape_k) 6242: { 6242: m_subs[0].first = i; 6242: m_subs[0].matched = (m_subs[0].first != m_subs[0].second); 6242: m_null.first = i; 6242: m_null.second = i; 6242: m_null.matched = false; 6242: m_is_singular = false; 6242: } 6242: } 6242: void set_size(size_type n, BidiIterator i, BidiIterator j) 6242: { 6242: value_type v(j); 6242: size_type len = m_subs.size(); 6242: if(len > n + 2) 6242: { 6242: m_subs.erase(m_subs.begin()+n+2, m_subs.end()); 6242: std::fill(m_subs.begin(), m_subs.end(), v); 6242: } 6242: else 6242: { 6242: std::fill(m_subs.begin(), m_subs.end(), v); 6242: if(n+2 != len) 6242: m_subs.insert(m_subs.end(), n+2-len, v); 6242: } 6242: m_subs[1].first = i; 6242: m_last_closed_paren = 0; 6242: } 6242: void set_base(BidiIterator pos) 6242: { 6242: m_base = pos; 6242: } 6242: BidiIterator base()const 6242: { 6242: return m_base; 6242: } 6242: void set_first(BidiIterator i) 6242: { 6242: (static_cast (m_subs.size() > 2) ? void (0) : __assert_fail ("m_subs.size() > 2", "/usr/include/boost/regex/v4/match_results.hpp", 525, __extension__ __PRETTY_FUNCTION__)); 6242: 6242: m_subs[1].second = i; 6242: m_subs[1].matched = (m_subs[1].first != i); 6242: 6242: m_subs[2].first = i; 6242: 6242: for(size_type n = 3; n < m_subs.size(); ++n) 6242: { 6242: m_subs[n].first = m_subs[n].second = m_subs[0].second; 6242: m_subs[n].matched = false; 6242: } 6242: } 6242: void set_first(BidiIterator i, size_type pos, bool escape_k = false) 6242: { 6242: (static_cast (pos+2 < m_subs.size()) ? void (0) : __assert_fail ("pos+2 < m_subs.size()", "/usr/include/boost/regex/v4/match_results.hpp", 540, __extension__ __PRETTY_FUNCTION__)); 6242: if(pos || escape_k) 6242: { 6242: m_subs[pos+2].first = i; 6242: if(escape_k) 6242: { 6242: m_subs[1].second = i; 6242: m_subs[1].matched = (m_subs[1].first != m_subs[1].second); 6242: } 6242: } 6242: else 6242: set_first(i); 6242: } 6242: void maybe_assign(const match_results& m); 6242: 6242: void set_named_subs(boost::shared_ptr subs) 6242: { 6242: m_named_subs = subs; 6242: } 6242: 6242: private: 6242: 6242: 6242: 6242: static void raise_logic_error() 6242: { 6242: std::logic_error e("Attempt to access an uninitialzed boost::match_results<> class."); 6242: boost::throw_exception(e); 6242: } 6242: 6242: 6242: vector_type m_subs; 6242: BidiIterator m_base; 6242: sub_match m_null; 6242: boost::shared_ptr m_named_subs; 6242: int m_last_closed_paren; 6242: bool m_is_singular; 6242: }; 6242: 6242: template 6242: void match_results::maybe_assign(const match_results& m) 6242: { 6242: if(m_is_singular) 6242: { 6242: *this = m; 6242: return; 6242: } 6242: const_iterator p1, p2; 6242: p1 = begin(); 6242: p2 = m.begin(); 6242: # 600 "/usr/include/boost/regex/v4/match_results.hpp" 3 4 6242: BidiIterator l_end = this->suffix().second; 6242: BidiIterator l_base = (p1->first == l_end) ? this->prefix().first : (*this)[0].first; 6242: difference_type len1 = 0; 6242: difference_type len2 = 0; 6242: difference_type base1 = 0; 6242: difference_type base2 = 0; 6242: std::size_t i; 6242: for(i = 0; i < size(); ++i, ++p1, ++p2) 6242: { 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: if(p1->first == l_end) 6242: { 6242: if(p2->first != l_end) 6242: { 6242: 6242: 6242: base1 = 1; 6242: base2 = 0; 6242: break; 6242: } 6242: else 6242: { 6242: 6242: 6242: if((p1->matched == false) && (p2->matched == true)) 6242: break; 6242: if((p1->matched == true) && (p2->matched == false)) 6242: return; 6242: continue; 6242: } 6242: } 6242: else if(p2->first == l_end) 6242: { 6242: 6242: return; 6242: } 6242: base1 = ::boost::re_detail_106501::distance(l_base, p1->first); 6242: base2 = ::boost::re_detail_106501::distance(l_base, p2->first); 6242: (static_cast (base1 >= 0) ? void (0) : __assert_fail ("base1 >= 0", "/usr/include/boost/regex/v4/match_results.hpp", 644, __extension__ __PRETTY_FUNCTION__)); 6242: (static_cast (base2 >= 0) ? void (0) : __assert_fail ("base2 >= 0", "/usr/include/boost/regex/v4/match_results.hpp", 645, __extension__ __PRETTY_FUNCTION__)); 6242: if(base1 < base2) return; 6242: if(base2 < base1) break; 6242: 6242: len1 = ::boost::re_detail_106501::distance((BidiIterator)p1->first, (BidiIterator)p1->second); 6242: len2 = ::boost::re_detail_106501::distance((BidiIterator)p2->first, (BidiIterator)p2->second); 6242: (static_cast (len1 >= 0) ? void (0) : __assert_fail ("len1 >= 0", "/usr/include/boost/regex/v4/match_results.hpp", 651, __extension__ __PRETTY_FUNCTION__)); 6242: (static_cast (len2 >= 0) ? void (0) : __assert_fail ("len2 >= 0", "/usr/include/boost/regex/v4/match_results.hpp", 652, __extension__ __PRETTY_FUNCTION__)); 6242: if((len1 != len2) || ((p1->matched == false) && (p2->matched == true))) 6242: break; 6242: if((p1->matched == true) && (p2->matched == false)) 6242: return; 6242: } 6242: if(i == size()) 6242: return; 6242: if(base2 < base1) 6242: *this = m; 6242: else if((len2 > len1) || ((p1->matched == false) && (p2->matched == true)) ) 6242: *this = m; 6242: } 6242: 6242: template 6242: void swap(match_results& a, match_results& b) 6242: { 6242: a.swap(b); 6242: } 6242: 6242: 6242: template 6242: std::basic_ostream& 6242: operator << (std::basic_ostream& os, 6242: const match_results& s) 6242: { 6242: return (os << s.str()); 6242: } 6242: # 692 "/usr/include/boost/regex/v4/match_results.hpp" 3 4 6242: } 6242: # 83 "/usr/include/boost/regex/v4/regex.hpp" 2 3 4 6242: 6242: 6242: # 1 "/usr/include/boost/regex/v4/protected_call.hpp" 1 3 4 6242: # 34 "/usr/include/boost/regex/v4/protected_call.hpp" 3 4 6242: namespace boost{ 6242: namespace re_detail_106501{ 6242: 6242: class abstract_protected_call 6242: { 6242: public: 6242: bool execute()const; 6242: 6242: virtual ~abstract_protected_call(){} 6242: private: 6242: virtual bool call()const = 0; 6242: }; 6242: 6242: template 6242: class concrete_protected_call 6242: : public abstract_protected_call 6242: { 6242: public: 6242: typedef bool (T::*proc_type)(); 6242: concrete_protected_call(T* o, proc_type p) 6242: : obj(o), proc(p) {} 6242: private: 6242: virtual bool call()const; 6242: T* obj; 6242: proc_type proc; 6242: }; 6242: 6242: template 6242: bool concrete_protected_call::call()const 6242: { 6242: return (obj->*proc)(); 6242: } 6242: 6242: } 6242: } 6242: # 86 "/usr/include/boost/regex/v4/regex.hpp" 2 3 4 6242: 6242: 6242: # 1 "/usr/include/boost/regex/v4/perl_matcher.hpp" 1 3 4 6242: # 15 "/usr/include/boost/regex/v4/perl_matcher.hpp" 3 4 6242: # 1 "/usr/include/boost/regex/v4/iterator_category.hpp" 1 3 4 6242: # 28 "/usr/include/boost/regex/v4/iterator_category.hpp" 3 4 6242: namespace boost{ 6242: namespace detail{ 6242: 6242: template 6242: struct is_random_imp 6242: { 6242: 6242: private: 6242: typedef typename std::iterator_traits::iterator_category cat; 6242: public: 6242: static const bool value = (::boost::is_convertible::value); 6242: 6242: 6242: 6242: }; 6242: 6242: template 6242: struct is_random_pointer_imp 6242: { 6242: static const bool value = true; 6242: }; 6242: 6242: template 6242: struct is_random_imp_selector 6242: { 6242: template 6242: struct rebind 6242: { 6242: typedef is_random_imp type; 6242: }; 6242: }; 6242: 6242: template <> 6242: struct is_random_imp_selector 6242: { 6242: template 6242: struct rebind 6242: { 6242: typedef is_random_pointer_imp type; 6242: }; 6242: }; 6242: 6242: } 6242: 6242: template 6242: struct is_random_access_iterator 6242: { 6242: private: 6242: typedef detail::is_random_imp_selector< ::boost::is_pointer::value> selector; 6242: typedef typename selector::template rebind bound_type; 6242: typedef typename bound_type::type answer; 6242: public: 6242: static const bool value = answer::value; 6242: }; 6242: 6242: 6242: template 6242: const bool is_random_access_iterator::value; 6242: 6242: 6242: } 6242: # 16 "/usr/include/boost/regex/v4/perl_matcher.hpp" 2 3 4 6242: # 33 "/usr/include/boost/regex/v4/perl_matcher.hpp" 3 4 6242: namespace boost{ 6242: namespace re_detail_106501{ 6242: 6242: 6242: 6242: 6242: void verify_options(boost::regex_constants::syntax_option_type ef, match_flag_type mf); 6242: 6242: 6242: 6242: template 6242: inline bool can_start(charT c, const unsigned char* map, unsigned char mask) 6242: { 6242: return ((c < static_cast(0)) ? true : ((c >= static_cast(1 << 8)) ? true : map[c] & mask)); 6242: } 6242: inline bool can_start(char c, const unsigned char* map, unsigned char mask) 6242: { 6242: return map[(unsigned char)c] & mask; 6242: } 6242: inline bool can_start(signed char c, const unsigned char* map, unsigned char mask) 6242: { 6242: return map[(unsigned char)c] & mask; 6242: } 6242: inline bool can_start(unsigned char c, const unsigned char* map, unsigned char mask) 6242: { 6242: return map[c] & mask; 6242: } 6242: inline bool can_start(unsigned short c, const unsigned char* map, unsigned char mask) 6242: { 6242: return ((c >= (1 << 8)) ? true : map[c] & mask); 6242: } 6242: # 73 "/usr/include/boost/regex/v4/perl_matcher.hpp" 3 4 6242: inline bool can_start(unsigned int c, const unsigned char* map, unsigned char mask) 6242: { 6242: return (((c >= static_cast(1u << 8)) ? true : map[c] & mask)); 6242: } 6242: # 89 "/usr/include/boost/regex/v4/perl_matcher.hpp" 3 4 6242: template 6242: inline int string_compare(const std::basic_string& s, const C* p) 6242: { 6242: if(0 == *p) 6242: { 6242: if(s.empty() || ((s.size() == 1) && (s[0] == 0))) 6242: return 0; 6242: } 6242: return s.compare(p); 6242: } 6242: # 117 "/usr/include/boost/regex/v4/perl_matcher.hpp" 3 4 6242: template 6242: inline int string_compare(const Seq& s, const C* p) 6242: { 6242: std::size_t i = 0; 6242: while((i < s.size()) && (p[i] == s[i])) 6242: { 6242: ++i; 6242: } 6242: return (i == s.size()) ? -p[i] : s[i] - p[i]; 6242: } 6242: 6242: 6242: template 6242: inline const charT* re_skip_past_null(const charT* p) 6242: { 6242: while (*p != static_cast(0)) ++p; 6242: return ++p; 6242: } 6242: 6242: template 6242: iterator re_is_set_member(iterator next, 6242: iterator last, 6242: const re_set_long* set_, 6242: const regex_data& e, bool icase) 6242: { 6242: const charT* p = reinterpret_cast(set_+1); 6242: iterator ptr; 6242: unsigned int i; 6242: 6242: 6242: if(next == last) return next; 6242: 6242: typedef typename traits_type::string_type traits_string_type; 6242: const ::boost::regex_traits_wrapper& traits_inst = *(e.m_ptraits); 6242: 6242: 6242: 6242: (void)traits_inst; 6242: 6242: 6242: 6242: for(i = 0; i < set_->csingles; ++i) 6242: { 6242: ptr = next; 6242: if(*p == static_cast(0)) 6242: { 6242: 6242: if(traits_inst.translate(*ptr, icase)) 6242: { 6242: ++p; 6242: continue; 6242: } 6242: return set_->isnot ? next : (ptr == next) ? ++next : ptr; 6242: } 6242: else 6242: { 6242: while(*p && (ptr != last)) 6242: { 6242: if(traits_inst.translate(*ptr, icase) != *p) 6242: break; 6242: ++p; 6242: ++ptr; 6242: } 6242: 6242: if(*p == static_cast(0)) 6242: return set_->isnot ? next : (ptr == next) ? ++next : ptr; 6242: 6242: p = re_skip_past_null(p); 6242: } 6242: } 6242: 6242: charT col = traits_inst.translate(*next, icase); 6242: 6242: 6242: if(set_->cranges || set_->cequivalents) 6242: { 6242: traits_string_type s1; 6242: 6242: 6242: if(set_->cranges) 6242: { 6242: if((e.m_flags & regex_constants::collate) == 0) 6242: s1.assign(1, col); 6242: else 6242: { 6242: charT a[2] = { col, charT(0), }; 6242: s1 = traits_inst.transform(a, a + 1); 6242: } 6242: for(i = 0; i < set_->cranges; ++i) 6242: { 6242: if(string_compare(s1,p) >= 0) 6242: { 6242: do{ ++p; }while(*p); 6242: ++p; 6242: if(string_compare(s1,p) <= 0) 6242: return set_->isnot ? next : ++next; 6242: } 6242: else 6242: { 6242: 6242: do{ ++p; }while(*p); 6242: ++p; 6242: } 6242: 6242: do{ ++p; }while(*p); 6242: ++p; 6242: } 6242: } 6242: 6242: 6242: if(set_->cequivalents) 6242: { 6242: charT a[2] = { col, charT(0), }; 6242: s1 = traits_inst.transform_primary(a, a +1); 6242: for(i = 0; i < set_->cequivalents; ++i) 6242: { 6242: if(string_compare(s1,p) == 0) 6242: return set_->isnot ? next : ++next; 6242: 6242: do{ ++p; }while(*p); 6242: ++p; 6242: } 6242: } 6242: } 6242: if(traits_inst.isctype(col, set_->cclasses) == true) 6242: return set_->isnot ? next : ++next; 6242: if((set_->cnclasses != 0) && (traits_inst.isctype(col, set_->cnclasses) == false)) 6242: return set_->isnot ? next : ++next; 6242: return set_->isnot ? ++next : next; 6242: } 6242: 6242: template 6242: class repeater_count 6242: { 6242: repeater_count** stack; 6242: repeater_count* next; 6242: int state_id; 6242: std::size_t count; 6242: BidiIterator start_pos; 6242: 6242: repeater_count* unwind_until(int n, repeater_count* p, int current_recursion_id) 6242: { 6242: while(p && (p->state_id != n)) 6242: { 6242: if(-2 - current_recursion_id == p->state_id) 6242: return 0; 6242: p = p->next; 6242: if(p && (p->state_id < 0)) 6242: { 6242: p = unwind_until(p->state_id, p, current_recursion_id); 6242: if(!p) 6242: return p; 6242: p = p->next; 6242: } 6242: } 6242: return p; 6242: } 6242: public: 6242: repeater_count(repeater_count** s) : stack(s), next(0), state_id(-1), count(0), start_pos() {} 6242: 6242: repeater_count(int i, repeater_count** s, BidiIterator start, int current_recursion_id) 6242: : start_pos(start) 6242: { 6242: state_id = i; 6242: stack = s; 6242: next = *stack; 6242: *stack = this; 6242: if((state_id > next->state_id) && (next->state_id >= 0)) 6242: count = 0; 6242: else 6242: { 6242: repeater_count* p = next; 6242: p = unwind_until(state_id, p, current_recursion_id); 6242: if(p) 6242: { 6242: count = p->count; 6242: start_pos = p->start_pos; 6242: } 6242: else 6242: count = 0; 6242: } 6242: } 6242: ~repeater_count() 6242: { 6242: if(next) 6242: *stack = next; 6242: } 6242: std::size_t get_count() { return count; } 6242: int get_id() { return state_id; } 6242: std::size_t operator++() { return ++count; } 6242: bool check_null_repeat(const BidiIterator& pos, std::size_t max) 6242: { 6242: 6242: 6242: 6242: bool result = (count == 0) ? false : (pos == start_pos); 6242: if(result) 6242: count = max; 6242: else 6242: start_pos = pos; 6242: return result; 6242: } 6242: }; 6242: 6242: struct saved_state; 6242: 6242: enum saved_state_type 6242: { 6242: saved_type_end = 0, 6242: saved_type_paren = 1, 6242: saved_type_recurse = 2, 6242: saved_type_assertion = 3, 6242: saved_state_alt = 4, 6242: saved_state_repeater_count = 5, 6242: saved_state_extra_block = 6, 6242: saved_state_greedy_single_repeat = 7, 6242: saved_state_rep_slow_dot = 8, 6242: saved_state_rep_fast_dot = 9, 6242: saved_state_rep_char = 10, 6242: saved_state_rep_short_set = 11, 6242: saved_state_rep_long_set = 12, 6242: saved_state_non_greedy_long_repeat = 13, 6242: saved_state_count = 14 6242: }; 6242: 6242: template 6242: struct recursion_info 6242: { 6242: typedef typename Results::value_type value_type; 6242: typedef typename value_type::iterator iterator; 6242: int idx; 6242: const re_syntax_base* preturn_address; 6242: Results results; 6242: repeater_count* repeater_stack; 6242: iterator location_of_start; 6242: }; 6242: # 362 "/usr/include/boost/regex/v4/perl_matcher.hpp" 3 4 6242: template 6242: class perl_matcher 6242: { 6242: public: 6242: typedef typename traits::char_type char_type; 6242: typedef perl_matcher self_type; 6242: typedef bool (self_type::*matcher_proc_type)(void); 6242: typedef std::size_t traits_size_type; 6242: typedef typename is_byte::width_type width_type; 6242: typedef typename regex_iterator_traits::difference_type difference_type; 6242: typedef match_results results_type; 6242: 6242: perl_matcher(BidiIterator first, BidiIterator end, 6242: match_results& what, 6242: const basic_regex& e, 6242: match_flag_type f, 6242: BidiIterator l_base) 6242: : m_result(what), base(first), last(end), 6242: position(first), backstop(l_base), re(e), traits_inst(e.get_traits()), 6242: m_independent(false), next_count(&rep_obj), rep_obj(&next_count) 6242: { 6242: construct_init(e, f); 6242: } 6242: 6242: bool match(); 6242: bool find(); 6242: 6242: void setf(match_flag_type f) 6242: { m_match_flags |= f; } 6242: void unsetf(match_flag_type f) 6242: { m_match_flags &= ~f; } 6242: 6242: private: 6242: void construct_init(const basic_regex& e, match_flag_type f); 6242: 6242: bool find_imp(); 6242: bool match_imp(); 6242: 6242: 6242: 6242: 6242: void estimate_max_state_count(std::random_access_iterator_tag*); 6242: void estimate_max_state_count(void*); 6242: bool match_prefix(); 6242: bool match_all_states(); 6242: 6242: 6242: bool match_startmark(); 6242: bool match_endmark(); 6242: bool match_literal(); 6242: bool match_start_line(); 6242: bool match_end_line(); 6242: bool match_wild(); 6242: bool match_match(); 6242: bool match_word_boundary(); 6242: bool match_within_word(); 6242: bool match_word_start(); 6242: bool match_word_end(); 6242: bool match_buffer_start(); 6242: bool match_buffer_end(); 6242: bool match_backref(); 6242: bool match_long_set(); 6242: bool match_set(); 6242: bool match_jump(); 6242: bool match_alt(); 6242: bool match_rep(); 6242: bool match_combining(); 6242: bool match_soft_buffer_end(); 6242: bool match_restart_continue(); 6242: bool match_long_set_repeat(); 6242: bool match_set_repeat(); 6242: bool match_char_repeat(); 6242: bool match_dot_repeat_fast(); 6242: bool match_dot_repeat_slow(); 6242: bool match_dot_repeat_dispatch() 6242: { 6242: return ::boost::is_random_access_iterator::value ? match_dot_repeat_fast() : match_dot_repeat_slow(); 6242: } 6242: bool match_backstep(); 6242: bool match_assert_backref(); 6242: bool match_toggle_case(); 6242: 6242: 6242: 6242: bool match_recursion(); 6242: bool match_fail(); 6242: bool match_accept(); 6242: bool match_commit(); 6242: bool match_then(); 6242: bool skip_until_paren(int index, bool match = true); 6242: 6242: 6242: bool find_restart_any(); 6242: bool find_restart_word(); 6242: bool find_restart_line(); 6242: bool find_restart_buf(); 6242: bool find_restart_lit(); 6242: 6242: private: 6242: 6242: match_results& m_result; 6242: 6242: scoped_ptr > m_temp_match; 6242: 6242: match_results* m_presult; 6242: 6242: BidiIterator base; 6242: 6242: BidiIterator last; 6242: 6242: BidiIterator position; 6242: 6242: BidiIterator restart; 6242: 6242: BidiIterator search_base; 6242: 6242: BidiIterator backstop; 6242: 6242: const basic_regex& re; 6242: 6242: const ::boost::regex_traits_wrapper& traits_inst; 6242: 6242: const re_syntax_base* pstate; 6242: 6242: match_flag_type m_match_flags; 6242: 6242: std::ptrdiff_t state_count; 6242: 6242: std::ptrdiff_t max_state_count; 6242: 6242: bool icase; 6242: 6242: bool m_has_partial_match; 6242: 6242: bool m_has_found_match; 6242: 6242: bool m_independent; 6242: 6242: repeater_count* next_count; 6242: 6242: repeater_count rep_obj; 6242: 6242: typename traits::char_class_type m_word_mask; 6242: 6242: unsigned char match_any_mask; 6242: 6242: std::vector > recursion_stack; 6242: # 519 "/usr/include/boost/regex/v4/perl_matcher.hpp" 3 4 6242: typedef bool (self_type::*unwind_proc_type)(bool); 6242: 6242: void extend_stack(); 6242: bool unwind(bool); 6242: bool unwind_end(bool); 6242: bool unwind_paren(bool); 6242: bool unwind_recursion_stopper(bool); 6242: bool unwind_assertion(bool); 6242: bool unwind_alt(bool); 6242: bool unwind_repeater_counter(bool); 6242: bool unwind_extra_block(bool); 6242: bool unwind_greedy_single_repeat(bool); 6242: bool unwind_slow_dot_repeat(bool); 6242: bool unwind_fast_dot_repeat(bool); 6242: bool unwind_char_repeat(bool); 6242: bool unwind_short_set_repeat(bool); 6242: bool unwind_long_set_repeat(bool); 6242: bool unwind_non_greedy_repeat(bool); 6242: bool unwind_recursion(bool); 6242: bool unwind_recursion_pop(bool); 6242: bool unwind_commit(bool); 6242: bool unwind_then(bool); 6242: bool unwind_case(bool); 6242: void destroy_single_repeat(); 6242: void push_matched_paren(int index, const sub_match& sub); 6242: void push_recursion_stopper(); 6242: void push_assertion(const re_syntax_base* ps, bool positive); 6242: void push_alt(const re_syntax_base* ps); 6242: void push_repeater_count(int i, repeater_count** s); 6242: void push_single_repeat(std::size_t c, const re_repeat* r, BidiIterator last_position, int state_id); 6242: void push_non_greedy_repeat(const re_syntax_base* ps); 6242: void push_recursion(int idx, const re_syntax_base* p, results_type* presults); 6242: void push_recursion_pop(); 6242: void push_case_change(bool); 6242: 6242: 6242: saved_state* m_stack_base; 6242: 6242: saved_state* m_backup_state; 6242: 6242: unsigned used_block_count; 6242: 6242: 6242: bool m_recursive_result; 6242: 6242: bool m_unwound_lookahead; 6242: 6242: bool m_unwound_alt; 6242: 6242: 6242: 6242: 6242: 6242: 6242: perl_matcher& operator=(const perl_matcher&) 6242: { 6242: return *this; 6242: } 6242: perl_matcher(const perl_matcher& that) 6242: : m_result(that.m_result), re(that.re), traits_inst(that.traits_inst), rep_obj(0) {} 6242: }; 6242: 6242: 6242: 6242: 6242: 6242: } 6242: # 598 "/usr/include/boost/regex/v4/perl_matcher.hpp" 3 4 6242: } 6242: # 610 "/usr/include/boost/regex/v4/perl_matcher.hpp" 3 4 6242: # 1 "/usr/include/boost/regex/v4/perl_matcher_non_recursive.hpp" 1 3 4 6242: # 40 "/usr/include/boost/regex/v4/perl_matcher_non_recursive.hpp" 3 4 6242: namespace boost{ 6242: namespace re_detail_106501{ 6242: 6242: template 6242: inline void inplace_destroy(T* p) 6242: { 6242: (void)p; 6242: p->~T(); 6242: } 6242: 6242: struct saved_state 6242: { 6242: union{ 6242: unsigned int state_id; 6242: 6242: std::size_t padding1; 6242: std::ptrdiff_t padding2; 6242: void* padding3; 6242: }; 6242: saved_state(unsigned i) : state_id(i) {} 6242: }; 6242: 6242: template 6242: struct saved_matched_paren : public saved_state 6242: { 6242: int index; 6242: sub_match sub; 6242: saved_matched_paren(int i, const sub_match& s) : saved_state(1), index(i), sub(s){}; 6242: }; 6242: 6242: template 6242: struct saved_position : public saved_state 6242: { 6242: const re_syntax_base* pstate; 6242: BidiIterator position; 6242: saved_position(const re_syntax_base* ps, BidiIterator pos, int i) : saved_state(i), pstate(ps), position(pos){}; 6242: }; 6242: 6242: template 6242: struct saved_assertion : public saved_position 6242: { 6242: bool positive; 6242: saved_assertion(bool p, const re_syntax_base* ps, BidiIterator pos) 6242: : saved_position(ps, pos, saved_type_assertion), positive(p){}; 6242: }; 6242: 6242: template 6242: struct saved_repeater : public saved_state 6242: { 6242: repeater_count count; 6242: saved_repeater(int i, repeater_count** s, BidiIterator start, int current_recursion_id) 6242: : saved_state(saved_state_repeater_count), count(i, s, start, current_recursion_id){} 6242: }; 6242: 6242: struct saved_extra_block : public saved_state 6242: { 6242: saved_state *base, *end; 6242: saved_extra_block(saved_state* b, saved_state* e) 6242: : saved_state(saved_state_extra_block), base(b), end(e) {} 6242: }; 6242: 6242: struct save_state_init 6242: { 6242: saved_state** stack; 6242: save_state_init(saved_state** base, saved_state** end) 6242: : stack(base) 6242: { 6242: *base = static_cast(get_mem_block()); 6242: *end = reinterpret_cast(reinterpret_cast(*base)+4096); 6242: --(*end); 6242: (void) new (*end)saved_state(0); 6242: (static_cast (*end > *base) ? void (0) : __assert_fail ("*end > *base", "/usr/include/boost/regex/v4/perl_matcher_non_recursive.hpp", 111, __extension__ __PRETTY_FUNCTION__)); 6242: } 6242: ~save_state_init() 6242: { 6242: put_mem_block(*stack); 6242: *stack = 0; 6242: } 6242: }; 6242: 6242: template 6242: struct saved_single_repeat : public saved_state 6242: { 6242: std::size_t count; 6242: const re_repeat* rep; 6242: BidiIterator last_position; 6242: saved_single_repeat(std::size_t c, const re_repeat* r, BidiIterator lp, int arg_id) 6242: : saved_state(arg_id), count(c), rep(r), last_position(lp){} 6242: }; 6242: 6242: template 6242: struct saved_recursion : public saved_state 6242: { 6242: saved_recursion(int idx, const re_syntax_base* p, Results* pr) 6242: : saved_state(14), recursion_id(idx), preturn_address(p), results(*pr) {} 6242: int recursion_id; 6242: const re_syntax_base* preturn_address; 6242: Results results; 6242: }; 6242: 6242: struct saved_change_case : public saved_state 6242: { 6242: bool icase; 6242: saved_change_case(bool c) : saved_state(18), icase(c) {} 6242: }; 6242: 6242: template 6242: bool perl_matcher::match_all_states() 6242: { 6242: static matcher_proc_type const s_match_vtable[34] = 6242: { 6242: (&perl_matcher::match_startmark), 6242: &perl_matcher::match_endmark, 6242: &perl_matcher::match_literal, 6242: &perl_matcher::match_start_line, 6242: &perl_matcher::match_end_line, 6242: &perl_matcher::match_wild, 6242: &perl_matcher::match_match, 6242: &perl_matcher::match_word_boundary, 6242: &perl_matcher::match_within_word, 6242: &perl_matcher::match_word_start, 6242: &perl_matcher::match_word_end, 6242: &perl_matcher::match_buffer_start, 6242: &perl_matcher::match_buffer_end, 6242: &perl_matcher::match_backref, 6242: &perl_matcher::match_long_set, 6242: &perl_matcher::match_set, 6242: &perl_matcher::match_jump, 6242: &perl_matcher::match_alt, 6242: &perl_matcher::match_rep, 6242: &perl_matcher::match_combining, 6242: &perl_matcher::match_soft_buffer_end, 6242: &perl_matcher::match_restart_continue, 6242: 6242: 6242: 6242: 6242: &perl_matcher::match_dot_repeat_dispatch, 6242: &perl_matcher::match_char_repeat, 6242: &perl_matcher::match_set_repeat, 6242: &perl_matcher::match_long_set_repeat, 6242: &perl_matcher::match_backstep, 6242: &perl_matcher::match_assert_backref, 6242: &perl_matcher::match_toggle_case, 6242: &perl_matcher::match_recursion, 6242: &perl_matcher::match_fail, 6242: &perl_matcher::match_accept, 6242: &perl_matcher::match_commit, 6242: &perl_matcher::match_then, 6242: }; 6242: 6242: push_recursion_stopper(); 6242: do{ 6242: while(pstate) 6242: { 6242: matcher_proc_type proc = s_match_vtable[pstate->type]; 6242: ++state_count; 6242: if(!(this->*proc)()) 6242: { 6242: if(state_count > max_state_count) 6242: raise_error(traits_inst, regex_constants::error_complexity); 6242: if((m_match_flags & match_partial) && (position == last) && (position != search_base)) 6242: m_has_partial_match = true; 6242: bool successful_unwind = unwind(false); 6242: if((m_match_flags & match_partial) && (position == last) && (position != search_base)) 6242: m_has_partial_match = true; 6242: if(false == successful_unwind) 6242: return m_recursive_result; 6242: } 6242: } 6242: }while(unwind(true)); 6242: return m_recursive_result; 6242: } 6242: 6242: template 6242: void perl_matcher::extend_stack() 6242: { 6242: if(used_block_count) 6242: { 6242: --used_block_count; 6242: saved_state* stack_base; 6242: saved_state* backup_state; 6242: stack_base = static_cast(get_mem_block()); 6242: backup_state = reinterpret_cast(reinterpret_cast(stack_base)+4096); 6242: saved_extra_block* block = static_cast(backup_state); 6242: --block; 6242: (void) new (block) saved_extra_block(m_stack_base, m_backup_state); 6242: m_stack_base = stack_base; 6242: m_backup_state = block; 6242: } 6242: else 6242: raise_error(traits_inst, regex_constants::error_stack); 6242: } 6242: 6242: template 6242: inline void perl_matcher::push_matched_paren(int index, const sub_match& sub) 6242: { 6242: 6242: saved_matched_paren* pmp = static_cast*>(m_backup_state); 6242: --pmp; 6242: if(pmp < m_stack_base) 6242: { 6242: extend_stack(); 6242: pmp = static_cast*>(m_backup_state); 6242: --pmp; 6242: } 6242: (void) new (pmp)saved_matched_paren(index, sub); 6242: m_backup_state = pmp; 6242: } 6242: 6242: template 6242: inline void perl_matcher::push_case_change(bool c) 6242: { 6242: 6242: saved_change_case* pmp = static_cast(m_backup_state); 6242: --pmp; 6242: if(pmp < m_stack_base) 6242: { 6242: extend_stack(); 6242: pmp = static_cast(m_backup_state); 6242: --pmp; 6242: } 6242: (void) new (pmp)saved_change_case(c); 6242: m_backup_state = pmp; 6242: } 6242: 6242: template 6242: inline void perl_matcher::push_recursion_stopper() 6242: { 6242: saved_state* pmp = m_backup_state; 6242: --pmp; 6242: if(pmp < m_stack_base) 6242: { 6242: extend_stack(); 6242: pmp = m_backup_state; 6242: --pmp; 6242: } 6242: (void) new (pmp)saved_state(saved_type_recurse); 6242: m_backup_state = pmp; 6242: } 6242: 6242: template 6242: inline void perl_matcher::push_assertion(const re_syntax_base* ps, bool positive) 6242: { 6242: saved_assertion* pmp = static_cast*>(m_backup_state); 6242: --pmp; 6242: if(pmp < m_stack_base) 6242: { 6242: extend_stack(); 6242: pmp = static_cast*>(m_backup_state); 6242: --pmp; 6242: } 6242: (void) new (pmp)saved_assertion(positive, ps, position); 6242: m_backup_state = pmp; 6242: } 6242: 6242: template 6242: inline void perl_matcher::push_alt(const re_syntax_base* ps) 6242: { 6242: saved_position* pmp = static_cast*>(m_backup_state); 6242: --pmp; 6242: if(pmp < m_stack_base) 6242: { 6242: extend_stack(); 6242: pmp = static_cast*>(m_backup_state); 6242: --pmp; 6242: } 6242: (void) new (pmp)saved_position(ps, position, saved_state_alt); 6242: m_backup_state = pmp; 6242: } 6242: 6242: template 6242: inline void perl_matcher::push_non_greedy_repeat(const re_syntax_base* ps) 6242: { 6242: saved_position* pmp = static_cast*>(m_backup_state); 6242: --pmp; 6242: if(pmp < m_stack_base) 6242: { 6242: extend_stack(); 6242: pmp = static_cast*>(m_backup_state); 6242: --pmp; 6242: } 6242: (void) new (pmp)saved_position(ps, position, saved_state_non_greedy_long_repeat); 6242: m_backup_state = pmp; 6242: } 6242: 6242: template 6242: inline void perl_matcher::push_repeater_count(int i, repeater_count** s) 6242: { 6242: saved_repeater* pmp = static_cast*>(m_backup_state); 6242: --pmp; 6242: if(pmp < m_stack_base) 6242: { 6242: extend_stack(); 6242: pmp = static_cast*>(m_backup_state); 6242: --pmp; 6242: } 6242: (void) new (pmp)saved_repeater(i, s, position, this->recursion_stack.size() ? this->recursion_stack.back().idx : ((-0x7fffffff - 1) + 3)); 6242: m_backup_state = pmp; 6242: } 6242: 6242: template 6242: inline void perl_matcher::push_single_repeat(std::size_t c, const re_repeat* r, BidiIterator last_position, int state_id) 6242: { 6242: saved_single_repeat* pmp = static_cast*>(m_backup_state); 6242: --pmp; 6242: if(pmp < m_stack_base) 6242: { 6242: extend_stack(); 6242: pmp = static_cast*>(m_backup_state); 6242: --pmp; 6242: } 6242: (void) new (pmp)saved_single_repeat(c, r, last_position, state_id); 6242: m_backup_state = pmp; 6242: } 6242: 6242: template 6242: inline void perl_matcher::push_recursion(int idx, const re_syntax_base* p, results_type* presults) 6242: { 6242: saved_recursion* pmp = static_cast*>(m_backup_state); 6242: --pmp; 6242: if(pmp < m_stack_base) 6242: { 6242: extend_stack(); 6242: pmp = static_cast*>(m_backup_state); 6242: --pmp; 6242: } 6242: (void) new (pmp)saved_recursion(idx, p, presults); 6242: m_backup_state = pmp; 6242: } 6242: 6242: template 6242: bool perl_matcher::match_toggle_case() 6242: { 6242: 6242: push_case_change(this->icase); 6242: this->icase = static_cast(pstate)->icase; 6242: pstate = pstate->next.p; 6242: return true; 6242: } 6242: 6242: template 6242: bool perl_matcher::match_startmark() 6242: { 6242: int index = static_cast(pstate)->index; 6242: icase = static_cast(pstate)->icase; 6242: switch(index) 6242: { 6242: case 0: 6242: pstate = pstate->next.p; 6242: break; 6242: case -1: 6242: case -2: 6242: { 6242: 6242: const re_syntax_base* next_pstate = static_cast(pstate->next.p)->alt.p->next.p; 6242: pstate = pstate->next.p->next.p; 6242: push_assertion(next_pstate, index == -1); 6242: break; 6242: } 6242: case -3: 6242: { 6242: 6242: bool old_independent = m_independent; 6242: m_independent = true; 6242: const re_syntax_base* next_pstate = static_cast(pstate->next.p)->alt.p->next.p; 6242: pstate = pstate->next.p->next.p; 6242: bool r = false; 6242: 6242: try{ 6242: 6242: r = match_all_states(); 6242: if(!r && !m_independent) 6242: { 6242: 6242: 6242: while(unwind(false)); 6242: return false; 6242: } 6242: 6242: } 6242: catch(...) 6242: { 6242: pstate = next_pstate; 6242: 6242: 6242: 6242: while(unwind(true)) {} 6242: throw; 6242: } 6242: 6242: pstate = next_pstate; 6242: m_independent = old_independent; 6242: # 475 "/usr/include/boost/regex/v4/perl_matcher_non_recursive.hpp" 3 4 6242: return r; 6242: } 6242: case -4: 6242: { 6242: 6242: const re_alt* alt = static_cast(pstate->next.p); 6242: (static_cast (alt->type == syntax_element_alt) ? void (0) : __assert_fail ("alt->type == syntax_element_alt", "/usr/include/boost/regex/v4/perl_matcher_non_recursive.hpp", 481, __extension__ __PRETTY_FUNCTION__)); 6242: pstate = alt->next.p; 6242: if(pstate->type == syntax_element_assert_backref) 6242: { 6242: if(!match_assert_backref()) 6242: pstate = alt->alt.p; 6242: break; 6242: } 6242: else 6242: { 6242: 6242: (static_cast (pstate->type == syntax_element_startmark) ? void (0) : __assert_fail ("pstate->type == syntax_element_startmark", "/usr/include/boost/regex/v4/perl_matcher_non_recursive.hpp", 492, __extension__ __PRETTY_FUNCTION__)); 6242: bool negated = static_cast(pstate)->index == -2; 6242: BidiIterator saved_position = position; 6242: const re_syntax_base* next_pstate = static_cast(pstate->next.p)->alt.p->next.p; 6242: pstate = pstate->next.p->next.p; 6242: 6242: try{ 6242: 6242: bool r = match_all_states(); 6242: position = saved_position; 6242: if(negated) 6242: r = !r; 6242: if(r) 6242: pstate = next_pstate; 6242: else 6242: pstate = alt->alt.p; 6242: 6242: } 6242: catch(...) 6242: { 6242: pstate = next_pstate; 6242: 6242: 6242: 6242: while(unwind(true)){} 6242: throw; 6242: } 6242: 6242: break; 6242: } 6242: } 6242: case -5: 6242: { 6242: push_matched_paren(0, (*m_presult)[0]); 6242: m_presult->set_first(position, 0, true); 6242: pstate = pstate->next.p; 6242: break; 6242: } 6242: default: 6242: { 6242: (static_cast (index > 0) ? void (0) : __assert_fail ("index > 0", "/usr/include/boost/regex/v4/perl_matcher_non_recursive.hpp", 532, __extension__ __PRETTY_FUNCTION__)); 6242: if((m_match_flags & match_nosubs) == 0) 6242: { 6242: push_matched_paren(index, (*m_presult)[index]); 6242: m_presult->set_first(position, index); 6242: } 6242: pstate = pstate->next.p; 6242: break; 6242: } 6242: } 6242: return true; 6242: } 6242: 6242: template 6242: bool perl_matcher::match_alt() 6242: { 6242: bool take_first, take_second; 6242: const re_alt* jmp = static_cast(pstate); 6242: 6242: 6242: if(position == last) 6242: { 6242: take_first = jmp->can_be_null & mask_take; 6242: take_second = jmp->can_be_null & mask_skip; 6242: } 6242: else 6242: { 6242: take_first = can_start(*position, jmp->_map, (unsigned char)mask_take); 6242: take_second = can_start(*position, jmp->_map, (unsigned char)mask_skip); 6242: } 6242: 6242: if(take_first) 6242: { 6242: 6242: 6242: if(take_second) 6242: { 6242: push_alt(jmp->alt.p); 6242: } 6242: pstate = pstate->next.p; 6242: return true; 6242: } 6242: if(take_second) 6242: { 6242: pstate = jmp->alt.p; 6242: return true; 6242: } 6242: return false; 6242: } 6242: 6242: template 6242: bool perl_matcher::match_rep() 6242: { 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: const re_repeat* rep = static_cast(pstate); 6242: 6242: 6242: bool take_first, take_second; 6242: if(position == last) 6242: { 6242: take_first = rep->can_be_null & mask_take; 6242: take_second = rep->can_be_null & mask_skip; 6242: } 6242: else 6242: { 6242: take_first = can_start(*position, rep->_map, (unsigned char)mask_take); 6242: take_second = can_start(*position, rep->_map, (unsigned char)mask_skip); 6242: } 6242: 6242: if((m_backup_state->state_id != saved_state_repeater_count) 6242: || (static_cast*>(m_backup_state)->count.get_id() != rep->state_id) 6242: || (next_count->get_id() != rep->state_id)) 6242: { 6242: 6242: 6242: push_repeater_count(rep->state_id, &next_count); 6242: } 6242: 6242: 6242: 6242: 6242: 6242: next_count->check_null_repeat(position, rep->max); 6242: 6242: if(next_count->get_count() < rep->min) 6242: { 6242: 6242: if(take_first) 6242: { 6242: 6242: ++(*next_count); 6242: pstate = rep->next.p; 6242: return true; 6242: } 6242: return false; 6242: } 6242: 6242: bool greedy = (rep->greedy) && (!(m_match_flags & regex_constants::match_any) || m_independent); 6242: if(greedy) 6242: { 6242: 6242: if((next_count->get_count() < rep->max) && take_first) 6242: { 6242: if(take_second) 6242: { 6242: 6242: push_alt(rep->alt.p); 6242: } 6242: 6242: ++(*next_count); 6242: pstate = rep->next.p; 6242: return true; 6242: } 6242: else if(take_second) 6242: { 6242: pstate = rep->alt.p; 6242: return true; 6242: } 6242: return false; 6242: } 6242: else 6242: { 6242: 6242: if(take_second) 6242: { 6242: if((next_count->get_count() < rep->max) && take_first) 6242: { 6242: 6242: push_non_greedy_repeat(rep->next.p); 6242: } 6242: pstate = rep->alt.p; 6242: return true; 6242: } 6242: if((next_count->get_count() < rep->max) && take_first) 6242: { 6242: 6242: ++(*next_count); 6242: pstate = rep->next.p; 6242: return true; 6242: } 6242: } 6242: return false; 6242: 6242: 6242: 6242: 6242: 6242: 6242: } 6242: 6242: template 6242: bool perl_matcher::match_dot_repeat_slow() 6242: { 6242: unsigned count = 0; 6242: const re_repeat* rep = static_cast(pstate); 6242: re_syntax_base* psingle = rep->next.p; 6242: 6242: while(count < rep->min) 6242: { 6242: pstate = psingle; 6242: if(!match_wild()) 6242: return false; 6242: ++count; 6242: } 6242: bool greedy = (rep->greedy) && (!(m_match_flags & regex_constants::match_any) || m_independent); 6242: if(greedy) 6242: { 6242: 6242: while(count < rep->max) 6242: { 6242: pstate = psingle; 6242: if(!match_wild()) 6242: break; 6242: ++count; 6242: } 6242: 6242: if((rep->leading) && (count < rep->max)) 6242: restart = position; 6242: 6242: if(count - rep->min) 6242: push_single_repeat(count, rep, position, saved_state_greedy_single_repeat); 6242: 6242: pstate = rep->alt.p; 6242: return true; 6242: } 6242: else 6242: { 6242: 6242: if(count < rep->max) 6242: push_single_repeat(count, rep, position, saved_state_rep_slow_dot); 6242: pstate = rep->alt.p; 6242: return (position == last) ? (rep->can_be_null & mask_skip) : can_start(*position, rep->_map, mask_skip); 6242: } 6242: } 6242: 6242: template 6242: bool perl_matcher::match_dot_repeat_fast() 6242: { 6242: if(m_match_flags & match_not_dot_null) 6242: return match_dot_repeat_slow(); 6242: if((static_cast(pstate->next.p)->mask & match_any_mask) == 0) 6242: return match_dot_repeat_slow(); 6242: 6242: const re_repeat* rep = static_cast(pstate); 6242: bool greedy = (rep->greedy) && (!(m_match_flags & regex_constants::match_any) || m_independent); 6242: unsigned count = static_cast((std::min)(static_cast(::boost::re_detail_106501::distance(position, last)), static_cast(greedy ? rep->max : rep->min))); 6242: if(rep->min > count) 6242: { 6242: position = last; 6242: return false; 6242: } 6242: std::advance(position, count); 6242: 6242: if(greedy) 6242: { 6242: if((rep->leading) && (count < rep->max)) 6242: restart = position; 6242: 6242: if(count - rep->min) 6242: push_single_repeat(count, rep, position, saved_state_greedy_single_repeat); 6242: 6242: pstate = rep->alt.p; 6242: return true; 6242: } 6242: else 6242: { 6242: 6242: if(count < rep->max) 6242: push_single_repeat(count, rep, position, saved_state_rep_fast_dot); 6242: pstate = rep->alt.p; 6242: return (position == last) ? (rep->can_be_null & mask_skip) : can_start(*position, rep->_map, mask_skip); 6242: } 6242: } 6242: 6242: template 6242: bool perl_matcher::match_char_repeat() 6242: { 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: const re_repeat* rep = static_cast(pstate); 6242: (static_cast (1 == static_cast(rep->next.p)->length) ? void (0) : __assert_fail ("1 == static_cast(rep->next.p)->length", "/usr/include/boost/regex/v4/perl_matcher_non_recursive.hpp", 783, __extension__ __PRETTY_FUNCTION__)); 6242: const char_type what = *reinterpret_cast(static_cast(rep->next.p) + 1); 6242: std::size_t count = 0; 6242: 6242: 6242: 6242: bool greedy = (rep->greedy) && (!(m_match_flags & regex_constants::match_any) || m_independent); 6242: std::size_t desired = greedy ? rep->max : rep->min; 6242: if(::boost::is_random_access_iterator::value) 6242: { 6242: BidiIterator end = position; 6242: 6242: 6242: std::size_t len = (desired == (std::numeric_limits::max)()) ? 0u : ::boost::re_detail_106501::distance(position, last); 6242: if(desired >= len) 6242: end = last; 6242: else 6242: std::advance(end, desired); 6242: BidiIterator origin(position); 6242: while((position != end) && (traits_inst.translate(*position, icase) == what)) 6242: { 6242: ++position; 6242: } 6242: count = (unsigned)::boost::re_detail_106501::distance(origin, position); 6242: } 6242: else 6242: { 6242: while((count < desired) && (position != last) && (traits_inst.translate(*position, icase) == what)) 6242: { 6242: ++position; 6242: ++count; 6242: } 6242: } 6242: 6242: if(count < rep->min) 6242: return false; 6242: 6242: if(greedy) 6242: { 6242: if((rep->leading) && (count < rep->max)) 6242: restart = position; 6242: 6242: if(count - rep->min) 6242: push_single_repeat(count, rep, position, saved_state_greedy_single_repeat); 6242: 6242: pstate = rep->alt.p; 6242: return true; 6242: } 6242: else 6242: { 6242: 6242: if(count < rep->max) 6242: push_single_repeat(count, rep, position, saved_state_rep_char); 6242: pstate = rep->alt.p; 6242: return (position == last) ? (rep->can_be_null & mask_skip) : can_start(*position, rep->_map, mask_skip); 6242: } 6242: 6242: 6242: 6242: 6242: 6242: 6242: } 6242: 6242: template 6242: bool perl_matcher::match_set_repeat() 6242: { 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: const re_repeat* rep = static_cast(pstate); 6242: const unsigned char* map = static_cast(rep->next.p)->_map; 6242: std::size_t count = 0; 6242: 6242: 6242: 6242: bool greedy = (rep->greedy) && (!(m_match_flags & regex_constants::match_any) || m_independent); 6242: std::size_t desired = greedy ? rep->max : rep->min; 6242: if(::boost::is_random_access_iterator::value) 6242: { 6242: BidiIterator end = position; 6242: 6242: 6242: std::size_t len = (desired == (std::numeric_limits::max)()) ? 0u : ::boost::re_detail_106501::distance(position, last); 6242: if(desired >= len) 6242: end = last; 6242: else 6242: std::advance(end, desired); 6242: BidiIterator origin(position); 6242: while((position != end) && map[static_cast(traits_inst.translate(*position, icase))]) 6242: { 6242: ++position; 6242: } 6242: count = (unsigned)::boost::re_detail_106501::distance(origin, position); 6242: } 6242: else 6242: { 6242: while((count < desired) && (position != last) && map[static_cast(traits_inst.translate(*position, icase))]) 6242: { 6242: ++position; 6242: ++count; 6242: } 6242: } 6242: 6242: if(count < rep->min) 6242: return false; 6242: 6242: if(greedy) 6242: { 6242: if((rep->leading) && (count < rep->max)) 6242: restart = position; 6242: 6242: if(count - rep->min) 6242: push_single_repeat(count, rep, position, saved_state_greedy_single_repeat); 6242: 6242: pstate = rep->alt.p; 6242: return true; 6242: } 6242: else 6242: { 6242: 6242: if(count < rep->max) 6242: push_single_repeat(count, rep, position, saved_state_rep_short_set); 6242: pstate = rep->alt.p; 6242: return (position == last) ? (rep->can_be_null & mask_skip) : can_start(*position, rep->_map, mask_skip); 6242: } 6242: 6242: 6242: 6242: 6242: 6242: 6242: } 6242: 6242: template 6242: bool perl_matcher::match_long_set_repeat() 6242: { 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: typedef typename traits::char_class_type m_type; 6242: const re_repeat* rep = static_cast(pstate); 6242: const re_set_long* set = static_cast*>(pstate->next.p); 6242: std::size_t count = 0; 6242: 6242: 6242: 6242: bool greedy = (rep->greedy) && (!(m_match_flags & regex_constants::match_any) || m_independent); 6242: std::size_t desired = greedy ? rep->max : rep->min; 6242: if(::boost::is_random_access_iterator::value) 6242: { 6242: BidiIterator end = position; 6242: 6242: 6242: std::size_t len = (desired == (std::numeric_limits::max)()) ? 0u : ::boost::re_detail_106501::distance(position, last); 6242: if(desired >= len) 6242: end = last; 6242: else 6242: std::advance(end, desired); 6242: BidiIterator origin(position); 6242: while((position != end) && (position != re_is_set_member(position, last, set, re.get_data(), icase))) 6242: { 6242: ++position; 6242: } 6242: count = (unsigned)::boost::re_detail_106501::distance(origin, position); 6242: } 6242: else 6242: { 6242: while((count < desired) && (position != last) && (position != re_is_set_member(position, last, set, re.get_data(), icase))) 6242: { 6242: ++position; 6242: ++count; 6242: } 6242: } 6242: 6242: if(count < rep->min) 6242: return false; 6242: 6242: if(greedy) 6242: { 6242: if((rep->leading) && (count < rep->max)) 6242: restart = position; 6242: 6242: if(count - rep->min) 6242: push_single_repeat(count, rep, position, saved_state_greedy_single_repeat); 6242: 6242: pstate = rep->alt.p; 6242: return true; 6242: } 6242: else 6242: { 6242: 6242: if(count < rep->max) 6242: push_single_repeat(count, rep, position, saved_state_rep_long_set); 6242: pstate = rep->alt.p; 6242: return (position == last) ? (rep->can_be_null & mask_skip) : can_start(*position, rep->_map, mask_skip); 6242: } 6242: 6242: 6242: 6242: 6242: 6242: 6242: } 6242: 6242: template 6242: bool perl_matcher::match_recursion() 6242: { 6242: (static_cast (pstate->type == syntax_element_recurse) ? void (0) : __assert_fail ("pstate->type == syntax_element_recurse", "/usr/include/boost/regex/v4/perl_matcher_non_recursive.hpp", 999, __extension__ __PRETTY_FUNCTION__)); 6242: 6242: 6242: 6242: 6242: for(typename std::vector >::reverse_iterator i = recursion_stack.rbegin(); i != recursion_stack.rend(); ++i) 6242: { 6242: if(i->idx == static_cast(static_cast(pstate)->alt.p)->index) 6242: { 6242: if(i->location_of_start == position) 6242: return false; 6242: break; 6242: } 6242: } 6242: 6242: 6242: 6242: push_recursion_pop(); 6242: 6242: 6242: 6242: if(recursion_stack.capacity() == 0) 6242: { 6242: recursion_stack.reserve(50); 6242: } 6242: recursion_stack.push_back(recursion_info()); 6242: recursion_stack.back().preturn_address = pstate->next.p; 6242: recursion_stack.back().results = *m_presult; 6242: pstate = static_cast(pstate)->alt.p; 6242: recursion_stack.back().idx = static_cast(pstate)->index; 6242: recursion_stack.back().location_of_start = position; 6242: 6242: { 6242: push_repeater_count(-(2 + static_cast(pstate)->index), &next_count); 6242: } 6242: 6242: return true; 6242: } 6242: 6242: template 6242: bool perl_matcher::match_endmark() 6242: { 6242: int index = static_cast(pstate)->index; 6242: icase = static_cast(pstate)->icase; 6242: if(index > 0) 6242: { 6242: if((m_match_flags & match_nosubs) == 0) 6242: { 6242: m_presult->set_second(position, index); 6242: } 6242: if(!recursion_stack.empty()) 6242: { 6242: if(index == recursion_stack.back().idx) 6242: { 6242: pstate = recursion_stack.back().preturn_address; 6242: *m_presult = recursion_stack.back().results; 6242: push_recursion(recursion_stack.back().idx, recursion_stack.back().preturn_address, &recursion_stack.back().results); 6242: recursion_stack.pop_back(); 6242: push_repeater_count(-(2 + index), &next_count); 6242: } 6242: } 6242: } 6242: else if((index < 0) && (index != -4)) 6242: { 6242: 6242: pstate = 0; 6242: return true; 6242: } 6242: pstate = pstate->next.p; 6242: return true; 6242: } 6242: 6242: template 6242: bool perl_matcher::match_match() 6242: { 6242: if(!recursion_stack.empty()) 6242: { 6242: (static_cast (0 == recursion_stack.back().idx) ? void (0) : __assert_fail ("0 == recursion_stack.back().idx", "/usr/include/boost/regex/v4/perl_matcher_non_recursive.hpp", 1076, __extension__ __PRETTY_FUNCTION__)); 6242: pstate = recursion_stack.back().preturn_address; 6242: *m_presult = recursion_stack.back().results; 6242: push_recursion(recursion_stack.back().idx, recursion_stack.back().preturn_address, &recursion_stack.back().results); 6242: recursion_stack.pop_back(); 6242: return true; 6242: } 6242: if((m_match_flags & match_not_null) && (position == (*m_presult)[0].first)) 6242: return false; 6242: if((m_match_flags & match_all) && (position != last)) 6242: return false; 6242: if((m_match_flags & regex_constants::match_not_initial_null) && (position == search_base)) 6242: return false; 6242: m_presult->set_second(position); 6242: pstate = 0; 6242: m_has_found_match = true; 6242: if((m_match_flags & match_posix) == match_posix) 6242: { 6242: m_result.maybe_assign(*m_presult); 6242: if((m_match_flags & match_any) == 0) 6242: return false; 6242: } 6242: # 1106 "/usr/include/boost/regex/v4/perl_matcher_non_recursive.hpp" 3 4 6242: return true; 6242: } 6242: 6242: template 6242: bool perl_matcher::match_commit() 6242: { 6242: 6242: 6242: 6242: 6242: 6242: switch(static_cast(pstate)->action) 6242: { 6242: case commit_commit: 6242: restart = last; 6242: break; 6242: case commit_skip: 6242: if(base != position) 6242: { 6242: restart = position; 6242: 6242: --restart; 6242: } 6242: break; 6242: case commit_prune: 6242: break; 6242: } 6242: 6242: saved_state* pmp = m_backup_state; 6242: --pmp; 6242: if(pmp < m_stack_base) 6242: { 6242: extend_stack(); 6242: pmp = m_backup_state; 6242: --pmp; 6242: } 6242: (void) new (pmp)saved_state(16); 6242: m_backup_state = pmp; 6242: pstate = pstate->next.p; 6242: return true; 6242: } 6242: 6242: template 6242: bool perl_matcher::match_then() 6242: { 6242: 6242: saved_state* pmp = m_backup_state; 6242: --pmp; 6242: if(pmp < m_stack_base) 6242: { 6242: extend_stack(); 6242: pmp = m_backup_state; 6242: --pmp; 6242: } 6242: (void) new (pmp)saved_state(17); 6242: m_backup_state = pmp; 6242: pstate = pstate->next.p; 6242: return true; 6242: } 6242: 6242: template 6242: bool perl_matcher::skip_until_paren(int index, bool have_match) 6242: { 6242: while(pstate) 6242: { 6242: if(pstate->type == syntax_element_endmark) 6242: { 6242: if(static_cast(pstate)->index == index) 6242: { 6242: if(have_match) 6242: return this->match_endmark(); 6242: pstate = pstate->next.p; 6242: return true; 6242: } 6242: else 6242: { 6242: 6242: 6242: match_endmark(); 6242: if(!pstate) 6242: { 6242: unwind(true); 6242: } 6242: } 6242: continue; 6242: } 6242: else if(pstate->type == syntax_element_match) 6242: return true; 6242: else if(pstate->type == syntax_element_startmark) 6242: { 6242: int idx = static_cast(pstate)->index; 6242: pstate = pstate->next.p; 6242: skip_until_paren(idx, false); 6242: continue; 6242: } 6242: pstate = pstate->next.p; 6242: } 6242: return true; 6242: } 6242: # 1213 "/usr/include/boost/regex/v4/perl_matcher_non_recursive.hpp" 3 4 6242: template 6242: bool perl_matcher::unwind(bool have_match) 6242: { 6242: static unwind_proc_type const s_unwind_table[19] = 6242: { 6242: &perl_matcher::unwind_end, 6242: &perl_matcher::unwind_paren, 6242: &perl_matcher::unwind_recursion_stopper, 6242: &perl_matcher::unwind_assertion, 6242: &perl_matcher::unwind_alt, 6242: &perl_matcher::unwind_repeater_counter, 6242: &perl_matcher::unwind_extra_block, 6242: &perl_matcher::unwind_greedy_single_repeat, 6242: &perl_matcher::unwind_slow_dot_repeat, 6242: &perl_matcher::unwind_fast_dot_repeat, 6242: &perl_matcher::unwind_char_repeat, 6242: &perl_matcher::unwind_short_set_repeat, 6242: &perl_matcher::unwind_long_set_repeat, 6242: &perl_matcher::unwind_non_greedy_repeat, 6242: &perl_matcher::unwind_recursion, 6242: &perl_matcher::unwind_recursion_pop, 6242: &perl_matcher::unwind_commit, 6242: &perl_matcher::unwind_then, 6242: &perl_matcher::unwind_case, 6242: }; 6242: 6242: m_recursive_result = have_match; 6242: m_unwound_lookahead = false; 6242: m_unwound_alt = false; 6242: unwind_proc_type unwinder; 6242: bool cont; 6242: 6242: 6242: 6242: do 6242: { 6242: unwinder = s_unwind_table[m_backup_state->state_id]; 6242: cont = (this->*unwinder)(m_recursive_result); 6242: }while(cont); 6242: 6242: 6242: 6242: return pstate ? true : false; 6242: } 6242: 6242: template 6242: bool perl_matcher::unwind_end(bool) 6242: { 6242: pstate = 0; 6242: return false; 6242: } 6242: 6242: template 6242: bool perl_matcher::unwind_case(bool) 6242: { 6242: saved_change_case* pmp = static_cast(m_backup_state); 6242: icase = pmp->icase; 6242: boost::re_detail_106501::inplace_destroy(pmp++); 6242: m_backup_state = pmp; 6242: return true; 6242: } 6242: 6242: template 6242: bool perl_matcher::unwind_paren(bool have_match) 6242: { 6242: saved_matched_paren* pmp = static_cast*>(m_backup_state); 6242: 6242: if(have_match == false) 6242: { 6242: m_presult->set_first(pmp->sub.first, pmp->index, pmp->index == 0); 6242: m_presult->set_second(pmp->sub.second, pmp->index, pmp->sub.matched, pmp->index == 0); 6242: } 6242: # 1293 "/usr/include/boost/regex/v4/perl_matcher_non_recursive.hpp" 3 4 6242: m_backup_state = pmp+1; 6242: boost::re_detail_106501::inplace_destroy(pmp); 6242: return true; 6242: } 6242: 6242: template 6242: bool perl_matcher::unwind_recursion_stopper(bool) 6242: { 6242: boost::re_detail_106501::inplace_destroy(m_backup_state++); 6242: pstate = 0; 6242: return false; 6242: } 6242: 6242: template 6242: bool perl_matcher::unwind_assertion(bool r) 6242: { 6242: saved_assertion* pmp = static_cast*>(m_backup_state); 6242: pstate = pmp->pstate; 6242: position = pmp->position; 6242: bool result = (r == pmp->positive); 6242: m_recursive_result = pmp->positive ? r : !r; 6242: boost::re_detail_106501::inplace_destroy(pmp++); 6242: m_backup_state = pmp; 6242: m_unwound_lookahead = true; 6242: return !result; 6242: } 6242: 6242: template 6242: bool perl_matcher::unwind_alt(bool r) 6242: { 6242: saved_position* pmp = static_cast*>(m_backup_state); 6242: if(!r) 6242: { 6242: pstate = pmp->pstate; 6242: position = pmp->position; 6242: } 6242: boost::re_detail_106501::inplace_destroy(pmp++); 6242: m_backup_state = pmp; 6242: m_unwound_alt = !r; 6242: return r; 6242: } 6242: 6242: template 6242: bool perl_matcher::unwind_repeater_counter(bool) 6242: { 6242: saved_repeater* pmp = static_cast*>(m_backup_state); 6242: boost::re_detail_106501::inplace_destroy(pmp++); 6242: m_backup_state = pmp; 6242: return true; 6242: } 6242: 6242: template 6242: bool perl_matcher::unwind_extra_block(bool) 6242: { 6242: saved_extra_block* pmp = static_cast(m_backup_state); 6242: void* condemmed = m_stack_base; 6242: m_stack_base = pmp->base; 6242: m_backup_state = pmp->end; 6242: boost::re_detail_106501::inplace_destroy(pmp); 6242: put_mem_block(condemmed); 6242: return true; 6242: } 6242: 6242: template 6242: inline void perl_matcher::destroy_single_repeat() 6242: { 6242: saved_single_repeat* p = static_cast*>(m_backup_state); 6242: boost::re_detail_106501::inplace_destroy(p++); 6242: m_backup_state = p; 6242: } 6242: 6242: template 6242: bool perl_matcher::unwind_greedy_single_repeat(bool r) 6242: { 6242: saved_single_repeat* pmp = static_cast*>(m_backup_state); 6242: 6242: 6242: if(r) 6242: { 6242: destroy_single_repeat(); 6242: return true; 6242: } 6242: 6242: const re_repeat* rep = pmp->rep; 6242: std::size_t count = pmp->count; 6242: (static_cast (rep->next.p != 0) ? void (0) : __assert_fail ("rep->next.p != 0", "/usr/include/boost/regex/v4/perl_matcher_non_recursive.hpp", 1378, __extension__ __PRETTY_FUNCTION__)); 6242: (static_cast (rep->alt.p != 0) ? void (0) : __assert_fail ("rep->alt.p != 0", "/usr/include/boost/regex/v4/perl_matcher_non_recursive.hpp", 1379, __extension__ __PRETTY_FUNCTION__)); 6242: 6242: count -= rep->min; 6242: 6242: if((m_match_flags & match_partial) && (position == last)) 6242: m_has_partial_match = true; 6242: 6242: (static_cast (count) ? void (0) : __assert_fail ("count", "/usr/include/boost/regex/v4/perl_matcher_non_recursive.hpp", 1386, __extension__ __PRETTY_FUNCTION__)); 6242: position = pmp->last_position; 6242: 6242: 6242: do 6242: { 6242: --position; 6242: --count; 6242: ++state_count; 6242: }while(count && !can_start(*position, rep->_map, mask_skip)); 6242: 6242: 6242: if(count == 0) 6242: { 6242: destroy_single_repeat(); 6242: if(!can_start(*position, rep->_map, mask_skip)) 6242: return true; 6242: } 6242: else 6242: { 6242: pmp->count = count + rep->min; 6242: pmp->last_position = position; 6242: } 6242: pstate = rep->alt.p; 6242: return false; 6242: } 6242: 6242: template 6242: bool perl_matcher::unwind_slow_dot_repeat(bool r) 6242: { 6242: saved_single_repeat* pmp = static_cast*>(m_backup_state); 6242: 6242: 6242: if(r) 6242: { 6242: destroy_single_repeat(); 6242: return true; 6242: } 6242: 6242: const re_repeat* rep = pmp->rep; 6242: std::size_t count = pmp->count; 6242: (static_cast (rep->type == syntax_element_dot_rep) ? void (0) : __assert_fail ("rep->type == syntax_element_dot_rep", "/usr/include/boost/regex/v4/perl_matcher_non_recursive.hpp", 1427, __extension__ __PRETTY_FUNCTION__)); 6242: (static_cast (rep->next.p != 0) ? void (0) : __assert_fail ("rep->next.p != 0", "/usr/include/boost/regex/v4/perl_matcher_non_recursive.hpp", 1428, __extension__ __PRETTY_FUNCTION__)); 6242: (static_cast (rep->alt.p != 0) ? void (0) : __assert_fail ("rep->alt.p != 0", "/usr/include/boost/regex/v4/perl_matcher_non_recursive.hpp", 1429, __extension__ __PRETTY_FUNCTION__)); 6242: (static_cast (rep->next.p->type == syntax_element_wild) ? void (0) : __assert_fail ("rep->next.p->type == syntax_element_wild", "/usr/include/boost/regex/v4/perl_matcher_non_recursive.hpp", 1430, __extension__ __PRETTY_FUNCTION__)); 6242: 6242: (static_cast (count < rep->max) ? void (0) : __assert_fail ("count < rep->max", "/usr/include/boost/regex/v4/perl_matcher_non_recursive.hpp", 1432, __extension__ __PRETTY_FUNCTION__)); 6242: pstate = rep->next.p; 6242: position = pmp->last_position; 6242: 6242: if(position != last) 6242: { 6242: 6242: do 6242: { 6242: if(!match_wild()) 6242: { 6242: 6242: destroy_single_repeat(); 6242: return true; 6242: } 6242: ++count; 6242: ++state_count; 6242: pstate = rep->next.p; 6242: }while((count < rep->max) && (position != last) && !can_start(*position, rep->_map, mask_skip)); 6242: } 6242: if(position == last) 6242: { 6242: 6242: destroy_single_repeat(); 6242: if((m_match_flags & match_partial) && (position == last) && (position != search_base)) 6242: m_has_partial_match = true; 6242: if(0 == (rep->can_be_null & mask_skip)) 6242: return true; 6242: } 6242: else if(count == rep->max) 6242: { 6242: 6242: destroy_single_repeat(); 6242: if(!can_start(*position, rep->_map, mask_skip)) 6242: return true; 6242: } 6242: else 6242: { 6242: pmp->count = count; 6242: pmp->last_position = position; 6242: } 6242: pstate = rep->alt.p; 6242: return false; 6242: } 6242: 6242: template 6242: bool perl_matcher::unwind_fast_dot_repeat(bool r) 6242: { 6242: saved_single_repeat* pmp = static_cast*>(m_backup_state); 6242: 6242: 6242: if(r) 6242: { 6242: destroy_single_repeat(); 6242: return true; 6242: } 6242: 6242: const re_repeat* rep = pmp->rep; 6242: std::size_t count = pmp->count; 6242: 6242: (static_cast (count < rep->max) ? void (0) : __assert_fail ("count < rep->max", "/usr/include/boost/regex/v4/perl_matcher_non_recursive.hpp", 1492, __extension__ __PRETTY_FUNCTION__)); 6242: position = pmp->last_position; 6242: if(position != last) 6242: { 6242: 6242: 6242: do 6242: { 6242: ++position; 6242: ++count; 6242: ++state_count; 6242: }while((count < rep->max) && (position != last) && !can_start(*position, rep->_map, mask_skip)); 6242: } 6242: 6242: 6242: if((rep->leading) && (count < rep->max)) 6242: restart = position; 6242: if(position == last) 6242: { 6242: 6242: destroy_single_repeat(); 6242: if((m_match_flags & match_partial) && (position == last) && (position != search_base)) 6242: m_has_partial_match = true; 6242: if(0 == (rep->can_be_null & mask_skip)) 6242: return true; 6242: } 6242: else if(count == rep->max) 6242: { 6242: 6242: destroy_single_repeat(); 6242: if(!can_start(*position, rep->_map, mask_skip)) 6242: return true; 6242: } 6242: else 6242: { 6242: pmp->count = count; 6242: pmp->last_position = position; 6242: } 6242: pstate = rep->alt.p; 6242: return false; 6242: } 6242: 6242: template 6242: bool perl_matcher::unwind_char_repeat(bool r) 6242: { 6242: saved_single_repeat* pmp = static_cast*>(m_backup_state); 6242: 6242: 6242: if(r) 6242: { 6242: destroy_single_repeat(); 6242: return true; 6242: } 6242: 6242: const re_repeat* rep = pmp->rep; 6242: std::size_t count = pmp->count; 6242: pstate = rep->next.p; 6242: const char_type what = *reinterpret_cast(static_cast(pstate) + 1); 6242: position = pmp->last_position; 6242: 6242: (static_cast (rep->type == syntax_element_char_rep) ? void (0) : __assert_fail ("rep->type == syntax_element_char_rep", "/usr/include/boost/regex/v4/perl_matcher_non_recursive.hpp", 1552, __extension__ __PRETTY_FUNCTION__)); 6242: (static_cast (rep->next.p != 0) ? void (0) : __assert_fail ("rep->next.p != 0", "/usr/include/boost/regex/v4/perl_matcher_non_recursive.hpp", 1553, __extension__ __PRETTY_FUNCTION__)); 6242: (static_cast (rep->alt.p != 0) ? void (0) : __assert_fail ("rep->alt.p != 0", "/usr/include/boost/regex/v4/perl_matcher_non_recursive.hpp", 1554, __extension__ __PRETTY_FUNCTION__)); 6242: (static_cast (rep->next.p->type == syntax_element_literal) ? void (0) : __assert_fail ("rep->next.p->type == syntax_element_literal", "/usr/include/boost/regex/v4/perl_matcher_non_recursive.hpp", 1555, __extension__ __PRETTY_FUNCTION__)); 6242: (static_cast (count < rep->max) ? void (0) : __assert_fail ("count < rep->max", "/usr/include/boost/regex/v4/perl_matcher_non_recursive.hpp", 1556, __extension__ __PRETTY_FUNCTION__)); 6242: 6242: if(position != last) 6242: { 6242: 6242: do 6242: { 6242: if(traits_inst.translate(*position, icase) != what) 6242: { 6242: 6242: destroy_single_repeat(); 6242: return true; 6242: } 6242: ++count; 6242: ++ position; 6242: ++state_count; 6242: pstate = rep->next.p; 6242: }while((count < rep->max) && (position != last) && !can_start(*position, rep->_map, mask_skip)); 6242: } 6242: 6242: if((rep->leading) && (count < rep->max)) 6242: restart = position; 6242: if(position == last) 6242: { 6242: 6242: destroy_single_repeat(); 6242: if((m_match_flags & match_partial) && (position == last) && (position != search_base)) 6242: m_has_partial_match = true; 6242: if(0 == (rep->can_be_null & mask_skip)) 6242: return true; 6242: } 6242: else if(count == rep->max) 6242: { 6242: 6242: destroy_single_repeat(); 6242: if(!can_start(*position, rep->_map, mask_skip)) 6242: return true; 6242: } 6242: else 6242: { 6242: pmp->count = count; 6242: pmp->last_position = position; 6242: } 6242: pstate = rep->alt.p; 6242: return false; 6242: } 6242: 6242: template 6242: bool perl_matcher::unwind_short_set_repeat(bool r) 6242: { 6242: saved_single_repeat* pmp = static_cast*>(m_backup_state); 6242: 6242: 6242: if(r) 6242: { 6242: destroy_single_repeat(); 6242: return true; 6242: } 6242: 6242: const re_repeat* rep = pmp->rep; 6242: std::size_t count = pmp->count; 6242: pstate = rep->next.p; 6242: const unsigned char* map = static_cast(rep->next.p)->_map; 6242: position = pmp->last_position; 6242: 6242: (static_cast (rep->type == syntax_element_short_set_rep) ? void (0) : __assert_fail ("rep->type == syntax_element_short_set_rep", "/usr/include/boost/regex/v4/perl_matcher_non_recursive.hpp", 1621, __extension__ __PRETTY_FUNCTION__)); 6242: (static_cast (rep->next.p != 0) ? void (0) : __assert_fail ("rep->next.p != 0", "/usr/include/boost/regex/v4/perl_matcher_non_recursive.hpp", 1622, __extension__ __PRETTY_FUNCTION__)); 6242: (static_cast (rep->alt.p != 0) ? void (0) : __assert_fail ("rep->alt.p != 0", "/usr/include/boost/regex/v4/perl_matcher_non_recursive.hpp", 1623, __extension__ __PRETTY_FUNCTION__)); 6242: (static_cast (rep->next.p->type == syntax_element_set) ? void (0) : __assert_fail ("rep->next.p->type == syntax_element_set", "/usr/include/boost/regex/v4/perl_matcher_non_recursive.hpp", 1624, __extension__ __PRETTY_FUNCTION__)); 6242: (static_cast (count < rep->max) ? void (0) : __assert_fail ("count < rep->max", "/usr/include/boost/regex/v4/perl_matcher_non_recursive.hpp", 1625, __extension__ __PRETTY_FUNCTION__)); 6242: 6242: if(position != last) 6242: { 6242: 6242: do 6242: { 6242: if(!map[static_cast(traits_inst.translate(*position, icase))]) 6242: { 6242: 6242: destroy_single_repeat(); 6242: return true; 6242: } 6242: ++count; 6242: ++ position; 6242: ++state_count; 6242: pstate = rep->next.p; 6242: }while((count < rep->max) && (position != last) && !can_start(*position, rep->_map, mask_skip)); 6242: } 6242: 6242: if((rep->leading) && (count < rep->max)) 6242: restart = position; 6242: if(position == last) 6242: { 6242: 6242: destroy_single_repeat(); 6242: if((m_match_flags & match_partial) && (position == last) && (position != search_base)) 6242: m_has_partial_match = true; 6242: if(0 == (rep->can_be_null & mask_skip)) 6242: return true; 6242: } 6242: else if(count == rep->max) 6242: { 6242: 6242: destroy_single_repeat(); 6242: if(!can_start(*position, rep->_map, mask_skip)) 6242: return true; 6242: } 6242: else 6242: { 6242: pmp->count = count; 6242: pmp->last_position = position; 6242: } 6242: pstate = rep->alt.p; 6242: return false; 6242: } 6242: 6242: template 6242: bool perl_matcher::unwind_long_set_repeat(bool r) 6242: { 6242: typedef typename traits::char_class_type m_type; 6242: saved_single_repeat* pmp = static_cast*>(m_backup_state); 6242: 6242: 6242: if(r) 6242: { 6242: destroy_single_repeat(); 6242: return true; 6242: } 6242: 6242: const re_repeat* rep = pmp->rep; 6242: std::size_t count = pmp->count; 6242: pstate = rep->next.p; 6242: const re_set_long* set = static_cast*>(pstate); 6242: position = pmp->last_position; 6242: 6242: (static_cast (rep->type == syntax_element_long_set_rep) ? void (0) : __assert_fail ("rep->type == syntax_element_long_set_rep", "/usr/include/boost/regex/v4/perl_matcher_non_recursive.hpp", 1691, __extension__ __PRETTY_FUNCTION__)); 6242: (static_cast (rep->next.p != 0) ? void (0) : __assert_fail ("rep->next.p != 0", "/usr/include/boost/regex/v4/perl_matcher_non_recursive.hpp", 1692, __extension__ __PRETTY_FUNCTION__)); 6242: (static_cast (rep->alt.p != 0) ? void (0) : __assert_fail ("rep->alt.p != 0", "/usr/include/boost/regex/v4/perl_matcher_non_recursive.hpp", 1693, __extension__ __PRETTY_FUNCTION__)); 6242: (static_cast (rep->next.p->type == syntax_element_long_set) ? void (0) : __assert_fail ("rep->next.p->type == syntax_element_long_set", "/usr/include/boost/regex/v4/perl_matcher_non_recursive.hpp", 1694, __extension__ __PRETTY_FUNCTION__)); 6242: (static_cast (count < rep->max) ? void (0) : __assert_fail ("count < rep->max", "/usr/include/boost/regex/v4/perl_matcher_non_recursive.hpp", 1695, __extension__ __PRETTY_FUNCTION__)); 6242: 6242: if(position != last) 6242: { 6242: 6242: do 6242: { 6242: if(position == re_is_set_member(position, last, set, re.get_data(), icase)) 6242: { 6242: 6242: destroy_single_repeat(); 6242: return true; 6242: } 6242: ++position; 6242: ++count; 6242: ++state_count; 6242: pstate = rep->next.p; 6242: }while((count < rep->max) && (position != last) && !can_start(*position, rep->_map, mask_skip)); 6242: } 6242: 6242: if((rep->leading) && (count < rep->max)) 6242: restart = position; 6242: if(position == last) 6242: { 6242: 6242: destroy_single_repeat(); 6242: if((m_match_flags & match_partial) && (position == last) && (position != search_base)) 6242: m_has_partial_match = true; 6242: if(0 == (rep->can_be_null & mask_skip)) 6242: return true; 6242: } 6242: else if(count == rep->max) 6242: { 6242: 6242: destroy_single_repeat(); 6242: if(!can_start(*position, rep->_map, mask_skip)) 6242: return true; 6242: } 6242: else 6242: { 6242: pmp->count = count; 6242: pmp->last_position = position; 6242: } 6242: pstate = rep->alt.p; 6242: return false; 6242: } 6242: 6242: template 6242: bool perl_matcher::unwind_non_greedy_repeat(bool r) 6242: { 6242: saved_position* pmp = static_cast*>(m_backup_state); 6242: if(!r) 6242: { 6242: position = pmp->position; 6242: pstate = pmp->pstate; 6242: ++(*next_count); 6242: } 6242: boost::re_detail_106501::inplace_destroy(pmp++); 6242: m_backup_state = pmp; 6242: return r; 6242: } 6242: 6242: template 6242: bool perl_matcher::unwind_recursion(bool r) 6242: { 6242: saved_recursion* pmp = static_cast*>(m_backup_state); 6242: if(!r) 6242: { 6242: recursion_stack.push_back(recursion_info()); 6242: recursion_stack.back().idx = pmp->recursion_id; 6242: recursion_stack.back().preturn_address = pmp->preturn_address; 6242: recursion_stack.back().results = pmp->results; 6242: recursion_stack.back().location_of_start = position; 6242: } 6242: boost::re_detail_106501::inplace_destroy(pmp++); 6242: m_backup_state = pmp; 6242: return true; 6242: } 6242: 6242: template 6242: bool perl_matcher::unwind_recursion_pop(bool r) 6242: { 6242: saved_state* pmp = static_cast(m_backup_state); 6242: if(!r) 6242: { 6242: recursion_stack.pop_back(); 6242: } 6242: boost::re_detail_106501::inplace_destroy(pmp++); 6242: m_backup_state = pmp; 6242: return true; 6242: } 6242: 6242: template 6242: void perl_matcher::push_recursion_pop() 6242: { 6242: saved_state* pmp = static_cast(m_backup_state); 6242: --pmp; 6242: if(pmp < m_stack_base) 6242: { 6242: extend_stack(); 6242: pmp = static_cast(m_backup_state); 6242: --pmp; 6242: } 6242: (void) new (pmp)saved_state(15); 6242: m_backup_state = pmp; 6242: } 6242: 6242: template 6242: bool perl_matcher::unwind_commit(bool b) 6242: { 6242: boost::re_detail_106501::inplace_destroy(m_backup_state++); 6242: while(unwind(b) && !m_unwound_lookahead){} 6242: if(m_unwound_lookahead && pstate) 6242: { 6242: 6242: 6242: 6242: 6242: saved_state* pmp = m_backup_state; 6242: --pmp; 6242: if(pmp < m_stack_base) 6242: { 6242: extend_stack(); 6242: pmp = m_backup_state; 6242: --pmp; 6242: } 6242: (void) new (pmp)saved_state(16); 6242: m_backup_state = pmp; 6242: } 6242: 6242: m_independent = false; 6242: return false; 6242: } 6242: 6242: template 6242: bool perl_matcher::unwind_then(bool b) 6242: { 6242: 6242: boost::re_detail_106501::inplace_destroy(m_backup_state++); 6242: bool result = false; 6242: while((result = unwind(b)) && !m_unwound_alt){} 6242: 6242: 6242: if(result && m_unwound_alt) 6242: unwind(b); 6242: return false; 6242: } 6242: # 1900 "/usr/include/boost/regex/v4/perl_matcher_non_recursive.hpp" 3 4 6242: } 6242: } 6242: # 611 "/usr/include/boost/regex/v4/perl_matcher.hpp" 2 3 4 6242: 6242: 6242: # 1 "/usr/include/boost/regex/v4/perl_matcher_common.hpp" 1 3 4 6242: # 42 "/usr/include/boost/regex/v4/perl_matcher_common.hpp" 3 4 6242: namespace boost{ 6242: namespace re_detail_106501{ 6242: 6242: template 6242: void perl_matcher::construct_init(const basic_regex& e, match_flag_type f) 6242: { 6242: typedef typename regex_iterator_traits::iterator_category category; 6242: typedef typename basic_regex::flag_type expression_flag_type; 6242: 6242: if(e.empty()) 6242: { 6242: 6242: std::invalid_argument ex("Invalid regular expression object"); 6242: boost::throw_exception(ex); 6242: } 6242: pstate = 0; 6242: m_match_flags = f; 6242: estimate_max_state_count(static_cast(0)); 6242: expression_flag_type re_f = re.flags(); 6242: icase = re_f & regex_constants::icase; 6242: if(!(m_match_flags & (match_perl|match_posix))) 6242: { 6242: if((re_f & (regbase::main_option_type|regbase::no_perl_ex)) == 0) 6242: m_match_flags |= match_perl; 6242: else if((re_f & (regbase::main_option_type|regbase::emacs_ex)) == (regbase::basic_syntax_group|regbase::emacs_ex)) 6242: m_match_flags |= match_perl; 6242: else if((re_f & (regbase::main_option_type|regbase::literal)) == (regbase::literal)) 6242: m_match_flags |= match_perl; 6242: else 6242: m_match_flags |= match_posix; 6242: } 6242: if(m_match_flags & match_posix) 6242: { 6242: m_temp_match.reset(new match_results()); 6242: m_presult = m_temp_match.get(); 6242: } 6242: else 6242: m_presult = &m_result; 6242: 6242: m_stack_base = 0; 6242: m_backup_state = 0; 6242: 6242: 6242: 6242: 6242: 6242: m_word_mask = re.get_data().m_word_mask; 6242: 6242: match_any_mask = static_cast((f & match_not_dot_newline) ? re_detail_106501::test_not_newline : re_detail_106501::test_newline); 6242: 6242: if(e.get_data().m_disable_match_any) 6242: m_match_flags &= regex_constants::match_not_any; 6242: } 6242: 6242: template 6242: void perl_matcher::estimate_max_state_count(std::random_access_iterator_tag*) 6242: { 6242: # 109 "/usr/include/boost/regex/v4/perl_matcher_common.hpp" 3 4 6242: static const std::ptrdiff_t k = 100000; 6242: std::ptrdiff_t dist = boost::re_detail_106501::distance(base, last); 6242: if(dist == 0) 6242: dist = 1; 6242: std::ptrdiff_t states = re.size(); 6242: if(states == 0) 6242: states = 1; 6242: states *= states; 6242: if((std::numeric_limits::max)() / dist < states) 6242: { 6242: max_state_count = (std::min)((std::ptrdiff_t)100000000, (std::numeric_limits::max)() - 2); 6242: return; 6242: } 6242: states *= dist; 6242: if((std::numeric_limits::max)() - k < states) 6242: { 6242: max_state_count = (std::min)((std::ptrdiff_t)100000000, (std::numeric_limits::max)() - 2); 6242: return; 6242: } 6242: states += k; 6242: 6242: max_state_count = states; 6242: 6242: 6242: 6242: 6242: states = dist; 6242: if((std::numeric_limits::max)() / dist < states) 6242: { 6242: max_state_count = (std::min)((std::ptrdiff_t)100000000, (std::numeric_limits::max)() - 2); 6242: return; 6242: } 6242: states *= dist; 6242: if((std::numeric_limits::max)() - k < states) 6242: { 6242: max_state_count = (std::min)((std::ptrdiff_t)100000000, (std::numeric_limits::max)() - 2); 6242: return; 6242: } 6242: states += k; 6242: 6242: 6242: 6242: 6242: if(states > 100000000) 6242: states = 100000000; 6242: 6242: 6242: 6242: 6242: if(states > max_state_count) 6242: max_state_count = states; 6242: } 6242: 6242: template 6242: inline void perl_matcher::estimate_max_state_count(void*) 6242: { 6242: 6242: max_state_count = 100000000; 6242: } 6242: # 182 "/usr/include/boost/regex/v4/perl_matcher_common.hpp" 3 4 6242: template 6242: inline bool perl_matcher::match() 6242: { 6242: 6242: 6242: 6242: return match_imp(); 6242: 6242: } 6242: 6242: template 6242: bool perl_matcher::match_imp() 6242: { 6242: 6242: 6242: save_state_init init(&m_stack_base, &m_backup_state); 6242: used_block_count = 1024; 6242: 6242: try{ 6242: 6242: 6242: 6242: 6242: position = base; 6242: search_base = base; 6242: state_count = 0; 6242: m_match_flags |= regex_constants::match_all; 6242: m_presult->set_size((m_match_flags & match_nosubs) ? 1u : static_cast(1u + re.mark_count()), search_base, last); 6242: m_presult->set_base(base); 6242: m_presult->set_named_subs(this->re.get_named_subs()); 6242: if(m_match_flags & match_posix) 6242: m_result = *m_presult; 6242: verify_options(re.flags(), m_match_flags); 6242: if(0 == match_prefix()) 6242: return false; 6242: return (m_result[0].second == last) && (m_result[0].first == base); 6242: 6242: 6242: } 6242: catch(...) 6242: { 6242: 6242: 6242: 6242: while(unwind(true)){} 6242: throw; 6242: } 6242: 6242: } 6242: 6242: template 6242: inline bool perl_matcher::find() 6242: { 6242: 6242: 6242: 6242: return find_imp(); 6242: 6242: } 6242: 6242: template 6242: bool perl_matcher::find_imp() 6242: { 6242: static matcher_proc_type const s_find_vtable[7] = 6242: { 6242: &perl_matcher::find_restart_any, 6242: &perl_matcher::find_restart_word, 6242: &perl_matcher::find_restart_line, 6242: &perl_matcher::find_restart_buf, 6242: &perl_matcher::match_prefix, 6242: &perl_matcher::find_restart_lit, 6242: &perl_matcher::find_restart_lit, 6242: }; 6242: 6242: 6242: 6242: save_state_init init(&m_stack_base, &m_backup_state); 6242: used_block_count = 1024; 6242: 6242: try{ 6242: 6242: 6242: 6242: state_count = 0; 6242: if((m_match_flags & regex_constants::match_init) == 0) 6242: { 6242: 6242: search_base = position = base; 6242: pstate = re.get_first_state(); 6242: m_presult->set_size((m_match_flags & match_nosubs) ? 1u : static_cast(1u + re.mark_count()), base, last); 6242: m_presult->set_base(base); 6242: m_presult->set_named_subs(this->re.get_named_subs()); 6242: m_match_flags |= regex_constants::match_init; 6242: } 6242: else 6242: { 6242: 6242: search_base = position = m_result[0].second; 6242: 6242: 6242: if(((m_match_flags & match_not_null) == 0) && (m_result.length() == 0)) 6242: { 6242: if(position == last) 6242: return false; 6242: else 6242: ++position; 6242: } 6242: 6242: m_presult->set_size((m_match_flags & match_nosubs) ? 1u : static_cast(1u + re.mark_count()), search_base, last); 6242: 6242: 6242: } 6242: if(m_match_flags & match_posix) 6242: { 6242: m_result.set_size(static_cast(1u + re.mark_count()), base, last); 6242: m_result.set_base(base); 6242: } 6242: 6242: verify_options(re.flags(), m_match_flags); 6242: 6242: unsigned type = (m_match_flags & match_continuous) ? 6242: static_cast(regbase::restart_continue) 6242: : static_cast(re.get_restart_type()); 6242: 6242: 6242: matcher_proc_type proc = s_find_vtable[type]; 6242: return (this->*proc)(); 6242: 6242: 6242: } 6242: catch(...) 6242: { 6242: 6242: 6242: 6242: while(unwind(true)){} 6242: throw; 6242: } 6242: 6242: } 6242: 6242: template 6242: bool perl_matcher::match_prefix() 6242: { 6242: m_has_partial_match = false; 6242: m_has_found_match = false; 6242: pstate = re.get_first_state(); 6242: m_presult->set_first(position); 6242: restart = position; 6242: match_all_states(); 6242: if(!m_has_found_match && m_has_partial_match && (m_match_flags & match_partial)) 6242: { 6242: m_has_found_match = true; 6242: m_presult->set_second(last, 0, false); 6242: position = last; 6242: if((m_match_flags & match_posix) == match_posix) 6242: { 6242: m_result.maybe_assign(*m_presult); 6242: } 6242: } 6242: # 355 "/usr/include/boost/regex/v4/perl_matcher_common.hpp" 3 4 6242: if(!m_has_found_match) 6242: position = restart; 6242: 6242: 6242: 6242: return m_has_found_match; 6242: } 6242: 6242: template 6242: bool perl_matcher::match_literal() 6242: { 6242: unsigned int len = static_cast(pstate)->length; 6242: const char_type* what = reinterpret_cast(static_cast(pstate) + 1); 6242: 6242: 6242: 6242: for(unsigned int i = 0; i < len; ++i, ++position) 6242: { 6242: if((position == last) || (traits_inst.translate(*position, icase) != what[i])) 6242: return false; 6242: } 6242: pstate = pstate->next.p; 6242: return true; 6242: } 6242: 6242: template 6242: bool perl_matcher::match_start_line() 6242: { 6242: if(position == backstop) 6242: { 6242: if((m_match_flags & match_prev_avail) == 0) 6242: { 6242: if((m_match_flags & match_not_bol) == 0) 6242: { 6242: pstate = pstate->next.p; 6242: return true; 6242: } 6242: return false; 6242: } 6242: } 6242: else if(m_match_flags & match_single_line) 6242: return false; 6242: 6242: 6242: BidiIterator t(position); 6242: --t; 6242: if(position != last) 6242: { 6242: if(is_separator(*t) && !((*t == static_cast('\r')) && (*position == static_cast('\n'))) ) 6242: { 6242: pstate = pstate->next.p; 6242: return true; 6242: } 6242: } 6242: else if(is_separator(*t)) 6242: { 6242: pstate = pstate->next.p; 6242: return true; 6242: } 6242: return false; 6242: } 6242: 6242: template 6242: bool perl_matcher::match_end_line() 6242: { 6242: if(position != last) 6242: { 6242: if(m_match_flags & match_single_line) 6242: return false; 6242: 6242: if(is_separator(*position)) 6242: { 6242: if((position != backstop) || (m_match_flags & match_prev_avail)) 6242: { 6242: 6242: BidiIterator t(position); 6242: --t; 6242: if((*t == static_cast('\r')) && (*position == static_cast('\n'))) 6242: { 6242: return false; 6242: } 6242: } 6242: pstate = pstate->next.p; 6242: return true; 6242: } 6242: } 6242: else if((m_match_flags & match_not_eol) == 0) 6242: { 6242: pstate = pstate->next.p; 6242: return true; 6242: } 6242: return false; 6242: } 6242: 6242: template 6242: bool perl_matcher::match_wild() 6242: { 6242: if(position == last) 6242: return false; 6242: if(is_separator(*position) && ((match_any_mask & static_cast(pstate)->mask) == 0)) 6242: return false; 6242: if((*position == char_type(0)) && (m_match_flags & match_not_dot_null)) 6242: return false; 6242: pstate = pstate->next.p; 6242: ++position; 6242: return true; 6242: } 6242: 6242: template 6242: bool perl_matcher::match_word_boundary() 6242: { 6242: bool b; 6242: if(position != last) 6242: { 6242: 6242: b = traits_inst.isctype(*position, m_word_mask); 6242: } 6242: else 6242: { 6242: b = (m_match_flags & match_not_eow) ? true : false; 6242: } 6242: if((position == backstop) && ((m_match_flags & match_prev_avail) == 0)) 6242: { 6242: if(m_match_flags & match_not_bow) 6242: b ^= true; 6242: else 6242: b ^= false; 6242: } 6242: else 6242: { 6242: --position; 6242: b ^= traits_inst.isctype(*position, m_word_mask); 6242: ++position; 6242: } 6242: if(b) 6242: { 6242: pstate = pstate->next.p; 6242: return true; 6242: } 6242: return false; 6242: } 6242: 6242: template 6242: bool perl_matcher::match_within_word() 6242: { 6242: if(position == last) 6242: return false; 6242: 6242: bool prev = traits_inst.isctype(*position, m_word_mask); 6242: { 6242: bool b; 6242: if((position == backstop) && ((m_match_flags & match_prev_avail) == 0)) 6242: return false; 6242: else 6242: { 6242: --position; 6242: b = traits_inst.isctype(*position, m_word_mask); 6242: ++position; 6242: } 6242: if(b == prev) 6242: { 6242: pstate = pstate->next.p; 6242: return true; 6242: } 6242: } 6242: return false; 6242: } 6242: 6242: template 6242: bool perl_matcher::match_word_start() 6242: { 6242: if(position == last) 6242: return false; 6242: if(!traits_inst.isctype(*position, m_word_mask)) 6242: return false; 6242: if((position == backstop) && ((m_match_flags & match_prev_avail) == 0)) 6242: { 6242: if(m_match_flags & match_not_bow) 6242: return false; 6242: } 6242: else 6242: { 6242: 6242: BidiIterator t(position); 6242: --t; 6242: if(traits_inst.isctype(*t, m_word_mask)) 6242: return false; 6242: } 6242: 6242: pstate = pstate->next.p; 6242: return true; 6242: } 6242: 6242: template 6242: bool perl_matcher::match_word_end() 6242: { 6242: if((position == backstop) && ((m_match_flags & match_prev_avail) == 0)) 6242: return false; 6242: BidiIterator t(position); 6242: --t; 6242: if(traits_inst.isctype(*t, m_word_mask) == false) 6242: return false; 6242: 6242: if(position == last) 6242: { 6242: if(m_match_flags & match_not_eow) 6242: return false; 6242: } 6242: else 6242: { 6242: 6242: if(traits_inst.isctype(*position, m_word_mask)) 6242: return false; 6242: } 6242: pstate = pstate->next.p; 6242: return true; 6242: } 6242: 6242: template 6242: bool perl_matcher::match_buffer_start() 6242: { 6242: if((position != backstop) || (m_match_flags & match_not_bob)) 6242: return false; 6242: 6242: pstate = pstate->next.p; 6242: return true; 6242: } 6242: 6242: template 6242: bool perl_matcher::match_buffer_end() 6242: { 6242: if((position != last) || (m_match_flags & match_not_eob)) 6242: return false; 6242: 6242: pstate = pstate->next.p; 6242: return true; 6242: } 6242: 6242: template 6242: bool perl_matcher::match_backref() 6242: { 6242: 6242: 6242: 6242: 6242: 6242: 6242: int index = static_cast(pstate)->index; 6242: if(index >= 10000) 6242: { 6242: named_subexpressions::range_type r = re.get_data().equal_range(index); 6242: (static_cast (r.first != r.second) ? void (0) : __assert_fail ("r.first != r.second", "/usr/include/boost/regex/v4/perl_matcher_common.hpp", 606, __extension__ __PRETTY_FUNCTION__)); 6242: do 6242: { 6242: index = r.first->index; 6242: ++r.first; 6242: }while((r.first != r.second) && ((*m_presult)[index].matched != true)); 6242: } 6242: 6242: if((m_match_flags & match_perl) && !(*m_presult)[index].matched) 6242: return false; 6242: 6242: BidiIterator i = (*m_presult)[index].first; 6242: BidiIterator j = (*m_presult)[index].second; 6242: while(i != j) 6242: { 6242: if((position == last) || (traits_inst.translate(*position, icase) != traits_inst.translate(*i, icase))) 6242: return false; 6242: ++i; 6242: ++position; 6242: } 6242: pstate = pstate->next.p; 6242: return true; 6242: } 6242: 6242: template 6242: bool perl_matcher::match_long_set() 6242: { 6242: typedef typename traits::char_class_type char_class_type; 6242: 6242: if(position == last) 6242: return false; 6242: BidiIterator t = re_is_set_member(position, last, static_cast*>(pstate), re.get_data(), icase); 6242: if(t != position) 6242: { 6242: pstate = pstate->next.p; 6242: position = t; 6242: return true; 6242: } 6242: return false; 6242: } 6242: 6242: template 6242: bool perl_matcher::match_set() 6242: { 6242: if(position == last) 6242: return false; 6242: if(static_cast(pstate)->_map[static_cast(traits_inst.translate(*position, icase))]) 6242: { 6242: pstate = pstate->next.p; 6242: ++position; 6242: return true; 6242: } 6242: return false; 6242: } 6242: 6242: template 6242: bool perl_matcher::match_jump() 6242: { 6242: pstate = static_cast(pstate)->alt.p; 6242: return true; 6242: } 6242: 6242: template 6242: bool perl_matcher::match_combining() 6242: { 6242: if(position == last) 6242: return false; 6242: if(is_combining(traits_inst.translate(*position, icase))) 6242: return false; 6242: ++position; 6242: while((position != last) && is_combining(traits_inst.translate(*position, icase))) 6242: ++position; 6242: pstate = pstate->next.p; 6242: return true; 6242: } 6242: 6242: template 6242: bool perl_matcher::match_soft_buffer_end() 6242: { 6242: if(m_match_flags & match_not_eob) 6242: return false; 6242: BidiIterator p(position); 6242: while((p != last) && is_separator(traits_inst.translate(*p, icase)))++p; 6242: if(p != last) 6242: return false; 6242: pstate = pstate->next.p; 6242: return true; 6242: } 6242: 6242: template 6242: bool perl_matcher::match_restart_continue() 6242: { 6242: if(position == search_base) 6242: { 6242: pstate = pstate->next.p; 6242: return true; 6242: } 6242: return false; 6242: } 6242: 6242: template 6242: bool perl_matcher::match_backstep() 6242: { 6242: 6242: 6242: 6242: 6242: if( ::boost::is_random_access_iterator::value) 6242: { 6242: std::ptrdiff_t maxlen = ::boost::re_detail_106501::distance(backstop, position); 6242: if(maxlen < static_cast(pstate)->index) 6242: return false; 6242: std::advance(position, -static_cast(pstate)->index); 6242: } 6242: else 6242: { 6242: int c = static_cast(pstate)->index; 6242: while(c--) 6242: { 6242: if(position == backstop) 6242: return false; 6242: --position; 6242: } 6242: } 6242: pstate = pstate->next.p; 6242: return true; 6242: 6242: 6242: 6242: } 6242: 6242: template 6242: inline bool perl_matcher::match_assert_backref() 6242: { 6242: 6242: int index = static_cast(pstate)->index; 6242: bool result = false; 6242: if(index == 9999) 6242: { 6242: 6242: return false; 6242: } 6242: else if(index > 0) 6242: { 6242: 6242: 6242: if(index >= 10000) 6242: { 6242: named_subexpressions::range_type r = re.get_data().equal_range(index); 6242: while(r.first != r.second) 6242: { 6242: if((*m_presult)[r.first->index].matched) 6242: { 6242: result = true; 6242: break; 6242: } 6242: ++r.first; 6242: } 6242: } 6242: else 6242: { 6242: result = (*m_presult)[index].matched; 6242: } 6242: pstate = pstate->next.p; 6242: } 6242: else 6242: { 6242: 6242: 6242: int idx = -index-1; 6242: if(idx >= 10000) 6242: { 6242: named_subexpressions::range_type r = re.get_data().equal_range(idx); 6242: int stack_index = recursion_stack.empty() ? -1 : recursion_stack.back().idx; 6242: while(r.first != r.second) 6242: { 6242: result |= (stack_index == r.first->index); 6242: if(result)break; 6242: ++r.first; 6242: } 6242: } 6242: else 6242: { 6242: result = !recursion_stack.empty() && ((recursion_stack.back().idx == idx) || (index == 0)); 6242: } 6242: pstate = pstate->next.p; 6242: } 6242: return result; 6242: } 6242: 6242: template 6242: bool perl_matcher::match_fail() 6242: { 6242: 6242: return false; 6242: } 6242: 6242: template 6242: bool perl_matcher::match_accept() 6242: { 6242: if(!recursion_stack.empty()) 6242: { 6242: return skip_until_paren(recursion_stack.back().idx); 6242: } 6242: else 6242: { 6242: return skip_until_paren(0x7fffffff); 6242: } 6242: } 6242: 6242: template 6242: bool perl_matcher::find_restart_any() 6242: { 6242: 6242: 6242: 6242: 6242: const unsigned char* _map = re.get_map(); 6242: while(true) 6242: { 6242: 6242: while((position != last) && !can_start(*position, _map, (unsigned char)mask_any) ) 6242: ++position; 6242: if(position == last) 6242: { 6242: 6242: if(re.can_be_null()) 6242: return match_prefix(); 6242: break; 6242: } 6242: 6242: if(match_prefix()) 6242: return true; 6242: if(position == last) 6242: return false; 6242: ++position; 6242: } 6242: return false; 6242: 6242: 6242: 6242: } 6242: 6242: template 6242: bool perl_matcher::find_restart_word() 6242: { 6242: 6242: 6242: 6242: 6242: 6242: const unsigned char* _map = re.get_map(); 6242: if((m_match_flags & match_prev_avail) || (position != base)) 6242: --position; 6242: else if(match_prefix()) 6242: return true; 6242: do 6242: { 6242: while((position != last) && traits_inst.isctype(*position, m_word_mask)) 6242: ++position; 6242: while((position != last) && !traits_inst.isctype(*position, m_word_mask)) 6242: ++position; 6242: if(position == last) 6242: break; 6242: 6242: if(can_start(*position, _map, (unsigned char)mask_any) ) 6242: { 6242: if(match_prefix()) 6242: return true; 6242: } 6242: if(position == last) 6242: break; 6242: } while(true); 6242: return false; 6242: 6242: 6242: 6242: } 6242: 6242: template 6242: bool perl_matcher::find_restart_line() 6242: { 6242: 6242: const unsigned char* _map = re.get_map(); 6242: if(match_prefix()) 6242: return true; 6242: while(position != last) 6242: { 6242: while((position != last) && !is_separator(*position)) 6242: ++position; 6242: if(position == last) 6242: return false; 6242: ++position; 6242: if(position == last) 6242: { 6242: if(re.can_be_null() && match_prefix()) 6242: return true; 6242: return false; 6242: } 6242: 6242: if( can_start(*position, _map, (unsigned char)mask_any) ) 6242: { 6242: if(match_prefix()) 6242: return true; 6242: } 6242: if(position == last) 6242: return false; 6242: 6242: } 6242: return false; 6242: } 6242: 6242: template 6242: bool perl_matcher::find_restart_buf() 6242: { 6242: if((position == base) && ((m_match_flags & match_not_bob) == 0)) 6242: return match_prefix(); 6242: return false; 6242: } 6242: 6242: template 6242: bool perl_matcher::find_restart_lit() 6242: { 6242: # 985 "/usr/include/boost/regex/v4/perl_matcher_common.hpp" 3 4 6242: return false; 6242: } 6242: 6242: } 6242: 6242: } 6242: # 614 "/usr/include/boost/regex/v4/perl_matcher.hpp" 2 3 4 6242: # 89 "/usr/include/boost/regex/v4/regex.hpp" 2 3 4 6242: # 97 "/usr/include/boost/regex/v4/regex.hpp" 3 4 6242: # 1 "/usr/include/boost/regex/v4/instances.hpp" 1 3 4 6242: # 25 "/usr/include/boost/regex/v4/instances.hpp" 3 4 6242: namespace boost{ 6242: # 136 "/usr/include/boost/regex/v4/instances.hpp" 3 4 6242: namespace re_detail_106501{ 6242: __extension__ extern template 6242: std::locale cpp_regex_traits_base::imbue(const std::locale& l); 6242: 6242: __extension__ extern template 6242: cpp_regex_traits_implementation::string_type 6242: cpp_regex_traits_implementation::transform_primary(const char* p1, const char* p2) const; 6242: __extension__ extern template 6242: cpp_regex_traits_implementation::string_type 6242: cpp_regex_traits_implementation::transform(const char* p1, const char* p2) const; 6242: __extension__ extern template 6242: cpp_regex_traits_implementation::string_type 6242: cpp_regex_traits_implementation::lookup_collatename(const char* p1, const char* p2) const; 6242: __extension__ extern template 6242: void cpp_regex_traits_implementation::init(); 6242: __extension__ extern template 6242: cpp_regex_traits_implementation::char_class_type 6242: cpp_regex_traits_implementation::lookup_classname_imp(const char* p1, const char* p2) const; 6242: 6242: 6242: 6242: 6242: } 6242: __extension__ extern template 6242: boost::intmax_t cpp_regex_traits::toi(const char*& first, const char* last, int radix)const; 6242: __extension__ extern template 6242: std::string cpp_regex_traits::catalog_name(const std::string& name); 6242: __extension__ extern template 6242: std::string& cpp_regex_traits::get_catalog_name_inst(); 6242: __extension__ extern template 6242: std::string cpp_regex_traits::get_catalog_name(); 6242: 6242: __extension__ extern template 6242: static_mutex& cpp_regex_traits::get_mutex_inst(); 6242: 6242: 6242: 6242: __extension__ extern template basic_regex >& 6242: basic_regex >::do_assign( 6242: const char* p1, 6242: const char* p2, 6242: flag_type f); 6242: __extension__ extern template basic_regex >::locale_type 6242: basic_regex >::imbue(locale_type l); 6242: 6242: __extension__ extern template void 6242: match_results::maybe_assign( 6242: const match_results& m); 6242: 6242: namespace re_detail_106501{ 6242: __extension__ extern template void perl_matcher::allocator_type , boost::regex_traits >::construct_init( 6242: const basic_regex >& e, match_flag_type f); 6242: __extension__ extern template bool perl_matcher::allocator_type , boost::regex_traits >::match(); 6242: __extension__ extern template bool perl_matcher::allocator_type , boost::regex_traits >::find(); 6242: } 6242: 6242: 6242: 6242: 6242: 6242: 6242: __extension__ extern template void 6242: match_results::const_iterator>::maybe_assign( 6242: const match_results::const_iterator>& m); 6242: 6242: namespace re_detail_106501{ 6242: __extension__ extern template void perl_matcher::const_iterator, match_results< std::basic_string::const_iterator >::allocator_type, boost::regex_traits >::construct_init( 6242: const basic_regex& e, match_flag_type f); 6242: __extension__ extern template bool perl_matcher::const_iterator, match_results< std::basic_string::const_iterator >::allocator_type, boost::regex_traits >::match(); 6242: __extension__ extern template bool perl_matcher::const_iterator, match_results< std::basic_string::const_iterator >::allocator_type, boost::regex_traits >::find(); 6242: } 6242: # 218 "/usr/include/boost/regex/v4/instances.hpp" 3 4 6242: } 6242: # 98 "/usr/include/boost/regex/v4/regex.hpp" 2 3 4 6242: # 108 "/usr/include/boost/regex/v4/regex.hpp" 3 4 6242: # 1 "/usr/include/boost/regex/v4/instances.hpp" 1 3 4 6242: # 25 "/usr/include/boost/regex/v4/instances.hpp" 3 4 6242: namespace boost{ 6242: # 136 "/usr/include/boost/regex/v4/instances.hpp" 3 4 6242: namespace re_detail_106501{ 6242: __extension__ extern template 6242: std::locale cpp_regex_traits_base::imbue(const std::locale& l); 6242: 6242: __extension__ extern template 6242: cpp_regex_traits_implementation::string_type 6242: cpp_regex_traits_implementation::transform_primary(const wchar_t* p1, const wchar_t* p2) const; 6242: __extension__ extern template 6242: cpp_regex_traits_implementation::string_type 6242: cpp_regex_traits_implementation::transform(const wchar_t* p1, const wchar_t* p2) const; 6242: __extension__ extern template 6242: cpp_regex_traits_implementation::string_type 6242: cpp_regex_traits_implementation::lookup_collatename(const wchar_t* p1, const wchar_t* p2) const; 6242: __extension__ extern template 6242: void cpp_regex_traits_implementation::init(); 6242: __extension__ extern template 6242: cpp_regex_traits_implementation::char_class_type 6242: cpp_regex_traits_implementation::lookup_classname_imp(const wchar_t* p1, const wchar_t* p2) const; 6242: 6242: 6242: 6242: 6242: } 6242: __extension__ extern template 6242: boost::intmax_t cpp_regex_traits::toi(const wchar_t*& first, const wchar_t* last, int radix)const; 6242: __extension__ extern template 6242: std::string cpp_regex_traits::catalog_name(const std::string& name); 6242: __extension__ extern template 6242: std::string& cpp_regex_traits::get_catalog_name_inst(); 6242: __extension__ extern template 6242: std::string cpp_regex_traits::get_catalog_name(); 6242: 6242: __extension__ extern template 6242: static_mutex& cpp_regex_traits::get_mutex_inst(); 6242: 6242: 6242: 6242: __extension__ extern template basic_regex >& 6242: basic_regex >::do_assign( 6242: const wchar_t* p1, 6242: const wchar_t* p2, 6242: flag_type f); 6242: __extension__ extern template basic_regex >::locale_type 6242: basic_regex >::imbue(locale_type l); 6242: 6242: __extension__ extern template void 6242: match_results::maybe_assign( 6242: const match_results& m); 6242: 6242: namespace re_detail_106501{ 6242: __extension__ extern template void perl_matcher::allocator_type , boost::regex_traits >::construct_init( 6242: const basic_regex >& e, match_flag_type f); 6242: __extension__ extern template bool perl_matcher::allocator_type , boost::regex_traits >::match(); 6242: __extension__ extern template bool perl_matcher::allocator_type , boost::regex_traits >::find(); 6242: } 6242: 6242: 6242: 6242: 6242: 6242: 6242: __extension__ extern template void 6242: match_results::const_iterator>::maybe_assign( 6242: const match_results::const_iterator>& m); 6242: 6242: namespace re_detail_106501{ 6242: __extension__ extern template void perl_matcher::const_iterator, match_results< std::basic_string::const_iterator >::allocator_type, boost::regex_traits >::construct_init( 6242: const basic_regex& e, match_flag_type f); 6242: __extension__ extern template bool perl_matcher::const_iterator, match_results< std::basic_string::const_iterator >::allocator_type, boost::regex_traits >::match(); 6242: __extension__ extern template bool perl_matcher::const_iterator, match_results< std::basic_string::const_iterator >::allocator_type, boost::regex_traits >::find(); 6242: } 6242: # 218 "/usr/include/boost/regex/v4/instances.hpp" 3 4 6242: } 6242: # 109 "/usr/include/boost/regex/v4/regex.hpp" 2 3 4 6242: # 128 "/usr/include/boost/regex/v4/regex.hpp" 3 4 6242: namespace boost{ 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: typedef match_results cmatch; 6242: typedef match_results smatch; 6242: 6242: typedef match_results wcmatch; 6242: typedef match_results wsmatch; 6242: 6242: 6242: } 6242: 6242: # 1 "/usr/include/boost/regex/v4/regex_match.hpp" 1 3 4 6242: # 25 "/usr/include/boost/regex/v4/regex_match.hpp" 3 4 6242: namespace boost{ 6242: # 43 "/usr/include/boost/regex/v4/regex_match.hpp" 3 4 6242: template 6242: bool regex_match(BidiIterator first, BidiIterator last, 6242: match_results& m, 6242: const basic_regex& e, 6242: match_flag_type flags = match_default) 6242: { 6242: re_detail_106501::perl_matcher matcher(first, last, m, e, flags, first); 6242: return matcher.match(); 6242: } 6242: template 6242: bool regex_match(iterator first, iterator last, 6242: const basic_regex& e, 6242: match_flag_type flags = match_default) 6242: { 6242: match_results m; 6242: return regex_match(first, last, m, e, flags | regex_constants::match_any); 6242: } 6242: 6242: 6242: 6242: 6242: 6242: 6242: 6242: template 6242: inline bool regex_match(const charT* str, 6242: match_results& m, 6242: const basic_regex& e, 6242: match_flag_type flags = match_default) 6242: { 6242: return regex_match(str, str + traits::length(str), m, e, flags); 6242: } 6242: 6242: template 6242: inline bool regex_match(const std::basic_string& s, 6242: match_results::const_iterator, Allocator>& m, 6242: const basic_regex& e, 6242: match_flag_type flags = match_default) 6242: { 6242: return regex_match(s.begin(), s.end(), m, e, flags); 6242: } 6242: template 6242: inline bool regex_match(const charT* str, 6242: const basic_regex& e, 6242: match_flag_type flags = match_default) 6242: { 6242: match_results m; 6242: return regex_match(str, str + traits::length(str), m, e, flags | regex_constants::match_any); 6242: } 6242: 6242: template 6242: inline bool regex_match(const std::basic_string& s, 6242: const basic_regex& e, 6242: match_flag_type flags = match_default) 6242: { 6242: typedef typename std::basic_string::const_iterator iterator; 6242: match_results m; 6242: return regex_match(s.begin(), s.end(), m, e, flags | regex_constants::match_any); 6242: } 6242: # 362 "/usr/include/boost/regex/v4/regex_match.hpp" 3 4 6242: } 6242: # 146 "/usr/include/boost/regex/v4/regex.hpp" 2 3 4 6242: 6242: 6242: # 1 "/usr/include/boost/regex/v4/regex_search.hpp" 1 3 4 6242: # 23 "/usr/include/boost/regex/v4/regex_search.hpp" 3 4 6242: namespace boost{ 6242: # 36 "/usr/include/boost/regex/v4/regex_search.hpp" 3 4 6242: template 6242: bool regex_search(BidiIterator first, BidiIterator last, 6242: match_results& m, 6242: const basic_regex& e, 6242: match_flag_type flags = match_default) 6242: { 6242: return regex_search(first, last, m, e, flags, first); 6242: } 6242: 6242: template 6242: bool regex_search(BidiIterator first, BidiIterator last, 6242: match_results& m, 6242: const basic_regex& e, 6242: match_flag_type flags, 6242: BidiIterator base) 6242: { 6242: if(e.flags() & regex_constants::failbit) 6242: return false; 6242: 6242: re_detail_106501::perl_matcher matcher(first, last, m, e, flags, base); 6242: return matcher.find(); 6242: } 6242: # 66 "/usr/include/boost/regex/v4/regex_search.hpp" 3 4 6242: template 6242: inline bool regex_search(const charT* str, 6242: match_results& m, 6242: const basic_regex& e, 6242: match_flag_type flags = match_default) 6242: { 6242: return regex_search(str, str + traits::length(str), m, e, flags); 6242: } 6242: 6242: template 6242: inline bool regex_search(const std::basic_string& s, 6242: match_results::const_iterator, Allocator>& m, 6242: const basic_regex& e, 6242: match_flag_type flags = match_default) 6242: { 6242: return regex_search(s.begin(), s.end(), m, e, flags); 6242: } 6242: # 134 "/usr/include/boost/regex/v4/regex_search.hpp" 3 4 6242: template 6242: bool regex_search(BidiIterator first, BidiIterator last, 6242: const basic_regex& e, 6242: match_flag_type flags = match_default) 6242: { 6242: if(e.flags() & regex_constants::failbit) 6242: return false; 6242: 6242: match_results m; 6242: typedef typename match_results::allocator_type match_alloc_type; 6242: re_detail_106501::perl_matcher matcher(first, last, m, e, flags | regex_constants::match_any, first); 6242: return matcher.find(); 6242: } 6242: 6242: 6242: 6242: template 6242: inline bool regex_search(const charT* str, 6242: const basic_regex& e, 6242: match_flag_type flags = match_default) 6242: { 6242: return regex_search(str, str + traits::length(str), e, flags); 6242: } 6242: 6242: template 6242: inline bool regex_search(const std::basic_string& s, 6242: const basic_regex& e, 6242: match_flag_type flags = match_default) 6242: { 6242: return regex_search(s.begin(), s.end(), e, flags); 6242: } 6242: # 213 "/usr/include/boost/regex/v4/regex_search.hpp" 3 4 6242: } 6242: # 149 "/usr/include/boost/regex/v4/regex.hpp" 2 3 4 6242: 6242: 6242: # 1 "/usr/include/boost/regex/v4/regex_iterator.hpp" 1 3 4 6242: # 24 "/usr/include/boost/regex/v4/regex_iterator.hpp" 3 4 6242: namespace boost{ 6242: # 37 "/usr/include/boost/regex/v4/regex_iterator.hpp" 3 4 6242: template 6242: class regex_iterator_implementation 6242: { 6242: typedef basic_regex regex_type; 6242: 6242: match_results what; 6242: BidirectionalIterator base; 6242: BidirectionalIterator end; 6242: const regex_type re; 6242: match_flag_type flags; 6242: 6242: public: 6242: regex_iterator_implementation(const regex_type* p, BidirectionalIterator last, match_flag_type f) 6242: : base(), end(last), re(*p), flags(f){} 6242: bool init(BidirectionalIterator first) 6242: { 6242: base = first; 6242: return regex_search(first, end, what, re, flags); 6242: } 6242: bool compare(const regex_iterator_implementation& that) 6242: { 6242: if(this == &that) return true; 6242: return (&re.get_data() == &that.re.get_data()) && (end == that.end) && (flags == that.flags) && (what[0].first == that.what[0].first) && (what[0].second == that.what[0].second); 6242: } 6242: const match_results& get() 6242: { return what; } 6242: bool next() 6242: { 6242: 6242: 6242: BidirectionalIterator next_start = what[0].second; 6242: match_flag_type f(flags); 6242: if(!what.length() || (f & regex_constants::match_posix)) 6242: f |= regex_constants::match_not_initial_null; 6242: 6242: 6242: bool result = regex_search(next_start, end, what, re, f, base); 6242: if(result) 6242: what.set_base(base); 6242: return result; 6242: } 6242: private: 6242: regex_iterator_implementation& operator=(const regex_iterator_implementation&); 6242: }; 6242: 6242: template ::value_type, 6242: class traits = regex_traits > 6242: class regex_iterator 6242: 6242: : public std::iterator< 6242: std::forward_iterator_tag, 6242: match_results, 6242: typename re_detail_106501::regex_iterator_traits::difference_type, 6242: const match_results*, 6242: const match_results& > 6242: 6242: { 6242: private: 6242: typedef regex_iterator_implementation impl; 6242: typedef shared_ptr pimpl; 6242: public: 6242: typedef basic_regex regex_type; 6242: typedef match_results value_type; 6242: typedef typename re_detail_106501::regex_iterator_traits::difference_type 6242: difference_type; 6242: typedef const value_type* pointer; 6242: typedef const value_type& reference; 6242: typedef std::forward_iterator_tag iterator_category; 6242: 6242: regex_iterator(){} 6242: regex_iterator(BidirectionalIterator a, BidirectionalIterator b, 6242: const regex_type& re, 6242: match_flag_type m = match_default) 6242: : pdata(new impl(&re, b, m)) 6242: { 6242: if(!pdata->init(a)) 6242: { 6242: pdata.reset(); 6242: } 6242: } 6242: regex_iterator(const regex_iterator& that) 6242: : pdata(that.pdata) {} 6242: regex_iterator& operator=(const regex_iterator& that) 6242: { 6242: pdata = that.pdata; 6242: return *this; 6242: } 6242: bool operator==(const regex_iterator& that)const 6242: { 6242: if((pdata.get() == 0) || (that.pdata.get() == 0)) 6242: return pdata.get() == that.pdata.get(); 6242: return pdata->compare(*(that.pdata.get())); 6242: } 6242: bool operator!=(const regex_iterator& that)const 6242: { return !(*this == that); } 6242: const value_type& operator*()const 6242: { return pdata->get(); } 6242: const value_type* operator->()const 6242: { return &(pdata->get()); } 6242: regex_iterator& operator++() 6242: { 6242: cow(); 6242: if(0 == pdata->next()) 6242: { 6242: pdata.reset(); 6242: } 6242: return *this; 6242: } 6242: regex_iterator operator++(int) 6242: { 6242: regex_iterator result(*this); 6242: ++(*this); 6242: return result; 6242: } 6242: private: 6242: 6242: pimpl pdata; 6242: 6242: void cow() 6242: { 6242: 6242: if(pdata.get() && !pdata.unique()) 6242: { 6242: pdata.reset(new impl(*(pdata.get()))); 6242: } 6242: } 6242: }; 6242: 6242: typedef regex_iterator cregex_iterator; 6242: typedef regex_iterator sregex_iterator; 6242: 6242: typedef regex_iterator wcregex_iterator; 6242: typedef regex_iterator wsregex_iterator; 6242: 6242: 6242: 6242: template 6242: inline regex_iterator make_regex_iterator(const charT* p, const basic_regex& e, regex_constants::match_flag_type m = regex_constants::match_default) 6242: { 6242: return regex_iterator(p, p+traits::length(p), e, m); 6242: } 6242: template 6242: inline regex_iterator::const_iterator, charT, traits> make_regex_iterator(const std::basic_string& p, const basic_regex& e, regex_constants::match_flag_type m = regex_constants::match_default) 6242: { 6242: return regex_iterator::const_iterator, charT, traits>(p.begin(), p.end(), e, m); 6242: } 6242: # 198 "/usr/include/boost/regex/v4/regex_iterator.hpp" 3 4 6242: } 6242: # 152 "/usr/include/boost/regex/v4/regex.hpp" 2 3 4 6242: 6242: 6242: # 1 "/usr/include/boost/regex/v4/regex_token_iterator.hpp" 1 3 4 6242: # 36 "/usr/include/boost/regex/v4/regex_token_iterator.hpp" 3 4 6242: namespace boost{ 6242: # 51 "/usr/include/boost/regex/v4/regex_token_iterator.hpp" 3 4 6242: template 6242: class regex_token_iterator_implementation 6242: { 6242: typedef basic_regex regex_type; 6242: typedef sub_match value_type; 6242: 6242: match_results what; 6242: BidirectionalIterator base; 6242: BidirectionalIterator end; 6242: const regex_type re; 6242: match_flag_type flags; 6242: value_type result; 6242: int N; 6242: std::vector subs; 6242: 6242: public: 6242: regex_token_iterator_implementation(const regex_type* p, BidirectionalIterator last, int sub, match_flag_type f) 6242: : end(last), re(*p), flags(f){ subs.push_back(sub); } 6242: regex_token_iterator_implementation(const regex_type* p, BidirectionalIterator last, const std::vector& v, match_flag_type f) 6242: : end(last), re(*p), flags(f), subs(v){} 6242: # 90 "/usr/include/boost/regex/v4/regex_token_iterator.hpp" 3 4 6242: template 6242: regex_token_iterator_implementation(const regex_type* p, BidirectionalIterator last, const int (&submatches)[CN], match_flag_type f) 6242: : end(last), re(*p), flags(f) 6242: { 6242: for(std::size_t i = 0; i < CN; ++i) 6242: { 6242: subs.push_back(submatches[i]); 6242: } 6242: } 6242: 6242: 6242: bool init(BidirectionalIterator first) 6242: { 6242: N = 0; 6242: base = first; 6242: if(regex_search(first, end, what, re, flags, base) == true) 6242: { 6242: N = 0; 6242: result = ((subs[N] == -1) ? what.prefix() : what[(int)subs[N]]); 6242: return true; 6242: } 6242: else if((subs[N] == -1) && (first != end)) 6242: { 6242: result.first = first; 6242: result.second = end; 6242: result.matched = (first != end); 6242: N = -1; 6242: return true; 6242: } 6242: return false; 6242: } 6242: bool compare(const regex_token_iterator_implementation& that) 6242: { 6242: if(this == &that) return true; 6242: return (&re.get_data() == &that.re.get_data()) 6242: && (end == that.end) 6242: && (flags == that.flags) 6242: && (N == that.N) 6242: && (what[0].first == that.what[0].first) 6242: && (what[0].second == that.what[0].second); 6242: } 6242: const value_type& get() 6242: { return result; } 6242: bool next() 6242: { 6242: if(N == -1) 6242: return false; 6242: if(N+1 < (int)subs.size()) 6242: { 6242: ++N; 6242: result =((subs[N] == -1) ? what.prefix() : what[subs[N]]); 6242: return true; 6242: } 6242: 6242: 6242: BidirectionalIterator last_end(what[0].second); 6242: if(regex_search(last_end, end, what, re, ((what[0].first == what[0].second) ? flags | regex_constants::match_not_initial_null : flags), base)) 6242: { 6242: N =0; 6242: result =((subs[N] == -1) ? what.prefix() : what[subs[N]]); 6242: return true; 6242: } 6242: else if((last_end != end) && (subs[0] == -1)) 6242: { 6242: N =-1; 6242: result.first = last_end; 6242: result.second = end; 6242: result.matched = (last_end != end); 6242: return true; 6242: } 6242: return false; 6242: } 6242: private: 6242: regex_token_iterator_implementation& operator=(const regex_token_iterator_implementation&); 6242: }; 6242: 6242: template ::value_type, 6242: class traits = regex_traits > 6242: class regex_token_iterator 6242: 6242: : public std::iterator< 6242: std::forward_iterator_tag, 6242: sub_match, 6242: typename re_detail_106501::regex_iterator_traits::difference_type, 6242: const sub_match*, 6242: const sub_match& > 6242: 6242: { 6242: private: 6242: typedef regex_token_iterator_implementation impl; 6242: typedef shared_ptr pimpl; 6242: public: 6242: typedef basic_regex regex_type; 6242: typedef sub_match value_type; 6242: typedef typename re_detail_106501::regex_iterator_traits::difference_type 6242: difference_type; 6242: typedef const value_type* pointer; 6242: typedef const value_type& reference; 6242: typedef std::forward_iterator_tag iterator_category; 6242: 6242: regex_token_iterator(){} 6242: regex_token_iterator(BidirectionalIterator a, BidirectionalIterator b, const regex_type& re, 6242: int submatch = 0, match_flag_type m = match_default) 6242: : pdata(new impl(&re, b, submatch, m)) 6242: { 6242: if(!pdata->init(a)) 6242: pdata.reset(); 6242: } 6242: regex_token_iterator(BidirectionalIterator a, BidirectionalIterator b, const regex_type& re, 6242: const std::vector& submatches, match_flag_type m = match_default) 6242: : pdata(new impl(&re, b, submatches, m)) 6242: { 6242: if(!pdata->init(a)) 6242: pdata.reset(); 6242: } 6242: # 219 "/usr/include/boost/regex/v4/regex_token_iterator.hpp" 3 4 6242: template 6242: regex_token_iterator(BidirectionalIterator a, BidirectionalIterator b, const regex_type& re, 6242: const int (&submatches)[N], match_flag_type m = match_default) 6242: : pdata(new impl(&re, b, submatches, m)) 6242: { 6242: if(!pdata->init(a)) 6242: pdata.reset(); 6242: } 6242: 6242: 6242: regex_token_iterator(const regex_token_iterator& that) 6242: : pdata(that.pdata) {} 6242: regex_token_iterator& operator=(const regex_token_iterator& that) 6242: { 6242: pdata = that.pdata; 6242: return *this; 6242: } 6242: bool operator==(const regex_token_iterator& that)const 6242: { 6242: if((pdata.get() == 0) || (that.pdata.get() == 0)) 6242: return pdata.get() == that.pdata.get(); 6242: return pdata->compare(*(that.pdata.get())); 6242: } 6242: bool operator!=(const regex_token_iterator& that)const 6242: { return !(*this == that); } 6242: const value_type& operator*()const 6242: { return pdata->get(); } 6242: const value_type* operator->()const 6242: { return &(pdata->get()); } 6242: regex_token_iterator& operator++() 6242: { 6242: cow(); 6242: if(0 == pdata->next()) 6242: { 6242: pdata.reset(); 6242: } 6242: return *this; 6242: } 6242: regex_token_iterator operator++(int) 6242: { 6242: regex_token_iterator result(*this); 6242: ++(*this); 6242: return result; 6242: } 6242: private: 6242: 6242: pimpl pdata; 6242: 6242: void cow() 6242: { 6242: 6242: if(pdata.get() && !pdata.unique()) 6242: { 6242: pdata.reset(new impl(*(pdata.get()))); 6242: } 6242: } 6242: }; 6242: 6242: typedef regex_token_iterator cregex_token_iterator; 6242: typedef regex_token_iterator sregex_token_iterator; 6242: 6242: typedef regex_token_iterator wcregex_token_iterator; 6242: typedef regex_token_iterator wsregex_token_iterator; 6242: 6242: 6242: template 6242: inline regex_token_iterator make_regex_token_iterator(const charT* p, const basic_regex& e, int submatch = 0, regex_constants::match_flag_type m = regex_constants::match_default) 6242: { 6242: return regex_token_iterator(p, p+traits::length(p), e, submatch, m); 6242: } 6242: template 6242: inline regex_token_iterator::const_iterator, charT, traits> make_regex_token_iterator(const std::basic_string& p, const basic_regex& e, int submatch = 0, regex_constants::match_flag_type m = regex_constants::match_default) 6242: { 6242: return regex_token_iterator::const_iterator, charT, traits>(p.begin(), p.end(), e, submatch, m); 6242: } 6242: template 6242: inline regex_token_iterator make_regex_token_iterator(const charT* p, const basic_regex& e, const int (&submatch)[N], regex_constants::match_flag_type m = regex_constants::match_default) 6242: { 6242: return regex_token_iterator(p, p+traits::length(p), e, submatch, m); 6242: } 6242: template 6242: inline regex_token_iterator::const_iterator, charT, traits> make_regex_token_iterator(const std::basic_string& p, const basic_regex& e, const int (&submatch)[N], regex_constants::match_flag_type m = regex_constants::match_default) 6242: { 6242: return regex_token_iterator::const_iterator, charT, traits>(p.begin(), p.end(), e, submatch, m); 6242: } 6242: template 6242: inline regex_token_iterator make_regex_token_iterator(const charT* p, const basic_regex& e, const std::vector& submatch, regex_constants::match_flag_type m = regex_constants::match_default) 6242: { 6242: return regex_token_iterator(p, p+traits::length(p), e, submatch, m); 6242: } 6242: template 6242: inline regex_token_iterator::const_iterator, charT, traits> make_regex_token_iterator(const std::basic_string& p, const basic_regex& e, const std::vector& submatch, regex_constants::match_flag_type m = regex_constants::match_default) 6242: { 6242: return regex_token_iterator::const_iterator, charT, traits>(p.begin(), p.end(), e, submatch, m); 6242: } 6242: # 327 "/usr/include/boost/regex/v4/regex_token_iterator.hpp" 3 4 6242: } 6242: # 155 "/usr/include/boost/regex/v4/regex.hpp" 2 3 4 6242: 6242: 6242: # 1 "/usr/include/boost/regex/v4/regex_grep.hpp" 1 3 4 6242: # 23 "/usr/include/boost/regex/v4/regex_grep.hpp" 3 4 6242: namespace boost{ 6242: # 40 "/usr/include/boost/regex/v4/regex_grep.hpp" 3 4 6242: template 6242: inline unsigned int regex_grep(Predicate foo, 6242: BidiIterator first, 6242: BidiIterator last, 6242: const basic_regex& e, 6242: match_flag_type flags = match_default) 6242: { 6242: if(e.flags() & regex_constants::failbit) 6242: return false; 6242: 6242: typedef typename match_results::allocator_type match_allocator_type; 6242: 6242: match_results m; 6242: re_detail_106501::perl_matcher matcher(first, last, m, e, flags, first); 6242: unsigned int count = 0; 6242: while(matcher.find()) 6242: { 6242: ++count; 6242: if(0 == foo(m)) 6242: return count; 6242: if(m[0].second == last) 6242: return count; 6242: if(m.length() == 0) 6242: { 6242: if(m[0].second == last) 6242: return count; 6242: 6242: 6242: match_results m2(m); 6242: matcher.setf(match_not_null | match_continuous); 6242: if(matcher.find()) 6242: { 6242: ++count; 6242: if(0 == foo(m)) 6242: return count; 6242: } 6242: else 6242: { 6242: 6242: m = m2; 6242: } 6242: matcher.unsetf((match_not_null | match_continuous) & ~flags); 6242: } 6242: } 6242: return count; 6242: } 6242: # 94 "/usr/include/boost/regex/v4/regex_grep.hpp" 3 4 6242: template 6242: inline unsigned int regex_grep(Predicate foo, const charT* str, 6242: const basic_regex& e, 6242: match_flag_type flags = match_default) 6242: { 6242: return regex_grep(foo, str, str + traits::length(str), e, flags); 6242: } 6242: 6242: template 6242: inline unsigned int regex_grep(Predicate foo, const std::basic_string& s, 6242: const basic_regex& e, 6242: match_flag_type flags = match_default) 6242: { 6242: return regex_grep(foo, s.begin(), s.end(), e, flags); 6242: } 6242: # 152 "/usr/include/boost/regex/v4/regex_grep.hpp" 3 4 6242: } 6242: # 158 "/usr/include/boost/regex/v4/regex.hpp" 2 3 4 6242: 6242: 6242: # 1 "/usr/include/boost/regex/v4/regex_replace.hpp" 1 3 4 6242: # 25 "/usr/include/boost/regex/v4/regex_replace.hpp" 3 4 6242: namespace boost{ 6242: # 38 "/usr/include/boost/regex/v4/regex_replace.hpp" 3 4 6242: template 6242: OutputIterator regex_replace(OutputIterator out, 6242: BidirectionalIterator first, 6242: BidirectionalIterator last, 6242: const basic_regex& e, 6242: Formatter fmt, 6242: match_flag_type flags = match_default) 6242: { 6242: regex_iterator i(first, last, e, flags); 6242: regex_iterator j; 6242: if(i == j) 6242: { 6242: if(!(flags & regex_constants::format_no_copy)) 6242: out = re_detail_106501::copy(first, last, out); 6242: } 6242: else 6242: { 6242: BidirectionalIterator last_m(first); 6242: while(i != j) 6242: { 6242: if(!(flags & regex_constants::format_no_copy)) 6242: out = re_detail_106501::copy(i->prefix().first, i->prefix().second, out); 6242: out = i->format(out, fmt, flags, e); 6242: last_m = (*i)[0].second; 6242: if(flags & regex_constants::format_first_only) 6242: break; 6242: ++i; 6242: } 6242: if(!(flags & regex_constants::format_no_copy)) 6242: out = re_detail_106501::copy(last_m, last, out); 6242: } 6242: return out; 6242: } 6242: 6242: template 6242: std::basic_string regex_replace(const std::basic_string& s, 6242: const basic_regex& e, 6242: Formatter fmt, 6242: match_flag_type flags = match_default) 6242: { 6242: std::basic_string result; 6242: re_detail_106501::string_out_iterator > i(result); 6242: regex_replace(i, s.begin(), s.end(), e, fmt, flags); 6242: return result; 6242: } 6242: # 95 "/usr/include/boost/regex/v4/regex_replace.hpp" 3 4 6242: } 6242: # 161 "/usr/include/boost/regex/v4/regex.hpp" 2 3 4 6242: 6242: 6242: # 1 "/usr/include/boost/regex/v4/regex_merge.hpp" 1 3 4 6242: # 25 "/usr/include/boost/regex/v4/regex_merge.hpp" 3 4 6242: namespace boost{ 6242: # 38 "/usr/include/boost/regex/v4/regex_merge.hpp" 3 4 6242: template 6242: inline OutputIterator regex_merge(OutputIterator out, 6242: Iterator first, 6242: Iterator last, 6242: const basic_regex& e, 6242: const charT* fmt, 6242: match_flag_type flags = match_default) 6242: { 6242: return regex_replace(out, first, last, e, fmt, flags); 6242: } 6242: 6242: template 6242: inline OutputIterator regex_merge(OutputIterator out, 6242: Iterator first, 6242: Iterator last, 6242: const basic_regex& e, 6242: const std::basic_string& fmt, 6242: match_flag_type flags = match_default) 6242: { 6242: return regex_merge(out, first, last, e, fmt.c_str(), flags); 6242: } 6242: 6242: template 6242: inline std::basic_string regex_merge(const std::basic_string& s, 6242: const basic_regex& e, 6242: const charT* fmt, 6242: match_flag_type flags = match_default) 6242: { 6242: return regex_replace(s, e, fmt, flags); 6242: } 6242: 6242: template 6242: inline std::basic_string regex_merge(const std::basic_string& s, 6242: const basic_regex& e, 6242: const std::basic_string& fmt, 6242: match_flag_type flags = match_default) 6242: { 6242: return regex_replace(s, e, fmt, flags); 6242: } 6242: # 89 "/usr/include/boost/regex/v4/regex_merge.hpp" 3 4 6242: } 6242: # 164 "/usr/include/boost/regex/v4/regex.hpp" 2 3 4 6242: 6242: 6242: # 1 "/usr/include/boost/regex/v4/regex_split.hpp" 1 3 4 6242: # 24 "/usr/include/boost/regex/v4/regex_split.hpp" 3 4 6242: namespace boost{ 6242: # 42 "/usr/include/boost/regex/v4/regex_split.hpp" 3 4 6242: namespace re_detail_106501{ 6242: 6242: template 6242: const basic_regex& get_default_expression(charT) 6242: { 6242: static const charT expression_text[4] = { '\\', 's', '+', '\00', }; 6242: static const basic_regex e(expression_text); 6242: return e; 6242: } 6242: 6242: template 6242: class split_pred 6242: { 6242: typedef std::basic_string string_type; 6242: typedef typename string_type::const_iterator iterator_type; 6242: iterator_type* p_last; 6242: OutputIterator* p_out; 6242: std::size_t* p_max; 6242: std::size_t initial_max; 6242: public: 6242: split_pred(iterator_type* a, OutputIterator* b, std::size_t* c) 6242: : p_last(a), p_out(b), p_max(c), initial_max(*c) {} 6242: 6242: bool operator()(const match_results& what); 6242: }; 6242: 6242: template 6242: bool split_pred::operator() 6242: (const match_results& what) 6242: { 6242: *p_last = what[0].second; 6242: if(what.size() > 1) 6242: { 6242: 6242: for(unsigned i = 1; i < what.size(); ++i) 6242: { 6242: *(*p_out) = what.str(i); 6242: ++(*p_out); 6242: if(0 == --*p_max) return false; 6242: } 6242: return *p_max != 0; 6242: } 6242: else 6242: { 6242: 6242: const sub_match& sub = what[-1]; 6242: if((sub.first != sub.second) || (*p_max != initial_max)) 6242: { 6242: *(*p_out) = sub.str(); 6242: ++(*p_out); 6242: return --*p_max; 6242: } 6242: } 6242: 6242: 6242: return true; 6242: } 6242: 6242: } 6242: 6242: template 6242: std::size_t regex_split(OutputIterator out, 6242: std::basic_string& s, 6242: const basic_regex& e, 6242: match_flag_type flags, 6242: std::size_t max_split) 6242: { 6242: typedef typename std::basic_string::const_iterator ci_t; 6242: 6242: ci_t last = s.begin(); 6242: std::size_t init_size = max_split; 6242: re_detail_106501::split_pred pred(&last, &out, &max_split); 6242: ci_t i, j; 6242: i = s.begin(); 6242: j = s.end(); 6242: regex_grep(pred, i, j, e, flags); 6242: 6242: 6242: 6242: 6242: if(max_split && (last != s.end()) && (e.mark_count() == 0)) 6242: { 6242: *out = std::basic_string((ci_t)last, (ci_t)s.end()); 6242: ++out; 6242: last = s.end(); 6242: --max_split; 6242: } 6242: 6242: 6242: s.erase(0, last - s.begin()); 6242: 6242: 6242: return init_size - max_split; 6242: } 6242: 6242: template 6242: inline std::size_t regex_split(OutputIterator out, 6242: std::basic_string& s, 6242: const basic_regex& e, 6242: match_flag_type flags = match_default) 6242: { 6242: return regex_split(out, s, e, flags, (0x7fffffff * 2U + 1U)); 6242: } 6242: 6242: template 6242: inline std::size_t regex_split(OutputIterator out, 6242: std::basic_string& s) 6242: { 6242: return regex_split(out, s, re_detail_106501::get_default_expression(charT(0)), match_default, (0x7fffffff * 2U + 1U)); 6242: } 6242: # 168 "/usr/include/boost/regex/v4/regex_split.hpp" 3 4 6242: } 6242: # 167 "/usr/include/boost/regex/v4/regex.hpp" 2 3 4 6242: # 32 "/usr/include/boost/regex.hpp" 2 3 4 6242: # 9 "regex.hh" 2 6242: 6242: 6242: # 10 "regex.hh" 6242: namespace Kakoune 6242: { 6242: 6242: struct regex_error : runtime_error 6242: { 6242: regex_error(StringView desc) 6242: : runtime_error{format("regex error: '{}'", desc)} 6242: {} 6242: }; 6242: 6242: using RegexBase = boost::basic_regex>; 6242: 6242: 6242: class Regex : public RegexBase 6242: { 6242: public: 6242: Regex() = default; 6242: 6242: explicit Regex(StringView re, flag_type flags = ECMAScript); 6242: bool empty() const { return m_str.empty(); } 6242: bool operator==(const Regex& other) const { return m_str == other.m_str; } 6242: bool operator!=(const Regex& other) const { return m_str != other.m_str; } 6242: 6242: const String& str() const { return m_str; } 6242: 6242: static constexpr const char* option_type_name = "regex"; 6242: 6242: private: 6242: String m_str; 6242: }; 6242: 6242: template 6242: using RegexUtf8It = utf8::iterator; 6242: 6242: template 6242: using RegexIteratorBase = boost::regex_iterator, wchar_t, 6242: boost::c_regex_traits>; 6242: 6242: namespace RegexConstant = boost::regex_constants; 6242: 6242: template 6242: struct MatchResults : boost::match_results> 6242: { 6242: using ParentType = boost::match_results>; 6242: struct SubMatch : std::pair 6242: { 6242: SubMatch() = default; 6242: SubMatch(const boost::sub_match>& m) 6242: : std::pair{m.first.base(), m.second.base()}, 6242: matched{m.matched} 6242: {} 6242: 6242: bool matched = false; 6242: }; 6242: 6242: struct iterator : boost::match_results>::iterator 6242: { 6242: using ParentType = typename boost::match_results>::iterator; 6242: iterator(const ParentType& it) : ParentType(it) {} 6242: 6242: SubMatch operator*() const { return {ParentType::operator*()}; } 6242: }; 6242: 6242: iterator begin() const { return {ParentType::begin()}; } 6242: iterator cbegin() const { return {ParentType::cbegin()}; } 6242: iterator end() const { return {ParentType::end()}; } 6242: iterator cend() const { return {ParentType::cend()}; } 6242: 6242: SubMatch operator[](size_t s) const { return {ParentType::operator[](s)}; } 6242: }; 6242: 6242: template 6242: struct RegexIterator : RegexIteratorBase 6242: { 6242: using Utf8It = RegexUtf8It; 6242: using ValueType = MatchResults; 6242: 6242: RegexIterator() = default; 6242: RegexIterator(Iterator begin, Iterator end, const Regex& re, 6242: RegexConstant::match_flag_type flags = RegexConstant::match_default) 6242: : RegexIteratorBase{Utf8It{begin, begin, end}, Utf8It{end, begin, end}, re, flags} {} 6242: 6242: const ValueType& operator*() const { return *reinterpret_cast(&RegexIteratorBase::operator*()); } 6242: const ValueType* operator->() const { return reinterpret_cast(RegexIteratorBase::operator->()); } 6242: }; 6242: 6242: inline RegexConstant::match_flag_type match_flags(bool bol, bool eol, bool bow, bool eow) 6242: { 6242: return (bol ? RegexConstant::match_default : RegexConstant::match_not_bol) | 6242: (eol ? RegexConstant::match_default : RegexConstant::match_not_eol) | 6242: (bow ? RegexConstant::match_default : RegexConstant::match_not_bow) | 6242: (eow ? RegexConstant::match_default : RegexConstant::match_not_eow); 6242: } 6242: 6242: template 6242: bool regex_match(It begin, It end, const Regex& re) 6242: { 6242: using Utf8It = RegexUtf8It; 6242: try 6242: { 6242: return boost::regex_match(Utf8It{begin, begin, end}, Utf8It{end, begin, end}, re); 6242: } 6242: catch (std::runtime_error& err) 6242: { 6242: throw runtime_error{format("Regex matching error: {}", err.what())}; 6242: } 6242: } 6242: 6242: template 6242: bool regex_match(It begin, It end, MatchResults& res, const Regex& re) 6242: { 6242: using Utf8It = RegexUtf8It; 6242: try 6242: { 6242: return boost::regex_match(Utf8It{begin, begin, end}, Utf8It{end, begin, end}, res, re); 6242: } 6242: catch (std::runtime_error& err) 6242: { 6242: throw runtime_error{format("Regex matching error: {}", err.what())}; 6242: } 6242: } 6242: 6242: template 6242: bool regex_search(It begin, It end, const Regex& re, 6242: RegexConstant::match_flag_type flags = RegexConstant::match_default) 6242: { 6242: using Utf8It = RegexUtf8It; 6242: try 6242: { 6242: return boost::regex_search(Utf8It{begin, begin, end}, Utf8It{end, begin, end}, re, flags); 6242: } 6242: catch (std::runtime_error& err) 6242: { 6242: throw runtime_error{format("Regex searching error: {}", err.what())}; 6242: } 6242: } 6242: 6242: template 6242: bool regex_search(It begin, It end, MatchResults& res, const Regex& re, 6242: RegexConstant::match_flag_type flags = RegexConstant::match_default) 6242: { 6242: using Utf8It = RegexUtf8It; 6242: try 6242: { 6242: return boost::regex_search(Utf8It{begin, begin, end}, Utf8It{end, begin, end}, res, re, flags); 6242: } 6242: catch (std::runtime_error& err) 6242: { 6242: throw runtime_error{format("Regex searching error: {}", err.what())}; 6242: } 6242: } 6242: 6242: String option_to_string(const Regex& re); 6242: void option_from_string(StringView str, Regex& re); 6242: 6242: } 6242: # 10 "selectors.hh" 2 6242: 6242: namespace Kakoune 6242: { 6242: 6242: inline Selection keep_direction(Selection res, const Selection& ref) 6242: { 6242: if ((res.cursor() < res.anchor()) != (ref.cursor() < ref.anchor())) 6242: std::swap(res.cursor(), res.anchor()); 6242: return res; 6242: } 6242: 6242: inline Selection target_eol(Selection sel) 6242: { 6242: sel.cursor().target = 0x7fffffff; 6242: return sel; 6242: } 6242: 6242: using Utf8Iterator = utf8::iterator; 6242: 6242: inline Selection utf8_range(const BufferIterator& first, const BufferIterator& last) 6242: { 6242: return {first.coord(), last.coord()}; 6242: } 6242: 6242: inline Selection utf8_range(const Utf8Iterator& first, const Utf8Iterator& last) 6242: { 6242: return {first.base().coord(), last.base().coord()}; 6242: } 6242: 6242: template 6242: Selection select_to_next_word(const Buffer& buffer, const Selection& selection) 6242: { 6242: Utf8Iterator begin{buffer.iterator_at(selection.cursor()), buffer}; 6242: if (begin+1 == buffer.end()) 6242: return selection; 6242: if (categorize(*begin) != categorize(*(begin+1))) 6242: ++begin; 6242: 6242: if (not skip_while(begin, buffer.end(), 6242: [](Codepoint c) { return is_eol(c); })) 6242: return selection; 6242: Utf8Iterator end = begin+1; 6242: 6242: if (word_type == Word and is_punctuation(*begin)) 6242: skip_while(end, buffer.end(), is_punctuation); 6242: else if (is_word(*begin)) 6242: skip_while(end, buffer.end(), is_word); 6242: 6242: skip_while(end, buffer.end(), is_horizontal_blank); 6242: 6242: return utf8_range(begin, end-1); 6242: } 6242: 6242: template 6242: Selection select_to_next_word_end(const Buffer& buffer, const Selection& selection) 6242: { 6242: Utf8Iterator begin{buffer.iterator_at(selection.cursor()), buffer}; 6242: if (begin+1 == buffer.end()) 6242: return selection; 6242: if (categorize(*begin) != categorize(*(begin+1))) 6242: ++begin; 6242: 6242: if (not skip_while(begin, buffer.end(), 6242: [](Codepoint c) { return is_eol(c); })) 6242: return selection; 6242: Utf8Iterator end = begin; 6242: skip_while(end, buffer.end(), is_horizontal_blank); 6242: 6242: if (word_type == Word and is_punctuation(*end)) 6242: skip_while(end, buffer.end(), is_punctuation); 6242: else if (is_word(*end)) 6242: skip_while(end, buffer.end(), is_word); 6242: 6242: return utf8_range(begin, end-1); 6242: } 6242: 6242: template 6242: Selection select_to_previous_word(const Buffer& buffer, const Selection& selection) 6242: { 6242: Utf8Iterator begin{buffer.iterator_at(selection.cursor()), buffer}; 6242: if (begin == buffer.begin()) 6242: return selection; 6242: if (categorize(*begin) != categorize(*(begin-1))) 6242: --begin; 6242: 6242: skip_while_reverse(begin, buffer.begin(), [](Codepoint c){ return is_eol(c); }); 6242: Utf8Iterator end = begin; 6242: 6242: bool with_end = skip_while_reverse(end, buffer.begin(), is_horizontal_blank); 6242: if (word_type == Word and is_punctuation(*end)) 6242: with_end = skip_while_reverse(end, buffer.begin(), is_punctuation); 6242: 6242: else if (is_word(*end)) 6242: with_end = skip_while_reverse(end, buffer.begin(), is_word); 6242: 6242: return utf8_range(begin, with_end ? end : end+1); 6242: } 6242: 6242: Selection select_line(const Buffer& buffer, const Selection& selection); 6242: Selection select_matching(const Buffer& buffer, const Selection& selection); 6242: 6242: Selection select_to(const Buffer& buffer, const Selection& selection, 6242: Codepoint c, int count, bool inclusive); 6242: Selection select_to_reverse(const Buffer& buffer, const Selection& selection, 6242: Codepoint c, int count, bool inclusive); 6242: 6242: template 6242: Selection select_to_line_end(const Buffer& buffer, const Selection& selection) 6242: { 6242: BufferCoord begin = selection.cursor(); 6242: LineCount line = begin.line; 6242: BufferCoord end = utf8::previous(buffer.iterator_at({line, buffer[line].length() - 1}), 6242: buffer.iterator_at(line)).coord(); 6242: if (end < begin) 6242: end = begin; 6242: return target_eol({only_move ? end : begin, end}); 6242: } 6242: 6242: template 6242: Selection select_to_line_begin(const Buffer& buffer, const Selection& selection) 6242: { 6242: BufferCoord begin = selection.cursor(); 6242: BufferCoord end = begin.line; 6242: return {only_move ? end : begin, end}; 6242: } 6242: 6242: enum class ObjectFlags 6242: { 6242: ToBegin = 1, 6242: ToEnd = 2, 6242: Inner = 4 6242: }; 6242: 6242: template<> struct WithBitOps : std::true_type {}; 6242: 6242: template 6242: Selection select_word(const Buffer& buffer, const Selection& selection, 6242: int count, ObjectFlags flags) 6242: { 6242: Utf8Iterator first{buffer.iterator_at(selection.cursor()), buffer}; 6242: if (not is_word(*first) and 6242: ((flags & ObjectFlags::Inner) or 6242: not skip_while(first, buffer.end(), [](Codepoint c) 6242: { return not is_word(c); }))) 6242: return selection; 6242: 6242: Utf8Iterator last = first; 6242: if (flags & ObjectFlags::ToBegin) 6242: { 6242: skip_while_reverse(first, buffer.begin(), is_word); 6242: if (not is_word(*first)) 6242: ++first; 6242: } 6242: if (flags & ObjectFlags::ToEnd) 6242: { 6242: skip_while(last, buffer.end(), is_word); 6242: if (not (flags & ObjectFlags::Inner)) 6242: skip_while(last, buffer.end(), is_horizontal_blank); 6242: --last; 6242: } 6242: return (flags & ObjectFlags::ToEnd) ? utf8_range(first, last) 6242: : utf8_range(last, first); 6242: } 6242: 6242: Selection select_number(const Buffer& buffer, const Selection& selection, 6242: int count, ObjectFlags flags); 6242: 6242: Selection select_sentence(const Buffer& buffer, const Selection& selection, 6242: int count, ObjectFlags flags); 6242: 6242: Selection select_paragraph(const Buffer& buffer, const Selection& selection, 6242: int count, ObjectFlags flags); 6242: 6242: Selection select_whitespaces(const Buffer& buffer, const Selection& selection, 6242: int count, ObjectFlags flags); 6242: 6242: Selection select_indent(const Buffer& buffer, const Selection& selection, 6242: int count, ObjectFlags flags); 6242: 6242: Selection select_argument(const Buffer& buffer, const Selection& selection, 6242: int level, ObjectFlags flags); 6242: 6242: Selection select_lines(const Buffer& buffer, const Selection& selection); 6242: 6242: Selection trim_partial_lines(const Buffer& buffer, const Selection& selection); 6242: 6242: void select_buffer(SelectionList& selections); 6242: 6242: enum Direction { Forward, Backward }; 6242: 6242: inline bool find_last_match(const Buffer& buffer, const BufferIterator& pos, 6242: MatchResults& res, 6242: const Regex& regex) 6242: { 6242: MatchResults matches; 6242: const bool is_pos_eol = is_eol(buffer, pos.coord()); 6242: const bool is_pos_eow = is_eow(buffer, pos.coord()); 6242: auto begin = buffer.begin(); 6242: while (begin != pos and regex_search(begin, pos, matches, regex, 6242: match_flags(is_bol(begin.coord()), is_pos_eol, 6242: is_bow(buffer, begin.coord()), is_pos_eow))) 6242: { 6242: begin = utf8::next(matches[0].first, pos); 6242: if (res.empty() or matches[0].second > res[0].second) 6242: res.swap(matches); 6242: } 6242: return not res.empty(); 6242: } 6242: 6242: template 6242: bool find_match_in_buffer(const Buffer& buffer, const BufferIterator pos, 6242: MatchResults& matches, 6242: const Regex& ex, bool& wrapped) 6242: { 6242: wrapped = false; 6242: if (direction == Forward) 6242: { 6242: if (pos != buffer.end() and 6242: regex_search(pos, buffer.end(), matches, ex, 6242: match_flags(is_bol(pos.coord()), true, 6242: is_bow(buffer, pos.coord()), true))) 6242: return true; 6242: wrapped = true; 6242: return regex_search(buffer.begin(), buffer.end(), matches, ex); 6242: } 6242: else 6242: { 6242: if (find_last_match(buffer, pos, matches, ex)) 6242: return true; 6242: wrapped = true; 6242: return find_last_match(buffer, buffer.end(), matches, ex); 6242: } 6242: } 6242: 6242: inline BufferIterator ensure_char_start(const Buffer& buffer, const BufferIterator& it) 6242: { 6242: return it != buffer.end() ? 6242: utf8::character_start(it, buffer.iterator_at(it.coord().line)) : it; 6242: } 6242: 6242: template 6242: Selection find_next_match(const Buffer& buffer, const Selection& sel, const Regex& regex, bool& wrapped) 6242: { 6242: auto begin = buffer.iterator_at(direction == Backward ? sel.min() : sel.max()); 6242: auto end = begin; 6242: 6242: CaptureList captures; 6242: MatchResults matches; 6242: bool found = false; 6242: auto pos = direction == Forward ? utf8::next(begin, buffer.end()) : begin; 6242: if ((found = find_match_in_buffer(buffer, pos, matches, regex, wrapped))) 6242: { 6242: begin = matches[0].first; 6242: end = matches[0].second; 6242: for (const auto& match : matches) 6242: captures.push_back(buffer.string(match.first.coord(), 6242: match.second.coord())); 6242: } 6242: if (not found or begin == buffer.end()) 6242: throw runtime_error(format("'{}': no matches found", regex.str())); 6242: 6242: end = (begin == end) ? end : utf8::previous(end, begin); 6242: if (direction == Backward) 6242: std::swap(begin, end); 6242: 6242: return {begin.coord(), end.coord(), std::move(captures)}; 6242: } 6242: 6242: void select_all_matches(SelectionList& selections, const Regex& regex, unsigned capture = 0); 6242: void split_selections(SelectionList& selections, const Regex& separator_regex, unsigned capture = 0); 6242: 6242: Selection select_surrounding(const Buffer& buffer, const Selection& selection, 6242: StringView opening, StringView closing, int level, 6242: ObjectFlags flags); 6242: 6242: } 6242: # 17 "normal.cc" 2 6242: 6242: 6242: # 1 "user_interface.hh" 1 6242: # 9 "user_interface.hh" 6242: namespace Kakoune 6242: { 6242: 6242: class String; 6242: class DisplayBuffer; 6242: class DisplayLine; 6242: struct DisplayCoord; 6242: struct Face; 6242: struct Key; 6242: 6242: enum class MenuStyle 6242: { 6242: Prompt, 6242: Inline 6242: }; 6242: 6242: enum class InfoStyle 6242: { 6242: Prompt, 6242: Inline, 6242: InlineAbove, 6242: InlineBelow, 6242: MenuDoc 6242: }; 6242: 6242: enum class EventMode; 6242: 6242: using OnKeyCallback = std::function; 6242: 6242: class UserInterface 6242: { 6242: public: 6242: virtual ~UserInterface() {} 6242: 6242: virtual void menu_show(ConstArrayView choices, 6242: DisplayCoord anchor, Face fg, Face bg, 6242: MenuStyle style) = 0; 6242: virtual void menu_select(int selected) = 0; 6242: virtual void menu_hide() = 0; 6242: 6242: virtual void info_show(StringView title, StringView content, 6242: DisplayCoord anchor, Face face, 6242: InfoStyle style) = 0; 6242: virtual void info_hide() = 0; 6242: 6242: virtual void draw(const DisplayBuffer& display_buffer, 6242: const Face& default_face, 6242: const Face& padding_face) = 0; 6242: 6242: virtual void draw_status(const DisplayLine& status_line, 6242: const DisplayLine& mode_line, 6242: const Face& default_face) = 0; 6242: 6242: virtual DisplayCoord dimensions() = 0; 6242: 6242: virtual void refresh(bool force) = 0; 6242: 6242: virtual void set_on_key(OnKeyCallback callback) = 0; 6242: 6242: using Options = IdMap; 6242: virtual void set_ui_options(const Options& options) = 0; 6242: }; 6242: 6242: } 6242: # 20 "normal.cc" 2 6242: # 1 "window.hh" 1 6242: 6242: 6242: 6242: 6242: 6242: # 1 "highlighter_group.hh" 1 6242: 6242: 6242: 6242: 6242: 6242: # 1 "highlighter.hh" 1 6242: # 15 "highlighter.hh" 6242: namespace Kakoune 6242: { 6242: 6242: class Context; 6242: 6242: enum class HighlightFlags 6242: { 6242: Highlight, 6242: MoveOnly 6242: }; 6242: 6242: 6242: 6242: 6242: 6242: 6242: struct Highlighter; 6242: 6242: using HighlighterAndId = std::pair>; 6242: 6242: struct Highlighter 6242: { 6242: virtual ~Highlighter() {} 6242: virtual void highlight(const Context& context, HighlightFlags flags, DisplayBuffer& display_buffer, BufferRange range) = 0; 6242: 6242: virtual bool has_children() const { return false; } 6242: virtual Highlighter& get_child(StringView path) { throw runtime_error("this highlighter do not hold children"); } 6242: virtual void add_child(HighlighterAndId&& hl) { throw runtime_error("this highlighter do not hold children"); } 6242: virtual void remove_child(StringView id) { throw runtime_error("this highlighter do not hold children"); } 6242: virtual Completions complete_child(StringView path, ByteCount cursor_pos, bool group) const { throw runtime_error("this highlighter do not hold children"); } 6242: }; 6242: 6242: template 6242: struct SimpleHighlighter : public Highlighter 6242: { 6242: SimpleHighlighter(Func func) : m_func(std::move(func)) {} 6242: virtual void highlight(const Context& context, HighlightFlags flags, DisplayBuffer& display_buffer, BufferRange range) override 6242: { 6242: m_func(context, flags, display_buffer, range); 6242: } 6242: private: 6242: Func m_func; 6242: }; 6242: 6242: template 6242: std::unique_ptr> make_simple_highlighter(T func) 6242: { 6242: return make_unique>(std::move(func)); 6242: } 6242: 6242: using HighlighterParameters = ConstArrayView; 6242: using HighlighterFactory = std::function; 6242: 6242: struct HighlighterFactoryAndDocstring 6242: { 6242: HighlighterFactory factory; 6242: String docstring; 6242: }; 6242: 6242: struct HighlighterRegistry : IdMap, 6242: Singleton 6242: {}; 6242: 6242: } 6242: # 7 "highlighter_group.hh" 2 6242: 6242: 6242: namespace Kakoune 6242: { 6242: 6242: struct child_not_found : public runtime_error 6242: { 6242: using runtime_error::runtime_error; 6242: }; 6242: 6242: class HighlighterGroup : public Highlighter 6242: { 6242: public: 6242: void highlight(const Context& context, HighlightFlags flags, DisplayBuffer& display_buffer, BufferRange range) override; 6242: 6242: bool has_children() const override { return true; } 6242: void add_child(HighlighterAndId&& hl) override; 6242: void remove_child(StringView id) override; 6242: 6242: Highlighter& get_child(StringView path) override; 6242: 6242: Completions complete_child(StringView path, ByteCount cursor_pos, bool group) const override; 6242: 6242: private: 6242: using HighlighterMap = IdMap, MemoryDomain::Highlight>; 6242: HighlighterMap m_highlighters; 6242: }; 6242: 6242: struct DefinedHighlighters : public HighlighterGroup, 6242: public Singleton 6242: { 6242: }; 6242: 6242: } 6242: # 7 "window.hh" 2 6242: 6242: 6242: 6242: 6242: namespace Kakoune 6242: { 6242: 6242: 6242: class Window : public SafeCountable, public OptionManagerWatcher, public Scope 6242: { 6242: public: 6242: Window(Buffer& buffer); 6242: ~Window(); 6242: 6242: const DisplayCoord& position() const { return m_position; } 6242: void set_position(DisplayCoord position); 6242: 6242: const DisplayCoord& dimensions() const { return m_dimensions; } 6242: void set_dimensions(DisplayCoord dimensions); 6242: 6242: void scroll(LineCount offset); 6242: void center_line(LineCount buffer_line); 6242: void display_line_at(LineCount buffer_line, LineCount display_line); 6242: 6242: void scroll(ColumnCount offset); 6242: void center_column(ColumnCount buffer_column); 6242: void display_column_at(ColumnCount buffer_column, ColumnCount display_column); 6242: 6242: const DisplayBuffer& update_display_buffer(const Context& context); 6242: 6242: DisplayCoord display_position(BufferCoord coord) const; 6242: BufferCoord buffer_coord(DisplayCoord coord) const; 6242: 6242: Highlighter& highlighters() { return m_highlighters; } 6242: 6242: Buffer& buffer() const { return *m_buffer; } 6242: 6242: bool needs_redraw(const Context& context) const; 6242: void force_redraw() { m_last_setup = Setup{}; } 6242: 6242: BufferCoord offset_coord(BufferCoord coord, CharCount offset); 6242: BufferCoordAndTarget offset_coord(BufferCoordAndTarget coord, LineCount offset); 6242: 6242: void set_client(Client* client) { m_client = client; } 6242: 6242: void clear_display_buffer(); 6242: private: 6242: Window(const Window&) = delete; 6242: 6242: void on_option_changed(const Option& option) override; 6242: void scroll_to_keep_selection_visible_ifn(const Context& context); 6242: 6242: void run_hook_in_own_context(StringView hook_name, StringView param, 6242: String client_name = ""); 6242: 6242: SafePtr m_buffer; 6242: SafePtr m_client; 6242: 6242: DisplayCoord m_position; 6242: DisplayCoord m_dimensions; 6242: DisplayBuffer m_display_buffer; 6242: 6242: HighlighterGroup m_highlighters; 6242: HighlighterGroup m_builtin_highlighters; 6242: 6242: struct Setup 6242: { 6242: DisplayCoord position; 6242: DisplayCoord dimensions; 6242: size_t timestamp; 6242: size_t main_selection; 6242: Vector selections; 6242: }; 6242: Setup build_setup(const Context& context) const; 6242: Setup m_last_setup; 6242: }; 6242: 6242: } 6242: # 21 "normal.cc" 2 6242: 6242: namespace Kakoune 6242: { 6242: 6242: using namespace std::placeholders; 6242: 6242: enum class SelectMode 6242: { 6242: Replace, 6242: Extend, 6242: Append, 6242: }; 6242: 6242: template 6242: void select(Context& context, T func) 6242: { 6242: auto& buffer = context.buffer(); 6242: auto& selections = context.selections(); 6242: if (mode == SelectMode::Append) 6242: { 6242: auto& sel = selections.main(); 6242: auto res = func(buffer, sel); 6242: if (res.captures().empty()) 6242: res.captures() = sel.captures(); 6242: selections.push_back(res); 6242: selections.set_main_index(selections.size() - 1); 6242: } 6242: else 6242: { 6242: for (auto& sel : selections) 6242: { 6242: auto res = func(buffer, sel); 6242: if (mode == SelectMode::Extend) 6242: sel.merge_with(res); 6242: else 6242: { 6242: sel.anchor() = res.anchor(); 6242: sel.cursor() = res.cursor(); 6242: } 6242: if (not res.captures().empty()) 6242: sel.captures() = std::move(res.captures()); 6242: } 6242: } 6242: selections.sort_and_merge_overlapping(); 6242: selections.check_invariant(); 6242: } 6242: 6242: template 6242: void select(Context& context, NormalParams) 6242: { 6242: select(context, func); 6242: } 6242: 6242: template 6242: void select_and_set_last(Context& context, Func&& func) 6242: { 6242: context.set_last_select( 6242: [func](Context& context){ select(context, func); }); 6242: return select(context, func); 6242: } 6242: 6242: template 6242: void select_coord(Buffer& buffer, BufferCoord coord, SelectionList& selections) 6242: { 6242: coord = buffer.clamp(coord); 6242: if (mode == SelectMode::Replace) 6242: selections = SelectionList{ buffer, coord }; 6242: else if (mode == SelectMode::Extend) 6242: { 6242: for (auto& sel : selections) 6242: sel.cursor() = coord; 6242: selections.sort_and_merge_overlapping(); 6242: } 6242: } 6242: 6242: template 6242: void enter_insert_mode(Context& context, NormalParams params) 6242: { 6242: context.input_handler().insert(mode, params.count); 6242: } 6242: 6242: void repeat_last_insert(Context& context, NormalParams) 6242: { 6242: context.input_handler().repeat_last_insert(); 6242: } 6242: 6242: void repeat_last_select(Context& context, NormalParams) 6242: { 6242: context.repeat_last_select(); 6242: } 6242: 6242: template 6242: void goto_commands(Context& context, NormalParams params) 6242: { 6242: if (params.count != 0) 6242: { 6242: context.push_jump(); 6242: select_coord(context.buffer(), LineCount{params.count - 1}, context.selections()); 6242: if (context.has_window()) 6242: context.window().center_line(LineCount{params.count-1}); 6242: } 6242: else 6242: { 6242: on_next_key_with_autoinfo(context, KeymapMode::Goto, 6242: [](Key key, Context& context) { 6242: auto cp = key.codepoint(); 6242: if (not cp) 6242: return; 6242: auto& buffer = context.buffer(); 6242: switch (to_lower(*cp)) 6242: { 6242: case 'g': 6242: case 'k': 6242: context.push_jump(); 6242: select_coord(buffer, BufferCoord{0,0}, context.selections()); 6242: break; 6242: case 'l': 6242: select>(context, {}); 6242: break; 6242: case 'h': 6242: select>(context, {}); 6242: break; 6242: case 'j': 6242: context.push_jump(); 6242: select_coord(buffer, buffer.line_count() - 1, context.selections()); 6242: break; 6242: case 'e': 6242: context.push_jump(); 6242: select_coord(buffer, buffer.back_coord(), context.selections()); 6242: break; 6242: case 't': 6242: if (context.has_window()) 6242: { 6242: auto line = context.window().position().line; 6242: select_coord(buffer, line, context.selections()); 6242: } 6242: break; 6242: case 'b': 6242: if (context.has_window()) 6242: { 6242: auto& window = context.window(); 6242: auto line = window.position().line + window.dimensions().line - 1; 6242: select_coord(buffer, line, context.selections()); 6242: } 6242: break; 6242: case 'c': 6242: if (context.has_window()) 6242: { 6242: auto& window = context.window(); 6242: auto line = window.position().line + window.dimensions().line / 2; 6242: select_coord(buffer, line, context.selections()); 6242: } 6242: break; 6242: case 'a': 6242: { 6242: Buffer* target = nullptr; 6242: if (not context.has_client() or 6242: not (target = context.client().last_buffer())) 6242: { 6242: context.print_status({"no last buffer", get_face("Error")}); 6242: break; 6242: } 6242: context.push_jump(); 6242: context.change_buffer(*target); 6242: break; 6242: } 6242: case 'f': 6242: { 6242: auto filename = content(buffer, context.selections().main()); 6242: static constexpr char forbidden[] = { '\'', '\\', '\0' }; 6242: if (contains_that(filename, [](char c){ return contains(forbidden, c); })) 6242: return; 6242: 6242: auto paths = context.options()["path"].get>(); 6242: StringView buffer_dir = split_path(buffer.name()).first; 6242: if (not buffer_dir.empty()) 6242: paths.insert(paths.begin(), buffer_dir.str()); 6242: 6242: String path = find_file(filename, paths); 6242: if (path.empty()) 6242: throw runtime_error(format("unable to find file '{}'", filename)); 6242: 6242: Buffer* buffer = BufferManager::instance().get_buffer_ifp(path); 6242: if (not buffer) 6242: { 6242: buffer = open_file_buffer(path, context.hooks_disabled() ? 6242: Buffer::Flags::NoHooks 6242: : Buffer::Flags::None); 6242: buffer->flags() &= ~Buffer::Flags::NoHooks; 6242: } 6242: 6242: if (buffer != &context.buffer()) 6242: { 6242: context.push_jump(); 6242: context.change_buffer(*buffer); 6242: } 6242: break; 6242: } 6242: case '.': 6242: { 6242: context.push_jump(); 6242: auto pos = buffer.last_modification_coord(); 6242: if (pos >= buffer.back_coord()) 6242: pos = buffer.back_coord(); 6242: else if (buffer[pos.line].length() == pos.column + 1) 6242: pos = BufferCoord{ pos.line+1, 0 }; 6242: select_coord(buffer, pos, context.selections()); 6242: break; 6242: } 6242: } 6242: }, "goto", 6242: "g,k: buffer top \n" 6242: "l: line end \n" 6242: "h: line start \n" 6242: "j: buffer bottom \n" 6242: "e: buffer end \n" 6242: "t: window top \n" 6242: "b: window bottom \n" 6242: "c: window center \n" 6242: "a: last buffer \n" 6242: "f: file \n" 6242: ".: last buffer change\n"); 6242: } 6242: } 6242: 6242: template 6242: void view_commands(Context& context, NormalParams params) 6242: { 6242: const int count = params.count; 6242: on_next_key_with_autoinfo(context, KeymapMode::View, 6242: [count](Key key, Context& context) { 6242: if (key == Key::Escape) 6242: return; 6242: 6242: if (lock) 6242: view_commands(context, {}); 6242: 6242: auto cp = key.codepoint(); 6242: if (not cp or not context.has_window()) 6242: return; 6242: 6242: const BufferCoord cursor = context.selections().main().cursor(); 6242: Window& window = context.window(); 6242: switch (to_lower(*cp)) 6242: { 6242: case 'v': 6242: case 'c': 6242: context.window().center_line(cursor.line); 6242: break; 6242: case 'm': 6242: context.window().center_column( 6242: context.buffer()[cursor.line].column_count_to(cursor.column)); 6242: break; 6242: case 't': 6242: context.window().display_line_at(cursor.line, 0); 6242: break; 6242: case 'b': 6242: context.window().display_line_at(cursor.line, window.dimensions().line-1); 6242: break; 6242: case 'h': 6242: context.window().scroll(-std::max(1, count)); 6242: break; 6242: case 'j': 6242: context.window().scroll( std::max(1, count)); 6242: break; 6242: case 'k': 6242: context.window().scroll(-std::max(1, count)); 6242: break; 6242: case 'l': 6242: context.window().scroll( std::max(1, count)); 6242: break; 6242: } 6242: }, "view", 6242: "v,c: center cursor (vertically)\n" 6242: "m: center cursor (horizontally)\n" 6242: "t: cursor on top \n" 6242: "b: cursor on bottom\n" 6242: "h: scroll left \n" 6242: "j: scroll down \n" 6242: "k: scroll up \n" 6242: "l: scroll right \n"); 6242: } 6242: 6242: void replace_with_char(Context& context, NormalParams) 6242: { 6242: on_next_key_with_autoinfo(context, KeymapMode::None, 6242: [](Key key, Context& context) { 6242: auto cp = key.codepoint(); 6242: if (not cp) 6242: return; 6242: ScopedEdition edition(context); 6242: Buffer& buffer = context.buffer(); 6242: SelectionList& selections = context.selections(); 6242: Vector strings; 6242: for (auto& sel : selections) 6242: { 6242: CharCount count = char_length(buffer, sel); 6242: strings.emplace_back(*cp, count); 6242: } 6242: selections.insert(strings, InsertMode::Replace); 6242: }, "replace with char", "enter char to replace with\n"); 6242: } 6242: 6242: Codepoint swap_case(Codepoint cp) 6242: { 6242: Codepoint res = to_lower(cp); 6242: return res == cp ? to_upper(cp) : res; 6242: } 6242: 6242: template 6242: void for_each_codepoint(Context& context, NormalParams) 6242: { 6242: using Utf8It = utf8::iterator; 6242: 6242: ScopedEdition edition(context); 6242: Buffer& buffer = context.buffer(); 6242: SelectionList& selections = context.selections(); 6242: Vector strings; 6242: for (auto& sel : selections) 6242: { 6242: String str; 6242: for (auto begin = Utf8It{buffer.iterator_at(sel.min()), buffer}, 6242: end = Utf8It{buffer.iterator_at(sel.max()), buffer}+1; 6242: begin != end; ++begin) 6242: utf8::dump(std::back_inserter(str), func(*begin)); 6242: 6242: strings.push_back(std::move(str)); 6242: } 6242: selections.insert(strings, InsertMode::Replace); 6242: } 6242: 6242: void command(Context& context, NormalParams params) 6242: { 6242: if (not CommandManager::has_instance()) 6242: return; 6242: 6242: CommandManager::instance().clear_last_complete_command(); 6242: 6242: context.input_handler().prompt( 6242: ":", "", get_face("Prompt"), PromptFlags::DropHistoryEntriesWithBlankPrefix, 6242: [](const Context& context, CompletionFlags flags, 6242: StringView cmd_line, ByteCount pos) { 6242: return CommandManager::instance().complete(context, flags, cmd_line, pos); 6242: }, 6242: [params](StringView cmdline, PromptEvent event, Context& context) { 6242: if (context.has_client()) 6242: { 6242: context.client().info_hide(); 6242: auto autoinfo = context.options()["autoinfo"].get(); 6242: if (event == PromptEvent::Change and autoinfo & AutoInfo::Command) 6242: { 6242: if (cmdline.length() == 1 and is_horizontal_blank(cmdline[0_byte])) 6242: context.client().info_show("prompt", "commands preceded by a blank won't be saved to history", 6242: {}, InfoStyle::Prompt); 6242: 6242: auto info = CommandManager::instance().command_info(context, cmdline); 6242: if (not info.first.empty() and not info.second.empty()) 6242: context.client().info_show(info.first, info.second, {}, InfoStyle::Prompt); 6242: } 6242: } 6242: if (event == PromptEvent::Validate) 6242: { 6242: EnvVarMap env_vars = { 6242: { "count", to_string(params.count) }, 6242: { "register", String{¶ms.reg, 1} } 6242: }; 6242: CommandManager::instance().execute( 6242: cmdline, context, { {}, env_vars }); 6242: } 6242: }); 6242: } 6242: 6242: template 6242: void pipe(Context& context, NormalParams) 6242: { 6242: const char* prompt = replace ? "pipe:" : "pipe-to:"; 6242: context.input_handler().prompt( 6242: prompt, "", get_face("Prompt"), 6242: PromptFlags::DropHistoryEntriesWithBlankPrefix, shell_complete, 6242: [](StringView cmdline, PromptEvent event, Context& context) 6242: { 6242: if (event != PromptEvent::Validate) 6242: return; 6242: 6242: StringView real_cmd; 6242: if (cmdline.empty()) 6242: real_cmd = context.main_sel_register_value("|"); 6242: else 6242: { 6242: RegisterManager::instance()['|'] = cmdline.str(); 6242: real_cmd = cmdline; 6242: } 6242: 6242: if (real_cmd.empty()) 6242: return; 6242: 6242: Buffer& buffer = context.buffer(); 6242: SelectionList& selections = context.selections(); 6242: const int old_main = selections.main_index(); 6242: auto restore_main = on_scope_end([&] { selections.set_main_index(old_main); }); 6242: if (replace) 6242: { 6242: Vector strings; 6242: for (int i = 0; i < selections.size(); ++i) 6242: { 6242: selections.set_main_index(i); 6242: String in = content(buffer, selections.main()); 6242: const bool insert_eol = in.back() != '\n'; 6242: if (insert_eol) 6242: in += '\n'; 6242: String out = ShellManager::instance().eval( 6242: real_cmd, context, in, 6242: ShellManager::Flags::WaitForStdout).first; 6242: 6242: if (insert_eol and out.back() == '\n') 6242: out = out.substr(0, out.length()-1).str(); 6242: strings.push_back(std::move(out)); 6242: } 6242: ScopedEdition edition(context); 6242: selections.insert(strings, InsertMode::Replace); 6242: } 6242: else 6242: { 6242: for (int i = 0; i < selections.size(); ++i) 6242: { 6242: selections.set_main_index(i); 6242: ShellManager::instance().eval(real_cmd, context, 6242: content(buffer, selections.main()), 6242: ShellManager::Flags::None); 6242: } 6242: } 6242: }); 6242: } 6242: 6242: template 6242: void insert_output(Context& context, NormalParams) 6242: { 6242: const char* prompt = mode == InsertMode::Insert ? "insert-output:" : "append-output:"; 6242: context.input_handler().prompt( 6242: prompt, "", get_face("Prompt"), 6242: PromptFlags::DropHistoryEntriesWithBlankPrefix, shell_complete, 6242: [](StringView cmdline, PromptEvent event, Context& context) 6242: { 6242: if (event != PromptEvent::Validate) 6242: return; 6242: 6242: StringView real_cmd; 6242: if (cmdline.empty()) 6242: real_cmd = context.main_sel_register_value("|"); 6242: else 6242: { 6242: RegisterManager::instance()['|'] = cmdline.str(); 6242: real_cmd = cmdline; 6242: } 6242: 6242: if (real_cmd.empty()) 6242: return; 6242: 6242: auto str = ShellManager::instance().eval( 6242: real_cmd, context, {}, ShellManager::Flags::WaitForStdout).first; 6242: ScopedEdition edition(context); 6242: context.selections().insert(str, mode); 6242: }); 6242: } 6242: 6242: template 6242: void select_next_match(const Buffer& buffer, SelectionList& selections, 6242: const Regex& regex, bool& main_wrapped) 6242: { 6242: const int main_index = selections.main_index(); 6242: bool wrapped = false; 6242: if (mode == SelectMode::Replace) 6242: { 6242: for (int i = 0; i < selections.size(); ++i) 6242: { 6242: auto& sel = selections[i]; 6242: sel = keep_direction(find_next_match(buffer, sel, regex, wrapped), sel); 6242: if (i == main_index) 6242: main_wrapped = wrapped; 6242: } 6242: } 6242: if (mode == SelectMode::Extend) 6242: { 6242: for (int i = 0; i < selections.size(); ++i) 6242: { 6242: auto& sel = selections[i]; 6242: sel.merge_with(find_next_match(buffer, sel, regex, wrapped)); 6242: if (i == main_index) 6242: main_wrapped = wrapped; 6242: } 6242: } 6242: else if (mode == SelectMode::Append) 6242: { 6242: auto sel = keep_direction( 6242: find_next_match(buffer, selections.main(), regex, main_wrapped), 6242: selections.main()); 6242: selections.push_back(std::move(sel)); 6242: selections.set_main_index(selections.size() - 1); 6242: } 6242: selections.sort_and_merge_overlapping(); 6242: } 6242: 6242: void yank(Context& context, NormalParams params) 6242: { 6242: const char reg = params.reg ? params.reg : '"'; 6242: RegisterManager::instance()[reg] = context.selections_content(); 6242: context.print_status({ format("yanked {} selections to register {}", 6242: context.selections().size(), reg), 6242: get_face("Information") }); 6242: } 6242: 6242: void erase_selections(Context& context, NormalParams params) 6242: { 6242: const char reg = params.reg ? params.reg : '"'; 6242: RegisterManager::instance()[reg] = context.selections_content(); 6242: ScopedEdition edition(context); 6242: context.selections().erase(); 6242: context.selections().avoid_eol(); 6242: } 6242: 6242: void change(Context& context, NormalParams params) 6242: { 6242: const char reg = params.reg ? params.reg : '"'; 6242: RegisterManager::instance()[reg] = context.selections_content(); 6242: enter_insert_mode(context, params); 6242: } 6242: 6242: constexpr InsertMode adapt_for_linewise(InsertMode mode) 6242: { 6242: return ((mode == InsertMode::Append) ? 6242: InsertMode::InsertAtNextLineBegin : 6242: ((mode == InsertMode::Insert) ? 6242: InsertMode::InsertAtLineBegin : 6242: ((mode == InsertMode::Replace) ? 6242: InsertMode::Replace : InsertMode::Insert))); 6242: } 6242: 6242: template 6242: void paste(Context& context, NormalParams params) 6242: { 6242: const char reg = params.reg ? params.reg : '"'; 6242: auto strings = RegisterManager::instance()[reg].values(context); 6242: InsertMode effective_mode = mode; 6242: for (auto& str : strings) 6242: { 6242: if (not str.empty() and str.back() == '\n') 6242: { 6242: effective_mode = adapt_for_linewise(mode); 6242: break; 6242: } 6242: } 6242: ScopedEdition edition(context); 6242: context.selections().insert(strings, effective_mode); 6242: } 6242: 6242: template 6242: void paste_all(Context& context, NormalParams params) 6242: { 6242: const char reg = params.reg ? params.reg : '"'; 6242: auto strings = RegisterManager::instance()[reg].values(context); 6242: InsertMode effective_mode = mode; 6242: String all; 6242: Vector offsets; 6242: for (auto& str : strings) 6242: { 6242: if (str.empty()) 6242: continue; 6242: 6242: if (str.back() == '\n') 6242: effective_mode = adapt_for_linewise(mode); 6242: all += str; 6242: offsets.push_back(all.length()); 6242: } 6242: 6242: auto& selections = context.selections(); 6242: { 6242: ScopedEdition edition(context); 6242: selections.insert(all, effective_mode, true); 6242: } 6242: 6242: const Buffer& buffer = context.buffer(); 6242: Vector result; 6242: for (auto& selection : selections) 6242: { 6242: ByteCount pos = 0; 6242: for (auto offset : offsets) 6242: { 6242: result.push_back({ buffer.advance(selection.min(), pos), 6242: buffer.advance(selection.min(), offset-1) }); 6242: pos = offset; 6242: } 6242: } 6242: if (not result.empty()) 6242: selections = std::move(result); 6242: } 6242: 6242: template 6242: void regex_prompt(Context& context, String prompt, T func) 6242: { 6242: DisplayCoord position = context.has_window() ? context.window().position() : DisplayCoord{}; 6242: SelectionList selections = context.selections(); 6242: context.input_handler().prompt( 6242: std::move(prompt), "", get_face("Prompt"), PromptFlags::None, complete_nothing, 6242: [=](StringView str, PromptEvent event, Context& context) mutable { 6242: try 6242: { 6242: if (event != PromptEvent::Change and context.has_client()) 6242: context.client().info_hide(); 6242: 6242: const bool incsearch = context.options()["incsearch"].get(); 6242: if (incsearch) 6242: { 6242: selections.update(); 6242: context.selections_write_only() = selections; 6242: if (context.has_window()) 6242: context.window().set_position(position); 6242: 6242: context.input_handler().set_prompt_face(get_face("Prompt")); 6242: } 6242: 6242: if (event == PromptEvent::Abort or 6242: (event == PromptEvent::Change and (not incsearch or str.empty()))) 6242: return; 6242: 6242: if (event == PromptEvent::Validate) 6242: context.push_jump(); 6242: 6242: func(str.empty() ? Regex{} : Regex{str}, event, context); 6242: } 6242: catch (regex_error& err) 6242: { 6242: if (event == PromptEvent::Validate) 6242: throw; 6242: else 6242: context.input_handler().set_prompt_face(get_face("Error")); 6242: } 6242: catch (runtime_error&) 6242: { 6242: context.selections_write_only() = selections; 6242: 6242: 6242: if (event == PromptEvent::Validate) 6242: throw; 6242: } 6242: }); 6242: } 6242: 6242: template 6242: void search(Context& context, NormalParams params) 6242: { 6242: constexpr StringView prompt = mode == SelectMode::Extend ? 6242: (direction == Forward ? "search (extend):" : "reverse search (extend):") 6242: : (direction == Forward ? "search:" : "reverse search:"); 6242: 6242: const char reg = to_lower(params.reg ? params.reg : '/'); 6242: int count = params.count; 6242: regex_prompt(context, prompt.str(), 6242: [reg, count](Regex ex, PromptEvent event, Context& context) { 6242: if (ex.empty()) 6242: ex = Regex{context.main_sel_register_value(reg)}; 6242: else if (event == PromptEvent::Validate) 6242: RegisterManager::instance()[reg] = ex.str(); 6242: if (not ex.empty() and not ex.str().empty()) 6242: { 6242: bool main_wrapped = false; 6242: int c = count; 6242: do { 6242: select_next_match(context.buffer(), context.selections(), ex, main_wrapped); 6242: } while (--c > 0); 6242: } 6242: }); 6242: } 6242: 6242: template 6242: void search_next(Context& context, NormalParams params) 6242: { 6242: const char reg = to_lower(params.reg ? params.reg : '/'); 6242: StringView str = context.main_sel_register_value(reg); 6242: if (not str.empty()) 6242: { 6242: Regex ex{str}; 6242: bool main_wrapped = false; 6242: do { 6242: bool wrapped = false; 6242: select_next_match(context.buffer(), context.selections(), ex, wrapped); 6242: main_wrapped = main_wrapped or wrapped; 6242: } while (--params.count > 0); 6242: 6242: if (main_wrapped) 6242: context.print_status({"main selection search wrapped around buffer", get_face("Information")}); 6242: } 6242: else 6242: throw runtime_error("no search pattern"); 6242: } 6242: 6242: template 6242: void use_selection_as_search_pattern(Context& context, NormalParams params) 6242: { 6242: Vector patterns; 6242: auto& sels = context.selections(); 6242: const auto& buffer = context.buffer(); 6242: for (auto& sel : sels) 6242: { 6242: const auto beg = sel.min(), end = buffer.char_next(sel.max()); 6242: patterns.push_back(format("{}\\Q{}\\E{}", 6242: smart and is_bow(buffer, beg) ? "\\b" : "", 6242: buffer.string(beg, end), 6242: smart and is_eow(buffer, end) ? "\\b" : "")); 6242: } 6242: 6242: const char reg = to_lower(params.reg ? params.reg : '/'); 6242: 6242: context.print_status({ 6242: format("register '{}' set to '{}'", reg, patterns[sels.main_index()]), 6242: get_face("Information") }); 6242: 6242: RegisterManager::instance()[reg] = patterns; 6242: 6242: 6242: if (context.has_window()) 6242: context.window().force_redraw(); 6242: } 6242: 6242: void select_regex(Context& context, NormalParams params) 6242: { 6242: const char reg = to_lower(params.reg ? params.reg : '/'); 6242: unsigned capture = (unsigned)params.count; 6242: auto prompt = capture ? format("select (capture {}):", (int)capture) : "select:"_str; 6242: regex_prompt(context, std::move(prompt), 6242: [reg, capture](Regex ex, PromptEvent event, Context& context) { 6242: if (ex.empty()) 6242: ex = Regex{context.main_sel_register_value(reg)}; 6242: else if (event == PromptEvent::Validate) 6242: RegisterManager::instance()[reg] = ex.str(); 6242: if (not ex.empty() and not ex.str().empty()) 6242: select_all_matches(context.selections(), ex, capture); 6242: }); 6242: } 6242: 6242: void split_regex(Context& context, NormalParams params) 6242: { 6242: const char reg = to_lower(params.reg ? params.reg : '/'); 6242: unsigned capture = (unsigned)params.count; 6242: auto prompt = capture ? format("split (on capture {}):", (int)capture) : "split:"_str; 6242: regex_prompt(context, std::move(prompt), 6242: [reg, capture](Regex ex, PromptEvent event, Context& context) { 6242: if (ex.empty()) 6242: ex = Regex{context.main_sel_register_value(reg)}; 6242: else if (event == PromptEvent::Validate) 6242: RegisterManager::instance()[reg] = ex.str(); 6242: if (not ex.empty() and not ex.str().empty()) 6242: split_selections(context.selections(), ex, capture); 6242: }); 6242: } 6242: 6242: void split_lines(Context& context, NormalParams) 6242: { 6242: auto& selections = context.selections(); 6242: auto& buffer = context.buffer(); 6242: Vector res; 6242: for (auto& sel : selections) 6242: { 6242: if (sel.anchor().line == sel.cursor().line) 6242: { 6242: res.push_back(std::move(sel)); 6242: continue; 6242: } 6242: auto min = sel.min(); 6242: auto max = sel.max(); 6242: res.push_back(keep_direction({min, {min.line, buffer[min.line].length()-1}}, sel)); 6242: for (auto line = min.line+1; line < max.line; ++line) 6242: res.push_back(keep_direction({line, {line, buffer[line].length()-1}}, sel)); 6242: res.push_back(keep_direction({max.line, max}, sel)); 6242: } 6242: selections = std::move(res); 6242: } 6242: 6242: void join_lines_select_spaces(Context& context, NormalParams) 6242: { 6242: auto& buffer = context.buffer(); 6242: Vector selections; 6242: for (auto& sel : context.selections()) 6242: { 6242: const LineCount min_line = sel.min().line; 6242: const LineCount max_line = sel.max().line; 6242: auto end_line = std::min(buffer.line_count()-1, 6242: max_line + (min_line == max_line ? 1 : 0)); 6242: for (LineCount line = min_line; line < end_line; ++line) 6242: { 6242: auto begin = buffer.iterator_at({line, buffer[line].length()-1}); 6242: auto end = std::find_if_not(begin+1, buffer.end(), is_horizontal_blank); 6242: selections.push_back({begin.coord(), (end-1).coord()}); 6242: } 6242: } 6242: if (selections.empty()) 6242: return; 6242: context.selections_write_only() = std::move(selections); 6242: ScopedEdition edition(context); 6242: context.selections().insert(" "_str, InsertMode::Replace); 6242: } 6242: 6242: void join_lines(Context& context, NormalParams params) 6242: { 6242: SelectionList sels{context.selections()}; 6242: auto restore_sels = on_scope_end([&]{ 6242: sels.update(); 6242: context.selections_write_only() = std::move(sels); 6242: }); 6242: 6242: join_lines_select_spaces(context, params); 6242: } 6242: 6242: template 6242: void keep(Context& context, NormalParams) 6242: { 6242: constexpr const char* prompt = matching ? "keep matching:" : "keep not matching:"; 6242: regex_prompt(context, prompt, [](const Regex& ex, PromptEvent, Context& context) { 6242: if (ex.empty()) 6242: return; 6242: const Buffer& buffer = context.buffer(); 6242: 6242: Vector keep; 6242: for (auto& sel : context.selections()) 6242: { 6242: auto begin = buffer.iterator_at(sel.min()); 6242: auto end = utf8::next(buffer.iterator_at(sel.max()), buffer.end()); 6242: 6242: 6242: const auto flags = match_flags(is_bol(begin.coord()), false, 6242: is_bow(buffer, begin.coord()), 6242: is_eow(buffer, end.coord())) | 6242: RegexConstant::match_any; 6242: if (regex_search(begin, end, ex, flags) == matching) 6242: keep.push_back(sel); 6242: } 6242: if (keep.empty()) 6242: throw runtime_error("no selections remaining"); 6242: context.selections_write_only() = std::move(keep); 6242: }); 6242: } 6242: 6242: void keep_pipe(Context& context, NormalParams) 6242: { 6242: context.input_handler().prompt( 6242: "keep pipe:", "", get_face("Prompt"), 6242: PromptFlags::DropHistoryEntriesWithBlankPrefix, shell_complete, 6242: [](StringView cmdline, PromptEvent event, Context& context) { 6242: if (event != PromptEvent::Validate) 6242: return; 6242: const Buffer& buffer = context.buffer(); 6242: auto& shell_manager = ShellManager::instance(); 6242: Vector keep; 6242: for (auto& sel : context.selections()) 6242: { 6242: if (shell_manager.eval(cmdline, context, content(buffer, sel), 6242: ShellManager::Flags::None).second == 0) 6242: keep.push_back(sel); 6242: } 6242: if (keep.empty()) 6242: throw runtime_error("no selections remaining"); 6242: context.selections_write_only() = std::move(keep); 6242: }); 6242: } 6242: template 6242: void indent(Context& context, NormalParams) 6242: { 6242: CharCount indent_width = context.options()["indentwidth"].get(); 6242: String indent = indent_width == 0 ? "\t" : String{' ', indent_width}; 6242: 6242: auto& buffer = context.buffer(); 6242: Vector sels; 6242: LineCount last_line = 0; 6242: for (auto& sel : context.selections()) 6242: { 6242: for (auto line = std::max(last_line, sel.min().line); line < sel.max().line+1; ++line) 6242: { 6242: if (indent_empty or buffer[line].length() > 1) 6242: sels.push_back({line, line}); 6242: } 6242: 6242: last_line = sel.max().line+1; 6242: } 6242: if (not sels.empty()) 6242: { 6242: ScopedEdition edition(context); 6242: SelectionList selections{buffer, std::move(sels)}; 6242: selections.insert(indent, InsertMode::Insert); 6242: } 6242: } 6242: 6242: template 6242: void deindent(Context& context, NormalParams) 6242: { 6242: ColumnCount tabstop = context.options()["tabstop"].get(); 6242: ColumnCount indent_width = context.options()["indentwidth"].get(); 6242: if (indent_width == 0) 6242: indent_width = tabstop; 6242: 6242: auto& buffer = context.buffer(); 6242: Vector sels; 6242: LineCount last_line = 0; 6242: for (auto& sel : context.selections()) 6242: { 6242: for (auto line = std::max(sel.min().line, last_line); 6242: line < sel.max().line+1; ++line) 6242: { 6242: ColumnCount width = 0; 6242: auto content = buffer[line]; 6242: for (auto column = 0_byte; column < content.length(); ++column) 6242: { 6242: const char c = content[column]; 6242: if (c == '\t') 6242: width = (width / tabstop + 1) * tabstop; 6242: else if (c == ' ') 6242: ++width; 6242: else 6242: { 6242: if (deindent_incomplete and width != 0) 6242: sels.push_back({ line, BufferCoord{line, column-1} }); 6242: break; 6242: } 6242: if (width == indent_width) 6242: { 6242: sels.push_back({ line, BufferCoord{line, column} }); 6242: break; 6242: } 6242: } 6242: } 6242: 6242: last_line = sel.max().line + 1; 6242: } 6242: if (not sels.empty()) 6242: { 6242: ScopedEdition edition(context); 6242: SelectionList selections{context.buffer(), std::move(sels)}; 6242: selections.erase(); 6242: } 6242: } 6242: 6242: template 6242: void select_object(Context& context, NormalParams params) 6242: { 6242: auto get_title = [] { 6242: const auto whole_flags = (ObjectFlags::ToBegin | ObjectFlags::ToEnd); 6242: const bool whole = (flags & whole_flags) == whole_flags; 6242: return format("select {}{}object{}", 6242: whole ? "" : "to ", 6242: flags & ObjectFlags::Inner ? "inner " : "", 6242: whole ? "" : (flags & ObjectFlags::ToBegin ? " begin" : " end")); 6242: }; 6242: 6242: const int count = params.count <= 0 ? 0 : params.count - 1; 6242: on_next_key_with_autoinfo(context, KeymapMode::Object, 6242: [count](Key key, Context& context) { 6242: auto cp = key.codepoint().value_or((Codepoint)-1); 6242: if (cp == -1) 6242: return; 6242: 6242: static constexpr struct ObjectType 6242: { 6242: Codepoint key; 6242: Selection (*func)(const Buffer&, const Selection&, int, ObjectFlags); 6242: } selectors[] = { 6242: { 'w', select_word }, 6242: { 'W', select_word }, 6242: { 's', select_sentence }, 6242: { 'p', select_paragraph }, 6242: { ' ', select_whitespaces }, 6242: { 'i', select_indent }, 6242: { 'n', select_number }, 6242: { 'u', select_argument }, 6242: }; 6242: auto obj_it = find(selectors | transform(std::mem_fn(&ObjectType::key)), cp).base(); 6242: if (obj_it != std::end(selectors)) 6242: return select_and_set_last( 6242: context, std::bind(obj_it->func, _1, _2, count, flags)); 6242: 6242: if (cp == ':') 6242: { 6242: const bool info = show_auto_info_ifn( 6242: "Enter object desc", "format: ,", 6242: AutoInfo::Command, context); 6242: 6242: context.input_handler().prompt( 6242: "object desc:", "", get_face("Prompt"), 6242: PromptFlags::None, complete_nothing, 6242: [count,info](StringView cmdline, PromptEvent event, Context& context) { 6242: if (event != PromptEvent::Change) 6242: hide_auto_info_ifn(context, info); 6242: if (event != PromptEvent::Validate) 6242: return; 6242: 6242: Vector params = split(cmdline, ',', '\\'); 6242: if (params.size() != 2 or params[0].empty() or params[1].empty()) 6242: throw runtime_error{"desc parsing failed, expected ,"}; 6242: 6242: select_and_set_last( 6242: context, std::bind(select_surrounding, _1, _2, 6242: params[0], params[1], 6242: count, flags)); 6242: }); 6242: return; 6242: } 6242: 6242: static constexpr struct SurroundingPair 6242: { 6242: StringView opening; 6242: StringView closing; 6242: Codepoint name; 6242: } surrounding_pairs[] = { 6242: { "(", ")", 'b' }, 6242: { "{", "}", 'B' }, 6242: { "[", "]", 'r' }, 6242: { "<", ">", 'a' }, 6242: { "\"", "\"", 'Q' }, 6242: { "'", "'", 'q' }, 6242: { "`", "`", 'g' }, 6242: }; 6242: auto pair_it = find_if(surrounding_pairs, 6242: [cp](const SurroundingPair& s) { 6242: return s.opening[0_char] == cp or 6242: s.closing[0_char] == cp or 6242: (s.name != 0 and s.name == cp); 6242: }); 6242: if (pair_it != std::end(surrounding_pairs)) 6242: return select_and_set_last( 6242: context, std::bind(select_surrounding, _1, _2, 6242: pair_it->opening, pair_it->closing, 6242: count, flags)); 6242: 6242: if (is_punctuation(cp)) 6242: { 6242: auto utf8cp = to_string(cp); 6242: return select_and_set_last( 6242: context, std::bind(select_surrounding, _1, _2, 6242: utf8cp, utf8cp, count, flags)); 6242: } 6242: }, get_title(), 6242: "b,(,): parenthesis block\n" 6242: "B,{,}: braces block \n" 6242: "r,[,]: brackets block \n" 6242: "a,<,>: angle block \n" 6242: "\",Q: double quote string\n" 6242: "',q: single quote string\n" 6242: "`,g: grave quote string \n" 6242: "w: word \n" 6242: "W: WORD \n" 6242: "s: sentence \n" 6242: "p: paragraph \n" 6242: "␣: whitespaces \n" 6242: "i: indent \n" 6242: "u: argument \n" 6242: "n: number \n" 6242: ":: custom object desc \n"); 6242: } 6242: 6242: template 6242: void scroll(Context& context, NormalParams) 6242: { 6242: Window& window = context.window(); 6242: const LineCount offset = (window.dimensions().line - 2) / (half ? 2 : 1); 6242: 6242: scroll_window(context, direction == Direction::Forward ? offset : -offset); 6242: } 6242: 6242: template 6242: void copy_selections_on_next_lines(Context& context, NormalParams params) 6242: { 6242: auto& selections = context.selections(); 6242: auto& buffer = context.buffer(); 6242: const ColumnCount tabstop = context.options()["tabstop"].get(); 6242: Vector result; 6242: for (auto& sel : selections) 6242: { 6242: auto anchor = sel.anchor(); 6242: auto cursor = sel.cursor(); 6242: ColumnCount cursor_col = get_column(buffer, tabstop, cursor); 6242: ColumnCount anchor_col = get_column(buffer, tabstop, anchor); 6242: result.push_back(std::move(sel)); 6242: for (int i = 0; i < std::max(params.count, 1); ++i) 6242: { 6242: LineCount offset = (direction == Forward ? 1 : -1) * (i + 1); 6242: 6242: const LineCount anchor_line = anchor.line + offset; 6242: const LineCount cursor_line = cursor.line + offset; 6242: 6242: if (anchor_line < 0 or cursor_line < 0 or 6242: anchor_line >= buffer.line_count() or cursor_line >= buffer.line_count()) 6242: continue; 6242: 6242: ByteCount anchor_byte = get_byte_to_column(buffer, tabstop, {anchor_line, anchor_col}); 6242: ByteCount cursor_byte = get_byte_to_column(buffer, tabstop, {cursor_line, cursor_col}); 6242: 6242: if (anchor_byte != buffer[anchor_line].length() and 6242: cursor_byte != buffer[cursor_line].length()) 6242: result.emplace_back(BufferCoord{anchor_line, anchor_byte}, 6242: BufferCoordAndTarget{cursor_line, cursor_byte, cursor.target}); 6242: } 6242: } 6242: selections = std::move(result); 6242: selections.sort_and_merge_overlapping(); 6242: } 6242: 6242: void rotate_selections(Context& context, NormalParams params) 6242: { 6242: context.selections().rotate_main(params.count != 0 ? params.count : 1); 6242: } 6242: 6242: void rotate_selections_content(Context& context, NormalParams params) 6242: { 6242: int group = params.count; 6242: int count = 1; 6242: auto strings = context.selections_content(); 6242: if (group == 0 or group > (int)strings.size()) 6242: group = (int)strings.size(); 6242: count = count % group; 6242: for (auto it = strings.begin(); it != strings.end(); ) 6242: { 6242: auto end = std::min(strings.end(), it + group); 6242: std::rotate(it, end-count, end); 6242: it = end; 6242: } 6242: context.selections().insert(strings, InsertMode::Replace); 6242: context.selections().rotate_main(count); 6242: } 6242: 6242: enum class SelectFlags 6242: { 6242: None = 0, 6242: Reverse = 1, 6242: Inclusive = 2, 6242: Extend = 4 6242: }; 6242: 6242: template<> struct WithBitOps : std::true_type {}; 6242: 6242: template 6242: void select_to_next_char(Context& context, NormalParams params) 6242: { 6242: auto get_title = [] { 6242: return format("{}select {} next char", 6242: flags & SelectFlags::Reverse ? "reverse " : "", 6242: flags & SelectFlags::Inclusive ? "onto" : "to"); 6242: }; 6242: 6242: on_next_key_with_autoinfo(context, KeymapMode::None, 6242: [params](Key key, Context& context) { 6242: constexpr auto new_flags = flags & SelectFlags::Extend ? SelectMode::Extend 6242: : SelectMode::Replace; 6242: if (auto cp = key.codepoint()) 6242: select_and_set_last( 6242: context, 6242: std::bind(flags & SelectFlags::Reverse ? select_to_reverse 6242: : select_to, 6242: _1, _2, *cp, params.count, 6242: flags & SelectFlags::Inclusive)); 6242: }, get_title(),"enter char to select to"); 6242: } 6242: 6242: void start_or_end_macro_recording(Context& context, NormalParams params) 6242: { 6242: if (context.input_handler().is_recording()) 6242: context.input_handler().stop_recording(); 6242: else 6242: { 6242: const char reg = to_lower(params.reg ? params.reg : '@'); 6242: if (not is_basic_alpha(reg) and reg != '@') 6242: throw runtime_error("Macros can only use the '@' and alphabetic registers"); 6242: context.input_handler().start_recording(reg); 6242: } 6242: } 6242: 6242: void end_macro_recording(Context& context, NormalParams) 6242: { 6242: if (context.input_handler().is_recording()) 6242: context.input_handler().stop_recording(); 6242: } 6242: 6242: void replay_macro(Context& context, NormalParams params) 6242: { 6242: const char reg = to_lower(params.reg ? params.reg : '@'); 6242: if (not is_basic_alpha(reg) and reg != '@') 6242: throw runtime_error("Macros can only use the '@' and alphabetic registers"); 6242: 6242: static bool running_macros[27] = {}; 6242: const size_t idx = reg != '@' ? (size_t)(reg - 'a') : 26; 6242: if (running_macros[idx]) 6242: throw runtime_error("recursive macros call detected"); 6242: 6242: ConstArrayView reg_val = RegisterManager::instance()[reg].values(context); 6242: if (reg_val.empty() or reg_val[0].empty()) 6242: throw runtime_error(format("Register '{}' is empty", reg)); 6242: 6242: running_macros[idx] = true; 6242: auto stop = on_scope_end([&]{ running_macros[idx] = false; }); 6242: 6242: auto keys = parse_keys(reg_val[0]); 6242: ScopedEdition edition(context); 6242: do 6242: { 6242: for (auto& key : keys) 6242: context.input_handler().handle_key(key); 6242: } while (--params.count > 0); 6242: } 6242: 6242: template 6242: void jump(Context& context, NormalParams) 6242: { 6242: auto jump = (direction == Forward) ? 6242: context.jump_list().forward() : 6242: context.jump_list().backward(context.selections()); 6242: 6242: Buffer* oldbuf = &context.buffer(); 6242: Buffer& buffer = const_cast(jump.buffer()); 6242: if (&buffer != oldbuf) 6242: context.change_buffer(buffer); 6242: context.selections_write_only() = jump; 6242: } 6242: 6242: void push_selections(Context& context, NormalParams) 6242: { 6242: context.push_jump(); 6242: context.print_status({ format("saved {} selections", context.selections().size()), 6242: get_face("Information") }); 6242: } 6242: 6242: void align(Context& context, NormalParams) 6242: { 6242: auto& selections = context.selections(); 6242: auto& buffer = context.buffer(); 6242: const ColumnCount tabstop = context.options()["tabstop"].get(); 6242: 6242: Vector> columns; 6242: LineCount last_line = -1; 6242: size_t column = 0; 6242: for (auto& sel : selections) 6242: { 6242: auto line = sel.cursor().line; 6242: if (sel.anchor().line != line) 6242: throw runtime_error("align cannot work with multi line selections"); 6242: 6242: column = (line == last_line) ? column + 1 : 0; 6242: if (column >= columns.size()) 6242: columns.resize(column+1); 6242: columns[column].push_back(&sel); 6242: last_line = line; 6242: } 6242: 6242: const bool use_tabs = context.options()["aligntab"].get(); 6242: for (auto& col : columns) 6242: { 6242: ColumnCount maxcol = 0; 6242: for (auto& sel : col) 6242: maxcol = std::max(get_column(buffer, tabstop, sel->cursor()), maxcol); 6242: for (auto& sel : col) 6242: { 6242: auto insert_coord = sel->min(); 6242: ColumnCount lastcol = get_column(buffer, tabstop, sel->cursor()); 6242: ColumnCount inscount = maxcol - lastcol; 6242: String padstr; 6242: if (not use_tabs) 6242: padstr = String{ ' ', inscount }; 6242: else 6242: { 6242: ColumnCount inscol = get_column(buffer, tabstop, insert_coord); 6242: ColumnCount targetcol = inscol + inscount; 6242: ColumnCount tabcol = inscol - (inscol % tabstop); 6242: CharCount tabs = (int)((targetcol - tabcol) / tabstop); 6242: CharCount spaces = (int)(targetcol - (tabs ? (tabcol + (int)tabs * tabstop) : inscol)); 6242: padstr = String{ '\t', tabs } + String{ ' ', spaces }; 6242: } 6242: buffer.insert(insert_coord, std::move(padstr)); 6242: } 6242: selections.update(); 6242: } 6242: } 6242: 6242: void copy_indent(Context& context, NormalParams params) 6242: { 6242: int selection = params.count; 6242: auto& buffer = context.buffer(); 6242: auto& selections = context.selections(); 6242: Vector lines; 6242: for (auto sel : selections) 6242: { 6242: for (LineCount l = sel.min().line; l < sel.max().line + 1; ++l) 6242: lines.push_back(l); 6242: } 6242: if (selection > selections.size()) 6242: throw runtime_error("invalid selection index"); 6242: if (selection == 0) 6242: selection = context.selections().main_index() + 1; 6242: 6242: auto ref_line = selections[selection-1].min().line; 6242: auto line = buffer[ref_line]; 6242: auto it = line.begin(); 6242: while (it != line.end() and is_horizontal_blank(*it)) 6242: ++it; 6242: const StringView indent = line.substr(0_byte, (int)(it-line.begin())); 6242: 6242: ScopedEdition edition{context}; 6242: for (auto& l : lines) 6242: { 6242: if (l == ref_line) 6242: continue; 6242: 6242: auto line = buffer[l]; 6242: ByteCount i = 0; 6242: while (i < line.length() and is_horizontal_blank(line[i])) 6242: ++i; 6242: buffer.replace(l, {l, i}, indent); 6242: } 6242: } 6242: 6242: void tabs_to_spaces(Context& context, NormalParams params) 6242: { 6242: auto& buffer = context.buffer(); 6242: const ColumnCount opt_tabstop = context.options()["tabstop"].get(); 6242: const ColumnCount tabstop = params.count == 0 ? opt_tabstop : params.count; 6242: Vector tabs; 6242: Vector spaces; 6242: for (auto& sel : context.selections()) 6242: { 6242: for (auto it = buffer.iterator_at(sel.min()), 6242: end = buffer.iterator_at(sel.max())+1; it != end; ++it) 6242: { 6242: if (*it == '\t') 6242: { 6242: ColumnCount col = get_column(buffer, opt_tabstop, it.coord()); 6242: ColumnCount end_col = (col / tabstop + 1) * tabstop; 6242: tabs.push_back({ it.coord() }); 6242: spaces.push_back(String{ ' ', end_col - col }); 6242: } 6242: } 6242: } 6242: if (not tabs.empty()) 6242: SelectionList{ buffer, std::move(tabs) }.insert(spaces, InsertMode::Replace); 6242: } 6242: 6242: void spaces_to_tabs(Context& context, NormalParams params) 6242: { 6242: auto& buffer = context.buffer(); 6242: const ColumnCount opt_tabstop = context.options()["tabstop"].get(); 6242: const ColumnCount tabstop = params.count == 0 ? opt_tabstop : params.count; 6242: Vector spaces; 6242: for (auto& sel : context.selections()) 6242: { 6242: for (auto it = buffer.iterator_at(sel.min()), 6242: end = buffer.iterator_at(sel.max())+1; it != end;) 6242: { 6242: if (*it == ' ') 6242: { 6242: auto spaces_beg = it; 6242: auto spaces_end = spaces_beg+1; 6242: ColumnCount col = get_column(buffer, opt_tabstop, spaces_end.coord()); 6242: while (spaces_end != end and 6242: *spaces_end == ' ' and (col % tabstop) != 0) 6242: { 6242: ++spaces_end; 6242: ++col; 6242: } 6242: if ((col % tabstop) == 0) 6242: spaces.push_back({spaces_beg.coord(), (spaces_end-1).coord()}); 6242: else if (spaces_end != end and *spaces_end == '\t') 6242: spaces.push_back({spaces_beg.coord(), spaces_end.coord()}); 6242: it = spaces_end; 6242: } 6242: else 6242: ++it; 6242: } 6242: } 6242: if (not spaces.empty()) 6242: SelectionList{ buffer, std::move(spaces) }.insert("\t"_str, InsertMode::Replace); 6242: } 6242: 6242: SelectionList read_selections_from_register(char reg, Context& context) 6242: { 6242: if (not is_basic_alpha(reg) and reg != '^') 6242: throw runtime_error("selections can only be saved to the '^' and alphabetic registers"); 6242: 6242: auto content = RegisterManager::instance()[reg].values(context); 6242: 6242: if (content.size() != 1) 6242: throw runtime_error(format("Register {} does not contain a selections desc", reg)); 6242: 6242: StringView desc = content[0]; 6242: auto arobase = find(desc, '@'); 6242: auto percent = find(desc, '%'); 6242: 6242: if (arobase == desc.end() or percent == desc.end()) 6242: throw runtime_error(format("Register {} does not contain a selections desc", reg)); 6242: 6242: Buffer& buffer = BufferManager::instance().get_buffer({arobase+1, percent}); 6242: size_t timestamp = str_to_int({percent + 1, desc.end()}); 6242: 6242: Vector sels; 6242: for (auto sel_desc : StringView{desc.begin(), arobase} | split(':')) 6242: sels.push_back(selection_from_string(sel_desc)); 6242: 6242: return {buffer, std::move(sels), timestamp}; 6242: } 6242: 6242: template 6242: void save_selections(Context& context, NormalParams params) 6242: { 6242: const char reg = to_lower(params.reg ? params.reg : '^'); 6242: if (not is_basic_alpha(reg) and reg != '^') 6242: throw runtime_error("selections can only be saved to the '^' and alphabetic registers"); 6242: 6242: auto gen_desc = [&] { 6242: if (not add) 6242: return selection_list_to_string(context.selections()); 6242: 6242: auto selections = read_selections_from_register(reg, context); 6242: if (&selections.buffer() != &context.buffer()) 6242: throw runtime_error("cannot save selections from different buffers in the same register"); 6242: selections.update(); 6242: 6242: for (auto& sel : context.selections()) 6242: selections.push_back(sel); 6242: selections.sort_and_merge_overlapping(); 6242: return selection_list_to_string(selections); 6242: }; 6242: 6242: String desc = format("{}@{}%{}", gen_desc(), 6242: context.buffer().name(), 6242: context.buffer().timestamp()); 6242: 6242: RegisterManager::instance()[reg] = desc; 6242: 6242: context.print_status({format("{} selections to register '{}'", add ? "Added" : "Saved", reg), get_face("Information")}); 6242: } 6242: 6242: template 6242: void restore_selections(Context& context, NormalParams params) 6242: { 6242: const char reg = to_lower(params.reg ? params.reg : '^'); 6242: auto selections = read_selections_from_register(reg, context); 6242: 6242: if (not add) 6242: { 6242: if (&selections.buffer() != &context.buffer()) 6242: context.change_buffer(selections.buffer()); 6242: } 6242: else 6242: { 6242: if (&selections.buffer() != &context.buffer()) 6242: throw runtime_error("Cannot add selections from another buffer"); 6242: 6242: selections.update(); 6242: int main_index = selections.size() + context.selections_write_only().main_index(); 6242: for (auto& sel : context.selections()) 6242: selections.push_back(std::move(sel)); 6242: 6242: selections.set_main_index(main_index); 6242: selections.sort_and_merge_overlapping(); 6242: } 6242: 6242: context.selections_write_only() = std::move(selections); 6242: context.print_status({format("{} selections from register '{}'", add ? "Added" : "Restored", reg), get_face("Information")}); 6242: } 6242: 6242: void undo(Context& context, NormalParams params) 6242: { 6242: Buffer& buffer = context.buffer(); 6242: size_t timestamp = buffer.timestamp(); 6242: if (buffer.undo(std::max(1, params.count))) 6242: { 6242: auto ranges = compute_modified_ranges(buffer, timestamp); 6242: if (not ranges.empty()) 6242: context.selections_write_only() = std::move(ranges); 6242: } 6242: else 6242: context.print_status({ "nothing left to undo", get_face("Information") }); 6242: } 6242: 6242: void redo(Context& context, NormalParams params) 6242: { 6242: Buffer& buffer = context.buffer(); 6242: size_t timestamp = buffer.timestamp(); 6242: if (buffer.redo(std::max(1, params.count))) 6242: { 6242: auto ranges = compute_modified_ranges(buffer, timestamp); 6242: if (not ranges.empty()) 6242: context.selections_write_only() = std::move(ranges); 6242: } 6242: else 6242: context.print_status({ "nothing left to redo", get_face("Information") }); 6242: } 6242: 6242: template 6242: void move_in_history(Context& context, NormalParams params) 6242: { 6242: Buffer& buffer = context.buffer(); 6242: size_t timestamp = buffer.timestamp(); 6242: const int count = std::max(1, params.count); 6242: const int history_id = (int)buffer.current_history_id() + 6242: (direction == Direction::Forward ? count : -count); 6242: if (buffer.move_to((size_t)history_id)) 6242: { 6242: auto ranges = compute_modified_ranges(buffer, timestamp); 6242: if (not ranges.empty()) 6242: context.selections_write_only() = std::move(ranges); 6242: context.selections().avoid_eol(); 6242: 6242: context.print_status({ format("moved to change #{}", history_id), 6242: get_face("Information") }); 6242: } 6242: else 6242: context.print_status({ format("no such change: #{}", history_id), 6242: get_face("Information") }); 6242: } 6242: 6242: void exec_user_mappings(Context& context, NormalParams params) 6242: { 6242: on_next_key_with_autoinfo(context, KeymapMode::None, 6242: [params](Key key, Context& context) mutable { 6242: if (not context.keymaps().is_mapped(key, KeymapMode::User)) 6242: return; 6242: 6242: auto mapping = context.keymaps().get_mapping(key, KeymapMode::User); 6242: ScopedSetBool disable_keymaps(context.keymaps_disabled()); 6242: 6242: InputHandler::ScopedForceNormal force_normal{context.input_handler(), params}; 6242: 6242: ScopedEdition edition(context); 6242: for (auto& key : mapping) 6242: context.input_handler().handle_key(key); 6242: }, "user mapping", "enter user key"); 6242: } 6242: 6242: template 6242: class Repeated 6242: { 6242: public: 6242: constexpr Repeated(T t) : m_func(t) {} 6242: 6242: void operator() (Context& context, NormalParams params) 6242: { 6242: ScopedEdition edition(context); 6242: do { m_func(context, {0, params.reg}); } while(--params.count > 0); 6242: } 6242: private: 6242: T m_func; 6242: }; 6242: 6242: template 6242: void repeated(Context& context, NormalParams params) 6242: { 6242: ScopedEdition edition(context); 6242: do { func(context, {0, params.reg}); } while(--params.count > 0); 6242: } 6242: 6242: template 6242: void move(Context& context, NormalParams params) 6242: { 6242: if (not (mode == SelectMode::Replace or mode == SelectMode::Extend)) on_assert_failed("assert failed \"" "mode == SelectMode::Replace or mode == SelectMode::Extend" "\" at " "normal.cc" ":" "1577"); 6242: Type offset(std::max(params.count,1)); 6242: if (direction == Backward) 6242: offset = -offset; 6242: auto& selections = context.selections(); 6242: for (auto& sel : selections) 6242: { 6242: auto cursor = context.has_window() ? context.window().offset_coord(sel.cursor(), offset) 6242: : context.buffer().offset_coord(sel.cursor(), offset); 6242: 6242: sel.anchor() = mode == SelectMode::Extend ? sel.anchor() : cursor; 6242: sel.cursor() = cursor; 6242: } 6242: selections.sort(); 6242: 6242: if (std::is_same::value) 6242: selections.avoid_eol(); 6242: 6242: selections.merge_overlapping(); 6242: } 6242: 6242: void select_whole_buffer(Context& context, NormalParams) 6242: { 6242: select_buffer(context.selections()); 6242: } 6242: 6242: void keep_selection(Context& context, NormalParams p) 6242: { 6242: auto& selections = context.selections(); 6242: const int index = p.count ? p.count-1 : selections.main_index(); 6242: if (index < selections.size()) 6242: selections = SelectionList{ selections.buffer(), std::move(selections[index]) }; 6242: selections.check_invariant(); 6242: } 6242: 6242: void remove_selection(Context& context, NormalParams p) 6242: { 6242: auto& selections = context.selections(); 6242: const int index = p.count ? p.count-1 : selections.main_index(); 6242: if (selections.size() > 1 and index < selections.size()) 6242: { 6242: selections.remove(index); 6242: size_t main_index = selections.main_index(); 6242: if (index < main_index or main_index == selections.size()) 6242: selections.set_main_index(main_index - 1); 6242: } 6242: selections.check_invariant(); 6242: } 6242: 6242: void clear_selections(Context& context, NormalParams) 6242: { 6242: for (auto& sel : context.selections()) 6242: sel.anchor() = sel.cursor(); 6242: } 6242: 6242: void flip_selections(Context& context, NormalParams) 6242: { 6242: for (auto& sel : context.selections()) 6242: { 6242: const BufferCoord tmp = sel.anchor(); 6242: sel.anchor() = sel.cursor(); 6242: sel.cursor() = tmp; 6242: } 6242: context.selections().check_invariant(); 6242: } 6242: 6242: void ensure_forward(Context& context, NormalParams) 6242: { 6242: for (auto& sel : context.selections()) 6242: { 6242: const BufferCoord min = sel.min(), max = sel.max(); 6242: sel.anchor() = min; 6242: sel.cursor() = max; 6242: } 6242: context.selections().check_invariant(); 6242: } 6242: 6242: void merge_consecutive(Context& context, NormalParams params) 6242: { 6242: ensure_forward(context, params); 6242: context.selections().merge_consecutive(); 6242: } 6242: 6242: void force_redraw(Context& context, NormalParams) 6242: { 6242: if (context.has_client()) 6242: { 6242: context.client().force_redraw(); 6242: context.client().redraw_ifn(); 6242: } 6242: } 6242: 6242: static NormalCmdDesc cmds[] = 6242: { 6242: { 'h', "move left", move }, 6242: { 'j', "move down", move }, 6242: { 'k', "move up", move }, 6242: { 'l', "move right", move }, 6242: 6242: { 'H', "extend left", move }, 6242: { 'J', "extend down", move }, 6242: { 'K', "extend up", move }, 6242: { 'L', "extend right", move }, 6242: 6242: { 't', "select to next character", select_to_next_char }, 6242: { 'f', "select to next character included", select_to_next_char }, 6242: { 'T', "extend to next character", select_to_next_char }, 6242: { 'F', "extend to next character included", select_to_next_char }, 6242: { alt('t'), "select to previous character", select_to_next_char }, 6242: { alt('f'), "select to previous character included", select_to_next_char }, 6242: { alt('T'), "extend to previous character", select_to_next_char }, 6242: { alt('F'), "extend to previous character included", select_to_next_char }, 6242: 6242: { 'd', "erase selected text", erase_selections }, 6242: { 'c', "change selected text", change }, 6242: { 'i', "insert before selected text", enter_insert_mode }, 6242: { 'I', "insert at the start of the line", enter_insert_mode }, 6242: { 'a', "insert after selected text", enter_insert_mode }, 6242: { 'A', "insert at the end of the line", enter_insert_mode }, 6242: { 'o', "insert on a new line below", enter_insert_mode }, 6242: { 'O', "insert on a new line above", enter_insert_mode }, 6242: { 'r', "replace with character", replace_with_char }, 6242: 6242: { 'g', "go to location", goto_commands }, 6242: { 'G', "extend to location", goto_commands }, 6242: 6242: { 'v', "move view", view_commands }, 6242: { 'V', "move view (locked)", view_commands }, 6242: 6242: { 'y', "yank selected text", yank }, 6242: { 'p', "paste after selected text", repeated> }, 6242: { 'P', "paste before selected text", repeated> }, 6242: { alt('p'), "paste every yanked selection after selected text", paste_all }, 6242: { alt('P'), "paste every yanked selection before selected text", paste_all }, 6242: { 'R', "replace selected text with yanked text", paste }, 6242: { alt('R'), "replace selected text with yanked text", paste_all }, 6242: 6242: { 's', "select regex matches in selected text", select_regex }, 6242: { 'S', "split selected text on regex matches", split_regex }, 6242: { alt('s'), "split selected text on line ends", split_lines }, 6242: 6242: { '.', "repeat last insert command", repeat_last_insert }, 6242: { alt('.'), "repeat last object select/character find", repeat_last_select }, 6242: 6242: { '%', "select whole buffer", select_whole_buffer }, 6242: 6242: { ':', "enter command prompt", command }, 6242: { '|', "pipe each selection through filter and replace with output", pipe }, 6242: { alt('|'), "pipe each selection through command and ignore output", pipe }, 6242: { '!', "insert command output", insert_output }, 6242: { alt('!'), "append command output", insert_output }, 6242: 6242: { ' ', "remove all selection except main", keep_selection }, 6242: { alt(' '), "remove main selection", remove_selection }, 6242: { ';', "reduce selections to their cursor", clear_selections }, 6242: { alt(';'), "swap selections cursor and anchor", flip_selections }, 6242: { alt(':'), "ensure selection cursor is after anchor", ensure_forward }, 6242: { alt('m'), "merge consecutive selections", merge_consecutive }, 6242: 6242: { 'w', "select to next word start", repeated<&select>> }, 6242: { 'e', "select to next word end", repeated>> }, 6242: { 'b', "select to previous word start", repeated>> }, 6242: { 'W', "extend to next word start", repeated>> }, 6242: { 'E', "extend to next word end", repeated>> }, 6242: { 'B', "extend to previous word start", repeated>> }, 6242: 6242: { alt('w'), "select to next WORD start", repeated>> }, 6242: { alt('e'), "select to next WORD end", repeated>> }, 6242: { alt('b'), "select to previous WORD start", repeated>> }, 6242: { alt('W'), "extend to next WORD start", repeated>> }, 6242: { alt('E'), "extend to next WORD end", repeated>> }, 6242: { alt('B'), "extend to previous WORD start", repeated>> }, 6242: 6242: { alt('l'), "select to the end of the line", repeated>> }, 6242: { Key::End, "select to the end of the line", repeated>> }, 6242: { alt('L'), "extend to the end of the line", repeated>> }, 6242: { alt('h'), "select to the start of the line", repeated>> }, 6242: { Key::Home, "select to the start of the line", repeated>> }, 6242: { alt('H'), "extend to the start of the line", repeated>> }, 6242: 6242: { 'x', "select line", repeated> }, 6242: { 'X', "extend line", repeated> }, 6242: { alt('x'), "extend selections to whole lines", select }, 6242: { alt('X'), "crop selections to whole lines", select }, 6242: 6242: { 'm', "select to matching character", select }, 6242: { 'M', "extend to matching character", select }, 6242: 6242: { '/', "select next given regex match", search }, 6242: { '?', "extend with next given regex match", search }, 6242: { alt('/'), "select previous given regex match", search }, 6242: { alt('?'), "extend with previous given regex match", search }, 6242: { 'n', "select next current search pattern match", search_next }, 6242: { 'N', "extend with next current search pattern match", search_next }, 6242: { alt('n'), "select previous current search pattern match", search_next }, 6242: { alt('N'), "extend with previous current search pattern match", search_next }, 6242: { '*', "set search pattern to main selection content", use_selection_as_search_pattern }, 6242: { alt('*'), "set search pattern to main selection content, do not detect words", use_selection_as_search_pattern }, 6242: 6242: { 'u', "undo", undo }, 6242: { 'U', "redo", redo }, 6242: { alt('u'), "move backward in history", move_in_history }, 6242: { alt('U'), "move forward in history", move_in_history }, 6242: 6242: { alt('i'), "select inner object", select_object }, 6242: { alt('a'), "select whole object", select_object }, 6242: { '[', "select to object start", select_object }, 6242: { ']', "select to object end", select_object }, 6242: { '{', "extend to object start", select_object }, 6242: { '}', "extend to object end", select_object }, 6242: { alt('['), "select to inner object start", select_object }, 6242: { alt(']'), "select to inner object end", select_object }, 6242: { alt('{'), "extend to inner object start", select_object }, 6242: { alt('}'), "extend to inner object end", select_object }, 6242: 6242: { alt('j'), "join lines", join_lines }, 6242: { alt('J'), "join lines and select spaces", join_lines_select_spaces }, 6242: 6242: { alt('k'), "keep selections matching given regex", keep }, 6242: { alt('K'), "keep selections not matching given regex", keep }, 6242: { '$', "pipe each selection through shell command and keep the ones whose command succeed", keep_pipe }, 6242: 6242: { '<', "deindent", deindent }, 6242: { '>', "indent", indent }, 6242: { alt('>'), "indent, including empty lines", indent }, 6242: { alt('<'), "deindent, not including incomplete indent", deindent }, 6242: 6242: { Key::Tab, "jump forward in jump list",jump }, 6242: { ctrl('o'), "jump backward in jump list", jump }, 6242: { ctrl('s'), "push current selections in jump list", push_selections }, 6242: 6242: { '\'', "rotate main selection", rotate_selections }, 6242: { alt('\''), "rotate selections content", rotate_selections_content }, 6242: 6242: { 'q', "replay recorded macro", replay_macro }, 6242: { 'Q', "start or end macro recording", start_or_end_macro_recording }, 6242: 6242: { Key::Escape, "end macro recording", end_macro_recording }, 6242: 6242: { '`', "convert to lower case in selections", for_each_codepoint }, 6242: { '~', "convert to upper case in selections", for_each_codepoint }, 6242: { alt('`'), "swap case in selections", for_each_codepoint }, 6242: 6242: { '&', "align selection cursors", align }, 6242: { alt('&'), "copy indentation", copy_indent }, 6242: 6242: { '@', "convert tabs to spaces in selections", tabs_to_spaces }, 6242: { alt('@'), "convert spaces to tabs in selections", spaces_to_tabs }, 6242: 6242: { 'C', "copy selection on next lines", copy_selections_on_next_lines }, 6242: { alt('C'), "copy selection on previous lines", copy_selections_on_next_lines }, 6242: 6242: { ',', "user mappings", exec_user_mappings }, 6242: 6242: { Key::Left, "move left", move }, 6242: { Key::Down, "move down", move }, 6242: { Key::Up, "move up", move }, 6242: { Key::Right, "move right", move }, 6242: 6242: { ctrl('b'), "scroll one page up", scroll }, 6242: { ctrl('f'), "scroll one page down", scroll }, 6242: { ctrl('u'), "scroll half a page up", scroll }, 6242: { ctrl('d'), "scroll half a page down", scroll }, 6242: 6242: { Key::PageUp, "scroll one page up", scroll }, 6242: { Key::PageDown, "scroll one page down", scroll }, 6242: 6242: { 'z', "restore selections from register", restore_selections }, 6242: { alt('z'), "append selections from register", restore_selections }, 6242: { 'Z', "save selections to register", save_selections }, 6242: { alt('Z'), "append selections to register", save_selections }, 6242: 6242: { ctrl('l'), "force redraw", force_redraw }, 6242: }; 6242: 6242: KeyMap keymap = cmds; 6242: 6242: } === END GCC DUMP === Makefile:76: recipe for target '.normal.debug.o' failed make[1]: *** [.normal.debug.o] Error 1 make[1]: *** Waiting for unfinished jobs.... make[1]: Leaving directory '/<>/src' dh_auto_build: cd src && make -j4 returned exit code 2 debian/rules:19: recipe for target 'build-arch' failed make: *** [build-arch] Error 2 dpkg-buildpackage: error: debian/rules build-arch subprocess returned exit status 2 -------------------------------------------------------------------------------- Build finished at 20180115-1001 Finished -------- E: Build failure (dpkg-buildpackage died) +------------------------------------------------------------------------------+ | Cleanup | +------------------------------------------------------------------------------+ Purging /<> Not removing build depends: as requested +------------------------------------------------------------------------------+ | Summary | +------------------------------------------------------------------------------+ Build Architecture: s390x Build-Space: 72108 Build-Time: 27 Distribution: bionic Fail-Stage: build Host Architecture: s390x Install-Time: 14 Job: kakoune_0~2016.12.20.1.3a6167ae-1build1.dsc Machine Architecture: s390x Package: kakoune Package-Time: 42 Source-Version: 0~2016.12.20.1.3a6167ae-1build1 Space: 72108 Status: attempted Version: 0~2016.12.20.1.3a6167ae-1build1 -------------------------------------------------------------------------------- Finished at 20180115-1001 Build needed 00:00:42, 72108k disc space RUN: /usr/share/launchpad-buildd/slavebin/in-target scan-for-processes --backend=chroot --series=bionic --arch=s390x PACKAGEBUILD-14111329 Scanning for processes to kill in build PACKAGEBUILD-14111329 RUN: /usr/share/launchpad-buildd/slavebin/in-target umount-chroot --backend=chroot --series=bionic --arch=s390x PACKAGEBUILD-14111329 Stopping target for build PACKAGEBUILD-14111329 RUN: /usr/share/launchpad-buildd/slavebin/in-target remove-build --backend=chroot --series=bionic --arch=s390x PACKAGEBUILD-14111329 Removing build PACKAGEBUILD-14111329