RUN: /usr/share/launchpad-buildd/slavebin/slave-prep Forking launchpad-buildd slave process... Kernel version: Linux bos01-arm64-045 4.4.0-101-generic #124-Ubuntu SMP Fri Nov 10 18:30:44 UTC 2017 aarch64 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 10:57:44 ntpdate[1821]: adjust time server 10.211.37.1 offset 0.002689 sec RUN: /usr/share/launchpad-buildd/slavebin/in-target unpack-chroot --backend=chroot --series=bionic --arch=armhf PACKAGEBUILD-14111326 /home/buildd/filecache-default/b70461af4419c13dbae7acd6fe74d075a1a9550f Creating target for build PACKAGEBUILD-14111326 RUN: /usr/share/launchpad-buildd/slavebin/in-target mount-chroot --backend=chroot --series=bionic --arch=armhf PACKAGEBUILD-14111326 Starting target for build PACKAGEBUILD-14111326 RUN: /usr/share/launchpad-buildd/slavebin/in-target override-sources-list --backend=chroot --series=bionic --arch=armhf PACKAGEBUILD-14111326 '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-14111326 RUN: /usr/share/launchpad-buildd/slavebin/in-target add-trusted-keys --backend=chroot --series=bionic --arch=armhf PACKAGEBUILD-14111326 Adding trusted keys to build-PACKAGEBUILD-14111326 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=armhf PACKAGEBUILD-14111326 Updating target for build PACKAGEBUILD-14111326 Get:1 http://ppa.launchpad.net/ubuntu-toolchain-r/test/ubuntu bionic InRelease [15.4 kB] Get:2 http://ftpmaster.internal/ubuntu bionic InRelease [235 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://ftpmaster.internal/ubuntu bionic-updates InRelease [65.4 kB] Get:6 http://ppa.launchpad.net/ubuntu-toolchain-r/test/ubuntu bionic/main armhf Packages [17.0 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 armhf Packages [968 kB] Get:9 http://ftpmaster.internal/ubuntu bionic/main Translation-en [518 kB] Get:10 http://ppa.launchpad.net/ubuntu-toolchain-r/volatile/ubuntu bionic/main armhf Packages [4500 B] Get:11 http://ftpmaster.internal/ubuntu bionic/restricted armhf Packages [5896 B] Get:12 http://ftpmaster.internal/ubuntu bionic/restricted Translation-en [2384 B] Get:13 http://ppa.launchpad.net/ubuntu-toolchain-r/volatile/ubuntu bionic/main Translation-en [4552 B] Get:14 http://ftpmaster.internal/ubuntu bionic/universe armhf Packages [8144 kB] Get:15 http://ftpmaster.internal/ubuntu bionic/universe Translation-en [4941 kB] Get:16 http://ftpmaster.internal/ubuntu bionic/multiverse armhf Packages [128 kB] Get:17 http://ftpmaster.internal/ubuntu bionic/multiverse Translation-en [109 kB] Fetched 15.2 MB in 6s (2237 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 libustr-1.0-1 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 libasan5 libgcc-8-dev libnghttp2-14 libstdc++-8-dev libubsan1 The following packages will be upgraded: adduser apt apt-transport-https base-files base-passwd binutils binutils-arm-linux-gnueabihf binutils-common 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 libasan4 libasn1-8-heimdal libassuan0 libatomic1 libbinutils libblkid1 libc-bin libc-dev-bin libc6 libc6-dev libcap-ng0 libcap2 libcc1-0 libcilkrts5 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 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 libubsan0 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 110 upgraded, 9 newly installed, 0 to remove and 0 not upgraded. Need to get 148 MB of archives. After this operation, 326 MB of additional disk space will be used. Get:1 http://ftpmaster.internal/ubuntu bionic/main armhf perl-modules-5.26 all 5.26.1-3 [2761 kB] Get:2 http://ppa.launchpad.net/ubuntu-toolchain-r/test/ubuntu bionic/main armhf gcc-8-base armhf 8-20180110-1ubuntu1 [17.9 kB] Get:3 http://ppa.launchpad.net/ubuntu-toolchain-r/test/ubuntu bionic/main armhf libgcc1 armhf 1:8-20180110-1ubuntu1 [37.1 kB] Get:4 http://ppa.launchpad.net/ubuntu-toolchain-r/test/ubuntu bionic/main armhf libstdc++6 armhf 8-20180110-1ubuntu1 [349 kB] Get:5 http://ppa.launchpad.net/ubuntu-toolchain-r/test/ubuntu bionic/main armhf libgomp1 armhf 8-20180110-1ubuntu1 [66.6 kB] Get:6 http://ppa.launchpad.net/ubuntu-toolchain-r/test/ubuntu bionic/main armhf libcc1-0 armhf 8-20180110-1ubuntu1 [32.4 kB] Get:7 http://ppa.launchpad.net/ubuntu-toolchain-r/test/ubuntu bionic/main armhf libatomic1 armhf 8-20180110-1ubuntu1 [7068 B] Get:8 http://ppa.launchpad.net/ubuntu-toolchain-r/test/ubuntu bionic/main armhf cpp-8 armhf 8-20180110-1ubuntu1 [30.3 MB] Get:9 http://ftpmaster.internal/ubuntu bionic/main armhf libperl5.26 armhf 5.26.1-3 [2871 kB] Get:10 http://ftpmaster.internal/ubuntu bionic/main armhf perl armhf 5.26.1-3 [201 kB] Get:11 http://ftpmaster.internal/ubuntu bionic/main armhf perl-base armhf 5.26.1-3 [1289 kB] Get:12 http://ftpmaster.internal/ubuntu bionic/main armhf libc6-dev armhf 2.26-0ubuntu2 [1900 kB] Get:13 http://ftpmaster.internal/ubuntu bionic/main armhf libc-dev-bin armhf 2.26-0ubuntu2 [60.1 kB] Get:14 http://ftpmaster.internal/ubuntu bionic/main armhf linux-libc-dev armhf 4.13.0-25.29 [944 kB] Get:15 http://ftpmaster.internal/ubuntu bionic/main armhf libc6 armhf 2.26-0ubuntu2 [2212 kB] Get:16 http://ftpmaster.internal/ubuntu bionic/main armhf init-system-helpers all 1.51 [37.3 kB] Get:17 http://ftpmaster.internal/ubuntu bionic/main armhf base-files armhf 10ubuntu1 [55.9 kB] Get:18 http://ftpmaster.internal/ubuntu bionic/main armhf bsdutils armhf 1:2.30.2-0.1ubuntu1 [55.4 kB] Get:19 http://ftpmaster.internal/ubuntu bionic/main armhf coreutils armhf 8.26-3ubuntu4 [1111 kB] Get:20 http://ftpmaster.internal/ubuntu bionic/main armhf debianutils armhf 4.8.4 [84.5 kB] Get:21 http://ftpmaster.internal/ubuntu bionic/main armhf dpkg armhf 1.19.0.4ubuntu1 [1100 kB] Get:22 http://ftpmaster.internal/ubuntu bionic/main armhf e2fslibs armhf 1.43.8-1ubuntu1 [144 kB] Get:23 http://ftpmaster.internal/ubuntu bionic/main armhf e2fsprogs armhf 1.43.8-1ubuntu1 [479 kB] Get:24 http://ftpmaster.internal/ubuntu bionic/main armhf findutils armhf 4.6.0+git+20170828-2 [277 kB] Get:25 http://ftpmaster.internal/ubuntu bionic/main armhf libuuid1 armhf 2.30.2-0.1ubuntu1 [14.5 kB] Get:26 http://ftpmaster.internal/ubuntu bionic/main armhf libblkid1 armhf 2.30.2-0.1ubuntu1 [106 kB] Get:27 http://ftpmaster.internal/ubuntu bionic/main armhf libsmartcols1 armhf 2.30.2-0.1ubuntu1 [68.7 kB] Get:28 http://ftpmaster.internal/ubuntu bionic/main armhf libfdisk1 armhf 2.30.2-0.1ubuntu1 [144 kB] Get:29 http://ftpmaster.internal/ubuntu bionic/main armhf libpcre3 armhf 2:8.39-8 [209 kB] Get:30 http://ftpmaster.internal/ubuntu bionic/main armhf libselinux1 armhf 2.7-2 [59.1 kB] Get:31 http://ftpmaster.internal/ubuntu bionic/main armhf libmount1 armhf 2.30.2-0.1ubuntu1 [116 kB] Get:32 http://ftpmaster.internal/ubuntu bionic/main armhf fdisk armhf 2.30.2-0.1ubuntu1 [96.6 kB] Get:33 http://ftpmaster.internal/ubuntu bionic/main armhf util-linux armhf 2.30.2-0.1ubuntu1 [823 kB] Get:34 http://ftpmaster.internal/ubuntu bionic/main armhf base-passwd armhf 3.5.44 [45.9 kB] Get:35 http://ftpmaster.internal/ubuntu bionic/main armhf libc-bin armhf 2.26-0ubuntu2 [477 kB] Get:36 http://ftpmaster.internal/ubuntu bionic/main armhf sysvinit-utils armhf 2.88dsf-59.10ubuntu1 [17.2 kB] Get:37 http://ftpmaster.internal/ubuntu bionic/main armhf libudev1 armhf 235-3ubuntu3 [49.4 kB] Get:38 http://ftpmaster.internal/ubuntu bionic/main armhf libapt-pkg5.0 armhf 1.6~alpha5 [709 kB] Get:39 http://ftpmaster.internal/ubuntu bionic/main armhf debconf all 1.5.65 [124 kB] Get:40 http://ftpmaster.internal/ubuntu bionic/main armhf adduser all 3.116ubuntu1 [163 kB] Get:41 http://ftpmaster.internal/ubuntu bionic/main armhf libgpg-error0 armhf 1.27-5 [32.4 kB] Get:42 http://ftpmaster.internal/ubuntu bionic/main armhf libgcrypt20 armhf 1.8.1-4 [363 kB] Get:43 http://ftpmaster.internal/ubuntu bionic/main armhf gpgv armhf 2.1.15-1ubuntu8 [157 kB] Get:44 http://ftpmaster.internal/ubuntu bionic/main armhf libseccomp2 armhf 2.3.1-2.1ubuntu3 [29.9 kB] Get:45 http://ftpmaster.internal/ubuntu bionic/main armhf apt armhf 1.6~alpha5 [1104 kB] Get:46 http://ftpmaster.internal/ubuntu bionic/main armhf libapparmor1 armhf 2.11.0-2ubuntu18 [24.6 kB] Get:47 http://ftpmaster.internal/ubuntu bionic/main armhf libcap2 armhf 1:2.25-1.2 [11.7 kB] Get:48 http://ftpmaster.internal/ubuntu bionic/main armhf libidn11 armhf 1.33-2.1 [42.7 kB] Get:49 http://ftpmaster.internal/ubuntu bionic/main armhf libip4tc0 armhf 1.6.1-2ubuntu2 [17.8 kB] Get:50 http://ftpmaster.internal/ubuntu bionic/main armhf mount armhf 2.30.2-0.1ubuntu1 [104 kB] Get:51 http://ftpmaster.internal/ubuntu bionic/main armhf systemd armhf 235-3ubuntu3 [2679 kB] Get:52 http://ftpmaster.internal/ubuntu bionic/main armhf libsystemd0 armhf 235-3ubuntu3 [178 kB] Get:53 http://ftpmaster.internal/ubuntu bionic/main armhf init armhf 1.51 [5864 B] Get:54 http://ftpmaster.internal/ubuntu bionic/main armhf systemd-sysv armhf 235-3ubuntu3 [13.1 kB] Get:55 http://ftpmaster.internal/ubuntu bionic/main armhf libcap-ng0 armhf 0.7.7-3.1 [9816 B] Get:56 http://ftpmaster.internal/ubuntu bionic/main armhf libcomerr2 armhf 1.43.8-1ubuntu1 [10.4 kB] Get:57 http://ftpmaster.internal/ubuntu bionic/main armhf libsemanage-common all 2.7-2 [6916 B] Get:58 http://ftpmaster.internal/ubuntu bionic/main armhf libsemanage1 armhf 2.7-2 [72.3 kB] Get:59 http://ftpmaster.internal/ubuntu bionic/main armhf libss2 armhf 1.43.8-1ubuntu1 [9368 B] Get:60 http://ftpmaster.internal/ubuntu bionic/main armhf libnettle6 armhf 3.3-2 [106 kB] Get:61 http://ftpmaster.internal/ubuntu bionic/main armhf libhogweed4 armhf 3.3-2 [126 kB] Get:62 http://ftpmaster.internal/ubuntu bionic/main armhf libp11-kit0 armhf 0.23.9-2 [162 kB] Get:63 http://ftpmaster.internal/ubuntu bionic/main armhf libtasn1-6 armhf 4.12-3 [31.2 kB] Get:64 http://ftpmaster.internal/ubuntu bionic/main armhf g++-7 armhf 7.2.0-18ubuntu2 [6034 kB] Get:65 http://ftpmaster.internal/ubuntu bionic/main armhf gcc-7 armhf 7.2.0-18ubuntu2 [5925 kB] Get:66 http://ppa.launchpad.net/ubuntu-toolchain-r/volatile/ubuntu bionic/main armhf cpp armhf 4:8-20121108-1ubuntu0.2 [42.2 kB] Get:67 http://ppa.launchpad.net/ubuntu-toolchain-r/test/ubuntu bionic/main armhf libasan5 armhf 8-20180110-1ubuntu1 [349 kB] Get:68 http://ppa.launchpad.net/ubuntu-toolchain-r/test/ubuntu bionic/main armhf libubsan1 armhf 8-20180110-1ubuntu1 [109 kB] Get:69 http://ppa.launchpad.net/ubuntu-toolchain-r/test/ubuntu bionic/main armhf libgcc-8-dev armhf 8-20180110-1ubuntu1 [629 kB] Get:70 http://ppa.launchpad.net/ubuntu-toolchain-r/test/ubuntu bionic/main armhf gcc-8 armhf 8-20180110-1ubuntu1 [30.1 MB] Get:71 http://ftpmaster.internal/ubuntu bionic/main armhf cpp-7 armhf 7.2.0-18ubuntu2 [5289 kB] Get:72 http://ftpmaster.internal/ubuntu bionic/main armhf libbinutils armhf 2.29.1-12ubuntu1 [307 kB] Get:73 http://ftpmaster.internal/ubuntu bionic/main armhf binutils armhf 2.29.1-12ubuntu1 [3372 B] Get:74 http://ftpmaster.internal/ubuntu bionic/main armhf binutils-common armhf 2.29.1-12ubuntu1 [190 kB] Get:75 http://ftpmaster.internal/ubuntu bionic/main armhf binutils-arm-linux-gnueabihf armhf 2.29.1-12ubuntu1 [2188 kB] Get:76 http://ftpmaster.internal/ubuntu bionic/main armhf libasan4 armhf 7.2.0-18ubuntu2 [328 kB] Get:77 http://ftpmaster.internal/ubuntu bionic/main armhf libubsan0 armhf 7.2.0-18ubuntu2 [108 kB] Get:78 http://ftpmaster.internal/ubuntu bionic/main armhf libcilkrts5 armhf 7.2.0-18ubuntu2 [36.0 kB] Get:79 http://ftpmaster.internal/ubuntu bionic/main armhf libstdc++-7-dev armhf 7.2.0-18ubuntu2 [1529 kB] Get:80 http://ftpmaster.internal/ubuntu bionic/main armhf libgcc-7-dev armhf 7.2.0-18ubuntu2 [709 kB] Get:81 http://ftpmaster.internal/ubuntu bionic/main armhf gcc-7-base armhf 7.2.0-18ubuntu2 [19.1 kB] Get:82 http://ftpmaster.internal/ubuntu bionic/main armhf lsb-base all 9.20170808ubuntu1 [12.5 kB] Get:83 http://ftpmaster.internal/ubuntu bionic/main armhf sensible-utils all 0.0.11 [14.8 kB] Get:84 http://ftpmaster.internal/ubuntu bionic/main armhf libassuan0 armhf 2.5.1-1 [28.1 kB] Get:85 http://ftpmaster.internal/ubuntu bionic/main armhf pinentry-curses armhf 1.0.0-3 [30.4 kB] Get:86 http://ftpmaster.internal/ubuntu bionic/main armhf libnpth0 armhf 1.5-3 [6632 B] Get:87 http://ftpmaster.internal/ubuntu bionic/main armhf gnupg armhf 2.1.15-1ubuntu8 [711 kB] Get:88 http://ftpmaster.internal/ubuntu bionic/main armhf gnupg-agent armhf 2.1.15-1ubuntu8 [211 kB] Get:89 http://ftpmaster.internal/ubuntu bionic/main armhf libsqlite3-0 armhf 3.21.0-1 [417 kB] Get:90 http://ftpmaster.internal/ubuntu bionic/main armhf libroken18-heimdal armhf 7.5.0+dfsg-1 [34.1 kB] Get:91 http://ftpmaster.internal/ubuntu bionic/main armhf libasn1-8-heimdal armhf 7.5.0+dfsg-1 [136 kB] Get:92 http://ftpmaster.internal/ubuntu bionic/main armhf libheimbase1-heimdal armhf 7.5.0+dfsg-1 [24.1 kB] Get:93 http://ftpmaster.internal/ubuntu bionic/main armhf libhcrypto4-heimdal armhf 7.5.0+dfsg-1 [76.5 kB] Get:94 http://ftpmaster.internal/ubuntu bionic/main armhf libwind0-heimdal armhf 7.5.0+dfsg-1 [47.2 kB] Get:95 http://ftpmaster.internal/ubuntu bionic/main armhf libhx509-5-heimdal armhf 7.5.0+dfsg-1 [87.9 kB] Get:96 http://ftpmaster.internal/ubuntu bionic/main armhf libkrb5-26-heimdal armhf 7.5.0+dfsg-1 [168 kB] Get:97 http://ftpmaster.internal/ubuntu bionic/main armhf libheimntlm0-heimdal armhf 7.5.0+dfsg-1 [13.1 kB] Get:98 http://ftpmaster.internal/ubuntu bionic/main armhf libgssapi3-heimdal armhf 7.5.0+dfsg-1 [78.8 kB] Get:99 http://ftpmaster.internal/ubuntu bionic/main armhf libssl1.0.0 armhf 1.0.2g-1ubuntu14 [706 kB] Get:100 http://ftpmaster.internal/ubuntu bionic/main armhf multiarch-support armhf 2.26-0ubuntu2 [6832 B] Get:101 http://ftpmaster.internal/ubuntu bionic/main armhf openssl armhf 1.0.2g-1ubuntu14 [477 kB] Get:102 http://ftpmaster.internal/ubuntu bionic/main armhf tzdata all 2017c-1 [188 kB] Get:103 http://ftpmaster.internal/ubuntu bionic/main armhf libidn2-0 armhf 2.0.4-1 [88.2 kB] Get:104 http://ftpmaster.internal/ubuntu bionic/main armhf libkeyutils1 armhf 1.5.9-9.2ubuntu1 [8380 B] Get:105 http://ftpmaster.internal/ubuntu bionic/main armhf libpng16-16 armhf 1.6.34-1 [159 kB] Get:106 http://ftpmaster.internal/ubuntu bionic/universe armhf apt-transport-https all 1.6~alpha5 [1692 B] Get:107 http://ftpmaster.internal/ubuntu bionic/main armhf dpkg-dev all 1.19.0.4ubuntu1 [607 kB] Get:108 http://ftpmaster.internal/ubuntu bionic/main armhf libdpkg-perl all 1.19.0.4ubuntu1 [211 kB] Get:109 http://ftpmaster.internal/ubuntu bionic/main armhf build-essential armhf 12.4ubuntu1 [4752 B] Get:110 http://ftpmaster.internal/ubuntu bionic/main armhf libnghttp2-14 armhf 1.29.0-1 [67.1 kB] Get:111 http://ftpmaster.internal/ubuntu bionic/main armhf libpsl5 armhf 0.19.1-4 [39.9 kB] Get:112 http://ftpmaster.internal/ubuntu bionic/main armhf libcurl3-gnutls armhf 7.57.0-1ubuntu1 [180 kB] Get:113 http://ftpmaster.internal/ubuntu bionic/main armhf liblockfile-bin armhf 1.14-1.1 [10.9 kB] Get:114 http://ftpmaster.internal/ubuntu bionic/main armhf liblockfile1 armhf 1.14-1.1 [5784 B] Get:115 http://ftpmaster.internal/ubuntu bionic/main armhf optipng armhf 0.7.6-1.1 [80.6 kB] Get:116 http://ppa.launchpad.net/ubuntu-toolchain-r/volatile/ubuntu bionic/main armhf gcc armhf 4:8-20121108-1ubuntu0.2 [5180 B] Get:117 http://ppa.launchpad.net/ubuntu-toolchain-r/test/ubuntu bionic/main armhf libstdc++-8-dev armhf 8-20180110-1ubuntu1 [1573 kB] Get:118 http://ppa.launchpad.net/ubuntu-toolchain-r/test/ubuntu bionic/main armhf g++-8 armhf 8-20180110-1ubuntu1 [32.7 MB] Get:119 http://ppa.launchpad.net/ubuntu-toolchain-r/volatile/ubuntu bionic/main armhf g++ armhf 4:8-20121108-1ubuntu0.2 [1540 B] debconf: delaying package configuration, since apt-utils is not installed Fetched 148 MB in 4s (36.3 MB/s) (Reading database ... 12457 files and directories currently installed.) Preparing to unpack .../perl_5.26.1-3_armhf.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_armhf.deb ... Unpacking libperl5.26:armhf (5.26.1-3) over (5.26.0-8ubuntu1) ... Preparing to unpack .../perl-base_5.26.1-3_armhf.deb ... Unpacking perl-base (5.26.1-3) over (5.26.0-8ubuntu1) ... Setting up perl-base (5.26.1-3) ... (Reading database ... 12457 files and directories currently installed.) Preparing to unpack .../libc6-dev_2.26-0ubuntu2_armhf.deb ... Unpacking libc6-dev:armhf (2.26-0ubuntu2) over (2.26-0ubuntu1) ... Preparing to unpack .../libc-dev-bin_2.26-0ubuntu2_armhf.deb ... Unpacking libc-dev-bin (2.26-0ubuntu2) over (2.26-0ubuntu1) ... Preparing to unpack .../linux-libc-dev_4.13.0-25.29_armhf.deb ... Unpacking linux-libc-dev:armhf (4.13.0-25.29) over (4.13.0-11.12) ... Selecting previously unselected package gcc-8-base:armhf. Preparing to unpack .../gcc-8-base_8-20180110-1ubuntu1_armhf.deb ... Unpacking gcc-8-base:armhf (8-20180110-1ubuntu1) ... Setting up gcc-8-base:armhf (8-20180110-1ubuntu1) ... (Reading database ... 12464 files and directories currently installed.) Preparing to unpack .../libgcc1_1%3a8-20180110-1ubuntu1_armhf.deb ... Unpacking libgcc1:armhf (1:8-20180110-1ubuntu1) over (1:7.2.0-6ubuntu1) ... Setting up libgcc1:armhf (1:8-20180110-1ubuntu1) ... (Reading database ... 12464 files and directories currently installed.) Preparing to unpack .../libc6_2.26-0ubuntu2_armhf.deb ... Unpacking libc6:armhf (2.26-0ubuntu2) over (2.26-0ubuntu1) ... Setting up libc6:armhf (2.26-0ubuntu2) ... (Reading database ... 12464 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 ... 12464 files and directories currently installed.) Preparing to unpack .../base-files_10ubuntu1_armhf.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 ... 12464 files and directories currently installed.) Preparing to unpack .../bsdutils_1%3a2.30.2-0.1ubuntu1_armhf.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 ... 12464 files and directories currently installed.) Preparing to unpack .../coreutils_8.26-3ubuntu4_armhf.deb ... Unpacking coreutils (8.26-3ubuntu4) over (8.26-3ubuntu3) ... Setting up coreutils (8.26-3ubuntu4) ... (Reading database ... 12464 files and directories currently installed.) Preparing to unpack .../debianutils_4.8.4_armhf.deb ... Unpacking debianutils (4.8.4) over (4.8.2) ... Setting up debianutils (4.8.4) ... (Reading database ... 12464 files and directories currently installed.) Preparing to unpack .../dpkg_1.19.0.4ubuntu1_armhf.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 ... 12466 files and directories currently installed.) Preparing to unpack .../e2fslibs_1.43.8-1ubuntu1_armhf.deb ... Unpacking e2fslibs:armhf (1.43.8-1ubuntu1) over (1.43.5-1) ... Setting up e2fslibs:armhf (1.43.8-1ubuntu1) ... (Reading database ... 12466 files and directories currently installed.) Preparing to unpack .../e2fsprogs_1.43.8-1ubuntu1_armhf.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 ... 12466 files and directories currently installed.) Preparing to unpack .../findutils_4.6.0+git+20170828-2_armhf.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 ... 12466 files and directories currently installed.) Preparing to unpack .../libuuid1_2.30.2-0.1ubuntu1_armhf.deb ... Unpacking libuuid1:armhf (2.30.2-0.1ubuntu1) over (2.30.1-0ubuntu4) ... Setting up libuuid1:armhf (2.30.2-0.1ubuntu1) ... (Reading database ... 12466 files and directories currently installed.) Preparing to unpack .../libblkid1_2.30.2-0.1ubuntu1_armhf.deb ... Unpacking libblkid1:armhf (2.30.2-0.1ubuntu1) over (2.30.1-0ubuntu4) ... Setting up libblkid1:armhf (2.30.2-0.1ubuntu1) ... (Reading database ... 12466 files and directories currently installed.) Preparing to unpack .../libsmartcols1_2.30.2-0.1ubuntu1_armhf.deb ... Unpacking libsmartcols1:armhf (2.30.2-0.1ubuntu1) over (2.30.1-0ubuntu4) ... Setting up libsmartcols1:armhf (2.30.2-0.1ubuntu1) ... (Reading database ... 12466 files and directories currently installed.) Preparing to unpack .../libfdisk1_2.30.2-0.1ubuntu1_armhf.deb ... Unpacking libfdisk1:armhf (2.30.2-0.1ubuntu1) over (2.30.1-0ubuntu4) ... Setting up libfdisk1:armhf (2.30.2-0.1ubuntu1) ... (Reading database ... 12466 files and directories currently installed.) Preparing to unpack .../libpcre3_2%3a8.39-8_armhf.deb ... Unpacking libpcre3:armhf (2:8.39-8) over (2:8.39-4) ... Setting up libpcre3:armhf (2:8.39-8) ... (Reading database ... 12466 files and directories currently installed.) Preparing to unpack .../libselinux1_2.7-2_armhf.deb ... Unpacking libselinux1:armhf (2.7-2) over (2.7-1) ... Setting up libselinux1:armhf (2.7-2) ... (Reading database ... 12466 files and directories currently installed.) Preparing to unpack .../libmount1_2.30.2-0.1ubuntu1_armhf.deb ... Unpacking libmount1:armhf (2.30.2-0.1ubuntu1) over (2.30.1-0ubuntu4) ... Setting up libmount1:armhf (2.30.2-0.1ubuntu1) ... (Reading database ... 12466 files and directories currently installed.) Preparing to unpack .../fdisk_2.30.2-0.1ubuntu1_armhf.deb ... Unpacking fdisk (2.30.2-0.1ubuntu1) over (2.30.1-0ubuntu4) ... Setting up fdisk (2.30.2-0.1ubuntu1) ... (Reading database ... 12466 files and directories currently installed.) Preparing to unpack .../util-linux_2.30.2-0.1ubuntu1_armhf.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 ... 12467 files and directories currently installed.) Preparing to unpack .../base-passwd_3.5.44_armhf.deb ... Unpacking base-passwd (3.5.44) over (3.5.43) ... Setting up base-passwd (3.5.44) ... (Reading database ... 12467 files and directories currently installed.) Preparing to unpack .../libc-bin_2.26-0ubuntu2_armhf.deb ... Unpacking libc-bin (2.26-0ubuntu2) over (2.26-0ubuntu1) ... Setting up libc-bin (2.26-0ubuntu2) ... (Reading database ... 12467 files and directories currently installed.) Preparing to unpack .../sysvinit-utils_2.88dsf-59.10ubuntu1_armhf.deb ... Unpacking sysvinit-utils (2.88dsf-59.10ubuntu1) over (2.88dsf-59.8git1) ... Setting up sysvinit-utils (2.88dsf-59.10ubuntu1) ... (Reading database ... 12467 files and directories currently installed.) Preparing to unpack .../libstdc++6_8-20180110-1ubuntu1_armhf.deb ... Unpacking libstdc++6:armhf (8-20180110-1ubuntu1) over (7.2.0-6ubuntu1) ... Setting up libstdc++6:armhf (8-20180110-1ubuntu1) ... (Reading database ... 12467 files and directories currently installed.) Preparing to unpack .../libudev1_235-3ubuntu3_armhf.deb ... Unpacking libudev1:armhf (235-3ubuntu3) over (234-2ubuntu10) ... Setting up libudev1:armhf (235-3ubuntu3) ... (Reading database ... 12467 files and directories currently installed.) Preparing to unpack .../libapt-pkg5.0_1.6~alpha5_armhf.deb ... Unpacking libapt-pkg5.0:armhf (1.6~alpha5) over (1.5~rc4) ... Setting up libapt-pkg5.0:armhf (1.6~alpha5) ... (Reading database ... 12467 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 ... 12461 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 ... 12459 files and directories currently installed.) Preparing to unpack .../libgpg-error0_1.27-5_armhf.deb ... Unpacking libgpg-error0:armhf (1.27-5) over (1.27-3) ... Setting up libgpg-error0:armhf (1.27-5) ... (Reading database ... 12459 files and directories currently installed.) Preparing to unpack .../libgcrypt20_1.8.1-4_armhf.deb ... Unpacking libgcrypt20:armhf (1.8.1-4) over (1.7.8-2ubuntu1) ... Setting up libgcrypt20:armhf (1.8.1-4) ... (Reading database ... 12459 files and directories currently installed.) Preparing to unpack .../gpgv_2.1.15-1ubuntu8_armhf.deb ... Unpacking gpgv (2.1.15-1ubuntu8) over (2.1.15-1ubuntu7) ... Setting up gpgv (2.1.15-1ubuntu8) ... (Reading database ... 12459 files and directories currently installed.) Preparing to unpack .../libseccomp2_2.3.1-2.1ubuntu3_armhf.deb ... Unpacking libseccomp2:armhf (2.3.1-2.1ubuntu3) over (2.3.1-2.1ubuntu2) ... Setting up libseccomp2:armhf (2.3.1-2.1ubuntu3) ... (Reading database ... 12459 files and directories currently installed.) Preparing to unpack .../apt_1.6~alpha5_armhf.deb ... Unpacking apt (1.6~alpha5) over (1.5~rc4) ... Setting up apt (1.6~alpha5) ... (Reading database ... 12455 files and directories currently installed.) Preparing to unpack .../libapparmor1_2.11.0-2ubuntu18_armhf.deb ... Unpacking libapparmor1:armhf (2.11.0-2ubuntu18) over (2.11.0-2ubuntu17) ... Preparing to unpack .../libcap2_1%3a2.25-1.2_armhf.deb ... Unpacking libcap2:armhf (1:2.25-1.2) over (1:2.25-1) ... Preparing to unpack .../libidn11_1.33-2.1_armhf.deb ... Unpacking libidn11:armhf (1.33-2.1) over (1.33-2) ... Setting up libidn11:armhf (1.33-2.1) ... (Reading database ... 12455 files and directories currently installed.) Preparing to unpack .../libip4tc0_1.6.1-2ubuntu2_armhf.deb ... Unpacking libip4tc0:armhf (1.6.1-2ubuntu2) over (1.6.1-2ubuntu1) ... Preparing to unpack .../mount_2.30.2-0.1ubuntu1_armhf.deb ... Unpacking mount (2.30.2-0.1ubuntu1) over (2.30.1-0ubuntu4) ... Preparing to unpack .../systemd_235-3ubuntu3_armhf.deb ... Unpacking systemd (235-3ubuntu3) over (234-2ubuntu10) ... Preparing to unpack .../libsystemd0_235-3ubuntu3_armhf.deb ... Unpacking libsystemd0:armhf (235-3ubuntu3) over (234-2ubuntu10) ... Setting up libsystemd0:armhf (235-3ubuntu3) ... (Reading database ... 12461 files and directories currently installed.) Preparing to unpack .../archives/init_1.51_armhf.deb ... Unpacking init (1.51) over (1.49ubuntu1) ... Setting up libapparmor1:armhf (2.11.0-2ubuntu18) ... Setting up libcap2:armhf (1:2.25-1.2) ... Setting up libip4tc0:armhf (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 ... 12461 files and directories currently installed.) Preparing to unpack .../systemd-sysv_235-3ubuntu3_armhf.deb ... Unpacking systemd-sysv (235-3ubuntu3) over (234-2ubuntu10) ... Preparing to unpack .../libcap-ng0_0.7.7-3.1_armhf.deb ... Unpacking libcap-ng0:armhf (0.7.7-3.1) over (0.7.7-3build1) ... Setting up libcap-ng0:armhf (0.7.7-3.1) ... (Reading database ... 12461 files and directories currently installed.) Preparing to unpack .../libcomerr2_1.43.8-1ubuntu1_armhf.deb ... Unpacking libcomerr2:armhf (1.43.8-1ubuntu1) over (1.43.5-1) ... Setting up libcomerr2:armhf (1.43.8-1ubuntu1) ... (Reading database ... 12461 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 ... 12461 files and directories currently installed.) Preparing to unpack .../libsemanage1_2.7-2_armhf.deb ... Unpacking libsemanage1:armhf (2.7-2) over (2.7-1) ... Setting up libsemanage1:armhf (2.7-2) ... (Reading database ... 12461 files and directories currently installed.) Preparing to unpack .../libss2_1.43.8-1ubuntu1_armhf.deb ... Unpacking libss2:armhf (1.43.8-1ubuntu1) over (1.43.5-1) ... Setting up libss2:armhf (1.43.8-1ubuntu1) ... (Reading database ... 12461 files and directories currently installed.) Preparing to unpack .../libnettle6_3.3-2_armhf.deb ... Unpacking libnettle6:armhf (3.3-2) over (3.3-1) ... Setting up libnettle6:armhf (3.3-2) ... (Reading database ... 12461 files and directories currently installed.) Preparing to unpack .../libhogweed4_3.3-2_armhf.deb ... Unpacking libhogweed4:armhf (3.3-2) over (3.3-1) ... Setting up libhogweed4:armhf (3.3-2) ... (Reading database ... 12461 files and directories currently installed.) Preparing to unpack .../libp11-kit0_0.23.9-2_armhf.deb ... Unpacking libp11-kit0:armhf (0.23.9-2) over (0.23.7-3) ... Setting up libp11-kit0:armhf (0.23.9-2) ... (Reading database ... 12461 files and directories currently installed.) Preparing to unpack .../libtasn1-6_4.12-3_armhf.deb ... Unpacking libtasn1-6:armhf (4.12-3) over (4.12-2.1) ... Setting up libtasn1-6:armhf (4.12-3) ... (Reading database ... 12461 files and directories currently installed.) Preparing to unpack .../00-libgomp1_8-20180110-1ubuntu1_armhf.deb ... Unpacking libgomp1:armhf (8-20180110-1ubuntu1) over (7.2.0-6ubuntu1) ... Preparing to unpack .../01-g++-7_7.2.0-18ubuntu2_armhf.deb ... Unpacking g++-7 (7.2.0-18ubuntu2) over (7.2.0-6ubuntu1) ... Preparing to unpack .../02-gcc-7_7.2.0-18ubuntu2_armhf.deb ... Unpacking gcc-7 (7.2.0-18ubuntu2) over (7.2.0-6ubuntu1) ... Preparing to unpack .../03-cpp-7_7.2.0-18ubuntu2_armhf.deb ... Unpacking cpp-7 (7.2.0-18ubuntu2) over (7.2.0-6ubuntu1) ... Preparing to unpack .../04-libcc1-0_8-20180110-1ubuntu1_armhf.deb ... Unpacking libcc1-0:armhf (8-20180110-1ubuntu1) over (7.2.0-6ubuntu1) ... Preparing to unpack .../05-libbinutils_2.29.1-12ubuntu1_armhf.deb ... Unpacking libbinutils:armhf (2.29.1-12ubuntu1) over (2.29.1-1ubuntu1) ... Preparing to unpack .../06-binutils_2.29.1-12ubuntu1_armhf.deb ... Unpacking binutils (2.29.1-12ubuntu1) over (2.29.1-1ubuntu1) ... Preparing to unpack .../07-binutils-common_2.29.1-12ubuntu1_armhf.deb ... Unpacking binutils-common:armhf (2.29.1-12ubuntu1) over (2.29.1-1ubuntu1) ... Preparing to unpack .../08-binutils-arm-linux-gnueabihf_2.29.1-12ubuntu1_armhf.deb ... Unpacking binutils-arm-linux-gnueabihf (2.29.1-12ubuntu1) over (2.29.1-1ubuntu1) ... Preparing to unpack .../09-libatomic1_8-20180110-1ubuntu1_armhf.deb ... Unpacking libatomic1:armhf (8-20180110-1ubuntu1) over (7.2.0-6ubuntu1) ... Preparing to unpack .../10-libasan4_7.2.0-18ubuntu2_armhf.deb ... Unpacking libasan4:armhf (7.2.0-18ubuntu2) over (7.2.0-6ubuntu1) ... Preparing to unpack .../11-libubsan0_7.2.0-18ubuntu2_armhf.deb ... Unpacking libubsan0:armhf (7.2.0-18ubuntu2) over (7.2.0-6ubuntu1) ... Preparing to unpack .../12-libcilkrts5_7.2.0-18ubuntu2_armhf.deb ... Unpacking libcilkrts5:armhf (7.2.0-18ubuntu2) over (7.2.0-6ubuntu1) ... Preparing to unpack .../13-libstdc++-7-dev_7.2.0-18ubuntu2_armhf.deb ... Unpacking libstdc++-7-dev:armhf (7.2.0-18ubuntu2) over (7.2.0-6ubuntu1) ... Preparing to unpack .../14-libgcc-7-dev_7.2.0-18ubuntu2_armhf.deb ... Unpacking libgcc-7-dev:armhf (7.2.0-18ubuntu2) over (7.2.0-6ubuntu1) ... Preparing to unpack .../15-gcc-7-base_7.2.0-18ubuntu2_armhf.deb ... Unpacking gcc-7-base:armhf (7.2.0-18ubuntu2) over (7.2.0-6ubuntu1) ... Preparing to unpack .../16-lsb-base_9.20170808ubuntu1_all.deb ... Unpacking lsb-base (9.20170808ubuntu1) over (9.20160110ubuntu5) ... Preparing to unpack .../17-sensible-utils_0.0.11_all.deb ... Unpacking sensible-utils (0.0.11) over (0.0.10) ... Preparing to unpack .../18-libassuan0_2.5.1-1_armhf.deb ... Unpacking libassuan0:armhf (2.5.1-1) over (2.4.3-3) ... Preparing to unpack .../19-pinentry-curses_1.0.0-3_armhf.deb ... Unpacking pinentry-curses (1.0.0-3) over (1.0.0-2) ... Preparing to unpack .../20-libnpth0_1.5-3_armhf.deb ... Unpacking libnpth0:armhf (1.5-3) over (1.5-2) ... Preparing to unpack .../21-gnupg_2.1.15-1ubuntu8_armhf.deb ... Unpacking gnupg (2.1.15-1ubuntu8) over (2.1.15-1ubuntu7) ... Preparing to unpack .../22-gnupg-agent_2.1.15-1ubuntu8_armhf.deb ... Unpacking gnupg-agent (2.1.15-1ubuntu8) over (2.1.15-1ubuntu7) ... Preparing to unpack .../23-libsqlite3-0_3.21.0-1_armhf.deb ... Unpacking libsqlite3-0:armhf (3.21.0-1) over (3.19.3-3) ... Preparing to unpack .../24-libroken18-heimdal_7.5.0+dfsg-1_armhf.deb ... Unpacking libroken18-heimdal:armhf (7.5.0+dfsg-1) over (7.4.0.dfsg.1-2) ... Preparing to unpack .../25-libasn1-8-heimdal_7.5.0+dfsg-1_armhf.deb ... Unpacking libasn1-8-heimdal:armhf (7.5.0+dfsg-1) over (7.4.0.dfsg.1-2) ... Preparing to unpack .../26-libheimbase1-heimdal_7.5.0+dfsg-1_armhf.deb ... Unpacking libheimbase1-heimdal:armhf (7.5.0+dfsg-1) over (7.4.0.dfsg.1-2) ... Preparing to unpack .../27-libhcrypto4-heimdal_7.5.0+dfsg-1_armhf.deb ... Unpacking libhcrypto4-heimdal:armhf (7.5.0+dfsg-1) over (7.4.0.dfsg.1-2) ... Preparing to unpack .../28-libwind0-heimdal_7.5.0+dfsg-1_armhf.deb ... Unpacking libwind0-heimdal:armhf (7.5.0+dfsg-1) over (7.4.0.dfsg.1-2) ... Preparing to unpack .../29-libhx509-5-heimdal_7.5.0+dfsg-1_armhf.deb ... Unpacking libhx509-5-heimdal:armhf (7.5.0+dfsg-1) over (7.4.0.dfsg.1-2) ... Preparing to unpack .../30-libkrb5-26-heimdal_7.5.0+dfsg-1_armhf.deb ... Unpacking libkrb5-26-heimdal:armhf (7.5.0+dfsg-1) over (7.4.0.dfsg.1-2) ... Preparing to unpack .../31-libheimntlm0-heimdal_7.5.0+dfsg-1_armhf.deb ... Unpacking libheimntlm0-heimdal:armhf (7.5.0+dfsg-1) over (7.4.0.dfsg.1-2) ... Preparing to unpack .../32-libgssapi3-heimdal_7.5.0+dfsg-1_armhf.deb ... Unpacking libgssapi3-heimdal:armhf (7.5.0+dfsg-1) over (7.4.0.dfsg.1-2) ... Preparing to unpack .../33-libssl1.0.0_1.0.2g-1ubuntu14_armhf.deb ... Unpacking libssl1.0.0:armhf (1.0.2g-1ubuntu14) over (1.0.2g-1ubuntu13) ... Preparing to unpack .../34-multiarch-support_2.26-0ubuntu2_armhf.deb ... Unpacking multiarch-support (2.26-0ubuntu2) over (2.26-0ubuntu1) ... Preparing to unpack .../35-openssl_1.0.2g-1ubuntu14_armhf.deb ... Unpacking openssl (1.0.2g-1ubuntu14) over (1.0.2g-1ubuntu13) ... Preparing to unpack .../36-tzdata_2017c-1_all.deb ... Unpacking tzdata (2017c-1) over (2017b-2) ... Preparing to unpack .../37-libidn2-0_2.0.4-1_armhf.deb ... Unpacking libidn2-0:armhf (2.0.4-1) over (2.0.2-5) ... Preparing to unpack .../38-libkeyutils1_1.5.9-9.2ubuntu1_armhf.deb ... Unpacking libkeyutils1:armhf (1.5.9-9.2ubuntu1) over (1.5.9-9ubuntu1) ... Preparing to unpack .../39-libpng16-16_1.6.34-1_armhf.deb ... Unpacking libpng16-16:armhf (1.6.34-1) over (1.6.32-2) ... Preparing to unpack .../40-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 .../41-cpp-8_8-20180110-1ubuntu1_armhf.deb ... Unpacking cpp-8 (8-20180110-1ubuntu1) ... Preparing to unpack .../42-cpp_4%3a8-20121108-1ubuntu0.2_armhf.deb ... Unpacking cpp (4:8-20121108-1ubuntu0.2) over (4:7.2.0-1ubuntu1) ... Selecting previously unselected package libasan5:armhf. Preparing to unpack .../43-libasan5_8-20180110-1ubuntu1_armhf.deb ... Unpacking libasan5:armhf (8-20180110-1ubuntu1) ... Selecting previously unselected package libubsan1:armhf. Preparing to unpack .../44-libubsan1_8-20180110-1ubuntu1_armhf.deb ... Unpacking libubsan1:armhf (8-20180110-1ubuntu1) ... Selecting previously unselected package libgcc-8-dev:armhf. Preparing to unpack .../45-libgcc-8-dev_8-20180110-1ubuntu1_armhf.deb ... Unpacking libgcc-8-dev:armhf (8-20180110-1ubuntu1) ... Selecting previously unselected package gcc-8. Preparing to unpack .../46-gcc-8_8-20180110-1ubuntu1_armhf.deb ... Unpacking gcc-8 (8-20180110-1ubuntu1) ... Preparing to unpack .../47-gcc_4%3a8-20121108-1ubuntu0.2_armhf.deb ... Unpacking gcc (4:8-20121108-1ubuntu0.2) over (4:7.2.0-1ubuntu1) ... Selecting previously unselected package libstdc++-8-dev:armhf. Preparing to unpack .../48-libstdc++-8-dev_8-20180110-1ubuntu1_armhf.deb ... Unpacking libstdc++-8-dev:armhf (8-20180110-1ubuntu1) ... Selecting previously unselected package g++-8. Preparing to unpack .../49-g++-8_8-20180110-1ubuntu1_armhf.deb ... Unpacking g++-8 (8-20180110-1ubuntu1) ... Preparing to unpack .../50-g++_4%3a8-20121108-1ubuntu0.2_armhf.deb ... Unpacking g++ (4:8-20121108-1ubuntu0.2) over (4:7.2.0-1ubuntu1) ... Preparing to unpack .../51-dpkg-dev_1.19.0.4ubuntu1_all.deb ... Unpacking dpkg-dev (1.19.0.4ubuntu1) over (1.18.24ubuntu1) ... Preparing to unpack .../52-libdpkg-perl_1.19.0.4ubuntu1_all.deb ... Unpacking libdpkg-perl (1.19.0.4ubuntu1) over (1.18.24ubuntu1) ... Preparing to unpack .../53-build-essential_12.4ubuntu1_armhf.deb ... Unpacking build-essential (12.4ubuntu1) over (12.1ubuntu2) ... Selecting previously unselected package libnghttp2-14:armhf. Preparing to unpack .../54-libnghttp2-14_1.29.0-1_armhf.deb ... Unpacking libnghttp2-14:armhf (1.29.0-1) ... Preparing to unpack .../55-libpsl5_0.19.1-4_armhf.deb ... Unpacking libpsl5:armhf (0.19.1-4) over (0.18.0-2) ... Preparing to unpack .../56-libcurl3-gnutls_7.57.0-1ubuntu1_armhf.deb ... Unpacking libcurl3-gnutls:armhf (7.57.0-1ubuntu1) over (7.55.1-1ubuntu1) ... Preparing to unpack .../57-liblockfile-bin_1.14-1.1_armhf.deb ... Unpacking liblockfile-bin (1.14-1.1) over (1.14-1) ... Preparing to unpack .../58-liblockfile1_1.14-1.1_armhf.deb ... Unpacking liblockfile1:armhf (1.14-1.1) over (1.14-1) ... Preparing to unpack .../59-optipng_0.7.6-1.1_armhf.deb ... Unpacking optipng (0.7.6-1.1) over (0.7.6-1build1) ... Setting up libnpth0:armhf (1.5-3) ... Setting up cpp-8 (8-20180110-1ubuntu1) ... Setting up libgomp1:armhf (8-20180110-1ubuntu1) ... Setting up libatomic1:armhf (8-20180110-1ubuntu1) ... Setting up cpp (4:8-20121108-1ubuntu0.2) ... Setting up liblockfile-bin (1.14-1.1) ... Setting up libcc1-0:armhf (8-20180110-1ubuntu1) ... Setting up apt-transport-https (1.6~alpha5) ... Setting up libidn2-0:armhf (2.0.4-1) ... Setting up libssl1.0.0:armhf (1.0.2g-1ubuntu14) ... Setting up libnghttp2-14:armhf (1.29.0-1) ... Setting up libpng16-16:armhf (1.6.34-1) ... Setting up libpsl5:armhf (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:58:57 UTC 2018. Universal Time is now: Mon Jan 15 10:58:57 UTC 2018. Run 'dpkg-reconfigure tzdata' if you wish to change it. Setting up systemd-sysv (235-3ubuntu3) ... Setting up liblockfile1:armhf (1.14-1.1) ... Setting up linux-libc-dev:armhf (4.13.0-25.29) ... Setting up libroken18-heimdal:armhf (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:armhf (7.2.0-18ubuntu2) ... Setting up binutils-common:armhf (2.29.1-12ubuntu1) ... Setting up sensible-utils (0.0.11) ... Processing triggers for libc-bin (2.26-0ubuntu2) ... Setting up libperl5.26:armhf (5.26.1-3) ... Setting up libheimbase1-heimdal:armhf (7.5.0+dfsg-1) ... Setting up openssl (1.0.2g-1ubuntu14) ... Setting up libsqlite3-0:armhf (3.21.0-1) ... Setting up libc-dev-bin (2.26-0ubuntu2) ... Setting up libkeyutils1:armhf (1.5.9-9.2ubuntu1) ... Setting up libc6-dev:armhf (2.26-0ubuntu2) ... Setting up libasan5:armhf (8-20180110-1ubuntu1) ... Setting up libassuan0:armhf (2.5.1-1) ... Setting up libubsan1:armhf (8-20180110-1ubuntu1) ... Setting up libwind0-heimdal:armhf (7.5.0+dfsg-1) ... Setting up libasan4:armhf (7.2.0-18ubuntu2) ... Setting up libbinutils:armhf (2.29.1-12ubuntu1) ... Setting up libcilkrts5:armhf (7.2.0-18ubuntu2) ... Setting up libcurl3-gnutls:armhf (7.57.0-1ubuntu1) ... Setting up init (1.51) ... Setting up libasn1-8-heimdal:armhf (7.5.0+dfsg-1) ... Setting up libubsan0:armhf (7.2.0-18ubuntu2) ... Setting up libhcrypto4-heimdal:armhf (7.5.0+dfsg-1) ... Setting up binutils-arm-linux-gnueabihf (2.29.1-12ubuntu1) ... Setting up libhx509-5-heimdal:armhf (7.5.0+dfsg-1) ... Setting up libgcc-7-dev:armhf (7.2.0-18ubuntu2) ... Setting up cpp-7 (7.2.0-18ubuntu2) ... Setting up libstdc++-7-dev:armhf (7.2.0-18ubuntu2) ... Setting up perl (5.26.1-3) ... Setting up pinentry-curses (1.0.0-3) ... Setting up libgcc-8-dev:armhf (8-20180110-1ubuntu1) ... Setting up binutils (2.29.1-12ubuntu1) ... Setting up libkrb5-26-heimdal:armhf (7.5.0+dfsg-1) ... Setting up gnupg-agent (2.1.15-1ubuntu8) ... Setting up libheimntlm0-heimdal:armhf (7.5.0+dfsg-1) ... Setting up libstdc++-8-dev:armhf (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:armhf (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-14111326 armhf bionic -c chroot:build-PACKAGEBUILD-14111326 --arch=armhf --dist=bionic --nolog 'kakoune_0~2016.12.20.1.3a6167ae-1build1.dsc' Initiating build PACKAGEBUILD-14111326 with 4 jobs across 4 processor cores. Kernel reported to sbuild: 4.4.0-101-generic #124-Ubuntu SMP Fri Nov 10 18:30:44 UTC 2017 armv7l sbuild (Debian sbuild) 0.67.0 (26 Dec 2015) on bos01-arm64-045.buildd +==============================================================================+ | kakoune 0~2016.12.20.1.3a6167ae-1build1 (armhf) 15 Jan 2018 10:58 | +==============================================================================+ Package: kakoune Version: 0~2016.12.20.1.3a6167ae-1build1 Source Version: 0~2016.12.20.1.3a6167ae-1build1 Distribution: bionic Machine Architecture: arm64 Host Architecture: armhf Build Architecture: armhf I: NOTICE: Log filtering will replace 'build/kakoune-rvr_lX/kakoune-0~2016.12.20.1.3a6167ae' with '<>' I: NOTICE: Log filtering will replace 'build/kakoune-rvr_lX' with '<>' I: NOTICE: Log filtering will replace 'home/buildd/build-PACKAGEBUILD-14111326/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-OmWEoB/apt_archive/sbuild-build-depends-core-dummy.deb'. Ign:1 copy:/<>/resolver-OmWEoB/apt_archive ./ InRelease Get:2 copy:/<>/resolver-OmWEoB/apt_archive ./ Release [2119 B] Ign:3 copy:/<>/resolver-OmWEoB/apt_archive ./ Release.gpg Get:4 copy:/<>/resolver-OmWEoB/apt_archive ./ Sources [214 B] Get:5 copy:/<>/resolver-OmWEoB/apt_archive ./ Packages [528 B] Fetched 2861 B in 0s (62.3 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 libustr-1.0-1 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 852 B of archives. After this operation, 0 B of additional disk space will be used. Get:1 copy:/<>/resolver-OmWEoB/apt_archive ./ sbuild-build-depends-core-dummy 0.invalid.0 [852 B] debconf: delaying package configuration, since apt-utils is not installed Fetched 852 B in 0s (61.8 kB/s) Selecting previously unselected package sbuild-build-depends-core-dummy. (Reading database ... 13406 files and directories currently installed.) Preparing to unpack .../sbuild-build-depends-core-dummy_0.invalid.0_armhf.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-XX1JGm/apt_archive/sbuild-build-depends-kakoune-dummy.deb'. Ign:1 copy:/<>/resolver-XX1JGm/apt_archive ./ InRelease Get:2 copy:/<>/resolver-XX1JGm/apt_archive ./ Release [2119 B] Ign:3 copy:/<>/resolver-XX1JGm/apt_archive ./ Release.gpg Get:4 copy:/<>/resolver-XX1JGm/apt_archive ./ Sources [258 B] Get:5 copy:/<>/resolver-XX1JGm/apt_archive ./ Packages [576 B] Fetched 2953 B in 0s (60.5 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 libustr-1.0-1 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-context1.65-dev libboost-coroutine1.65-dev libboost-date-time1.65-dev libboost-exception1.65-dev libboost-fiber1.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 45.5 MB of archives. After this operation, 288 MB of additional disk space will be used. Get:1 copy:/<>/resolver-XX1JGm/apt_archive ./ sbuild-build-depends-kakoune-dummy 0.invalid.0 [908 B] Get:2 http://ftpmaster.internal/ubuntu bionic/main armhf libpython3.6-minimal armhf 3.6.4-2 [523 kB] Get:3 http://ftpmaster.internal/ubuntu bionic/main armhf libexpat1 armhf 2.2.5-3 [59.7 kB] Get:4 http://ftpmaster.internal/ubuntu bionic/main armhf python3.6-minimal armhf 3.6.4-2 [1213 kB] Get:5 http://ftpmaster.internal/ubuntu bionic/main armhf python3-minimal armhf 3.6.3-0ubuntu2 [23.3 kB] Get:6 http://ftpmaster.internal/ubuntu bionic/main armhf mime-support all 3.60ubuntu1 [30.1 kB] Get:7 http://ftpmaster.internal/ubuntu bionic/main armhf libmpdec2 armhf 2.4.2-1 [66.9 kB] Get:8 http://ftpmaster.internal/ubuntu bionic/main armhf libpython3.6-stdlib armhf 3.6.4-2 [1588 kB] Get:9 http://ftpmaster.internal/ubuntu bionic/main armhf python3.6-2to3 all 3.6.4-2 [13.9 kB] Get:10 http://ftpmaster.internal/ubuntu bionic/main armhf python3-distutils all 3.6.4~rc1-6 [145 kB] Get:11 http://ftpmaster.internal/ubuntu bionic/main armhf python3.6 armhf 3.6.4-2 [181 kB] Get:12 http://ftpmaster.internal/ubuntu bionic/main armhf libpython3-stdlib armhf 3.6.3-0ubuntu2 [6820 B] Get:13 http://ftpmaster.internal/ubuntu bionic/main armhf dh-python all 2.20170125 [83.7 kB] Get:14 http://ftpmaster.internal/ubuntu bionic/main armhf python3 armhf 3.6.3-0ubuntu2 [8712 B] Get:15 http://ftpmaster.internal/ubuntu bionic/main armhf groff-base armhf 1.22.3-9 [1013 kB] Get:16 http://ftpmaster.internal/ubuntu bionic/main armhf libbsd0 armhf 0.8.6-3 [40.6 kB] Get:17 http://ftpmaster.internal/ubuntu bionic/main armhf bsdmainutils armhf 9.0.14ubuntu1 [173 kB] Get:18 http://ftpmaster.internal/ubuntu bionic/main armhf libpipeline1 armhf 1.5.0-1 [21.1 kB] Get:19 http://ftpmaster.internal/ubuntu bionic/main armhf man-db armhf 2.7.6.1-4 [872 kB] Get:20 http://ftpmaster.internal/ubuntu bionic/main armhf libpython2.7-minimal armhf 2.7.14-4 [337 kB] Get:21 http://ftpmaster.internal/ubuntu bionic/main armhf python2.7-minimal armhf 2.7.14-4 [1082 kB] Get:22 http://ftpmaster.internal/ubuntu bionic/main armhf python-minimal armhf 2.7.14-2ubuntu1 [28.1 kB] Get:23 http://ftpmaster.internal/ubuntu bionic/main armhf libpython2.7-stdlib armhf 2.7.14-4 [1833 kB] Get:24 http://ftpmaster.internal/ubuntu bionic/main armhf python2.7 armhf 2.7.14-4 [233 kB] Get:25 http://ftpmaster.internal/ubuntu bionic/main armhf libpython-stdlib armhf 2.7.14-2ubuntu1 [7576 B] Get:26 http://ftpmaster.internal/ubuntu bionic/main armhf python armhf 2.7.14-2ubuntu1 [140 kB] Get:27 http://ftpmaster.internal/ubuntu bionic/main armhf sgml-base all 1.29 [12.3 kB] Get:28 http://ftpmaster.internal/ubuntu bionic/main armhf libmagic-mgc armhf 1:5.32-1 [184 kB] Get:29 http://ftpmaster.internal/ubuntu bionic/main armhf libmagic1 armhf 1:5.32-1 [62.6 kB] Get:30 http://ftpmaster.internal/ubuntu bionic/main armhf file armhf 1:5.32-1 [21.4 kB] Get:31 http://ftpmaster.internal/ubuntu bionic/main armhf libelf1 armhf 0.170-0.2 [42.4 kB] Get:32 http://ftpmaster.internal/ubuntu bionic/main armhf libglib2.0-0 armhf 2.54.1-1ubuntu1 [1013 kB] Get:33 http://ftpmaster.internal/ubuntu bionic/main armhf libglib2.0-data all 2.54.1-1ubuntu1 [4250 B] Get:34 http://ftpmaster.internal/ubuntu bionic/main armhf libfreetype6 armhf 2.8-0.2ubuntu2 [275 kB] Get:35 http://ftpmaster.internal/ubuntu bionic/main armhf libgraphite2-3 armhf 1.3.10-8 [65.7 kB] Get:36 http://ftpmaster.internal/ubuntu bionic/main armhf libharfbuzz0b armhf 1.7.2-1 [206 kB] Get:37 http://ftpmaster.internal/ubuntu bionic/main armhf libicu-le-hb0 armhf 1.0.3+git161113-4 [12.5 kB] Get:38 http://ftpmaster.internal/ubuntu bionic/main armhf libicu60 armhf 60.2-1ubuntu1 [7811 kB] Get:39 http://ftpmaster.internal/ubuntu bionic/main armhf libxml2 armhf 2.9.4+dfsg1-5.2ubuntu1 [574 kB] Get:40 http://ftpmaster.internal/ubuntu bionic/main armhf gettext-base armhf 0.19.8.1-4ubuntu2 [45.9 kB] Get:41 http://ftpmaster.internal/ubuntu bionic/main armhf libgirepository-1.0-1 armhf 1.54.1-4 [69.7 kB] Get:42 http://ftpmaster.internal/ubuntu bionic/main armhf gir1.2-glib-2.0 armhf 1.54.1-4 [131 kB] Get:43 http://ftpmaster.internal/ubuntu bionic/universe armhf asciidoc-common all 8.6.10-2 [199 kB] Get:44 http://ftpmaster.internal/ubuntu bionic/main armhf libxml2-utils armhf 2.9.4+dfsg1-5.2ubuntu1 [34.7 kB] Get:45 http://ftpmaster.internal/ubuntu bionic/universe armhf asciidoc-base all 8.6.10-2 [80.7 kB] Get:46 http://ftpmaster.internal/ubuntu bionic/universe armhf asciidoc all 8.6.10-2 [3264 B] Get:47 http://ftpmaster.internal/ubuntu bionic/main armhf libsigsegv2 armhf 2.11-1 [12.6 kB] Get:48 http://ftpmaster.internal/ubuntu bionic/main armhf m4 armhf 1.4.18-1 [181 kB] Get:49 http://ftpmaster.internal/ubuntu bionic/main armhf autoconf all 2.69-11 [322 kB] Get:50 http://ftpmaster.internal/ubuntu bionic/main armhf autotools-dev all 20171216.1 [39.7 kB] Get:51 http://ftpmaster.internal/ubuntu bionic/main armhf automake all 1:1.15.1-3ubuntu1 [509 kB] Get:52 http://ftpmaster.internal/ubuntu bionic/main armhf autopoint all 0.19.8.1-4ubuntu2 [412 kB] Get:53 http://ftpmaster.internal/ubuntu bionic/main armhf libtool all 2.4.6-2 [194 kB] Get:54 http://ftpmaster.internal/ubuntu bionic/main armhf dh-autoreconf all 15 [15.8 kB] Get:55 http://ftpmaster.internal/ubuntu bionic/main armhf libarchive-zip-perl all 1.60-1 [83.9 kB] Get:56 http://ftpmaster.internal/ubuntu bionic/main armhf libfile-stripnondeterminism-perl all 0.040-1 [13.9 kB] Get:57 http://ftpmaster.internal/ubuntu bionic/main armhf libtimedate-perl all 2.3000-2 [37.5 kB] Get:58 http://ftpmaster.internal/ubuntu bionic/main armhf dh-strip-nondeterminism all 0.040-1 [5196 B] Get:59 http://ftpmaster.internal/ubuntu bionic/main armhf libcroco3 armhf 0.6.12-2 [69.4 kB] Get:60 http://ftpmaster.internal/ubuntu bionic/main armhf gettext armhf 0.19.8.1-4ubuntu2 [1027 kB] Get:61 http://ftpmaster.internal/ubuntu bionic/main armhf intltool-debian all 0.35.0+20060710.4 [24.9 kB] Get:62 http://ftpmaster.internal/ubuntu bionic/main armhf po-debconf all 1.0.20 [232 kB] Get:63 http://ftpmaster.internal/ubuntu bionic/main armhf debhelper all 11ubuntu1 [887 kB] Get:64 http://ftpmaster.internal/ubuntu bionic/main armhf xml-core all 0.18 [21.3 kB] Get:65 http://ftpmaster.internal/ubuntu bionic/main armhf docbook-xsl all 1.79.1+dfsg-2 [1075 kB] Get:66 http://ftpmaster.internal/ubuntu bionic/main armhf gir1.2-harfbuzz-0.0 armhf 1.7.2-1 [18.5 kB] Get:67 http://ftpmaster.internal/ubuntu bionic/main armhf icu-devtools armhf 60.2-1ubuntu1 [162 kB] Get:68 http://ftpmaster.internal/ubuntu bionic/main armhf libboost1.65-dev armhf 1.65.1+dfsg-0ubuntu4 [7217 kB] Get:69 http://ftpmaster.internal/ubuntu bionic/main armhf libboost-regex1.65.1 armhf 1.65.1+dfsg-0ubuntu4 [209 kB] Get:70 http://ftpmaster.internal/ubuntu bionic/main armhf libharfbuzz-icu0 armhf 1.7.2-1 [5200 B] Get:71 http://ftpmaster.internal/ubuntu bionic/main armhf libharfbuzz-gobject0 armhf 1.7.2-1 [12.0 kB] Get:72 http://ftpmaster.internal/ubuntu bionic/main armhf libglib2.0-bin armhf 2.54.1-1ubuntu1 [64.4 kB] Get:73 http://ftpmaster.internal/ubuntu bionic/main armhf libglib2.0-dev-bin armhf 2.54.1-1ubuntu1 [83.7 kB] Get:74 http://ftpmaster.internal/ubuntu bionic/main armhf libpcre16-3 armhf 2:8.39-8 [128 kB] Get:75 http://ftpmaster.internal/ubuntu bionic/main armhf libpcre32-3 armhf 2:8.39-8 [120 kB] Get:76 http://ftpmaster.internal/ubuntu bionic/main armhf libpcrecpp0v5 armhf 2:8.39-8 [13.1 kB] Get:77 http://ftpmaster.internal/ubuntu bionic/main armhf libpcre3-dev armhf 2:8.39-8 [473 kB] Get:78 http://ftpmaster.internal/ubuntu bionic/main armhf pkg-config armhf 0.29.1-0ubuntu2 [42.0 kB] Get:79 http://ftpmaster.internal/ubuntu bionic/main armhf zlib1g-dev armhf 1:1.2.11.dfsg-0ubuntu2 [168 kB] Get:80 http://ftpmaster.internal/ubuntu bionic/main armhf libglib2.0-dev armhf 2.54.1-1ubuntu1 [1276 kB] Get:81 http://ftpmaster.internal/ubuntu bionic/main armhf libgraphite2-dev armhf 1.3.10-8 [14.5 kB] Get:82 http://ftpmaster.internal/ubuntu bionic/main armhf libharfbuzz-dev armhf 1.7.2-1 [276 kB] Get:83 http://ftpmaster.internal/ubuntu bionic/main armhf libicu-le-hb-dev armhf 1.0.3+git161113-4 [27.8 kB] Get:84 http://ftpmaster.internal/ubuntu bionic/main armhf libicu-dev armhf 60.2-1ubuntu1 [8721 kB] Get:85 http://ftpmaster.internal/ubuntu bionic/universe armhf libboost-regex1.65-dev armhf 1.65.1+dfsg-0ubuntu4 [305 kB] Get:86 http://ftpmaster.internal/ubuntu bionic/universe armhf libboost-regex-dev armhf 1.65.1.0ubuntu1 [3184 B] Get:87 http://ftpmaster.internal/ubuntu bionic/main armhf libtinfo-dev armhf 6.0+20160625-1ubuntu1 [66.4 kB] Get:88 http://ftpmaster.internal/ubuntu bionic/main armhf libncursesw5-dev armhf 6.0+20160625-1ubuntu1 [176 kB] Get:89 http://ftpmaster.internal/ubuntu bionic/main armhf libxslt1.1 armhf 1.1.29-5 [131 kB] Get:90 http://ftpmaster.internal/ubuntu bionic/main armhf xsltproc armhf 1.1.29-5 [13.4 kB] debconf: delaying package configuration, since apt-utils is not installed Fetched 45.5 MB in 1s (24.0 MB/s) (Reading database ... 13406 files and directories currently installed.) Removing pkg-create-dbgsym (0.73) ... Selecting previously unselected package libpython3.6-minimal:armhf. (Reading database ... 13397 files and directories currently installed.) Preparing to unpack .../00-libpython3.6-minimal_3.6.4-2_armhf.deb ... Unpacking libpython3.6-minimal:armhf (3.6.4-2) ... Selecting previously unselected package libexpat1:armhf. Preparing to unpack .../01-libexpat1_2.2.5-3_armhf.deb ... Unpacking libexpat1:armhf (2.2.5-3) ... Selecting previously unselected package python3.6-minimal. Preparing to unpack .../02-python3.6-minimal_3.6.4-2_armhf.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_armhf.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:armhf. Preparing to unpack .../05-libmpdec2_2.4.2-1_armhf.deb ... Unpacking libmpdec2:armhf (2.4.2-1) ... Selecting previously unselected package libpython3.6-stdlib:armhf. Preparing to unpack .../06-libpython3.6-stdlib_3.6.4-2_armhf.deb ... Unpacking libpython3.6-stdlib:armhf (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_armhf.deb ... Unpacking python3.6 (3.6.4-2) ... Selecting previously unselected package libpython3-stdlib:armhf. Preparing to unpack .../10-libpython3-stdlib_3.6.3-0ubuntu2_armhf.deb ... Unpacking libpython3-stdlib:armhf (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:armhf (3.6.4-2) ... Setting up libexpat1:armhf (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 ... 14240 files and directories currently installed.) Preparing to unpack .../00-python3_3.6.3-0ubuntu2_armhf.deb ... Unpacking python3 (3.6.3-0ubuntu2) ... Selecting previously unselected package groff-base. Preparing to unpack .../01-groff-base_1.22.3-9_armhf.deb ... Unpacking groff-base (1.22.3-9) ... Selecting previously unselected package libbsd0:armhf. Preparing to unpack .../02-libbsd0_0.8.6-3_armhf.deb ... Unpacking libbsd0:armhf (0.8.6-3) ... Selecting previously unselected package bsdmainutils. Preparing to unpack .../03-bsdmainutils_9.0.14ubuntu1_armhf.deb ... Unpacking bsdmainutils (9.0.14ubuntu1) ... Selecting previously unselected package libpipeline1:armhf. Preparing to unpack .../04-libpipeline1_1.5.0-1_armhf.deb ... Unpacking libpipeline1:armhf (1.5.0-1) ... Selecting previously unselected package man-db. Preparing to unpack .../05-man-db_2.7.6.1-4_armhf.deb ... Unpacking man-db (2.7.6.1-4) ... Selecting previously unselected package libpython2.7-minimal:armhf. Preparing to unpack .../06-libpython2.7-minimal_2.7.14-4_armhf.deb ... Unpacking libpython2.7-minimal:armhf (2.7.14-4) ... Selecting previously unselected package python2.7-minimal. Preparing to unpack .../07-python2.7-minimal_2.7.14-4_armhf.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_armhf.deb ... Unpacking python-minimal (2.7.14-2ubuntu1) ... Selecting previously unselected package libpython2.7-stdlib:armhf. Preparing to unpack .../09-libpython2.7-stdlib_2.7.14-4_armhf.deb ... Unpacking libpython2.7-stdlib:armhf (2.7.14-4) ... Selecting previously unselected package python2.7. Preparing to unpack .../10-python2.7_2.7.14-4_armhf.deb ... Unpacking python2.7 (2.7.14-4) ... Selecting previously unselected package libpython-stdlib:armhf. Preparing to unpack .../11-libpython-stdlib_2.7.14-2ubuntu1_armhf.deb ... Unpacking libpython-stdlib:armhf (2.7.14-2ubuntu1) ... Setting up libpython2.7-minimal:armhf (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 ... 15513 files and directories currently installed.) Preparing to unpack .../00-python_2.7.14-2ubuntu1_armhf.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_armhf.deb ... Unpacking libmagic-mgc (1:5.32-1) ... Selecting previously unselected package libmagic1:armhf. Preparing to unpack .../03-libmagic1_1%3a5.32-1_armhf.deb ... Unpacking libmagic1:armhf (1:5.32-1) ... Selecting previously unselected package file. Preparing to unpack .../04-file_1%3a5.32-1_armhf.deb ... Unpacking file (1:5.32-1) ... Selecting previously unselected package libelf1:armhf. Preparing to unpack .../05-libelf1_0.170-0.2_armhf.deb ... Unpacking libelf1:armhf (0.170-0.2) ... Selecting previously unselected package libglib2.0-0:armhf. Preparing to unpack .../06-libglib2.0-0_2.54.1-1ubuntu1_armhf.deb ... Unpacking libglib2.0-0:armhf (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:armhf. Preparing to unpack .../08-libfreetype6_2.8-0.2ubuntu2_armhf.deb ... Unpacking libfreetype6:armhf (2.8-0.2ubuntu2) ... Selecting previously unselected package libgraphite2-3:armhf. Preparing to unpack .../09-libgraphite2-3_1.3.10-8_armhf.deb ... Unpacking libgraphite2-3:armhf (1.3.10-8) ... Selecting previously unselected package libharfbuzz0b:armhf. Preparing to unpack .../10-libharfbuzz0b_1.7.2-1_armhf.deb ... Unpacking libharfbuzz0b:armhf (1.7.2-1) ... Selecting previously unselected package libicu-le-hb0:armhf. Preparing to unpack .../11-libicu-le-hb0_1.0.3+git161113-4_armhf.deb ... Unpacking libicu-le-hb0:armhf (1.0.3+git161113-4) ... Selecting previously unselected package libicu60:armhf. Preparing to unpack .../12-libicu60_60.2-1ubuntu1_armhf.deb ... Unpacking libicu60:armhf (60.2-1ubuntu1) ... Selecting previously unselected package libxml2:armhf. Preparing to unpack .../13-libxml2_2.9.4+dfsg1-5.2ubuntu1_armhf.deb ... Unpacking libxml2:armhf (2.9.4+dfsg1-5.2ubuntu1) ... Selecting previously unselected package gettext-base. Preparing to unpack .../14-gettext-base_0.19.8.1-4ubuntu2_armhf.deb ... Unpacking gettext-base (0.19.8.1-4ubuntu2) ... Selecting previously unselected package libgirepository-1.0-1:armhf. Preparing to unpack .../15-libgirepository-1.0-1_1.54.1-4_armhf.deb ... Unpacking libgirepository-1.0-1:armhf (1.54.1-4) ... Selecting previously unselected package gir1.2-glib-2.0:armhf. Preparing to unpack .../16-gir1.2-glib-2.0_1.54.1-4_armhf.deb ... Unpacking gir1.2-glib-2.0:armhf (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_armhf.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:armhf. Preparing to unpack .../21-libsigsegv2_2.11-1_armhf.deb ... Unpacking libsigsegv2:armhf (2.11-1) ... Selecting previously unselected package m4. Preparing to unpack .../22-m4_1.4.18-1_armhf.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:armhf. Preparing to unpack .../33-libcroco3_0.6.12-2_armhf.deb ... Unpacking libcroco3:armhf (0.6.12-2) ... Selecting previously unselected package gettext. Preparing to unpack .../34-gettext_0.19.8.1-4ubuntu2_armhf.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:armhf. Preparing to unpack .../40-gir1.2-harfbuzz-0.0_1.7.2-1_armhf.deb ... Unpacking gir1.2-harfbuzz-0.0:armhf (1.7.2-1) ... Selecting previously unselected package icu-devtools. Preparing to unpack .../41-icu-devtools_60.2-1ubuntu1_armhf.deb ... Unpacking icu-devtools (60.2-1ubuntu1) ... Selecting previously unselected package libboost1.65-dev:armhf. Preparing to unpack .../42-libboost1.65-dev_1.65.1+dfsg-0ubuntu4_armhf.deb ... Unpacking libboost1.65-dev:armhf (1.65.1+dfsg-0ubuntu4) ... Selecting previously unselected package libboost-regex1.65.1:armhf. Preparing to unpack .../43-libboost-regex1.65.1_1.65.1+dfsg-0ubuntu4_armhf.deb ... Unpacking libboost-regex1.65.1:armhf (1.65.1+dfsg-0ubuntu4) ... Selecting previously unselected package libharfbuzz-icu0:armhf. Preparing to unpack .../44-libharfbuzz-icu0_1.7.2-1_armhf.deb ... Unpacking libharfbuzz-icu0:armhf (1.7.2-1) ... Selecting previously unselected package libharfbuzz-gobject0:armhf. Preparing to unpack .../45-libharfbuzz-gobject0_1.7.2-1_armhf.deb ... Unpacking libharfbuzz-gobject0:armhf (1.7.2-1) ... Selecting previously unselected package libglib2.0-bin. Preparing to unpack .../46-libglib2.0-bin_2.54.1-1ubuntu1_armhf.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_armhf.deb ... Unpacking libglib2.0-dev-bin (2.54.1-1ubuntu1) ... Selecting previously unselected package libpcre16-3:armhf. Preparing to unpack .../48-libpcre16-3_2%3a8.39-8_armhf.deb ... Unpacking libpcre16-3:armhf (2:8.39-8) ... Selecting previously unselected package libpcre32-3:armhf. Preparing to unpack .../49-libpcre32-3_2%3a8.39-8_armhf.deb ... Unpacking libpcre32-3:armhf (2:8.39-8) ... Selecting previously unselected package libpcrecpp0v5:armhf. Preparing to unpack .../50-libpcrecpp0v5_2%3a8.39-8_armhf.deb ... Unpacking libpcrecpp0v5:armhf (2:8.39-8) ... Selecting previously unselected package libpcre3-dev:armhf. Preparing to unpack .../51-libpcre3-dev_2%3a8.39-8_armhf.deb ... Unpacking libpcre3-dev:armhf (2:8.39-8) ... Selecting previously unselected package pkg-config. Preparing to unpack .../52-pkg-config_0.29.1-0ubuntu2_armhf.deb ... Unpacking pkg-config (0.29.1-0ubuntu2) ... Selecting previously unselected package zlib1g-dev:armhf. Preparing to unpack .../53-zlib1g-dev_1%3a1.2.11.dfsg-0ubuntu2_armhf.deb ... Unpacking zlib1g-dev:armhf (1:1.2.11.dfsg-0ubuntu2) ... Selecting previously unselected package libglib2.0-dev:armhf. Preparing to unpack .../54-libglib2.0-dev_2.54.1-1ubuntu1_armhf.deb ... Unpacking libglib2.0-dev:armhf (2.54.1-1ubuntu1) ... Selecting previously unselected package libgraphite2-dev:armhf. Preparing to unpack .../55-libgraphite2-dev_1.3.10-8_armhf.deb ... Unpacking libgraphite2-dev:armhf (1.3.10-8) ... Selecting previously unselected package libharfbuzz-dev:armhf. Preparing to unpack .../56-libharfbuzz-dev_1.7.2-1_armhf.deb ... Unpacking libharfbuzz-dev:armhf (1.7.2-1) ... Selecting previously unselected package libicu-le-hb-dev:armhf. Preparing to unpack .../57-libicu-le-hb-dev_1.0.3+git161113-4_armhf.deb ... Unpacking libicu-le-hb-dev:armhf (1.0.3+git161113-4) ... Selecting previously unselected package libicu-dev. Preparing to unpack .../58-libicu-dev_60.2-1ubuntu1_armhf.deb ... Unpacking libicu-dev (60.2-1ubuntu1) ... Selecting previously unselected package libboost-regex1.65-dev:armhf. Preparing to unpack .../59-libboost-regex1.65-dev_1.65.1+dfsg-0ubuntu4_armhf.deb ... Unpacking libboost-regex1.65-dev:armhf (1.65.1+dfsg-0ubuntu4) ... Selecting previously unselected package libboost-regex-dev:armhf. Preparing to unpack .../60-libboost-regex-dev_1.65.1.0ubuntu1_armhf.deb ... Unpacking libboost-regex-dev:armhf (1.65.1.0ubuntu1) ... Selecting previously unselected package libtinfo-dev:armhf. Preparing to unpack .../61-libtinfo-dev_6.0+20160625-1ubuntu1_armhf.deb ... Unpacking libtinfo-dev:armhf (6.0+20160625-1ubuntu1) ... Selecting previously unselected package libncursesw5-dev:armhf. Preparing to unpack .../62-libncursesw5-dev_6.0+20160625-1ubuntu1_armhf.deb ... Unpacking libncursesw5-dev:armhf (6.0+20160625-1ubuntu1) ... Selecting previously unselected package libxslt1.1:armhf. Preparing to unpack .../63-libxslt1.1_1.1.29-5_armhf.deb ... Unpacking libxslt1.1:armhf (1.1.29-5) ... Selecting previously unselected package xsltproc. Preparing to unpack .../64-xsltproc_1.1.29-5_armhf.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_armhf.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:armhf (2.11-1) ... Setting up libelf1:armhf (0.170-0.2) ... Setting up groff-base (1.22.3-9) ... Setting up libglib2.0-0:armhf (2.54.1-1ubuntu1) ... No schema files found: doing nothing. Setting up libtinfo-dev:armhf (6.0+20160625-1ubuntu1) ... Setting up gettext-base (0.19.8.1-4ubuntu2) ... Setting up libpipeline1:armhf (1.5.0-1) ... Setting up m4 (1.4.18-1) ... Setting up sgml-base (1.29) ... Setting up libbsd0:armhf (0.8.6-3) ... Setting up libgirepository-1.0-1:armhf (1.54.1-4) ... Setting up libfreetype6:armhf (2.8-0.2ubuntu2) ... Setting up libmagic-mgc (1:5.32-1) ... Setting up libmagic1:armhf (1:5.32-1) ... Setting up libgraphite2-3:armhf (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:armhf (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:armhf (6.0+20160625-1ubuntu1) ... Setting up libpcrecpp0v5:armhf (2:8.39-8) ... Setting up libpcre32-3:armhf (2:8.39-8) ... Setting up libpcre16-3:armhf (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:armhf (1.65.1+dfsg-0ubuntu4) ... Setting up libgraphite2-dev:armhf (1.3.10-8) ... Setting up libpython2.7-stdlib:armhf (2.7.14-4) ... Setting up autopoint (0.19.8.1-4ubuntu2) ... Setting up libmpdec2:armhf (2.4.2-1) ... Setting up zlib1g-dev:armhf (1:1.2.11.dfsg-0ubuntu2) ... Setting up libfile-stripnondeterminism-perl (0.040-1) ... Setting up libpython3.6-stdlib:armhf (3.6.4-2) ... Setting up libpcre3-dev:armhf (2:8.39-8) ... Setting up python2.7 (2.7.14-4) ... Setting up libharfbuzz0b:armhf (1.7.2-1) ... Setting up autoconf (2.69-11) ... Setting up file (1:5.32-1) ... Setting up libpython-stdlib:armhf (2.7.14-2ubuntu1) ... Setting up gir1.2-harfbuzz-0.0:armhf (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:armhf (1.7.2-1) ... Setting up python (2.7.14-2ubuntu1) ... Setting up libtool (2.4.6-2) ... Setting up libpython3-stdlib:armhf (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:armhf (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:armhf (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:armhf (60.2-1ubuntu1) ... Setting up libharfbuzz-icu0:armhf (1.7.2-1) ... Setting up libxml2:armhf (2.9.4+dfsg1-5.2ubuntu1) ... Setting up libcroco3:armhf (0.6.12-2) ... Setting up libxslt1.1:armhf (1.1.29-5) ... Setting up icu-devtools (60.2-1ubuntu1) ... Setting up libharfbuzz-dev:armhf (1.7.2-1) ... Setting up libboost-regex1.65.1:armhf (1.65.1+dfsg-0ubuntu4) ... Setting up libicu-le-hb-dev:armhf (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:armhf (1.65.1+dfsg-0ubuntu4) ... Setting up po-debconf (1.0.20) ... Setting up libboost-regex-dev:armhf (1.65.1.0ubuntu1) ... Setting up debhelper (11ubuntu1) ... Setting up sbuild-build-depends-kakoune-dummy (0.invalid.0) ... (Reading database ... 32589 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-101-generic arm64 (armv7l) 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-arm-linux-gnueabihf_2.29.1-12ubuntu1 binutils-common_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 libasan4_7.2.0-18ubuntu2 libasan5_8-20180110-1ubuntu1 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 libcilkrts5_7.2.0-18ubuntu2 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 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 libubsan0_7.2.0-18ubuntu2 libubsan1_8-20180110-1ubuntu1 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-14111326 SCHROOT_CHROOT_NAME=build-PACKAGEBUILD-14111326 SCHROOT_COMMAND=env SCHROOT_GID=2501 SCHROOT_GROUP=buildd SCHROOT_SESSION_ID=build-PACKAGEBUILD-14111326 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 armhf 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 .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 .hook_manager.debug.d -c -o .hook_manager.debug.o hook_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 .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 .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 .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 .option_manager.debug.d -c -o .option_manager.debug.o option_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_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 .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 .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 .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 .regex.debug.d -c -o .regex.debug.o regex.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 .ncurses_ui.debug.d -c -o .ncurses_ui.debug.o ncurses_ui.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 .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 .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 .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 .exception.debug.d -c -o .exception.debug.o exception.cc In file included from /usr/include/c++/8/vector:63, from array_view.hh:4, from string.hh:4, from alias_registry.hh:5, from scope.hh:4, from buffer.hh:8, from commands.cc:3: /usr/include/c++/8/bits/stl_uninitialized.h: In function ‘_ForwardIterator std::__uninitialized_copy_a(_InputIterator, _InputIterator, _ForwardIterator, _Allocator&) [with _InputIterator = __gnu_cxx::__normal_iterator*, std::vector, Kakoune::Allocator, (Kakoune::MemoryDomain)0> > >; _ForwardIterator = std::pair*; _Allocator = Kakoune::Allocator, (Kakoune::MemoryDomain)0>]’: /usr/include/c++/8/bits/stl_uninitialized.h:267:5: note: parameter passing for argument of type ‘__gnu_cxx::__normal_iterator*, std::vector, Kakoune::Allocator, (Kakoune::MemoryDomain)0> > >’ changed in GCC 7.1 __uninitialized_copy_a(_InputIterator __first, _InputIterator __last, ^~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/8/bits/stl_uninitialized.h:267:5: note: parameter passing for argument of type ‘__gnu_cxx::__normal_iterator*, std::vector, Kakoune::Allocator, (Kakoune::MemoryDomain)0> > >’ changed in GCC 7.1 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 In file included from /usr/include/c++/8/vector:64, from array_view.hh:4, from string.hh:4, from alias_registry.hh:5, from scope.hh:4, from buffer.hh:8, from commands.cc:3: /usr/include/c++/8/bits/stl_vector.h: In static member function ‘static bool std::_Function_base::_Base_manager<_Functor>::_M_manager(std::_Any_data&, const std::_Any_data&, std::_Manager_operation) [with _Functor = Kakoune::{anonymous}::define_command(const Kakoune::ParametersParser&, Kakoune::Context&, const Kakoune::ShellContext&)::]’: /usr/include/c++/8/bits/stl_vector.h:463:31: note: parameter passing for argument of type ‘__gnu_cxx::__normal_iterator*, std::vector, Kakoune::Allocator, (Kakoune::MemoryDomain)0> > >’ changed in GCC 7.1 std::__uninitialized_copy_a(__x.begin(), __x.end(), ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~ this->_M_impl._M_start, ~~~~~~~~~~~~~~~~~~~~~~~ _M_get_Tp_allocator()); ~~~~~~~~~~~~~~~~~~~~~~ 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 In file included from /usr/include/c++/8/vector:69, from array_view.hh:4, from string.hh:4, from alias_registry.hh:5, from scope.hh:4, from buffer.hh:8, from commands.cc:3: /usr/include/c++/8/bits/vector.tcc: In member function ‘void std::vector<_Tp, _Alloc>::_M_realloc_insert(std::vector<_Tp, _Alloc>::iterator, _Args&& ...) [with _Args = {std::pair}; _Tp = std::pair; _Alloc = Kakoune::Allocator, (Kakoune::MemoryDomain)0>]’: /usr/include/c++/8/bits/vector.tcc:413:7: note: parameter passing for argument of type ‘std::vector, Kakoune::Allocator, (Kakoune::MemoryDomain)0> >::iterator’ {aka ‘__gnu_cxx::__normal_iterator*, std::vector, Kakoune::Allocator, (Kakoune::MemoryDomain)0> > >’} changed in GCC 7.1 vector<_Tp, _Alloc>:: ^~~~~~~~~~~~~~~~~~~ /usr/include/c++/8/bits/vector.tcc: In lambda function: /usr/include/c++/8/bits/vector.tcc:109:4: note: parameter passing for argument of type ‘__gnu_cxx::__normal_iterator*, std::vector, Kakoune::Allocator, (Kakoune::MemoryDomain)0> > >’ changed in GCC 7.1 _M_realloc_insert(end(), std::forward<_Args>(__args)...); ^~~~~~~~~~~~~~~~~ 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 .completion.debug.d -c -o .completion.debug.o completion.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 .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 .display_buffer.debug.d -c -o .display_buffer.debug.o display_buffer.cc In file included from /usr/include/c++/8/vector:64, from array_view.hh:4, from string.hh:4, from alias_registry.hh:5, from scope.hh:4, from buffer.hh:8, from commands.cc:3: /usr/include/c++/8/bits/stl_vector.h: In function ‘void Kakoune::{anonymous}::define_command(const Kakoune::ParametersParser&, Kakoune::Context&, const Kakoune::ShellContext&)’: /usr/include/c++/8/bits/stl_vector.h:463:31: note: parameter passing for argument of type ‘__gnu_cxx::__normal_iterator*, std::vector, Kakoune::Allocator, (Kakoune::MemoryDomain)0> > >’ changed in GCC 7.1 std::__uninitialized_copy_a(__x.begin(), __x.end(), ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~ this->_M_impl._M_start, ~~~~~~~~~~~~~~~~~~~~~~~ _M_get_Tp_allocator()); ~~~~~~~~~~~~~~~~~~~~~~ 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) ^~~~~~~~~~ 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 .window.debug.d -c -o .window.debug.o window.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 .word_db.debug.d -c -o .word_db.debug.o word_db.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.debug.d -c -o .buffer.debug.o buffer.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 .keymap_manager.debug.d -c -o .keymap_manager.debug.o keymap_manager.cc 0x514d17 crash_signal ../../src/gcc/toplev.c:325 0x1a03f9 local_class_index ../../src/gcc/cp/mangle.c:1922 0x1a1f23 discriminator_for_local_entity ../../src/gcc/cp/mangle.c:1957 0x1a1f23 write_local_name ../../src/gcc/cp/mangle.c:2058 0x1a1f23 write_name ../../src/gcc/cp/mangle.c:964 0x1a3739 write_encoding ../../src/gcc/cp/mangle.c:825 0x1a1e1b write_local_name ../../src/gcc/cp/mangle.c:2027 0x1a1e1b write_name ../../src/gcc/cp/mangle.c:964 0x1a2573 write_class_enum_type ../../src/gcc/cp/mangle.c:2809 0x1a2573 write_type ../../src/gcc/cp/mangle.c:2222 0x1a2aef write_type ../../src/gcc/cp/mangle.c:2140 0x1a2655 write_type ../../src/gcc/cp/mangle.c:2303 0x1a3663 write_method_parms ../../src/gcc/cp/mangle.c:2796 0x1a141d write_closure_type_name ../../src/gcc/cp/mangle.c:1666 0x1a141d write_unqualified_name ../../src/gcc/cp/mangle.c:1410 0x1a1ea3 write_name ../../src/gcc/cp/mangle.c:937 0x1a1efb write_local_name ../../src/gcc/cp/mangle.c:2057 0x1a1efb write_name ../../src/gcc/cp/mangle.c:964 0x1a2573 write_class_enum_type ../../src/gcc/cp/mangle.c:2809 0x1a2573 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 .env_vars.debug.d -c -o .env_vars.debug.o env_vars.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 .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 .selection.debug.d -c -o .selection.debug.o selection.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 .json_ui.debug.d -c -o .json_ui.debug.o json_ui.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 .keys.debug.d -c -o .keys.debug.o keys.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 .highlighters.debug.d -c -o .highlighters.debug.o highlighters.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 .parameters_parser.debug.d -c -o .parameters_parser.debug.o parameters_parser.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 .ranked_match.debug.d -c -o .ranked_match.debug.o ranked_match.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/cc0G1w48.out file, please attach this to your bugreport. === BEGIN GCC DUMP === 6011: // Target: arm-linux-gnueabihf 6011: // 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=arm-linux-gnueabihf- --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-libitm --disable-libquadmath --enable-plugin --enable-default-pie --with-system-zlib --with-target-system-zlib --enable-objc-gc=auto --enable-multiarch --enable-multilib --disable-sjlj-exceptions --with-arch=armv7-a --with-fpu=vfpv3-d16 --with-float=hard --with-mode=thumb --disable-werror --enable-multilib --enable-checking=release --build=arm-linux-gnueabihf --host=arm-linux-gnueabihf --target=arm-linux-gnueabihf 6011: // Thread model: posix 6011: // gcc version 8.0.0 20180110 (experimental) [trunk revision 256425] (Ubuntu 8-20180110-1ubuntu1) 6011: // 6011: // 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]’: 6011: // normal.cc:1850:1: required from here 6011: // normal.cc:965:20: warning: variable ‘whole’ set but not used [-Wunused-but-set-variable] 6011: // const bool whole = (flags & whole_flags) == whole_flags; 6011: // ^~~~~ 6011: // 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]’: 6011: // normal.cc:1850:1: required from here 6011: // normal.cc:965:20: warning: variable ‘whole’ set but not used [-Wunused-but-set-variable] 6011: // 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]’: 6011: // normal.cc:1850:1: required from here 6011: // normal.cc:965:20: warning: variable ‘whole’ set but not used [-Wunused-but-set-variable] 6011: // 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]’: 6011: // normal.cc:1850:1: required from here 6011: // normal.cc:965:20: warning: variable ‘whole’ set but not used [-Wunused-but-set-variable] 6011: // 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]’: 6011: // normal.cc:1850:1: required from here 6011: // normal.cc:965:20: warning: variable ‘whole’ set but not used [-Wunused-but-set-variable] 6011: // 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]’: 6011: // normal.cc:1850:1: required from here 6011: // normal.cc:965:20: warning: variable ‘whole’ set but not used [-Wunused-but-set-variable] 6011: // 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]’: 6011: // normal.cc:1850:1: required from here 6011: // normal.cc:965:20: warning: variable ‘whole’ set but not used [-Wunused-but-set-variable] 6011: // 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]’: 6011: // normal.cc:1850:1: required from here 6011: // normal.cc:965:20: warning: variable ‘whole’ set but not used [-Wunused-but-set-variable] 6011: // 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]’: 6011: // normal.cc:1850:1: required from here 6011: // normal.cc:965:20: warning: variable ‘whole’ set but not used [-Wunused-but-set-variable] 6011: // 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]’: 6011: // normal.cc:1850:1: required from here 6011: // normal.cc:965:20: warning: variable ‘whole’ set but not used [-Wunused-but-set-variable] 6011: // In file included from /usr/include/c++/8/bits/stl_algobase.h:71, 6011: // from /usr/include/c++/8/vector:60, 6011: // from array_view.hh:4, 6011: // from normal.hh:4, 6011: // from normal.cc:1: 6011: // /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&)>]’: 6011: // /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&)>]’ 6011: // /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&)>]’ 6011: // /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&)>]’ 6011: // 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*]’ 6011: // 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]’ 6011: // normal.cc:1850:1: required from here 6011: // /usr/include/c++/8/bits/predefined_ops.h:276:7: internal compiler error: Segmentation fault 6011: // _Iter_pred(_Predicate __pred) 6011: // ^~~~~~~~~~ 6011: // 0x514d17 crash_signal 6011: // ../../src/gcc/toplev.c:325 6011: // 0x1a03f9 local_class_index 6011: // ../../src/gcc/cp/mangle.c:1922 6011: // 0x1a1f23 discriminator_for_local_entity 6011: // ../../src/gcc/cp/mangle.c:1957 6011: // 0x1a1f23 write_local_name 6011: // ../../src/gcc/cp/mangle.c:2058 6011: // 0x1a1f23 write_name 6011: // ../../src/gcc/cp/mangle.c:964 6011: // 0x1a3739 write_encoding 6011: // ../../src/gcc/cp/mangle.c:825 6011: // 0x1a1e1b write_local_name 6011: // ../../src/gcc/cp/mangle.c:2027 6011: // 0x1a1e1b write_name 6011: // ../../src/gcc/cp/mangle.c:964 6011: // 0x1a2573 write_class_enum_type 6011: // ../../src/gcc/cp/mangle.c:2809 6011: // 0x1a2573 write_type 6011: // ../../src/gcc/cp/mangle.c:2222 6011: // 0x1a2aef write_type 6011: // ../../src/gcc/cp/mangle.c:2140 6011: // 0x1a2655 write_type 6011: // ../../src/gcc/cp/mangle.c:2303 6011: // 0x1a3663 write_method_parms 6011: // ../../src/gcc/cp/mangle.c:2796 6011: // 0x1a141d write_closure_type_name 6011: // ../../src/gcc/cp/mangle.c:1666 6011: // 0x1a141d write_unqualified_name 6011: // ../../src/gcc/cp/mangle.c:1410 6011: // 0x1a1ea3 write_name 6011: // ../../src/gcc/cp/mangle.c:937 6011: // 0x1a1efb write_local_name 6011: // ../../src/gcc/cp/mangle.c:2057 6011: // 0x1a1efb write_name 6011: // ../../src/gcc/cp/mangle.c:964 6011: // 0x1a2573 write_class_enum_type 6011: // ../../src/gcc/cp/mangle.c:2809 6011: // 0x1a2573 write_type 6011: // ../../src/gcc/cp/mangle.c:2222 6011: // Please submit a full bug report, 6011: // with preprocessed source if appropriate. 6011: // Please include the complete backtrace with any bug report. 6011: // See for instructions. 6011: 6011: // /usr/lib/gcc/arm-linux-gnueabihf/8/cc1plus -quiet -I /usr/include/ncursesw -imultiarch arm-linux-gnueabihf -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 -mfloat-abi=hard -mfpu=vfpv3-d16 -mthumb -mtls-dialect=gnu -march=armv7-a+fp -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 6011: 6011: # 1 "normal.cc" 6011: # 1 "/<>/src//" 6011: # 1 "" 6011: # 1 "" 6011: # 1 "/usr/include/stdc-predef.h" 1 3 4 6011: # 1 "" 2 6011: # 1 "normal.cc" 6011: # 1 "normal.hh" 1 6011: 6011: 6011: 6011: # 1 "array_view.hh" 1 6011: 6011: 6011: 6011: # 1 "/usr/include/c++/8/vector" 1 3 6011: # 58 "/usr/include/c++/8/vector" 3 6011: 6011: # 59 "/usr/include/c++/8/vector" 3 6011: 6011: # 1 "/usr/include/c++/8/bits/stl_algobase.h" 1 3 6011: # 59 "/usr/include/c++/8/bits/stl_algobase.h" 3 6011: # 1 "/usr/include/arm-linux-gnueabihf/c++/8/bits/c++config.h" 1 3 6011: # 236 "/usr/include/arm-linux-gnueabihf/c++/8/bits/c++config.h" 3 6011: 6011: # 236 "/usr/include/arm-linux-gnueabihf/c++/8/bits/c++config.h" 3 6011: namespace std 6011: { 6011: typedef unsigned int size_t; 6011: typedef int ptrdiff_t; 6011: 6011: 6011: typedef decltype(nullptr) nullptr_t; 6011: 6011: } 6011: # 258 "/usr/include/arm-linux-gnueabihf/c++/8/bits/c++config.h" 3 6011: namespace std 6011: { 6011: inline namespace __cxx11 __attribute__((__abi_tag__ ("cxx11"))) { } 6011: } 6011: namespace __gnu_cxx 6011: { 6011: inline namespace __cxx11 __attribute__((__abi_tag__ ("cxx11"))) { } 6011: } 6011: # 508 "/usr/include/arm-linux-gnueabihf/c++/8/bits/c++config.h" 3 6011: # 1 "/usr/include/arm-linux-gnueabihf/c++/8/bits/os_defines.h" 1 3 6011: # 39 "/usr/include/arm-linux-gnueabihf/c++/8/bits/os_defines.h" 3 6011: # 1 "/usr/include/features.h" 1 3 4 6011: # 419 "/usr/include/features.h" 3 4 6011: # 1 "/usr/include/arm-linux-gnueabihf/sys/cdefs.h" 1 3 4 6011: # 419 "/usr/include/arm-linux-gnueabihf/sys/cdefs.h" 3 4 6011: # 1 "/usr/include/arm-linux-gnueabihf/bits/wordsize.h" 1 3 4 6011: # 420 "/usr/include/arm-linux-gnueabihf/sys/cdefs.h" 2 3 4 6011: # 1 "/usr/include/arm-linux-gnueabihf/bits/long-double.h" 1 3 4 6011: # 421 "/usr/include/arm-linux-gnueabihf/sys/cdefs.h" 2 3 4 6011: # 420 "/usr/include/features.h" 2 3 4 6011: # 443 "/usr/include/features.h" 3 4 6011: # 1 "/usr/include/arm-linux-gnueabihf/gnu/stubs.h" 1 3 4 6011: # 10 "/usr/include/arm-linux-gnueabihf/gnu/stubs.h" 3 4 6011: # 1 "/usr/include/arm-linux-gnueabihf/gnu/stubs-hard.h" 1 3 4 6011: # 11 "/usr/include/arm-linux-gnueabihf/gnu/stubs.h" 2 3 4 6011: # 444 "/usr/include/features.h" 2 3 4 6011: # 40 "/usr/include/arm-linux-gnueabihf/c++/8/bits/os_defines.h" 2 3 6011: # 509 "/usr/include/arm-linux-gnueabihf/c++/8/bits/c++config.h" 2 3 6011: 6011: 6011: # 1 "/usr/include/arm-linux-gnueabihf/c++/8/bits/cpu_defines.h" 1 3 6011: # 512 "/usr/include/arm-linux-gnueabihf/c++/8/bits/c++config.h" 2 3 6011: # 60 "/usr/include/c++/8/bits/stl_algobase.h" 2 3 6011: # 1 "/usr/include/c++/8/bits/functexcept.h" 1 3 6011: # 40 "/usr/include/c++/8/bits/functexcept.h" 3 6011: # 1 "/usr/include/c++/8/bits/exception_defines.h" 1 3 6011: # 41 "/usr/include/c++/8/bits/functexcept.h" 2 3 6011: 6011: namespace std __attribute__ ((__visibility__ ("default"))) 6011: { 6011: 6011: 6011: 6011: void 6011: __throw_bad_exception(void) __attribute__((__noreturn__)); 6011: 6011: 6011: void 6011: __throw_bad_alloc(void) __attribute__((__noreturn__)); 6011: 6011: 6011: void 6011: __throw_bad_cast(void) __attribute__((__noreturn__)); 6011: 6011: void 6011: __throw_bad_typeid(void) __attribute__((__noreturn__)); 6011: 6011: 6011: void 6011: __throw_logic_error(const char*) __attribute__((__noreturn__)); 6011: 6011: void 6011: __throw_domain_error(const char*) __attribute__((__noreturn__)); 6011: 6011: void 6011: __throw_invalid_argument(const char*) __attribute__((__noreturn__)); 6011: 6011: void 6011: __throw_length_error(const char*) __attribute__((__noreturn__)); 6011: 6011: void 6011: __throw_out_of_range(const char*) __attribute__((__noreturn__)); 6011: 6011: void 6011: __throw_out_of_range_fmt(const char*, ...) __attribute__((__noreturn__)) 6011: __attribute__((__format__(__gnu_printf__, 1, 2))); 6011: 6011: void 6011: __throw_runtime_error(const char*) __attribute__((__noreturn__)); 6011: 6011: void 6011: __throw_range_error(const char*) __attribute__((__noreturn__)); 6011: 6011: void 6011: __throw_overflow_error(const char*) __attribute__((__noreturn__)); 6011: 6011: void 6011: __throw_underflow_error(const char*) __attribute__((__noreturn__)); 6011: 6011: 6011: void 6011: __throw_ios_failure(const char*) __attribute__((__noreturn__)); 6011: 6011: void 6011: __throw_system_error(int) __attribute__((__noreturn__)); 6011: 6011: void 6011: __throw_future_error(int) __attribute__((__noreturn__)); 6011: 6011: 6011: void 6011: __throw_bad_function_call() __attribute__((__noreturn__)); 6011: 6011: 6011: } 6011: # 61 "/usr/include/c++/8/bits/stl_algobase.h" 2 3 6011: # 1 "/usr/include/c++/8/bits/cpp_type_traits.h" 1 3 6011: # 35 "/usr/include/c++/8/bits/cpp_type_traits.h" 3 6011: 6011: # 36 "/usr/include/c++/8/bits/cpp_type_traits.h" 3 6011: # 67 "/usr/include/c++/8/bits/cpp_type_traits.h" 3 6011: extern "C++" { 6011: 6011: namespace std __attribute__ ((__visibility__ ("default"))) 6011: { 6011: 6011: 6011: struct __true_type { }; 6011: struct __false_type { }; 6011: 6011: template 6011: struct __truth_type 6011: { typedef __false_type __type; }; 6011: 6011: template<> 6011: struct __truth_type 6011: { typedef __true_type __type; }; 6011: 6011: 6011: 6011: template 6011: struct __traitor 6011: { 6011: enum { __value = bool(_Sp::__value) || bool(_Tp::__value) }; 6011: typedef typename __truth_type<__value>::__type __type; 6011: }; 6011: 6011: 6011: template 6011: struct __are_same 6011: { 6011: enum { __value = 0 }; 6011: typedef __false_type __type; 6011: }; 6011: 6011: template 6011: struct __are_same<_Tp, _Tp> 6011: { 6011: enum { __value = 1 }; 6011: typedef __true_type __type; 6011: }; 6011: 6011: 6011: template 6011: struct __is_void 6011: { 6011: enum { __value = 0 }; 6011: typedef __false_type __type; 6011: }; 6011: 6011: template<> 6011: struct __is_void 6011: { 6011: enum { __value = 1 }; 6011: typedef __true_type __type; 6011: }; 6011: 6011: 6011: 6011: 6011: template 6011: struct __is_integer 6011: { 6011: enum { __value = 0 }; 6011: typedef __false_type __type; 6011: }; 6011: 6011: 6011: 6011: 6011: 6011: template<> 6011: struct __is_integer 6011: { 6011: enum { __value = 1 }; 6011: typedef __true_type __type; 6011: }; 6011: 6011: template<> 6011: struct __is_integer 6011: { 6011: enum { __value = 1 }; 6011: typedef __true_type __type; 6011: }; 6011: 6011: template<> 6011: struct __is_integer 6011: { 6011: enum { __value = 1 }; 6011: typedef __true_type __type; 6011: }; 6011: 6011: template<> 6011: struct __is_integer 6011: { 6011: enum { __value = 1 }; 6011: typedef __true_type __type; 6011: }; 6011: 6011: 6011: template<> 6011: struct __is_integer 6011: { 6011: enum { __value = 1 }; 6011: typedef __true_type __type; 6011: }; 6011: 6011: 6011: 6011: template<> 6011: struct __is_integer 6011: { 6011: enum { __value = 1 }; 6011: typedef __true_type __type; 6011: }; 6011: 6011: template<> 6011: struct __is_integer 6011: { 6011: enum { __value = 1 }; 6011: typedef __true_type __type; 6011: }; 6011: 6011: 6011: template<> 6011: struct __is_integer 6011: { 6011: enum { __value = 1 }; 6011: typedef __true_type __type; 6011: }; 6011: 6011: template<> 6011: struct __is_integer 6011: { 6011: enum { __value = 1 }; 6011: typedef __true_type __type; 6011: }; 6011: 6011: template<> 6011: struct __is_integer 6011: { 6011: enum { __value = 1 }; 6011: typedef __true_type __type; 6011: }; 6011: 6011: template<> 6011: struct __is_integer 6011: { 6011: enum { __value = 1 }; 6011: typedef __true_type __type; 6011: }; 6011: 6011: template<> 6011: struct __is_integer 6011: { 6011: enum { __value = 1 }; 6011: typedef __true_type __type; 6011: }; 6011: 6011: template<> 6011: struct __is_integer 6011: { 6011: enum { __value = 1 }; 6011: typedef __true_type __type; 6011: }; 6011: 6011: template<> 6011: struct __is_integer 6011: { 6011: enum { __value = 1 }; 6011: typedef __true_type __type; 6011: }; 6011: 6011: template<> 6011: struct __is_integer 6011: { 6011: enum { __value = 1 }; 6011: typedef __true_type __type; 6011: }; 6011: # 278 "/usr/include/c++/8/bits/cpp_type_traits.h" 3 6011: template 6011: struct __is_floating 6011: { 6011: enum { __value = 0 }; 6011: typedef __false_type __type; 6011: }; 6011: 6011: 6011: template<> 6011: struct __is_floating 6011: { 6011: enum { __value = 1 }; 6011: typedef __true_type __type; 6011: }; 6011: 6011: template<> 6011: struct __is_floating 6011: { 6011: enum { __value = 1 }; 6011: typedef __true_type __type; 6011: }; 6011: 6011: template<> 6011: struct __is_floating 6011: { 6011: enum { __value = 1 }; 6011: typedef __true_type __type; 6011: }; 6011: 6011: 6011: 6011: 6011: template 6011: struct __is_pointer 6011: { 6011: enum { __value = 0 }; 6011: typedef __false_type __type; 6011: }; 6011: 6011: template 6011: struct __is_pointer<_Tp*> 6011: { 6011: enum { __value = 1 }; 6011: typedef __true_type __type; 6011: }; 6011: 6011: 6011: 6011: 6011: template 6011: struct __is_arithmetic 6011: : public __traitor<__is_integer<_Tp>, __is_floating<_Tp> > 6011: { }; 6011: 6011: 6011: 6011: 6011: template 6011: struct __is_scalar 6011: : public __traitor<__is_arithmetic<_Tp>, __is_pointer<_Tp> > 6011: { }; 6011: 6011: 6011: 6011: 6011: template 6011: struct __is_char 6011: { 6011: enum { __value = 0 }; 6011: typedef __false_type __type; 6011: }; 6011: 6011: template<> 6011: struct __is_char 6011: { 6011: enum { __value = 1 }; 6011: typedef __true_type __type; 6011: }; 6011: 6011: 6011: template<> 6011: struct __is_char 6011: { 6011: enum { __value = 1 }; 6011: typedef __true_type __type; 6011: }; 6011: 6011: 6011: template 6011: struct __is_byte 6011: { 6011: enum { __value = 0 }; 6011: typedef __false_type __type; 6011: }; 6011: 6011: template<> 6011: struct __is_byte 6011: { 6011: enum { __value = 1 }; 6011: typedef __true_type __type; 6011: }; 6011: 6011: template<> 6011: struct __is_byte 6011: { 6011: enum { __value = 1 }; 6011: typedef __true_type __type; 6011: }; 6011: 6011: template<> 6011: struct __is_byte 6011: { 6011: enum { __value = 1 }; 6011: typedef __true_type __type; 6011: }; 6011: 6011: 6011: 6011: 6011: template 6011: struct __is_move_iterator 6011: { 6011: enum { __value = 0 }; 6011: typedef __false_type __type; 6011: }; 6011: 6011: 6011: 6011: template 6011: inline _Iterator 6011: __miter_base(_Iterator __it) 6011: { return __it; } 6011: 6011: 6011: } 6011: } 6011: # 62 "/usr/include/c++/8/bits/stl_algobase.h" 2 3 6011: # 1 "/usr/include/c++/8/ext/type_traits.h" 1 3 6011: # 32 "/usr/include/c++/8/ext/type_traits.h" 3 6011: 6011: # 33 "/usr/include/c++/8/ext/type_traits.h" 3 6011: 6011: 6011: 6011: 6011: extern "C++" { 6011: 6011: namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) 6011: { 6011: 6011: 6011: 6011: template 6011: struct __enable_if 6011: { }; 6011: 6011: template 6011: struct __enable_if 6011: { typedef _Tp __type; }; 6011: 6011: 6011: 6011: template 6011: struct __conditional_type 6011: { typedef _Iftrue __type; }; 6011: 6011: template 6011: struct __conditional_type 6011: { typedef _Iffalse __type; }; 6011: 6011: 6011: 6011: template 6011: struct __add_unsigned 6011: { 6011: private: 6011: typedef __enable_if::__value, _Tp> __if_type; 6011: 6011: public: 6011: typedef typename __if_type::__type __type; 6011: }; 6011: 6011: template<> 6011: struct __add_unsigned 6011: { typedef unsigned char __type; }; 6011: 6011: template<> 6011: struct __add_unsigned 6011: { typedef unsigned char __type; }; 6011: 6011: template<> 6011: struct __add_unsigned 6011: { typedef unsigned short __type; }; 6011: 6011: template<> 6011: struct __add_unsigned 6011: { typedef unsigned int __type; }; 6011: 6011: template<> 6011: struct __add_unsigned 6011: { typedef unsigned long __type; }; 6011: 6011: template<> 6011: struct __add_unsigned 6011: { typedef unsigned long long __type; }; 6011: 6011: 6011: template<> 6011: struct __add_unsigned; 6011: 6011: template<> 6011: struct __add_unsigned; 6011: 6011: 6011: 6011: template 6011: struct __remove_unsigned 6011: { 6011: private: 6011: typedef __enable_if::__value, _Tp> __if_type; 6011: 6011: public: 6011: typedef typename __if_type::__type __type; 6011: }; 6011: 6011: template<> 6011: struct __remove_unsigned 6011: { typedef signed char __type; }; 6011: 6011: template<> 6011: struct __remove_unsigned 6011: { typedef signed char __type; }; 6011: 6011: template<> 6011: struct __remove_unsigned 6011: { typedef short __type; }; 6011: 6011: template<> 6011: struct __remove_unsigned 6011: { typedef int __type; }; 6011: 6011: template<> 6011: struct __remove_unsigned 6011: { typedef long __type; }; 6011: 6011: template<> 6011: struct __remove_unsigned 6011: { typedef long long __type; }; 6011: 6011: 6011: template<> 6011: struct __remove_unsigned; 6011: 6011: template<> 6011: struct __remove_unsigned; 6011: 6011: 6011: 6011: template 6011: inline bool 6011: __is_null_pointer(_Type* __ptr) 6011: { return __ptr == 0; } 6011: 6011: template 6011: inline bool 6011: __is_null_pointer(_Type) 6011: { return false; } 6011: 6011: 6011: inline bool 6011: __is_null_pointer(std::nullptr_t) 6011: { return true; } 6011: 6011: 6011: 6011: template::__value> 6011: struct __promote 6011: { typedef double __type; }; 6011: 6011: 6011: 6011: 6011: template 6011: struct __promote<_Tp, false> 6011: { }; 6011: 6011: template<> 6011: struct __promote 6011: { typedef long double __type; }; 6011: 6011: template<> 6011: struct __promote 6011: { typedef double __type; }; 6011: 6011: template<> 6011: struct __promote 6011: { typedef float __type; }; 6011: 6011: template::__type, 6011: typename _Up2 = typename __promote<_Up>::__type> 6011: struct __promote_2 6011: { 6011: typedef __typeof__(_Tp2() + _Up2()) __type; 6011: }; 6011: 6011: template::__type, 6011: typename _Up2 = typename __promote<_Up>::__type, 6011: typename _Vp2 = typename __promote<_Vp>::__type> 6011: struct __promote_3 6011: { 6011: typedef __typeof__(_Tp2() + _Up2() + _Vp2()) __type; 6011: }; 6011: 6011: template::__type, 6011: typename _Up2 = typename __promote<_Up>::__type, 6011: typename _Vp2 = typename __promote<_Vp>::__type, 6011: typename _Wp2 = typename __promote<_Wp>::__type> 6011: struct __promote_4 6011: { 6011: typedef __typeof__(_Tp2() + _Up2() + _Vp2() + _Wp2()) __type; 6011: }; 6011: 6011: 6011: } 6011: } 6011: # 63 "/usr/include/c++/8/bits/stl_algobase.h" 2 3 6011: # 1 "/usr/include/c++/8/ext/numeric_traits.h" 1 3 6011: # 32 "/usr/include/c++/8/ext/numeric_traits.h" 3 6011: 6011: # 33 "/usr/include/c++/8/ext/numeric_traits.h" 3 6011: 6011: 6011: 6011: 6011: namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) 6011: { 6011: 6011: # 54 "/usr/include/c++/8/ext/numeric_traits.h" 3 6011: template 6011: struct __numeric_traits_integer 6011: { 6011: 6011: static const _Value __min = (((_Value)(-1) < 0) ? (_Value)1 << (sizeof(_Value) * 8 - ((_Value)(-1) < 0)) : (_Value)0); 6011: static const _Value __max = (((_Value)(-1) < 0) ? (((((_Value)1 << ((sizeof(_Value) * 8 - ((_Value)(-1) < 0)) - 1)) - 1) << 1) + 1) : ~(_Value)0); 6011: 6011: 6011: 6011: static const bool __is_signed = ((_Value)(-1) < 0); 6011: static const int __digits = (sizeof(_Value) * 8 - ((_Value)(-1) < 0)); 6011: }; 6011: 6011: template 6011: const _Value __numeric_traits_integer<_Value>::__min; 6011: 6011: template 6011: const _Value __numeric_traits_integer<_Value>::__max; 6011: 6011: template 6011: const bool __numeric_traits_integer<_Value>::__is_signed; 6011: 6011: template 6011: const int __numeric_traits_integer<_Value>::__digits; 6011: # 99 "/usr/include/c++/8/ext/numeric_traits.h" 3 6011: template 6011: struct __numeric_traits_floating 6011: { 6011: 6011: static const int __max_digits10 = (2 + (std::__are_same<_Value, float>::__value ? 24 : std::__are_same<_Value, double>::__value ? 53 : 53) * 643L / 2136); 6011: 6011: 6011: static const bool __is_signed = true; 6011: static const int __digits10 = (std::__are_same<_Value, float>::__value ? 6 : std::__are_same<_Value, double>::__value ? 15 : 15); 6011: static const int __max_exponent10 = (std::__are_same<_Value, float>::__value ? 38 : std::__are_same<_Value, double>::__value ? 308 : 308); 6011: }; 6011: 6011: template 6011: const int __numeric_traits_floating<_Value>::__max_digits10; 6011: 6011: template 6011: const bool __numeric_traits_floating<_Value>::__is_signed; 6011: 6011: template 6011: const int __numeric_traits_floating<_Value>::__digits10; 6011: 6011: template 6011: const int __numeric_traits_floating<_Value>::__max_exponent10; 6011: 6011: template 6011: struct __numeric_traits 6011: : public __conditional_type::__value, 6011: __numeric_traits_integer<_Value>, 6011: __numeric_traits_floating<_Value> >::__type 6011: { }; 6011: 6011: 6011: } 6011: # 64 "/usr/include/c++/8/bits/stl_algobase.h" 2 3 6011: # 1 "/usr/include/c++/8/bits/stl_pair.h" 1 3 6011: # 59 "/usr/include/c++/8/bits/stl_pair.h" 3 6011: # 1 "/usr/include/c++/8/bits/move.h" 1 3 6011: # 34 "/usr/include/c++/8/bits/move.h" 3 6011: # 1 "/usr/include/c++/8/bits/concept_check.h" 1 3 6011: # 33 "/usr/include/c++/8/bits/concept_check.h" 3 6011: 6011: # 34 "/usr/include/c++/8/bits/concept_check.h" 3 6011: # 35 "/usr/include/c++/8/bits/move.h" 2 3 6011: 6011: namespace std __attribute__ ((__visibility__ ("default"))) 6011: { 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: template 6011: inline constexpr _Tp* 6011: __addressof(_Tp& __r) noexcept 6011: { return __builtin_addressof(__r); } 6011: 6011: 6011: 6011: 6011: } 6011: 6011: # 1 "/usr/include/c++/8/type_traits" 1 3 6011: # 32 "/usr/include/c++/8/type_traits" 3 6011: 6011: # 33 "/usr/include/c++/8/type_traits" 3 6011: # 42 "/usr/include/c++/8/type_traits" 3 6011: namespace std 6011: { 6011: typedef short unsigned int uint_least16_t; 6011: typedef unsigned int uint_least32_t; 6011: } 6011: 6011: 6011: 6011: 6011: 6011: namespace std __attribute__ ((__visibility__ ("default"))) 6011: { 6011: 6011: # 68 "/usr/include/c++/8/type_traits" 3 6011: template 6011: struct integral_constant 6011: { 6011: static constexpr _Tp value = __v; 6011: typedef _Tp value_type; 6011: typedef integral_constant<_Tp, __v> type; 6011: constexpr operator value_type() const noexcept { return value; } 6011: 6011: 6011: 6011: 6011: 6011: 6011: }; 6011: 6011: template 6011: constexpr _Tp integral_constant<_Tp, __v>::value; 6011: 6011: 6011: typedef integral_constant true_type; 6011: 6011: 6011: typedef integral_constant false_type; 6011: 6011: template 6011: using __bool_constant = integral_constant; 6011: # 103 "/usr/include/c++/8/type_traits" 3 6011: template 6011: struct conditional; 6011: 6011: template 6011: struct __or_; 6011: 6011: template<> 6011: struct __or_<> 6011: : public false_type 6011: { }; 6011: 6011: template 6011: struct __or_<_B1> 6011: : public _B1 6011: { }; 6011: 6011: template 6011: struct __or_<_B1, _B2> 6011: : public conditional<_B1::value, _B1, _B2>::type 6011: { }; 6011: 6011: template 6011: struct __or_<_B1, _B2, _B3, _Bn...> 6011: : public conditional<_B1::value, _B1, __or_<_B2, _B3, _Bn...>>::type 6011: { }; 6011: 6011: template 6011: struct __and_; 6011: 6011: template<> 6011: struct __and_<> 6011: : public true_type 6011: { }; 6011: 6011: template 6011: struct __and_<_B1> 6011: : public _B1 6011: { }; 6011: 6011: template 6011: struct __and_<_B1, _B2> 6011: : public conditional<_B1::value, _B2, _B1>::type 6011: { }; 6011: 6011: template 6011: struct __and_<_B1, _B2, _B3, _Bn...> 6011: : public conditional<_B1::value, __and_<_B2, _B3, _Bn...>, _B1>::type 6011: { }; 6011: 6011: template 6011: struct __not_ 6011: : public __bool_constant 6011: { }; 6011: # 192 "/usr/include/c++/8/type_traits" 3 6011: template 6011: struct __success_type 6011: { typedef _Tp type; }; 6011: 6011: struct __failure_type 6011: { }; 6011: 6011: 6011: 6011: template 6011: struct remove_cv; 6011: 6011: template 6011: struct __is_void_helper 6011: : public false_type { }; 6011: 6011: template<> 6011: struct __is_void_helper 6011: : public true_type { }; 6011: 6011: 6011: template 6011: struct is_void 6011: : public __is_void_helper::type>::type 6011: { }; 6011: 6011: template 6011: struct __is_integral_helper 6011: : public false_type { }; 6011: 6011: template<> 6011: struct __is_integral_helper 6011: : public true_type { }; 6011: 6011: template<> 6011: struct __is_integral_helper 6011: : public true_type { }; 6011: 6011: template<> 6011: struct __is_integral_helper 6011: : public true_type { }; 6011: 6011: template<> 6011: struct __is_integral_helper 6011: : public true_type { }; 6011: 6011: 6011: template<> 6011: struct __is_integral_helper 6011: : public true_type { }; 6011: 6011: 6011: template<> 6011: struct __is_integral_helper 6011: : public true_type { }; 6011: 6011: template<> 6011: struct __is_integral_helper 6011: : public true_type { }; 6011: 6011: template<> 6011: struct __is_integral_helper 6011: : public true_type { }; 6011: 6011: template<> 6011: struct __is_integral_helper 6011: : public true_type { }; 6011: 6011: template<> 6011: struct __is_integral_helper 6011: : public true_type { }; 6011: 6011: template<> 6011: struct __is_integral_helper 6011: : public true_type { }; 6011: 6011: template<> 6011: struct __is_integral_helper 6011: : public true_type { }; 6011: 6011: template<> 6011: struct __is_integral_helper 6011: : public true_type { }; 6011: 6011: template<> 6011: struct __is_integral_helper 6011: : public true_type { }; 6011: 6011: template<> 6011: struct __is_integral_helper 6011: : public true_type { }; 6011: # 324 "/usr/include/c++/8/type_traits" 3 6011: template 6011: struct is_integral 6011: : public __is_integral_helper::type>::type 6011: { }; 6011: 6011: template 6011: struct __is_floating_point_helper 6011: : public false_type { }; 6011: 6011: template<> 6011: struct __is_floating_point_helper 6011: : public true_type { }; 6011: 6011: template<> 6011: struct __is_floating_point_helper 6011: : public true_type { }; 6011: 6011: template<> 6011: struct __is_floating_point_helper 6011: : public true_type { }; 6011: # 352 "/usr/include/c++/8/type_traits" 3 6011: template 6011: struct is_floating_point 6011: : public __is_floating_point_helper::type>::type 6011: { }; 6011: 6011: 6011: template 6011: struct is_array 6011: : public false_type { }; 6011: 6011: template 6011: struct is_array<_Tp[_Size]> 6011: : public true_type { }; 6011: 6011: template 6011: struct is_array<_Tp[]> 6011: : public true_type { }; 6011: 6011: template 6011: struct __is_pointer_helper 6011: : public false_type { }; 6011: 6011: template 6011: struct __is_pointer_helper<_Tp*> 6011: : public true_type { }; 6011: 6011: 6011: template 6011: struct is_pointer 6011: : public __is_pointer_helper::type>::type 6011: { }; 6011: 6011: 6011: template 6011: struct is_lvalue_reference 6011: : public false_type { }; 6011: 6011: template 6011: struct is_lvalue_reference<_Tp&> 6011: : public true_type { }; 6011: 6011: 6011: template 6011: struct is_rvalue_reference 6011: : public false_type { }; 6011: 6011: template 6011: struct is_rvalue_reference<_Tp&&> 6011: : public true_type { }; 6011: 6011: template 6011: struct is_function; 6011: 6011: template 6011: struct __is_member_object_pointer_helper 6011: : public false_type { }; 6011: 6011: template 6011: struct __is_member_object_pointer_helper<_Tp _Cp::*> 6011: : public integral_constant::value> { }; 6011: 6011: 6011: template 6011: struct is_member_object_pointer 6011: : public __is_member_object_pointer_helper< 6011: typename remove_cv<_Tp>::type>::type 6011: { }; 6011: 6011: template 6011: struct __is_member_function_pointer_helper 6011: : public false_type { }; 6011: 6011: template 6011: struct __is_member_function_pointer_helper<_Tp _Cp::*> 6011: : public integral_constant::value> { }; 6011: 6011: 6011: template 6011: struct is_member_function_pointer 6011: : public __is_member_function_pointer_helper< 6011: typename remove_cv<_Tp>::type>::type 6011: { }; 6011: 6011: 6011: template 6011: struct is_enum 6011: : public integral_constant 6011: { }; 6011: 6011: 6011: template 6011: struct is_union 6011: : public integral_constant 6011: { }; 6011: 6011: 6011: template 6011: struct is_class 6011: : public integral_constant 6011: { }; 6011: 6011: 6011: template 6011: struct is_function 6011: : public false_type { }; 6011: 6011: template 6011: struct is_function<_Res(_ArgTypes...) > 6011: : public true_type { }; 6011: 6011: template 6011: struct is_function<_Res(_ArgTypes...) & > 6011: : public true_type { }; 6011: 6011: template 6011: struct is_function<_Res(_ArgTypes...) && > 6011: : public true_type { }; 6011: 6011: template 6011: struct is_function<_Res(_ArgTypes......) > 6011: : public true_type { }; 6011: 6011: template 6011: struct is_function<_Res(_ArgTypes......) & > 6011: : public true_type { }; 6011: 6011: template 6011: struct is_function<_Res(_ArgTypes......) && > 6011: : public true_type { }; 6011: 6011: template 6011: struct is_function<_Res(_ArgTypes...) const > 6011: : public true_type { }; 6011: 6011: template 6011: struct is_function<_Res(_ArgTypes...) const & > 6011: : public true_type { }; 6011: 6011: template 6011: struct is_function<_Res(_ArgTypes...) const && > 6011: : public true_type { }; 6011: 6011: template 6011: struct is_function<_Res(_ArgTypes......) const > 6011: : public true_type { }; 6011: 6011: template 6011: struct is_function<_Res(_ArgTypes......) const & > 6011: : public true_type { }; 6011: 6011: template 6011: struct is_function<_Res(_ArgTypes......) const && > 6011: : public true_type { }; 6011: 6011: template 6011: struct is_function<_Res(_ArgTypes...) volatile > 6011: : public true_type { }; 6011: 6011: template 6011: struct is_function<_Res(_ArgTypes...) volatile & > 6011: : public true_type { }; 6011: 6011: template 6011: struct is_function<_Res(_ArgTypes...) volatile && > 6011: : public true_type { }; 6011: 6011: template 6011: struct is_function<_Res(_ArgTypes......) volatile > 6011: : public true_type { }; 6011: 6011: template 6011: struct is_function<_Res(_ArgTypes......) volatile & > 6011: : public true_type { }; 6011: 6011: template 6011: struct is_function<_Res(_ArgTypes......) volatile && > 6011: : public true_type { }; 6011: 6011: template 6011: struct is_function<_Res(_ArgTypes...) const volatile > 6011: : public true_type { }; 6011: 6011: template 6011: struct is_function<_Res(_ArgTypes...) const volatile & > 6011: : public true_type { }; 6011: 6011: template 6011: struct is_function<_Res(_ArgTypes...) const volatile && > 6011: : public true_type { }; 6011: 6011: template 6011: struct is_function<_Res(_ArgTypes......) const volatile > 6011: : public true_type { }; 6011: 6011: template 6011: struct is_function<_Res(_ArgTypes......) const volatile & > 6011: : public true_type { }; 6011: 6011: template 6011: struct is_function<_Res(_ArgTypes......) const volatile && > 6011: : public true_type { }; 6011: 6011: 6011: 6011: template 6011: struct __is_null_pointer_helper 6011: : public false_type { }; 6011: 6011: template<> 6011: struct __is_null_pointer_helper 6011: : public true_type { }; 6011: 6011: 6011: template 6011: struct is_null_pointer 6011: : public __is_null_pointer_helper::type>::type 6011: { }; 6011: 6011: 6011: template 6011: struct __is_nullptr_t 6011: : public is_null_pointer<_Tp> 6011: { }; 6011: 6011: 6011: 6011: 6011: template 6011: struct is_reference 6011: : public __or_, 6011: is_rvalue_reference<_Tp>>::type 6011: { }; 6011: 6011: 6011: template 6011: struct is_arithmetic 6011: : public __or_, is_floating_point<_Tp>>::type 6011: { }; 6011: 6011: 6011: template 6011: struct is_fundamental 6011: : public __or_, is_void<_Tp>, 6011: is_null_pointer<_Tp>>::type 6011: { }; 6011: 6011: 6011: template 6011: struct is_object 6011: : public __not_<__or_, is_reference<_Tp>, 6011: is_void<_Tp>>>::type 6011: { }; 6011: 6011: template 6011: struct is_member_pointer; 6011: 6011: 6011: template 6011: struct is_scalar 6011: : public __or_, is_enum<_Tp>, is_pointer<_Tp>, 6011: is_member_pointer<_Tp>, is_null_pointer<_Tp>>::type 6011: { }; 6011: 6011: 6011: template 6011: struct is_compound 6011: : public integral_constant::value> { }; 6011: 6011: template 6011: struct __is_member_pointer_helper 6011: : public false_type { }; 6011: 6011: template 6011: struct __is_member_pointer_helper<_Tp _Cp::*> 6011: : public true_type { }; 6011: 6011: 6011: template 6011: struct is_member_pointer 6011: : public __is_member_pointer_helper::type>::type 6011: { }; 6011: 6011: 6011: 6011: template 6011: struct __is_referenceable 6011: : public __or_, is_reference<_Tp>>::type 6011: { }; 6011: 6011: template 6011: struct __is_referenceable<_Res(_Args...) > 6011: : public true_type 6011: { }; 6011: 6011: template 6011: struct __is_referenceable<_Res(_Args......) > 6011: : public true_type 6011: { }; 6011: 6011: 6011: 6011: 6011: template 6011: struct is_const 6011: : public false_type { }; 6011: 6011: template 6011: struct is_const<_Tp const> 6011: : public true_type { }; 6011: 6011: 6011: template 6011: struct is_volatile 6011: : public false_type { }; 6011: 6011: template 6011: struct is_volatile<_Tp volatile> 6011: : public true_type { }; 6011: 6011: 6011: template 6011: struct is_trivial 6011: : public integral_constant 6011: { }; 6011: 6011: 6011: template 6011: struct is_trivially_copyable 6011: : public integral_constant 6011: { }; 6011: 6011: 6011: template 6011: struct is_standard_layout 6011: : public integral_constant 6011: { }; 6011: 6011: 6011: 6011: template 6011: struct is_pod 6011: : public integral_constant 6011: { }; 6011: 6011: 6011: template 6011: struct is_literal_type 6011: : public integral_constant 6011: { }; 6011: 6011: 6011: template 6011: struct is_empty 6011: : public integral_constant 6011: { }; 6011: 6011: 6011: template 6011: struct is_polymorphic 6011: : public integral_constant 6011: { }; 6011: # 724 "/usr/include/c++/8/type_traits" 3 6011: template 6011: struct is_abstract 6011: : public integral_constant 6011: { }; 6011: 6011: template::value> 6011: struct __is_signed_helper 6011: : public false_type { }; 6011: 6011: template 6011: struct __is_signed_helper<_Tp, true> 6011: : public integral_constant 6011: { }; 6011: 6011: 6011: template 6011: struct is_signed 6011: : public __is_signed_helper<_Tp>::type 6011: { }; 6011: 6011: 6011: template 6011: struct is_unsigned 6011: : public __and_, __not_>> 6011: { }; 6011: # 759 "/usr/include/c++/8/type_traits" 3 6011: template 6011: _Up 6011: __declval(int); 6011: 6011: template 6011: _Tp 6011: __declval(long); 6011: 6011: template 6011: auto declval() noexcept -> decltype(__declval<_Tp>(0)); 6011: 6011: template 6011: struct extent; 6011: 6011: template 6011: struct remove_all_extents; 6011: 6011: template 6011: struct __is_array_known_bounds 6011: : public integral_constant::value > 0)> 6011: { }; 6011: 6011: template 6011: struct __is_array_unknown_bounds 6011: : public __and_, __not_>> 6011: { }; 6011: 6011: 6011: 6011: 6011: 6011: 6011: struct __do_is_destructible_impl 6011: { 6011: template().~_Tp())> 6011: static true_type __test(int); 6011: 6011: template 6011: static false_type __test(...); 6011: }; 6011: 6011: template 6011: struct __is_destructible_impl 6011: : public __do_is_destructible_impl 6011: { 6011: typedef decltype(__test<_Tp>(0)) type; 6011: }; 6011: 6011: template, 6011: __is_array_unknown_bounds<_Tp>, 6011: is_function<_Tp>>::value, 6011: bool = __or_, is_scalar<_Tp>>::value> 6011: struct __is_destructible_safe; 6011: 6011: template 6011: struct __is_destructible_safe<_Tp, false, false> 6011: : public __is_destructible_impl::type>::type 6011: { }; 6011: 6011: template 6011: struct __is_destructible_safe<_Tp, true, false> 6011: : public false_type { }; 6011: 6011: template 6011: struct __is_destructible_safe<_Tp, false, true> 6011: : public true_type { }; 6011: 6011: 6011: template 6011: struct is_destructible 6011: : public __is_destructible_safe<_Tp>::type 6011: { }; 6011: 6011: 6011: 6011: 6011: 6011: struct __do_is_nt_destructible_impl 6011: { 6011: template 6011: static integral_constant().~_Tp())> 6011: __test(int); 6011: 6011: template 6011: static false_type __test(...); 6011: }; 6011: 6011: template 6011: struct __is_nt_destructible_impl 6011: : public __do_is_nt_destructible_impl 6011: { 6011: typedef decltype(__test<_Tp>(0)) type; 6011: }; 6011: 6011: template, 6011: __is_array_unknown_bounds<_Tp>, 6011: is_function<_Tp>>::value, 6011: bool = __or_, is_scalar<_Tp>>::value> 6011: struct __is_nt_destructible_safe; 6011: 6011: template 6011: struct __is_nt_destructible_safe<_Tp, false, false> 6011: : public __is_nt_destructible_impl::type>::type 6011: { }; 6011: 6011: template 6011: struct __is_nt_destructible_safe<_Tp, true, false> 6011: : public false_type { }; 6011: 6011: template 6011: struct __is_nt_destructible_safe<_Tp, false, true> 6011: : public true_type { }; 6011: 6011: 6011: template 6011: struct is_nothrow_destructible 6011: : public __is_nt_destructible_safe<_Tp>::type 6011: { }; 6011: 6011: struct __do_is_default_constructible_impl 6011: { 6011: template 6011: static true_type __test(int); 6011: 6011: template 6011: static false_type __test(...); 6011: }; 6011: 6011: template 6011: struct __is_default_constructible_impl 6011: : public __do_is_default_constructible_impl 6011: { 6011: typedef decltype(__test<_Tp>(0)) type; 6011: }; 6011: 6011: template 6011: struct __is_default_constructible_atom 6011: : public __and_<__not_>, 6011: __is_default_constructible_impl<_Tp>> 6011: { }; 6011: 6011: template::value> 6011: struct __is_default_constructible_safe; 6011: 6011: 6011: 6011: 6011: 6011: 6011: template 6011: struct __is_default_constructible_safe<_Tp, true> 6011: : public __and_<__is_array_known_bounds<_Tp>, 6011: __is_default_constructible_atom::type>> 6011: { }; 6011: 6011: template 6011: struct __is_default_constructible_safe<_Tp, false> 6011: : public __is_default_constructible_atom<_Tp>::type 6011: { }; 6011: 6011: 6011: template 6011: struct is_default_constructible 6011: : public __is_default_constructible_safe<_Tp>::type 6011: { }; 6011: 6011: 6011: template 6011: struct is_constructible 6011: : public __bool_constant<__is_constructible(_Tp, _Args...)> 6011: { }; 6011: 6011: template::value> 6011: struct __is_copy_constructible_impl; 6011: 6011: template 6011: struct __is_copy_constructible_impl<_Tp, false> 6011: : public false_type { }; 6011: 6011: template 6011: struct __is_copy_constructible_impl<_Tp, true> 6011: : public is_constructible<_Tp, const _Tp&> 6011: { }; 6011: 6011: 6011: template 6011: struct is_copy_constructible 6011: : public __is_copy_constructible_impl<_Tp> 6011: { }; 6011: 6011: template::value> 6011: struct __is_move_constructible_impl; 6011: 6011: template 6011: struct __is_move_constructible_impl<_Tp, false> 6011: : public false_type { }; 6011: 6011: template 6011: struct __is_move_constructible_impl<_Tp, true> 6011: : public is_constructible<_Tp, _Tp&&> 6011: { }; 6011: 6011: 6011: template 6011: struct is_move_constructible 6011: : public __is_move_constructible_impl<_Tp> 6011: { }; 6011: 6011: template 6011: struct __is_nt_default_constructible_atom 6011: : public integral_constant 6011: { }; 6011: 6011: template::value> 6011: struct __is_nt_default_constructible_impl; 6011: 6011: template 6011: struct __is_nt_default_constructible_impl<_Tp, true> 6011: : public __and_<__is_array_known_bounds<_Tp>, 6011: __is_nt_default_constructible_atom::type>> 6011: { }; 6011: 6011: template 6011: struct __is_nt_default_constructible_impl<_Tp, false> 6011: : public __is_nt_default_constructible_atom<_Tp> 6011: { }; 6011: 6011: 6011: template 6011: struct is_nothrow_default_constructible 6011: : public __and_, 6011: __is_nt_default_constructible_impl<_Tp>> 6011: { }; 6011: 6011: template 6011: struct __is_nt_constructible_impl 6011: : public integral_constant()...))> 6011: { }; 6011: 6011: template 6011: struct __is_nt_constructible_impl<_Tp, _Arg> 6011: : public integral_constant(declval<_Arg>()))> 6011: { }; 6011: 6011: template 6011: struct __is_nt_constructible_impl<_Tp> 6011: : public is_nothrow_default_constructible<_Tp> 6011: { }; 6011: 6011: 6011: template 6011: struct is_nothrow_constructible 6011: : public __and_, 6011: __is_nt_constructible_impl<_Tp, _Args...>> 6011: { }; 6011: 6011: template::value> 6011: struct __is_nothrow_copy_constructible_impl; 6011: 6011: template 6011: struct __is_nothrow_copy_constructible_impl<_Tp, false> 6011: : public false_type { }; 6011: 6011: template 6011: struct __is_nothrow_copy_constructible_impl<_Tp, true> 6011: : public is_nothrow_constructible<_Tp, const _Tp&> 6011: { }; 6011: 6011: 6011: template 6011: struct is_nothrow_copy_constructible 6011: : public __is_nothrow_copy_constructible_impl<_Tp> 6011: { }; 6011: 6011: template::value> 6011: struct __is_nothrow_move_constructible_impl; 6011: 6011: template 6011: struct __is_nothrow_move_constructible_impl<_Tp, false> 6011: : public false_type { }; 6011: 6011: template 6011: struct __is_nothrow_move_constructible_impl<_Tp, true> 6011: : public is_nothrow_constructible<_Tp, _Tp&&> 6011: { }; 6011: 6011: 6011: template 6011: struct is_nothrow_move_constructible 6011: : public __is_nothrow_move_constructible_impl<_Tp> 6011: { }; 6011: 6011: 6011: template 6011: struct is_assignable 6011: : public __bool_constant<__is_assignable(_Tp, _Up)> 6011: { }; 6011: 6011: template::value> 6011: struct __is_copy_assignable_impl; 6011: 6011: template 6011: struct __is_copy_assignable_impl<_Tp, false> 6011: : public false_type { }; 6011: 6011: template 6011: struct __is_copy_assignable_impl<_Tp, true> 6011: : public is_assignable<_Tp&, const _Tp&> 6011: { }; 6011: 6011: 6011: template 6011: struct is_copy_assignable 6011: : public __is_copy_assignable_impl<_Tp> 6011: { }; 6011: 6011: template::value> 6011: struct __is_move_assignable_impl; 6011: 6011: template 6011: struct __is_move_assignable_impl<_Tp, false> 6011: : public false_type { }; 6011: 6011: template 6011: struct __is_move_assignable_impl<_Tp, true> 6011: : public is_assignable<_Tp&, _Tp&&> 6011: { }; 6011: 6011: 6011: template 6011: struct is_move_assignable 6011: : public __is_move_assignable_impl<_Tp> 6011: { }; 6011: 6011: template 6011: struct __is_nt_assignable_impl 6011: : public integral_constant() = declval<_Up>())> 6011: { }; 6011: 6011: 6011: template 6011: struct is_nothrow_assignable 6011: : public __and_, 6011: __is_nt_assignable_impl<_Tp, _Up>> 6011: { }; 6011: 6011: template::value> 6011: struct __is_nt_copy_assignable_impl; 6011: 6011: template 6011: struct __is_nt_copy_assignable_impl<_Tp, false> 6011: : public false_type { }; 6011: 6011: template 6011: struct __is_nt_copy_assignable_impl<_Tp, true> 6011: : public is_nothrow_assignable<_Tp&, const _Tp&> 6011: { }; 6011: 6011: 6011: template 6011: struct is_nothrow_copy_assignable 6011: : public __is_nt_copy_assignable_impl<_Tp> 6011: { }; 6011: 6011: template::value> 6011: struct __is_nt_move_assignable_impl; 6011: 6011: template 6011: struct __is_nt_move_assignable_impl<_Tp, false> 6011: : public false_type { }; 6011: 6011: template 6011: struct __is_nt_move_assignable_impl<_Tp, true> 6011: : public is_nothrow_assignable<_Tp&, _Tp&&> 6011: { }; 6011: 6011: 6011: template 6011: struct is_nothrow_move_assignable 6011: : public __is_nt_move_assignable_impl<_Tp> 6011: { }; 6011: 6011: 6011: template 6011: struct is_trivially_constructible 6011: : public __bool_constant<__is_trivially_constructible(_Tp, _Args...)> 6011: { }; 6011: 6011: 6011: template 6011: struct is_trivially_default_constructible 6011: : public is_trivially_constructible<_Tp>::type 6011: { }; 6011: 6011: struct __do_is_implicitly_default_constructible_impl 6011: { 6011: template 6011: static void __helper(const _Tp&); 6011: 6011: template 6011: static true_type __test(const _Tp&, 6011: decltype(__helper({}))* = 0); 6011: 6011: static false_type __test(...); 6011: }; 6011: 6011: template 6011: struct __is_implicitly_default_constructible_impl 6011: : public __do_is_implicitly_default_constructible_impl 6011: { 6011: typedef decltype(__test(declval<_Tp>())) type; 6011: }; 6011: 6011: template 6011: struct __is_implicitly_default_constructible_safe 6011: : public __is_implicitly_default_constructible_impl<_Tp>::type 6011: { }; 6011: 6011: template 6011: struct __is_implicitly_default_constructible 6011: : public __and_, 6011: __is_implicitly_default_constructible_safe<_Tp>> 6011: { }; 6011: 6011: 6011: 6011: template::value> 6011: struct __is_trivially_copy_constructible_impl; 6011: 6011: template 6011: struct __is_trivially_copy_constructible_impl<_Tp, false> 6011: : public false_type { }; 6011: 6011: template 6011: struct __is_trivially_copy_constructible_impl<_Tp, true> 6011: : public __and_, 6011: integral_constant> 6011: { }; 6011: 6011: template 6011: struct is_trivially_copy_constructible 6011: : public __is_trivially_copy_constructible_impl<_Tp> 6011: { }; 6011: 6011: 6011: 6011: template::value> 6011: struct __is_trivially_move_constructible_impl; 6011: 6011: template 6011: struct __is_trivially_move_constructible_impl<_Tp, false> 6011: : public false_type { }; 6011: 6011: template 6011: struct __is_trivially_move_constructible_impl<_Tp, true> 6011: : public __and_, 6011: integral_constant> 6011: { }; 6011: 6011: template 6011: struct is_trivially_move_constructible 6011: : public __is_trivially_move_constructible_impl<_Tp> 6011: { }; 6011: 6011: 6011: template 6011: struct is_trivially_assignable 6011: : public __bool_constant<__is_trivially_assignable(_Tp, _Up)> 6011: { }; 6011: 6011: 6011: 6011: template::value> 6011: struct __is_trivially_copy_assignable_impl; 6011: 6011: template 6011: struct __is_trivially_copy_assignable_impl<_Tp, false> 6011: : public false_type { }; 6011: 6011: template 6011: struct __is_trivially_copy_assignable_impl<_Tp, true> 6011: : public __and_, 6011: integral_constant> 6011: { }; 6011: 6011: template 6011: struct is_trivially_copy_assignable 6011: : public __is_trivially_copy_assignable_impl<_Tp> 6011: { }; 6011: 6011: 6011: 6011: template::value> 6011: struct __is_trivially_move_assignable_impl; 6011: 6011: template 6011: struct __is_trivially_move_assignable_impl<_Tp, false> 6011: : public false_type { }; 6011: 6011: template 6011: struct __is_trivially_move_assignable_impl<_Tp, true> 6011: : public __and_, 6011: integral_constant> 6011: { }; 6011: 6011: template 6011: struct is_trivially_move_assignable 6011: : public __is_trivially_move_assignable_impl<_Tp> 6011: { }; 6011: 6011: 6011: template 6011: struct is_trivially_destructible 6011: : public __and_, integral_constant> 6011: { }; 6011: 6011: 6011: 6011: template 6011: struct has_virtual_destructor 6011: : public integral_constant 6011: { }; 6011: 6011: 6011: 6011: 6011: 6011: template 6011: struct alignment_of 6011: : public integral_constant { }; 6011: 6011: 6011: template 6011: struct rank 6011: : public integral_constant { }; 6011: 6011: template 6011: struct rank<_Tp[_Size]> 6011: : public integral_constant::value> { }; 6011: 6011: template 6011: struct rank<_Tp[]> 6011: : public integral_constant::value> { }; 6011: 6011: 6011: template 6011: struct extent 6011: : public integral_constant { }; 6011: 6011: template 6011: struct extent<_Tp[_Size], _Uint> 6011: : public integral_constant::value> 6011: { }; 6011: 6011: template 6011: struct extent<_Tp[], _Uint> 6011: : public integral_constant::value> 6011: { }; 6011: 6011: 6011: 6011: 6011: 6011: template 6011: struct is_same 6011: : public false_type { }; 6011: 6011: template 6011: struct is_same<_Tp, _Tp> 6011: : public true_type { }; 6011: 6011: 6011: template 6011: struct is_base_of 6011: : public integral_constant 6011: { }; 6011: 6011: template, is_function<_To>, 6011: is_array<_To>>::value> 6011: struct __is_convertible_helper 6011: { typedef typename is_void<_To>::type type; }; 6011: 6011: template 6011: class __is_convertible_helper<_From, _To, false> 6011: { 6011: template 6011: static void __test_aux(_To1); 6011: 6011: template(std::declval<_From1>()))> 6011: static true_type 6011: __test(int); 6011: 6011: template 6011: static false_type 6011: __test(...); 6011: 6011: public: 6011: typedef decltype(__test<_From, _To>(0)) type; 6011: }; 6011: 6011: 6011: 6011: template 6011: struct is_convertible 6011: : public __is_convertible_helper<_From, _To>::type 6011: { }; 6011: 6011: 6011: 6011: 6011: 6011: template 6011: struct remove_const 6011: { typedef _Tp type; }; 6011: 6011: template 6011: struct remove_const<_Tp const> 6011: { typedef _Tp type; }; 6011: 6011: 6011: template 6011: struct remove_volatile 6011: { typedef _Tp type; }; 6011: 6011: template 6011: struct remove_volatile<_Tp volatile> 6011: { typedef _Tp type; }; 6011: 6011: 6011: template 6011: struct remove_cv 6011: { 6011: typedef typename 6011: remove_const::type>::type type; 6011: }; 6011: 6011: 6011: template 6011: struct add_const 6011: { typedef _Tp const type; }; 6011: 6011: 6011: template 6011: struct add_volatile 6011: { typedef _Tp volatile type; }; 6011: 6011: 6011: template 6011: struct add_cv 6011: { 6011: typedef typename 6011: add_const::type>::type type; 6011: }; 6011: # 1463 "/usr/include/c++/8/type_traits" 3 6011: template 6011: struct remove_reference 6011: { typedef _Tp type; }; 6011: 6011: template 6011: struct remove_reference<_Tp&> 6011: { typedef _Tp type; }; 6011: 6011: template 6011: struct remove_reference<_Tp&&> 6011: { typedef _Tp type; }; 6011: 6011: template::value> 6011: struct __add_lvalue_reference_helper 6011: { typedef _Tp type; }; 6011: 6011: template 6011: struct __add_lvalue_reference_helper<_Tp, true> 6011: { typedef _Tp& type; }; 6011: 6011: 6011: template 6011: struct add_lvalue_reference 6011: : public __add_lvalue_reference_helper<_Tp> 6011: { }; 6011: 6011: template::value> 6011: struct __add_rvalue_reference_helper 6011: { typedef _Tp type; }; 6011: 6011: template 6011: struct __add_rvalue_reference_helper<_Tp, true> 6011: { typedef _Tp&& type; }; 6011: 6011: 6011: template 6011: struct add_rvalue_reference 6011: : public __add_rvalue_reference_helper<_Tp> 6011: { }; 6011: # 1520 "/usr/include/c++/8/type_traits" 3 6011: template 6011: struct __cv_selector; 6011: 6011: template 6011: struct __cv_selector<_Unqualified, false, false> 6011: { typedef _Unqualified __type; }; 6011: 6011: template 6011: struct __cv_selector<_Unqualified, false, true> 6011: { typedef volatile _Unqualified __type; }; 6011: 6011: template 6011: struct __cv_selector<_Unqualified, true, false> 6011: { typedef const _Unqualified __type; }; 6011: 6011: template 6011: struct __cv_selector<_Unqualified, true, true> 6011: { typedef const volatile _Unqualified __type; }; 6011: 6011: template::value, 6011: bool _IsVol = is_volatile<_Qualified>::value> 6011: class __match_cv_qualifiers 6011: { 6011: typedef __cv_selector<_Unqualified, _IsConst, _IsVol> __match; 6011: 6011: public: 6011: typedef typename __match::__type __type; 6011: }; 6011: 6011: 6011: template 6011: struct __make_unsigned 6011: { typedef _Tp __type; }; 6011: 6011: template<> 6011: struct __make_unsigned 6011: { typedef unsigned char __type; }; 6011: 6011: template<> 6011: struct __make_unsigned 6011: { typedef unsigned char __type; }; 6011: 6011: template<> 6011: struct __make_unsigned 6011: { typedef unsigned short __type; }; 6011: 6011: template<> 6011: struct __make_unsigned 6011: { typedef unsigned int __type; }; 6011: 6011: template<> 6011: struct __make_unsigned 6011: { typedef unsigned long __type; }; 6011: 6011: template<> 6011: struct __make_unsigned 6011: { typedef unsigned long long __type; }; 6011: # 1607 "/usr/include/c++/8/type_traits" 3 6011: template::value, 6011: bool _IsEnum = is_enum<_Tp>::value> 6011: class __make_unsigned_selector; 6011: 6011: template 6011: class __make_unsigned_selector<_Tp, true, false> 6011: { 6011: typedef __make_unsigned::type> __unsignedt; 6011: typedef typename __unsignedt::__type __unsigned_type; 6011: typedef __match_cv_qualifiers<_Tp, __unsigned_type> __cv_unsigned; 6011: 6011: public: 6011: typedef typename __cv_unsigned::__type __type; 6011: }; 6011: 6011: template 6011: class __make_unsigned_selector<_Tp, false, true> 6011: { 6011: 6011: typedef unsigned char __smallest; 6011: static const bool __b0 = sizeof(_Tp) <= sizeof(__smallest); 6011: static const bool __b1 = sizeof(_Tp) <= sizeof(unsigned short); 6011: static const bool __b2 = sizeof(_Tp) <= sizeof(unsigned int); 6011: static const bool __b3 = sizeof(_Tp) <= sizeof(unsigned long); 6011: typedef conditional<__b3, unsigned long, unsigned long long> __cond3; 6011: typedef typename __cond3::type __cond3_type; 6011: typedef conditional<__b2, unsigned int, __cond3_type> __cond2; 6011: typedef typename __cond2::type __cond2_type; 6011: typedef conditional<__b1, unsigned short, __cond2_type> __cond1; 6011: typedef typename __cond1::type __cond1_type; 6011: 6011: typedef typename conditional<__b0, __smallest, __cond1_type>::type 6011: __unsigned_type; 6011: typedef __match_cv_qualifiers<_Tp, __unsigned_type> __cv_unsigned; 6011: 6011: public: 6011: typedef typename __cv_unsigned::__type __type; 6011: }; 6011: 6011: 6011: 6011: 6011: 6011: template 6011: struct make_unsigned 6011: { typedef typename __make_unsigned_selector<_Tp>::__type type; }; 6011: 6011: 6011: template<> 6011: struct make_unsigned; 6011: 6011: 6011: 6011: template 6011: struct __make_signed 6011: { typedef _Tp __type; }; 6011: 6011: template<> 6011: struct __make_signed 6011: { typedef signed char __type; }; 6011: 6011: template<> 6011: struct __make_signed 6011: { typedef signed char __type; }; 6011: 6011: template<> 6011: struct __make_signed 6011: { typedef signed short __type; }; 6011: 6011: template<> 6011: struct __make_signed 6011: { typedef signed int __type; }; 6011: 6011: template<> 6011: struct __make_signed 6011: { typedef signed long __type; }; 6011: 6011: template<> 6011: struct __make_signed 6011: { typedef signed long long __type; }; 6011: 6011: 6011: template<> 6011: struct __make_signed : __make_signed 6011: { }; 6011: 6011: 6011: 6011: template<> 6011: struct __make_signed : __make_signed 6011: { }; 6011: template<> 6011: struct __make_signed : __make_signed 6011: { }; 6011: # 1726 "/usr/include/c++/8/type_traits" 3 6011: template::value, 6011: bool _IsEnum = is_enum<_Tp>::value> 6011: class __make_signed_selector; 6011: 6011: template 6011: class __make_signed_selector<_Tp, true, false> 6011: { 6011: typedef __make_signed::type> __signedt; 6011: typedef typename __signedt::__type __signed_type; 6011: typedef __match_cv_qualifiers<_Tp, __signed_type> __cv_signed; 6011: 6011: public: 6011: typedef typename __cv_signed::__type __type; 6011: }; 6011: 6011: template 6011: class __make_signed_selector<_Tp, false, true> 6011: { 6011: typedef typename __make_unsigned_selector<_Tp>::__type __unsigned_type; 6011: 6011: public: 6011: typedef typename __make_signed_selector<__unsigned_type>::__type __type; 6011: }; 6011: 6011: 6011: 6011: 6011: 6011: template 6011: struct make_signed 6011: { typedef typename __make_signed_selector<_Tp>::__type type; }; 6011: 6011: 6011: template<> 6011: struct make_signed; 6011: # 1776 "/usr/include/c++/8/type_traits" 3 6011: template 6011: struct remove_extent 6011: { typedef _Tp type; }; 6011: 6011: template 6011: struct remove_extent<_Tp[_Size]> 6011: { typedef _Tp type; }; 6011: 6011: template 6011: struct remove_extent<_Tp[]> 6011: { typedef _Tp type; }; 6011: 6011: 6011: template 6011: struct remove_all_extents 6011: { typedef _Tp type; }; 6011: 6011: template 6011: struct remove_all_extents<_Tp[_Size]> 6011: { typedef typename remove_all_extents<_Tp>::type type; }; 6011: 6011: template 6011: struct remove_all_extents<_Tp[]> 6011: { typedef typename remove_all_extents<_Tp>::type type; }; 6011: # 1813 "/usr/include/c++/8/type_traits" 3 6011: template 6011: struct __remove_pointer_helper 6011: { typedef _Tp type; }; 6011: 6011: template 6011: struct __remove_pointer_helper<_Tp, _Up*> 6011: { typedef _Up type; }; 6011: 6011: 6011: template 6011: struct remove_pointer 6011: : public __remove_pointer_helper<_Tp, typename remove_cv<_Tp>::type> 6011: { }; 6011: 6011: 6011: template, 6011: is_void<_Tp>>::value> 6011: struct __add_pointer_helper 6011: { typedef _Tp type; }; 6011: 6011: template 6011: struct __add_pointer_helper<_Tp, true> 6011: { typedef typename remove_reference<_Tp>::type* type; }; 6011: 6011: template 6011: struct add_pointer 6011: : public __add_pointer_helper<_Tp> 6011: { }; 6011: # 1852 "/usr/include/c++/8/type_traits" 3 6011: template 6011: struct __aligned_storage_msa 6011: { 6011: union __type 6011: { 6011: unsigned char __data[_Len]; 6011: struct __attribute__((__aligned__)) { } __align; 6011: }; 6011: }; 6011: # 1872 "/usr/include/c++/8/type_traits" 3 6011: template::__type)> 6011: struct aligned_storage 6011: { 6011: union type 6011: { 6011: unsigned char __data[_Len]; 6011: struct __attribute__((__aligned__((_Align)))) { } __align; 6011: }; 6011: }; 6011: 6011: template 6011: struct __strictest_alignment 6011: { 6011: static const size_t _S_alignment = 0; 6011: static const size_t _S_size = 0; 6011: }; 6011: 6011: template 6011: struct __strictest_alignment<_Tp, _Types...> 6011: { 6011: static const size_t _S_alignment = 6011: alignof(_Tp) > __strictest_alignment<_Types...>::_S_alignment 6011: ? alignof(_Tp) : __strictest_alignment<_Types...>::_S_alignment; 6011: static const size_t _S_size = 6011: sizeof(_Tp) > __strictest_alignment<_Types...>::_S_size 6011: ? sizeof(_Tp) : __strictest_alignment<_Types...>::_S_size; 6011: }; 6011: # 1911 "/usr/include/c++/8/type_traits" 3 6011: template 6011: struct aligned_union 6011: { 6011: private: 6011: static_assert(sizeof...(_Types) != 0, "At least one type is required"); 6011: 6011: using __strictest = __strictest_alignment<_Types...>; 6011: static const size_t _S_len = _Len > __strictest::_S_size 6011: ? _Len : __strictest::_S_size; 6011: public: 6011: 6011: static const size_t alignment_value = __strictest::_S_alignment; 6011: 6011: typedef typename aligned_storage<_S_len, alignment_value>::type type; 6011: }; 6011: 6011: template 6011: const size_t aligned_union<_Len, _Types...>::alignment_value; 6011: 6011: 6011: 6011: template::value, 6011: bool _IsFunction = is_function<_Up>::value> 6011: struct __decay_selector; 6011: 6011: 6011: template 6011: struct __decay_selector<_Up, false, false> 6011: { typedef typename remove_cv<_Up>::type __type; }; 6011: 6011: template 6011: struct __decay_selector<_Up, true, false> 6011: { typedef typename remove_extent<_Up>::type* __type; }; 6011: 6011: template 6011: struct __decay_selector<_Up, false, true> 6011: { typedef typename add_pointer<_Up>::type __type; }; 6011: 6011: 6011: template 6011: class decay 6011: { 6011: typedef typename remove_reference<_Tp>::type __remove_type; 6011: 6011: public: 6011: typedef typename __decay_selector<__remove_type>::__type type; 6011: }; 6011: 6011: template 6011: class reference_wrapper; 6011: 6011: 6011: template 6011: struct __strip_reference_wrapper 6011: { 6011: typedef _Tp __type; 6011: }; 6011: 6011: template 6011: struct __strip_reference_wrapper > 6011: { 6011: typedef _Tp& __type; 6011: }; 6011: 6011: template 6011: struct __decay_and_strip 6011: { 6011: typedef typename __strip_reference_wrapper< 6011: typename decay<_Tp>::type>::__type __type; 6011: }; 6011: 6011: 6011: 6011: 6011: template 6011: struct enable_if 6011: { }; 6011: 6011: 6011: template 6011: struct enable_if 6011: { typedef _Tp type; }; 6011: 6011: template 6011: using _Require = typename enable_if<__and_<_Cond...>::value>::type; 6011: 6011: 6011: 6011: template 6011: struct conditional 6011: { typedef _Iftrue type; }; 6011: 6011: 6011: template 6011: struct conditional 6011: { typedef _Iffalse type; }; 6011: 6011: 6011: template 6011: struct common_type; 6011: 6011: 6011: 6011: struct __do_common_type_impl 6011: { 6011: template 6011: static __success_type() 6011: : std::declval<_Up>())>::type> _S_test(int); 6011: 6011: template 6011: static __failure_type _S_test(...); 6011: }; 6011: 6011: template 6011: struct __common_type_impl 6011: : private __do_common_type_impl 6011: { 6011: typedef decltype(_S_test<_Tp, _Up>(0)) type; 6011: }; 6011: 6011: struct __do_member_type_wrapper 6011: { 6011: template 6011: static __success_type _S_test(int); 6011: 6011: template 6011: static __failure_type _S_test(...); 6011: }; 6011: 6011: template 6011: struct __member_type_wrapper 6011: : private __do_member_type_wrapper 6011: { 6011: typedef decltype(_S_test<_Tp>(0)) type; 6011: }; 6011: 6011: template 6011: struct __expanded_common_type_wrapper 6011: { 6011: typedef common_type type; 6011: }; 6011: 6011: template 6011: struct __expanded_common_type_wrapper<__failure_type, _Args...> 6011: { typedef __failure_type type; }; 6011: 6011: template 6011: struct common_type<_Tp> 6011: { typedef typename decay<_Tp>::type type; }; 6011: 6011: template 6011: struct common_type<_Tp, _Up> 6011: : public __common_type_impl<_Tp, _Up>::type 6011: { }; 6011: 6011: template 6011: struct common_type<_Tp, _Up, _Vp...> 6011: : public __expanded_common_type_wrapper>::type, _Vp...>::type 6011: { }; 6011: 6011: 6011: template 6011: struct underlying_type 6011: { 6011: typedef __underlying_type(_Tp) type; 6011: }; 6011: 6011: template 6011: struct __declval_protector 6011: { 6011: static const bool __stop = false; 6011: }; 6011: 6011: template 6011: auto declval() noexcept -> decltype(__declval<_Tp>(0)) 6011: { 6011: static_assert(__declval_protector<_Tp>::__stop, 6011: "declval() must not be used!"); 6011: return __declval<_Tp>(0); 6011: } 6011: 6011: 6011: template 6011: class result_of; 6011: 6011: 6011: 6011: 6011: 6011: struct __invoke_memfun_ref { }; 6011: struct __invoke_memfun_deref { }; 6011: struct __invoke_memobj_ref { }; 6011: struct __invoke_memobj_deref { }; 6011: struct __invoke_other { }; 6011: 6011: 6011: template 6011: struct __result_of_success : __success_type<_Tp> 6011: { using __invoke_type = _Tag; }; 6011: 6011: 6011: struct __result_of_memfun_ref_impl 6011: { 6011: template 6011: static __result_of_success().*std::declval<_Fp>())(std::declval<_Args>()...) 6011: ), __invoke_memfun_ref> _S_test(int); 6011: 6011: template 6011: static __failure_type _S_test(...); 6011: }; 6011: 6011: template 6011: struct __result_of_memfun_ref 6011: : private __result_of_memfun_ref_impl 6011: { 6011: typedef decltype(_S_test<_MemPtr, _Arg, _Args...>(0)) type; 6011: }; 6011: 6011: 6011: struct __result_of_memfun_deref_impl 6011: { 6011: template 6011: static __result_of_success()).*std::declval<_Fp>())(std::declval<_Args>()...) 6011: ), __invoke_memfun_deref> _S_test(int); 6011: 6011: template 6011: static __failure_type _S_test(...); 6011: }; 6011: 6011: template 6011: struct __result_of_memfun_deref 6011: : private __result_of_memfun_deref_impl 6011: { 6011: typedef decltype(_S_test<_MemPtr, _Arg, _Args...>(0)) type; 6011: }; 6011: 6011: 6011: struct __result_of_memobj_ref_impl 6011: { 6011: template 6011: static __result_of_success().*std::declval<_Fp>() 6011: ), __invoke_memobj_ref> _S_test(int); 6011: 6011: template 6011: static __failure_type _S_test(...); 6011: }; 6011: 6011: template 6011: struct __result_of_memobj_ref 6011: : private __result_of_memobj_ref_impl 6011: { 6011: typedef decltype(_S_test<_MemPtr, _Arg>(0)) type; 6011: }; 6011: 6011: 6011: struct __result_of_memobj_deref_impl 6011: { 6011: template 6011: static __result_of_success()).*std::declval<_Fp>() 6011: ), __invoke_memobj_deref> _S_test(int); 6011: 6011: template 6011: static __failure_type _S_test(...); 6011: }; 6011: 6011: template 6011: struct __result_of_memobj_deref 6011: : private __result_of_memobj_deref_impl 6011: { 6011: typedef decltype(_S_test<_MemPtr, _Arg>(0)) type; 6011: }; 6011: 6011: template 6011: struct __result_of_memobj; 6011: 6011: template 6011: struct __result_of_memobj<_Res _Class::*, _Arg> 6011: { 6011: typedef typename remove_cv::type>::type _Argval; 6011: typedef _Res _Class::* _MemPtr; 6011: typedef typename conditional<__or_, 6011: is_base_of<_Class, _Argval>>::value, 6011: __result_of_memobj_ref<_MemPtr, _Arg>, 6011: __result_of_memobj_deref<_MemPtr, _Arg> 6011: >::type::type type; 6011: }; 6011: 6011: template 6011: struct __result_of_memfun; 6011: 6011: template 6011: struct __result_of_memfun<_Res _Class::*, _Arg, _Args...> 6011: { 6011: typedef typename remove_cv::type>::type _Argval; 6011: typedef _Res _Class::* _MemPtr; 6011: typedef typename conditional<__or_, 6011: is_base_of<_Class, _Argval>>::value, 6011: __result_of_memfun_ref<_MemPtr, _Arg, _Args...>, 6011: __result_of_memfun_deref<_MemPtr, _Arg, _Args...> 6011: >::type::type type; 6011: }; 6011: 6011: 6011: 6011: 6011: 6011: 6011: template::type> 6011: struct __inv_unwrap 6011: { 6011: using type = _Tp; 6011: }; 6011: 6011: template 6011: struct __inv_unwrap<_Tp, reference_wrapper<_Up>> 6011: { 6011: using type = _Up&; 6011: }; 6011: 6011: template 6011: struct __result_of_impl 6011: { 6011: typedef __failure_type type; 6011: }; 6011: 6011: template 6011: struct __result_of_impl 6011: : public __result_of_memobj::type, 6011: typename __inv_unwrap<_Arg>::type> 6011: { }; 6011: 6011: template 6011: struct __result_of_impl 6011: : public __result_of_memfun::type, 6011: typename __inv_unwrap<_Arg>::type, _Args...> 6011: { }; 6011: 6011: 6011: struct __result_of_other_impl 6011: { 6011: template 6011: static __result_of_success()(std::declval<_Args>()...) 6011: ), __invoke_other> _S_test(int); 6011: 6011: template 6011: static __failure_type _S_test(...); 6011: }; 6011: 6011: template 6011: struct __result_of_impl 6011: : private __result_of_other_impl 6011: { 6011: typedef decltype(_S_test<_Functor, _ArgTypes...>(0)) type; 6011: }; 6011: 6011: 6011: template 6011: struct __invoke_result 6011: : public __result_of_impl< 6011: is_member_object_pointer< 6011: typename remove_reference<_Functor>::type 6011: >::value, 6011: is_member_function_pointer< 6011: typename remove_reference<_Functor>::type 6011: >::value, 6011: _Functor, _ArgTypes... 6011: >::type 6011: { }; 6011: 6011: template 6011: struct result_of<_Functor(_ArgTypes...)> 6011: : public __invoke_result<_Functor, _ArgTypes...> 6011: { }; 6011: # 2329 "/usr/include/c++/8/type_traits" 3 6011: template using __void_t = void; 6011: 6011: 6011: 6011: 6011: template using void_t = void; 6011: 6011: 6011: 6011: template class _Op, typename... _Args> 6011: struct __detector 6011: { 6011: using value_t = false_type; 6011: using type = _Default; 6011: }; 6011: 6011: 6011: template class _Op, 6011: typename... _Args> 6011: struct __detector<_Default, __void_t<_Op<_Args...>>, _Op, _Args...> 6011: { 6011: using value_t = true_type; 6011: using type = _Op<_Args...>; 6011: }; 6011: 6011: 6011: template class _Op, 6011: typename... _Args> 6011: using __detected_or = __detector<_Default, void, _Op, _Args...>; 6011: 6011: 6011: template class _Op, 6011: typename... _Args> 6011: using __detected_or_t 6011: = typename __detected_or<_Default, _Op, _Args...>::type; 6011: # 2382 "/usr/include/c++/8/type_traits" 3 6011: template 6011: struct __is_swappable; 6011: 6011: template 6011: struct __is_nothrow_swappable; 6011: 6011: template 6011: class tuple; 6011: 6011: template 6011: struct __is_tuple_like_impl : false_type 6011: { }; 6011: 6011: template 6011: struct __is_tuple_like_impl> : true_type 6011: { }; 6011: 6011: 6011: template 6011: struct __is_tuple_like 6011: : public __is_tuple_like_impl::type>::type>::type 6011: { }; 6011: 6011: template 6011: inline 6011: typename enable_if<__and_<__not_<__is_tuple_like<_Tp>>, 6011: is_move_constructible<_Tp>, 6011: is_move_assignable<_Tp>>::value>::type 6011: swap(_Tp&, _Tp&) 6011: noexcept(__and_, 6011: is_nothrow_move_assignable<_Tp>>::value); 6011: 6011: template 6011: inline 6011: typename enable_if<__is_swappable<_Tp>::value>::type 6011: swap(_Tp (&__a)[_Nm], _Tp (&__b)[_Nm]) 6011: noexcept(__is_nothrow_swappable<_Tp>::value); 6011: 6011: namespace __swappable_details { 6011: using std::swap; 6011: 6011: struct __do_is_swappable_impl 6011: { 6011: template(), std::declval<_Tp&>()))> 6011: static true_type __test(int); 6011: 6011: template 6011: static false_type __test(...); 6011: }; 6011: 6011: struct __do_is_nothrow_swappable_impl 6011: { 6011: template 6011: static __bool_constant< 6011: noexcept(swap(std::declval<_Tp&>(), std::declval<_Tp&>())) 6011: > __test(int); 6011: 6011: template 6011: static false_type __test(...); 6011: }; 6011: 6011: } 6011: 6011: template 6011: struct __is_swappable_impl 6011: : public __swappable_details::__do_is_swappable_impl 6011: { 6011: typedef decltype(__test<_Tp>(0)) type; 6011: }; 6011: 6011: template 6011: struct __is_nothrow_swappable_impl 6011: : public __swappable_details::__do_is_nothrow_swappable_impl 6011: { 6011: typedef decltype(__test<_Tp>(0)) type; 6011: }; 6011: 6011: template 6011: struct __is_swappable 6011: : public __is_swappable_impl<_Tp>::type 6011: { }; 6011: 6011: template 6011: struct __is_nothrow_swappable 6011: : public __is_nothrow_swappable_impl<_Tp>::type 6011: { }; 6011: 6011: 6011: 6011: 6011: 6011: 6011: template 6011: struct is_swappable 6011: : public __is_swappable_impl<_Tp>::type 6011: { }; 6011: 6011: 6011: template 6011: struct is_nothrow_swappable 6011: : public __is_nothrow_swappable_impl<_Tp>::type 6011: { }; 6011: # 2499 "/usr/include/c++/8/type_traits" 3 6011: namespace __swappable_with_details { 6011: using std::swap; 6011: 6011: struct __do_is_swappable_with_impl 6011: { 6011: template(), std::declval<_Up>())), 6011: typename 6011: = decltype(swap(std::declval<_Up>(), std::declval<_Tp>()))> 6011: static true_type __test(int); 6011: 6011: template 6011: static false_type __test(...); 6011: }; 6011: 6011: struct __do_is_nothrow_swappable_with_impl 6011: { 6011: template 6011: static __bool_constant< 6011: noexcept(swap(std::declval<_Tp>(), std::declval<_Up>())) 6011: && 6011: noexcept(swap(std::declval<_Up>(), std::declval<_Tp>())) 6011: > __test(int); 6011: 6011: template 6011: static false_type __test(...); 6011: }; 6011: 6011: } 6011: 6011: template 6011: struct __is_swappable_with_impl 6011: : public __swappable_with_details::__do_is_swappable_with_impl 6011: { 6011: typedef decltype(__test<_Tp, _Up>(0)) type; 6011: }; 6011: 6011: 6011: template 6011: struct __is_swappable_with_impl<_Tp&, _Tp&> 6011: : public __swappable_details::__do_is_swappable_impl 6011: { 6011: typedef decltype(__test<_Tp&>(0)) type; 6011: }; 6011: 6011: template 6011: struct __is_nothrow_swappable_with_impl 6011: : public __swappable_with_details::__do_is_nothrow_swappable_with_impl 6011: { 6011: typedef decltype(__test<_Tp, _Up>(0)) type; 6011: }; 6011: 6011: 6011: template 6011: struct __is_nothrow_swappable_with_impl<_Tp&, _Tp&> 6011: : public __swappable_details::__do_is_nothrow_swappable_impl 6011: { 6011: typedef decltype(__test<_Tp&>(0)) type; 6011: }; 6011: 6011: 6011: template 6011: struct is_swappable_with 6011: : public __is_swappable_with_impl<_Tp, _Up>::type 6011: { }; 6011: 6011: 6011: template 6011: struct is_nothrow_swappable_with 6011: : public __is_nothrow_swappable_with_impl<_Tp, _Up>::type 6011: { }; 6011: # 2587 "/usr/include/c++/8/type_traits" 3 6011: template 6011: struct __is_invocable_impl : false_type { }; 6011: 6011: template 6011: struct __is_invocable_impl<_Result, _Ret, __void_t> 6011: : __or_, is_convertible>::type 6011: { }; 6011: 6011: template 6011: struct __is_invocable 6011: : __is_invocable_impl<__invoke_result<_Fn, _ArgTypes...>, void>::type 6011: { }; 6011: 6011: template 6011: constexpr bool __call_is_nt(__invoke_memfun_ref) 6011: { 6011: using _Up = typename __inv_unwrap<_Tp>::type; 6011: return noexcept((std::declval<_Up>().*std::declval<_Fn>())( 6011: std::declval<_Args>()...)); 6011: } 6011: 6011: template 6011: constexpr bool __call_is_nt(__invoke_memfun_deref) 6011: { 6011: return noexcept(((*std::declval<_Tp>()).*std::declval<_Fn>())( 6011: std::declval<_Args>()...)); 6011: } 6011: 6011: template 6011: constexpr bool __call_is_nt(__invoke_memobj_ref) 6011: { 6011: using _Up = typename __inv_unwrap<_Tp>::type; 6011: return noexcept(std::declval<_Up>().*std::declval<_Fn>()); 6011: } 6011: 6011: template 6011: constexpr bool __call_is_nt(__invoke_memobj_deref) 6011: { 6011: return noexcept((*std::declval<_Tp>()).*std::declval<_Fn>()); 6011: } 6011: 6011: template 6011: constexpr bool __call_is_nt(__invoke_other) 6011: { 6011: return noexcept(std::declval<_Fn>()(std::declval<_Args>()...)); 6011: } 6011: 6011: template 6011: struct __call_is_nothrow 6011: : __bool_constant< 6011: std::__call_is_nt<_Fn, _Args...>(typename _Result::__invoke_type{}) 6011: > 6011: { }; 6011: 6011: template 6011: using __call_is_nothrow_ 6011: = __call_is_nothrow<__invoke_result<_Fn, _Args...>, _Fn, _Args...>; 6011: 6011: 6011: template 6011: struct __is_nothrow_invocable 6011: : __and_<__is_invocable<_Fn, _Args...>, 6011: __call_is_nothrow_<_Fn, _Args...>>::type 6011: { }; 6011: 6011: struct __nonesuch { 6011: __nonesuch() = delete; 6011: ~__nonesuch() = delete; 6011: __nonesuch(__nonesuch const&) = delete; 6011: void operator=(__nonesuch const&) = delete; 6011: }; 6011: # 2943 "/usr/include/c++/8/type_traits" 3 6011: 6011: } 6011: # 56 "/usr/include/c++/8/bits/move.h" 2 3 6011: 6011: namespace std __attribute__ ((__visibility__ ("default"))) 6011: { 6011: 6011: # 72 "/usr/include/c++/8/bits/move.h" 3 6011: template 6011: constexpr _Tp&& 6011: forward(typename std::remove_reference<_Tp>::type& __t) noexcept 6011: { return static_cast<_Tp&&>(__t); } 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: template 6011: constexpr _Tp&& 6011: forward(typename std::remove_reference<_Tp>::type&& __t) noexcept 6011: { 6011: static_assert(!std::is_lvalue_reference<_Tp>::value, "template argument" 6011: " substituting _Tp is an lvalue reference type"); 6011: return static_cast<_Tp&&>(__t); 6011: } 6011: 6011: 6011: 6011: 6011: 6011: 6011: template 6011: constexpr typename std::remove_reference<_Tp>::type&& 6011: move(_Tp&& __t) noexcept 6011: { return static_cast::type&&>(__t); } 6011: 6011: 6011: template 6011: struct __move_if_noexcept_cond 6011: : public __and_<__not_>, 6011: is_copy_constructible<_Tp>>::type { }; 6011: # 116 "/usr/include/c++/8/bits/move.h" 3 6011: template 6011: constexpr typename 6011: conditional<__move_if_noexcept_cond<_Tp>::value, const _Tp&, _Tp&&>::type 6011: move_if_noexcept(_Tp& __x) noexcept 6011: { return std::move(__x); } 6011: # 136 "/usr/include/c++/8/bits/move.h" 3 6011: template 6011: inline _Tp* 6011: addressof(_Tp& __r) noexcept 6011: { return std::__addressof(__r); } 6011: 6011: 6011: 6011: template 6011: const _Tp* addressof(const _Tp&&) = delete; 6011: 6011: 6011: template 6011: inline _Tp 6011: __exchange(_Tp& __obj, _Up&& __new_val) 6011: { 6011: _Tp __old_val = std::move(__obj); 6011: __obj = std::forward<_Up>(__new_val); 6011: return __old_val; 6011: } 6011: # 176 "/usr/include/c++/8/bits/move.h" 3 6011: template 6011: inline 6011: 6011: typename enable_if<__and_<__not_<__is_tuple_like<_Tp>>, 6011: is_move_constructible<_Tp>, 6011: is_move_assignable<_Tp>>::value>::type 6011: swap(_Tp& __a, _Tp& __b) 6011: noexcept(__and_, 6011: is_nothrow_move_assignable<_Tp>>::value) 6011: 6011: 6011: 6011: 6011: { 6011: 6011: 6011: 6011: _Tp __tmp = std::move(__a); 6011: __a = std::move(__b); 6011: __b = std::move(__tmp); 6011: } 6011: 6011: 6011: 6011: 6011: template 6011: inline 6011: 6011: typename enable_if<__is_swappable<_Tp>::value>::type 6011: swap(_Tp (&__a)[_Nm], _Tp (&__b)[_Nm]) 6011: noexcept(__is_nothrow_swappable<_Tp>::value) 6011: 6011: 6011: 6011: 6011: { 6011: for (size_t __n = 0; __n < _Nm; ++__n) 6011: swap(__a[__n], __b[__n]); 6011: } 6011: 6011: 6011: 6011: } 6011: # 60 "/usr/include/c++/8/bits/stl_pair.h" 2 3 6011: 6011: 6011: 6011: 6011: 6011: namespace std __attribute__ ((__visibility__ ("default"))) 6011: { 6011: 6011: # 76 "/usr/include/c++/8/bits/stl_pair.h" 3 6011: struct piecewise_construct_t { explicit piecewise_construct_t() = default; }; 6011: 6011: 6011: constexpr piecewise_construct_t piecewise_construct = 6011: piecewise_construct_t(); 6011: 6011: 6011: template 6011: class tuple; 6011: 6011: template 6011: struct _Index_tuple; 6011: 6011: 6011: 6011: 6011: 6011: 6011: template 6011: struct _PCC 6011: { 6011: template 6011: static constexpr bool _ConstructiblePair() 6011: { 6011: return __and_, 6011: is_constructible<_T2, const _U2&>>::value; 6011: } 6011: 6011: template 6011: static constexpr bool _ImplicitlyConvertiblePair() 6011: { 6011: return __and_, 6011: is_convertible>::value; 6011: } 6011: 6011: template 6011: static constexpr bool _MoveConstructiblePair() 6011: { 6011: return __and_, 6011: is_constructible<_T2, _U2&&>>::value; 6011: } 6011: 6011: template 6011: static constexpr bool _ImplicitlyMoveConvertiblePair() 6011: { 6011: return __and_, 6011: is_convertible<_U2&&, _T2>>::value; 6011: } 6011: 6011: template 6011: static constexpr bool _CopyMovePair() 6011: { 6011: using __do_converts = __and_, 6011: is_convertible<_U2&&, _T2>>; 6011: using __converts = typename conditional<__implicit, 6011: __do_converts, 6011: __not_<__do_converts>>::type; 6011: return __and_, 6011: is_constructible<_T2, _U2&&>, 6011: __converts 6011: >::value; 6011: } 6011: 6011: template 6011: static constexpr bool _MoveCopyPair() 6011: { 6011: using __do_converts = __and_, 6011: is_convertible>; 6011: using __converts = typename conditional<__implicit, 6011: __do_converts, 6011: __not_<__do_converts>>::type; 6011: return __and_, 6011: is_constructible<_T2, const _U2&&>, 6011: __converts 6011: >::value; 6011: } 6011: }; 6011: 6011: template 6011: struct _PCC 6011: { 6011: template 6011: static constexpr bool _ConstructiblePair() 6011: { 6011: return false; 6011: } 6011: 6011: template 6011: static constexpr bool _ImplicitlyConvertiblePair() 6011: { 6011: return false; 6011: } 6011: 6011: template 6011: static constexpr bool _MoveConstructiblePair() 6011: { 6011: return false; 6011: } 6011: 6011: template 6011: static constexpr bool _ImplicitlyMoveConvertiblePair() 6011: { 6011: return false; 6011: } 6011: }; 6011: 6011: 6011: 6011: 6011: struct __nonesuch_no_braces : std::__nonesuch { 6011: explicit __nonesuch_no_braces(const __nonesuch&) = delete; 6011: }; 6011: # 197 "/usr/include/c++/8/bits/stl_pair.h" 3 6011: template 6011: struct pair 6011: { 6011: typedef _T1 first_type; 6011: typedef _T2 second_type; 6011: 6011: _T1 first; 6011: _T2 second; 6011: 6011: 6011: 6011: 6011: 6011: 6011: template , 6011: __is_implicitly_default_constructible<_U2>> 6011: ::value, bool>::type = true> 6011: 6011: constexpr pair() 6011: : first(), second() { } 6011: 6011: 6011: template , 6011: is_default_constructible<_U2>, 6011: __not_< 6011: __and_<__is_implicitly_default_constructible<_U1>, 6011: __is_implicitly_default_constructible<_U2>>>> 6011: ::value, bool>::type = false> 6011: explicit constexpr pair() 6011: : first(), second() { } 6011: # 241 "/usr/include/c++/8/bits/stl_pair.h" 3 6011: using _PCCP = _PCC; 6011: 6011: template() 6011: && _PCCP::template 6011: _ImplicitlyConvertiblePair<_U1, _U2>(), 6011: bool>::type=true> 6011: constexpr pair(const _T1& __a, const _T2& __b) 6011: : first(__a), second(__b) { } 6011: 6011: template() 6011: && !_PCCP::template 6011: _ImplicitlyConvertiblePair<_U1, _U2>(), 6011: bool>::type=false> 6011: explicit constexpr pair(const _T1& __a, const _T2& __b) 6011: : first(__a), second(__b) { } 6011: # 269 "/usr/include/c++/8/bits/stl_pair.h" 3 6011: template 6011: using _PCCFP = _PCC::value 6011: || !is_same<_T2, _U2>::value, 6011: _T1, _T2>; 6011: 6011: template::template 6011: _ConstructiblePair<_U1, _U2>() 6011: && _PCCFP<_U1, _U2>::template 6011: _ImplicitlyConvertiblePair<_U1, _U2>(), 6011: bool>::type=true> 6011: constexpr pair(const pair<_U1, _U2>& __p) 6011: : first(__p.first), second(__p.second) { } 6011: 6011: template::template 6011: _ConstructiblePair<_U1, _U2>() 6011: && !_PCCFP<_U1, _U2>::template 6011: _ImplicitlyConvertiblePair<_U1, _U2>(), 6011: bool>::type=false> 6011: explicit constexpr pair(const pair<_U1, _U2>& __p) 6011: : first(__p.first), second(__p.second) { } 6011: 6011: constexpr pair(const pair&) = default; 6011: constexpr pair(pair&&) = default; 6011: 6011: 6011: template(), 6011: bool>::type=true> 6011: constexpr pair(_U1&& __x, const _T2& __y) 6011: : first(std::forward<_U1>(__x)), second(__y) { } 6011: 6011: template(), 6011: bool>::type=false> 6011: explicit constexpr pair(_U1&& __x, const _T2& __y) 6011: : first(std::forward<_U1>(__x)), second(__y) { } 6011: 6011: template(), 6011: bool>::type=true> 6011: constexpr pair(const _T1& __x, _U2&& __y) 6011: : first(__x), second(std::forward<_U2>(__y)) { } 6011: 6011: template(), 6011: bool>::type=false> 6011: explicit pair(const _T1& __x, _U2&& __y) 6011: : first(__x), second(std::forward<_U2>(__y)) { } 6011: 6011: template() 6011: && _PCCP::template 6011: _ImplicitlyMoveConvertiblePair<_U1, _U2>(), 6011: bool>::type=true> 6011: constexpr pair(_U1&& __x, _U2&& __y) 6011: : first(std::forward<_U1>(__x)), second(std::forward<_U2>(__y)) { } 6011: 6011: template() 6011: && !_PCCP::template 6011: _ImplicitlyMoveConvertiblePair<_U1, _U2>(), 6011: bool>::type=false> 6011: explicit constexpr pair(_U1&& __x, _U2&& __y) 6011: : first(std::forward<_U1>(__x)), second(std::forward<_U2>(__y)) { } 6011: 6011: 6011: template::template 6011: _MoveConstructiblePair<_U1, _U2>() 6011: && _PCCFP<_U1, _U2>::template 6011: _ImplicitlyMoveConvertiblePair<_U1, _U2>(), 6011: bool>::type=true> 6011: constexpr pair(pair<_U1, _U2>&& __p) 6011: : first(std::forward<_U1>(__p.first)), 6011: second(std::forward<_U2>(__p.second)) { } 6011: 6011: template::template 6011: _MoveConstructiblePair<_U1, _U2>() 6011: && !_PCCFP<_U1, _U2>::template 6011: _ImplicitlyMoveConvertiblePair<_U1, _U2>(), 6011: bool>::type=false> 6011: explicit constexpr pair(pair<_U1, _U2>&& __p) 6011: : first(std::forward<_U1>(__p.first)), 6011: second(std::forward<_U2>(__p.second)) { } 6011: 6011: template 6011: pair(piecewise_construct_t, tuple<_Args1...>, tuple<_Args2...>); 6011: 6011: pair& 6011: operator=(typename conditional< 6011: __and_, 6011: is_copy_assignable<_T2>>::value, 6011: const pair&, const __nonesuch_no_braces&>::type __p) 6011: { 6011: first = __p.first; 6011: second = __p.second; 6011: return *this; 6011: } 6011: 6011: pair& 6011: operator=(typename conditional< 6011: __not_<__and_, 6011: is_copy_assignable<_T2>>>::value, 6011: const pair&, const __nonesuch_no_braces&>::type __p) = delete; 6011: 6011: pair& 6011: operator=(typename conditional< 6011: __and_, 6011: is_move_assignable<_T2>>::value, 6011: pair&&, __nonesuch_no_braces&&>::type __p) 6011: noexcept(__and_, 6011: is_nothrow_move_assignable<_T2>>::value) 6011: { 6011: first = std::forward(__p.first); 6011: second = std::forward(__p.second); 6011: return *this; 6011: } 6011: 6011: template 6011: typename enable_if<__and_, 6011: is_assignable<_T2&, const _U2&>>::value, 6011: pair&>::type 6011: operator=(const pair<_U1, _U2>& __p) 6011: { 6011: first = __p.first; 6011: second = __p.second; 6011: return *this; 6011: } 6011: 6011: template 6011: typename enable_if<__and_, 6011: is_assignable<_T2&, _U2&&>>::value, 6011: pair&>::type 6011: operator=(pair<_U1, _U2>&& __p) 6011: { 6011: first = std::forward<_U1>(__p.first); 6011: second = std::forward<_U2>(__p.second); 6011: return *this; 6011: } 6011: 6011: void 6011: swap(pair& __p) 6011: noexcept(__and_<__is_nothrow_swappable<_T1>, 6011: __is_nothrow_swappable<_T2>>::value) 6011: { 6011: using std::swap; 6011: swap(first, __p.first); 6011: swap(second, __p.second); 6011: } 6011: 6011: private: 6011: template 6011: pair(tuple<_Args1...>&, tuple<_Args2...>&, 6011: _Index_tuple<_Indexes1...>, _Index_tuple<_Indexes2...>); 6011: 6011: }; 6011: 6011: 6011: 6011: 6011: 6011: 6011: template 6011: inline constexpr bool 6011: operator==(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) 6011: { return __x.first == __y.first && __x.second == __y.second; } 6011: 6011: 6011: template 6011: inline constexpr bool 6011: operator<(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) 6011: { return __x.first < __y.first 6011: || (!(__y.first < __x.first) && __x.second < __y.second); } 6011: 6011: 6011: template 6011: inline constexpr bool 6011: operator!=(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) 6011: { return !(__x == __y); } 6011: 6011: 6011: template 6011: inline constexpr bool 6011: operator>(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) 6011: { return __y < __x; } 6011: 6011: 6011: template 6011: inline constexpr bool 6011: operator<=(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) 6011: { return !(__y < __x); } 6011: 6011: 6011: template 6011: inline constexpr bool 6011: operator>=(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) 6011: { return !(__x < __y); } 6011: 6011: 6011: 6011: 6011: 6011: template 6011: inline 6011: 6011: 6011: typename enable_if<__and_<__is_swappable<_T1>, 6011: __is_swappable<_T2>>::value>::type 6011: 6011: 6011: 6011: swap(pair<_T1, _T2>& __x, pair<_T1, _T2>& __y) 6011: noexcept(noexcept(__x.swap(__y))) 6011: { __x.swap(__y); } 6011: 6011: 6011: template 6011: typename enable_if, 6011: __is_swappable<_T2>>::value>::type 6011: swap(pair<_T1, _T2>&, pair<_T1, _T2>&) = delete; 6011: # 516 "/usr/include/c++/8/bits/stl_pair.h" 3 6011: template 6011: constexpr pair::__type, 6011: typename __decay_and_strip<_T2>::__type> 6011: make_pair(_T1&& __x, _T2&& __y) 6011: { 6011: typedef typename __decay_and_strip<_T1>::__type __ds_type1; 6011: typedef typename __decay_and_strip<_T2>::__type __ds_type2; 6011: typedef pair<__ds_type1, __ds_type2> __pair_type; 6011: return __pair_type(std::forward<_T1>(__x), std::forward<_T2>(__y)); 6011: } 6011: # 535 "/usr/include/c++/8/bits/stl_pair.h" 3 6011: 6011: } 6011: # 65 "/usr/include/c++/8/bits/stl_algobase.h" 2 3 6011: # 1 "/usr/include/c++/8/bits/stl_iterator_base_types.h" 1 3 6011: # 62 "/usr/include/c++/8/bits/stl_iterator_base_types.h" 3 6011: 6011: # 63 "/usr/include/c++/8/bits/stl_iterator_base_types.h" 3 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: namespace std __attribute__ ((__visibility__ ("default"))) 6011: { 6011: 6011: # 89 "/usr/include/c++/8/bits/stl_iterator_base_types.h" 3 6011: struct input_iterator_tag { }; 6011: 6011: 6011: struct output_iterator_tag { }; 6011: 6011: 6011: struct forward_iterator_tag : public input_iterator_tag { }; 6011: 6011: 6011: 6011: struct bidirectional_iterator_tag : public forward_iterator_tag { }; 6011: 6011: 6011: 6011: struct random_access_iterator_tag : public bidirectional_iterator_tag { }; 6011: # 116 "/usr/include/c++/8/bits/stl_iterator_base_types.h" 3 6011: template 6011: struct iterator 6011: { 6011: 6011: typedef _Category iterator_category; 6011: 6011: typedef _Tp value_type; 6011: 6011: typedef _Distance difference_type; 6011: 6011: typedef _Pointer pointer; 6011: 6011: typedef _Reference reference; 6011: }; 6011: # 143 "/usr/include/c++/8/bits/stl_iterator_base_types.h" 3 6011: template> 6011: struct __iterator_traits { }; 6011: 6011: template 6011: struct __iterator_traits<_Iterator, 6011: __void_t> 6011: { 6011: typedef typename _Iterator::iterator_category iterator_category; 6011: typedef typename _Iterator::value_type value_type; 6011: typedef typename _Iterator::difference_type difference_type; 6011: typedef typename _Iterator::pointer pointer; 6011: typedef typename _Iterator::reference reference; 6011: }; 6011: 6011: template 6011: struct iterator_traits 6011: : public __iterator_traits<_Iterator> { }; 6011: # 177 "/usr/include/c++/8/bits/stl_iterator_base_types.h" 3 6011: template 6011: struct iterator_traits<_Tp*> 6011: { 6011: typedef random_access_iterator_tag iterator_category; 6011: typedef _Tp value_type; 6011: typedef ptrdiff_t difference_type; 6011: typedef _Tp* pointer; 6011: typedef _Tp& reference; 6011: }; 6011: 6011: 6011: template 6011: struct iterator_traits 6011: { 6011: typedef random_access_iterator_tag iterator_category; 6011: typedef _Tp value_type; 6011: typedef ptrdiff_t difference_type; 6011: typedef const _Tp* pointer; 6011: typedef const _Tp& reference; 6011: }; 6011: 6011: 6011: 6011: 6011: 6011: template 6011: inline constexpr 6011: typename iterator_traits<_Iter>::iterator_category 6011: __iterator_category(const _Iter&) 6011: { return typename iterator_traits<_Iter>::iterator_category(); } 6011: # 231 "/usr/include/c++/8/bits/stl_iterator_base_types.h" 3 6011: template 6011: using _RequireInputIter = typename 6011: enable_if::iterator_category, 6011: input_iterator_tag>::value>::type; 6011: 6011: 6011: 6011: } 6011: # 66 "/usr/include/c++/8/bits/stl_algobase.h" 2 3 6011: # 1 "/usr/include/c++/8/bits/stl_iterator_base_funcs.h" 1 3 6011: # 62 "/usr/include/c++/8/bits/stl_iterator_base_funcs.h" 3 6011: 6011: # 63 "/usr/include/c++/8/bits/stl_iterator_base_funcs.h" 3 6011: 6011: 6011: # 1 "/usr/include/c++/8/debug/assertions.h" 1 3 6011: # 66 "/usr/include/c++/8/bits/stl_iterator_base_funcs.h" 2 3 6011: 6011: namespace std __attribute__ ((__visibility__ ("default"))) 6011: { 6011: 6011: 6011: 6011: 6011: template struct _List_iterator; 6011: template struct _List_const_iterator; 6011: 6011: 6011: template 6011: inline 6011: typename iterator_traits<_InputIterator>::difference_type 6011: __distance(_InputIterator __first, _InputIterator __last, 6011: input_iterator_tag) 6011: { 6011: 6011: 6011: 6011: typename iterator_traits<_InputIterator>::difference_type __n = 0; 6011: while (__first != __last) 6011: { 6011: ++__first; 6011: ++__n; 6011: } 6011: return __n; 6011: } 6011: 6011: template 6011: inline 6011: typename iterator_traits<_RandomAccessIterator>::difference_type 6011: __distance(_RandomAccessIterator __first, _RandomAccessIterator __last, 6011: random_access_iterator_tag) 6011: { 6011: 6011: 6011: 6011: return __last - __first; 6011: } 6011: 6011: 6011: 6011: template 6011: ptrdiff_t 6011: __distance(std::_List_iterator<_Tp>, 6011: std::_List_iterator<_Tp>, 6011: input_iterator_tag); 6011: 6011: template 6011: ptrdiff_t 6011: __distance(std::_List_const_iterator<_Tp>, 6011: std::_List_const_iterator<_Tp>, 6011: input_iterator_tag); 6011: # 135 "/usr/include/c++/8/bits/stl_iterator_base_funcs.h" 3 6011: template 6011: inline 6011: typename iterator_traits<_InputIterator>::difference_type 6011: distance(_InputIterator __first, _InputIterator __last) 6011: { 6011: 6011: return std::__distance(__first, __last, 6011: std::__iterator_category(__first)); 6011: } 6011: 6011: template 6011: inline void 6011: __advance(_InputIterator& __i, _Distance __n, input_iterator_tag) 6011: { 6011: 6011: 6011: ; 6011: while (__n--) 6011: ++__i; 6011: } 6011: 6011: template 6011: inline void 6011: __advance(_BidirectionalIterator& __i, _Distance __n, 6011: bidirectional_iterator_tag) 6011: { 6011: 6011: 6011: 6011: if (__n > 0) 6011: while (__n--) 6011: ++__i; 6011: else 6011: while (__n++) 6011: --__i; 6011: } 6011: 6011: template 6011: inline void 6011: __advance(_RandomAccessIterator& __i, _Distance __n, 6011: random_access_iterator_tag) 6011: { 6011: 6011: 6011: 6011: if (__builtin_constant_p(__n) && __n == 1) 6011: ++__i; 6011: else if (__builtin_constant_p(__n) && __n == -1) 6011: --__i; 6011: else 6011: __i += __n; 6011: } 6011: # 200 "/usr/include/c++/8/bits/stl_iterator_base_funcs.h" 3 6011: template 6011: inline void 6011: advance(_InputIterator& __i, _Distance __n) 6011: { 6011: 6011: typename iterator_traits<_InputIterator>::difference_type __d = __n; 6011: std::__advance(__i, __d, std::__iterator_category(__i)); 6011: } 6011: 6011: 6011: 6011: template 6011: inline _InputIterator 6011: next(_InputIterator __x, typename 6011: iterator_traits<_InputIterator>::difference_type __n = 1) 6011: { 6011: 6011: 6011: std::advance(__x, __n); 6011: return __x; 6011: } 6011: 6011: template 6011: inline _BidirectionalIterator 6011: prev(_BidirectionalIterator __x, typename 6011: iterator_traits<_BidirectionalIterator>::difference_type __n = 1) 6011: { 6011: 6011: 6011: 6011: std::advance(__x, -__n); 6011: return __x; 6011: } 6011: 6011: 6011: 6011: 6011: } 6011: # 67 "/usr/include/c++/8/bits/stl_algobase.h" 2 3 6011: # 1 "/usr/include/c++/8/bits/stl_iterator.h" 1 3 6011: # 66 "/usr/include/c++/8/bits/stl_iterator.h" 3 6011: # 1 "/usr/include/c++/8/bits/ptr_traits.h" 1 3 6011: # 37 "/usr/include/c++/8/bits/ptr_traits.h" 3 6011: namespace std __attribute__ ((__visibility__ ("default"))) 6011: { 6011: 6011: 6011: class __undefined; 6011: 6011: 6011: template 6011: struct __get_first_arg 6011: { using type = __undefined; }; 6011: 6011: template class _Template, typename _Tp, 6011: typename... _Types> 6011: struct __get_first_arg<_Template<_Tp, _Types...>> 6011: { using type = _Tp; }; 6011: 6011: template 6011: using __get_first_arg_t = typename __get_first_arg<_Tp>::type; 6011: 6011: 6011: template 6011: struct __replace_first_arg 6011: { }; 6011: 6011: template class _Template, typename _Up, 6011: typename _Tp, typename... _Types> 6011: struct __replace_first_arg<_Template<_Tp, _Types...>, _Up> 6011: { using type = _Template<_Up, _Types...>; }; 6011: 6011: template 6011: using __replace_first_arg_t = typename __replace_first_arg<_Tp, _Up>::type; 6011: 6011: template 6011: using __make_not_void 6011: = typename conditional::value, __undefined, _Tp>::type; 6011: 6011: 6011: 6011: 6011: 6011: template 6011: struct pointer_traits 6011: { 6011: private: 6011: template 6011: using __element_type = typename _Tp::element_type; 6011: 6011: template 6011: using __difference_type = typename _Tp::difference_type; 6011: 6011: template 6011: struct __rebind : __replace_first_arg<_Tp, _Up> { }; 6011: 6011: template 6011: struct __rebind<_Tp, _Up, __void_t>> 6011: { using type = typename _Tp::template rebind<_Up>; }; 6011: 6011: public: 6011: 6011: using pointer = _Ptr; 6011: 6011: 6011: using element_type 6011: = __detected_or_t<__get_first_arg_t<_Ptr>, __element_type, _Ptr>; 6011: 6011: 6011: using difference_type 6011: = __detected_or_t; 6011: 6011: 6011: template 6011: using rebind = typename __rebind<_Ptr, _Up>::type; 6011: 6011: static _Ptr 6011: pointer_to(__make_not_void& __e) 6011: { return _Ptr::pointer_to(__e); } 6011: 6011: static_assert(!is_same::value, 6011: "pointer type defines element_type or is like SomePointer"); 6011: }; 6011: 6011: 6011: 6011: 6011: 6011: template 6011: struct pointer_traits<_Tp*> 6011: { 6011: 6011: typedef _Tp* pointer; 6011: 6011: typedef _Tp element_type; 6011: 6011: typedef ptrdiff_t difference_type; 6011: 6011: template 6011: using rebind = _Up*; 6011: 6011: 6011: 6011: 6011: 6011: 6011: static pointer 6011: pointer_to(__make_not_void& __r) noexcept 6011: { return std::addressof(__r); } 6011: }; 6011: 6011: 6011: template 6011: using __ptr_rebind = typename pointer_traits<_Ptr>::template rebind<_Tp>; 6011: 6011: template 6011: constexpr _Tp* 6011: __to_address(_Tp* __ptr) noexcept 6011: { 6011: static_assert(!std::is_function<_Tp>::value, "not a function pointer"); 6011: return __ptr; 6011: } 6011: 6011: 6011: template 6011: constexpr typename std::pointer_traits<_Ptr>::element_type* 6011: __to_address(const _Ptr& __ptr) 6011: { return std::__to_address(__ptr.operator->()); } 6011: # 198 "/usr/include/c++/8/bits/ptr_traits.h" 3 6011: 6011: } 6011: # 67 "/usr/include/c++/8/bits/stl_iterator.h" 2 3 6011: 6011: 6011: 6011: 6011: 6011: namespace std __attribute__ ((__visibility__ ("default"))) 6011: { 6011: 6011: # 100 "/usr/include/c++/8/bits/stl_iterator.h" 3 6011: template 6011: class reverse_iterator 6011: : public iterator::iterator_category, 6011: typename iterator_traits<_Iterator>::value_type, 6011: typename iterator_traits<_Iterator>::difference_type, 6011: typename iterator_traits<_Iterator>::pointer, 6011: typename iterator_traits<_Iterator>::reference> 6011: { 6011: protected: 6011: _Iterator current; 6011: 6011: typedef iterator_traits<_Iterator> __traits_type; 6011: 6011: public: 6011: typedef _Iterator iterator_type; 6011: typedef typename __traits_type::difference_type difference_type; 6011: typedef typename __traits_type::pointer pointer; 6011: typedef typename __traits_type::reference reference; 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: reverse_iterator() : current() { } 6011: 6011: 6011: 6011: 6011: explicit 6011: reverse_iterator(iterator_type __x) : current(__x) { } 6011: 6011: 6011: 6011: 6011: 6011: reverse_iterator(const reverse_iterator& __x) 6011: : current(__x.current) { } 6011: 6011: 6011: 6011: 6011: 6011: template 6011: 6011: reverse_iterator(const reverse_iterator<_Iter>& __x) 6011: : current(__x.base()) { } 6011: 6011: 6011: 6011: 6011: iterator_type 6011: base() const 6011: { return current; } 6011: # 167 "/usr/include/c++/8/bits/stl_iterator.h" 3 6011: reference 6011: operator*() const 6011: { 6011: _Iterator __tmp = current; 6011: return *--__tmp; 6011: } 6011: 6011: 6011: 6011: 6011: 6011: 6011: pointer 6011: operator->() const 6011: { return &(operator*()); } 6011: 6011: 6011: 6011: 6011: 6011: 6011: reverse_iterator& 6011: operator++() 6011: { 6011: --current; 6011: return *this; 6011: } 6011: 6011: 6011: 6011: 6011: 6011: 6011: reverse_iterator 6011: operator++(int) 6011: { 6011: reverse_iterator __tmp = *this; 6011: --current; 6011: return __tmp; 6011: } 6011: 6011: 6011: 6011: 6011: 6011: 6011: reverse_iterator& 6011: operator--() 6011: { 6011: ++current; 6011: return *this; 6011: } 6011: 6011: 6011: 6011: 6011: 6011: 6011: reverse_iterator 6011: operator--(int) 6011: { 6011: reverse_iterator __tmp = *this; 6011: ++current; 6011: return __tmp; 6011: } 6011: 6011: 6011: 6011: 6011: 6011: 6011: reverse_iterator 6011: operator+(difference_type __n) const 6011: { return reverse_iterator(current - __n); } 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: reverse_iterator& 6011: operator+=(difference_type __n) 6011: { 6011: current -= __n; 6011: return *this; 6011: } 6011: 6011: 6011: 6011: 6011: 6011: 6011: reverse_iterator 6011: operator-(difference_type __n) const 6011: { return reverse_iterator(current + __n); } 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: reverse_iterator& 6011: operator-=(difference_type __n) 6011: { 6011: current += __n; 6011: return *this; 6011: } 6011: 6011: 6011: 6011: 6011: 6011: 6011: reference 6011: operator[](difference_type __n) const 6011: { return *(*this + __n); } 6011: }; 6011: # 297 "/usr/include/c++/8/bits/stl_iterator.h" 3 6011: template 6011: inline bool 6011: operator==(const reverse_iterator<_Iterator>& __x, 6011: const reverse_iterator<_Iterator>& __y) 6011: { return __x.base() == __y.base(); } 6011: 6011: template 6011: inline bool 6011: operator<(const reverse_iterator<_Iterator>& __x, 6011: const reverse_iterator<_Iterator>& __y) 6011: { return __y.base() < __x.base(); } 6011: 6011: template 6011: inline bool 6011: operator!=(const reverse_iterator<_Iterator>& __x, 6011: const reverse_iterator<_Iterator>& __y) 6011: { return !(__x == __y); } 6011: 6011: template 6011: inline bool 6011: operator>(const reverse_iterator<_Iterator>& __x, 6011: const reverse_iterator<_Iterator>& __y) 6011: { return __y < __x; } 6011: 6011: template 6011: inline bool 6011: operator<=(const reverse_iterator<_Iterator>& __x, 6011: const reverse_iterator<_Iterator>& __y) 6011: { return !(__y < __x); } 6011: 6011: template 6011: inline bool 6011: operator>=(const reverse_iterator<_Iterator>& __x, 6011: const reverse_iterator<_Iterator>& __y) 6011: { return !(__x < __y); } 6011: 6011: 6011: 6011: template 6011: inline bool 6011: operator==(const reverse_iterator<_IteratorL>& __x, 6011: const reverse_iterator<_IteratorR>& __y) 6011: { return __x.base() == __y.base(); } 6011: 6011: template 6011: inline bool 6011: operator<(const reverse_iterator<_IteratorL>& __x, 6011: const reverse_iterator<_IteratorR>& __y) 6011: { return __y.base() < __x.base(); } 6011: 6011: template 6011: inline bool 6011: operator!=(const reverse_iterator<_IteratorL>& __x, 6011: const reverse_iterator<_IteratorR>& __y) 6011: { return !(__x == __y); } 6011: 6011: template 6011: inline bool 6011: operator>(const reverse_iterator<_IteratorL>& __x, 6011: const reverse_iterator<_IteratorR>& __y) 6011: { return __y < __x; } 6011: 6011: template 6011: inline bool 6011: operator<=(const reverse_iterator<_IteratorL>& __x, 6011: const reverse_iterator<_IteratorR>& __y) 6011: { return !(__y < __x); } 6011: 6011: template 6011: inline bool 6011: operator>=(const reverse_iterator<_IteratorL>& __x, 6011: const reverse_iterator<_IteratorR>& __y) 6011: { return !(__x < __y); } 6011: # 387 "/usr/include/c++/8/bits/stl_iterator.h" 3 6011: template 6011: inline auto 6011: operator-(const reverse_iterator<_IteratorL>& __x, 6011: const reverse_iterator<_IteratorR>& __y) 6011: -> decltype(__y.base() - __x.base()) 6011: { return __y.base() - __x.base(); } 6011: 6011: 6011: template 6011: inline reverse_iterator<_Iterator> 6011: operator+(typename reverse_iterator<_Iterator>::difference_type __n, 6011: const reverse_iterator<_Iterator>& __x) 6011: { return reverse_iterator<_Iterator>(__x.base() - __n); } 6011: 6011: 6011: 6011: template 6011: inline reverse_iterator<_Iterator> 6011: __make_reverse_iterator(_Iterator __i) 6011: { return reverse_iterator<_Iterator>(__i); } 6011: # 422 "/usr/include/c++/8/bits/stl_iterator.h" 3 6011: template 6011: auto 6011: __niter_base(reverse_iterator<_Iterator> __it) 6011: -> decltype(__make_reverse_iterator(__niter_base(__it.base()))) 6011: { return __make_reverse_iterator(__niter_base(__it.base())); } 6011: 6011: template 6011: struct __is_move_iterator > 6011: : __is_move_iterator<_Iterator> 6011: { }; 6011: 6011: template 6011: auto 6011: __miter_base(reverse_iterator<_Iterator> __it) 6011: -> decltype(__make_reverse_iterator(__miter_base(__it.base()))) 6011: { return __make_reverse_iterator(__miter_base(__it.base())); } 6011: # 451 "/usr/include/c++/8/bits/stl_iterator.h" 3 6011: template 6011: class back_insert_iterator 6011: : public iterator 6011: { 6011: protected: 6011: _Container* container; 6011: 6011: public: 6011: 6011: typedef _Container container_type; 6011: 6011: 6011: explicit 6011: back_insert_iterator(_Container& __x) 6011: : container(std::__addressof(__x)) { } 6011: # 486 "/usr/include/c++/8/bits/stl_iterator.h" 3 6011: back_insert_iterator& 6011: operator=(const typename _Container::value_type& __value) 6011: { 6011: container->push_back(__value); 6011: return *this; 6011: } 6011: 6011: back_insert_iterator& 6011: operator=(typename _Container::value_type&& __value) 6011: { 6011: container->push_back(std::move(__value)); 6011: return *this; 6011: } 6011: 6011: 6011: 6011: back_insert_iterator& 6011: operator*() 6011: { return *this; } 6011: 6011: 6011: back_insert_iterator& 6011: operator++() 6011: { return *this; } 6011: 6011: 6011: back_insert_iterator 6011: operator++(int) 6011: { return *this; } 6011: }; 6011: # 528 "/usr/include/c++/8/bits/stl_iterator.h" 3 6011: template 6011: inline back_insert_iterator<_Container> 6011: back_inserter(_Container& __x) 6011: { return back_insert_iterator<_Container>(__x); } 6011: # 543 "/usr/include/c++/8/bits/stl_iterator.h" 3 6011: template 6011: class front_insert_iterator 6011: : public iterator 6011: { 6011: protected: 6011: _Container* container; 6011: 6011: public: 6011: 6011: typedef _Container container_type; 6011: 6011: 6011: explicit front_insert_iterator(_Container& __x) 6011: : container(std::__addressof(__x)) { } 6011: # 577 "/usr/include/c++/8/bits/stl_iterator.h" 3 6011: front_insert_iterator& 6011: operator=(const typename _Container::value_type& __value) 6011: { 6011: container->push_front(__value); 6011: return *this; 6011: } 6011: 6011: front_insert_iterator& 6011: operator=(typename _Container::value_type&& __value) 6011: { 6011: container->push_front(std::move(__value)); 6011: return *this; 6011: } 6011: 6011: 6011: 6011: front_insert_iterator& 6011: operator*() 6011: { return *this; } 6011: 6011: 6011: front_insert_iterator& 6011: operator++() 6011: { return *this; } 6011: 6011: 6011: front_insert_iterator 6011: operator++(int) 6011: { return *this; } 6011: }; 6011: # 619 "/usr/include/c++/8/bits/stl_iterator.h" 3 6011: template 6011: inline front_insert_iterator<_Container> 6011: front_inserter(_Container& __x) 6011: { return front_insert_iterator<_Container>(__x); } 6011: # 638 "/usr/include/c++/8/bits/stl_iterator.h" 3 6011: template 6011: class insert_iterator 6011: : public iterator 6011: { 6011: protected: 6011: _Container* container; 6011: typename _Container::iterator iter; 6011: 6011: public: 6011: 6011: typedef _Container container_type; 6011: 6011: 6011: 6011: 6011: 6011: insert_iterator(_Container& __x, typename _Container::iterator __i) 6011: : container(std::__addressof(__x)), iter(__i) {} 6011: # 689 "/usr/include/c++/8/bits/stl_iterator.h" 3 6011: insert_iterator& 6011: operator=(const typename _Container::value_type& __value) 6011: { 6011: iter = container->insert(iter, __value); 6011: ++iter; 6011: return *this; 6011: } 6011: 6011: insert_iterator& 6011: operator=(typename _Container::value_type&& __value) 6011: { 6011: iter = container->insert(iter, std::move(__value)); 6011: ++iter; 6011: return *this; 6011: } 6011: 6011: 6011: 6011: insert_iterator& 6011: operator*() 6011: { return *this; } 6011: 6011: 6011: insert_iterator& 6011: operator++() 6011: { return *this; } 6011: 6011: 6011: insert_iterator& 6011: operator++(int) 6011: { return *this; } 6011: }; 6011: # 734 "/usr/include/c++/8/bits/stl_iterator.h" 3 6011: template 6011: inline insert_iterator<_Container> 6011: inserter(_Container& __x, _Iterator __i) 6011: { 6011: return insert_iterator<_Container>(__x, 6011: typename _Container::iterator(__i)); 6011: } 6011: 6011: 6011: 6011: 6011: } 6011: 6011: namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) 6011: { 6011: 6011: # 758 "/usr/include/c++/8/bits/stl_iterator.h" 3 6011: using std::iterator_traits; 6011: using std::iterator; 6011: template 6011: class __normal_iterator 6011: { 6011: protected: 6011: _Iterator _M_current; 6011: 6011: typedef iterator_traits<_Iterator> __traits_type; 6011: 6011: public: 6011: typedef _Iterator iterator_type; 6011: typedef typename __traits_type::iterator_category iterator_category; 6011: typedef typename __traits_type::value_type value_type; 6011: typedef typename __traits_type::difference_type difference_type; 6011: typedef typename __traits_type::reference reference; 6011: typedef typename __traits_type::pointer pointer; 6011: 6011: constexpr __normal_iterator() noexcept 6011: : _M_current(_Iterator()) { } 6011: 6011: explicit 6011: __normal_iterator(const _Iterator& __i) noexcept 6011: : _M_current(__i) { } 6011: 6011: 6011: template 6011: __normal_iterator(const __normal_iterator<_Iter, 6011: typename __enable_if< 6011: (std::__are_same<_Iter, typename _Container::pointer>::__value), 6011: _Container>::__type>& __i) noexcept 6011: : _M_current(__i.base()) { } 6011: 6011: 6011: reference 6011: operator*() const noexcept 6011: { return *_M_current; } 6011: 6011: pointer 6011: operator->() const noexcept 6011: { return _M_current; } 6011: 6011: __normal_iterator& 6011: operator++() noexcept 6011: { 6011: ++_M_current; 6011: return *this; 6011: } 6011: 6011: __normal_iterator 6011: operator++(int) noexcept 6011: { return __normal_iterator(_M_current++); } 6011: 6011: 6011: __normal_iterator& 6011: operator--() noexcept 6011: { 6011: --_M_current; 6011: return *this; 6011: } 6011: 6011: __normal_iterator 6011: operator--(int) noexcept 6011: { return __normal_iterator(_M_current--); } 6011: 6011: 6011: reference 6011: operator[](difference_type __n) const noexcept 6011: { return _M_current[__n]; } 6011: 6011: __normal_iterator& 6011: operator+=(difference_type __n) noexcept 6011: { _M_current += __n; return *this; } 6011: 6011: __normal_iterator 6011: operator+(difference_type __n) const noexcept 6011: { return __normal_iterator(_M_current + __n); } 6011: 6011: __normal_iterator& 6011: operator-=(difference_type __n) noexcept 6011: { _M_current -= __n; return *this; } 6011: 6011: __normal_iterator 6011: operator-(difference_type __n) const noexcept 6011: { return __normal_iterator(_M_current - __n); } 6011: 6011: const _Iterator& 6011: base() const noexcept 6011: { return _M_current; } 6011: }; 6011: # 858 "/usr/include/c++/8/bits/stl_iterator.h" 3 6011: template 6011: inline bool 6011: operator==(const __normal_iterator<_IteratorL, _Container>& __lhs, 6011: const __normal_iterator<_IteratorR, _Container>& __rhs) 6011: noexcept 6011: { return __lhs.base() == __rhs.base(); } 6011: 6011: template 6011: inline bool 6011: operator==(const __normal_iterator<_Iterator, _Container>& __lhs, 6011: const __normal_iterator<_Iterator, _Container>& __rhs) 6011: noexcept 6011: { return __lhs.base() == __rhs.base(); } 6011: 6011: template 6011: inline bool 6011: operator!=(const __normal_iterator<_IteratorL, _Container>& __lhs, 6011: const __normal_iterator<_IteratorR, _Container>& __rhs) 6011: noexcept 6011: { return __lhs.base() != __rhs.base(); } 6011: 6011: template 6011: inline bool 6011: operator!=(const __normal_iterator<_Iterator, _Container>& __lhs, 6011: const __normal_iterator<_Iterator, _Container>& __rhs) 6011: noexcept 6011: { return __lhs.base() != __rhs.base(); } 6011: 6011: 6011: template 6011: inline bool 6011: operator<(const __normal_iterator<_IteratorL, _Container>& __lhs, 6011: const __normal_iterator<_IteratorR, _Container>& __rhs) 6011: noexcept 6011: { return __lhs.base() < __rhs.base(); } 6011: 6011: template 6011: inline bool 6011: operator<(const __normal_iterator<_Iterator, _Container>& __lhs, 6011: const __normal_iterator<_Iterator, _Container>& __rhs) 6011: noexcept 6011: { return __lhs.base() < __rhs.base(); } 6011: 6011: template 6011: inline bool 6011: operator>(const __normal_iterator<_IteratorL, _Container>& __lhs, 6011: const __normal_iterator<_IteratorR, _Container>& __rhs) 6011: noexcept 6011: { return __lhs.base() > __rhs.base(); } 6011: 6011: template 6011: inline bool 6011: operator>(const __normal_iterator<_Iterator, _Container>& __lhs, 6011: const __normal_iterator<_Iterator, _Container>& __rhs) 6011: noexcept 6011: { return __lhs.base() > __rhs.base(); } 6011: 6011: template 6011: inline bool 6011: operator<=(const __normal_iterator<_IteratorL, _Container>& __lhs, 6011: const __normal_iterator<_IteratorR, _Container>& __rhs) 6011: noexcept 6011: { return __lhs.base() <= __rhs.base(); } 6011: 6011: template 6011: inline bool 6011: operator<=(const __normal_iterator<_Iterator, _Container>& __lhs, 6011: const __normal_iterator<_Iterator, _Container>& __rhs) 6011: noexcept 6011: { return __lhs.base() <= __rhs.base(); } 6011: 6011: template 6011: inline bool 6011: operator>=(const __normal_iterator<_IteratorL, _Container>& __lhs, 6011: const __normal_iterator<_IteratorR, _Container>& __rhs) 6011: noexcept 6011: { return __lhs.base() >= __rhs.base(); } 6011: 6011: template 6011: inline bool 6011: operator>=(const __normal_iterator<_Iterator, _Container>& __lhs, 6011: const __normal_iterator<_Iterator, _Container>& __rhs) 6011: noexcept 6011: { return __lhs.base() >= __rhs.base(); } 6011: 6011: 6011: 6011: 6011: 6011: template 6011: 6011: 6011: inline auto 6011: operator-(const __normal_iterator<_IteratorL, _Container>& __lhs, 6011: const __normal_iterator<_IteratorR, _Container>& __rhs) noexcept 6011: -> decltype(__lhs.base() - __rhs.base()) 6011: 6011: 6011: 6011: 6011: 6011: { return __lhs.base() - __rhs.base(); } 6011: 6011: template 6011: inline typename __normal_iterator<_Iterator, _Container>::difference_type 6011: operator-(const __normal_iterator<_Iterator, _Container>& __lhs, 6011: const __normal_iterator<_Iterator, _Container>& __rhs) 6011: noexcept 6011: { return __lhs.base() - __rhs.base(); } 6011: 6011: template 6011: inline __normal_iterator<_Iterator, _Container> 6011: operator+(typename __normal_iterator<_Iterator, _Container>::difference_type 6011: __n, const __normal_iterator<_Iterator, _Container>& __i) 6011: noexcept 6011: { return __normal_iterator<_Iterator, _Container>(__i.base() + __n); } 6011: 6011: 6011: } 6011: 6011: namespace std __attribute__ ((__visibility__ ("default"))) 6011: { 6011: 6011: 6011: template 6011: _Iterator 6011: __niter_base(__gnu_cxx::__normal_iterator<_Iterator, _Container> __it) 6011: { return __it.base(); } 6011: # 1003 "/usr/include/c++/8/bits/stl_iterator.h" 3 6011: template 6011: class move_iterator 6011: { 6011: protected: 6011: _Iterator _M_current; 6011: 6011: typedef iterator_traits<_Iterator> __traits_type; 6011: typedef typename __traits_type::reference __base_ref; 6011: 6011: public: 6011: typedef _Iterator iterator_type; 6011: typedef typename __traits_type::iterator_category iterator_category; 6011: typedef typename __traits_type::value_type value_type; 6011: typedef typename __traits_type::difference_type difference_type; 6011: 6011: typedef _Iterator pointer; 6011: 6011: 6011: typedef typename conditional::value, 6011: typename remove_reference<__base_ref>::type&&, 6011: __base_ref>::type reference; 6011: 6011: 6011: move_iterator() 6011: : _M_current() { } 6011: 6011: explicit 6011: move_iterator(iterator_type __i) 6011: : _M_current(__i) { } 6011: 6011: template 6011: 6011: move_iterator(const move_iterator<_Iter>& __i) 6011: : _M_current(__i.base()) { } 6011: 6011: iterator_type 6011: base() const 6011: { return _M_current; } 6011: 6011: reference 6011: operator*() const 6011: { return static_cast(*_M_current); } 6011: 6011: pointer 6011: operator->() const 6011: { return _M_current; } 6011: 6011: move_iterator& 6011: operator++() 6011: { 6011: ++_M_current; 6011: return *this; 6011: } 6011: 6011: move_iterator 6011: operator++(int) 6011: { 6011: move_iterator __tmp = *this; 6011: ++_M_current; 6011: return __tmp; 6011: } 6011: 6011: move_iterator& 6011: operator--() 6011: { 6011: --_M_current; 6011: return *this; 6011: } 6011: 6011: move_iterator 6011: operator--(int) 6011: { 6011: move_iterator __tmp = *this; 6011: --_M_current; 6011: return __tmp; 6011: } 6011: 6011: move_iterator 6011: operator+(difference_type __n) const 6011: { return move_iterator(_M_current + __n); } 6011: 6011: move_iterator& 6011: operator+=(difference_type __n) 6011: { 6011: _M_current += __n; 6011: return *this; 6011: } 6011: 6011: move_iterator 6011: operator-(difference_type __n) const 6011: { return move_iterator(_M_current - __n); } 6011: 6011: move_iterator& 6011: operator-=(difference_type __n) 6011: { 6011: _M_current -= __n; 6011: return *this; 6011: } 6011: 6011: reference 6011: operator[](difference_type __n) const 6011: { return std::move(_M_current[__n]); } 6011: }; 6011: 6011: 6011: 6011: 6011: template 6011: inline bool 6011: operator==(const move_iterator<_IteratorL>& __x, 6011: const move_iterator<_IteratorR>& __y) 6011: { return __x.base() == __y.base(); } 6011: 6011: template 6011: inline bool 6011: operator==(const move_iterator<_Iterator>& __x, 6011: const move_iterator<_Iterator>& __y) 6011: { return __x.base() == __y.base(); } 6011: 6011: template 6011: inline bool 6011: operator!=(const move_iterator<_IteratorL>& __x, 6011: const move_iterator<_IteratorR>& __y) 6011: { return !(__x == __y); } 6011: 6011: template 6011: inline bool 6011: operator!=(const move_iterator<_Iterator>& __x, 6011: const move_iterator<_Iterator>& __y) 6011: { return !(__x == __y); } 6011: 6011: template 6011: inline bool 6011: operator<(const move_iterator<_IteratorL>& __x, 6011: const move_iterator<_IteratorR>& __y) 6011: { return __x.base() < __y.base(); } 6011: 6011: template 6011: inline bool 6011: operator<(const move_iterator<_Iterator>& __x, 6011: const move_iterator<_Iterator>& __y) 6011: { return __x.base() < __y.base(); } 6011: 6011: template 6011: inline bool 6011: operator<=(const move_iterator<_IteratorL>& __x, 6011: const move_iterator<_IteratorR>& __y) 6011: { return !(__y < __x); } 6011: 6011: template 6011: inline bool 6011: operator<=(const move_iterator<_Iterator>& __x, 6011: const move_iterator<_Iterator>& __y) 6011: { return !(__y < __x); } 6011: 6011: template 6011: inline bool 6011: operator>(const move_iterator<_IteratorL>& __x, 6011: const move_iterator<_IteratorR>& __y) 6011: { return __y < __x; } 6011: 6011: template 6011: inline bool 6011: operator>(const move_iterator<_Iterator>& __x, 6011: const move_iterator<_Iterator>& __y) 6011: { return __y < __x; } 6011: 6011: template 6011: inline bool 6011: operator>=(const move_iterator<_IteratorL>& __x, 6011: const move_iterator<_IteratorR>& __y) 6011: { return !(__x < __y); } 6011: 6011: template 6011: inline bool 6011: operator>=(const move_iterator<_Iterator>& __x, 6011: const move_iterator<_Iterator>& __y) 6011: { return !(__x < __y); } 6011: 6011: 6011: template 6011: inline auto 6011: operator-(const move_iterator<_IteratorL>& __x, 6011: const move_iterator<_IteratorR>& __y) 6011: -> decltype(__x.base() - __y.base()) 6011: { return __x.base() - __y.base(); } 6011: 6011: template 6011: inline move_iterator<_Iterator> 6011: operator+(typename move_iterator<_Iterator>::difference_type __n, 6011: const move_iterator<_Iterator>& __x) 6011: { return __x + __n; } 6011: 6011: template 6011: inline move_iterator<_Iterator> 6011: make_move_iterator(_Iterator __i) 6011: { return move_iterator<_Iterator>(__i); } 6011: 6011: template::value_type>::value, 6011: _Iterator, move_iterator<_Iterator>>::type> 6011: inline _ReturnType 6011: __make_move_if_noexcept_iterator(_Iterator __i) 6011: { return _ReturnType(__i); } 6011: 6011: 6011: 6011: template::value, 6011: const _Tp*, move_iterator<_Tp*>>::type> 6011: inline _ReturnType 6011: __make_move_if_noexcept_iterator(_Tp* __i) 6011: { return _ReturnType(__i); } 6011: 6011: 6011: 6011: template 6011: auto 6011: __niter_base(move_iterator<_Iterator> __it) 6011: -> decltype(make_move_iterator(__niter_base(__it.base()))) 6011: { return make_move_iterator(__niter_base(__it.base())); } 6011: 6011: template 6011: struct __is_move_iterator > 6011: { 6011: enum { __value = 1 }; 6011: typedef __true_type __type; 6011: }; 6011: 6011: template 6011: auto 6011: __miter_base(move_iterator<_Iterator> __it) 6011: -> decltype(__miter_base(__it.base())) 6011: { return __miter_base(__it.base()); } 6011: # 1268 "/usr/include/c++/8/bits/stl_iterator.h" 3 6011: 6011: } 6011: # 68 "/usr/include/c++/8/bits/stl_algobase.h" 2 3 6011: 6011: # 1 "/usr/include/c++/8/debug/debug.h" 1 3 6011: # 48 "/usr/include/c++/8/debug/debug.h" 3 6011: namespace std 6011: { 6011: namespace __debug { } 6011: } 6011: 6011: 6011: 6011: 6011: namespace __gnu_debug 6011: { 6011: using namespace std::__debug; 6011: } 6011: # 70 "/usr/include/c++/8/bits/stl_algobase.h" 2 3 6011: 6011: # 1 "/usr/include/c++/8/bits/predefined_ops.h" 1 3 6011: # 33 "/usr/include/c++/8/bits/predefined_ops.h" 3 6011: namespace __gnu_cxx 6011: { 6011: namespace __ops 6011: { 6011: struct _Iter_less_iter 6011: { 6011: template 6011: 6011: bool 6011: operator()(_Iterator1 __it1, _Iterator2 __it2) const 6011: { return *__it1 < *__it2; } 6011: }; 6011: 6011: 6011: inline _Iter_less_iter 6011: __iter_less_iter() 6011: { return _Iter_less_iter(); } 6011: 6011: struct _Iter_less_val 6011: { 6011: 6011: constexpr _Iter_less_val() = default; 6011: 6011: 6011: 6011: 6011: explicit 6011: _Iter_less_val(_Iter_less_iter) { } 6011: 6011: template 6011: bool 6011: operator()(_Iterator __it, _Value& __val) const 6011: { return *__it < __val; } 6011: }; 6011: 6011: inline _Iter_less_val 6011: __iter_less_val() 6011: { return _Iter_less_val(); } 6011: 6011: inline _Iter_less_val 6011: __iter_comp_val(_Iter_less_iter) 6011: { return _Iter_less_val(); } 6011: 6011: struct _Val_less_iter 6011: { 6011: 6011: constexpr _Val_less_iter() = default; 6011: 6011: 6011: 6011: 6011: explicit 6011: _Val_less_iter(_Iter_less_iter) { } 6011: 6011: template 6011: bool 6011: operator()(_Value& __val, _Iterator __it) const 6011: { return __val < *__it; } 6011: }; 6011: 6011: inline _Val_less_iter 6011: __val_less_iter() 6011: { return _Val_less_iter(); } 6011: 6011: inline _Val_less_iter 6011: __val_comp_iter(_Iter_less_iter) 6011: { return _Val_less_iter(); } 6011: 6011: struct _Iter_equal_to_iter 6011: { 6011: template 6011: bool 6011: operator()(_Iterator1 __it1, _Iterator2 __it2) const 6011: { return *__it1 == *__it2; } 6011: }; 6011: 6011: inline _Iter_equal_to_iter 6011: __iter_equal_to_iter() 6011: { return _Iter_equal_to_iter(); } 6011: 6011: struct _Iter_equal_to_val 6011: { 6011: template 6011: bool 6011: operator()(_Iterator __it, _Value& __val) const 6011: { return *__it == __val; } 6011: }; 6011: 6011: inline _Iter_equal_to_val 6011: __iter_equal_to_val() 6011: { return _Iter_equal_to_val(); } 6011: 6011: inline _Iter_equal_to_val 6011: __iter_comp_val(_Iter_equal_to_iter) 6011: { return _Iter_equal_to_val(); } 6011: 6011: template 6011: struct _Iter_comp_iter 6011: { 6011: _Compare _M_comp; 6011: 6011: explicit 6011: _Iter_comp_iter(_Compare __comp) 6011: : _M_comp(std::move(__comp)) 6011: { } 6011: 6011: template 6011: 6011: bool 6011: operator()(_Iterator1 __it1, _Iterator2 __it2) 6011: { return bool(_M_comp(*__it1, *__it2)); } 6011: }; 6011: 6011: template 6011: 6011: inline _Iter_comp_iter<_Compare> 6011: __iter_comp_iter(_Compare __comp) 6011: { return _Iter_comp_iter<_Compare>(std::move(__comp)); } 6011: 6011: template 6011: struct _Iter_comp_val 6011: { 6011: _Compare _M_comp; 6011: 6011: explicit 6011: _Iter_comp_val(_Compare __comp) 6011: : _M_comp(std::move(__comp)) 6011: { } 6011: 6011: explicit 6011: _Iter_comp_val(const _Iter_comp_iter<_Compare>& __comp) 6011: : _M_comp(__comp._M_comp) 6011: { } 6011: 6011: 6011: explicit 6011: _Iter_comp_val(_Iter_comp_iter<_Compare>&& __comp) 6011: : _M_comp(std::move(__comp._M_comp)) 6011: { } 6011: 6011: 6011: template 6011: bool 6011: operator()(_Iterator __it, _Value& __val) 6011: { return bool(_M_comp(*__it, __val)); } 6011: }; 6011: 6011: template 6011: inline _Iter_comp_val<_Compare> 6011: __iter_comp_val(_Compare __comp) 6011: { return _Iter_comp_val<_Compare>(std::move(__comp)); } 6011: 6011: template 6011: inline _Iter_comp_val<_Compare> 6011: __iter_comp_val(_Iter_comp_iter<_Compare> __comp) 6011: { return _Iter_comp_val<_Compare>(std::move(__comp)); } 6011: 6011: template 6011: struct _Val_comp_iter 6011: { 6011: _Compare _M_comp; 6011: 6011: explicit 6011: _Val_comp_iter(_Compare __comp) 6011: : _M_comp(std::move(__comp)) 6011: { } 6011: 6011: explicit 6011: _Val_comp_iter(const _Iter_comp_iter<_Compare>& __comp) 6011: : _M_comp(__comp._M_comp) 6011: { } 6011: 6011: 6011: explicit 6011: _Val_comp_iter(_Iter_comp_iter<_Compare>&& __comp) 6011: : _M_comp(std::move(__comp._M_comp)) 6011: { } 6011: 6011: 6011: template 6011: bool 6011: operator()(_Value& __val, _Iterator __it) 6011: { return bool(_M_comp(__val, *__it)); } 6011: }; 6011: 6011: template 6011: inline _Val_comp_iter<_Compare> 6011: __val_comp_iter(_Compare __comp) 6011: { return _Val_comp_iter<_Compare>(std::move(__comp)); } 6011: 6011: template 6011: inline _Val_comp_iter<_Compare> 6011: __val_comp_iter(_Iter_comp_iter<_Compare> __comp) 6011: { return _Val_comp_iter<_Compare>(std::move(__comp)); } 6011: 6011: template 6011: struct _Iter_equals_val 6011: { 6011: _Value& _M_value; 6011: 6011: explicit 6011: _Iter_equals_val(_Value& __value) 6011: : _M_value(__value) 6011: { } 6011: 6011: template 6011: bool 6011: operator()(_Iterator __it) 6011: { return *__it == _M_value; } 6011: }; 6011: 6011: template 6011: inline _Iter_equals_val<_Value> 6011: __iter_equals_val(_Value& __val) 6011: { return _Iter_equals_val<_Value>(__val); } 6011: 6011: template 6011: struct _Iter_equals_iter 6011: { 6011: _Iterator1 _M_it1; 6011: 6011: explicit 6011: _Iter_equals_iter(_Iterator1 __it1) 6011: : _M_it1(__it1) 6011: { } 6011: 6011: template 6011: bool 6011: operator()(_Iterator2 __it2) 6011: { return *__it2 == *_M_it1; } 6011: }; 6011: 6011: template 6011: inline _Iter_equals_iter<_Iterator> 6011: __iter_comp_iter(_Iter_equal_to_iter, _Iterator __it) 6011: { return _Iter_equals_iter<_Iterator>(__it); } 6011: 6011: template 6011: struct _Iter_pred 6011: { 6011: _Predicate _M_pred; 6011: 6011: explicit 6011: _Iter_pred(_Predicate __pred) 6011: : _M_pred(std::move(__pred)) 6011: { } 6011: 6011: template 6011: bool 6011: operator()(_Iterator __it) 6011: { return bool(_M_pred(*__it)); } 6011: }; 6011: 6011: template 6011: inline _Iter_pred<_Predicate> 6011: __pred_iter(_Predicate __pred) 6011: { return _Iter_pred<_Predicate>(std::move(__pred)); } 6011: 6011: template 6011: struct _Iter_comp_to_val 6011: { 6011: _Compare _M_comp; 6011: _Value& _M_value; 6011: 6011: _Iter_comp_to_val(_Compare __comp, _Value& __value) 6011: : _M_comp(std::move(__comp)), _M_value(__value) 6011: { } 6011: 6011: template 6011: bool 6011: operator()(_Iterator __it) 6011: { return bool(_M_comp(*__it, _M_value)); } 6011: }; 6011: 6011: template 6011: _Iter_comp_to_val<_Compare, _Value> 6011: __iter_comp_val(_Compare __comp, _Value &__val) 6011: { 6011: return _Iter_comp_to_val<_Compare, _Value>(std::move(__comp), __val); 6011: } 6011: 6011: template 6011: struct _Iter_comp_to_iter 6011: { 6011: _Compare _M_comp; 6011: _Iterator1 _M_it1; 6011: 6011: _Iter_comp_to_iter(_Compare __comp, _Iterator1 __it1) 6011: : _M_comp(std::move(__comp)), _M_it1(__it1) 6011: { } 6011: 6011: template 6011: bool 6011: operator()(_Iterator2 __it2) 6011: { return bool(_M_comp(*__it2, *_M_it1)); } 6011: }; 6011: 6011: template 6011: inline _Iter_comp_to_iter<_Compare, _Iterator> 6011: __iter_comp_iter(_Iter_comp_iter<_Compare> __comp, _Iterator __it) 6011: { 6011: return _Iter_comp_to_iter<_Compare, _Iterator>( 6011: std::move(__comp._M_comp), __it); 6011: } 6011: 6011: template 6011: struct _Iter_negate 6011: { 6011: _Predicate _M_pred; 6011: 6011: explicit 6011: _Iter_negate(_Predicate __pred) 6011: : _M_pred(std::move(__pred)) 6011: { } 6011: 6011: template 6011: bool 6011: operator()(_Iterator __it) 6011: { return !bool(_M_pred(*__it)); } 6011: }; 6011: 6011: template 6011: inline _Iter_negate<_Predicate> 6011: __negate(_Iter_pred<_Predicate> __pred) 6011: { return _Iter_negate<_Predicate>(std::move(__pred._M_pred)); } 6011: 6011: } 6011: } 6011: # 72 "/usr/include/c++/8/bits/stl_algobase.h" 2 3 6011: 6011: namespace std __attribute__ ((__visibility__ ("default"))) 6011: { 6011: 6011: # 118 "/usr/include/c++/8/bits/stl_algobase.h" 3 6011: template 6011: inline void 6011: iter_swap(_ForwardIterator1 __a, _ForwardIterator2 __b) 6011: { 6011: 6011: 6011: 6011: 6011: # 148 "/usr/include/c++/8/bits/stl_algobase.h" 3 6011: swap(*__a, *__b); 6011: 6011: } 6011: # 164 "/usr/include/c++/8/bits/stl_algobase.h" 3 6011: template 6011: _ForwardIterator2 6011: swap_ranges(_ForwardIterator1 __first1, _ForwardIterator1 __last1, 6011: _ForwardIterator2 __first2) 6011: { 6011: 6011: 6011: 6011: 6011: 6011: ; 6011: 6011: for (; __first1 != __last1; ++__first1, (void)++__first2) 6011: std::iter_swap(__first1, __first2); 6011: return __first2; 6011: } 6011: # 192 "/usr/include/c++/8/bits/stl_algobase.h" 3 6011: template 6011: 6011: inline const _Tp& 6011: min(const _Tp& __a, const _Tp& __b) 6011: { 6011: 6011: 6011: 6011: if (__b < __a) 6011: return __b; 6011: return __a; 6011: } 6011: # 216 "/usr/include/c++/8/bits/stl_algobase.h" 3 6011: template 6011: 6011: inline const _Tp& 6011: max(const _Tp& __a, const _Tp& __b) 6011: { 6011: 6011: 6011: 6011: if (__a < __b) 6011: return __b; 6011: return __a; 6011: } 6011: # 240 "/usr/include/c++/8/bits/stl_algobase.h" 3 6011: template 6011: 6011: inline const _Tp& 6011: min(const _Tp& __a, const _Tp& __b, _Compare __comp) 6011: { 6011: 6011: if (__comp(__b, __a)) 6011: return __b; 6011: return __a; 6011: } 6011: # 262 "/usr/include/c++/8/bits/stl_algobase.h" 3 6011: template 6011: 6011: inline const _Tp& 6011: max(const _Tp& __a, const _Tp& __b, _Compare __comp) 6011: { 6011: 6011: if (__comp(__a, __b)) 6011: return __b; 6011: return __a; 6011: } 6011: 6011: 6011: 6011: template 6011: inline _Iterator 6011: __niter_base(_Iterator __it) 6011: { return __it; } 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: template 6011: struct __copy_move 6011: { 6011: template 6011: static _OI 6011: __copy_m(_II __first, _II __last, _OI __result) 6011: { 6011: for (; __first != __last; ++__result, (void)++__first) 6011: *__result = *__first; 6011: return __result; 6011: } 6011: }; 6011: 6011: 6011: template 6011: struct __copy_move 6011: { 6011: template 6011: static _OI 6011: __copy_m(_II __first, _II __last, _OI __result) 6011: { 6011: for (; __first != __last; ++__result, (void)++__first) 6011: *__result = std::move(*__first); 6011: return __result; 6011: } 6011: }; 6011: 6011: 6011: template<> 6011: struct __copy_move 6011: { 6011: template 6011: static _OI 6011: __copy_m(_II __first, _II __last, _OI __result) 6011: { 6011: typedef typename iterator_traits<_II>::difference_type _Distance; 6011: for(_Distance __n = __last - __first; __n > 0; --__n) 6011: { 6011: *__result = *__first; 6011: ++__first; 6011: ++__result; 6011: } 6011: return __result; 6011: } 6011: }; 6011: 6011: 6011: template<> 6011: struct __copy_move 6011: { 6011: template 6011: static _OI 6011: __copy_m(_II __first, _II __last, _OI __result) 6011: { 6011: typedef typename iterator_traits<_II>::difference_type _Distance; 6011: for(_Distance __n = __last - __first; __n > 0; --__n) 6011: { 6011: *__result = std::move(*__first); 6011: ++__first; 6011: ++__result; 6011: } 6011: return __result; 6011: } 6011: }; 6011: 6011: 6011: template 6011: struct __copy_move<_IsMove, true, random_access_iterator_tag> 6011: { 6011: template 6011: static _Tp* 6011: __copy_m(const _Tp* __first, const _Tp* __last, _Tp* __result) 6011: { 6011: 6011: using __assignable = conditional<_IsMove, 6011: is_move_assignable<_Tp>, 6011: is_copy_assignable<_Tp>>; 6011: 6011: static_assert( __assignable::type::value, "type is not assignable" ); 6011: 6011: const ptrdiff_t _Num = __last - __first; 6011: if (_Num) 6011: __builtin_memmove(__result, __first, sizeof(_Tp) * _Num); 6011: return __result + _Num; 6011: } 6011: }; 6011: 6011: template 6011: inline _OI 6011: __copy_move_a(_II __first, _II __last, _OI __result) 6011: { 6011: typedef typename iterator_traits<_II>::value_type _ValueTypeI; 6011: typedef typename iterator_traits<_OI>::value_type _ValueTypeO; 6011: typedef typename iterator_traits<_II>::iterator_category _Category; 6011: const bool __simple = (__is_trivial(_ValueTypeI) 6011: && __is_pointer<_II>::__value 6011: && __is_pointer<_OI>::__value 6011: && __are_same<_ValueTypeI, _ValueTypeO>::__value); 6011: 6011: return std::__copy_move<_IsMove, __simple, 6011: _Category>::__copy_m(__first, __last, __result); 6011: } 6011: 6011: 6011: 6011: template 6011: struct char_traits; 6011: 6011: template 6011: class istreambuf_iterator; 6011: 6011: template 6011: class ostreambuf_iterator; 6011: 6011: template 6011: typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value, 6011: ostreambuf_iterator<_CharT, char_traits<_CharT> > >::__type 6011: __copy_move_a2(_CharT*, _CharT*, 6011: ostreambuf_iterator<_CharT, char_traits<_CharT> >); 6011: 6011: template 6011: typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value, 6011: ostreambuf_iterator<_CharT, char_traits<_CharT> > >::__type 6011: __copy_move_a2(const _CharT*, const _CharT*, 6011: ostreambuf_iterator<_CharT, char_traits<_CharT> >); 6011: 6011: template 6011: typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value, 6011: _CharT*>::__type 6011: __copy_move_a2(istreambuf_iterator<_CharT, char_traits<_CharT> >, 6011: istreambuf_iterator<_CharT, char_traits<_CharT> >, _CharT*); 6011: 6011: template 6011: inline _OI 6011: __copy_move_a2(_II __first, _II __last, _OI __result) 6011: { 6011: return _OI(std::__copy_move_a<_IsMove>(std::__niter_base(__first), 6011: std::__niter_base(__last), 6011: std::__niter_base(__result))); 6011: } 6011: # 444 "/usr/include/c++/8/bits/stl_algobase.h" 3 6011: template 6011: inline _OI 6011: copy(_II __first, _II __last, _OI __result) 6011: { 6011: 6011: 6011: 6011: 6011: ; 6011: 6011: return (std::__copy_move_a2<__is_move_iterator<_II>::__value> 6011: (std::__miter_base(__first), std::__miter_base(__last), 6011: __result)); 6011: } 6011: # 477 "/usr/include/c++/8/bits/stl_algobase.h" 3 6011: template 6011: inline _OI 6011: move(_II __first, _II __last, _OI __result) 6011: { 6011: 6011: 6011: 6011: 6011: ; 6011: 6011: return std::__copy_move_a2(std::__miter_base(__first), 6011: std::__miter_base(__last), __result); 6011: } 6011: 6011: 6011: 6011: 6011: 6011: 6011: template 6011: struct __copy_move_backward 6011: { 6011: template 6011: static _BI2 6011: __copy_move_b(_BI1 __first, _BI1 __last, _BI2 __result) 6011: { 6011: while (__first != __last) 6011: *--__result = *--__last; 6011: return __result; 6011: } 6011: }; 6011: 6011: 6011: template 6011: struct __copy_move_backward 6011: { 6011: template 6011: static _BI2 6011: __copy_move_b(_BI1 __first, _BI1 __last, _BI2 __result) 6011: { 6011: while (__first != __last) 6011: *--__result = std::move(*--__last); 6011: return __result; 6011: } 6011: }; 6011: 6011: 6011: template<> 6011: struct __copy_move_backward 6011: { 6011: template 6011: static _BI2 6011: __copy_move_b(_BI1 __first, _BI1 __last, _BI2 __result) 6011: { 6011: typename iterator_traits<_BI1>::difference_type __n; 6011: for (__n = __last - __first; __n > 0; --__n) 6011: *--__result = *--__last; 6011: return __result; 6011: } 6011: }; 6011: 6011: 6011: template<> 6011: struct __copy_move_backward 6011: { 6011: template 6011: static _BI2 6011: __copy_move_b(_BI1 __first, _BI1 __last, _BI2 __result) 6011: { 6011: typename iterator_traits<_BI1>::difference_type __n; 6011: for (__n = __last - __first; __n > 0; --__n) 6011: *--__result = std::move(*--__last); 6011: return __result; 6011: } 6011: }; 6011: 6011: 6011: template 6011: struct __copy_move_backward<_IsMove, true, random_access_iterator_tag> 6011: { 6011: template 6011: static _Tp* 6011: __copy_move_b(const _Tp* __first, const _Tp* __last, _Tp* __result) 6011: { 6011: 6011: using __assignable = conditional<_IsMove, 6011: is_move_assignable<_Tp>, 6011: is_copy_assignable<_Tp>>; 6011: 6011: static_assert( __assignable::type::value, "type is not assignable" ); 6011: 6011: const ptrdiff_t _Num = __last - __first; 6011: if (_Num) 6011: __builtin_memmove(__result - _Num, __first, sizeof(_Tp) * _Num); 6011: return __result - _Num; 6011: } 6011: }; 6011: 6011: template 6011: inline _BI2 6011: __copy_move_backward_a(_BI1 __first, _BI1 __last, _BI2 __result) 6011: { 6011: typedef typename iterator_traits<_BI1>::value_type _ValueType1; 6011: typedef typename iterator_traits<_BI2>::value_type _ValueType2; 6011: typedef typename iterator_traits<_BI1>::iterator_category _Category; 6011: const bool __simple = (__is_trivial(_ValueType1) 6011: && __is_pointer<_BI1>::__value 6011: && __is_pointer<_BI2>::__value 6011: && __are_same<_ValueType1, _ValueType2>::__value); 6011: 6011: return std::__copy_move_backward<_IsMove, __simple, 6011: _Category>::__copy_move_b(__first, 6011: __last, 6011: __result); 6011: } 6011: 6011: template 6011: inline _BI2 6011: __copy_move_backward_a2(_BI1 __first, _BI1 __last, _BI2 __result) 6011: { 6011: return _BI2(std::__copy_move_backward_a<_IsMove> 6011: (std::__niter_base(__first), std::__niter_base(__last), 6011: std::__niter_base(__result))); 6011: } 6011: # 620 "/usr/include/c++/8/bits/stl_algobase.h" 3 6011: template 6011: inline _BI2 6011: copy_backward(_BI1 __first, _BI1 __last, _BI2 __result) 6011: { 6011: 6011: 6011: 6011: 6011: 6011: 6011: ; 6011: 6011: return (std::__copy_move_backward_a2<__is_move_iterator<_BI1>::__value> 6011: (std::__miter_base(__first), std::__miter_base(__last), 6011: __result)); 6011: } 6011: # 656 "/usr/include/c++/8/bits/stl_algobase.h" 3 6011: template 6011: inline _BI2 6011: move_backward(_BI1 __first, _BI1 __last, _BI2 __result) 6011: { 6011: 6011: 6011: 6011: 6011: 6011: 6011: ; 6011: 6011: return std::__copy_move_backward_a2(std::__miter_base(__first), 6011: std::__miter_base(__last), 6011: __result); 6011: } 6011: 6011: 6011: 6011: 6011: 6011: 6011: template 6011: inline typename 6011: __gnu_cxx::__enable_if::__value, void>::__type 6011: __fill_a(_ForwardIterator __first, _ForwardIterator __last, 6011: const _Tp& __value) 6011: { 6011: for (; __first != __last; ++__first) 6011: *__first = __value; 6011: } 6011: 6011: template 6011: inline typename 6011: __gnu_cxx::__enable_if<__is_scalar<_Tp>::__value, void>::__type 6011: __fill_a(_ForwardIterator __first, _ForwardIterator __last, 6011: const _Tp& __value) 6011: { 6011: const _Tp __tmp = __value; 6011: for (; __first != __last; ++__first) 6011: *__first = __tmp; 6011: } 6011: 6011: 6011: template 6011: inline typename 6011: __gnu_cxx::__enable_if<__is_byte<_Tp>::__value, void>::__type 6011: __fill_a(_Tp* __first, _Tp* __last, const _Tp& __c) 6011: { 6011: const _Tp __tmp = __c; 6011: if (const size_t __len = __last - __first) 6011: __builtin_memset(__first, static_cast(__tmp), __len); 6011: } 6011: # 722 "/usr/include/c++/8/bits/stl_algobase.h" 3 6011: template 6011: inline void 6011: fill(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value) 6011: { 6011: 6011: 6011: 6011: ; 6011: 6011: std::__fill_a(std::__niter_base(__first), std::__niter_base(__last), 6011: __value); 6011: } 6011: 6011: template 6011: inline typename 6011: __gnu_cxx::__enable_if::__value, _OutputIterator>::__type 6011: __fill_n_a(_OutputIterator __first, _Size __n, const _Tp& __value) 6011: { 6011: for (__decltype(__n + 0) __niter = __n; 6011: __niter > 0; --__niter, (void) ++__first) 6011: *__first = __value; 6011: return __first; 6011: } 6011: 6011: template 6011: inline typename 6011: __gnu_cxx::__enable_if<__is_scalar<_Tp>::__value, _OutputIterator>::__type 6011: __fill_n_a(_OutputIterator __first, _Size __n, const _Tp& __value) 6011: { 6011: const _Tp __tmp = __value; 6011: for (__decltype(__n + 0) __niter = __n; 6011: __niter > 0; --__niter, (void) ++__first) 6011: *__first = __tmp; 6011: return __first; 6011: } 6011: 6011: template 6011: inline typename 6011: __gnu_cxx::__enable_if<__is_byte<_Tp>::__value, _Tp*>::__type 6011: __fill_n_a(_Tp* __first, _Size __n, const _Tp& __c) 6011: { 6011: std::__fill_a(__first, __first + __n, __c); 6011: return __first + __n; 6011: } 6011: # 782 "/usr/include/c++/8/bits/stl_algobase.h" 3 6011: template 6011: inline _OI 6011: fill_n(_OI __first, _Size __n, const _Tp& __value) 6011: { 6011: 6011: 6011: 6011: return _OI(std::__fill_n_a(std::__niter_base(__first), __n, __value)); 6011: } 6011: 6011: template 6011: struct __equal 6011: { 6011: template 6011: static bool 6011: equal(_II1 __first1, _II1 __last1, _II2 __first2) 6011: { 6011: for (; __first1 != __last1; ++__first1, (void) ++__first2) 6011: if (!(*__first1 == *__first2)) 6011: return false; 6011: return true; 6011: } 6011: }; 6011: 6011: template<> 6011: struct __equal 6011: { 6011: template 6011: static bool 6011: equal(const _Tp* __first1, const _Tp* __last1, const _Tp* __first2) 6011: { 6011: if (const size_t __len = (__last1 - __first1)) 6011: return !__builtin_memcmp(__first1, __first2, sizeof(_Tp) * __len); 6011: return true; 6011: } 6011: }; 6011: 6011: template 6011: inline bool 6011: __equal_aux(_II1 __first1, _II1 __last1, _II2 __first2) 6011: { 6011: typedef typename iterator_traits<_II1>::value_type _ValueType1; 6011: typedef typename iterator_traits<_II2>::value_type _ValueType2; 6011: const bool __simple = ((__is_integer<_ValueType1>::__value 6011: || __is_pointer<_ValueType1>::__value) 6011: && __is_pointer<_II1>::__value 6011: && __is_pointer<_II2>::__value 6011: && __are_same<_ValueType1, _ValueType2>::__value); 6011: 6011: return std::__equal<__simple>::equal(__first1, __last1, __first2); 6011: } 6011: 6011: template 6011: struct __lc_rai 6011: { 6011: template 6011: static _II1 6011: __newlast1(_II1, _II1 __last1, _II2, _II2) 6011: { return __last1; } 6011: 6011: template 6011: static bool 6011: __cnd2(_II __first, _II __last) 6011: { return __first != __last; } 6011: }; 6011: 6011: template<> 6011: struct __lc_rai 6011: { 6011: template 6011: static _RAI1 6011: __newlast1(_RAI1 __first1, _RAI1 __last1, 6011: _RAI2 __first2, _RAI2 __last2) 6011: { 6011: const typename iterator_traits<_RAI1>::difference_type 6011: __diff1 = __last1 - __first1; 6011: const typename iterator_traits<_RAI2>::difference_type 6011: __diff2 = __last2 - __first2; 6011: return __diff2 < __diff1 ? __first1 + __diff2 : __last1; 6011: } 6011: 6011: template 6011: static bool 6011: __cnd2(_RAI, _RAI) 6011: { return true; } 6011: }; 6011: 6011: template 6011: bool 6011: __lexicographical_compare_impl(_II1 __first1, _II1 __last1, 6011: _II2 __first2, _II2 __last2, 6011: _Compare __comp) 6011: { 6011: typedef typename iterator_traits<_II1>::iterator_category _Category1; 6011: typedef typename iterator_traits<_II2>::iterator_category _Category2; 6011: typedef std::__lc_rai<_Category1, _Category2> __rai_type; 6011: 6011: __last1 = __rai_type::__newlast1(__first1, __last1, __first2, __last2); 6011: for (; __first1 != __last1 && __rai_type::__cnd2(__first2, __last2); 6011: ++__first1, (void)++__first2) 6011: { 6011: if (__comp(__first1, __first2)) 6011: return true; 6011: if (__comp(__first2, __first1)) 6011: return false; 6011: } 6011: return __first1 == __last1 && __first2 != __last2; 6011: } 6011: 6011: template 6011: struct __lexicographical_compare 6011: { 6011: template 6011: static bool __lc(_II1, _II1, _II2, _II2); 6011: }; 6011: 6011: template 6011: template 6011: bool 6011: __lexicographical_compare<_BoolType>:: 6011: __lc(_II1 __first1, _II1 __last1, _II2 __first2, _II2 __last2) 6011: { 6011: return std::__lexicographical_compare_impl(__first1, __last1, 6011: __first2, __last2, 6011: __gnu_cxx::__ops::__iter_less_iter()); 6011: } 6011: 6011: template<> 6011: struct __lexicographical_compare 6011: { 6011: template 6011: static bool 6011: __lc(const _Tp* __first1, const _Tp* __last1, 6011: const _Up* __first2, const _Up* __last2) 6011: { 6011: const size_t __len1 = __last1 - __first1; 6011: const size_t __len2 = __last2 - __first2; 6011: if (const size_t __len = std::min(__len1, __len2)) 6011: if (int __result = __builtin_memcmp(__first1, __first2, __len)) 6011: return __result < 0; 6011: return __len1 < __len2; 6011: } 6011: }; 6011: 6011: template 6011: inline bool 6011: __lexicographical_compare_aux(_II1 __first1, _II1 __last1, 6011: _II2 __first2, _II2 __last2) 6011: { 6011: typedef typename iterator_traits<_II1>::value_type _ValueType1; 6011: typedef typename iterator_traits<_II2>::value_type _ValueType2; 6011: const bool __simple = 6011: (__is_byte<_ValueType1>::__value && __is_byte<_ValueType2>::__value 6011: && !__gnu_cxx::__numeric_traits<_ValueType1>::__is_signed 6011: && !__gnu_cxx::__numeric_traits<_ValueType2>::__is_signed 6011: && __is_pointer<_II1>::__value 6011: && __is_pointer<_II2>::__value); 6011: 6011: return std::__lexicographical_compare<__simple>::__lc(__first1, __last1, 6011: __first2, __last2); 6011: } 6011: 6011: template 6011: _ForwardIterator 6011: __lower_bound(_ForwardIterator __first, _ForwardIterator __last, 6011: const _Tp& __val, _Compare __comp) 6011: { 6011: typedef typename iterator_traits<_ForwardIterator>::difference_type 6011: _DistanceType; 6011: 6011: _DistanceType __len = std::distance(__first, __last); 6011: 6011: while (__len > 0) 6011: { 6011: _DistanceType __half = __len >> 1; 6011: _ForwardIterator __middle = __first; 6011: std::advance(__middle, __half); 6011: if (__comp(__middle, __val)) 6011: { 6011: __first = __middle; 6011: ++__first; 6011: __len = __len - __half - 1; 6011: } 6011: else 6011: __len = __half; 6011: } 6011: return __first; 6011: } 6011: # 982 "/usr/include/c++/8/bits/stl_algobase.h" 3 6011: template 6011: inline _ForwardIterator 6011: lower_bound(_ForwardIterator __first, _ForwardIterator __last, 6011: const _Tp& __val) 6011: { 6011: 6011: 6011: 6011: 6011: ; 6011: 6011: return std::__lower_bound(__first, __last, __val, 6011: __gnu_cxx::__ops::__iter_less_val()); 6011: } 6011: 6011: 6011: 6011: inline constexpr int 6011: __lg(int __n) 6011: { return sizeof(int) * 8 - 1 - __builtin_clz(__n); } 6011: 6011: inline constexpr unsigned 6011: __lg(unsigned __n) 6011: { return sizeof(int) * 8 - 1 - __builtin_clz(__n); } 6011: 6011: inline constexpr long 6011: __lg(long __n) 6011: { return sizeof(long) * 8 - 1 - __builtin_clzl(__n); } 6011: 6011: inline constexpr unsigned long 6011: __lg(unsigned long __n) 6011: { return sizeof(long) * 8 - 1 - __builtin_clzl(__n); } 6011: 6011: inline constexpr long long 6011: __lg(long long __n) 6011: { return sizeof(long long) * 8 - 1 - __builtin_clzll(__n); } 6011: 6011: inline constexpr unsigned long long 6011: __lg(unsigned long long __n) 6011: { return sizeof(long long) * 8 - 1 - __builtin_clzll(__n); } 6011: 6011: 6011: # 1037 "/usr/include/c++/8/bits/stl_algobase.h" 3 6011: template 6011: inline bool 6011: equal(_II1 __first1, _II1 __last1, _II2 __first2) 6011: { 6011: 6011: 6011: 6011: 6011: 6011: 6011: ; 6011: 6011: return std::__equal_aux(std::__niter_base(__first1), 6011: std::__niter_base(__last1), 6011: std::__niter_base(__first2)); 6011: } 6011: # 1069 "/usr/include/c++/8/bits/stl_algobase.h" 3 6011: template 6011: inline bool 6011: equal(_IIter1 __first1, _IIter1 __last1, 6011: _IIter2 __first2, _BinaryPredicate __binary_pred) 6011: { 6011: 6011: 6011: 6011: ; 6011: 6011: for (; __first1 != __last1; ++__first1, (void)++__first2) 6011: if (!bool(__binary_pred(*__first1, *__first2))) 6011: return false; 6011: return true; 6011: } 6011: 6011: 6011: 6011: template 6011: inline bool 6011: __equal4(_II1 __first1, _II1 __last1, _II2 __first2, _II2 __last2) 6011: { 6011: using _RATag = random_access_iterator_tag; 6011: using _Cat1 = typename iterator_traits<_II1>::iterator_category; 6011: using _Cat2 = typename iterator_traits<_II2>::iterator_category; 6011: using _RAIters = __and_, is_same<_Cat2, _RATag>>; 6011: if (_RAIters()) 6011: { 6011: auto __d1 = std::distance(__first1, __last1); 6011: auto __d2 = std::distance(__first2, __last2); 6011: if (__d1 != __d2) 6011: return false; 6011: return std::equal(__first1, __last1, __first2); 6011: } 6011: 6011: for (; __first1 != __last1 && __first2 != __last2; 6011: ++__first1, (void)++__first2) 6011: if (!(*__first1 == *__first2)) 6011: return false; 6011: return __first1 == __last1 && __first2 == __last2; 6011: } 6011: 6011: 6011: template 6011: inline bool 6011: __equal4(_II1 __first1, _II1 __last1, _II2 __first2, _II2 __last2, 6011: _BinaryPredicate __binary_pred) 6011: { 6011: using _RATag = random_access_iterator_tag; 6011: using _Cat1 = typename iterator_traits<_II1>::iterator_category; 6011: using _Cat2 = typename iterator_traits<_II2>::iterator_category; 6011: using _RAIters = __and_, is_same<_Cat2, _RATag>>; 6011: if (_RAIters()) 6011: { 6011: auto __d1 = std::distance(__first1, __last1); 6011: auto __d2 = std::distance(__first2, __last2); 6011: if (__d1 != __d2) 6011: return false; 6011: return std::equal(__first1, __last1, __first2, 6011: __binary_pred); 6011: } 6011: 6011: for (; __first1 != __last1 && __first2 != __last2; 6011: ++__first1, (void)++__first2) 6011: if (!bool(__binary_pred(*__first1, *__first2))) 6011: return false; 6011: return __first1 == __last1 && __first2 == __last2; 6011: } 6011: # 1219 "/usr/include/c++/8/bits/stl_algobase.h" 3 6011: template 6011: inline bool 6011: lexicographical_compare(_II1 __first1, _II1 __last1, 6011: _II2 __first2, _II2 __last2) 6011: { 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: ; 6011: ; 6011: 6011: return std::__lexicographical_compare_aux(std::__niter_base(__first1), 6011: std::__niter_base(__last1), 6011: std::__niter_base(__first2), 6011: std::__niter_base(__last2)); 6011: } 6011: # 1255 "/usr/include/c++/8/bits/stl_algobase.h" 3 6011: template 6011: inline bool 6011: lexicographical_compare(_II1 __first1, _II1 __last1, 6011: _II2 __first2, _II2 __last2, _Compare __comp) 6011: { 6011: 6011: 6011: 6011: ; 6011: ; 6011: 6011: return std::__lexicographical_compare_impl 6011: (__first1, __last1, __first2, __last2, 6011: __gnu_cxx::__ops::__iter_comp_iter(__comp)); 6011: } 6011: 6011: template 6011: pair<_InputIterator1, _InputIterator2> 6011: __mismatch(_InputIterator1 __first1, _InputIterator1 __last1, 6011: _InputIterator2 __first2, _BinaryPredicate __binary_pred) 6011: { 6011: while (__first1 != __last1 && __binary_pred(__first1, __first2)) 6011: { 6011: ++__first1; 6011: ++__first2; 6011: } 6011: return pair<_InputIterator1, _InputIterator2>(__first1, __first2); 6011: } 6011: # 1298 "/usr/include/c++/8/bits/stl_algobase.h" 3 6011: template 6011: inline pair<_InputIterator1, _InputIterator2> 6011: mismatch(_InputIterator1 __first1, _InputIterator1 __last1, 6011: _InputIterator2 __first2) 6011: { 6011: 6011: 6011: 6011: 6011: 6011: 6011: ; 6011: 6011: return std::__mismatch(__first1, __last1, __first2, 6011: __gnu_cxx::__ops::__iter_equal_to_iter()); 6011: } 6011: # 1331 "/usr/include/c++/8/bits/stl_algobase.h" 3 6011: template 6011: inline pair<_InputIterator1, _InputIterator2> 6011: mismatch(_InputIterator1 __first1, _InputIterator1 __last1, 6011: _InputIterator2 __first2, _BinaryPredicate __binary_pred) 6011: { 6011: 6011: 6011: 6011: ; 6011: 6011: return std::__mismatch(__first1, __last1, __first2, 6011: __gnu_cxx::__ops::__iter_comp_iter(__binary_pred)); 6011: } 6011: # 1431 "/usr/include/c++/8/bits/stl_algobase.h" 3 6011: 6011: 6011: } 6011: # 61 "/usr/include/c++/8/vector" 2 3 6011: # 1 "/usr/include/c++/8/bits/allocator.h" 1 3 6011: # 46 "/usr/include/c++/8/bits/allocator.h" 3 6011: # 1 "/usr/include/arm-linux-gnueabihf/c++/8/bits/c++allocator.h" 1 3 6011: # 33 "/usr/include/arm-linux-gnueabihf/c++/8/bits/c++allocator.h" 3 6011: # 1 "/usr/include/c++/8/ext/new_allocator.h" 1 3 6011: # 33 "/usr/include/c++/8/ext/new_allocator.h" 3 6011: # 1 "/usr/include/c++/8/new" 1 3 6011: # 37 "/usr/include/c++/8/new" 3 6011: 6011: # 38 "/usr/include/c++/8/new" 3 6011: 6011: 6011: # 1 "/usr/include/c++/8/exception" 1 3 6011: # 33 "/usr/include/c++/8/exception" 3 6011: 6011: # 34 "/usr/include/c++/8/exception" 3 6011: 6011: #pragma GCC visibility push(default) 6011: 6011: 6011: # 1 "/usr/include/c++/8/bits/exception.h" 1 3 6011: # 34 "/usr/include/c++/8/bits/exception.h" 3 6011: 6011: # 35 "/usr/include/c++/8/bits/exception.h" 3 6011: 6011: #pragma GCC visibility push(default) 6011: 6011: 6011: 6011: extern "C++" { 6011: 6011: namespace std 6011: { 6011: # 60 "/usr/include/c++/8/bits/exception.h" 3 6011: class exception 6011: { 6011: public: 6011: exception() noexcept { } 6011: virtual ~exception() noexcept; 6011: 6011: 6011: 6011: virtual const char* 6011: what() const noexcept; 6011: }; 6011: 6011: } 6011: 6011: } 6011: 6011: #pragma GCC visibility pop 6011: # 39 "/usr/include/c++/8/exception" 2 3 6011: 6011: extern "C++" { 6011: 6011: namespace std 6011: { 6011: 6011: 6011: class bad_exception : public exception 6011: { 6011: public: 6011: bad_exception() noexcept { } 6011: 6011: 6011: 6011: virtual ~bad_exception() noexcept; 6011: 6011: 6011: virtual const char* 6011: what() const noexcept; 6011: }; 6011: 6011: 6011: typedef void (*terminate_handler) (); 6011: 6011: 6011: typedef void (*unexpected_handler) (); 6011: 6011: 6011: terminate_handler set_terminate(terminate_handler) noexcept; 6011: 6011: 6011: 6011: terminate_handler get_terminate() noexcept; 6011: 6011: 6011: 6011: 6011: void terminate() noexcept __attribute__ ((__noreturn__)); 6011: 6011: 6011: unexpected_handler set_unexpected(unexpected_handler) noexcept; 6011: 6011: 6011: 6011: unexpected_handler get_unexpected() noexcept; 6011: 6011: 6011: 6011: 6011: void unexpected() __attribute__ ((__noreturn__)); 6011: # 101 "/usr/include/c++/8/exception" 3 6011: 6011: bool uncaught_exception() noexcept __attribute__ ((__pure__)); 6011: 6011: 6011: 6011: 6011: int uncaught_exceptions() noexcept __attribute__ ((__pure__)); 6011: 6011: 6011: 6011: } 6011: 6011: namespace __gnu_cxx 6011: { 6011: 6011: # 133 "/usr/include/c++/8/exception" 3 6011: void __verbose_terminate_handler(); 6011: 6011: 6011: } 6011: 6011: } 6011: 6011: #pragma GCC visibility pop 6011: 6011: 6011: # 1 "/usr/include/c++/8/bits/exception_ptr.h" 1 3 6011: # 34 "/usr/include/c++/8/bits/exception_ptr.h" 3 6011: #pragma GCC visibility push(default) 6011: 6011: 6011: 6011: # 1 "/usr/include/c++/8/bits/cxxabi_init_exception.h" 1 3 6011: # 34 "/usr/include/c++/8/bits/cxxabi_init_exception.h" 3 6011: 6011: # 35 "/usr/include/c++/8/bits/cxxabi_init_exception.h" 3 6011: 6011: #pragma GCC visibility push(default) 6011: 6011: # 1 "/usr/lib/gcc/arm-linux-gnueabihf/8/include/stddef.h" 1 3 4 6011: # 149 "/usr/lib/gcc/arm-linux-gnueabihf/8/include/stddef.h" 3 4 6011: typedef int ptrdiff_t; 6011: # 216 "/usr/lib/gcc/arm-linux-gnueabihf/8/include/stddef.h" 3 4 6011: typedef unsigned int size_t; 6011: # 426 "/usr/lib/gcc/arm-linux-gnueabihf/8/include/stddef.h" 3 4 6011: typedef struct { 6011: long long __max_align_ll __attribute__((__aligned__(__alignof__(long long)))); 6011: long double __max_align_ld __attribute__((__aligned__(__alignof__(long double)))); 6011: # 437 "/usr/lib/gcc/arm-linux-gnueabihf/8/include/stddef.h" 3 4 6011: } max_align_t; 6011: 6011: 6011: 6011: 6011: 6011: 6011: typedef decltype(nullptr) nullptr_t; 6011: # 39 "/usr/include/c++/8/bits/cxxabi_init_exception.h" 2 3 6011: # 50 "/usr/include/c++/8/bits/cxxabi_init_exception.h" 3 6011: namespace std 6011: { 6011: class type_info; 6011: } 6011: 6011: namespace __cxxabiv1 6011: { 6011: struct __cxa_refcounted_exception; 6011: 6011: extern "C" 6011: { 6011: 6011: void* 6011: __cxa_allocate_exception(size_t) noexcept; 6011: 6011: 6011: __cxa_refcounted_exception* 6011: __cxa_init_primary_exception(void *object, std::type_info *tinfo, 6011: void ( *dest) (void *)) noexcept; 6011: 6011: } 6011: } 6011: 6011: 6011: 6011: #pragma GCC visibility pop 6011: # 39 "/usr/include/c++/8/bits/exception_ptr.h" 2 3 6011: # 1 "/usr/include/c++/8/typeinfo" 1 3 6011: # 32 "/usr/include/c++/8/typeinfo" 3 6011: 6011: # 33 "/usr/include/c++/8/typeinfo" 3 6011: 6011: 6011: 6011: # 1 "/usr/include/c++/8/bits/hash_bytes.h" 1 3 6011: # 33 "/usr/include/c++/8/bits/hash_bytes.h" 3 6011: 6011: # 34 "/usr/include/c++/8/bits/hash_bytes.h" 3 6011: 6011: 6011: 6011: namespace std 6011: { 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: size_t 6011: _Hash_bytes(const void* __ptr, size_t __len, size_t __seed); 6011: 6011: 6011: 6011: 6011: 6011: size_t 6011: _Fnv_hash_bytes(const void* __ptr, size_t __len, size_t __seed); 6011: 6011: 6011: } 6011: # 37 "/usr/include/c++/8/typeinfo" 2 3 6011: 6011: 6011: #pragma GCC visibility push(default) 6011: 6011: extern "C++" { 6011: 6011: namespace __cxxabiv1 6011: { 6011: class __class_type_info; 6011: } 6011: # 80 "/usr/include/c++/8/typeinfo" 3 6011: namespace std 6011: { 6011: 6011: 6011: 6011: 6011: 6011: 6011: class type_info 6011: { 6011: public: 6011: 6011: 6011: 6011: 6011: virtual ~type_info(); 6011: 6011: 6011: 6011: const char* name() const noexcept 6011: { return __name[0] == '*' ? __name + 1 : __name; } 6011: 6011: 6011: 6011: 6011: 6011: bool before(const type_info& __arg) const noexcept; 6011: bool operator==(const type_info& __arg) const noexcept; 6011: # 136 "/usr/include/c++/8/typeinfo" 3 6011: bool operator!=(const type_info& __arg) const noexcept 6011: { return !operator==(__arg); } 6011: 6011: 6011: size_t hash_code() const noexcept 6011: { 6011: 6011: return _Hash_bytes(name(), __builtin_strlen(name()), 6011: static_cast(0xc70f6907UL)); 6011: 6011: 6011: 6011: } 6011: 6011: 6011: 6011: virtual bool __is_pointer_p() const; 6011: 6011: 6011: virtual bool __is_function_p() const; 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: virtual bool __do_catch(const type_info *__thr_type, void **__thr_obj, 6011: unsigned __outer) const; 6011: 6011: 6011: virtual bool __do_upcast(const __cxxabiv1::__class_type_info *__target, 6011: void **__obj_ptr) const; 6011: 6011: protected: 6011: const char *__name; 6011: 6011: explicit type_info(const char *__n): __name(__n) { } 6011: 6011: private: 6011: 6011: type_info& operator=(const type_info&); 6011: type_info(const type_info&); 6011: }; 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: class bad_cast : public exception 6011: { 6011: public: 6011: bad_cast() noexcept { } 6011: 6011: 6011: 6011: virtual ~bad_cast() noexcept; 6011: 6011: 6011: virtual const char* what() const noexcept; 6011: }; 6011: 6011: 6011: 6011: 6011: 6011: class bad_typeid : public exception 6011: { 6011: public: 6011: bad_typeid () noexcept { } 6011: 6011: 6011: 6011: virtual ~bad_typeid() noexcept; 6011: 6011: 6011: virtual const char* what() const noexcept; 6011: }; 6011: } 6011: 6011: } 6011: 6011: #pragma GCC visibility pop 6011: # 40 "/usr/include/c++/8/bits/exception_ptr.h" 2 3 6011: # 1 "/usr/include/c++/8/new" 1 3 6011: # 41 "/usr/include/c++/8/bits/exception_ptr.h" 2 3 6011: 6011: extern "C++" { 6011: 6011: namespace std 6011: { 6011: class type_info; 6011: 6011: 6011: 6011: 6011: 6011: namespace __exception_ptr 6011: { 6011: class exception_ptr; 6011: } 6011: 6011: using __exception_ptr::exception_ptr; 6011: 6011: 6011: 6011: 6011: 6011: exception_ptr current_exception() noexcept; 6011: 6011: template 6011: exception_ptr make_exception_ptr(_Ex) noexcept; 6011: 6011: 6011: void rethrow_exception(exception_ptr) __attribute__ ((__noreturn__)); 6011: 6011: namespace __exception_ptr 6011: { 6011: using std::rethrow_exception; 6011: 6011: 6011: 6011: 6011: 6011: class exception_ptr 6011: { 6011: void* _M_exception_object; 6011: 6011: explicit exception_ptr(void* __e) noexcept; 6011: 6011: void _M_addref() noexcept; 6011: void _M_release() noexcept; 6011: 6011: void *_M_get() const noexcept __attribute__ ((__pure__)); 6011: 6011: friend exception_ptr std::current_exception() noexcept; 6011: friend void std::rethrow_exception(exception_ptr); 6011: template 6011: friend exception_ptr std::make_exception_ptr(_Ex) noexcept; 6011: 6011: public: 6011: exception_ptr() noexcept; 6011: 6011: exception_ptr(const exception_ptr&) noexcept; 6011: 6011: 6011: exception_ptr(nullptr_t) noexcept 6011: : _M_exception_object(0) 6011: { } 6011: 6011: exception_ptr(exception_ptr&& __o) noexcept 6011: : _M_exception_object(__o._M_exception_object) 6011: { __o._M_exception_object = 0; } 6011: # 117 "/usr/include/c++/8/bits/exception_ptr.h" 3 6011: exception_ptr& 6011: operator=(const exception_ptr&) noexcept; 6011: 6011: 6011: exception_ptr& 6011: operator=(exception_ptr&& __o) noexcept 6011: { 6011: exception_ptr(static_cast(__o)).swap(*this); 6011: return *this; 6011: } 6011: 6011: 6011: ~exception_ptr() noexcept; 6011: 6011: void 6011: swap(exception_ptr&) noexcept; 6011: # 144 "/usr/include/c++/8/bits/exception_ptr.h" 3 6011: explicit operator bool() const 6011: { return _M_exception_object; } 6011: 6011: 6011: friend bool 6011: operator==(const exception_ptr&, const exception_ptr&) 6011: noexcept __attribute__ ((__pure__)); 6011: 6011: const class std::type_info* 6011: __cxa_exception_type() const noexcept 6011: __attribute__ ((__pure__)); 6011: }; 6011: 6011: bool 6011: operator==(const exception_ptr&, const exception_ptr&) 6011: noexcept __attribute__ ((__pure__)); 6011: 6011: bool 6011: operator!=(const exception_ptr&, const exception_ptr&) 6011: noexcept __attribute__ ((__pure__)); 6011: 6011: inline void 6011: swap(exception_ptr& __lhs, exception_ptr& __rhs) 6011: { __lhs.swap(__rhs); } 6011: 6011: template 6011: inline void 6011: __dest_thunk(void* __x) 6011: { static_cast<_Ex*>(__x)->~_Ex(); } 6011: 6011: } 6011: 6011: 6011: template 6011: exception_ptr 6011: make_exception_ptr(_Ex __ex) noexcept 6011: { 6011: 6011: try 6011: { 6011: 6011: void *__e = __cxxabiv1::__cxa_allocate_exception(sizeof(_Ex)); 6011: (void)__cxxabiv1::__cxa_init_primary_exception( 6011: __e, const_cast(&typeid(__ex)), 6011: __exception_ptr::__dest_thunk<_Ex>); 6011: ::new (__e) _Ex(__ex); 6011: return exception_ptr(__e); 6011: 6011: 6011: 6011: } 6011: catch(...) 6011: { 6011: return current_exception(); 6011: } 6011: 6011: 6011: 6011: } 6011: 6011: 6011: } 6011: 6011: } 6011: 6011: #pragma GCC visibility pop 6011: # 144 "/usr/include/c++/8/exception" 2 3 6011: # 1 "/usr/include/c++/8/bits/nested_exception.h" 1 3 6011: # 33 "/usr/include/c++/8/bits/nested_exception.h" 3 6011: #pragma GCC visibility push(default) 6011: # 42 "/usr/include/c++/8/bits/nested_exception.h" 3 6011: extern "C++" { 6011: 6011: namespace std 6011: { 6011: 6011: 6011: 6011: 6011: 6011: 6011: class nested_exception 6011: { 6011: exception_ptr _M_ptr; 6011: 6011: public: 6011: nested_exception() noexcept : _M_ptr(current_exception()) { } 6011: 6011: nested_exception(const nested_exception&) noexcept = default; 6011: 6011: nested_exception& operator=(const nested_exception&) noexcept = default; 6011: 6011: virtual ~nested_exception() noexcept; 6011: 6011: [[noreturn]] 6011: void 6011: rethrow_nested() const 6011: { 6011: if (_M_ptr) 6011: rethrow_exception(_M_ptr); 6011: std::terminate(); 6011: } 6011: 6011: exception_ptr 6011: nested_ptr() const noexcept 6011: { return _M_ptr; } 6011: }; 6011: 6011: template 6011: struct _Nested_exception : public _Except, public nested_exception 6011: { 6011: explicit _Nested_exception(const _Except& __ex) 6011: : _Except(__ex) 6011: { } 6011: 6011: explicit _Nested_exception(_Except&& __ex) 6011: : _Except(static_cast<_Except&&>(__ex)) 6011: { } 6011: }; 6011: 6011: 6011: 6011: 6011: template 6011: [[noreturn]] 6011: inline void 6011: __throw_with_nested_impl(_Tp&& __t, true_type) 6011: { 6011: using _Up = typename remove_reference<_Tp>::type; 6011: throw _Nested_exception<_Up>{std::forward<_Tp>(__t)}; 6011: } 6011: 6011: template 6011: [[noreturn]] 6011: inline void 6011: __throw_with_nested_impl(_Tp&& __t, false_type) 6011: { throw std::forward<_Tp>(__t); } 6011: 6011: 6011: 6011: template 6011: [[noreturn]] 6011: inline void 6011: throw_with_nested(_Tp&& __t) 6011: { 6011: using _Up = typename decay<_Tp>::type; 6011: using _CopyConstructible 6011: = __and_, is_move_constructible<_Up>>; 6011: static_assert(_CopyConstructible::value, 6011: "throw_with_nested argument must be CopyConstructible"); 6011: using __nest = __and_, __bool_constant, 6011: __not_>>; 6011: std::__throw_with_nested_impl(std::forward<_Tp>(__t), __nest{}); 6011: } 6011: 6011: 6011: template 6011: using __rethrow_if_nested_cond = typename enable_if< 6011: __and_, 6011: __or_<__not_>, 6011: is_convertible<_Tp*, nested_exception*>>>::value 6011: >::type; 6011: 6011: 6011: template 6011: inline __rethrow_if_nested_cond<_Ex> 6011: __rethrow_if_nested_impl(const _Ex* __ptr) 6011: { 6011: if (auto __ne_ptr = dynamic_cast(__ptr)) 6011: __ne_ptr->rethrow_nested(); 6011: } 6011: 6011: 6011: inline void 6011: __rethrow_if_nested_impl(const void*) 6011: { } 6011: 6011: 6011: template 6011: inline void 6011: rethrow_if_nested(const _Ex& __ex) 6011: { std::__rethrow_if_nested_impl(std::__addressof(__ex)); } 6011: 6011: 6011: } 6011: 6011: } 6011: 6011: 6011: 6011: #pragma GCC visibility pop 6011: # 145 "/usr/include/c++/8/exception" 2 3 6011: # 41 "/usr/include/c++/8/new" 2 3 6011: 6011: #pragma GCC visibility push(default) 6011: 6011: extern "C++" { 6011: 6011: namespace std 6011: { 6011: 6011: 6011: 6011: 6011: 6011: 6011: class bad_alloc : public exception 6011: { 6011: public: 6011: bad_alloc() throw() { } 6011: 6011: 6011: 6011: virtual ~bad_alloc() throw(); 6011: 6011: 6011: virtual const char* what() const throw(); 6011: }; 6011: 6011: 6011: class bad_array_new_length : public bad_alloc 6011: { 6011: public: 6011: bad_array_new_length() throw() { } 6011: 6011: 6011: 6011: virtual ~bad_array_new_length() throw(); 6011: 6011: 6011: virtual const char* what() const throw(); 6011: }; 6011: 6011: 6011: 6011: 6011: 6011: 6011: struct nothrow_t 6011: { 6011: 6011: explicit nothrow_t() = default; 6011: 6011: }; 6011: 6011: extern const nothrow_t nothrow; 6011: 6011: 6011: 6011: typedef void (*new_handler)(); 6011: 6011: 6011: 6011: new_handler set_new_handler(new_handler) throw(); 6011: 6011: 6011: 6011: new_handler get_new_handler() noexcept; 6011: 6011: } 6011: # 120 "/usr/include/c++/8/new" 3 6011: void* operator new(std::size_t) 6011: __attribute__((__externally_visible__)); 6011: void* operator new[](std::size_t) 6011: __attribute__((__externally_visible__)); 6011: void operator delete(void*) noexcept 6011: __attribute__((__externally_visible__)); 6011: void operator delete[](void*) noexcept 6011: __attribute__((__externally_visible__)); 6011: 6011: 6011: 6011: 6011: 6011: 6011: void* operator new(std::size_t, const std::nothrow_t&) noexcept 6011: __attribute__((__externally_visible__)); 6011: void* operator new[](std::size_t, const std::nothrow_t&) noexcept 6011: __attribute__((__externally_visible__)); 6011: void operator delete(void*, const std::nothrow_t&) noexcept 6011: __attribute__((__externally_visible__)); 6011: void operator delete[](void*, const std::nothrow_t&) noexcept 6011: __attribute__((__externally_visible__)); 6011: # 168 "/usr/include/c++/8/new" 3 6011: inline void* operator new(std::size_t, void* __p) noexcept 6011: { return __p; } 6011: inline void* operator new[](std::size_t, void* __p) noexcept 6011: { return __p; } 6011: 6011: 6011: inline void operator delete (void*, void*) noexcept { } 6011: inline void operator delete[](void*, void*) noexcept { } 6011: 6011: } 6011: # 216 "/usr/include/c++/8/new" 3 6011: #pragma GCC visibility pop 6011: # 34 "/usr/include/c++/8/ext/new_allocator.h" 2 3 6011: 6011: 6011: 6011: 6011: 6011: 6011: namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) 6011: { 6011: 6011: 6011: using std::size_t; 6011: using std::ptrdiff_t; 6011: # 57 "/usr/include/c++/8/ext/new_allocator.h" 3 6011: template 6011: class new_allocator 6011: { 6011: public: 6011: typedef size_t size_type; 6011: typedef ptrdiff_t difference_type; 6011: typedef _Tp* pointer; 6011: typedef const _Tp* const_pointer; 6011: typedef _Tp& reference; 6011: typedef const _Tp& const_reference; 6011: typedef _Tp value_type; 6011: 6011: template 6011: struct rebind 6011: { typedef new_allocator<_Tp1> other; }; 6011: 6011: 6011: 6011: 6011: typedef std::true_type propagate_on_container_move_assignment; 6011: 6011: 6011: new_allocator() noexcept { } 6011: 6011: new_allocator(const new_allocator&) noexcept { } 6011: 6011: template 6011: new_allocator(const new_allocator<_Tp1>&) noexcept { } 6011: 6011: ~new_allocator() noexcept { } 6011: 6011: pointer 6011: address(reference __x) const noexcept 6011: { return std::__addressof(__x); } 6011: 6011: const_pointer 6011: address(const_reference __x) const noexcept 6011: { return std::__addressof(__x); } 6011: 6011: 6011: 6011: pointer 6011: allocate(size_type __n, const void* = static_cast(0)) 6011: { 6011: if (__n > this->max_size()) 6011: std::__throw_bad_alloc(); 6011: # 111 "/usr/include/c++/8/ext/new_allocator.h" 3 6011: return static_cast<_Tp*>(::operator new(__n * sizeof(_Tp))); 6011: } 6011: 6011: 6011: void 6011: deallocate(pointer __p, size_type) 6011: { 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: ::operator delete(__p); 6011: } 6011: 6011: size_type 6011: max_size() const noexcept 6011: { return size_t(-1) / sizeof(_Tp); } 6011: 6011: 6011: template 6011: void 6011: construct(_Up* __p, _Args&&... __args) 6011: { ::new((void *)__p) _Up(std::forward<_Args>(__args)...); } 6011: 6011: template 6011: void 6011: destroy(_Up* __p) { __p->~_Up(); } 6011: # 151 "/usr/include/c++/8/ext/new_allocator.h" 3 6011: }; 6011: 6011: template 6011: inline bool 6011: operator==(const new_allocator<_Tp>&, const new_allocator<_Tp>&) 6011: { return true; } 6011: 6011: template 6011: inline bool 6011: operator!=(const new_allocator<_Tp>&, const new_allocator<_Tp>&) 6011: { return false; } 6011: 6011: 6011: } 6011: # 34 "/usr/include/arm-linux-gnueabihf/c++/8/bits/c++allocator.h" 2 3 6011: 6011: 6011: namespace std 6011: { 6011: # 47 "/usr/include/arm-linux-gnueabihf/c++/8/bits/c++allocator.h" 3 6011: template 6011: using __allocator_base = __gnu_cxx::new_allocator<_Tp>; 6011: } 6011: # 47 "/usr/include/c++/8/bits/allocator.h" 2 3 6011: # 1 "/usr/include/c++/8/bits/memoryfwd.h" 1 3 6011: # 46 "/usr/include/c++/8/bits/memoryfwd.h" 3 6011: 6011: # 47 "/usr/include/c++/8/bits/memoryfwd.h" 3 6011: 6011: 6011: 6011: namespace std __attribute__ ((__visibility__ ("default"))) 6011: { 6011: 6011: # 63 "/usr/include/c++/8/bits/memoryfwd.h" 3 6011: template 6011: class allocator; 6011: 6011: template<> 6011: class allocator; 6011: 6011: 6011: template 6011: struct uses_allocator; 6011: 6011: 6011: 6011: 6011: } 6011: # 48 "/usr/include/c++/8/bits/allocator.h" 2 3 6011: # 57 "/usr/include/c++/8/bits/allocator.h" 3 6011: namespace std __attribute__ ((__visibility__ ("default"))) 6011: { 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: template<> 6011: class allocator 6011: { 6011: public: 6011: typedef size_t size_type; 6011: typedef ptrdiff_t difference_type; 6011: typedef void* pointer; 6011: typedef const void* const_pointer; 6011: typedef void value_type; 6011: 6011: template 6011: struct rebind 6011: { typedef allocator<_Tp1> other; }; 6011: 6011: 6011: 6011: 6011: typedef true_type propagate_on_container_move_assignment; 6011: 6011: typedef true_type is_always_equal; 6011: 6011: template 6011: void 6011: construct(_Up* __p, _Args&&... __args) 6011: { ::new((void *)__p) _Up(std::forward<_Args>(__args)...); } 6011: 6011: template 6011: void 6011: destroy(_Up* __p) { __p->~_Up(); } 6011: 6011: }; 6011: # 107 "/usr/include/c++/8/bits/allocator.h" 3 6011: template 6011: class allocator : public __allocator_base<_Tp> 6011: { 6011: public: 6011: typedef size_t size_type; 6011: typedef ptrdiff_t difference_type; 6011: typedef _Tp* pointer; 6011: typedef const _Tp* const_pointer; 6011: typedef _Tp& reference; 6011: typedef const _Tp& const_reference; 6011: typedef _Tp value_type; 6011: 6011: template 6011: struct rebind 6011: { typedef allocator<_Tp1> other; }; 6011: 6011: 6011: 6011: 6011: typedef true_type propagate_on_container_move_assignment; 6011: 6011: typedef true_type is_always_equal; 6011: 6011: 6011: allocator() throw() { } 6011: 6011: allocator(const allocator& __a) throw() 6011: : __allocator_base<_Tp>(__a) { } 6011: 6011: template 6011: allocator(const allocator<_Tp1>&) throw() { } 6011: 6011: ~allocator() throw() { } 6011: 6011: 6011: }; 6011: 6011: template 6011: inline bool 6011: operator==(const allocator<_T1>&, const allocator<_T2>&) 6011: noexcept 6011: { return true; } 6011: 6011: template 6011: inline bool 6011: operator==(const allocator<_Tp>&, const allocator<_Tp>&) 6011: noexcept 6011: { return true; } 6011: 6011: template 6011: inline bool 6011: operator!=(const allocator<_T1>&, const allocator<_T2>&) 6011: noexcept 6011: { return false; } 6011: 6011: template 6011: inline bool 6011: operator!=(const allocator<_Tp>&, const allocator<_Tp>&) 6011: noexcept 6011: { return false; } 6011: 6011: 6011: 6011: template 6011: class allocator 6011: { 6011: public: 6011: typedef _Tp value_type; 6011: template allocator(const allocator<_Up>&) { } 6011: }; 6011: 6011: template 6011: class allocator 6011: { 6011: public: 6011: typedef _Tp value_type; 6011: template allocator(const allocator<_Up>&) { } 6011: }; 6011: 6011: template 6011: class allocator 6011: { 6011: public: 6011: typedef _Tp value_type; 6011: template allocator(const allocator<_Up>&) { } 6011: }; 6011: 6011: 6011: 6011: 6011: 6011: 6011: extern template class allocator; 6011: extern template class allocator; 6011: 6011: 6011: 6011: 6011: 6011: 6011: template 6011: struct __alloc_swap 6011: { static void _S_do_it(_Alloc&, _Alloc&) noexcept { } }; 6011: 6011: template 6011: struct __alloc_swap<_Alloc, false> 6011: { 6011: static void 6011: _S_do_it(_Alloc& __one, _Alloc& __two) noexcept 6011: { 6011: 6011: if (__one != __two) 6011: swap(__one, __two); 6011: } 6011: }; 6011: 6011: 6011: template 6011: struct __alloc_neq 6011: { 6011: static bool 6011: _S_do_it(const _Alloc&, const _Alloc&) 6011: { return false; } 6011: }; 6011: 6011: template 6011: struct __alloc_neq<_Alloc, false> 6011: { 6011: static bool 6011: _S_do_it(const _Alloc& __one, const _Alloc& __two) 6011: { return __one != __two; } 6011: }; 6011: 6011: 6011: template, 6011: is_nothrow_move_constructible>::value> 6011: struct __shrink_to_fit_aux 6011: { static bool _S_do_it(_Tp&) noexcept { return false; } }; 6011: 6011: template 6011: struct __shrink_to_fit_aux<_Tp, true> 6011: { 6011: static bool 6011: _S_do_it(_Tp& __c) noexcept 6011: { 6011: 6011: try 6011: { 6011: _Tp(__make_move_if_noexcept_iterator(__c.begin()), 6011: __make_move_if_noexcept_iterator(__c.end()), 6011: __c.get_allocator()).swap(__c); 6011: return true; 6011: } 6011: catch(...) 6011: { return false; } 6011: 6011: 6011: 6011: } 6011: }; 6011: 6011: 6011: 6011: } 6011: # 62 "/usr/include/c++/8/vector" 2 3 6011: # 1 "/usr/include/c++/8/bits/stl_construct.h" 1 3 6011: # 61 "/usr/include/c++/8/bits/stl_construct.h" 3 6011: # 1 "/usr/include/c++/8/ext/alloc_traits.h" 1 3 6011: # 32 "/usr/include/c++/8/ext/alloc_traits.h" 3 6011: 6011: # 33 "/usr/include/c++/8/ext/alloc_traits.h" 3 6011: 6011: 6011: 6011: # 1 "/usr/include/c++/8/bits/alloc_traits.h" 1 3 6011: # 41 "/usr/include/c++/8/bits/alloc_traits.h" 3 6011: namespace std __attribute__ ((__visibility__ ("default"))) 6011: { 6011: 6011: 6011: struct __allocator_traits_base 6011: { 6011: template 6011: struct __rebind : __replace_first_arg<_Tp, _Up> { }; 6011: 6011: template 6011: struct __rebind<_Tp, _Up, 6011: __void_t::other>> 6011: { using type = typename _Tp::template rebind<_Up>::other; }; 6011: 6011: protected: 6011: template 6011: using __pointer = typename _Tp::pointer; 6011: template 6011: using __c_pointer = typename _Tp::const_pointer; 6011: template 6011: using __v_pointer = typename _Tp::void_pointer; 6011: template 6011: using __cv_pointer = typename _Tp::const_void_pointer; 6011: template 6011: using __pocca = typename _Tp::propagate_on_container_copy_assignment; 6011: template 6011: using __pocma = typename _Tp::propagate_on_container_move_assignment; 6011: template 6011: using __pocs = typename _Tp::propagate_on_container_swap; 6011: template 6011: using __equal = typename _Tp::is_always_equal; 6011: }; 6011: 6011: template 6011: using __alloc_rebind 6011: = typename __allocator_traits_base::template __rebind<_Alloc, _Up>::type; 6011: 6011: 6011: 6011: 6011: 6011: template 6011: struct allocator_traits : __allocator_traits_base 6011: { 6011: 6011: typedef _Alloc allocator_type; 6011: 6011: typedef typename _Alloc::value_type value_type; 6011: 6011: 6011: 6011: 6011: 6011: 6011: using pointer = __detected_or_t; 6011: 6011: private: 6011: 6011: template class _Func, typename _Tp, typename = void> 6011: struct _Ptr 6011: { 6011: using type = typename pointer_traits::template rebind<_Tp>; 6011: }; 6011: 6011: template class _Func, typename _Tp> 6011: struct _Ptr<_Func, _Tp, __void_t<_Func<_Alloc>>> 6011: { 6011: using type = _Func<_Alloc>; 6011: }; 6011: 6011: 6011: template 6011: struct _Diff 6011: { using type = typename pointer_traits<_PtrT>::difference_type; }; 6011: 6011: template 6011: struct _Diff<_A2, _PtrT, __void_t> 6011: { using type = typename _A2::difference_type; }; 6011: 6011: 6011: template 6011: struct _Size : make_unsigned<_DiffT> { }; 6011: 6011: template 6011: struct _Size<_A2, _DiffT, __void_t> 6011: { using type = typename _A2::size_type; }; 6011: 6011: public: 6011: 6011: 6011: 6011: 6011: 6011: 6011: using const_pointer = typename _Ptr<__c_pointer, const value_type>::type; 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: using void_pointer = typename _Ptr<__v_pointer, void>::type; 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: using const_void_pointer = typename _Ptr<__cv_pointer, const void>::type; 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: using difference_type = typename _Diff<_Alloc, pointer>::type; 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: using size_type = typename _Size<_Alloc, difference_type>::type; 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: using propagate_on_container_copy_assignment 6011: = __detected_or_t; 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: using propagate_on_container_move_assignment 6011: = __detected_or_t; 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: using propagate_on_container_swap 6011: = __detected_or_t; 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: using is_always_equal 6011: = __detected_or_t::type, __equal, _Alloc>; 6011: 6011: template 6011: using rebind_alloc = __alloc_rebind<_Alloc, _Tp>; 6011: template 6011: using rebind_traits = allocator_traits>; 6011: 6011: private: 6011: template 6011: static auto 6011: _S_allocate(_Alloc2& __a, size_type __n, const_void_pointer __hint, int) 6011: -> decltype(__a.allocate(__n, __hint)) 6011: { return __a.allocate(__n, __hint); } 6011: 6011: template 6011: static pointer 6011: _S_allocate(_Alloc2& __a, size_type __n, const_void_pointer, ...) 6011: { return __a.allocate(__n); } 6011: 6011: template 6011: struct __construct_helper 6011: { 6011: template()->construct( 6011: std::declval<_Tp*>(), std::declval<_Args>()...))> 6011: static true_type __test(int); 6011: 6011: template 6011: static false_type __test(...); 6011: 6011: using type = decltype(__test<_Alloc>(0)); 6011: }; 6011: 6011: template 6011: using __has_construct 6011: = typename __construct_helper<_Tp, _Args...>::type; 6011: 6011: template 6011: static _Require<__has_construct<_Tp, _Args...>> 6011: _S_construct(_Alloc& __a, _Tp* __p, _Args&&... __args) 6011: { __a.construct(__p, std::forward<_Args>(__args)...); } 6011: 6011: template 6011: static 6011: _Require<__and_<__not_<__has_construct<_Tp, _Args...>>, 6011: is_constructible<_Tp, _Args...>>> 6011: _S_construct(_Alloc&, _Tp* __p, _Args&&... __args) 6011: { ::new((void*)__p) _Tp(std::forward<_Args>(__args)...); } 6011: 6011: template 6011: static auto 6011: _S_destroy(_Alloc2& __a, _Tp* __p, int) 6011: -> decltype(__a.destroy(__p)) 6011: { __a.destroy(__p); } 6011: 6011: template 6011: static void 6011: _S_destroy(_Alloc2&, _Tp* __p, ...) 6011: { __p->~_Tp(); } 6011: 6011: template 6011: static auto 6011: _S_max_size(_Alloc2& __a, int) 6011: -> decltype(__a.max_size()) 6011: { return __a.max_size(); } 6011: 6011: template 6011: static size_type 6011: _S_max_size(_Alloc2&, ...) 6011: { 6011: 6011: 6011: return __gnu_cxx::__numeric_traits::__max 6011: / sizeof(value_type); 6011: } 6011: 6011: template 6011: static auto 6011: _S_select(_Alloc2& __a, int) 6011: -> decltype(__a.select_on_container_copy_construction()) 6011: { return __a.select_on_container_copy_construction(); } 6011: 6011: template 6011: static _Alloc2 6011: _S_select(_Alloc2& __a, ...) 6011: { return __a; } 6011: 6011: public: 6011: # 299 "/usr/include/c++/8/bits/alloc_traits.h" 3 6011: static pointer 6011: allocate(_Alloc& __a, size_type __n) 6011: { return __a.allocate(__n); } 6011: # 314 "/usr/include/c++/8/bits/alloc_traits.h" 3 6011: static pointer 6011: allocate(_Alloc& __a, size_type __n, const_void_pointer __hint) 6011: { return _S_allocate(__a, __n, __hint, 0); } 6011: # 326 "/usr/include/c++/8/bits/alloc_traits.h" 3 6011: static void 6011: deallocate(_Alloc& __a, pointer __p, size_type __n) 6011: { __a.deallocate(__p, __n); } 6011: # 341 "/usr/include/c++/8/bits/alloc_traits.h" 3 6011: template 6011: static auto construct(_Alloc& __a, _Tp* __p, _Args&&... __args) 6011: -> decltype(_S_construct(__a, __p, std::forward<_Args>(__args)...)) 6011: { _S_construct(__a, __p, std::forward<_Args>(__args)...); } 6011: # 354 "/usr/include/c++/8/bits/alloc_traits.h" 3 6011: template 6011: static void destroy(_Alloc& __a, _Tp* __p) 6011: { _S_destroy(__a, __p, 0); } 6011: # 366 "/usr/include/c++/8/bits/alloc_traits.h" 3 6011: static size_type max_size(const _Alloc& __a) noexcept 6011: { return _S_max_size(__a, 0); } 6011: # 377 "/usr/include/c++/8/bits/alloc_traits.h" 3 6011: static _Alloc 6011: select_on_container_copy_construction(const _Alloc& __rhs) 6011: { return _S_select(__rhs, 0); } 6011: }; 6011: 6011: 6011: template 6011: struct allocator_traits> 6011: { 6011: 6011: using allocator_type = allocator<_Tp>; 6011: 6011: using value_type = _Tp; 6011: 6011: 6011: using pointer = _Tp*; 6011: 6011: 6011: using const_pointer = const _Tp*; 6011: 6011: 6011: using void_pointer = void*; 6011: 6011: 6011: using const_void_pointer = const void*; 6011: 6011: 6011: using difference_type = std::ptrdiff_t; 6011: 6011: 6011: using size_type = std::size_t; 6011: 6011: 6011: using propagate_on_container_copy_assignment = false_type; 6011: 6011: 6011: using propagate_on_container_move_assignment = true_type; 6011: 6011: 6011: using propagate_on_container_swap = false_type; 6011: 6011: 6011: using is_always_equal = true_type; 6011: 6011: template 6011: using rebind_alloc = allocator<_Up>; 6011: 6011: template 6011: using rebind_traits = allocator_traits>; 6011: # 434 "/usr/include/c++/8/bits/alloc_traits.h" 3 6011: static pointer 6011: allocate(allocator_type& __a, size_type __n) 6011: { return __a.allocate(__n); } 6011: # 448 "/usr/include/c++/8/bits/alloc_traits.h" 3 6011: static pointer 6011: allocate(allocator_type& __a, size_type __n, const_void_pointer __hint) 6011: { return __a.allocate(__n, __hint); } 6011: # 460 "/usr/include/c++/8/bits/alloc_traits.h" 3 6011: static void 6011: deallocate(allocator_type& __a, pointer __p, size_type __n) 6011: { __a.deallocate(__p, __n); } 6011: # 472 "/usr/include/c++/8/bits/alloc_traits.h" 3 6011: template 6011: static void 6011: construct(allocator_type& __a, _Up* __p, _Args&&... __args) 6011: { __a.construct(__p, std::forward<_Args>(__args)...); } 6011: # 484 "/usr/include/c++/8/bits/alloc_traits.h" 3 6011: template 6011: static void 6011: destroy(allocator_type& __a, _Up* __p) 6011: { __a.destroy(__p); } 6011: 6011: 6011: 6011: 6011: 6011: 6011: static size_type 6011: max_size(const allocator_type& __a) noexcept 6011: { return __a.max_size(); } 6011: 6011: 6011: 6011: 6011: 6011: 6011: static allocator_type 6011: select_on_container_copy_construction(const allocator_type& __rhs) 6011: { return __rhs; } 6011: }; 6011: 6011: 6011: template 6011: inline void 6011: __do_alloc_on_copy(_Alloc& __one, const _Alloc& __two, true_type) 6011: { __one = __two; } 6011: 6011: template 6011: inline void 6011: __do_alloc_on_copy(_Alloc&, const _Alloc&, false_type) 6011: { } 6011: 6011: template 6011: inline void __alloc_on_copy(_Alloc& __one, const _Alloc& __two) 6011: { 6011: typedef allocator_traits<_Alloc> __traits; 6011: typedef typename __traits::propagate_on_container_copy_assignment __pocca; 6011: __do_alloc_on_copy(__one, __two, __pocca()); 6011: } 6011: 6011: template 6011: inline _Alloc __alloc_on_copy(const _Alloc& __a) 6011: { 6011: typedef allocator_traits<_Alloc> __traits; 6011: return __traits::select_on_container_copy_construction(__a); 6011: } 6011: 6011: template 6011: inline void __do_alloc_on_move(_Alloc& __one, _Alloc& __two, true_type) 6011: { __one = std::move(__two); } 6011: 6011: template 6011: inline void __do_alloc_on_move(_Alloc&, _Alloc&, false_type) 6011: { } 6011: 6011: template 6011: inline void __alloc_on_move(_Alloc& __one, _Alloc& __two) 6011: { 6011: typedef allocator_traits<_Alloc> __traits; 6011: typedef typename __traits::propagate_on_container_move_assignment __pocma; 6011: __do_alloc_on_move(__one, __two, __pocma()); 6011: } 6011: 6011: template 6011: inline void __do_alloc_on_swap(_Alloc& __one, _Alloc& __two, true_type) 6011: { 6011: using std::swap; 6011: swap(__one, __two); 6011: } 6011: 6011: template 6011: inline void __do_alloc_on_swap(_Alloc&, _Alloc&, false_type) 6011: { } 6011: 6011: template 6011: inline void __alloc_on_swap(_Alloc& __one, _Alloc& __two) 6011: { 6011: typedef allocator_traits<_Alloc> __traits; 6011: typedef typename __traits::propagate_on_container_swap __pocs; 6011: __do_alloc_on_swap(__one, __two, __pocs()); 6011: } 6011: 6011: template 6011: class __is_copy_insertable_impl 6011: { 6011: typedef allocator_traits<_Alloc> _Traits; 6011: 6011: template(), 6011: std::declval<_Up*>(), 6011: std::declval()))> 6011: static true_type 6011: _M_select(int); 6011: 6011: template 6011: static false_type 6011: _M_select(...); 6011: 6011: public: 6011: typedef decltype(_M_select(0)) type; 6011: }; 6011: 6011: 6011: template 6011: struct __is_copy_insertable 6011: : __is_copy_insertable_impl<_Alloc>::type 6011: { }; 6011: 6011: 6011: template 6011: struct __is_copy_insertable> 6011: : is_copy_constructible<_Tp> 6011: { }; 6011: 6011: 6011: 6011: template 6011: struct __is_allocator : false_type { }; 6011: 6011: template 6011: struct __is_allocator<_Alloc, 6011: __void_t().allocate(size_t{}))>> 6011: : true_type { }; 6011: 6011: template 6011: using _RequireAllocator 6011: = typename enable_if<__is_allocator<_Alloc>::value, _Alloc>::type; 6011: 6011: 6011: 6011: } 6011: # 37 "/usr/include/c++/8/ext/alloc_traits.h" 2 3 6011: 6011: 6011: 6011: 6011: namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) 6011: { 6011: 6011: 6011: 6011: 6011: 6011: 6011: template 6011: struct __alloc_traits 6011: 6011: : std::allocator_traits<_Alloc> 6011: 6011: { 6011: typedef _Alloc allocator_type; 6011: 6011: typedef std::allocator_traits<_Alloc> _Base_type; 6011: typedef typename _Base_type::value_type value_type; 6011: typedef typename _Base_type::pointer pointer; 6011: typedef typename _Base_type::const_pointer const_pointer; 6011: typedef typename _Base_type::size_type size_type; 6011: typedef typename _Base_type::difference_type difference_type; 6011: 6011: typedef value_type& reference; 6011: typedef const value_type& const_reference; 6011: using _Base_type::allocate; 6011: using _Base_type::deallocate; 6011: using _Base_type::construct; 6011: using _Base_type::destroy; 6011: using _Base_type::max_size; 6011: 6011: private: 6011: template 6011: using __is_custom_pointer 6011: = std::__and_, 6011: std::__not_>>; 6011: 6011: public: 6011: 6011: template 6011: static typename std::enable_if<__is_custom_pointer<_Ptr>::value>::type 6011: construct(_Alloc& __a, _Ptr __p, _Args&&... __args) 6011: { 6011: _Base_type::construct(__a, std::__to_address(__p), 6011: std::forward<_Args>(__args)...); 6011: } 6011: 6011: 6011: template 6011: static typename std::enable_if<__is_custom_pointer<_Ptr>::value>::type 6011: destroy(_Alloc& __a, _Ptr __p) 6011: { _Base_type::destroy(__a, std::__to_address(__p)); } 6011: 6011: static _Alloc _S_select_on_copy(const _Alloc& __a) 6011: { return _Base_type::select_on_container_copy_construction(__a); } 6011: 6011: static void _S_on_swap(_Alloc& __a, _Alloc& __b) 6011: { std::__alloc_on_swap(__a, __b); } 6011: 6011: static constexpr bool _S_propagate_on_copy_assign() 6011: { return _Base_type::propagate_on_container_copy_assignment::value; } 6011: 6011: static constexpr bool _S_propagate_on_move_assign() 6011: { return _Base_type::propagate_on_container_move_assignment::value; } 6011: 6011: static constexpr bool _S_propagate_on_swap() 6011: { return _Base_type::propagate_on_container_swap::value; } 6011: 6011: static constexpr bool _S_always_equal() 6011: { return _Base_type::is_always_equal::value; } 6011: 6011: static constexpr bool _S_nothrow_move() 6011: { return _S_propagate_on_move_assign() || _S_always_equal(); } 6011: 6011: template 6011: struct rebind 6011: { typedef typename _Base_type::template rebind_alloc<_Tp> other; }; 6011: # 158 "/usr/include/c++/8/ext/alloc_traits.h" 3 6011: }; 6011: 6011: 6011: } 6011: # 62 "/usr/include/c++/8/bits/stl_construct.h" 2 3 6011: 6011: namespace std __attribute__ ((__visibility__ ("default"))) 6011: { 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: template 6011: inline void 6011: _Construct(_T1* __p, _Args&&... __args) 6011: { ::new(static_cast(__p)) _T1(std::forward<_Args>(__args)...); } 6011: # 87 "/usr/include/c++/8/bits/stl_construct.h" 3 6011: template 6011: inline void 6011: _Construct_novalue(_T1* __p) 6011: { ::new(static_cast(__p)) _T1; } 6011: 6011: 6011: 6011: 6011: template 6011: inline void 6011: _Destroy(_Tp* __pointer) 6011: { __pointer->~_Tp(); } 6011: 6011: template 6011: struct _Destroy_aux 6011: { 6011: template 6011: static void 6011: __destroy(_ForwardIterator __first, _ForwardIterator __last) 6011: { 6011: for (; __first != __last; ++__first) 6011: std::_Destroy(std::__addressof(*__first)); 6011: } 6011: }; 6011: 6011: template<> 6011: struct _Destroy_aux 6011: { 6011: template 6011: static void 6011: __destroy(_ForwardIterator, _ForwardIterator) { } 6011: }; 6011: 6011: 6011: 6011: 6011: 6011: 6011: template 6011: inline void 6011: _Destroy(_ForwardIterator __first, _ForwardIterator __last) 6011: { 6011: typedef typename iterator_traits<_ForwardIterator>::value_type 6011: _Value_type; 6011: 6011: 6011: static_assert(is_destructible<_Value_type>::value, 6011: "value type is destructible"); 6011: 6011: std::_Destroy_aux<__has_trivial_destructor(_Value_type)>:: 6011: __destroy(__first, __last); 6011: } 6011: 6011: template 6011: struct _Destroy_n_aux 6011: { 6011: template 6011: static _ForwardIterator 6011: __destroy_n(_ForwardIterator __first, _Size __count) 6011: { 6011: for (; __count > 0; (void)++__first, --__count) 6011: std::_Destroy(std::__addressof(*__first)); 6011: return __first; 6011: } 6011: }; 6011: 6011: template<> 6011: struct _Destroy_n_aux 6011: { 6011: template 6011: static _ForwardIterator 6011: __destroy_n(_ForwardIterator __first, _Size __count) 6011: { 6011: std::advance(__first, __count); 6011: return __first; 6011: } 6011: }; 6011: 6011: 6011: 6011: 6011: 6011: 6011: template 6011: inline _ForwardIterator 6011: _Destroy_n(_ForwardIterator __first, _Size __count) 6011: { 6011: typedef typename iterator_traits<_ForwardIterator>::value_type 6011: _Value_type; 6011: 6011: 6011: static_assert(is_destructible<_Value_type>::value, 6011: "value type is destructible"); 6011: 6011: return std::_Destroy_n_aux<__has_trivial_destructor(_Value_type)>:: 6011: __destroy_n(__first, __count); 6011: } 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: template 6011: void 6011: _Destroy(_ForwardIterator __first, _ForwardIterator __last, 6011: _Allocator& __alloc) 6011: { 6011: typedef __gnu_cxx::__alloc_traits<_Allocator> __traits; 6011: for (; __first != __last; ++__first) 6011: __traits::destroy(__alloc, std::__addressof(*__first)); 6011: } 6011: 6011: template 6011: inline void 6011: _Destroy(_ForwardIterator __first, _ForwardIterator __last, 6011: allocator<_Tp>&) 6011: { 6011: _Destroy(__first, __last); 6011: } 6011: # 232 "/usr/include/c++/8/bits/stl_construct.h" 3 6011: 6011: } 6011: # 63 "/usr/include/c++/8/vector" 2 3 6011: # 1 "/usr/include/c++/8/bits/stl_uninitialized.h" 1 3 6011: # 67 "/usr/include/c++/8/bits/stl_uninitialized.h" 3 6011: namespace std __attribute__ ((__visibility__ ("default"))) 6011: { 6011: 6011: 6011: template 6011: struct __uninitialized_copy 6011: { 6011: template 6011: static _ForwardIterator 6011: __uninit_copy(_InputIterator __first, _InputIterator __last, 6011: _ForwardIterator __result) 6011: { 6011: _ForwardIterator __cur = __result; 6011: try 6011: { 6011: for (; __first != __last; ++__first, (void)++__cur) 6011: std::_Construct(std::__addressof(*__cur), *__first); 6011: return __cur; 6011: } 6011: catch(...) 6011: { 6011: std::_Destroy(__result, __cur); 6011: throw; 6011: } 6011: } 6011: }; 6011: 6011: template<> 6011: struct __uninitialized_copy 6011: { 6011: template 6011: static _ForwardIterator 6011: __uninit_copy(_InputIterator __first, _InputIterator __last, 6011: _ForwardIterator __result) 6011: { return std::copy(__first, __last, __result); } 6011: }; 6011: # 113 "/usr/include/c++/8/bits/stl_uninitialized.h" 3 6011: template 6011: inline _ForwardIterator 6011: uninitialized_copy(_InputIterator __first, _InputIterator __last, 6011: _ForwardIterator __result) 6011: { 6011: typedef typename iterator_traits<_InputIterator>::value_type 6011: _ValueType1; 6011: typedef typename iterator_traits<_ForwardIterator>::value_type 6011: _ValueType2; 6011: 6011: 6011: 6011: 6011: typedef typename iterator_traits<_InputIterator>::reference _RefType1; 6011: typedef typename iterator_traits<_ForwardIterator>::reference _RefType2; 6011: const bool __assignable = is_assignable<_RefType2, _RefType1>::value; 6011: 6011: 6011: return std::__uninitialized_copy<__is_trivial(_ValueType1) 6011: && __is_trivial(_ValueType2) 6011: && __assignable>:: 6011: __uninit_copy(__first, __last, __result); 6011: } 6011: 6011: 6011: template 6011: struct __uninitialized_fill 6011: { 6011: template 6011: static void 6011: __uninit_fill(_ForwardIterator __first, _ForwardIterator __last, 6011: const _Tp& __x) 6011: { 6011: _ForwardIterator __cur = __first; 6011: try 6011: { 6011: for (; __cur != __last; ++__cur) 6011: std::_Construct(std::__addressof(*__cur), __x); 6011: } 6011: catch(...) 6011: { 6011: std::_Destroy(__first, __cur); 6011: throw; 6011: } 6011: } 6011: }; 6011: 6011: template<> 6011: struct __uninitialized_fill 6011: { 6011: template 6011: static void 6011: __uninit_fill(_ForwardIterator __first, _ForwardIterator __last, 6011: const _Tp& __x) 6011: { std::fill(__first, __last, __x); } 6011: }; 6011: # 179 "/usr/include/c++/8/bits/stl_uninitialized.h" 3 6011: template 6011: inline void 6011: uninitialized_fill(_ForwardIterator __first, _ForwardIterator __last, 6011: const _Tp& __x) 6011: { 6011: typedef typename iterator_traits<_ForwardIterator>::value_type 6011: _ValueType; 6011: 6011: 6011: 6011: 6011: const bool __assignable = is_copy_assignable<_ValueType>::value; 6011: 6011: 6011: std::__uninitialized_fill<__is_trivial(_ValueType) && __assignable>:: 6011: __uninit_fill(__first, __last, __x); 6011: } 6011: 6011: 6011: template 6011: struct __uninitialized_fill_n 6011: { 6011: template 6011: static _ForwardIterator 6011: __uninit_fill_n(_ForwardIterator __first, _Size __n, 6011: const _Tp& __x) 6011: { 6011: _ForwardIterator __cur = __first; 6011: try 6011: { 6011: for (; __n > 0; --__n, (void) ++__cur) 6011: std::_Construct(std::__addressof(*__cur), __x); 6011: return __cur; 6011: } 6011: catch(...) 6011: { 6011: std::_Destroy(__first, __cur); 6011: throw; 6011: } 6011: } 6011: }; 6011: 6011: template<> 6011: struct __uninitialized_fill_n 6011: { 6011: template 6011: static _ForwardIterator 6011: __uninit_fill_n(_ForwardIterator __first, _Size __n, 6011: const _Tp& __x) 6011: { return std::fill_n(__first, __n, __x); } 6011: }; 6011: # 242 "/usr/include/c++/8/bits/stl_uninitialized.h" 3 6011: template 6011: inline _ForwardIterator 6011: uninitialized_fill_n(_ForwardIterator __first, _Size __n, const _Tp& __x) 6011: { 6011: typedef typename iterator_traits<_ForwardIterator>::value_type 6011: _ValueType; 6011: 6011: 6011: 6011: 6011: const bool __assignable = is_copy_assignable<_ValueType>::value; 6011: 6011: return __uninitialized_fill_n<__is_trivial(_ValueType) && __assignable>:: 6011: __uninit_fill_n(__first, __n, __x); 6011: } 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: template 6011: _ForwardIterator 6011: __uninitialized_copy_a(_InputIterator __first, _InputIterator __last, 6011: _ForwardIterator __result, _Allocator& __alloc) 6011: { 6011: _ForwardIterator __cur = __result; 6011: try 6011: { 6011: typedef __gnu_cxx::__alloc_traits<_Allocator> __traits; 6011: for (; __first != __last; ++__first, (void)++__cur) 6011: __traits::construct(__alloc, std::__addressof(*__cur), *__first); 6011: return __cur; 6011: } 6011: catch(...) 6011: { 6011: std::_Destroy(__result, __cur, __alloc); 6011: throw; 6011: } 6011: } 6011: 6011: template 6011: inline _ForwardIterator 6011: __uninitialized_copy_a(_InputIterator __first, _InputIterator __last, 6011: _ForwardIterator __result, allocator<_Tp>&) 6011: { return std::uninitialized_copy(__first, __last, __result); } 6011: 6011: template 6011: inline _ForwardIterator 6011: __uninitialized_move_a(_InputIterator __first, _InputIterator __last, 6011: _ForwardIterator __result, _Allocator& __alloc) 6011: { 6011: return std::__uninitialized_copy_a(std::make_move_iterator(__first), 6011: std::make_move_iterator(__last), 6011: __result, __alloc); 6011: } 6011: 6011: template 6011: inline _ForwardIterator 6011: __uninitialized_move_if_noexcept_a(_InputIterator __first, 6011: _InputIterator __last, 6011: _ForwardIterator __result, 6011: _Allocator& __alloc) 6011: { 6011: return std::__uninitialized_copy_a 6011: (std::__make_move_if_noexcept_iterator(__first), 6011: std::__make_move_if_noexcept_iterator(__last), __result, __alloc); 6011: } 6011: 6011: template 6011: void 6011: __uninitialized_fill_a(_ForwardIterator __first, _ForwardIterator __last, 6011: const _Tp& __x, _Allocator& __alloc) 6011: { 6011: _ForwardIterator __cur = __first; 6011: try 6011: { 6011: typedef __gnu_cxx::__alloc_traits<_Allocator> __traits; 6011: for (; __cur != __last; ++__cur) 6011: __traits::construct(__alloc, std::__addressof(*__cur), __x); 6011: } 6011: catch(...) 6011: { 6011: std::_Destroy(__first, __cur, __alloc); 6011: throw; 6011: } 6011: } 6011: 6011: template 6011: inline void 6011: __uninitialized_fill_a(_ForwardIterator __first, _ForwardIterator __last, 6011: const _Tp& __x, allocator<_Tp2>&) 6011: { std::uninitialized_fill(__first, __last, __x); } 6011: 6011: template 6011: _ForwardIterator 6011: __uninitialized_fill_n_a(_ForwardIterator __first, _Size __n, 6011: const _Tp& __x, _Allocator& __alloc) 6011: { 6011: _ForwardIterator __cur = __first; 6011: try 6011: { 6011: typedef __gnu_cxx::__alloc_traits<_Allocator> __traits; 6011: for (; __n > 0; --__n, (void) ++__cur) 6011: __traits::construct(__alloc, std::__addressof(*__cur), __x); 6011: return __cur; 6011: } 6011: catch(...) 6011: { 6011: std::_Destroy(__first, __cur, __alloc); 6011: throw; 6011: } 6011: } 6011: 6011: template 6011: inline _ForwardIterator 6011: __uninitialized_fill_n_a(_ForwardIterator __first, _Size __n, 6011: const _Tp& __x, allocator<_Tp2>&) 6011: { return std::uninitialized_fill_n(__first, __n, __x); } 6011: # 378 "/usr/include/c++/8/bits/stl_uninitialized.h" 3 6011: template 6011: inline _ForwardIterator 6011: __uninitialized_copy_move(_InputIterator1 __first1, 6011: _InputIterator1 __last1, 6011: _InputIterator2 __first2, 6011: _InputIterator2 __last2, 6011: _ForwardIterator __result, 6011: _Allocator& __alloc) 6011: { 6011: _ForwardIterator __mid = std::__uninitialized_copy_a(__first1, __last1, 6011: __result, 6011: __alloc); 6011: try 6011: { 6011: return std::__uninitialized_move_a(__first2, __last2, __mid, __alloc); 6011: } 6011: catch(...) 6011: { 6011: std::_Destroy(__result, __mid, __alloc); 6011: throw; 6011: } 6011: } 6011: 6011: 6011: 6011: 6011: 6011: template 6011: inline _ForwardIterator 6011: __uninitialized_move_copy(_InputIterator1 __first1, 6011: _InputIterator1 __last1, 6011: _InputIterator2 __first2, 6011: _InputIterator2 __last2, 6011: _ForwardIterator __result, 6011: _Allocator& __alloc) 6011: { 6011: _ForwardIterator __mid = std::__uninitialized_move_a(__first1, __last1, 6011: __result, 6011: __alloc); 6011: try 6011: { 6011: return std::__uninitialized_copy_a(__first2, __last2, __mid, __alloc); 6011: } 6011: catch(...) 6011: { 6011: std::_Destroy(__result, __mid, __alloc); 6011: throw; 6011: } 6011: } 6011: 6011: 6011: 6011: 6011: template 6011: inline _ForwardIterator 6011: __uninitialized_fill_move(_ForwardIterator __result, _ForwardIterator __mid, 6011: const _Tp& __x, _InputIterator __first, 6011: _InputIterator __last, _Allocator& __alloc) 6011: { 6011: std::__uninitialized_fill_a(__result, __mid, __x, __alloc); 6011: try 6011: { 6011: return std::__uninitialized_move_a(__first, __last, __mid, __alloc); 6011: } 6011: catch(...) 6011: { 6011: std::_Destroy(__result, __mid, __alloc); 6011: throw; 6011: } 6011: } 6011: 6011: 6011: 6011: 6011: template 6011: inline void 6011: __uninitialized_move_fill(_InputIterator __first1, _InputIterator __last1, 6011: _ForwardIterator __first2, 6011: _ForwardIterator __last2, const _Tp& __x, 6011: _Allocator& __alloc) 6011: { 6011: _ForwardIterator __mid2 = std::__uninitialized_move_a(__first1, __last1, 6011: __first2, 6011: __alloc); 6011: try 6011: { 6011: std::__uninitialized_fill_a(__mid2, __last2, __x, __alloc); 6011: } 6011: catch(...) 6011: { 6011: std::_Destroy(__first2, __mid2, __alloc); 6011: throw; 6011: } 6011: } 6011: 6011: 6011: 6011: 6011: 6011: template 6011: struct __uninitialized_default_1 6011: { 6011: template 6011: static void 6011: __uninit_default(_ForwardIterator __first, _ForwardIterator __last) 6011: { 6011: _ForwardIterator __cur = __first; 6011: try 6011: { 6011: for (; __cur != __last; ++__cur) 6011: std::_Construct(std::__addressof(*__cur)); 6011: } 6011: catch(...) 6011: { 6011: std::_Destroy(__first, __cur); 6011: throw; 6011: } 6011: } 6011: }; 6011: 6011: template<> 6011: struct __uninitialized_default_1 6011: { 6011: template 6011: static void 6011: __uninit_default(_ForwardIterator __first, _ForwardIterator __last) 6011: { 6011: typedef typename iterator_traits<_ForwardIterator>::value_type 6011: _ValueType; 6011: 6011: std::fill(__first, __last, _ValueType()); 6011: } 6011: }; 6011: 6011: template 6011: struct __uninitialized_default_n_1 6011: { 6011: template 6011: static _ForwardIterator 6011: __uninit_default_n(_ForwardIterator __first, _Size __n) 6011: { 6011: _ForwardIterator __cur = __first; 6011: try 6011: { 6011: for (; __n > 0; --__n, (void) ++__cur) 6011: std::_Construct(std::__addressof(*__cur)); 6011: return __cur; 6011: } 6011: catch(...) 6011: { 6011: std::_Destroy(__first, __cur); 6011: throw; 6011: } 6011: } 6011: }; 6011: 6011: template<> 6011: struct __uninitialized_default_n_1 6011: { 6011: template 6011: static _ForwardIterator 6011: __uninit_default_n(_ForwardIterator __first, _Size __n) 6011: { 6011: typedef typename iterator_traits<_ForwardIterator>::value_type 6011: _ValueType; 6011: 6011: return std::fill_n(__first, __n, _ValueType()); 6011: } 6011: }; 6011: 6011: 6011: 6011: 6011: template 6011: inline void 6011: __uninitialized_default(_ForwardIterator __first, 6011: _ForwardIterator __last) 6011: { 6011: typedef typename iterator_traits<_ForwardIterator>::value_type 6011: _ValueType; 6011: 6011: const bool __assignable = is_copy_assignable<_ValueType>::value; 6011: 6011: std::__uninitialized_default_1<__is_trivial(_ValueType) 6011: && __assignable>:: 6011: __uninit_default(__first, __last); 6011: } 6011: 6011: 6011: 6011: template 6011: inline _ForwardIterator 6011: __uninitialized_default_n(_ForwardIterator __first, _Size __n) 6011: { 6011: typedef typename iterator_traits<_ForwardIterator>::value_type 6011: _ValueType; 6011: 6011: const bool __assignable = is_copy_assignable<_ValueType>::value; 6011: 6011: return __uninitialized_default_n_1<__is_trivial(_ValueType) 6011: && __assignable>:: 6011: __uninit_default_n(__first, __n); 6011: } 6011: 6011: 6011: 6011: 6011: 6011: template 6011: void 6011: __uninitialized_default_a(_ForwardIterator __first, 6011: _ForwardIterator __last, 6011: _Allocator& __alloc) 6011: { 6011: _ForwardIterator __cur = __first; 6011: try 6011: { 6011: typedef __gnu_cxx::__alloc_traits<_Allocator> __traits; 6011: for (; __cur != __last; ++__cur) 6011: __traits::construct(__alloc, std::__addressof(*__cur)); 6011: } 6011: catch(...) 6011: { 6011: std::_Destroy(__first, __cur, __alloc); 6011: throw; 6011: } 6011: } 6011: 6011: template 6011: inline void 6011: __uninitialized_default_a(_ForwardIterator __first, 6011: _ForwardIterator __last, 6011: allocator<_Tp>&) 6011: { std::__uninitialized_default(__first, __last); } 6011: 6011: 6011: 6011: 6011: 6011: template 6011: _ForwardIterator 6011: __uninitialized_default_n_a(_ForwardIterator __first, _Size __n, 6011: _Allocator& __alloc) 6011: { 6011: _ForwardIterator __cur = __first; 6011: try 6011: { 6011: typedef __gnu_cxx::__alloc_traits<_Allocator> __traits; 6011: for (; __n > 0; --__n, (void) ++__cur) 6011: __traits::construct(__alloc, std::__addressof(*__cur)); 6011: return __cur; 6011: } 6011: catch(...) 6011: { 6011: std::_Destroy(__first, __cur, __alloc); 6011: throw; 6011: } 6011: } 6011: 6011: template 6011: inline _ForwardIterator 6011: __uninitialized_default_n_a(_ForwardIterator __first, _Size __n, 6011: allocator<_Tp>&) 6011: { return std::__uninitialized_default_n(__first, __n); } 6011: 6011: template 6011: struct __uninitialized_default_novalue_1 6011: { 6011: template 6011: static void 6011: __uninit_default_novalue(_ForwardIterator __first, 6011: _ForwardIterator __last) 6011: { 6011: _ForwardIterator __cur = __first; 6011: try 6011: { 6011: for (; __cur != __last; ++__cur) 6011: std::_Construct_novalue(std::__addressof(*__cur)); 6011: } 6011: catch(...) 6011: { 6011: std::_Destroy(__first, __cur); 6011: throw; 6011: } 6011: } 6011: }; 6011: 6011: template<> 6011: struct __uninitialized_default_novalue_1 6011: { 6011: template 6011: static void 6011: __uninit_default_novalue(_ForwardIterator __first, 6011: _ForwardIterator __last) 6011: { 6011: } 6011: }; 6011: 6011: template 6011: struct __uninitialized_default_novalue_n_1 6011: { 6011: template 6011: static _ForwardIterator 6011: __uninit_default_novalue_n(_ForwardIterator __first, _Size __n) 6011: { 6011: _ForwardIterator __cur = __first; 6011: try 6011: { 6011: for (; __n > 0; --__n, (void) ++__cur) 6011: std::_Construct_novalue(std::__addressof(*__cur)); 6011: return __cur; 6011: } 6011: catch(...) 6011: { 6011: std::_Destroy(__first, __cur); 6011: throw; 6011: } 6011: } 6011: }; 6011: 6011: template<> 6011: struct __uninitialized_default_novalue_n_1 6011: { 6011: template 6011: static _ForwardIterator 6011: __uninit_default_novalue_n(_ForwardIterator __first, _Size __n) 6011: { return std::next(__first, __n); } 6011: }; 6011: 6011: 6011: 6011: 6011: template 6011: inline void 6011: __uninitialized_default_novalue(_ForwardIterator __first, 6011: _ForwardIterator __last) 6011: { 6011: typedef typename iterator_traits<_ForwardIterator>::value_type 6011: _ValueType; 6011: 6011: std::__uninitialized_default_novalue_1< 6011: is_trivially_default_constructible<_ValueType>::value>:: 6011: __uninit_default_novalue(__first, __last); 6011: } 6011: 6011: 6011: 6011: template 6011: inline _ForwardIterator 6011: __uninitialized_default_novalue_n(_ForwardIterator __first, _Size __n) 6011: { 6011: typedef typename iterator_traits<_ForwardIterator>::value_type 6011: _ValueType; 6011: 6011: return __uninitialized_default_novalue_n_1< 6011: is_trivially_default_constructible<_ValueType>::value>:: 6011: __uninit_default_novalue_n(__first, __n); 6011: } 6011: 6011: template 6011: _ForwardIterator 6011: __uninitialized_copy_n(_InputIterator __first, _Size __n, 6011: _ForwardIterator __result, input_iterator_tag) 6011: { 6011: _ForwardIterator __cur = __result; 6011: try 6011: { 6011: for (; __n > 0; --__n, (void) ++__first, ++__cur) 6011: std::_Construct(std::__addressof(*__cur), *__first); 6011: return __cur; 6011: } 6011: catch(...) 6011: { 6011: std::_Destroy(__result, __cur); 6011: throw; 6011: } 6011: } 6011: 6011: template 6011: inline _ForwardIterator 6011: __uninitialized_copy_n(_RandomAccessIterator __first, _Size __n, 6011: _ForwardIterator __result, 6011: random_access_iterator_tag) 6011: { return std::uninitialized_copy(__first, __first + __n, __result); } 6011: 6011: template 6011: pair<_InputIterator, _ForwardIterator> 6011: __uninitialized_copy_n_pair(_InputIterator __first, _Size __n, 6011: _ForwardIterator __result, input_iterator_tag) 6011: { 6011: _ForwardIterator __cur = __result; 6011: try 6011: { 6011: for (; __n > 0; --__n, (void) ++__first, ++__cur) 6011: std::_Construct(std::__addressof(*__cur), *__first); 6011: return {__first, __cur}; 6011: } 6011: catch(...) 6011: { 6011: std::_Destroy(__result, __cur); 6011: throw; 6011: } 6011: } 6011: 6011: template 6011: inline pair<_RandomAccessIterator, _ForwardIterator> 6011: __uninitialized_copy_n_pair(_RandomAccessIterator __first, _Size __n, 6011: _ForwardIterator __result, 6011: random_access_iterator_tag) 6011: { 6011: auto __second_res = uninitialized_copy(__first, __first + __n, __result); 6011: auto __first_res = std::next(__first, __n); 6011: return {__first_res, __second_res}; 6011: } 6011: # 810 "/usr/include/c++/8/bits/stl_uninitialized.h" 3 6011: template 6011: inline _ForwardIterator 6011: uninitialized_copy_n(_InputIterator __first, _Size __n, 6011: _ForwardIterator __result) 6011: { return std::__uninitialized_copy_n(__first, __n, __result, 6011: std::__iterator_category(__first)); } 6011: 6011: template 6011: inline pair<_InputIterator, _ForwardIterator> 6011: __uninitialized_copy_n_pair(_InputIterator __first, _Size __n, 6011: _ForwardIterator __result) 6011: { 6011: return 6011: std::__uninitialized_copy_n_pair(__first, __n, __result, 6011: std::__iterator_category(__first)); 6011: } 6011: # 882 "/usr/include/c++/8/bits/stl_uninitialized.h" 3 6011: 6011: } 6011: # 64 "/usr/include/c++/8/vector" 2 3 6011: # 1 "/usr/include/c++/8/bits/stl_vector.h" 1 3 6011: # 63 "/usr/include/c++/8/bits/stl_vector.h" 3 6011: # 1 "/usr/include/c++/8/initializer_list" 1 3 6011: # 33 "/usr/include/c++/8/initializer_list" 3 6011: 6011: # 34 "/usr/include/c++/8/initializer_list" 3 6011: 6011: 6011: 6011: 6011: 6011: #pragma GCC visibility push(default) 6011: 6011: 6011: 6011: namespace std 6011: { 6011: 6011: template 6011: class initializer_list 6011: { 6011: public: 6011: typedef _E value_type; 6011: typedef const _E& reference; 6011: typedef const _E& const_reference; 6011: typedef size_t size_type; 6011: typedef const _E* iterator; 6011: typedef const _E* const_iterator; 6011: 6011: private: 6011: iterator _M_array; 6011: size_type _M_len; 6011: 6011: 6011: constexpr initializer_list(const_iterator __a, size_type __l) 6011: : _M_array(__a), _M_len(__l) { } 6011: 6011: public: 6011: constexpr initializer_list() noexcept 6011: : _M_array(0), _M_len(0) { } 6011: 6011: 6011: constexpr size_type 6011: size() const noexcept { return _M_len; } 6011: 6011: 6011: constexpr const_iterator 6011: begin() const noexcept { return _M_array; } 6011: 6011: 6011: constexpr const_iterator 6011: end() const noexcept { return begin() + size(); } 6011: }; 6011: 6011: 6011: 6011: 6011: 6011: 6011: template 6011: constexpr const _Tp* 6011: begin(initializer_list<_Tp> __ils) noexcept 6011: { return __ils.begin(); } 6011: 6011: 6011: 6011: 6011: 6011: 6011: template 6011: constexpr const _Tp* 6011: end(initializer_list<_Tp> __ils) noexcept 6011: { return __ils.end(); } 6011: } 6011: 6011: #pragma GCC visibility pop 6011: # 64 "/usr/include/c++/8/bits/stl_vector.h" 2 3 6011: # 74 "/usr/include/c++/8/bits/stl_vector.h" 3 6011: namespace std __attribute__ ((__visibility__ ("default"))) 6011: { 6011: 6011: 6011: 6011: 6011: template 6011: struct _Vector_base 6011: { 6011: typedef typename __gnu_cxx::__alloc_traits<_Alloc>::template 6011: rebind<_Tp>::other _Tp_alloc_type; 6011: typedef typename __gnu_cxx::__alloc_traits<_Tp_alloc_type>::pointer 6011: pointer; 6011: 6011: struct _Vector_impl 6011: : public _Tp_alloc_type 6011: { 6011: pointer _M_start; 6011: pointer _M_finish; 6011: pointer _M_end_of_storage; 6011: 6011: _Vector_impl() 6011: : _Tp_alloc_type(), _M_start(), _M_finish(), _M_end_of_storage() 6011: { } 6011: 6011: _Vector_impl(_Tp_alloc_type const& __a) noexcept 6011: : _Tp_alloc_type(__a), _M_start(), _M_finish(), _M_end_of_storage() 6011: { } 6011: 6011: 6011: _Vector_impl(_Tp_alloc_type&& __a) noexcept 6011: : _Tp_alloc_type(std::move(__a)), 6011: _M_start(), _M_finish(), _M_end_of_storage() 6011: { } 6011: 6011: 6011: void _M_swap_data(_Vector_impl& __x) noexcept 6011: { 6011: std::swap(_M_start, __x._M_start); 6011: std::swap(_M_finish, __x._M_finish); 6011: std::swap(_M_end_of_storage, __x._M_end_of_storage); 6011: } 6011: # 231 "/usr/include/c++/8/bits/stl_vector.h" 3 6011: }; 6011: 6011: public: 6011: typedef _Alloc allocator_type; 6011: 6011: _Tp_alloc_type& 6011: _M_get_Tp_allocator() noexcept 6011: { return *static_cast<_Tp_alloc_type*>(&this->_M_impl); } 6011: 6011: const _Tp_alloc_type& 6011: _M_get_Tp_allocator() const noexcept 6011: { return *static_cast(&this->_M_impl); } 6011: 6011: allocator_type 6011: get_allocator() const noexcept 6011: { return allocator_type(_M_get_Tp_allocator()); } 6011: 6011: _Vector_base() 6011: : _M_impl() { } 6011: 6011: _Vector_base(const allocator_type& __a) noexcept 6011: : _M_impl(__a) { } 6011: 6011: _Vector_base(size_t __n) 6011: : _M_impl() 6011: { _M_create_storage(__n); } 6011: 6011: _Vector_base(size_t __n, const allocator_type& __a) 6011: : _M_impl(__a) 6011: { _M_create_storage(__n); } 6011: 6011: 6011: _Vector_base(_Tp_alloc_type&& __a) noexcept 6011: : _M_impl(std::move(__a)) { } 6011: 6011: _Vector_base(_Vector_base&& __x) noexcept 6011: : _M_impl(std::move(__x._M_get_Tp_allocator())) 6011: { this->_M_impl._M_swap_data(__x._M_impl); } 6011: 6011: _Vector_base(_Vector_base&& __x, const allocator_type& __a) 6011: : _M_impl(__a) 6011: { 6011: if (__x.get_allocator() == __a) 6011: this->_M_impl._M_swap_data(__x._M_impl); 6011: else 6011: { 6011: size_t __n = __x._M_impl._M_finish - __x._M_impl._M_start; 6011: _M_create_storage(__n); 6011: } 6011: } 6011: 6011: 6011: ~_Vector_base() noexcept 6011: { 6011: _M_deallocate(_M_impl._M_start, 6011: _M_impl._M_end_of_storage - _M_impl._M_start); 6011: } 6011: 6011: public: 6011: _Vector_impl _M_impl; 6011: 6011: pointer 6011: _M_allocate(size_t __n) 6011: { 6011: typedef __gnu_cxx::__alloc_traits<_Tp_alloc_type> _Tr; 6011: return __n != 0 ? _Tr::allocate(_M_impl, __n) : pointer(); 6011: } 6011: 6011: void 6011: _M_deallocate(pointer __p, size_t __n) 6011: { 6011: typedef __gnu_cxx::__alloc_traits<_Tp_alloc_type> _Tr; 6011: if (__p) 6011: _Tr::deallocate(_M_impl, __p, __n); 6011: } 6011: 6011: private: 6011: void 6011: _M_create_storage(size_t __n) 6011: { 6011: this->_M_impl._M_start = this->_M_allocate(__n); 6011: this->_M_impl._M_finish = this->_M_impl._M_start; 6011: this->_M_impl._M_end_of_storage = this->_M_impl._M_start + __n; 6011: } 6011: }; 6011: # 338 "/usr/include/c++/8/bits/stl_vector.h" 3 6011: template > 6011: class vector : protected _Vector_base<_Tp, _Alloc> 6011: { 6011: # 351 "/usr/include/c++/8/bits/stl_vector.h" 3 6011: static_assert(is_same::type, _Tp>::value, 6011: "std::vector must have a non-const, non-volatile value_type"); 6011: 6011: 6011: 6011: 6011: 6011: 6011: typedef _Vector_base<_Tp, _Alloc> _Base; 6011: typedef typename _Base::_Tp_alloc_type _Tp_alloc_type; 6011: typedef __gnu_cxx::__alloc_traits<_Tp_alloc_type> _Alloc_traits; 6011: 6011: public: 6011: typedef _Tp value_type; 6011: typedef typename _Base::pointer pointer; 6011: typedef typename _Alloc_traits::const_pointer const_pointer; 6011: typedef typename _Alloc_traits::reference reference; 6011: typedef typename _Alloc_traits::const_reference const_reference; 6011: typedef __gnu_cxx::__normal_iterator iterator; 6011: typedef __gnu_cxx::__normal_iterator 6011: const_iterator; 6011: typedef std::reverse_iterator const_reverse_iterator; 6011: typedef std::reverse_iterator reverse_iterator; 6011: typedef size_t size_type; 6011: typedef ptrdiff_t difference_type; 6011: typedef _Alloc allocator_type; 6011: 6011: protected: 6011: using _Base::_M_allocate; 6011: using _Base::_M_deallocate; 6011: using _Base::_M_impl; 6011: using _Base::_M_get_Tp_allocator; 6011: 6011: public: 6011: 6011: 6011: 6011: 6011: 6011: 6011: vector() 6011: 6011: noexcept(is_nothrow_default_constructible<_Alloc>::value) 6011: 6011: : _Base() { } 6011: 6011: 6011: 6011: 6011: 6011: explicit 6011: vector(const allocator_type& __a) noexcept 6011: : _Base(__a) { } 6011: # 414 "/usr/include/c++/8/bits/stl_vector.h" 3 6011: explicit 6011: vector(size_type __n, const allocator_type& __a = allocator_type()) 6011: : _Base(__n, __a) 6011: { _M_default_initialize(__n); } 6011: # 427 "/usr/include/c++/8/bits/stl_vector.h" 3 6011: vector(size_type __n, const value_type& __value, 6011: const allocator_type& __a = allocator_type()) 6011: : _Base(__n, __a) 6011: { _M_fill_initialize(__n, __value); } 6011: # 458 "/usr/include/c++/8/bits/stl_vector.h" 3 6011: vector(const vector& __x) 6011: : _Base(__x.size(), 6011: _Alloc_traits::_S_select_on_copy(__x._M_get_Tp_allocator())) 6011: { 6011: this->_M_impl._M_finish = 6011: std::__uninitialized_copy_a(__x.begin(), __x.end(), 6011: this->_M_impl._M_start, 6011: _M_get_Tp_allocator()); 6011: } 6011: # 476 "/usr/include/c++/8/bits/stl_vector.h" 3 6011: vector(vector&& __x) noexcept 6011: : _Base(std::move(__x)) { } 6011: 6011: 6011: vector(const vector& __x, const allocator_type& __a) 6011: : _Base(__x.size(), __a) 6011: { 6011: this->_M_impl._M_finish = 6011: std::__uninitialized_copy_a(__x.begin(), __x.end(), 6011: this->_M_impl._M_start, 6011: _M_get_Tp_allocator()); 6011: } 6011: 6011: 6011: vector(vector&& __rv, const allocator_type& __m) 6011: noexcept(_Alloc_traits::_S_always_equal()) 6011: : _Base(std::move(__rv), __m) 6011: { 6011: if (__rv.get_allocator() != __m) 6011: { 6011: this->_M_impl._M_finish = 6011: std::__uninitialized_move_a(__rv.begin(), __rv.end(), 6011: this->_M_impl._M_start, 6011: _M_get_Tp_allocator()); 6011: __rv.clear(); 6011: } 6011: } 6011: # 515 "/usr/include/c++/8/bits/stl_vector.h" 3 6011: vector(initializer_list __l, 6011: const allocator_type& __a = allocator_type()) 6011: : _Base(__a) 6011: { 6011: _M_range_initialize(__l.begin(), __l.end(), 6011: random_access_iterator_tag()); 6011: } 6011: # 541 "/usr/include/c++/8/bits/stl_vector.h" 3 6011: template> 6011: vector(_InputIterator __first, _InputIterator __last, 6011: const allocator_type& __a = allocator_type()) 6011: : _Base(__a) 6011: { _M_initialize_dispatch(__first, __last, __false_type()); } 6011: # 565 "/usr/include/c++/8/bits/stl_vector.h" 3 6011: ~vector() noexcept 6011: { 6011: std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish, 6011: _M_get_Tp_allocator()); 6011: ; 6011: } 6011: # 581 "/usr/include/c++/8/bits/stl_vector.h" 3 6011: vector& 6011: operator=(const vector& __x); 6011: # 595 "/usr/include/c++/8/bits/stl_vector.h" 3 6011: vector& 6011: operator=(vector&& __x) noexcept(_Alloc_traits::_S_nothrow_move()) 6011: { 6011: constexpr bool __move_storage = 6011: _Alloc_traits::_S_propagate_on_move_assign() 6011: || _Alloc_traits::_S_always_equal(); 6011: _M_move_assign(std::move(__x), __bool_constant<__move_storage>()); 6011: return *this; 6011: } 6011: # 616 "/usr/include/c++/8/bits/stl_vector.h" 3 6011: vector& 6011: operator=(initializer_list __l) 6011: { 6011: this->_M_assign_aux(__l.begin(), __l.end(), 6011: random_access_iterator_tag()); 6011: return *this; 6011: } 6011: # 635 "/usr/include/c++/8/bits/stl_vector.h" 3 6011: void 6011: assign(size_type __n, const value_type& __val) 6011: { _M_fill_assign(__n, __val); } 6011: # 652 "/usr/include/c++/8/bits/stl_vector.h" 3 6011: template> 6011: void 6011: assign(_InputIterator __first, _InputIterator __last) 6011: { _M_assign_dispatch(__first, __last, __false_type()); } 6011: # 680 "/usr/include/c++/8/bits/stl_vector.h" 3 6011: void 6011: assign(initializer_list __l) 6011: { 6011: this->_M_assign_aux(__l.begin(), __l.end(), 6011: random_access_iterator_tag()); 6011: } 6011: 6011: 6011: 6011: using _Base::get_allocator; 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: iterator 6011: begin() noexcept 6011: { return iterator(this->_M_impl._M_start); } 6011: 6011: 6011: 6011: 6011: 6011: 6011: const_iterator 6011: begin() const noexcept 6011: { return const_iterator(this->_M_impl._M_start); } 6011: 6011: 6011: 6011: 6011: 6011: 6011: iterator 6011: end() noexcept 6011: { return iterator(this->_M_impl._M_finish); } 6011: 6011: 6011: 6011: 6011: 6011: 6011: const_iterator 6011: end() const noexcept 6011: { return const_iterator(this->_M_impl._M_finish); } 6011: 6011: 6011: 6011: 6011: 6011: 6011: reverse_iterator 6011: rbegin() noexcept 6011: { return reverse_iterator(end()); } 6011: 6011: 6011: 6011: 6011: 6011: 6011: const_reverse_iterator 6011: rbegin() const noexcept 6011: { return const_reverse_iterator(end()); } 6011: 6011: 6011: 6011: 6011: 6011: 6011: reverse_iterator 6011: rend() noexcept 6011: { return reverse_iterator(begin()); } 6011: 6011: 6011: 6011: 6011: 6011: 6011: const_reverse_iterator 6011: rend() const noexcept 6011: { return const_reverse_iterator(begin()); } 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: const_iterator 6011: cbegin() const noexcept 6011: { return const_iterator(this->_M_impl._M_start); } 6011: 6011: 6011: 6011: 6011: 6011: 6011: const_iterator 6011: cend() const noexcept 6011: { return const_iterator(this->_M_impl._M_finish); } 6011: 6011: 6011: 6011: 6011: 6011: 6011: const_reverse_iterator 6011: crbegin() const noexcept 6011: { return const_reverse_iterator(end()); } 6011: 6011: 6011: 6011: 6011: 6011: 6011: const_reverse_iterator 6011: crend() const noexcept 6011: { return const_reverse_iterator(begin()); } 6011: 6011: 6011: 6011: 6011: size_type 6011: size() const noexcept 6011: { return size_type(this->_M_impl._M_finish - this->_M_impl._M_start); } 6011: 6011: 6011: size_type 6011: max_size() const noexcept 6011: { return _Alloc_traits::max_size(_M_get_Tp_allocator()); } 6011: # 823 "/usr/include/c++/8/bits/stl_vector.h" 3 6011: void 6011: resize(size_type __new_size) 6011: { 6011: if (__new_size > size()) 6011: _M_default_append(__new_size - size()); 6011: else if (__new_size < size()) 6011: _M_erase_at_end(this->_M_impl._M_start + __new_size); 6011: } 6011: # 843 "/usr/include/c++/8/bits/stl_vector.h" 3 6011: void 6011: resize(size_type __new_size, const value_type& __x) 6011: { 6011: if (__new_size > size()) 6011: _M_fill_insert(end(), __new_size - size(), __x); 6011: else if (__new_size < size()) 6011: _M_erase_at_end(this->_M_impl._M_start + __new_size); 6011: } 6011: # 875 "/usr/include/c++/8/bits/stl_vector.h" 3 6011: void 6011: shrink_to_fit() 6011: { _M_shrink_to_fit(); } 6011: 6011: 6011: 6011: 6011: 6011: 6011: size_type 6011: capacity() const noexcept 6011: { return size_type(this->_M_impl._M_end_of_storage 6011: - this->_M_impl._M_start); } 6011: 6011: 6011: 6011: 6011: 6011: bool 6011: empty() const noexcept 6011: { return begin() == end(); } 6011: # 914 "/usr/include/c++/8/bits/stl_vector.h" 3 6011: void 6011: reserve(size_type __n); 6011: # 929 "/usr/include/c++/8/bits/stl_vector.h" 3 6011: reference 6011: operator[](size_type __n) noexcept 6011: { 6011: ; 6011: return *(this->_M_impl._M_start + __n); 6011: } 6011: # 947 "/usr/include/c++/8/bits/stl_vector.h" 3 6011: const_reference 6011: operator[](size_type __n) const noexcept 6011: { 6011: ; 6011: return *(this->_M_impl._M_start + __n); 6011: } 6011: 6011: protected: 6011: 6011: void 6011: _M_range_check(size_type __n) const 6011: { 6011: if (__n >= this->size()) 6011: __throw_out_of_range_fmt(("vector::_M_range_check: __n " "(which is %zu) >= this->size() " "(which is %zu)") 6011: 6011: , 6011: __n, this->size()); 6011: } 6011: 6011: public: 6011: # 978 "/usr/include/c++/8/bits/stl_vector.h" 3 6011: reference 6011: at(size_type __n) 6011: { 6011: _M_range_check(__n); 6011: return (*this)[__n]; 6011: } 6011: # 996 "/usr/include/c++/8/bits/stl_vector.h" 3 6011: const_reference 6011: at(size_type __n) const 6011: { 6011: _M_range_check(__n); 6011: return (*this)[__n]; 6011: } 6011: 6011: 6011: 6011: 6011: 6011: reference 6011: front() noexcept 6011: { 6011: ; 6011: return *begin(); 6011: } 6011: 6011: 6011: 6011: 6011: 6011: const_reference 6011: front() const noexcept 6011: { 6011: ; 6011: return *begin(); 6011: } 6011: 6011: 6011: 6011: 6011: 6011: reference 6011: back() noexcept 6011: { 6011: ; 6011: return *(end() - 1); 6011: } 6011: 6011: 6011: 6011: 6011: 6011: const_reference 6011: back() const noexcept 6011: { 6011: ; 6011: return *(end() - 1); 6011: } 6011: # 1054 "/usr/include/c++/8/bits/stl_vector.h" 3 6011: _Tp* 6011: data() noexcept 6011: { return _M_data_ptr(this->_M_impl._M_start); } 6011: 6011: const _Tp* 6011: data() const noexcept 6011: { return _M_data_ptr(this->_M_impl._M_start); } 6011: # 1073 "/usr/include/c++/8/bits/stl_vector.h" 3 6011: void 6011: push_back(const value_type& __x) 6011: { 6011: if (this->_M_impl._M_finish != this->_M_impl._M_end_of_storage) 6011: { 6011: ; 6011: _Alloc_traits::construct(this->_M_impl, this->_M_impl._M_finish, 6011: __x); 6011: ++this->_M_impl._M_finish; 6011: ; 6011: } 6011: else 6011: _M_realloc_insert(end(), __x); 6011: } 6011: 6011: 6011: void 6011: push_back(value_type&& __x) 6011: { emplace_back(std::move(__x)); } 6011: 6011: template 6011: 6011: 6011: 6011: void 6011: 6011: emplace_back(_Args&&... __args); 6011: # 1111 "/usr/include/c++/8/bits/stl_vector.h" 3 6011: void 6011: pop_back() noexcept 6011: { 6011: ; 6011: --this->_M_impl._M_finish; 6011: _Alloc_traits::destroy(this->_M_impl, this->_M_impl._M_finish); 6011: ; 6011: } 6011: # 1133 "/usr/include/c++/8/bits/stl_vector.h" 3 6011: template 6011: iterator 6011: emplace(const_iterator __position, _Args&&... __args) 6011: { return _M_emplace_aux(__position, std::forward<_Args>(__args)...); } 6011: # 1149 "/usr/include/c++/8/bits/stl_vector.h" 3 6011: iterator 6011: insert(const_iterator __position, const value_type& __x); 6011: # 1179 "/usr/include/c++/8/bits/stl_vector.h" 3 6011: iterator 6011: insert(const_iterator __position, value_type&& __x) 6011: { return _M_insert_rval(__position, std::move(__x)); } 6011: # 1196 "/usr/include/c++/8/bits/stl_vector.h" 3 6011: iterator 6011: insert(const_iterator __position, initializer_list __l) 6011: { 6011: auto __offset = __position - cbegin(); 6011: _M_range_insert(begin() + __offset, __l.begin(), __l.end(), 6011: std::random_access_iterator_tag()); 6011: return begin() + __offset; 6011: } 6011: # 1221 "/usr/include/c++/8/bits/stl_vector.h" 3 6011: iterator 6011: insert(const_iterator __position, size_type __n, const value_type& __x) 6011: { 6011: difference_type __offset = __position - cbegin(); 6011: _M_fill_insert(begin() + __offset, __n, __x); 6011: return begin() + __offset; 6011: } 6011: # 1263 "/usr/include/c++/8/bits/stl_vector.h" 3 6011: template> 6011: iterator 6011: insert(const_iterator __position, _InputIterator __first, 6011: _InputIterator __last) 6011: { 6011: difference_type __offset = __position - cbegin(); 6011: _M_insert_dispatch(begin() + __offset, 6011: __first, __last, __false_type()); 6011: return begin() + __offset; 6011: } 6011: # 1315 "/usr/include/c++/8/bits/stl_vector.h" 3 6011: iterator 6011: 6011: erase(const_iterator __position) 6011: { return _M_erase(begin() + (__position - cbegin())); } 6011: # 1342 "/usr/include/c++/8/bits/stl_vector.h" 3 6011: iterator 6011: 6011: erase(const_iterator __first, const_iterator __last) 6011: { 6011: const auto __beg = begin(); 6011: const auto __cbeg = cbegin(); 6011: return _M_erase(__beg + (__first - __cbeg), __beg + (__last - __cbeg)); 6011: } 6011: # 1366 "/usr/include/c++/8/bits/stl_vector.h" 3 6011: void 6011: swap(vector& __x) noexcept 6011: { 6011: 6011: 6011: ; 6011: 6011: this->_M_impl._M_swap_data(__x._M_impl); 6011: _Alloc_traits::_S_on_swap(_M_get_Tp_allocator(), 6011: __x._M_get_Tp_allocator()); 6011: } 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: void 6011: clear() noexcept 6011: { _M_erase_at_end(this->_M_impl._M_start); } 6011: 6011: protected: 6011: 6011: 6011: 6011: 6011: template 6011: pointer 6011: _M_allocate_and_copy(size_type __n, 6011: _ForwardIterator __first, _ForwardIterator __last) 6011: { 6011: pointer __result = this->_M_allocate(__n); 6011: try 6011: { 6011: std::__uninitialized_copy_a(__first, __last, __result, 6011: _M_get_Tp_allocator()); 6011: return __result; 6011: } 6011: catch(...) 6011: { 6011: _M_deallocate(__result, __n); 6011: throw; 6011: } 6011: } 6011: # 1419 "/usr/include/c++/8/bits/stl_vector.h" 3 6011: template 6011: void 6011: _M_initialize_dispatch(_Integer __n, _Integer __value, __true_type) 6011: { 6011: this->_M_impl._M_start = _M_allocate(static_cast(__n)); 6011: this->_M_impl._M_end_of_storage = 6011: this->_M_impl._M_start + static_cast(__n); 6011: _M_fill_initialize(static_cast(__n), __value); 6011: } 6011: 6011: 6011: template 6011: void 6011: _M_initialize_dispatch(_InputIterator __first, _InputIterator __last, 6011: __false_type) 6011: { 6011: typedef typename std::iterator_traits<_InputIterator>:: 6011: iterator_category _IterCategory; 6011: _M_range_initialize(__first, __last, _IterCategory()); 6011: } 6011: 6011: 6011: template 6011: void 6011: _M_range_initialize(_InputIterator __first, 6011: _InputIterator __last, std::input_iterator_tag) 6011: { 6011: for (; __first != __last; ++__first) 6011: 6011: emplace_back(*__first); 6011: 6011: 6011: 6011: } 6011: 6011: 6011: template 6011: void 6011: _M_range_initialize(_ForwardIterator __first, 6011: _ForwardIterator __last, std::forward_iterator_tag) 6011: { 6011: const size_type __n = std::distance(__first, __last); 6011: this->_M_impl._M_start = this->_M_allocate(__n); 6011: this->_M_impl._M_end_of_storage = this->_M_impl._M_start + __n; 6011: this->_M_impl._M_finish = 6011: std::__uninitialized_copy_a(__first, __last, 6011: this->_M_impl._M_start, 6011: _M_get_Tp_allocator()); 6011: } 6011: 6011: 6011: 6011: void 6011: _M_fill_initialize(size_type __n, const value_type& __value) 6011: { 6011: this->_M_impl._M_finish = 6011: std::__uninitialized_fill_n_a(this->_M_impl._M_start, __n, __value, 6011: _M_get_Tp_allocator()); 6011: } 6011: 6011: 6011: 6011: void 6011: _M_default_initialize(size_type __n) 6011: { 6011: this->_M_impl._M_finish = 6011: std::__uninitialized_default_n_a(this->_M_impl._M_start, __n, 6011: _M_get_Tp_allocator()); 6011: } 6011: # 1497 "/usr/include/c++/8/bits/stl_vector.h" 3 6011: template 6011: void 6011: _M_assign_dispatch(_Integer __n, _Integer __val, __true_type) 6011: { _M_fill_assign(__n, __val); } 6011: 6011: 6011: template 6011: void 6011: _M_assign_dispatch(_InputIterator __first, _InputIterator __last, 6011: __false_type) 6011: { _M_assign_aux(__first, __last, std::__iterator_category(__first)); } 6011: 6011: 6011: template 6011: void 6011: _M_assign_aux(_InputIterator __first, _InputIterator __last, 6011: std::input_iterator_tag); 6011: 6011: 6011: template 6011: void 6011: _M_assign_aux(_ForwardIterator __first, _ForwardIterator __last, 6011: std::forward_iterator_tag); 6011: 6011: 6011: 6011: void 6011: _M_fill_assign(size_type __n, const value_type& __val); 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: template 6011: void 6011: _M_insert_dispatch(iterator __pos, _Integer __n, _Integer __val, 6011: __true_type) 6011: { _M_fill_insert(__pos, __n, __val); } 6011: 6011: 6011: template 6011: void 6011: _M_insert_dispatch(iterator __pos, _InputIterator __first, 6011: _InputIterator __last, __false_type) 6011: { 6011: _M_range_insert(__pos, __first, __last, 6011: std::__iterator_category(__first)); 6011: } 6011: 6011: 6011: template 6011: void 6011: _M_range_insert(iterator __pos, _InputIterator __first, 6011: _InputIterator __last, std::input_iterator_tag); 6011: 6011: 6011: template 6011: void 6011: _M_range_insert(iterator __pos, _ForwardIterator __first, 6011: _ForwardIterator __last, std::forward_iterator_tag); 6011: 6011: 6011: 6011: void 6011: _M_fill_insert(iterator __pos, size_type __n, const value_type& __x); 6011: 6011: 6011: 6011: void 6011: _M_default_append(size_type __n); 6011: 6011: bool 6011: _M_shrink_to_fit(); 6011: # 1584 "/usr/include/c++/8/bits/stl_vector.h" 3 6011: struct _Temporary_value 6011: { 6011: template 6011: explicit 6011: _Temporary_value(vector* __vec, _Args&&... __args) : _M_this(__vec) 6011: { 6011: _Alloc_traits::construct(_M_this->_M_impl, _M_ptr(), 6011: std::forward<_Args>(__args)...); 6011: } 6011: 6011: ~_Temporary_value() 6011: { _Alloc_traits::destroy(_M_this->_M_impl, _M_ptr()); } 6011: 6011: value_type& 6011: _M_val() { return *reinterpret_cast<_Tp*>(&__buf); } 6011: 6011: private: 6011: pointer 6011: _M_ptr() { return pointer_traits::pointer_to(_M_val()); } 6011: 6011: vector* _M_this; 6011: typename aligned_storage::type __buf; 6011: }; 6011: 6011: 6011: 6011: template 6011: void 6011: _M_insert_aux(iterator __position, _Arg&& __arg); 6011: 6011: template 6011: void 6011: _M_realloc_insert(iterator __position, _Args&&... __args); 6011: 6011: 6011: iterator 6011: _M_insert_rval(const_iterator __position, value_type&& __v); 6011: 6011: 6011: template 6011: iterator 6011: _M_emplace_aux(const_iterator __position, _Args&&... __args); 6011: 6011: 6011: iterator 6011: _M_emplace_aux(const_iterator __position, value_type&& __v) 6011: { return _M_insert_rval(__position, std::move(__v)); } 6011: 6011: 6011: 6011: size_type 6011: _M_check_len(size_type __n, const char* __s) const 6011: { 6011: if (max_size() - size() < __n) 6011: __throw_length_error((__s)); 6011: 6011: const size_type __len = size() + std::max(size(), __n); 6011: return (__len < size() || __len > max_size()) ? max_size() : __len; 6011: } 6011: 6011: 6011: 6011: 6011: 6011: void 6011: _M_erase_at_end(pointer __pos) noexcept 6011: { 6011: if (size_type __n = this->_M_impl._M_finish - __pos) 6011: { 6011: std::_Destroy(__pos, this->_M_impl._M_finish, 6011: _M_get_Tp_allocator()); 6011: this->_M_impl._M_finish = __pos; 6011: ; 6011: } 6011: } 6011: 6011: iterator 6011: _M_erase(iterator __position); 6011: 6011: iterator 6011: _M_erase(iterator __first, iterator __last); 6011: 6011: 6011: private: 6011: 6011: 6011: 6011: void 6011: _M_move_assign(vector&& __x, std::true_type) noexcept 6011: { 6011: vector __tmp(get_allocator()); 6011: this->_M_impl._M_swap_data(__tmp._M_impl); 6011: this->_M_impl._M_swap_data(__x._M_impl); 6011: std::__alloc_on_move(_M_get_Tp_allocator(), __x._M_get_Tp_allocator()); 6011: } 6011: 6011: 6011: 6011: void 6011: _M_move_assign(vector&& __x, std::false_type) 6011: { 6011: if (__x._M_get_Tp_allocator() == this->_M_get_Tp_allocator()) 6011: _M_move_assign(std::move(__x), std::true_type()); 6011: else 6011: { 6011: 6011: 6011: this->assign(std::__make_move_if_noexcept_iterator(__x.begin()), 6011: std::__make_move_if_noexcept_iterator(__x.end())); 6011: __x.clear(); 6011: } 6011: } 6011: 6011: 6011: template 6011: _Up* 6011: _M_data_ptr(_Up* __ptr) const noexcept 6011: { return __ptr; } 6011: 6011: 6011: template 6011: typename std::pointer_traits<_Ptr>::element_type* 6011: _M_data_ptr(_Ptr __ptr) const 6011: { return empty() ? nullptr : std::__to_address(__ptr); } 6011: # 1724 "/usr/include/c++/8/bits/stl_vector.h" 3 6011: }; 6011: # 1746 "/usr/include/c++/8/bits/stl_vector.h" 3 6011: template 6011: inline bool 6011: operator==(const vector<_Tp, _Alloc>& __x, const vector<_Tp, _Alloc>& __y) 6011: { return (__x.size() == __y.size() 6011: && std::equal(__x.begin(), __x.end(), __y.begin())); } 6011: # 1763 "/usr/include/c++/8/bits/stl_vector.h" 3 6011: template 6011: inline bool 6011: operator<(const vector<_Tp, _Alloc>& __x, const vector<_Tp, _Alloc>& __y) 6011: { return std::lexicographical_compare(__x.begin(), __x.end(), 6011: __y.begin(), __y.end()); } 6011: 6011: 6011: template 6011: inline bool 6011: operator!=(const vector<_Tp, _Alloc>& __x, const vector<_Tp, _Alloc>& __y) 6011: { return !(__x == __y); } 6011: 6011: 6011: template 6011: inline bool 6011: operator>(const vector<_Tp, _Alloc>& __x, const vector<_Tp, _Alloc>& __y) 6011: { return __y < __x; } 6011: 6011: 6011: template 6011: inline bool 6011: operator<=(const vector<_Tp, _Alloc>& __x, const vector<_Tp, _Alloc>& __y) 6011: { return !(__y < __x); } 6011: 6011: 6011: template 6011: inline bool 6011: operator>=(const vector<_Tp, _Alloc>& __x, const vector<_Tp, _Alloc>& __y) 6011: { return !(__x < __y); } 6011: 6011: 6011: template 6011: inline void 6011: swap(vector<_Tp, _Alloc>& __x, vector<_Tp, _Alloc>& __y) 6011: noexcept(noexcept(__x.swap(__y))) 6011: { __x.swap(__y); } 6011: 6011: 6011: 6011: } 6011: # 65 "/usr/include/c++/8/vector" 2 3 6011: # 1 "/usr/include/c++/8/bits/stl_bvector.h" 1 3 6011: # 63 "/usr/include/c++/8/bits/stl_bvector.h" 3 6011: namespace std __attribute__ ((__visibility__ ("default"))) 6011: { 6011: 6011: 6011: 6011: typedef unsigned long _Bit_type; 6011: enum { _S_word_bit = int(8 * sizeof(_Bit_type)) }; 6011: 6011: struct _Bit_reference 6011: { 6011: _Bit_type * _M_p; 6011: _Bit_type _M_mask; 6011: 6011: _Bit_reference(_Bit_type * __x, _Bit_type __y) 6011: : _M_p(__x), _M_mask(__y) { } 6011: 6011: _Bit_reference() noexcept : _M_p(0), _M_mask(0) { } 6011: 6011: operator bool() const noexcept 6011: { return !!(*_M_p & _M_mask); } 6011: 6011: _Bit_reference& 6011: operator=(bool __x) noexcept 6011: { 6011: if (__x) 6011: *_M_p |= _M_mask; 6011: else 6011: *_M_p &= ~_M_mask; 6011: return *this; 6011: } 6011: 6011: _Bit_reference& 6011: operator=(const _Bit_reference& __x) noexcept 6011: { return *this = bool(__x); } 6011: 6011: bool 6011: operator==(const _Bit_reference& __x) const 6011: { return bool(*this) == bool(__x); } 6011: 6011: bool 6011: operator<(const _Bit_reference& __x) const 6011: { return !bool(*this) && bool(__x); } 6011: 6011: void 6011: flip() noexcept 6011: { *_M_p ^= _M_mask; } 6011: }; 6011: 6011: 6011: inline void 6011: swap(_Bit_reference __x, _Bit_reference __y) noexcept 6011: { 6011: bool __tmp = __x; 6011: __x = __y; 6011: __y = __tmp; 6011: } 6011: 6011: inline void 6011: swap(_Bit_reference __x, bool& __y) noexcept 6011: { 6011: bool __tmp = __x; 6011: __x = __y; 6011: __y = __tmp; 6011: } 6011: 6011: inline void 6011: swap(bool& __x, _Bit_reference __y) noexcept 6011: { 6011: bool __tmp = __x; 6011: __x = __y; 6011: __y = __tmp; 6011: } 6011: 6011: 6011: struct _Bit_iterator_base 6011: : public std::iterator 6011: { 6011: _Bit_type * _M_p; 6011: unsigned int _M_offset; 6011: 6011: _Bit_iterator_base(_Bit_type * __x, unsigned int __y) 6011: : _M_p(__x), _M_offset(__y) { } 6011: 6011: void 6011: _M_bump_up() 6011: { 6011: if (_M_offset++ == int(_S_word_bit) - 1) 6011: { 6011: _M_offset = 0; 6011: ++_M_p; 6011: } 6011: } 6011: 6011: void 6011: _M_bump_down() 6011: { 6011: if (_M_offset-- == 0) 6011: { 6011: _M_offset = int(_S_word_bit) - 1; 6011: --_M_p; 6011: } 6011: } 6011: 6011: void 6011: _M_incr(ptrdiff_t __i) 6011: { 6011: difference_type __n = __i + _M_offset; 6011: _M_p += __n / int(_S_word_bit); 6011: __n = __n % int(_S_word_bit); 6011: if (__n < 0) 6011: { 6011: __n += int(_S_word_bit); 6011: --_M_p; 6011: } 6011: _M_offset = static_cast(__n); 6011: } 6011: 6011: bool 6011: operator==(const _Bit_iterator_base& __i) const 6011: { return _M_p == __i._M_p && _M_offset == __i._M_offset; } 6011: 6011: bool 6011: operator<(const _Bit_iterator_base& __i) const 6011: { 6011: return _M_p < __i._M_p 6011: || (_M_p == __i._M_p && _M_offset < __i._M_offset); 6011: } 6011: 6011: bool 6011: operator!=(const _Bit_iterator_base& __i) const 6011: { return !(*this == __i); } 6011: 6011: bool 6011: operator>(const _Bit_iterator_base& __i) const 6011: { return __i < *this; } 6011: 6011: bool 6011: operator<=(const _Bit_iterator_base& __i) const 6011: { return !(__i < *this); } 6011: 6011: bool 6011: operator>=(const _Bit_iterator_base& __i) const 6011: { return !(*this < __i); } 6011: }; 6011: 6011: inline ptrdiff_t 6011: operator-(const _Bit_iterator_base& __x, const _Bit_iterator_base& __y) 6011: { 6011: return (int(_S_word_bit) * (__x._M_p - __y._M_p) 6011: + __x._M_offset - __y._M_offset); 6011: } 6011: 6011: struct _Bit_iterator : public _Bit_iterator_base 6011: { 6011: typedef _Bit_reference reference; 6011: typedef _Bit_reference* pointer; 6011: typedef _Bit_iterator iterator; 6011: 6011: _Bit_iterator() : _Bit_iterator_base(0, 0) { } 6011: 6011: _Bit_iterator(_Bit_type * __x, unsigned int __y) 6011: : _Bit_iterator_base(__x, __y) { } 6011: 6011: iterator 6011: _M_const_cast() const 6011: { return *this; } 6011: 6011: reference 6011: operator*() const 6011: { return reference(_M_p, 1UL << _M_offset); } 6011: 6011: iterator& 6011: operator++() 6011: { 6011: _M_bump_up(); 6011: return *this; 6011: } 6011: 6011: iterator 6011: operator++(int) 6011: { 6011: iterator __tmp = *this; 6011: _M_bump_up(); 6011: return __tmp; 6011: } 6011: 6011: iterator& 6011: operator--() 6011: { 6011: _M_bump_down(); 6011: return *this; 6011: } 6011: 6011: iterator 6011: operator--(int) 6011: { 6011: iterator __tmp = *this; 6011: _M_bump_down(); 6011: return __tmp; 6011: } 6011: 6011: iterator& 6011: operator+=(difference_type __i) 6011: { 6011: _M_incr(__i); 6011: return *this; 6011: } 6011: 6011: iterator& 6011: operator-=(difference_type __i) 6011: { 6011: *this += -__i; 6011: return *this; 6011: } 6011: 6011: iterator 6011: operator+(difference_type __i) const 6011: { 6011: iterator __tmp = *this; 6011: return __tmp += __i; 6011: } 6011: 6011: iterator 6011: operator-(difference_type __i) const 6011: { 6011: iterator __tmp = *this; 6011: return __tmp -= __i; 6011: } 6011: 6011: reference 6011: operator[](difference_type __i) const 6011: { return *(*this + __i); } 6011: }; 6011: 6011: inline _Bit_iterator 6011: operator+(ptrdiff_t __n, const _Bit_iterator& __x) 6011: { return __x + __n; } 6011: 6011: struct _Bit_const_iterator : public _Bit_iterator_base 6011: { 6011: typedef bool reference; 6011: typedef bool const_reference; 6011: typedef const bool* pointer; 6011: typedef _Bit_const_iterator const_iterator; 6011: 6011: _Bit_const_iterator() : _Bit_iterator_base(0, 0) { } 6011: 6011: _Bit_const_iterator(_Bit_type * __x, unsigned int __y) 6011: : _Bit_iterator_base(__x, __y) { } 6011: 6011: _Bit_const_iterator(const _Bit_iterator& __x) 6011: : _Bit_iterator_base(__x._M_p, __x._M_offset) { } 6011: 6011: _Bit_iterator 6011: _M_const_cast() const 6011: { return _Bit_iterator(_M_p, _M_offset); } 6011: 6011: const_reference 6011: operator*() const 6011: { return _Bit_reference(_M_p, 1UL << _M_offset); } 6011: 6011: const_iterator& 6011: operator++() 6011: { 6011: _M_bump_up(); 6011: return *this; 6011: } 6011: 6011: const_iterator 6011: operator++(int) 6011: { 6011: const_iterator __tmp = *this; 6011: _M_bump_up(); 6011: return __tmp; 6011: } 6011: 6011: const_iterator& 6011: operator--() 6011: { 6011: _M_bump_down(); 6011: return *this; 6011: } 6011: 6011: const_iterator 6011: operator--(int) 6011: { 6011: const_iterator __tmp = *this; 6011: _M_bump_down(); 6011: return __tmp; 6011: } 6011: 6011: const_iterator& 6011: operator+=(difference_type __i) 6011: { 6011: _M_incr(__i); 6011: return *this; 6011: } 6011: 6011: const_iterator& 6011: operator-=(difference_type __i) 6011: { 6011: *this += -__i; 6011: return *this; 6011: } 6011: 6011: const_iterator 6011: operator+(difference_type __i) const 6011: { 6011: const_iterator __tmp = *this; 6011: return __tmp += __i; 6011: } 6011: 6011: const_iterator 6011: operator-(difference_type __i) const 6011: { 6011: const_iterator __tmp = *this; 6011: return __tmp -= __i; 6011: } 6011: 6011: const_reference 6011: operator[](difference_type __i) const 6011: { return *(*this + __i); } 6011: }; 6011: 6011: inline _Bit_const_iterator 6011: operator+(ptrdiff_t __n, const _Bit_const_iterator& __x) 6011: { return __x + __n; } 6011: 6011: inline void 6011: __fill_bvector(_Bit_type * __v, 6011: unsigned int __first, unsigned int __last, bool __x) 6011: { 6011: const _Bit_type __fmask = ~0ul << __first; 6011: const _Bit_type __lmask = ~0ul >> (_S_word_bit - __last); 6011: const _Bit_type __mask = __fmask & __lmask; 6011: 6011: if (__x) 6011: *__v |= __mask; 6011: else 6011: *__v &= ~__mask; 6011: } 6011: 6011: inline void 6011: fill(_Bit_iterator __first, _Bit_iterator __last, const bool& __x) 6011: { 6011: if (__first._M_p != __last._M_p) 6011: { 6011: _Bit_type* __first_p = __first._M_p; 6011: if (__first._M_offset != 0) 6011: __fill_bvector(__first_p++, __first._M_offset, _S_word_bit, __x); 6011: 6011: __builtin_memset(__first_p, __x ? ~0 : 0, 6011: (__last._M_p - __first_p) * sizeof(_Bit_type)); 6011: 6011: if (__last._M_offset != 0) 6011: __fill_bvector(__last._M_p, 0, __last._M_offset, __x); 6011: } 6011: else if (__first._M_offset != __last._M_offset) 6011: __fill_bvector(__first._M_p, __first._M_offset, __last._M_offset, __x); 6011: } 6011: 6011: template 6011: struct _Bvector_base 6011: { 6011: typedef typename __gnu_cxx::__alloc_traits<_Alloc>::template 6011: rebind<_Bit_type>::other _Bit_alloc_type; 6011: typedef typename __gnu_cxx::__alloc_traits<_Bit_alloc_type> 6011: _Bit_alloc_traits; 6011: typedef typename _Bit_alloc_traits::pointer _Bit_pointer; 6011: 6011: struct _Bvector_impl_data 6011: { 6011: _Bit_iterator _M_start; 6011: _Bit_iterator _M_finish; 6011: _Bit_pointer _M_end_of_storage; 6011: 6011: _Bvector_impl_data() noexcept 6011: : _M_start(), _M_finish(), _M_end_of_storage() 6011: { } 6011: 6011: 6011: _Bvector_impl_data(_Bvector_impl_data&& __x) noexcept 6011: : _M_start(__x._M_start), _M_finish(__x._M_finish) 6011: , _M_end_of_storage(__x._M_end_of_storage) 6011: { __x._M_reset(); } 6011: 6011: void 6011: _M_move_data(_Bvector_impl_data&& __x) noexcept 6011: { 6011: this->_M_start = __x._M_start; 6011: this->_M_finish = __x._M_finish; 6011: this->_M_end_of_storage = __x._M_end_of_storage; 6011: __x._M_reset(); 6011: } 6011: 6011: 6011: void 6011: _M_reset() noexcept 6011: { 6011: _M_start = _M_finish = _Bit_iterator(); 6011: _M_end_of_storage = _Bit_pointer(); 6011: } 6011: }; 6011: 6011: struct _Bvector_impl 6011: : public _Bit_alloc_type, public _Bvector_impl_data 6011: { 6011: public: 6011: _Bvector_impl() 6011: noexcept(noexcept(_Bit_alloc_type())) 6011: : _Bit_alloc_type() 6011: { } 6011: 6011: _Bvector_impl(const _Bit_alloc_type& __a) noexcept 6011: : _Bit_alloc_type(__a) 6011: { } 6011: 6011: 6011: _Bvector_impl(_Bvector_impl&&) = default; 6011: 6011: 6011: _Bit_type* 6011: _M_end_addr() const noexcept 6011: { 6011: if (this->_M_end_of_storage) 6011: return std::__addressof(this->_M_end_of_storage[-1]) + 1; 6011: return 0; 6011: } 6011: }; 6011: 6011: public: 6011: typedef _Alloc allocator_type; 6011: 6011: _Bit_alloc_type& 6011: _M_get_Bit_allocator() noexcept 6011: { return this->_M_impl; } 6011: 6011: const _Bit_alloc_type& 6011: _M_get_Bit_allocator() const noexcept 6011: { return this->_M_impl; } 6011: 6011: allocator_type 6011: get_allocator() const noexcept 6011: { return allocator_type(_M_get_Bit_allocator()); } 6011: 6011: 6011: _Bvector_base() = default; 6011: 6011: 6011: 6011: 6011: _Bvector_base(const allocator_type& __a) 6011: : _M_impl(__a) { } 6011: 6011: 6011: _Bvector_base(_Bvector_base&&) = default; 6011: 6011: 6011: ~_Bvector_base() 6011: { this->_M_deallocate(); } 6011: 6011: protected: 6011: _Bvector_impl _M_impl; 6011: 6011: _Bit_pointer 6011: _M_allocate(size_t __n) 6011: { return _Bit_alloc_traits::allocate(_M_impl, _S_nword(__n)); } 6011: 6011: void 6011: _M_deallocate() 6011: { 6011: if (_M_impl._M_start._M_p) 6011: { 6011: const size_t __n = _M_impl._M_end_addr() - _M_impl._M_start._M_p; 6011: _Bit_alloc_traits::deallocate(_M_impl, 6011: _M_impl._M_end_of_storage - __n, 6011: __n); 6011: _M_impl._M_reset(); 6011: } 6011: } 6011: 6011: 6011: void 6011: _M_move_data(_Bvector_base&& __x) noexcept 6011: { _M_impl._M_move_data(std::move(__x._M_impl)); } 6011: 6011: 6011: static size_t 6011: _S_nword(size_t __n) 6011: { return (__n + int(_S_word_bit) - 1) / int(_S_word_bit); } 6011: }; 6011: 6011: 6011: 6011: } 6011: 6011: 6011: 6011: 6011: namespace std __attribute__ ((__visibility__ ("default"))) 6011: { 6011: 6011: 6011: # 586 "/usr/include/c++/8/bits/stl_bvector.h" 3 6011: template 6011: class vector : protected _Bvector_base<_Alloc> 6011: { 6011: typedef _Bvector_base<_Alloc> _Base; 6011: typedef typename _Base::_Bit_pointer _Bit_pointer; 6011: typedef typename _Base::_Bit_alloc_traits _Bit_alloc_traits; 6011: 6011: 6011: template friend struct hash; 6011: 6011: 6011: public: 6011: typedef bool value_type; 6011: typedef size_t size_type; 6011: typedef ptrdiff_t difference_type; 6011: typedef _Bit_reference reference; 6011: typedef bool const_reference; 6011: typedef _Bit_reference* pointer; 6011: typedef const bool* const_pointer; 6011: typedef _Bit_iterator iterator; 6011: typedef _Bit_const_iterator const_iterator; 6011: typedef std::reverse_iterator const_reverse_iterator; 6011: typedef std::reverse_iterator reverse_iterator; 6011: typedef _Alloc allocator_type; 6011: 6011: allocator_type 6011: get_allocator() const 6011: { return _Base::get_allocator(); } 6011: 6011: protected: 6011: using _Base::_M_allocate; 6011: using _Base::_M_deallocate; 6011: using _Base::_S_nword; 6011: using _Base::_M_get_Bit_allocator; 6011: 6011: public: 6011: 6011: vector() = default; 6011: 6011: 6011: 6011: 6011: explicit 6011: vector(const allocator_type& __a) 6011: : _Base(__a) { } 6011: 6011: 6011: explicit 6011: vector(size_type __n, const allocator_type& __a = allocator_type()) 6011: : vector(__n, false, __a) 6011: { } 6011: 6011: vector(size_type __n, const bool& __value, 6011: const allocator_type& __a = allocator_type()) 6011: 6011: 6011: 6011: 6011: 6011: : _Base(__a) 6011: { 6011: _M_initialize(__n); 6011: _M_initialize_value(__value); 6011: } 6011: 6011: vector(const vector& __x) 6011: : _Base(_Bit_alloc_traits::_S_select_on_copy(__x._M_get_Bit_allocator())) 6011: { 6011: _M_initialize(__x.size()); 6011: _M_copy_aligned(__x.begin(), __x.end(), this->_M_impl._M_start); 6011: } 6011: 6011: 6011: vector(vector&&) = default; 6011: 6011: vector(vector&& __x, const allocator_type& __a) 6011: noexcept(_Bit_alloc_traits::_S_always_equal()) 6011: : _Base(__a) 6011: { 6011: if (__x.get_allocator() == __a) 6011: this->_M_move_data(std::move(__x)); 6011: else 6011: { 6011: _M_initialize(__x.size()); 6011: _M_copy_aligned(__x.begin(), __x.end(), begin()); 6011: __x.clear(); 6011: } 6011: } 6011: 6011: vector(const vector& __x, const allocator_type& __a) 6011: : _Base(__a) 6011: { 6011: _M_initialize(__x.size()); 6011: _M_copy_aligned(__x.begin(), __x.end(), this->_M_impl._M_start); 6011: } 6011: 6011: vector(initializer_list __l, 6011: const allocator_type& __a = allocator_type()) 6011: : _Base(__a) 6011: { 6011: _M_initialize_range(__l.begin(), __l.end(), 6011: random_access_iterator_tag()); 6011: } 6011: 6011: 6011: 6011: template> 6011: vector(_InputIterator __first, _InputIterator __last, 6011: const allocator_type& __a = allocator_type()) 6011: : _Base(__a) 6011: { _M_initialize_dispatch(__first, __last, __false_type()); } 6011: # 709 "/usr/include/c++/8/bits/stl_bvector.h" 3 6011: ~vector() noexcept { } 6011: 6011: vector& 6011: operator=(const vector& __x) 6011: { 6011: if (&__x == this) 6011: return *this; 6011: 6011: if (_Bit_alloc_traits::_S_propagate_on_copy_assign()) 6011: { 6011: if (this->_M_get_Bit_allocator() != __x._M_get_Bit_allocator()) 6011: { 6011: this->_M_deallocate(); 6011: std::__alloc_on_copy(_M_get_Bit_allocator(), 6011: __x._M_get_Bit_allocator()); 6011: _M_initialize(__x.size()); 6011: } 6011: else 6011: std::__alloc_on_copy(_M_get_Bit_allocator(), 6011: __x._M_get_Bit_allocator()); 6011: } 6011: 6011: if (__x.size() > capacity()) 6011: { 6011: this->_M_deallocate(); 6011: _M_initialize(__x.size()); 6011: } 6011: this->_M_impl._M_finish = _M_copy_aligned(__x.begin(), __x.end(), 6011: begin()); 6011: return *this; 6011: } 6011: 6011: 6011: vector& 6011: operator=(vector&& __x) noexcept(_Bit_alloc_traits::_S_nothrow_move()) 6011: { 6011: if (_Bit_alloc_traits::_S_propagate_on_move_assign() 6011: || this->_M_get_Bit_allocator() == __x._M_get_Bit_allocator()) 6011: { 6011: this->_M_deallocate(); 6011: this->_M_move_data(std::move(__x)); 6011: std::__alloc_on_move(_M_get_Bit_allocator(), 6011: __x._M_get_Bit_allocator()); 6011: } 6011: else 6011: { 6011: if (__x.size() > capacity()) 6011: { 6011: this->_M_deallocate(); 6011: _M_initialize(__x.size()); 6011: } 6011: this->_M_impl._M_finish = _M_copy_aligned(__x.begin(), __x.end(), 6011: begin()); 6011: __x.clear(); 6011: } 6011: return *this; 6011: } 6011: 6011: vector& 6011: operator=(initializer_list __l) 6011: { 6011: this->assign (__l.begin(), __l.end()); 6011: return *this; 6011: } 6011: 6011: 6011: 6011: 6011: 6011: 6011: void 6011: assign(size_type __n, const bool& __x) 6011: { _M_fill_assign(__n, __x); } 6011: 6011: 6011: template> 6011: void 6011: assign(_InputIterator __first, _InputIterator __last) 6011: { _M_assign_aux(__first, __last, std::__iterator_category(__first)); } 6011: # 800 "/usr/include/c++/8/bits/stl_bvector.h" 3 6011: void 6011: assign(initializer_list __l) 6011: { _M_assign_aux(__l.begin(), __l.end(), random_access_iterator_tag()); } 6011: 6011: 6011: iterator 6011: begin() noexcept 6011: { return this->_M_impl._M_start; } 6011: 6011: const_iterator 6011: begin() const noexcept 6011: { return this->_M_impl._M_start; } 6011: 6011: iterator 6011: end() noexcept 6011: { return this->_M_impl._M_finish; } 6011: 6011: const_iterator 6011: end() const noexcept 6011: { return this->_M_impl._M_finish; } 6011: 6011: reverse_iterator 6011: rbegin() noexcept 6011: { return reverse_iterator(end()); } 6011: 6011: const_reverse_iterator 6011: rbegin() const noexcept 6011: { return const_reverse_iterator(end()); } 6011: 6011: reverse_iterator 6011: rend() noexcept 6011: { return reverse_iterator(begin()); } 6011: 6011: const_reverse_iterator 6011: rend() const noexcept 6011: { return const_reverse_iterator(begin()); } 6011: 6011: 6011: const_iterator 6011: cbegin() const noexcept 6011: { return this->_M_impl._M_start; } 6011: 6011: const_iterator 6011: cend() const noexcept 6011: { return this->_M_impl._M_finish; } 6011: 6011: const_reverse_iterator 6011: crbegin() const noexcept 6011: { return const_reverse_iterator(end()); } 6011: 6011: const_reverse_iterator 6011: crend() const noexcept 6011: { return const_reverse_iterator(begin()); } 6011: 6011: 6011: size_type 6011: size() const noexcept 6011: { return size_type(end() - begin()); } 6011: 6011: size_type 6011: max_size() const noexcept 6011: { 6011: const size_type __isize = 6011: __gnu_cxx::__numeric_traits::__max 6011: - int(_S_word_bit) + 1; 6011: const size_type __asize 6011: = _Bit_alloc_traits::max_size(_M_get_Bit_allocator()); 6011: return (__asize <= __isize / int(_S_word_bit) 6011: ? __asize * int(_S_word_bit) : __isize); 6011: } 6011: 6011: size_type 6011: capacity() const noexcept 6011: { return size_type(const_iterator(this->_M_impl._M_end_addr(), 0) 6011: - begin()); } 6011: 6011: bool 6011: empty() const noexcept 6011: { return begin() == end(); } 6011: 6011: reference 6011: operator[](size_type __n) 6011: { 6011: return *iterator(this->_M_impl._M_start._M_p 6011: + __n / int(_S_word_bit), __n % int(_S_word_bit)); 6011: } 6011: 6011: const_reference 6011: operator[](size_type __n) const 6011: { 6011: return *const_iterator(this->_M_impl._M_start._M_p 6011: + __n / int(_S_word_bit), __n % int(_S_word_bit)); 6011: } 6011: 6011: protected: 6011: void 6011: _M_range_check(size_type __n) const 6011: { 6011: if (__n >= this->size()) 6011: __throw_out_of_range_fmt(("vector::_M_range_check: __n " "(which is %zu) >= this->size() " "(which is %zu)") 6011: 6011: , 6011: __n, this->size()); 6011: } 6011: 6011: public: 6011: reference 6011: at(size_type __n) 6011: { _M_range_check(__n); return (*this)[__n]; } 6011: 6011: const_reference 6011: at(size_type __n) const 6011: { _M_range_check(__n); return (*this)[__n]; } 6011: 6011: void 6011: reserve(size_type __n) 6011: { 6011: if (__n > max_size()) 6011: __throw_length_error(("vector::reserve")); 6011: if (capacity() < __n) 6011: _M_reallocate(__n); 6011: } 6011: 6011: reference 6011: front() 6011: { return *begin(); } 6011: 6011: const_reference 6011: front() const 6011: { return *begin(); } 6011: 6011: reference 6011: back() 6011: { return *(end() - 1); } 6011: 6011: const_reference 6011: back() const 6011: { return *(end() - 1); } 6011: 6011: 6011: 6011: 6011: 6011: 6011: void 6011: data() noexcept { } 6011: 6011: void 6011: push_back(bool __x) 6011: { 6011: if (this->_M_impl._M_finish._M_p != this->_M_impl._M_end_addr()) 6011: *this->_M_impl._M_finish++ = __x; 6011: else 6011: _M_insert_aux(end(), __x); 6011: } 6011: 6011: void 6011: swap(vector& __x) noexcept 6011: { 6011: std::swap(this->_M_impl._M_start, __x._M_impl._M_start); 6011: std::swap(this->_M_impl._M_finish, __x._M_impl._M_finish); 6011: std::swap(this->_M_impl._M_end_of_storage, 6011: __x._M_impl._M_end_of_storage); 6011: _Bit_alloc_traits::_S_on_swap(_M_get_Bit_allocator(), 6011: __x._M_get_Bit_allocator()); 6011: } 6011: 6011: 6011: static void 6011: swap(reference __x, reference __y) noexcept 6011: { 6011: bool __tmp = __x; 6011: __x = __y; 6011: __y = __tmp; 6011: } 6011: 6011: iterator 6011: 6011: insert(const_iterator __position, const bool& __x = bool()) 6011: 6011: 6011: 6011: { 6011: const difference_type __n = __position - begin(); 6011: if (this->_M_impl._M_finish._M_p != this->_M_impl._M_end_addr() 6011: && __position == end()) 6011: *this->_M_impl._M_finish++ = __x; 6011: else 6011: _M_insert_aux(__position._M_const_cast(), __x); 6011: return begin() + __n; 6011: } 6011: 6011: 6011: template> 6011: iterator 6011: insert(const_iterator __position, 6011: _InputIterator __first, _InputIterator __last) 6011: { 6011: difference_type __offset = __position - cbegin(); 6011: _M_insert_dispatch(__position._M_const_cast(), 6011: __first, __last, __false_type()); 6011: return begin() + __offset; 6011: } 6011: # 1016 "/usr/include/c++/8/bits/stl_bvector.h" 3 6011: iterator 6011: insert(const_iterator __position, size_type __n, const bool& __x) 6011: { 6011: difference_type __offset = __position - cbegin(); 6011: _M_fill_insert(__position._M_const_cast(), __n, __x); 6011: return begin() + __offset; 6011: } 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: iterator 6011: insert(const_iterator __p, initializer_list __l) 6011: { return this->insert(__p, __l.begin(), __l.end()); } 6011: 6011: 6011: void 6011: pop_back() 6011: { --this->_M_impl._M_finish; } 6011: 6011: iterator 6011: 6011: erase(const_iterator __position) 6011: 6011: 6011: 6011: { return _M_erase(__position._M_const_cast()); } 6011: 6011: iterator 6011: 6011: erase(const_iterator __first, const_iterator __last) 6011: 6011: 6011: 6011: { return _M_erase(__first._M_const_cast(), __last._M_const_cast()); } 6011: 6011: void 6011: resize(size_type __new_size, bool __x = bool()) 6011: { 6011: if (__new_size < size()) 6011: _M_erase_at_end(begin() + difference_type(__new_size)); 6011: else 6011: insert(end(), __new_size - size(), __x); 6011: } 6011: 6011: 6011: void 6011: shrink_to_fit() 6011: { _M_shrink_to_fit(); } 6011: 6011: 6011: void 6011: flip() noexcept 6011: { 6011: _Bit_type * const __end = this->_M_impl._M_end_addr(); 6011: for (_Bit_type * __p = this->_M_impl._M_start._M_p; __p != __end; ++__p) 6011: *__p = ~*__p; 6011: } 6011: 6011: void 6011: clear() noexcept 6011: { _M_erase_at_end(begin()); } 6011: 6011: 6011: template 6011: 6011: 6011: 6011: void 6011: 6011: emplace_back(_Args&&... __args) 6011: { 6011: push_back(bool(__args...)); 6011: 6011: 6011: 6011: } 6011: 6011: template 6011: iterator 6011: emplace(const_iterator __pos, _Args&&... __args) 6011: { return insert(__pos, bool(__args...)); } 6011: 6011: 6011: protected: 6011: 6011: iterator 6011: _M_copy_aligned(const_iterator __first, const_iterator __last, 6011: iterator __result) 6011: { 6011: _Bit_type* __q = std::copy(__first._M_p, __last._M_p, __result._M_p); 6011: return std::copy(const_iterator(__last._M_p, 0), __last, 6011: iterator(__q, 0)); 6011: } 6011: 6011: void 6011: _M_initialize(size_type __n) 6011: { 6011: if (__n) 6011: { 6011: _Bit_pointer __q = this->_M_allocate(__n); 6011: this->_M_impl._M_end_of_storage = __q + _S_nword(__n); 6011: this->_M_impl._M_start = iterator(std::__addressof(*__q), 0); 6011: } 6011: else 6011: { 6011: this->_M_impl._M_end_of_storage = _Bit_pointer(); 6011: this->_M_impl._M_start = iterator(0, 0); 6011: } 6011: this->_M_impl._M_finish = this->_M_impl._M_start + difference_type(__n); 6011: 6011: } 6011: 6011: void 6011: _M_initialize_value(bool __x) 6011: { 6011: if (_Bit_type* __p = this->_M_impl._M_start._M_p) 6011: __builtin_memset(__p, __x ? ~0 : 0, 6011: (this->_M_impl._M_end_addr() - __p) 6011: * sizeof(_Bit_type)); 6011: } 6011: 6011: void 6011: _M_reallocate(size_type __n); 6011: 6011: 6011: bool 6011: _M_shrink_to_fit(); 6011: 6011: 6011: 6011: 6011: 6011: 6011: template 6011: void 6011: _M_initialize_dispatch(_Integer __n, _Integer __x, __true_type) 6011: { 6011: _M_initialize(static_cast(__n)); 6011: _M_initialize_value(__x); 6011: } 6011: 6011: template 6011: void 6011: _M_initialize_dispatch(_InputIterator __first, _InputIterator __last, 6011: __false_type) 6011: { _M_initialize_range(__first, __last, 6011: std::__iterator_category(__first)); } 6011: 6011: template 6011: void 6011: _M_initialize_range(_InputIterator __first, _InputIterator __last, 6011: std::input_iterator_tag) 6011: { 6011: for (; __first != __last; ++__first) 6011: push_back(*__first); 6011: } 6011: 6011: template 6011: void 6011: _M_initialize_range(_ForwardIterator __first, _ForwardIterator __last, 6011: std::forward_iterator_tag) 6011: { 6011: const size_type __n = std::distance(__first, __last); 6011: _M_initialize(__n); 6011: std::copy(__first, __last, this->_M_impl._M_start); 6011: } 6011: # 1202 "/usr/include/c++/8/bits/stl_bvector.h" 3 6011: void 6011: _M_fill_assign(size_t __n, bool __x) 6011: { 6011: if (__n > size()) 6011: { 6011: _M_initialize_value(__x); 6011: insert(end(), __n - size(), __x); 6011: } 6011: else 6011: { 6011: _M_erase_at_end(begin() + __n); 6011: _M_initialize_value(__x); 6011: } 6011: } 6011: 6011: template 6011: void 6011: _M_assign_aux(_InputIterator __first, _InputIterator __last, 6011: std::input_iterator_tag) 6011: { 6011: iterator __cur = begin(); 6011: for (; __first != __last && __cur != end(); ++__cur, ++__first) 6011: *__cur = *__first; 6011: if (__first == __last) 6011: _M_erase_at_end(__cur); 6011: else 6011: insert(end(), __first, __last); 6011: } 6011: 6011: template 6011: void 6011: _M_assign_aux(_ForwardIterator __first, _ForwardIterator __last, 6011: std::forward_iterator_tag) 6011: { 6011: const size_type __len = std::distance(__first, __last); 6011: if (__len < size()) 6011: _M_erase_at_end(std::copy(__first, __last, begin())); 6011: else 6011: { 6011: _ForwardIterator __mid = __first; 6011: std::advance(__mid, size()); 6011: std::copy(__first, __mid, begin()); 6011: insert(end(), __mid, __last); 6011: } 6011: } 6011: 6011: 6011: 6011: 6011: 6011: template 6011: void 6011: _M_insert_dispatch(iterator __pos, _Integer __n, _Integer __x, 6011: __true_type) 6011: { _M_fill_insert(__pos, __n, __x); } 6011: 6011: template 6011: void 6011: _M_insert_dispatch(iterator __pos, 6011: _InputIterator __first, _InputIterator __last, 6011: __false_type) 6011: { _M_insert_range(__pos, __first, __last, 6011: std::__iterator_category(__first)); } 6011: 6011: void 6011: _M_fill_insert(iterator __position, size_type __n, bool __x); 6011: 6011: template 6011: void 6011: _M_insert_range(iterator __pos, _InputIterator __first, 6011: _InputIterator __last, std::input_iterator_tag) 6011: { 6011: for (; __first != __last; ++__first) 6011: { 6011: __pos = insert(__pos, *__first); 6011: ++__pos; 6011: } 6011: } 6011: 6011: template 6011: void 6011: _M_insert_range(iterator __position, _ForwardIterator __first, 6011: _ForwardIterator __last, std::forward_iterator_tag); 6011: 6011: void 6011: _M_insert_aux(iterator __position, bool __x); 6011: 6011: size_type 6011: _M_check_len(size_type __n, const char* __s) const 6011: { 6011: if (max_size() - size() < __n) 6011: __throw_length_error((__s)); 6011: 6011: const size_type __len = size() + std::max(size(), __n); 6011: return (__len < size() || __len > max_size()) ? max_size() : __len; 6011: } 6011: 6011: void 6011: _M_erase_at_end(iterator __pos) 6011: { this->_M_impl._M_finish = __pos; } 6011: 6011: iterator 6011: _M_erase(iterator __pos); 6011: 6011: iterator 6011: _M_erase(iterator __first, iterator __last); 6011: }; 6011: 6011: 6011: 6011: } 6011: 6011: 6011: 6011: # 1 "/usr/include/c++/8/bits/functional_hash.h" 1 3 6011: # 33 "/usr/include/c++/8/bits/functional_hash.h" 3 6011: 6011: # 34 "/usr/include/c++/8/bits/functional_hash.h" 3 6011: 6011: 6011: 6011: namespace std __attribute__ ((__visibility__ ("default"))) 6011: { 6011: 6011: # 49 "/usr/include/c++/8/bits/functional_hash.h" 3 6011: template 6011: struct __hash_base 6011: { 6011: typedef _Result result_type ; 6011: typedef _Arg argument_type ; 6011: }; 6011: 6011: 6011: template 6011: struct hash; 6011: 6011: template 6011: struct __poison_hash 6011: { 6011: static constexpr bool __enable_hash_call = false; 6011: private: 6011: 6011: __poison_hash(__poison_hash&&); 6011: ~__poison_hash(); 6011: }; 6011: 6011: template 6011: struct __poison_hash<_Tp, __void_t()(declval<_Tp>()))>> 6011: { 6011: static constexpr bool __enable_hash_call = true; 6011: }; 6011: 6011: 6011: template::value> 6011: struct __hash_enum 6011: { 6011: private: 6011: 6011: __hash_enum(__hash_enum&&); 6011: ~__hash_enum(); 6011: }; 6011: 6011: 6011: template 6011: struct __hash_enum<_Tp, true> : public __hash_base 6011: { 6011: size_t 6011: operator()(_Tp __val) const noexcept 6011: { 6011: using __type = typename underlying_type<_Tp>::type; 6011: return hash<__type>{}(static_cast<__type>(__val)); 6011: } 6011: }; 6011: 6011: 6011: 6011: template 6011: struct hash : __hash_enum<_Tp> 6011: { }; 6011: 6011: 6011: template 6011: struct hash<_Tp*> : public __hash_base 6011: { 6011: size_t 6011: operator()(_Tp* __p) const noexcept 6011: { return reinterpret_cast(__p); } 6011: }; 6011: # 124 "/usr/include/c++/8/bits/functional_hash.h" 3 6011: template<> struct hash : public __hash_base { size_t operator()(bool __val) const noexcept { return static_cast(__val); } }; 6011: 6011: 6011: template<> struct hash : public __hash_base { size_t operator()(char __val) const noexcept { return static_cast(__val); } }; 6011: 6011: 6011: template<> struct hash : public __hash_base { size_t operator()(signed char __val) const noexcept { return static_cast(__val); } }; 6011: 6011: 6011: template<> struct hash : public __hash_base { size_t operator()(unsigned char __val) const noexcept { return static_cast(__val); } }; 6011: 6011: 6011: template<> struct hash : public __hash_base { size_t operator()(wchar_t __val) const noexcept { return static_cast(__val); } }; 6011: 6011: 6011: template<> struct hash : public __hash_base { size_t operator()(char16_t __val) const noexcept { return static_cast(__val); } }; 6011: 6011: 6011: template<> struct hash : public __hash_base { size_t operator()(char32_t __val) const noexcept { return static_cast(__val); } }; 6011: 6011: 6011: template<> struct hash : public __hash_base { size_t operator()(short __val) const noexcept { return static_cast(__val); } }; 6011: 6011: 6011: template<> struct hash : public __hash_base { size_t operator()(int __val) const noexcept { return static_cast(__val); } }; 6011: 6011: 6011: template<> struct hash : public __hash_base { size_t operator()(long __val) const noexcept { return static_cast(__val); } }; 6011: 6011: 6011: template<> struct hash : public __hash_base { size_t operator()(long long __val) const noexcept { return static_cast(__val); } }; 6011: 6011: 6011: template<> struct hash : public __hash_base { size_t operator()(unsigned short __val) const noexcept { return static_cast(__val); } }; 6011: 6011: 6011: template<> struct hash : public __hash_base { size_t operator()(unsigned int __val) const noexcept { return static_cast(__val); } }; 6011: 6011: 6011: template<> struct hash : public __hash_base { size_t operator()(unsigned long __val) const noexcept { return static_cast(__val); } }; 6011: 6011: 6011: template<> struct hash : public __hash_base { size_t operator()(unsigned long long __val) const noexcept { return static_cast(__val); } }; 6011: # 187 "/usr/include/c++/8/bits/functional_hash.h" 3 6011: struct _Hash_impl 6011: { 6011: static size_t 6011: hash(const void* __ptr, size_t __clength, 6011: size_t __seed = static_cast(0xc70f6907UL)) 6011: { return _Hash_bytes(__ptr, __clength, __seed); } 6011: 6011: template 6011: static size_t 6011: hash(const _Tp& __val) 6011: { return hash(&__val, sizeof(__val)); } 6011: 6011: template 6011: static size_t 6011: __hash_combine(const _Tp& __val, size_t __hash) 6011: { return hash(&__val, sizeof(__val), __hash); } 6011: }; 6011: 6011: 6011: struct _Fnv_hash_impl 6011: { 6011: static size_t 6011: hash(const void* __ptr, size_t __clength, 6011: size_t __seed = static_cast(2166136261UL)) 6011: { return _Fnv_hash_bytes(__ptr, __clength, __seed); } 6011: 6011: template 6011: static size_t 6011: hash(const _Tp& __val) 6011: { return hash(&__val, sizeof(__val)); } 6011: 6011: template 6011: static size_t 6011: __hash_combine(const _Tp& __val, size_t __hash) 6011: { return hash(&__val, sizeof(__val), __hash); } 6011: }; 6011: 6011: 6011: template<> 6011: struct hash : public __hash_base 6011: { 6011: size_t 6011: operator()(float __val) const noexcept 6011: { 6011: 6011: return __val != 0.0f ? std::_Hash_impl::hash(__val) : 0; 6011: } 6011: }; 6011: 6011: 6011: template<> 6011: struct hash : public __hash_base 6011: { 6011: size_t 6011: operator()(double __val) const noexcept 6011: { 6011: 6011: return __val != 0.0 ? std::_Hash_impl::hash(__val) : 0; 6011: } 6011: }; 6011: 6011: 6011: template<> 6011: struct hash 6011: : public __hash_base 6011: { 6011: __attribute__ ((__pure__)) size_t 6011: operator()(long double __val) const noexcept; 6011: }; 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: template 6011: struct __is_fast_hash : public std::true_type 6011: { }; 6011: 6011: template<> 6011: struct __is_fast_hash> : public std::false_type 6011: { }; 6011: 6011: 6011: } 6011: # 1317 "/usr/include/c++/8/bits/stl_bvector.h" 2 3 6011: 6011: namespace std __attribute__ ((__visibility__ ("default"))) 6011: { 6011: 6011: 6011: 6011: 6011: template 6011: struct hash> 6011: : public __hash_base> 6011: { 6011: size_t 6011: operator()(const std::vector&) const noexcept; 6011: }; 6011: 6011: 6011: } 6011: # 66 "/usr/include/c++/8/vector" 2 3 6011: # 1 "/usr/include/c++/8/bits/range_access.h" 1 3 6011: # 33 "/usr/include/c++/8/bits/range_access.h" 3 6011: 6011: # 34 "/usr/include/c++/8/bits/range_access.h" 3 6011: 6011: 6011: 6011: namespace std __attribute__ ((__visibility__ ("default"))) 6011: { 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: template 6011: inline auto 6011: begin(_Container& __cont) -> decltype(__cont.begin()) 6011: { return __cont.begin(); } 6011: 6011: 6011: 6011: 6011: 6011: 6011: template 6011: inline auto 6011: begin(const _Container& __cont) -> decltype(__cont.begin()) 6011: { return __cont.begin(); } 6011: 6011: 6011: 6011: 6011: 6011: 6011: template 6011: inline auto 6011: end(_Container& __cont) -> decltype(__cont.end()) 6011: { return __cont.end(); } 6011: 6011: 6011: 6011: 6011: 6011: 6011: template 6011: inline auto 6011: end(const _Container& __cont) -> decltype(__cont.end()) 6011: { return __cont.end(); } 6011: 6011: 6011: 6011: 6011: 6011: template 6011: inline _Tp* 6011: begin(_Tp (&__arr)[_Nm]) 6011: { return __arr; } 6011: 6011: 6011: 6011: 6011: 6011: 6011: template 6011: inline _Tp* 6011: end(_Tp (&__arr)[_Nm]) 6011: { return __arr + _Nm; } 6011: # 323 "/usr/include/c++/8/bits/range_access.h" 3 6011: 6011: } 6011: # 67 "/usr/include/c++/8/vector" 2 3 6011: 6011: 6011: # 1 "/usr/include/c++/8/bits/vector.tcc" 1 3 6011: # 59 "/usr/include/c++/8/bits/vector.tcc" 3 6011: namespace std __attribute__ ((__visibility__ ("default"))) 6011: { 6011: 6011: 6011: 6011: template 6011: void 6011: vector<_Tp, _Alloc>:: 6011: reserve(size_type __n) 6011: { 6011: if (__n > this->max_size()) 6011: __throw_length_error(("vector::reserve")); 6011: if (this->capacity() < __n) 6011: { 6011: const size_type __old_size = size(); 6011: pointer __tmp = _M_allocate_and_copy(__n, 6011: std::__make_move_if_noexcept_iterator(this->_M_impl._M_start), 6011: std::__make_move_if_noexcept_iterator(this->_M_impl._M_finish)); 6011: ; 6011: std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish, 6011: _M_get_Tp_allocator()); 6011: _M_deallocate(this->_M_impl._M_start, 6011: this->_M_impl._M_end_of_storage 6011: - this->_M_impl._M_start); 6011: this->_M_impl._M_start = __tmp; 6011: this->_M_impl._M_finish = __tmp + __old_size; 6011: this->_M_impl._M_end_of_storage = this->_M_impl._M_start + __n; 6011: } 6011: } 6011: 6011: 6011: template 6011: template 6011: 6011: 6011: 6011: void 6011: 6011: vector<_Tp, _Alloc>:: 6011: emplace_back(_Args&&... __args) 6011: { 6011: if (this->_M_impl._M_finish != this->_M_impl._M_end_of_storage) 6011: { 6011: ; 6011: _Alloc_traits::construct(this->_M_impl, this->_M_impl._M_finish, 6011: std::forward<_Args>(__args)...); 6011: ++this->_M_impl._M_finish; 6011: ; 6011: } 6011: else 6011: _M_realloc_insert(end(), std::forward<_Args>(__args)...); 6011: 6011: 6011: 6011: } 6011: 6011: 6011: template 6011: typename vector<_Tp, _Alloc>::iterator 6011: vector<_Tp, _Alloc>:: 6011: 6011: insert(const_iterator __position, const value_type& __x) 6011: 6011: 6011: 6011: { 6011: const size_type __n = __position - begin(); 6011: if (this->_M_impl._M_finish != this->_M_impl._M_end_of_storage) 6011: if (__position == end()) 6011: { 6011: ; 6011: _Alloc_traits::construct(this->_M_impl, this->_M_impl._M_finish, 6011: __x); 6011: ++this->_M_impl._M_finish; 6011: ; 6011: } 6011: else 6011: { 6011: 6011: const auto __pos = begin() + (__position - cbegin()); 6011: 6011: 6011: _Temporary_value __x_copy(this, __x); 6011: _M_insert_aux(__pos, std::move(__x_copy._M_val())); 6011: 6011: 6011: 6011: } 6011: else 6011: 6011: _M_realloc_insert(begin() + (__position - cbegin()), __x); 6011: 6011: 6011: 6011: 6011: return iterator(this->_M_impl._M_start + __n); 6011: } 6011: 6011: template 6011: typename vector<_Tp, _Alloc>::iterator 6011: vector<_Tp, _Alloc>:: 6011: _M_erase(iterator __position) 6011: { 6011: if (__position + 1 != end()) 6011: std::move(__position + 1, end(), __position); 6011: --this->_M_impl._M_finish; 6011: _Alloc_traits::destroy(this->_M_impl, this->_M_impl._M_finish); 6011: ; 6011: return __position; 6011: } 6011: 6011: template 6011: typename vector<_Tp, _Alloc>::iterator 6011: vector<_Tp, _Alloc>:: 6011: _M_erase(iterator __first, iterator __last) 6011: { 6011: if (__first != __last) 6011: { 6011: if (__last != end()) 6011: std::move(__last, end(), __first); 6011: _M_erase_at_end(__first.base() + (end() - __last)); 6011: } 6011: return __first; 6011: } 6011: 6011: template 6011: vector<_Tp, _Alloc>& 6011: vector<_Tp, _Alloc>:: 6011: operator=(const vector<_Tp, _Alloc>& __x) 6011: { 6011: if (&__x != this) 6011: { 6011: ; 6011: 6011: if (_Alloc_traits::_S_propagate_on_copy_assign()) 6011: { 6011: if (!_Alloc_traits::_S_always_equal() 6011: && _M_get_Tp_allocator() != __x._M_get_Tp_allocator()) 6011: { 6011: 6011: this->clear(); 6011: _M_deallocate(this->_M_impl._M_start, 6011: this->_M_impl._M_end_of_storage 6011: - this->_M_impl._M_start); 6011: this->_M_impl._M_start = nullptr; 6011: this->_M_impl._M_finish = nullptr; 6011: this->_M_impl._M_end_of_storage = nullptr; 6011: } 6011: std::__alloc_on_copy(_M_get_Tp_allocator(), 6011: __x._M_get_Tp_allocator()); 6011: } 6011: 6011: const size_type __xlen = __x.size(); 6011: if (__xlen > capacity()) 6011: { 6011: pointer __tmp = _M_allocate_and_copy(__xlen, __x.begin(), 6011: __x.end()); 6011: std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish, 6011: _M_get_Tp_allocator()); 6011: _M_deallocate(this->_M_impl._M_start, 6011: this->_M_impl._M_end_of_storage 6011: - this->_M_impl._M_start); 6011: this->_M_impl._M_start = __tmp; 6011: this->_M_impl._M_end_of_storage = this->_M_impl._M_start + __xlen; 6011: } 6011: else if (size() >= __xlen) 6011: { 6011: std::_Destroy(std::copy(__x.begin(), __x.end(), begin()), 6011: end(), _M_get_Tp_allocator()); 6011: } 6011: else 6011: { 6011: std::copy(__x._M_impl._M_start, __x._M_impl._M_start + size(), 6011: this->_M_impl._M_start); 6011: std::__uninitialized_copy_a(__x._M_impl._M_start + size(), 6011: __x._M_impl._M_finish, 6011: this->_M_impl._M_finish, 6011: _M_get_Tp_allocator()); 6011: } 6011: this->_M_impl._M_finish = this->_M_impl._M_start + __xlen; 6011: } 6011: return *this; 6011: } 6011: 6011: template 6011: void 6011: vector<_Tp, _Alloc>:: 6011: _M_fill_assign(size_t __n, const value_type& __val) 6011: { 6011: if (__n > capacity()) 6011: { 6011: vector __tmp(__n, __val, _M_get_Tp_allocator()); 6011: __tmp._M_impl._M_swap_data(this->_M_impl); 6011: } 6011: else if (__n > size()) 6011: { 6011: std::fill(begin(), end(), __val); 6011: const size_type __add = __n - size(); 6011: ; 6011: this->_M_impl._M_finish = 6011: std::__uninitialized_fill_n_a(this->_M_impl._M_finish, 6011: __add, __val, _M_get_Tp_allocator()); 6011: ; 6011: } 6011: else 6011: _M_erase_at_end(std::fill_n(this->_M_impl._M_start, __n, __val)); 6011: } 6011: 6011: template 6011: template 6011: void 6011: vector<_Tp, _Alloc>:: 6011: _M_assign_aux(_InputIterator __first, _InputIterator __last, 6011: std::input_iterator_tag) 6011: { 6011: pointer __cur(this->_M_impl._M_start); 6011: for (; __first != __last && __cur != this->_M_impl._M_finish; 6011: ++__cur, ++__first) 6011: *__cur = *__first; 6011: if (__first == __last) 6011: _M_erase_at_end(__cur); 6011: else 6011: _M_range_insert(end(), __first, __last, 6011: std::__iterator_category(__first)); 6011: } 6011: 6011: template 6011: template 6011: void 6011: vector<_Tp, _Alloc>:: 6011: _M_assign_aux(_ForwardIterator __first, _ForwardIterator __last, 6011: std::forward_iterator_tag) 6011: { 6011: const size_type __len = std::distance(__first, __last); 6011: 6011: if (__len > capacity()) 6011: { 6011: pointer __tmp(_M_allocate_and_copy(__len, __first, __last)); 6011: ; 6011: std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish, 6011: _M_get_Tp_allocator()); 6011: _M_deallocate(this->_M_impl._M_start, 6011: this->_M_impl._M_end_of_storage 6011: - this->_M_impl._M_start); 6011: this->_M_impl._M_start = __tmp; 6011: this->_M_impl._M_finish = this->_M_impl._M_start + __len; 6011: this->_M_impl._M_end_of_storage = this->_M_impl._M_finish; 6011: } 6011: else if (size() >= __len) 6011: _M_erase_at_end(std::copy(__first, __last, this->_M_impl._M_start)); 6011: else 6011: { 6011: _ForwardIterator __mid = __first; 6011: std::advance(__mid, size()); 6011: std::copy(__first, __mid, this->_M_impl._M_start); 6011: const size_type __attribute__((__unused__)) __n = __len - size(); 6011: ; 6011: this->_M_impl._M_finish = 6011: std::__uninitialized_copy_a(__mid, __last, 6011: this->_M_impl._M_finish, 6011: _M_get_Tp_allocator()); 6011: ; 6011: } 6011: } 6011: 6011: 6011: template 6011: auto 6011: vector<_Tp, _Alloc>:: 6011: _M_insert_rval(const_iterator __position, value_type&& __v) -> iterator 6011: { 6011: const auto __n = __position - cbegin(); 6011: if (this->_M_impl._M_finish != this->_M_impl._M_end_of_storage) 6011: if (__position == cend()) 6011: { 6011: ; 6011: _Alloc_traits::construct(this->_M_impl, this->_M_impl._M_finish, 6011: std::move(__v)); 6011: ++this->_M_impl._M_finish; 6011: ; 6011: } 6011: else 6011: _M_insert_aux(begin() + __n, std::move(__v)); 6011: else 6011: _M_realloc_insert(begin() + __n, std::move(__v)); 6011: 6011: return iterator(this->_M_impl._M_start + __n); 6011: } 6011: 6011: template 6011: template 6011: auto 6011: vector<_Tp, _Alloc>:: 6011: _M_emplace_aux(const_iterator __position, _Args&&... __args) 6011: -> iterator 6011: { 6011: const auto __n = __position - cbegin(); 6011: if (this->_M_impl._M_finish != this->_M_impl._M_end_of_storage) 6011: if (__position == cend()) 6011: { 6011: ; 6011: _Alloc_traits::construct(this->_M_impl, this->_M_impl._M_finish, 6011: std::forward<_Args>(__args)...); 6011: ++this->_M_impl._M_finish; 6011: ; 6011: } 6011: else 6011: { 6011: 6011: 6011: 6011: _Temporary_value __tmp(this, std::forward<_Args>(__args)...); 6011: _M_insert_aux(begin() + __n, std::move(__tmp._M_val())); 6011: } 6011: else 6011: _M_realloc_insert(begin() + __n, std::forward<_Args>(__args)...); 6011: 6011: return iterator(this->_M_impl._M_start + __n); 6011: } 6011: 6011: template 6011: template 6011: void 6011: vector<_Tp, _Alloc>:: 6011: _M_insert_aux(iterator __position, _Arg&& __arg) 6011: 6011: 6011: 6011: 6011: 6011: 6011: { 6011: ; 6011: _Alloc_traits::construct(this->_M_impl, this->_M_impl._M_finish, 6011: std::move(*(this->_M_impl._M_finish - 1))); 6011: ++this->_M_impl._M_finish; 6011: ; 6011: 6011: 6011: 6011: std::move_backward(__position.base(), this->_M_impl._M_finish - 2, this->_M_impl._M_finish - 1) 6011: 6011: ; 6011: 6011: 6011: 6011: *__position = std::forward<_Arg>(__arg); 6011: 6011: } 6011: 6011: 6011: template 6011: template 6011: void 6011: vector<_Tp, _Alloc>:: 6011: _M_realloc_insert(iterator __position, _Args&&... __args) 6011: 6011: 6011: 6011: 6011: 6011: 6011: { 6011: const size_type __len = 6011: _M_check_len(size_type(1), "vector::_M_realloc_insert"); 6011: pointer __old_start = this->_M_impl._M_start; 6011: pointer __old_finish = this->_M_impl._M_finish; 6011: const size_type __elems_before = __position - begin(); 6011: pointer __new_start(this->_M_allocate(__len)); 6011: pointer __new_finish(__new_start); 6011: try 6011: { 6011: 6011: 6011: 6011: 6011: 6011: _Alloc_traits::construct(this->_M_impl, 6011: __new_start + __elems_before, 6011: 6011: std::forward<_Args>(__args)...); 6011: 6011: 6011: 6011: __new_finish = pointer(); 6011: 6011: __new_finish 6011: = std::__uninitialized_move_if_noexcept_a 6011: (__old_start, __position.base(), 6011: __new_start, _M_get_Tp_allocator()); 6011: 6011: ++__new_finish; 6011: 6011: __new_finish 6011: = std::__uninitialized_move_if_noexcept_a 6011: (__position.base(), __old_finish, 6011: __new_finish, _M_get_Tp_allocator()); 6011: } 6011: catch(...) 6011: { 6011: if (!__new_finish) 6011: _Alloc_traits::destroy(this->_M_impl, 6011: __new_start + __elems_before); 6011: else 6011: std::_Destroy(__new_start, __new_finish, _M_get_Tp_allocator()); 6011: _M_deallocate(__new_start, __len); 6011: throw; 6011: } 6011: ; 6011: std::_Destroy(__old_start, __old_finish, _M_get_Tp_allocator()); 6011: _M_deallocate(__old_start, 6011: this->_M_impl._M_end_of_storage - __old_start); 6011: this->_M_impl._M_start = __new_start; 6011: this->_M_impl._M_finish = __new_finish; 6011: this->_M_impl._M_end_of_storage = __new_start + __len; 6011: } 6011: 6011: template 6011: void 6011: vector<_Tp, _Alloc>:: 6011: _M_fill_insert(iterator __position, size_type __n, const value_type& __x) 6011: { 6011: if (__n != 0) 6011: { 6011: if (size_type(this->_M_impl._M_end_of_storage 6011: - this->_M_impl._M_finish) >= __n) 6011: { 6011: 6011: 6011: 6011: _Temporary_value __tmp(this, __x); 6011: value_type& __x_copy = __tmp._M_val(); 6011: 6011: const size_type __elems_after = end() - __position; 6011: pointer __old_finish(this->_M_impl._M_finish); 6011: if (__elems_after > __n) 6011: { 6011: ; 6011: std::__uninitialized_move_a(this->_M_impl._M_finish - __n, 6011: this->_M_impl._M_finish, 6011: this->_M_impl._M_finish, 6011: _M_get_Tp_allocator()); 6011: this->_M_impl._M_finish += __n; 6011: ; 6011: std::move_backward(__position.base(), __old_finish - __n, __old_finish) 6011: ; 6011: std::fill(__position.base(), __position.base() + __n, 6011: __x_copy); 6011: } 6011: else 6011: { 6011: ; 6011: this->_M_impl._M_finish = 6011: std::__uninitialized_fill_n_a(this->_M_impl._M_finish, 6011: __n - __elems_after, 6011: __x_copy, 6011: _M_get_Tp_allocator()); 6011: ; 6011: std::__uninitialized_move_a(__position.base(), __old_finish, 6011: this->_M_impl._M_finish, 6011: _M_get_Tp_allocator()); 6011: this->_M_impl._M_finish += __elems_after; 6011: ; 6011: std::fill(__position.base(), __old_finish, __x_copy); 6011: } 6011: } 6011: else 6011: { 6011: const size_type __len = 6011: _M_check_len(__n, "vector::_M_fill_insert"); 6011: const size_type __elems_before = __position - begin(); 6011: pointer __new_start(this->_M_allocate(__len)); 6011: pointer __new_finish(__new_start); 6011: try 6011: { 6011: 6011: std::__uninitialized_fill_n_a(__new_start + __elems_before, 6011: __n, __x, 6011: _M_get_Tp_allocator()); 6011: __new_finish = pointer(); 6011: 6011: __new_finish 6011: = std::__uninitialized_move_if_noexcept_a 6011: (this->_M_impl._M_start, __position.base(), 6011: __new_start, _M_get_Tp_allocator()); 6011: 6011: __new_finish += __n; 6011: 6011: __new_finish 6011: = std::__uninitialized_move_if_noexcept_a 6011: (__position.base(), this->_M_impl._M_finish, 6011: __new_finish, _M_get_Tp_allocator()); 6011: } 6011: catch(...) 6011: { 6011: if (!__new_finish) 6011: std::_Destroy(__new_start + __elems_before, 6011: __new_start + __elems_before + __n, 6011: _M_get_Tp_allocator()); 6011: else 6011: std::_Destroy(__new_start, __new_finish, 6011: _M_get_Tp_allocator()); 6011: _M_deallocate(__new_start, __len); 6011: throw; 6011: } 6011: ; 6011: std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish, 6011: _M_get_Tp_allocator()); 6011: _M_deallocate(this->_M_impl._M_start, 6011: this->_M_impl._M_end_of_storage 6011: - this->_M_impl._M_start); 6011: this->_M_impl._M_start = __new_start; 6011: this->_M_impl._M_finish = __new_finish; 6011: this->_M_impl._M_end_of_storage = __new_start + __len; 6011: } 6011: } 6011: } 6011: 6011: 6011: template 6011: void 6011: vector<_Tp, _Alloc>:: 6011: _M_default_append(size_type __n) 6011: { 6011: if (__n != 0) 6011: { 6011: size_type __size = size(); 6011: size_type __navail = size_type(this->_M_impl._M_end_of_storage 6011: - this->_M_impl._M_finish); 6011: 6011: if (__size > max_size() || __navail > max_size() - __size) 6011: __builtin_unreachable(); 6011: 6011: if (__navail >= __n) 6011: { 6011: ; 6011: this->_M_impl._M_finish = 6011: std::__uninitialized_default_n_a(this->_M_impl._M_finish, 6011: __n, _M_get_Tp_allocator()); 6011: ; 6011: } 6011: else 6011: { 6011: const size_type __len = 6011: _M_check_len(__n, "vector::_M_default_append"); 6011: const size_type __old_size = __size; 6011: pointer __new_start(this->_M_allocate(__len)); 6011: pointer __new_finish(__new_start); 6011: try 6011: { 6011: __new_finish 6011: = std::__uninitialized_move_if_noexcept_a 6011: (this->_M_impl._M_start, this->_M_impl._M_finish, 6011: __new_start, _M_get_Tp_allocator()); 6011: __new_finish = 6011: std::__uninitialized_default_n_a(__new_finish, __n, 6011: _M_get_Tp_allocator()); 6011: } 6011: catch(...) 6011: { 6011: std::_Destroy(__new_start, __new_finish, 6011: _M_get_Tp_allocator()); 6011: _M_deallocate(__new_start, __len); 6011: throw; 6011: } 6011: ; 6011: std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish, 6011: _M_get_Tp_allocator()); 6011: _M_deallocate(this->_M_impl._M_start, 6011: this->_M_impl._M_end_of_storage 6011: - this->_M_impl._M_start); 6011: this->_M_impl._M_start = __new_start; 6011: this->_M_impl._M_finish = __new_finish; 6011: this->_M_impl._M_end_of_storage = __new_start + __len; 6011: } 6011: } 6011: } 6011: 6011: template 6011: bool 6011: vector<_Tp, _Alloc>:: 6011: _M_shrink_to_fit() 6011: { 6011: if (capacity() == size()) 6011: return false; 6011: ; 6011: return std::__shrink_to_fit_aux::_S_do_it(*this); 6011: } 6011: 6011: 6011: template 6011: template 6011: void 6011: vector<_Tp, _Alloc>:: 6011: _M_range_insert(iterator __pos, _InputIterator __first, 6011: _InputIterator __last, std::input_iterator_tag) 6011: { 6011: if (__pos == end()) 6011: { 6011: for (; __first != __last; ++__first) 6011: insert(end(), *__first); 6011: } 6011: else if (__first != __last) 6011: { 6011: vector __tmp(__first, __last, _M_get_Tp_allocator()); 6011: insert(__pos, 6011: std::make_move_iterator(__tmp.begin()), 6011: std::make_move_iterator(__tmp.end())); 6011: } 6011: } 6011: 6011: template 6011: template 6011: void 6011: vector<_Tp, _Alloc>:: 6011: _M_range_insert(iterator __position, _ForwardIterator __first, 6011: _ForwardIterator __last, std::forward_iterator_tag) 6011: { 6011: if (__first != __last) 6011: { 6011: const size_type __n = std::distance(__first, __last); 6011: if (size_type(this->_M_impl._M_end_of_storage 6011: - this->_M_impl._M_finish) >= __n) 6011: { 6011: const size_type __elems_after = end() - __position; 6011: pointer __old_finish(this->_M_impl._M_finish); 6011: if (__elems_after > __n) 6011: { 6011: ; 6011: std::__uninitialized_move_a(this->_M_impl._M_finish - __n, 6011: this->_M_impl._M_finish, 6011: this->_M_impl._M_finish, 6011: _M_get_Tp_allocator()); 6011: this->_M_impl._M_finish += __n; 6011: ; 6011: std::move_backward(__position.base(), __old_finish - __n, __old_finish) 6011: ; 6011: std::copy(__first, __last, __position); 6011: } 6011: else 6011: { 6011: _ForwardIterator __mid = __first; 6011: std::advance(__mid, __elems_after); 6011: ; 6011: std::__uninitialized_copy_a(__mid, __last, 6011: this->_M_impl._M_finish, 6011: _M_get_Tp_allocator()); 6011: this->_M_impl._M_finish += __n - __elems_after; 6011: ; 6011: std::__uninitialized_move_a(__position.base(), 6011: __old_finish, 6011: this->_M_impl._M_finish, 6011: _M_get_Tp_allocator()); 6011: this->_M_impl._M_finish += __elems_after; 6011: ; 6011: std::copy(__first, __mid, __position); 6011: } 6011: } 6011: else 6011: { 6011: const size_type __len = 6011: _M_check_len(__n, "vector::_M_range_insert"); 6011: pointer __new_start(this->_M_allocate(__len)); 6011: pointer __new_finish(__new_start); 6011: try 6011: { 6011: __new_finish 6011: = std::__uninitialized_move_if_noexcept_a 6011: (this->_M_impl._M_start, __position.base(), 6011: __new_start, _M_get_Tp_allocator()); 6011: __new_finish 6011: = std::__uninitialized_copy_a(__first, __last, 6011: __new_finish, 6011: _M_get_Tp_allocator()); 6011: __new_finish 6011: = std::__uninitialized_move_if_noexcept_a 6011: (__position.base(), this->_M_impl._M_finish, 6011: __new_finish, _M_get_Tp_allocator()); 6011: } 6011: catch(...) 6011: { 6011: std::_Destroy(__new_start, __new_finish, 6011: _M_get_Tp_allocator()); 6011: _M_deallocate(__new_start, __len); 6011: throw; 6011: } 6011: ; 6011: std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish, 6011: _M_get_Tp_allocator()); 6011: _M_deallocate(this->_M_impl._M_start, 6011: this->_M_impl._M_end_of_storage 6011: - this->_M_impl._M_start); 6011: this->_M_impl._M_start = __new_start; 6011: this->_M_impl._M_finish = __new_finish; 6011: this->_M_impl._M_end_of_storage = __new_start + __len; 6011: } 6011: } 6011: } 6011: 6011: 6011: 6011: template 6011: void 6011: vector:: 6011: _M_reallocate(size_type __n) 6011: { 6011: _Bit_pointer __q = this->_M_allocate(__n); 6011: iterator __start(std::__addressof(*__q), 0); 6011: iterator __finish(_M_copy_aligned(begin(), end(), __start)); 6011: this->_M_deallocate(); 6011: this->_M_impl._M_start = __start; 6011: this->_M_impl._M_finish = __finish; 6011: this->_M_impl._M_end_of_storage = __q + _S_nword(__n); 6011: } 6011: 6011: template 6011: void 6011: vector:: 6011: _M_fill_insert(iterator __position, size_type __n, bool __x) 6011: { 6011: if (__n == 0) 6011: return; 6011: if (capacity() - size() >= __n) 6011: { 6011: std::copy_backward(__position, end(), 6011: this->_M_impl._M_finish + difference_type(__n)); 6011: std::fill(__position, __position + difference_type(__n), __x); 6011: this->_M_impl._M_finish += difference_type(__n); 6011: } 6011: else 6011: { 6011: const size_type __len = 6011: _M_check_len(__n, "vector::_M_fill_insert"); 6011: _Bit_pointer __q = this->_M_allocate(__len); 6011: iterator __start(std::__addressof(*__q), 0); 6011: iterator __i = _M_copy_aligned(begin(), __position, __start); 6011: std::fill(__i, __i + difference_type(__n), __x); 6011: iterator __finish = std::copy(__position, end(), 6011: __i + difference_type(__n)); 6011: this->_M_deallocate(); 6011: this->_M_impl._M_end_of_storage = __q + _S_nword(__len); 6011: this->_M_impl._M_start = __start; 6011: this->_M_impl._M_finish = __finish; 6011: } 6011: } 6011: 6011: template 6011: template 6011: void 6011: vector:: 6011: _M_insert_range(iterator __position, _ForwardIterator __first, 6011: _ForwardIterator __last, std::forward_iterator_tag) 6011: { 6011: if (__first != __last) 6011: { 6011: size_type __n = std::distance(__first, __last); 6011: if (capacity() - size() >= __n) 6011: { 6011: std::copy_backward(__position, end(), 6011: this->_M_impl._M_finish 6011: + difference_type(__n)); 6011: std::copy(__first, __last, __position); 6011: this->_M_impl._M_finish += difference_type(__n); 6011: } 6011: else 6011: { 6011: const size_type __len = 6011: _M_check_len(__n, "vector::_M_insert_range"); 6011: _Bit_pointer __q = this->_M_allocate(__len); 6011: iterator __start(std::__addressof(*__q), 0); 6011: iterator __i = _M_copy_aligned(begin(), __position, __start); 6011: __i = std::copy(__first, __last, __i); 6011: iterator __finish = std::copy(__position, end(), __i); 6011: this->_M_deallocate(); 6011: this->_M_impl._M_end_of_storage = __q + _S_nword(__len); 6011: this->_M_impl._M_start = __start; 6011: this->_M_impl._M_finish = __finish; 6011: } 6011: } 6011: } 6011: 6011: template 6011: void 6011: vector:: 6011: _M_insert_aux(iterator __position, bool __x) 6011: { 6011: if (this->_M_impl._M_finish._M_p != this->_M_impl._M_end_addr()) 6011: { 6011: std::copy_backward(__position, this->_M_impl._M_finish, 6011: this->_M_impl._M_finish + 1); 6011: *__position = __x; 6011: ++this->_M_impl._M_finish; 6011: } 6011: else 6011: { 6011: const size_type __len = 6011: _M_check_len(size_type(1), "vector::_M_insert_aux"); 6011: _Bit_pointer __q = this->_M_allocate(__len); 6011: iterator __start(std::__addressof(*__q), 0); 6011: iterator __i = _M_copy_aligned(begin(), __position, __start); 6011: *__i++ = __x; 6011: iterator __finish = std::copy(__position, end(), __i); 6011: this->_M_deallocate(); 6011: this->_M_impl._M_end_of_storage = __q + _S_nword(__len); 6011: this->_M_impl._M_start = __start; 6011: this->_M_impl._M_finish = __finish; 6011: } 6011: } 6011: 6011: template 6011: typename vector::iterator 6011: vector:: 6011: _M_erase(iterator __position) 6011: { 6011: if (__position + 1 != end()) 6011: std::copy(__position + 1, end(), __position); 6011: --this->_M_impl._M_finish; 6011: return __position; 6011: } 6011: 6011: template 6011: typename vector::iterator 6011: vector:: 6011: _M_erase(iterator __first, iterator __last) 6011: { 6011: if (__first != __last) 6011: _M_erase_at_end(std::copy(__last, end(), __first)); 6011: return __first; 6011: } 6011: 6011: 6011: template 6011: bool 6011: vector:: 6011: _M_shrink_to_fit() 6011: { 6011: if (capacity() - size() < int(_S_word_bit)) 6011: return false; 6011: try 6011: { 6011: _M_reallocate(size()); 6011: return true; 6011: } 6011: catch(...) 6011: { return false; } 6011: } 6011: 6011: 6011: 6011: 6011: } 6011: 6011: 6011: 6011: namespace std __attribute__ ((__visibility__ ("default"))) 6011: { 6011: 6011: 6011: template 6011: size_t 6011: hash>:: 6011: operator()(const std::vector& __b) const noexcept 6011: { 6011: size_t __hash = 0; 6011: using std::_S_word_bit; 6011: using std::_Bit_type; 6011: 6011: const size_t __words = __b.size() / _S_word_bit; 6011: if (__words) 6011: { 6011: const size_t __clength = __words * sizeof(_Bit_type); 6011: __hash = std::_Hash_impl::hash(__b._M_impl._M_start._M_p, __clength); 6011: } 6011: 6011: const size_t __extrabits = __b.size() % _S_word_bit; 6011: if (__extrabits) 6011: { 6011: _Bit_type __hiword = *__b._M_impl._M_finish._M_p; 6011: __hiword &= ~((~static_cast<_Bit_type>(0)) << __extrabits); 6011: 6011: const size_t __clength 6011: = (__extrabits + 8 - 1) / 8; 6011: if (__words) 6011: __hash = std::_Hash_impl::hash(&__hiword, __clength, __hash); 6011: else 6011: __hash = std::_Hash_impl::hash(&__hiword, __clength); 6011: } 6011: 6011: return __hash; 6011: } 6011: 6011: 6011: } 6011: # 70 "/usr/include/c++/8/vector" 2 3 6011: # 5 "array_view.hh" 2 6011: 6011: # 1 "/usr/include/c++/8/iterator" 1 3 6011: # 58 "/usr/include/c++/8/iterator" 3 6011: 6011: # 59 "/usr/include/c++/8/iterator" 3 6011: 6011: 6011: 6011: 6011: 6011: # 1 "/usr/include/c++/8/ostream" 1 3 6011: # 36 "/usr/include/c++/8/ostream" 3 6011: 6011: # 37 "/usr/include/c++/8/ostream" 3 6011: 6011: # 1 "/usr/include/c++/8/ios" 1 3 6011: # 36 "/usr/include/c++/8/ios" 3 6011: 6011: # 37 "/usr/include/c++/8/ios" 3 6011: 6011: # 1 "/usr/include/c++/8/iosfwd" 1 3 6011: # 36 "/usr/include/c++/8/iosfwd" 3 6011: 6011: # 37 "/usr/include/c++/8/iosfwd" 3 6011: 6011: 6011: # 1 "/usr/include/c++/8/bits/stringfwd.h" 1 3 6011: # 37 "/usr/include/c++/8/bits/stringfwd.h" 3 6011: 6011: # 38 "/usr/include/c++/8/bits/stringfwd.h" 3 6011: 6011: 6011: 6011: 6011: namespace std __attribute__ ((__visibility__ ("default"))) 6011: { 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: template 6011: struct char_traits; 6011: 6011: template<> struct char_traits; 6011: 6011: 6011: template<> struct char_traits; 6011: 6011: 6011: 6011: 6011: template<> struct char_traits; 6011: template<> struct char_traits; 6011: 6011: 6011: namespace __cxx11 { 6011: 6011: template, 6011: typename _Alloc = allocator<_CharT> > 6011: class basic_string; 6011: 6011: 6011: typedef basic_string string; 6011: 6011: 6011: 6011: typedef basic_string wstring; 6011: 6011: 6011: 6011: 6011: 6011: typedef basic_string u16string; 6011: 6011: 6011: typedef basic_string u32string; 6011: 6011: 6011: } 6011: 6011: 6011: 6011: 6011: } 6011: # 40 "/usr/include/c++/8/iosfwd" 2 3 6011: # 1 "/usr/include/c++/8/bits/postypes.h" 1 3 6011: # 38 "/usr/include/c++/8/bits/postypes.h" 3 6011: 6011: # 39 "/usr/include/c++/8/bits/postypes.h" 3 6011: 6011: # 1 "/usr/include/c++/8/cwchar" 1 3 6011: # 39 "/usr/include/c++/8/cwchar" 3 6011: 6011: # 40 "/usr/include/c++/8/cwchar" 3 6011: 6011: 6011: 6011: 6011: # 1 "/usr/include/wchar.h" 1 3 4 6011: # 27 "/usr/include/wchar.h" 3 4 6011: # 1 "/usr/include/arm-linux-gnueabihf/bits/libc-header-start.h" 1 3 4 6011: # 28 "/usr/include/wchar.h" 2 3 4 6011: 6011: 6011: # 1 "/usr/include/arm-linux-gnueabihf/bits/floatn.h" 1 3 4 6011: # 31 "/usr/include/wchar.h" 2 3 4 6011: 6011: 6011: 6011: 6011: # 1 "/usr/lib/gcc/arm-linux-gnueabihf/8/include/stddef.h" 1 3 4 6011: # 36 "/usr/include/wchar.h" 2 3 4 6011: 6011: 6011: # 1 "/usr/lib/gcc/arm-linux-gnueabihf/8/include/stdarg.h" 1 3 4 6011: # 40 "/usr/lib/gcc/arm-linux-gnueabihf/8/include/stdarg.h" 3 4 6011: typedef __builtin_va_list __gnuc_va_list; 6011: # 39 "/usr/include/wchar.h" 2 3 4 6011: 6011: # 1 "/usr/include/arm-linux-gnueabihf/bits/wchar.h" 1 3 4 6011: # 41 "/usr/include/wchar.h" 2 3 4 6011: # 1 "/usr/include/arm-linux-gnueabihf/bits/types/wint_t.h" 1 3 4 6011: # 20 "/usr/include/arm-linux-gnueabihf/bits/types/wint_t.h" 3 4 6011: typedef unsigned int wint_t; 6011: # 42 "/usr/include/wchar.h" 2 3 4 6011: # 1 "/usr/include/arm-linux-gnueabihf/bits/types/mbstate_t.h" 1 3 4 6011: 6011: 6011: 6011: # 1 "/usr/include/arm-linux-gnueabihf/bits/types/__mbstate_t.h" 1 3 4 6011: # 13 "/usr/include/arm-linux-gnueabihf/bits/types/__mbstate_t.h" 3 4 6011: typedef struct 6011: { 6011: int __count; 6011: union 6011: { 6011: unsigned int __wch; 6011: char __wchb[4]; 6011: } __value; 6011: } __mbstate_t; 6011: # 5 "/usr/include/arm-linux-gnueabihf/bits/types/mbstate_t.h" 2 3 4 6011: 6011: typedef __mbstate_t mbstate_t; 6011: # 43 "/usr/include/wchar.h" 2 3 4 6011: # 1 "/usr/include/arm-linux-gnueabihf/bits/types/__FILE.h" 1 3 4 6011: 6011: 6011: 6011: struct _IO_FILE; 6011: typedef struct _IO_FILE __FILE; 6011: # 44 "/usr/include/wchar.h" 2 3 4 6011: 6011: 6011: # 1 "/usr/include/arm-linux-gnueabihf/bits/types/FILE.h" 1 3 4 6011: 6011: 6011: 6011: struct _IO_FILE; 6011: 6011: 6011: typedef struct _IO_FILE FILE; 6011: # 47 "/usr/include/wchar.h" 2 3 4 6011: 6011: 6011: # 1 "/usr/include/arm-linux-gnueabihf/bits/types/locale_t.h" 1 3 4 6011: # 22 "/usr/include/arm-linux-gnueabihf/bits/types/locale_t.h" 3 4 6011: # 1 "/usr/include/arm-linux-gnueabihf/bits/types/__locale_t.h" 1 3 4 6011: # 28 "/usr/include/arm-linux-gnueabihf/bits/types/__locale_t.h" 3 4 6011: struct __locale_struct 6011: { 6011: 6011: struct __locale_data *__locales[13]; 6011: 6011: 6011: const unsigned short int *__ctype_b; 6011: const int *__ctype_tolower; 6011: const int *__ctype_toupper; 6011: 6011: 6011: const char *__names[13]; 6011: }; 6011: 6011: typedef struct __locale_struct *__locale_t; 6011: # 23 "/usr/include/arm-linux-gnueabihf/bits/types/locale_t.h" 2 3 4 6011: 6011: typedef __locale_t locale_t; 6011: # 50 "/usr/include/wchar.h" 2 3 4 6011: # 79 "/usr/include/wchar.h" 3 4 6011: extern "C" { 6011: 6011: 6011: 6011: struct tm; 6011: 6011: 6011: 6011: extern wchar_t *wcscpy (wchar_t *__restrict __dest, 6011: const wchar_t *__restrict __src) 6011: throw () __attribute__ ((__nonnull__ (1, 2))); 6011: 6011: 6011: extern wchar_t *wcsncpy (wchar_t *__restrict __dest, 6011: const wchar_t *__restrict __src, size_t __n) 6011: throw () __attribute__ ((__nonnull__ (1, 2))); 6011: 6011: 6011: extern wchar_t *wcscat (wchar_t *__restrict __dest, 6011: const wchar_t *__restrict __src) 6011: throw () __attribute__ ((__nonnull__ (1, 2))); 6011: 6011: extern wchar_t *wcsncat (wchar_t *__restrict __dest, 6011: const wchar_t *__restrict __src, size_t __n) 6011: throw () __attribute__ ((__nonnull__ (1, 2))); 6011: 6011: 6011: extern int wcscmp (const wchar_t *__s1, const wchar_t *__s2) 6011: throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); 6011: 6011: extern int wcsncmp (const wchar_t *__s1, const wchar_t *__s2, size_t __n) 6011: throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); 6011: 6011: 6011: 6011: extern int wcscasecmp (const wchar_t *__s1, const wchar_t *__s2) throw (); 6011: 6011: 6011: extern int wcsncasecmp (const wchar_t *__s1, const wchar_t *__s2, 6011: size_t __n) throw (); 6011: 6011: 6011: 6011: extern int wcscasecmp_l (const wchar_t *__s1, const wchar_t *__s2, 6011: locale_t __loc) throw (); 6011: 6011: extern int wcsncasecmp_l (const wchar_t *__s1, const wchar_t *__s2, 6011: size_t __n, locale_t __loc) throw (); 6011: 6011: 6011: 6011: 6011: extern int wcscoll (const wchar_t *__s1, const wchar_t *__s2) throw (); 6011: 6011: 6011: 6011: extern size_t wcsxfrm (wchar_t *__restrict __s1, 6011: const wchar_t *__restrict __s2, size_t __n) throw (); 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: extern int wcscoll_l (const wchar_t *__s1, const wchar_t *__s2, 6011: locale_t __loc) throw (); 6011: 6011: 6011: 6011: 6011: extern size_t wcsxfrm_l (wchar_t *__s1, const wchar_t *__s2, 6011: size_t __n, locale_t __loc) throw (); 6011: 6011: 6011: extern wchar_t *wcsdup (const wchar_t *__s) throw () __attribute__ ((__malloc__)); 6011: 6011: 6011: 6011: 6011: extern "C++" wchar_t *wcschr (wchar_t *__wcs, wchar_t __wc) 6011: throw () __asm ("wcschr") __attribute__ ((__pure__)); 6011: extern "C++" const wchar_t *wcschr (const wchar_t *__wcs, wchar_t __wc) 6011: throw () __asm ("wcschr") __attribute__ ((__pure__)); 6011: 6011: 6011: 6011: 6011: 6011: 6011: extern "C++" wchar_t *wcsrchr (wchar_t *__wcs, wchar_t __wc) 6011: throw () __asm ("wcsrchr") __attribute__ ((__pure__)); 6011: extern "C++" const wchar_t *wcsrchr (const wchar_t *__wcs, wchar_t __wc) 6011: throw () __asm ("wcsrchr") __attribute__ ((__pure__)); 6011: # 181 "/usr/include/wchar.h" 3 4 6011: extern wchar_t *wcschrnul (const wchar_t *__s, wchar_t __wc) 6011: throw () __attribute__ ((__pure__)); 6011: 6011: 6011: 6011: 6011: extern size_t wcscspn (const wchar_t *__wcs, const wchar_t *__reject) 6011: throw () __attribute__ ((__pure__)); 6011: 6011: 6011: extern size_t wcsspn (const wchar_t *__wcs, const wchar_t *__accept) 6011: throw () __attribute__ ((__pure__)); 6011: 6011: 6011: extern "C++" wchar_t *wcspbrk (wchar_t *__wcs, const wchar_t *__accept) 6011: throw () __asm ("wcspbrk") __attribute__ ((__pure__)); 6011: extern "C++" const wchar_t *wcspbrk (const wchar_t *__wcs, 6011: const wchar_t *__accept) 6011: throw () __asm ("wcspbrk") __attribute__ ((__pure__)); 6011: 6011: 6011: 6011: 6011: 6011: 6011: extern "C++" wchar_t *wcsstr (wchar_t *__haystack, const wchar_t *__needle) 6011: throw () __asm ("wcsstr") __attribute__ ((__pure__)); 6011: extern "C++" const wchar_t *wcsstr (const wchar_t *__haystack, 6011: const wchar_t *__needle) 6011: throw () __asm ("wcsstr") __attribute__ ((__pure__)); 6011: 6011: 6011: 6011: 6011: 6011: 6011: extern wchar_t *wcstok (wchar_t *__restrict __s, 6011: const wchar_t *__restrict __delim, 6011: wchar_t **__restrict __ptr) throw (); 6011: 6011: 6011: extern size_t wcslen (const wchar_t *__s) throw () __attribute__ ((__pure__)); 6011: 6011: 6011: 6011: 6011: extern "C++" wchar_t *wcswcs (wchar_t *__haystack, const wchar_t *__needle) 6011: throw () __asm ("wcswcs") __attribute__ ((__pure__)); 6011: extern "C++" const wchar_t *wcswcs (const wchar_t *__haystack, 6011: const wchar_t *__needle) 6011: throw () __asm ("wcswcs") __attribute__ ((__pure__)); 6011: # 240 "/usr/include/wchar.h" 3 4 6011: extern size_t wcsnlen (const wchar_t *__s, size_t __maxlen) 6011: throw () __attribute__ ((__pure__)); 6011: 6011: 6011: 6011: 6011: 6011: extern "C++" wchar_t *wmemchr (wchar_t *__s, wchar_t __c, size_t __n) 6011: throw () __asm ("wmemchr") __attribute__ ((__pure__)); 6011: extern "C++" const wchar_t *wmemchr (const wchar_t *__s, wchar_t __c, 6011: size_t __n) 6011: throw () __asm ("wmemchr") __attribute__ ((__pure__)); 6011: 6011: 6011: 6011: 6011: 6011: 6011: extern int wmemcmp (const wchar_t *__s1, const wchar_t *__s2, size_t __n) 6011: throw () __attribute__ ((__pure__)); 6011: 6011: 6011: extern wchar_t *wmemcpy (wchar_t *__restrict __s1, 6011: const wchar_t *__restrict __s2, size_t __n) throw (); 6011: 6011: 6011: 6011: extern wchar_t *wmemmove (wchar_t *__s1, const wchar_t *__s2, size_t __n) 6011: throw (); 6011: 6011: 6011: extern wchar_t *wmemset (wchar_t *__s, wchar_t __c, size_t __n) throw (); 6011: 6011: 6011: 6011: 6011: extern wchar_t *wmempcpy (wchar_t *__restrict __s1, 6011: const wchar_t *__restrict __s2, size_t __n) 6011: throw (); 6011: 6011: 6011: 6011: 6011: 6011: extern wint_t btowc (int __c) throw (); 6011: 6011: 6011: 6011: extern int wctob (wint_t __c) throw (); 6011: 6011: 6011: 6011: extern int mbsinit (const mbstate_t *__ps) throw () __attribute__ ((__pure__)); 6011: 6011: 6011: 6011: extern size_t mbrtowc (wchar_t *__restrict __pwc, 6011: const char *__restrict __s, size_t __n, 6011: mbstate_t *__restrict __p) throw (); 6011: 6011: 6011: extern size_t wcrtomb (char *__restrict __s, wchar_t __wc, 6011: mbstate_t *__restrict __ps) throw (); 6011: 6011: 6011: extern size_t __mbrlen (const char *__restrict __s, size_t __n, 6011: mbstate_t *__restrict __ps) throw (); 6011: extern size_t mbrlen (const char *__restrict __s, size_t __n, 6011: mbstate_t *__restrict __ps) throw (); 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: extern wint_t __btowc_alias (int __c) __asm ("btowc"); 6011: extern __inline __attribute__ ((__gnu_inline__)) wint_t 6011: __attribute__ ((__leaf__)) btowc (int __c) throw () 6011: { return (__builtin_constant_p (__c) && __c >= '\0' && __c <= '\x7f' 6011: ? (wint_t) __c : __btowc_alias (__c)); } 6011: 6011: extern int __wctob_alias (wint_t __c) __asm ("wctob"); 6011: extern __inline __attribute__ ((__gnu_inline__)) int 6011: __attribute__ ((__leaf__)) wctob (wint_t __wc) throw () 6011: { return (__builtin_constant_p (__wc) && __wc >= L'\0' && __wc <= L'\x7f' 6011: ? (int) __wc : __wctob_alias (__wc)); } 6011: 6011: extern __inline __attribute__ ((__gnu_inline__)) size_t 6011: __attribute__ ((__leaf__)) mbrlen (const char *__restrict __s, size_t __n, mbstate_t *__restrict __ps) throw () 6011: 6011: { return (__ps != __null 6011: ? mbrtowc (__null, __s, __n, __ps) : __mbrlen (__s, __n, __null)); } 6011: 6011: 6011: 6011: 6011: extern size_t mbsrtowcs (wchar_t *__restrict __dst, 6011: const char **__restrict __src, size_t __len, 6011: mbstate_t *__restrict __ps) throw (); 6011: 6011: 6011: 6011: extern size_t wcsrtombs (char *__restrict __dst, 6011: const wchar_t **__restrict __src, size_t __len, 6011: mbstate_t *__restrict __ps) throw (); 6011: 6011: 6011: 6011: 6011: 6011: extern size_t mbsnrtowcs (wchar_t *__restrict __dst, 6011: const char **__restrict __src, size_t __nmc, 6011: size_t __len, mbstate_t *__restrict __ps) throw (); 6011: 6011: 6011: 6011: extern size_t wcsnrtombs (char *__restrict __dst, 6011: const wchar_t **__restrict __src, 6011: size_t __nwc, size_t __len, 6011: mbstate_t *__restrict __ps) throw (); 6011: 6011: 6011: 6011: 6011: 6011: 6011: extern int wcwidth (wchar_t __c) throw (); 6011: 6011: 6011: 6011: extern int wcswidth (const wchar_t *__s, size_t __n) throw (); 6011: 6011: 6011: 6011: 6011: 6011: extern double wcstod (const wchar_t *__restrict __nptr, 6011: wchar_t **__restrict __endptr) throw (); 6011: 6011: 6011: 6011: extern float wcstof (const wchar_t *__restrict __nptr, 6011: wchar_t **__restrict __endptr) throw (); 6011: extern long double wcstold (const wchar_t *__restrict __nptr, 6011: wchar_t **__restrict __endptr) throw (); 6011: # 397 "/usr/include/wchar.h" 3 4 6011: extern long int wcstol (const wchar_t *__restrict __nptr, 6011: wchar_t **__restrict __endptr, int __base) throw (); 6011: 6011: 6011: 6011: extern unsigned long int wcstoul (const wchar_t *__restrict __nptr, 6011: wchar_t **__restrict __endptr, int __base) 6011: throw (); 6011: 6011: 6011: 6011: 6011: __extension__ 6011: extern long long int wcstoll (const wchar_t *__restrict __nptr, 6011: wchar_t **__restrict __endptr, int __base) 6011: throw (); 6011: 6011: 6011: 6011: __extension__ 6011: extern unsigned long long int wcstoull (const wchar_t *__restrict __nptr, 6011: wchar_t **__restrict __endptr, 6011: int __base) throw (); 6011: 6011: 6011: 6011: 6011: 6011: __extension__ 6011: extern long long int wcstoq (const wchar_t *__restrict __nptr, 6011: wchar_t **__restrict __endptr, int __base) 6011: throw (); 6011: 6011: 6011: 6011: __extension__ 6011: extern unsigned long long int wcstouq (const wchar_t *__restrict __nptr, 6011: wchar_t **__restrict __endptr, 6011: int __base) throw (); 6011: 6011: 6011: 6011: 6011: 6011: 6011: extern long int wcstol_l (const wchar_t *__restrict __nptr, 6011: wchar_t **__restrict __endptr, int __base, 6011: locale_t __loc) throw (); 6011: 6011: extern unsigned long int wcstoul_l (const wchar_t *__restrict __nptr, 6011: wchar_t **__restrict __endptr, 6011: int __base, locale_t __loc) throw (); 6011: 6011: __extension__ 6011: extern long long int wcstoll_l (const wchar_t *__restrict __nptr, 6011: wchar_t **__restrict __endptr, 6011: int __base, locale_t __loc) throw (); 6011: 6011: __extension__ 6011: extern unsigned long long int wcstoull_l (const wchar_t *__restrict __nptr, 6011: wchar_t **__restrict __endptr, 6011: int __base, locale_t __loc) 6011: throw (); 6011: 6011: extern double wcstod_l (const wchar_t *__restrict __nptr, 6011: wchar_t **__restrict __endptr, locale_t __loc) 6011: throw (); 6011: 6011: extern float wcstof_l (const wchar_t *__restrict __nptr, 6011: wchar_t **__restrict __endptr, locale_t __loc) 6011: throw (); 6011: 6011: extern long double wcstold_l (const wchar_t *__restrict __nptr, 6011: wchar_t **__restrict __endptr, 6011: locale_t __loc) throw (); 6011: # 484 "/usr/include/wchar.h" 3 4 6011: extern wchar_t *wcpcpy (wchar_t *__restrict __dest, 6011: const wchar_t *__restrict __src) throw (); 6011: 6011: 6011: 6011: extern wchar_t *wcpncpy (wchar_t *__restrict __dest, 6011: const wchar_t *__restrict __src, size_t __n) 6011: throw (); 6011: # 500 "/usr/include/wchar.h" 3 4 6011: extern __FILE *open_wmemstream (wchar_t **__bufloc, size_t *__sizeloc) throw (); 6011: 6011: 6011: 6011: 6011: 6011: extern int fwide (__FILE *__fp, int __mode) throw (); 6011: 6011: 6011: 6011: 6011: 6011: 6011: extern int fwprintf (__FILE *__restrict __stream, 6011: const wchar_t *__restrict __format, ...) 6011: ; 6011: 6011: 6011: 6011: 6011: extern int wprintf (const wchar_t *__restrict __format, ...) 6011: ; 6011: 6011: extern int swprintf (wchar_t *__restrict __s, size_t __n, 6011: const wchar_t *__restrict __format, ...) 6011: throw () ; 6011: 6011: 6011: 6011: 6011: 6011: extern int vfwprintf (__FILE *__restrict __s, 6011: const wchar_t *__restrict __format, 6011: __gnuc_va_list __arg) 6011: ; 6011: 6011: 6011: 6011: 6011: extern int vwprintf (const wchar_t *__restrict __format, 6011: __gnuc_va_list __arg) 6011: ; 6011: 6011: 6011: extern int vswprintf (wchar_t *__restrict __s, size_t __n, 6011: const wchar_t *__restrict __format, 6011: __gnuc_va_list __arg) 6011: throw () ; 6011: 6011: 6011: 6011: 6011: 6011: 6011: extern int fwscanf (__FILE *__restrict __stream, 6011: const wchar_t *__restrict __format, ...) 6011: ; 6011: 6011: 6011: 6011: 6011: extern int wscanf (const wchar_t *__restrict __format, ...) 6011: ; 6011: 6011: extern int swscanf (const wchar_t *__restrict __s, 6011: const wchar_t *__restrict __format, ...) 6011: throw () ; 6011: # 606 "/usr/include/wchar.h" 3 4 6011: extern int vfwscanf (__FILE *__restrict __s, 6011: const wchar_t *__restrict __format, 6011: __gnuc_va_list __arg) 6011: ; 6011: 6011: 6011: 6011: 6011: extern int vwscanf (const wchar_t *__restrict __format, 6011: __gnuc_va_list __arg) 6011: ; 6011: 6011: extern int vswscanf (const wchar_t *__restrict __s, 6011: const wchar_t *__restrict __format, 6011: __gnuc_va_list __arg) 6011: throw () ; 6011: # 660 "/usr/include/wchar.h" 3 4 6011: extern wint_t fgetwc (__FILE *__stream); 6011: extern wint_t getwc (__FILE *__stream); 6011: 6011: 6011: 6011: 6011: 6011: extern wint_t getwchar (void); 6011: 6011: 6011: 6011: 6011: 6011: 6011: extern wint_t fputwc (wchar_t __wc, __FILE *__stream); 6011: extern wint_t putwc (wchar_t __wc, __FILE *__stream); 6011: 6011: 6011: 6011: 6011: 6011: extern wint_t putwchar (wchar_t __wc); 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: extern wchar_t *fgetws (wchar_t *__restrict __ws, int __n, 6011: __FILE *__restrict __stream); 6011: 6011: 6011: 6011: 6011: 6011: extern int fputws (const wchar_t *__restrict __ws, 6011: __FILE *__restrict __stream); 6011: 6011: 6011: 6011: 6011: 6011: 6011: extern wint_t ungetwc (wint_t __wc, __FILE *__stream); 6011: # 715 "/usr/include/wchar.h" 3 4 6011: extern wint_t getwc_unlocked (__FILE *__stream); 6011: extern wint_t getwchar_unlocked (void); 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: extern wint_t fgetwc_unlocked (__FILE *__stream); 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: extern wint_t fputwc_unlocked (wchar_t __wc, __FILE *__stream); 6011: # 741 "/usr/include/wchar.h" 3 4 6011: extern wint_t putwc_unlocked (wchar_t __wc, __FILE *__stream); 6011: extern wint_t putwchar_unlocked (wchar_t __wc); 6011: # 751 "/usr/include/wchar.h" 3 4 6011: extern wchar_t *fgetws_unlocked (wchar_t *__restrict __ws, int __n, 6011: __FILE *__restrict __stream); 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: extern int fputws_unlocked (const wchar_t *__restrict __ws, 6011: __FILE *__restrict __stream); 6011: 6011: 6011: 6011: 6011: 6011: 6011: extern size_t wcsftime (wchar_t *__restrict __s, size_t __maxsize, 6011: const wchar_t *__restrict __format, 6011: const struct tm *__restrict __tp) throw (); 6011: 6011: 6011: 6011: 6011: extern size_t wcsftime_l (wchar_t *__restrict __s, size_t __maxsize, 6011: const wchar_t *__restrict __format, 6011: const struct tm *__restrict __tp, 6011: locale_t __loc) throw (); 6011: 6011: 6011: 6011: 6011: # 1 "/usr/include/arm-linux-gnueabihf/bits/wchar2.h" 1 3 4 6011: # 24 "/usr/include/arm-linux-gnueabihf/bits/wchar2.h" 3 4 6011: extern wchar_t *__wmemcpy_chk (wchar_t *__restrict __s1, 6011: const wchar_t *__restrict __s2, size_t __n, 6011: size_t __ns1) throw (); 6011: extern wchar_t *__wmemcpy_alias (wchar_t *__restrict __s1, const wchar_t *__restrict __s2, size_t __n) throw () __asm__ ("" "wmemcpy") 6011: 6011: 6011: ; 6011: 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") 6011: 6011: 6011: 6011: __attribute__((__warning__ ("wmemcpy called with length bigger than size of destination " "buffer"))) 6011: ; 6011: 6011: extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) wchar_t * 6011: __attribute__ ((__leaf__)) wmemcpy (wchar_t *__restrict __s1, const wchar_t *__restrict __s2, size_t __n) throw () 6011: 6011: { 6011: if (__builtin_object_size (__s1, 0) != (size_t) -1) 6011: { 6011: if (!__builtin_constant_p (__n)) 6011: return __wmemcpy_chk (__s1, __s2, __n, 6011: __builtin_object_size (__s1, 0) / sizeof (wchar_t)); 6011: 6011: if (__n > __builtin_object_size (__s1, 0) / sizeof (wchar_t)) 6011: return __wmemcpy_chk_warn (__s1, __s2, __n, 6011: __builtin_object_size (__s1, 0) / sizeof (wchar_t)); 6011: } 6011: return __wmemcpy_alias (__s1, __s2, __n); 6011: } 6011: 6011: 6011: extern wchar_t *__wmemmove_chk (wchar_t *__s1, const wchar_t *__s2, 6011: size_t __n, size_t __ns1) throw (); 6011: extern wchar_t *__wmemmove_alias (wchar_t *__s1, const wchar_t *__s2, size_t __n) throw () __asm__ ("" "wmemmove") 6011: 6011: ; 6011: extern wchar_t *__wmemmove_chk_warn (wchar_t *__s1, const wchar_t *__s2, size_t __n, size_t __ns1) throw () __asm__ ("" "__wmemmove_chk") 6011: 6011: 6011: __attribute__((__warning__ ("wmemmove called with length bigger than size of destination " "buffer"))) 6011: ; 6011: 6011: extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) wchar_t * 6011: __attribute__ ((__leaf__)) wmemmove (wchar_t *__s1, const wchar_t *__s2, size_t __n) throw () 6011: { 6011: if (__builtin_object_size (__s1, 0) != (size_t) -1) 6011: { 6011: if (!__builtin_constant_p (__n)) 6011: return __wmemmove_chk (__s1, __s2, __n, 6011: __builtin_object_size (__s1, 0) / sizeof (wchar_t)); 6011: 6011: if (__n > __builtin_object_size (__s1, 0) / sizeof (wchar_t)) 6011: return __wmemmove_chk_warn (__s1, __s2, __n, 6011: __builtin_object_size (__s1, 0) / sizeof (wchar_t)); 6011: } 6011: return __wmemmove_alias (__s1, __s2, __n); 6011: } 6011: 6011: 6011: 6011: extern wchar_t *__wmempcpy_chk (wchar_t *__restrict __s1, 6011: const wchar_t *__restrict __s2, size_t __n, 6011: size_t __ns1) throw (); 6011: extern wchar_t *__wmempcpy_alias (wchar_t *__restrict __s1, const wchar_t *__restrict __s2, size_t __n) throw () __asm__ ("" "wmempcpy") 6011: 6011: 6011: ; 6011: 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") 6011: 6011: 6011: 6011: __attribute__((__warning__ ("wmempcpy called with length bigger than size of destination " "buffer"))) 6011: ; 6011: 6011: extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) wchar_t * 6011: __attribute__ ((__leaf__)) wmempcpy (wchar_t *__restrict __s1, const wchar_t *__restrict __s2, size_t __n) throw () 6011: 6011: { 6011: if (__builtin_object_size (__s1, 0) != (size_t) -1) 6011: { 6011: if (!__builtin_constant_p (__n)) 6011: return __wmempcpy_chk (__s1, __s2, __n, 6011: __builtin_object_size (__s1, 0) / sizeof (wchar_t)); 6011: 6011: if (__n > __builtin_object_size (__s1, 0) / sizeof (wchar_t)) 6011: return __wmempcpy_chk_warn (__s1, __s2, __n, 6011: __builtin_object_size (__s1, 0) / sizeof (wchar_t)); 6011: } 6011: return __wmempcpy_alias (__s1, __s2, __n); 6011: } 6011: 6011: 6011: 6011: extern wchar_t *__wmemset_chk (wchar_t *__s, wchar_t __c, size_t __n, 6011: size_t __ns) throw (); 6011: extern wchar_t *__wmemset_alias (wchar_t *__s, wchar_t __c, size_t __n) throw () __asm__ ("" "wmemset") 6011: ; 6011: extern wchar_t *__wmemset_chk_warn (wchar_t *__s, wchar_t __c, size_t __n, size_t __ns) throw () __asm__ ("" "__wmemset_chk") 6011: 6011: 6011: __attribute__((__warning__ ("wmemset called with length bigger than size of destination " "buffer"))) 6011: ; 6011: 6011: extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) wchar_t * 6011: __attribute__ ((__leaf__)) wmemset (wchar_t *__s, wchar_t __c, size_t __n) throw () 6011: { 6011: if (__builtin_object_size (__s, 0) != (size_t) -1) 6011: { 6011: if (!__builtin_constant_p (__n)) 6011: return __wmemset_chk (__s, __c, __n, __builtin_object_size (__s, 0) / sizeof (wchar_t)); 6011: 6011: if (__n > __builtin_object_size (__s, 0) / sizeof (wchar_t)) 6011: return __wmemset_chk_warn (__s, __c, __n, 6011: __builtin_object_size (__s, 0) / sizeof (wchar_t)); 6011: } 6011: return __wmemset_alias (__s, __c, __n); 6011: } 6011: 6011: 6011: extern wchar_t *__wcscpy_chk (wchar_t *__restrict __dest, 6011: const wchar_t *__restrict __src, 6011: size_t __n) throw (); 6011: extern wchar_t *__wcscpy_alias (wchar_t *__restrict __dest, const wchar_t *__restrict __src) throw () __asm__ ("" "wcscpy") 6011: 6011: ; 6011: 6011: extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) wchar_t * 6011: __attribute__ ((__leaf__)) wcscpy (wchar_t *__restrict __dest, const wchar_t *__restrict __src) throw () 6011: { 6011: if (__builtin_object_size (__dest, 2 > 1) != (size_t) -1) 6011: return __wcscpy_chk (__dest, __src, __builtin_object_size (__dest, 2 > 1) / sizeof (wchar_t)); 6011: return __wcscpy_alias (__dest, __src); 6011: } 6011: 6011: 6011: extern wchar_t *__wcpcpy_chk (wchar_t *__restrict __dest, 6011: const wchar_t *__restrict __src, 6011: size_t __destlen) throw (); 6011: extern wchar_t *__wcpcpy_alias (wchar_t *__restrict __dest, const wchar_t *__restrict __src) throw () __asm__ ("" "wcpcpy") 6011: 6011: ; 6011: 6011: extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) wchar_t * 6011: __attribute__ ((__leaf__)) wcpcpy (wchar_t *__restrict __dest, const wchar_t *__restrict __src) throw () 6011: { 6011: if (__builtin_object_size (__dest, 2 > 1) != (size_t) -1) 6011: return __wcpcpy_chk (__dest, __src, __builtin_object_size (__dest, 2 > 1) / sizeof (wchar_t)); 6011: return __wcpcpy_alias (__dest, __src); 6011: } 6011: 6011: 6011: extern wchar_t *__wcsncpy_chk (wchar_t *__restrict __dest, 6011: const wchar_t *__restrict __src, size_t __n, 6011: size_t __destlen) throw (); 6011: extern wchar_t *__wcsncpy_alias (wchar_t *__restrict __dest, const wchar_t *__restrict __src, size_t __n) throw () __asm__ ("" "wcsncpy") 6011: 6011: 6011: ; 6011: 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") 6011: 6011: 6011: 6011: __attribute__((__warning__ ("wcsncpy called with length bigger than size of destination " "buffer"))) 6011: ; 6011: 6011: extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) wchar_t * 6011: __attribute__ ((__leaf__)) wcsncpy (wchar_t *__restrict __dest, const wchar_t *__restrict __src, size_t __n) throw () 6011: 6011: { 6011: if (__builtin_object_size (__dest, 2 > 1) != (size_t) -1) 6011: { 6011: if (!__builtin_constant_p (__n)) 6011: return __wcsncpy_chk (__dest, __src, __n, 6011: __builtin_object_size (__dest, 2 > 1) / sizeof (wchar_t)); 6011: if (__n > __builtin_object_size (__dest, 2 > 1) / sizeof (wchar_t)) 6011: return __wcsncpy_chk_warn (__dest, __src, __n, 6011: __builtin_object_size (__dest, 2 > 1) / sizeof (wchar_t)); 6011: } 6011: return __wcsncpy_alias (__dest, __src, __n); 6011: } 6011: 6011: 6011: extern wchar_t *__wcpncpy_chk (wchar_t *__restrict __dest, 6011: const wchar_t *__restrict __src, size_t __n, 6011: size_t __destlen) throw (); 6011: extern wchar_t *__wcpncpy_alias (wchar_t *__restrict __dest, const wchar_t *__restrict __src, size_t __n) throw () __asm__ ("" "wcpncpy") 6011: 6011: 6011: ; 6011: 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") 6011: 6011: 6011: 6011: __attribute__((__warning__ ("wcpncpy called with length bigger than size of destination " "buffer"))) 6011: ; 6011: 6011: extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) wchar_t * 6011: __attribute__ ((__leaf__)) wcpncpy (wchar_t *__restrict __dest, const wchar_t *__restrict __src, size_t __n) throw () 6011: 6011: { 6011: if (__builtin_object_size (__dest, 2 > 1) != (size_t) -1) 6011: { 6011: if (!__builtin_constant_p (__n)) 6011: return __wcpncpy_chk (__dest, __src, __n, 6011: __builtin_object_size (__dest, 2 > 1) / sizeof (wchar_t)); 6011: if (__n > __builtin_object_size (__dest, 2 > 1) / sizeof (wchar_t)) 6011: return __wcpncpy_chk_warn (__dest, __src, __n, 6011: __builtin_object_size (__dest, 2 > 1) / sizeof (wchar_t)); 6011: } 6011: return __wcpncpy_alias (__dest, __src, __n); 6011: } 6011: 6011: 6011: extern wchar_t *__wcscat_chk (wchar_t *__restrict __dest, 6011: const wchar_t *__restrict __src, 6011: size_t __destlen) throw (); 6011: extern wchar_t *__wcscat_alias (wchar_t *__restrict __dest, const wchar_t *__restrict __src) throw () __asm__ ("" "wcscat") 6011: 6011: ; 6011: 6011: extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) wchar_t * 6011: __attribute__ ((__leaf__)) wcscat (wchar_t *__restrict __dest, const wchar_t *__restrict __src) throw () 6011: { 6011: if (__builtin_object_size (__dest, 2 > 1) != (size_t) -1) 6011: return __wcscat_chk (__dest, __src, __builtin_object_size (__dest, 2 > 1) / sizeof (wchar_t)); 6011: return __wcscat_alias (__dest, __src); 6011: } 6011: 6011: 6011: extern wchar_t *__wcsncat_chk (wchar_t *__restrict __dest, 6011: const wchar_t *__restrict __src, 6011: size_t __n, size_t __destlen) throw (); 6011: extern wchar_t *__wcsncat_alias (wchar_t *__restrict __dest, const wchar_t *__restrict __src, size_t __n) throw () __asm__ ("" "wcsncat") 6011: 6011: 6011: ; 6011: 6011: extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) wchar_t * 6011: __attribute__ ((__leaf__)) wcsncat (wchar_t *__restrict __dest, const wchar_t *__restrict __src, size_t __n) throw () 6011: 6011: { 6011: if (__builtin_object_size (__dest, 2 > 1) != (size_t) -1) 6011: return __wcsncat_chk (__dest, __src, __n, 6011: __builtin_object_size (__dest, 2 > 1) / sizeof (wchar_t)); 6011: return __wcsncat_alias (__dest, __src, __n); 6011: } 6011: 6011: 6011: extern int __swprintf_chk (wchar_t *__restrict __s, size_t __n, 6011: int __flag, size_t __s_len, 6011: const wchar_t *__restrict __format, ...) 6011: throw () ; 6011: 6011: extern int __swprintf_alias (wchar_t *__restrict __s, size_t __n, const wchar_t *__restrict __fmt, ...) throw () __asm__ ("" "swprintf") 6011: 6011: 6011: ; 6011: 6011: 6011: extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int 6011: __attribute__ ((__leaf__)) swprintf (wchar_t *__restrict __s, size_t __n, const wchar_t *__restrict __fmt, ...) throw () 6011: 6011: { 6011: if (__builtin_object_size (__s, 2 > 1) != (size_t) -1 || 2 > 1) 6011: return __swprintf_chk (__s, __n, 2 - 1, 6011: __builtin_object_size (__s, 2 > 1) / sizeof (wchar_t), 6011: __fmt, __builtin_va_arg_pack ()); 6011: return __swprintf_alias (__s, __n, __fmt, __builtin_va_arg_pack ()); 6011: } 6011: # 303 "/usr/include/arm-linux-gnueabihf/bits/wchar2.h" 3 4 6011: extern int __vswprintf_chk (wchar_t *__restrict __s, size_t __n, 6011: int __flag, size_t __s_len, 6011: const wchar_t *__restrict __format, 6011: __gnuc_va_list __arg) 6011: throw () ; 6011: 6011: extern int __vswprintf_alias (wchar_t *__restrict __s, size_t __n, const wchar_t *__restrict __fmt, __gnuc_va_list __ap) throw () __asm__ ("" "vswprintf") 6011: 6011: 6011: ; 6011: 6011: extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int 6011: __attribute__ ((__leaf__)) vswprintf (wchar_t *__restrict __s, size_t __n, const wchar_t *__restrict __fmt, __gnuc_va_list __ap) throw () 6011: 6011: { 6011: if (__builtin_object_size (__s, 2 > 1) != (size_t) -1 || 2 > 1) 6011: return __vswprintf_chk (__s, __n, 2 - 1, 6011: __builtin_object_size (__s, 2 > 1) / sizeof (wchar_t), __fmt, __ap); 6011: return __vswprintf_alias (__s, __n, __fmt, __ap); 6011: } 6011: 6011: 6011: 6011: 6011: extern int __fwprintf_chk (__FILE *__restrict __stream, int __flag, 6011: const wchar_t *__restrict __format, ...); 6011: extern int __wprintf_chk (int __flag, const wchar_t *__restrict __format, 6011: ...); 6011: extern int __vfwprintf_chk (__FILE *__restrict __stream, int __flag, 6011: const wchar_t *__restrict __format, 6011: __gnuc_va_list __ap); 6011: extern int __vwprintf_chk (int __flag, const wchar_t *__restrict __format, 6011: __gnuc_va_list __ap); 6011: 6011: 6011: extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int 6011: wprintf (const wchar_t *__restrict __fmt, ...) 6011: { 6011: return __wprintf_chk (2 - 1, __fmt, __builtin_va_arg_pack ()); 6011: } 6011: 6011: extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int 6011: fwprintf (__FILE *__restrict __stream, const wchar_t *__restrict __fmt, ...) 6011: { 6011: return __fwprintf_chk (__stream, 2 - 1, __fmt, 6011: __builtin_va_arg_pack ()); 6011: } 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int 6011: vwprintf (const wchar_t *__restrict __fmt, __gnuc_va_list __ap) 6011: { 6011: return __vwprintf_chk (2 - 1, __fmt, __ap); 6011: } 6011: 6011: extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int 6011: vfwprintf (__FILE *__restrict __stream, 6011: const wchar_t *__restrict __fmt, __gnuc_va_list __ap) 6011: { 6011: return __vfwprintf_chk (__stream, 2 - 1, __fmt, __ap); 6011: } 6011: 6011: 6011: 6011: extern wchar_t *__fgetws_chk (wchar_t *__restrict __s, size_t __size, int __n, 6011: __FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); 6011: extern wchar_t *__fgetws_alias (wchar_t *__restrict __s, int __n, __FILE *__restrict __stream) __asm__ ("" "fgetws") 6011: 6011: __attribute__ ((__warn_unused_result__)); 6011: extern wchar_t *__fgetws_chk_warn (wchar_t *__restrict __s, size_t __size, int __n, __FILE *__restrict __stream) __asm__ ("" "__fgetws_chk") 6011: 6011: 6011: __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("fgetws called with bigger size than length " "of destination buffer"))) 6011: ; 6011: 6011: extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__warn_unused_result__)) wchar_t * 6011: fgetws (wchar_t *__restrict __s, int __n, __FILE *__restrict __stream) 6011: { 6011: if (__builtin_object_size (__s, 2 > 1) != (size_t) -1) 6011: { 6011: if (!__builtin_constant_p (__n) || __n <= 0) 6011: return __fgetws_chk (__s, __builtin_object_size (__s, 2 > 1) / sizeof (wchar_t), 6011: __n, __stream); 6011: 6011: if ((size_t) __n > __builtin_object_size (__s, 2 > 1) / sizeof (wchar_t)) 6011: return __fgetws_chk_warn (__s, __builtin_object_size (__s, 2 > 1) / sizeof (wchar_t), 6011: __n, __stream); 6011: } 6011: return __fgetws_alias (__s, __n, __stream); 6011: } 6011: 6011: 6011: extern wchar_t *__fgetws_unlocked_chk (wchar_t *__restrict __s, size_t __size, 6011: int __n, __FILE *__restrict __stream) 6011: __attribute__ ((__warn_unused_result__)); 6011: extern wchar_t *__fgetws_unlocked_alias (wchar_t *__restrict __s, int __n, __FILE *__restrict __stream) __asm__ ("" "fgetws_unlocked") 6011: 6011: 6011: __attribute__ ((__warn_unused_result__)); 6011: extern wchar_t *__fgetws_unlocked_chk_warn (wchar_t *__restrict __s, size_t __size, int __n, __FILE *__restrict __stream) __asm__ ("" "__fgetws_unlocked_chk") 6011: 6011: 6011: 6011: __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("fgetws_unlocked called with bigger size than length " "of destination buffer"))) 6011: ; 6011: 6011: extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__warn_unused_result__)) wchar_t * 6011: fgetws_unlocked (wchar_t *__restrict __s, int __n, __FILE *__restrict __stream) 6011: { 6011: if (__builtin_object_size (__s, 2 > 1) != (size_t) -1) 6011: { 6011: if (!__builtin_constant_p (__n) || __n <= 0) 6011: return __fgetws_unlocked_chk (__s, __builtin_object_size (__s, 2 > 1) / sizeof (wchar_t), 6011: __n, __stream); 6011: 6011: if ((size_t) __n > __builtin_object_size (__s, 2 > 1) / sizeof (wchar_t)) 6011: return __fgetws_unlocked_chk_warn (__s, __builtin_object_size (__s, 2 > 1) / sizeof (wchar_t), 6011: __n, __stream); 6011: } 6011: return __fgetws_unlocked_alias (__s, __n, __stream); 6011: } 6011: 6011: 6011: 6011: extern size_t __wcrtomb_chk (char *__restrict __s, wchar_t __wchar, 6011: mbstate_t *__restrict __p, 6011: size_t __buflen) throw () __attribute__ ((__warn_unused_result__)); 6011: extern size_t __wcrtomb_alias (char *__restrict __s, wchar_t __wchar, mbstate_t *__restrict __ps) throw () __asm__ ("" "wcrtomb") 6011: 6011: __attribute__ ((__warn_unused_result__)); 6011: 6011: extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__warn_unused_result__)) size_t 6011: __attribute__ ((__leaf__)) wcrtomb (char *__restrict __s, wchar_t __wchar, mbstate_t *__restrict __ps) throw () 6011: 6011: { 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: if (__builtin_object_size (__s, 2 > 1) != (size_t) -1 && 16 > __builtin_object_size (__s, 2 > 1)) 6011: return __wcrtomb_chk (__s, __wchar, __ps, __builtin_object_size (__s, 2 > 1)); 6011: return __wcrtomb_alias (__s, __wchar, __ps); 6011: } 6011: 6011: 6011: extern size_t __mbsrtowcs_chk (wchar_t *__restrict __dst, 6011: const char **__restrict __src, 6011: size_t __len, mbstate_t *__restrict __ps, 6011: size_t __dstlen) throw (); 6011: extern size_t __mbsrtowcs_alias (wchar_t *__restrict __dst, const char **__restrict __src, size_t __len, mbstate_t *__restrict __ps) throw () __asm__ ("" "mbsrtowcs") 6011: 6011: 6011: 6011: ; 6011: 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") 6011: 6011: 6011: 6011: 6011: __attribute__((__warning__ ("mbsrtowcs called with dst buffer smaller than len " "* sizeof (wchar_t)"))) 6011: ; 6011: 6011: extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) size_t 6011: __attribute__ ((__leaf__)) mbsrtowcs (wchar_t *__restrict __dst, const char **__restrict __src, size_t __len, mbstate_t *__restrict __ps) throw () 6011: 6011: { 6011: if (__builtin_object_size (__dst, 2 > 1) != (size_t) -1) 6011: { 6011: if (!__builtin_constant_p (__len)) 6011: return __mbsrtowcs_chk (__dst, __src, __len, __ps, 6011: __builtin_object_size (__dst, 2 > 1) / sizeof (wchar_t)); 6011: 6011: if (__len > __builtin_object_size (__dst, 2 > 1) / sizeof (wchar_t)) 6011: return __mbsrtowcs_chk_warn (__dst, __src, __len, __ps, 6011: __builtin_object_size (__dst, 2 > 1) / sizeof (wchar_t)); 6011: } 6011: return __mbsrtowcs_alias (__dst, __src, __len, __ps); 6011: } 6011: 6011: 6011: extern size_t __wcsrtombs_chk (char *__restrict __dst, 6011: const wchar_t **__restrict __src, 6011: size_t __len, mbstate_t *__restrict __ps, 6011: size_t __dstlen) throw (); 6011: extern size_t __wcsrtombs_alias (char *__restrict __dst, const wchar_t **__restrict __src, size_t __len, mbstate_t *__restrict __ps) throw () __asm__ ("" "wcsrtombs") 6011: 6011: 6011: 6011: ; 6011: 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") 6011: 6011: 6011: 6011: 6011: __attribute__((__warning__ ("wcsrtombs called with dst buffer smaller than len"))); 6011: 6011: extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) size_t 6011: __attribute__ ((__leaf__)) wcsrtombs (char *__restrict __dst, const wchar_t **__restrict __src, size_t __len, mbstate_t *__restrict __ps) throw () 6011: 6011: { 6011: if (__builtin_object_size (__dst, 2 > 1) != (size_t) -1) 6011: { 6011: if (!__builtin_constant_p (__len)) 6011: return __wcsrtombs_chk (__dst, __src, __len, __ps, __builtin_object_size (__dst, 2 > 1)); 6011: 6011: if (__len > __builtin_object_size (__dst, 2 > 1)) 6011: return __wcsrtombs_chk_warn (__dst, __src, __len, __ps, __builtin_object_size (__dst, 2 > 1)); 6011: } 6011: return __wcsrtombs_alias (__dst, __src, __len, __ps); 6011: } 6011: 6011: 6011: 6011: extern size_t __mbsnrtowcs_chk (wchar_t *__restrict __dst, 6011: const char **__restrict __src, size_t __nmc, 6011: size_t __len, mbstate_t *__restrict __ps, 6011: size_t __dstlen) throw (); 6011: 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") 6011: 6011: 6011: 6011: ; 6011: 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") 6011: 6011: 6011: 6011: 6011: __attribute__((__warning__ ("mbsnrtowcs called with dst buffer smaller than len " "* sizeof (wchar_t)"))) 6011: ; 6011: 6011: extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) size_t 6011: __attribute__ ((__leaf__)) mbsnrtowcs (wchar_t *__restrict __dst, const char **__restrict __src, size_t __nmc, size_t __len, mbstate_t *__restrict __ps) throw () 6011: 6011: { 6011: if (__builtin_object_size (__dst, 2 > 1) != (size_t) -1) 6011: { 6011: if (!__builtin_constant_p (__len)) 6011: return __mbsnrtowcs_chk (__dst, __src, __nmc, __len, __ps, 6011: __builtin_object_size (__dst, 2 > 1) / sizeof (wchar_t)); 6011: 6011: if (__len > __builtin_object_size (__dst, 2 > 1) / sizeof (wchar_t)) 6011: return __mbsnrtowcs_chk_warn (__dst, __src, __nmc, __len, __ps, 6011: __builtin_object_size (__dst, 2 > 1) / sizeof (wchar_t)); 6011: } 6011: return __mbsnrtowcs_alias (__dst, __src, __nmc, __len, __ps); 6011: } 6011: 6011: 6011: extern size_t __wcsnrtombs_chk (char *__restrict __dst, 6011: const wchar_t **__restrict __src, 6011: size_t __nwc, size_t __len, 6011: mbstate_t *__restrict __ps, size_t __dstlen) 6011: throw (); 6011: 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") 6011: 6011: 6011: 6011: ; 6011: 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") 6011: 6011: 6011: 6011: 6011: 6011: __attribute__((__warning__ ("wcsnrtombs called with dst buffer smaller than len"))); 6011: 6011: extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) size_t 6011: __attribute__ ((__leaf__)) wcsnrtombs (char *__restrict __dst, const wchar_t **__restrict __src, size_t __nwc, size_t __len, mbstate_t *__restrict __ps) throw () 6011: 6011: { 6011: if (__builtin_object_size (__dst, 2 > 1) != (size_t) -1) 6011: { 6011: if (!__builtin_constant_p (__len)) 6011: return __wcsnrtombs_chk (__dst, __src, __nwc, __len, __ps, 6011: __builtin_object_size (__dst, 2 > 1)); 6011: 6011: if (__len > __builtin_object_size (__dst, 2 > 1)) 6011: return __wcsnrtombs_chk_warn (__dst, __src, __nwc, __len, __ps, 6011: __builtin_object_size (__dst, 2 > 1)); 6011: } 6011: return __wcsnrtombs_alias (__dst, __src, __nwc, __len, __ps); 6011: } 6011: # 784 "/usr/include/wchar.h" 2 3 4 6011: 6011: 6011: 6011: 6011: 6011: 6011: } 6011: # 45 "/usr/include/c++/8/cwchar" 2 3 6011: # 62 "/usr/include/c++/8/cwchar" 3 6011: namespace std 6011: { 6011: using ::mbstate_t; 6011: } 6011: # 135 "/usr/include/c++/8/cwchar" 3 6011: namespace std __attribute__ ((__visibility__ ("default"))) 6011: { 6011: 6011: 6011: using ::wint_t; 6011: 6011: using ::btowc; 6011: using ::fgetwc; 6011: using ::fgetws; 6011: using ::fputwc; 6011: using ::fputws; 6011: using ::fwide; 6011: using ::fwprintf; 6011: using ::fwscanf; 6011: using ::getwc; 6011: using ::getwchar; 6011: using ::mbrlen; 6011: using ::mbrtowc; 6011: using ::mbsinit; 6011: using ::mbsrtowcs; 6011: using ::putwc; 6011: using ::putwchar; 6011: 6011: using ::swprintf; 6011: 6011: using ::swscanf; 6011: using ::ungetwc; 6011: using ::vfwprintf; 6011: 6011: using ::vfwscanf; 6011: 6011: 6011: using ::vswprintf; 6011: 6011: 6011: using ::vswscanf; 6011: 6011: using ::vwprintf; 6011: 6011: using ::vwscanf; 6011: 6011: using ::wcrtomb; 6011: using ::wcscat; 6011: using ::wcscmp; 6011: using ::wcscoll; 6011: using ::wcscpy; 6011: using ::wcscspn; 6011: using ::wcsftime; 6011: using ::wcslen; 6011: using ::wcsncat; 6011: using ::wcsncmp; 6011: using ::wcsncpy; 6011: using ::wcsrtombs; 6011: using ::wcsspn; 6011: using ::wcstod; 6011: 6011: using ::wcstof; 6011: 6011: using ::wcstok; 6011: using ::wcstol; 6011: using ::wcstoul; 6011: using ::wcsxfrm; 6011: using ::wctob; 6011: using ::wmemcmp; 6011: using ::wmemcpy; 6011: using ::wmemmove; 6011: using ::wmemset; 6011: using ::wprintf; 6011: using ::wscanf; 6011: using ::wcschr; 6011: using ::wcspbrk; 6011: using ::wcsrchr; 6011: using ::wcsstr; 6011: using ::wmemchr; 6011: # 232 "/usr/include/c++/8/cwchar" 3 6011: 6011: } 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: namespace __gnu_cxx 6011: { 6011: 6011: 6011: 6011: 6011: 6011: using ::wcstold; 6011: # 257 "/usr/include/c++/8/cwchar" 3 6011: using ::wcstoll; 6011: using ::wcstoull; 6011: 6011: } 6011: 6011: namespace std 6011: { 6011: using ::__gnu_cxx::wcstold; 6011: using ::__gnu_cxx::wcstoll; 6011: using ::__gnu_cxx::wcstoull; 6011: } 6011: # 277 "/usr/include/c++/8/cwchar" 3 6011: namespace std 6011: { 6011: 6011: using std::wcstof; 6011: 6011: 6011: using std::vfwscanf; 6011: 6011: 6011: using std::vswscanf; 6011: 6011: 6011: using std::vwscanf; 6011: 6011: 6011: 6011: using std::wcstold; 6011: using std::wcstoll; 6011: using std::wcstoull; 6011: 6011: } 6011: # 41 "/usr/include/c++/8/bits/postypes.h" 2 3 6011: # 68 "/usr/include/c++/8/bits/postypes.h" 3 6011: namespace std __attribute__ ((__visibility__ ("default"))) 6011: { 6011: 6011: # 90 "/usr/include/c++/8/bits/postypes.h" 3 6011: typedef long long streamoff; 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: typedef ptrdiff_t streamsize; 6011: # 111 "/usr/include/c++/8/bits/postypes.h" 3 6011: template 6011: class fpos 6011: { 6011: private: 6011: streamoff _M_off; 6011: _StateT _M_state; 6011: 6011: public: 6011: 6011: 6011: 6011: 6011: fpos() 6011: : _M_off(0), _M_state() { } 6011: # 133 "/usr/include/c++/8/bits/postypes.h" 3 6011: fpos(streamoff __off) 6011: : _M_off(__off), _M_state() { } 6011: 6011: 6011: operator streamoff() const { return _M_off; } 6011: 6011: 6011: void 6011: state(_StateT __st) 6011: { _M_state = __st; } 6011: 6011: 6011: _StateT 6011: state() const 6011: { return _M_state; } 6011: 6011: 6011: 6011: 6011: 6011: fpos& 6011: operator+=(streamoff __off) 6011: { 6011: _M_off += __off; 6011: return *this; 6011: } 6011: 6011: 6011: 6011: 6011: 6011: fpos& 6011: operator-=(streamoff __off) 6011: { 6011: _M_off -= __off; 6011: return *this; 6011: } 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: fpos 6011: operator+(streamoff __off) const 6011: { 6011: fpos __pos(*this); 6011: __pos += __off; 6011: return __pos; 6011: } 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: fpos 6011: operator-(streamoff __off) const 6011: { 6011: fpos __pos(*this); 6011: __pos -= __off; 6011: return __pos; 6011: } 6011: 6011: 6011: 6011: 6011: 6011: 6011: streamoff 6011: operator-(const fpos& __other) const 6011: { return _M_off - __other._M_off; } 6011: }; 6011: 6011: 6011: 6011: 6011: 6011: 6011: template 6011: inline bool 6011: operator==(const fpos<_StateT>& __lhs, const fpos<_StateT>& __rhs) 6011: { return streamoff(__lhs) == streamoff(__rhs); } 6011: 6011: template 6011: inline bool 6011: operator!=(const fpos<_StateT>& __lhs, const fpos<_StateT>& __rhs) 6011: { return streamoff(__lhs) != streamoff(__rhs); } 6011: 6011: 6011: 6011: 6011: 6011: typedef fpos streampos; 6011: 6011: typedef fpos wstreampos; 6011: 6011: 6011: 6011: typedef fpos u16streampos; 6011: 6011: typedef fpos u32streampos; 6011: 6011: 6011: 6011: } 6011: # 41 "/usr/include/c++/8/iosfwd" 2 3 6011: 6011: namespace std __attribute__ ((__visibility__ ("default"))) 6011: { 6011: 6011: # 74 "/usr/include/c++/8/iosfwd" 3 6011: class ios_base; 6011: 6011: template > 6011: class basic_ios; 6011: 6011: template > 6011: class basic_streambuf; 6011: 6011: template > 6011: class basic_istream; 6011: 6011: template > 6011: class basic_ostream; 6011: 6011: template > 6011: class basic_iostream; 6011: 6011: 6011: namespace __cxx11 { 6011: 6011: template, 6011: typename _Alloc = allocator<_CharT> > 6011: class basic_stringbuf; 6011: 6011: template, 6011: typename _Alloc = allocator<_CharT> > 6011: class basic_istringstream; 6011: 6011: template, 6011: typename _Alloc = allocator<_CharT> > 6011: class basic_ostringstream; 6011: 6011: template, 6011: typename _Alloc = allocator<_CharT> > 6011: class basic_stringstream; 6011: 6011: } 6011: 6011: template > 6011: class basic_filebuf; 6011: 6011: template > 6011: class basic_ifstream; 6011: 6011: template > 6011: class basic_ofstream; 6011: 6011: template > 6011: class basic_fstream; 6011: 6011: template > 6011: class istreambuf_iterator; 6011: 6011: template > 6011: class ostreambuf_iterator; 6011: 6011: 6011: 6011: typedef basic_ios ios; 6011: 6011: 6011: typedef basic_streambuf streambuf; 6011: 6011: 6011: typedef basic_istream istream; 6011: 6011: 6011: typedef basic_ostream ostream; 6011: 6011: 6011: typedef basic_iostream iostream; 6011: 6011: 6011: typedef basic_stringbuf stringbuf; 6011: 6011: 6011: typedef basic_istringstream istringstream; 6011: 6011: 6011: typedef basic_ostringstream ostringstream; 6011: 6011: 6011: typedef basic_stringstream stringstream; 6011: 6011: 6011: typedef basic_filebuf filebuf; 6011: 6011: 6011: typedef basic_ifstream ifstream; 6011: 6011: 6011: typedef basic_ofstream ofstream; 6011: 6011: 6011: typedef basic_fstream fstream; 6011: 6011: 6011: 6011: typedef basic_ios wios; 6011: 6011: 6011: typedef basic_streambuf wstreambuf; 6011: 6011: 6011: typedef basic_istream wistream; 6011: 6011: 6011: typedef basic_ostream wostream; 6011: 6011: 6011: typedef basic_iostream wiostream; 6011: 6011: 6011: typedef basic_stringbuf wstringbuf; 6011: 6011: 6011: typedef basic_istringstream wistringstream; 6011: 6011: 6011: typedef basic_ostringstream wostringstream; 6011: 6011: 6011: typedef basic_stringstream wstringstream; 6011: 6011: 6011: typedef basic_filebuf wfilebuf; 6011: 6011: 6011: typedef basic_ifstream wifstream; 6011: 6011: 6011: typedef basic_ofstream wofstream; 6011: 6011: 6011: typedef basic_fstream wfstream; 6011: 6011: 6011: 6011: 6011: } 6011: # 39 "/usr/include/c++/8/ios" 2 3 6011: 6011: # 1 "/usr/include/c++/8/bits/char_traits.h" 1 3 6011: # 37 "/usr/include/c++/8/bits/char_traits.h" 3 6011: 6011: # 38 "/usr/include/c++/8/bits/char_traits.h" 3 6011: 6011: 6011: 6011: # 1 "/usr/include/c++/8/cwchar" 1 3 6011: # 39 "/usr/include/c++/8/cwchar" 3 6011: 6011: # 40 "/usr/include/c++/8/cwchar" 3 6011: # 42 "/usr/include/c++/8/bits/char_traits.h" 2 3 6011: 6011: 6011: 6011: 6011: 6011: namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) 6011: { 6011: 6011: # 61 "/usr/include/c++/8/bits/char_traits.h" 3 6011: template 6011: struct _Char_types 6011: { 6011: typedef unsigned long int_type; 6011: typedef std::streampos pos_type; 6011: typedef std::streamoff off_type; 6011: typedef std::mbstate_t state_type; 6011: }; 6011: # 86 "/usr/include/c++/8/bits/char_traits.h" 3 6011: template 6011: struct char_traits 6011: { 6011: typedef _CharT char_type; 6011: typedef typename _Char_types<_CharT>::int_type int_type; 6011: typedef typename _Char_types<_CharT>::pos_type pos_type; 6011: typedef typename _Char_types<_CharT>::off_type off_type; 6011: typedef typename _Char_types<_CharT>::state_type state_type; 6011: 6011: static void 6011: assign(char_type& __c1, const char_type& __c2) 6011: { __c1 = __c2; } 6011: 6011: static constexpr bool 6011: eq(const char_type& __c1, const char_type& __c2) 6011: { return __c1 == __c2; } 6011: 6011: static constexpr bool 6011: lt(const char_type& __c1, const char_type& __c2) 6011: { return __c1 < __c2; } 6011: 6011: static int 6011: compare(const char_type* __s1, const char_type* __s2, std::size_t __n); 6011: 6011: static std::size_t 6011: length(const char_type* __s); 6011: 6011: static const char_type* 6011: find(const char_type* __s, std::size_t __n, const char_type& __a); 6011: 6011: static char_type* 6011: move(char_type* __s1, const char_type* __s2, std::size_t __n); 6011: 6011: static char_type* 6011: copy(char_type* __s1, const char_type* __s2, std::size_t __n); 6011: 6011: static char_type* 6011: assign(char_type* __s, std::size_t __n, char_type __a); 6011: 6011: static constexpr char_type 6011: to_char_type(const int_type& __c) 6011: { return static_cast(__c); } 6011: 6011: static constexpr int_type 6011: to_int_type(const char_type& __c) 6011: { return static_cast(__c); } 6011: 6011: static constexpr bool 6011: eq_int_type(const int_type& __c1, const int_type& __c2) 6011: { return __c1 == __c2; } 6011: 6011: static constexpr int_type 6011: eof() 6011: { return static_cast(-1); } 6011: 6011: static constexpr int_type 6011: not_eof(const int_type& __c) 6011: { return !eq_int_type(__c, eof()) ? __c : to_int_type(char_type()); } 6011: }; 6011: 6011: 6011: 6011: template 6011: int 6011: char_traits<_CharT>:: 6011: compare(const char_type* __s1, const char_type* __s2, std::size_t __n) 6011: { 6011: for (std::size_t __i = 0; __i < __n; ++__i) 6011: if (lt(__s1[__i], __s2[__i])) 6011: return -1; 6011: else if (lt(__s2[__i], __s1[__i])) 6011: return 1; 6011: return 0; 6011: } 6011: 6011: template 6011: std::size_t 6011: char_traits<_CharT>:: 6011: length(const char_type* __p) 6011: { 6011: std::size_t __i = 0; 6011: while (!eq(__p[__i], char_type())) 6011: ++__i; 6011: return __i; 6011: } 6011: 6011: template 6011: const typename char_traits<_CharT>::char_type* 6011: char_traits<_CharT>:: 6011: find(const char_type* __s, std::size_t __n, const char_type& __a) 6011: { 6011: for (std::size_t __i = 0; __i < __n; ++__i) 6011: if (eq(__s[__i], __a)) 6011: return __s + __i; 6011: return 0; 6011: } 6011: 6011: template 6011: typename char_traits<_CharT>::char_type* 6011: char_traits<_CharT>:: 6011: move(char_type* __s1, const char_type* __s2, std::size_t __n) 6011: { 6011: return static_cast<_CharT*>(__builtin_memmove(__s1, __s2, 6011: __n * sizeof(char_type))); 6011: } 6011: 6011: template 6011: typename char_traits<_CharT>::char_type* 6011: char_traits<_CharT>:: 6011: copy(char_type* __s1, const char_type* __s2, std::size_t __n) 6011: { 6011: 6011: std::copy(__s2, __s2 + __n, __s1); 6011: return __s1; 6011: } 6011: 6011: template 6011: typename char_traits<_CharT>::char_type* 6011: char_traits<_CharT>:: 6011: assign(char_type* __s, std::size_t __n, char_type __a) 6011: { 6011: 6011: std::fill_n(__s, __n, __a); 6011: return __s; 6011: } 6011: 6011: 6011: } 6011: 6011: namespace std __attribute__ ((__visibility__ ("default"))) 6011: { 6011: 6011: # 268 "/usr/include/c++/8/bits/char_traits.h" 3 6011: template 6011: struct char_traits : public __gnu_cxx::char_traits<_CharT> 6011: { }; 6011: 6011: 6011: 6011: template<> 6011: struct char_traits 6011: { 6011: typedef char char_type; 6011: typedef int int_type; 6011: typedef streampos pos_type; 6011: typedef streamoff off_type; 6011: typedef mbstate_t state_type; 6011: 6011: static void 6011: assign(char_type& __c1, const char_type& __c2) noexcept 6011: { __c1 = __c2; } 6011: 6011: static constexpr bool 6011: eq(const char_type& __c1, const char_type& __c2) noexcept 6011: { return __c1 == __c2; } 6011: 6011: static constexpr bool 6011: lt(const char_type& __c1, const char_type& __c2) noexcept 6011: { 6011: 6011: return (static_cast(__c1) 6011: < static_cast(__c2)); 6011: } 6011: 6011: static int 6011: compare(const char_type* __s1, const char_type* __s2, size_t __n) 6011: { 6011: 6011: 6011: 6011: 6011: 6011: 6011: if (__n == 0) 6011: return 0; 6011: return __builtin_memcmp(__s1, __s2, __n); 6011: } 6011: 6011: static size_t 6011: length(const char_type* __s) 6011: { 6011: 6011: 6011: 6011: 6011: return __builtin_strlen(__s); 6011: } 6011: 6011: static const char_type* 6011: find(const char_type* __s, size_t __n, const char_type& __a) 6011: { 6011: 6011: 6011: 6011: 6011: 6011: 6011: if (__n == 0) 6011: return 0; 6011: return static_cast(__builtin_memchr(__s, __a, __n)); 6011: } 6011: 6011: static char_type* 6011: move(char_type* __s1, const char_type* __s2, size_t __n) 6011: { 6011: if (__n == 0) 6011: return __s1; 6011: return static_cast(__builtin_memmove(__s1, __s2, __n)); 6011: } 6011: 6011: static char_type* 6011: copy(char_type* __s1, const char_type* __s2, size_t __n) 6011: { 6011: if (__n == 0) 6011: return __s1; 6011: return static_cast(__builtin_memcpy(__s1, __s2, __n)); 6011: } 6011: 6011: static char_type* 6011: assign(char_type* __s, size_t __n, char_type __a) 6011: { 6011: if (__n == 0) 6011: return __s; 6011: return static_cast(__builtin_memset(__s, __a, __n)); 6011: } 6011: 6011: static constexpr char_type 6011: to_char_type(const int_type& __c) noexcept 6011: { return static_cast(__c); } 6011: 6011: 6011: 6011: static constexpr int_type 6011: to_int_type(const char_type& __c) noexcept 6011: { return static_cast(static_cast(__c)); } 6011: 6011: static constexpr bool 6011: eq_int_type(const int_type& __c1, const int_type& __c2) noexcept 6011: { return __c1 == __c2; } 6011: 6011: static constexpr int_type 6011: eof() noexcept 6011: { return static_cast(-1); } 6011: 6011: static constexpr int_type 6011: not_eof(const int_type& __c) noexcept 6011: { return (__c == eof()) ? 0 : __c; } 6011: }; 6011: 6011: 6011: 6011: 6011: template<> 6011: struct char_traits 6011: { 6011: typedef wchar_t char_type; 6011: typedef wint_t int_type; 6011: typedef streamoff off_type; 6011: typedef wstreampos pos_type; 6011: typedef mbstate_t state_type; 6011: 6011: static void 6011: assign(char_type& __c1, const char_type& __c2) noexcept 6011: { __c1 = __c2; } 6011: 6011: static constexpr bool 6011: eq(const char_type& __c1, const char_type& __c2) noexcept 6011: { return __c1 == __c2; } 6011: 6011: static constexpr bool 6011: lt(const char_type& __c1, const char_type& __c2) noexcept 6011: { return __c1 < __c2; } 6011: 6011: static int 6011: compare(const char_type* __s1, const char_type* __s2, size_t __n) 6011: { 6011: 6011: 6011: 6011: 6011: 6011: 6011: if (__n == 0) 6011: return 0; 6011: else 6011: return wmemcmp(__s1, __s2, __n); 6011: } 6011: 6011: static size_t 6011: length(const char_type* __s) 6011: { 6011: 6011: 6011: 6011: 6011: 6011: return wcslen(__s); 6011: } 6011: 6011: static const char_type* 6011: find(const char_type* __s, size_t __n, const char_type& __a) 6011: { 6011: 6011: 6011: 6011: 6011: 6011: 6011: if (__n == 0) 6011: return 0; 6011: else 6011: return wmemchr(__s, __a, __n); 6011: } 6011: 6011: static char_type* 6011: move(char_type* __s1, const char_type* __s2, size_t __n) 6011: { 6011: if (__n == 0) 6011: return __s1; 6011: return wmemmove(__s1, __s2, __n); 6011: } 6011: 6011: static char_type* 6011: copy(char_type* __s1, const char_type* __s2, size_t __n) 6011: { 6011: if (__n == 0) 6011: return __s1; 6011: return wmemcpy(__s1, __s2, __n); 6011: } 6011: 6011: static char_type* 6011: assign(char_type* __s, size_t __n, char_type __a) 6011: { 6011: if (__n == 0) 6011: return __s; 6011: return wmemset(__s, __a, __n); 6011: } 6011: 6011: static constexpr char_type 6011: to_char_type(const int_type& __c) noexcept 6011: { return char_type(__c); } 6011: 6011: static constexpr int_type 6011: to_int_type(const char_type& __c) noexcept 6011: { return int_type(__c); } 6011: 6011: static constexpr bool 6011: eq_int_type(const int_type& __c1, const int_type& __c2) noexcept 6011: { return __c1 == __c2; } 6011: 6011: static constexpr int_type 6011: eof() noexcept 6011: { return static_cast((0xffffffffu)); } 6011: 6011: static constexpr int_type 6011: not_eof(const int_type& __c) noexcept 6011: { return eq_int_type(__c, eof()) ? 0 : __c; } 6011: }; 6011: 6011: 6011: 6011: } 6011: 6011: 6011: 6011: 6011: # 1 "/usr/include/c++/8/cstdint" 1 3 6011: # 32 "/usr/include/c++/8/cstdint" 3 6011: 6011: # 33 "/usr/include/c++/8/cstdint" 3 6011: # 41 "/usr/include/c++/8/cstdint" 3 6011: # 1 "/usr/lib/gcc/arm-linux-gnueabihf/8/include/stdint.h" 1 3 4 6011: # 9 "/usr/lib/gcc/arm-linux-gnueabihf/8/include/stdint.h" 3 4 6011: # 1 "/usr/include/stdint.h" 1 3 4 6011: # 26 "/usr/include/stdint.h" 3 4 6011: # 1 "/usr/include/arm-linux-gnueabihf/bits/libc-header-start.h" 1 3 4 6011: # 27 "/usr/include/stdint.h" 2 3 4 6011: # 1 "/usr/include/arm-linux-gnueabihf/bits/types.h" 1 3 4 6011: # 27 "/usr/include/arm-linux-gnueabihf/bits/types.h" 3 4 6011: # 1 "/usr/include/arm-linux-gnueabihf/bits/wordsize.h" 1 3 4 6011: # 28 "/usr/include/arm-linux-gnueabihf/bits/types.h" 2 3 4 6011: 6011: 6011: typedef unsigned char __u_char; 6011: typedef unsigned short int __u_short; 6011: typedef unsigned int __u_int; 6011: typedef unsigned long int __u_long; 6011: 6011: 6011: typedef signed char __int8_t; 6011: typedef unsigned char __uint8_t; 6011: typedef signed short int __int16_t; 6011: typedef unsigned short int __uint16_t; 6011: typedef signed int __int32_t; 6011: typedef unsigned int __uint32_t; 6011: 6011: 6011: 6011: 6011: __extension__ typedef signed long long int __int64_t; 6011: __extension__ typedef unsigned long long int __uint64_t; 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: __extension__ typedef long long int __quad_t; 6011: __extension__ typedef unsigned long long int __u_quad_t; 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: __extension__ typedef long long int __intmax_t; 6011: __extension__ typedef unsigned long long int __uintmax_t; 6011: # 130 "/usr/include/arm-linux-gnueabihf/bits/types.h" 3 4 6011: # 1 "/usr/include/arm-linux-gnueabihf/bits/typesizes.h" 1 3 4 6011: # 131 "/usr/include/arm-linux-gnueabihf/bits/types.h" 2 3 4 6011: 6011: 6011: __extension__ typedef __u_quad_t __dev_t; 6011: __extension__ typedef unsigned int __uid_t; 6011: __extension__ typedef unsigned int __gid_t; 6011: __extension__ typedef unsigned long int __ino_t; 6011: __extension__ typedef __u_quad_t __ino64_t; 6011: __extension__ typedef unsigned int __mode_t; 6011: __extension__ typedef unsigned int __nlink_t; 6011: __extension__ typedef long int __off_t; 6011: __extension__ typedef __quad_t __off64_t; 6011: __extension__ typedef int __pid_t; 6011: __extension__ typedef struct { int __val[2]; } __fsid_t; 6011: __extension__ typedef long int __clock_t; 6011: __extension__ typedef unsigned long int __rlim_t; 6011: __extension__ typedef __u_quad_t __rlim64_t; 6011: __extension__ typedef unsigned int __id_t; 6011: __extension__ typedef long int __time_t; 6011: __extension__ typedef unsigned int __useconds_t; 6011: __extension__ typedef long int __suseconds_t; 6011: 6011: __extension__ typedef int __daddr_t; 6011: __extension__ typedef int __key_t; 6011: 6011: 6011: __extension__ typedef int __clockid_t; 6011: 6011: 6011: __extension__ typedef void * __timer_t; 6011: 6011: 6011: __extension__ typedef long int __blksize_t; 6011: 6011: 6011: 6011: 6011: __extension__ typedef long int __blkcnt_t; 6011: __extension__ typedef __quad_t __blkcnt64_t; 6011: 6011: 6011: __extension__ typedef unsigned long int __fsblkcnt_t; 6011: __extension__ typedef __u_quad_t __fsblkcnt64_t; 6011: 6011: 6011: __extension__ typedef unsigned long int __fsfilcnt_t; 6011: __extension__ typedef __u_quad_t __fsfilcnt64_t; 6011: 6011: 6011: __extension__ typedef int __fsword_t; 6011: 6011: __extension__ typedef int __ssize_t; 6011: 6011: 6011: __extension__ typedef long int __syscall_slong_t; 6011: 6011: __extension__ typedef unsigned long int __syscall_ulong_t; 6011: 6011: 6011: 6011: typedef __off64_t __loff_t; 6011: typedef __quad_t *__qaddr_t; 6011: typedef char *__caddr_t; 6011: 6011: 6011: __extension__ typedef int __intptr_t; 6011: 6011: 6011: __extension__ typedef unsigned int __socklen_t; 6011: 6011: 6011: 6011: 6011: typedef int __sig_atomic_t; 6011: # 28 "/usr/include/stdint.h" 2 3 4 6011: 6011: # 1 "/usr/include/arm-linux-gnueabihf/bits/wordsize.h" 1 3 4 6011: # 30 "/usr/include/stdint.h" 2 3 4 6011: 6011: 6011: 6011: 6011: # 1 "/usr/include/arm-linux-gnueabihf/bits/stdint-intn.h" 1 3 4 6011: # 24 "/usr/include/arm-linux-gnueabihf/bits/stdint-intn.h" 3 4 6011: typedef __int8_t int8_t; 6011: typedef __int16_t int16_t; 6011: typedef __int32_t int32_t; 6011: typedef __int64_t int64_t; 6011: # 35 "/usr/include/stdint.h" 2 3 4 6011: 6011: 6011: # 1 "/usr/include/arm-linux-gnueabihf/bits/stdint-uintn.h" 1 3 4 6011: # 24 "/usr/include/arm-linux-gnueabihf/bits/stdint-uintn.h" 3 4 6011: typedef __uint8_t uint8_t; 6011: typedef __uint16_t uint16_t; 6011: typedef __uint32_t uint32_t; 6011: typedef __uint64_t uint64_t; 6011: # 38 "/usr/include/stdint.h" 2 3 4 6011: 6011: 6011: 6011: 6011: 6011: typedef signed char int_least8_t; 6011: typedef short int int_least16_t; 6011: typedef int int_least32_t; 6011: 6011: 6011: 6011: __extension__ 6011: typedef long long int int_least64_t; 6011: 6011: 6011: 6011: typedef unsigned char uint_least8_t; 6011: typedef unsigned short int uint_least16_t; 6011: typedef unsigned int uint_least32_t; 6011: 6011: 6011: 6011: __extension__ 6011: typedef unsigned long long int uint_least64_t; 6011: 6011: 6011: 6011: 6011: 6011: 6011: typedef signed char int_fast8_t; 6011: 6011: 6011: 6011: 6011: 6011: typedef int int_fast16_t; 6011: typedef int int_fast32_t; 6011: __extension__ 6011: typedef long long int int_fast64_t; 6011: 6011: 6011: 6011: typedef unsigned char uint_fast8_t; 6011: 6011: 6011: 6011: 6011: 6011: typedef unsigned int uint_fast16_t; 6011: typedef unsigned int uint_fast32_t; 6011: __extension__ 6011: typedef unsigned long long int uint_fast64_t; 6011: # 103 "/usr/include/stdint.h" 3 4 6011: typedef int intptr_t; 6011: 6011: 6011: typedef unsigned int uintptr_t; 6011: 6011: 6011: 6011: 6011: typedef __intmax_t intmax_t; 6011: typedef __uintmax_t uintmax_t; 6011: # 10 "/usr/lib/gcc/arm-linux-gnueabihf/8/include/stdint.h" 2 3 4 6011: # 42 "/usr/include/c++/8/cstdint" 2 3 6011: 6011: 6011: 6011: 6011: namespace std 6011: { 6011: using ::int8_t; 6011: using ::int16_t; 6011: using ::int32_t; 6011: using ::int64_t; 6011: 6011: using ::int_fast8_t; 6011: using ::int_fast16_t; 6011: using ::int_fast32_t; 6011: using ::int_fast64_t; 6011: 6011: using ::int_least8_t; 6011: using ::int_least16_t; 6011: using ::int_least32_t; 6011: using ::int_least64_t; 6011: 6011: using ::intmax_t; 6011: using ::intptr_t; 6011: 6011: using ::uint8_t; 6011: using ::uint16_t; 6011: using ::uint32_t; 6011: using ::uint64_t; 6011: 6011: using ::uint_fast8_t; 6011: using ::uint_fast16_t; 6011: using ::uint_fast32_t; 6011: using ::uint_fast64_t; 6011: 6011: using ::uint_least8_t; 6011: using ::uint_least16_t; 6011: using ::uint_least32_t; 6011: using ::uint_least64_t; 6011: 6011: using ::uintmax_t; 6011: using ::uintptr_t; 6011: } 6011: # 502 "/usr/include/c++/8/bits/char_traits.h" 2 3 6011: 6011: namespace std __attribute__ ((__visibility__ ("default"))) 6011: { 6011: 6011: 6011: template<> 6011: struct char_traits 6011: { 6011: typedef char16_t char_type; 6011: typedef uint_least16_t int_type; 6011: typedef streamoff off_type; 6011: typedef u16streampos pos_type; 6011: typedef mbstate_t state_type; 6011: 6011: static void 6011: assign(char_type& __c1, const char_type& __c2) noexcept 6011: { __c1 = __c2; } 6011: 6011: static constexpr bool 6011: eq(const char_type& __c1, const char_type& __c2) noexcept 6011: { return __c1 == __c2; } 6011: 6011: static constexpr bool 6011: lt(const char_type& __c1, const char_type& __c2) noexcept 6011: { return __c1 < __c2; } 6011: 6011: static int 6011: compare(const char_type* __s1, const char_type* __s2, size_t __n) 6011: { 6011: for (size_t __i = 0; __i < __n; ++__i) 6011: if (lt(__s1[__i], __s2[__i])) 6011: return -1; 6011: else if (lt(__s2[__i], __s1[__i])) 6011: return 1; 6011: return 0; 6011: } 6011: 6011: static size_t 6011: length(const char_type* __s) 6011: { 6011: size_t __i = 0; 6011: while (!eq(__s[__i], char_type())) 6011: ++__i; 6011: return __i; 6011: } 6011: 6011: static const char_type* 6011: find(const char_type* __s, size_t __n, const char_type& __a) 6011: { 6011: for (size_t __i = 0; __i < __n; ++__i) 6011: if (eq(__s[__i], __a)) 6011: return __s + __i; 6011: return 0; 6011: } 6011: 6011: static char_type* 6011: move(char_type* __s1, const char_type* __s2, size_t __n) 6011: { 6011: if (__n == 0) 6011: return __s1; 6011: return (static_cast 6011: (__builtin_memmove(__s1, __s2, __n * sizeof(char_type)))); 6011: } 6011: 6011: static char_type* 6011: copy(char_type* __s1, const char_type* __s2, size_t __n) 6011: { 6011: if (__n == 0) 6011: return __s1; 6011: return (static_cast 6011: (__builtin_memcpy(__s1, __s2, __n * sizeof(char_type)))); 6011: } 6011: 6011: static char_type* 6011: assign(char_type* __s, size_t __n, char_type __a) 6011: { 6011: for (size_t __i = 0; __i < __n; ++__i) 6011: assign(__s[__i], __a); 6011: return __s; 6011: } 6011: 6011: static constexpr char_type 6011: to_char_type(const int_type& __c) noexcept 6011: { return char_type(__c); } 6011: 6011: static constexpr int_type 6011: to_int_type(const char_type& __c) noexcept 6011: { return __c == eof() ? int_type(0xfffd) : int_type(__c); } 6011: 6011: static constexpr bool 6011: eq_int_type(const int_type& __c1, const int_type& __c2) noexcept 6011: { return __c1 == __c2; } 6011: 6011: static constexpr int_type 6011: eof() noexcept 6011: { return static_cast(-1); } 6011: 6011: static constexpr int_type 6011: not_eof(const int_type& __c) noexcept 6011: { return eq_int_type(__c, eof()) ? 0 : __c; } 6011: }; 6011: 6011: template<> 6011: struct char_traits 6011: { 6011: typedef char32_t char_type; 6011: typedef uint_least32_t int_type; 6011: typedef streamoff off_type; 6011: typedef u32streampos pos_type; 6011: typedef mbstate_t state_type; 6011: 6011: static void 6011: assign(char_type& __c1, const char_type& __c2) noexcept 6011: { __c1 = __c2; } 6011: 6011: static constexpr bool 6011: eq(const char_type& __c1, const char_type& __c2) noexcept 6011: { return __c1 == __c2; } 6011: 6011: static constexpr bool 6011: lt(const char_type& __c1, const char_type& __c2) noexcept 6011: { return __c1 < __c2; } 6011: 6011: static int 6011: compare(const char_type* __s1, const char_type* __s2, size_t __n) 6011: { 6011: for (size_t __i = 0; __i < __n; ++__i) 6011: if (lt(__s1[__i], __s2[__i])) 6011: return -1; 6011: else if (lt(__s2[__i], __s1[__i])) 6011: return 1; 6011: return 0; 6011: } 6011: 6011: static size_t 6011: length(const char_type* __s) 6011: { 6011: size_t __i = 0; 6011: while (!eq(__s[__i], char_type())) 6011: ++__i; 6011: return __i; 6011: } 6011: 6011: static const char_type* 6011: find(const char_type* __s, size_t __n, const char_type& __a) 6011: { 6011: for (size_t __i = 0; __i < __n; ++__i) 6011: if (eq(__s[__i], __a)) 6011: return __s + __i; 6011: return 0; 6011: } 6011: 6011: static char_type* 6011: move(char_type* __s1, const char_type* __s2, size_t __n) 6011: { 6011: if (__n == 0) 6011: return __s1; 6011: return (static_cast 6011: (__builtin_memmove(__s1, __s2, __n * sizeof(char_type)))); 6011: } 6011: 6011: static char_type* 6011: copy(char_type* __s1, const char_type* __s2, size_t __n) 6011: { 6011: if (__n == 0) 6011: return __s1; 6011: return (static_cast 6011: (__builtin_memcpy(__s1, __s2, __n * sizeof(char_type)))); 6011: } 6011: 6011: static char_type* 6011: assign(char_type* __s, size_t __n, char_type __a) 6011: { 6011: for (size_t __i = 0; __i < __n; ++__i) 6011: assign(__s[__i], __a); 6011: return __s; 6011: } 6011: 6011: static constexpr char_type 6011: to_char_type(const int_type& __c) noexcept 6011: { return char_type(__c); } 6011: 6011: static constexpr int_type 6011: to_int_type(const char_type& __c) noexcept 6011: { return int_type(__c); } 6011: 6011: static constexpr bool 6011: eq_int_type(const int_type& __c1, const int_type& __c2) noexcept 6011: { return __c1 == __c2; } 6011: 6011: static constexpr int_type 6011: eof() noexcept 6011: { return static_cast(-1); } 6011: 6011: static constexpr int_type 6011: not_eof(const int_type& __c) noexcept 6011: { return eq_int_type(__c, eof()) ? 0 : __c; } 6011: }; 6011: 6011: 6011: } 6011: # 41 "/usr/include/c++/8/ios" 2 3 6011: # 1 "/usr/include/c++/8/bits/localefwd.h" 1 3 6011: # 37 "/usr/include/c++/8/bits/localefwd.h" 3 6011: 6011: # 38 "/usr/include/c++/8/bits/localefwd.h" 3 6011: 6011: 6011: # 1 "/usr/include/arm-linux-gnueabihf/c++/8/bits/c++locale.h" 1 3 6011: # 39 "/usr/include/arm-linux-gnueabihf/c++/8/bits/c++locale.h" 3 6011: 6011: # 40 "/usr/include/arm-linux-gnueabihf/c++/8/bits/c++locale.h" 3 6011: 6011: # 1 "/usr/include/c++/8/clocale" 1 3 6011: # 39 "/usr/include/c++/8/clocale" 3 6011: 6011: # 40 "/usr/include/c++/8/clocale" 3 6011: 6011: 6011: # 1 "/usr/include/locale.h" 1 3 4 6011: # 28 "/usr/include/locale.h" 3 4 6011: # 1 "/usr/lib/gcc/arm-linux-gnueabihf/8/include/stddef.h" 1 3 4 6011: # 29 "/usr/include/locale.h" 2 3 4 6011: # 1 "/usr/include/arm-linux-gnueabihf/bits/locale.h" 1 3 4 6011: # 30 "/usr/include/locale.h" 2 3 4 6011: 6011: extern "C" { 6011: # 51 "/usr/include/locale.h" 3 4 6011: struct lconv 6011: { 6011: 6011: 6011: char *decimal_point; 6011: char *thousands_sep; 6011: 6011: 6011: 6011: 6011: 6011: char *grouping; 6011: 6011: 6011: 6011: 6011: 6011: char *int_curr_symbol; 6011: char *currency_symbol; 6011: char *mon_decimal_point; 6011: char *mon_thousands_sep; 6011: char *mon_grouping; 6011: char *positive_sign; 6011: char *negative_sign; 6011: char int_frac_digits; 6011: char frac_digits; 6011: 6011: char p_cs_precedes; 6011: 6011: char p_sep_by_space; 6011: 6011: char n_cs_precedes; 6011: 6011: char n_sep_by_space; 6011: 6011: 6011: 6011: 6011: 6011: 6011: char p_sign_posn; 6011: char n_sign_posn; 6011: 6011: 6011: char int_p_cs_precedes; 6011: 6011: char int_p_sep_by_space; 6011: 6011: char int_n_cs_precedes; 6011: 6011: char int_n_sep_by_space; 6011: 6011: 6011: 6011: 6011: 6011: 6011: char int_p_sign_posn; 6011: char int_n_sign_posn; 6011: # 118 "/usr/include/locale.h" 3 4 6011: }; 6011: 6011: 6011: 6011: extern char *setlocale (int __category, const char *__locale) throw (); 6011: 6011: 6011: extern struct lconv *localeconv (void) throw (); 6011: # 141 "/usr/include/locale.h" 3 4 6011: extern locale_t newlocale (int __category_mask, const char *__locale, 6011: locale_t __base) throw (); 6011: # 176 "/usr/include/locale.h" 3 4 6011: extern locale_t duplocale (locale_t __dataset) throw (); 6011: 6011: 6011: 6011: extern void freelocale (locale_t __dataset) throw (); 6011: 6011: 6011: 6011: 6011: 6011: 6011: extern locale_t uselocale (locale_t __dataset) throw (); 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: } 6011: # 43 "/usr/include/c++/8/clocale" 2 3 6011: # 51 "/usr/include/c++/8/clocale" 3 6011: namespace std 6011: { 6011: using ::lconv; 6011: using ::setlocale; 6011: using ::localeconv; 6011: } 6011: # 42 "/usr/include/arm-linux-gnueabihf/c++/8/bits/c++locale.h" 2 3 6011: 6011: 6011: 6011: 6011: 6011: 6011: namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) 6011: { 6011: 6011: 6011: extern "C" __typeof(uselocale) __uselocale; 6011: 6011: 6011: } 6011: 6011: 6011: namespace std __attribute__ ((__visibility__ ("default"))) 6011: { 6011: 6011: 6011: typedef __locale_t __c_locale; 6011: 6011: 6011: 6011: 6011: 6011: inline int 6011: __convert_from_v(const __c_locale& __cloc __attribute__ ((__unused__)), 6011: char* __out, 6011: const int __size __attribute__ ((__unused__)), 6011: const char* __fmt, ...) 6011: { 6011: 6011: __c_locale __old = __gnu_cxx::__uselocale(__cloc); 6011: # 88 "/usr/include/arm-linux-gnueabihf/c++/8/bits/c++locale.h" 3 6011: __builtin_va_list __args; 6011: __builtin_va_start(__args, __fmt); 6011: 6011: 6011: const int __ret = __builtin_vsnprintf(__out, __size, __fmt, __args); 6011: 6011: 6011: 6011: 6011: __builtin_va_end(__args); 6011: 6011: 6011: __gnu_cxx::__uselocale(__old); 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: return __ret; 6011: } 6011: 6011: 6011: } 6011: # 41 "/usr/include/c++/8/bits/localefwd.h" 2 3 6011: 6011: # 1 "/usr/include/c++/8/cctype" 1 3 6011: # 39 "/usr/include/c++/8/cctype" 3 6011: 6011: # 40 "/usr/include/c++/8/cctype" 3 6011: 6011: 6011: # 1 "/usr/include/ctype.h" 1 3 4 6011: # 28 "/usr/include/ctype.h" 3 4 6011: extern "C" { 6011: # 39 "/usr/include/ctype.h" 3 4 6011: # 1 "/usr/include/endian.h" 1 3 4 6011: # 36 "/usr/include/endian.h" 3 4 6011: # 1 "/usr/include/arm-linux-gnueabihf/bits/endian.h" 1 3 4 6011: # 37 "/usr/include/endian.h" 2 3 4 6011: # 60 "/usr/include/endian.h" 3 4 6011: # 1 "/usr/include/arm-linux-gnueabihf/bits/byteswap.h" 1 3 4 6011: # 34 "/usr/include/arm-linux-gnueabihf/bits/byteswap.h" 3 4 6011: # 1 "/usr/include/arm-linux-gnueabihf/bits/byteswap-16.h" 1 3 4 6011: # 35 "/usr/include/arm-linux-gnueabihf/bits/byteswap.h" 2 3 4 6011: # 43 "/usr/include/arm-linux-gnueabihf/bits/byteswap.h" 3 4 6011: static __inline unsigned int 6011: __bswap_32 (unsigned int __bsx) 6011: { 6011: return __builtin_bswap32 (__bsx); 6011: } 6011: # 74 "/usr/include/arm-linux-gnueabihf/bits/byteswap.h" 3 4 6011: static __inline __uint64_t 6011: __bswap_64 (__uint64_t __bsx) 6011: { 6011: return __builtin_bswap64 (__bsx); 6011: } 6011: # 61 "/usr/include/endian.h" 2 3 4 6011: # 1 "/usr/include/arm-linux-gnueabihf/bits/uintn-identity.h" 1 3 4 6011: # 32 "/usr/include/arm-linux-gnueabihf/bits/uintn-identity.h" 3 4 6011: static __inline __uint16_t 6011: __uint16_identity (__uint16_t __x) 6011: { 6011: return __x; 6011: } 6011: 6011: static __inline __uint32_t 6011: __uint32_identity (__uint32_t __x) 6011: { 6011: return __x; 6011: } 6011: 6011: static __inline __uint64_t 6011: __uint64_identity (__uint64_t __x) 6011: { 6011: return __x; 6011: } 6011: # 62 "/usr/include/endian.h" 2 3 4 6011: # 40 "/usr/include/ctype.h" 2 3 4 6011: 6011: 6011: 6011: 6011: 6011: 6011: enum 6011: { 6011: _ISupper = ((0) < 8 ? ((1 << (0)) << 8) : ((1 << (0)) >> 8)), 6011: _ISlower = ((1) < 8 ? ((1 << (1)) << 8) : ((1 << (1)) >> 8)), 6011: _ISalpha = ((2) < 8 ? ((1 << (2)) << 8) : ((1 << (2)) >> 8)), 6011: _ISdigit = ((3) < 8 ? ((1 << (3)) << 8) : ((1 << (3)) >> 8)), 6011: _ISxdigit = ((4) < 8 ? ((1 << (4)) << 8) : ((1 << (4)) >> 8)), 6011: _ISspace = ((5) < 8 ? ((1 << (5)) << 8) : ((1 << (5)) >> 8)), 6011: _ISprint = ((6) < 8 ? ((1 << (6)) << 8) : ((1 << (6)) >> 8)), 6011: _ISgraph = ((7) < 8 ? ((1 << (7)) << 8) : ((1 << (7)) >> 8)), 6011: _ISblank = ((8) < 8 ? ((1 << (8)) << 8) : ((1 << (8)) >> 8)), 6011: _IScntrl = ((9) < 8 ? ((1 << (9)) << 8) : ((1 << (9)) >> 8)), 6011: _ISpunct = ((10) < 8 ? ((1 << (10)) << 8) : ((1 << (10)) >> 8)), 6011: _ISalnum = ((11) < 8 ? ((1 << (11)) << 8) : ((1 << (11)) >> 8)) 6011: }; 6011: # 79 "/usr/include/ctype.h" 3 4 6011: extern const unsigned short int **__ctype_b_loc (void) 6011: throw () __attribute__ ((__const__)); 6011: extern const __int32_t **__ctype_tolower_loc (void) 6011: throw () __attribute__ ((__const__)); 6011: extern const __int32_t **__ctype_toupper_loc (void) 6011: throw () __attribute__ ((__const__)); 6011: # 108 "/usr/include/ctype.h" 3 4 6011: extern int isalnum (int) throw (); 6011: extern int isalpha (int) throw (); 6011: extern int iscntrl (int) throw (); 6011: extern int isdigit (int) throw (); 6011: extern int islower (int) throw (); 6011: extern int isgraph (int) throw (); 6011: extern int isprint (int) throw (); 6011: extern int ispunct (int) throw (); 6011: extern int isspace (int) throw (); 6011: extern int isupper (int) throw (); 6011: extern int isxdigit (int) throw (); 6011: 6011: 6011: 6011: extern int tolower (int __c) throw (); 6011: 6011: 6011: extern int toupper (int __c) throw (); 6011: 6011: 6011: 6011: 6011: extern int isblank (int) throw (); 6011: 6011: 6011: 6011: 6011: extern int isctype (int __c, int __mask) throw (); 6011: 6011: 6011: 6011: 6011: 6011: 6011: extern int isascii (int __c) throw (); 6011: 6011: 6011: 6011: extern int toascii (int __c) throw (); 6011: 6011: 6011: 6011: extern int _toupper (int) throw (); 6011: extern int _tolower (int) throw (); 6011: # 251 "/usr/include/ctype.h" 3 4 6011: extern int isalnum_l (int, locale_t) throw (); 6011: extern int isalpha_l (int, locale_t) throw (); 6011: extern int iscntrl_l (int, locale_t) throw (); 6011: extern int isdigit_l (int, locale_t) throw (); 6011: extern int islower_l (int, locale_t) throw (); 6011: extern int isgraph_l (int, locale_t) throw (); 6011: extern int isprint_l (int, locale_t) throw (); 6011: extern int ispunct_l (int, locale_t) throw (); 6011: extern int isspace_l (int, locale_t) throw (); 6011: extern int isupper_l (int, locale_t) throw (); 6011: extern int isxdigit_l (int, locale_t) throw (); 6011: 6011: extern int isblank_l (int, locale_t) throw (); 6011: 6011: 6011: 6011: extern int __tolower_l (int __c, locale_t __l) throw (); 6011: extern int tolower_l (int __c, locale_t __l) throw (); 6011: 6011: 6011: extern int __toupper_l (int __c, locale_t __l) throw (); 6011: extern int toupper_l (int __c, locale_t __l) throw (); 6011: # 327 "/usr/include/ctype.h" 3 4 6011: } 6011: # 43 "/usr/include/c++/8/cctype" 2 3 6011: # 62 "/usr/include/c++/8/cctype" 3 6011: namespace std 6011: { 6011: using ::isalnum; 6011: using ::isalpha; 6011: using ::iscntrl; 6011: using ::isdigit; 6011: using ::isgraph; 6011: using ::islower; 6011: using ::isprint; 6011: using ::ispunct; 6011: using ::isspace; 6011: using ::isupper; 6011: using ::isxdigit; 6011: using ::tolower; 6011: using ::toupper; 6011: } 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: namespace std 6011: { 6011: using ::isblank; 6011: } 6011: # 43 "/usr/include/c++/8/bits/localefwd.h" 2 3 6011: 6011: namespace std __attribute__ ((__visibility__ ("default"))) 6011: { 6011: 6011: # 55 "/usr/include/c++/8/bits/localefwd.h" 3 6011: class locale; 6011: 6011: template 6011: bool 6011: has_facet(const locale&) throw(); 6011: 6011: template 6011: const _Facet& 6011: use_facet(const locale&); 6011: 6011: 6011: template 6011: bool 6011: isspace(_CharT, const locale&); 6011: 6011: template 6011: bool 6011: isprint(_CharT, const locale&); 6011: 6011: template 6011: bool 6011: iscntrl(_CharT, const locale&); 6011: 6011: template 6011: bool 6011: isupper(_CharT, const locale&); 6011: 6011: template 6011: bool 6011: islower(_CharT, const locale&); 6011: 6011: template 6011: bool 6011: isalpha(_CharT, const locale&); 6011: 6011: template 6011: bool 6011: isdigit(_CharT, const locale&); 6011: 6011: template 6011: bool 6011: ispunct(_CharT, const locale&); 6011: 6011: template 6011: bool 6011: isxdigit(_CharT, const locale&); 6011: 6011: template 6011: bool 6011: isalnum(_CharT, const locale&); 6011: 6011: template 6011: bool 6011: isgraph(_CharT, const locale&); 6011: 6011: 6011: template 6011: bool 6011: isblank(_CharT, const locale&); 6011: 6011: 6011: template 6011: _CharT 6011: toupper(_CharT, const locale&); 6011: 6011: template 6011: _CharT 6011: tolower(_CharT, const locale&); 6011: 6011: 6011: class ctype_base; 6011: template 6011: class ctype; 6011: template<> class ctype; 6011: 6011: template<> class ctype; 6011: 6011: template 6011: class ctype_byname; 6011: 6011: 6011: class codecvt_base; 6011: template 6011: class codecvt; 6011: template<> class codecvt; 6011: 6011: template<> class codecvt; 6011: 6011: template 6011: class codecvt_byname; 6011: 6011: 6011: 6011: template > 6011: class num_get; 6011: template > 6011: class num_put; 6011: 6011: namespace __cxx11 { 6011: template class numpunct; 6011: template class numpunct_byname; 6011: } 6011: 6011: namespace __cxx11 { 6011: 6011: template 6011: class collate; 6011: template 6011: class collate_byname; 6011: } 6011: 6011: 6011: class time_base; 6011: namespace __cxx11 { 6011: template > 6011: class time_get; 6011: template > 6011: class time_get_byname; 6011: } 6011: template > 6011: class time_put; 6011: template > 6011: class time_put_byname; 6011: 6011: 6011: class money_base; 6011: namespace __cxx11 { 6011: template > 6011: class money_get; 6011: template > 6011: class money_put; 6011: } 6011: namespace __cxx11 { 6011: template 6011: class moneypunct; 6011: template 6011: class moneypunct_byname; 6011: } 6011: 6011: 6011: class messages_base; 6011: namespace __cxx11 { 6011: template 6011: class messages; 6011: template 6011: class messages_byname; 6011: } 6011: 6011: 6011: } 6011: # 42 "/usr/include/c++/8/ios" 2 3 6011: # 1 "/usr/include/c++/8/bits/ios_base.h" 1 3 6011: # 37 "/usr/include/c++/8/bits/ios_base.h" 3 6011: 6011: # 38 "/usr/include/c++/8/bits/ios_base.h" 3 6011: 6011: # 1 "/usr/include/c++/8/ext/atomicity.h" 1 3 6011: # 32 "/usr/include/c++/8/ext/atomicity.h" 3 6011: 6011: # 33 "/usr/include/c++/8/ext/atomicity.h" 3 6011: 6011: 6011: # 1 "/usr/include/arm-linux-gnueabihf/c++/8/bits/gthr.h" 1 3 6011: # 30 "/usr/include/arm-linux-gnueabihf/c++/8/bits/gthr.h" 3 6011: #pragma GCC visibility push(default) 6011: # 148 "/usr/include/arm-linux-gnueabihf/c++/8/bits/gthr.h" 3 6011: # 1 "/usr/include/arm-linux-gnueabihf/c++/8/bits/gthr-default.h" 1 3 6011: # 35 "/usr/include/arm-linux-gnueabihf/c++/8/bits/gthr-default.h" 3 6011: # 1 "/usr/include/pthread.h" 1 3 4 6011: # 23 "/usr/include/pthread.h" 3 4 6011: # 1 "/usr/include/sched.h" 1 3 4 6011: # 29 "/usr/include/sched.h" 3 4 6011: # 1 "/usr/lib/gcc/arm-linux-gnueabihf/8/include/stddef.h" 1 3 4 6011: # 30 "/usr/include/sched.h" 2 3 4 6011: 6011: # 1 "/usr/include/arm-linux-gnueabihf/bits/types/time_t.h" 1 3 4 6011: 6011: 6011: 6011: 6011: 6011: 6011: typedef __time_t time_t; 6011: # 32 "/usr/include/sched.h" 2 3 4 6011: # 1 "/usr/include/arm-linux-gnueabihf/bits/types/struct_timespec.h" 1 3 4 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: struct timespec 6011: { 6011: __time_t tv_sec; 6011: __syscall_slong_t tv_nsec; 6011: }; 6011: # 33 "/usr/include/sched.h" 2 3 4 6011: 6011: 6011: 6011: 6011: 6011: typedef __pid_t pid_t; 6011: 6011: 6011: 6011: 6011: # 1 "/usr/include/arm-linux-gnueabihf/bits/sched.h" 1 3 4 6011: # 75 "/usr/include/arm-linux-gnueabihf/bits/sched.h" 3 4 6011: struct sched_param 6011: { 6011: int sched_priority; 6011: }; 6011: 6011: extern "C" { 6011: 6011: 6011: 6011: extern int clone (int (*__fn) (void *__arg), void *__child_stack, 6011: int __flags, void *__arg, ...) throw (); 6011: 6011: 6011: extern int unshare (int __flags) throw (); 6011: 6011: 6011: extern int sched_getcpu (void) throw (); 6011: 6011: 6011: extern int setns (int __fd, int __nstype) throw (); 6011: 6011: 6011: } 6011: # 44 "/usr/include/sched.h" 2 3 4 6011: # 1 "/usr/include/arm-linux-gnueabihf/bits/cpu-set.h" 1 3 4 6011: # 32 "/usr/include/arm-linux-gnueabihf/bits/cpu-set.h" 3 4 6011: typedef unsigned long int __cpu_mask; 6011: 6011: 6011: 6011: 6011: 6011: 6011: typedef struct 6011: { 6011: __cpu_mask __bits[1024 / (8 * sizeof (__cpu_mask))]; 6011: } cpu_set_t; 6011: # 115 "/usr/include/arm-linux-gnueabihf/bits/cpu-set.h" 3 4 6011: extern "C" { 6011: 6011: extern int __sched_cpucount (size_t __setsize, const cpu_set_t *__setp) 6011: throw (); 6011: extern cpu_set_t *__sched_cpualloc (size_t __count) throw () __attribute__ ((__warn_unused_result__)); 6011: extern void __sched_cpufree (cpu_set_t *__set) throw (); 6011: 6011: } 6011: # 45 "/usr/include/sched.h" 2 3 4 6011: 6011: 6011: 6011: 6011: 6011: 6011: extern "C" { 6011: 6011: 6011: extern int sched_setparam (__pid_t __pid, const struct sched_param *__param) 6011: throw (); 6011: 6011: 6011: extern int sched_getparam (__pid_t __pid, struct sched_param *__param) throw (); 6011: 6011: 6011: extern int sched_setscheduler (__pid_t __pid, int __policy, 6011: const struct sched_param *__param) throw (); 6011: 6011: 6011: extern int sched_getscheduler (__pid_t __pid) throw (); 6011: 6011: 6011: extern int sched_yield (void) throw (); 6011: 6011: 6011: extern int sched_get_priority_max (int __algorithm) throw (); 6011: 6011: 6011: extern int sched_get_priority_min (int __algorithm) throw (); 6011: 6011: 6011: extern int sched_rr_get_interval (__pid_t __pid, struct timespec *__t) throw (); 6011: # 121 "/usr/include/sched.h" 3 4 6011: extern int sched_setaffinity (__pid_t __pid, size_t __cpusetsize, 6011: const cpu_set_t *__cpuset) throw (); 6011: 6011: 6011: extern int sched_getaffinity (__pid_t __pid, size_t __cpusetsize, 6011: cpu_set_t *__cpuset) throw (); 6011: 6011: 6011: } 6011: # 24 "/usr/include/pthread.h" 2 3 4 6011: # 1 "/usr/include/time.h" 1 3 4 6011: # 29 "/usr/include/time.h" 3 4 6011: # 1 "/usr/lib/gcc/arm-linux-gnueabihf/8/include/stddef.h" 1 3 4 6011: # 30 "/usr/include/time.h" 2 3 4 6011: 6011: 6011: 6011: # 1 "/usr/include/arm-linux-gnueabihf/bits/time.h" 1 3 4 6011: # 73 "/usr/include/arm-linux-gnueabihf/bits/time.h" 3 4 6011: # 1 "/usr/include/arm-linux-gnueabihf/bits/timex.h" 1 3 4 6011: # 22 "/usr/include/arm-linux-gnueabihf/bits/timex.h" 3 4 6011: # 1 "/usr/include/arm-linux-gnueabihf/bits/types/struct_timeval.h" 1 3 4 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: struct timeval 6011: { 6011: __time_t tv_sec; 6011: __suseconds_t tv_usec; 6011: }; 6011: # 23 "/usr/include/arm-linux-gnueabihf/bits/timex.h" 2 3 4 6011: 6011: 6011: 6011: struct timex 6011: { 6011: unsigned int modes; 6011: __syscall_slong_t offset; 6011: __syscall_slong_t freq; 6011: __syscall_slong_t maxerror; 6011: __syscall_slong_t esterror; 6011: int status; 6011: __syscall_slong_t constant; 6011: __syscall_slong_t precision; 6011: __syscall_slong_t tolerance; 6011: struct timeval time; 6011: __syscall_slong_t tick; 6011: __syscall_slong_t ppsfreq; 6011: __syscall_slong_t jitter; 6011: int shift; 6011: __syscall_slong_t stabil; 6011: __syscall_slong_t jitcnt; 6011: __syscall_slong_t calcnt; 6011: __syscall_slong_t errcnt; 6011: __syscall_slong_t stbcnt; 6011: 6011: int tai; 6011: 6011: 6011: int :32; int :32; int :32; int :32; 6011: int :32; int :32; int :32; int :32; 6011: int :32; int :32; int :32; 6011: }; 6011: # 74 "/usr/include/arm-linux-gnueabihf/bits/time.h" 2 3 4 6011: 6011: extern "C" { 6011: 6011: 6011: extern int clock_adjtime (__clockid_t __clock_id, struct timex *__utx) throw (); 6011: 6011: } 6011: # 34 "/usr/include/time.h" 2 3 4 6011: 6011: 6011: 6011: # 1 "/usr/include/arm-linux-gnueabihf/bits/types/clock_t.h" 1 3 4 6011: 6011: 6011: 6011: 6011: 6011: 6011: typedef __clock_t clock_t; 6011: # 38 "/usr/include/time.h" 2 3 4 6011: 6011: # 1 "/usr/include/arm-linux-gnueabihf/bits/types/struct_tm.h" 1 3 4 6011: 6011: 6011: 6011: 6011: 6011: 6011: struct tm 6011: { 6011: int tm_sec; 6011: int tm_min; 6011: int tm_hour; 6011: int tm_mday; 6011: int tm_mon; 6011: int tm_year; 6011: int tm_wday; 6011: int tm_yday; 6011: int tm_isdst; 6011: 6011: 6011: long int tm_gmtoff; 6011: const char *tm_zone; 6011: 6011: 6011: 6011: 6011: }; 6011: # 40 "/usr/include/time.h" 2 3 4 6011: 6011: 6011: 6011: 6011: 6011: 6011: # 1 "/usr/include/arm-linux-gnueabihf/bits/types/clockid_t.h" 1 3 4 6011: 6011: 6011: 6011: 6011: 6011: 6011: typedef __clockid_t clockid_t; 6011: # 47 "/usr/include/time.h" 2 3 4 6011: # 1 "/usr/include/arm-linux-gnueabihf/bits/types/timer_t.h" 1 3 4 6011: 6011: 6011: 6011: 6011: 6011: 6011: typedef __timer_t timer_t; 6011: # 48 "/usr/include/time.h" 2 3 4 6011: # 1 "/usr/include/arm-linux-gnueabihf/bits/types/struct_itimerspec.h" 1 3 4 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: struct itimerspec 6011: { 6011: struct timespec it_interval; 6011: struct timespec it_value; 6011: }; 6011: # 49 "/usr/include/time.h" 2 3 4 6011: struct sigevent; 6011: # 68 "/usr/include/time.h" 3 4 6011: extern "C" { 6011: 6011: 6011: 6011: extern clock_t clock (void) throw (); 6011: 6011: 6011: extern time_t time (time_t *__timer) throw (); 6011: 6011: 6011: extern double difftime (time_t __time1, time_t __time0) 6011: throw () __attribute__ ((__const__)); 6011: 6011: 6011: extern time_t mktime (struct tm *__tp) throw (); 6011: 6011: 6011: 6011: 6011: 6011: extern size_t strftime (char *__restrict __s, size_t __maxsize, 6011: const char *__restrict __format, 6011: const struct tm *__restrict __tp) throw (); 6011: 6011: 6011: 6011: 6011: extern char *strptime (const char *__restrict __s, 6011: const char *__restrict __fmt, struct tm *__tp) 6011: throw (); 6011: 6011: 6011: 6011: 6011: 6011: 6011: extern size_t strftime_l (char *__restrict __s, size_t __maxsize, 6011: const char *__restrict __format, 6011: const struct tm *__restrict __tp, 6011: locale_t __loc) throw (); 6011: 6011: 6011: 6011: extern char *strptime_l (const char *__restrict __s, 6011: const char *__restrict __fmt, struct tm *__tp, 6011: locale_t __loc) throw (); 6011: 6011: 6011: 6011: 6011: 6011: extern struct tm *gmtime (const time_t *__timer) throw (); 6011: 6011: 6011: 6011: extern struct tm *localtime (const time_t *__timer) throw (); 6011: 6011: 6011: 6011: 6011: extern struct tm *gmtime_r (const time_t *__restrict __timer, 6011: struct tm *__restrict __tp) throw (); 6011: 6011: 6011: 6011: extern struct tm *localtime_r (const time_t *__restrict __timer, 6011: struct tm *__restrict __tp) throw (); 6011: 6011: 6011: 6011: 6011: extern char *asctime (const struct tm *__tp) throw (); 6011: 6011: 6011: extern char *ctime (const time_t *__timer) throw (); 6011: 6011: 6011: 6011: 6011: 6011: 6011: extern char *asctime_r (const struct tm *__restrict __tp, 6011: char *__restrict __buf) throw (); 6011: 6011: 6011: extern char *ctime_r (const time_t *__restrict __timer, 6011: char *__restrict __buf) throw (); 6011: 6011: 6011: 6011: 6011: extern char *__tzname[2]; 6011: extern int __daylight; 6011: extern long int __timezone; 6011: 6011: 6011: 6011: 6011: extern char *tzname[2]; 6011: 6011: 6011: 6011: extern void tzset (void) throw (); 6011: 6011: 6011: 6011: extern int daylight; 6011: extern long int timezone; 6011: 6011: 6011: 6011: 6011: 6011: extern int stime (const time_t *__when) throw (); 6011: # 196 "/usr/include/time.h" 3 4 6011: extern time_t timegm (struct tm *__tp) throw (); 6011: 6011: 6011: extern time_t timelocal (struct tm *__tp) throw (); 6011: 6011: 6011: extern int dysize (int __year) throw () __attribute__ ((__const__)); 6011: # 211 "/usr/include/time.h" 3 4 6011: extern int nanosleep (const struct timespec *__requested_time, 6011: struct timespec *__remaining); 6011: 6011: 6011: 6011: extern int clock_getres (clockid_t __clock_id, struct timespec *__res) throw (); 6011: 6011: 6011: extern int clock_gettime (clockid_t __clock_id, struct timespec *__tp) throw (); 6011: 6011: 6011: extern int clock_settime (clockid_t __clock_id, const struct timespec *__tp) 6011: throw (); 6011: 6011: 6011: 6011: 6011: 6011: 6011: extern int clock_nanosleep (clockid_t __clock_id, int __flags, 6011: const struct timespec *__req, 6011: struct timespec *__rem); 6011: 6011: 6011: extern int clock_getcpuclockid (pid_t __pid, clockid_t *__clock_id) throw (); 6011: 6011: 6011: 6011: 6011: extern int timer_create (clockid_t __clock_id, 6011: struct sigevent *__restrict __evp, 6011: timer_t *__restrict __timerid) throw (); 6011: 6011: 6011: extern int timer_delete (timer_t __timerid) throw (); 6011: 6011: 6011: extern int timer_settime (timer_t __timerid, int __flags, 6011: const struct itimerspec *__restrict __value, 6011: struct itimerspec *__restrict __ovalue) throw (); 6011: 6011: 6011: extern int timer_gettime (timer_t __timerid, struct itimerspec *__value) 6011: throw (); 6011: 6011: 6011: extern int timer_getoverrun (timer_t __timerid) throw (); 6011: 6011: 6011: 6011: 6011: 6011: extern int timespec_get (struct timespec *__ts, int __base) 6011: throw () __attribute__ ((__nonnull__ (1))); 6011: # 280 "/usr/include/time.h" 3 4 6011: extern int getdate_err; 6011: # 289 "/usr/include/time.h" 3 4 6011: extern struct tm *getdate (const char *__string); 6011: # 303 "/usr/include/time.h" 3 4 6011: extern int getdate_r (const char *__restrict __string, 6011: struct tm *__restrict __resbufp); 6011: 6011: 6011: } 6011: # 25 "/usr/include/pthread.h" 2 3 4 6011: 6011: # 1 "/usr/include/arm-linux-gnueabihf/bits/pthreadtypes.h" 1 3 4 6011: # 23 "/usr/include/arm-linux-gnueabihf/bits/pthreadtypes.h" 3 4 6011: # 1 "/usr/include/arm-linux-gnueabihf/bits/thread-shared-types.h" 1 3 4 6011: # 58 "/usr/include/arm-linux-gnueabihf/bits/thread-shared-types.h" 3 4 6011: # 1 "/usr/include/arm-linux-gnueabihf/bits/pthreadtypes-arch.h" 1 3 4 6011: # 41 "/usr/include/arm-linux-gnueabihf/bits/pthreadtypes-arch.h" 3 4 6011: struct __pthread_rwlock_arch_t 6011: { 6011: unsigned int __readers; 6011: unsigned int __writers; 6011: unsigned int __wrphase_futex; 6011: unsigned int __writers_futex; 6011: unsigned int __pad3; 6011: unsigned int __pad4; 6011: # 59 "/usr/include/arm-linux-gnueabihf/bits/pthreadtypes-arch.h" 3 4 6011: unsigned char __flags; 6011: unsigned char __shared; 6011: unsigned char __pad1; 6011: unsigned char __pad2; 6011: 6011: int __cur_writer; 6011: }; 6011: # 59 "/usr/include/arm-linux-gnueabihf/bits/thread-shared-types.h" 2 3 4 6011: # 69 "/usr/include/arm-linux-gnueabihf/bits/thread-shared-types.h" 3 4 6011: typedef struct __pthread_internal_slist 6011: { 6011: struct __pthread_internal_slist *__next; 6011: } __pthread_slist_t; 6011: # 99 "/usr/include/arm-linux-gnueabihf/bits/thread-shared-types.h" 3 4 6011: struct __pthread_mutex_s 6011: { 6011: int __lock ; 6011: unsigned int __count; 6011: int __owner; 6011: 6011: 6011: 6011: 6011: 6011: int __kind; 6011: 6011: 6011: 6011: 6011: 6011: 6011: unsigned int __nusers; 6011: __extension__ union 6011: { 6011: int __spins; 6011: __pthread_slist_t __list; 6011: }; 6011: 6011: 6011: }; 6011: 6011: 6011: 6011: 6011: struct __pthread_cond_s 6011: { 6011: __extension__ union 6011: { 6011: __extension__ unsigned long long int __wseq; 6011: struct 6011: { 6011: unsigned int __low; 6011: unsigned int __high; 6011: } __wseq32; 6011: }; 6011: __extension__ union 6011: { 6011: __extension__ unsigned long long int __g1_start; 6011: struct 6011: { 6011: unsigned int __low; 6011: unsigned int __high; 6011: } __g1_start32; 6011: }; 6011: unsigned int __g_refs[2] ; 6011: unsigned int __g_size[2]; 6011: unsigned int __g1_orig_size; 6011: unsigned int __wrefs; 6011: unsigned int __g_signals[2]; 6011: }; 6011: # 24 "/usr/include/arm-linux-gnueabihf/bits/pthreadtypes.h" 2 3 4 6011: 6011: 6011: 6011: typedef unsigned long int pthread_t; 6011: 6011: 6011: 6011: 6011: typedef union 6011: { 6011: char __size[4]; 6011: int __align; 6011: } pthread_mutexattr_t; 6011: 6011: 6011: 6011: 6011: typedef union 6011: { 6011: char __size[4]; 6011: int __align; 6011: } pthread_condattr_t; 6011: 6011: 6011: 6011: typedef unsigned int pthread_key_t; 6011: 6011: 6011: 6011: typedef int pthread_once_t; 6011: 6011: 6011: union pthread_attr_t 6011: { 6011: char __size[36]; 6011: long int __align; 6011: }; 6011: 6011: typedef union pthread_attr_t pthread_attr_t; 6011: 6011: 6011: 6011: 6011: typedef union 6011: { 6011: struct __pthread_mutex_s __data; 6011: char __size[24]; 6011: long int __align; 6011: } pthread_mutex_t; 6011: 6011: 6011: typedef union 6011: { 6011: struct __pthread_cond_s __data; 6011: char __size[48]; 6011: __extension__ long long int __align; 6011: } pthread_cond_t; 6011: 6011: 6011: 6011: 6011: 6011: typedef union 6011: { 6011: struct __pthread_rwlock_arch_t __data; 6011: char __size[32]; 6011: long int __align; 6011: } pthread_rwlock_t; 6011: 6011: typedef union 6011: { 6011: char __size[8]; 6011: long int __align; 6011: } pthread_rwlockattr_t; 6011: 6011: 6011: 6011: 6011: 6011: typedef volatile int pthread_spinlock_t; 6011: 6011: 6011: 6011: 6011: typedef union 6011: { 6011: char __size[20]; 6011: long int __align; 6011: } pthread_barrier_t; 6011: 6011: typedef union 6011: { 6011: char __size[4]; 6011: int __align; 6011: } pthread_barrierattr_t; 6011: # 27 "/usr/include/pthread.h" 2 3 4 6011: # 1 "/usr/include/arm-linux-gnueabihf/bits/setjmp.h" 1 3 4 6011: # 33 "/usr/include/arm-linux-gnueabihf/bits/setjmp.h" 3 4 6011: typedef int __jmp_buf[64] __attribute__((__aligned__ (8))); 6011: # 28 "/usr/include/pthread.h" 2 3 4 6011: # 1 "/usr/include/arm-linux-gnueabihf/bits/wordsize.h" 1 3 4 6011: # 29 "/usr/include/pthread.h" 2 3 4 6011: 6011: 6011: 6011: 6011: enum 6011: { 6011: PTHREAD_CREATE_JOINABLE, 6011: 6011: PTHREAD_CREATE_DETACHED 6011: 6011: }; 6011: 6011: 6011: 6011: enum 6011: { 6011: PTHREAD_MUTEX_TIMED_NP, 6011: PTHREAD_MUTEX_RECURSIVE_NP, 6011: PTHREAD_MUTEX_ERRORCHECK_NP, 6011: PTHREAD_MUTEX_ADAPTIVE_NP 6011: 6011: , 6011: PTHREAD_MUTEX_NORMAL = PTHREAD_MUTEX_TIMED_NP, 6011: PTHREAD_MUTEX_RECURSIVE = PTHREAD_MUTEX_RECURSIVE_NP, 6011: PTHREAD_MUTEX_ERRORCHECK = PTHREAD_MUTEX_ERRORCHECK_NP, 6011: PTHREAD_MUTEX_DEFAULT = PTHREAD_MUTEX_NORMAL 6011: 6011: 6011: 6011: , PTHREAD_MUTEX_FAST_NP = PTHREAD_MUTEX_TIMED_NP 6011: 6011: }; 6011: 6011: 6011: 6011: 6011: enum 6011: { 6011: PTHREAD_MUTEX_STALLED, 6011: PTHREAD_MUTEX_STALLED_NP = PTHREAD_MUTEX_STALLED, 6011: PTHREAD_MUTEX_ROBUST, 6011: PTHREAD_MUTEX_ROBUST_NP = PTHREAD_MUTEX_ROBUST 6011: }; 6011: 6011: 6011: 6011: 6011: 6011: enum 6011: { 6011: PTHREAD_PRIO_NONE, 6011: PTHREAD_PRIO_INHERIT, 6011: PTHREAD_PRIO_PROTECT 6011: }; 6011: # 115 "/usr/include/pthread.h" 3 4 6011: enum 6011: { 6011: PTHREAD_RWLOCK_PREFER_READER_NP, 6011: PTHREAD_RWLOCK_PREFER_WRITER_NP, 6011: PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP, 6011: PTHREAD_RWLOCK_DEFAULT_NP = PTHREAD_RWLOCK_PREFER_READER_NP 6011: }; 6011: # 156 "/usr/include/pthread.h" 3 4 6011: enum 6011: { 6011: PTHREAD_INHERIT_SCHED, 6011: 6011: PTHREAD_EXPLICIT_SCHED 6011: 6011: }; 6011: 6011: 6011: 6011: enum 6011: { 6011: PTHREAD_SCOPE_SYSTEM, 6011: 6011: PTHREAD_SCOPE_PROCESS 6011: 6011: }; 6011: 6011: 6011: 6011: enum 6011: { 6011: PTHREAD_PROCESS_PRIVATE, 6011: 6011: PTHREAD_PROCESS_SHARED 6011: 6011: }; 6011: # 191 "/usr/include/pthread.h" 3 4 6011: struct _pthread_cleanup_buffer 6011: { 6011: void (*__routine) (void *); 6011: void *__arg; 6011: int __canceltype; 6011: struct _pthread_cleanup_buffer *__prev; 6011: }; 6011: 6011: 6011: enum 6011: { 6011: PTHREAD_CANCEL_ENABLE, 6011: 6011: PTHREAD_CANCEL_DISABLE 6011: 6011: }; 6011: enum 6011: { 6011: PTHREAD_CANCEL_DEFERRED, 6011: 6011: PTHREAD_CANCEL_ASYNCHRONOUS 6011: 6011: }; 6011: # 229 "/usr/include/pthread.h" 3 4 6011: extern "C" { 6011: 6011: 6011: 6011: 6011: extern int pthread_create (pthread_t *__restrict __newthread, 6011: const pthread_attr_t *__restrict __attr, 6011: void *(*__start_routine) (void *), 6011: void *__restrict __arg) throw () __attribute__ ((__nonnull__ (1, 3))); 6011: 6011: 6011: 6011: 6011: 6011: extern void pthread_exit (void *__retval) __attribute__ ((__noreturn__)); 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: extern int pthread_join (pthread_t __th, void **__thread_return); 6011: 6011: 6011: 6011: 6011: extern int pthread_tryjoin_np (pthread_t __th, void **__thread_return) throw (); 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: extern int pthread_timedjoin_np (pthread_t __th, void **__thread_return, 6011: const struct timespec *__abstime); 6011: 6011: 6011: 6011: 6011: 6011: 6011: extern int pthread_detach (pthread_t __th) throw (); 6011: 6011: 6011: 6011: extern pthread_t pthread_self (void) throw () __attribute__ ((__const__)); 6011: 6011: 6011: extern int pthread_equal (pthread_t __thread1, pthread_t __thread2) 6011: throw () __attribute__ ((__const__)); 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: extern int pthread_attr_init (pthread_attr_t *__attr) throw () __attribute__ ((__nonnull__ (1))); 6011: 6011: 6011: extern int pthread_attr_destroy (pthread_attr_t *__attr) 6011: throw () __attribute__ ((__nonnull__ (1))); 6011: 6011: 6011: extern int pthread_attr_getdetachstate (const pthread_attr_t *__attr, 6011: int *__detachstate) 6011: throw () __attribute__ ((__nonnull__ (1, 2))); 6011: 6011: 6011: extern int pthread_attr_setdetachstate (pthread_attr_t *__attr, 6011: int __detachstate) 6011: throw () __attribute__ ((__nonnull__ (1))); 6011: 6011: 6011: 6011: extern int pthread_attr_getguardsize (const pthread_attr_t *__attr, 6011: size_t *__guardsize) 6011: throw () __attribute__ ((__nonnull__ (1, 2))); 6011: 6011: 6011: extern int pthread_attr_setguardsize (pthread_attr_t *__attr, 6011: size_t __guardsize) 6011: throw () __attribute__ ((__nonnull__ (1))); 6011: 6011: 6011: 6011: extern int pthread_attr_getschedparam (const pthread_attr_t *__restrict __attr, 6011: struct sched_param *__restrict __param) 6011: throw () __attribute__ ((__nonnull__ (1, 2))); 6011: 6011: 6011: extern int pthread_attr_setschedparam (pthread_attr_t *__restrict __attr, 6011: const struct sched_param *__restrict 6011: __param) throw () __attribute__ ((__nonnull__ (1, 2))); 6011: 6011: 6011: extern int pthread_attr_getschedpolicy (const pthread_attr_t *__restrict 6011: __attr, int *__restrict __policy) 6011: throw () __attribute__ ((__nonnull__ (1, 2))); 6011: 6011: 6011: extern int pthread_attr_setschedpolicy (pthread_attr_t *__attr, int __policy) 6011: throw () __attribute__ ((__nonnull__ (1))); 6011: 6011: 6011: extern int pthread_attr_getinheritsched (const pthread_attr_t *__restrict 6011: __attr, int *__restrict __inherit) 6011: throw () __attribute__ ((__nonnull__ (1, 2))); 6011: 6011: 6011: extern int pthread_attr_setinheritsched (pthread_attr_t *__attr, 6011: int __inherit) 6011: throw () __attribute__ ((__nonnull__ (1))); 6011: 6011: 6011: 6011: extern int pthread_attr_getscope (const pthread_attr_t *__restrict __attr, 6011: int *__restrict __scope) 6011: throw () __attribute__ ((__nonnull__ (1, 2))); 6011: 6011: 6011: extern int pthread_attr_setscope (pthread_attr_t *__attr, int __scope) 6011: throw () __attribute__ ((__nonnull__ (1))); 6011: 6011: 6011: extern int pthread_attr_getstackaddr (const pthread_attr_t *__restrict 6011: __attr, void **__restrict __stackaddr) 6011: throw () __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__deprecated__)); 6011: 6011: 6011: 6011: 6011: 6011: extern int pthread_attr_setstackaddr (pthread_attr_t *__attr, 6011: void *__stackaddr) 6011: throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__deprecated__)); 6011: 6011: 6011: extern int pthread_attr_getstacksize (const pthread_attr_t *__restrict 6011: __attr, size_t *__restrict __stacksize) 6011: throw () __attribute__ ((__nonnull__ (1, 2))); 6011: 6011: 6011: 6011: 6011: extern int pthread_attr_setstacksize (pthread_attr_t *__attr, 6011: size_t __stacksize) 6011: throw () __attribute__ ((__nonnull__ (1))); 6011: 6011: 6011: 6011: extern int pthread_attr_getstack (const pthread_attr_t *__restrict __attr, 6011: void **__restrict __stackaddr, 6011: size_t *__restrict __stacksize) 6011: throw () __attribute__ ((__nonnull__ (1, 2, 3))); 6011: 6011: 6011: 6011: 6011: extern int pthread_attr_setstack (pthread_attr_t *__attr, void *__stackaddr, 6011: size_t __stacksize) throw () __attribute__ ((__nonnull__ (1))); 6011: 6011: 6011: 6011: 6011: 6011: extern int pthread_attr_setaffinity_np (pthread_attr_t *__attr, 6011: size_t __cpusetsize, 6011: const cpu_set_t *__cpuset) 6011: throw () __attribute__ ((__nonnull__ (1, 3))); 6011: 6011: 6011: 6011: extern int pthread_attr_getaffinity_np (const pthread_attr_t *__attr, 6011: size_t __cpusetsize, 6011: cpu_set_t *__cpuset) 6011: throw () __attribute__ ((__nonnull__ (1, 3))); 6011: 6011: 6011: extern int pthread_getattr_default_np (pthread_attr_t *__attr) 6011: throw () __attribute__ ((__nonnull__ (1))); 6011: 6011: 6011: 6011: extern int pthread_setattr_default_np (const pthread_attr_t *__attr) 6011: throw () __attribute__ ((__nonnull__ (1))); 6011: 6011: 6011: 6011: 6011: extern int pthread_getattr_np (pthread_t __th, pthread_attr_t *__attr) 6011: throw () __attribute__ ((__nonnull__ (2))); 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: extern int pthread_setschedparam (pthread_t __target_thread, int __policy, 6011: const struct sched_param *__param) 6011: throw () __attribute__ ((__nonnull__ (3))); 6011: 6011: 6011: extern int pthread_getschedparam (pthread_t __target_thread, 6011: int *__restrict __policy, 6011: struct sched_param *__restrict __param) 6011: throw () __attribute__ ((__nonnull__ (2, 3))); 6011: 6011: 6011: extern int pthread_setschedprio (pthread_t __target_thread, int __prio) 6011: throw (); 6011: 6011: 6011: 6011: 6011: extern int pthread_getname_np (pthread_t __target_thread, char *__buf, 6011: size_t __buflen) 6011: throw () __attribute__ ((__nonnull__ (2))); 6011: 6011: 6011: extern int pthread_setname_np (pthread_t __target_thread, const char *__name) 6011: throw () __attribute__ ((__nonnull__ (2))); 6011: 6011: 6011: 6011: 6011: 6011: extern int pthread_getconcurrency (void) throw (); 6011: 6011: 6011: extern int pthread_setconcurrency (int __level) throw (); 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: extern int pthread_yield (void) throw (); 6011: 6011: 6011: 6011: 6011: extern int pthread_setaffinity_np (pthread_t __th, size_t __cpusetsize, 6011: const cpu_set_t *__cpuset) 6011: throw () __attribute__ ((__nonnull__ (3))); 6011: 6011: 6011: extern int pthread_getaffinity_np (pthread_t __th, size_t __cpusetsize, 6011: cpu_set_t *__cpuset) 6011: throw () __attribute__ ((__nonnull__ (3))); 6011: # 495 "/usr/include/pthread.h" 3 4 6011: extern int pthread_once (pthread_once_t *__once_control, 6011: void (*__init_routine) (void)) __attribute__ ((__nonnull__ (1, 2))); 6011: # 507 "/usr/include/pthread.h" 3 4 6011: extern int pthread_setcancelstate (int __state, int *__oldstate); 6011: 6011: 6011: 6011: extern int pthread_setcanceltype (int __type, int *__oldtype); 6011: 6011: 6011: extern int pthread_cancel (pthread_t __th); 6011: 6011: 6011: 6011: 6011: extern void pthread_testcancel (void); 6011: 6011: 6011: 6011: 6011: typedef struct 6011: { 6011: struct 6011: { 6011: __jmp_buf __cancel_jmp_buf; 6011: int __mask_was_saved; 6011: } __cancel_jmp_buf[1]; 6011: void *__pad[4]; 6011: } __pthread_unwind_buf_t __attribute__ ((__aligned__)); 6011: # 541 "/usr/include/pthread.h" 3 4 6011: struct __pthread_cleanup_frame 6011: { 6011: void (*__cancel_routine) (void *); 6011: void *__cancel_arg; 6011: int __do_it; 6011: int __cancel_type; 6011: }; 6011: 6011: 6011: 6011: 6011: class __pthread_cleanup_class 6011: { 6011: void (*__cancel_routine) (void *); 6011: void *__cancel_arg; 6011: int __do_it; 6011: int __cancel_type; 6011: 6011: public: 6011: __pthread_cleanup_class (void (*__fct) (void *), void *__arg) 6011: : __cancel_routine (__fct), __cancel_arg (__arg), __do_it (1) { } 6011: ~__pthread_cleanup_class () { if (__do_it) __cancel_routine (__cancel_arg); } 6011: void __setdoit (int __newval) { __do_it = __newval; } 6011: void __defer () { pthread_setcanceltype (PTHREAD_CANCEL_DEFERRED, 6011: &__cancel_type); } 6011: void __restore () const { pthread_setcanceltype (__cancel_type, 0); } 6011: }; 6011: # 743 "/usr/include/pthread.h" 3 4 6011: struct __jmp_buf_tag; 6011: extern int __sigsetjmp (struct __jmp_buf_tag *__env, int __savemask) throw (); 6011: 6011: 6011: 6011: 6011: 6011: extern int pthread_mutex_init (pthread_mutex_t *__mutex, 6011: const pthread_mutexattr_t *__mutexattr) 6011: throw () __attribute__ ((__nonnull__ (1))); 6011: 6011: 6011: extern int pthread_mutex_destroy (pthread_mutex_t *__mutex) 6011: throw () __attribute__ ((__nonnull__ (1))); 6011: 6011: 6011: extern int pthread_mutex_trylock (pthread_mutex_t *__mutex) 6011: throw () __attribute__ ((__nonnull__ (1))); 6011: 6011: 6011: extern int pthread_mutex_lock (pthread_mutex_t *__mutex) 6011: throw () __attribute__ ((__nonnull__ (1))); 6011: 6011: 6011: 6011: extern int pthread_mutex_timedlock (pthread_mutex_t *__restrict __mutex, 6011: const struct timespec *__restrict 6011: __abstime) throw () __attribute__ ((__nonnull__ (1, 2))); 6011: 6011: 6011: 6011: extern int pthread_mutex_unlock (pthread_mutex_t *__mutex) 6011: throw () __attribute__ ((__nonnull__ (1))); 6011: 6011: 6011: 6011: extern int pthread_mutex_getprioceiling (const pthread_mutex_t * 6011: __restrict __mutex, 6011: int *__restrict __prioceiling) 6011: throw () __attribute__ ((__nonnull__ (1, 2))); 6011: 6011: 6011: 6011: extern int pthread_mutex_setprioceiling (pthread_mutex_t *__restrict __mutex, 6011: int __prioceiling, 6011: int *__restrict __old_ceiling) 6011: throw () __attribute__ ((__nonnull__ (1, 3))); 6011: 6011: 6011: 6011: 6011: extern int pthread_mutex_consistent (pthread_mutex_t *__mutex) 6011: throw () __attribute__ ((__nonnull__ (1))); 6011: 6011: extern int pthread_mutex_consistent_np (pthread_mutex_t *__mutex) 6011: throw () __attribute__ ((__nonnull__ (1))); 6011: # 807 "/usr/include/pthread.h" 3 4 6011: extern int pthread_mutexattr_init (pthread_mutexattr_t *__attr) 6011: throw () __attribute__ ((__nonnull__ (1))); 6011: 6011: 6011: extern int pthread_mutexattr_destroy (pthread_mutexattr_t *__attr) 6011: throw () __attribute__ ((__nonnull__ (1))); 6011: 6011: 6011: extern int pthread_mutexattr_getpshared (const pthread_mutexattr_t * 6011: __restrict __attr, 6011: int *__restrict __pshared) 6011: throw () __attribute__ ((__nonnull__ (1, 2))); 6011: 6011: 6011: extern int pthread_mutexattr_setpshared (pthread_mutexattr_t *__attr, 6011: int __pshared) 6011: throw () __attribute__ ((__nonnull__ (1))); 6011: 6011: 6011: 6011: extern int pthread_mutexattr_gettype (const pthread_mutexattr_t *__restrict 6011: __attr, int *__restrict __kind) 6011: throw () __attribute__ ((__nonnull__ (1, 2))); 6011: 6011: 6011: 6011: 6011: extern int pthread_mutexattr_settype (pthread_mutexattr_t *__attr, int __kind) 6011: throw () __attribute__ ((__nonnull__ (1))); 6011: 6011: 6011: 6011: extern int pthread_mutexattr_getprotocol (const pthread_mutexattr_t * 6011: __restrict __attr, 6011: int *__restrict __protocol) 6011: throw () __attribute__ ((__nonnull__ (1, 2))); 6011: 6011: 6011: 6011: extern int pthread_mutexattr_setprotocol (pthread_mutexattr_t *__attr, 6011: int __protocol) 6011: throw () __attribute__ ((__nonnull__ (1))); 6011: 6011: 6011: extern int pthread_mutexattr_getprioceiling (const pthread_mutexattr_t * 6011: __restrict __attr, 6011: int *__restrict __prioceiling) 6011: throw () __attribute__ ((__nonnull__ (1, 2))); 6011: 6011: 6011: extern int pthread_mutexattr_setprioceiling (pthread_mutexattr_t *__attr, 6011: int __prioceiling) 6011: throw () __attribute__ ((__nonnull__ (1))); 6011: 6011: 6011: 6011: extern int pthread_mutexattr_getrobust (const pthread_mutexattr_t *__attr, 6011: int *__robustness) 6011: throw () __attribute__ ((__nonnull__ (1, 2))); 6011: 6011: extern int pthread_mutexattr_getrobust_np (const pthread_mutexattr_t *__attr, 6011: int *__robustness) 6011: throw () __attribute__ ((__nonnull__ (1, 2))); 6011: 6011: 6011: 6011: extern int pthread_mutexattr_setrobust (pthread_mutexattr_t *__attr, 6011: int __robustness) 6011: throw () __attribute__ ((__nonnull__ (1))); 6011: 6011: extern int pthread_mutexattr_setrobust_np (pthread_mutexattr_t *__attr, 6011: int __robustness) 6011: throw () __attribute__ ((__nonnull__ (1))); 6011: # 889 "/usr/include/pthread.h" 3 4 6011: extern int pthread_rwlock_init (pthread_rwlock_t *__restrict __rwlock, 6011: const pthread_rwlockattr_t *__restrict 6011: __attr) throw () __attribute__ ((__nonnull__ (1))); 6011: 6011: 6011: extern int pthread_rwlock_destroy (pthread_rwlock_t *__rwlock) 6011: throw () __attribute__ ((__nonnull__ (1))); 6011: 6011: 6011: extern int pthread_rwlock_rdlock (pthread_rwlock_t *__rwlock) 6011: throw () __attribute__ ((__nonnull__ (1))); 6011: 6011: 6011: extern int pthread_rwlock_tryrdlock (pthread_rwlock_t *__rwlock) 6011: throw () __attribute__ ((__nonnull__ (1))); 6011: 6011: 6011: 6011: extern int pthread_rwlock_timedrdlock (pthread_rwlock_t *__restrict __rwlock, 6011: const struct timespec *__restrict 6011: __abstime) throw () __attribute__ ((__nonnull__ (1, 2))); 6011: 6011: 6011: 6011: extern int pthread_rwlock_wrlock (pthread_rwlock_t *__rwlock) 6011: throw () __attribute__ ((__nonnull__ (1))); 6011: 6011: 6011: extern int pthread_rwlock_trywrlock (pthread_rwlock_t *__rwlock) 6011: throw () __attribute__ ((__nonnull__ (1))); 6011: 6011: 6011: 6011: extern int pthread_rwlock_timedwrlock (pthread_rwlock_t *__restrict __rwlock, 6011: const struct timespec *__restrict 6011: __abstime) throw () __attribute__ ((__nonnull__ (1, 2))); 6011: 6011: 6011: 6011: extern int pthread_rwlock_unlock (pthread_rwlock_t *__rwlock) 6011: throw () __attribute__ ((__nonnull__ (1))); 6011: 6011: 6011: 6011: 6011: 6011: extern int pthread_rwlockattr_init (pthread_rwlockattr_t *__attr) 6011: throw () __attribute__ ((__nonnull__ (1))); 6011: 6011: 6011: extern int pthread_rwlockattr_destroy (pthread_rwlockattr_t *__attr) 6011: throw () __attribute__ ((__nonnull__ (1))); 6011: 6011: 6011: extern int pthread_rwlockattr_getpshared (const pthread_rwlockattr_t * 6011: __restrict __attr, 6011: int *__restrict __pshared) 6011: throw () __attribute__ ((__nonnull__ (1, 2))); 6011: 6011: 6011: extern int pthread_rwlockattr_setpshared (pthread_rwlockattr_t *__attr, 6011: int __pshared) 6011: throw () __attribute__ ((__nonnull__ (1))); 6011: 6011: 6011: extern int pthread_rwlockattr_getkind_np (const pthread_rwlockattr_t * 6011: __restrict __attr, 6011: int *__restrict __pref) 6011: throw () __attribute__ ((__nonnull__ (1, 2))); 6011: 6011: 6011: extern int pthread_rwlockattr_setkind_np (pthread_rwlockattr_t *__attr, 6011: int __pref) throw () __attribute__ ((__nonnull__ (1))); 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: extern int pthread_cond_init (pthread_cond_t *__restrict __cond, 6011: const pthread_condattr_t *__restrict __cond_attr) 6011: throw () __attribute__ ((__nonnull__ (1))); 6011: 6011: 6011: extern int pthread_cond_destroy (pthread_cond_t *__cond) 6011: throw () __attribute__ ((__nonnull__ (1))); 6011: 6011: 6011: extern int pthread_cond_signal (pthread_cond_t *__cond) 6011: throw () __attribute__ ((__nonnull__ (1))); 6011: 6011: 6011: extern int pthread_cond_broadcast (pthread_cond_t *__cond) 6011: throw () __attribute__ ((__nonnull__ (1))); 6011: 6011: 6011: 6011: 6011: 6011: 6011: extern int pthread_cond_wait (pthread_cond_t *__restrict __cond, 6011: pthread_mutex_t *__restrict __mutex) 6011: __attribute__ ((__nonnull__ (1, 2))); 6011: # 1001 "/usr/include/pthread.h" 3 4 6011: extern int pthread_cond_timedwait (pthread_cond_t *__restrict __cond, 6011: pthread_mutex_t *__restrict __mutex, 6011: const struct timespec *__restrict __abstime) 6011: __attribute__ ((__nonnull__ (1, 2, 3))); 6011: 6011: 6011: 6011: 6011: extern int pthread_condattr_init (pthread_condattr_t *__attr) 6011: throw () __attribute__ ((__nonnull__ (1))); 6011: 6011: 6011: extern int pthread_condattr_destroy (pthread_condattr_t *__attr) 6011: throw () __attribute__ ((__nonnull__ (1))); 6011: 6011: 6011: extern int pthread_condattr_getpshared (const pthread_condattr_t * 6011: __restrict __attr, 6011: int *__restrict __pshared) 6011: throw () __attribute__ ((__nonnull__ (1, 2))); 6011: 6011: 6011: extern int pthread_condattr_setpshared (pthread_condattr_t *__attr, 6011: int __pshared) throw () __attribute__ ((__nonnull__ (1))); 6011: 6011: 6011: 6011: extern int pthread_condattr_getclock (const pthread_condattr_t * 6011: __restrict __attr, 6011: __clockid_t *__restrict __clock_id) 6011: throw () __attribute__ ((__nonnull__ (1, 2))); 6011: 6011: 6011: extern int pthread_condattr_setclock (pthread_condattr_t *__attr, 6011: __clockid_t __clock_id) 6011: throw () __attribute__ ((__nonnull__ (1))); 6011: # 1045 "/usr/include/pthread.h" 3 4 6011: extern int pthread_spin_init (pthread_spinlock_t *__lock, int __pshared) 6011: throw () __attribute__ ((__nonnull__ (1))); 6011: 6011: 6011: extern int pthread_spin_destroy (pthread_spinlock_t *__lock) 6011: throw () __attribute__ ((__nonnull__ (1))); 6011: 6011: 6011: extern int pthread_spin_lock (pthread_spinlock_t *__lock) 6011: throw () __attribute__ ((__nonnull__ (1))); 6011: 6011: 6011: extern int pthread_spin_trylock (pthread_spinlock_t *__lock) 6011: throw () __attribute__ ((__nonnull__ (1))); 6011: 6011: 6011: extern int pthread_spin_unlock (pthread_spinlock_t *__lock) 6011: throw () __attribute__ ((__nonnull__ (1))); 6011: 6011: 6011: 6011: 6011: 6011: 6011: extern int pthread_barrier_init (pthread_barrier_t *__restrict __barrier, 6011: const pthread_barrierattr_t *__restrict 6011: __attr, unsigned int __count) 6011: throw () __attribute__ ((__nonnull__ (1))); 6011: 6011: 6011: extern int pthread_barrier_destroy (pthread_barrier_t *__barrier) 6011: throw () __attribute__ ((__nonnull__ (1))); 6011: 6011: 6011: extern int pthread_barrier_wait (pthread_barrier_t *__barrier) 6011: throw () __attribute__ ((__nonnull__ (1))); 6011: 6011: 6011: 6011: extern int pthread_barrierattr_init (pthread_barrierattr_t *__attr) 6011: throw () __attribute__ ((__nonnull__ (1))); 6011: 6011: 6011: extern int pthread_barrierattr_destroy (pthread_barrierattr_t *__attr) 6011: throw () __attribute__ ((__nonnull__ (1))); 6011: 6011: 6011: extern int pthread_barrierattr_getpshared (const pthread_barrierattr_t * 6011: __restrict __attr, 6011: int *__restrict __pshared) 6011: throw () __attribute__ ((__nonnull__ (1, 2))); 6011: 6011: 6011: extern int pthread_barrierattr_setpshared (pthread_barrierattr_t *__attr, 6011: int __pshared) 6011: throw () __attribute__ ((__nonnull__ (1))); 6011: # 1112 "/usr/include/pthread.h" 3 4 6011: extern int pthread_key_create (pthread_key_t *__key, 6011: void (*__destr_function) (void *)) 6011: throw () __attribute__ ((__nonnull__ (1))); 6011: 6011: 6011: extern int pthread_key_delete (pthread_key_t __key) throw (); 6011: 6011: 6011: extern void *pthread_getspecific (pthread_key_t __key) throw (); 6011: 6011: 6011: extern int pthread_setspecific (pthread_key_t __key, 6011: const void *__pointer) throw () ; 6011: 6011: 6011: 6011: 6011: extern int pthread_getcpuclockid (pthread_t __thread_id, 6011: __clockid_t *__clock_id) 6011: throw () __attribute__ ((__nonnull__ (2))); 6011: # 1146 "/usr/include/pthread.h" 3 4 6011: extern int pthread_atfork (void (*__prepare) (void), 6011: void (*__parent) (void), 6011: void (*__child) (void)) throw (); 6011: 6011: 6011: 6011: 6011: extern __inline __attribute__ ((__gnu_inline__)) int 6011: __attribute__ ((__leaf__)) pthread_equal (pthread_t __thread1, pthread_t __thread2) throw () 6011: { 6011: return __thread1 == __thread2; 6011: } 6011: 6011: 6011: } 6011: # 36 "/usr/include/arm-linux-gnueabihf/c++/8/bits/gthr-default.h" 2 3 6011: # 47 "/usr/include/arm-linux-gnueabihf/c++/8/bits/gthr-default.h" 3 6011: typedef pthread_t __gthread_t; 6011: typedef pthread_key_t __gthread_key_t; 6011: typedef pthread_once_t __gthread_once_t; 6011: typedef pthread_mutex_t __gthread_mutex_t; 6011: typedef pthread_mutex_t __gthread_recursive_mutex_t; 6011: typedef pthread_cond_t __gthread_cond_t; 6011: typedef struct timespec __gthread_time_t; 6011: # 101 "/usr/include/arm-linux-gnueabihf/c++/8/bits/gthr-default.h" 3 6011: static __typeof(pthread_once) __gthrw_pthread_once __attribute__ ((__weakref__("pthread_once"))); 6011: static __typeof(pthread_getspecific) __gthrw_pthread_getspecific __attribute__ ((__weakref__("pthread_getspecific"))); 6011: static __typeof(pthread_setspecific) __gthrw_pthread_setspecific __attribute__ ((__weakref__("pthread_setspecific"))); 6011: 6011: static __typeof(pthread_create) __gthrw_pthread_create __attribute__ ((__weakref__("pthread_create"))); 6011: static __typeof(pthread_join) __gthrw_pthread_join __attribute__ ((__weakref__("pthread_join"))); 6011: static __typeof(pthread_equal) __gthrw_pthread_equal __attribute__ ((__weakref__("pthread_equal"))); 6011: static __typeof(pthread_self) __gthrw_pthread_self __attribute__ ((__weakref__("pthread_self"))); 6011: static __typeof(pthread_detach) __gthrw_pthread_detach __attribute__ ((__weakref__("pthread_detach"))); 6011: 6011: static __typeof(pthread_cancel) __gthrw_pthread_cancel __attribute__ ((__weakref__("pthread_cancel"))); 6011: 6011: static __typeof(sched_yield) __gthrw_sched_yield __attribute__ ((__weakref__("sched_yield"))); 6011: 6011: static __typeof(pthread_mutex_lock) __gthrw_pthread_mutex_lock __attribute__ ((__weakref__("pthread_mutex_lock"))); 6011: static __typeof(pthread_mutex_trylock) __gthrw_pthread_mutex_trylock __attribute__ ((__weakref__("pthread_mutex_trylock"))); 6011: 6011: static __typeof(pthread_mutex_timedlock) __gthrw_pthread_mutex_timedlock __attribute__ ((__weakref__("pthread_mutex_timedlock"))); 6011: 6011: static __typeof(pthread_mutex_unlock) __gthrw_pthread_mutex_unlock __attribute__ ((__weakref__("pthread_mutex_unlock"))); 6011: static __typeof(pthread_mutex_init) __gthrw_pthread_mutex_init __attribute__ ((__weakref__("pthread_mutex_init"))); 6011: static __typeof(pthread_mutex_destroy) __gthrw_pthread_mutex_destroy __attribute__ ((__weakref__("pthread_mutex_destroy"))); 6011: 6011: static __typeof(pthread_cond_init) __gthrw_pthread_cond_init __attribute__ ((__weakref__("pthread_cond_init"))); 6011: static __typeof(pthread_cond_broadcast) __gthrw_pthread_cond_broadcast __attribute__ ((__weakref__("pthread_cond_broadcast"))); 6011: static __typeof(pthread_cond_signal) __gthrw_pthread_cond_signal __attribute__ ((__weakref__("pthread_cond_signal"))); 6011: static __typeof(pthread_cond_wait) __gthrw_pthread_cond_wait __attribute__ ((__weakref__("pthread_cond_wait"))); 6011: static __typeof(pthread_cond_timedwait) __gthrw_pthread_cond_timedwait __attribute__ ((__weakref__("pthread_cond_timedwait"))); 6011: static __typeof(pthread_cond_destroy) __gthrw_pthread_cond_destroy __attribute__ ((__weakref__("pthread_cond_destroy"))); 6011: 6011: static __typeof(pthread_key_create) __gthrw_pthread_key_create __attribute__ ((__weakref__("pthread_key_create"))); 6011: static __typeof(pthread_key_delete) __gthrw_pthread_key_delete __attribute__ ((__weakref__("pthread_key_delete"))); 6011: static __typeof(pthread_mutexattr_init) __gthrw_pthread_mutexattr_init __attribute__ ((__weakref__("pthread_mutexattr_init"))); 6011: static __typeof(pthread_mutexattr_settype) __gthrw_pthread_mutexattr_settype __attribute__ ((__weakref__("pthread_mutexattr_settype"))); 6011: static __typeof(pthread_mutexattr_destroy) __gthrw_pthread_mutexattr_destroy __attribute__ ((__weakref__("pthread_mutexattr_destroy"))); 6011: # 236 "/usr/include/arm-linux-gnueabihf/c++/8/bits/gthr-default.h" 3 6011: static __typeof(pthread_key_create) __gthrw___pthread_key_create __attribute__ ((__weakref__("__pthread_key_create"))); 6011: # 246 "/usr/include/arm-linux-gnueabihf/c++/8/bits/gthr-default.h" 3 6011: static inline int 6011: __gthread_active_p (void) 6011: { 6011: static void *const __gthread_active_ptr 6011: = __extension__ (void *) &__gthrw___pthread_key_create; 6011: return __gthread_active_ptr != 0; 6011: } 6011: # 658 "/usr/include/arm-linux-gnueabihf/c++/8/bits/gthr-default.h" 3 6011: static inline int 6011: __gthread_create (__gthread_t *__threadid, void *(*__func) (void*), 6011: void *__args) 6011: { 6011: return __gthrw_pthread_create (__threadid, __null, __func, __args); 6011: } 6011: 6011: static inline int 6011: __gthread_join (__gthread_t __threadid, void **__value_ptr) 6011: { 6011: return __gthrw_pthread_join (__threadid, __value_ptr); 6011: } 6011: 6011: static inline int 6011: __gthread_detach (__gthread_t __threadid) 6011: { 6011: return __gthrw_pthread_detach (__threadid); 6011: } 6011: 6011: static inline int 6011: __gthread_equal (__gthread_t __t1, __gthread_t __t2) 6011: { 6011: return __gthrw_pthread_equal (__t1, __t2); 6011: } 6011: 6011: static inline __gthread_t 6011: __gthread_self (void) 6011: { 6011: return __gthrw_pthread_self (); 6011: } 6011: 6011: static inline int 6011: __gthread_yield (void) 6011: { 6011: return __gthrw_sched_yield (); 6011: } 6011: 6011: static inline int 6011: __gthread_once (__gthread_once_t *__once, void (*__func) (void)) 6011: { 6011: if (__gthread_active_p ()) 6011: return __gthrw_pthread_once (__once, __func); 6011: else 6011: return -1; 6011: } 6011: 6011: static inline int 6011: __gthread_key_create (__gthread_key_t *__key, void (*__dtor) (void *)) 6011: { 6011: return __gthrw_pthread_key_create (__key, __dtor); 6011: } 6011: 6011: static inline int 6011: __gthread_key_delete (__gthread_key_t __key) 6011: { 6011: return __gthrw_pthread_key_delete (__key); 6011: } 6011: 6011: static inline void * 6011: __gthread_getspecific (__gthread_key_t __key) 6011: { 6011: return __gthrw_pthread_getspecific (__key); 6011: } 6011: 6011: static inline int 6011: __gthread_setspecific (__gthread_key_t __key, const void *__ptr) 6011: { 6011: return __gthrw_pthread_setspecific (__key, __ptr); 6011: } 6011: 6011: static inline void 6011: __gthread_mutex_init_function (__gthread_mutex_t *__mutex) 6011: { 6011: if (__gthread_active_p ()) 6011: __gthrw_pthread_mutex_init (__mutex, __null); 6011: } 6011: 6011: static inline int 6011: __gthread_mutex_destroy (__gthread_mutex_t *__mutex) 6011: { 6011: if (__gthread_active_p ()) 6011: return __gthrw_pthread_mutex_destroy (__mutex); 6011: else 6011: return 0; 6011: } 6011: 6011: static inline int 6011: __gthread_mutex_lock (__gthread_mutex_t *__mutex) 6011: { 6011: if (__gthread_active_p ()) 6011: return __gthrw_pthread_mutex_lock (__mutex); 6011: else 6011: return 0; 6011: } 6011: 6011: static inline int 6011: __gthread_mutex_trylock (__gthread_mutex_t *__mutex) 6011: { 6011: if (__gthread_active_p ()) 6011: return __gthrw_pthread_mutex_trylock (__mutex); 6011: else 6011: return 0; 6011: } 6011: 6011: 6011: static inline int 6011: __gthread_mutex_timedlock (__gthread_mutex_t *__mutex, 6011: const __gthread_time_t *__abs_timeout) 6011: { 6011: if (__gthread_active_p ()) 6011: return __gthrw_pthread_mutex_timedlock (__mutex, __abs_timeout); 6011: else 6011: return 0; 6011: } 6011: 6011: 6011: static inline int 6011: __gthread_mutex_unlock (__gthread_mutex_t *__mutex) 6011: { 6011: if (__gthread_active_p ()) 6011: return __gthrw_pthread_mutex_unlock (__mutex); 6011: else 6011: return 0; 6011: } 6011: # 807 "/usr/include/arm-linux-gnueabihf/c++/8/bits/gthr-default.h" 3 6011: static inline int 6011: __gthread_recursive_mutex_lock (__gthread_recursive_mutex_t *__mutex) 6011: { 6011: return __gthread_mutex_lock (__mutex); 6011: } 6011: 6011: static inline int 6011: __gthread_recursive_mutex_trylock (__gthread_recursive_mutex_t *__mutex) 6011: { 6011: return __gthread_mutex_trylock (__mutex); 6011: } 6011: 6011: 6011: static inline int 6011: __gthread_recursive_mutex_timedlock (__gthread_recursive_mutex_t *__mutex, 6011: const __gthread_time_t *__abs_timeout) 6011: { 6011: return __gthread_mutex_timedlock (__mutex, __abs_timeout); 6011: } 6011: 6011: 6011: static inline int 6011: __gthread_recursive_mutex_unlock (__gthread_recursive_mutex_t *__mutex) 6011: { 6011: return __gthread_mutex_unlock (__mutex); 6011: } 6011: 6011: static inline int 6011: __gthread_recursive_mutex_destroy (__gthread_recursive_mutex_t *__mutex) 6011: { 6011: return __gthread_mutex_destroy (__mutex); 6011: } 6011: # 849 "/usr/include/arm-linux-gnueabihf/c++/8/bits/gthr-default.h" 3 6011: static inline int 6011: __gthread_cond_broadcast (__gthread_cond_t *__cond) 6011: { 6011: return __gthrw_pthread_cond_broadcast (__cond); 6011: } 6011: 6011: static inline int 6011: __gthread_cond_signal (__gthread_cond_t *__cond) 6011: { 6011: return __gthrw_pthread_cond_signal (__cond); 6011: } 6011: 6011: static inline int 6011: __gthread_cond_wait (__gthread_cond_t *__cond, __gthread_mutex_t *__mutex) 6011: { 6011: return __gthrw_pthread_cond_wait (__cond, __mutex); 6011: } 6011: 6011: static inline int 6011: __gthread_cond_timedwait (__gthread_cond_t *__cond, __gthread_mutex_t *__mutex, 6011: const __gthread_time_t *__abs_timeout) 6011: { 6011: return __gthrw_pthread_cond_timedwait (__cond, __mutex, __abs_timeout); 6011: } 6011: 6011: static inline int 6011: __gthread_cond_wait_recursive (__gthread_cond_t *__cond, 6011: __gthread_recursive_mutex_t *__mutex) 6011: { 6011: return __gthread_cond_wait (__cond, __mutex); 6011: } 6011: 6011: static inline int 6011: __gthread_cond_destroy (__gthread_cond_t* __cond) 6011: { 6011: return __gthrw_pthread_cond_destroy (__cond); 6011: } 6011: # 149 "/usr/include/arm-linux-gnueabihf/c++/8/bits/gthr.h" 2 3 6011: 6011: 6011: #pragma GCC visibility pop 6011: # 36 "/usr/include/c++/8/ext/atomicity.h" 2 3 6011: # 1 "/usr/include/arm-linux-gnueabihf/c++/8/bits/atomic_word.h" 1 3 6011: # 32 "/usr/include/arm-linux-gnueabihf/c++/8/bits/atomic_word.h" 3 6011: typedef int _Atomic_word; 6011: # 37 "/usr/include/c++/8/ext/atomicity.h" 2 3 6011: 6011: namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) 6011: { 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: static inline _Atomic_word 6011: __exchange_and_add(volatile _Atomic_word* __mem, int __val) 6011: { return __atomic_fetch_add(__mem, __val, 4); } 6011: 6011: static inline void 6011: __atomic_add(volatile _Atomic_word* __mem, int __val) 6011: { __atomic_fetch_add(__mem, __val, 4); } 6011: # 64 "/usr/include/c++/8/ext/atomicity.h" 3 6011: static inline _Atomic_word 6011: __exchange_and_add_single(_Atomic_word* __mem, int __val) 6011: { 6011: _Atomic_word __result = *__mem; 6011: *__mem += __val; 6011: return __result; 6011: } 6011: 6011: static inline void 6011: __atomic_add_single(_Atomic_word* __mem, int __val) 6011: { *__mem += __val; } 6011: 6011: static inline _Atomic_word 6011: __attribute__ ((__unused__)) 6011: __exchange_and_add_dispatch(_Atomic_word* __mem, int __val) 6011: { 6011: 6011: if (__gthread_active_p()) 6011: return __exchange_and_add(__mem, __val); 6011: else 6011: return __exchange_and_add_single(__mem, __val); 6011: 6011: 6011: 6011: } 6011: 6011: static inline void 6011: __attribute__ ((__unused__)) 6011: __atomic_add_dispatch(_Atomic_word* __mem, int __val) 6011: { 6011: 6011: if (__gthread_active_p()) 6011: __atomic_add(__mem, __val); 6011: else 6011: __atomic_add_single(__mem, __val); 6011: 6011: 6011: 6011: } 6011: 6011: 6011: } 6011: # 40 "/usr/include/c++/8/bits/ios_base.h" 2 3 6011: 6011: # 1 "/usr/include/c++/8/bits/locale_classes.h" 1 3 6011: # 37 "/usr/include/c++/8/bits/locale_classes.h" 3 6011: 6011: # 38 "/usr/include/c++/8/bits/locale_classes.h" 3 6011: 6011: 6011: # 1 "/usr/include/c++/8/string" 1 3 6011: # 36 "/usr/include/c++/8/string" 3 6011: 6011: # 37 "/usr/include/c++/8/string" 3 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: # 1 "/usr/include/c++/8/bits/ostream_insert.h" 1 3 6011: # 33 "/usr/include/c++/8/bits/ostream_insert.h" 3 6011: 6011: # 34 "/usr/include/c++/8/bits/ostream_insert.h" 3 6011: 6011: 6011: # 1 "/usr/include/c++/8/bits/cxxabi_forced.h" 1 3 6011: # 34 "/usr/include/c++/8/bits/cxxabi_forced.h" 3 6011: 6011: # 35 "/usr/include/c++/8/bits/cxxabi_forced.h" 3 6011: 6011: #pragma GCC visibility push(default) 6011: 6011: 6011: namespace __cxxabiv1 6011: { 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: class __forced_unwind 6011: { 6011: virtual ~__forced_unwind() throw(); 6011: 6011: 6011: virtual void __pure_dummy() = 0; 6011: }; 6011: } 6011: 6011: 6011: #pragma GCC visibility pop 6011: # 37 "/usr/include/c++/8/bits/ostream_insert.h" 2 3 6011: 6011: namespace std __attribute__ ((__visibility__ ("default"))) 6011: { 6011: 6011: 6011: template 6011: inline void 6011: __ostream_write(basic_ostream<_CharT, _Traits>& __out, 6011: const _CharT* __s, streamsize __n) 6011: { 6011: typedef basic_ostream<_CharT, _Traits> __ostream_type; 6011: typedef typename __ostream_type::ios_base __ios_base; 6011: 6011: const streamsize __put = __out.rdbuf()->sputn(__s, __n); 6011: if (__put != __n) 6011: __out.setstate(__ios_base::badbit); 6011: } 6011: 6011: template 6011: inline void 6011: __ostream_fill(basic_ostream<_CharT, _Traits>& __out, streamsize __n) 6011: { 6011: typedef basic_ostream<_CharT, _Traits> __ostream_type; 6011: typedef typename __ostream_type::ios_base __ios_base; 6011: 6011: const _CharT __c = __out.fill(); 6011: for (; __n > 0; --__n) 6011: { 6011: const typename _Traits::int_type __put = __out.rdbuf()->sputc(__c); 6011: if (_Traits::eq_int_type(__put, _Traits::eof())) 6011: { 6011: __out.setstate(__ios_base::badbit); 6011: break; 6011: } 6011: } 6011: } 6011: 6011: template 6011: basic_ostream<_CharT, _Traits>& 6011: __ostream_insert(basic_ostream<_CharT, _Traits>& __out, 6011: const _CharT* __s, streamsize __n) 6011: { 6011: typedef basic_ostream<_CharT, _Traits> __ostream_type; 6011: typedef typename __ostream_type::ios_base __ios_base; 6011: 6011: typename __ostream_type::sentry __cerb(__out); 6011: if (__cerb) 6011: { 6011: try 6011: { 6011: const streamsize __w = __out.width(); 6011: if (__w > __n) 6011: { 6011: const bool __left = ((__out.flags() 6011: & __ios_base::adjustfield) 6011: == __ios_base::left); 6011: if (!__left) 6011: __ostream_fill(__out, __w - __n); 6011: if (__out.good()) 6011: __ostream_write(__out, __s, __n); 6011: if (__left && __out.good()) 6011: __ostream_fill(__out, __w - __n); 6011: } 6011: else 6011: __ostream_write(__out, __s, __n); 6011: __out.width(0); 6011: } 6011: catch(__cxxabiv1::__forced_unwind&) 6011: { 6011: __out._M_setstate(__ios_base::badbit); 6011: throw; 6011: } 6011: catch(...) 6011: { __out._M_setstate(__ios_base::badbit); } 6011: } 6011: return __out; 6011: } 6011: 6011: 6011: 6011: 6011: extern template ostream& __ostream_insert(ostream&, const char*, streamsize); 6011: 6011: 6011: extern template wostream& __ostream_insert(wostream&, const wchar_t*, 6011: streamsize); 6011: 6011: 6011: 6011: 6011: } 6011: # 45 "/usr/include/c++/8/string" 2 3 6011: 6011: 6011: 6011: # 1 "/usr/include/c++/8/bits/stl_function.h" 1 3 6011: # 63 "/usr/include/c++/8/bits/stl_function.h" 3 6011: namespace std __attribute__ ((__visibility__ ("default"))) 6011: { 6011: 6011: # 104 "/usr/include/c++/8/bits/stl_function.h" 3 6011: template 6011: struct unary_function 6011: { 6011: 6011: typedef _Arg argument_type; 6011: 6011: 6011: typedef _Result result_type; 6011: }; 6011: 6011: 6011: 6011: 6011: template 6011: struct binary_function 6011: { 6011: 6011: typedef _Arg1 first_argument_type; 6011: 6011: 6011: typedef _Arg2 second_argument_type; 6011: 6011: 6011: typedef _Result result_type; 6011: }; 6011: # 166 "/usr/include/c++/8/bits/stl_function.h" 3 6011: template 6011: struct plus : public binary_function<_Tp, _Tp, _Tp> 6011: { 6011: 6011: _Tp 6011: operator()(const _Tp& __x, const _Tp& __y) const 6011: { return __x + __y; } 6011: }; 6011: 6011: 6011: template 6011: struct minus : public binary_function<_Tp, _Tp, _Tp> 6011: { 6011: 6011: _Tp 6011: operator()(const _Tp& __x, const _Tp& __y) const 6011: { return __x - __y; } 6011: }; 6011: 6011: 6011: template 6011: struct multiplies : public binary_function<_Tp, _Tp, _Tp> 6011: { 6011: 6011: _Tp 6011: operator()(const _Tp& __x, const _Tp& __y) const 6011: { return __x * __y; } 6011: }; 6011: 6011: 6011: template 6011: struct divides : public binary_function<_Tp, _Tp, _Tp> 6011: { 6011: 6011: _Tp 6011: operator()(const _Tp& __x, const _Tp& __y) const 6011: { return __x / __y; } 6011: }; 6011: 6011: 6011: template 6011: struct modulus : public binary_function<_Tp, _Tp, _Tp> 6011: { 6011: 6011: _Tp 6011: operator()(const _Tp& __x, const _Tp& __y) const 6011: { return __x % __y; } 6011: }; 6011: 6011: 6011: template 6011: struct negate : public unary_function<_Tp, _Tp> 6011: { 6011: 6011: _Tp 6011: operator()(const _Tp& __x) const 6011: { return -__x; } 6011: }; 6011: # 350 "/usr/include/c++/8/bits/stl_function.h" 3 6011: template 6011: struct equal_to : public binary_function<_Tp, _Tp, bool> 6011: { 6011: 6011: bool 6011: operator()(const _Tp& __x, const _Tp& __y) const 6011: { return __x == __y; } 6011: }; 6011: 6011: 6011: template 6011: struct not_equal_to : public binary_function<_Tp, _Tp, bool> 6011: { 6011: 6011: bool 6011: operator()(const _Tp& __x, const _Tp& __y) const 6011: { return __x != __y; } 6011: }; 6011: 6011: 6011: template 6011: struct greater : public binary_function<_Tp, _Tp, bool> 6011: { 6011: 6011: bool 6011: operator()(const _Tp& __x, const _Tp& __y) const 6011: { return __x > __y; } 6011: }; 6011: 6011: 6011: template 6011: struct less : public binary_function<_Tp, _Tp, bool> 6011: { 6011: 6011: bool 6011: operator()(const _Tp& __x, const _Tp& __y) const 6011: { return __x < __y; } 6011: }; 6011: 6011: 6011: template 6011: struct greater_equal : public binary_function<_Tp, _Tp, bool> 6011: { 6011: 6011: bool 6011: operator()(const _Tp& __x, const _Tp& __y) const 6011: { return __x >= __y; } 6011: }; 6011: 6011: 6011: template 6011: struct less_equal : public binary_function<_Tp, _Tp, bool> 6011: { 6011: 6011: bool 6011: operator()(const _Tp& __x, const _Tp& __y) const 6011: { return __x <= __y; } 6011: }; 6011: # 523 "/usr/include/c++/8/bits/stl_function.h" 3 6011: template 6011: struct logical_and : public binary_function<_Tp, _Tp, bool> 6011: { 6011: 6011: bool 6011: operator()(const _Tp& __x, const _Tp& __y) const 6011: { return __x && __y; } 6011: }; 6011: 6011: 6011: template 6011: struct logical_or : public binary_function<_Tp, _Tp, bool> 6011: { 6011: 6011: bool 6011: operator()(const _Tp& __x, const _Tp& __y) const 6011: { return __x || __y; } 6011: }; 6011: 6011: 6011: template 6011: struct logical_not : public unary_function<_Tp, bool> 6011: { 6011: 6011: bool 6011: operator()(const _Tp& __x) const 6011: { return !__x; } 6011: }; 6011: # 616 "/usr/include/c++/8/bits/stl_function.h" 3 6011: template 6011: struct bit_and : public binary_function<_Tp, _Tp, _Tp> 6011: { 6011: 6011: _Tp 6011: operator()(const _Tp& __x, const _Tp& __y) const 6011: { return __x & __y; } 6011: }; 6011: 6011: template 6011: struct bit_or : public binary_function<_Tp, _Tp, _Tp> 6011: { 6011: 6011: _Tp 6011: operator()(const _Tp& __x, const _Tp& __y) const 6011: { return __x | __y; } 6011: }; 6011: 6011: template 6011: struct bit_xor : public binary_function<_Tp, _Tp, _Tp> 6011: { 6011: 6011: _Tp 6011: operator()(const _Tp& __x, const _Tp& __y) const 6011: { return __x ^ __y; } 6011: }; 6011: 6011: template 6011: struct bit_not : public unary_function<_Tp, _Tp> 6011: { 6011: 6011: _Tp 6011: operator()(const _Tp& __x) const 6011: { return ~__x; } 6011: }; 6011: # 740 "/usr/include/c++/8/bits/stl_function.h" 3 6011: template 6011: class unary_negate 6011: : public unary_function 6011: { 6011: protected: 6011: _Predicate _M_pred; 6011: 6011: public: 6011: 6011: explicit 6011: unary_negate(const _Predicate& __x) : _M_pred(__x) { } 6011: 6011: 6011: bool 6011: operator()(const typename _Predicate::argument_type& __x) const 6011: { return !_M_pred(__x); } 6011: }; 6011: 6011: 6011: template 6011: 6011: inline unary_negate<_Predicate> 6011: not1(const _Predicate& __pred) 6011: { return unary_negate<_Predicate>(__pred); } 6011: 6011: 6011: template 6011: class binary_negate 6011: : public binary_function 6011: { 6011: protected: 6011: _Predicate _M_pred; 6011: 6011: public: 6011: 6011: explicit 6011: binary_negate(const _Predicate& __x) : _M_pred(__x) { } 6011: 6011: 6011: bool 6011: operator()(const typename _Predicate::first_argument_type& __x, 6011: const typename _Predicate::second_argument_type& __y) const 6011: { return !_M_pred(__x, __y); } 6011: }; 6011: 6011: 6011: template 6011: 6011: inline binary_negate<_Predicate> 6011: not2(const _Predicate& __pred) 6011: { return binary_negate<_Predicate>(__pred); } 6011: # 817 "/usr/include/c++/8/bits/stl_function.h" 3 6011: template 6011: class pointer_to_unary_function : public unary_function<_Arg, _Result> 6011: { 6011: protected: 6011: _Result (*_M_ptr)(_Arg); 6011: 6011: public: 6011: pointer_to_unary_function() { } 6011: 6011: explicit 6011: pointer_to_unary_function(_Result (*__x)(_Arg)) 6011: : _M_ptr(__x) { } 6011: 6011: _Result 6011: operator()(_Arg __x) const 6011: { return _M_ptr(__x); } 6011: }; 6011: 6011: 6011: template 6011: inline pointer_to_unary_function<_Arg, _Result> 6011: ptr_fun(_Result (*__x)(_Arg)) 6011: { return pointer_to_unary_function<_Arg, _Result>(__x); } 6011: 6011: 6011: template 6011: class pointer_to_binary_function 6011: : public binary_function<_Arg1, _Arg2, _Result> 6011: { 6011: protected: 6011: _Result (*_M_ptr)(_Arg1, _Arg2); 6011: 6011: public: 6011: pointer_to_binary_function() { } 6011: 6011: explicit 6011: pointer_to_binary_function(_Result (*__x)(_Arg1, _Arg2)) 6011: : _M_ptr(__x) { } 6011: 6011: _Result 6011: operator()(_Arg1 __x, _Arg2 __y) const 6011: { return _M_ptr(__x, __y); } 6011: }; 6011: 6011: 6011: template 6011: inline pointer_to_binary_function<_Arg1, _Arg2, _Result> 6011: ptr_fun(_Result (*__x)(_Arg1, _Arg2)) 6011: { return pointer_to_binary_function<_Arg1, _Arg2, _Result>(__x); } 6011: 6011: 6011: template 6011: struct _Identity 6011: : public unary_function<_Tp, _Tp> 6011: { 6011: _Tp& 6011: operator()(_Tp& __x) const 6011: { return __x; } 6011: 6011: const _Tp& 6011: operator()(const _Tp& __x) const 6011: { return __x; } 6011: }; 6011: 6011: 6011: template struct _Identity : _Identity<_Tp> { }; 6011: 6011: template 6011: struct _Select1st 6011: : public unary_function<_Pair, typename _Pair::first_type> 6011: { 6011: typename _Pair::first_type& 6011: operator()(_Pair& __x) const 6011: { return __x.first; } 6011: 6011: const typename _Pair::first_type& 6011: operator()(const _Pair& __x) const 6011: { return __x.first; } 6011: 6011: 6011: template 6011: typename _Pair2::first_type& 6011: operator()(_Pair2& __x) const 6011: { return __x.first; } 6011: 6011: template 6011: const typename _Pair2::first_type& 6011: operator()(const _Pair2& __x) const 6011: { return __x.first; } 6011: 6011: }; 6011: 6011: template 6011: struct _Select2nd 6011: : public unary_function<_Pair, typename _Pair::second_type> 6011: { 6011: typename _Pair::second_type& 6011: operator()(_Pair& __x) const 6011: { return __x.second; } 6011: 6011: const typename _Pair::second_type& 6011: operator()(const _Pair& __x) const 6011: { return __x.second; } 6011: }; 6011: # 940 "/usr/include/c++/8/bits/stl_function.h" 3 6011: template 6011: class mem_fun_t : public unary_function<_Tp*, _Ret> 6011: { 6011: public: 6011: explicit 6011: mem_fun_t(_Ret (_Tp::*__pf)()) 6011: : _M_f(__pf) { } 6011: 6011: _Ret 6011: operator()(_Tp* __p) const 6011: { return (__p->*_M_f)(); } 6011: 6011: private: 6011: _Ret (_Tp::*_M_f)(); 6011: }; 6011: 6011: 6011: 6011: template 6011: class const_mem_fun_t : public unary_function 6011: { 6011: public: 6011: explicit 6011: const_mem_fun_t(_Ret (_Tp::*__pf)() const) 6011: : _M_f(__pf) { } 6011: 6011: _Ret 6011: operator()(const _Tp* __p) const 6011: { return (__p->*_M_f)(); } 6011: 6011: private: 6011: _Ret (_Tp::*_M_f)() const; 6011: }; 6011: 6011: 6011: 6011: template 6011: class mem_fun_ref_t : public unary_function<_Tp, _Ret> 6011: { 6011: public: 6011: explicit 6011: mem_fun_ref_t(_Ret (_Tp::*__pf)()) 6011: : _M_f(__pf) { } 6011: 6011: _Ret 6011: operator()(_Tp& __r) const 6011: { return (__r.*_M_f)(); } 6011: 6011: private: 6011: _Ret (_Tp::*_M_f)(); 6011: }; 6011: 6011: 6011: 6011: template 6011: class const_mem_fun_ref_t : public unary_function<_Tp, _Ret> 6011: { 6011: public: 6011: explicit 6011: const_mem_fun_ref_t(_Ret (_Tp::*__pf)() const) 6011: : _M_f(__pf) { } 6011: 6011: _Ret 6011: operator()(const _Tp& __r) const 6011: { return (__r.*_M_f)(); } 6011: 6011: private: 6011: _Ret (_Tp::*_M_f)() const; 6011: }; 6011: 6011: 6011: 6011: template 6011: class mem_fun1_t : public binary_function<_Tp*, _Arg, _Ret> 6011: { 6011: public: 6011: explicit 6011: mem_fun1_t(_Ret (_Tp::*__pf)(_Arg)) 6011: : _M_f(__pf) { } 6011: 6011: _Ret 6011: operator()(_Tp* __p, _Arg __x) const 6011: { return (__p->*_M_f)(__x); } 6011: 6011: private: 6011: _Ret (_Tp::*_M_f)(_Arg); 6011: }; 6011: 6011: 6011: 6011: template 6011: class const_mem_fun1_t : public binary_function 6011: { 6011: public: 6011: explicit 6011: const_mem_fun1_t(_Ret (_Tp::*__pf)(_Arg) const) 6011: : _M_f(__pf) { } 6011: 6011: _Ret 6011: operator()(const _Tp* __p, _Arg __x) const 6011: { return (__p->*_M_f)(__x); } 6011: 6011: private: 6011: _Ret (_Tp::*_M_f)(_Arg) const; 6011: }; 6011: 6011: 6011: 6011: template 6011: class mem_fun1_ref_t : public binary_function<_Tp, _Arg, _Ret> 6011: { 6011: public: 6011: explicit 6011: mem_fun1_ref_t(_Ret (_Tp::*__pf)(_Arg)) 6011: : _M_f(__pf) { } 6011: 6011: _Ret 6011: operator()(_Tp& __r, _Arg __x) const 6011: { return (__r.*_M_f)(__x); } 6011: 6011: private: 6011: _Ret (_Tp::*_M_f)(_Arg); 6011: }; 6011: 6011: 6011: 6011: template 6011: class const_mem_fun1_ref_t : public binary_function<_Tp, _Arg, _Ret> 6011: { 6011: public: 6011: explicit 6011: const_mem_fun1_ref_t(_Ret (_Tp::*__pf)(_Arg) const) 6011: : _M_f(__pf) { } 6011: 6011: _Ret 6011: operator()(const _Tp& __r, _Arg __x) const 6011: { return (__r.*_M_f)(__x); } 6011: 6011: private: 6011: _Ret (_Tp::*_M_f)(_Arg) const; 6011: }; 6011: 6011: 6011: 6011: template 6011: inline mem_fun_t<_Ret, _Tp> 6011: mem_fun(_Ret (_Tp::*__f)()) 6011: { return mem_fun_t<_Ret, _Tp>(__f); } 6011: 6011: template 6011: inline const_mem_fun_t<_Ret, _Tp> 6011: mem_fun(_Ret (_Tp::*__f)() const) 6011: { return const_mem_fun_t<_Ret, _Tp>(__f); } 6011: 6011: template 6011: inline mem_fun_ref_t<_Ret, _Tp> 6011: mem_fun_ref(_Ret (_Tp::*__f)()) 6011: { return mem_fun_ref_t<_Ret, _Tp>(__f); } 6011: 6011: template 6011: inline const_mem_fun_ref_t<_Ret, _Tp> 6011: mem_fun_ref(_Ret (_Tp::*__f)() const) 6011: { return const_mem_fun_ref_t<_Ret, _Tp>(__f); } 6011: 6011: template 6011: inline mem_fun1_t<_Ret, _Tp, _Arg> 6011: mem_fun(_Ret (_Tp::*__f)(_Arg)) 6011: { return mem_fun1_t<_Ret, _Tp, _Arg>(__f); } 6011: 6011: template 6011: inline const_mem_fun1_t<_Ret, _Tp, _Arg> 6011: mem_fun(_Ret (_Tp::*__f)(_Arg) const) 6011: { return const_mem_fun1_t<_Ret, _Tp, _Arg>(__f); } 6011: 6011: template 6011: inline mem_fun1_ref_t<_Ret, _Tp, _Arg> 6011: mem_fun_ref(_Ret (_Tp::*__f)(_Arg)) 6011: { return mem_fun1_ref_t<_Ret, _Tp, _Arg>(__f); } 6011: 6011: template 6011: inline const_mem_fun1_ref_t<_Ret, _Tp, _Arg> 6011: mem_fun_ref(_Ret (_Tp::*__f)(_Arg) const) 6011: { return const_mem_fun1_ref_t<_Ret, _Tp, _Arg>(__f); } 6011: 6011: 6011: 6011: 6011: } 6011: 6011: 6011: # 1 "/usr/include/c++/8/backward/binders.h" 1 3 6011: # 60 "/usr/include/c++/8/backward/binders.h" 3 6011: #pragma GCC diagnostic push 6011: #pragma GCC diagnostic ignored "-Wdeprecated-declarations" 6011: 6011: namespace std __attribute__ ((__visibility__ ("default"))) 6011: { 6011: 6011: # 107 "/usr/include/c++/8/backward/binders.h" 3 6011: template 6011: class binder1st 6011: : public unary_function 6011: { 6011: protected: 6011: _Operation op; 6011: typename _Operation::first_argument_type value; 6011: 6011: public: 6011: binder1st(const _Operation& __x, 6011: const typename _Operation::first_argument_type& __y) 6011: : op(__x), value(__y) { } 6011: 6011: typename _Operation::result_type 6011: operator()(const typename _Operation::second_argument_type& __x) const 6011: { return op(value, __x); } 6011: 6011: 6011: 6011: typename _Operation::result_type 6011: operator()(typename _Operation::second_argument_type& __x) const 6011: { return op(value, __x); } 6011: } __attribute__ ((__deprecated__)); 6011: 6011: 6011: template 6011: inline binder1st<_Operation> 6011: bind1st(const _Operation& __fn, const _Tp& __x) 6011: { 6011: typedef typename _Operation::first_argument_type _Arg1_type; 6011: return binder1st<_Operation>(__fn, _Arg1_type(__x)); 6011: } 6011: 6011: 6011: template 6011: class binder2nd 6011: : public unary_function 6011: { 6011: protected: 6011: _Operation op; 6011: typename _Operation::second_argument_type value; 6011: 6011: public: 6011: binder2nd(const _Operation& __x, 6011: const typename _Operation::second_argument_type& __y) 6011: : op(__x), value(__y) { } 6011: 6011: typename _Operation::result_type 6011: operator()(const typename _Operation::first_argument_type& __x) const 6011: { return op(__x, value); } 6011: 6011: 6011: 6011: typename _Operation::result_type 6011: operator()(typename _Operation::first_argument_type& __x) const 6011: { return op(__x, value); } 6011: } __attribute__ ((__deprecated__)); 6011: 6011: 6011: template 6011: inline binder2nd<_Operation> 6011: bind2nd(const _Operation& __fn, const _Tp& __x) 6011: { 6011: typedef typename _Operation::second_argument_type _Arg2_type; 6011: return binder2nd<_Operation>(__fn, _Arg2_type(__x)); 6011: } 6011: 6011: 6011: 6011: } 6011: 6011: #pragma GCC diagnostic pop 6011: # 1131 "/usr/include/c++/8/bits/stl_function.h" 2 3 6011: # 49 "/usr/include/c++/8/string" 2 3 6011: 6011: 6011: 6011: # 1 "/usr/include/c++/8/bits/basic_string.h" 1 3 6011: # 37 "/usr/include/c++/8/bits/basic_string.h" 3 6011: 6011: # 38 "/usr/include/c++/8/bits/basic_string.h" 3 6011: # 52 "/usr/include/c++/8/bits/basic_string.h" 3 6011: namespace std __attribute__ ((__visibility__ ("default"))) 6011: { 6011: 6011: 6011: 6011: namespace __cxx11 { 6011: # 76 "/usr/include/c++/8/bits/basic_string.h" 3 6011: template 6011: class basic_string 6011: { 6011: typedef typename __gnu_cxx::__alloc_traits<_Alloc>::template 6011: rebind<_CharT>::other _Char_alloc_type; 6011: typedef __gnu_cxx::__alloc_traits<_Char_alloc_type> _Alloc_traits; 6011: 6011: 6011: public: 6011: typedef _Traits traits_type; 6011: typedef typename _Traits::char_type value_type; 6011: typedef _Char_alloc_type allocator_type; 6011: typedef typename _Alloc_traits::size_type size_type; 6011: typedef typename _Alloc_traits::difference_type difference_type; 6011: typedef typename _Alloc_traits::reference reference; 6011: typedef typename _Alloc_traits::const_reference const_reference; 6011: typedef typename _Alloc_traits::pointer pointer; 6011: typedef typename _Alloc_traits::const_pointer const_pointer; 6011: typedef __gnu_cxx::__normal_iterator iterator; 6011: typedef __gnu_cxx::__normal_iterator 6011: const_iterator; 6011: typedef std::reverse_iterator const_reverse_iterator; 6011: typedef std::reverse_iterator reverse_iterator; 6011: 6011: 6011: static const size_type npos = static_cast(-1); 6011: 6011: private: 6011: 6011: 6011: 6011: 6011: typedef const_iterator __const_iterator; 6011: # 139 "/usr/include/c++/8/bits/basic_string.h" 3 6011: struct _Alloc_hider : allocator_type 6011: { 6011: 6011: 6011: 6011: 6011: _Alloc_hider(pointer __dat, const _Alloc& __a) 6011: : allocator_type(__a), _M_p(__dat) { } 6011: 6011: _Alloc_hider(pointer __dat, _Alloc&& __a = _Alloc()) 6011: : allocator_type(std::move(__a)), _M_p(__dat) { } 6011: 6011: 6011: pointer _M_p; 6011: }; 6011: 6011: _Alloc_hider _M_dataplus; 6011: size_type _M_string_length; 6011: 6011: enum { _S_local_capacity = 15 / sizeof(_CharT) }; 6011: 6011: union 6011: { 6011: _CharT _M_local_buf[_S_local_capacity + 1]; 6011: size_type _M_allocated_capacity; 6011: }; 6011: 6011: void 6011: _M_data(pointer __p) 6011: { _M_dataplus._M_p = __p; } 6011: 6011: void 6011: _M_length(size_type __length) 6011: { _M_string_length = __length; } 6011: 6011: pointer 6011: _M_data() const 6011: { return _M_dataplus._M_p; } 6011: 6011: pointer 6011: _M_local_data() 6011: { 6011: 6011: return std::pointer_traits::pointer_to(*_M_local_buf); 6011: 6011: 6011: 6011: } 6011: 6011: const_pointer 6011: _M_local_data() const 6011: { 6011: 6011: return std::pointer_traits::pointer_to(*_M_local_buf); 6011: 6011: 6011: 6011: } 6011: 6011: void 6011: _M_capacity(size_type __capacity) 6011: { _M_allocated_capacity = __capacity; } 6011: 6011: void 6011: _M_set_length(size_type __n) 6011: { 6011: _M_length(__n); 6011: traits_type::assign(_M_data()[__n], _CharT()); 6011: } 6011: 6011: bool 6011: _M_is_local() const 6011: { return _M_data() == _M_local_data(); } 6011: 6011: 6011: pointer 6011: _M_create(size_type&, size_type); 6011: 6011: void 6011: _M_dispose() 6011: { 6011: if (!_M_is_local()) 6011: _M_destroy(_M_allocated_capacity); 6011: } 6011: 6011: void 6011: _M_destroy(size_type __size) throw() 6011: { _Alloc_traits::deallocate(_M_get_allocator(), _M_data(), __size + 1); } 6011: 6011: 6011: 6011: template 6011: void 6011: _M_construct_aux(_InIterator __beg, _InIterator __end, 6011: std::__false_type) 6011: { 6011: typedef typename iterator_traits<_InIterator>::iterator_category _Tag; 6011: _M_construct(__beg, __end, _Tag()); 6011: } 6011: 6011: 6011: 6011: template 6011: void 6011: _M_construct_aux(_Integer __beg, _Integer __end, std::__true_type) 6011: { _M_construct_aux_2(static_cast(__beg), __end); } 6011: 6011: void 6011: _M_construct_aux_2(size_type __req, _CharT __c) 6011: { _M_construct(__req, __c); } 6011: 6011: template 6011: void 6011: _M_construct(_InIterator __beg, _InIterator __end) 6011: { 6011: typedef typename std::__is_integer<_InIterator>::__type _Integral; 6011: _M_construct_aux(__beg, __end, _Integral()); 6011: } 6011: 6011: 6011: template 6011: void 6011: _M_construct(_InIterator __beg, _InIterator __end, 6011: std::input_iterator_tag); 6011: 6011: 6011: 6011: template 6011: void 6011: _M_construct(_FwdIterator __beg, _FwdIterator __end, 6011: std::forward_iterator_tag); 6011: 6011: void 6011: _M_construct(size_type __req, _CharT __c); 6011: 6011: allocator_type& 6011: _M_get_allocator() 6011: { return _M_dataplus; } 6011: 6011: const allocator_type& 6011: _M_get_allocator() const 6011: { return _M_dataplus; } 6011: 6011: private: 6011: # 298 "/usr/include/c++/8/bits/basic_string.h" 3 6011: size_type 6011: _M_check(size_type __pos, const char* __s) const 6011: { 6011: if (__pos > this->size()) 6011: __throw_out_of_range_fmt(("%s: __pos (which is %zu) > " "this->size() (which is %zu)") 6011: , 6011: __s, __pos, this->size()); 6011: return __pos; 6011: } 6011: 6011: void 6011: _M_check_length(size_type __n1, size_type __n2, const char* __s) const 6011: { 6011: if (this->max_size() - (this->size() - __n1) < __n2) 6011: __throw_length_error((__s)); 6011: } 6011: 6011: 6011: 6011: size_type 6011: _M_limit(size_type __pos, size_type __off) const noexcept 6011: { 6011: const bool __testoff = __off < this->size() - __pos; 6011: return __testoff ? __off : this->size() - __pos; 6011: } 6011: 6011: 6011: bool 6011: _M_disjunct(const _CharT* __s) const noexcept 6011: { 6011: return (less()(__s, _M_data()) 6011: || less()(_M_data() + this->size(), __s)); 6011: } 6011: 6011: 6011: 6011: static void 6011: _S_copy(_CharT* __d, const _CharT* __s, size_type __n) 6011: { 6011: if (__n == 1) 6011: traits_type::assign(*__d, *__s); 6011: else 6011: traits_type::copy(__d, __s, __n); 6011: } 6011: 6011: static void 6011: _S_move(_CharT* __d, const _CharT* __s, size_type __n) 6011: { 6011: if (__n == 1) 6011: traits_type::assign(*__d, *__s); 6011: else 6011: traits_type::move(__d, __s, __n); 6011: } 6011: 6011: static void 6011: _S_assign(_CharT* __d, size_type __n, _CharT __c) 6011: { 6011: if (__n == 1) 6011: traits_type::assign(*__d, __c); 6011: else 6011: traits_type::assign(__d, __n, __c); 6011: } 6011: 6011: 6011: 6011: template 6011: static void 6011: _S_copy_chars(_CharT* __p, _Iterator __k1, _Iterator __k2) 6011: { 6011: for (; __k1 != __k2; ++__k1, (void)++__p) 6011: traits_type::assign(*__p, *__k1); 6011: } 6011: 6011: static void 6011: _S_copy_chars(_CharT* __p, iterator __k1, iterator __k2) noexcept 6011: { _S_copy_chars(__p, __k1.base(), __k2.base()); } 6011: 6011: static void 6011: _S_copy_chars(_CharT* __p, const_iterator __k1, const_iterator __k2) 6011: noexcept 6011: { _S_copy_chars(__p, __k1.base(), __k2.base()); } 6011: 6011: static void 6011: _S_copy_chars(_CharT* __p, _CharT* __k1, _CharT* __k2) noexcept 6011: { _S_copy(__p, __k1, __k2 - __k1); } 6011: 6011: static void 6011: _S_copy_chars(_CharT* __p, const _CharT* __k1, const _CharT* __k2) 6011: noexcept 6011: { _S_copy(__p, __k1, __k2 - __k1); } 6011: 6011: static int 6011: _S_compare(size_type __n1, size_type __n2) noexcept 6011: { 6011: const difference_type __d = difference_type(__n1 - __n2); 6011: 6011: if (__d > __gnu_cxx::__numeric_traits::__max) 6011: return __gnu_cxx::__numeric_traits::__max; 6011: else if (__d < __gnu_cxx::__numeric_traits::__min) 6011: return __gnu_cxx::__numeric_traits::__min; 6011: else 6011: return int(__d); 6011: } 6011: 6011: void 6011: _M_assign(const basic_string&); 6011: 6011: void 6011: _M_mutate(size_type __pos, size_type __len1, const _CharT* __s, 6011: size_type __len2); 6011: 6011: void 6011: _M_erase(size_type __pos, size_type __n); 6011: 6011: public: 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: basic_string() 6011: noexcept(is_nothrow_default_constructible<_Alloc>::value) 6011: : _M_dataplus(_M_local_data()) 6011: { _M_set_length(0); } 6011: 6011: 6011: 6011: 6011: explicit 6011: basic_string(const _Alloc& __a) noexcept 6011: : _M_dataplus(_M_local_data(), __a) 6011: { _M_set_length(0); } 6011: 6011: 6011: 6011: 6011: 6011: basic_string(const basic_string& __str) 6011: : _M_dataplus(_M_local_data(), 6011: _Alloc_traits::_S_select_on_copy(__str._M_get_allocator())) 6011: { _M_construct(__str._M_data(), __str._M_data() + __str.length()); } 6011: # 450 "/usr/include/c++/8/bits/basic_string.h" 3 6011: basic_string(const basic_string& __str, size_type __pos, 6011: const _Alloc& __a = _Alloc()) 6011: : _M_dataplus(_M_local_data(), __a) 6011: { 6011: const _CharT* __start = __str._M_data() 6011: + __str._M_check(__pos, "basic_string::basic_string"); 6011: _M_construct(__start, __start + __str._M_limit(__pos, npos)); 6011: } 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: basic_string(const basic_string& __str, size_type __pos, 6011: size_type __n) 6011: : _M_dataplus(_M_local_data()) 6011: { 6011: const _CharT* __start = __str._M_data() 6011: + __str._M_check(__pos, "basic_string::basic_string"); 6011: _M_construct(__start, __start + __str._M_limit(__pos, __n)); 6011: } 6011: # 481 "/usr/include/c++/8/bits/basic_string.h" 3 6011: basic_string(const basic_string& __str, size_type __pos, 6011: size_type __n, const _Alloc& __a) 6011: : _M_dataplus(_M_local_data(), __a) 6011: { 6011: const _CharT* __start 6011: = __str._M_data() + __str._M_check(__pos, "string::string"); 6011: _M_construct(__start, __start + __str._M_limit(__pos, __n)); 6011: } 6011: # 499 "/usr/include/c++/8/bits/basic_string.h" 3 6011: basic_string(const _CharT* __s, size_type __n, 6011: const _Alloc& __a = _Alloc()) 6011: : _M_dataplus(_M_local_data(), __a) 6011: { _M_construct(__s, __s + __n); } 6011: 6011: 6011: 6011: 6011: 6011: 6011: basic_string(const _CharT* __s, const _Alloc& __a = _Alloc()) 6011: : _M_dataplus(_M_local_data(), __a) 6011: { _M_construct(__s, __s ? __s + traits_type::length(__s) : __s+npos); } 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: basic_string(size_type __n, _CharT __c, const _Alloc& __a = _Alloc()) 6011: : _M_dataplus(_M_local_data(), __a) 6011: { _M_construct(__n, __c); } 6011: # 531 "/usr/include/c++/8/bits/basic_string.h" 3 6011: basic_string(basic_string&& __str) noexcept 6011: : _M_dataplus(_M_local_data(), std::move(__str._M_get_allocator())) 6011: { 6011: if (__str._M_is_local()) 6011: { 6011: traits_type::copy(_M_local_buf, __str._M_local_buf, 6011: _S_local_capacity + 1); 6011: } 6011: else 6011: { 6011: _M_data(__str._M_data()); 6011: _M_capacity(__str._M_allocated_capacity); 6011: } 6011: 6011: 6011: 6011: 6011: _M_length(__str.length()); 6011: __str._M_data(__str._M_local_data()); 6011: __str._M_set_length(0); 6011: } 6011: 6011: 6011: 6011: 6011: 6011: 6011: basic_string(initializer_list<_CharT> __l, const _Alloc& __a = _Alloc()) 6011: : _M_dataplus(_M_local_data(), __a) 6011: { _M_construct(__l.begin(), __l.end()); } 6011: 6011: basic_string(const basic_string& __str, const _Alloc& __a) 6011: : _M_dataplus(_M_local_data(), __a) 6011: { _M_construct(__str.begin(), __str.end()); } 6011: 6011: basic_string(basic_string&& __str, const _Alloc& __a) 6011: noexcept(_Alloc_traits::_S_always_equal()) 6011: : _M_dataplus(_M_local_data(), __a) 6011: { 6011: if (__str._M_is_local()) 6011: { 6011: traits_type::copy(_M_local_buf, __str._M_local_buf, 6011: _S_local_capacity + 1); 6011: _M_length(__str.length()); 6011: __str._M_set_length(0); 6011: } 6011: else if (_Alloc_traits::_S_always_equal() 6011: || __str.get_allocator() == __a) 6011: { 6011: _M_data(__str._M_data()); 6011: _M_length(__str.length()); 6011: _M_capacity(__str._M_allocated_capacity); 6011: __str._M_data(__str._M_local_buf); 6011: __str._M_set_length(0); 6011: } 6011: else 6011: _M_construct(__str.begin(), __str.end()); 6011: } 6011: # 599 "/usr/include/c++/8/bits/basic_string.h" 3 6011: template> 6011: 6011: 6011: 6011: basic_string(_InputIterator __beg, _InputIterator __end, 6011: const _Alloc& __a = _Alloc()) 6011: : _M_dataplus(_M_local_data(), __a) 6011: { _M_construct(__beg, __end); } 6011: # 646 "/usr/include/c++/8/bits/basic_string.h" 3 6011: ~basic_string() 6011: { _M_dispose(); } 6011: 6011: 6011: 6011: 6011: 6011: basic_string& 6011: operator=(const basic_string& __str) 6011: { 6011: 6011: if (_Alloc_traits::_S_propagate_on_copy_assign()) 6011: { 6011: if (!_Alloc_traits::_S_always_equal() && !_M_is_local() 6011: && _M_get_allocator() != __str._M_get_allocator()) 6011: { 6011: 6011: 6011: if (__str.size() <= _S_local_capacity) 6011: { 6011: _M_destroy(_M_allocated_capacity); 6011: _M_data(_M_local_data()); 6011: _M_set_length(0); 6011: } 6011: else 6011: { 6011: const auto __len = __str.size(); 6011: auto __alloc = __str._M_get_allocator(); 6011: 6011: auto __ptr = _Alloc_traits::allocate(__alloc, __len + 1); 6011: _M_destroy(_M_allocated_capacity); 6011: _M_data(__ptr); 6011: _M_capacity(__len); 6011: _M_set_length(__len); 6011: } 6011: } 6011: std::__alloc_on_copy(_M_get_allocator(), __str._M_get_allocator()); 6011: } 6011: 6011: return this->assign(__str); 6011: } 6011: 6011: 6011: 6011: 6011: 6011: basic_string& 6011: operator=(const _CharT* __s) 6011: { return this->assign(__s); } 6011: # 703 "/usr/include/c++/8/bits/basic_string.h" 3 6011: basic_string& 6011: operator=(_CharT __c) 6011: { 6011: this->assign(1, __c); 6011: return *this; 6011: } 6011: # 721 "/usr/include/c++/8/bits/basic_string.h" 3 6011: basic_string& 6011: operator=(basic_string&& __str) 6011: noexcept(_Alloc_traits::_S_nothrow_move()) 6011: { 6011: if (!_M_is_local() && _Alloc_traits::_S_propagate_on_move_assign() 6011: && !_Alloc_traits::_S_always_equal() 6011: && _M_get_allocator() != __str._M_get_allocator()) 6011: { 6011: 6011: _M_destroy(_M_allocated_capacity); 6011: _M_data(_M_local_data()); 6011: _M_set_length(0); 6011: } 6011: 6011: std::__alloc_on_move(_M_get_allocator(), __str._M_get_allocator()); 6011: 6011: if (!__str._M_is_local() 6011: && (_Alloc_traits::_S_propagate_on_move_assign() 6011: || _Alloc_traits::_S_always_equal())) 6011: { 6011: pointer __data = nullptr; 6011: size_type __capacity; 6011: if (!_M_is_local()) 6011: { 6011: if (_Alloc_traits::_S_always_equal()) 6011: { 6011: __data = _M_data(); 6011: __capacity = _M_allocated_capacity; 6011: } 6011: else 6011: _M_destroy(_M_allocated_capacity); 6011: } 6011: 6011: _M_data(__str._M_data()); 6011: _M_length(__str.length()); 6011: _M_capacity(__str._M_allocated_capacity); 6011: if (__data) 6011: { 6011: __str._M_data(__data); 6011: __str._M_capacity(__capacity); 6011: } 6011: else 6011: __str._M_data(__str._M_local_buf); 6011: } 6011: else 6011: assign(__str); 6011: __str.clear(); 6011: return *this; 6011: } 6011: 6011: 6011: 6011: 6011: 6011: basic_string& 6011: operator=(initializer_list<_CharT> __l) 6011: { 6011: this->assign(__l.begin(), __l.size()); 6011: return *this; 6011: } 6011: # 806 "/usr/include/c++/8/bits/basic_string.h" 3 6011: iterator 6011: begin() noexcept 6011: { return iterator(_M_data()); } 6011: 6011: 6011: 6011: 6011: 6011: const_iterator 6011: begin() const noexcept 6011: { return const_iterator(_M_data()); } 6011: 6011: 6011: 6011: 6011: 6011: iterator 6011: end() noexcept 6011: { return iterator(_M_data() + this->size()); } 6011: 6011: 6011: 6011: 6011: 6011: const_iterator 6011: end() const noexcept 6011: { return const_iterator(_M_data() + this->size()); } 6011: 6011: 6011: 6011: 6011: 6011: 6011: reverse_iterator 6011: rbegin() noexcept 6011: { return reverse_iterator(this->end()); } 6011: 6011: 6011: 6011: 6011: 6011: 6011: const_reverse_iterator 6011: rbegin() const noexcept 6011: { return const_reverse_iterator(this->end()); } 6011: 6011: 6011: 6011: 6011: 6011: 6011: reverse_iterator 6011: rend() noexcept 6011: { return reverse_iterator(this->begin()); } 6011: 6011: 6011: 6011: 6011: 6011: 6011: const_reverse_iterator 6011: rend() const noexcept 6011: { return const_reverse_iterator(this->begin()); } 6011: 6011: 6011: 6011: 6011: 6011: 6011: const_iterator 6011: cbegin() const noexcept 6011: { return const_iterator(this->_M_data()); } 6011: 6011: 6011: 6011: 6011: 6011: const_iterator 6011: cend() const noexcept 6011: { return const_iterator(this->_M_data() + this->size()); } 6011: 6011: 6011: 6011: 6011: 6011: 6011: const_reverse_iterator 6011: crbegin() const noexcept 6011: { return const_reverse_iterator(this->end()); } 6011: 6011: 6011: 6011: 6011: 6011: 6011: const_reverse_iterator 6011: crend() const noexcept 6011: { return const_reverse_iterator(this->begin()); } 6011: 6011: 6011: public: 6011: 6011: 6011: 6011: size_type 6011: size() const noexcept 6011: { return _M_string_length; } 6011: 6011: 6011: 6011: size_type 6011: length() const noexcept 6011: { return _M_string_length; } 6011: 6011: 6011: size_type 6011: max_size() const noexcept 6011: { return (_Alloc_traits::max_size(_M_get_allocator()) - 1) / 2; } 6011: # 935 "/usr/include/c++/8/bits/basic_string.h" 3 6011: void 6011: resize(size_type __n, _CharT __c); 6011: # 948 "/usr/include/c++/8/bits/basic_string.h" 3 6011: void 6011: resize(size_type __n) 6011: { this->resize(__n, _CharT()); } 6011: 6011: 6011: 6011: void 6011: shrink_to_fit() noexcept 6011: { 6011: 6011: if (capacity() > size()) 6011: { 6011: try 6011: { reserve(0); } 6011: catch(...) 6011: { } 6011: } 6011: 6011: } 6011: 6011: 6011: 6011: 6011: 6011: 6011: size_type 6011: capacity() const noexcept 6011: { 6011: return _M_is_local() ? size_type(_S_local_capacity) 6011: : _M_allocated_capacity; 6011: } 6011: # 997 "/usr/include/c++/8/bits/basic_string.h" 3 6011: void 6011: reserve(size_type __res_arg = 0); 6011: 6011: 6011: 6011: 6011: void 6011: clear() noexcept 6011: { _M_set_length(0); } 6011: 6011: 6011: 6011: 6011: 6011: bool 6011: empty() const noexcept 6011: { return this->size() == 0; } 6011: # 1026 "/usr/include/c++/8/bits/basic_string.h" 3 6011: const_reference 6011: operator[] (size_type __pos) const noexcept 6011: { 6011: ; 6011: return _M_data()[__pos]; 6011: } 6011: # 1043 "/usr/include/c++/8/bits/basic_string.h" 3 6011: reference 6011: operator[](size_type __pos) 6011: { 6011: 6011: 6011: ; 6011: 6011: ; 6011: return _M_data()[__pos]; 6011: } 6011: # 1064 "/usr/include/c++/8/bits/basic_string.h" 3 6011: const_reference 6011: at(size_type __n) const 6011: { 6011: if (__n >= this->size()) 6011: __throw_out_of_range_fmt(("basic_string::at: __n " "(which is %zu) >= this->size() " "(which is %zu)") 6011: 6011: , 6011: __n, this->size()); 6011: return _M_data()[__n]; 6011: } 6011: # 1085 "/usr/include/c++/8/bits/basic_string.h" 3 6011: reference 6011: at(size_type __n) 6011: { 6011: if (__n >= size()) 6011: __throw_out_of_range_fmt(("basic_string::at: __n " "(which is %zu) >= this->size() " "(which is %zu)") 6011: 6011: , 6011: __n, this->size()); 6011: return _M_data()[__n]; 6011: } 6011: 6011: 6011: 6011: 6011: 6011: 6011: reference 6011: front() noexcept 6011: { 6011: ; 6011: return operator[](0); 6011: } 6011: 6011: 6011: 6011: 6011: 6011: const_reference 6011: front() const noexcept 6011: { 6011: ; 6011: return operator[](0); 6011: } 6011: 6011: 6011: 6011: 6011: 6011: reference 6011: back() noexcept 6011: { 6011: ; 6011: return operator[](this->size() - 1); 6011: } 6011: 6011: 6011: 6011: 6011: 6011: const_reference 6011: back() const noexcept 6011: { 6011: ; 6011: return operator[](this->size() - 1); 6011: } 6011: # 1148 "/usr/include/c++/8/bits/basic_string.h" 3 6011: basic_string& 6011: operator+=(const basic_string& __str) 6011: { return this->append(__str); } 6011: 6011: 6011: 6011: 6011: 6011: 6011: basic_string& 6011: operator+=(const _CharT* __s) 6011: { return this->append(__s); } 6011: 6011: 6011: 6011: 6011: 6011: 6011: basic_string& 6011: operator+=(_CharT __c) 6011: { 6011: this->push_back(__c); 6011: return *this; 6011: } 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: basic_string& 6011: operator+=(initializer_list<_CharT> __l) 6011: { return this->append(__l.begin(), __l.size()); } 6011: # 1201 "/usr/include/c++/8/bits/basic_string.h" 3 6011: basic_string& 6011: append(const basic_string& __str) 6011: { return _M_append(__str._M_data(), __str.size()); } 6011: # 1218 "/usr/include/c++/8/bits/basic_string.h" 3 6011: basic_string& 6011: append(const basic_string& __str, size_type __pos, size_type __n) 6011: { return _M_append(__str._M_data() 6011: + __str._M_check(__pos, "basic_string::append"), 6011: __str._M_limit(__pos, __n)); } 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: basic_string& 6011: append(const _CharT* __s, size_type __n) 6011: { 6011: ; 6011: _M_check_length(size_type(0), __n, "basic_string::append"); 6011: return _M_append(__s, __n); 6011: } 6011: 6011: 6011: 6011: 6011: 6011: 6011: basic_string& 6011: append(const _CharT* __s) 6011: { 6011: ; 6011: const size_type __n = traits_type::length(__s); 6011: _M_check_length(size_type(0), __n, "basic_string::append"); 6011: return _M_append(__s, __n); 6011: } 6011: # 1260 "/usr/include/c++/8/bits/basic_string.h" 3 6011: basic_string& 6011: append(size_type __n, _CharT __c) 6011: { return _M_replace_aux(this->size(), size_type(0), __n, __c); } 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: basic_string& 6011: append(initializer_list<_CharT> __l) 6011: { return this->append(__l.begin(), __l.size()); } 6011: # 1284 "/usr/include/c++/8/bits/basic_string.h" 3 6011: template> 6011: 6011: 6011: 6011: basic_string& 6011: append(_InputIterator __first, _InputIterator __last) 6011: { return this->replace(end(), end(), __first, __last); } 6011: # 1329 "/usr/include/c++/8/bits/basic_string.h" 3 6011: void 6011: push_back(_CharT __c) 6011: { 6011: const size_type __size = this->size(); 6011: if (__size + 1 > this->capacity()) 6011: this->_M_mutate(__size, size_type(0), 0, size_type(1)); 6011: traits_type::assign(this->_M_data()[__size], __c); 6011: this->_M_set_length(__size + 1); 6011: } 6011: 6011: 6011: 6011: 6011: 6011: 6011: basic_string& 6011: assign(const basic_string& __str) 6011: { 6011: this->_M_assign(__str); 6011: return *this; 6011: } 6011: # 1360 "/usr/include/c++/8/bits/basic_string.h" 3 6011: basic_string& 6011: assign(basic_string&& __str) 6011: noexcept(_Alloc_traits::_S_nothrow_move()) 6011: { 6011: 6011: 6011: return *this = std::move(__str); 6011: } 6011: # 1383 "/usr/include/c++/8/bits/basic_string.h" 3 6011: basic_string& 6011: assign(const basic_string& __str, size_type __pos, size_type __n) 6011: { return _M_replace(size_type(0), this->size(), __str._M_data() 6011: + __str._M_check(__pos, "basic_string::assign"), 6011: __str._M_limit(__pos, __n)); } 6011: # 1399 "/usr/include/c++/8/bits/basic_string.h" 3 6011: basic_string& 6011: assign(const _CharT* __s, size_type __n) 6011: { 6011: ; 6011: return _M_replace(size_type(0), this->size(), __s, __n); 6011: } 6011: # 1415 "/usr/include/c++/8/bits/basic_string.h" 3 6011: basic_string& 6011: assign(const _CharT* __s) 6011: { 6011: ; 6011: return _M_replace(size_type(0), this->size(), __s, 6011: traits_type::length(__s)); 6011: } 6011: # 1432 "/usr/include/c++/8/bits/basic_string.h" 3 6011: basic_string& 6011: assign(size_type __n, _CharT __c) 6011: { return _M_replace_aux(size_type(0), this->size(), __n, __c); } 6011: # 1445 "/usr/include/c++/8/bits/basic_string.h" 3 6011: template> 6011: 6011: 6011: 6011: basic_string& 6011: assign(_InputIterator __first, _InputIterator __last) 6011: { return this->replace(begin(), end(), __first, __last); } 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: basic_string& 6011: assign(initializer_list<_CharT> __l) 6011: { return this->assign(__l.begin(), __l.size()); } 6011: # 1513 "/usr/include/c++/8/bits/basic_string.h" 3 6011: iterator 6011: insert(const_iterator __p, size_type __n, _CharT __c) 6011: { 6011: ; 6011: const size_type __pos = __p - begin(); 6011: this->replace(__p, __p, __n, __c); 6011: return iterator(this->_M_data() + __pos); 6011: } 6011: # 1555 "/usr/include/c++/8/bits/basic_string.h" 3 6011: template> 6011: iterator 6011: insert(const_iterator __p, _InputIterator __beg, _InputIterator __end) 6011: { 6011: ; 6011: const size_type __pos = __p - begin(); 6011: this->replace(__p, __p, __beg, __end); 6011: return iterator(this->_M_data() + __pos); 6011: } 6011: # 1591 "/usr/include/c++/8/bits/basic_string.h" 3 6011: void 6011: insert(iterator __p, initializer_list<_CharT> __l) 6011: { 6011: ; 6011: this->insert(__p - begin(), __l.begin(), __l.size()); 6011: } 6011: # 1611 "/usr/include/c++/8/bits/basic_string.h" 3 6011: basic_string& 6011: insert(size_type __pos1, const basic_string& __str) 6011: { return this->replace(__pos1, size_type(0), 6011: __str._M_data(), __str.size()); } 6011: # 1634 "/usr/include/c++/8/bits/basic_string.h" 3 6011: basic_string& 6011: insert(size_type __pos1, const basic_string& __str, 6011: size_type __pos2, size_type __n) 6011: { return this->replace(__pos1, size_type(0), __str._M_data() 6011: + __str._M_check(__pos2, "basic_string::insert"), 6011: __str._M_limit(__pos2, __n)); } 6011: # 1657 "/usr/include/c++/8/bits/basic_string.h" 3 6011: basic_string& 6011: insert(size_type __pos, const _CharT* __s, size_type __n) 6011: { return this->replace(__pos, size_type(0), __s, __n); } 6011: # 1676 "/usr/include/c++/8/bits/basic_string.h" 3 6011: basic_string& 6011: insert(size_type __pos, const _CharT* __s) 6011: { 6011: ; 6011: return this->replace(__pos, size_type(0), __s, 6011: traits_type::length(__s)); 6011: } 6011: # 1700 "/usr/include/c++/8/bits/basic_string.h" 3 6011: basic_string& 6011: insert(size_type __pos, size_type __n, _CharT __c) 6011: { return _M_replace_aux(_M_check(__pos, "basic_string::insert"), 6011: size_type(0), __n, __c); } 6011: # 1718 "/usr/include/c++/8/bits/basic_string.h" 3 6011: iterator 6011: insert(__const_iterator __p, _CharT __c) 6011: { 6011: ; 6011: const size_type __pos = __p - begin(); 6011: _M_replace_aux(__pos, size_type(0), size_type(1), __c); 6011: return iterator(_M_data() + __pos); 6011: } 6011: # 1778 "/usr/include/c++/8/bits/basic_string.h" 3 6011: basic_string& 6011: erase(size_type __pos = 0, size_type __n = npos) 6011: { 6011: _M_check(__pos, "basic_string::erase"); 6011: if (__n == npos) 6011: this->_M_set_length(__pos); 6011: else if (__n != 0) 6011: this->_M_erase(__pos, _M_limit(__pos, __n)); 6011: return *this; 6011: } 6011: # 1797 "/usr/include/c++/8/bits/basic_string.h" 3 6011: iterator 6011: erase(__const_iterator __position) 6011: { 6011: 6011: ; 6011: const size_type __pos = __position - begin(); 6011: this->_M_erase(__pos, size_type(1)); 6011: return iterator(_M_data() + __pos); 6011: } 6011: # 1816 "/usr/include/c++/8/bits/basic_string.h" 3 6011: iterator 6011: erase(__const_iterator __first, __const_iterator __last) 6011: { 6011: 6011: ; 6011: const size_type __pos = __first - begin(); 6011: if (__last == end()) 6011: this->_M_set_length(__pos); 6011: else 6011: this->_M_erase(__pos, __last - __first); 6011: return iterator(this->_M_data() + __pos); 6011: } 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: void 6011: pop_back() noexcept 6011: { 6011: ; 6011: _M_erase(size() - 1, 1); 6011: } 6011: # 1860 "/usr/include/c++/8/bits/basic_string.h" 3 6011: basic_string& 6011: replace(size_type __pos, size_type __n, const basic_string& __str) 6011: { return this->replace(__pos, __n, __str._M_data(), __str.size()); } 6011: # 1882 "/usr/include/c++/8/bits/basic_string.h" 3 6011: basic_string& 6011: replace(size_type __pos1, size_type __n1, const basic_string& __str, 6011: size_type __pos2, size_type __n2) 6011: { return this->replace(__pos1, __n1, __str._M_data() 6011: + __str._M_check(__pos2, "basic_string::replace"), 6011: __str._M_limit(__pos2, __n2)); } 6011: # 1907 "/usr/include/c++/8/bits/basic_string.h" 3 6011: basic_string& 6011: replace(size_type __pos, size_type __n1, const _CharT* __s, 6011: size_type __n2) 6011: { 6011: ; 6011: return _M_replace(_M_check(__pos, "basic_string::replace"), 6011: _M_limit(__pos, __n1), __s, __n2); 6011: } 6011: # 1932 "/usr/include/c++/8/bits/basic_string.h" 3 6011: basic_string& 6011: replace(size_type __pos, size_type __n1, const _CharT* __s) 6011: { 6011: ; 6011: return this->replace(__pos, __n1, __s, traits_type::length(__s)); 6011: } 6011: # 1956 "/usr/include/c++/8/bits/basic_string.h" 3 6011: basic_string& 6011: replace(size_type __pos, size_type __n1, size_type __n2, _CharT __c) 6011: { return _M_replace_aux(_M_check(__pos, "basic_string::replace"), 6011: _M_limit(__pos, __n1), __n2, __c); } 6011: # 1974 "/usr/include/c++/8/bits/basic_string.h" 3 6011: basic_string& 6011: replace(__const_iterator __i1, __const_iterator __i2, 6011: const basic_string& __str) 6011: { return this->replace(__i1, __i2, __str._M_data(), __str.size()); } 6011: # 1994 "/usr/include/c++/8/bits/basic_string.h" 3 6011: basic_string& 6011: replace(__const_iterator __i1, __const_iterator __i2, 6011: const _CharT* __s, size_type __n) 6011: { 6011: 6011: ; 6011: return this->replace(__i1 - begin(), __i2 - __i1, __s, __n); 6011: } 6011: # 2016 "/usr/include/c++/8/bits/basic_string.h" 3 6011: basic_string& 6011: replace(__const_iterator __i1, __const_iterator __i2, const _CharT* __s) 6011: { 6011: ; 6011: return this->replace(__i1, __i2, __s, traits_type::length(__s)); 6011: } 6011: # 2037 "/usr/include/c++/8/bits/basic_string.h" 3 6011: basic_string& 6011: replace(__const_iterator __i1, __const_iterator __i2, size_type __n, 6011: _CharT __c) 6011: { 6011: 6011: ; 6011: return _M_replace_aux(__i1 - begin(), __i2 - __i1, __n, __c); 6011: } 6011: # 2062 "/usr/include/c++/8/bits/basic_string.h" 3 6011: template> 6011: basic_string& 6011: replace(const_iterator __i1, const_iterator __i2, 6011: _InputIterator __k1, _InputIterator __k2) 6011: { 6011: 6011: ; 6011: ; 6011: return this->_M_replace_dispatch(__i1, __i2, __k1, __k2, 6011: std::__false_type()); 6011: } 6011: # 2094 "/usr/include/c++/8/bits/basic_string.h" 3 6011: basic_string& 6011: replace(__const_iterator __i1, __const_iterator __i2, 6011: _CharT* __k1, _CharT* __k2) 6011: { 6011: 6011: ; 6011: ; 6011: return this->replace(__i1 - begin(), __i2 - __i1, 6011: __k1, __k2 - __k1); 6011: } 6011: 6011: basic_string& 6011: replace(__const_iterator __i1, __const_iterator __i2, 6011: const _CharT* __k1, const _CharT* __k2) 6011: { 6011: 6011: ; 6011: ; 6011: return this->replace(__i1 - begin(), __i2 - __i1, 6011: __k1, __k2 - __k1); 6011: } 6011: 6011: basic_string& 6011: replace(__const_iterator __i1, __const_iterator __i2, 6011: iterator __k1, iterator __k2) 6011: { 6011: 6011: ; 6011: ; 6011: return this->replace(__i1 - begin(), __i2 - __i1, 6011: __k1.base(), __k2 - __k1); 6011: } 6011: 6011: basic_string& 6011: replace(__const_iterator __i1, __const_iterator __i2, 6011: const_iterator __k1, const_iterator __k2) 6011: { 6011: 6011: ; 6011: ; 6011: return this->replace(__i1 - begin(), __i2 - __i1, 6011: __k1.base(), __k2 - __k1); 6011: } 6011: # 2153 "/usr/include/c++/8/bits/basic_string.h" 3 6011: basic_string& replace(const_iterator __i1, const_iterator __i2, 6011: initializer_list<_CharT> __l) 6011: { return this->replace(__i1, __i2, __l.begin(), __l.size()); } 6011: # 2212 "/usr/include/c++/8/bits/basic_string.h" 3 6011: private: 6011: template 6011: basic_string& 6011: _M_replace_dispatch(const_iterator __i1, const_iterator __i2, 6011: _Integer __n, _Integer __val, __true_type) 6011: { return _M_replace_aux(__i1 - begin(), __i2 - __i1, __n, __val); } 6011: 6011: template 6011: basic_string& 6011: _M_replace_dispatch(const_iterator __i1, const_iterator __i2, 6011: _InputIterator __k1, _InputIterator __k2, 6011: __false_type); 6011: 6011: basic_string& 6011: _M_replace_aux(size_type __pos1, size_type __n1, size_type __n2, 6011: _CharT __c); 6011: 6011: basic_string& 6011: _M_replace(size_type __pos, size_type __len1, const _CharT* __s, 6011: const size_type __len2); 6011: 6011: basic_string& 6011: _M_append(const _CharT* __s, size_type __n); 6011: 6011: public: 6011: # 2250 "/usr/include/c++/8/bits/basic_string.h" 3 6011: size_type 6011: copy(_CharT* __s, size_type __n, size_type __pos = 0) const; 6011: # 2260 "/usr/include/c++/8/bits/basic_string.h" 3 6011: void 6011: swap(basic_string& __s) noexcept; 6011: # 2270 "/usr/include/c++/8/bits/basic_string.h" 3 6011: const _CharT* 6011: c_str() const noexcept 6011: { return _M_data(); } 6011: # 2282 "/usr/include/c++/8/bits/basic_string.h" 3 6011: const _CharT* 6011: data() const noexcept 6011: { return _M_data(); } 6011: # 2301 "/usr/include/c++/8/bits/basic_string.h" 3 6011: allocator_type 6011: get_allocator() const noexcept 6011: { return _M_get_allocator(); } 6011: # 2317 "/usr/include/c++/8/bits/basic_string.h" 3 6011: size_type 6011: find(const _CharT* __s, size_type __pos, size_type __n) const 6011: noexcept; 6011: # 2331 "/usr/include/c++/8/bits/basic_string.h" 3 6011: size_type 6011: find(const basic_string& __str, size_type __pos = 0) const 6011: noexcept 6011: { return this->find(__str.data(), __pos, __str.size()); } 6011: # 2363 "/usr/include/c++/8/bits/basic_string.h" 3 6011: size_type 6011: find(const _CharT* __s, size_type __pos = 0) const noexcept 6011: { 6011: ; 6011: return this->find(__s, __pos, traits_type::length(__s)); 6011: } 6011: # 2380 "/usr/include/c++/8/bits/basic_string.h" 3 6011: size_type 6011: find(_CharT __c, size_type __pos = 0) const noexcept; 6011: # 2393 "/usr/include/c++/8/bits/basic_string.h" 3 6011: size_type 6011: rfind(const basic_string& __str, size_type __pos = npos) const 6011: noexcept 6011: { return this->rfind(__str.data(), __pos, __str.size()); } 6011: # 2427 "/usr/include/c++/8/bits/basic_string.h" 3 6011: size_type 6011: rfind(const _CharT* __s, size_type __pos, size_type __n) const 6011: noexcept; 6011: # 2441 "/usr/include/c++/8/bits/basic_string.h" 3 6011: size_type 6011: rfind(const _CharT* __s, size_type __pos = npos) const 6011: { 6011: ; 6011: return this->rfind(__s, __pos, traits_type::length(__s)); 6011: } 6011: # 2458 "/usr/include/c++/8/bits/basic_string.h" 3 6011: size_type 6011: rfind(_CharT __c, size_type __pos = npos) const noexcept; 6011: # 2472 "/usr/include/c++/8/bits/basic_string.h" 3 6011: size_type 6011: find_first_of(const basic_string& __str, size_type __pos = 0) const 6011: noexcept 6011: { return this->find_first_of(__str.data(), __pos, __str.size()); } 6011: # 2507 "/usr/include/c++/8/bits/basic_string.h" 3 6011: size_type 6011: find_first_of(const _CharT* __s, size_type __pos, size_type __n) const 6011: noexcept; 6011: # 2521 "/usr/include/c++/8/bits/basic_string.h" 3 6011: size_type 6011: find_first_of(const _CharT* __s, size_type __pos = 0) const 6011: noexcept 6011: { 6011: ; 6011: return this->find_first_of(__s, __pos, traits_type::length(__s)); 6011: } 6011: # 2541 "/usr/include/c++/8/bits/basic_string.h" 3 6011: size_type 6011: find_first_of(_CharT __c, size_type __pos = 0) const noexcept 6011: { return this->find(__c, __pos); } 6011: # 2556 "/usr/include/c++/8/bits/basic_string.h" 3 6011: size_type 6011: find_last_of(const basic_string& __str, size_type __pos = npos) const 6011: noexcept 6011: { return this->find_last_of(__str.data(), __pos, __str.size()); } 6011: # 2591 "/usr/include/c++/8/bits/basic_string.h" 3 6011: size_type 6011: find_last_of(const _CharT* __s, size_type __pos, size_type __n) const 6011: noexcept; 6011: # 2605 "/usr/include/c++/8/bits/basic_string.h" 3 6011: size_type 6011: find_last_of(const _CharT* __s, size_type __pos = npos) const 6011: noexcept 6011: { 6011: ; 6011: return this->find_last_of(__s, __pos, traits_type::length(__s)); 6011: } 6011: # 2625 "/usr/include/c++/8/bits/basic_string.h" 3 6011: size_type 6011: find_last_of(_CharT __c, size_type __pos = npos) const noexcept 6011: { return this->rfind(__c, __pos); } 6011: # 2639 "/usr/include/c++/8/bits/basic_string.h" 3 6011: size_type 6011: find_first_not_of(const basic_string& __str, size_type __pos = 0) const 6011: noexcept 6011: { return this->find_first_not_of(__str.data(), __pos, __str.size()); } 6011: # 2674 "/usr/include/c++/8/bits/basic_string.h" 3 6011: size_type 6011: find_first_not_of(const _CharT* __s, size_type __pos, 6011: size_type __n) const noexcept; 6011: # 2688 "/usr/include/c++/8/bits/basic_string.h" 3 6011: size_type 6011: find_first_not_of(const _CharT* __s, size_type __pos = 0) const 6011: noexcept 6011: { 6011: ; 6011: return this->find_first_not_of(__s, __pos, traits_type::length(__s)); 6011: } 6011: # 2706 "/usr/include/c++/8/bits/basic_string.h" 3 6011: size_type 6011: find_first_not_of(_CharT __c, size_type __pos = 0) const 6011: noexcept; 6011: # 2721 "/usr/include/c++/8/bits/basic_string.h" 3 6011: size_type 6011: find_last_not_of(const basic_string& __str, size_type __pos = npos) const 6011: noexcept 6011: { return this->find_last_not_of(__str.data(), __pos, __str.size()); } 6011: # 2756 "/usr/include/c++/8/bits/basic_string.h" 3 6011: size_type 6011: find_last_not_of(const _CharT* __s, size_type __pos, 6011: size_type __n) const noexcept; 6011: # 2770 "/usr/include/c++/8/bits/basic_string.h" 3 6011: size_type 6011: find_last_not_of(const _CharT* __s, size_type __pos = npos) const 6011: noexcept 6011: { 6011: ; 6011: return this->find_last_not_of(__s, __pos, traits_type::length(__s)); 6011: } 6011: # 2788 "/usr/include/c++/8/bits/basic_string.h" 3 6011: size_type 6011: find_last_not_of(_CharT __c, size_type __pos = npos) const 6011: noexcept; 6011: # 2804 "/usr/include/c++/8/bits/basic_string.h" 3 6011: basic_string 6011: substr(size_type __pos = 0, size_type __n = npos) const 6011: { return basic_string(*this, 6011: _M_check(__pos, "basic_string::substr"), __n); } 6011: # 2823 "/usr/include/c++/8/bits/basic_string.h" 3 6011: int 6011: compare(const basic_string& __str) const 6011: { 6011: const size_type __size = this->size(); 6011: const size_type __osize = __str.size(); 6011: const size_type __len = std::min(__size, __osize); 6011: 6011: int __r = traits_type::compare(_M_data(), __str.data(), __len); 6011: if (!__r) 6011: __r = _S_compare(__size, __osize); 6011: return __r; 6011: } 6011: # 2916 "/usr/include/c++/8/bits/basic_string.h" 3 6011: int 6011: compare(size_type __pos, size_type __n, const basic_string& __str) const; 6011: # 2942 "/usr/include/c++/8/bits/basic_string.h" 3 6011: int 6011: compare(size_type __pos1, size_type __n1, const basic_string& __str, 6011: size_type __pos2, size_type __n2) const; 6011: # 2960 "/usr/include/c++/8/bits/basic_string.h" 3 6011: int 6011: compare(const _CharT* __s) const noexcept; 6011: # 2984 "/usr/include/c++/8/bits/basic_string.h" 3 6011: int 6011: compare(size_type __pos, size_type __n1, const _CharT* __s) const; 6011: # 3011 "/usr/include/c++/8/bits/basic_string.h" 3 6011: int 6011: compare(size_type __pos, size_type __n1, const _CharT* __s, 6011: size_type __n2) const; 6011: 6011: 6011: template friend class basic_stringbuf; 6011: }; 6011: } 6011: # 5886 "/usr/include/c++/8/bits/basic_string.h" 3 6011: template 6011: basic_string<_CharT, _Traits, _Alloc> 6011: operator+(const basic_string<_CharT, _Traits, _Alloc>& __lhs, 6011: const basic_string<_CharT, _Traits, _Alloc>& __rhs) 6011: { 6011: basic_string<_CharT, _Traits, _Alloc> __str(__lhs); 6011: __str.append(__rhs); 6011: return __str; 6011: } 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: template 6011: basic_string<_CharT,_Traits,_Alloc> 6011: operator+(const _CharT* __lhs, 6011: const basic_string<_CharT,_Traits,_Alloc>& __rhs); 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: template 6011: basic_string<_CharT,_Traits,_Alloc> 6011: operator+(_CharT __lhs, const basic_string<_CharT,_Traits,_Alloc>& __rhs); 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: template 6011: inline basic_string<_CharT, _Traits, _Alloc> 6011: operator+(const basic_string<_CharT, _Traits, _Alloc>& __lhs, 6011: const _CharT* __rhs) 6011: { 6011: basic_string<_CharT, _Traits, _Alloc> __str(__lhs); 6011: __str.append(__rhs); 6011: return __str; 6011: } 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: template 6011: inline basic_string<_CharT, _Traits, _Alloc> 6011: operator+(const basic_string<_CharT, _Traits, _Alloc>& __lhs, _CharT __rhs) 6011: { 6011: typedef basic_string<_CharT, _Traits, _Alloc> __string_type; 6011: typedef typename __string_type::size_type __size_type; 6011: __string_type __str(__lhs); 6011: __str.append(__size_type(1), __rhs); 6011: return __str; 6011: } 6011: 6011: 6011: template 6011: inline basic_string<_CharT, _Traits, _Alloc> 6011: operator+(basic_string<_CharT, _Traits, _Alloc>&& __lhs, 6011: const basic_string<_CharT, _Traits, _Alloc>& __rhs) 6011: { return std::move(__lhs.append(__rhs)); } 6011: 6011: template 6011: inline basic_string<_CharT, _Traits, _Alloc> 6011: operator+(const basic_string<_CharT, _Traits, _Alloc>& __lhs, 6011: basic_string<_CharT, _Traits, _Alloc>&& __rhs) 6011: { return std::move(__rhs.insert(0, __lhs)); } 6011: 6011: template 6011: inline basic_string<_CharT, _Traits, _Alloc> 6011: operator+(basic_string<_CharT, _Traits, _Alloc>&& __lhs, 6011: basic_string<_CharT, _Traits, _Alloc>&& __rhs) 6011: { 6011: const auto __size = __lhs.size() + __rhs.size(); 6011: const bool __cond = (__size > __lhs.capacity() 6011: && __size <= __rhs.capacity()); 6011: return __cond ? std::move(__rhs.insert(0, __lhs)) 6011: : std::move(__lhs.append(__rhs)); 6011: } 6011: 6011: template 6011: inline basic_string<_CharT, _Traits, _Alloc> 6011: operator+(const _CharT* __lhs, 6011: basic_string<_CharT, _Traits, _Alloc>&& __rhs) 6011: { return std::move(__rhs.insert(0, __lhs)); } 6011: 6011: template 6011: inline basic_string<_CharT, _Traits, _Alloc> 6011: operator+(_CharT __lhs, 6011: basic_string<_CharT, _Traits, _Alloc>&& __rhs) 6011: { return std::move(__rhs.insert(0, 1, __lhs)); } 6011: 6011: template 6011: inline basic_string<_CharT, _Traits, _Alloc> 6011: operator+(basic_string<_CharT, _Traits, _Alloc>&& __lhs, 6011: const _CharT* __rhs) 6011: { return std::move(__lhs.append(__rhs)); } 6011: 6011: template 6011: inline basic_string<_CharT, _Traits, _Alloc> 6011: operator+(basic_string<_CharT, _Traits, _Alloc>&& __lhs, 6011: _CharT __rhs) 6011: { return std::move(__lhs.append(1, __rhs)); } 6011: # 6007 "/usr/include/c++/8/bits/basic_string.h" 3 6011: template 6011: inline bool 6011: operator==(const basic_string<_CharT, _Traits, _Alloc>& __lhs, 6011: const basic_string<_CharT, _Traits, _Alloc>& __rhs) 6011: noexcept 6011: { return __lhs.compare(__rhs) == 0; } 6011: 6011: template 6011: inline 6011: typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value, bool>::__type 6011: operator==(const basic_string<_CharT>& __lhs, 6011: const basic_string<_CharT>& __rhs) noexcept 6011: { return (__lhs.size() == __rhs.size() 6011: && !std::char_traits<_CharT>::compare(__lhs.data(), __rhs.data(), 6011: __lhs.size())); } 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: template 6011: inline bool 6011: operator==(const _CharT* __lhs, 6011: const basic_string<_CharT, _Traits, _Alloc>& __rhs) 6011: { return __rhs.compare(__lhs) == 0; } 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: template 6011: inline bool 6011: operator==(const basic_string<_CharT, _Traits, _Alloc>& __lhs, 6011: const _CharT* __rhs) 6011: { return __lhs.compare(__rhs) == 0; } 6011: # 6054 "/usr/include/c++/8/bits/basic_string.h" 3 6011: template 6011: inline bool 6011: operator!=(const basic_string<_CharT, _Traits, _Alloc>& __lhs, 6011: const basic_string<_CharT, _Traits, _Alloc>& __rhs) 6011: noexcept 6011: { return !(__lhs == __rhs); } 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: template 6011: inline bool 6011: operator!=(const _CharT* __lhs, 6011: const basic_string<_CharT, _Traits, _Alloc>& __rhs) 6011: { return !(__lhs == __rhs); } 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: template 6011: inline bool 6011: operator!=(const basic_string<_CharT, _Traits, _Alloc>& __lhs, 6011: const _CharT* __rhs) 6011: { return !(__lhs == __rhs); } 6011: # 6092 "/usr/include/c++/8/bits/basic_string.h" 3 6011: template 6011: inline bool 6011: operator<(const basic_string<_CharT, _Traits, _Alloc>& __lhs, 6011: const basic_string<_CharT, _Traits, _Alloc>& __rhs) 6011: noexcept 6011: { return __lhs.compare(__rhs) < 0; } 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: template 6011: inline bool 6011: operator<(const basic_string<_CharT, _Traits, _Alloc>& __lhs, 6011: const _CharT* __rhs) 6011: { return __lhs.compare(__rhs) < 0; } 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: template 6011: inline bool 6011: operator<(const _CharT* __lhs, 6011: const basic_string<_CharT, _Traits, _Alloc>& __rhs) 6011: { return __rhs.compare(__lhs) > 0; } 6011: # 6130 "/usr/include/c++/8/bits/basic_string.h" 3 6011: template 6011: inline bool 6011: operator>(const basic_string<_CharT, _Traits, _Alloc>& __lhs, 6011: const basic_string<_CharT, _Traits, _Alloc>& __rhs) 6011: noexcept 6011: { return __lhs.compare(__rhs) > 0; } 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: template 6011: inline bool 6011: operator>(const basic_string<_CharT, _Traits, _Alloc>& __lhs, 6011: const _CharT* __rhs) 6011: { return __lhs.compare(__rhs) > 0; } 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: template 6011: inline bool 6011: operator>(const _CharT* __lhs, 6011: const basic_string<_CharT, _Traits, _Alloc>& __rhs) 6011: { return __rhs.compare(__lhs) < 0; } 6011: # 6168 "/usr/include/c++/8/bits/basic_string.h" 3 6011: template 6011: inline bool 6011: operator<=(const basic_string<_CharT, _Traits, _Alloc>& __lhs, 6011: const basic_string<_CharT, _Traits, _Alloc>& __rhs) 6011: noexcept 6011: { return __lhs.compare(__rhs) <= 0; } 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: template 6011: inline bool 6011: operator<=(const basic_string<_CharT, _Traits, _Alloc>& __lhs, 6011: const _CharT* __rhs) 6011: { return __lhs.compare(__rhs) <= 0; } 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: template 6011: inline bool 6011: operator<=(const _CharT* __lhs, 6011: const basic_string<_CharT, _Traits, _Alloc>& __rhs) 6011: { return __rhs.compare(__lhs) >= 0; } 6011: # 6206 "/usr/include/c++/8/bits/basic_string.h" 3 6011: template 6011: inline bool 6011: operator>=(const basic_string<_CharT, _Traits, _Alloc>& __lhs, 6011: const basic_string<_CharT, _Traits, _Alloc>& __rhs) 6011: noexcept 6011: { return __lhs.compare(__rhs) >= 0; } 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: template 6011: inline bool 6011: operator>=(const basic_string<_CharT, _Traits, _Alloc>& __lhs, 6011: const _CharT* __rhs) 6011: { return __lhs.compare(__rhs) >= 0; } 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: template 6011: inline bool 6011: operator>=(const _CharT* __lhs, 6011: const basic_string<_CharT, _Traits, _Alloc>& __rhs) 6011: { return __rhs.compare(__lhs) <= 0; } 6011: # 6244 "/usr/include/c++/8/bits/basic_string.h" 3 6011: template 6011: inline void 6011: swap(basic_string<_CharT, _Traits, _Alloc>& __lhs, 6011: basic_string<_CharT, _Traits, _Alloc>& __rhs) 6011: noexcept(noexcept(__lhs.swap(__rhs))) 6011: { __lhs.swap(__rhs); } 6011: # 6264 "/usr/include/c++/8/bits/basic_string.h" 3 6011: template 6011: basic_istream<_CharT, _Traits>& 6011: operator>>(basic_istream<_CharT, _Traits>& __is, 6011: basic_string<_CharT, _Traits, _Alloc>& __str); 6011: 6011: template<> 6011: basic_istream& 6011: operator>>(basic_istream& __is, basic_string& __str); 6011: # 6282 "/usr/include/c++/8/bits/basic_string.h" 3 6011: template 6011: inline basic_ostream<_CharT, _Traits>& 6011: operator<<(basic_ostream<_CharT, _Traits>& __os, 6011: const basic_string<_CharT, _Traits, _Alloc>& __str) 6011: { 6011: 6011: 6011: return __ostream_insert(__os, __str.data(), __str.size()); 6011: } 6011: # 6305 "/usr/include/c++/8/bits/basic_string.h" 3 6011: template 6011: basic_istream<_CharT, _Traits>& 6011: getline(basic_istream<_CharT, _Traits>& __is, 6011: basic_string<_CharT, _Traits, _Alloc>& __str, _CharT __delim); 6011: # 6322 "/usr/include/c++/8/bits/basic_string.h" 3 6011: template 6011: inline basic_istream<_CharT, _Traits>& 6011: getline(basic_istream<_CharT, _Traits>& __is, 6011: basic_string<_CharT, _Traits, _Alloc>& __str) 6011: { return std::getline(__is, __str, __is.widen('\n')); } 6011: 6011: 6011: 6011: template 6011: inline basic_istream<_CharT, _Traits>& 6011: getline(basic_istream<_CharT, _Traits>&& __is, 6011: basic_string<_CharT, _Traits, _Alloc>& __str, _CharT __delim) 6011: { return std::getline(__is, __str, __delim); } 6011: 6011: 6011: template 6011: inline basic_istream<_CharT, _Traits>& 6011: getline(basic_istream<_CharT, _Traits>&& __is, 6011: basic_string<_CharT, _Traits, _Alloc>& __str) 6011: { return std::getline(__is, __str); } 6011: 6011: 6011: template<> 6011: basic_istream& 6011: getline(basic_istream& __in, basic_string& __str, 6011: char __delim); 6011: 6011: 6011: template<> 6011: basic_istream& 6011: getline(basic_istream& __in, basic_string& __str, 6011: wchar_t __delim); 6011: 6011: 6011: 6011: } 6011: 6011: 6011: 6011: # 1 "/usr/include/c++/8/ext/string_conversions.h" 1 3 6011: # 32 "/usr/include/c++/8/ext/string_conversions.h" 3 6011: 6011: # 33 "/usr/include/c++/8/ext/string_conversions.h" 3 6011: # 41 "/usr/include/c++/8/ext/string_conversions.h" 3 6011: # 1 "/usr/include/c++/8/cstdlib" 1 3 6011: # 39 "/usr/include/c++/8/cstdlib" 3 6011: 6011: # 40 "/usr/include/c++/8/cstdlib" 3 6011: # 75 "/usr/include/c++/8/cstdlib" 3 6011: # 1 "/usr/include/stdlib.h" 1 3 4 6011: # 25 "/usr/include/stdlib.h" 3 4 6011: # 1 "/usr/include/arm-linux-gnueabihf/bits/libc-header-start.h" 1 3 4 6011: # 26 "/usr/include/stdlib.h" 2 3 4 6011: 6011: 6011: 6011: 6011: 6011: # 1 "/usr/lib/gcc/arm-linux-gnueabihf/8/include/stddef.h" 1 3 4 6011: # 32 "/usr/include/stdlib.h" 2 3 4 6011: 6011: extern "C" { 6011: 6011: 6011: 6011: 6011: 6011: # 1 "/usr/include/arm-linux-gnueabihf/bits/waitflags.h" 1 3 4 6011: # 52 "/usr/include/arm-linux-gnueabihf/bits/waitflags.h" 3 4 6011: typedef enum 6011: { 6011: P_ALL, 6011: P_PID, 6011: P_PGID 6011: } idtype_t; 6011: # 40 "/usr/include/stdlib.h" 2 3 4 6011: # 1 "/usr/include/arm-linux-gnueabihf/bits/waitstatus.h" 1 3 4 6011: # 41 "/usr/include/stdlib.h" 2 3 4 6011: # 55 "/usr/include/stdlib.h" 3 4 6011: # 1 "/usr/include/arm-linux-gnueabihf/bits/floatn.h" 1 3 4 6011: # 56 "/usr/include/stdlib.h" 2 3 4 6011: 6011: 6011: typedef struct 6011: { 6011: int quot; 6011: int rem; 6011: } div_t; 6011: 6011: 6011: 6011: typedef struct 6011: { 6011: long int quot; 6011: long int rem; 6011: } ldiv_t; 6011: 6011: 6011: 6011: 6011: 6011: __extension__ typedef struct 6011: { 6011: long long int quot; 6011: long long int rem; 6011: } lldiv_t; 6011: # 97 "/usr/include/stdlib.h" 3 4 6011: extern size_t __ctype_get_mb_cur_max (void) throw () __attribute__ ((__warn_unused_result__)); 6011: 6011: 6011: 6011: extern double atof (const char *__nptr) 6011: throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); 6011: 6011: extern int atoi (const char *__nptr) 6011: throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); 6011: 6011: extern long int atol (const char *__nptr) 6011: throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); 6011: 6011: 6011: 6011: __extension__ extern long long int atoll (const char *__nptr) 6011: throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); 6011: 6011: 6011: 6011: extern double strtod (const char *__restrict __nptr, 6011: char **__restrict __endptr) 6011: throw () __attribute__ ((__nonnull__ (1))); 6011: 6011: 6011: 6011: extern float strtof (const char *__restrict __nptr, 6011: char **__restrict __endptr) throw () __attribute__ ((__nonnull__ (1))); 6011: 6011: extern long double strtold (const char *__restrict __nptr, 6011: char **__restrict __endptr) 6011: throw () __attribute__ ((__nonnull__ (1))); 6011: # 139 "/usr/include/stdlib.h" 3 4 6011: extern long int strtol (const char *__restrict __nptr, 6011: char **__restrict __endptr, int __base) 6011: throw () __attribute__ ((__nonnull__ (1))); 6011: 6011: extern unsigned long int strtoul (const char *__restrict __nptr, 6011: char **__restrict __endptr, int __base) 6011: throw () __attribute__ ((__nonnull__ (1))); 6011: 6011: 6011: 6011: __extension__ 6011: extern long long int strtoq (const char *__restrict __nptr, 6011: char **__restrict __endptr, int __base) 6011: throw () __attribute__ ((__nonnull__ (1))); 6011: 6011: __extension__ 6011: extern unsigned long long int strtouq (const char *__restrict __nptr, 6011: char **__restrict __endptr, int __base) 6011: throw () __attribute__ ((__nonnull__ (1))); 6011: 6011: 6011: 6011: 6011: __extension__ 6011: extern long long int strtoll (const char *__restrict __nptr, 6011: char **__restrict __endptr, int __base) 6011: throw () __attribute__ ((__nonnull__ (1))); 6011: 6011: __extension__ 6011: extern unsigned long long int strtoull (const char *__restrict __nptr, 6011: char **__restrict __endptr, int __base) 6011: throw () __attribute__ ((__nonnull__ (1))); 6011: 6011: 6011: 6011: 6011: extern int strfromd (char *__dest, size_t __size, const char *__format, 6011: double __f) 6011: throw () __attribute__ ((__nonnull__ (3))); 6011: 6011: extern int strfromf (char *__dest, size_t __size, const char *__format, 6011: float __f) 6011: throw () __attribute__ ((__nonnull__ (3))); 6011: 6011: extern int strfroml (char *__dest, size_t __size, const char *__format, 6011: long double __f) 6011: throw () __attribute__ ((__nonnull__ (3))); 6011: # 201 "/usr/include/stdlib.h" 3 4 6011: extern long int strtol_l (const char *__restrict __nptr, 6011: char **__restrict __endptr, int __base, 6011: locale_t __loc) throw () __attribute__ ((__nonnull__ (1, 4))); 6011: 6011: extern unsigned long int strtoul_l (const char *__restrict __nptr, 6011: char **__restrict __endptr, 6011: int __base, locale_t __loc) 6011: throw () __attribute__ ((__nonnull__ (1, 4))); 6011: 6011: __extension__ 6011: extern long long int strtoll_l (const char *__restrict __nptr, 6011: char **__restrict __endptr, int __base, 6011: locale_t __loc) 6011: throw () __attribute__ ((__nonnull__ (1, 4))); 6011: 6011: __extension__ 6011: extern unsigned long long int strtoull_l (const char *__restrict __nptr, 6011: char **__restrict __endptr, 6011: int __base, locale_t __loc) 6011: throw () __attribute__ ((__nonnull__ (1, 4))); 6011: 6011: extern double strtod_l (const char *__restrict __nptr, 6011: char **__restrict __endptr, locale_t __loc) 6011: throw () __attribute__ ((__nonnull__ (1, 3))); 6011: 6011: extern float strtof_l (const char *__restrict __nptr, 6011: char **__restrict __endptr, locale_t __loc) 6011: throw () __attribute__ ((__nonnull__ (1, 3))); 6011: 6011: extern long double strtold_l (const char *__restrict __nptr, 6011: char **__restrict __endptr, 6011: locale_t __loc) 6011: throw () __attribute__ ((__nonnull__ (1, 3))); 6011: # 245 "/usr/include/stdlib.h" 3 4 6011: extern __inline __attribute__ ((__gnu_inline__)) int 6011: __attribute__ ((__leaf__)) atoi (const char *__nptr) throw () 6011: { 6011: return (int) strtol (__nptr, (char **) __null, 10); 6011: } 6011: extern __inline __attribute__ ((__gnu_inline__)) long int 6011: __attribute__ ((__leaf__)) atol (const char *__nptr) throw () 6011: { 6011: return strtol (__nptr, (char **) __null, 10); 6011: } 6011: 6011: 6011: __extension__ extern __inline __attribute__ ((__gnu_inline__)) long long int 6011: __attribute__ ((__leaf__)) atoll (const char *__nptr) throw () 6011: { 6011: return strtoll (__nptr, (char **) __null, 10); 6011: } 6011: # 270 "/usr/include/stdlib.h" 3 4 6011: extern char *l64a (long int __n) throw () __attribute__ ((__warn_unused_result__)); 6011: 6011: 6011: extern long int a64l (const char *__s) 6011: throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); 6011: 6011: 6011: 6011: 6011: # 1 "/usr/include/arm-linux-gnueabihf/sys/types.h" 1 3 4 6011: # 27 "/usr/include/arm-linux-gnueabihf/sys/types.h" 3 4 6011: extern "C" { 6011: 6011: 6011: 6011: 6011: 6011: typedef __u_char u_char; 6011: typedef __u_short u_short; 6011: typedef __u_int u_int; 6011: typedef __u_long u_long; 6011: typedef __quad_t quad_t; 6011: typedef __u_quad_t u_quad_t; 6011: typedef __fsid_t fsid_t; 6011: 6011: 6011: 6011: 6011: typedef __loff_t loff_t; 6011: 6011: 6011: 6011: typedef __ino_t ino_t; 6011: 6011: 6011: 6011: 6011: 6011: 6011: typedef __ino64_t ino64_t; 6011: 6011: 6011: 6011: 6011: typedef __dev_t dev_t; 6011: 6011: 6011: 6011: 6011: typedef __gid_t gid_t; 6011: 6011: 6011: 6011: 6011: typedef __mode_t mode_t; 6011: 6011: 6011: 6011: 6011: typedef __nlink_t nlink_t; 6011: 6011: 6011: 6011: 6011: typedef __uid_t uid_t; 6011: 6011: 6011: 6011: 6011: 6011: typedef __off_t off_t; 6011: 6011: 6011: 6011: 6011: 6011: 6011: typedef __off64_t off64_t; 6011: # 104 "/usr/include/arm-linux-gnueabihf/sys/types.h" 3 4 6011: typedef __id_t id_t; 6011: 6011: 6011: 6011: 6011: typedef __ssize_t ssize_t; 6011: 6011: 6011: 6011: 6011: 6011: typedef __daddr_t daddr_t; 6011: typedef __caddr_t caddr_t; 6011: 6011: 6011: 6011: 6011: 6011: typedef __key_t key_t; 6011: # 135 "/usr/include/arm-linux-gnueabihf/sys/types.h" 3 4 6011: typedef __useconds_t useconds_t; 6011: 6011: 6011: 6011: typedef __suseconds_t suseconds_t; 6011: 6011: 6011: 6011: 6011: 6011: # 1 "/usr/lib/gcc/arm-linux-gnueabihf/8/include/stddef.h" 1 3 4 6011: # 146 "/usr/include/arm-linux-gnueabihf/sys/types.h" 2 3 4 6011: 6011: 6011: 6011: typedef unsigned long int ulong; 6011: typedef unsigned short int ushort; 6011: typedef unsigned int uint; 6011: # 178 "/usr/include/arm-linux-gnueabihf/sys/types.h" 3 4 6011: typedef unsigned int u_int8_t __attribute__ ((__mode__ (__QI__))); 6011: typedef unsigned int u_int16_t __attribute__ ((__mode__ (__HI__))); 6011: typedef unsigned int u_int32_t __attribute__ ((__mode__ (__SI__))); 6011: typedef unsigned int u_int64_t __attribute__ ((__mode__ (__DI__))); 6011: 6011: typedef int register_t __attribute__ ((__mode__ (__word__))); 6011: # 197 "/usr/include/arm-linux-gnueabihf/sys/types.h" 3 4 6011: # 1 "/usr/include/arm-linux-gnueabihf/sys/select.h" 1 3 4 6011: # 30 "/usr/include/arm-linux-gnueabihf/sys/select.h" 3 4 6011: # 1 "/usr/include/arm-linux-gnueabihf/bits/select.h" 1 3 4 6011: # 31 "/usr/include/arm-linux-gnueabihf/sys/select.h" 2 3 4 6011: 6011: 6011: # 1 "/usr/include/arm-linux-gnueabihf/bits/types/sigset_t.h" 1 3 4 6011: 6011: 6011: 6011: # 1 "/usr/include/arm-linux-gnueabihf/bits/types/__sigset_t.h" 1 3 4 6011: 6011: 6011: 6011: 6011: typedef struct 6011: { 6011: unsigned long int __val[(1024 / (8 * sizeof (unsigned long int)))]; 6011: } __sigset_t; 6011: # 5 "/usr/include/arm-linux-gnueabihf/bits/types/sigset_t.h" 2 3 4 6011: 6011: 6011: typedef __sigset_t sigset_t; 6011: # 34 "/usr/include/arm-linux-gnueabihf/sys/select.h" 2 3 4 6011: # 49 "/usr/include/arm-linux-gnueabihf/sys/select.h" 3 4 6011: typedef long int __fd_mask; 6011: # 59 "/usr/include/arm-linux-gnueabihf/sys/select.h" 3 4 6011: typedef struct 6011: { 6011: 6011: 6011: 6011: __fd_mask fds_bits[1024 / (8 * (int) sizeof (__fd_mask))]; 6011: 6011: 6011: 6011: 6011: 6011: } fd_set; 6011: 6011: 6011: 6011: 6011: 6011: 6011: typedef __fd_mask fd_mask; 6011: # 91 "/usr/include/arm-linux-gnueabihf/sys/select.h" 3 4 6011: extern "C" { 6011: # 101 "/usr/include/arm-linux-gnueabihf/sys/select.h" 3 4 6011: extern int select (int __nfds, fd_set *__restrict __readfds, 6011: fd_set *__restrict __writefds, 6011: fd_set *__restrict __exceptfds, 6011: struct timeval *__restrict __timeout); 6011: # 113 "/usr/include/arm-linux-gnueabihf/sys/select.h" 3 4 6011: extern int pselect (int __nfds, fd_set *__restrict __readfds, 6011: fd_set *__restrict __writefds, 6011: fd_set *__restrict __exceptfds, 6011: const struct timespec *__restrict __timeout, 6011: const __sigset_t *__restrict __sigmask); 6011: 6011: 6011: 6011: 6011: 6011: # 1 "/usr/include/arm-linux-gnueabihf/bits/select2.h" 1 3 4 6011: # 24 "/usr/include/arm-linux-gnueabihf/bits/select2.h" 3 4 6011: extern long int __fdelt_chk (long int __d); 6011: extern long int __fdelt_warn (long int __d) 6011: __attribute__((__warning__ ("bit outside of fd_set selected"))); 6011: # 124 "/usr/include/arm-linux-gnueabihf/sys/select.h" 2 3 4 6011: 6011: 6011: } 6011: # 198 "/usr/include/arm-linux-gnueabihf/sys/types.h" 2 3 4 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: # 1 "/usr/include/arm-linux-gnueabihf/sys/sysmacros.h" 1 3 4 6011: # 41 "/usr/include/arm-linux-gnueabihf/sys/sysmacros.h" 3 4 6011: # 1 "/usr/include/arm-linux-gnueabihf/bits/sysmacros.h" 1 3 4 6011: # 42 "/usr/include/arm-linux-gnueabihf/sys/sysmacros.h" 2 3 4 6011: # 71 "/usr/include/arm-linux-gnueabihf/sys/sysmacros.h" 3 4 6011: extern "C" { 6011: 6011: extern unsigned int gnu_dev_major (__dev_t __dev) throw () __attribute__ ((__const__)); 6011: extern unsigned int gnu_dev_minor (__dev_t __dev) throw () __attribute__ ((__const__)); 6011: extern __dev_t gnu_dev_makedev (unsigned int __major, unsigned int __minor) throw () __attribute__ ((__const__)); 6011: 6011: 6011: 6011: __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; } 6011: __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; } 6011: __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; } 6011: 6011: 6011: 6011: } 6011: # 206 "/usr/include/arm-linux-gnueabihf/sys/types.h" 2 3 4 6011: 6011: 6011: 6011: 6011: 6011: 6011: typedef __blksize_t blksize_t; 6011: 6011: 6011: 6011: 6011: 6011: 6011: typedef __blkcnt_t blkcnt_t; 6011: 6011: 6011: 6011: typedef __fsblkcnt_t fsblkcnt_t; 6011: 6011: 6011: 6011: typedef __fsfilcnt_t fsfilcnt_t; 6011: # 246 "/usr/include/arm-linux-gnueabihf/sys/types.h" 3 4 6011: typedef __blkcnt64_t blkcnt64_t; 6011: typedef __fsblkcnt64_t fsblkcnt64_t; 6011: typedef __fsfilcnt64_t fsfilcnt64_t; 6011: # 257 "/usr/include/arm-linux-gnueabihf/sys/types.h" 3 4 6011: } 6011: # 280 "/usr/include/stdlib.h" 2 3 4 6011: 6011: 6011: 6011: 6011: 6011: 6011: extern long int random (void) throw (); 6011: 6011: 6011: extern void srandom (unsigned int __seed) throw (); 6011: 6011: 6011: 6011: 6011: 6011: extern char *initstate (unsigned int __seed, char *__statebuf, 6011: size_t __statelen) throw () __attribute__ ((__nonnull__ (2))); 6011: 6011: 6011: 6011: extern char *setstate (char *__statebuf) throw () __attribute__ ((__nonnull__ (1))); 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: struct random_data 6011: { 6011: int32_t *fptr; 6011: int32_t *rptr; 6011: int32_t *state; 6011: int rand_type; 6011: int rand_deg; 6011: int rand_sep; 6011: int32_t *end_ptr; 6011: }; 6011: 6011: extern int random_r (struct random_data *__restrict __buf, 6011: int32_t *__restrict __result) throw () __attribute__ ((__nonnull__ (1, 2))); 6011: 6011: extern int srandom_r (unsigned int __seed, struct random_data *__buf) 6011: throw () __attribute__ ((__nonnull__ (2))); 6011: 6011: extern int initstate_r (unsigned int __seed, char *__restrict __statebuf, 6011: size_t __statelen, 6011: struct random_data *__restrict __buf) 6011: throw () __attribute__ ((__nonnull__ (2, 4))); 6011: 6011: extern int setstate_r (char *__restrict __statebuf, 6011: struct random_data *__restrict __buf) 6011: throw () __attribute__ ((__nonnull__ (1, 2))); 6011: 6011: 6011: 6011: 6011: 6011: extern int rand (void) throw (); 6011: 6011: extern void srand (unsigned int __seed) throw (); 6011: 6011: 6011: 6011: extern int rand_r (unsigned int *__seed) throw (); 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: extern double drand48 (void) throw (); 6011: extern double erand48 (unsigned short int __xsubi[3]) throw () __attribute__ ((__nonnull__ (1))); 6011: 6011: 6011: extern long int lrand48 (void) throw (); 6011: extern long int nrand48 (unsigned short int __xsubi[3]) 6011: throw () __attribute__ ((__nonnull__ (1))); 6011: 6011: 6011: extern long int mrand48 (void) throw (); 6011: extern long int jrand48 (unsigned short int __xsubi[3]) 6011: throw () __attribute__ ((__nonnull__ (1))); 6011: 6011: 6011: extern void srand48 (long int __seedval) throw (); 6011: extern unsigned short int *seed48 (unsigned short int __seed16v[3]) 6011: throw () __attribute__ ((__nonnull__ (1))); 6011: extern void lcong48 (unsigned short int __param[7]) throw () __attribute__ ((__nonnull__ (1))); 6011: 6011: 6011: 6011: 6011: 6011: struct drand48_data 6011: { 6011: unsigned short int __x[3]; 6011: unsigned short int __old_x[3]; 6011: unsigned short int __c; 6011: unsigned short int __init; 6011: __extension__ unsigned long long int __a; 6011: 6011: }; 6011: 6011: 6011: extern int drand48_r (struct drand48_data *__restrict __buffer, 6011: double *__restrict __result) throw () __attribute__ ((__nonnull__ (1, 2))); 6011: extern int erand48_r (unsigned short int __xsubi[3], 6011: struct drand48_data *__restrict __buffer, 6011: double *__restrict __result) throw () __attribute__ ((__nonnull__ (1, 2))); 6011: 6011: 6011: extern int lrand48_r (struct drand48_data *__restrict __buffer, 6011: long int *__restrict __result) 6011: throw () __attribute__ ((__nonnull__ (1, 2))); 6011: extern int nrand48_r (unsigned short int __xsubi[3], 6011: struct drand48_data *__restrict __buffer, 6011: long int *__restrict __result) 6011: throw () __attribute__ ((__nonnull__ (1, 2))); 6011: 6011: 6011: extern int mrand48_r (struct drand48_data *__restrict __buffer, 6011: long int *__restrict __result) 6011: throw () __attribute__ ((__nonnull__ (1, 2))); 6011: extern int jrand48_r (unsigned short int __xsubi[3], 6011: struct drand48_data *__restrict __buffer, 6011: long int *__restrict __result) 6011: throw () __attribute__ ((__nonnull__ (1, 2))); 6011: 6011: 6011: extern int srand48_r (long int __seedval, struct drand48_data *__buffer) 6011: throw () __attribute__ ((__nonnull__ (2))); 6011: 6011: extern int seed48_r (unsigned short int __seed16v[3], 6011: struct drand48_data *__buffer) throw () __attribute__ ((__nonnull__ (1, 2))); 6011: 6011: extern int lcong48_r (unsigned short int __param[7], 6011: struct drand48_data *__buffer) 6011: throw () __attribute__ ((__nonnull__ (1, 2))); 6011: 6011: 6011: 6011: 6011: extern void *malloc (size_t __size) throw () __attribute__ ((__malloc__)) __attribute__ ((__warn_unused_result__)); 6011: 6011: extern void *calloc (size_t __nmemb, size_t __size) 6011: throw () __attribute__ ((__malloc__)) __attribute__ ((__warn_unused_result__)); 6011: 6011: 6011: 6011: 6011: 6011: 6011: extern void *realloc (void *__ptr, size_t __size) 6011: throw () __attribute__ ((__warn_unused_result__)); 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: extern void *reallocarray (void *__ptr, size_t __nmemb, size_t __size) 6011: throw () __attribute__ ((__warn_unused_result__)); 6011: 6011: 6011: 6011: extern void free (void *__ptr) throw (); 6011: 6011: 6011: # 1 "/usr/include/alloca.h" 1 3 4 6011: # 24 "/usr/include/alloca.h" 3 4 6011: # 1 "/usr/lib/gcc/arm-linux-gnueabihf/8/include/stddef.h" 1 3 4 6011: # 25 "/usr/include/alloca.h" 2 3 4 6011: 6011: extern "C" { 6011: 6011: 6011: 6011: 6011: 6011: extern void *alloca (size_t __size) throw (); 6011: 6011: 6011: 6011: 6011: 6011: } 6011: # 452 "/usr/include/stdlib.h" 2 3 4 6011: 6011: 6011: 6011: 6011: 6011: extern void *valloc (size_t __size) throw () __attribute__ ((__malloc__)) __attribute__ ((__warn_unused_result__)); 6011: 6011: 6011: 6011: 6011: extern int posix_memalign (void **__memptr, size_t __alignment, size_t __size) 6011: throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); 6011: 6011: 6011: 6011: 6011: extern void *aligned_alloc (size_t __alignment, size_t __size) 6011: throw () __attribute__ ((__malloc__)) __attribute__ ((__alloc_size__ (2))) __attribute__ ((__warn_unused_result__)); 6011: 6011: 6011: 6011: extern void abort (void) throw () __attribute__ ((__noreturn__)); 6011: 6011: 6011: 6011: extern int atexit (void (*__func) (void)) throw () __attribute__ ((__nonnull__ (1))); 6011: 6011: 6011: 6011: 6011: extern "C++" int at_quick_exit (void (*__func) (void)) 6011: throw () __asm ("at_quick_exit") __attribute__ ((__nonnull__ (1))); 6011: # 492 "/usr/include/stdlib.h" 3 4 6011: extern int on_exit (void (*__func) (int __status, void *__arg), void *__arg) 6011: throw () __attribute__ ((__nonnull__ (1))); 6011: 6011: 6011: 6011: 6011: 6011: extern void exit (int __status) throw () __attribute__ ((__noreturn__)); 6011: 6011: 6011: 6011: 6011: 6011: extern void quick_exit (int __status) throw () __attribute__ ((__noreturn__)); 6011: 6011: 6011: 6011: 6011: 6011: extern void _Exit (int __status) throw () __attribute__ ((__noreturn__)); 6011: 6011: 6011: 6011: 6011: extern char *getenv (const char *__name) throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); 6011: 6011: 6011: 6011: 6011: extern char *secure_getenv (const char *__name) 6011: throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); 6011: 6011: 6011: 6011: 6011: 6011: 6011: extern int putenv (char *__string) throw () __attribute__ ((__nonnull__ (1))); 6011: 6011: 6011: 6011: 6011: 6011: extern int setenv (const char *__name, const char *__value, int __replace) 6011: throw () __attribute__ ((__nonnull__ (2))); 6011: 6011: 6011: extern int unsetenv (const char *__name) throw () __attribute__ ((__nonnull__ (1))); 6011: 6011: 6011: 6011: 6011: 6011: 6011: extern int clearenv (void) throw (); 6011: # 557 "/usr/include/stdlib.h" 3 4 6011: extern char *mktemp (char *__template) throw () __attribute__ ((__nonnull__ (1))); 6011: # 570 "/usr/include/stdlib.h" 3 4 6011: extern int mkstemp (char *__template) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); 6011: # 580 "/usr/include/stdlib.h" 3 4 6011: extern int mkstemp64 (char *__template) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); 6011: # 592 "/usr/include/stdlib.h" 3 4 6011: extern int mkstemps (char *__template, int __suffixlen) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); 6011: # 602 "/usr/include/stdlib.h" 3 4 6011: extern int mkstemps64 (char *__template, int __suffixlen) 6011: __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); 6011: # 613 "/usr/include/stdlib.h" 3 4 6011: extern char *mkdtemp (char *__template) throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); 6011: # 624 "/usr/include/stdlib.h" 3 4 6011: extern int mkostemp (char *__template, int __flags) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); 6011: # 634 "/usr/include/stdlib.h" 3 4 6011: extern int mkostemp64 (char *__template, int __flags) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); 6011: # 644 "/usr/include/stdlib.h" 3 4 6011: extern int mkostemps (char *__template, int __suffixlen, int __flags) 6011: __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); 6011: # 656 "/usr/include/stdlib.h" 3 4 6011: extern int mkostemps64 (char *__template, int __suffixlen, int __flags) 6011: __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); 6011: # 666 "/usr/include/stdlib.h" 3 4 6011: extern int system (const char *__command) __attribute__ ((__warn_unused_result__)); 6011: 6011: 6011: 6011: 6011: 6011: extern char *canonicalize_file_name (const char *__name) 6011: throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); 6011: # 682 "/usr/include/stdlib.h" 3 4 6011: extern char *realpath (const char *__restrict __name, 6011: char *__restrict __resolved) throw () __attribute__ ((__warn_unused_result__)); 6011: 6011: 6011: 6011: 6011: 6011: 6011: typedef int (*__compar_fn_t) (const void *, const void *); 6011: 6011: 6011: typedef __compar_fn_t comparison_fn_t; 6011: 6011: 6011: 6011: typedef int (*__compar_d_fn_t) (const void *, const void *, void *); 6011: 6011: 6011: 6011: 6011: extern void *bsearch (const void *__key, const void *__base, 6011: size_t __nmemb, size_t __size, __compar_fn_t __compar) 6011: __attribute__ ((__nonnull__ (1, 2, 5))) __attribute__ ((__warn_unused_result__)); 6011: 6011: 6011: # 1 "/usr/include/arm-linux-gnueabihf/bits/stdlib-bsearch.h" 1 3 4 6011: # 19 "/usr/include/arm-linux-gnueabihf/bits/stdlib-bsearch.h" 3 4 6011: extern __inline __attribute__ ((__gnu_inline__)) void * 6011: bsearch (const void *__key, const void *__base, size_t __nmemb, size_t __size, 6011: __compar_fn_t __compar) 6011: { 6011: size_t __l, __u, __idx; 6011: const void *__p; 6011: int __comparison; 6011: 6011: __l = 0; 6011: __u = __nmemb; 6011: while (__l < __u) 6011: { 6011: __idx = (__l + __u) / 2; 6011: __p = (void *) (((const char *) __base) + (__idx * __size)); 6011: __comparison = (*__compar) (__key, __p); 6011: if (__comparison < 0) 6011: __u = __idx; 6011: else if (__comparison > 0) 6011: __l = __idx + 1; 6011: else 6011: return (void *) __p; 6011: } 6011: 6011: return __null; 6011: } 6011: # 708 "/usr/include/stdlib.h" 2 3 4 6011: 6011: 6011: 6011: 6011: extern void qsort (void *__base, size_t __nmemb, size_t __size, 6011: __compar_fn_t __compar) __attribute__ ((__nonnull__ (1, 4))); 6011: 6011: extern void qsort_r (void *__base, size_t __nmemb, size_t __size, 6011: __compar_d_fn_t __compar, void *__arg) 6011: __attribute__ ((__nonnull__ (1, 4))); 6011: 6011: 6011: 6011: 6011: extern int abs (int __x) throw () __attribute__ ((__const__)) __attribute__ ((__warn_unused_result__)); 6011: extern long int labs (long int __x) throw () __attribute__ ((__const__)) __attribute__ ((__warn_unused_result__)); 6011: 6011: 6011: __extension__ extern long long int llabs (long long int __x) 6011: throw () __attribute__ ((__const__)) __attribute__ ((__warn_unused_result__)); 6011: 6011: 6011: 6011: 6011: 6011: 6011: extern div_t div (int __numer, int __denom) 6011: throw () __attribute__ ((__const__)) __attribute__ ((__warn_unused_result__)); 6011: extern ldiv_t ldiv (long int __numer, long int __denom) 6011: throw () __attribute__ ((__const__)) __attribute__ ((__warn_unused_result__)); 6011: 6011: 6011: __extension__ extern lldiv_t lldiv (long long int __numer, 6011: long long int __denom) 6011: throw () __attribute__ ((__const__)) __attribute__ ((__warn_unused_result__)); 6011: # 754 "/usr/include/stdlib.h" 3 4 6011: extern char *ecvt (double __value, int __ndigit, int *__restrict __decpt, 6011: int *__restrict __sign) throw () __attribute__ ((__nonnull__ (3, 4))) __attribute__ ((__warn_unused_result__)); 6011: 6011: 6011: 6011: 6011: extern char *fcvt (double __value, int __ndigit, int *__restrict __decpt, 6011: int *__restrict __sign) throw () __attribute__ ((__nonnull__ (3, 4))) __attribute__ ((__warn_unused_result__)); 6011: 6011: 6011: 6011: 6011: extern char *gcvt (double __value, int __ndigit, char *__buf) 6011: throw () __attribute__ ((__nonnull__ (3))) __attribute__ ((__warn_unused_result__)); 6011: 6011: 6011: 6011: 6011: extern char *qecvt (long double __value, int __ndigit, 6011: int *__restrict __decpt, int *__restrict __sign) 6011: throw () __attribute__ ((__nonnull__ (3, 4))) __attribute__ ((__warn_unused_result__)); 6011: extern char *qfcvt (long double __value, int __ndigit, 6011: int *__restrict __decpt, int *__restrict __sign) 6011: throw () __attribute__ ((__nonnull__ (3, 4))) __attribute__ ((__warn_unused_result__)); 6011: extern char *qgcvt (long double __value, int __ndigit, char *__buf) 6011: throw () __attribute__ ((__nonnull__ (3))) __attribute__ ((__warn_unused_result__)); 6011: 6011: 6011: 6011: 6011: extern int ecvt_r (double __value, int __ndigit, int *__restrict __decpt, 6011: int *__restrict __sign, char *__restrict __buf, 6011: size_t __len) throw () __attribute__ ((__nonnull__ (3, 4, 5))); 6011: extern int fcvt_r (double __value, int __ndigit, int *__restrict __decpt, 6011: int *__restrict __sign, char *__restrict __buf, 6011: size_t __len) throw () __attribute__ ((__nonnull__ (3, 4, 5))); 6011: 6011: extern int qecvt_r (long double __value, int __ndigit, 6011: int *__restrict __decpt, int *__restrict __sign, 6011: char *__restrict __buf, size_t __len) 6011: throw () __attribute__ ((__nonnull__ (3, 4, 5))); 6011: extern int qfcvt_r (long double __value, int __ndigit, 6011: int *__restrict __decpt, int *__restrict __sign, 6011: char *__restrict __buf, size_t __len) 6011: throw () __attribute__ ((__nonnull__ (3, 4, 5))); 6011: 6011: 6011: 6011: 6011: 6011: extern int mblen (const char *__s, size_t __n) throw (); 6011: 6011: 6011: extern int mbtowc (wchar_t *__restrict __pwc, 6011: const char *__restrict __s, size_t __n) throw (); 6011: 6011: 6011: extern int wctomb (char *__s, wchar_t __wchar) throw (); 6011: 6011: 6011: 6011: extern size_t mbstowcs (wchar_t *__restrict __pwcs, 6011: const char *__restrict __s, size_t __n) throw (); 6011: 6011: extern size_t wcstombs (char *__restrict __s, 6011: const wchar_t *__restrict __pwcs, size_t __n) 6011: throw (); 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: extern int rpmatch (const char *__response) throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); 6011: # 839 "/usr/include/stdlib.h" 3 4 6011: extern int getsubopt (char **__restrict __optionp, 6011: char *const *__restrict __tokens, 6011: char **__restrict __valuep) 6011: throw () __attribute__ ((__nonnull__ (1, 2, 3))) __attribute__ ((__warn_unused_result__)); 6011: 6011: 6011: 6011: 6011: 6011: extern void setkey (const char *__key) throw () __attribute__ ((__nonnull__ (1))); 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: extern int posix_openpt (int __oflag) __attribute__ ((__warn_unused_result__)); 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: extern int grantpt (int __fd) throw (); 6011: 6011: 6011: 6011: extern int unlockpt (int __fd) throw (); 6011: 6011: 6011: 6011: 6011: extern char *ptsname (int __fd) throw () __attribute__ ((__warn_unused_result__)); 6011: 6011: 6011: 6011: 6011: 6011: 6011: extern int ptsname_r (int __fd, char *__buf, size_t __buflen) 6011: throw () __attribute__ ((__nonnull__ (2))); 6011: 6011: 6011: extern int getpt (void); 6011: 6011: 6011: 6011: 6011: 6011: 6011: extern int getloadavg (double __loadavg[], int __nelem) 6011: throw () __attribute__ ((__nonnull__ (1))); 6011: # 901 "/usr/include/stdlib.h" 3 4 6011: # 1 "/usr/include/arm-linux-gnueabihf/bits/stdlib-float.h" 1 3 4 6011: # 24 "/usr/include/arm-linux-gnueabihf/bits/stdlib-float.h" 3 4 6011: extern __inline __attribute__ ((__gnu_inline__)) double 6011: __attribute__ ((__leaf__)) atof (const char *__nptr) throw () 6011: { 6011: return strtod (__nptr, (char **) __null); 6011: } 6011: # 902 "/usr/include/stdlib.h" 2 3 4 6011: 6011: 6011: 6011: # 1 "/usr/include/arm-linux-gnueabihf/bits/stdlib.h" 1 3 4 6011: # 23 "/usr/include/arm-linux-gnueabihf/bits/stdlib.h" 3 4 6011: extern char *__realpath_chk (const char *__restrict __name, 6011: char *__restrict __resolved, 6011: size_t __resolvedlen) throw () __attribute__ ((__warn_unused_result__)); 6011: extern char *__realpath_alias (const char *__restrict __name, char *__restrict __resolved) throw () __asm__ ("" "realpath") 6011: 6011: __attribute__ ((__warn_unused_result__)); 6011: extern char *__realpath_chk_warn (const char *__restrict __name, char *__restrict __resolved, size_t __resolvedlen) throw () __asm__ ("" "__realpath_chk") 6011: 6011: 6011: __attribute__ ((__warn_unused_result__)) 6011: __attribute__((__warning__ ("second argument of realpath must be either NULL or at " "least PATH_MAX bytes long buffer"))) 6011: ; 6011: 6011: extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__warn_unused_result__)) char * 6011: __attribute__ ((__leaf__)) realpath (const char *__restrict __name, char *__restrict __resolved) throw () 6011: { 6011: if (__builtin_object_size (__resolved, 2 > 1) != (size_t) -1) 6011: { 6011: 6011: 6011: 6011: 6011: return __realpath_chk (__name, __resolved, __builtin_object_size (__resolved, 2 > 1)); 6011: } 6011: 6011: return __realpath_alias (__name, __resolved); 6011: } 6011: 6011: 6011: extern int __ptsname_r_chk (int __fd, char *__buf, size_t __buflen, 6011: size_t __nreal) throw () __attribute__ ((__nonnull__ (2))); 6011: extern int __ptsname_r_alias (int __fd, char *__buf, size_t __buflen) throw () __asm__ ("" "ptsname_r") 6011: 6011: __attribute__ ((__nonnull__ (2))); 6011: extern int __ptsname_r_chk_warn (int __fd, char *__buf, size_t __buflen, size_t __nreal) throw () __asm__ ("" "__ptsname_r_chk") 6011: 6011: 6011: __attribute__ ((__nonnull__ (2))) __attribute__((__warning__ ("ptsname_r called with buflen bigger than " "size of buf"))) 6011: ; 6011: 6011: extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int 6011: __attribute__ ((__leaf__)) ptsname_r (int __fd, char *__buf, size_t __buflen) throw () 6011: { 6011: if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1) 6011: { 6011: if (!__builtin_constant_p (__buflen)) 6011: return __ptsname_r_chk (__fd, __buf, __buflen, __builtin_object_size (__buf, 2 > 1)); 6011: if (__buflen > __builtin_object_size (__buf, 2 > 1)) 6011: return __ptsname_r_chk_warn (__fd, __buf, __buflen, __builtin_object_size (__buf, 2 > 1)); 6011: } 6011: return __ptsname_r_alias (__fd, __buf, __buflen); 6011: } 6011: 6011: 6011: extern int __wctomb_chk (char *__s, wchar_t __wchar, size_t __buflen) 6011: throw () __attribute__ ((__warn_unused_result__)); 6011: extern int __wctomb_alias (char *__s, wchar_t __wchar) throw () __asm__ ("" "wctomb") 6011: __attribute__ ((__warn_unused_result__)); 6011: 6011: extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__warn_unused_result__)) int 6011: __attribute__ ((__leaf__)) wctomb (char *__s, wchar_t __wchar) throw () 6011: { 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: if (__builtin_object_size (__s, 2 > 1) != (size_t) -1 && 16 > __builtin_object_size (__s, 2 > 1)) 6011: return __wctomb_chk (__s, __wchar, __builtin_object_size (__s, 2 > 1)); 6011: return __wctomb_alias (__s, __wchar); 6011: } 6011: 6011: 6011: extern size_t __mbstowcs_chk (wchar_t *__restrict __dst, 6011: const char *__restrict __src, 6011: size_t __len, size_t __dstlen) throw (); 6011: extern size_t __mbstowcs_alias (wchar_t *__restrict __dst, const char *__restrict __src, size_t __len) throw () __asm__ ("" "mbstowcs") 6011: 6011: 6011: ; 6011: extern size_t __mbstowcs_chk_warn (wchar_t *__restrict __dst, const char *__restrict __src, size_t __len, size_t __dstlen) throw () __asm__ ("" "__mbstowcs_chk") 6011: 6011: 6011: 6011: __attribute__((__warning__ ("mbstowcs called with dst buffer smaller than len " "* sizeof (wchar_t)"))) 6011: ; 6011: 6011: extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) size_t 6011: __attribute__ ((__leaf__)) mbstowcs (wchar_t *__restrict __dst, const char *__restrict __src, size_t __len) throw () 6011: 6011: { 6011: if (__builtin_object_size (__dst, 2 > 1) != (size_t) -1) 6011: { 6011: if (!__builtin_constant_p (__len)) 6011: return __mbstowcs_chk (__dst, __src, __len, 6011: __builtin_object_size (__dst, 2 > 1) / sizeof (wchar_t)); 6011: 6011: if (__len > __builtin_object_size (__dst, 2 > 1) / sizeof (wchar_t)) 6011: return __mbstowcs_chk_warn (__dst, __src, __len, 6011: __builtin_object_size (__dst, 2 > 1) / sizeof (wchar_t)); 6011: } 6011: return __mbstowcs_alias (__dst, __src, __len); 6011: } 6011: 6011: 6011: extern size_t __wcstombs_chk (char *__restrict __dst, 6011: const wchar_t *__restrict __src, 6011: size_t __len, size_t __dstlen) throw (); 6011: extern size_t __wcstombs_alias (char *__restrict __dst, const wchar_t *__restrict __src, size_t __len) throw () __asm__ ("" "wcstombs") 6011: 6011: 6011: ; 6011: extern size_t __wcstombs_chk_warn (char *__restrict __dst, const wchar_t *__restrict __src, size_t __len, size_t __dstlen) throw () __asm__ ("" "__wcstombs_chk") 6011: 6011: 6011: 6011: __attribute__((__warning__ ("wcstombs called with dst buffer smaller than len"))); 6011: 6011: extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) size_t 6011: __attribute__ ((__leaf__)) wcstombs (char *__restrict __dst, const wchar_t *__restrict __src, size_t __len) throw () 6011: 6011: { 6011: if (__builtin_object_size (__dst, 2 > 1) != (size_t) -1) 6011: { 6011: if (!__builtin_constant_p (__len)) 6011: return __wcstombs_chk (__dst, __src, __len, __builtin_object_size (__dst, 2 > 1)); 6011: if (__len > __builtin_object_size (__dst, 2 > 1)) 6011: return __wcstombs_chk_warn (__dst, __src, __len, __builtin_object_size (__dst, 2 > 1)); 6011: } 6011: return __wcstombs_alias (__dst, __src, __len); 6011: } 6011: # 906 "/usr/include/stdlib.h" 2 3 4 6011: 6011: 6011: 6011: 6011: 6011: } 6011: # 76 "/usr/include/c++/8/cstdlib" 2 3 6011: 6011: # 1 "/usr/include/c++/8/bits/std_abs.h" 1 3 6011: # 33 "/usr/include/c++/8/bits/std_abs.h" 3 6011: 6011: # 34 "/usr/include/c++/8/bits/std_abs.h" 3 6011: # 46 "/usr/include/c++/8/bits/std_abs.h" 3 6011: extern "C++" 6011: { 6011: namespace std __attribute__ ((__visibility__ ("default"))) 6011: { 6011: 6011: 6011: using ::abs; 6011: 6011: 6011: inline long 6011: abs(long __i) { return __builtin_labs(__i); } 6011: 6011: 6011: 6011: inline long long 6011: abs(long long __x) { return __builtin_llabs (__x); } 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: inline constexpr double 6011: abs(double __x) 6011: { return __builtin_fabs(__x); } 6011: 6011: inline constexpr float 6011: abs(float __x) 6011: { return __builtin_fabsf(__x); } 6011: 6011: inline constexpr long double 6011: abs(long double __x) 6011: { return __builtin_fabsl(__x); } 6011: # 106 "/usr/include/c++/8/bits/std_abs.h" 3 6011: 6011: } 6011: } 6011: # 78 "/usr/include/c++/8/cstdlib" 2 3 6011: # 118 "/usr/include/c++/8/cstdlib" 3 6011: extern "C++" 6011: { 6011: namespace std __attribute__ ((__visibility__ ("default"))) 6011: { 6011: 6011: 6011: using ::div_t; 6011: using ::ldiv_t; 6011: 6011: using ::abort; 6011: using ::atexit; 6011: 6011: 6011: using ::at_quick_exit; 6011: 6011: 6011: using ::atof; 6011: using ::atoi; 6011: using ::atol; 6011: using ::bsearch; 6011: using ::calloc; 6011: using ::div; 6011: using ::exit; 6011: using ::free; 6011: using ::getenv; 6011: using ::labs; 6011: using ::ldiv; 6011: using ::malloc; 6011: 6011: using ::mblen; 6011: using ::mbstowcs; 6011: using ::mbtowc; 6011: 6011: using ::qsort; 6011: 6011: 6011: using ::quick_exit; 6011: 6011: 6011: using ::rand; 6011: using ::realloc; 6011: using ::srand; 6011: using ::strtod; 6011: using ::strtol; 6011: using ::strtoul; 6011: using ::system; 6011: 6011: using ::wcstombs; 6011: using ::wctomb; 6011: 6011: 6011: 6011: inline ldiv_t 6011: div(long __i, long __j) { return ldiv(__i, __j); } 6011: 6011: 6011: 6011: 6011: } 6011: # 189 "/usr/include/c++/8/cstdlib" 3 6011: namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) 6011: { 6011: 6011: 6011: 6011: using ::lldiv_t; 6011: 6011: 6011: 6011: 6011: 6011: using ::_Exit; 6011: 6011: 6011: 6011: using ::llabs; 6011: 6011: inline lldiv_t 6011: div(long long __n, long long __d) 6011: { lldiv_t __q; __q.quot = __n / __d; __q.rem = __n % __d; return __q; } 6011: 6011: using ::lldiv; 6011: # 221 "/usr/include/c++/8/cstdlib" 3 6011: using ::atoll; 6011: using ::strtoll; 6011: using ::strtoull; 6011: 6011: using ::strtof; 6011: using ::strtold; 6011: 6011: 6011: } 6011: 6011: namespace std 6011: { 6011: 6011: using ::__gnu_cxx::lldiv_t; 6011: 6011: using ::__gnu_cxx::_Exit; 6011: 6011: using ::__gnu_cxx::llabs; 6011: using ::__gnu_cxx::div; 6011: using ::__gnu_cxx::lldiv; 6011: 6011: using ::__gnu_cxx::atoll; 6011: using ::__gnu_cxx::strtof; 6011: using ::__gnu_cxx::strtoll; 6011: using ::__gnu_cxx::strtoull; 6011: using ::__gnu_cxx::strtold; 6011: } 6011: 6011: 6011: 6011: } 6011: # 42 "/usr/include/c++/8/ext/string_conversions.h" 2 3 6011: # 1 "/usr/include/c++/8/cwchar" 1 3 6011: # 39 "/usr/include/c++/8/cwchar" 3 6011: 6011: # 40 "/usr/include/c++/8/cwchar" 3 6011: # 43 "/usr/include/c++/8/ext/string_conversions.h" 2 3 6011: # 1 "/usr/include/c++/8/cstdio" 1 3 6011: # 39 "/usr/include/c++/8/cstdio" 3 6011: 6011: # 40 "/usr/include/c++/8/cstdio" 3 6011: 6011: 6011: # 1 "/usr/include/stdio.h" 1 3 4 6011: # 27 "/usr/include/stdio.h" 3 4 6011: # 1 "/usr/include/arm-linux-gnueabihf/bits/libc-header-start.h" 1 3 4 6011: # 28 "/usr/include/stdio.h" 2 3 4 6011: 6011: extern "C" { 6011: 6011: 6011: 6011: # 1 "/usr/lib/gcc/arm-linux-gnueabihf/8/include/stddef.h" 1 3 4 6011: # 34 "/usr/include/stdio.h" 2 3 4 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: # 1 "/usr/include/libio.h" 1 3 4 6011: # 31 "/usr/include/libio.h" 3 4 6011: # 1 "/usr/include/_G_config.h" 1 3 4 6011: # 15 "/usr/include/_G_config.h" 3 4 6011: # 1 "/usr/lib/gcc/arm-linux-gnueabihf/8/include/stddef.h" 1 3 4 6011: # 16 "/usr/include/_G_config.h" 2 3 4 6011: 6011: 6011: 6011: 6011: 6011: 6011: typedef struct 6011: { 6011: __off_t __pos; 6011: __mbstate_t __state; 6011: } _G_fpos_t; 6011: typedef struct 6011: { 6011: __off64_t __pos; 6011: __mbstate_t __state; 6011: } _G_fpos64_t; 6011: # 32 "/usr/include/libio.h" 2 3 4 6011: # 49 "/usr/include/libio.h" 3 4 6011: # 1 "/usr/lib/gcc/arm-linux-gnueabihf/8/include/stdarg.h" 1 3 4 6011: # 50 "/usr/include/libio.h" 2 3 4 6011: # 145 "/usr/include/libio.h" 3 4 6011: struct _IO_jump_t; struct _IO_FILE; 6011: 6011: 6011: 6011: 6011: typedef void _IO_lock_t; 6011: 6011: 6011: 6011: 6011: 6011: struct _IO_marker { 6011: struct _IO_marker *_next; 6011: struct _IO_FILE *_sbuf; 6011: 6011: 6011: 6011: int _pos; 6011: # 173 "/usr/include/libio.h" 3 4 6011: }; 6011: 6011: 6011: enum __codecvt_result 6011: { 6011: __codecvt_ok, 6011: __codecvt_partial, 6011: __codecvt_error, 6011: __codecvt_noconv 6011: }; 6011: # 241 "/usr/include/libio.h" 3 4 6011: struct _IO_FILE { 6011: int _flags; 6011: 6011: 6011: 6011: 6011: char* _IO_read_ptr; 6011: char* _IO_read_end; 6011: char* _IO_read_base; 6011: char* _IO_write_base; 6011: char* _IO_write_ptr; 6011: char* _IO_write_end; 6011: char* _IO_buf_base; 6011: char* _IO_buf_end; 6011: 6011: char *_IO_save_base; 6011: char *_IO_backup_base; 6011: char *_IO_save_end; 6011: 6011: struct _IO_marker *_markers; 6011: 6011: struct _IO_FILE *_chain; 6011: 6011: int _fileno; 6011: 6011: 6011: 6011: int _flags2; 6011: 6011: __off_t _old_offset; 6011: 6011: 6011: 6011: unsigned short _cur_column; 6011: signed char _vtable_offset; 6011: char _shortbuf[1]; 6011: 6011: 6011: 6011: _IO_lock_t *_lock; 6011: # 289 "/usr/include/libio.h" 3 4 6011: __off64_t _offset; 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: void *__pad1; 6011: void *__pad2; 6011: void *__pad3; 6011: void *__pad4; 6011: 6011: size_t __pad5; 6011: int _mode; 6011: 6011: char _unused2[15 * sizeof (int) - 4 * sizeof (void *) - sizeof (size_t)]; 6011: 6011: }; 6011: 6011: 6011: 6011: 6011: 6011: struct _IO_FILE_plus; 6011: 6011: extern struct _IO_FILE_plus _IO_2_1_stdin_; 6011: extern struct _IO_FILE_plus _IO_2_1_stdout_; 6011: extern struct _IO_FILE_plus _IO_2_1_stderr_; 6011: # 333 "/usr/include/libio.h" 3 4 6011: typedef __ssize_t __io_read_fn (void *__cookie, char *__buf, size_t __nbytes); 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: typedef __ssize_t __io_write_fn (void *__cookie, const char *__buf, 6011: size_t __n); 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: typedef int __io_seek_fn (void *__cookie, __off64_t *__pos, int __w); 6011: 6011: 6011: typedef int __io_close_fn (void *__cookie); 6011: 6011: 6011: 6011: 6011: typedef __io_read_fn cookie_read_function_t; 6011: typedef __io_write_fn cookie_write_function_t; 6011: typedef __io_seek_fn cookie_seek_function_t; 6011: typedef __io_close_fn cookie_close_function_t; 6011: 6011: 6011: typedef struct 6011: { 6011: __io_read_fn *read; 6011: __io_write_fn *write; 6011: __io_seek_fn *seek; 6011: __io_close_fn *close; 6011: } _IO_cookie_io_functions_t; 6011: typedef _IO_cookie_io_functions_t cookie_io_functions_t; 6011: 6011: struct _IO_cookie_file; 6011: 6011: 6011: extern void _IO_cookie_init (struct _IO_cookie_file *__cfile, int __read_write, 6011: void *__cookie, _IO_cookie_io_functions_t __fns); 6011: 6011: 6011: 6011: 6011: extern "C" { 6011: 6011: 6011: extern int __underflow (_IO_FILE *); 6011: extern int __uflow (_IO_FILE *); 6011: extern int __overflow (_IO_FILE *, int); 6011: # 429 "/usr/include/libio.h" 3 4 6011: extern int _IO_getc (_IO_FILE *__fp); 6011: extern int _IO_putc (int __c, _IO_FILE *__fp); 6011: extern int _IO_feof (_IO_FILE *__fp) throw (); 6011: extern int _IO_ferror (_IO_FILE *__fp) throw (); 6011: 6011: extern int _IO_peekc_locked (_IO_FILE *__fp); 6011: 6011: 6011: 6011: 6011: 6011: extern void _IO_flockfile (_IO_FILE *) throw (); 6011: extern void _IO_funlockfile (_IO_FILE *) throw (); 6011: extern int _IO_ftrylockfile (_IO_FILE *) throw (); 6011: # 458 "/usr/include/libio.h" 3 4 6011: extern int _IO_vfscanf (_IO_FILE * __restrict, const char * __restrict, 6011: __gnuc_va_list, int *__restrict); 6011: extern int _IO_vfprintf (_IO_FILE *__restrict, const char *__restrict, 6011: __gnuc_va_list); 6011: extern __ssize_t _IO_padn (_IO_FILE *, int, __ssize_t); 6011: extern size_t _IO_sgetn (_IO_FILE *, void *, size_t); 6011: 6011: extern __off64_t _IO_seekoff (_IO_FILE *, __off64_t, int, int); 6011: extern __off64_t _IO_seekpos (_IO_FILE *, __off64_t, int); 6011: 6011: extern void _IO_free_backup_area (_IO_FILE *) throw (); 6011: # 520 "/usr/include/libio.h" 3 4 6011: } 6011: # 42 "/usr/include/stdio.h" 2 3 4 6011: 6011: 6011: 6011: 6011: typedef __gnuc_va_list va_list; 6011: # 78 "/usr/include/stdio.h" 3 4 6011: typedef _G_fpos_t fpos_t; 6011: 6011: 6011: 6011: 6011: typedef _G_fpos64_t fpos64_t; 6011: # 131 "/usr/include/stdio.h" 3 4 6011: # 1 "/usr/include/arm-linux-gnueabihf/bits/stdio_lim.h" 1 3 4 6011: # 132 "/usr/include/stdio.h" 2 3 4 6011: 6011: 6011: 6011: extern struct _IO_FILE *stdin; 6011: extern struct _IO_FILE *stdout; 6011: extern struct _IO_FILE *stderr; 6011: 6011: 6011: 6011: 6011: 6011: 6011: extern int remove (const char *__filename) throw (); 6011: 6011: extern int rename (const char *__old, const char *__new) throw (); 6011: 6011: 6011: 6011: extern int renameat (int __oldfd, const char *__old, int __newfd, 6011: const char *__new) throw (); 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: extern FILE *tmpfile (void) __attribute__ ((__warn_unused_result__)); 6011: # 169 "/usr/include/stdio.h" 3 4 6011: extern FILE *tmpfile64 (void) __attribute__ ((__warn_unused_result__)); 6011: 6011: 6011: 6011: extern char *tmpnam (char *__s) throw () __attribute__ ((__warn_unused_result__)); 6011: 6011: 6011: 6011: 6011: extern char *tmpnam_r (char *__s) throw () __attribute__ ((__warn_unused_result__)); 6011: # 190 "/usr/include/stdio.h" 3 4 6011: extern char *tempnam (const char *__dir, const char *__pfx) 6011: throw () __attribute__ ((__malloc__)) __attribute__ ((__warn_unused_result__)); 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: extern int fclose (FILE *__stream); 6011: 6011: 6011: 6011: 6011: extern int fflush (FILE *__stream); 6011: # 213 "/usr/include/stdio.h" 3 4 6011: extern int fflush_unlocked (FILE *__stream); 6011: # 223 "/usr/include/stdio.h" 3 4 6011: extern int fcloseall (void); 6011: # 232 "/usr/include/stdio.h" 3 4 6011: extern FILE *fopen (const char *__restrict __filename, 6011: const char *__restrict __modes) __attribute__ ((__warn_unused_result__)); 6011: 6011: 6011: 6011: 6011: extern FILE *freopen (const char *__restrict __filename, 6011: const char *__restrict __modes, 6011: FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); 6011: # 256 "/usr/include/stdio.h" 3 4 6011: extern FILE *fopen64 (const char *__restrict __filename, 6011: const char *__restrict __modes) __attribute__ ((__warn_unused_result__)); 6011: extern FILE *freopen64 (const char *__restrict __filename, 6011: const char *__restrict __modes, 6011: FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); 6011: 6011: 6011: 6011: 6011: extern FILE *fdopen (int __fd, const char *__modes) throw () __attribute__ ((__warn_unused_result__)); 6011: 6011: 6011: 6011: 6011: 6011: extern FILE *fopencookie (void *__restrict __magic_cookie, 6011: const char *__restrict __modes, 6011: _IO_cookie_io_functions_t __io_funcs) throw () __attribute__ ((__warn_unused_result__)); 6011: 6011: 6011: 6011: 6011: extern FILE *fmemopen (void *__s, size_t __len, const char *__modes) 6011: throw () __attribute__ ((__warn_unused_result__)); 6011: 6011: 6011: 6011: 6011: extern FILE *open_memstream (char **__bufloc, size_t *__sizeloc) throw () __attribute__ ((__warn_unused_result__)); 6011: 6011: 6011: 6011: 6011: 6011: extern void setbuf (FILE *__restrict __stream, char *__restrict __buf) throw (); 6011: 6011: 6011: 6011: extern int setvbuf (FILE *__restrict __stream, char *__restrict __buf, 6011: int __modes, size_t __n) throw (); 6011: 6011: 6011: 6011: 6011: extern void setbuffer (FILE *__restrict __stream, char *__restrict __buf, 6011: size_t __size) throw (); 6011: 6011: 6011: extern void setlinebuf (FILE *__stream) throw (); 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: extern int fprintf (FILE *__restrict __stream, 6011: const char *__restrict __format, ...); 6011: 6011: 6011: 6011: 6011: extern int printf (const char *__restrict __format, ...); 6011: 6011: extern int sprintf (char *__restrict __s, 6011: const char *__restrict __format, ...) throw (); 6011: 6011: 6011: 6011: 6011: 6011: extern int vfprintf (FILE *__restrict __s, const char *__restrict __format, 6011: __gnuc_va_list __arg); 6011: 6011: 6011: 6011: 6011: extern int vprintf (const char *__restrict __format, __gnuc_va_list __arg); 6011: 6011: extern int vsprintf (char *__restrict __s, const char *__restrict __format, 6011: __gnuc_va_list __arg) throw (); 6011: 6011: 6011: 6011: extern int snprintf (char *__restrict __s, size_t __maxlen, 6011: const char *__restrict __format, ...) 6011: throw () __attribute__ ((__format__ (__printf__, 3, 4))); 6011: 6011: extern int vsnprintf (char *__restrict __s, size_t __maxlen, 6011: const char *__restrict __format, __gnuc_va_list __arg) 6011: throw () __attribute__ ((__format__ (__printf__, 3, 0))); 6011: 6011: 6011: 6011: 6011: 6011: extern int vasprintf (char **__restrict __ptr, const char *__restrict __f, 6011: __gnuc_va_list __arg) 6011: throw () __attribute__ ((__format__ (__printf__, 2, 0))) __attribute__ ((__warn_unused_result__)); 6011: extern int __asprintf (char **__restrict __ptr, 6011: const char *__restrict __fmt, ...) 6011: throw () __attribute__ ((__format__ (__printf__, 2, 3))) __attribute__ ((__warn_unused_result__)); 6011: extern int asprintf (char **__restrict __ptr, 6011: const char *__restrict __fmt, ...) 6011: throw () __attribute__ ((__format__ (__printf__, 2, 3))) __attribute__ ((__warn_unused_result__)); 6011: 6011: 6011: 6011: 6011: extern int vdprintf (int __fd, const char *__restrict __fmt, 6011: __gnuc_va_list __arg) 6011: __attribute__ ((__format__ (__printf__, 2, 0))); 6011: extern int dprintf (int __fd, const char *__restrict __fmt, ...) 6011: __attribute__ ((__format__ (__printf__, 2, 3))); 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: extern int fscanf (FILE *__restrict __stream, 6011: const char *__restrict __format, ...) __attribute__ ((__warn_unused_result__)); 6011: 6011: 6011: 6011: 6011: extern int scanf (const char *__restrict __format, ...) __attribute__ ((__warn_unused_result__)); 6011: 6011: extern int sscanf (const char *__restrict __s, 6011: const char *__restrict __format, ...) throw (); 6011: # 420 "/usr/include/stdio.h" 3 4 6011: extern int vfscanf (FILE *__restrict __s, const char *__restrict __format, 6011: __gnuc_va_list __arg) 6011: __attribute__ ((__format__ (__scanf__, 2, 0))) __attribute__ ((__warn_unused_result__)); 6011: 6011: 6011: 6011: 6011: 6011: extern int vscanf (const char *__restrict __format, __gnuc_va_list __arg) 6011: __attribute__ ((__format__ (__scanf__, 1, 0))) __attribute__ ((__warn_unused_result__)); 6011: 6011: 6011: extern int vsscanf (const char *__restrict __s, 6011: const char *__restrict __format, __gnuc_va_list __arg) 6011: throw () __attribute__ ((__format__ (__scanf__, 2, 0))); 6011: # 477 "/usr/include/stdio.h" 3 4 6011: extern int fgetc (FILE *__stream); 6011: extern int getc (FILE *__stream); 6011: 6011: 6011: 6011: 6011: 6011: extern int getchar (void); 6011: # 495 "/usr/include/stdio.h" 3 4 6011: extern int getc_unlocked (FILE *__stream); 6011: extern int getchar_unlocked (void); 6011: # 506 "/usr/include/stdio.h" 3 4 6011: extern int fgetc_unlocked (FILE *__stream); 6011: # 517 "/usr/include/stdio.h" 3 4 6011: extern int fputc (int __c, FILE *__stream); 6011: extern int putc (int __c, FILE *__stream); 6011: 6011: 6011: 6011: 6011: 6011: extern int putchar (int __c); 6011: # 537 "/usr/include/stdio.h" 3 4 6011: extern int fputc_unlocked (int __c, FILE *__stream); 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: extern int putc_unlocked (int __c, FILE *__stream); 6011: extern int putchar_unlocked (int __c); 6011: 6011: 6011: 6011: 6011: 6011: 6011: extern int getw (FILE *__stream); 6011: 6011: 6011: extern int putw (int __w, FILE *__stream); 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: extern char *fgets (char *__restrict __s, int __n, FILE *__restrict __stream) 6011: __attribute__ ((__warn_unused_result__)); 6011: # 577 "/usr/include/stdio.h" 3 4 6011: extern char *gets (char *__s) __attribute__ ((__warn_unused_result__)) __attribute__ ((__deprecated__)); 6011: # 587 "/usr/include/stdio.h" 3 4 6011: extern char *fgets_unlocked (char *__restrict __s, int __n, 6011: FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); 6011: # 603 "/usr/include/stdio.h" 3 4 6011: extern __ssize_t __getdelim (char **__restrict __lineptr, 6011: size_t *__restrict __n, int __delimiter, 6011: FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); 6011: extern __ssize_t getdelim (char **__restrict __lineptr, 6011: size_t *__restrict __n, int __delimiter, 6011: FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: extern __ssize_t getline (char **__restrict __lineptr, 6011: size_t *__restrict __n, 6011: FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: extern int fputs (const char *__restrict __s, FILE *__restrict __stream); 6011: 6011: 6011: 6011: 6011: 6011: extern int puts (const char *__s); 6011: 6011: 6011: 6011: 6011: 6011: 6011: extern int ungetc (int __c, FILE *__stream); 6011: 6011: 6011: 6011: 6011: 6011: 6011: extern size_t fread (void *__restrict __ptr, size_t __size, 6011: size_t __n, FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); 6011: 6011: 6011: 6011: 6011: extern size_t fwrite (const void *__restrict __ptr, size_t __size, 6011: size_t __n, FILE *__restrict __s); 6011: # 662 "/usr/include/stdio.h" 3 4 6011: extern int fputs_unlocked (const char *__restrict __s, 6011: FILE *__restrict __stream); 6011: # 673 "/usr/include/stdio.h" 3 4 6011: extern size_t fread_unlocked (void *__restrict __ptr, size_t __size, 6011: size_t __n, FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); 6011: extern size_t fwrite_unlocked (const void *__restrict __ptr, size_t __size, 6011: size_t __n, FILE *__restrict __stream); 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: extern int fseek (FILE *__stream, long int __off, int __whence); 6011: 6011: 6011: 6011: 6011: extern long int ftell (FILE *__stream) __attribute__ ((__warn_unused_result__)); 6011: 6011: 6011: 6011: 6011: extern void rewind (FILE *__stream); 6011: # 707 "/usr/include/stdio.h" 3 4 6011: extern int fseeko (FILE *__stream, __off_t __off, int __whence); 6011: 6011: 6011: 6011: 6011: extern __off_t ftello (FILE *__stream) __attribute__ ((__warn_unused_result__)); 6011: # 731 "/usr/include/stdio.h" 3 4 6011: extern int fgetpos (FILE *__restrict __stream, fpos_t *__restrict __pos); 6011: 6011: 6011: 6011: 6011: extern int fsetpos (FILE *__stream, const fpos_t *__pos); 6011: # 750 "/usr/include/stdio.h" 3 4 6011: extern int fseeko64 (FILE *__stream, __off64_t __off, int __whence); 6011: extern __off64_t ftello64 (FILE *__stream) __attribute__ ((__warn_unused_result__)); 6011: extern int fgetpos64 (FILE *__restrict __stream, fpos64_t *__restrict __pos); 6011: extern int fsetpos64 (FILE *__stream, const fpos64_t *__pos); 6011: 6011: 6011: 6011: extern void clearerr (FILE *__stream) throw (); 6011: 6011: extern int feof (FILE *__stream) throw () __attribute__ ((__warn_unused_result__)); 6011: 6011: extern int ferror (FILE *__stream) throw () __attribute__ ((__warn_unused_result__)); 6011: 6011: 6011: 6011: extern void clearerr_unlocked (FILE *__stream) throw (); 6011: extern int feof_unlocked (FILE *__stream) throw () __attribute__ ((__warn_unused_result__)); 6011: extern int ferror_unlocked (FILE *__stream) throw () __attribute__ ((__warn_unused_result__)); 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: extern void perror (const char *__s); 6011: 6011: 6011: 6011: 6011: 6011: # 1 "/usr/include/arm-linux-gnueabihf/bits/sys_errlist.h" 1 3 4 6011: # 26 "/usr/include/arm-linux-gnueabihf/bits/sys_errlist.h" 3 4 6011: extern int sys_nerr; 6011: extern const char *const sys_errlist[]; 6011: 6011: 6011: extern int _sys_nerr; 6011: extern const char *const _sys_errlist[]; 6011: # 782 "/usr/include/stdio.h" 2 3 4 6011: 6011: 6011: 6011: 6011: extern int fileno (FILE *__stream) throw () __attribute__ ((__warn_unused_result__)); 6011: 6011: 6011: 6011: 6011: extern int fileno_unlocked (FILE *__stream) throw () __attribute__ ((__warn_unused_result__)); 6011: # 800 "/usr/include/stdio.h" 3 4 6011: extern FILE *popen (const char *__command, const char *__modes) __attribute__ ((__warn_unused_result__)); 6011: 6011: 6011: 6011: 6011: 6011: extern int pclose (FILE *__stream); 6011: 6011: 6011: 6011: 6011: 6011: extern char *ctermid (char *__s) throw (); 6011: 6011: 6011: 6011: 6011: 6011: extern char *cuserid (char *__s); 6011: 6011: 6011: 6011: 6011: struct obstack; 6011: 6011: 6011: extern int obstack_printf (struct obstack *__restrict __obstack, 6011: const char *__restrict __format, ...) 6011: throw () __attribute__ ((__format__ (__printf__, 2, 3))); 6011: extern int obstack_vprintf (struct obstack *__restrict __obstack, 6011: const char *__restrict __format, 6011: __gnuc_va_list __args) 6011: throw () __attribute__ ((__format__ (__printf__, 2, 0))); 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: extern void flockfile (FILE *__stream) throw (); 6011: 6011: 6011: 6011: extern int ftrylockfile (FILE *__stream) throw () __attribute__ ((__warn_unused_result__)); 6011: 6011: 6011: extern void funlockfile (FILE *__stream) throw (); 6011: # 859 "/usr/include/stdio.h" 3 4 6011: # 1 "/usr/include/arm-linux-gnueabihf/bits/stdio.h" 1 3 4 6011: # 43 "/usr/include/arm-linux-gnueabihf/bits/stdio.h" 3 4 6011: extern __inline __attribute__ ((__gnu_inline__)) int 6011: getchar (void) 6011: { 6011: return _IO_getc (stdin); 6011: } 6011: 6011: 6011: 6011: 6011: extern __inline __attribute__ ((__gnu_inline__)) int 6011: fgetc_unlocked (FILE *__fp) 6011: { 6011: return (__builtin_expect (((__fp)->_IO_read_ptr >= (__fp)->_IO_read_end), 0) ? __uflow (__fp) : *(unsigned char *) (__fp)->_IO_read_ptr++); 6011: } 6011: 6011: 6011: 6011: 6011: 6011: extern __inline __attribute__ ((__gnu_inline__)) int 6011: getc_unlocked (FILE *__fp) 6011: { 6011: return (__builtin_expect (((__fp)->_IO_read_ptr >= (__fp)->_IO_read_end), 0) ? __uflow (__fp) : *(unsigned char *) (__fp)->_IO_read_ptr++); 6011: } 6011: 6011: 6011: extern __inline __attribute__ ((__gnu_inline__)) int 6011: getchar_unlocked (void) 6011: { 6011: return (__builtin_expect (((stdin)->_IO_read_ptr >= (stdin)->_IO_read_end), 0) ? __uflow (stdin) : *(unsigned char *) (stdin)->_IO_read_ptr++); 6011: } 6011: 6011: 6011: 6011: 6011: extern __inline __attribute__ ((__gnu_inline__)) int 6011: putchar (int __c) 6011: { 6011: return _IO_putc (__c, stdout); 6011: } 6011: 6011: 6011: 6011: 6011: extern __inline __attribute__ ((__gnu_inline__)) int 6011: fputc_unlocked (int __c, FILE *__stream) 6011: { 6011: return (__builtin_expect (((__stream)->_IO_write_ptr >= (__stream)->_IO_write_end), 0) ? __overflow (__stream, (unsigned char) (__c)) : (unsigned char) (*(__stream)->_IO_write_ptr++ = (__c))); 6011: } 6011: 6011: 6011: 6011: 6011: 6011: extern __inline __attribute__ ((__gnu_inline__)) int 6011: putc_unlocked (int __c, FILE *__stream) 6011: { 6011: return (__builtin_expect (((__stream)->_IO_write_ptr >= (__stream)->_IO_write_end), 0) ? __overflow (__stream, (unsigned char) (__c)) : (unsigned char) (*(__stream)->_IO_write_ptr++ = (__c))); 6011: } 6011: 6011: 6011: extern __inline __attribute__ ((__gnu_inline__)) int 6011: putchar_unlocked (int __c) 6011: { 6011: return (__builtin_expect (((stdout)->_IO_write_ptr >= (stdout)->_IO_write_end), 0) ? __overflow (stdout, (unsigned char) (__c)) : (unsigned char) (*(stdout)->_IO_write_ptr++ = (__c))); 6011: } 6011: 6011: 6011: 6011: 6011: 6011: extern __inline __attribute__ ((__gnu_inline__)) __ssize_t 6011: getline (char **__lineptr, size_t *__n, FILE *__stream) 6011: { 6011: return __getdelim (__lineptr, __n, '\n', __stream); 6011: } 6011: 6011: 6011: 6011: 6011: 6011: extern __inline __attribute__ ((__gnu_inline__)) int 6011: __attribute__ ((__leaf__)) feof_unlocked (FILE *__stream) throw () 6011: { 6011: return (((__stream)->_flags & 0x10) != 0); 6011: } 6011: 6011: 6011: extern __inline __attribute__ ((__gnu_inline__)) int 6011: __attribute__ ((__leaf__)) ferror_unlocked (FILE *__stream) throw () 6011: { 6011: return (((__stream)->_flags & 0x20) != 0); 6011: } 6011: # 860 "/usr/include/stdio.h" 2 3 4 6011: 6011: 6011: # 1 "/usr/include/arm-linux-gnueabihf/bits/stdio2.h" 1 3 4 6011: # 23 "/usr/include/arm-linux-gnueabihf/bits/stdio2.h" 3 4 6011: extern int __sprintf_chk (char *__restrict __s, int __flag, size_t __slen, 6011: const char *__restrict __format, ...) throw (); 6011: extern int __vsprintf_chk (char *__restrict __s, int __flag, size_t __slen, 6011: const char *__restrict __format, 6011: __gnuc_va_list __ap) throw (); 6011: 6011: 6011: extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int 6011: __attribute__ ((__leaf__)) sprintf (char *__restrict __s, const char *__restrict __fmt, ...) throw () 6011: { 6011: return __builtin___sprintf_chk (__s, 2 - 1, 6011: __builtin_object_size (__s, 2 > 1), __fmt, __builtin_va_arg_pack ()); 6011: } 6011: 6011: 6011: 6011: 6011: 6011: 6011: extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int 6011: __attribute__ ((__leaf__)) vsprintf (char *__restrict __s, const char *__restrict __fmt, __gnuc_va_list __ap) throw () 6011: 6011: { 6011: return __builtin___vsprintf_chk (__s, 2 - 1, 6011: __builtin_object_size (__s, 2 > 1), __fmt, __ap); 6011: } 6011: 6011: 6011: 6011: extern int __snprintf_chk (char *__restrict __s, size_t __n, int __flag, 6011: size_t __slen, const char *__restrict __format, 6011: ...) throw (); 6011: extern int __vsnprintf_chk (char *__restrict __s, size_t __n, int __flag, 6011: size_t __slen, const char *__restrict __format, 6011: __gnuc_va_list __ap) throw (); 6011: 6011: 6011: extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int 6011: __attribute__ ((__leaf__)) snprintf (char *__restrict __s, size_t __n, const char *__restrict __fmt, ...) throw () 6011: 6011: { 6011: return __builtin___snprintf_chk (__s, __n, 2 - 1, 6011: __builtin_object_size (__s, 2 > 1), __fmt, __builtin_va_arg_pack ()); 6011: } 6011: 6011: 6011: 6011: 6011: 6011: 6011: extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int 6011: __attribute__ ((__leaf__)) vsnprintf (char *__restrict __s, size_t __n, const char *__restrict __fmt, __gnuc_va_list __ap) throw () 6011: 6011: { 6011: return __builtin___vsnprintf_chk (__s, __n, 2 - 1, 6011: __builtin_object_size (__s, 2 > 1), __fmt, __ap); 6011: } 6011: 6011: 6011: 6011: 6011: 6011: extern int __fprintf_chk (FILE *__restrict __stream, int __flag, 6011: const char *__restrict __format, ...); 6011: extern int __printf_chk (int __flag, const char *__restrict __format, ...); 6011: extern int __vfprintf_chk (FILE *__restrict __stream, int __flag, 6011: const char *__restrict __format, __gnuc_va_list __ap); 6011: extern int __vprintf_chk (int __flag, const char *__restrict __format, 6011: __gnuc_va_list __ap); 6011: 6011: 6011: extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int 6011: fprintf (FILE *__restrict __stream, const char *__restrict __fmt, ...) 6011: { 6011: return __fprintf_chk (__stream, 2 - 1, __fmt, 6011: __builtin_va_arg_pack ()); 6011: } 6011: 6011: extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int 6011: printf (const char *__restrict __fmt, ...) 6011: { 6011: return __printf_chk (2 - 1, __fmt, __builtin_va_arg_pack ()); 6011: } 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int 6011: vprintf (const char *__restrict __fmt, __gnuc_va_list __ap) 6011: { 6011: 6011: return __vfprintf_chk (stdout, 2 - 1, __fmt, __ap); 6011: 6011: 6011: 6011: } 6011: 6011: extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int 6011: vfprintf (FILE *__restrict __stream, 6011: const char *__restrict __fmt, __gnuc_va_list __ap) 6011: { 6011: return __vfprintf_chk (__stream, 2 - 1, __fmt, __ap); 6011: } 6011: 6011: 6011: extern int __dprintf_chk (int __fd, int __flag, const char *__restrict __fmt, 6011: ...) __attribute__ ((__format__ (__printf__, 3, 4))); 6011: extern int __vdprintf_chk (int __fd, int __flag, 6011: const char *__restrict __fmt, __gnuc_va_list __arg) 6011: __attribute__ ((__format__ (__printf__, 3, 0))); 6011: 6011: 6011: extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int 6011: dprintf (int __fd, const char *__restrict __fmt, ...) 6011: { 6011: return __dprintf_chk (__fd, 2 - 1, __fmt, 6011: __builtin_va_arg_pack ()); 6011: } 6011: 6011: 6011: 6011: 6011: 6011: extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int 6011: vdprintf (int __fd, const char *__restrict __fmt, __gnuc_va_list __ap) 6011: { 6011: return __vdprintf_chk (__fd, 2 - 1, __fmt, __ap); 6011: } 6011: 6011: 6011: 6011: 6011: extern int __asprintf_chk (char **__restrict __ptr, int __flag, 6011: const char *__restrict __fmt, ...) 6011: throw () __attribute__ ((__format__ (__printf__, 3, 4))) __attribute__ ((__warn_unused_result__)); 6011: extern int __vasprintf_chk (char **__restrict __ptr, int __flag, 6011: const char *__restrict __fmt, __gnuc_va_list __arg) 6011: throw () __attribute__ ((__format__ (__printf__, 3, 0))) __attribute__ ((__warn_unused_result__)); 6011: extern int __obstack_printf_chk (struct obstack *__restrict __obstack, 6011: int __flag, const char *__restrict __format, 6011: ...) 6011: throw () __attribute__ ((__format__ (__printf__, 3, 4))); 6011: extern int __obstack_vprintf_chk (struct obstack *__restrict __obstack, 6011: int __flag, 6011: const char *__restrict __format, 6011: __gnuc_va_list __args) 6011: throw () __attribute__ ((__format__ (__printf__, 3, 0))); 6011: 6011: 6011: extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int 6011: __attribute__ ((__leaf__)) asprintf (char **__restrict __ptr, const char *__restrict __fmt, ...) throw () 6011: { 6011: return __asprintf_chk (__ptr, 2 - 1, __fmt, 6011: __builtin_va_arg_pack ()); 6011: } 6011: 6011: extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int 6011: __attribute__ ((__leaf__)) __asprintf (char **__restrict __ptr, const char *__restrict __fmt, ...) throw () 6011: 6011: { 6011: return __asprintf_chk (__ptr, 2 - 1, __fmt, 6011: __builtin_va_arg_pack ()); 6011: } 6011: 6011: extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int 6011: __attribute__ ((__leaf__)) obstack_printf (struct obstack *__restrict __obstack, const char *__restrict __fmt, ...) throw () 6011: 6011: { 6011: return __obstack_printf_chk (__obstack, 2 - 1, __fmt, 6011: __builtin_va_arg_pack ()); 6011: } 6011: # 206 "/usr/include/arm-linux-gnueabihf/bits/stdio2.h" 3 4 6011: extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int 6011: __attribute__ ((__leaf__)) vasprintf (char **__restrict __ptr, const char *__restrict __fmt, __gnuc_va_list __ap) throw () 6011: 6011: { 6011: return __vasprintf_chk (__ptr, 2 - 1, __fmt, __ap); 6011: } 6011: 6011: extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int 6011: __attribute__ ((__leaf__)) obstack_vprintf (struct obstack *__restrict __obstack, const char *__restrict __fmt, __gnuc_va_list __ap) throw () 6011: 6011: { 6011: return __obstack_vprintf_chk (__obstack, 2 - 1, __fmt, 6011: __ap); 6011: } 6011: 6011: 6011: 6011: 6011: 6011: 6011: extern char *__gets_chk (char *__str, size_t) __attribute__ ((__warn_unused_result__)); 6011: extern char *__gets_warn (char *__str) __asm__ ("" "gets") 6011: __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("please use fgets or getline instead, gets can't " "specify buffer size"))) 6011: ; 6011: 6011: extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__warn_unused_result__)) char * 6011: gets (char *__str) 6011: { 6011: if (__builtin_object_size (__str, 2 > 1) != (size_t) -1) 6011: return __gets_chk (__str, __builtin_object_size (__str, 2 > 1)); 6011: return __gets_warn (__str); 6011: } 6011: 6011: 6011: extern char *__fgets_chk (char *__restrict __s, size_t __size, int __n, 6011: FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); 6011: extern char *__fgets_alias (char *__restrict __s, int __n, FILE *__restrict __stream) __asm__ ("" "fgets") 6011: 6011: __attribute__ ((__warn_unused_result__)); 6011: extern char *__fgets_chk_warn (char *__restrict __s, size_t __size, int __n, FILE *__restrict __stream) __asm__ ("" "__fgets_chk") 6011: 6011: 6011: __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("fgets called with bigger size than length " "of destination buffer"))) 6011: ; 6011: 6011: extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__warn_unused_result__)) char * 6011: fgets (char *__restrict __s, int __n, FILE *__restrict __stream) 6011: { 6011: if (__builtin_object_size (__s, 2 > 1) != (size_t) -1) 6011: { 6011: if (!__builtin_constant_p (__n) || __n <= 0) 6011: return __fgets_chk (__s, __builtin_object_size (__s, 2 > 1), __n, __stream); 6011: 6011: if ((size_t) __n > __builtin_object_size (__s, 2 > 1)) 6011: return __fgets_chk_warn (__s, __builtin_object_size (__s, 2 > 1), __n, __stream); 6011: } 6011: return __fgets_alias (__s, __n, __stream); 6011: } 6011: 6011: extern size_t __fread_chk (void *__restrict __ptr, size_t __ptrlen, 6011: size_t __size, size_t __n, 6011: FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); 6011: extern size_t __fread_alias (void *__restrict __ptr, size_t __size, size_t __n, FILE *__restrict __stream) __asm__ ("" "fread") 6011: 6011: 6011: __attribute__ ((__warn_unused_result__)); 6011: extern size_t __fread_chk_warn (void *__restrict __ptr, size_t __ptrlen, size_t __size, size_t __n, FILE *__restrict __stream) __asm__ ("" "__fread_chk") 6011: 6011: 6011: 6011: 6011: __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("fread called with bigger size * nmemb than length " "of destination buffer"))) 6011: ; 6011: 6011: extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__warn_unused_result__)) size_t 6011: fread (void *__restrict __ptr, size_t __size, size_t __n, 6011: FILE *__restrict __stream) 6011: { 6011: if (__builtin_object_size (__ptr, 0) != (size_t) -1) 6011: { 6011: if (!__builtin_constant_p (__size) 6011: || !__builtin_constant_p (__n) 6011: || (__size | __n) >= (((size_t) 1) << (8 * sizeof (size_t) / 2))) 6011: return __fread_chk (__ptr, __builtin_object_size (__ptr, 0), __size, __n, __stream); 6011: 6011: if (__size * __n > __builtin_object_size (__ptr, 0)) 6011: return __fread_chk_warn (__ptr, __builtin_object_size (__ptr, 0), __size, __n, __stream); 6011: } 6011: return __fread_alias (__ptr, __size, __n, __stream); 6011: } 6011: 6011: 6011: extern char *__fgets_unlocked_chk (char *__restrict __s, size_t __size, 6011: int __n, FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); 6011: extern char *__fgets_unlocked_alias (char *__restrict __s, int __n, FILE *__restrict __stream) __asm__ ("" "fgets_unlocked") 6011: 6011: __attribute__ ((__warn_unused_result__)); 6011: extern char *__fgets_unlocked_chk_warn (char *__restrict __s, size_t __size, int __n, FILE *__restrict __stream) __asm__ ("" "__fgets_unlocked_chk") 6011: 6011: 6011: __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("fgets_unlocked called with bigger size than length " "of destination buffer"))) 6011: ; 6011: 6011: extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__warn_unused_result__)) char * 6011: fgets_unlocked (char *__restrict __s, int __n, FILE *__restrict __stream) 6011: { 6011: if (__builtin_object_size (__s, 2 > 1) != (size_t) -1) 6011: { 6011: if (!__builtin_constant_p (__n) || __n <= 0) 6011: return __fgets_unlocked_chk (__s, __builtin_object_size (__s, 2 > 1), __n, __stream); 6011: 6011: if ((size_t) __n > __builtin_object_size (__s, 2 > 1)) 6011: return __fgets_unlocked_chk_warn (__s, __builtin_object_size (__s, 2 > 1), __n, __stream); 6011: } 6011: return __fgets_unlocked_alias (__s, __n, __stream); 6011: } 6011: 6011: 6011: 6011: 6011: extern size_t __fread_unlocked_chk (void *__restrict __ptr, size_t __ptrlen, 6011: size_t __size, size_t __n, 6011: FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); 6011: extern size_t __fread_unlocked_alias (void *__restrict __ptr, size_t __size, size_t __n, FILE *__restrict __stream) __asm__ ("" "fread_unlocked") 6011: 6011: 6011: __attribute__ ((__warn_unused_result__)); 6011: 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") 6011: 6011: 6011: 6011: 6011: __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("fread_unlocked called with bigger size * nmemb than " "length of destination buffer"))) 6011: ; 6011: 6011: extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__warn_unused_result__)) size_t 6011: fread_unlocked (void *__restrict __ptr, size_t __size, size_t __n, 6011: FILE *__restrict __stream) 6011: { 6011: if (__builtin_object_size (__ptr, 0) != (size_t) -1) 6011: { 6011: if (!__builtin_constant_p (__size) 6011: || !__builtin_constant_p (__n) 6011: || (__size | __n) >= (((size_t) 1) << (8 * sizeof (size_t) / 2))) 6011: return __fread_unlocked_chk (__ptr, __builtin_object_size (__ptr, 0), __size, __n, 6011: __stream); 6011: 6011: if (__size * __n > __builtin_object_size (__ptr, 0)) 6011: return __fread_unlocked_chk_warn (__ptr, __builtin_object_size (__ptr, 0), __size, __n, 6011: __stream); 6011: } 6011: 6011: 6011: if (__builtin_constant_p (__size) 6011: && __builtin_constant_p (__n) 6011: && (__size | __n) < (((size_t) 1) << (8 * sizeof (size_t) / 2)) 6011: && __size * __n <= 8) 6011: { 6011: size_t __cnt = __size * __n; 6011: char *__cptr = (char *) __ptr; 6011: if (__cnt == 0) 6011: return 0; 6011: 6011: for (; __cnt > 0; --__cnt) 6011: { 6011: int __c = (__builtin_expect (((__stream)->_IO_read_ptr >= (__stream)->_IO_read_end), 0) ? __uflow (__stream) : *(unsigned char *) (__stream)->_IO_read_ptr++); 6011: if (__c == (-1)) 6011: break; 6011: *__cptr++ = __c; 6011: } 6011: return (__cptr - (char *) __ptr) / __size; 6011: } 6011: 6011: return __fread_unlocked_alias (__ptr, __size, __n, __stream); 6011: } 6011: # 863 "/usr/include/stdio.h" 2 3 4 6011: 6011: 6011: 6011: 6011: 6011: } 6011: # 43 "/usr/include/c++/8/cstdio" 2 3 6011: # 96 "/usr/include/c++/8/cstdio" 3 6011: namespace std 6011: { 6011: using ::FILE; 6011: using ::fpos_t; 6011: 6011: using ::clearerr; 6011: using ::fclose; 6011: using ::feof; 6011: using ::ferror; 6011: using ::fflush; 6011: using ::fgetc; 6011: using ::fgetpos; 6011: using ::fgets; 6011: using ::fopen; 6011: using ::fprintf; 6011: using ::fputc; 6011: using ::fputs; 6011: using ::fread; 6011: using ::freopen; 6011: using ::fscanf; 6011: using ::fseek; 6011: using ::fsetpos; 6011: using ::ftell; 6011: using ::fwrite; 6011: using ::getc; 6011: using ::getchar; 6011: 6011: 6011: using ::gets; 6011: 6011: using ::perror; 6011: using ::printf; 6011: using ::putc; 6011: using ::putchar; 6011: using ::puts; 6011: using ::remove; 6011: using ::rename; 6011: using ::rewind; 6011: using ::scanf; 6011: using ::setbuf; 6011: using ::setvbuf; 6011: using ::sprintf; 6011: using ::sscanf; 6011: using ::tmpfile; 6011: 6011: using ::tmpnam; 6011: 6011: using ::ungetc; 6011: using ::vfprintf; 6011: using ::vprintf; 6011: using ::vsprintf; 6011: } 6011: # 157 "/usr/include/c++/8/cstdio" 3 6011: namespace __gnu_cxx 6011: { 6011: # 175 "/usr/include/c++/8/cstdio" 3 6011: using ::snprintf; 6011: using ::vfscanf; 6011: using ::vscanf; 6011: using ::vsnprintf; 6011: using ::vsscanf; 6011: 6011: } 6011: 6011: namespace std 6011: { 6011: using ::__gnu_cxx::snprintf; 6011: using ::__gnu_cxx::vfscanf; 6011: using ::__gnu_cxx::vscanf; 6011: using ::__gnu_cxx::vsnprintf; 6011: using ::__gnu_cxx::vsscanf; 6011: } 6011: # 44 "/usr/include/c++/8/ext/string_conversions.h" 2 3 6011: # 1 "/usr/include/c++/8/cerrno" 1 3 6011: # 39 "/usr/include/c++/8/cerrno" 3 6011: 6011: # 40 "/usr/include/c++/8/cerrno" 3 6011: 6011: 6011: # 1 "/usr/include/errno.h" 1 3 4 6011: # 28 "/usr/include/errno.h" 3 4 6011: # 1 "/usr/include/arm-linux-gnueabihf/bits/errno.h" 1 3 4 6011: # 26 "/usr/include/arm-linux-gnueabihf/bits/errno.h" 3 4 6011: # 1 "/usr/include/linux/errno.h" 1 3 4 6011: # 1 "/usr/include/arm-linux-gnueabihf/asm/errno.h" 1 3 4 6011: # 1 "/usr/include/asm-generic/errno.h" 1 3 4 6011: 6011: 6011: 6011: # 1 "/usr/include/asm-generic/errno-base.h" 1 3 4 6011: # 5 "/usr/include/asm-generic/errno.h" 2 3 4 6011: # 1 "/usr/include/arm-linux-gnueabihf/asm/errno.h" 2 3 4 6011: # 1 "/usr/include/linux/errno.h" 2 3 4 6011: # 27 "/usr/include/arm-linux-gnueabihf/bits/errno.h" 2 3 4 6011: # 29 "/usr/include/errno.h" 2 3 4 6011: 6011: 6011: 6011: 6011: 6011: extern "C" { 6011: 6011: 6011: extern int *__errno_location (void) throw () __attribute__ ((__const__)); 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: extern char *program_invocation_name; 6011: extern char *program_invocation_short_name; 6011: 6011: 6011: 6011: 6011: 6011: typedef int error_t; 6011: 6011: 6011: 6011: 6011: } 6011: # 43 "/usr/include/c++/8/cerrno" 2 3 6011: # 45 "/usr/include/c++/8/ext/string_conversions.h" 2 3 6011: 6011: namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) 6011: { 6011: 6011: 6011: 6011: template 6011: _Ret 6011: __stoa(_TRet (*__convf) (const _CharT*, _CharT**, _Base...), 6011: const char* __name, const _CharT* __str, std::size_t* __idx, 6011: _Base... __base) 6011: { 6011: _Ret __ret; 6011: 6011: _CharT* __endptr; 6011: 6011: struct _Save_errno { 6011: _Save_errno() : _M_errno((*__errno_location ())) { (*__errno_location ()) = 0; } 6011: ~_Save_errno() { if ((*__errno_location ()) == 0) (*__errno_location ()) = _M_errno; } 6011: int _M_errno; 6011: } const __save_errno; 6011: 6011: struct _Range_chk { 6011: static bool 6011: _S_chk(_TRet, std::false_type) { return false; } 6011: 6011: static bool 6011: _S_chk(_TRet __val, std::true_type) 6011: { 6011: return __val < _TRet(__numeric_traits::__min) 6011: || __val > _TRet(__numeric_traits::__max); 6011: } 6011: }; 6011: 6011: const _TRet __tmp = __convf(__str, &__endptr, __base...); 6011: 6011: if (__endptr == __str) 6011: std::__throw_invalid_argument(__name); 6011: else if ((*__errno_location ()) == 34 6011: || _Range_chk::_S_chk(__tmp, std::is_same<_Ret, int>{})) 6011: std::__throw_out_of_range(__name); 6011: else 6011: __ret = __tmp; 6011: 6011: if (__idx) 6011: *__idx = __endptr - __str; 6011: 6011: return __ret; 6011: } 6011: 6011: 6011: template 6011: _String 6011: __to_xstring(int (*__convf) (_CharT*, std::size_t, const _CharT*, 6011: __builtin_va_list), std::size_t __n, 6011: const _CharT* __fmt, ...) 6011: { 6011: 6011: 6011: _CharT* __s = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT) 6011: * __n)); 6011: 6011: __builtin_va_list __args; 6011: __builtin_va_start(__args, __fmt); 6011: 6011: const int __len = __convf(__s, __n, __fmt, __args); 6011: 6011: __builtin_va_end(__args); 6011: 6011: return _String(__s, __s + __len); 6011: } 6011: 6011: 6011: } 6011: # 6362 "/usr/include/c++/8/bits/basic_string.h" 2 3 6011: 6011: namespace std __attribute__ ((__visibility__ ("default"))) 6011: { 6011: 6011: namespace __cxx11 { 6011: 6011: 6011: 6011: inline int 6011: stoi(const string& __str, size_t* __idx = 0, int __base = 10) 6011: { return __gnu_cxx::__stoa(&std::strtol, "stoi", __str.c_str(), 6011: __idx, __base); } 6011: 6011: inline long 6011: stol(const string& __str, size_t* __idx = 0, int __base = 10) 6011: { return __gnu_cxx::__stoa(&std::strtol, "stol", __str.c_str(), 6011: __idx, __base); } 6011: 6011: inline unsigned long 6011: stoul(const string& __str, size_t* __idx = 0, int __base = 10) 6011: { return __gnu_cxx::__stoa(&std::strtoul, "stoul", __str.c_str(), 6011: __idx, __base); } 6011: 6011: inline long long 6011: stoll(const string& __str, size_t* __idx = 0, int __base = 10) 6011: { return __gnu_cxx::__stoa(&std::strtoll, "stoll", __str.c_str(), 6011: __idx, __base); } 6011: 6011: inline unsigned long long 6011: stoull(const string& __str, size_t* __idx = 0, int __base = 10) 6011: { return __gnu_cxx::__stoa(&std::strtoull, "stoull", __str.c_str(), 6011: __idx, __base); } 6011: 6011: 6011: inline float 6011: stof(const string& __str, size_t* __idx = 0) 6011: { return __gnu_cxx::__stoa(&std::strtof, "stof", __str.c_str(), __idx); } 6011: 6011: inline double 6011: stod(const string& __str, size_t* __idx = 0) 6011: { return __gnu_cxx::__stoa(&std::strtod, "stod", __str.c_str(), __idx); } 6011: 6011: inline long double 6011: stold(const string& __str, size_t* __idx = 0) 6011: { return __gnu_cxx::__stoa(&std::strtold, "stold", __str.c_str(), __idx); } 6011: 6011: 6011: 6011: 6011: 6011: 6011: inline string 6011: to_string(int __val) 6011: { return __gnu_cxx::__to_xstring(&std::vsnprintf, 4 * sizeof(int), 6011: "%d", __val); } 6011: 6011: inline string 6011: to_string(unsigned __val) 6011: { return __gnu_cxx::__to_xstring(&std::vsnprintf, 6011: 4 * sizeof(unsigned), 6011: "%u", __val); } 6011: 6011: inline string 6011: to_string(long __val) 6011: { return __gnu_cxx::__to_xstring(&std::vsnprintf, 4 * sizeof(long), 6011: "%ld", __val); } 6011: 6011: inline string 6011: to_string(unsigned long __val) 6011: { return __gnu_cxx::__to_xstring(&std::vsnprintf, 6011: 4 * sizeof(unsigned long), 6011: "%lu", __val); } 6011: 6011: inline string 6011: to_string(long long __val) 6011: { return __gnu_cxx::__to_xstring(&std::vsnprintf, 6011: 4 * sizeof(long long), 6011: "%lld", __val); } 6011: 6011: inline string 6011: to_string(unsigned long long __val) 6011: { return __gnu_cxx::__to_xstring(&std::vsnprintf, 6011: 4 * sizeof(unsigned long long), 6011: "%llu", __val); } 6011: 6011: inline string 6011: to_string(float __val) 6011: { 6011: const int __n = 6011: __gnu_cxx::__numeric_traits::__max_exponent10 + 20; 6011: return __gnu_cxx::__to_xstring(&std::vsnprintf, __n, 6011: "%f", __val); 6011: } 6011: 6011: inline string 6011: to_string(double __val) 6011: { 6011: const int __n = 6011: __gnu_cxx::__numeric_traits::__max_exponent10 + 20; 6011: return __gnu_cxx::__to_xstring(&std::vsnprintf, __n, 6011: "%f", __val); 6011: } 6011: 6011: inline string 6011: to_string(long double __val) 6011: { 6011: const int __n = 6011: __gnu_cxx::__numeric_traits::__max_exponent10 + 20; 6011: return __gnu_cxx::__to_xstring(&std::vsnprintf, __n, 6011: "%Lf", __val); 6011: } 6011: 6011: 6011: 6011: inline int 6011: stoi(const wstring& __str, size_t* __idx = 0, int __base = 10) 6011: { return __gnu_cxx::__stoa(&std::wcstol, "stoi", __str.c_str(), 6011: __idx, __base); } 6011: 6011: inline long 6011: stol(const wstring& __str, size_t* __idx = 0, int __base = 10) 6011: { return __gnu_cxx::__stoa(&std::wcstol, "stol", __str.c_str(), 6011: __idx, __base); } 6011: 6011: inline unsigned long 6011: stoul(const wstring& __str, size_t* __idx = 0, int __base = 10) 6011: { return __gnu_cxx::__stoa(&std::wcstoul, "stoul", __str.c_str(), 6011: __idx, __base); } 6011: 6011: inline long long 6011: stoll(const wstring& __str, size_t* __idx = 0, int __base = 10) 6011: { return __gnu_cxx::__stoa(&std::wcstoll, "stoll", __str.c_str(), 6011: __idx, __base); } 6011: 6011: inline unsigned long long 6011: stoull(const wstring& __str, size_t* __idx = 0, int __base = 10) 6011: { return __gnu_cxx::__stoa(&std::wcstoull, "stoull", __str.c_str(), 6011: __idx, __base); } 6011: 6011: 6011: inline float 6011: stof(const wstring& __str, size_t* __idx = 0) 6011: { return __gnu_cxx::__stoa(&std::wcstof, "stof", __str.c_str(), __idx); } 6011: 6011: inline double 6011: stod(const wstring& __str, size_t* __idx = 0) 6011: { return __gnu_cxx::__stoa(&std::wcstod, "stod", __str.c_str(), __idx); } 6011: 6011: inline long double 6011: stold(const wstring& __str, size_t* __idx = 0) 6011: { return __gnu_cxx::__stoa(&std::wcstold, "stold", __str.c_str(), __idx); } 6011: 6011: 6011: 6011: inline wstring 6011: to_wstring(int __val) 6011: { return __gnu_cxx::__to_xstring(&std::vswprintf, 4 * sizeof(int), 6011: L"%d", __val); } 6011: 6011: inline wstring 6011: to_wstring(unsigned __val) 6011: { return __gnu_cxx::__to_xstring(&std::vswprintf, 6011: 4 * sizeof(unsigned), 6011: L"%u", __val); } 6011: 6011: inline wstring 6011: to_wstring(long __val) 6011: { return __gnu_cxx::__to_xstring(&std::vswprintf, 4 * sizeof(long), 6011: L"%ld", __val); } 6011: 6011: inline wstring 6011: to_wstring(unsigned long __val) 6011: { return __gnu_cxx::__to_xstring(&std::vswprintf, 6011: 4 * sizeof(unsigned long), 6011: L"%lu", __val); } 6011: 6011: inline wstring 6011: to_wstring(long long __val) 6011: { return __gnu_cxx::__to_xstring(&std::vswprintf, 6011: 4 * sizeof(long long), 6011: L"%lld", __val); } 6011: 6011: inline wstring 6011: to_wstring(unsigned long long __val) 6011: { return __gnu_cxx::__to_xstring(&std::vswprintf, 6011: 4 * sizeof(unsigned long long), 6011: L"%llu", __val); } 6011: 6011: inline wstring 6011: to_wstring(float __val) 6011: { 6011: const int __n = 6011: __gnu_cxx::__numeric_traits::__max_exponent10 + 20; 6011: return __gnu_cxx::__to_xstring(&std::vswprintf, __n, 6011: L"%f", __val); 6011: } 6011: 6011: inline wstring 6011: to_wstring(double __val) 6011: { 6011: const int __n = 6011: __gnu_cxx::__numeric_traits::__max_exponent10 + 20; 6011: return __gnu_cxx::__to_xstring(&std::vswprintf, __n, 6011: L"%f", __val); 6011: } 6011: 6011: inline wstring 6011: to_wstring(long double __val) 6011: { 6011: const int __n = 6011: __gnu_cxx::__numeric_traits::__max_exponent10 + 20; 6011: return __gnu_cxx::__to_xstring(&std::vswprintf, __n, 6011: L"%Lf", __val); 6011: } 6011: 6011: 6011: 6011: } 6011: 6011: } 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: namespace std __attribute__ ((__visibility__ ("default"))) 6011: { 6011: 6011: 6011: 6011: 6011: 6011: 6011: template<> 6011: struct hash 6011: : public __hash_base 6011: { 6011: size_t 6011: operator()(const string& __s) const noexcept 6011: { return std::_Hash_impl::hash(__s.data(), __s.length()); } 6011: }; 6011: 6011: template<> 6011: struct __is_fast_hash> : std::false_type 6011: { }; 6011: 6011: 6011: 6011: template<> 6011: struct hash 6011: : public __hash_base 6011: { 6011: size_t 6011: operator()(const wstring& __s) const noexcept 6011: { return std::_Hash_impl::hash(__s.data(), 6011: __s.length() * sizeof(wchar_t)); } 6011: }; 6011: 6011: template<> 6011: struct __is_fast_hash> : std::false_type 6011: { }; 6011: 6011: 6011: 6011: 6011: 6011: template<> 6011: struct hash 6011: : public __hash_base 6011: { 6011: size_t 6011: operator()(const u16string& __s) const noexcept 6011: { return std::_Hash_impl::hash(__s.data(), 6011: __s.length() * sizeof(char16_t)); } 6011: }; 6011: 6011: template<> 6011: struct __is_fast_hash> : std::false_type 6011: { }; 6011: 6011: 6011: template<> 6011: struct hash 6011: : public __hash_base 6011: { 6011: size_t 6011: operator()(const u32string& __s) const noexcept 6011: { return std::_Hash_impl::hash(__s.data(), 6011: __s.length() * sizeof(char32_t)); } 6011: }; 6011: 6011: template<> 6011: struct __is_fast_hash> : std::false_type 6011: { }; 6011: # 6700 "/usr/include/c++/8/bits/basic_string.h" 3 6011: 6011: } 6011: # 53 "/usr/include/c++/8/string" 2 3 6011: # 1 "/usr/include/c++/8/bits/basic_string.tcc" 1 3 6011: # 42 "/usr/include/c++/8/bits/basic_string.tcc" 3 6011: 6011: # 43 "/usr/include/c++/8/bits/basic_string.tcc" 3 6011: 6011: 6011: 6011: namespace std __attribute__ ((__visibility__ ("default"))) 6011: { 6011: 6011: 6011: 6011: 6011: template 6011: const typename basic_string<_CharT, _Traits, _Alloc>::size_type 6011: basic_string<_CharT, _Traits, _Alloc>::npos; 6011: 6011: template 6011: void 6011: basic_string<_CharT, _Traits, _Alloc>:: 6011: swap(basic_string& __s) noexcept 6011: { 6011: if (this == &__s) 6011: return; 6011: 6011: _Alloc_traits::_S_on_swap(_M_get_allocator(), __s._M_get_allocator()); 6011: 6011: if (_M_is_local()) 6011: if (__s._M_is_local()) 6011: { 6011: if (length() && __s.length()) 6011: { 6011: _CharT __tmp_data[_S_local_capacity + 1]; 6011: traits_type::copy(__tmp_data, __s._M_local_buf, 6011: _S_local_capacity + 1); 6011: traits_type::copy(__s._M_local_buf, _M_local_buf, 6011: _S_local_capacity + 1); 6011: traits_type::copy(_M_local_buf, __tmp_data, 6011: _S_local_capacity + 1); 6011: } 6011: else if (__s.length()) 6011: { 6011: traits_type::copy(_M_local_buf, __s._M_local_buf, 6011: _S_local_capacity + 1); 6011: _M_length(__s.length()); 6011: __s._M_set_length(0); 6011: return; 6011: } 6011: else if (length()) 6011: { 6011: traits_type::copy(__s._M_local_buf, _M_local_buf, 6011: _S_local_capacity + 1); 6011: __s._M_length(length()); 6011: _M_set_length(0); 6011: return; 6011: } 6011: } 6011: else 6011: { 6011: const size_type __tmp_capacity = __s._M_allocated_capacity; 6011: traits_type::copy(__s._M_local_buf, _M_local_buf, 6011: _S_local_capacity + 1); 6011: _M_data(__s._M_data()); 6011: __s._M_data(__s._M_local_buf); 6011: _M_capacity(__tmp_capacity); 6011: } 6011: else 6011: { 6011: const size_type __tmp_capacity = _M_allocated_capacity; 6011: if (__s._M_is_local()) 6011: { 6011: traits_type::copy(_M_local_buf, __s._M_local_buf, 6011: _S_local_capacity + 1); 6011: __s._M_data(_M_data()); 6011: _M_data(_M_local_buf); 6011: } 6011: else 6011: { 6011: pointer __tmp_ptr = _M_data(); 6011: _M_data(__s._M_data()); 6011: __s._M_data(__tmp_ptr); 6011: _M_capacity(__s._M_allocated_capacity); 6011: } 6011: __s._M_capacity(__tmp_capacity); 6011: } 6011: 6011: const size_type __tmp_length = length(); 6011: _M_length(__s.length()); 6011: __s._M_length(__tmp_length); 6011: } 6011: 6011: template 6011: typename basic_string<_CharT, _Traits, _Alloc>::pointer 6011: basic_string<_CharT, _Traits, _Alloc>:: 6011: _M_create(size_type& __capacity, size_type __old_capacity) 6011: { 6011: 6011: 6011: if (__capacity > max_size()) 6011: std::__throw_length_error(("basic_string::_M_create")); 6011: 6011: 6011: 6011: 6011: if (__capacity > __old_capacity && __capacity < 2 * __old_capacity) 6011: { 6011: __capacity = 2 * __old_capacity; 6011: 6011: if (__capacity > max_size()) 6011: __capacity = max_size(); 6011: } 6011: 6011: 6011: 6011: return _Alloc_traits::allocate(_M_get_allocator(), __capacity + 1); 6011: } 6011: 6011: 6011: 6011: 6011: 6011: template 6011: template 6011: void 6011: basic_string<_CharT, _Traits, _Alloc>:: 6011: _M_construct(_InIterator __beg, _InIterator __end, 6011: std::input_iterator_tag) 6011: { 6011: size_type __len = 0; 6011: size_type __capacity = size_type(_S_local_capacity); 6011: 6011: while (__beg != __end && __len < __capacity) 6011: { 6011: _M_data()[__len++] = *__beg; 6011: ++__beg; 6011: } 6011: 6011: try 6011: { 6011: while (__beg != __end) 6011: { 6011: if (__len == __capacity) 6011: { 6011: 6011: __capacity = __len + 1; 6011: pointer __another = _M_create(__capacity, __len); 6011: this->_S_copy(__another, _M_data(), __len); 6011: _M_dispose(); 6011: _M_data(__another); 6011: _M_capacity(__capacity); 6011: } 6011: _M_data()[__len++] = *__beg; 6011: ++__beg; 6011: } 6011: } 6011: catch(...) 6011: { 6011: _M_dispose(); 6011: throw; 6011: } 6011: 6011: _M_set_length(__len); 6011: } 6011: 6011: template 6011: template 6011: void 6011: basic_string<_CharT, _Traits, _Alloc>:: 6011: _M_construct(_InIterator __beg, _InIterator __end, 6011: std::forward_iterator_tag) 6011: { 6011: 6011: if (__gnu_cxx::__is_null_pointer(__beg) && __beg != __end) 6011: std::__throw_logic_error(("basic_string::" "_M_construct null not valid") 6011: ); 6011: 6011: size_type __dnew = static_cast(std::distance(__beg, __end)); 6011: 6011: if (__dnew > size_type(_S_local_capacity)) 6011: { 6011: _M_data(_M_create(__dnew, size_type(0))); 6011: _M_capacity(__dnew); 6011: } 6011: 6011: 6011: try 6011: { this->_S_copy_chars(_M_data(), __beg, __end); } 6011: catch(...) 6011: { 6011: _M_dispose(); 6011: throw; 6011: } 6011: 6011: _M_set_length(__dnew); 6011: } 6011: 6011: template 6011: void 6011: basic_string<_CharT, _Traits, _Alloc>:: 6011: _M_construct(size_type __n, _CharT __c) 6011: { 6011: if (__n > size_type(_S_local_capacity)) 6011: { 6011: _M_data(_M_create(__n, size_type(0))); 6011: _M_capacity(__n); 6011: } 6011: 6011: if (__n) 6011: this->_S_assign(_M_data(), __n, __c); 6011: 6011: _M_set_length(__n); 6011: } 6011: 6011: template 6011: void 6011: basic_string<_CharT, _Traits, _Alloc>:: 6011: _M_assign(const basic_string& __str) 6011: { 6011: if (this != &__str) 6011: { 6011: const size_type __rsize = __str.length(); 6011: const size_type __capacity = capacity(); 6011: 6011: if (__rsize > __capacity) 6011: { 6011: size_type __new_capacity = __rsize; 6011: pointer __tmp = _M_create(__new_capacity, __capacity); 6011: _M_dispose(); 6011: _M_data(__tmp); 6011: _M_capacity(__new_capacity); 6011: } 6011: 6011: if (__rsize) 6011: this->_S_copy(_M_data(), __str._M_data(), __rsize); 6011: 6011: _M_set_length(__rsize); 6011: } 6011: } 6011: 6011: template 6011: void 6011: basic_string<_CharT, _Traits, _Alloc>:: 6011: reserve(size_type __res) 6011: { 6011: 6011: if (__res < length()) 6011: __res = length(); 6011: 6011: const size_type __capacity = capacity(); 6011: if (__res != __capacity) 6011: { 6011: if (__res > __capacity 6011: || __res > size_type(_S_local_capacity)) 6011: { 6011: pointer __tmp = _M_create(__res, __capacity); 6011: this->_S_copy(__tmp, _M_data(), length() + 1); 6011: _M_dispose(); 6011: _M_data(__tmp); 6011: _M_capacity(__res); 6011: } 6011: else if (!_M_is_local()) 6011: { 6011: this->_S_copy(_M_local_data(), _M_data(), length() + 1); 6011: _M_destroy(__capacity); 6011: _M_data(_M_local_data()); 6011: } 6011: } 6011: } 6011: 6011: template 6011: void 6011: basic_string<_CharT, _Traits, _Alloc>:: 6011: _M_mutate(size_type __pos, size_type __len1, const _CharT* __s, 6011: size_type __len2) 6011: { 6011: const size_type __how_much = length() - __pos - __len1; 6011: 6011: size_type __new_capacity = length() + __len2 - __len1; 6011: pointer __r = _M_create(__new_capacity, capacity()); 6011: 6011: if (__pos) 6011: this->_S_copy(__r, _M_data(), __pos); 6011: if (__s && __len2) 6011: this->_S_copy(__r + __pos, __s, __len2); 6011: if (__how_much) 6011: this->_S_copy(__r + __pos + __len2, 6011: _M_data() + __pos + __len1, __how_much); 6011: 6011: _M_dispose(); 6011: _M_data(__r); 6011: _M_capacity(__new_capacity); 6011: } 6011: 6011: template 6011: void 6011: basic_string<_CharT, _Traits, _Alloc>:: 6011: _M_erase(size_type __pos, size_type __n) 6011: { 6011: const size_type __how_much = length() - __pos - __n; 6011: 6011: if (__how_much && __n) 6011: this->_S_move(_M_data() + __pos, _M_data() + __pos + __n, __how_much); 6011: 6011: _M_set_length(length() - __n); 6011: } 6011: 6011: template 6011: void 6011: basic_string<_CharT, _Traits, _Alloc>:: 6011: resize(size_type __n, _CharT __c) 6011: { 6011: const size_type __size = this->size(); 6011: if (__size < __n) 6011: this->append(__n - __size, __c); 6011: else if (__n < __size) 6011: this->_M_set_length(__n); 6011: } 6011: 6011: template 6011: basic_string<_CharT, _Traits, _Alloc>& 6011: basic_string<_CharT, _Traits, _Alloc>:: 6011: _M_append(const _CharT* __s, size_type __n) 6011: { 6011: const size_type __len = __n + this->size(); 6011: 6011: if (__len <= this->capacity()) 6011: { 6011: if (__n) 6011: this->_S_copy(this->_M_data() + this->size(), __s, __n); 6011: } 6011: else 6011: this->_M_mutate(this->size(), size_type(0), __s, __n); 6011: 6011: this->_M_set_length(__len); 6011: return *this; 6011: } 6011: 6011: template 6011: template 6011: basic_string<_CharT, _Traits, _Alloc>& 6011: basic_string<_CharT, _Traits, _Alloc>:: 6011: _M_replace_dispatch(const_iterator __i1, const_iterator __i2, 6011: _InputIterator __k1, _InputIterator __k2, 6011: std::__false_type) 6011: { 6011: const basic_string __s(__k1, __k2); 6011: const size_type __n1 = __i2 - __i1; 6011: return _M_replace(__i1 - begin(), __n1, __s._M_data(), 6011: __s.size()); 6011: } 6011: 6011: template 6011: basic_string<_CharT, _Traits, _Alloc>& 6011: basic_string<_CharT, _Traits, _Alloc>:: 6011: _M_replace_aux(size_type __pos1, size_type __n1, size_type __n2, 6011: _CharT __c) 6011: { 6011: _M_check_length(__n1, __n2, "basic_string::_M_replace_aux"); 6011: 6011: const size_type __old_size = this->size(); 6011: const size_type __new_size = __old_size + __n2 - __n1; 6011: 6011: if (__new_size <= this->capacity()) 6011: { 6011: pointer __p = this->_M_data() + __pos1; 6011: 6011: const size_type __how_much = __old_size - __pos1 - __n1; 6011: if (__how_much && __n1 != __n2) 6011: this->_S_move(__p + __n2, __p + __n1, __how_much); 6011: } 6011: else 6011: this->_M_mutate(__pos1, __n1, 0, __n2); 6011: 6011: if (__n2) 6011: this->_S_assign(this->_M_data() + __pos1, __n2, __c); 6011: 6011: this->_M_set_length(__new_size); 6011: return *this; 6011: } 6011: 6011: template 6011: basic_string<_CharT, _Traits, _Alloc>& 6011: basic_string<_CharT, _Traits, _Alloc>:: 6011: _M_replace(size_type __pos, size_type __len1, const _CharT* __s, 6011: const size_type __len2) 6011: { 6011: _M_check_length(__len1, __len2, "basic_string::_M_replace"); 6011: 6011: const size_type __old_size = this->size(); 6011: const size_type __new_size = __old_size + __len2 - __len1; 6011: 6011: if (__new_size <= this->capacity()) 6011: { 6011: pointer __p = this->_M_data() + __pos; 6011: 6011: const size_type __how_much = __old_size - __pos - __len1; 6011: if (_M_disjunct(__s)) 6011: { 6011: if (__how_much && __len1 != __len2) 6011: this->_S_move(__p + __len2, __p + __len1, __how_much); 6011: if (__len2) 6011: this->_S_copy(__p, __s, __len2); 6011: } 6011: else 6011: { 6011: 6011: if (__len2 && __len2 <= __len1) 6011: this->_S_move(__p, __s, __len2); 6011: if (__how_much && __len1 != __len2) 6011: this->_S_move(__p + __len2, __p + __len1, __how_much); 6011: if (__len2 > __len1) 6011: { 6011: if (__s + __len2 <= __p + __len1) 6011: this->_S_move(__p, __s, __len2); 6011: else if (__s >= __p + __len1) 6011: this->_S_copy(__p, __s + __len2 - __len1, __len2); 6011: else 6011: { 6011: const size_type __nleft = (__p + __len1) - __s; 6011: this->_S_move(__p, __s, __nleft); 6011: this->_S_copy(__p + __nleft, __p + __len2, 6011: __len2 - __nleft); 6011: } 6011: } 6011: } 6011: } 6011: else 6011: this->_M_mutate(__pos, __len1, __s, __len2); 6011: 6011: this->_M_set_length(__new_size); 6011: return *this; 6011: } 6011: 6011: template 6011: typename basic_string<_CharT, _Traits, _Alloc>::size_type 6011: basic_string<_CharT, _Traits, _Alloc>:: 6011: copy(_CharT* __s, size_type __n, size_type __pos) const 6011: { 6011: _M_check(__pos, "basic_string::copy"); 6011: __n = _M_limit(__pos, __n); 6011: ; 6011: if (__n) 6011: _S_copy(__s, _M_data() + __pos, __n); 6011: 6011: return __n; 6011: } 6011: # 1155 "/usr/include/c++/8/bits/basic_string.tcc" 3 6011: template 6011: basic_string<_CharT, _Traits, _Alloc> 6011: operator+(const _CharT* __lhs, 6011: const basic_string<_CharT, _Traits, _Alloc>& __rhs) 6011: { 6011: ; 6011: typedef basic_string<_CharT, _Traits, _Alloc> __string_type; 6011: typedef typename __string_type::size_type __size_type; 6011: const __size_type __len = _Traits::length(__lhs); 6011: __string_type __str; 6011: __str.reserve(__len + __rhs.size()); 6011: __str.append(__lhs, __len); 6011: __str.append(__rhs); 6011: return __str; 6011: } 6011: 6011: template 6011: basic_string<_CharT, _Traits, _Alloc> 6011: operator+(_CharT __lhs, const basic_string<_CharT, _Traits, _Alloc>& __rhs) 6011: { 6011: typedef basic_string<_CharT, _Traits, _Alloc> __string_type; 6011: typedef typename __string_type::size_type __size_type; 6011: __string_type __str; 6011: const __size_type __len = __rhs.size(); 6011: __str.reserve(__len + 1); 6011: __str.append(__size_type(1), __lhs); 6011: __str.append(__rhs); 6011: return __str; 6011: } 6011: 6011: template 6011: typename basic_string<_CharT, _Traits, _Alloc>::size_type 6011: basic_string<_CharT, _Traits, _Alloc>:: 6011: find(const _CharT* __s, size_type __pos, size_type __n) const 6011: noexcept 6011: { 6011: ; 6011: const size_type __size = this->size(); 6011: 6011: if (__n == 0) 6011: return __pos <= __size ? __pos : npos; 6011: if (__pos >= __size) 6011: return npos; 6011: 6011: const _CharT __elem0 = __s[0]; 6011: const _CharT* const __data = data(); 6011: const _CharT* __first = __data + __pos; 6011: const _CharT* const __last = __data + __size; 6011: size_type __len = __size - __pos; 6011: 6011: while (__len >= __n) 6011: { 6011: 6011: __first = traits_type::find(__first, __len - __n + 1, __elem0); 6011: if (!__first) 6011: return npos; 6011: 6011: 6011: 6011: if (traits_type::compare(__first, __s, __n) == 0) 6011: return __first - __data; 6011: __len = __last - ++__first; 6011: } 6011: return npos; 6011: } 6011: 6011: template 6011: typename basic_string<_CharT, _Traits, _Alloc>::size_type 6011: basic_string<_CharT, _Traits, _Alloc>:: 6011: find(_CharT __c, size_type __pos) const noexcept 6011: { 6011: size_type __ret = npos; 6011: const size_type __size = this->size(); 6011: if (__pos < __size) 6011: { 6011: const _CharT* __data = _M_data(); 6011: const size_type __n = __size - __pos; 6011: const _CharT* __p = traits_type::find(__data + __pos, __n, __c); 6011: if (__p) 6011: __ret = __p - __data; 6011: } 6011: return __ret; 6011: } 6011: 6011: template 6011: typename basic_string<_CharT, _Traits, _Alloc>::size_type 6011: basic_string<_CharT, _Traits, _Alloc>:: 6011: rfind(const _CharT* __s, size_type __pos, size_type __n) const 6011: noexcept 6011: { 6011: ; 6011: const size_type __size = this->size(); 6011: if (__n <= __size) 6011: { 6011: __pos = std::min(size_type(__size - __n), __pos); 6011: const _CharT* __data = _M_data(); 6011: do 6011: { 6011: if (traits_type::compare(__data + __pos, __s, __n) == 0) 6011: return __pos; 6011: } 6011: while (__pos-- > 0); 6011: } 6011: return npos; 6011: } 6011: 6011: template 6011: typename basic_string<_CharT, _Traits, _Alloc>::size_type 6011: basic_string<_CharT, _Traits, _Alloc>:: 6011: rfind(_CharT __c, size_type __pos) const noexcept 6011: { 6011: size_type __size = this->size(); 6011: if (__size) 6011: { 6011: if (--__size > __pos) 6011: __size = __pos; 6011: for (++__size; __size-- > 0; ) 6011: if (traits_type::eq(_M_data()[__size], __c)) 6011: return __size; 6011: } 6011: return npos; 6011: } 6011: 6011: template 6011: typename basic_string<_CharT, _Traits, _Alloc>::size_type 6011: basic_string<_CharT, _Traits, _Alloc>:: 6011: find_first_of(const _CharT* __s, size_type __pos, size_type __n) const 6011: noexcept 6011: { 6011: ; 6011: for (; __n && __pos < this->size(); ++__pos) 6011: { 6011: const _CharT* __p = traits_type::find(__s, __n, _M_data()[__pos]); 6011: if (__p) 6011: return __pos; 6011: } 6011: return npos; 6011: } 6011: 6011: template 6011: typename basic_string<_CharT, _Traits, _Alloc>::size_type 6011: basic_string<_CharT, _Traits, _Alloc>:: 6011: find_last_of(const _CharT* __s, size_type __pos, size_type __n) const 6011: noexcept 6011: { 6011: ; 6011: size_type __size = this->size(); 6011: if (__size && __n) 6011: { 6011: if (--__size > __pos) 6011: __size = __pos; 6011: do 6011: { 6011: if (traits_type::find(__s, __n, _M_data()[__size])) 6011: return __size; 6011: } 6011: while (__size-- != 0); 6011: } 6011: return npos; 6011: } 6011: 6011: template 6011: typename basic_string<_CharT, _Traits, _Alloc>::size_type 6011: basic_string<_CharT, _Traits, _Alloc>:: 6011: find_first_not_of(const _CharT* __s, size_type __pos, size_type __n) const 6011: noexcept 6011: { 6011: ; 6011: for (; __pos < this->size(); ++__pos) 6011: if (!traits_type::find(__s, __n, _M_data()[__pos])) 6011: return __pos; 6011: return npos; 6011: } 6011: 6011: template 6011: typename basic_string<_CharT, _Traits, _Alloc>::size_type 6011: basic_string<_CharT, _Traits, _Alloc>:: 6011: find_first_not_of(_CharT __c, size_type __pos) const noexcept 6011: { 6011: for (; __pos < this->size(); ++__pos) 6011: if (!traits_type::eq(_M_data()[__pos], __c)) 6011: return __pos; 6011: return npos; 6011: } 6011: 6011: template 6011: typename basic_string<_CharT, _Traits, _Alloc>::size_type 6011: basic_string<_CharT, _Traits, _Alloc>:: 6011: find_last_not_of(const _CharT* __s, size_type __pos, size_type __n) const 6011: noexcept 6011: { 6011: ; 6011: size_type __size = this->size(); 6011: if (__size) 6011: { 6011: if (--__size > __pos) 6011: __size = __pos; 6011: do 6011: { 6011: if (!traits_type::find(__s, __n, _M_data()[__size])) 6011: return __size; 6011: } 6011: while (__size--); 6011: } 6011: return npos; 6011: } 6011: 6011: template 6011: typename basic_string<_CharT, _Traits, _Alloc>::size_type 6011: basic_string<_CharT, _Traits, _Alloc>:: 6011: find_last_not_of(_CharT __c, size_type __pos) const noexcept 6011: { 6011: size_type __size = this->size(); 6011: if (__size) 6011: { 6011: if (--__size > __pos) 6011: __size = __pos; 6011: do 6011: { 6011: if (!traits_type::eq(_M_data()[__size], __c)) 6011: return __size; 6011: } 6011: while (__size--); 6011: } 6011: return npos; 6011: } 6011: 6011: template 6011: int 6011: basic_string<_CharT, _Traits, _Alloc>:: 6011: compare(size_type __pos, size_type __n, const basic_string& __str) const 6011: { 6011: _M_check(__pos, "basic_string::compare"); 6011: __n = _M_limit(__pos, __n); 6011: const size_type __osize = __str.size(); 6011: const size_type __len = std::min(__n, __osize); 6011: int __r = traits_type::compare(_M_data() + __pos, __str.data(), __len); 6011: if (!__r) 6011: __r = _S_compare(__n, __osize); 6011: return __r; 6011: } 6011: 6011: template 6011: int 6011: basic_string<_CharT, _Traits, _Alloc>:: 6011: compare(size_type __pos1, size_type __n1, const basic_string& __str, 6011: size_type __pos2, size_type __n2) const 6011: { 6011: _M_check(__pos1, "basic_string::compare"); 6011: __str._M_check(__pos2, "basic_string::compare"); 6011: __n1 = _M_limit(__pos1, __n1); 6011: __n2 = __str._M_limit(__pos2, __n2); 6011: const size_type __len = std::min(__n1, __n2); 6011: int __r = traits_type::compare(_M_data() + __pos1, 6011: __str.data() + __pos2, __len); 6011: if (!__r) 6011: __r = _S_compare(__n1, __n2); 6011: return __r; 6011: } 6011: 6011: template 6011: int 6011: basic_string<_CharT, _Traits, _Alloc>:: 6011: compare(const _CharT* __s) const noexcept 6011: { 6011: ; 6011: const size_type __size = this->size(); 6011: const size_type __osize = traits_type::length(__s); 6011: const size_type __len = std::min(__size, __osize); 6011: int __r = traits_type::compare(_M_data(), __s, __len); 6011: if (!__r) 6011: __r = _S_compare(__size, __osize); 6011: return __r; 6011: } 6011: 6011: template 6011: int 6011: basic_string <_CharT, _Traits, _Alloc>:: 6011: compare(size_type __pos, size_type __n1, const _CharT* __s) const 6011: { 6011: ; 6011: _M_check(__pos, "basic_string::compare"); 6011: __n1 = _M_limit(__pos, __n1); 6011: const size_type __osize = traits_type::length(__s); 6011: const size_type __len = std::min(__n1, __osize); 6011: int __r = traits_type::compare(_M_data() + __pos, __s, __len); 6011: if (!__r) 6011: __r = _S_compare(__n1, __osize); 6011: return __r; 6011: } 6011: 6011: template 6011: int 6011: basic_string <_CharT, _Traits, _Alloc>:: 6011: compare(size_type __pos, size_type __n1, const _CharT* __s, 6011: size_type __n2) const 6011: { 6011: ; 6011: _M_check(__pos, "basic_string::compare"); 6011: __n1 = _M_limit(__pos, __n1); 6011: const size_type __len = std::min(__n1, __n2); 6011: int __r = traits_type::compare(_M_data() + __pos, __s, __len); 6011: if (!__r) 6011: __r = _S_compare(__n1, __n2); 6011: return __r; 6011: } 6011: 6011: 6011: template 6011: basic_istream<_CharT, _Traits>& 6011: operator>>(basic_istream<_CharT, _Traits>& __in, 6011: basic_string<_CharT, _Traits, _Alloc>& __str) 6011: { 6011: typedef basic_istream<_CharT, _Traits> __istream_type; 6011: typedef basic_string<_CharT, _Traits, _Alloc> __string_type; 6011: typedef typename __istream_type::ios_base __ios_base; 6011: typedef typename __istream_type::int_type __int_type; 6011: typedef typename __string_type::size_type __size_type; 6011: typedef ctype<_CharT> __ctype_type; 6011: typedef typename __ctype_type::ctype_base __ctype_base; 6011: 6011: __size_type __extracted = 0; 6011: typename __ios_base::iostate __err = __ios_base::goodbit; 6011: typename __istream_type::sentry __cerb(__in, false); 6011: if (__cerb) 6011: { 6011: try 6011: { 6011: 6011: __str.erase(); 6011: _CharT __buf[128]; 6011: __size_type __len = 0; 6011: const streamsize __w = __in.width(); 6011: const __size_type __n = __w > 0 ? static_cast<__size_type>(__w) 6011: : __str.max_size(); 6011: const __ctype_type& __ct = use_facet<__ctype_type>(__in.getloc()); 6011: const __int_type __eof = _Traits::eof(); 6011: __int_type __c = __in.rdbuf()->sgetc(); 6011: 6011: while (__extracted < __n 6011: && !_Traits::eq_int_type(__c, __eof) 6011: && !__ct.is(__ctype_base::space, 6011: _Traits::to_char_type(__c))) 6011: { 6011: if (__len == sizeof(__buf) / sizeof(_CharT)) 6011: { 6011: __str.append(__buf, sizeof(__buf) / sizeof(_CharT)); 6011: __len = 0; 6011: } 6011: __buf[__len++] = _Traits::to_char_type(__c); 6011: ++__extracted; 6011: __c = __in.rdbuf()->snextc(); 6011: } 6011: __str.append(__buf, __len); 6011: 6011: if (_Traits::eq_int_type(__c, __eof)) 6011: __err |= __ios_base::eofbit; 6011: __in.width(0); 6011: } 6011: catch(__cxxabiv1::__forced_unwind&) 6011: { 6011: __in._M_setstate(__ios_base::badbit); 6011: throw; 6011: } 6011: catch(...) 6011: { 6011: 6011: 6011: 6011: __in._M_setstate(__ios_base::badbit); 6011: } 6011: } 6011: 6011: if (!__extracted) 6011: __err |= __ios_base::failbit; 6011: if (__err) 6011: __in.setstate(__err); 6011: return __in; 6011: } 6011: 6011: template 6011: basic_istream<_CharT, _Traits>& 6011: getline(basic_istream<_CharT, _Traits>& __in, 6011: basic_string<_CharT, _Traits, _Alloc>& __str, _CharT __delim) 6011: { 6011: typedef basic_istream<_CharT, _Traits> __istream_type; 6011: typedef basic_string<_CharT, _Traits, _Alloc> __string_type; 6011: typedef typename __istream_type::ios_base __ios_base; 6011: typedef typename __istream_type::int_type __int_type; 6011: typedef typename __string_type::size_type __size_type; 6011: 6011: __size_type __extracted = 0; 6011: const __size_type __n = __str.max_size(); 6011: typename __ios_base::iostate __err = __ios_base::goodbit; 6011: typename __istream_type::sentry __cerb(__in, true); 6011: if (__cerb) 6011: { 6011: try 6011: { 6011: __str.erase(); 6011: const __int_type __idelim = _Traits::to_int_type(__delim); 6011: const __int_type __eof = _Traits::eof(); 6011: __int_type __c = __in.rdbuf()->sgetc(); 6011: 6011: while (__extracted < __n 6011: && !_Traits::eq_int_type(__c, __eof) 6011: && !_Traits::eq_int_type(__c, __idelim)) 6011: { 6011: __str += _Traits::to_char_type(__c); 6011: ++__extracted; 6011: __c = __in.rdbuf()->snextc(); 6011: } 6011: 6011: if (_Traits::eq_int_type(__c, __eof)) 6011: __err |= __ios_base::eofbit; 6011: else if (_Traits::eq_int_type(__c, __idelim)) 6011: { 6011: ++__extracted; 6011: __in.rdbuf()->sbumpc(); 6011: } 6011: else 6011: __err |= __ios_base::failbit; 6011: } 6011: catch(__cxxabiv1::__forced_unwind&) 6011: { 6011: __in._M_setstate(__ios_base::badbit); 6011: throw; 6011: } 6011: catch(...) 6011: { 6011: 6011: 6011: 6011: __in._M_setstate(__ios_base::badbit); 6011: } 6011: } 6011: if (!__extracted) 6011: __err |= __ios_base::failbit; 6011: if (__err) 6011: __in.setstate(__err); 6011: return __in; 6011: } 6011: 6011: 6011: 6011: 6011: extern template class basic_string; 6011: extern template 6011: basic_istream& 6011: operator>>(basic_istream&, string&); 6011: extern template 6011: basic_ostream& 6011: operator<<(basic_ostream&, const string&); 6011: extern template 6011: basic_istream& 6011: getline(basic_istream&, string&, char); 6011: extern template 6011: basic_istream& 6011: getline(basic_istream&, string&); 6011: 6011: 6011: extern template class basic_string; 6011: extern template 6011: basic_istream& 6011: operator>>(basic_istream&, wstring&); 6011: extern template 6011: basic_ostream& 6011: operator<<(basic_ostream&, const wstring&); 6011: extern template 6011: basic_istream& 6011: getline(basic_istream&, wstring&, wchar_t); 6011: extern template 6011: basic_istream& 6011: getline(basic_istream&, wstring&); 6011: 6011: 6011: 6011: 6011: } 6011: # 54 "/usr/include/c++/8/string" 2 3 6011: # 41 "/usr/include/c++/8/bits/locale_classes.h" 2 3 6011: 6011: 6011: namespace std __attribute__ ((__visibility__ ("default"))) 6011: { 6011: 6011: # 62 "/usr/include/c++/8/bits/locale_classes.h" 3 6011: class locale 6011: { 6011: public: 6011: 6011: 6011: typedef int category; 6011: 6011: 6011: class facet; 6011: class id; 6011: class _Impl; 6011: 6011: friend class facet; 6011: friend class _Impl; 6011: 6011: template 6011: friend bool 6011: has_facet(const locale&) throw(); 6011: 6011: template 6011: friend const _Facet& 6011: use_facet(const locale&); 6011: 6011: template 6011: friend struct __use_cache; 6011: # 98 "/usr/include/c++/8/bits/locale_classes.h" 3 6011: static const category none = 0; 6011: static const category ctype = 1L << 0; 6011: static const category numeric = 1L << 1; 6011: static const category collate = 1L << 2; 6011: static const category time = 1L << 3; 6011: static const category monetary = 1L << 4; 6011: static const category messages = 1L << 5; 6011: static const category all = (ctype | numeric | collate | 6011: time | monetary | messages); 6011: # 117 "/usr/include/c++/8/bits/locale_classes.h" 3 6011: locale() throw(); 6011: # 126 "/usr/include/c++/8/bits/locale_classes.h" 3 6011: locale(const locale& __other) throw(); 6011: # 136 "/usr/include/c++/8/bits/locale_classes.h" 3 6011: explicit 6011: locale(const char* __s); 6011: # 151 "/usr/include/c++/8/bits/locale_classes.h" 3 6011: locale(const locale& __base, const char* __s, category __cat); 6011: # 162 "/usr/include/c++/8/bits/locale_classes.h" 3 6011: explicit 6011: locale(const std::string& __s) : locale(__s.c_str()) { } 6011: # 177 "/usr/include/c++/8/bits/locale_classes.h" 3 6011: locale(const locale& __base, const std::string& __s, category __cat) 6011: : locale(__base, __s.c_str(), __cat) { } 6011: # 192 "/usr/include/c++/8/bits/locale_classes.h" 3 6011: locale(const locale& __base, const locale& __add, category __cat); 6011: # 205 "/usr/include/c++/8/bits/locale_classes.h" 3 6011: template 6011: locale(const locale& __other, _Facet* __f); 6011: 6011: 6011: ~locale() throw(); 6011: # 219 "/usr/include/c++/8/bits/locale_classes.h" 3 6011: const locale& 6011: operator=(const locale& __other) throw(); 6011: # 234 "/usr/include/c++/8/bits/locale_classes.h" 3 6011: template 6011: locale 6011: combine(const locale& __other) const; 6011: 6011: 6011: 6011: 6011: 6011: 6011: __attribute ((__abi_tag__ ("cxx11"))) 6011: string 6011: name() const; 6011: # 254 "/usr/include/c++/8/bits/locale_classes.h" 3 6011: bool 6011: operator==(const locale& __other) const throw(); 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: bool 6011: operator!=(const locale& __other) const throw() 6011: { return !(this->operator==(__other)); } 6011: # 282 "/usr/include/c++/8/bits/locale_classes.h" 3 6011: template 6011: bool 6011: operator()(const basic_string<_Char, _Traits, _Alloc>& __s1, 6011: const basic_string<_Char, _Traits, _Alloc>& __s2) const; 6011: # 298 "/usr/include/c++/8/bits/locale_classes.h" 3 6011: static locale 6011: global(const locale& __loc); 6011: 6011: 6011: 6011: 6011: static const locale& 6011: classic(); 6011: 6011: private: 6011: 6011: _Impl* _M_impl; 6011: 6011: 6011: static _Impl* _S_classic; 6011: 6011: 6011: static _Impl* _S_global; 6011: 6011: 6011: 6011: 6011: 6011: static const char* const* const _S_categories; 6011: # 333 "/usr/include/c++/8/bits/locale_classes.h" 3 6011: enum { _S_categories_size = 6 + 6 }; 6011: 6011: 6011: static __gthread_once_t _S_once; 6011: 6011: 6011: explicit 6011: locale(_Impl*) throw(); 6011: 6011: static void 6011: _S_initialize(); 6011: 6011: static void 6011: _S_initialize_once() throw(); 6011: 6011: static category 6011: _S_normalize_category(category); 6011: 6011: void 6011: _M_coalesce(const locale& __base, const locale& __add, category __cat); 6011: 6011: 6011: static const id* const _S_twinned_facets[]; 6011: 6011: }; 6011: # 371 "/usr/include/c++/8/bits/locale_classes.h" 3 6011: class locale::facet 6011: { 6011: private: 6011: friend class locale; 6011: friend class locale::_Impl; 6011: 6011: mutable _Atomic_word _M_refcount; 6011: 6011: 6011: static __c_locale _S_c_locale; 6011: 6011: 6011: static const char _S_c_name[2]; 6011: 6011: 6011: static __gthread_once_t _S_once; 6011: 6011: 6011: static void 6011: _S_initialize_once(); 6011: 6011: protected: 6011: # 402 "/usr/include/c++/8/bits/locale_classes.h" 3 6011: explicit 6011: facet(size_t __refs = 0) throw() : _M_refcount(__refs ? 1 : 0) 6011: { } 6011: 6011: 6011: virtual 6011: ~facet(); 6011: 6011: static void 6011: _S_create_c_locale(__c_locale& __cloc, const char* __s, 6011: __c_locale __old = 0); 6011: 6011: static __c_locale 6011: _S_clone_c_locale(__c_locale& __cloc) throw(); 6011: 6011: static void 6011: _S_destroy_c_locale(__c_locale& __cloc); 6011: 6011: static __c_locale 6011: _S_lc_ctype_c_locale(__c_locale __cloc, const char* __s); 6011: 6011: 6011: 6011: static __c_locale 6011: _S_get_c_locale(); 6011: 6011: __attribute__ ((__const__)) static const char* 6011: _S_get_c_name() throw(); 6011: # 438 "/usr/include/c++/8/bits/locale_classes.h" 3 6011: facet(const facet&) = delete; 6011: 6011: facet& 6011: operator=(const facet&) = delete; 6011: 6011: 6011: private: 6011: void 6011: _M_add_reference() const throw() 6011: { __gnu_cxx::__atomic_add_dispatch(&_M_refcount, 1); } 6011: 6011: void 6011: _M_remove_reference() const throw() 6011: { 6011: 6011: ; 6011: if (__gnu_cxx::__exchange_and_add_dispatch(&_M_refcount, -1) == 1) 6011: { 6011: ; 6011: try 6011: { delete this; } 6011: catch(...) 6011: { } 6011: } 6011: } 6011: 6011: const facet* _M_sso_shim(const id*) const; 6011: const facet* _M_cow_shim(const id*) const; 6011: 6011: protected: 6011: class __shim; 6011: }; 6011: # 483 "/usr/include/c++/8/bits/locale_classes.h" 3 6011: class locale::id 6011: { 6011: private: 6011: friend class locale; 6011: friend class locale::_Impl; 6011: 6011: template 6011: friend const _Facet& 6011: use_facet(const locale&); 6011: 6011: template 6011: friend bool 6011: has_facet(const locale&) throw(); 6011: 6011: 6011: 6011: 6011: mutable size_t _M_index; 6011: 6011: 6011: static _Atomic_word _S_refcount; 6011: 6011: void 6011: operator=(const id&); 6011: 6011: id(const id&); 6011: 6011: public: 6011: 6011: 6011: 6011: id() { } 6011: 6011: size_t 6011: _M_id() const throw(); 6011: }; 6011: 6011: 6011: 6011: class locale::_Impl 6011: { 6011: public: 6011: 6011: friend class locale; 6011: friend class locale::facet; 6011: 6011: template 6011: friend bool 6011: has_facet(const locale&) throw(); 6011: 6011: template 6011: friend const _Facet& 6011: use_facet(const locale&); 6011: 6011: template 6011: friend struct __use_cache; 6011: 6011: private: 6011: 6011: _Atomic_word _M_refcount; 6011: const facet** _M_facets; 6011: size_t _M_facets_size; 6011: const facet** _M_caches; 6011: char** _M_names; 6011: static const locale::id* const _S_id_ctype[]; 6011: static const locale::id* const _S_id_numeric[]; 6011: static const locale::id* const _S_id_collate[]; 6011: static const locale::id* const _S_id_time[]; 6011: static const locale::id* const _S_id_monetary[]; 6011: static const locale::id* const _S_id_messages[]; 6011: static const locale::id* const* const _S_facet_categories[]; 6011: 6011: void 6011: _M_add_reference() throw() 6011: { __gnu_cxx::__atomic_add_dispatch(&_M_refcount, 1); } 6011: 6011: void 6011: _M_remove_reference() throw() 6011: { 6011: 6011: ; 6011: if (__gnu_cxx::__exchange_and_add_dispatch(&_M_refcount, -1) == 1) 6011: { 6011: ; 6011: try 6011: { delete this; } 6011: catch(...) 6011: { } 6011: } 6011: } 6011: 6011: _Impl(const _Impl&, size_t); 6011: _Impl(const char*, size_t); 6011: _Impl(size_t) throw(); 6011: 6011: ~_Impl() throw(); 6011: 6011: _Impl(const _Impl&); 6011: 6011: void 6011: operator=(const _Impl&); 6011: 6011: bool 6011: _M_check_same_name() 6011: { 6011: bool __ret = true; 6011: if (_M_names[1]) 6011: 6011: for (size_t __i = 0; __ret && __i < _S_categories_size - 1; ++__i) 6011: __ret = __builtin_strcmp(_M_names[__i], _M_names[__i + 1]) == 0; 6011: return __ret; 6011: } 6011: 6011: void 6011: _M_replace_categories(const _Impl*, category); 6011: 6011: void 6011: _M_replace_category(const _Impl*, const locale::id* const*); 6011: 6011: void 6011: _M_replace_facet(const _Impl*, const locale::id*); 6011: 6011: void 6011: _M_install_facet(const locale::id*, const facet*); 6011: 6011: template 6011: void 6011: _M_init_facet(_Facet* __facet) 6011: { _M_install_facet(&_Facet::id, __facet); } 6011: 6011: template 6011: void 6011: _M_init_facet_unchecked(_Facet* __facet) 6011: { 6011: __facet->_M_add_reference(); 6011: _M_facets[_Facet::id._M_id()] = __facet; 6011: } 6011: 6011: void 6011: _M_install_cache(const facet*, size_t); 6011: 6011: void _M_init_extra(facet**); 6011: void _M_init_extra(void*, void*, const char*, const char*); 6011: }; 6011: # 641 "/usr/include/c++/8/bits/locale_classes.h" 3 6011: template 6011: class __cxx11:: collate : public locale::facet 6011: { 6011: public: 6011: 6011: 6011: 6011: typedef _CharT char_type; 6011: typedef basic_string<_CharT> string_type; 6011: 6011: 6011: protected: 6011: 6011: 6011: __c_locale _M_c_locale_collate; 6011: 6011: public: 6011: 6011: static locale::id id; 6011: # 668 "/usr/include/c++/8/bits/locale_classes.h" 3 6011: explicit 6011: collate(size_t __refs = 0) 6011: : facet(__refs), _M_c_locale_collate(_S_get_c_locale()) 6011: { } 6011: # 682 "/usr/include/c++/8/bits/locale_classes.h" 3 6011: explicit 6011: collate(__c_locale __cloc, size_t __refs = 0) 6011: : facet(__refs), _M_c_locale_collate(_S_clone_c_locale(__cloc)) 6011: { } 6011: # 699 "/usr/include/c++/8/bits/locale_classes.h" 3 6011: int 6011: compare(const _CharT* __lo1, const _CharT* __hi1, 6011: const _CharT* __lo2, const _CharT* __hi2) const 6011: { return this->do_compare(__lo1, __hi1, __lo2, __hi2); } 6011: # 718 "/usr/include/c++/8/bits/locale_classes.h" 3 6011: string_type 6011: transform(const _CharT* __lo, const _CharT* __hi) const 6011: { return this->do_transform(__lo, __hi); } 6011: # 732 "/usr/include/c++/8/bits/locale_classes.h" 3 6011: long 6011: hash(const _CharT* __lo, const _CharT* __hi) const 6011: { return this->do_hash(__lo, __hi); } 6011: 6011: 6011: int 6011: _M_compare(const _CharT*, const _CharT*) const throw(); 6011: 6011: size_t 6011: _M_transform(_CharT*, const _CharT*, size_t) const throw(); 6011: 6011: protected: 6011: 6011: virtual 6011: ~collate() 6011: { _S_destroy_c_locale(_M_c_locale_collate); } 6011: # 761 "/usr/include/c++/8/bits/locale_classes.h" 3 6011: virtual int 6011: do_compare(const _CharT* __lo1, const _CharT* __hi1, 6011: const _CharT* __lo2, const _CharT* __hi2) const; 6011: # 775 "/usr/include/c++/8/bits/locale_classes.h" 3 6011: virtual string_type 6011: do_transform(const _CharT* __lo, const _CharT* __hi) const; 6011: # 788 "/usr/include/c++/8/bits/locale_classes.h" 3 6011: virtual long 6011: do_hash(const _CharT* __lo, const _CharT* __hi) const; 6011: }; 6011: 6011: template 6011: locale::id collate<_CharT>::id; 6011: 6011: 6011: template<> 6011: int 6011: collate::_M_compare(const char*, const char*) const throw(); 6011: 6011: template<> 6011: size_t 6011: collate::_M_transform(char*, const char*, size_t) const throw(); 6011: 6011: 6011: template<> 6011: int 6011: collate::_M_compare(const wchar_t*, const wchar_t*) const throw(); 6011: 6011: template<> 6011: size_t 6011: collate::_M_transform(wchar_t*, const wchar_t*, size_t) const throw(); 6011: 6011: 6011: 6011: template 6011: class __cxx11:: collate_byname : public collate<_CharT> 6011: { 6011: public: 6011: 6011: 6011: typedef _CharT char_type; 6011: typedef basic_string<_CharT> string_type; 6011: 6011: 6011: explicit 6011: collate_byname(const char* __s, size_t __refs = 0) 6011: : collate<_CharT>(__refs) 6011: { 6011: if (__builtin_strcmp(__s, "C") != 0 6011: && __builtin_strcmp(__s, "POSIX") != 0) 6011: { 6011: this->_S_destroy_c_locale(this->_M_c_locale_collate); 6011: this->_S_create_c_locale(this->_M_c_locale_collate, __s); 6011: } 6011: } 6011: 6011: 6011: explicit 6011: collate_byname(const string& __s, size_t __refs = 0) 6011: : collate_byname(__s.c_str(), __refs) { } 6011: 6011: 6011: protected: 6011: virtual 6011: ~collate_byname() { } 6011: }; 6011: 6011: 6011: } 6011: 6011: # 1 "/usr/include/c++/8/bits/locale_classes.tcc" 1 3 6011: # 37 "/usr/include/c++/8/bits/locale_classes.tcc" 3 6011: 6011: # 38 "/usr/include/c++/8/bits/locale_classes.tcc" 3 6011: 6011: namespace std __attribute__ ((__visibility__ ("default"))) 6011: { 6011: 6011: 6011: template 6011: locale:: 6011: locale(const locale& __other, _Facet* __f) 6011: { 6011: _M_impl = new _Impl(*__other._M_impl, 1); 6011: 6011: try 6011: { _M_impl->_M_install_facet(&_Facet::id, __f); } 6011: catch(...) 6011: { 6011: _M_impl->_M_remove_reference(); 6011: throw; 6011: } 6011: delete [] _M_impl->_M_names[0]; 6011: _M_impl->_M_names[0] = 0; 6011: } 6011: 6011: template 6011: locale 6011: locale:: 6011: combine(const locale& __other) const 6011: { 6011: _Impl* __tmp = new _Impl(*_M_impl, 1); 6011: try 6011: { 6011: __tmp->_M_replace_facet(__other._M_impl, &_Facet::id); 6011: } 6011: catch(...) 6011: { 6011: __tmp->_M_remove_reference(); 6011: throw; 6011: } 6011: return locale(__tmp); 6011: } 6011: 6011: template 6011: bool 6011: locale:: 6011: operator()(const basic_string<_CharT, _Traits, _Alloc>& __s1, 6011: const basic_string<_CharT, _Traits, _Alloc>& __s2) const 6011: { 6011: typedef std::collate<_CharT> __collate_type; 6011: const __collate_type& __collate = use_facet<__collate_type>(*this); 6011: return (__collate.compare(__s1.data(), __s1.data() + __s1.length(), 6011: __s2.data(), __s2.data() + __s2.length()) < 0); 6011: } 6011: # 102 "/usr/include/c++/8/bits/locale_classes.tcc" 3 6011: template 6011: bool 6011: has_facet(const locale& __loc) throw() 6011: { 6011: const size_t __i = _Facet::id._M_id(); 6011: const locale::facet** __facets = __loc._M_impl->_M_facets; 6011: return (__i < __loc._M_impl->_M_facets_size 6011: 6011: && dynamic_cast(__facets[__i])); 6011: 6011: 6011: 6011: } 6011: # 130 "/usr/include/c++/8/bits/locale_classes.tcc" 3 6011: template 6011: const _Facet& 6011: use_facet(const locale& __loc) 6011: { 6011: const size_t __i = _Facet::id._M_id(); 6011: const locale::facet** __facets = __loc._M_impl->_M_facets; 6011: if (__i >= __loc._M_impl->_M_facets_size || !__facets[__i]) 6011: __throw_bad_cast(); 6011: 6011: return dynamic_cast(*__facets[__i]); 6011: 6011: 6011: 6011: } 6011: 6011: 6011: 6011: template 6011: int 6011: collate<_CharT>::_M_compare(const _CharT*, const _CharT*) const throw () 6011: { return 0; } 6011: 6011: 6011: template 6011: size_t 6011: collate<_CharT>::_M_transform(_CharT*, const _CharT*, size_t) const throw () 6011: { return 0; } 6011: 6011: template 6011: int 6011: collate<_CharT>:: 6011: do_compare(const _CharT* __lo1, const _CharT* __hi1, 6011: const _CharT* __lo2, const _CharT* __hi2) const 6011: { 6011: 6011: 6011: const string_type __one(__lo1, __hi1); 6011: const string_type __two(__lo2, __hi2); 6011: 6011: const _CharT* __p = __one.c_str(); 6011: const _CharT* __pend = __one.data() + __one.length(); 6011: const _CharT* __q = __two.c_str(); 6011: const _CharT* __qend = __two.data() + __two.length(); 6011: 6011: 6011: 6011: 6011: for (;;) 6011: { 6011: const int __res = _M_compare(__p, __q); 6011: if (__res) 6011: return __res; 6011: 6011: __p += char_traits<_CharT>::length(__p); 6011: __q += char_traits<_CharT>::length(__q); 6011: if (__p == __pend && __q == __qend) 6011: return 0; 6011: else if (__p == __pend) 6011: return -1; 6011: else if (__q == __qend) 6011: return 1; 6011: 6011: __p++; 6011: __q++; 6011: } 6011: } 6011: 6011: template 6011: typename collate<_CharT>::string_type 6011: collate<_CharT>:: 6011: do_transform(const _CharT* __lo, const _CharT* __hi) const 6011: { 6011: string_type __ret; 6011: 6011: 6011: const string_type __str(__lo, __hi); 6011: 6011: const _CharT* __p = __str.c_str(); 6011: const _CharT* __pend = __str.data() + __str.length(); 6011: 6011: size_t __len = (__hi - __lo) * 2; 6011: 6011: _CharT* __c = new _CharT[__len]; 6011: 6011: try 6011: { 6011: 6011: 6011: 6011: for (;;) 6011: { 6011: 6011: size_t __res = _M_transform(__c, __p, __len); 6011: 6011: 6011: if (__res >= __len) 6011: { 6011: __len = __res + 1; 6011: delete [] __c, __c = 0; 6011: __c = new _CharT[__len]; 6011: __res = _M_transform(__c, __p, __len); 6011: } 6011: 6011: __ret.append(__c, __res); 6011: __p += char_traits<_CharT>::length(__p); 6011: if (__p == __pend) 6011: break; 6011: 6011: __p++; 6011: __ret.push_back(_CharT()); 6011: } 6011: } 6011: catch(...) 6011: { 6011: delete [] __c; 6011: throw; 6011: } 6011: 6011: delete [] __c; 6011: 6011: return __ret; 6011: } 6011: 6011: template 6011: long 6011: collate<_CharT>:: 6011: do_hash(const _CharT* __lo, const _CharT* __hi) const 6011: { 6011: unsigned long __val = 0; 6011: for (; __lo < __hi; ++__lo) 6011: __val = 6011: *__lo + ((__val << 7) 6011: | (__val >> (__gnu_cxx::__numeric_traits:: 6011: __digits - 7))); 6011: return static_cast(__val); 6011: } 6011: 6011: 6011: 6011: 6011: extern template class collate; 6011: extern template class collate_byname; 6011: 6011: extern template 6011: const collate& 6011: use_facet >(const locale&); 6011: 6011: extern template 6011: bool 6011: has_facet >(const locale&); 6011: 6011: 6011: extern template class collate; 6011: extern template class collate_byname; 6011: 6011: extern template 6011: const collate& 6011: use_facet >(const locale&); 6011: 6011: extern template 6011: bool 6011: has_facet >(const locale&); 6011: 6011: 6011: 6011: 6011: } 6011: # 852 "/usr/include/c++/8/bits/locale_classes.h" 2 3 6011: # 42 "/usr/include/c++/8/bits/ios_base.h" 2 3 6011: 6011: 6011: 6011: 6011: # 1 "/usr/include/c++/8/system_error" 1 3 6011: # 32 "/usr/include/c++/8/system_error" 3 6011: 6011: # 33 "/usr/include/c++/8/system_error" 3 6011: 6011: 6011: 6011: 6011: 6011: 6011: # 1 "/usr/include/arm-linux-gnueabihf/c++/8/bits/error_constants.h" 1 3 6011: # 34 "/usr/include/arm-linux-gnueabihf/c++/8/bits/error_constants.h" 3 6011: # 1 "/usr/include/c++/8/cerrno" 1 3 6011: # 39 "/usr/include/c++/8/cerrno" 3 6011: 6011: # 40 "/usr/include/c++/8/cerrno" 3 6011: # 35 "/usr/include/arm-linux-gnueabihf/c++/8/bits/error_constants.h" 2 3 6011: 6011: namespace std __attribute__ ((__visibility__ ("default"))) 6011: { 6011: 6011: 6011: enum class errc 6011: { 6011: address_family_not_supported = 97, 6011: address_in_use = 98, 6011: address_not_available = 99, 6011: already_connected = 106, 6011: argument_list_too_long = 7, 6011: argument_out_of_domain = 33, 6011: bad_address = 14, 6011: bad_file_descriptor = 9, 6011: 6011: 6011: bad_message = 74, 6011: 6011: 6011: broken_pipe = 32, 6011: connection_aborted = 103, 6011: connection_already_in_progress = 114, 6011: connection_refused = 111, 6011: connection_reset = 104, 6011: cross_device_link = 18, 6011: destination_address_required = 89, 6011: device_or_resource_busy = 16, 6011: directory_not_empty = 39, 6011: executable_format_error = 8, 6011: file_exists = 17, 6011: file_too_large = 27, 6011: filename_too_long = 36, 6011: function_not_supported = 38, 6011: host_unreachable = 113, 6011: 6011: 6011: identifier_removed = 43, 6011: 6011: 6011: illegal_byte_sequence = 84, 6011: inappropriate_io_control_operation = 25, 6011: interrupted = 4, 6011: invalid_argument = 22, 6011: invalid_seek = 29, 6011: io_error = 5, 6011: is_a_directory = 21, 6011: message_size = 90, 6011: network_down = 100, 6011: network_reset = 102, 6011: network_unreachable = 101, 6011: no_buffer_space = 105, 6011: no_child_process = 10, 6011: 6011: 6011: no_link = 67, 6011: 6011: 6011: no_lock_available = 37, 6011: 6011: 6011: no_message_available = 61, 6011: 6011: 6011: no_message = 42, 6011: no_protocol_option = 92, 6011: no_space_on_device = 28, 6011: 6011: 6011: no_stream_resources = 63, 6011: 6011: 6011: no_such_device_or_address = 6, 6011: no_such_device = 19, 6011: no_such_file_or_directory = 2, 6011: no_such_process = 3, 6011: not_a_directory = 20, 6011: not_a_socket = 88, 6011: 6011: 6011: not_a_stream = 60, 6011: 6011: 6011: not_connected = 107, 6011: not_enough_memory = 12, 6011: 6011: 6011: not_supported = 95, 6011: 6011: 6011: 6011: operation_canceled = 125, 6011: 6011: 6011: operation_in_progress = 115, 6011: operation_not_permitted = 1, 6011: operation_not_supported = 95, 6011: operation_would_block = 11, 6011: 6011: 6011: owner_dead = 130, 6011: 6011: 6011: permission_denied = 13, 6011: 6011: 6011: protocol_error = 71, 6011: 6011: 6011: protocol_not_supported = 93, 6011: read_only_file_system = 30, 6011: resource_deadlock_would_occur = 35, 6011: resource_unavailable_try_again = 11, 6011: result_out_of_range = 34, 6011: 6011: 6011: state_not_recoverable = 131, 6011: 6011: 6011: 6011: stream_timeout = 62, 6011: 6011: 6011: 6011: text_file_busy = 26, 6011: 6011: 6011: timed_out = 110, 6011: too_many_files_open_in_system = 23, 6011: too_many_files_open = 24, 6011: too_many_links = 31, 6011: too_many_symbolic_link_levels = 40, 6011: 6011: 6011: value_too_large = 75, 6011: 6011: 6011: wrong_protocol_type = 91 6011: }; 6011: 6011: 6011: } 6011: # 40 "/usr/include/c++/8/system_error" 2 3 6011: 6011: # 1 "/usr/include/c++/8/stdexcept" 1 3 6011: # 36 "/usr/include/c++/8/stdexcept" 3 6011: 6011: # 37 "/usr/include/c++/8/stdexcept" 3 6011: 6011: 6011: 6011: 6011: namespace std __attribute__ ((__visibility__ ("default"))) 6011: { 6011: 6011: 6011: 6011: 6011: 6011: struct __cow_string 6011: { 6011: union { 6011: const char* _M_p; 6011: char _M_bytes[sizeof(const char*)]; 6011: }; 6011: 6011: __cow_string(); 6011: __cow_string(const std::string&); 6011: __cow_string(const char*, size_t); 6011: __cow_string(const __cow_string&) noexcept; 6011: __cow_string& operator=(const __cow_string&) noexcept; 6011: ~__cow_string(); 6011: 6011: __cow_string(__cow_string&&) noexcept; 6011: __cow_string& operator=(__cow_string&&) noexcept; 6011: 6011: }; 6011: 6011: typedef basic_string __sso_string; 6011: # 113 "/usr/include/c++/8/stdexcept" 3 6011: class logic_error : public exception 6011: { 6011: __cow_string _M_msg; 6011: 6011: public: 6011: 6011: explicit 6011: logic_error(const string& __arg) ; 6011: 6011: 6011: explicit 6011: logic_error(const char*) ; 6011: 6011: 6011: 6011: logic_error(const logic_error&) noexcept; 6011: logic_error& operator=(const logic_error&) noexcept; 6011: 6011: 6011: virtual ~logic_error() noexcept; 6011: 6011: 6011: 6011: virtual const char* 6011: what() const noexcept; 6011: 6011: 6011: 6011: 6011: 6011: }; 6011: 6011: 6011: 6011: class domain_error : public logic_error 6011: { 6011: public: 6011: explicit domain_error(const string& __arg) ; 6011: 6011: explicit domain_error(const char*) ; 6011: 6011: virtual ~domain_error() noexcept; 6011: }; 6011: 6011: 6011: class invalid_argument : public logic_error 6011: { 6011: public: 6011: explicit invalid_argument(const string& __arg) ; 6011: 6011: explicit invalid_argument(const char*) ; 6011: 6011: virtual ~invalid_argument() noexcept; 6011: }; 6011: 6011: 6011: 6011: class length_error : public logic_error 6011: { 6011: public: 6011: explicit length_error(const string& __arg) ; 6011: 6011: explicit length_error(const char*) ; 6011: 6011: virtual ~length_error() noexcept; 6011: }; 6011: 6011: 6011: 6011: class out_of_range : public logic_error 6011: { 6011: public: 6011: explicit out_of_range(const string& __arg) ; 6011: 6011: explicit out_of_range(const char*) ; 6011: 6011: virtual ~out_of_range() noexcept; 6011: }; 6011: 6011: 6011: 6011: 6011: 6011: 6011: class runtime_error : public exception 6011: { 6011: __cow_string _M_msg; 6011: 6011: public: 6011: 6011: explicit 6011: runtime_error(const string& __arg) ; 6011: 6011: 6011: explicit 6011: runtime_error(const char*) ; 6011: 6011: 6011: 6011: runtime_error(const runtime_error&) noexcept; 6011: runtime_error& operator=(const runtime_error&) noexcept; 6011: 6011: 6011: virtual ~runtime_error() noexcept; 6011: 6011: 6011: 6011: virtual const char* 6011: what() const noexcept; 6011: 6011: 6011: 6011: 6011: 6011: }; 6011: 6011: 6011: class range_error : public runtime_error 6011: { 6011: public: 6011: explicit range_error(const string& __arg) ; 6011: 6011: explicit range_error(const char*) ; 6011: 6011: virtual ~range_error() noexcept; 6011: }; 6011: 6011: 6011: class overflow_error : public runtime_error 6011: { 6011: public: 6011: explicit overflow_error(const string& __arg) ; 6011: 6011: explicit overflow_error(const char*) ; 6011: 6011: virtual ~overflow_error() noexcept; 6011: }; 6011: 6011: 6011: class underflow_error : public runtime_error 6011: { 6011: public: 6011: explicit underflow_error(const string& __arg) ; 6011: 6011: explicit underflow_error(const char*) ; 6011: 6011: virtual ~underflow_error() noexcept; 6011: }; 6011: 6011: 6011: 6011: 6011: } 6011: # 42 "/usr/include/c++/8/system_error" 2 3 6011: 6011: namespace std __attribute__ ((__visibility__ ("default"))) 6011: { 6011: 6011: 6011: class error_code; 6011: class error_condition; 6011: class system_error; 6011: 6011: 6011: template 6011: struct is_error_code_enum : public false_type { }; 6011: 6011: 6011: template 6011: struct is_error_condition_enum : public false_type { }; 6011: 6011: template<> 6011: struct is_error_condition_enum 6011: : public true_type { }; 6011: # 71 "/usr/include/c++/8/system_error" 3 6011: inline namespace _V2 { 6011: 6011: 6011: class error_category 6011: { 6011: public: 6011: constexpr error_category() noexcept = default; 6011: 6011: virtual ~error_category(); 6011: 6011: error_category(const error_category&) = delete; 6011: error_category& operator=(const error_category&) = delete; 6011: 6011: virtual const char* 6011: name() const noexcept = 0; 6011: 6011: 6011: 6011: 6011: 6011: 6011: private: 6011: __attribute ((__abi_tag__ ("cxx11"))) 6011: virtual __cow_string 6011: _M_message(int) const; 6011: 6011: public: 6011: __attribute ((__abi_tag__ ("cxx11"))) 6011: virtual string 6011: message(int) const = 0; 6011: # 110 "/usr/include/c++/8/system_error" 3 6011: public: 6011: virtual error_condition 6011: default_error_condition(int __i) const noexcept; 6011: 6011: virtual bool 6011: equivalent(int __i, const error_condition& __cond) const noexcept; 6011: 6011: virtual bool 6011: equivalent(const error_code& __code, int __i) const noexcept; 6011: 6011: bool 6011: operator<(const error_category& __other) const noexcept 6011: { return less()(this, &__other); } 6011: 6011: bool 6011: operator==(const error_category& __other) const noexcept 6011: { return this == &__other; } 6011: 6011: bool 6011: operator!=(const error_category& __other) const noexcept 6011: { return this != &__other; } 6011: }; 6011: 6011: 6011: __attribute__ ((__const__)) const error_category& system_category() noexcept; 6011: __attribute__ ((__const__)) const error_category& generic_category() noexcept; 6011: 6011: } 6011: 6011: error_code make_error_code(errc) noexcept; 6011: 6011: template 6011: struct hash; 6011: 6011: 6011: 6011: struct error_code 6011: { 6011: error_code() noexcept 6011: : _M_value(0), _M_cat(&system_category()) { } 6011: 6011: error_code(int __v, const error_category& __cat) noexcept 6011: : _M_value(__v), _M_cat(&__cat) { } 6011: 6011: template::value>::type> 6011: error_code(_ErrorCodeEnum __e) noexcept 6011: { *this = make_error_code(__e); } 6011: 6011: void 6011: assign(int __v, const error_category& __cat) noexcept 6011: { 6011: _M_value = __v; 6011: _M_cat = &__cat; 6011: } 6011: 6011: void 6011: clear() noexcept 6011: { assign(0, system_category()); } 6011: 6011: 6011: template 6011: typename enable_if::value, 6011: error_code&>::type 6011: operator=(_ErrorCodeEnum __e) noexcept 6011: { return *this = make_error_code(__e); } 6011: 6011: int 6011: value() const noexcept { return _M_value; } 6011: 6011: const error_category& 6011: category() const noexcept { return *_M_cat; } 6011: 6011: error_condition 6011: default_error_condition() const noexcept; 6011: 6011: __attribute ((__abi_tag__ ("cxx11"))) 6011: string 6011: message() const 6011: { return category().message(value()); } 6011: 6011: explicit operator bool() const noexcept 6011: { return _M_value != 0; } 6011: 6011: 6011: private: 6011: friend class hash; 6011: 6011: int _M_value; 6011: const error_category* _M_cat; 6011: }; 6011: 6011: 6011: inline error_code 6011: make_error_code(errc __e) noexcept 6011: { return error_code(static_cast(__e), generic_category()); } 6011: 6011: inline bool 6011: operator<(const error_code& __lhs, const error_code& __rhs) noexcept 6011: { 6011: return (__lhs.category() < __rhs.category() 6011: || (__lhs.category() == __rhs.category() 6011: && __lhs.value() < __rhs.value())); 6011: } 6011: 6011: template 6011: basic_ostream<_CharT, _Traits>& 6011: operator<<(basic_ostream<_CharT, _Traits>& __os, const error_code& __e) 6011: { return (__os << __e.category().name() << ':' << __e.value()); } 6011: 6011: error_condition make_error_condition(errc) noexcept; 6011: 6011: 6011: 6011: struct error_condition 6011: { 6011: error_condition() noexcept 6011: : _M_value(0), _M_cat(&generic_category()) { } 6011: 6011: error_condition(int __v, const error_category& __cat) noexcept 6011: : _M_value(__v), _M_cat(&__cat) { } 6011: 6011: template::value>::type> 6011: error_condition(_ErrorConditionEnum __e) noexcept 6011: { *this = make_error_condition(__e); } 6011: 6011: void 6011: assign(int __v, const error_category& __cat) noexcept 6011: { 6011: _M_value = __v; 6011: _M_cat = &__cat; 6011: } 6011: 6011: 6011: template 6011: typename enable_if::value, error_condition&>::type 6011: operator=(_ErrorConditionEnum __e) noexcept 6011: { return *this = make_error_condition(__e); } 6011: 6011: void 6011: clear() noexcept 6011: { assign(0, generic_category()); } 6011: 6011: 6011: int 6011: value() const noexcept { return _M_value; } 6011: 6011: const error_category& 6011: category() const noexcept { return *_M_cat; } 6011: 6011: __attribute ((__abi_tag__ ("cxx11"))) 6011: string 6011: message() const 6011: { return category().message(value()); } 6011: 6011: explicit operator bool() const noexcept 6011: { return _M_value != 0; } 6011: 6011: 6011: private: 6011: int _M_value; 6011: const error_category* _M_cat; 6011: }; 6011: 6011: 6011: inline error_condition 6011: make_error_condition(errc __e) noexcept 6011: { return error_condition(static_cast(__e), generic_category()); } 6011: 6011: inline bool 6011: operator<(const error_condition& __lhs, 6011: const error_condition& __rhs) noexcept 6011: { 6011: return (__lhs.category() < __rhs.category() 6011: || (__lhs.category() == __rhs.category() 6011: && __lhs.value() < __rhs.value())); 6011: } 6011: 6011: 6011: inline bool 6011: operator==(const error_code& __lhs, const error_code& __rhs) noexcept 6011: { return (__lhs.category() == __rhs.category() 6011: && __lhs.value() == __rhs.value()); } 6011: 6011: inline bool 6011: operator==(const error_code& __lhs, const error_condition& __rhs) noexcept 6011: { 6011: return (__lhs.category().equivalent(__lhs.value(), __rhs) 6011: || __rhs.category().equivalent(__lhs, __rhs.value())); 6011: } 6011: 6011: inline bool 6011: operator==(const error_condition& __lhs, const error_code& __rhs) noexcept 6011: { 6011: return (__rhs.category().equivalent(__rhs.value(), __lhs) 6011: || __lhs.category().equivalent(__rhs, __lhs.value())); 6011: } 6011: 6011: inline bool 6011: operator==(const error_condition& __lhs, 6011: const error_condition& __rhs) noexcept 6011: { 6011: return (__lhs.category() == __rhs.category() 6011: && __lhs.value() == __rhs.value()); 6011: } 6011: 6011: inline bool 6011: operator!=(const error_code& __lhs, const error_code& __rhs) noexcept 6011: { return !(__lhs == __rhs); } 6011: 6011: inline bool 6011: operator!=(const error_code& __lhs, const error_condition& __rhs) noexcept 6011: { return !(__lhs == __rhs); } 6011: 6011: inline bool 6011: operator!=(const error_condition& __lhs, const error_code& __rhs) noexcept 6011: { return !(__lhs == __rhs); } 6011: 6011: inline bool 6011: operator!=(const error_condition& __lhs, 6011: const error_condition& __rhs) noexcept 6011: { return !(__lhs == __rhs); } 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: class system_error : public std::runtime_error 6011: { 6011: private: 6011: error_code _M_code; 6011: 6011: public: 6011: system_error(error_code __ec = error_code()) 6011: : runtime_error(__ec.message()), _M_code(__ec) { } 6011: 6011: system_error(error_code __ec, const string& __what) 6011: : runtime_error(__what + ": " + __ec.message()), _M_code(__ec) { } 6011: 6011: system_error(error_code __ec, const char* __what) 6011: : runtime_error(__what + (": " + __ec.message())), _M_code(__ec) { } 6011: 6011: system_error(int __v, const error_category& __ecat, const char* __what) 6011: : system_error(error_code(__v, __ecat), __what) { } 6011: 6011: system_error(int __v, const error_category& __ecat) 6011: : runtime_error(error_code(__v, __ecat).message()), 6011: _M_code(__v, __ecat) { } 6011: 6011: system_error(int __v, const error_category& __ecat, const string& __what) 6011: : runtime_error(__what + ": " + error_code(__v, __ecat).message()), 6011: _M_code(__v, __ecat) { } 6011: 6011: virtual ~system_error() noexcept; 6011: 6011: const error_code& 6011: code() const noexcept { return _M_code; } 6011: }; 6011: 6011: 6011: } 6011: 6011: 6011: 6011: namespace std __attribute__ ((__visibility__ ("default"))) 6011: { 6011: 6011: 6011: 6011: 6011: 6011: template<> 6011: struct hash 6011: : public __hash_base 6011: { 6011: size_t 6011: operator()(const error_code& __e) const noexcept 6011: { 6011: const size_t __tmp = std::_Hash_impl::hash(__e._M_value); 6011: return std::_Hash_impl::__hash_combine(__e._M_cat, __tmp); 6011: } 6011: }; 6011: # 414 "/usr/include/c++/8/system_error" 3 6011: 6011: } 6011: # 47 "/usr/include/c++/8/bits/ios_base.h" 2 3 6011: 6011: 6011: namespace std __attribute__ ((__visibility__ ("default"))) 6011: { 6011: 6011: 6011: 6011: 6011: 6011: 6011: enum _Ios_Fmtflags 6011: { 6011: _S_boolalpha = 1L << 0, 6011: _S_dec = 1L << 1, 6011: _S_fixed = 1L << 2, 6011: _S_hex = 1L << 3, 6011: _S_internal = 1L << 4, 6011: _S_left = 1L << 5, 6011: _S_oct = 1L << 6, 6011: _S_right = 1L << 7, 6011: _S_scientific = 1L << 8, 6011: _S_showbase = 1L << 9, 6011: _S_showpoint = 1L << 10, 6011: _S_showpos = 1L << 11, 6011: _S_skipws = 1L << 12, 6011: _S_unitbuf = 1L << 13, 6011: _S_uppercase = 1L << 14, 6011: _S_adjustfield = _S_left | _S_right | _S_internal, 6011: _S_basefield = _S_dec | _S_oct | _S_hex, 6011: _S_floatfield = _S_scientific | _S_fixed, 6011: _S_ios_fmtflags_end = 1L << 16, 6011: _S_ios_fmtflags_max = 0x7fffffff, 6011: _S_ios_fmtflags_min = ~0x7fffffff 6011: }; 6011: 6011: inline constexpr _Ios_Fmtflags 6011: operator&(_Ios_Fmtflags __a, _Ios_Fmtflags __b) 6011: { return _Ios_Fmtflags(static_cast(__a) & static_cast(__b)); } 6011: 6011: inline constexpr _Ios_Fmtflags 6011: operator|(_Ios_Fmtflags __a, _Ios_Fmtflags __b) 6011: { return _Ios_Fmtflags(static_cast(__a) | static_cast(__b)); } 6011: 6011: inline constexpr _Ios_Fmtflags 6011: operator^(_Ios_Fmtflags __a, _Ios_Fmtflags __b) 6011: { return _Ios_Fmtflags(static_cast(__a) ^ static_cast(__b)); } 6011: 6011: inline constexpr _Ios_Fmtflags 6011: operator~(_Ios_Fmtflags __a) 6011: { return _Ios_Fmtflags(~static_cast(__a)); } 6011: 6011: inline const _Ios_Fmtflags& 6011: operator|=(_Ios_Fmtflags& __a, _Ios_Fmtflags __b) 6011: { return __a = __a | __b; } 6011: 6011: inline const _Ios_Fmtflags& 6011: operator&=(_Ios_Fmtflags& __a, _Ios_Fmtflags __b) 6011: { return __a = __a & __b; } 6011: 6011: inline const _Ios_Fmtflags& 6011: operator^=(_Ios_Fmtflags& __a, _Ios_Fmtflags __b) 6011: { return __a = __a ^ __b; } 6011: 6011: 6011: enum _Ios_Openmode 6011: { 6011: _S_app = 1L << 0, 6011: _S_ate = 1L << 1, 6011: _S_bin = 1L << 2, 6011: _S_in = 1L << 3, 6011: _S_out = 1L << 4, 6011: _S_trunc = 1L << 5, 6011: _S_ios_openmode_end = 1L << 16, 6011: _S_ios_openmode_max = 0x7fffffff, 6011: _S_ios_openmode_min = ~0x7fffffff 6011: }; 6011: 6011: inline constexpr _Ios_Openmode 6011: operator&(_Ios_Openmode __a, _Ios_Openmode __b) 6011: { return _Ios_Openmode(static_cast(__a) & static_cast(__b)); } 6011: 6011: inline constexpr _Ios_Openmode 6011: operator|(_Ios_Openmode __a, _Ios_Openmode __b) 6011: { return _Ios_Openmode(static_cast(__a) | static_cast(__b)); } 6011: 6011: inline constexpr _Ios_Openmode 6011: operator^(_Ios_Openmode __a, _Ios_Openmode __b) 6011: { return _Ios_Openmode(static_cast(__a) ^ static_cast(__b)); } 6011: 6011: inline constexpr _Ios_Openmode 6011: operator~(_Ios_Openmode __a) 6011: { return _Ios_Openmode(~static_cast(__a)); } 6011: 6011: inline const _Ios_Openmode& 6011: operator|=(_Ios_Openmode& __a, _Ios_Openmode __b) 6011: { return __a = __a | __b; } 6011: 6011: inline const _Ios_Openmode& 6011: operator&=(_Ios_Openmode& __a, _Ios_Openmode __b) 6011: { return __a = __a & __b; } 6011: 6011: inline const _Ios_Openmode& 6011: operator^=(_Ios_Openmode& __a, _Ios_Openmode __b) 6011: { return __a = __a ^ __b; } 6011: 6011: 6011: enum _Ios_Iostate 6011: { 6011: _S_goodbit = 0, 6011: _S_badbit = 1L << 0, 6011: _S_eofbit = 1L << 1, 6011: _S_failbit = 1L << 2, 6011: _S_ios_iostate_end = 1L << 16, 6011: _S_ios_iostate_max = 0x7fffffff, 6011: _S_ios_iostate_min = ~0x7fffffff 6011: }; 6011: 6011: inline constexpr _Ios_Iostate 6011: operator&(_Ios_Iostate __a, _Ios_Iostate __b) 6011: { return _Ios_Iostate(static_cast(__a) & static_cast(__b)); } 6011: 6011: inline constexpr _Ios_Iostate 6011: operator|(_Ios_Iostate __a, _Ios_Iostate __b) 6011: { return _Ios_Iostate(static_cast(__a) | static_cast(__b)); } 6011: 6011: inline constexpr _Ios_Iostate 6011: operator^(_Ios_Iostate __a, _Ios_Iostate __b) 6011: { return _Ios_Iostate(static_cast(__a) ^ static_cast(__b)); } 6011: 6011: inline constexpr _Ios_Iostate 6011: operator~(_Ios_Iostate __a) 6011: { return _Ios_Iostate(~static_cast(__a)); } 6011: 6011: inline const _Ios_Iostate& 6011: operator|=(_Ios_Iostate& __a, _Ios_Iostate __b) 6011: { return __a = __a | __b; } 6011: 6011: inline const _Ios_Iostate& 6011: operator&=(_Ios_Iostate& __a, _Ios_Iostate __b) 6011: { return __a = __a & __b; } 6011: 6011: inline const _Ios_Iostate& 6011: operator^=(_Ios_Iostate& __a, _Ios_Iostate __b) 6011: { return __a = __a ^ __b; } 6011: 6011: 6011: enum _Ios_Seekdir 6011: { 6011: _S_beg = 0, 6011: _S_cur = 1, 6011: _S_end = 2, 6011: _S_ios_seekdir_end = 1L << 16 6011: }; 6011: 6011: 6011: 6011: enum class io_errc { stream = 1 }; 6011: 6011: template <> struct is_error_code_enum : public true_type { }; 6011: 6011: const error_category& iostream_category() noexcept; 6011: 6011: inline error_code 6011: make_error_code(io_errc __e) noexcept 6011: { return error_code(static_cast(__e), iostream_category()); } 6011: 6011: inline error_condition 6011: make_error_condition(io_errc __e) noexcept 6011: { return error_condition(static_cast(__e), iostream_category()); } 6011: # 228 "/usr/include/c++/8/bits/ios_base.h" 3 6011: class ios_base 6011: { 6011: # 246 "/usr/include/c++/8/bits/ios_base.h" 3 6011: public: 6011: # 255 "/usr/include/c++/8/bits/ios_base.h" 3 6011: class __attribute ((__abi_tag__ ("cxx11"))) failure : public system_error 6011: { 6011: public: 6011: explicit 6011: failure(const string& __str); 6011: 6011: 6011: explicit 6011: failure(const string&, const error_code&); 6011: 6011: explicit 6011: failure(const char*, const error_code& = io_errc::stream); 6011: 6011: 6011: virtual 6011: ~failure() throw(); 6011: 6011: virtual const char* 6011: what() const throw(); 6011: }; 6011: # 323 "/usr/include/c++/8/bits/ios_base.h" 3 6011: typedef _Ios_Fmtflags fmtflags; 6011: 6011: 6011: static const fmtflags boolalpha = _S_boolalpha; 6011: 6011: 6011: static const fmtflags dec = _S_dec; 6011: 6011: 6011: static const fmtflags fixed = _S_fixed; 6011: 6011: 6011: static const fmtflags hex = _S_hex; 6011: 6011: 6011: 6011: 6011: static const fmtflags internal = _S_internal; 6011: 6011: 6011: 6011: static const fmtflags left = _S_left; 6011: 6011: 6011: static const fmtflags oct = _S_oct; 6011: 6011: 6011: 6011: static const fmtflags right = _S_right; 6011: 6011: 6011: static const fmtflags scientific = _S_scientific; 6011: 6011: 6011: 6011: static const fmtflags showbase = _S_showbase; 6011: 6011: 6011: 6011: static const fmtflags showpoint = _S_showpoint; 6011: 6011: 6011: static const fmtflags showpos = _S_showpos; 6011: 6011: 6011: static const fmtflags skipws = _S_skipws; 6011: 6011: 6011: static const fmtflags unitbuf = _S_unitbuf; 6011: 6011: 6011: 6011: static const fmtflags uppercase = _S_uppercase; 6011: 6011: 6011: static const fmtflags adjustfield = _S_adjustfield; 6011: 6011: 6011: static const fmtflags basefield = _S_basefield; 6011: 6011: 6011: static const fmtflags floatfield = _S_floatfield; 6011: # 398 "/usr/include/c++/8/bits/ios_base.h" 3 6011: typedef _Ios_Iostate iostate; 6011: 6011: 6011: 6011: static const iostate badbit = _S_badbit; 6011: 6011: 6011: static const iostate eofbit = _S_eofbit; 6011: 6011: 6011: 6011: 6011: static const iostate failbit = _S_failbit; 6011: 6011: 6011: static const iostate goodbit = _S_goodbit; 6011: # 429 "/usr/include/c++/8/bits/ios_base.h" 3 6011: typedef _Ios_Openmode openmode; 6011: 6011: 6011: static const openmode app = _S_app; 6011: 6011: 6011: static const openmode ate = _S_ate; 6011: 6011: 6011: 6011: 6011: static const openmode binary = _S_bin; 6011: 6011: 6011: static const openmode in = _S_in; 6011: 6011: 6011: static const openmode out = _S_out; 6011: 6011: 6011: static const openmode trunc = _S_trunc; 6011: # 461 "/usr/include/c++/8/bits/ios_base.h" 3 6011: typedef _Ios_Seekdir seekdir; 6011: 6011: 6011: static const seekdir beg = _S_beg; 6011: 6011: 6011: static const seekdir cur = _S_cur; 6011: 6011: 6011: static const seekdir end = _S_end; 6011: 6011: 6011: 6011: typedef int io_state; 6011: typedef int open_mode; 6011: typedef int seek_dir; 6011: 6011: typedef std::streampos streampos; 6011: typedef std::streamoff streamoff; 6011: # 489 "/usr/include/c++/8/bits/ios_base.h" 3 6011: enum event 6011: { 6011: erase_event, 6011: imbue_event, 6011: copyfmt_event 6011: }; 6011: # 506 "/usr/include/c++/8/bits/ios_base.h" 3 6011: typedef void (*event_callback) (event __e, ios_base& __b, int __i); 6011: # 518 "/usr/include/c++/8/bits/ios_base.h" 3 6011: void 6011: register_callback(event_callback __fn, int __index); 6011: 6011: protected: 6011: streamsize _M_precision; 6011: streamsize _M_width; 6011: fmtflags _M_flags; 6011: iostate _M_exception; 6011: iostate _M_streambuf_state; 6011: 6011: 6011: 6011: struct _Callback_list 6011: { 6011: 6011: _Callback_list* _M_next; 6011: ios_base::event_callback _M_fn; 6011: int _M_index; 6011: _Atomic_word _M_refcount; 6011: 6011: _Callback_list(ios_base::event_callback __fn, int __index, 6011: _Callback_list* __cb) 6011: : _M_next(__cb), _M_fn(__fn), _M_index(__index), _M_refcount(0) { } 6011: 6011: void 6011: _M_add_reference() { __gnu_cxx::__atomic_add_dispatch(&_M_refcount, 1); } 6011: 6011: 6011: int 6011: _M_remove_reference() 6011: { 6011: 6011: ; 6011: int __res = __gnu_cxx::__exchange_and_add_dispatch(&_M_refcount, -1); 6011: if (__res == 0) 6011: { 6011: ; 6011: } 6011: return __res; 6011: } 6011: }; 6011: 6011: _Callback_list* _M_callbacks; 6011: 6011: void 6011: _M_call_callbacks(event __ev) throw(); 6011: 6011: void 6011: _M_dispose_callbacks(void) throw(); 6011: 6011: 6011: struct _Words 6011: { 6011: void* _M_pword; 6011: long _M_iword; 6011: _Words() : _M_pword(0), _M_iword(0) { } 6011: }; 6011: 6011: 6011: _Words _M_word_zero; 6011: 6011: 6011: 6011: enum { _S_local_word_size = 8 }; 6011: _Words _M_local_word[_S_local_word_size]; 6011: 6011: 6011: int _M_word_size; 6011: _Words* _M_word; 6011: 6011: _Words& 6011: _M_grow_words(int __index, bool __iword); 6011: 6011: 6011: locale _M_ios_locale; 6011: 6011: void 6011: _M_init() throw(); 6011: 6011: public: 6011: 6011: 6011: 6011: 6011: 6011: class Init 6011: { 6011: friend class ios_base; 6011: public: 6011: Init(); 6011: ~Init(); 6011: 6011: private: 6011: static _Atomic_word _S_refcount; 6011: static bool _S_synced_with_stdio; 6011: }; 6011: 6011: 6011: 6011: 6011: 6011: 6011: fmtflags 6011: flags() const 6011: { return _M_flags; } 6011: # 631 "/usr/include/c++/8/bits/ios_base.h" 3 6011: fmtflags 6011: flags(fmtflags __fmtfl) 6011: { 6011: fmtflags __old = _M_flags; 6011: _M_flags = __fmtfl; 6011: return __old; 6011: } 6011: # 647 "/usr/include/c++/8/bits/ios_base.h" 3 6011: fmtflags 6011: setf(fmtflags __fmtfl) 6011: { 6011: fmtflags __old = _M_flags; 6011: _M_flags |= __fmtfl; 6011: return __old; 6011: } 6011: # 664 "/usr/include/c++/8/bits/ios_base.h" 3 6011: fmtflags 6011: setf(fmtflags __fmtfl, fmtflags __mask) 6011: { 6011: fmtflags __old = _M_flags; 6011: _M_flags &= ~__mask; 6011: _M_flags |= (__fmtfl & __mask); 6011: return __old; 6011: } 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: void 6011: unsetf(fmtflags __mask) 6011: { _M_flags &= ~__mask; } 6011: # 690 "/usr/include/c++/8/bits/ios_base.h" 3 6011: streamsize 6011: precision() const 6011: { return _M_precision; } 6011: 6011: 6011: 6011: 6011: 6011: 6011: streamsize 6011: precision(streamsize __prec) 6011: { 6011: streamsize __old = _M_precision; 6011: _M_precision = __prec; 6011: return __old; 6011: } 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: streamsize 6011: width() const 6011: { return _M_width; } 6011: 6011: 6011: 6011: 6011: 6011: 6011: streamsize 6011: width(streamsize __wide) 6011: { 6011: streamsize __old = _M_width; 6011: _M_width = __wide; 6011: return __old; 6011: } 6011: # 741 "/usr/include/c++/8/bits/ios_base.h" 3 6011: static bool 6011: sync_with_stdio(bool __sync = true); 6011: # 753 "/usr/include/c++/8/bits/ios_base.h" 3 6011: locale 6011: imbue(const locale& __loc) throw(); 6011: # 764 "/usr/include/c++/8/bits/ios_base.h" 3 6011: locale 6011: getloc() const 6011: { return _M_ios_locale; } 6011: # 775 "/usr/include/c++/8/bits/ios_base.h" 3 6011: const locale& 6011: _M_getloc() const 6011: { return _M_ios_locale; } 6011: # 794 "/usr/include/c++/8/bits/ios_base.h" 3 6011: static int 6011: xalloc() throw(); 6011: # 810 "/usr/include/c++/8/bits/ios_base.h" 3 6011: long& 6011: iword(int __ix) 6011: { 6011: _Words& __word = (__ix < _M_word_size) 6011: ? _M_word[__ix] : _M_grow_words(__ix, true); 6011: return __word._M_iword; 6011: } 6011: # 831 "/usr/include/c++/8/bits/ios_base.h" 3 6011: void*& 6011: pword(int __ix) 6011: { 6011: _Words& __word = (__ix < _M_word_size) 6011: ? _M_word[__ix] : _M_grow_words(__ix, false); 6011: return __word._M_pword; 6011: } 6011: # 848 "/usr/include/c++/8/bits/ios_base.h" 3 6011: virtual ~ios_base(); 6011: 6011: protected: 6011: ios_base() throw (); 6011: # 862 "/usr/include/c++/8/bits/ios_base.h" 3 6011: public: 6011: ios_base(const ios_base&) = delete; 6011: 6011: ios_base& 6011: operator=(const ios_base&) = delete; 6011: 6011: protected: 6011: void 6011: _M_move(ios_base&) noexcept; 6011: 6011: void 6011: _M_swap(ios_base& __rhs) noexcept; 6011: 6011: }; 6011: 6011: 6011: 6011: inline ios_base& 6011: boolalpha(ios_base& __base) 6011: { 6011: __base.setf(ios_base::boolalpha); 6011: return __base; 6011: } 6011: 6011: 6011: inline ios_base& 6011: noboolalpha(ios_base& __base) 6011: { 6011: __base.unsetf(ios_base::boolalpha); 6011: return __base; 6011: } 6011: 6011: 6011: inline ios_base& 6011: showbase(ios_base& __base) 6011: { 6011: __base.setf(ios_base::showbase); 6011: return __base; 6011: } 6011: 6011: 6011: inline ios_base& 6011: noshowbase(ios_base& __base) 6011: { 6011: __base.unsetf(ios_base::showbase); 6011: return __base; 6011: } 6011: 6011: 6011: inline ios_base& 6011: showpoint(ios_base& __base) 6011: { 6011: __base.setf(ios_base::showpoint); 6011: return __base; 6011: } 6011: 6011: 6011: inline ios_base& 6011: noshowpoint(ios_base& __base) 6011: { 6011: __base.unsetf(ios_base::showpoint); 6011: return __base; 6011: } 6011: 6011: 6011: inline ios_base& 6011: showpos(ios_base& __base) 6011: { 6011: __base.setf(ios_base::showpos); 6011: return __base; 6011: } 6011: 6011: 6011: inline ios_base& 6011: noshowpos(ios_base& __base) 6011: { 6011: __base.unsetf(ios_base::showpos); 6011: return __base; 6011: } 6011: 6011: 6011: inline ios_base& 6011: skipws(ios_base& __base) 6011: { 6011: __base.setf(ios_base::skipws); 6011: return __base; 6011: } 6011: 6011: 6011: inline ios_base& 6011: noskipws(ios_base& __base) 6011: { 6011: __base.unsetf(ios_base::skipws); 6011: return __base; 6011: } 6011: 6011: 6011: inline ios_base& 6011: uppercase(ios_base& __base) 6011: { 6011: __base.setf(ios_base::uppercase); 6011: return __base; 6011: } 6011: 6011: 6011: inline ios_base& 6011: nouppercase(ios_base& __base) 6011: { 6011: __base.unsetf(ios_base::uppercase); 6011: return __base; 6011: } 6011: 6011: 6011: inline ios_base& 6011: unitbuf(ios_base& __base) 6011: { 6011: __base.setf(ios_base::unitbuf); 6011: return __base; 6011: } 6011: 6011: 6011: inline ios_base& 6011: nounitbuf(ios_base& __base) 6011: { 6011: __base.unsetf(ios_base::unitbuf); 6011: return __base; 6011: } 6011: 6011: 6011: 6011: inline ios_base& 6011: internal(ios_base& __base) 6011: { 6011: __base.setf(ios_base::internal, ios_base::adjustfield); 6011: return __base; 6011: } 6011: 6011: 6011: inline ios_base& 6011: left(ios_base& __base) 6011: { 6011: __base.setf(ios_base::left, ios_base::adjustfield); 6011: return __base; 6011: } 6011: 6011: 6011: inline ios_base& 6011: right(ios_base& __base) 6011: { 6011: __base.setf(ios_base::right, ios_base::adjustfield); 6011: return __base; 6011: } 6011: 6011: 6011: 6011: inline ios_base& 6011: dec(ios_base& __base) 6011: { 6011: __base.setf(ios_base::dec, ios_base::basefield); 6011: return __base; 6011: } 6011: 6011: 6011: inline ios_base& 6011: hex(ios_base& __base) 6011: { 6011: __base.setf(ios_base::hex, ios_base::basefield); 6011: return __base; 6011: } 6011: 6011: 6011: inline ios_base& 6011: oct(ios_base& __base) 6011: { 6011: __base.setf(ios_base::oct, ios_base::basefield); 6011: return __base; 6011: } 6011: 6011: 6011: 6011: inline ios_base& 6011: fixed(ios_base& __base) 6011: { 6011: __base.setf(ios_base::fixed, ios_base::floatfield); 6011: return __base; 6011: } 6011: 6011: 6011: inline ios_base& 6011: scientific(ios_base& __base) 6011: { 6011: __base.setf(ios_base::scientific, ios_base::floatfield); 6011: return __base; 6011: } 6011: 6011: 6011: 6011: 6011: 6011: 6011: inline ios_base& 6011: hexfloat(ios_base& __base) 6011: { 6011: __base.setf(ios_base::fixed | ios_base::scientific, ios_base::floatfield); 6011: return __base; 6011: } 6011: 6011: 6011: inline ios_base& 6011: defaultfloat(ios_base& __base) 6011: { 6011: __base.unsetf(ios_base::floatfield); 6011: return __base; 6011: } 6011: 6011: 6011: 6011: } 6011: # 43 "/usr/include/c++/8/ios" 2 3 6011: # 1 "/usr/include/c++/8/streambuf" 1 3 6011: # 36 "/usr/include/c++/8/streambuf" 3 6011: 6011: # 37 "/usr/include/c++/8/streambuf" 3 6011: # 45 "/usr/include/c++/8/streambuf" 3 6011: namespace std __attribute__ ((__visibility__ ("default"))) 6011: { 6011: 6011: 6011: 6011: 6011: template 6011: streamsize 6011: __copy_streambufs_eof(basic_streambuf<_CharT, _Traits>*, 6011: basic_streambuf<_CharT, _Traits>*, bool&); 6011: # 121 "/usr/include/c++/8/streambuf" 3 6011: template 6011: class basic_streambuf 6011: { 6011: public: 6011: 6011: 6011: 6011: 6011: 6011: 6011: typedef _CharT char_type; 6011: typedef _Traits traits_type; 6011: typedef typename traits_type::int_type int_type; 6011: typedef typename traits_type::pos_type pos_type; 6011: typedef typename traits_type::off_type off_type; 6011: 6011: 6011: 6011: 6011: typedef basic_streambuf __streambuf_type; 6011: 6011: 6011: friend class basic_ios; 6011: friend class basic_istream; 6011: friend class basic_ostream; 6011: friend class istreambuf_iterator; 6011: friend class ostreambuf_iterator; 6011: 6011: friend streamsize 6011: __copy_streambufs_eof<>(basic_streambuf*, basic_streambuf*, bool&); 6011: 6011: template 6011: friend typename __gnu_cxx::__enable_if<__is_char<_CharT2>::__value, 6011: _CharT2*>::__type 6011: __copy_move_a2(istreambuf_iterator<_CharT2>, 6011: istreambuf_iterator<_CharT2>, _CharT2*); 6011: 6011: template 6011: friend typename __gnu_cxx::__enable_if<__is_char<_CharT2>::__value, 6011: istreambuf_iterator<_CharT2> >::__type 6011: find(istreambuf_iterator<_CharT2>, istreambuf_iterator<_CharT2>, 6011: const _CharT2&); 6011: 6011: template 6011: friend typename __gnu_cxx::__enable_if<__is_char<_CharT2>::__value, 6011: void>::__type 6011: advance(istreambuf_iterator<_CharT2>&, _Distance); 6011: 6011: template 6011: friend basic_istream<_CharT2, _Traits2>& 6011: operator>>(basic_istream<_CharT2, _Traits2>&, _CharT2*); 6011: 6011: template 6011: friend basic_istream<_CharT2, _Traits2>& 6011: operator>>(basic_istream<_CharT2, _Traits2>&, 6011: basic_string<_CharT2, _Traits2, _Alloc>&); 6011: 6011: template 6011: friend basic_istream<_CharT2, _Traits2>& 6011: getline(basic_istream<_CharT2, _Traits2>&, 6011: basic_string<_CharT2, _Traits2, _Alloc>&, _CharT2); 6011: 6011: protected: 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: char_type* _M_in_beg; 6011: char_type* _M_in_cur; 6011: char_type* _M_in_end; 6011: char_type* _M_out_beg; 6011: char_type* _M_out_cur; 6011: char_type* _M_out_end; 6011: 6011: 6011: locale _M_buf_locale; 6011: 6011: public: 6011: 6011: virtual 6011: ~basic_streambuf() 6011: { } 6011: # 215 "/usr/include/c++/8/streambuf" 3 6011: locale 6011: pubimbue(const locale& __loc) 6011: { 6011: locale __tmp(this->getloc()); 6011: this->imbue(__loc); 6011: _M_buf_locale = __loc; 6011: return __tmp; 6011: } 6011: # 232 "/usr/include/c++/8/streambuf" 3 6011: locale 6011: getloc() const 6011: { return _M_buf_locale; } 6011: # 245 "/usr/include/c++/8/streambuf" 3 6011: basic_streambuf* 6011: pubsetbuf(char_type* __s, streamsize __n) 6011: { return this->setbuf(__s, __n); } 6011: # 257 "/usr/include/c++/8/streambuf" 3 6011: pos_type 6011: pubseekoff(off_type __off, ios_base::seekdir __way, 6011: ios_base::openmode __mode = ios_base::in | ios_base::out) 6011: { return this->seekoff(__off, __way, __mode); } 6011: # 269 "/usr/include/c++/8/streambuf" 3 6011: pos_type 6011: pubseekpos(pos_type __sp, 6011: ios_base::openmode __mode = ios_base::in | ios_base::out) 6011: { return this->seekpos(__sp, __mode); } 6011: 6011: 6011: 6011: 6011: int 6011: pubsync() { return this->sync(); } 6011: # 290 "/usr/include/c++/8/streambuf" 3 6011: streamsize 6011: in_avail() 6011: { 6011: const streamsize __ret = this->egptr() - this->gptr(); 6011: return __ret ? __ret : this->showmanyc(); 6011: } 6011: # 304 "/usr/include/c++/8/streambuf" 3 6011: int_type 6011: snextc() 6011: { 6011: int_type __ret = traits_type::eof(); 6011: if (__builtin_expect(!traits_type::eq_int_type(this->sbumpc(), 6011: __ret), true)) 6011: __ret = this->sgetc(); 6011: return __ret; 6011: } 6011: # 322 "/usr/include/c++/8/streambuf" 3 6011: int_type 6011: sbumpc() 6011: { 6011: int_type __ret; 6011: if (__builtin_expect(this->gptr() < this->egptr(), true)) 6011: { 6011: __ret = traits_type::to_int_type(*this->gptr()); 6011: this->gbump(1); 6011: } 6011: else 6011: __ret = this->uflow(); 6011: return __ret; 6011: } 6011: # 344 "/usr/include/c++/8/streambuf" 3 6011: int_type 6011: sgetc() 6011: { 6011: int_type __ret; 6011: if (__builtin_expect(this->gptr() < this->egptr(), true)) 6011: __ret = traits_type::to_int_type(*this->gptr()); 6011: else 6011: __ret = this->underflow(); 6011: return __ret; 6011: } 6011: # 363 "/usr/include/c++/8/streambuf" 3 6011: streamsize 6011: sgetn(char_type* __s, streamsize __n) 6011: { return this->xsgetn(__s, __n); } 6011: # 378 "/usr/include/c++/8/streambuf" 3 6011: int_type 6011: sputbackc(char_type __c) 6011: { 6011: int_type __ret; 6011: const bool __testpos = this->eback() < this->gptr(); 6011: if (__builtin_expect(!__testpos || 6011: !traits_type::eq(__c, this->gptr()[-1]), false)) 6011: __ret = this->pbackfail(traits_type::to_int_type(__c)); 6011: else 6011: { 6011: this->gbump(-1); 6011: __ret = traits_type::to_int_type(*this->gptr()); 6011: } 6011: return __ret; 6011: } 6011: # 403 "/usr/include/c++/8/streambuf" 3 6011: int_type 6011: sungetc() 6011: { 6011: int_type __ret; 6011: if (__builtin_expect(this->eback() < this->gptr(), true)) 6011: { 6011: this->gbump(-1); 6011: __ret = traits_type::to_int_type(*this->gptr()); 6011: } 6011: else 6011: __ret = this->pbackfail(); 6011: return __ret; 6011: } 6011: # 430 "/usr/include/c++/8/streambuf" 3 6011: int_type 6011: sputc(char_type __c) 6011: { 6011: int_type __ret; 6011: if (__builtin_expect(this->pptr() < this->epptr(), true)) 6011: { 6011: *this->pptr() = __c; 6011: this->pbump(1); 6011: __ret = traits_type::to_int_type(__c); 6011: } 6011: else 6011: __ret = this->overflow(traits_type::to_int_type(__c)); 6011: return __ret; 6011: } 6011: # 456 "/usr/include/c++/8/streambuf" 3 6011: streamsize 6011: sputn(const char_type* __s, streamsize __n) 6011: { return this->xsputn(__s, __n); } 6011: 6011: protected: 6011: # 470 "/usr/include/c++/8/streambuf" 3 6011: basic_streambuf() 6011: : _M_in_beg(0), _M_in_cur(0), _M_in_end(0), 6011: _M_out_beg(0), _M_out_cur(0), _M_out_end(0), 6011: _M_buf_locale(locale()) 6011: { } 6011: # 488 "/usr/include/c++/8/streambuf" 3 6011: char_type* 6011: eback() const { return _M_in_beg; } 6011: 6011: char_type* 6011: gptr() const { return _M_in_cur; } 6011: 6011: char_type* 6011: egptr() const { return _M_in_end; } 6011: # 504 "/usr/include/c++/8/streambuf" 3 6011: void 6011: gbump(int __n) { _M_in_cur += __n; } 6011: # 515 "/usr/include/c++/8/streambuf" 3 6011: void 6011: setg(char_type* __gbeg, char_type* __gnext, char_type* __gend) 6011: { 6011: _M_in_beg = __gbeg; 6011: _M_in_cur = __gnext; 6011: _M_in_end = __gend; 6011: } 6011: # 535 "/usr/include/c++/8/streambuf" 3 6011: char_type* 6011: pbase() const { return _M_out_beg; } 6011: 6011: char_type* 6011: pptr() const { return _M_out_cur; } 6011: 6011: char_type* 6011: epptr() const { return _M_out_end; } 6011: # 551 "/usr/include/c++/8/streambuf" 3 6011: void 6011: pbump(int __n) { _M_out_cur += __n; } 6011: # 561 "/usr/include/c++/8/streambuf" 3 6011: void 6011: setp(char_type* __pbeg, char_type* __pend) 6011: { 6011: _M_out_beg = _M_out_cur = __pbeg; 6011: _M_out_end = __pend; 6011: } 6011: # 582 "/usr/include/c++/8/streambuf" 3 6011: virtual void 6011: imbue(const locale& __loc __attribute__ ((__unused__))) 6011: { } 6011: # 597 "/usr/include/c++/8/streambuf" 3 6011: virtual basic_streambuf* 6011: setbuf(char_type*, streamsize) 6011: { return this; } 6011: # 608 "/usr/include/c++/8/streambuf" 3 6011: virtual pos_type 6011: seekoff(off_type, ios_base::seekdir, 6011: ios_base::openmode = ios_base::in | ios_base::out) 6011: { return pos_type(off_type(-1)); } 6011: # 620 "/usr/include/c++/8/streambuf" 3 6011: virtual pos_type 6011: seekpos(pos_type, 6011: ios_base::openmode = ios_base::in | ios_base::out) 6011: { return pos_type(off_type(-1)); } 6011: # 633 "/usr/include/c++/8/streambuf" 3 6011: virtual int 6011: sync() { return 0; } 6011: # 655 "/usr/include/c++/8/streambuf" 3 6011: virtual streamsize 6011: showmanyc() { return 0; } 6011: # 671 "/usr/include/c++/8/streambuf" 3 6011: virtual streamsize 6011: xsgetn(char_type* __s, streamsize __n); 6011: # 693 "/usr/include/c++/8/streambuf" 3 6011: virtual int_type 6011: underflow() 6011: { return traits_type::eof(); } 6011: # 706 "/usr/include/c++/8/streambuf" 3 6011: virtual int_type 6011: uflow() 6011: { 6011: int_type __ret = traits_type::eof(); 6011: const bool __testeof = traits_type::eq_int_type(this->underflow(), 6011: __ret); 6011: if (!__testeof) 6011: { 6011: __ret = traits_type::to_int_type(*this->gptr()); 6011: this->gbump(1); 6011: } 6011: return __ret; 6011: } 6011: # 730 "/usr/include/c++/8/streambuf" 3 6011: virtual int_type 6011: pbackfail(int_type __c __attribute__ ((__unused__)) = traits_type::eof()) 6011: { return traits_type::eof(); } 6011: # 748 "/usr/include/c++/8/streambuf" 3 6011: virtual streamsize 6011: xsputn(const char_type* __s, streamsize __n); 6011: # 774 "/usr/include/c++/8/streambuf" 3 6011: virtual int_type 6011: overflow(int_type __c __attribute__ ((__unused__)) = traits_type::eof()) 6011: { return traits_type::eof(); } 6011: 6011: 6011: 6011: public: 6011: # 790 "/usr/include/c++/8/streambuf" 3 6011: [[__deprecated__("stossc is deprecated, use sbumpc instead")]] 6011: 6011: void 6011: stossc() 6011: { 6011: if (this->gptr() < this->egptr()) 6011: this->gbump(1); 6011: else 6011: this->uflow(); 6011: } 6011: 6011: 6011: 6011: void 6011: __safe_gbump(streamsize __n) { _M_in_cur += __n; } 6011: 6011: void 6011: __safe_pbump(streamsize __n) { _M_out_cur += __n; } 6011: 6011: 6011: 6011: 6011: protected: 6011: 6011: basic_streambuf(const basic_streambuf&); 6011: 6011: basic_streambuf& 6011: operator=(const basic_streambuf&); 6011: 6011: 6011: void 6011: swap(basic_streambuf& __sb) 6011: { 6011: std::swap(_M_in_beg, __sb._M_in_beg); 6011: std::swap(_M_in_cur, __sb._M_in_cur); 6011: std::swap(_M_in_end, __sb._M_in_end); 6011: std::swap(_M_out_beg, __sb._M_out_beg); 6011: std::swap(_M_out_cur, __sb._M_out_cur); 6011: std::swap(_M_out_end, __sb._M_out_end); 6011: std::swap(_M_buf_locale, __sb._M_buf_locale); 6011: } 6011: 6011: }; 6011: 6011: 6011: template 6011: std::basic_streambuf<_CharT, _Traits>:: 6011: basic_streambuf(const basic_streambuf&) = default; 6011: 6011: template 6011: std::basic_streambuf<_CharT, _Traits>& 6011: std::basic_streambuf<_CharT, _Traits>:: 6011: operator=(const basic_streambuf&) = default; 6011: 6011: 6011: 6011: template<> 6011: streamsize 6011: __copy_streambufs_eof(basic_streambuf* __sbin, 6011: basic_streambuf* __sbout, bool& __ineof); 6011: 6011: template<> 6011: streamsize 6011: __copy_streambufs_eof(basic_streambuf* __sbin, 6011: basic_streambuf* __sbout, bool& __ineof); 6011: 6011: 6011: 6011: 6011: 6011: } 6011: 6011: # 1 "/usr/include/c++/8/bits/streambuf.tcc" 1 3 6011: # 37 "/usr/include/c++/8/bits/streambuf.tcc" 3 6011: 6011: # 38 "/usr/include/c++/8/bits/streambuf.tcc" 3 6011: 6011: namespace std __attribute__ ((__visibility__ ("default"))) 6011: { 6011: 6011: 6011: template 6011: streamsize 6011: basic_streambuf<_CharT, _Traits>:: 6011: xsgetn(char_type* __s, streamsize __n) 6011: { 6011: streamsize __ret = 0; 6011: while (__ret < __n) 6011: { 6011: const streamsize __buf_len = this->egptr() - this->gptr(); 6011: if (__buf_len) 6011: { 6011: const streamsize __remaining = __n - __ret; 6011: const streamsize __len = std::min(__buf_len, __remaining); 6011: traits_type::copy(__s, this->gptr(), __len); 6011: __ret += __len; 6011: __s += __len; 6011: this->__safe_gbump(__len); 6011: } 6011: 6011: if (__ret < __n) 6011: { 6011: const int_type __c = this->uflow(); 6011: if (!traits_type::eq_int_type(__c, traits_type::eof())) 6011: { 6011: traits_type::assign(*__s++, traits_type::to_char_type(__c)); 6011: ++__ret; 6011: } 6011: else 6011: break; 6011: } 6011: } 6011: return __ret; 6011: } 6011: 6011: template 6011: streamsize 6011: basic_streambuf<_CharT, _Traits>:: 6011: xsputn(const char_type* __s, streamsize __n) 6011: { 6011: streamsize __ret = 0; 6011: while (__ret < __n) 6011: { 6011: const streamsize __buf_len = this->epptr() - this->pptr(); 6011: if (__buf_len) 6011: { 6011: const streamsize __remaining = __n - __ret; 6011: const streamsize __len = std::min(__buf_len, __remaining); 6011: traits_type::copy(this->pptr(), __s, __len); 6011: __ret += __len; 6011: __s += __len; 6011: this->__safe_pbump(__len); 6011: } 6011: 6011: if (__ret < __n) 6011: { 6011: int_type __c = this->overflow(traits_type::to_int_type(*__s)); 6011: if (!traits_type::eq_int_type(__c, traits_type::eof())) 6011: { 6011: ++__ret; 6011: ++__s; 6011: } 6011: else 6011: break; 6011: } 6011: } 6011: return __ret; 6011: } 6011: 6011: 6011: 6011: 6011: template 6011: streamsize 6011: __copy_streambufs_eof(basic_streambuf<_CharT, _Traits>* __sbin, 6011: basic_streambuf<_CharT, _Traits>* __sbout, 6011: bool& __ineof) 6011: { 6011: streamsize __ret = 0; 6011: __ineof = true; 6011: typename _Traits::int_type __c = __sbin->sgetc(); 6011: while (!_Traits::eq_int_type(__c, _Traits::eof())) 6011: { 6011: __c = __sbout->sputc(_Traits::to_char_type(__c)); 6011: if (_Traits::eq_int_type(__c, _Traits::eof())) 6011: { 6011: __ineof = false; 6011: break; 6011: } 6011: ++__ret; 6011: __c = __sbin->snextc(); 6011: } 6011: return __ret; 6011: } 6011: 6011: template 6011: inline streamsize 6011: __copy_streambufs(basic_streambuf<_CharT, _Traits>* __sbin, 6011: basic_streambuf<_CharT, _Traits>* __sbout) 6011: { 6011: bool __ineof; 6011: return __copy_streambufs_eof(__sbin, __sbout, __ineof); 6011: } 6011: 6011: 6011: 6011: 6011: extern template class basic_streambuf; 6011: extern template 6011: streamsize 6011: __copy_streambufs(basic_streambuf*, 6011: basic_streambuf*); 6011: extern template 6011: streamsize 6011: __copy_streambufs_eof(basic_streambuf*, 6011: basic_streambuf*, bool&); 6011: 6011: 6011: extern template class basic_streambuf; 6011: extern template 6011: streamsize 6011: __copy_streambufs(basic_streambuf*, 6011: basic_streambuf*); 6011: extern template 6011: streamsize 6011: __copy_streambufs_eof(basic_streambuf*, 6011: basic_streambuf*, bool&); 6011: 6011: 6011: 6011: 6011: } 6011: # 863 "/usr/include/c++/8/streambuf" 2 3 6011: # 44 "/usr/include/c++/8/ios" 2 3 6011: # 1 "/usr/include/c++/8/bits/basic_ios.h" 1 3 6011: # 33 "/usr/include/c++/8/bits/basic_ios.h" 3 6011: 6011: # 34 "/usr/include/c++/8/bits/basic_ios.h" 3 6011: 6011: 6011: 6011: # 1 "/usr/include/c++/8/bits/locale_facets.h" 1 3 6011: # 37 "/usr/include/c++/8/bits/locale_facets.h" 3 6011: 6011: # 38 "/usr/include/c++/8/bits/locale_facets.h" 3 6011: 6011: # 1 "/usr/include/c++/8/cwctype" 1 3 6011: # 39 "/usr/include/c++/8/cwctype" 3 6011: 6011: # 40 "/usr/include/c++/8/cwctype" 3 6011: # 50 "/usr/include/c++/8/cwctype" 3 6011: # 1 "/usr/include/wctype.h" 1 3 4 6011: # 38 "/usr/include/wctype.h" 3 4 6011: # 1 "/usr/include/arm-linux-gnueabihf/bits/wctype-wchar.h" 1 3 4 6011: # 38 "/usr/include/arm-linux-gnueabihf/bits/wctype-wchar.h" 3 4 6011: typedef unsigned long int wctype_t; 6011: # 56 "/usr/include/arm-linux-gnueabihf/bits/wctype-wchar.h" 3 4 6011: enum 6011: { 6011: __ISwupper = 0, 6011: __ISwlower = 1, 6011: __ISwalpha = 2, 6011: __ISwdigit = 3, 6011: __ISwxdigit = 4, 6011: __ISwspace = 5, 6011: __ISwprint = 6, 6011: __ISwgraph = 7, 6011: __ISwblank = 8, 6011: __ISwcntrl = 9, 6011: __ISwpunct = 10, 6011: __ISwalnum = 11, 6011: 6011: _ISwupper = ((__ISwupper) < 8 ? (int) ((1UL << (__ISwupper)) << 24) : ((__ISwupper) < 16 ? (int) ((1UL << (__ISwupper)) << 8) : ((__ISwupper) < 24 ? (int) ((1UL << (__ISwupper)) >> 8) : (int) ((1UL << (__ISwupper)) >> 24)))), 6011: _ISwlower = ((__ISwlower) < 8 ? (int) ((1UL << (__ISwlower)) << 24) : ((__ISwlower) < 16 ? (int) ((1UL << (__ISwlower)) << 8) : ((__ISwlower) < 24 ? (int) ((1UL << (__ISwlower)) >> 8) : (int) ((1UL << (__ISwlower)) >> 24)))), 6011: _ISwalpha = ((__ISwalpha) < 8 ? (int) ((1UL << (__ISwalpha)) << 24) : ((__ISwalpha) < 16 ? (int) ((1UL << (__ISwalpha)) << 8) : ((__ISwalpha) < 24 ? (int) ((1UL << (__ISwalpha)) >> 8) : (int) ((1UL << (__ISwalpha)) >> 24)))), 6011: _ISwdigit = ((__ISwdigit) < 8 ? (int) ((1UL << (__ISwdigit)) << 24) : ((__ISwdigit) < 16 ? (int) ((1UL << (__ISwdigit)) << 8) : ((__ISwdigit) < 24 ? (int) ((1UL << (__ISwdigit)) >> 8) : (int) ((1UL << (__ISwdigit)) >> 24)))), 6011: _ISwxdigit = ((__ISwxdigit) < 8 ? (int) ((1UL << (__ISwxdigit)) << 24) : ((__ISwxdigit) < 16 ? (int) ((1UL << (__ISwxdigit)) << 8) : ((__ISwxdigit) < 24 ? (int) ((1UL << (__ISwxdigit)) >> 8) : (int) ((1UL << (__ISwxdigit)) >> 24)))), 6011: _ISwspace = ((__ISwspace) < 8 ? (int) ((1UL << (__ISwspace)) << 24) : ((__ISwspace) < 16 ? (int) ((1UL << (__ISwspace)) << 8) : ((__ISwspace) < 24 ? (int) ((1UL << (__ISwspace)) >> 8) : (int) ((1UL << (__ISwspace)) >> 24)))), 6011: _ISwprint = ((__ISwprint) < 8 ? (int) ((1UL << (__ISwprint)) << 24) : ((__ISwprint) < 16 ? (int) ((1UL << (__ISwprint)) << 8) : ((__ISwprint) < 24 ? (int) ((1UL << (__ISwprint)) >> 8) : (int) ((1UL << (__ISwprint)) >> 24)))), 6011: _ISwgraph = ((__ISwgraph) < 8 ? (int) ((1UL << (__ISwgraph)) << 24) : ((__ISwgraph) < 16 ? (int) ((1UL << (__ISwgraph)) << 8) : ((__ISwgraph) < 24 ? (int) ((1UL << (__ISwgraph)) >> 8) : (int) ((1UL << (__ISwgraph)) >> 24)))), 6011: _ISwblank = ((__ISwblank) < 8 ? (int) ((1UL << (__ISwblank)) << 24) : ((__ISwblank) < 16 ? (int) ((1UL << (__ISwblank)) << 8) : ((__ISwblank) < 24 ? (int) ((1UL << (__ISwblank)) >> 8) : (int) ((1UL << (__ISwblank)) >> 24)))), 6011: _ISwcntrl = ((__ISwcntrl) < 8 ? (int) ((1UL << (__ISwcntrl)) << 24) : ((__ISwcntrl) < 16 ? (int) ((1UL << (__ISwcntrl)) << 8) : ((__ISwcntrl) < 24 ? (int) ((1UL << (__ISwcntrl)) >> 8) : (int) ((1UL << (__ISwcntrl)) >> 24)))), 6011: _ISwpunct = ((__ISwpunct) < 8 ? (int) ((1UL << (__ISwpunct)) << 24) : ((__ISwpunct) < 16 ? (int) ((1UL << (__ISwpunct)) << 8) : ((__ISwpunct) < 24 ? (int) ((1UL << (__ISwpunct)) >> 8) : (int) ((1UL << (__ISwpunct)) >> 24)))), 6011: _ISwalnum = ((__ISwalnum) < 8 ? (int) ((1UL << (__ISwalnum)) << 24) : ((__ISwalnum) < 16 ? (int) ((1UL << (__ISwalnum)) << 8) : ((__ISwalnum) < 24 ? (int) ((1UL << (__ISwalnum)) >> 8) : (int) ((1UL << (__ISwalnum)) >> 24)))) 6011: }; 6011: 6011: 6011: 6011: extern "C" { 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: extern int iswalnum (wint_t __wc) throw (); 6011: 6011: 6011: 6011: 6011: 6011: extern int iswalpha (wint_t __wc) throw (); 6011: 6011: 6011: extern int iswcntrl (wint_t __wc) throw (); 6011: 6011: 6011: 6011: extern int iswdigit (wint_t __wc) throw (); 6011: 6011: 6011: 6011: extern int iswgraph (wint_t __wc) throw (); 6011: 6011: 6011: 6011: 6011: extern int iswlower (wint_t __wc) throw (); 6011: 6011: 6011: extern int iswprint (wint_t __wc) throw (); 6011: 6011: 6011: 6011: 6011: extern int iswpunct (wint_t __wc) throw (); 6011: 6011: 6011: 6011: 6011: extern int iswspace (wint_t __wc) throw (); 6011: 6011: 6011: 6011: 6011: extern int iswupper (wint_t __wc) throw (); 6011: 6011: 6011: 6011: 6011: extern int iswxdigit (wint_t __wc) throw (); 6011: 6011: 6011: 6011: 6011: 6011: extern int iswblank (wint_t __wc) throw (); 6011: # 155 "/usr/include/arm-linux-gnueabihf/bits/wctype-wchar.h" 3 4 6011: extern wctype_t wctype (const char *__property) throw (); 6011: 6011: 6011: 6011: extern int iswctype (wint_t __wc, wctype_t __desc) throw (); 6011: 6011: 6011: 6011: 6011: 6011: 6011: extern wint_t towlower (wint_t __wc) throw (); 6011: 6011: 6011: extern wint_t towupper (wint_t __wc) throw (); 6011: 6011: } 6011: # 39 "/usr/include/wctype.h" 2 3 4 6011: 6011: 6011: 6011: 6011: 6011: extern "C" { 6011: 6011: 6011: 6011: typedef const __int32_t *wctrans_t; 6011: 6011: 6011: 6011: extern wctrans_t wctrans (const char *__property) throw (); 6011: 6011: 6011: extern wint_t towctrans (wint_t __wc, wctrans_t __desc) throw (); 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: extern int iswalnum_l (wint_t __wc, locale_t __locale) throw (); 6011: 6011: 6011: 6011: 6011: 6011: extern int iswalpha_l (wint_t __wc, locale_t __locale) throw (); 6011: 6011: 6011: extern int iswcntrl_l (wint_t __wc, locale_t __locale) throw (); 6011: 6011: 6011: 6011: extern int iswdigit_l (wint_t __wc, locale_t __locale) throw (); 6011: 6011: 6011: 6011: extern int iswgraph_l (wint_t __wc, locale_t __locale) throw (); 6011: 6011: 6011: 6011: 6011: extern int iswlower_l (wint_t __wc, locale_t __locale) throw (); 6011: 6011: 6011: extern int iswprint_l (wint_t __wc, locale_t __locale) throw (); 6011: 6011: 6011: 6011: 6011: extern int iswpunct_l (wint_t __wc, locale_t __locale) throw (); 6011: 6011: 6011: 6011: 6011: extern int iswspace_l (wint_t __wc, locale_t __locale) throw (); 6011: 6011: 6011: 6011: 6011: extern int iswupper_l (wint_t __wc, locale_t __locale) throw (); 6011: 6011: 6011: 6011: 6011: extern int iswxdigit_l (wint_t __wc, locale_t __locale) throw (); 6011: 6011: 6011: 6011: 6011: extern int iswblank_l (wint_t __wc, locale_t __locale) throw (); 6011: 6011: 6011: 6011: extern wctype_t wctype_l (const char *__property, locale_t __locale) 6011: throw (); 6011: 6011: 6011: 6011: extern int iswctype_l (wint_t __wc, wctype_t __desc, locale_t __locale) 6011: throw (); 6011: 6011: 6011: 6011: 6011: 6011: 6011: extern wint_t towlower_l (wint_t __wc, locale_t __locale) throw (); 6011: 6011: 6011: extern wint_t towupper_l (wint_t __wc, locale_t __locale) throw (); 6011: 6011: 6011: 6011: extern wctrans_t wctrans_l (const char *__property, locale_t __locale) 6011: throw (); 6011: 6011: 6011: extern wint_t towctrans_l (wint_t __wc, wctrans_t __desc, 6011: locale_t __locale) throw (); 6011: 6011: 6011: 6011: } 6011: # 51 "/usr/include/c++/8/cwctype" 2 3 6011: # 80 "/usr/include/c++/8/cwctype" 3 6011: namespace std 6011: { 6011: using ::wctrans_t; 6011: using ::wctype_t; 6011: using ::wint_t; 6011: 6011: using ::iswalnum; 6011: using ::iswalpha; 6011: 6011: using ::iswblank; 6011: 6011: using ::iswcntrl; 6011: using ::iswctype; 6011: using ::iswdigit; 6011: using ::iswgraph; 6011: using ::iswlower; 6011: using ::iswprint; 6011: using ::iswpunct; 6011: using ::iswspace; 6011: using ::iswupper; 6011: using ::iswxdigit; 6011: using ::towctrans; 6011: using ::towlower; 6011: using ::towupper; 6011: using ::wctrans; 6011: using ::wctype; 6011: } 6011: # 40 "/usr/include/c++/8/bits/locale_facets.h" 2 3 6011: # 1 "/usr/include/c++/8/cctype" 1 3 6011: # 39 "/usr/include/c++/8/cctype" 3 6011: 6011: # 40 "/usr/include/c++/8/cctype" 3 6011: # 41 "/usr/include/c++/8/bits/locale_facets.h" 2 3 6011: # 1 "/usr/include/arm-linux-gnueabihf/c++/8/bits/ctype_base.h" 1 3 6011: # 36 "/usr/include/arm-linux-gnueabihf/c++/8/bits/ctype_base.h" 3 6011: namespace std __attribute__ ((__visibility__ ("default"))) 6011: { 6011: 6011: 6011: 6011: struct ctype_base 6011: { 6011: 6011: typedef const int* __to_type; 6011: 6011: 6011: 6011: typedef unsigned short mask; 6011: static const mask upper = _ISupper; 6011: static const mask lower = _ISlower; 6011: static const mask alpha = _ISalpha; 6011: static const mask digit = _ISdigit; 6011: static const mask xdigit = _ISxdigit; 6011: static const mask space = _ISspace; 6011: static const mask print = _ISprint; 6011: static const mask graph = _ISalpha | _ISdigit | _ISpunct; 6011: static const mask cntrl = _IScntrl; 6011: static const mask punct = _ISpunct; 6011: static const mask alnum = _ISalpha | _ISdigit; 6011: 6011: static const mask blank = _ISblank; 6011: 6011: }; 6011: 6011: 6011: } 6011: # 42 "/usr/include/c++/8/bits/locale_facets.h" 2 3 6011: 6011: 6011: 6011: 6011: 6011: 6011: # 1 "/usr/include/c++/8/bits/streambuf_iterator.h" 1 3 6011: # 33 "/usr/include/c++/8/bits/streambuf_iterator.h" 3 6011: 6011: # 34 "/usr/include/c++/8/bits/streambuf_iterator.h" 3 6011: 6011: 6011: 6011: 6011: namespace std __attribute__ ((__visibility__ ("default"))) 6011: { 6011: 6011: # 49 "/usr/include/c++/8/bits/streambuf_iterator.h" 3 6011: template 6011: class istreambuf_iterator 6011: : public iterator 6011: 6011: 6011: 6011: { 6011: public: 6011: 6011: 6011: 6011: typedef _CharT char_type; 6011: typedef _Traits traits_type; 6011: typedef typename _Traits::int_type int_type; 6011: typedef basic_streambuf<_CharT, _Traits> streambuf_type; 6011: typedef basic_istream<_CharT, _Traits> istream_type; 6011: 6011: 6011: template 6011: friend typename __gnu_cxx::__enable_if<__is_char<_CharT2>::__value, 6011: ostreambuf_iterator<_CharT2> >::__type 6011: copy(istreambuf_iterator<_CharT2>, istreambuf_iterator<_CharT2>, 6011: ostreambuf_iterator<_CharT2>); 6011: 6011: template 6011: friend typename __gnu_cxx::__enable_if<__is_char<_CharT2>::__value, 6011: _CharT2*>::__type 6011: __copy_move_a2(istreambuf_iterator<_CharT2>, 6011: istreambuf_iterator<_CharT2>, _CharT2*); 6011: 6011: template 6011: friend typename __gnu_cxx::__enable_if<__is_char<_CharT2>::__value, 6011: istreambuf_iterator<_CharT2> >::__type 6011: find(istreambuf_iterator<_CharT2>, istreambuf_iterator<_CharT2>, 6011: const _CharT2&); 6011: 6011: template 6011: friend typename __gnu_cxx::__enable_if<__is_char<_CharT2>::__value, 6011: void>::__type 6011: advance(istreambuf_iterator<_CharT2>&, _Distance); 6011: 6011: private: 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: mutable streambuf_type* _M_sbuf; 6011: int_type _M_c; 6011: 6011: public: 6011: 6011: constexpr istreambuf_iterator() noexcept 6011: : _M_sbuf(0), _M_c(traits_type::eof()) { } 6011: 6011: 6011: istreambuf_iterator(const istreambuf_iterator&) noexcept = default; 6011: 6011: ~istreambuf_iterator() = default; 6011: 6011: 6011: 6011: istreambuf_iterator(istream_type& __s) noexcept 6011: : _M_sbuf(__s.rdbuf()), _M_c(traits_type::eof()) { } 6011: 6011: 6011: istreambuf_iterator(streambuf_type* __s) noexcept 6011: : _M_sbuf(__s), _M_c(traits_type::eof()) { } 6011: 6011: 6011: 6011: 6011: char_type 6011: operator*() const 6011: { 6011: int_type __c = _M_get(); 6011: # 139 "/usr/include/c++/8/bits/streambuf_iterator.h" 3 6011: return traits_type::to_char_type(__c); 6011: } 6011: 6011: 6011: istreambuf_iterator& 6011: operator++() 6011: { 6011: 6011: 6011: 6011: ; 6011: 6011: _M_sbuf->sbumpc(); 6011: _M_c = traits_type::eof(); 6011: return *this; 6011: } 6011: 6011: 6011: istreambuf_iterator 6011: operator++(int) 6011: { 6011: 6011: 6011: 6011: ; 6011: 6011: istreambuf_iterator __old = *this; 6011: __old._M_c = _M_sbuf->sbumpc(); 6011: _M_c = traits_type::eof(); 6011: return __old; 6011: } 6011: 6011: 6011: 6011: 6011: 6011: bool 6011: equal(const istreambuf_iterator& __b) const 6011: { return _M_at_eof() == __b._M_at_eof(); } 6011: 6011: private: 6011: int_type 6011: _M_get() const 6011: { 6011: int_type __ret = _M_c; 6011: if (_M_sbuf && _S_is_eof(__ret) && _S_is_eof(__ret = _M_sbuf->sgetc())) 6011: _M_sbuf = 0; 6011: return __ret; 6011: } 6011: 6011: bool 6011: _M_at_eof() const 6011: { return _S_is_eof(_M_get()); } 6011: 6011: static bool 6011: _S_is_eof(int_type __c) 6011: { 6011: const int_type __eof = traits_type::eof(); 6011: return traits_type::eq_int_type(__c, __eof); 6011: } 6011: }; 6011: 6011: template 6011: inline bool 6011: operator==(const istreambuf_iterator<_CharT, _Traits>& __a, 6011: const istreambuf_iterator<_CharT, _Traits>& __b) 6011: { return __a.equal(__b); } 6011: 6011: template 6011: inline bool 6011: operator!=(const istreambuf_iterator<_CharT, _Traits>& __a, 6011: const istreambuf_iterator<_CharT, _Traits>& __b) 6011: { return !__a.equal(__b); } 6011: 6011: 6011: template 6011: class ostreambuf_iterator 6011: : public iterator 6011: { 6011: public: 6011: 6011: 6011: 6011: typedef _CharT char_type; 6011: typedef _Traits traits_type; 6011: typedef basic_streambuf<_CharT, _Traits> streambuf_type; 6011: typedef basic_ostream<_CharT, _Traits> ostream_type; 6011: 6011: 6011: template 6011: friend typename __gnu_cxx::__enable_if<__is_char<_CharT2>::__value, 6011: ostreambuf_iterator<_CharT2> >::__type 6011: copy(istreambuf_iterator<_CharT2>, istreambuf_iterator<_CharT2>, 6011: ostreambuf_iterator<_CharT2>); 6011: 6011: private: 6011: streambuf_type* _M_sbuf; 6011: bool _M_failed; 6011: 6011: public: 6011: 6011: ostreambuf_iterator(ostream_type& __s) noexcept 6011: : _M_sbuf(__s.rdbuf()), _M_failed(!_M_sbuf) { } 6011: 6011: 6011: ostreambuf_iterator(streambuf_type* __s) noexcept 6011: : _M_sbuf(__s), _M_failed(!_M_sbuf) { } 6011: 6011: 6011: ostreambuf_iterator& 6011: operator=(_CharT __c) 6011: { 6011: if (!_M_failed && 6011: _Traits::eq_int_type(_M_sbuf->sputc(__c), _Traits::eof())) 6011: _M_failed = true; 6011: return *this; 6011: } 6011: 6011: 6011: ostreambuf_iterator& 6011: operator*() 6011: { return *this; } 6011: 6011: 6011: ostreambuf_iterator& 6011: operator++(int) 6011: { return *this; } 6011: 6011: 6011: ostreambuf_iterator& 6011: operator++() 6011: { return *this; } 6011: 6011: 6011: bool 6011: failed() const noexcept 6011: { return _M_failed; } 6011: 6011: ostreambuf_iterator& 6011: _M_put(const _CharT* __ws, streamsize __len) 6011: { 6011: if (__builtin_expect(!_M_failed, true) 6011: && __builtin_expect(this->_M_sbuf->sputn(__ws, __len) != __len, 6011: false)) 6011: _M_failed = true; 6011: return *this; 6011: } 6011: }; 6011: 6011: 6011: template 6011: typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value, 6011: ostreambuf_iterator<_CharT> >::__type 6011: copy(istreambuf_iterator<_CharT> __first, 6011: istreambuf_iterator<_CharT> __last, 6011: ostreambuf_iterator<_CharT> __result) 6011: { 6011: if (__first._M_sbuf && !__last._M_sbuf && !__result._M_failed) 6011: { 6011: bool __ineof; 6011: __copy_streambufs_eof(__first._M_sbuf, __result._M_sbuf, __ineof); 6011: if (!__ineof) 6011: __result._M_failed = true; 6011: } 6011: return __result; 6011: } 6011: 6011: template 6011: typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value, 6011: ostreambuf_iterator<_CharT> >::__type 6011: __copy_move_a2(_CharT* __first, _CharT* __last, 6011: ostreambuf_iterator<_CharT> __result) 6011: { 6011: const streamsize __num = __last - __first; 6011: if (__num > 0) 6011: __result._M_put(__first, __num); 6011: return __result; 6011: } 6011: 6011: template 6011: typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value, 6011: ostreambuf_iterator<_CharT> >::__type 6011: __copy_move_a2(const _CharT* __first, const _CharT* __last, 6011: ostreambuf_iterator<_CharT> __result) 6011: { 6011: const streamsize __num = __last - __first; 6011: if (__num > 0) 6011: __result._M_put(__first, __num); 6011: return __result; 6011: } 6011: 6011: template 6011: typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value, 6011: _CharT*>::__type 6011: __copy_move_a2(istreambuf_iterator<_CharT> __first, 6011: istreambuf_iterator<_CharT> __last, _CharT* __result) 6011: { 6011: typedef istreambuf_iterator<_CharT> __is_iterator_type; 6011: typedef typename __is_iterator_type::traits_type traits_type; 6011: typedef typename __is_iterator_type::streambuf_type streambuf_type; 6011: typedef typename traits_type::int_type int_type; 6011: 6011: if (__first._M_sbuf && !__last._M_sbuf) 6011: { 6011: streambuf_type* __sb = __first._M_sbuf; 6011: int_type __c = __sb->sgetc(); 6011: while (!traits_type::eq_int_type(__c, traits_type::eof())) 6011: { 6011: const streamsize __n = __sb->egptr() - __sb->gptr(); 6011: if (__n > 1) 6011: { 6011: traits_type::copy(__result, __sb->gptr(), __n); 6011: __sb->__safe_gbump(__n); 6011: __result += __n; 6011: __c = __sb->underflow(); 6011: } 6011: else 6011: { 6011: *__result++ = traits_type::to_char_type(__c); 6011: __c = __sb->snextc(); 6011: } 6011: } 6011: } 6011: return __result; 6011: } 6011: 6011: template 6011: typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value, 6011: istreambuf_iterator<_CharT> >::__type 6011: find(istreambuf_iterator<_CharT> __first, 6011: istreambuf_iterator<_CharT> __last, const _CharT& __val) 6011: { 6011: typedef istreambuf_iterator<_CharT> __is_iterator_type; 6011: typedef typename __is_iterator_type::traits_type traits_type; 6011: typedef typename __is_iterator_type::streambuf_type streambuf_type; 6011: typedef typename traits_type::int_type int_type; 6011: const int_type __eof = traits_type::eof(); 6011: 6011: if (__first._M_sbuf && !__last._M_sbuf) 6011: { 6011: const int_type __ival = traits_type::to_int_type(__val); 6011: streambuf_type* __sb = __first._M_sbuf; 6011: int_type __c = __sb->sgetc(); 6011: while (!traits_type::eq_int_type(__c, __eof) 6011: && !traits_type::eq_int_type(__c, __ival)) 6011: { 6011: streamsize __n = __sb->egptr() - __sb->gptr(); 6011: if (__n > 1) 6011: { 6011: const _CharT* __p = traits_type::find(__sb->gptr(), 6011: __n, __val); 6011: if (__p) 6011: __n = __p - __sb->gptr(); 6011: __sb->__safe_gbump(__n); 6011: __c = __sb->sgetc(); 6011: } 6011: else 6011: __c = __sb->snextc(); 6011: } 6011: 6011: __first._M_c = __eof; 6011: } 6011: 6011: return __first; 6011: } 6011: 6011: template 6011: typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value, 6011: void>::__type 6011: advance(istreambuf_iterator<_CharT>& __i, _Distance __n) 6011: { 6011: if (__n == 0) 6011: return; 6011: 6011: ; 6011: 6011: 6011: ; 6011: 6011: typedef istreambuf_iterator<_CharT> __is_iterator_type; 6011: typedef typename __is_iterator_type::traits_type traits_type; 6011: typedef typename __is_iterator_type::streambuf_type streambuf_type; 6011: typedef typename traits_type::int_type int_type; 6011: const int_type __eof = traits_type::eof(); 6011: 6011: streambuf_type* __sb = __i._M_sbuf; 6011: while (__n > 0) 6011: { 6011: streamsize __size = __sb->egptr() - __sb->gptr(); 6011: if (__size > __n) 6011: { 6011: __sb->__safe_gbump(__n); 6011: break; 6011: } 6011: 6011: __sb->__safe_gbump(__size); 6011: __n -= __size; 6011: if (traits_type::eq_int_type(__sb->underflow(), __eof)) 6011: { 6011: 6011: 6011: ; 6011: break; 6011: } 6011: } 6011: 6011: __i._M_c = __eof; 6011: } 6011: 6011: 6011: 6011: 6011: } 6011: # 49 "/usr/include/c++/8/bits/locale_facets.h" 2 3 6011: 6011: namespace std __attribute__ ((__visibility__ ("default"))) 6011: { 6011: 6011: # 71 "/usr/include/c++/8/bits/locale_facets.h" 3 6011: template 6011: void 6011: __convert_to_v(const char*, _Tp&, ios_base::iostate&, 6011: const __c_locale&) throw(); 6011: 6011: 6011: template<> 6011: void 6011: __convert_to_v(const char*, float&, ios_base::iostate&, 6011: const __c_locale&) throw(); 6011: 6011: template<> 6011: void 6011: __convert_to_v(const char*, double&, ios_base::iostate&, 6011: const __c_locale&) throw(); 6011: 6011: template<> 6011: void 6011: __convert_to_v(const char*, long double&, ios_base::iostate&, 6011: const __c_locale&) throw(); 6011: 6011: 6011: 6011: template 6011: struct __pad 6011: { 6011: static void 6011: _S_pad(ios_base& __io, _CharT __fill, _CharT* __news, 6011: const _CharT* __olds, streamsize __newlen, streamsize __oldlen); 6011: }; 6011: 6011: 6011: 6011: 6011: 6011: 6011: template 6011: _CharT* 6011: __add_grouping(_CharT* __s, _CharT __sep, 6011: const char* __gbeg, size_t __gsize, 6011: const _CharT* __first, const _CharT* __last); 6011: 6011: 6011: 6011: 6011: template 6011: inline 6011: ostreambuf_iterator<_CharT> 6011: __write(ostreambuf_iterator<_CharT> __s, const _CharT* __ws, int __len) 6011: { 6011: __s._M_put(__ws, __len); 6011: return __s; 6011: } 6011: 6011: 6011: template 6011: inline 6011: _OutIter 6011: __write(_OutIter __s, const _CharT* __ws, int __len) 6011: { 6011: for (int __j = 0; __j < __len; __j++, ++__s) 6011: *__s = __ws[__j]; 6011: return __s; 6011: } 6011: # 149 "/usr/include/c++/8/bits/locale_facets.h" 3 6011: template 6011: class __ctype_abstract_base : public locale::facet, public ctype_base 6011: { 6011: public: 6011: 6011: 6011: typedef _CharT char_type; 6011: # 168 "/usr/include/c++/8/bits/locale_facets.h" 3 6011: bool 6011: is(mask __m, char_type __c) const 6011: { return this->do_is(__m, __c); } 6011: # 185 "/usr/include/c++/8/bits/locale_facets.h" 3 6011: const char_type* 6011: is(const char_type *__lo, const char_type *__hi, mask *__vec) const 6011: { return this->do_is(__lo, __hi, __vec); } 6011: # 201 "/usr/include/c++/8/bits/locale_facets.h" 3 6011: const char_type* 6011: scan_is(mask __m, const char_type* __lo, const char_type* __hi) const 6011: { return this->do_scan_is(__m, __lo, __hi); } 6011: # 217 "/usr/include/c++/8/bits/locale_facets.h" 3 6011: const char_type* 6011: scan_not(mask __m, const char_type* __lo, const char_type* __hi) const 6011: { return this->do_scan_not(__m, __lo, __hi); } 6011: # 231 "/usr/include/c++/8/bits/locale_facets.h" 3 6011: char_type 6011: toupper(char_type __c) const 6011: { return this->do_toupper(__c); } 6011: # 246 "/usr/include/c++/8/bits/locale_facets.h" 3 6011: const char_type* 6011: toupper(char_type *__lo, const char_type* __hi) const 6011: { return this->do_toupper(__lo, __hi); } 6011: # 260 "/usr/include/c++/8/bits/locale_facets.h" 3 6011: char_type 6011: tolower(char_type __c) const 6011: { return this->do_tolower(__c); } 6011: # 275 "/usr/include/c++/8/bits/locale_facets.h" 3 6011: const char_type* 6011: tolower(char_type* __lo, const char_type* __hi) const 6011: { return this->do_tolower(__lo, __hi); } 6011: # 292 "/usr/include/c++/8/bits/locale_facets.h" 3 6011: char_type 6011: widen(char __c) const 6011: { return this->do_widen(__c); } 6011: # 311 "/usr/include/c++/8/bits/locale_facets.h" 3 6011: const char* 6011: widen(const char* __lo, const char* __hi, char_type* __to) const 6011: { return this->do_widen(__lo, __hi, __to); } 6011: # 330 "/usr/include/c++/8/bits/locale_facets.h" 3 6011: char 6011: narrow(char_type __c, char __dfault) const 6011: { return this->do_narrow(__c, __dfault); } 6011: # 352 "/usr/include/c++/8/bits/locale_facets.h" 3 6011: const char_type* 6011: narrow(const char_type* __lo, const char_type* __hi, 6011: char __dfault, char* __to) const 6011: { return this->do_narrow(__lo, __hi, __dfault, __to); } 6011: 6011: protected: 6011: explicit 6011: __ctype_abstract_base(size_t __refs = 0): facet(__refs) { } 6011: 6011: virtual 6011: ~__ctype_abstract_base() { } 6011: # 377 "/usr/include/c++/8/bits/locale_facets.h" 3 6011: virtual bool 6011: do_is(mask __m, char_type __c) const = 0; 6011: # 396 "/usr/include/c++/8/bits/locale_facets.h" 3 6011: virtual const char_type* 6011: do_is(const char_type* __lo, const char_type* __hi, 6011: mask* __vec) const = 0; 6011: # 415 "/usr/include/c++/8/bits/locale_facets.h" 3 6011: virtual const char_type* 6011: do_scan_is(mask __m, const char_type* __lo, 6011: const char_type* __hi) const = 0; 6011: # 434 "/usr/include/c++/8/bits/locale_facets.h" 3 6011: virtual const char_type* 6011: do_scan_not(mask __m, const char_type* __lo, 6011: const char_type* __hi) const = 0; 6011: # 452 "/usr/include/c++/8/bits/locale_facets.h" 3 6011: virtual char_type 6011: do_toupper(char_type __c) const = 0; 6011: # 469 "/usr/include/c++/8/bits/locale_facets.h" 3 6011: virtual const char_type* 6011: do_toupper(char_type* __lo, const char_type* __hi) const = 0; 6011: # 485 "/usr/include/c++/8/bits/locale_facets.h" 3 6011: virtual char_type 6011: do_tolower(char_type __c) const = 0; 6011: # 502 "/usr/include/c++/8/bits/locale_facets.h" 3 6011: virtual const char_type* 6011: do_tolower(char_type* __lo, const char_type* __hi) const = 0; 6011: # 521 "/usr/include/c++/8/bits/locale_facets.h" 3 6011: virtual char_type 6011: do_widen(char __c) const = 0; 6011: # 542 "/usr/include/c++/8/bits/locale_facets.h" 3 6011: virtual const char* 6011: do_widen(const char* __lo, const char* __hi, char_type* __to) const = 0; 6011: # 563 "/usr/include/c++/8/bits/locale_facets.h" 3 6011: virtual char 6011: do_narrow(char_type __c, char __dfault) const = 0; 6011: # 588 "/usr/include/c++/8/bits/locale_facets.h" 3 6011: virtual const char_type* 6011: do_narrow(const char_type* __lo, const char_type* __hi, 6011: char __dfault, char* __to) const = 0; 6011: }; 6011: # 611 "/usr/include/c++/8/bits/locale_facets.h" 3 6011: template 6011: class ctype : public __ctype_abstract_base<_CharT> 6011: { 6011: public: 6011: 6011: typedef _CharT char_type; 6011: typedef typename __ctype_abstract_base<_CharT>::mask mask; 6011: 6011: 6011: static locale::id id; 6011: 6011: explicit 6011: ctype(size_t __refs = 0) : __ctype_abstract_base<_CharT>(__refs) { } 6011: 6011: protected: 6011: virtual 6011: ~ctype(); 6011: 6011: virtual bool 6011: do_is(mask __m, char_type __c) const; 6011: 6011: virtual const char_type* 6011: do_is(const char_type* __lo, const char_type* __hi, mask* __vec) const; 6011: 6011: virtual const char_type* 6011: do_scan_is(mask __m, const char_type* __lo, const char_type* __hi) const; 6011: 6011: virtual const char_type* 6011: do_scan_not(mask __m, const char_type* __lo, 6011: const char_type* __hi) const; 6011: 6011: virtual char_type 6011: do_toupper(char_type __c) const; 6011: 6011: virtual const char_type* 6011: do_toupper(char_type* __lo, const char_type* __hi) const; 6011: 6011: virtual char_type 6011: do_tolower(char_type __c) const; 6011: 6011: virtual const char_type* 6011: do_tolower(char_type* __lo, const char_type* __hi) const; 6011: 6011: virtual char_type 6011: do_widen(char __c) const; 6011: 6011: virtual const char* 6011: do_widen(const char* __lo, const char* __hi, char_type* __dest) const; 6011: 6011: virtual char 6011: do_narrow(char_type, char __dfault) const; 6011: 6011: virtual const char_type* 6011: do_narrow(const char_type* __lo, const char_type* __hi, 6011: char __dfault, char* __to) const; 6011: }; 6011: 6011: template 6011: locale::id ctype<_CharT>::id; 6011: # 680 "/usr/include/c++/8/bits/locale_facets.h" 3 6011: template<> 6011: class ctype : public locale::facet, public ctype_base 6011: { 6011: public: 6011: 6011: 6011: typedef char char_type; 6011: 6011: protected: 6011: 6011: __c_locale _M_c_locale_ctype; 6011: bool _M_del; 6011: __to_type _M_toupper; 6011: __to_type _M_tolower; 6011: const mask* _M_table; 6011: mutable char _M_widen_ok; 6011: mutable char _M_widen[1 + static_cast(-1)]; 6011: mutable char _M_narrow[1 + static_cast(-1)]; 6011: mutable char _M_narrow_ok; 6011: 6011: 6011: public: 6011: 6011: static locale::id id; 6011: 6011: static const size_t table_size = 1 + static_cast(-1); 6011: # 717 "/usr/include/c++/8/bits/locale_facets.h" 3 6011: explicit 6011: ctype(const mask* __table = 0, bool __del = false, size_t __refs = 0); 6011: # 730 "/usr/include/c++/8/bits/locale_facets.h" 3 6011: explicit 6011: ctype(__c_locale __cloc, const mask* __table = 0, bool __del = false, 6011: size_t __refs = 0); 6011: # 743 "/usr/include/c++/8/bits/locale_facets.h" 3 6011: inline bool 6011: is(mask __m, char __c) const; 6011: # 758 "/usr/include/c++/8/bits/locale_facets.h" 3 6011: inline const char* 6011: is(const char* __lo, const char* __hi, mask* __vec) const; 6011: # 772 "/usr/include/c++/8/bits/locale_facets.h" 3 6011: inline const char* 6011: scan_is(mask __m, const char* __lo, const char* __hi) const; 6011: # 786 "/usr/include/c++/8/bits/locale_facets.h" 3 6011: inline const char* 6011: scan_not(mask __m, const char* __lo, const char* __hi) const; 6011: # 801 "/usr/include/c++/8/bits/locale_facets.h" 3 6011: char_type 6011: toupper(char_type __c) const 6011: { return this->do_toupper(__c); } 6011: # 818 "/usr/include/c++/8/bits/locale_facets.h" 3 6011: const char_type* 6011: toupper(char_type *__lo, const char_type* __hi) const 6011: { return this->do_toupper(__lo, __hi); } 6011: # 834 "/usr/include/c++/8/bits/locale_facets.h" 3 6011: char_type 6011: tolower(char_type __c) const 6011: { return this->do_tolower(__c); } 6011: # 851 "/usr/include/c++/8/bits/locale_facets.h" 3 6011: const char_type* 6011: tolower(char_type* __lo, const char_type* __hi) const 6011: { return this->do_tolower(__lo, __hi); } 6011: # 871 "/usr/include/c++/8/bits/locale_facets.h" 3 6011: char_type 6011: widen(char __c) const 6011: { 6011: if (_M_widen_ok) 6011: return _M_widen[static_cast(__c)]; 6011: this->_M_widen_init(); 6011: return this->do_widen(__c); 6011: } 6011: # 898 "/usr/include/c++/8/bits/locale_facets.h" 3 6011: const char* 6011: widen(const char* __lo, const char* __hi, char_type* __to) const 6011: { 6011: if (_M_widen_ok == 1) 6011: { 6011: __builtin_memcpy(__to, __lo, __hi - __lo); 6011: return __hi; 6011: } 6011: if (!_M_widen_ok) 6011: _M_widen_init(); 6011: return this->do_widen(__lo, __hi, __to); 6011: } 6011: # 929 "/usr/include/c++/8/bits/locale_facets.h" 3 6011: char 6011: narrow(char_type __c, char __dfault) const 6011: { 6011: if (_M_narrow[static_cast(__c)]) 6011: return _M_narrow[static_cast(__c)]; 6011: const char __t = do_narrow(__c, __dfault); 6011: if (__t != __dfault) 6011: _M_narrow[static_cast(__c)] = __t; 6011: return __t; 6011: } 6011: # 962 "/usr/include/c++/8/bits/locale_facets.h" 3 6011: const char_type* 6011: narrow(const char_type* __lo, const char_type* __hi, 6011: char __dfault, char* __to) const 6011: { 6011: if (__builtin_expect(_M_narrow_ok == 1, true)) 6011: { 6011: __builtin_memcpy(__to, __lo, __hi - __lo); 6011: return __hi; 6011: } 6011: if (!_M_narrow_ok) 6011: _M_narrow_init(); 6011: return this->do_narrow(__lo, __hi, __dfault, __to); 6011: } 6011: 6011: 6011: 6011: 6011: 6011: const mask* 6011: table() const throw() 6011: { return _M_table; } 6011: 6011: 6011: static const mask* 6011: classic_table() throw(); 6011: protected: 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: virtual 6011: ~ctype(); 6011: # 1011 "/usr/include/c++/8/bits/locale_facets.h" 3 6011: virtual char_type 6011: do_toupper(char_type __c) const; 6011: # 1028 "/usr/include/c++/8/bits/locale_facets.h" 3 6011: virtual const char_type* 6011: do_toupper(char_type* __lo, const char_type* __hi) const; 6011: # 1044 "/usr/include/c++/8/bits/locale_facets.h" 3 6011: virtual char_type 6011: do_tolower(char_type __c) const; 6011: # 1061 "/usr/include/c++/8/bits/locale_facets.h" 3 6011: virtual const char_type* 6011: do_tolower(char_type* __lo, const char_type* __hi) const; 6011: # 1081 "/usr/include/c++/8/bits/locale_facets.h" 3 6011: virtual char_type 6011: do_widen(char __c) const 6011: { return __c; } 6011: # 1104 "/usr/include/c++/8/bits/locale_facets.h" 3 6011: virtual const char* 6011: do_widen(const char* __lo, const char* __hi, char_type* __to) const 6011: { 6011: __builtin_memcpy(__to, __lo, __hi - __lo); 6011: return __hi; 6011: } 6011: # 1130 "/usr/include/c++/8/bits/locale_facets.h" 3 6011: virtual char 6011: do_narrow(char_type __c, char __dfault __attribute__((__unused__))) const 6011: { return __c; } 6011: # 1156 "/usr/include/c++/8/bits/locale_facets.h" 3 6011: virtual const char_type* 6011: do_narrow(const char_type* __lo, const char_type* __hi, 6011: char __dfault __attribute__((__unused__)), char* __to) const 6011: { 6011: __builtin_memcpy(__to, __lo, __hi - __lo); 6011: return __hi; 6011: } 6011: 6011: private: 6011: void _M_narrow_init() const; 6011: void _M_widen_init() const; 6011: }; 6011: # 1181 "/usr/include/c++/8/bits/locale_facets.h" 3 6011: template<> 6011: class ctype : public __ctype_abstract_base 6011: { 6011: public: 6011: 6011: 6011: typedef wchar_t char_type; 6011: typedef wctype_t __wmask_type; 6011: 6011: protected: 6011: __c_locale _M_c_locale_ctype; 6011: 6011: 6011: bool _M_narrow_ok; 6011: char _M_narrow[128]; 6011: wint_t _M_widen[1 + static_cast(-1)]; 6011: 6011: 6011: mask _M_bit[16]; 6011: __wmask_type _M_wmask[16]; 6011: 6011: public: 6011: 6011: 6011: static locale::id id; 6011: # 1214 "/usr/include/c++/8/bits/locale_facets.h" 3 6011: explicit 6011: ctype(size_t __refs = 0); 6011: # 1225 "/usr/include/c++/8/bits/locale_facets.h" 3 6011: explicit 6011: ctype(__c_locale __cloc, size_t __refs = 0); 6011: 6011: protected: 6011: __wmask_type 6011: _M_convert_to_wmask(const mask __m) const throw(); 6011: 6011: 6011: virtual 6011: ~ctype(); 6011: # 1249 "/usr/include/c++/8/bits/locale_facets.h" 3 6011: virtual bool 6011: do_is(mask __m, char_type __c) const; 6011: # 1268 "/usr/include/c++/8/bits/locale_facets.h" 3 6011: virtual const char_type* 6011: do_is(const char_type* __lo, const char_type* __hi, mask* __vec) const; 6011: # 1286 "/usr/include/c++/8/bits/locale_facets.h" 3 6011: virtual const char_type* 6011: do_scan_is(mask __m, const char_type* __lo, const char_type* __hi) const; 6011: # 1304 "/usr/include/c++/8/bits/locale_facets.h" 3 6011: virtual const char_type* 6011: do_scan_not(mask __m, const char_type* __lo, 6011: const char_type* __hi) const; 6011: # 1321 "/usr/include/c++/8/bits/locale_facets.h" 3 6011: virtual char_type 6011: do_toupper(char_type __c) const; 6011: # 1338 "/usr/include/c++/8/bits/locale_facets.h" 3 6011: virtual const char_type* 6011: do_toupper(char_type* __lo, const char_type* __hi) const; 6011: # 1354 "/usr/include/c++/8/bits/locale_facets.h" 3 6011: virtual char_type 6011: do_tolower(char_type __c) const; 6011: # 1371 "/usr/include/c++/8/bits/locale_facets.h" 3 6011: virtual const char_type* 6011: do_tolower(char_type* __lo, const char_type* __hi) const; 6011: # 1391 "/usr/include/c++/8/bits/locale_facets.h" 3 6011: virtual char_type 6011: do_widen(char __c) const; 6011: # 1413 "/usr/include/c++/8/bits/locale_facets.h" 3 6011: virtual const char* 6011: do_widen(const char* __lo, const char* __hi, char_type* __to) const; 6011: # 1436 "/usr/include/c++/8/bits/locale_facets.h" 3 6011: virtual char 6011: do_narrow(char_type __c, char __dfault) const; 6011: # 1462 "/usr/include/c++/8/bits/locale_facets.h" 3 6011: virtual const char_type* 6011: do_narrow(const char_type* __lo, const char_type* __hi, 6011: char __dfault, char* __to) const; 6011: 6011: 6011: void 6011: _M_initialize_ctype() throw(); 6011: }; 6011: 6011: 6011: 6011: template 6011: class ctype_byname : public ctype<_CharT> 6011: { 6011: public: 6011: typedef typename ctype<_CharT>::mask mask; 6011: 6011: explicit 6011: ctype_byname(const char* __s, size_t __refs = 0); 6011: 6011: 6011: explicit 6011: ctype_byname(const string& __s, size_t __refs = 0) 6011: : ctype_byname(__s.c_str(), __refs) { } 6011: 6011: 6011: protected: 6011: virtual 6011: ~ctype_byname() { } 6011: }; 6011: 6011: 6011: template<> 6011: class ctype_byname : public ctype 6011: { 6011: public: 6011: explicit 6011: ctype_byname(const char* __s, size_t __refs = 0); 6011: 6011: 6011: explicit 6011: ctype_byname(const string& __s, size_t __refs = 0); 6011: 6011: 6011: protected: 6011: virtual 6011: ~ctype_byname(); 6011: }; 6011: 6011: 6011: template<> 6011: class ctype_byname : public ctype 6011: { 6011: public: 6011: explicit 6011: ctype_byname(const char* __s, size_t __refs = 0); 6011: 6011: 6011: explicit 6011: ctype_byname(const string& __s, size_t __refs = 0); 6011: 6011: 6011: protected: 6011: virtual 6011: ~ctype_byname(); 6011: }; 6011: 6011: 6011: 6011: } 6011: 6011: 6011: # 1 "/usr/include/arm-linux-gnueabihf/c++/8/bits/ctype_inline.h" 1 3 6011: # 37 "/usr/include/arm-linux-gnueabihf/c++/8/bits/ctype_inline.h" 3 6011: namespace std __attribute__ ((__visibility__ ("default"))) 6011: { 6011: 6011: 6011: bool 6011: ctype:: 6011: is(mask __m, char __c) const 6011: { return _M_table[static_cast(__c)] & __m; } 6011: 6011: const char* 6011: ctype:: 6011: is(const char* __low, const char* __high, mask* __vec) const 6011: { 6011: while (__low < __high) 6011: *__vec++ = _M_table[static_cast(*__low++)]; 6011: return __high; 6011: } 6011: 6011: const char* 6011: ctype:: 6011: scan_is(mask __m, const char* __low, const char* __high) const 6011: { 6011: while (__low < __high 6011: && !(_M_table[static_cast(*__low)] & __m)) 6011: ++__low; 6011: return __low; 6011: } 6011: 6011: const char* 6011: ctype:: 6011: scan_not(mask __m, const char* __low, const char* __high) const 6011: { 6011: while (__low < __high 6011: && (_M_table[static_cast(*__low)] & __m) != 0) 6011: ++__low; 6011: return __low; 6011: } 6011: 6011: 6011: } 6011: # 1535 "/usr/include/c++/8/bits/locale_facets.h" 2 3 6011: 6011: namespace std __attribute__ ((__visibility__ ("default"))) 6011: { 6011: 6011: 6011: 6011: class __num_base 6011: { 6011: public: 6011: 6011: 6011: enum 6011: { 6011: _S_ominus, 6011: _S_oplus, 6011: _S_ox, 6011: _S_oX, 6011: _S_odigits, 6011: _S_odigits_end = _S_odigits + 16, 6011: _S_oudigits = _S_odigits_end, 6011: _S_oudigits_end = _S_oudigits + 16, 6011: _S_oe = _S_odigits + 14, 6011: _S_oE = _S_oudigits + 14, 6011: _S_oend = _S_oudigits_end 6011: }; 6011: 6011: 6011: 6011: 6011: 6011: 6011: static const char* _S_atoms_out; 6011: 6011: 6011: 6011: static const char* _S_atoms_in; 6011: 6011: enum 6011: { 6011: _S_iminus, 6011: _S_iplus, 6011: _S_ix, 6011: _S_iX, 6011: _S_izero, 6011: _S_ie = _S_izero + 14, 6011: _S_iE = _S_izero + 20, 6011: _S_iend = 26 6011: }; 6011: 6011: 6011: 6011: static void 6011: _S_format_float(const ios_base& __io, char* __fptr, char __mod) throw(); 6011: }; 6011: 6011: template 6011: struct __numpunct_cache : public locale::facet 6011: { 6011: const char* _M_grouping; 6011: size_t _M_grouping_size; 6011: bool _M_use_grouping; 6011: const _CharT* _M_truename; 6011: size_t _M_truename_size; 6011: const _CharT* _M_falsename; 6011: size_t _M_falsename_size; 6011: _CharT _M_decimal_point; 6011: _CharT _M_thousands_sep; 6011: 6011: 6011: 6011: 6011: 6011: _CharT _M_atoms_out[__num_base::_S_oend]; 6011: 6011: 6011: 6011: 6011: 6011: _CharT _M_atoms_in[__num_base::_S_iend]; 6011: 6011: bool _M_allocated; 6011: 6011: __numpunct_cache(size_t __refs = 0) 6011: : facet(__refs), _M_grouping(0), _M_grouping_size(0), 6011: _M_use_grouping(false), 6011: _M_truename(0), _M_truename_size(0), _M_falsename(0), 6011: _M_falsename_size(0), _M_decimal_point(_CharT()), 6011: _M_thousands_sep(_CharT()), _M_allocated(false) 6011: { } 6011: 6011: ~__numpunct_cache(); 6011: 6011: void 6011: _M_cache(const locale& __loc); 6011: 6011: private: 6011: __numpunct_cache& 6011: operator=(const __numpunct_cache&); 6011: 6011: explicit 6011: __numpunct_cache(const __numpunct_cache&); 6011: }; 6011: 6011: template 6011: __numpunct_cache<_CharT>::~__numpunct_cache() 6011: { 6011: if (_M_allocated) 6011: { 6011: delete [] _M_grouping; 6011: delete [] _M_truename; 6011: delete [] _M_falsename; 6011: } 6011: } 6011: 6011: namespace __cxx11 { 6011: # 1665 "/usr/include/c++/8/bits/locale_facets.h" 3 6011: template 6011: class numpunct : public locale::facet 6011: { 6011: public: 6011: 6011: 6011: 6011: typedef _CharT char_type; 6011: typedef basic_string<_CharT> string_type; 6011: 6011: typedef __numpunct_cache<_CharT> __cache_type; 6011: 6011: protected: 6011: __cache_type* _M_data; 6011: 6011: public: 6011: 6011: static locale::id id; 6011: 6011: 6011: 6011: 6011: 6011: 6011: explicit 6011: numpunct(size_t __refs = 0) 6011: : facet(__refs), _M_data(0) 6011: { _M_initialize_numpunct(); } 6011: # 1703 "/usr/include/c++/8/bits/locale_facets.h" 3 6011: explicit 6011: numpunct(__cache_type* __cache, size_t __refs = 0) 6011: : facet(__refs), _M_data(__cache) 6011: { _M_initialize_numpunct(); } 6011: # 1717 "/usr/include/c++/8/bits/locale_facets.h" 3 6011: explicit 6011: numpunct(__c_locale __cloc, size_t __refs = 0) 6011: : facet(__refs), _M_data(0) 6011: { _M_initialize_numpunct(__cloc); } 6011: # 1731 "/usr/include/c++/8/bits/locale_facets.h" 3 6011: char_type 6011: decimal_point() const 6011: { return this->do_decimal_point(); } 6011: # 1744 "/usr/include/c++/8/bits/locale_facets.h" 3 6011: char_type 6011: thousands_sep() const 6011: { return this->do_thousands_sep(); } 6011: # 1775 "/usr/include/c++/8/bits/locale_facets.h" 3 6011: string 6011: grouping() const 6011: { return this->do_grouping(); } 6011: # 1788 "/usr/include/c++/8/bits/locale_facets.h" 3 6011: string_type 6011: truename() const 6011: { return this->do_truename(); } 6011: # 1801 "/usr/include/c++/8/bits/locale_facets.h" 3 6011: string_type 6011: falsename() const 6011: { return this->do_falsename(); } 6011: 6011: protected: 6011: 6011: virtual 6011: ~numpunct(); 6011: # 1818 "/usr/include/c++/8/bits/locale_facets.h" 3 6011: virtual char_type 6011: do_decimal_point() const 6011: { return _M_data->_M_decimal_point; } 6011: # 1830 "/usr/include/c++/8/bits/locale_facets.h" 3 6011: virtual char_type 6011: do_thousands_sep() const 6011: { return _M_data->_M_thousands_sep; } 6011: # 1843 "/usr/include/c++/8/bits/locale_facets.h" 3 6011: virtual string 6011: do_grouping() const 6011: { return _M_data->_M_grouping; } 6011: # 1856 "/usr/include/c++/8/bits/locale_facets.h" 3 6011: virtual string_type 6011: do_truename() const 6011: { return _M_data->_M_truename; } 6011: # 1869 "/usr/include/c++/8/bits/locale_facets.h" 3 6011: virtual string_type 6011: do_falsename() const 6011: { return _M_data->_M_falsename; } 6011: 6011: 6011: void 6011: _M_initialize_numpunct(__c_locale __cloc = 0); 6011: }; 6011: 6011: template 6011: locale::id numpunct<_CharT>::id; 6011: 6011: template<> 6011: numpunct::~numpunct(); 6011: 6011: template<> 6011: void 6011: numpunct::_M_initialize_numpunct(__c_locale __cloc); 6011: 6011: 6011: template<> 6011: numpunct::~numpunct(); 6011: 6011: template<> 6011: void 6011: numpunct::_M_initialize_numpunct(__c_locale __cloc); 6011: 6011: 6011: 6011: template 6011: class numpunct_byname : public numpunct<_CharT> 6011: { 6011: public: 6011: typedef _CharT char_type; 6011: typedef basic_string<_CharT> string_type; 6011: 6011: explicit 6011: numpunct_byname(const char* __s, size_t __refs = 0) 6011: : numpunct<_CharT>(__refs) 6011: { 6011: if (__builtin_strcmp(__s, "C") != 0 6011: && __builtin_strcmp(__s, "POSIX") != 0) 6011: { 6011: __c_locale __tmp; 6011: this->_S_create_c_locale(__tmp, __s); 6011: this->_M_initialize_numpunct(__tmp); 6011: this->_S_destroy_c_locale(__tmp); 6011: } 6011: } 6011: 6011: 6011: explicit 6011: numpunct_byname(const string& __s, size_t __refs = 0) 6011: : numpunct_byname(__s.c_str(), __refs) { } 6011: 6011: 6011: protected: 6011: virtual 6011: ~numpunct_byname() { } 6011: }; 6011: 6011: } 6011: 6011: 6011: # 1947 "/usr/include/c++/8/bits/locale_facets.h" 3 6011: template 6011: class num_get : public locale::facet 6011: { 6011: public: 6011: 6011: 6011: 6011: typedef _CharT char_type; 6011: typedef _InIter iter_type; 6011: 6011: 6011: 6011: static locale::id id; 6011: # 1968 "/usr/include/c++/8/bits/locale_facets.h" 3 6011: explicit 6011: num_get(size_t __refs = 0) : facet(__refs) { } 6011: # 1994 "/usr/include/c++/8/bits/locale_facets.h" 3 6011: iter_type 6011: get(iter_type __in, iter_type __end, ios_base& __io, 6011: ios_base::iostate& __err, bool& __v) const 6011: { return this->do_get(__in, __end, __io, __err, __v); } 6011: # 2031 "/usr/include/c++/8/bits/locale_facets.h" 3 6011: iter_type 6011: get(iter_type __in, iter_type __end, ios_base& __io, 6011: ios_base::iostate& __err, long& __v) const 6011: { return this->do_get(__in, __end, __io, __err, __v); } 6011: 6011: iter_type 6011: get(iter_type __in, iter_type __end, ios_base& __io, 6011: ios_base::iostate& __err, unsigned short& __v) const 6011: { return this->do_get(__in, __end, __io, __err, __v); } 6011: 6011: iter_type 6011: get(iter_type __in, iter_type __end, ios_base& __io, 6011: ios_base::iostate& __err, unsigned int& __v) const 6011: { return this->do_get(__in, __end, __io, __err, __v); } 6011: 6011: iter_type 6011: get(iter_type __in, iter_type __end, ios_base& __io, 6011: ios_base::iostate& __err, unsigned long& __v) const 6011: { return this->do_get(__in, __end, __io, __err, __v); } 6011: 6011: 6011: iter_type 6011: get(iter_type __in, iter_type __end, ios_base& __io, 6011: ios_base::iostate& __err, long long& __v) const 6011: { return this->do_get(__in, __end, __io, __err, __v); } 6011: 6011: iter_type 6011: get(iter_type __in, iter_type __end, ios_base& __io, 6011: ios_base::iostate& __err, unsigned long long& __v) const 6011: { return this->do_get(__in, __end, __io, __err, __v); } 6011: # 2091 "/usr/include/c++/8/bits/locale_facets.h" 3 6011: iter_type 6011: get(iter_type __in, iter_type __end, ios_base& __io, 6011: ios_base::iostate& __err, float& __v) const 6011: { return this->do_get(__in, __end, __io, __err, __v); } 6011: 6011: iter_type 6011: get(iter_type __in, iter_type __end, ios_base& __io, 6011: ios_base::iostate& __err, double& __v) const 6011: { return this->do_get(__in, __end, __io, __err, __v); } 6011: 6011: iter_type 6011: get(iter_type __in, iter_type __end, ios_base& __io, 6011: ios_base::iostate& __err, long double& __v) const 6011: { return this->do_get(__in, __end, __io, __err, __v); } 6011: # 2134 "/usr/include/c++/8/bits/locale_facets.h" 3 6011: iter_type 6011: get(iter_type __in, iter_type __end, ios_base& __io, 6011: ios_base::iostate& __err, void*& __v) const 6011: { return this->do_get(__in, __end, __io, __err, __v); } 6011: 6011: protected: 6011: 6011: virtual ~num_get() { } 6011: 6011: __attribute ((__abi_tag__ ("cxx11"))) 6011: iter_type 6011: _M_extract_float(iter_type, iter_type, ios_base&, ios_base::iostate&, 6011: string&) const; 6011: 6011: template 6011: __attribute ((__abi_tag__ ("cxx11"))) 6011: iter_type 6011: _M_extract_int(iter_type, iter_type, ios_base&, ios_base::iostate&, 6011: _ValueT&) const; 6011: 6011: template 6011: typename __gnu_cxx::__enable_if<__is_char<_CharT2>::__value, int>::__type 6011: _M_find(const _CharT2*, size_t __len, _CharT2 __c) const 6011: { 6011: int __ret = -1; 6011: if (__len <= 10) 6011: { 6011: if (__c >= _CharT2('0') && __c < _CharT2(_CharT2('0') + __len)) 6011: __ret = __c - _CharT2('0'); 6011: } 6011: else 6011: { 6011: if (__c >= _CharT2('0') && __c <= _CharT2('9')) 6011: __ret = __c - _CharT2('0'); 6011: else if (__c >= _CharT2('a') && __c <= _CharT2('f')) 6011: __ret = 10 + (__c - _CharT2('a')); 6011: else if (__c >= _CharT2('A') && __c <= _CharT2('F')) 6011: __ret = 10 + (__c - _CharT2('A')); 6011: } 6011: return __ret; 6011: } 6011: 6011: template 6011: typename __gnu_cxx::__enable_if::__value, 6011: int>::__type 6011: _M_find(const _CharT2* __zero, size_t __len, _CharT2 __c) const 6011: { 6011: int __ret = -1; 6011: const char_type* __q = char_traits<_CharT2>::find(__zero, __len, __c); 6011: if (__q) 6011: { 6011: __ret = __q - __zero; 6011: if (__ret > 15) 6011: __ret -= 6; 6011: } 6011: return __ret; 6011: } 6011: # 2207 "/usr/include/c++/8/bits/locale_facets.h" 3 6011: virtual iter_type 6011: do_get(iter_type, iter_type, ios_base&, ios_base::iostate&, bool&) const; 6011: 6011: virtual iter_type 6011: do_get(iter_type __beg, iter_type __end, ios_base& __io, 6011: ios_base::iostate& __err, long& __v) const 6011: { return _M_extract_int(__beg, __end, __io, __err, __v); } 6011: 6011: virtual iter_type 6011: do_get(iter_type __beg, iter_type __end, ios_base& __io, 6011: ios_base::iostate& __err, unsigned short& __v) const 6011: { return _M_extract_int(__beg, __end, __io, __err, __v); } 6011: 6011: virtual iter_type 6011: do_get(iter_type __beg, iter_type __end, ios_base& __io, 6011: ios_base::iostate& __err, unsigned int& __v) const 6011: { return _M_extract_int(__beg, __end, __io, __err, __v); } 6011: 6011: virtual iter_type 6011: do_get(iter_type __beg, iter_type __end, ios_base& __io, 6011: ios_base::iostate& __err, unsigned long& __v) const 6011: { return _M_extract_int(__beg, __end, __io, __err, __v); } 6011: 6011: 6011: virtual iter_type 6011: do_get(iter_type __beg, iter_type __end, ios_base& __io, 6011: ios_base::iostate& __err, long long& __v) const 6011: { return _M_extract_int(__beg, __end, __io, __err, __v); } 6011: 6011: virtual iter_type 6011: do_get(iter_type __beg, iter_type __end, ios_base& __io, 6011: ios_base::iostate& __err, unsigned long long& __v) const 6011: { return _M_extract_int(__beg, __end, __io, __err, __v); } 6011: 6011: 6011: virtual iter_type 6011: do_get(iter_type, iter_type, ios_base&, ios_base::iostate&, float&) const; 6011: 6011: virtual iter_type 6011: do_get(iter_type, iter_type, ios_base&, ios_base::iostate&, 6011: double&) const; 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: virtual iter_type 6011: do_get(iter_type, iter_type, ios_base&, ios_base::iostate&, 6011: long double&) const; 6011: 6011: 6011: virtual iter_type 6011: do_get(iter_type, iter_type, ios_base&, ios_base::iostate&, void*&) const; 6011: # 2270 "/usr/include/c++/8/bits/locale_facets.h" 3 6011: }; 6011: 6011: template 6011: locale::id num_get<_CharT, _InIter>::id; 6011: # 2288 "/usr/include/c++/8/bits/locale_facets.h" 3 6011: template 6011: class num_put : public locale::facet 6011: { 6011: public: 6011: 6011: 6011: 6011: typedef _CharT char_type; 6011: typedef _OutIter iter_type; 6011: 6011: 6011: 6011: static locale::id id; 6011: # 2309 "/usr/include/c++/8/bits/locale_facets.h" 3 6011: explicit 6011: num_put(size_t __refs = 0) : facet(__refs) { } 6011: # 2327 "/usr/include/c++/8/bits/locale_facets.h" 3 6011: iter_type 6011: put(iter_type __s, ios_base& __io, char_type __fill, bool __v) const 6011: { return this->do_put(__s, __io, __fill, __v); } 6011: # 2369 "/usr/include/c++/8/bits/locale_facets.h" 3 6011: iter_type 6011: put(iter_type __s, ios_base& __io, char_type __fill, long __v) const 6011: { return this->do_put(__s, __io, __fill, __v); } 6011: 6011: iter_type 6011: put(iter_type __s, ios_base& __io, char_type __fill, 6011: unsigned long __v) const 6011: { return this->do_put(__s, __io, __fill, __v); } 6011: 6011: 6011: iter_type 6011: put(iter_type __s, ios_base& __io, char_type __fill, long long __v) const 6011: { return this->do_put(__s, __io, __fill, __v); } 6011: 6011: iter_type 6011: put(iter_type __s, ios_base& __io, char_type __fill, 6011: unsigned long long __v) const 6011: { return this->do_put(__s, __io, __fill, __v); } 6011: # 2432 "/usr/include/c++/8/bits/locale_facets.h" 3 6011: iter_type 6011: put(iter_type __s, ios_base& __io, char_type __fill, double __v) const 6011: { return this->do_put(__s, __io, __fill, __v); } 6011: 6011: iter_type 6011: put(iter_type __s, ios_base& __io, char_type __fill, 6011: long double __v) const 6011: { return this->do_put(__s, __io, __fill, __v); } 6011: # 2457 "/usr/include/c++/8/bits/locale_facets.h" 3 6011: iter_type 6011: put(iter_type __s, ios_base& __io, char_type __fill, 6011: const void* __v) const 6011: { return this->do_put(__s, __io, __fill, __v); } 6011: 6011: protected: 6011: template 6011: iter_type 6011: _M_insert_float(iter_type, ios_base& __io, char_type __fill, 6011: char __mod, _ValueT __v) const; 6011: 6011: void 6011: _M_group_float(const char* __grouping, size_t __grouping_size, 6011: char_type __sep, const char_type* __p, char_type* __new, 6011: char_type* __cs, int& __len) const; 6011: 6011: template 6011: iter_type 6011: _M_insert_int(iter_type, ios_base& __io, char_type __fill, 6011: _ValueT __v) const; 6011: 6011: void 6011: _M_group_int(const char* __grouping, size_t __grouping_size, 6011: char_type __sep, ios_base& __io, char_type* __new, 6011: char_type* __cs, int& __len) const; 6011: 6011: void 6011: _M_pad(char_type __fill, streamsize __w, ios_base& __io, 6011: char_type* __new, const char_type* __cs, int& __len) const; 6011: 6011: 6011: virtual 6011: ~num_put() { } 6011: # 2505 "/usr/include/c++/8/bits/locale_facets.h" 3 6011: virtual iter_type 6011: do_put(iter_type __s, ios_base& __io, char_type __fill, bool __v) const; 6011: 6011: virtual iter_type 6011: do_put(iter_type __s, ios_base& __io, char_type __fill, long __v) const 6011: { return _M_insert_int(__s, __io, __fill, __v); } 6011: 6011: virtual iter_type 6011: do_put(iter_type __s, ios_base& __io, char_type __fill, 6011: unsigned long __v) const 6011: { return _M_insert_int(__s, __io, __fill, __v); } 6011: 6011: 6011: virtual iter_type 6011: do_put(iter_type __s, ios_base& __io, char_type __fill, 6011: long long __v) const 6011: { return _M_insert_int(__s, __io, __fill, __v); } 6011: 6011: virtual iter_type 6011: do_put(iter_type __s, ios_base& __io, char_type __fill, 6011: unsigned long long __v) const 6011: { return _M_insert_int(__s, __io, __fill, __v); } 6011: 6011: 6011: virtual iter_type 6011: do_put(iter_type, ios_base&, char_type, double) const; 6011: 6011: 6011: 6011: 6011: 6011: 6011: virtual iter_type 6011: do_put(iter_type, ios_base&, char_type, long double) const; 6011: 6011: 6011: virtual iter_type 6011: do_put(iter_type, ios_base&, char_type, const void*) const; 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: }; 6011: 6011: template 6011: locale::id num_put<_CharT, _OutIter>::id; 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: template 6011: inline bool 6011: isspace(_CharT __c, const locale& __loc) 6011: { return use_facet >(__loc).is(ctype_base::space, __c); } 6011: 6011: 6011: template 6011: inline bool 6011: isprint(_CharT __c, const locale& __loc) 6011: { return use_facet >(__loc).is(ctype_base::print, __c); } 6011: 6011: 6011: template 6011: inline bool 6011: iscntrl(_CharT __c, const locale& __loc) 6011: { return use_facet >(__loc).is(ctype_base::cntrl, __c); } 6011: 6011: 6011: template 6011: inline bool 6011: isupper(_CharT __c, const locale& __loc) 6011: { return use_facet >(__loc).is(ctype_base::upper, __c); } 6011: 6011: 6011: template 6011: inline bool 6011: islower(_CharT __c, const locale& __loc) 6011: { return use_facet >(__loc).is(ctype_base::lower, __c); } 6011: 6011: 6011: template 6011: inline bool 6011: isalpha(_CharT __c, const locale& __loc) 6011: { return use_facet >(__loc).is(ctype_base::alpha, __c); } 6011: 6011: 6011: template 6011: inline bool 6011: isdigit(_CharT __c, const locale& __loc) 6011: { return use_facet >(__loc).is(ctype_base::digit, __c); } 6011: 6011: 6011: template 6011: inline bool 6011: ispunct(_CharT __c, const locale& __loc) 6011: { return use_facet >(__loc).is(ctype_base::punct, __c); } 6011: 6011: 6011: template 6011: inline bool 6011: isxdigit(_CharT __c, const locale& __loc) 6011: { return use_facet >(__loc).is(ctype_base::xdigit, __c); } 6011: 6011: 6011: template 6011: inline bool 6011: isalnum(_CharT __c, const locale& __loc) 6011: { return use_facet >(__loc).is(ctype_base::alnum, __c); } 6011: 6011: 6011: template 6011: inline bool 6011: isgraph(_CharT __c, const locale& __loc) 6011: { return use_facet >(__loc).is(ctype_base::graph, __c); } 6011: 6011: 6011: 6011: template 6011: inline bool 6011: isblank(_CharT __c, const locale& __loc) 6011: { return use_facet >(__loc).is(ctype_base::blank, __c); } 6011: 6011: 6011: 6011: template 6011: inline _CharT 6011: toupper(_CharT __c, const locale& __loc) 6011: { return use_facet >(__loc).toupper(__c); } 6011: 6011: 6011: template 6011: inline _CharT 6011: tolower(_CharT __c, const locale& __loc) 6011: { return use_facet >(__loc).tolower(__c); } 6011: 6011: 6011: } 6011: 6011: # 1 "/usr/include/c++/8/bits/locale_facets.tcc" 1 3 6011: # 33 "/usr/include/c++/8/bits/locale_facets.tcc" 3 6011: 6011: # 34 "/usr/include/c++/8/bits/locale_facets.tcc" 3 6011: 6011: namespace std __attribute__ ((__visibility__ ("default"))) 6011: { 6011: 6011: 6011: 6011: 6011: template 6011: struct __use_cache 6011: { 6011: const _Facet* 6011: operator() (const locale& __loc) const; 6011: }; 6011: 6011: 6011: template 6011: struct __use_cache<__numpunct_cache<_CharT> > 6011: { 6011: const __numpunct_cache<_CharT>* 6011: operator() (const locale& __loc) const 6011: { 6011: const size_t __i = numpunct<_CharT>::id._M_id(); 6011: const locale::facet** __caches = __loc._M_impl->_M_caches; 6011: if (!__caches[__i]) 6011: { 6011: __numpunct_cache<_CharT>* __tmp = 0; 6011: try 6011: { 6011: __tmp = new __numpunct_cache<_CharT>; 6011: __tmp->_M_cache(__loc); 6011: } 6011: catch(...) 6011: { 6011: delete __tmp; 6011: throw; 6011: } 6011: __loc._M_impl->_M_install_cache(__tmp, __i); 6011: } 6011: return static_cast*>(__caches[__i]); 6011: } 6011: }; 6011: 6011: template 6011: void 6011: __numpunct_cache<_CharT>::_M_cache(const locale& __loc) 6011: { 6011: const numpunct<_CharT>& __np = use_facet >(__loc); 6011: 6011: char* __grouping = 0; 6011: _CharT* __truename = 0; 6011: _CharT* __falsename = 0; 6011: try 6011: { 6011: const string& __g = __np.grouping(); 6011: _M_grouping_size = __g.size(); 6011: __grouping = new char[_M_grouping_size]; 6011: __g.copy(__grouping, _M_grouping_size); 6011: _M_use_grouping = (_M_grouping_size 6011: && static_cast(__grouping[0]) > 0 6011: && (__grouping[0] 6011: != __gnu_cxx::__numeric_traits::__max)); 6011: 6011: const basic_string<_CharT>& __tn = __np.truename(); 6011: _M_truename_size = __tn.size(); 6011: __truename = new _CharT[_M_truename_size]; 6011: __tn.copy(__truename, _M_truename_size); 6011: 6011: const basic_string<_CharT>& __fn = __np.falsename(); 6011: _M_falsename_size = __fn.size(); 6011: __falsename = new _CharT[_M_falsename_size]; 6011: __fn.copy(__falsename, _M_falsename_size); 6011: 6011: _M_decimal_point = __np.decimal_point(); 6011: _M_thousands_sep = __np.thousands_sep(); 6011: 6011: const ctype<_CharT>& __ct = use_facet >(__loc); 6011: __ct.widen(__num_base::_S_atoms_out, 6011: __num_base::_S_atoms_out 6011: + __num_base::_S_oend, _M_atoms_out); 6011: __ct.widen(__num_base::_S_atoms_in, 6011: __num_base::_S_atoms_in 6011: + __num_base::_S_iend, _M_atoms_in); 6011: 6011: _M_grouping = __grouping; 6011: _M_truename = __truename; 6011: _M_falsename = __falsename; 6011: _M_allocated = true; 6011: } 6011: catch(...) 6011: { 6011: delete [] __grouping; 6011: delete [] __truename; 6011: delete [] __falsename; 6011: throw; 6011: } 6011: } 6011: # 139 "/usr/include/c++/8/bits/locale_facets.tcc" 3 6011: __attribute__ ((__pure__)) bool 6011: __verify_grouping(const char* __grouping, size_t __grouping_size, 6011: const string& __grouping_tmp) throw (); 6011: 6011: 6011: 6011: template 6011: __attribute ((__abi_tag__ ("cxx11"))) 6011: _InIter 6011: num_get<_CharT, _InIter>:: 6011: _M_extract_float(_InIter __beg, _InIter __end, ios_base& __io, 6011: ios_base::iostate& __err, string& __xtrc) const 6011: { 6011: typedef char_traits<_CharT> __traits_type; 6011: typedef __numpunct_cache<_CharT> __cache_type; 6011: __use_cache<__cache_type> __uc; 6011: const locale& __loc = __io._M_getloc(); 6011: const __cache_type* __lc = __uc(__loc); 6011: const _CharT* __lit = __lc->_M_atoms_in; 6011: char_type __c = char_type(); 6011: 6011: 6011: bool __testeof = __beg == __end; 6011: 6011: 6011: if (!__testeof) 6011: { 6011: __c = *__beg; 6011: const bool __plus = __c == __lit[__num_base::_S_iplus]; 6011: if ((__plus || __c == __lit[__num_base::_S_iminus]) 6011: && !(__lc->_M_use_grouping && __c == __lc->_M_thousands_sep) 6011: && !(__c == __lc->_M_decimal_point)) 6011: { 6011: __xtrc += __plus ? '+' : '-'; 6011: if (++__beg != __end) 6011: __c = *__beg; 6011: else 6011: __testeof = true; 6011: } 6011: } 6011: 6011: 6011: bool __found_mantissa = false; 6011: int __sep_pos = 0; 6011: while (!__testeof) 6011: { 6011: if ((__lc->_M_use_grouping && __c == __lc->_M_thousands_sep) 6011: || __c == __lc->_M_decimal_point) 6011: break; 6011: else if (__c == __lit[__num_base::_S_izero]) 6011: { 6011: if (!__found_mantissa) 6011: { 6011: __xtrc += '0'; 6011: __found_mantissa = true; 6011: } 6011: ++__sep_pos; 6011: 6011: if (++__beg != __end) 6011: __c = *__beg; 6011: else 6011: __testeof = true; 6011: } 6011: else 6011: break; 6011: } 6011: 6011: 6011: bool __found_dec = false; 6011: bool __found_sci = false; 6011: string __found_grouping; 6011: if (__lc->_M_use_grouping) 6011: __found_grouping.reserve(32); 6011: const char_type* __lit_zero = __lit + __num_base::_S_izero; 6011: 6011: if (!__lc->_M_allocated) 6011: 6011: while (!__testeof) 6011: { 6011: const int __digit = _M_find(__lit_zero, 10, __c); 6011: if (__digit != -1) 6011: { 6011: __xtrc += '0' + __digit; 6011: __found_mantissa = true; 6011: } 6011: else if (__c == __lc->_M_decimal_point 6011: && !__found_dec && !__found_sci) 6011: { 6011: __xtrc += '.'; 6011: __found_dec = true; 6011: } 6011: else if ((__c == __lit[__num_base::_S_ie] 6011: || __c == __lit[__num_base::_S_iE]) 6011: && !__found_sci && __found_mantissa) 6011: { 6011: 6011: __xtrc += 'e'; 6011: __found_sci = true; 6011: 6011: 6011: if (++__beg != __end) 6011: { 6011: __c = *__beg; 6011: const bool __plus = __c == __lit[__num_base::_S_iplus]; 6011: if (__plus || __c == __lit[__num_base::_S_iminus]) 6011: __xtrc += __plus ? '+' : '-'; 6011: else 6011: continue; 6011: } 6011: else 6011: { 6011: __testeof = true; 6011: break; 6011: } 6011: } 6011: else 6011: break; 6011: 6011: if (++__beg != __end) 6011: __c = *__beg; 6011: else 6011: __testeof = true; 6011: } 6011: else 6011: while (!__testeof) 6011: { 6011: 6011: 6011: if (__lc->_M_use_grouping && __c == __lc->_M_thousands_sep) 6011: { 6011: if (!__found_dec && !__found_sci) 6011: { 6011: 6011: 6011: if (__sep_pos) 6011: { 6011: __found_grouping += static_cast(__sep_pos); 6011: __sep_pos = 0; 6011: } 6011: else 6011: { 6011: 6011: 6011: __xtrc.clear(); 6011: break; 6011: } 6011: } 6011: else 6011: break; 6011: } 6011: else if (__c == __lc->_M_decimal_point) 6011: { 6011: if (!__found_dec && !__found_sci) 6011: { 6011: 6011: 6011: 6011: if (__found_grouping.size()) 6011: __found_grouping += static_cast(__sep_pos); 6011: __xtrc += '.'; 6011: __found_dec = true; 6011: } 6011: else 6011: break; 6011: } 6011: else 6011: { 6011: const char_type* __q = 6011: __traits_type::find(__lit_zero, 10, __c); 6011: if (__q) 6011: { 6011: __xtrc += '0' + (__q - __lit_zero); 6011: __found_mantissa = true; 6011: ++__sep_pos; 6011: } 6011: else if ((__c == __lit[__num_base::_S_ie] 6011: || __c == __lit[__num_base::_S_iE]) 6011: && !__found_sci && __found_mantissa) 6011: { 6011: 6011: if (__found_grouping.size() && !__found_dec) 6011: __found_grouping += static_cast(__sep_pos); 6011: __xtrc += 'e'; 6011: __found_sci = true; 6011: 6011: 6011: if (++__beg != __end) 6011: { 6011: __c = *__beg; 6011: const bool __plus = __c == __lit[__num_base::_S_iplus]; 6011: if ((__plus || __c == __lit[__num_base::_S_iminus]) 6011: && !(__lc->_M_use_grouping 6011: && __c == __lc->_M_thousands_sep) 6011: && !(__c == __lc->_M_decimal_point)) 6011: __xtrc += __plus ? '+' : '-'; 6011: else 6011: continue; 6011: } 6011: else 6011: { 6011: __testeof = true; 6011: break; 6011: } 6011: } 6011: else 6011: break; 6011: } 6011: 6011: if (++__beg != __end) 6011: __c = *__beg; 6011: else 6011: __testeof = true; 6011: } 6011: 6011: 6011: 6011: if (__found_grouping.size()) 6011: { 6011: 6011: if (!__found_dec && !__found_sci) 6011: __found_grouping += static_cast(__sep_pos); 6011: 6011: if (!std::__verify_grouping(__lc->_M_grouping, 6011: __lc->_M_grouping_size, 6011: __found_grouping)) 6011: __err = ios_base::failbit; 6011: } 6011: 6011: return __beg; 6011: } 6011: 6011: template 6011: template 6011: __attribute ((__abi_tag__ ("cxx11"))) 6011: _InIter 6011: num_get<_CharT, _InIter>:: 6011: _M_extract_int(_InIter __beg, _InIter __end, ios_base& __io, 6011: ios_base::iostate& __err, _ValueT& __v) const 6011: { 6011: typedef char_traits<_CharT> __traits_type; 6011: using __gnu_cxx::__add_unsigned; 6011: typedef typename __add_unsigned<_ValueT>::__type __unsigned_type; 6011: typedef __numpunct_cache<_CharT> __cache_type; 6011: __use_cache<__cache_type> __uc; 6011: const locale& __loc = __io._M_getloc(); 6011: const __cache_type* __lc = __uc(__loc); 6011: const _CharT* __lit = __lc->_M_atoms_in; 6011: char_type __c = char_type(); 6011: 6011: 6011: const ios_base::fmtflags __basefield = __io.flags() 6011: & ios_base::basefield; 6011: const bool __oct = __basefield == ios_base::oct; 6011: int __base = __oct ? 8 : (__basefield == ios_base::hex ? 16 : 10); 6011: 6011: 6011: bool __testeof = __beg == __end; 6011: 6011: 6011: bool __negative = false; 6011: if (!__testeof) 6011: { 6011: __c = *__beg; 6011: __negative = __c == __lit[__num_base::_S_iminus]; 6011: if ((__negative || __c == __lit[__num_base::_S_iplus]) 6011: && !(__lc->_M_use_grouping && __c == __lc->_M_thousands_sep) 6011: && !(__c == __lc->_M_decimal_point)) 6011: { 6011: if (++__beg != __end) 6011: __c = *__beg; 6011: else 6011: __testeof = true; 6011: } 6011: } 6011: 6011: 6011: 6011: bool __found_zero = false; 6011: int __sep_pos = 0; 6011: while (!__testeof) 6011: { 6011: if ((__lc->_M_use_grouping && __c == __lc->_M_thousands_sep) 6011: || __c == __lc->_M_decimal_point) 6011: break; 6011: else if (__c == __lit[__num_base::_S_izero] 6011: && (!__found_zero || __base == 10)) 6011: { 6011: __found_zero = true; 6011: ++__sep_pos; 6011: if (__basefield == 0) 6011: __base = 8; 6011: if (__base == 8) 6011: __sep_pos = 0; 6011: } 6011: else if (__found_zero 6011: && (__c == __lit[__num_base::_S_ix] 6011: || __c == __lit[__num_base::_S_iX])) 6011: { 6011: if (__basefield == 0) 6011: __base = 16; 6011: if (__base == 16) 6011: { 6011: __found_zero = false; 6011: __sep_pos = 0; 6011: } 6011: else 6011: break; 6011: } 6011: else 6011: break; 6011: 6011: if (++__beg != __end) 6011: { 6011: __c = *__beg; 6011: if (!__found_zero) 6011: break; 6011: } 6011: else 6011: __testeof = true; 6011: } 6011: 6011: 6011: 6011: const size_t __len = (__base == 16 ? __num_base::_S_iend 6011: - __num_base::_S_izero : __base); 6011: 6011: 6011: typedef __gnu_cxx::__numeric_traits<_ValueT> __num_traits; 6011: string __found_grouping; 6011: if (__lc->_M_use_grouping) 6011: __found_grouping.reserve(32); 6011: bool __testfail = false; 6011: bool __testoverflow = false; 6011: const __unsigned_type __max = 6011: (__negative && __num_traits::__is_signed) 6011: ? -static_cast<__unsigned_type>(__num_traits::__min) 6011: : __num_traits::__max; 6011: const __unsigned_type __smax = __max / __base; 6011: __unsigned_type __result = 0; 6011: int __digit = 0; 6011: const char_type* __lit_zero = __lit + __num_base::_S_izero; 6011: 6011: if (!__lc->_M_allocated) 6011: 6011: while (!__testeof) 6011: { 6011: __digit = _M_find(__lit_zero, __len, __c); 6011: if (__digit == -1) 6011: break; 6011: 6011: if (__result > __smax) 6011: __testoverflow = true; 6011: else 6011: { 6011: __result *= __base; 6011: __testoverflow |= __result > __max - __digit; 6011: __result += __digit; 6011: ++__sep_pos; 6011: } 6011: 6011: if (++__beg != __end) 6011: __c = *__beg; 6011: else 6011: __testeof = true; 6011: } 6011: else 6011: while (!__testeof) 6011: { 6011: 6011: 6011: if (__lc->_M_use_grouping && __c == __lc->_M_thousands_sep) 6011: { 6011: 6011: 6011: if (__sep_pos) 6011: { 6011: __found_grouping += static_cast(__sep_pos); 6011: __sep_pos = 0; 6011: } 6011: else 6011: { 6011: __testfail = true; 6011: break; 6011: } 6011: } 6011: else if (__c == __lc->_M_decimal_point) 6011: break; 6011: else 6011: { 6011: const char_type* __q = 6011: __traits_type::find(__lit_zero, __len, __c); 6011: if (!__q) 6011: break; 6011: 6011: __digit = __q - __lit_zero; 6011: if (__digit > 15) 6011: __digit -= 6; 6011: if (__result > __smax) 6011: __testoverflow = true; 6011: else 6011: { 6011: __result *= __base; 6011: __testoverflow |= __result > __max - __digit; 6011: __result += __digit; 6011: ++__sep_pos; 6011: } 6011: } 6011: 6011: if (++__beg != __end) 6011: __c = *__beg; 6011: else 6011: __testeof = true; 6011: } 6011: 6011: 6011: 6011: if (__found_grouping.size()) 6011: { 6011: 6011: __found_grouping += static_cast(__sep_pos); 6011: 6011: if (!std::__verify_grouping(__lc->_M_grouping, 6011: __lc->_M_grouping_size, 6011: __found_grouping)) 6011: __err = ios_base::failbit; 6011: } 6011: 6011: 6011: 6011: if ((!__sep_pos && !__found_zero && !__found_grouping.size()) 6011: || __testfail) 6011: { 6011: __v = 0; 6011: __err = ios_base::failbit; 6011: } 6011: else if (__testoverflow) 6011: { 6011: if (__negative && __num_traits::__is_signed) 6011: __v = __num_traits::__min; 6011: else 6011: __v = __num_traits::__max; 6011: __err = ios_base::failbit; 6011: } 6011: else 6011: __v = __negative ? -__result : __result; 6011: 6011: if (__testeof) 6011: __err |= ios_base::eofbit; 6011: return __beg; 6011: } 6011: 6011: 6011: 6011: template 6011: _InIter 6011: num_get<_CharT, _InIter>:: 6011: do_get(iter_type __beg, iter_type __end, ios_base& __io, 6011: ios_base::iostate& __err, bool& __v) const 6011: { 6011: if (!(__io.flags() & ios_base::boolalpha)) 6011: { 6011: 6011: 6011: 6011: long __l = -1; 6011: __beg = _M_extract_int(__beg, __end, __io, __err, __l); 6011: if (__l == 0 || __l == 1) 6011: __v = bool(__l); 6011: else 6011: { 6011: 6011: 6011: __v = true; 6011: __err = ios_base::failbit; 6011: if (__beg == __end) 6011: __err |= ios_base::eofbit; 6011: } 6011: } 6011: else 6011: { 6011: 6011: typedef __numpunct_cache<_CharT> __cache_type; 6011: __use_cache<__cache_type> __uc; 6011: const locale& __loc = __io._M_getloc(); 6011: const __cache_type* __lc = __uc(__loc); 6011: 6011: bool __testf = true; 6011: bool __testt = true; 6011: bool __donef = __lc->_M_falsename_size == 0; 6011: bool __donet = __lc->_M_truename_size == 0; 6011: bool __testeof = false; 6011: size_t __n = 0; 6011: while (!__donef || !__donet) 6011: { 6011: if (__beg == __end) 6011: { 6011: __testeof = true; 6011: break; 6011: } 6011: 6011: const char_type __c = *__beg; 6011: 6011: if (!__donef) 6011: __testf = __c == __lc->_M_falsename[__n]; 6011: 6011: if (!__testf && __donet) 6011: break; 6011: 6011: if (!__donet) 6011: __testt = __c == __lc->_M_truename[__n]; 6011: 6011: if (!__testt && __donef) 6011: break; 6011: 6011: if (!__testt && !__testf) 6011: break; 6011: 6011: ++__n; 6011: ++__beg; 6011: 6011: __donef = !__testf || __n >= __lc->_M_falsename_size; 6011: __donet = !__testt || __n >= __lc->_M_truename_size; 6011: } 6011: if (__testf && __n == __lc->_M_falsename_size && __n) 6011: { 6011: __v = false; 6011: if (__testt && __n == __lc->_M_truename_size) 6011: __err = ios_base::failbit; 6011: else 6011: __err = __testeof ? ios_base::eofbit : ios_base::goodbit; 6011: } 6011: else if (__testt && __n == __lc->_M_truename_size && __n) 6011: { 6011: __v = true; 6011: __err = __testeof ? ios_base::eofbit : ios_base::goodbit; 6011: } 6011: else 6011: { 6011: 6011: 6011: __v = false; 6011: __err = ios_base::failbit; 6011: if (__testeof) 6011: __err |= ios_base::eofbit; 6011: } 6011: } 6011: return __beg; 6011: } 6011: 6011: template 6011: _InIter 6011: num_get<_CharT, _InIter>:: 6011: do_get(iter_type __beg, iter_type __end, ios_base& __io, 6011: ios_base::iostate& __err, float& __v) const 6011: { 6011: string __xtrc; 6011: __xtrc.reserve(32); 6011: __beg = _M_extract_float(__beg, __end, __io, __err, __xtrc); 6011: std::__convert_to_v(__xtrc.c_str(), __v, __err, _S_get_c_locale()); 6011: if (__beg == __end) 6011: __err |= ios_base::eofbit; 6011: return __beg; 6011: } 6011: 6011: template 6011: _InIter 6011: num_get<_CharT, _InIter>:: 6011: do_get(iter_type __beg, iter_type __end, ios_base& __io, 6011: ios_base::iostate& __err, double& __v) const 6011: { 6011: string __xtrc; 6011: __xtrc.reserve(32); 6011: __beg = _M_extract_float(__beg, __end, __io, __err, __xtrc); 6011: std::__convert_to_v(__xtrc.c_str(), __v, __err, _S_get_c_locale()); 6011: if (__beg == __end) 6011: __err |= ios_base::eofbit; 6011: return __beg; 6011: } 6011: # 735 "/usr/include/c++/8/bits/locale_facets.tcc" 3 6011: template 6011: _InIter 6011: num_get<_CharT, _InIter>:: 6011: do_get(iter_type __beg, iter_type __end, ios_base& __io, 6011: ios_base::iostate& __err, long double& __v) const 6011: { 6011: string __xtrc; 6011: __xtrc.reserve(32); 6011: __beg = _M_extract_float(__beg, __end, __io, __err, __xtrc); 6011: std::__convert_to_v(__xtrc.c_str(), __v, __err, _S_get_c_locale()); 6011: if (__beg == __end) 6011: __err |= ios_base::eofbit; 6011: return __beg; 6011: } 6011: 6011: template 6011: _InIter 6011: num_get<_CharT, _InIter>:: 6011: do_get(iter_type __beg, iter_type __end, ios_base& __io, 6011: ios_base::iostate& __err, void*& __v) const 6011: { 6011: 6011: typedef ios_base::fmtflags fmtflags; 6011: const fmtflags __fmt = __io.flags(); 6011: __io.flags((__fmt & ~ios_base::basefield) | ios_base::hex); 6011: 6011: typedef __gnu_cxx::__conditional_type<(sizeof(void*) 6011: <= sizeof(unsigned long)), 6011: unsigned long, unsigned long long>::__type _UIntPtrType; 6011: 6011: _UIntPtrType __ul; 6011: __beg = _M_extract_int(__beg, __end, __io, __err, __ul); 6011: 6011: 6011: __io.flags(__fmt); 6011: 6011: __v = reinterpret_cast(__ul); 6011: return __beg; 6011: } 6011: 6011: 6011: 6011: template 6011: void 6011: num_put<_CharT, _OutIter>:: 6011: _M_pad(_CharT __fill, streamsize __w, ios_base& __io, 6011: _CharT* __new, const _CharT* __cs, int& __len) const 6011: { 6011: 6011: 6011: __pad<_CharT, char_traits<_CharT> >::_S_pad(__io, __fill, __new, 6011: __cs, __w, __len); 6011: __len = static_cast(__w); 6011: } 6011: 6011: 6011: 6011: template 6011: int 6011: __int_to_char(_CharT* __bufend, _ValueT __v, const _CharT* __lit, 6011: ios_base::fmtflags __flags, bool __dec) 6011: { 6011: _CharT* __buf = __bufend; 6011: if (__builtin_expect(__dec, true)) 6011: { 6011: 6011: do 6011: { 6011: *--__buf = __lit[(__v % 10) + __num_base::_S_odigits]; 6011: __v /= 10; 6011: } 6011: while (__v != 0); 6011: } 6011: else if ((__flags & ios_base::basefield) == ios_base::oct) 6011: { 6011: 6011: do 6011: { 6011: *--__buf = __lit[(__v & 0x7) + __num_base::_S_odigits]; 6011: __v >>= 3; 6011: } 6011: while (__v != 0); 6011: } 6011: else 6011: { 6011: 6011: const bool __uppercase = __flags & ios_base::uppercase; 6011: const int __case_offset = __uppercase ? __num_base::_S_oudigits 6011: : __num_base::_S_odigits; 6011: do 6011: { 6011: *--__buf = __lit[(__v & 0xf) + __case_offset]; 6011: __v >>= 4; 6011: } 6011: while (__v != 0); 6011: } 6011: return __bufend - __buf; 6011: } 6011: 6011: 6011: 6011: template 6011: void 6011: num_put<_CharT, _OutIter>:: 6011: _M_group_int(const char* __grouping, size_t __grouping_size, _CharT __sep, 6011: ios_base&, _CharT* __new, _CharT* __cs, int& __len) const 6011: { 6011: _CharT* __p = std::__add_grouping(__new, __sep, __grouping, 6011: __grouping_size, __cs, __cs + __len); 6011: __len = __p - __new; 6011: } 6011: 6011: template 6011: template 6011: _OutIter 6011: num_put<_CharT, _OutIter>:: 6011: _M_insert_int(_OutIter __s, ios_base& __io, _CharT __fill, 6011: _ValueT __v) const 6011: { 6011: using __gnu_cxx::__add_unsigned; 6011: typedef typename __add_unsigned<_ValueT>::__type __unsigned_type; 6011: typedef __numpunct_cache<_CharT> __cache_type; 6011: __use_cache<__cache_type> __uc; 6011: const locale& __loc = __io._M_getloc(); 6011: const __cache_type* __lc = __uc(__loc); 6011: const _CharT* __lit = __lc->_M_atoms_out; 6011: const ios_base::fmtflags __flags = __io.flags(); 6011: 6011: 6011: const int __ilen = 5 * sizeof(_ValueT); 6011: _CharT* __cs = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT) 6011: * __ilen)); 6011: 6011: 6011: 6011: const ios_base::fmtflags __basefield = __flags & ios_base::basefield; 6011: const bool __dec = (__basefield != ios_base::oct 6011: && __basefield != ios_base::hex); 6011: const __unsigned_type __u = ((__v > 0 || !__dec) 6011: ? __unsigned_type(__v) 6011: : -__unsigned_type(__v)); 6011: int __len = __int_to_char(__cs + __ilen, __u, __lit, __flags, __dec); 6011: __cs += __ilen - __len; 6011: 6011: 6011: if (__lc->_M_use_grouping) 6011: { 6011: 6011: 6011: _CharT* __cs2 = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT) 6011: * (__len + 1) 6011: * 2)); 6011: _M_group_int(__lc->_M_grouping, __lc->_M_grouping_size, 6011: __lc->_M_thousands_sep, __io, __cs2 + 2, __cs, __len); 6011: __cs = __cs2 + 2; 6011: } 6011: 6011: 6011: if (__builtin_expect(__dec, true)) 6011: { 6011: 6011: if (__v >= 0) 6011: { 6011: if (bool(__flags & ios_base::showpos) 6011: && __gnu_cxx::__numeric_traits<_ValueT>::__is_signed) 6011: *--__cs = __lit[__num_base::_S_oplus], ++__len; 6011: } 6011: else 6011: *--__cs = __lit[__num_base::_S_ominus], ++__len; 6011: } 6011: else if (bool(__flags & ios_base::showbase) && __v) 6011: { 6011: if (__basefield == ios_base::oct) 6011: *--__cs = __lit[__num_base::_S_odigits], ++__len; 6011: else 6011: { 6011: 6011: const bool __uppercase = __flags & ios_base::uppercase; 6011: *--__cs = __lit[__num_base::_S_ox + __uppercase]; 6011: 6011: *--__cs = __lit[__num_base::_S_odigits]; 6011: __len += 2; 6011: } 6011: } 6011: 6011: 6011: const streamsize __w = __io.width(); 6011: if (__w > static_cast(__len)) 6011: { 6011: _CharT* __cs3 = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT) 6011: * __w)); 6011: _M_pad(__fill, __w, __io, __cs3, __cs, __len); 6011: __cs = __cs3; 6011: } 6011: __io.width(0); 6011: 6011: 6011: 6011: return std::__write(__s, __cs, __len); 6011: } 6011: 6011: template 6011: void 6011: num_put<_CharT, _OutIter>:: 6011: _M_group_float(const char* __grouping, size_t __grouping_size, 6011: _CharT __sep, const _CharT* __p, _CharT* __new, 6011: _CharT* __cs, int& __len) const 6011: { 6011: 6011: 6011: 6011: const int __declen = __p ? __p - __cs : __len; 6011: _CharT* __p2 = std::__add_grouping(__new, __sep, __grouping, 6011: __grouping_size, 6011: __cs, __cs + __declen); 6011: 6011: 6011: int __newlen = __p2 - __new; 6011: if (__p) 6011: { 6011: char_traits<_CharT>::copy(__p2, __p, __len - __declen); 6011: __newlen += __len - __declen; 6011: } 6011: __len = __newlen; 6011: } 6011: # 971 "/usr/include/c++/8/bits/locale_facets.tcc" 3 6011: template 6011: template 6011: _OutIter 6011: num_put<_CharT, _OutIter>:: 6011: _M_insert_float(_OutIter __s, ios_base& __io, _CharT __fill, char __mod, 6011: _ValueT __v) const 6011: { 6011: typedef __numpunct_cache<_CharT> __cache_type; 6011: __use_cache<__cache_type> __uc; 6011: const locale& __loc = __io._M_getloc(); 6011: const __cache_type* __lc = __uc(__loc); 6011: 6011: 6011: const streamsize __prec = __io.precision() < 0 ? 6 : __io.precision(); 6011: 6011: const int __max_digits = 6011: __gnu_cxx::__numeric_traits<_ValueT>::__digits10; 6011: 6011: 6011: int __len; 6011: 6011: char __fbuf[16]; 6011: __num_base::_S_format_float(__io, __fbuf, __mod); 6011: 6011: 6011: 6011: const bool __use_prec = 6011: (__io.flags() & ios_base::floatfield) != ios_base::floatfield; 6011: 6011: 6011: 6011: int __cs_size = __max_digits * 3; 6011: char* __cs = static_cast(__builtin_alloca(__cs_size)); 6011: if (__use_prec) 6011: __len = std::__convert_from_v(_S_get_c_locale(), __cs, __cs_size, 6011: __fbuf, __prec, __v); 6011: else 6011: __len = std::__convert_from_v(_S_get_c_locale(), __cs, __cs_size, 6011: __fbuf, __v); 6011: 6011: 6011: if (__len >= __cs_size) 6011: { 6011: __cs_size = __len + 1; 6011: __cs = static_cast(__builtin_alloca(__cs_size)); 6011: if (__use_prec) 6011: __len = std::__convert_from_v(_S_get_c_locale(), __cs, __cs_size, 6011: __fbuf, __prec, __v); 6011: else 6011: __len = std::__convert_from_v(_S_get_c_locale(), __cs, __cs_size, 6011: __fbuf, __v); 6011: } 6011: # 1044 "/usr/include/c++/8/bits/locale_facets.tcc" 3 6011: const ctype<_CharT>& __ctype = use_facet >(__loc); 6011: 6011: _CharT* __ws = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT) 6011: * __len)); 6011: __ctype.widen(__cs, __cs + __len, __ws); 6011: 6011: 6011: _CharT* __wp = 0; 6011: const char* __p = char_traits::find(__cs, __len, '.'); 6011: if (__p) 6011: { 6011: __wp = __ws + (__p - __cs); 6011: *__wp = __lc->_M_decimal_point; 6011: } 6011: 6011: 6011: 6011: 6011: if (__lc->_M_use_grouping 6011: && (__wp || __len < 3 || (__cs[1] <= '9' && __cs[2] <= '9' 6011: && __cs[1] >= '0' && __cs[2] >= '0'))) 6011: { 6011: 6011: 6011: _CharT* __ws2 = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT) 6011: * __len * 2)); 6011: 6011: streamsize __off = 0; 6011: if (__cs[0] == '-' || __cs[0] == '+') 6011: { 6011: __off = 1; 6011: __ws2[0] = __ws[0]; 6011: __len -= 1; 6011: } 6011: 6011: _M_group_float(__lc->_M_grouping, __lc->_M_grouping_size, 6011: __lc->_M_thousands_sep, __wp, __ws2 + __off, 6011: __ws + __off, __len); 6011: __len += __off; 6011: 6011: __ws = __ws2; 6011: } 6011: 6011: 6011: const streamsize __w = __io.width(); 6011: if (__w > static_cast(__len)) 6011: { 6011: _CharT* __ws3 = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT) 6011: * __w)); 6011: _M_pad(__fill, __w, __io, __ws3, __ws, __len); 6011: __ws = __ws3; 6011: } 6011: __io.width(0); 6011: 6011: 6011: 6011: return std::__write(__s, __ws, __len); 6011: } 6011: 6011: template 6011: _OutIter 6011: num_put<_CharT, _OutIter>:: 6011: do_put(iter_type __s, ios_base& __io, char_type __fill, bool __v) const 6011: { 6011: const ios_base::fmtflags __flags = __io.flags(); 6011: if ((__flags & ios_base::boolalpha) == 0) 6011: { 6011: const long __l = __v; 6011: __s = _M_insert_int(__s, __io, __fill, __l); 6011: } 6011: else 6011: { 6011: typedef __numpunct_cache<_CharT> __cache_type; 6011: __use_cache<__cache_type> __uc; 6011: const locale& __loc = __io._M_getloc(); 6011: const __cache_type* __lc = __uc(__loc); 6011: 6011: const _CharT* __name = __v ? __lc->_M_truename 6011: : __lc->_M_falsename; 6011: int __len = __v ? __lc->_M_truename_size 6011: : __lc->_M_falsename_size; 6011: 6011: const streamsize __w = __io.width(); 6011: if (__w > static_cast(__len)) 6011: { 6011: const streamsize __plen = __w - __len; 6011: _CharT* __ps 6011: = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT) 6011: * __plen)); 6011: 6011: char_traits<_CharT>::assign(__ps, __plen, __fill); 6011: __io.width(0); 6011: 6011: if ((__flags & ios_base::adjustfield) == ios_base::left) 6011: { 6011: __s = std::__write(__s, __name, __len); 6011: __s = std::__write(__s, __ps, __plen); 6011: } 6011: else 6011: { 6011: __s = std::__write(__s, __ps, __plen); 6011: __s = std::__write(__s, __name, __len); 6011: } 6011: return __s; 6011: } 6011: __io.width(0); 6011: __s = std::__write(__s, __name, __len); 6011: } 6011: return __s; 6011: } 6011: 6011: template 6011: _OutIter 6011: num_put<_CharT, _OutIter>:: 6011: do_put(iter_type __s, ios_base& __io, char_type __fill, double __v) const 6011: { return _M_insert_float(__s, __io, __fill, char(), __v); } 6011: # 1169 "/usr/include/c++/8/bits/locale_facets.tcc" 3 6011: template 6011: _OutIter 6011: num_put<_CharT, _OutIter>:: 6011: do_put(iter_type __s, ios_base& __io, char_type __fill, 6011: long double __v) const 6011: { return _M_insert_float(__s, __io, __fill, 'L', __v); } 6011: 6011: template 6011: _OutIter 6011: num_put<_CharT, _OutIter>:: 6011: do_put(iter_type __s, ios_base& __io, char_type __fill, 6011: const void* __v) const 6011: { 6011: const ios_base::fmtflags __flags = __io.flags(); 6011: const ios_base::fmtflags __fmt = ~(ios_base::basefield 6011: | ios_base::uppercase); 6011: __io.flags((__flags & __fmt) | (ios_base::hex | ios_base::showbase)); 6011: 6011: typedef __gnu_cxx::__conditional_type<(sizeof(const void*) 6011: <= sizeof(unsigned long)), 6011: unsigned long, unsigned long long>::__type _UIntPtrType; 6011: 6011: __s = _M_insert_int(__s, __io, __fill, 6011: reinterpret_cast<_UIntPtrType>(__v)); 6011: __io.flags(__flags); 6011: return __s; 6011: } 6011: 6011: 6011: # 1206 "/usr/include/c++/8/bits/locale_facets.tcc" 3 6011: template 6011: void 6011: __pad<_CharT, _Traits>::_S_pad(ios_base& __io, _CharT __fill, 6011: _CharT* __news, const _CharT* __olds, 6011: streamsize __newlen, streamsize __oldlen) 6011: { 6011: const size_t __plen = static_cast(__newlen - __oldlen); 6011: const ios_base::fmtflags __adjust = __io.flags() & ios_base::adjustfield; 6011: 6011: 6011: if (__adjust == ios_base::left) 6011: { 6011: _Traits::copy(__news, __olds, __oldlen); 6011: _Traits::assign(__news + __oldlen, __plen, __fill); 6011: return; 6011: } 6011: 6011: size_t __mod = 0; 6011: if (__adjust == ios_base::internal) 6011: { 6011: 6011: 6011: 6011: const locale& __loc = __io._M_getloc(); 6011: const ctype<_CharT>& __ctype = use_facet >(__loc); 6011: 6011: if (__ctype.widen('-') == __olds[0] 6011: || __ctype.widen('+') == __olds[0]) 6011: { 6011: __news[0] = __olds[0]; 6011: __mod = 1; 6011: ++__news; 6011: } 6011: else if (__ctype.widen('0') == __olds[0] 6011: && __oldlen > 1 6011: && (__ctype.widen('x') == __olds[1] 6011: || __ctype.widen('X') == __olds[1])) 6011: { 6011: __news[0] = __olds[0]; 6011: __news[1] = __olds[1]; 6011: __mod = 2; 6011: __news += 2; 6011: } 6011: 6011: } 6011: _Traits::assign(__news, __plen, __fill); 6011: _Traits::copy(__news + __plen, __olds + __mod, __oldlen - __mod); 6011: } 6011: 6011: template 6011: _CharT* 6011: __add_grouping(_CharT* __s, _CharT __sep, 6011: const char* __gbeg, size_t __gsize, 6011: const _CharT* __first, const _CharT* __last) 6011: { 6011: size_t __idx = 0; 6011: size_t __ctr = 0; 6011: 6011: while (__last - __first > __gbeg[__idx] 6011: && static_cast(__gbeg[__idx]) > 0 6011: && __gbeg[__idx] != __gnu_cxx::__numeric_traits::__max) 6011: { 6011: __last -= __gbeg[__idx]; 6011: __idx < __gsize - 1 ? ++__idx : ++__ctr; 6011: } 6011: 6011: while (__first != __last) 6011: *__s++ = *__first++; 6011: 6011: while (__ctr--) 6011: { 6011: *__s++ = __sep; 6011: for (char __i = __gbeg[__idx]; __i > 0; --__i) 6011: *__s++ = *__first++; 6011: } 6011: 6011: while (__idx--) 6011: { 6011: *__s++ = __sep; 6011: for (char __i = __gbeg[__idx]; __i > 0; --__i) 6011: *__s++ = *__first++; 6011: } 6011: 6011: return __s; 6011: } 6011: 6011: 6011: 6011: 6011: extern template class __cxx11:: numpunct; 6011: extern template class __cxx11:: numpunct_byname; 6011: extern template class num_get; 6011: extern template class num_put; 6011: extern template class ctype_byname; 6011: 6011: extern template 6011: const ctype& 6011: use_facet >(const locale&); 6011: 6011: extern template 6011: const numpunct& 6011: use_facet >(const locale&); 6011: 6011: extern template 6011: const num_put& 6011: use_facet >(const locale&); 6011: 6011: extern template 6011: const num_get& 6011: use_facet >(const locale&); 6011: 6011: extern template 6011: bool 6011: has_facet >(const locale&); 6011: 6011: extern template 6011: bool 6011: has_facet >(const locale&); 6011: 6011: extern template 6011: bool 6011: has_facet >(const locale&); 6011: 6011: extern template 6011: bool 6011: has_facet >(const locale&); 6011: 6011: 6011: extern template class __cxx11:: numpunct; 6011: extern template class __cxx11:: numpunct_byname; 6011: extern template class num_get; 6011: extern template class num_put; 6011: extern template class ctype_byname; 6011: 6011: extern template 6011: const ctype& 6011: use_facet >(const locale&); 6011: 6011: extern template 6011: const numpunct& 6011: use_facet >(const locale&); 6011: 6011: extern template 6011: const num_put& 6011: use_facet >(const locale&); 6011: 6011: extern template 6011: const num_get& 6011: use_facet >(const locale&); 6011: 6011: extern template 6011: bool 6011: has_facet >(const locale&); 6011: 6011: extern template 6011: bool 6011: has_facet >(const locale&); 6011: 6011: extern template 6011: bool 6011: has_facet >(const locale&); 6011: 6011: extern template 6011: bool 6011: has_facet >(const locale&); 6011: 6011: 6011: 6011: 6011: } 6011: # 2652 "/usr/include/c++/8/bits/locale_facets.h" 2 3 6011: # 38 "/usr/include/c++/8/bits/basic_ios.h" 2 3 6011: 6011: 6011: 6011: namespace std __attribute__ ((__visibility__ ("default"))) 6011: { 6011: 6011: 6011: template 6011: inline const _Facet& 6011: __check_facet(const _Facet* __f) 6011: { 6011: if (!__f) 6011: __throw_bad_cast(); 6011: return *__f; 6011: } 6011: # 66 "/usr/include/c++/8/bits/basic_ios.h" 3 6011: template 6011: class basic_ios : public ios_base 6011: { 6011: public: 6011: 6011: 6011: 6011: 6011: 6011: 6011: typedef _CharT char_type; 6011: typedef typename _Traits::int_type int_type; 6011: typedef typename _Traits::pos_type pos_type; 6011: typedef typename _Traits::off_type off_type; 6011: typedef _Traits traits_type; 6011: 6011: 6011: 6011: 6011: 6011: 6011: typedef ctype<_CharT> __ctype_type; 6011: typedef num_put<_CharT, ostreambuf_iterator<_CharT, _Traits> > 6011: __num_put_type; 6011: typedef num_get<_CharT, istreambuf_iterator<_CharT, _Traits> > 6011: __num_get_type; 6011: 6011: 6011: 6011: protected: 6011: basic_ostream<_CharT, _Traits>* _M_tie; 6011: mutable char_type _M_fill; 6011: mutable bool _M_fill_init; 6011: basic_streambuf<_CharT, _Traits>* _M_streambuf; 6011: 6011: 6011: const __ctype_type* _M_ctype; 6011: 6011: const __num_put_type* _M_num_put; 6011: 6011: const __num_get_type* _M_num_get; 6011: 6011: public: 6011: # 117 "/usr/include/c++/8/bits/basic_ios.h" 3 6011: explicit operator bool() const 6011: { return !this->fail(); } 6011: 6011: 6011: 6011: 6011: 6011: bool 6011: operator!() const 6011: { return this->fail(); } 6011: # 136 "/usr/include/c++/8/bits/basic_ios.h" 3 6011: iostate 6011: rdstate() const 6011: { return _M_streambuf_state; } 6011: # 147 "/usr/include/c++/8/bits/basic_ios.h" 3 6011: void 6011: clear(iostate __state = goodbit); 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: void 6011: setstate(iostate __state) 6011: { this->clear(this->rdstate() | __state); } 6011: 6011: 6011: 6011: 6011: void 6011: _M_setstate(iostate __state) 6011: { 6011: 6011: 6011: _M_streambuf_state |= __state; 6011: if (this->exceptions() & __state) 6011: throw; 6011: } 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: bool 6011: good() const 6011: { return this->rdstate() == 0; } 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: bool 6011: eof() const 6011: { return (this->rdstate() & eofbit) != 0; } 6011: # 200 "/usr/include/c++/8/bits/basic_ios.h" 3 6011: bool 6011: fail() const 6011: { return (this->rdstate() & (badbit | failbit)) != 0; } 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: bool 6011: bad() const 6011: { return (this->rdstate() & badbit) != 0; } 6011: # 221 "/usr/include/c++/8/bits/basic_ios.h" 3 6011: iostate 6011: exceptions() const 6011: { return _M_exception; } 6011: # 256 "/usr/include/c++/8/bits/basic_ios.h" 3 6011: void 6011: exceptions(iostate __except) 6011: { 6011: _M_exception = __except; 6011: this->clear(_M_streambuf_state); 6011: } 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: explicit 6011: basic_ios(basic_streambuf<_CharT, _Traits>* __sb) 6011: : ios_base(), _M_tie(0), _M_fill(), _M_fill_init(false), _M_streambuf(0), 6011: _M_ctype(0), _M_num_put(0), _M_num_get(0) 6011: { this->init(__sb); } 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: virtual 6011: ~basic_ios() { } 6011: # 294 "/usr/include/c++/8/bits/basic_ios.h" 3 6011: basic_ostream<_CharT, _Traits>* 6011: tie() const 6011: { return _M_tie; } 6011: # 306 "/usr/include/c++/8/bits/basic_ios.h" 3 6011: basic_ostream<_CharT, _Traits>* 6011: tie(basic_ostream<_CharT, _Traits>* __tiestr) 6011: { 6011: basic_ostream<_CharT, _Traits>* __old = _M_tie; 6011: _M_tie = __tiestr; 6011: return __old; 6011: } 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: basic_streambuf<_CharT, _Traits>* 6011: rdbuf() const 6011: { return _M_streambuf; } 6011: # 346 "/usr/include/c++/8/bits/basic_ios.h" 3 6011: basic_streambuf<_CharT, _Traits>* 6011: rdbuf(basic_streambuf<_CharT, _Traits>* __sb); 6011: # 360 "/usr/include/c++/8/bits/basic_ios.h" 3 6011: basic_ios& 6011: copyfmt(const basic_ios& __rhs); 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: char_type 6011: fill() const 6011: { 6011: if (!_M_fill_init) 6011: { 6011: _M_fill = this->widen(' '); 6011: _M_fill_init = true; 6011: } 6011: return _M_fill; 6011: } 6011: # 389 "/usr/include/c++/8/bits/basic_ios.h" 3 6011: char_type 6011: fill(char_type __ch) 6011: { 6011: char_type __old = this->fill(); 6011: _M_fill = __ch; 6011: return __old; 6011: } 6011: # 409 "/usr/include/c++/8/bits/basic_ios.h" 3 6011: locale 6011: imbue(const locale& __loc); 6011: # 429 "/usr/include/c++/8/bits/basic_ios.h" 3 6011: char 6011: narrow(char_type __c, char __dfault) const 6011: { return __check_facet(_M_ctype).narrow(__c, __dfault); } 6011: # 448 "/usr/include/c++/8/bits/basic_ios.h" 3 6011: char_type 6011: widen(char __c) const 6011: { return __check_facet(_M_ctype).widen(__c); } 6011: 6011: protected: 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: basic_ios() 6011: : ios_base(), _M_tie(0), _M_fill(char_type()), _M_fill_init(false), 6011: _M_streambuf(0), _M_ctype(0), _M_num_put(0), _M_num_get(0) 6011: { } 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: void 6011: init(basic_streambuf<_CharT, _Traits>* __sb); 6011: 6011: 6011: basic_ios(const basic_ios&) = delete; 6011: basic_ios& operator=(const basic_ios&) = delete; 6011: 6011: void 6011: move(basic_ios& __rhs) 6011: { 6011: ios_base::_M_move(__rhs); 6011: _M_cache_locale(_M_ios_locale); 6011: this->tie(__rhs.tie(nullptr)); 6011: _M_fill = __rhs._M_fill; 6011: _M_fill_init = __rhs._M_fill_init; 6011: _M_streambuf = nullptr; 6011: } 6011: 6011: void 6011: move(basic_ios&& __rhs) 6011: { this->move(__rhs); } 6011: 6011: void 6011: swap(basic_ios& __rhs) noexcept 6011: { 6011: ios_base::_M_swap(__rhs); 6011: _M_cache_locale(_M_ios_locale); 6011: __rhs._M_cache_locale(__rhs._M_ios_locale); 6011: std::swap(_M_tie, __rhs._M_tie); 6011: std::swap(_M_fill, __rhs._M_fill); 6011: std::swap(_M_fill_init, __rhs._M_fill_init); 6011: } 6011: 6011: void 6011: set_rdbuf(basic_streambuf<_CharT, _Traits>* __sb) 6011: { _M_streambuf = __sb; } 6011: 6011: 6011: void 6011: _M_cache_locale(const locale& __loc); 6011: }; 6011: 6011: 6011: } 6011: 6011: # 1 "/usr/include/c++/8/bits/basic_ios.tcc" 1 3 6011: # 33 "/usr/include/c++/8/bits/basic_ios.tcc" 3 6011: 6011: # 34 "/usr/include/c++/8/bits/basic_ios.tcc" 3 6011: 6011: namespace std __attribute__ ((__visibility__ ("default"))) 6011: { 6011: 6011: 6011: template 6011: void 6011: basic_ios<_CharT, _Traits>::clear(iostate __state) 6011: { 6011: if (this->rdbuf()) 6011: _M_streambuf_state = __state; 6011: else 6011: _M_streambuf_state = __state | badbit; 6011: if (this->exceptions() & this->rdstate()) 6011: __throw_ios_failure(("basic_ios::clear")); 6011: } 6011: 6011: template 6011: basic_streambuf<_CharT, _Traits>* 6011: basic_ios<_CharT, _Traits>::rdbuf(basic_streambuf<_CharT, _Traits>* __sb) 6011: { 6011: basic_streambuf<_CharT, _Traits>* __old = _M_streambuf; 6011: _M_streambuf = __sb; 6011: this->clear(); 6011: return __old; 6011: } 6011: 6011: template 6011: basic_ios<_CharT, _Traits>& 6011: basic_ios<_CharT, _Traits>::copyfmt(const basic_ios& __rhs) 6011: { 6011: 6011: 6011: if (this != &__rhs) 6011: { 6011: 6011: 6011: 6011: 6011: _Words* __words = (__rhs._M_word_size <= _S_local_word_size) ? 6011: _M_local_word : new _Words[__rhs._M_word_size]; 6011: 6011: 6011: _Callback_list* __cb = __rhs._M_callbacks; 6011: if (__cb) 6011: __cb->_M_add_reference(); 6011: _M_call_callbacks(erase_event); 6011: if (_M_word != _M_local_word) 6011: { 6011: delete [] _M_word; 6011: _M_word = 0; 6011: } 6011: _M_dispose_callbacks(); 6011: 6011: 6011: _M_callbacks = __cb; 6011: for (int __i = 0; __i < __rhs._M_word_size; ++__i) 6011: __words[__i] = __rhs._M_word[__i]; 6011: _M_word = __words; 6011: _M_word_size = __rhs._M_word_size; 6011: 6011: this->flags(__rhs.flags()); 6011: this->width(__rhs.width()); 6011: this->precision(__rhs.precision()); 6011: this->tie(__rhs.tie()); 6011: this->fill(__rhs.fill()); 6011: _M_ios_locale = __rhs.getloc(); 6011: _M_cache_locale(_M_ios_locale); 6011: 6011: _M_call_callbacks(copyfmt_event); 6011: 6011: 6011: this->exceptions(__rhs.exceptions()); 6011: } 6011: return *this; 6011: } 6011: 6011: 6011: template 6011: locale 6011: basic_ios<_CharT, _Traits>::imbue(const locale& __loc) 6011: { 6011: locale __old(this->getloc()); 6011: ios_base::imbue(__loc); 6011: _M_cache_locale(__loc); 6011: if (this->rdbuf() != 0) 6011: this->rdbuf()->pubimbue(__loc); 6011: return __old; 6011: } 6011: 6011: template 6011: void 6011: basic_ios<_CharT, _Traits>::init(basic_streambuf<_CharT, _Traits>* __sb) 6011: { 6011: 6011: ios_base::_M_init(); 6011: 6011: 6011: _M_cache_locale(_M_ios_locale); 6011: # 146 "/usr/include/c++/8/bits/basic_ios.tcc" 3 6011: _M_fill = _CharT(); 6011: _M_fill_init = false; 6011: 6011: _M_tie = 0; 6011: _M_exception = goodbit; 6011: _M_streambuf = __sb; 6011: _M_streambuf_state = __sb ? goodbit : badbit; 6011: } 6011: 6011: template 6011: void 6011: basic_ios<_CharT, _Traits>::_M_cache_locale(const locale& __loc) 6011: { 6011: if (__builtin_expect(has_facet<__ctype_type>(__loc), true)) 6011: _M_ctype = std::__addressof(use_facet<__ctype_type>(__loc)); 6011: else 6011: _M_ctype = 0; 6011: 6011: if (__builtin_expect(has_facet<__num_put_type>(__loc), true)) 6011: _M_num_put = std::__addressof(use_facet<__num_put_type>(__loc)); 6011: else 6011: _M_num_put = 0; 6011: 6011: if (__builtin_expect(has_facet<__num_get_type>(__loc), true)) 6011: _M_num_get = std::__addressof(use_facet<__num_get_type>(__loc)); 6011: else 6011: _M_num_get = 0; 6011: } 6011: 6011: 6011: 6011: 6011: extern template class basic_ios; 6011: 6011: 6011: extern template class basic_ios; 6011: 6011: 6011: 6011: 6011: } 6011: # 517 "/usr/include/c++/8/bits/basic_ios.h" 2 3 6011: # 45 "/usr/include/c++/8/ios" 2 3 6011: # 39 "/usr/include/c++/8/ostream" 2 3 6011: 6011: 6011: namespace std __attribute__ ((__visibility__ ("default"))) 6011: { 6011: 6011: # 57 "/usr/include/c++/8/ostream" 3 6011: template 6011: class basic_ostream : virtual public basic_ios<_CharT, _Traits> 6011: { 6011: public: 6011: 6011: typedef _CharT char_type; 6011: typedef typename _Traits::int_type int_type; 6011: typedef typename _Traits::pos_type pos_type; 6011: typedef typename _Traits::off_type off_type; 6011: typedef _Traits traits_type; 6011: 6011: 6011: typedef basic_streambuf<_CharT, _Traits> __streambuf_type; 6011: typedef basic_ios<_CharT, _Traits> __ios_type; 6011: typedef basic_ostream<_CharT, _Traits> __ostream_type; 6011: typedef num_put<_CharT, ostreambuf_iterator<_CharT, _Traits> > 6011: __num_put_type; 6011: typedef ctype<_CharT> __ctype_type; 6011: # 83 "/usr/include/c++/8/ostream" 3 6011: explicit 6011: basic_ostream(__streambuf_type* __sb) 6011: { this->init(__sb); } 6011: 6011: 6011: 6011: 6011: 6011: 6011: virtual 6011: ~basic_ostream() { } 6011: 6011: 6011: class sentry; 6011: friend class sentry; 6011: # 107 "/usr/include/c++/8/ostream" 3 6011: __ostream_type& 6011: operator<<(__ostream_type& (*__pf)(__ostream_type&)) 6011: { 6011: 6011: 6011: 6011: return __pf(*this); 6011: } 6011: 6011: __ostream_type& 6011: operator<<(__ios_type& (*__pf)(__ios_type&)) 6011: { 6011: 6011: 6011: 6011: __pf(*this); 6011: return *this; 6011: } 6011: 6011: __ostream_type& 6011: operator<<(ios_base& (*__pf) (ios_base&)) 6011: { 6011: 6011: 6011: 6011: __pf(*this); 6011: return *this; 6011: } 6011: # 165 "/usr/include/c++/8/ostream" 3 6011: __ostream_type& 6011: operator<<(long __n) 6011: { return _M_insert(__n); } 6011: 6011: __ostream_type& 6011: operator<<(unsigned long __n) 6011: { return _M_insert(__n); } 6011: 6011: __ostream_type& 6011: operator<<(bool __n) 6011: { return _M_insert(__n); } 6011: 6011: __ostream_type& 6011: operator<<(short __n); 6011: 6011: __ostream_type& 6011: operator<<(unsigned short __n) 6011: { 6011: 6011: 6011: return _M_insert(static_cast(__n)); 6011: } 6011: 6011: __ostream_type& 6011: operator<<(int __n); 6011: 6011: __ostream_type& 6011: operator<<(unsigned int __n) 6011: { 6011: 6011: 6011: return _M_insert(static_cast(__n)); 6011: } 6011: 6011: 6011: __ostream_type& 6011: operator<<(long long __n) 6011: { return _M_insert(__n); } 6011: 6011: __ostream_type& 6011: operator<<(unsigned long long __n) 6011: { return _M_insert(__n); } 6011: # 219 "/usr/include/c++/8/ostream" 3 6011: __ostream_type& 6011: operator<<(double __f) 6011: { return _M_insert(__f); } 6011: 6011: __ostream_type& 6011: operator<<(float __f) 6011: { 6011: 6011: 6011: return _M_insert(static_cast(__f)); 6011: } 6011: 6011: __ostream_type& 6011: operator<<(long double __f) 6011: { return _M_insert(__f); } 6011: # 244 "/usr/include/c++/8/ostream" 3 6011: __ostream_type& 6011: operator<<(const void* __p) 6011: { return _M_insert(__p); } 6011: # 269 "/usr/include/c++/8/ostream" 3 6011: __ostream_type& 6011: operator<<(__streambuf_type* __sb); 6011: # 302 "/usr/include/c++/8/ostream" 3 6011: __ostream_type& 6011: put(char_type __c); 6011: 6011: 6011: 6011: 6011: 6011: 6011: void 6011: _M_write(const char_type* __s, streamsize __n) 6011: { 6011: const streamsize __put = this->rdbuf()->sputn(__s, __n); 6011: if (__put != __n) 6011: this->setstate(ios_base::badbit); 6011: } 6011: # 334 "/usr/include/c++/8/ostream" 3 6011: __ostream_type& 6011: write(const char_type* __s, streamsize __n); 6011: # 347 "/usr/include/c++/8/ostream" 3 6011: __ostream_type& 6011: flush(); 6011: # 357 "/usr/include/c++/8/ostream" 3 6011: pos_type 6011: tellp(); 6011: # 368 "/usr/include/c++/8/ostream" 3 6011: __ostream_type& 6011: seekp(pos_type); 6011: # 380 "/usr/include/c++/8/ostream" 3 6011: __ostream_type& 6011: seekp(off_type, ios_base::seekdir); 6011: 6011: protected: 6011: basic_ostream() 6011: { this->init(0); } 6011: 6011: 6011: 6011: basic_ostream(basic_iostream<_CharT, _Traits>&) { } 6011: 6011: basic_ostream(const basic_ostream&) = delete; 6011: 6011: basic_ostream(basic_ostream&& __rhs) 6011: : __ios_type() 6011: { __ios_type::move(__rhs); } 6011: 6011: 6011: 6011: basic_ostream& operator=(const basic_ostream&) = delete; 6011: 6011: basic_ostream& 6011: operator=(basic_ostream&& __rhs) 6011: { 6011: swap(__rhs); 6011: return *this; 6011: } 6011: 6011: void 6011: swap(basic_ostream& __rhs) 6011: { __ios_type::swap(__rhs); } 6011: 6011: 6011: template 6011: __ostream_type& 6011: _M_insert(_ValueT __v); 6011: }; 6011: # 425 "/usr/include/c++/8/ostream" 3 6011: template 6011: class basic_ostream<_CharT, _Traits>::sentry 6011: { 6011: 6011: bool _M_ok; 6011: basic_ostream<_CharT, _Traits>& _M_os; 6011: 6011: public: 6011: # 444 "/usr/include/c++/8/ostream" 3 6011: explicit 6011: sentry(basic_ostream<_CharT, _Traits>& __os); 6011: # 454 "/usr/include/c++/8/ostream" 3 6011: ~sentry() 6011: { 6011: 6011: if (bool(_M_os.flags() & ios_base::unitbuf) && !uncaught_exception()) 6011: { 6011: 6011: if (_M_os.rdbuf() && _M_os.rdbuf()->pubsync() == -1) 6011: _M_os.setstate(ios_base::badbit); 6011: } 6011: } 6011: # 473 "/usr/include/c++/8/ostream" 3 6011: explicit 6011: 6011: operator bool() const 6011: { return _M_ok; } 6011: }; 6011: # 495 "/usr/include/c++/8/ostream" 3 6011: template 6011: inline basic_ostream<_CharT, _Traits>& 6011: operator<<(basic_ostream<_CharT, _Traits>& __out, _CharT __c) 6011: { return __ostream_insert(__out, &__c, 1); } 6011: 6011: template 6011: inline basic_ostream<_CharT, _Traits>& 6011: operator<<(basic_ostream<_CharT, _Traits>& __out, char __c) 6011: { return (__out << __out.widen(__c)); } 6011: 6011: 6011: template 6011: inline basic_ostream& 6011: operator<<(basic_ostream& __out, char __c) 6011: { return __ostream_insert(__out, &__c, 1); } 6011: 6011: 6011: template 6011: inline basic_ostream& 6011: operator<<(basic_ostream& __out, signed char __c) 6011: { return (__out << static_cast(__c)); } 6011: 6011: template 6011: inline basic_ostream& 6011: operator<<(basic_ostream& __out, unsigned char __c) 6011: { return (__out << static_cast(__c)); } 6011: # 537 "/usr/include/c++/8/ostream" 3 6011: template 6011: inline basic_ostream<_CharT, _Traits>& 6011: operator<<(basic_ostream<_CharT, _Traits>& __out, const _CharT* __s) 6011: { 6011: if (!__s) 6011: __out.setstate(ios_base::badbit); 6011: else 6011: __ostream_insert(__out, __s, 6011: static_cast(_Traits::length(__s))); 6011: return __out; 6011: } 6011: 6011: template 6011: basic_ostream<_CharT, _Traits> & 6011: operator<<(basic_ostream<_CharT, _Traits>& __out, const char* __s); 6011: 6011: 6011: template 6011: inline basic_ostream& 6011: operator<<(basic_ostream& __out, const char* __s) 6011: { 6011: if (!__s) 6011: __out.setstate(ios_base::badbit); 6011: else 6011: __ostream_insert(__out, __s, 6011: static_cast(_Traits::length(__s))); 6011: return __out; 6011: } 6011: 6011: 6011: template 6011: inline basic_ostream& 6011: operator<<(basic_ostream& __out, const signed char* __s) 6011: { return (__out << reinterpret_cast(__s)); } 6011: 6011: template 6011: inline basic_ostream & 6011: operator<<(basic_ostream& __out, const unsigned char* __s) 6011: { return (__out << reinterpret_cast(__s)); } 6011: # 588 "/usr/include/c++/8/ostream" 3 6011: template 6011: inline basic_ostream<_CharT, _Traits>& 6011: endl(basic_ostream<_CharT, _Traits>& __os) 6011: { return flush(__os.put(__os.widen('\n'))); } 6011: # 600 "/usr/include/c++/8/ostream" 3 6011: template 6011: inline basic_ostream<_CharT, _Traits>& 6011: ends(basic_ostream<_CharT, _Traits>& __os) 6011: { return __os.put(_CharT()); } 6011: 6011: 6011: 6011: 6011: 6011: 6011: template 6011: inline basic_ostream<_CharT, _Traits>& 6011: flush(basic_ostream<_CharT, _Traits>& __os) 6011: { return __os.flush(); } 6011: 6011: 6011: template 6011: basic_ostream<_Ch, _Up>& 6011: __is_convertible_to_basic_ostream_test(basic_ostream<_Ch, _Up>*); 6011: 6011: template 6011: struct __is_convertible_to_basic_ostream_impl 6011: { 6011: using __ostream_type = void; 6011: }; 6011: 6011: template 6011: using __do_is_convertible_to_basic_ostream_impl = 6011: decltype(__is_convertible_to_basic_ostream_test 6011: (declval::type*>())); 6011: 6011: template 6011: struct __is_convertible_to_basic_ostream_impl 6011: <_Tp, 6011: __void_t<__do_is_convertible_to_basic_ostream_impl<_Tp>>> 6011: { 6011: using __ostream_type = 6011: __do_is_convertible_to_basic_ostream_impl<_Tp>; 6011: }; 6011: 6011: template 6011: struct __is_convertible_to_basic_ostream 6011: : __is_convertible_to_basic_ostream_impl<_Tp> 6011: { 6011: public: 6011: using type = __not_::__ostream_type>>; 6011: constexpr static bool value = type::value; 6011: }; 6011: 6011: template 6011: struct __is_insertable : false_type {}; 6011: 6011: template 6011: struct __is_insertable<_Ostream, _Tp, 6011: __void_t() 6011: << declval())>> 6011: : true_type {}; 6011: 6011: template 6011: using __rvalue_ostream_type = 6011: typename __is_convertible_to_basic_ostream< 6011: _Ostream>::__ostream_type; 6011: # 674 "/usr/include/c++/8/ostream" 3 6011: template 6011: inline 6011: typename enable_if<__and_<__not_>, 6011: __is_convertible_to_basic_ostream<_Ostream>, 6011: __is_insertable< 6011: __rvalue_ostream_type<_Ostream>, 6011: const _Tp&>>::value, 6011: __rvalue_ostream_type<_Ostream>>::type 6011: operator<<(_Ostream&& __os, const _Tp& __x) 6011: { 6011: __rvalue_ostream_type<_Ostream> __ret_os = __os; 6011: __ret_os << __x; 6011: return __ret_os; 6011: } 6011: 6011: 6011: 6011: } 6011: 6011: # 1 "/usr/include/c++/8/bits/ostream.tcc" 1 3 6011: # 37 "/usr/include/c++/8/bits/ostream.tcc" 3 6011: 6011: # 38 "/usr/include/c++/8/bits/ostream.tcc" 3 6011: 6011: 6011: 6011: namespace std __attribute__ ((__visibility__ ("default"))) 6011: { 6011: 6011: 6011: template 6011: basic_ostream<_CharT, _Traits>::sentry:: 6011: sentry(basic_ostream<_CharT, _Traits>& __os) 6011: : _M_ok(false), _M_os(__os) 6011: { 6011: 6011: if (__os.tie() && __os.good()) 6011: __os.tie()->flush(); 6011: 6011: if (__os.good()) 6011: _M_ok = true; 6011: else 6011: __os.setstate(ios_base::failbit); 6011: } 6011: 6011: template 6011: template 6011: basic_ostream<_CharT, _Traits>& 6011: basic_ostream<_CharT, _Traits>:: 6011: _M_insert(_ValueT __v) 6011: { 6011: sentry __cerb(*this); 6011: if (__cerb) 6011: { 6011: ios_base::iostate __err = ios_base::goodbit; 6011: try 6011: { 6011: const __num_put_type& __np = __check_facet(this->_M_num_put); 6011: if (__np.put(*this, *this, this->fill(), __v).failed()) 6011: __err |= ios_base::badbit; 6011: } 6011: catch(__cxxabiv1::__forced_unwind&) 6011: { 6011: this->_M_setstate(ios_base::badbit); 6011: throw; 6011: } 6011: catch(...) 6011: { this->_M_setstate(ios_base::badbit); } 6011: if (__err) 6011: this->setstate(__err); 6011: } 6011: return *this; 6011: } 6011: 6011: template 6011: basic_ostream<_CharT, _Traits>& 6011: basic_ostream<_CharT, _Traits>:: 6011: operator<<(short __n) 6011: { 6011: 6011: 6011: const ios_base::fmtflags __fmt = this->flags() & ios_base::basefield; 6011: if (__fmt == ios_base::oct || __fmt == ios_base::hex) 6011: return _M_insert(static_cast(static_cast(__n))); 6011: else 6011: return _M_insert(static_cast(__n)); 6011: } 6011: 6011: template 6011: basic_ostream<_CharT, _Traits>& 6011: basic_ostream<_CharT, _Traits>:: 6011: operator<<(int __n) 6011: { 6011: 6011: 6011: const ios_base::fmtflags __fmt = this->flags() & ios_base::basefield; 6011: if (__fmt == ios_base::oct || __fmt == ios_base::hex) 6011: return _M_insert(static_cast(static_cast(__n))); 6011: else 6011: return _M_insert(static_cast(__n)); 6011: } 6011: 6011: template 6011: basic_ostream<_CharT, _Traits>& 6011: basic_ostream<_CharT, _Traits>:: 6011: operator<<(__streambuf_type* __sbin) 6011: { 6011: ios_base::iostate __err = ios_base::goodbit; 6011: sentry __cerb(*this); 6011: if (__cerb && __sbin) 6011: { 6011: try 6011: { 6011: if (!__copy_streambufs(__sbin, this->rdbuf())) 6011: __err |= ios_base::failbit; 6011: } 6011: catch(__cxxabiv1::__forced_unwind&) 6011: { 6011: this->_M_setstate(ios_base::badbit); 6011: throw; 6011: } 6011: catch(...) 6011: { this->_M_setstate(ios_base::failbit); } 6011: } 6011: else if (!__sbin) 6011: __err |= ios_base::badbit; 6011: if (__err) 6011: this->setstate(__err); 6011: return *this; 6011: } 6011: 6011: template 6011: basic_ostream<_CharT, _Traits>& 6011: basic_ostream<_CharT, _Traits>:: 6011: put(char_type __c) 6011: { 6011: 6011: 6011: 6011: 6011: 6011: 6011: sentry __cerb(*this); 6011: if (__cerb) 6011: { 6011: ios_base::iostate __err = ios_base::goodbit; 6011: try 6011: { 6011: const int_type __put = this->rdbuf()->sputc(__c); 6011: if (traits_type::eq_int_type(__put, traits_type::eof())) 6011: __err |= ios_base::badbit; 6011: } 6011: catch(__cxxabiv1::__forced_unwind&) 6011: { 6011: this->_M_setstate(ios_base::badbit); 6011: throw; 6011: } 6011: catch(...) 6011: { this->_M_setstate(ios_base::badbit); } 6011: if (__err) 6011: this->setstate(__err); 6011: } 6011: return *this; 6011: } 6011: 6011: template 6011: basic_ostream<_CharT, _Traits>& 6011: basic_ostream<_CharT, _Traits>:: 6011: write(const _CharT* __s, streamsize __n) 6011: { 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: sentry __cerb(*this); 6011: if (__cerb) 6011: { 6011: try 6011: { _M_write(__s, __n); } 6011: catch(__cxxabiv1::__forced_unwind&) 6011: { 6011: this->_M_setstate(ios_base::badbit); 6011: throw; 6011: } 6011: catch(...) 6011: { this->_M_setstate(ios_base::badbit); } 6011: } 6011: return *this; 6011: } 6011: 6011: template 6011: basic_ostream<_CharT, _Traits>& 6011: basic_ostream<_CharT, _Traits>:: 6011: flush() 6011: { 6011: 6011: 6011: 6011: ios_base::iostate __err = ios_base::goodbit; 6011: try 6011: { 6011: if (this->rdbuf() && this->rdbuf()->pubsync() == -1) 6011: __err |= ios_base::badbit; 6011: } 6011: catch(__cxxabiv1::__forced_unwind&) 6011: { 6011: this->_M_setstate(ios_base::badbit); 6011: throw; 6011: } 6011: catch(...) 6011: { this->_M_setstate(ios_base::badbit); } 6011: if (__err) 6011: this->setstate(__err); 6011: return *this; 6011: } 6011: 6011: template 6011: typename basic_ostream<_CharT, _Traits>::pos_type 6011: basic_ostream<_CharT, _Traits>:: 6011: tellp() 6011: { 6011: pos_type __ret = pos_type(-1); 6011: try 6011: { 6011: if (!this->fail()) 6011: __ret = this->rdbuf()->pubseekoff(0, ios_base::cur, ios_base::out); 6011: } 6011: catch(__cxxabiv1::__forced_unwind&) 6011: { 6011: this->_M_setstate(ios_base::badbit); 6011: throw; 6011: } 6011: catch(...) 6011: { this->_M_setstate(ios_base::badbit); } 6011: return __ret; 6011: } 6011: 6011: template 6011: basic_ostream<_CharT, _Traits>& 6011: basic_ostream<_CharT, _Traits>:: 6011: seekp(pos_type __pos) 6011: { 6011: ios_base::iostate __err = ios_base::goodbit; 6011: try 6011: { 6011: if (!this->fail()) 6011: { 6011: 6011: 6011: const pos_type __p = this->rdbuf()->pubseekpos(__pos, 6011: ios_base::out); 6011: 6011: 6011: if (__p == pos_type(off_type(-1))) 6011: __err |= ios_base::failbit; 6011: } 6011: } 6011: catch(__cxxabiv1::__forced_unwind&) 6011: { 6011: this->_M_setstate(ios_base::badbit); 6011: throw; 6011: } 6011: catch(...) 6011: { this->_M_setstate(ios_base::badbit); } 6011: if (__err) 6011: this->setstate(__err); 6011: return *this; 6011: } 6011: 6011: template 6011: basic_ostream<_CharT, _Traits>& 6011: basic_ostream<_CharT, _Traits>:: 6011: seekp(off_type __off, ios_base::seekdir __dir) 6011: { 6011: ios_base::iostate __err = ios_base::goodbit; 6011: try 6011: { 6011: if (!this->fail()) 6011: { 6011: 6011: 6011: const pos_type __p = this->rdbuf()->pubseekoff(__off, __dir, 6011: ios_base::out); 6011: 6011: 6011: if (__p == pos_type(off_type(-1))) 6011: __err |= ios_base::failbit; 6011: } 6011: } 6011: catch(__cxxabiv1::__forced_unwind&) 6011: { 6011: this->_M_setstate(ios_base::badbit); 6011: throw; 6011: } 6011: catch(...) 6011: { this->_M_setstate(ios_base::badbit); } 6011: if (__err) 6011: this->setstate(__err); 6011: return *this; 6011: } 6011: 6011: template 6011: basic_ostream<_CharT, _Traits>& 6011: operator<<(basic_ostream<_CharT, _Traits>& __out, const char* __s) 6011: { 6011: if (!__s) 6011: __out.setstate(ios_base::badbit); 6011: else 6011: { 6011: 6011: 6011: const size_t __clen = char_traits::length(__s); 6011: try 6011: { 6011: struct __ptr_guard 6011: { 6011: _CharT *__p; 6011: __ptr_guard (_CharT *__ip): __p(__ip) { } 6011: ~__ptr_guard() { delete[] __p; } 6011: _CharT* __get() { return __p; } 6011: } __pg (new _CharT[__clen]); 6011: 6011: _CharT *__ws = __pg.__get(); 6011: for (size_t __i = 0; __i < __clen; ++__i) 6011: __ws[__i] = __out.widen(__s[__i]); 6011: __ostream_insert(__out, __ws, __clen); 6011: } 6011: catch(__cxxabiv1::__forced_unwind&) 6011: { 6011: __out._M_setstate(ios_base::badbit); 6011: throw; 6011: } 6011: catch(...) 6011: { __out._M_setstate(ios_base::badbit); } 6011: } 6011: return __out; 6011: } 6011: 6011: 6011: 6011: 6011: extern template class basic_ostream; 6011: extern template ostream& endl(ostream&); 6011: extern template ostream& ends(ostream&); 6011: extern template ostream& flush(ostream&); 6011: extern template ostream& operator<<(ostream&, char); 6011: extern template ostream& operator<<(ostream&, unsigned char); 6011: extern template ostream& operator<<(ostream&, signed char); 6011: extern template ostream& operator<<(ostream&, const char*); 6011: extern template ostream& operator<<(ostream&, const unsigned char*); 6011: extern template ostream& operator<<(ostream&, const signed char*); 6011: 6011: extern template ostream& ostream::_M_insert(long); 6011: extern template ostream& ostream::_M_insert(unsigned long); 6011: extern template ostream& ostream::_M_insert(bool); 6011: 6011: extern template ostream& ostream::_M_insert(long long); 6011: extern template ostream& ostream::_M_insert(unsigned long long); 6011: 6011: extern template ostream& ostream::_M_insert(double); 6011: extern template ostream& ostream::_M_insert(long double); 6011: extern template ostream& ostream::_M_insert(const void*); 6011: 6011: 6011: extern template class basic_ostream; 6011: extern template wostream& endl(wostream&); 6011: extern template wostream& ends(wostream&); 6011: extern template wostream& flush(wostream&); 6011: extern template wostream& operator<<(wostream&, wchar_t); 6011: extern template wostream& operator<<(wostream&, char); 6011: extern template wostream& operator<<(wostream&, const wchar_t*); 6011: extern template wostream& operator<<(wostream&, const char*); 6011: 6011: extern template wostream& wostream::_M_insert(long); 6011: extern template wostream& wostream::_M_insert(unsigned long); 6011: extern template wostream& wostream::_M_insert(bool); 6011: 6011: extern template wostream& wostream::_M_insert(long long); 6011: extern template wostream& wostream::_M_insert(unsigned long long); 6011: 6011: extern template wostream& wostream::_M_insert(double); 6011: extern template wostream& wostream::_M_insert(long double); 6011: extern template wostream& wostream::_M_insert(const void*); 6011: 6011: 6011: 6011: 6011: } 6011: # 694 "/usr/include/c++/8/ostream" 2 3 6011: # 65 "/usr/include/c++/8/iterator" 2 3 6011: # 1 "/usr/include/c++/8/istream" 1 3 6011: # 36 "/usr/include/c++/8/istream" 3 6011: 6011: # 37 "/usr/include/c++/8/istream" 3 6011: 6011: 6011: 6011: 6011: namespace std __attribute__ ((__visibility__ ("default"))) 6011: { 6011: 6011: # 57 "/usr/include/c++/8/istream" 3 6011: template 6011: class basic_istream : virtual public basic_ios<_CharT, _Traits> 6011: { 6011: public: 6011: 6011: typedef _CharT char_type; 6011: typedef typename _Traits::int_type int_type; 6011: typedef typename _Traits::pos_type pos_type; 6011: typedef typename _Traits::off_type off_type; 6011: typedef _Traits traits_type; 6011: 6011: 6011: typedef basic_streambuf<_CharT, _Traits> __streambuf_type; 6011: typedef basic_ios<_CharT, _Traits> __ios_type; 6011: typedef basic_istream<_CharT, _Traits> __istream_type; 6011: typedef num_get<_CharT, istreambuf_iterator<_CharT, _Traits> > 6011: __num_get_type; 6011: typedef ctype<_CharT> __ctype_type; 6011: 6011: protected: 6011: 6011: 6011: 6011: 6011: 6011: streamsize _M_gcount; 6011: 6011: public: 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: explicit 6011: basic_istream(__streambuf_type* __sb) 6011: : _M_gcount(streamsize(0)) 6011: { this->init(__sb); } 6011: 6011: 6011: 6011: 6011: 6011: 6011: virtual 6011: ~basic_istream() 6011: { _M_gcount = streamsize(0); } 6011: 6011: 6011: class sentry; 6011: friend class sentry; 6011: # 119 "/usr/include/c++/8/istream" 3 6011: __istream_type& 6011: operator>>(__istream_type& (*__pf)(__istream_type&)) 6011: { return __pf(*this); } 6011: 6011: __istream_type& 6011: operator>>(__ios_type& (*__pf)(__ios_type&)) 6011: { 6011: __pf(*this); 6011: return *this; 6011: } 6011: 6011: __istream_type& 6011: operator>>(ios_base& (*__pf)(ios_base&)) 6011: { 6011: __pf(*this); 6011: return *this; 6011: } 6011: # 167 "/usr/include/c++/8/istream" 3 6011: __istream_type& 6011: operator>>(bool& __n) 6011: { return _M_extract(__n); } 6011: 6011: __istream_type& 6011: operator>>(short& __n); 6011: 6011: __istream_type& 6011: operator>>(unsigned short& __n) 6011: { return _M_extract(__n); } 6011: 6011: __istream_type& 6011: operator>>(int& __n); 6011: 6011: __istream_type& 6011: operator>>(unsigned int& __n) 6011: { return _M_extract(__n); } 6011: 6011: __istream_type& 6011: operator>>(long& __n) 6011: { return _M_extract(__n); } 6011: 6011: __istream_type& 6011: operator>>(unsigned long& __n) 6011: { return _M_extract(__n); } 6011: 6011: 6011: __istream_type& 6011: operator>>(long long& __n) 6011: { return _M_extract(__n); } 6011: 6011: __istream_type& 6011: operator>>(unsigned long long& __n) 6011: { return _M_extract(__n); } 6011: # 213 "/usr/include/c++/8/istream" 3 6011: __istream_type& 6011: operator>>(float& __f) 6011: { return _M_extract(__f); } 6011: 6011: __istream_type& 6011: operator>>(double& __f) 6011: { return _M_extract(__f); } 6011: 6011: __istream_type& 6011: operator>>(long double& __f) 6011: { return _M_extract(__f); } 6011: # 234 "/usr/include/c++/8/istream" 3 6011: __istream_type& 6011: operator>>(void*& __p) 6011: { return _M_extract(__p); } 6011: # 258 "/usr/include/c++/8/istream" 3 6011: __istream_type& 6011: operator>>(__streambuf_type* __sb); 6011: # 268 "/usr/include/c++/8/istream" 3 6011: streamsize 6011: gcount() const 6011: { return _M_gcount; } 6011: # 301 "/usr/include/c++/8/istream" 3 6011: int_type 6011: get(); 6011: # 315 "/usr/include/c++/8/istream" 3 6011: __istream_type& 6011: get(char_type& __c); 6011: # 342 "/usr/include/c++/8/istream" 3 6011: __istream_type& 6011: get(char_type* __s, streamsize __n, char_type __delim); 6011: # 353 "/usr/include/c++/8/istream" 3 6011: __istream_type& 6011: get(char_type* __s, streamsize __n) 6011: { return this->get(__s, __n, this->widen('\n')); } 6011: # 376 "/usr/include/c++/8/istream" 3 6011: __istream_type& 6011: get(__streambuf_type& __sb, char_type __delim); 6011: # 386 "/usr/include/c++/8/istream" 3 6011: __istream_type& 6011: get(__streambuf_type& __sb) 6011: { return this->get(__sb, this->widen('\n')); } 6011: # 415 "/usr/include/c++/8/istream" 3 6011: __istream_type& 6011: getline(char_type* __s, streamsize __n, char_type __delim); 6011: # 426 "/usr/include/c++/8/istream" 3 6011: __istream_type& 6011: getline(char_type* __s, streamsize __n) 6011: { return this->getline(__s, __n, this->widen('\n')); } 6011: # 450 "/usr/include/c++/8/istream" 3 6011: __istream_type& 6011: ignore(streamsize __n, int_type __delim); 6011: 6011: __istream_type& 6011: ignore(streamsize __n); 6011: 6011: __istream_type& 6011: ignore(); 6011: # 467 "/usr/include/c++/8/istream" 3 6011: int_type 6011: peek(); 6011: # 485 "/usr/include/c++/8/istream" 3 6011: __istream_type& 6011: read(char_type* __s, streamsize __n); 6011: # 504 "/usr/include/c++/8/istream" 3 6011: streamsize 6011: readsome(char_type* __s, streamsize __n); 6011: # 521 "/usr/include/c++/8/istream" 3 6011: __istream_type& 6011: putback(char_type __c); 6011: # 537 "/usr/include/c++/8/istream" 3 6011: __istream_type& 6011: unget(); 6011: # 555 "/usr/include/c++/8/istream" 3 6011: int 6011: sync(); 6011: # 570 "/usr/include/c++/8/istream" 3 6011: pos_type 6011: tellg(); 6011: # 585 "/usr/include/c++/8/istream" 3 6011: __istream_type& 6011: seekg(pos_type); 6011: # 601 "/usr/include/c++/8/istream" 3 6011: __istream_type& 6011: seekg(off_type, ios_base::seekdir); 6011: 6011: 6011: protected: 6011: basic_istream() 6011: : _M_gcount(streamsize(0)) 6011: { this->init(0); } 6011: 6011: 6011: basic_istream(const basic_istream&) = delete; 6011: 6011: basic_istream(basic_istream&& __rhs) 6011: : __ios_type(), _M_gcount(__rhs._M_gcount) 6011: { 6011: __ios_type::move(__rhs); 6011: __rhs._M_gcount = 0; 6011: } 6011: 6011: 6011: 6011: basic_istream& operator=(const basic_istream&) = delete; 6011: 6011: basic_istream& 6011: operator=(basic_istream&& __rhs) 6011: { 6011: swap(__rhs); 6011: return *this; 6011: } 6011: 6011: void 6011: swap(basic_istream& __rhs) 6011: { 6011: __ios_type::swap(__rhs); 6011: std::swap(_M_gcount, __rhs._M_gcount); 6011: } 6011: 6011: 6011: template 6011: __istream_type& 6011: _M_extract(_ValueT& __v); 6011: }; 6011: 6011: 6011: template<> 6011: basic_istream& 6011: basic_istream:: 6011: getline(char_type* __s, streamsize __n, char_type __delim); 6011: 6011: template<> 6011: basic_istream& 6011: basic_istream:: 6011: ignore(streamsize __n); 6011: 6011: template<> 6011: basic_istream& 6011: basic_istream:: 6011: ignore(streamsize __n, int_type __delim); 6011: 6011: 6011: template<> 6011: basic_istream& 6011: basic_istream:: 6011: getline(char_type* __s, streamsize __n, char_type __delim); 6011: 6011: template<> 6011: basic_istream& 6011: basic_istream:: 6011: ignore(streamsize __n); 6011: 6011: template<> 6011: basic_istream& 6011: basic_istream:: 6011: ignore(streamsize __n, int_type __delim); 6011: # 685 "/usr/include/c++/8/istream" 3 6011: template 6011: class basic_istream<_CharT, _Traits>::sentry 6011: { 6011: 6011: bool _M_ok; 6011: 6011: public: 6011: 6011: typedef _Traits traits_type; 6011: typedef basic_streambuf<_CharT, _Traits> __streambuf_type; 6011: typedef basic_istream<_CharT, _Traits> __istream_type; 6011: typedef typename __istream_type::__ctype_type __ctype_type; 6011: typedef typename _Traits::int_type __int_type; 6011: # 721 "/usr/include/c++/8/istream" 3 6011: explicit 6011: sentry(basic_istream<_CharT, _Traits>& __is, bool __noskipws = false); 6011: # 732 "/usr/include/c++/8/istream" 3 6011: explicit 6011: 6011: operator bool() const 6011: { return _M_ok; } 6011: }; 6011: # 750 "/usr/include/c++/8/istream" 3 6011: template 6011: basic_istream<_CharT, _Traits>& 6011: operator>>(basic_istream<_CharT, _Traits>& __in, _CharT& __c); 6011: 6011: template 6011: inline basic_istream& 6011: operator>>(basic_istream& __in, unsigned char& __c) 6011: { return (__in >> reinterpret_cast(__c)); } 6011: 6011: template 6011: inline basic_istream& 6011: operator>>(basic_istream& __in, signed char& __c) 6011: { return (__in >> reinterpret_cast(__c)); } 6011: # 792 "/usr/include/c++/8/istream" 3 6011: template 6011: basic_istream<_CharT, _Traits>& 6011: operator>>(basic_istream<_CharT, _Traits>& __in, _CharT* __s); 6011: 6011: 6011: template<> 6011: basic_istream& 6011: operator>>(basic_istream& __in, char* __s); 6011: 6011: template 6011: inline basic_istream& 6011: operator>>(basic_istream& __in, unsigned char* __s) 6011: { return (__in >> reinterpret_cast(__s)); } 6011: 6011: template 6011: inline basic_istream& 6011: operator>>(basic_istream& __in, signed char* __s) 6011: { return (__in >> reinterpret_cast(__s)); } 6011: # 823 "/usr/include/c++/8/istream" 3 6011: template 6011: class basic_iostream 6011: : public basic_istream<_CharT, _Traits>, 6011: public basic_ostream<_CharT, _Traits> 6011: { 6011: public: 6011: 6011: 6011: 6011: typedef _CharT char_type; 6011: typedef typename _Traits::int_type int_type; 6011: typedef typename _Traits::pos_type pos_type; 6011: typedef typename _Traits::off_type off_type; 6011: typedef _Traits traits_type; 6011: 6011: 6011: typedef basic_istream<_CharT, _Traits> __istream_type; 6011: typedef basic_ostream<_CharT, _Traits> __ostream_type; 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: explicit 6011: basic_iostream(basic_streambuf<_CharT, _Traits>* __sb) 6011: : __istream_type(__sb), __ostream_type(__sb) { } 6011: 6011: 6011: 6011: 6011: virtual 6011: ~basic_iostream() { } 6011: 6011: protected: 6011: basic_iostream() 6011: : __istream_type(), __ostream_type() { } 6011: 6011: 6011: basic_iostream(const basic_iostream&) = delete; 6011: 6011: basic_iostream(basic_iostream&& __rhs) 6011: : __istream_type(std::move(__rhs)), __ostream_type(*this) 6011: { } 6011: 6011: 6011: 6011: basic_iostream& operator=(const basic_iostream&) = delete; 6011: 6011: basic_iostream& 6011: operator=(basic_iostream&& __rhs) 6011: { 6011: swap(__rhs); 6011: return *this; 6011: } 6011: 6011: void 6011: swap(basic_iostream& __rhs) 6011: { __istream_type::swap(__rhs); } 6011: 6011: }; 6011: # 906 "/usr/include/c++/8/istream" 3 6011: template 6011: basic_istream<_CharT, _Traits>& 6011: ws(basic_istream<_CharT, _Traits>& __is); 6011: 6011: 6011: template 6011: basic_istream<_Ch, _Up>& 6011: __is_convertible_to_basic_istream_test(basic_istream<_Ch, _Up>*); 6011: 6011: template 6011: struct __is_convertible_to_basic_istream_impl 6011: { 6011: using __istream_type = void; 6011: }; 6011: 6011: template 6011: using __do_is_convertible_to_basic_istream_impl = 6011: decltype(__is_convertible_to_basic_istream_test 6011: (declval::type*>())); 6011: 6011: template 6011: struct __is_convertible_to_basic_istream_impl 6011: <_Tp, 6011: __void_t<__do_is_convertible_to_basic_istream_impl<_Tp>>> 6011: { 6011: using __istream_type = 6011: __do_is_convertible_to_basic_istream_impl<_Tp>; 6011: }; 6011: 6011: template 6011: struct __is_convertible_to_basic_istream 6011: : __is_convertible_to_basic_istream_impl<_Tp> 6011: { 6011: public: 6011: using type = __not_::__istream_type>>; 6011: constexpr static bool value = type::value; 6011: }; 6011: 6011: template 6011: struct __is_extractable : false_type {}; 6011: 6011: template 6011: struct __is_extractable<_Istream, _Tp, 6011: __void_t() 6011: >> declval<_Tp>())>> 6011: : true_type {}; 6011: 6011: template 6011: using __rvalue_istream_type = 6011: typename __is_convertible_to_basic_istream< 6011: _Istream>::__istream_type; 6011: # 972 "/usr/include/c++/8/istream" 3 6011: template 6011: inline 6011: typename enable_if<__and_<__not_>, 6011: __is_convertible_to_basic_istream<_Istream>, 6011: __is_extractable< 6011: __rvalue_istream_type<_Istream>, 6011: _Tp&&>>::value, 6011: __rvalue_istream_type<_Istream>>::type 6011: operator>>(_Istream&& __is, _Tp&& __x) 6011: { 6011: __rvalue_istream_type<_Istream> __ret_is = __is; 6011: __ret_is >> std::forward<_Tp>(__x); 6011: return __ret_is; 6011: } 6011: 6011: 6011: 6011: } 6011: 6011: # 1 "/usr/include/c++/8/bits/istream.tcc" 1 3 6011: # 37 "/usr/include/c++/8/bits/istream.tcc" 3 6011: 6011: # 38 "/usr/include/c++/8/bits/istream.tcc" 3 6011: 6011: 6011: 6011: namespace std __attribute__ ((__visibility__ ("default"))) 6011: { 6011: 6011: 6011: template 6011: basic_istream<_CharT, _Traits>::sentry:: 6011: sentry(basic_istream<_CharT, _Traits>& __in, bool __noskip) : _M_ok(false) 6011: { 6011: ios_base::iostate __err = ios_base::goodbit; 6011: if (__in.good()) 6011: try 6011: { 6011: if (__in.tie()) 6011: __in.tie()->flush(); 6011: if (!__noskip && bool(__in.flags() & ios_base::skipws)) 6011: { 6011: const __int_type __eof = traits_type::eof(); 6011: __streambuf_type* __sb = __in.rdbuf(); 6011: __int_type __c = __sb->sgetc(); 6011: 6011: const __ctype_type& __ct = __check_facet(__in._M_ctype); 6011: while (!traits_type::eq_int_type(__c, __eof) 6011: && __ct.is(ctype_base::space, 6011: traits_type::to_char_type(__c))) 6011: __c = __sb->snextc(); 6011: 6011: 6011: 6011: 6011: if (traits_type::eq_int_type(__c, __eof)) 6011: __err |= ios_base::eofbit; 6011: } 6011: } 6011: catch(__cxxabiv1::__forced_unwind&) 6011: { 6011: __in._M_setstate(ios_base::badbit); 6011: throw; 6011: } 6011: catch(...) 6011: { __in._M_setstate(ios_base::badbit); } 6011: 6011: if (__in.good() && __err == ios_base::goodbit) 6011: _M_ok = true; 6011: else 6011: { 6011: __err |= ios_base::failbit; 6011: __in.setstate(__err); 6011: } 6011: } 6011: 6011: template 6011: template 6011: basic_istream<_CharT, _Traits>& 6011: basic_istream<_CharT, _Traits>:: 6011: _M_extract(_ValueT& __v) 6011: { 6011: sentry __cerb(*this, false); 6011: if (__cerb) 6011: { 6011: ios_base::iostate __err = ios_base::goodbit; 6011: try 6011: { 6011: const __num_get_type& __ng = __check_facet(this->_M_num_get); 6011: __ng.get(*this, 0, *this, __err, __v); 6011: } 6011: catch(__cxxabiv1::__forced_unwind&) 6011: { 6011: this->_M_setstate(ios_base::badbit); 6011: throw; 6011: } 6011: catch(...) 6011: { this->_M_setstate(ios_base::badbit); } 6011: if (__err) 6011: this->setstate(__err); 6011: } 6011: return *this; 6011: } 6011: 6011: template 6011: basic_istream<_CharT, _Traits>& 6011: basic_istream<_CharT, _Traits>:: 6011: operator>>(short& __n) 6011: { 6011: 6011: 6011: sentry __cerb(*this, false); 6011: if (__cerb) 6011: { 6011: ios_base::iostate __err = ios_base::goodbit; 6011: try 6011: { 6011: long __l; 6011: const __num_get_type& __ng = __check_facet(this->_M_num_get); 6011: __ng.get(*this, 0, *this, __err, __l); 6011: 6011: 6011: 6011: if (__l < __gnu_cxx::__numeric_traits::__min) 6011: { 6011: __err |= ios_base::failbit; 6011: __n = __gnu_cxx::__numeric_traits::__min; 6011: } 6011: else if (__l > __gnu_cxx::__numeric_traits::__max) 6011: { 6011: __err |= ios_base::failbit; 6011: __n = __gnu_cxx::__numeric_traits::__max; 6011: } 6011: else 6011: __n = short(__l); 6011: } 6011: catch(__cxxabiv1::__forced_unwind&) 6011: { 6011: this->_M_setstate(ios_base::badbit); 6011: throw; 6011: } 6011: catch(...) 6011: { this->_M_setstate(ios_base::badbit); } 6011: if (__err) 6011: this->setstate(__err); 6011: } 6011: return *this; 6011: } 6011: 6011: template 6011: basic_istream<_CharT, _Traits>& 6011: basic_istream<_CharT, _Traits>:: 6011: operator>>(int& __n) 6011: { 6011: 6011: 6011: sentry __cerb(*this, false); 6011: if (__cerb) 6011: { 6011: ios_base::iostate __err = ios_base::goodbit; 6011: try 6011: { 6011: long __l; 6011: const __num_get_type& __ng = __check_facet(this->_M_num_get); 6011: __ng.get(*this, 0, *this, __err, __l); 6011: 6011: 6011: 6011: if (__l < __gnu_cxx::__numeric_traits::__min) 6011: { 6011: __err |= ios_base::failbit; 6011: __n = __gnu_cxx::__numeric_traits::__min; 6011: } 6011: else if (__l > __gnu_cxx::__numeric_traits::__max) 6011: { 6011: __err |= ios_base::failbit; 6011: __n = __gnu_cxx::__numeric_traits::__max; 6011: } 6011: else 6011: __n = int(__l); 6011: } 6011: catch(__cxxabiv1::__forced_unwind&) 6011: { 6011: this->_M_setstate(ios_base::badbit); 6011: throw; 6011: } 6011: catch(...) 6011: { this->_M_setstate(ios_base::badbit); } 6011: if (__err) 6011: this->setstate(__err); 6011: } 6011: return *this; 6011: } 6011: 6011: template 6011: basic_istream<_CharT, _Traits>& 6011: basic_istream<_CharT, _Traits>:: 6011: operator>>(__streambuf_type* __sbout) 6011: { 6011: ios_base::iostate __err = ios_base::goodbit; 6011: sentry __cerb(*this, false); 6011: if (__cerb && __sbout) 6011: { 6011: try 6011: { 6011: bool __ineof; 6011: if (!__copy_streambufs_eof(this->rdbuf(), __sbout, __ineof)) 6011: __err |= ios_base::failbit; 6011: if (__ineof) 6011: __err |= ios_base::eofbit; 6011: } 6011: catch(__cxxabiv1::__forced_unwind&) 6011: { 6011: this->_M_setstate(ios_base::failbit); 6011: throw; 6011: } 6011: catch(...) 6011: { this->_M_setstate(ios_base::failbit); } 6011: } 6011: else if (!__sbout) 6011: __err |= ios_base::failbit; 6011: if (__err) 6011: this->setstate(__err); 6011: return *this; 6011: } 6011: 6011: template 6011: typename basic_istream<_CharT, _Traits>::int_type 6011: basic_istream<_CharT, _Traits>:: 6011: get(void) 6011: { 6011: const int_type __eof = traits_type::eof(); 6011: int_type __c = __eof; 6011: _M_gcount = 0; 6011: ios_base::iostate __err = ios_base::goodbit; 6011: sentry __cerb(*this, true); 6011: if (__cerb) 6011: { 6011: try 6011: { 6011: __c = this->rdbuf()->sbumpc(); 6011: 6011: if (!traits_type::eq_int_type(__c, __eof)) 6011: _M_gcount = 1; 6011: else 6011: __err |= ios_base::eofbit; 6011: } 6011: catch(__cxxabiv1::__forced_unwind&) 6011: { 6011: this->_M_setstate(ios_base::badbit); 6011: throw; 6011: } 6011: catch(...) 6011: { this->_M_setstate(ios_base::badbit); } 6011: } 6011: if (!_M_gcount) 6011: __err |= ios_base::failbit; 6011: if (__err) 6011: this->setstate(__err); 6011: return __c; 6011: } 6011: 6011: template 6011: basic_istream<_CharT, _Traits>& 6011: basic_istream<_CharT, _Traits>:: 6011: get(char_type& __c) 6011: { 6011: _M_gcount = 0; 6011: ios_base::iostate __err = ios_base::goodbit; 6011: sentry __cerb(*this, true); 6011: if (__cerb) 6011: { 6011: try 6011: { 6011: const int_type __cb = this->rdbuf()->sbumpc(); 6011: 6011: if (!traits_type::eq_int_type(__cb, traits_type::eof())) 6011: { 6011: _M_gcount = 1; 6011: __c = traits_type::to_char_type(__cb); 6011: } 6011: else 6011: __err |= ios_base::eofbit; 6011: } 6011: catch(__cxxabiv1::__forced_unwind&) 6011: { 6011: this->_M_setstate(ios_base::badbit); 6011: throw; 6011: } 6011: catch(...) 6011: { this->_M_setstate(ios_base::badbit); } 6011: } 6011: if (!_M_gcount) 6011: __err |= ios_base::failbit; 6011: if (__err) 6011: this->setstate(__err); 6011: return *this; 6011: } 6011: 6011: template 6011: basic_istream<_CharT, _Traits>& 6011: basic_istream<_CharT, _Traits>:: 6011: get(char_type* __s, streamsize __n, char_type __delim) 6011: { 6011: _M_gcount = 0; 6011: ios_base::iostate __err = ios_base::goodbit; 6011: sentry __cerb(*this, true); 6011: if (__cerb) 6011: { 6011: try 6011: { 6011: const int_type __idelim = traits_type::to_int_type(__delim); 6011: const int_type __eof = traits_type::eof(); 6011: __streambuf_type* __sb = this->rdbuf(); 6011: int_type __c = __sb->sgetc(); 6011: 6011: while (_M_gcount + 1 < __n 6011: && !traits_type::eq_int_type(__c, __eof) 6011: && !traits_type::eq_int_type(__c, __idelim)) 6011: { 6011: *__s++ = traits_type::to_char_type(__c); 6011: ++_M_gcount; 6011: __c = __sb->snextc(); 6011: } 6011: if (traits_type::eq_int_type(__c, __eof)) 6011: __err |= ios_base::eofbit; 6011: } 6011: catch(__cxxabiv1::__forced_unwind&) 6011: { 6011: this->_M_setstate(ios_base::badbit); 6011: throw; 6011: } 6011: catch(...) 6011: { this->_M_setstate(ios_base::badbit); } 6011: } 6011: 6011: 6011: if (__n > 0) 6011: *__s = char_type(); 6011: if (!_M_gcount) 6011: __err |= ios_base::failbit; 6011: if (__err) 6011: this->setstate(__err); 6011: return *this; 6011: } 6011: 6011: template 6011: basic_istream<_CharT, _Traits>& 6011: basic_istream<_CharT, _Traits>:: 6011: get(__streambuf_type& __sb, char_type __delim) 6011: { 6011: _M_gcount = 0; 6011: ios_base::iostate __err = ios_base::goodbit; 6011: sentry __cerb(*this, true); 6011: if (__cerb) 6011: { 6011: try 6011: { 6011: const int_type __idelim = traits_type::to_int_type(__delim); 6011: const int_type __eof = traits_type::eof(); 6011: __streambuf_type* __this_sb = this->rdbuf(); 6011: int_type __c = __this_sb->sgetc(); 6011: char_type __c2 = traits_type::to_char_type(__c); 6011: 6011: while (!traits_type::eq_int_type(__c, __eof) 6011: && !traits_type::eq_int_type(__c, __idelim) 6011: && !traits_type::eq_int_type(__sb.sputc(__c2), __eof)) 6011: { 6011: ++_M_gcount; 6011: __c = __this_sb->snextc(); 6011: __c2 = traits_type::to_char_type(__c); 6011: } 6011: if (traits_type::eq_int_type(__c, __eof)) 6011: __err |= ios_base::eofbit; 6011: } 6011: catch(__cxxabiv1::__forced_unwind&) 6011: { 6011: this->_M_setstate(ios_base::badbit); 6011: throw; 6011: } 6011: catch(...) 6011: { this->_M_setstate(ios_base::badbit); } 6011: } 6011: if (!_M_gcount) 6011: __err |= ios_base::failbit; 6011: if (__err) 6011: this->setstate(__err); 6011: return *this; 6011: } 6011: 6011: template 6011: basic_istream<_CharT, _Traits>& 6011: basic_istream<_CharT, _Traits>:: 6011: getline(char_type* __s, streamsize __n, char_type __delim) 6011: { 6011: _M_gcount = 0; 6011: ios_base::iostate __err = ios_base::goodbit; 6011: sentry __cerb(*this, true); 6011: if (__cerb) 6011: { 6011: try 6011: { 6011: const int_type __idelim = traits_type::to_int_type(__delim); 6011: const int_type __eof = traits_type::eof(); 6011: __streambuf_type* __sb = this->rdbuf(); 6011: int_type __c = __sb->sgetc(); 6011: 6011: while (_M_gcount + 1 < __n 6011: && !traits_type::eq_int_type(__c, __eof) 6011: && !traits_type::eq_int_type(__c, __idelim)) 6011: { 6011: *__s++ = traits_type::to_char_type(__c); 6011: __c = __sb->snextc(); 6011: ++_M_gcount; 6011: } 6011: if (traits_type::eq_int_type(__c, __eof)) 6011: __err |= ios_base::eofbit; 6011: else 6011: { 6011: if (traits_type::eq_int_type(__c, __idelim)) 6011: { 6011: __sb->sbumpc(); 6011: ++_M_gcount; 6011: } 6011: else 6011: __err |= ios_base::failbit; 6011: } 6011: } 6011: catch(__cxxabiv1::__forced_unwind&) 6011: { 6011: this->_M_setstate(ios_base::badbit); 6011: throw; 6011: } 6011: catch(...) 6011: { this->_M_setstate(ios_base::badbit); } 6011: } 6011: 6011: 6011: if (__n > 0) 6011: *__s = char_type(); 6011: if (!_M_gcount) 6011: __err |= ios_base::failbit; 6011: if (__err) 6011: this->setstate(__err); 6011: return *this; 6011: } 6011: 6011: 6011: 6011: 6011: template 6011: basic_istream<_CharT, _Traits>& 6011: basic_istream<_CharT, _Traits>:: 6011: ignore(void) 6011: { 6011: _M_gcount = 0; 6011: sentry __cerb(*this, true); 6011: if (__cerb) 6011: { 6011: ios_base::iostate __err = ios_base::goodbit; 6011: try 6011: { 6011: const int_type __eof = traits_type::eof(); 6011: __streambuf_type* __sb = this->rdbuf(); 6011: 6011: if (traits_type::eq_int_type(__sb->sbumpc(), __eof)) 6011: __err |= ios_base::eofbit; 6011: else 6011: _M_gcount = 1; 6011: } 6011: catch(__cxxabiv1::__forced_unwind&) 6011: { 6011: this->_M_setstate(ios_base::badbit); 6011: throw; 6011: } 6011: catch(...) 6011: { this->_M_setstate(ios_base::badbit); } 6011: if (__err) 6011: this->setstate(__err); 6011: } 6011: return *this; 6011: } 6011: 6011: template 6011: basic_istream<_CharT, _Traits>& 6011: basic_istream<_CharT, _Traits>:: 6011: ignore(streamsize __n) 6011: { 6011: _M_gcount = 0; 6011: sentry __cerb(*this, true); 6011: if (__cerb && __n > 0) 6011: { 6011: ios_base::iostate __err = ios_base::goodbit; 6011: try 6011: { 6011: const int_type __eof = traits_type::eof(); 6011: __streambuf_type* __sb = this->rdbuf(); 6011: int_type __c = __sb->sgetc(); 6011: # 521 "/usr/include/c++/8/bits/istream.tcc" 3 6011: bool __large_ignore = false; 6011: while (true) 6011: { 6011: while (_M_gcount < __n 6011: && !traits_type::eq_int_type(__c, __eof)) 6011: { 6011: ++_M_gcount; 6011: __c = __sb->snextc(); 6011: } 6011: if (__n == __gnu_cxx::__numeric_traits::__max 6011: && !traits_type::eq_int_type(__c, __eof)) 6011: { 6011: _M_gcount = 6011: __gnu_cxx::__numeric_traits::__min; 6011: __large_ignore = true; 6011: } 6011: else 6011: break; 6011: } 6011: 6011: if (__large_ignore) 6011: _M_gcount = __gnu_cxx::__numeric_traits::__max; 6011: 6011: if (traits_type::eq_int_type(__c, __eof)) 6011: __err |= ios_base::eofbit; 6011: } 6011: catch(__cxxabiv1::__forced_unwind&) 6011: { 6011: this->_M_setstate(ios_base::badbit); 6011: throw; 6011: } 6011: catch(...) 6011: { this->_M_setstate(ios_base::badbit); } 6011: if (__err) 6011: this->setstate(__err); 6011: } 6011: return *this; 6011: } 6011: 6011: template 6011: basic_istream<_CharT, _Traits>& 6011: basic_istream<_CharT, _Traits>:: 6011: ignore(streamsize __n, int_type __delim) 6011: { 6011: _M_gcount = 0; 6011: sentry __cerb(*this, true); 6011: if (__cerb && __n > 0) 6011: { 6011: ios_base::iostate __err = ios_base::goodbit; 6011: try 6011: { 6011: const int_type __eof = traits_type::eof(); 6011: __streambuf_type* __sb = this->rdbuf(); 6011: int_type __c = __sb->sgetc(); 6011: 6011: 6011: bool __large_ignore = false; 6011: while (true) 6011: { 6011: while (_M_gcount < __n 6011: && !traits_type::eq_int_type(__c, __eof) 6011: && !traits_type::eq_int_type(__c, __delim)) 6011: { 6011: ++_M_gcount; 6011: __c = __sb->snextc(); 6011: } 6011: if (__n == __gnu_cxx::__numeric_traits::__max 6011: && !traits_type::eq_int_type(__c, __eof) 6011: && !traits_type::eq_int_type(__c, __delim)) 6011: { 6011: _M_gcount = 6011: __gnu_cxx::__numeric_traits::__min; 6011: __large_ignore = true; 6011: } 6011: else 6011: break; 6011: } 6011: 6011: if (__large_ignore) 6011: _M_gcount = __gnu_cxx::__numeric_traits::__max; 6011: 6011: if (traits_type::eq_int_type(__c, __eof)) 6011: __err |= ios_base::eofbit; 6011: else if (traits_type::eq_int_type(__c, __delim)) 6011: { 6011: if (_M_gcount 6011: < __gnu_cxx::__numeric_traits::__max) 6011: ++_M_gcount; 6011: __sb->sbumpc(); 6011: } 6011: } 6011: catch(__cxxabiv1::__forced_unwind&) 6011: { 6011: this->_M_setstate(ios_base::badbit); 6011: throw; 6011: } 6011: catch(...) 6011: { this->_M_setstate(ios_base::badbit); } 6011: if (__err) 6011: this->setstate(__err); 6011: } 6011: return *this; 6011: } 6011: 6011: template 6011: typename basic_istream<_CharT, _Traits>::int_type 6011: basic_istream<_CharT, _Traits>:: 6011: peek(void) 6011: { 6011: int_type __c = traits_type::eof(); 6011: _M_gcount = 0; 6011: sentry __cerb(*this, true); 6011: if (__cerb) 6011: { 6011: ios_base::iostate __err = ios_base::goodbit; 6011: try 6011: { 6011: __c = this->rdbuf()->sgetc(); 6011: if (traits_type::eq_int_type(__c, traits_type::eof())) 6011: __err |= ios_base::eofbit; 6011: } 6011: catch(__cxxabiv1::__forced_unwind&) 6011: { 6011: this->_M_setstate(ios_base::badbit); 6011: throw; 6011: } 6011: catch(...) 6011: { this->_M_setstate(ios_base::badbit); } 6011: if (__err) 6011: this->setstate(__err); 6011: } 6011: return __c; 6011: } 6011: 6011: template 6011: basic_istream<_CharT, _Traits>& 6011: basic_istream<_CharT, _Traits>:: 6011: read(char_type* __s, streamsize __n) 6011: { 6011: _M_gcount = 0; 6011: sentry __cerb(*this, true); 6011: if (__cerb) 6011: { 6011: ios_base::iostate __err = ios_base::goodbit; 6011: try 6011: { 6011: _M_gcount = this->rdbuf()->sgetn(__s, __n); 6011: if (_M_gcount != __n) 6011: __err |= (ios_base::eofbit | ios_base::failbit); 6011: } 6011: catch(__cxxabiv1::__forced_unwind&) 6011: { 6011: this->_M_setstate(ios_base::badbit); 6011: throw; 6011: } 6011: catch(...) 6011: { this->_M_setstate(ios_base::badbit); } 6011: if (__err) 6011: this->setstate(__err); 6011: } 6011: return *this; 6011: } 6011: 6011: template 6011: streamsize 6011: basic_istream<_CharT, _Traits>:: 6011: readsome(char_type* __s, streamsize __n) 6011: { 6011: _M_gcount = 0; 6011: sentry __cerb(*this, true); 6011: if (__cerb) 6011: { 6011: ios_base::iostate __err = ios_base::goodbit; 6011: try 6011: { 6011: 6011: const streamsize __num = this->rdbuf()->in_avail(); 6011: if (__num > 0) 6011: _M_gcount = this->rdbuf()->sgetn(__s, std::min(__num, __n)); 6011: else if (__num == -1) 6011: __err |= ios_base::eofbit; 6011: } 6011: catch(__cxxabiv1::__forced_unwind&) 6011: { 6011: this->_M_setstate(ios_base::badbit); 6011: throw; 6011: } 6011: catch(...) 6011: { this->_M_setstate(ios_base::badbit); } 6011: if (__err) 6011: this->setstate(__err); 6011: } 6011: return _M_gcount; 6011: } 6011: 6011: template 6011: basic_istream<_CharT, _Traits>& 6011: basic_istream<_CharT, _Traits>:: 6011: putback(char_type __c) 6011: { 6011: 6011: 6011: _M_gcount = 0; 6011: 6011: this->clear(this->rdstate() & ~ios_base::eofbit); 6011: sentry __cerb(*this, true); 6011: if (__cerb) 6011: { 6011: ios_base::iostate __err = ios_base::goodbit; 6011: try 6011: { 6011: const int_type __eof = traits_type::eof(); 6011: __streambuf_type* __sb = this->rdbuf(); 6011: if (!__sb 6011: || traits_type::eq_int_type(__sb->sputbackc(__c), __eof)) 6011: __err |= ios_base::badbit; 6011: } 6011: catch(__cxxabiv1::__forced_unwind&) 6011: { 6011: this->_M_setstate(ios_base::badbit); 6011: throw; 6011: } 6011: catch(...) 6011: { this->_M_setstate(ios_base::badbit); } 6011: if (__err) 6011: this->setstate(__err); 6011: } 6011: return *this; 6011: } 6011: 6011: template 6011: basic_istream<_CharT, _Traits>& 6011: basic_istream<_CharT, _Traits>:: 6011: unget(void) 6011: { 6011: 6011: 6011: _M_gcount = 0; 6011: 6011: this->clear(this->rdstate() & ~ios_base::eofbit); 6011: sentry __cerb(*this, true); 6011: if (__cerb) 6011: { 6011: ios_base::iostate __err = ios_base::goodbit; 6011: try 6011: { 6011: const int_type __eof = traits_type::eof(); 6011: __streambuf_type* __sb = this->rdbuf(); 6011: if (!__sb 6011: || traits_type::eq_int_type(__sb->sungetc(), __eof)) 6011: __err |= ios_base::badbit; 6011: } 6011: catch(__cxxabiv1::__forced_unwind&) 6011: { 6011: this->_M_setstate(ios_base::badbit); 6011: throw; 6011: } 6011: catch(...) 6011: { this->_M_setstate(ios_base::badbit); } 6011: if (__err) 6011: this->setstate(__err); 6011: } 6011: return *this; 6011: } 6011: 6011: template 6011: int 6011: basic_istream<_CharT, _Traits>:: 6011: sync(void) 6011: { 6011: 6011: 6011: int __ret = -1; 6011: sentry __cerb(*this, true); 6011: if (__cerb) 6011: { 6011: ios_base::iostate __err = ios_base::goodbit; 6011: try 6011: { 6011: __streambuf_type* __sb = this->rdbuf(); 6011: if (__sb) 6011: { 6011: if (__sb->pubsync() == -1) 6011: __err |= ios_base::badbit; 6011: else 6011: __ret = 0; 6011: } 6011: } 6011: catch(__cxxabiv1::__forced_unwind&) 6011: { 6011: this->_M_setstate(ios_base::badbit); 6011: throw; 6011: } 6011: catch(...) 6011: { this->_M_setstate(ios_base::badbit); } 6011: if (__err) 6011: this->setstate(__err); 6011: } 6011: return __ret; 6011: } 6011: 6011: template 6011: typename basic_istream<_CharT, _Traits>::pos_type 6011: basic_istream<_CharT, _Traits>:: 6011: tellg(void) 6011: { 6011: 6011: 6011: pos_type __ret = pos_type(-1); 6011: sentry __cerb(*this, true); 6011: if (__cerb) 6011: { 6011: try 6011: { 6011: if (!this->fail()) 6011: __ret = this->rdbuf()->pubseekoff(0, ios_base::cur, 6011: ios_base::in); 6011: } 6011: catch(__cxxabiv1::__forced_unwind&) 6011: { 6011: this->_M_setstate(ios_base::badbit); 6011: throw; 6011: } 6011: catch(...) 6011: { this->_M_setstate(ios_base::badbit); } 6011: } 6011: return __ret; 6011: } 6011: 6011: template 6011: basic_istream<_CharT, _Traits>& 6011: basic_istream<_CharT, _Traits>:: 6011: seekg(pos_type __pos) 6011: { 6011: 6011: 6011: 6011: this->clear(this->rdstate() & ~ios_base::eofbit); 6011: sentry __cerb(*this, true); 6011: if (__cerb) 6011: { 6011: ios_base::iostate __err = ios_base::goodbit; 6011: try 6011: { 6011: if (!this->fail()) 6011: { 6011: 6011: const pos_type __p = this->rdbuf()->pubseekpos(__pos, 6011: ios_base::in); 6011: 6011: 6011: if (__p == pos_type(off_type(-1))) 6011: __err |= ios_base::failbit; 6011: } 6011: } 6011: catch(__cxxabiv1::__forced_unwind&) 6011: { 6011: this->_M_setstate(ios_base::badbit); 6011: throw; 6011: } 6011: catch(...) 6011: { this->_M_setstate(ios_base::badbit); } 6011: if (__err) 6011: this->setstate(__err); 6011: } 6011: return *this; 6011: } 6011: 6011: template 6011: basic_istream<_CharT, _Traits>& 6011: basic_istream<_CharT, _Traits>:: 6011: seekg(off_type __off, ios_base::seekdir __dir) 6011: { 6011: 6011: 6011: 6011: this->clear(this->rdstate() & ~ios_base::eofbit); 6011: sentry __cerb(*this, true); 6011: if (__cerb) 6011: { 6011: ios_base::iostate __err = ios_base::goodbit; 6011: try 6011: { 6011: if (!this->fail()) 6011: { 6011: 6011: const pos_type __p = this->rdbuf()->pubseekoff(__off, __dir, 6011: ios_base::in); 6011: 6011: 6011: if (__p == pos_type(off_type(-1))) 6011: __err |= ios_base::failbit; 6011: } 6011: } 6011: catch(__cxxabiv1::__forced_unwind&) 6011: { 6011: this->_M_setstate(ios_base::badbit); 6011: throw; 6011: } 6011: catch(...) 6011: { this->_M_setstate(ios_base::badbit); } 6011: if (__err) 6011: this->setstate(__err); 6011: } 6011: return *this; 6011: } 6011: 6011: 6011: template 6011: basic_istream<_CharT, _Traits>& 6011: operator>>(basic_istream<_CharT, _Traits>& __in, _CharT& __c) 6011: { 6011: typedef basic_istream<_CharT, _Traits> __istream_type; 6011: typedef typename __istream_type::int_type __int_type; 6011: 6011: typename __istream_type::sentry __cerb(__in, false); 6011: if (__cerb) 6011: { 6011: ios_base::iostate __err = ios_base::goodbit; 6011: try 6011: { 6011: const __int_type __cb = __in.rdbuf()->sbumpc(); 6011: if (!_Traits::eq_int_type(__cb, _Traits::eof())) 6011: __c = _Traits::to_char_type(__cb); 6011: else 6011: __err |= (ios_base::eofbit | ios_base::failbit); 6011: } 6011: catch(__cxxabiv1::__forced_unwind&) 6011: { 6011: __in._M_setstate(ios_base::badbit); 6011: throw; 6011: } 6011: catch(...) 6011: { __in._M_setstate(ios_base::badbit); } 6011: if (__err) 6011: __in.setstate(__err); 6011: } 6011: return __in; 6011: } 6011: 6011: template 6011: basic_istream<_CharT, _Traits>& 6011: operator>>(basic_istream<_CharT, _Traits>& __in, _CharT* __s) 6011: { 6011: typedef basic_istream<_CharT, _Traits> __istream_type; 6011: typedef basic_streambuf<_CharT, _Traits> __streambuf_type; 6011: typedef typename _Traits::int_type int_type; 6011: typedef _CharT char_type; 6011: typedef ctype<_CharT> __ctype_type; 6011: 6011: streamsize __extracted = 0; 6011: ios_base::iostate __err = ios_base::goodbit; 6011: typename __istream_type::sentry __cerb(__in, false); 6011: if (__cerb) 6011: { 6011: try 6011: { 6011: 6011: streamsize __num = __in.width(); 6011: if (__num <= 0) 6011: __num = __gnu_cxx::__numeric_traits::__max; 6011: 6011: const __ctype_type& __ct = use_facet<__ctype_type>(__in.getloc()); 6011: 6011: const int_type __eof = _Traits::eof(); 6011: __streambuf_type* __sb = __in.rdbuf(); 6011: int_type __c = __sb->sgetc(); 6011: 6011: while (__extracted < __num - 1 6011: && !_Traits::eq_int_type(__c, __eof) 6011: && !__ct.is(ctype_base::space, 6011: _Traits::to_char_type(__c))) 6011: { 6011: *__s++ = _Traits::to_char_type(__c); 6011: ++__extracted; 6011: __c = __sb->snextc(); 6011: } 6011: if (_Traits::eq_int_type(__c, __eof)) 6011: __err |= ios_base::eofbit; 6011: 6011: 6011: 6011: *__s = char_type(); 6011: __in.width(0); 6011: } 6011: catch(__cxxabiv1::__forced_unwind&) 6011: { 6011: __in._M_setstate(ios_base::badbit); 6011: throw; 6011: } 6011: catch(...) 6011: { __in._M_setstate(ios_base::badbit); } 6011: } 6011: if (!__extracted) 6011: __err |= ios_base::failbit; 6011: if (__err) 6011: __in.setstate(__err); 6011: return __in; 6011: } 6011: 6011: 6011: template 6011: basic_istream<_CharT, _Traits>& 6011: ws(basic_istream<_CharT, _Traits>& __in) 6011: { 6011: typedef basic_istream<_CharT, _Traits> __istream_type; 6011: typedef basic_streambuf<_CharT, _Traits> __streambuf_type; 6011: typedef typename __istream_type::int_type __int_type; 6011: typedef ctype<_CharT> __ctype_type; 6011: 6011: const __ctype_type& __ct = use_facet<__ctype_type>(__in.getloc()); 6011: const __int_type __eof = _Traits::eof(); 6011: __streambuf_type* __sb = __in.rdbuf(); 6011: __int_type __c = __sb->sgetc(); 6011: 6011: while (!_Traits::eq_int_type(__c, __eof) 6011: && __ct.is(ctype_base::space, _Traits::to_char_type(__c))) 6011: __c = __sb->snextc(); 6011: 6011: if (_Traits::eq_int_type(__c, __eof)) 6011: __in.setstate(ios_base::eofbit); 6011: return __in; 6011: } 6011: 6011: 6011: 6011: 6011: extern template class basic_istream; 6011: extern template istream& ws(istream&); 6011: extern template istream& operator>>(istream&, char&); 6011: extern template istream& operator>>(istream&, char*); 6011: extern template istream& operator>>(istream&, unsigned char&); 6011: extern template istream& operator>>(istream&, signed char&); 6011: extern template istream& operator>>(istream&, unsigned char*); 6011: extern template istream& operator>>(istream&, signed char*); 6011: 6011: extern template istream& istream::_M_extract(unsigned short&); 6011: extern template istream& istream::_M_extract(unsigned int&); 6011: extern template istream& istream::_M_extract(long&); 6011: extern template istream& istream::_M_extract(unsigned long&); 6011: extern template istream& istream::_M_extract(bool&); 6011: 6011: extern template istream& istream::_M_extract(long long&); 6011: extern template istream& istream::_M_extract(unsigned long long&); 6011: 6011: extern template istream& istream::_M_extract(float&); 6011: extern template istream& istream::_M_extract(double&); 6011: extern template istream& istream::_M_extract(long double&); 6011: extern template istream& istream::_M_extract(void*&); 6011: 6011: extern template class basic_iostream; 6011: 6011: 6011: extern template class basic_istream; 6011: extern template wistream& ws(wistream&); 6011: extern template wistream& operator>>(wistream&, wchar_t&); 6011: extern template wistream& operator>>(wistream&, wchar_t*); 6011: 6011: extern template wistream& wistream::_M_extract(unsigned short&); 6011: extern template wistream& wistream::_M_extract(unsigned int&); 6011: extern template wistream& wistream::_M_extract(long&); 6011: extern template wistream& wistream::_M_extract(unsigned long&); 6011: extern template wistream& wistream::_M_extract(bool&); 6011: 6011: extern template wistream& wistream::_M_extract(long long&); 6011: extern template wistream& wistream::_M_extract(unsigned long long&); 6011: 6011: extern template wistream& wistream::_M_extract(float&); 6011: extern template wistream& wistream::_M_extract(double&); 6011: extern template wistream& wistream::_M_extract(long double&); 6011: extern template wistream& wistream::_M_extract(void*&); 6011: 6011: extern template class basic_iostream; 6011: 6011: 6011: 6011: 6011: } 6011: # 992 "/usr/include/c++/8/istream" 2 3 6011: # 66 "/usr/include/c++/8/iterator" 2 3 6011: # 1 "/usr/include/c++/8/bits/stream_iterator.h" 1 3 6011: # 33 "/usr/include/c++/8/bits/stream_iterator.h" 3 6011: 6011: # 34 "/usr/include/c++/8/bits/stream_iterator.h" 3 6011: 6011: 6011: 6011: namespace std __attribute__ ((__visibility__ ("default"))) 6011: { 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: template, typename _Dist = ptrdiff_t> 6011: class istream_iterator 6011: : public iterator 6011: { 6011: public: 6011: typedef _CharT char_type; 6011: typedef _Traits traits_type; 6011: typedef basic_istream<_CharT, _Traits> istream_type; 6011: 6011: private: 6011: istream_type* _M_stream; 6011: _Tp _M_value; 6011: bool _M_ok; 6011: 6011: public: 6011: 6011: constexpr istream_iterator() 6011: : _M_stream(0), _M_value(), _M_ok(false) {} 6011: 6011: 6011: istream_iterator(istream_type& __s) 6011: : _M_stream(std::__addressof(__s)) 6011: { _M_read(); } 6011: 6011: istream_iterator(const istream_iterator& __obj) 6011: : _M_stream(__obj._M_stream), _M_value(__obj._M_value), 6011: _M_ok(__obj._M_ok) 6011: { } 6011: 6011: const _Tp& 6011: operator*() const 6011: { 6011: 6011: 6011: ; 6011: return _M_value; 6011: } 6011: 6011: const _Tp* 6011: operator->() const { return std::__addressof((operator*())); } 6011: 6011: istream_iterator& 6011: operator++() 6011: { 6011: 6011: 6011: ; 6011: _M_read(); 6011: return *this; 6011: } 6011: 6011: istream_iterator 6011: operator++(int) 6011: { 6011: 6011: 6011: ; 6011: istream_iterator __tmp = *this; 6011: _M_read(); 6011: return __tmp; 6011: } 6011: 6011: bool 6011: _M_equal(const istream_iterator& __x) const 6011: { return (_M_ok == __x._M_ok) && (!_M_ok || _M_stream == __x._M_stream); } 6011: 6011: private: 6011: void 6011: _M_read() 6011: { 6011: _M_ok = (_M_stream && *_M_stream) ? true : false; 6011: if (_M_ok) 6011: { 6011: *_M_stream >> _M_value; 6011: _M_ok = *_M_stream ? true : false; 6011: } 6011: } 6011: }; 6011: 6011: 6011: template 6011: inline bool 6011: operator==(const istream_iterator<_Tp, _CharT, _Traits, _Dist>& __x, 6011: const istream_iterator<_Tp, _CharT, _Traits, _Dist>& __y) 6011: { return __x._M_equal(__y); } 6011: 6011: 6011: template 6011: inline bool 6011: operator!=(const istream_iterator<_Tp, _CharT, _Traits, _Dist>& __x, 6011: const istream_iterator<_Tp, _CharT, _Traits, _Dist>& __y) 6011: { return !__x._M_equal(__y); } 6011: # 152 "/usr/include/c++/8/bits/stream_iterator.h" 3 6011: template > 6011: class ostream_iterator 6011: : public iterator 6011: { 6011: public: 6011: 6011: 6011: typedef _CharT char_type; 6011: typedef _Traits traits_type; 6011: typedef basic_ostream<_CharT, _Traits> ostream_type; 6011: 6011: 6011: private: 6011: ostream_type* _M_stream; 6011: const _CharT* _M_string; 6011: 6011: public: 6011: 6011: ostream_iterator(ostream_type& __s) 6011: : _M_stream(std::__addressof(__s)), _M_string(0) {} 6011: # 184 "/usr/include/c++/8/bits/stream_iterator.h" 3 6011: ostream_iterator(ostream_type& __s, const _CharT* __c) 6011: : _M_stream(&__s), _M_string(__c) { } 6011: 6011: 6011: ostream_iterator(const ostream_iterator& __obj) 6011: : _M_stream(__obj._M_stream), _M_string(__obj._M_string) { } 6011: 6011: 6011: 6011: ostream_iterator& 6011: operator=(const _Tp& __value) 6011: { 6011: 6011: 6011: ; 6011: *_M_stream << __value; 6011: if (_M_string) *_M_stream << _M_string; 6011: return *this; 6011: } 6011: 6011: ostream_iterator& 6011: operator*() 6011: { return *this; } 6011: 6011: ostream_iterator& 6011: operator++() 6011: { return *this; } 6011: 6011: ostream_iterator& 6011: operator++(int) 6011: { return *this; } 6011: }; 6011: 6011: 6011: 6011: 6011: } 6011: # 67 "/usr/include/c++/8/iterator" 2 3 6011: # 7 "array_view.hh" 2 6011: 6011: 6011: # 8 "array_view.hh" 6011: namespace Kakoune 6011: { 6011: 6011: 6011: 6011: template 6011: class ArrayView 6011: { 6011: public: 6011: using size_t = std::size_t; 6011: 6011: constexpr ArrayView() 6011: : m_pointer(nullptr), m_size(0) {} 6011: 6011: constexpr ArrayView(T& oneval) 6011: : m_pointer(&oneval), m_size(1) {} 6011: 6011: constexpr ArrayView(T* pointer, size_t size) 6011: : m_pointer(pointer), m_size(size) {} 6011: 6011: constexpr ArrayView(T* begin, T* end) 6011: : m_pointer(begin), m_size(end - begin) {} 6011: 6011: template 6011: constexpr ArrayView(T(&array)[N]) : m_pointer(array), m_size(N) {} 6011: 6011: template 6011: constexpr ArrayView(const Iterator& begin, const Iterator& end) 6011: : m_pointer(&(*begin)), m_size(end - begin) {} 6011: 6011: template 6011: constexpr ArrayView(const std::vector& v) 6011: : m_pointer(&v[0]), m_size(v.size()) {} 6011: 6011: constexpr ArrayView(const std::initializer_list& v) 6011: : m_pointer(v.begin()), m_size(v.size()) {} 6011: 6011: constexpr T* pointer() const { return m_pointer; } 6011: constexpr size_t size() const { return m_size; } 6011: 6011: [[gnu::always_inline]] 6011: constexpr T& operator[](size_t n) const { return *(m_pointer + n); } 6011: 6011: constexpr T* begin() const { return m_pointer; } 6011: constexpr T* end() const { return m_pointer+m_size; } 6011: 6011: using reverse_iterator = std::reverse_iterator; 6011: constexpr reverse_iterator rbegin() const { return reverse_iterator(m_pointer+m_size); } 6011: constexpr reverse_iterator rend() const { return reverse_iterator(m_pointer); } 6011: 6011: constexpr T& front() const { return *m_pointer; } 6011: constexpr T& back() const { return *(m_pointer + m_size - 1); } 6011: 6011: constexpr bool empty() const { return m_size == 0; } 6011: 6011: constexpr ArrayView subrange(size_t first, size_t count = -1) const 6011: { 6011: return ArrayView(m_pointer + std::min(first, m_size), 6011: std::min(count, m_size - std::min(first, m_size))); 6011: } 6011: 6011: private: 6011: T* m_pointer; 6011: size_t m_size; 6011: }; 6011: 6011: template 6011: using ConstArrayView = ArrayView; 6011: 6011: template 6011: bool operator==(ArrayView lhs, ArrayView rhs) 6011: { 6011: if (lhs.size() != rhs.size()) 6011: return false; 6011: for (int i = 0; i < lhs.size(); ++i) 6011: { 6011: if (lhs[i] != rhs[i]) 6011: return false; 6011: } 6011: return true; 6011: } 6011: 6011: template 6011: bool operator!=(ArrayView lhs, ArrayView rhs) 6011: { 6011: return not (lhs == rhs); 6011: } 6011: 6011: } 6011: # 5 "normal.hh" 2 6011: # 1 "keys.hh" 1 6011: 6011: 6011: 6011: # 1 "coord.hh" 1 6011: 6011: 6011: 6011: # 1 "units.hh" 1 6011: 6011: 6011: 6011: # 1 "assert.hh" 1 6011: 6011: 6011: 6011: namespace Kakoune 6011: { 6011: 6011: class StringView; 6011: 6011: 6011: bool notify_fatal_error(StringView message); 6011: 6011: void on_assert_failed(const char* message); 6011: 6011: } 6011: # 5 "units.hh" 2 6011: # 1 "hash.hh" 1 6011: 6011: 6011: 6011: 6011: # 1 "/usr/include/c++/8/functional" 1 3 6011: # 46 "/usr/include/c++/8/functional" 3 6011: 6011: # 47 "/usr/include/c++/8/functional" 3 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: # 1 "/usr/include/c++/8/tuple" 1 3 6011: # 32 "/usr/include/c++/8/tuple" 3 6011: 6011: # 33 "/usr/include/c++/8/tuple" 3 6011: 6011: 6011: 6011: 6011: 6011: # 1 "/usr/include/c++/8/utility" 1 3 6011: # 58 "/usr/include/c++/8/utility" 3 6011: 6011: # 59 "/usr/include/c++/8/utility" 3 6011: # 69 "/usr/include/c++/8/utility" 3 6011: # 1 "/usr/include/c++/8/bits/stl_relops.h" 1 3 6011: # 67 "/usr/include/c++/8/bits/stl_relops.h" 3 6011: 6011: # 67 "/usr/include/c++/8/bits/stl_relops.h" 3 6011: namespace std __attribute__ ((__visibility__ ("default"))) 6011: { 6011: 6011: 6011: namespace rel_ops 6011: { 6011: # 85 "/usr/include/c++/8/bits/stl_relops.h" 3 6011: template 6011: inline bool 6011: operator!=(const _Tp& __x, const _Tp& __y) 6011: { return !(__x == __y); } 6011: # 98 "/usr/include/c++/8/bits/stl_relops.h" 3 6011: template 6011: inline bool 6011: operator>(const _Tp& __x, const _Tp& __y) 6011: { return __y < __x; } 6011: # 111 "/usr/include/c++/8/bits/stl_relops.h" 3 6011: template 6011: inline bool 6011: operator<=(const _Tp& __x, const _Tp& __y) 6011: { return !(__y < __x); } 6011: # 124 "/usr/include/c++/8/bits/stl_relops.h" 3 6011: template 6011: inline bool 6011: operator>=(const _Tp& __x, const _Tp& __y) 6011: { return !(__x < __y); } 6011: } 6011: 6011: 6011: } 6011: # 70 "/usr/include/c++/8/utility" 2 3 6011: # 82 "/usr/include/c++/8/utility" 3 6011: namespace std __attribute__ ((__visibility__ ("default"))) 6011: { 6011: 6011: 6011: 6011: template 6011: struct tuple_size; 6011: 6011: 6011: 6011: 6011: 6011: template::type, 6011: typename = typename enable_if::value>::type, 6011: size_t = tuple_size<_Tp>::value> 6011: using __enable_if_has_tuple_size = _Tp; 6011: 6011: template 6011: struct tuple_size> 6011: : public tuple_size<_Tp> { }; 6011: 6011: template 6011: struct tuple_size> 6011: : public tuple_size<_Tp> { }; 6011: 6011: template 6011: struct tuple_size> 6011: : public tuple_size<_Tp> { }; 6011: 6011: 6011: template 6011: struct tuple_element; 6011: 6011: 6011: template 6011: using __tuple_element_t = typename tuple_element<__i, _Tp>::type; 6011: 6011: template 6011: struct tuple_element<__i, const _Tp> 6011: { 6011: typedef typename add_const<__tuple_element_t<__i, _Tp>>::type type; 6011: }; 6011: 6011: template 6011: struct tuple_element<__i, volatile _Tp> 6011: { 6011: typedef typename add_volatile<__tuple_element_t<__i, _Tp>>::type type; 6011: }; 6011: 6011: template 6011: struct tuple_element<__i, const volatile _Tp> 6011: { 6011: typedef typename add_cv<__tuple_element_t<__i, _Tp>>::type type; 6011: }; 6011: # 148 "/usr/include/c++/8/utility" 3 6011: template 6011: struct __is_tuple_like_impl> : true_type 6011: { }; 6011: 6011: 6011: template 6011: struct tuple_size> 6011: : public integral_constant { }; 6011: 6011: 6011: template 6011: struct tuple_element<0, std::pair<_Tp1, _Tp2>> 6011: { typedef _Tp1 type; }; 6011: 6011: 6011: template 6011: struct tuple_element<1, std::pair<_Tp1, _Tp2>> 6011: { typedef _Tp2 type; }; 6011: 6011: template 6011: struct __pair_get; 6011: 6011: template<> 6011: struct __pair_get<0> 6011: { 6011: template 6011: static constexpr _Tp1& 6011: __get(std::pair<_Tp1, _Tp2>& __pair) noexcept 6011: { return __pair.first; } 6011: 6011: template 6011: static constexpr _Tp1&& 6011: __move_get(std::pair<_Tp1, _Tp2>&& __pair) noexcept 6011: { return std::forward<_Tp1>(__pair.first); } 6011: 6011: template 6011: static constexpr const _Tp1& 6011: __const_get(const std::pair<_Tp1, _Tp2>& __pair) noexcept 6011: { return __pair.first; } 6011: 6011: template 6011: static constexpr const _Tp1&& 6011: __const_move_get(const std::pair<_Tp1, _Tp2>&& __pair) noexcept 6011: { return std::forward(__pair.first); } 6011: }; 6011: 6011: template<> 6011: struct __pair_get<1> 6011: { 6011: template 6011: static constexpr _Tp2& 6011: __get(std::pair<_Tp1, _Tp2>& __pair) noexcept 6011: { return __pair.second; } 6011: 6011: template 6011: static constexpr _Tp2&& 6011: __move_get(std::pair<_Tp1, _Tp2>&& __pair) noexcept 6011: { return std::forward<_Tp2>(__pair.second); } 6011: 6011: template 6011: static constexpr const _Tp2& 6011: __const_get(const std::pair<_Tp1, _Tp2>& __pair) noexcept 6011: { return __pair.second; } 6011: 6011: template 6011: static constexpr const _Tp2&& 6011: __const_move_get(const std::pair<_Tp1, _Tp2>&& __pair) noexcept 6011: { return std::forward(__pair.second); } 6011: }; 6011: 6011: template 6011: constexpr typename tuple_element<_Int, std::pair<_Tp1, _Tp2>>::type& 6011: get(std::pair<_Tp1, _Tp2>& __in) noexcept 6011: { return __pair_get<_Int>::__get(__in); } 6011: 6011: template 6011: constexpr typename tuple_element<_Int, std::pair<_Tp1, _Tp2>>::type&& 6011: get(std::pair<_Tp1, _Tp2>&& __in) noexcept 6011: { return __pair_get<_Int>::__move_get(std::move(__in)); } 6011: 6011: template 6011: constexpr const typename tuple_element<_Int, std::pair<_Tp1, _Tp2>>::type& 6011: get(const std::pair<_Tp1, _Tp2>& __in) noexcept 6011: { return __pair_get<_Int>::__const_get(__in); } 6011: 6011: template 6011: constexpr const typename tuple_element<_Int, std::pair<_Tp1, _Tp2>>::type&& 6011: get(const std::pair<_Tp1, _Tp2>&& __in) noexcept 6011: { return __pair_get<_Int>::__const_move_get(std::move(__in)); } 6011: # 293 "/usr/include/c++/8/utility" 3 6011: template struct _Index_tuple { }; 6011: # 302 "/usr/include/c++/8/utility" 3 6011: template 6011: struct _Build_index_tuple 6011: { 6011: 6011: 6011: 6011: 6011: 6011: 6011: using __type = _Index_tuple<__integer_pack(_Num)...>; 6011: 6011: }; 6011: # 397 "/usr/include/c++/8/utility" 3 6011: 6011: } 6011: # 39 "/usr/include/c++/8/tuple" 2 3 6011: # 1 "/usr/include/c++/8/array" 1 3 6011: # 32 "/usr/include/c++/8/array" 3 6011: 6011: # 33 "/usr/include/c++/8/array" 3 6011: # 43 "/usr/include/c++/8/array" 3 6011: namespace std __attribute__ ((__visibility__ ("default"))) 6011: { 6011: 6011: 6011: template 6011: struct __array_traits 6011: { 6011: typedef _Tp _Type[_Nm]; 6011: typedef __is_swappable<_Tp> _Is_swappable; 6011: typedef __is_nothrow_swappable<_Tp> _Is_nothrow_swappable; 6011: 6011: static constexpr _Tp& 6011: _S_ref(const _Type& __t, std::size_t __n) noexcept 6011: { return const_cast<_Tp&>(__t[__n]); } 6011: 6011: static constexpr _Tp* 6011: _S_ptr(const _Type& __t) noexcept 6011: { return const_cast<_Tp*>(__t); } 6011: }; 6011: 6011: template 6011: struct __array_traits<_Tp, 0> 6011: { 6011: struct _Type { }; 6011: typedef true_type _Is_swappable; 6011: typedef true_type _Is_nothrow_swappable; 6011: 6011: static constexpr _Tp& 6011: _S_ref(const _Type&, std::size_t) noexcept 6011: { return *static_cast<_Tp*>(nullptr); } 6011: 6011: static constexpr _Tp* 6011: _S_ptr(const _Type&) noexcept 6011: { return nullptr; } 6011: }; 6011: # 93 "/usr/include/c++/8/array" 3 6011: template 6011: struct array 6011: { 6011: typedef _Tp value_type; 6011: typedef value_type* pointer; 6011: typedef const value_type* const_pointer; 6011: typedef value_type& reference; 6011: typedef const value_type& const_reference; 6011: typedef value_type* iterator; 6011: typedef const value_type* const_iterator; 6011: typedef std::size_t size_type; 6011: typedef std::ptrdiff_t difference_type; 6011: typedef std::reverse_iterator reverse_iterator; 6011: typedef std::reverse_iterator const_reverse_iterator; 6011: 6011: 6011: typedef std::__array_traits<_Tp, _Nm> _AT_Type; 6011: typename _AT_Type::_Type _M_elems; 6011: 6011: 6011: 6011: 6011: void 6011: fill(const value_type& __u) 6011: { std::fill_n(begin(), size(), __u); } 6011: 6011: void 6011: swap(array& __other) 6011: noexcept(_AT_Type::_Is_nothrow_swappable::value) 6011: { std::swap_ranges(begin(), end(), __other.begin()); } 6011: 6011: 6011: iterator 6011: begin() noexcept 6011: { return iterator(data()); } 6011: 6011: const_iterator 6011: begin() const noexcept 6011: { return const_iterator(data()); } 6011: 6011: iterator 6011: end() noexcept 6011: { return iterator(data() + _Nm); } 6011: 6011: const_iterator 6011: end() const noexcept 6011: { return const_iterator(data() + _Nm); } 6011: 6011: reverse_iterator 6011: rbegin() noexcept 6011: { return reverse_iterator(end()); } 6011: 6011: const_reverse_iterator 6011: rbegin() const noexcept 6011: { return const_reverse_iterator(end()); } 6011: 6011: reverse_iterator 6011: rend() noexcept 6011: { return reverse_iterator(begin()); } 6011: 6011: const_reverse_iterator 6011: rend() const noexcept 6011: { return const_reverse_iterator(begin()); } 6011: 6011: const_iterator 6011: cbegin() const noexcept 6011: { return const_iterator(data()); } 6011: 6011: const_iterator 6011: cend() const noexcept 6011: { return const_iterator(data() + _Nm); } 6011: 6011: const_reverse_iterator 6011: crbegin() const noexcept 6011: { return const_reverse_iterator(end()); } 6011: 6011: const_reverse_iterator 6011: crend() const noexcept 6011: { return const_reverse_iterator(begin()); } 6011: 6011: 6011: constexpr size_type 6011: size() const noexcept { return _Nm; } 6011: 6011: constexpr size_type 6011: max_size() const noexcept { return _Nm; } 6011: 6011: constexpr bool 6011: empty() const noexcept { return size() == 0; } 6011: 6011: 6011: reference 6011: operator[](size_type __n) noexcept 6011: { return _AT_Type::_S_ref(_M_elems, __n); } 6011: 6011: constexpr const_reference 6011: operator[](size_type __n) const noexcept 6011: { return _AT_Type::_S_ref(_M_elems, __n); } 6011: 6011: reference 6011: at(size_type __n) 6011: { 6011: if (__n >= _Nm) 6011: std::__throw_out_of_range_fmt(("array::at: __n (which is %zu) " ">= _Nm (which is %zu)") 6011: , 6011: __n, _Nm); 6011: return _AT_Type::_S_ref(_M_elems, __n); 6011: } 6011: 6011: constexpr const_reference 6011: at(size_type __n) const 6011: { 6011: 6011: 6011: return __n < _Nm ? _AT_Type::_S_ref(_M_elems, __n) 6011: : (std::__throw_out_of_range_fmt(("array::at: __n (which is %zu) " ">= _Nm (which is %zu)") 6011: , 6011: __n, _Nm), 6011: _AT_Type::_S_ref(_M_elems, 0)); 6011: } 6011: 6011: reference 6011: front() noexcept 6011: { return *begin(); } 6011: 6011: constexpr const_reference 6011: front() const noexcept 6011: { return _AT_Type::_S_ref(_M_elems, 0); } 6011: 6011: reference 6011: back() noexcept 6011: { return _Nm ? *(end() - 1) : *end(); } 6011: 6011: constexpr const_reference 6011: back() const noexcept 6011: { 6011: return _Nm ? _AT_Type::_S_ref(_M_elems, _Nm - 1) 6011: : _AT_Type::_S_ref(_M_elems, 0); 6011: } 6011: 6011: pointer 6011: data() noexcept 6011: { return _AT_Type::_S_ptr(_M_elems); } 6011: 6011: const_pointer 6011: data() const noexcept 6011: { return _AT_Type::_S_ptr(_M_elems); } 6011: }; 6011: # 250 "/usr/include/c++/8/array" 3 6011: template 6011: inline bool 6011: operator==(const array<_Tp, _Nm>& __one, const array<_Tp, _Nm>& __two) 6011: { return std::equal(__one.begin(), __one.end(), __two.begin()); } 6011: 6011: template 6011: inline bool 6011: operator!=(const array<_Tp, _Nm>& __one, const array<_Tp, _Nm>& __two) 6011: { return !(__one == __two); } 6011: 6011: template 6011: inline bool 6011: operator<(const array<_Tp, _Nm>& __a, const array<_Tp, _Nm>& __b) 6011: { 6011: return std::lexicographical_compare(__a.begin(), __a.end(), 6011: __b.begin(), __b.end()); 6011: } 6011: 6011: template 6011: inline bool 6011: operator>(const array<_Tp, _Nm>& __one, const array<_Tp, _Nm>& __two) 6011: { return __two < __one; } 6011: 6011: template 6011: inline bool 6011: operator<=(const array<_Tp, _Nm>& __one, const array<_Tp, _Nm>& __two) 6011: { return !(__one > __two); } 6011: 6011: template 6011: inline bool 6011: operator>=(const array<_Tp, _Nm>& __one, const array<_Tp, _Nm>& __two) 6011: { return !(__one < __two); } 6011: 6011: 6011: template 6011: inline 6011: 6011: 6011: typename enable_if< 6011: std::__array_traits<_Tp, _Nm>::_Is_swappable::value 6011: >::type 6011: 6011: 6011: 6011: swap(array<_Tp, _Nm>& __one, array<_Tp, _Nm>& __two) 6011: noexcept(noexcept(__one.swap(__two))) 6011: { __one.swap(__two); } 6011: 6011: 6011: template 6011: typename enable_if< 6011: !std::__array_traits<_Tp, _Nm>::_Is_swappable::value>::type 6011: swap(array<_Tp, _Nm>&, array<_Tp, _Nm>&) = delete; 6011: 6011: 6011: template 6011: constexpr _Tp& 6011: get(array<_Tp, _Nm>& __arr) noexcept 6011: { 6011: static_assert(_Int < _Nm, "array index is within bounds"); 6011: return std::__array_traits<_Tp, _Nm>:: 6011: _S_ref(__arr._M_elems, _Int); 6011: } 6011: 6011: template 6011: constexpr _Tp&& 6011: get(array<_Tp, _Nm>&& __arr) noexcept 6011: { 6011: static_assert(_Int < _Nm, "array index is within bounds"); 6011: return std::move(std::get<_Int>(__arr)); 6011: } 6011: 6011: template 6011: constexpr const _Tp& 6011: get(const array<_Tp, _Nm>& __arr) noexcept 6011: { 6011: static_assert(_Int < _Nm, "array index is within bounds"); 6011: return std::__array_traits<_Tp, _Nm>:: 6011: _S_ref(__arr._M_elems, _Int); 6011: } 6011: 6011: template 6011: constexpr const _Tp&& 6011: get(const array<_Tp, _Nm>&& __arr) noexcept 6011: { 6011: static_assert(_Int < _Nm, "array index is within bounds"); 6011: return std::move(std::get<_Int>(__arr)); 6011: } 6011: 6011: 6011: } 6011: 6011: namespace std __attribute__ ((__visibility__ ("default"))) 6011: { 6011: 6011: 6011: 6011: 6011: 6011: template 6011: struct tuple_size; 6011: 6011: 6011: template 6011: struct tuple_size> 6011: : public integral_constant { }; 6011: 6011: 6011: template 6011: struct tuple_element; 6011: 6011: 6011: template 6011: struct tuple_element<_Int, std::array<_Tp, _Nm>> 6011: { 6011: static_assert(_Int < _Nm, "index is out of bounds"); 6011: typedef _Tp type; 6011: }; 6011: 6011: template 6011: struct __is_tuple_like_impl> : true_type 6011: { }; 6011: 6011: 6011: } 6011: # 40 "/usr/include/c++/8/tuple" 2 3 6011: # 1 "/usr/include/c++/8/bits/uses_allocator.h" 1 3 6011: # 35 "/usr/include/c++/8/bits/uses_allocator.h" 3 6011: namespace std __attribute__ ((__visibility__ ("default"))) 6011: { 6011: 6011: 6011: struct __erased_type { }; 6011: 6011: template 6011: using __is_erased_or_convertible 6011: = __or_, is_convertible<_Alloc, _Tp>>; 6011: 6011: 6011: struct allocator_arg_t { explicit allocator_arg_t() = default; }; 6011: 6011: constexpr allocator_arg_t allocator_arg = 6011: allocator_arg_t(); 6011: 6011: template> 6011: struct __uses_allocator_helper 6011: : false_type { }; 6011: 6011: template 6011: struct __uses_allocator_helper<_Tp, _Alloc, 6011: __void_t> 6011: : __is_erased_or_convertible<_Alloc, typename _Tp::allocator_type>::type 6011: { }; 6011: 6011: 6011: template 6011: struct uses_allocator 6011: : __uses_allocator_helper<_Tp, _Alloc>::type 6011: { }; 6011: 6011: struct __uses_alloc_base { }; 6011: 6011: struct __uses_alloc0 : __uses_alloc_base 6011: { 6011: struct _Sink { void operator=(const void*) { } } _M_a; 6011: }; 6011: 6011: template 6011: struct __uses_alloc1 : __uses_alloc_base { const _Alloc* _M_a; }; 6011: 6011: template 6011: struct __uses_alloc2 : __uses_alloc_base { const _Alloc* _M_a; }; 6011: 6011: template 6011: struct __uses_alloc; 6011: 6011: template 6011: struct __uses_alloc 6011: : conditional< 6011: is_constructible<_Tp, allocator_arg_t, _Alloc, _Args...>::value, 6011: __uses_alloc1<_Alloc>, 6011: __uses_alloc2<_Alloc>>::type 6011: { 6011: static_assert(__or_< 6011: is_constructible<_Tp, allocator_arg_t, _Alloc, _Args...>, 6011: is_constructible<_Tp, _Args..., _Alloc>>::value, "construction with" 6011: " an allocator must be possible if uses_allocator is true"); 6011: }; 6011: 6011: template 6011: struct __uses_alloc 6011: : __uses_alloc0 { }; 6011: 6011: template 6011: using __uses_alloc_t = 6011: __uses_alloc::value, _Tp, _Alloc, _Args...>; 6011: 6011: template 6011: inline __uses_alloc_t<_Tp, _Alloc, _Args...> 6011: __use_alloc(const _Alloc& __a) 6011: { 6011: __uses_alloc_t<_Tp, _Alloc, _Args...> __ret; 6011: __ret._M_a = std::__addressof(__a); 6011: return __ret; 6011: } 6011: 6011: template 6011: void 6011: __use_alloc(const _Alloc&&) = delete; 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: template class _Predicate, 6011: typename _Tp, typename _Alloc, typename... _Args> 6011: struct __is_uses_allocator_predicate 6011: : conditional::value, 6011: __or_<_Predicate<_Tp, allocator_arg_t, _Alloc, _Args...>, 6011: _Predicate<_Tp, _Args..., _Alloc>>, 6011: _Predicate<_Tp, _Args...>>::type { }; 6011: 6011: template 6011: struct __is_uses_allocator_constructible 6011: : __is_uses_allocator_predicate 6011: { }; 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: template 6011: struct __is_nothrow_uses_allocator_constructible 6011: : __is_uses_allocator_predicate 6011: { }; 6011: # 156 "/usr/include/c++/8/bits/uses_allocator.h" 3 6011: template 6011: void __uses_allocator_construct_impl(__uses_alloc0 __a, _Tp* __ptr, 6011: _Args&&... __args) 6011: { ::new ((void*)__ptr) _Tp(std::forward<_Args>(__args)...); } 6011: 6011: template 6011: void __uses_allocator_construct_impl(__uses_alloc1<_Alloc> __a, _Tp* __ptr, 6011: _Args&&... __args) 6011: { 6011: ::new ((void*)__ptr) _Tp(allocator_arg, *__a._M_a, 6011: std::forward<_Args>(__args)...); 6011: } 6011: 6011: template 6011: void __uses_allocator_construct_impl(__uses_alloc2<_Alloc> __a, _Tp* __ptr, 6011: _Args&&... __args) 6011: { ::new ((void*)__ptr) _Tp(std::forward<_Args>(__args)..., *__a._M_a); } 6011: 6011: template 6011: void __uses_allocator_construct(const _Alloc& __a, _Tp* __ptr, 6011: _Args&&... __args) 6011: { 6011: __uses_allocator_construct_impl(__use_alloc<_Tp, _Alloc, _Args...>(__a), 6011: __ptr, std::forward<_Args>(__args)...); 6011: } 6011: 6011: 6011: } 6011: # 41 "/usr/include/c++/8/tuple" 2 3 6011: # 1 "/usr/include/c++/8/bits/invoke.h" 1 3 6011: # 33 "/usr/include/c++/8/bits/invoke.h" 3 6011: 6011: # 34 "/usr/include/c++/8/bits/invoke.h" 3 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: namespace std __attribute__ ((__visibility__ ("default"))) 6011: { 6011: 6011: # 52 "/usr/include/c++/8/bits/invoke.h" 3 6011: template::type> 6011: constexpr _Up&& 6011: __invfwd(typename remove_reference<_Tp>::type& __t) noexcept 6011: { return static_cast<_Up&&>(__t); } 6011: 6011: template 6011: constexpr _Res 6011: __invoke_impl(__invoke_other, _Fn&& __f, _Args&&... __args) 6011: { return std::forward<_Fn>(__f)(std::forward<_Args>(__args)...); } 6011: 6011: template 6011: constexpr _Res 6011: __invoke_impl(__invoke_memfun_ref, _MemFun&& __f, _Tp&& __t, 6011: _Args&&... __args) 6011: { return (__invfwd<_Tp>(__t).*__f)(std::forward<_Args>(__args)...); } 6011: 6011: template 6011: constexpr _Res 6011: __invoke_impl(__invoke_memfun_deref, _MemFun&& __f, _Tp&& __t, 6011: _Args&&... __args) 6011: { 6011: return ((*std::forward<_Tp>(__t)).*__f)(std::forward<_Args>(__args)...); 6011: } 6011: 6011: template 6011: constexpr _Res 6011: __invoke_impl(__invoke_memobj_ref, _MemPtr&& __f, _Tp&& __t) 6011: { return __invfwd<_Tp>(__t).*__f; } 6011: 6011: template 6011: constexpr _Res 6011: __invoke_impl(__invoke_memobj_deref, _MemPtr&& __f, _Tp&& __t) 6011: { return (*std::forward<_Tp>(__t)).*__f; } 6011: 6011: 6011: template 6011: constexpr typename __invoke_result<_Callable, _Args...>::type 6011: __invoke(_Callable&& __fn, _Args&&... __args) 6011: noexcept(__is_nothrow_invocable<_Callable, _Args...>::value) 6011: { 6011: using __result = __invoke_result<_Callable, _Args...>; 6011: using __type = typename __result::type; 6011: using __tag = typename __result::__invoke_type; 6011: return std::__invoke_impl<__type>(__tag{}, std::forward<_Callable>(__fn), 6011: std::forward<_Args>(__args)...); 6011: } 6011: 6011: 6011: } 6011: # 42 "/usr/include/c++/8/tuple" 2 3 6011: 6011: namespace std __attribute__ ((__visibility__ ("default"))) 6011: { 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: template 6011: class tuple; 6011: 6011: template 6011: struct __is_empty_non_tuple : is_empty<_Tp> { }; 6011: 6011: 6011: template 6011: struct __is_empty_non_tuple> : false_type { }; 6011: 6011: 6011: template 6011: using __empty_not_final 6011: = typename conditional<__is_final(_Tp), false_type, 6011: __is_empty_non_tuple<_Tp>>::type; 6011: 6011: template::value> 6011: struct _Head_base; 6011: 6011: template 6011: struct _Head_base<_Idx, _Head, true> 6011: : public _Head 6011: { 6011: constexpr _Head_base() 6011: : _Head() { } 6011: 6011: constexpr _Head_base(const _Head& __h) 6011: : _Head(__h) { } 6011: 6011: constexpr _Head_base(const _Head_base&) = default; 6011: constexpr _Head_base(_Head_base&&) = default; 6011: 6011: template 6011: constexpr _Head_base(_UHead&& __h) 6011: : _Head(std::forward<_UHead>(__h)) { } 6011: 6011: _Head_base(allocator_arg_t, __uses_alloc0) 6011: : _Head() { } 6011: 6011: template 6011: _Head_base(allocator_arg_t, __uses_alloc1<_Alloc> __a) 6011: : _Head(allocator_arg, *__a._M_a) { } 6011: 6011: template 6011: _Head_base(allocator_arg_t, __uses_alloc2<_Alloc> __a) 6011: : _Head(*__a._M_a) { } 6011: 6011: template 6011: _Head_base(__uses_alloc0, _UHead&& __uhead) 6011: : _Head(std::forward<_UHead>(__uhead)) { } 6011: 6011: template 6011: _Head_base(__uses_alloc1<_Alloc> __a, _UHead&& __uhead) 6011: : _Head(allocator_arg, *__a._M_a, std::forward<_UHead>(__uhead)) { } 6011: 6011: template 6011: _Head_base(__uses_alloc2<_Alloc> __a, _UHead&& __uhead) 6011: : _Head(std::forward<_UHead>(__uhead), *__a._M_a) { } 6011: 6011: static constexpr _Head& 6011: _M_head(_Head_base& __b) noexcept { return __b; } 6011: 6011: static constexpr const _Head& 6011: _M_head(const _Head_base& __b) noexcept { return __b; } 6011: }; 6011: 6011: template 6011: struct _Head_base<_Idx, _Head, false> 6011: { 6011: constexpr _Head_base() 6011: : _M_head_impl() { } 6011: 6011: constexpr _Head_base(const _Head& __h) 6011: : _M_head_impl(__h) { } 6011: 6011: constexpr _Head_base(const _Head_base&) = default; 6011: constexpr _Head_base(_Head_base&&) = default; 6011: 6011: template 6011: constexpr _Head_base(_UHead&& __h) 6011: : _M_head_impl(std::forward<_UHead>(__h)) { } 6011: 6011: _Head_base(allocator_arg_t, __uses_alloc0) 6011: : _M_head_impl() { } 6011: 6011: template 6011: _Head_base(allocator_arg_t, __uses_alloc1<_Alloc> __a) 6011: : _M_head_impl(allocator_arg, *__a._M_a) { } 6011: 6011: template 6011: _Head_base(allocator_arg_t, __uses_alloc2<_Alloc> __a) 6011: : _M_head_impl(*__a._M_a) { } 6011: 6011: template 6011: _Head_base(__uses_alloc0, _UHead&& __uhead) 6011: : _M_head_impl(std::forward<_UHead>(__uhead)) { } 6011: 6011: template 6011: _Head_base(__uses_alloc1<_Alloc> __a, _UHead&& __uhead) 6011: : _M_head_impl(allocator_arg, *__a._M_a, std::forward<_UHead>(__uhead)) 6011: { } 6011: 6011: template 6011: _Head_base(__uses_alloc2<_Alloc> __a, _UHead&& __uhead) 6011: : _M_head_impl(std::forward<_UHead>(__uhead), *__a._M_a) { } 6011: 6011: static constexpr _Head& 6011: _M_head(_Head_base& __b) noexcept { return __b._M_head_impl; } 6011: 6011: static constexpr const _Head& 6011: _M_head(const _Head_base& __b) noexcept { return __b._M_head_impl; } 6011: 6011: _Head _M_head_impl; 6011: }; 6011: # 176 "/usr/include/c++/8/tuple" 3 6011: template 6011: struct _Tuple_impl; 6011: 6011: 6011: 6011: 6011: 6011: 6011: template 6011: struct _Tuple_impl<_Idx, _Head, _Tail...> 6011: : public _Tuple_impl<_Idx + 1, _Tail...>, 6011: private _Head_base<_Idx, _Head> 6011: { 6011: template friend class _Tuple_impl; 6011: 6011: typedef _Tuple_impl<_Idx + 1, _Tail...> _Inherited; 6011: typedef _Head_base<_Idx, _Head> _Base; 6011: 6011: static constexpr _Head& 6011: _M_head(_Tuple_impl& __t) noexcept { return _Base::_M_head(__t); } 6011: 6011: static constexpr const _Head& 6011: _M_head(const _Tuple_impl& __t) noexcept { return _Base::_M_head(__t); } 6011: 6011: static constexpr _Inherited& 6011: _M_tail(_Tuple_impl& __t) noexcept { return __t; } 6011: 6011: static constexpr const _Inherited& 6011: _M_tail(const _Tuple_impl& __t) noexcept { return __t; } 6011: 6011: constexpr _Tuple_impl() 6011: : _Inherited(), _Base() { } 6011: 6011: explicit 6011: constexpr _Tuple_impl(const _Head& __head, const _Tail&... __tail) 6011: : _Inherited(__tail...), _Base(__head) { } 6011: 6011: template::type> 6011: explicit 6011: constexpr _Tuple_impl(_UHead&& __head, _UTail&&... __tail) 6011: : _Inherited(std::forward<_UTail>(__tail)...), 6011: _Base(std::forward<_UHead>(__head)) { } 6011: 6011: constexpr _Tuple_impl(const _Tuple_impl&) = default; 6011: 6011: constexpr 6011: _Tuple_impl(_Tuple_impl&& __in) 6011: noexcept(__and_, 6011: is_nothrow_move_constructible<_Inherited>>::value) 6011: : _Inherited(std::move(_M_tail(__in))), 6011: _Base(std::forward<_Head>(_M_head(__in))) { } 6011: 6011: template 6011: constexpr _Tuple_impl(const _Tuple_impl<_Idx, _UElements...>& __in) 6011: : _Inherited(_Tuple_impl<_Idx, _UElements...>::_M_tail(__in)), 6011: _Base(_Tuple_impl<_Idx, _UElements...>::_M_head(__in)) { } 6011: 6011: template 6011: constexpr _Tuple_impl(_Tuple_impl<_Idx, _UHead, _UTails...>&& __in) 6011: : _Inherited(std::move 6011: (_Tuple_impl<_Idx, _UHead, _UTails...>::_M_tail(__in))), 6011: _Base(std::forward<_UHead> 6011: (_Tuple_impl<_Idx, _UHead, _UTails...>::_M_head(__in))) { } 6011: 6011: template 6011: _Tuple_impl(allocator_arg_t __tag, const _Alloc& __a) 6011: : _Inherited(__tag, __a), 6011: _Base(__tag, __use_alloc<_Head>(__a)) { } 6011: 6011: template 6011: _Tuple_impl(allocator_arg_t __tag, const _Alloc& __a, 6011: const _Head& __head, const _Tail&... __tail) 6011: : _Inherited(__tag, __a, __tail...), 6011: _Base(__use_alloc<_Head, _Alloc, _Head>(__a), __head) { } 6011: 6011: template::type> 6011: _Tuple_impl(allocator_arg_t __tag, const _Alloc& __a, 6011: _UHead&& __head, _UTail&&... __tail) 6011: : _Inherited(__tag, __a, std::forward<_UTail>(__tail)...), 6011: _Base(__use_alloc<_Head, _Alloc, _UHead>(__a), 6011: std::forward<_UHead>(__head)) { } 6011: 6011: template 6011: _Tuple_impl(allocator_arg_t __tag, const _Alloc& __a, 6011: const _Tuple_impl& __in) 6011: : _Inherited(__tag, __a, _M_tail(__in)), 6011: _Base(__use_alloc<_Head, _Alloc, _Head>(__a), _M_head(__in)) { } 6011: 6011: template 6011: _Tuple_impl(allocator_arg_t __tag, const _Alloc& __a, 6011: _Tuple_impl&& __in) 6011: : _Inherited(__tag, __a, std::move(_M_tail(__in))), 6011: _Base(__use_alloc<_Head, _Alloc, _Head>(__a), 6011: std::forward<_Head>(_M_head(__in))) { } 6011: 6011: template 6011: _Tuple_impl(allocator_arg_t __tag, const _Alloc& __a, 6011: const _Tuple_impl<_Idx, _UElements...>& __in) 6011: : _Inherited(__tag, __a, 6011: _Tuple_impl<_Idx, _UElements...>::_M_tail(__in)), 6011: _Base(__use_alloc<_Head, _Alloc, _Head>(__a), 6011: _Tuple_impl<_Idx, _UElements...>::_M_head(__in)) { } 6011: 6011: template 6011: _Tuple_impl(allocator_arg_t __tag, const _Alloc& __a, 6011: _Tuple_impl<_Idx, _UHead, _UTails...>&& __in) 6011: : _Inherited(__tag, __a, std::move 6011: (_Tuple_impl<_Idx, _UHead, _UTails...>::_M_tail(__in))), 6011: _Base(__use_alloc<_Head, _Alloc, _UHead>(__a), 6011: std::forward<_UHead> 6011: (_Tuple_impl<_Idx, _UHead, _UTails...>::_M_head(__in))) { } 6011: 6011: _Tuple_impl& 6011: operator=(const _Tuple_impl& __in) 6011: { 6011: _M_head(*this) = _M_head(__in); 6011: _M_tail(*this) = _M_tail(__in); 6011: return *this; 6011: } 6011: 6011: _Tuple_impl& 6011: operator=(_Tuple_impl&& __in) 6011: noexcept(__and_, 6011: is_nothrow_move_assignable<_Inherited>>::value) 6011: { 6011: _M_head(*this) = std::forward<_Head>(_M_head(__in)); 6011: _M_tail(*this) = std::move(_M_tail(__in)); 6011: return *this; 6011: } 6011: 6011: template 6011: _Tuple_impl& 6011: operator=(const _Tuple_impl<_Idx, _UElements...>& __in) 6011: { 6011: _M_head(*this) = _Tuple_impl<_Idx, _UElements...>::_M_head(__in); 6011: _M_tail(*this) = _Tuple_impl<_Idx, _UElements...>::_M_tail(__in); 6011: return *this; 6011: } 6011: 6011: template 6011: _Tuple_impl& 6011: operator=(_Tuple_impl<_Idx, _UHead, _UTails...>&& __in) 6011: { 6011: _M_head(*this) = std::forward<_UHead> 6011: (_Tuple_impl<_Idx, _UHead, _UTails...>::_M_head(__in)); 6011: _M_tail(*this) = std::move 6011: (_Tuple_impl<_Idx, _UHead, _UTails...>::_M_tail(__in)); 6011: return *this; 6011: } 6011: 6011: protected: 6011: void 6011: _M_swap(_Tuple_impl& __in) 6011: noexcept(__is_nothrow_swappable<_Head>::value 6011: && noexcept(_M_tail(__in)._M_swap(_M_tail(__in)))) 6011: { 6011: using std::swap; 6011: swap(_M_head(*this), _M_head(__in)); 6011: _Inherited::_M_swap(_M_tail(__in)); 6011: } 6011: }; 6011: 6011: 6011: template 6011: struct _Tuple_impl<_Idx, _Head> 6011: : private _Head_base<_Idx, _Head> 6011: { 6011: template friend class _Tuple_impl; 6011: 6011: typedef _Head_base<_Idx, _Head> _Base; 6011: 6011: static constexpr _Head& 6011: _M_head(_Tuple_impl& __t) noexcept { return _Base::_M_head(__t); } 6011: 6011: static constexpr const _Head& 6011: _M_head(const _Tuple_impl& __t) noexcept { return _Base::_M_head(__t); } 6011: 6011: constexpr _Tuple_impl() 6011: : _Base() { } 6011: 6011: explicit 6011: constexpr _Tuple_impl(const _Head& __head) 6011: : _Base(__head) { } 6011: 6011: template 6011: explicit 6011: constexpr _Tuple_impl(_UHead&& __head) 6011: : _Base(std::forward<_UHead>(__head)) { } 6011: 6011: constexpr _Tuple_impl(const _Tuple_impl&) = default; 6011: 6011: constexpr 6011: _Tuple_impl(_Tuple_impl&& __in) 6011: noexcept(is_nothrow_move_constructible<_Head>::value) 6011: : _Base(std::forward<_Head>(_M_head(__in))) { } 6011: 6011: template 6011: constexpr _Tuple_impl(const _Tuple_impl<_Idx, _UHead>& __in) 6011: : _Base(_Tuple_impl<_Idx, _UHead>::_M_head(__in)) { } 6011: 6011: template 6011: constexpr _Tuple_impl(_Tuple_impl<_Idx, _UHead>&& __in) 6011: : _Base(std::forward<_UHead>(_Tuple_impl<_Idx, _UHead>::_M_head(__in))) 6011: { } 6011: 6011: template 6011: _Tuple_impl(allocator_arg_t __tag, const _Alloc& __a) 6011: : _Base(__tag, __use_alloc<_Head>(__a)) { } 6011: 6011: template 6011: _Tuple_impl(allocator_arg_t __tag, const _Alloc& __a, 6011: const _Head& __head) 6011: : _Base(__use_alloc<_Head, _Alloc, _Head>(__a), __head) { } 6011: 6011: template 6011: _Tuple_impl(allocator_arg_t __tag, const _Alloc& __a, 6011: _UHead&& __head) 6011: : _Base(__use_alloc<_Head, _Alloc, _UHead>(__a), 6011: std::forward<_UHead>(__head)) { } 6011: 6011: template 6011: _Tuple_impl(allocator_arg_t __tag, const _Alloc& __a, 6011: const _Tuple_impl& __in) 6011: : _Base(__use_alloc<_Head, _Alloc, _Head>(__a), _M_head(__in)) { } 6011: 6011: template 6011: _Tuple_impl(allocator_arg_t __tag, const _Alloc& __a, 6011: _Tuple_impl&& __in) 6011: : _Base(__use_alloc<_Head, _Alloc, _Head>(__a), 6011: std::forward<_Head>(_M_head(__in))) { } 6011: 6011: template 6011: _Tuple_impl(allocator_arg_t __tag, const _Alloc& __a, 6011: const _Tuple_impl<_Idx, _UHead>& __in) 6011: : _Base(__use_alloc<_Head, _Alloc, _Head>(__a), 6011: _Tuple_impl<_Idx, _UHead>::_M_head(__in)) { } 6011: 6011: template 6011: _Tuple_impl(allocator_arg_t __tag, const _Alloc& __a, 6011: _Tuple_impl<_Idx, _UHead>&& __in) 6011: : _Base(__use_alloc<_Head, _Alloc, _UHead>(__a), 6011: std::forward<_UHead>(_Tuple_impl<_Idx, _UHead>::_M_head(__in))) 6011: { } 6011: 6011: _Tuple_impl& 6011: operator=(const _Tuple_impl& __in) 6011: { 6011: _M_head(*this) = _M_head(__in); 6011: return *this; 6011: } 6011: 6011: _Tuple_impl& 6011: operator=(_Tuple_impl&& __in) 6011: noexcept(is_nothrow_move_assignable<_Head>::value) 6011: { 6011: _M_head(*this) = std::forward<_Head>(_M_head(__in)); 6011: return *this; 6011: } 6011: 6011: template 6011: _Tuple_impl& 6011: operator=(const _Tuple_impl<_Idx, _UHead>& __in) 6011: { 6011: _M_head(*this) = _Tuple_impl<_Idx, _UHead>::_M_head(__in); 6011: return *this; 6011: } 6011: 6011: template 6011: _Tuple_impl& 6011: operator=(_Tuple_impl<_Idx, _UHead>&& __in) 6011: { 6011: _M_head(*this) 6011: = std::forward<_UHead>(_Tuple_impl<_Idx, _UHead>::_M_head(__in)); 6011: return *this; 6011: } 6011: 6011: protected: 6011: void 6011: _M_swap(_Tuple_impl& __in) 6011: noexcept(__is_nothrow_swappable<_Head>::value) 6011: { 6011: using std::swap; 6011: swap(_M_head(*this), _M_head(__in)); 6011: } 6011: }; 6011: 6011: 6011: 6011: template 6011: struct _TC 6011: { 6011: template 6011: static constexpr bool _ConstructibleTuple() 6011: { 6011: return __and_...>::value; 6011: } 6011: 6011: template 6011: static constexpr bool _ImplicitlyConvertibleTuple() 6011: { 6011: return __and_...>::value; 6011: } 6011: 6011: template 6011: static constexpr bool _MoveConstructibleTuple() 6011: { 6011: return __and_...>::value; 6011: } 6011: 6011: template 6011: static constexpr bool _ImplicitlyMoveConvertibleTuple() 6011: { 6011: return __and_...>::value; 6011: } 6011: 6011: template 6011: static constexpr bool _NonNestedTuple() 6011: { 6011: return __and_<__not_, 6011: typename remove_cv< 6011: typename remove_reference<_SrcTuple>::type 6011: >::type>>, 6011: __not_>, 6011: __not_> 6011: >::value; 6011: } 6011: template 6011: static constexpr bool _NotSameTuple() 6011: { 6011: return __not_, 6011: typename remove_const< 6011: typename remove_reference<_UElements...>::type 6011: >::type>>::value; 6011: } 6011: }; 6011: 6011: template 6011: struct _TC 6011: { 6011: template 6011: static constexpr bool _ConstructibleTuple() 6011: { 6011: return false; 6011: } 6011: 6011: template 6011: static constexpr bool _ImplicitlyConvertibleTuple() 6011: { 6011: return false; 6011: } 6011: 6011: template 6011: static constexpr bool _MoveConstructibleTuple() 6011: { 6011: return false; 6011: } 6011: 6011: template 6011: static constexpr bool _ImplicitlyMoveConvertibleTuple() 6011: { 6011: return false; 6011: } 6011: 6011: template 6011: static constexpr bool _NonNestedTuple() 6011: { 6011: return true; 6011: } 6011: template 6011: static constexpr bool _NotSameTuple() 6011: { 6011: return true; 6011: } 6011: }; 6011: 6011: 6011: template 6011: class tuple : public _Tuple_impl<0, _Elements...> 6011: { 6011: typedef _Tuple_impl<0, _Elements...> _Inherited; 6011: 6011: 6011: 6011: template 6011: struct _TC2 6011: { 6011: static constexpr bool _DefaultConstructibleTuple() 6011: { 6011: return __and_...>::value; 6011: } 6011: static constexpr bool _ImplicitlyDefaultConstructibleTuple() 6011: { 6011: return __and_<__is_implicitly_default_constructible<_Elements>...> 6011: ::value; 6011: } 6011: }; 6011: 6011: public: 6011: template:: 6011: _ImplicitlyDefaultConstructibleTuple(), 6011: bool>::type = true> 6011: constexpr tuple() 6011: : _Inherited() { } 6011: 6011: template:: 6011: _DefaultConstructibleTuple() 6011: && 6011: !_TC2<_Dummy>:: 6011: _ImplicitlyDefaultConstructibleTuple(), 6011: bool>::type = false> 6011: explicit constexpr tuple() 6011: : _Inherited() { } 6011: 6011: 6011: 6011: template using _TCC = 6011: _TC::value, 6011: _Elements...>; 6011: 6011: template::template 6011: _ConstructibleTuple<_Elements...>() 6011: && _TCC<_Dummy>::template 6011: _ImplicitlyConvertibleTuple<_Elements...>() 6011: && (sizeof...(_Elements) >= 1), 6011: bool>::type=true> 6011: constexpr tuple(const _Elements&... __elements) 6011: : _Inherited(__elements...) { } 6011: 6011: template::template 6011: _ConstructibleTuple<_Elements...>() 6011: && !_TCC<_Dummy>::template 6011: _ImplicitlyConvertibleTuple<_Elements...>() 6011: && (sizeof...(_Elements) >= 1), 6011: bool>::type=false> 6011: explicit constexpr tuple(const _Elements&... __elements) 6011: : _Inherited(__elements...) { } 6011: 6011: 6011: 6011: template using _TMC = 6011: _TC<(sizeof...(_Elements) == sizeof...(_UElements)) 6011: && (_TC<(sizeof...(_UElements)==1), _Elements...>:: 6011: template _NotSameTuple<_UElements...>()), 6011: _Elements...>; 6011: 6011: 6011: 6011: template using _TMCT = 6011: _TC<(sizeof...(_Elements) == sizeof...(_UElements)) 6011: && !is_same, 6011: tuple<_UElements...>>::value, 6011: _Elements...>; 6011: 6011: template::template 6011: _MoveConstructibleTuple<_UElements...>() 6011: && _TMC<_UElements...>::template 6011: _ImplicitlyMoveConvertibleTuple<_UElements...>() 6011: && (sizeof...(_Elements) >= 1), 6011: bool>::type=true> 6011: constexpr tuple(_UElements&&... __elements) 6011: : _Inherited(std::forward<_UElements>(__elements)...) { } 6011: 6011: template::template 6011: _MoveConstructibleTuple<_UElements...>() 6011: && !_TMC<_UElements...>::template 6011: _ImplicitlyMoveConvertibleTuple<_UElements...>() 6011: && (sizeof...(_Elements) >= 1), 6011: bool>::type=false> 6011: explicit constexpr tuple(_UElements&&... __elements) 6011: : _Inherited(std::forward<_UElements>(__elements)...) { } 6011: 6011: constexpr tuple(const tuple&) = default; 6011: 6011: constexpr tuple(tuple&&) = default; 6011: 6011: 6011: 6011: template using _TNTC = 6011: _TC::value && sizeof...(_Elements) == 1, 6011: _Elements...>; 6011: 6011: template::template 6011: _ConstructibleTuple<_UElements...>() 6011: && _TMCT<_UElements...>::template 6011: _ImplicitlyConvertibleTuple<_UElements...>() 6011: && _TNTC<_Dummy>::template 6011: _NonNestedTuple&>(), 6011: bool>::type=true> 6011: constexpr tuple(const tuple<_UElements...>& __in) 6011: : _Inherited(static_cast&>(__in)) 6011: { } 6011: 6011: template::template 6011: _ConstructibleTuple<_UElements...>() 6011: && !_TMCT<_UElements...>::template 6011: _ImplicitlyConvertibleTuple<_UElements...>() 6011: && _TNTC<_Dummy>::template 6011: _NonNestedTuple&>(), 6011: bool>::type=false> 6011: explicit constexpr tuple(const tuple<_UElements...>& __in) 6011: : _Inherited(static_cast&>(__in)) 6011: { } 6011: 6011: template::template 6011: _MoveConstructibleTuple<_UElements...>() 6011: && _TMCT<_UElements...>::template 6011: _ImplicitlyMoveConvertibleTuple<_UElements...>() 6011: && _TNTC<_Dummy>::template 6011: _NonNestedTuple&&>(), 6011: bool>::type=true> 6011: constexpr tuple(tuple<_UElements...>&& __in) 6011: : _Inherited(static_cast<_Tuple_impl<0, _UElements...>&&>(__in)) { } 6011: 6011: template::template 6011: _MoveConstructibleTuple<_UElements...>() 6011: && !_TMCT<_UElements...>::template 6011: _ImplicitlyMoveConvertibleTuple<_UElements...>() 6011: && _TNTC<_Dummy>::template 6011: _NonNestedTuple&&>(), 6011: bool>::type=false> 6011: explicit constexpr tuple(tuple<_UElements...>&& __in) 6011: : _Inherited(static_cast<_Tuple_impl<0, _UElements...>&&>(__in)) { } 6011: 6011: 6011: 6011: template 6011: tuple(allocator_arg_t __tag, const _Alloc& __a) 6011: : _Inherited(__tag, __a) { } 6011: 6011: template::template 6011: _ConstructibleTuple<_Elements...>() 6011: && _TCC<_Dummy>::template 6011: _ImplicitlyConvertibleTuple<_Elements...>(), 6011: bool>::type=true> 6011: tuple(allocator_arg_t __tag, const _Alloc& __a, 6011: const _Elements&... __elements) 6011: : _Inherited(__tag, __a, __elements...) { } 6011: 6011: template::template 6011: _ConstructibleTuple<_Elements...>() 6011: && !_TCC<_Dummy>::template 6011: _ImplicitlyConvertibleTuple<_Elements...>(), 6011: bool>::type=false> 6011: explicit tuple(allocator_arg_t __tag, const _Alloc& __a, 6011: const _Elements&... __elements) 6011: : _Inherited(__tag, __a, __elements...) { } 6011: 6011: template::template 6011: _MoveConstructibleTuple<_UElements...>() 6011: && _TMC<_UElements...>::template 6011: _ImplicitlyMoveConvertibleTuple<_UElements...>(), 6011: bool>::type=true> 6011: tuple(allocator_arg_t __tag, const _Alloc& __a, 6011: _UElements&&... __elements) 6011: : _Inherited(__tag, __a, std::forward<_UElements>(__elements)...) 6011: { } 6011: 6011: template::template 6011: _MoveConstructibleTuple<_UElements...>() 6011: && !_TMC<_UElements...>::template 6011: _ImplicitlyMoveConvertibleTuple<_UElements...>(), 6011: bool>::type=false> 6011: explicit tuple(allocator_arg_t __tag, const _Alloc& __a, 6011: _UElements&&... __elements) 6011: : _Inherited(__tag, __a, std::forward<_UElements>(__elements)...) 6011: { } 6011: 6011: template 6011: tuple(allocator_arg_t __tag, const _Alloc& __a, const tuple& __in) 6011: : _Inherited(__tag, __a, static_cast(__in)) { } 6011: 6011: template 6011: tuple(allocator_arg_t __tag, const _Alloc& __a, tuple&& __in) 6011: : _Inherited(__tag, __a, static_cast<_Inherited&&>(__in)) { } 6011: 6011: template::template 6011: _ConstructibleTuple<_UElements...>() 6011: && _TMCT<_UElements...>::template 6011: _ImplicitlyConvertibleTuple<_UElements...>() 6011: && _TNTC<_Dummy>::template 6011: _NonNestedTuple&&>(), 6011: bool>::type=true> 6011: tuple(allocator_arg_t __tag, const _Alloc& __a, 6011: const tuple<_UElements...>& __in) 6011: : _Inherited(__tag, __a, 6011: static_cast&>(__in)) 6011: { } 6011: 6011: template::template 6011: _ConstructibleTuple<_UElements...>() 6011: && !_TMCT<_UElements...>::template 6011: _ImplicitlyConvertibleTuple<_UElements...>() 6011: && _TNTC<_Dummy>::template 6011: _NonNestedTuple&&>(), 6011: bool>::type=false> 6011: explicit tuple(allocator_arg_t __tag, const _Alloc& __a, 6011: const tuple<_UElements...>& __in) 6011: : _Inherited(__tag, __a, 6011: static_cast&>(__in)) 6011: { } 6011: 6011: template::template 6011: _MoveConstructibleTuple<_UElements...>() 6011: && _TMCT<_UElements...>::template 6011: _ImplicitlyMoveConvertibleTuple<_UElements...>() 6011: && _TNTC<_Dummy>::template 6011: _NonNestedTuple&&>(), 6011: bool>::type=true> 6011: tuple(allocator_arg_t __tag, const _Alloc& __a, 6011: tuple<_UElements...>&& __in) 6011: : _Inherited(__tag, __a, 6011: static_cast<_Tuple_impl<0, _UElements...>&&>(__in)) 6011: { } 6011: 6011: template::template 6011: _MoveConstructibleTuple<_UElements...>() 6011: && !_TMCT<_UElements...>::template 6011: _ImplicitlyMoveConvertibleTuple<_UElements...>() 6011: && _TNTC<_Dummy>::template 6011: _NonNestedTuple&&>(), 6011: bool>::type=false> 6011: explicit tuple(allocator_arg_t __tag, const _Alloc& __a, 6011: tuple<_UElements...>&& __in) 6011: : _Inherited(__tag, __a, 6011: static_cast<_Tuple_impl<0, _UElements...>&&>(__in)) 6011: { } 6011: 6011: tuple& 6011: operator=(const tuple& __in) 6011: { 6011: static_cast<_Inherited&>(*this) = __in; 6011: return *this; 6011: } 6011: 6011: tuple& 6011: operator=(tuple&& __in) 6011: noexcept(is_nothrow_move_assignable<_Inherited>::value) 6011: { 6011: static_cast<_Inherited&>(*this) = std::move(__in); 6011: return *this; 6011: } 6011: 6011: template 6011: typename 6011: enable_if::type 6011: operator=(const tuple<_UElements...>& __in) 6011: { 6011: static_cast<_Inherited&>(*this) = __in; 6011: return *this; 6011: } 6011: 6011: template 6011: typename 6011: enable_if::type 6011: operator=(tuple<_UElements...>&& __in) 6011: { 6011: static_cast<_Inherited&>(*this) = std::move(__in); 6011: return *this; 6011: } 6011: 6011: void 6011: swap(tuple& __in) 6011: noexcept(noexcept(__in._M_swap(__in))) 6011: { _Inherited::_M_swap(__in); } 6011: }; 6011: # 889 "/usr/include/c++/8/tuple" 3 6011: template<> 6011: class tuple<> 6011: { 6011: public: 6011: void swap(tuple&) noexcept { } 6011: 6011: 6011: tuple() = default; 6011: 6011: template 6011: tuple(allocator_arg_t, const _Alloc&) { } 6011: template 6011: tuple(allocator_arg_t, const _Alloc&, const tuple&) { } 6011: }; 6011: 6011: 6011: 6011: template 6011: class tuple<_T1, _T2> : public _Tuple_impl<0, _T1, _T2> 6011: { 6011: typedef _Tuple_impl<0, _T1, _T2> _Inherited; 6011: 6011: public: 6011: template , 6011: __is_implicitly_default_constructible<_U2>> 6011: ::value, bool>::type = true> 6011: 6011: constexpr tuple() 6011: : _Inherited() { } 6011: 6011: template , 6011: is_default_constructible<_U2>, 6011: __not_< 6011: __and_<__is_implicitly_default_constructible<_U1>, 6011: __is_implicitly_default_constructible<_U2>>>> 6011: ::value, bool>::type = false> 6011: 6011: explicit constexpr tuple() 6011: : _Inherited() { } 6011: 6011: 6011: 6011: template using _TCC = 6011: _TC::value, _T1, _T2>; 6011: 6011: template::template 6011: _ConstructibleTuple<_T1, _T2>() 6011: && _TCC<_Dummy>::template 6011: _ImplicitlyConvertibleTuple<_T1, _T2>(), 6011: bool>::type = true> 6011: constexpr tuple(const _T1& __a1, const _T2& __a2) 6011: : _Inherited(__a1, __a2) { } 6011: 6011: template::template 6011: _ConstructibleTuple<_T1, _T2>() 6011: && !_TCC<_Dummy>::template 6011: _ImplicitlyConvertibleTuple<_T1, _T2>(), 6011: bool>::type = false> 6011: explicit constexpr tuple(const _T1& __a1, const _T2& __a2) 6011: : _Inherited(__a1, __a2) { } 6011: 6011: 6011: 6011: using _TMC = _TC; 6011: 6011: template() 6011: && _TMC::template 6011: _ImplicitlyMoveConvertibleTuple<_U1, _U2>() 6011: && !is_same::type, 6011: allocator_arg_t>::value, 6011: bool>::type = true> 6011: constexpr tuple(_U1&& __a1, _U2&& __a2) 6011: : _Inherited(std::forward<_U1>(__a1), std::forward<_U2>(__a2)) { } 6011: 6011: template() 6011: && !_TMC::template 6011: _ImplicitlyMoveConvertibleTuple<_U1, _U2>() 6011: && !is_same::type, 6011: allocator_arg_t>::value, 6011: bool>::type = false> 6011: explicit constexpr tuple(_U1&& __a1, _U2&& __a2) 6011: : _Inherited(std::forward<_U1>(__a1), std::forward<_U2>(__a2)) { } 6011: 6011: constexpr tuple(const tuple&) = default; 6011: 6011: constexpr tuple(tuple&&) = default; 6011: 6011: template() 6011: && _TMC::template 6011: _ImplicitlyConvertibleTuple<_U1, _U2>(), 6011: bool>::type = true> 6011: constexpr tuple(const tuple<_U1, _U2>& __in) 6011: : _Inherited(static_cast&>(__in)) { } 6011: 6011: template() 6011: && !_TMC::template 6011: _ImplicitlyConvertibleTuple<_U1, _U2>(), 6011: bool>::type = false> 6011: explicit constexpr tuple(const tuple<_U1, _U2>& __in) 6011: : _Inherited(static_cast&>(__in)) { } 6011: 6011: template() 6011: && _TMC::template 6011: _ImplicitlyMoveConvertibleTuple<_U1, _U2>(), 6011: bool>::type = true> 6011: constexpr tuple(tuple<_U1, _U2>&& __in) 6011: : _Inherited(static_cast<_Tuple_impl<0, _U1, _U2>&&>(__in)) { } 6011: 6011: template() 6011: && !_TMC::template 6011: _ImplicitlyMoveConvertibleTuple<_U1, _U2>(), 6011: bool>::type = false> 6011: explicit constexpr tuple(tuple<_U1, _U2>&& __in) 6011: : _Inherited(static_cast<_Tuple_impl<0, _U1, _U2>&&>(__in)) { } 6011: 6011: template() 6011: && _TMC::template 6011: _ImplicitlyConvertibleTuple<_U1, _U2>(), 6011: bool>::type = true> 6011: constexpr tuple(const pair<_U1, _U2>& __in) 6011: : _Inherited(__in.first, __in.second) { } 6011: 6011: template() 6011: && !_TMC::template 6011: _ImplicitlyConvertibleTuple<_U1, _U2>(), 6011: bool>::type = false> 6011: explicit constexpr tuple(const pair<_U1, _U2>& __in) 6011: : _Inherited(__in.first, __in.second) { } 6011: 6011: template() 6011: && _TMC::template 6011: _ImplicitlyMoveConvertibleTuple<_U1, _U2>(), 6011: bool>::type = true> 6011: constexpr tuple(pair<_U1, _U2>&& __in) 6011: : _Inherited(std::forward<_U1>(__in.first), 6011: std::forward<_U2>(__in.second)) { } 6011: 6011: template() 6011: && !_TMC::template 6011: _ImplicitlyMoveConvertibleTuple<_U1, _U2>(), 6011: bool>::type = false> 6011: explicit constexpr tuple(pair<_U1, _U2>&& __in) 6011: : _Inherited(std::forward<_U1>(__in.first), 6011: std::forward<_U2>(__in.second)) { } 6011: 6011: 6011: 6011: template 6011: tuple(allocator_arg_t __tag, const _Alloc& __a) 6011: : _Inherited(__tag, __a) { } 6011: 6011: template::template 6011: _ConstructibleTuple<_T1, _T2>() 6011: && _TCC<_Dummy>::template 6011: _ImplicitlyConvertibleTuple<_T1, _T2>(), 6011: bool>::type=true> 6011: 6011: tuple(allocator_arg_t __tag, const _Alloc& __a, 6011: const _T1& __a1, const _T2& __a2) 6011: : _Inherited(__tag, __a, __a1, __a2) { } 6011: 6011: template::template 6011: _ConstructibleTuple<_T1, _T2>() 6011: && !_TCC<_Dummy>::template 6011: _ImplicitlyConvertibleTuple<_T1, _T2>(), 6011: bool>::type=false> 6011: 6011: explicit tuple(allocator_arg_t __tag, const _Alloc& __a, 6011: const _T1& __a1, const _T2& __a2) 6011: : _Inherited(__tag, __a, __a1, __a2) { } 6011: 6011: template() 6011: && _TMC::template 6011: _ImplicitlyMoveConvertibleTuple<_U1, _U2>(), 6011: bool>::type = true> 6011: tuple(allocator_arg_t __tag, const _Alloc& __a, _U1&& __a1, _U2&& __a2) 6011: : _Inherited(__tag, __a, std::forward<_U1>(__a1), 6011: std::forward<_U2>(__a2)) { } 6011: 6011: template() 6011: && !_TMC::template 6011: _ImplicitlyMoveConvertibleTuple<_U1, _U2>(), 6011: bool>::type = false> 6011: explicit tuple(allocator_arg_t __tag, const _Alloc& __a, 6011: _U1&& __a1, _U2&& __a2) 6011: : _Inherited(__tag, __a, std::forward<_U1>(__a1), 6011: std::forward<_U2>(__a2)) { } 6011: 6011: template 6011: tuple(allocator_arg_t __tag, const _Alloc& __a, const tuple& __in) 6011: : _Inherited(__tag, __a, static_cast(__in)) { } 6011: 6011: template 6011: tuple(allocator_arg_t __tag, const _Alloc& __a, tuple&& __in) 6011: : _Inherited(__tag, __a, static_cast<_Inherited&&>(__in)) { } 6011: 6011: template() 6011: && _TMC::template 6011: _ImplicitlyConvertibleTuple<_U1, _U2>(), 6011: bool>::type = true> 6011: tuple(allocator_arg_t __tag, const _Alloc& __a, 6011: const tuple<_U1, _U2>& __in) 6011: : _Inherited(__tag, __a, 6011: static_cast&>(__in)) 6011: { } 6011: 6011: template() 6011: && !_TMC::template 6011: _ImplicitlyConvertibleTuple<_U1, _U2>(), 6011: bool>::type = false> 6011: explicit tuple(allocator_arg_t __tag, const _Alloc& __a, 6011: const tuple<_U1, _U2>& __in) 6011: : _Inherited(__tag, __a, 6011: static_cast&>(__in)) 6011: { } 6011: 6011: template() 6011: && _TMC::template 6011: _ImplicitlyMoveConvertibleTuple<_U1, _U2>(), 6011: bool>::type = true> 6011: tuple(allocator_arg_t __tag, const _Alloc& __a, tuple<_U1, _U2>&& __in) 6011: : _Inherited(__tag, __a, static_cast<_Tuple_impl<0, _U1, _U2>&&>(__in)) 6011: { } 6011: 6011: template() 6011: && !_TMC::template 6011: _ImplicitlyMoveConvertibleTuple<_U1, _U2>(), 6011: bool>::type = false> 6011: explicit tuple(allocator_arg_t __tag, const _Alloc& __a, 6011: tuple<_U1, _U2>&& __in) 6011: : _Inherited(__tag, __a, static_cast<_Tuple_impl<0, _U1, _U2>&&>(__in)) 6011: { } 6011: 6011: template() 6011: && _TMC::template 6011: _ImplicitlyConvertibleTuple<_U1, _U2>(), 6011: bool>::type = true> 6011: tuple(allocator_arg_t __tag, const _Alloc& __a, 6011: const pair<_U1, _U2>& __in) 6011: : _Inherited(__tag, __a, __in.first, __in.second) { } 6011: 6011: template() 6011: && !_TMC::template 6011: _ImplicitlyConvertibleTuple<_U1, _U2>(), 6011: bool>::type = false> 6011: explicit tuple(allocator_arg_t __tag, const _Alloc& __a, 6011: const pair<_U1, _U2>& __in) 6011: : _Inherited(__tag, __a, __in.first, __in.second) { } 6011: 6011: template() 6011: && _TMC::template 6011: _ImplicitlyMoveConvertibleTuple<_U1, _U2>(), 6011: bool>::type = true> 6011: tuple(allocator_arg_t __tag, const _Alloc& __a, pair<_U1, _U2>&& __in) 6011: : _Inherited(__tag, __a, std::forward<_U1>(__in.first), 6011: std::forward<_U2>(__in.second)) { } 6011: 6011: template() 6011: && !_TMC::template 6011: _ImplicitlyMoveConvertibleTuple<_U1, _U2>(), 6011: bool>::type = false> 6011: explicit tuple(allocator_arg_t __tag, const _Alloc& __a, 6011: pair<_U1, _U2>&& __in) 6011: : _Inherited(__tag, __a, std::forward<_U1>(__in.first), 6011: std::forward<_U2>(__in.second)) { } 6011: 6011: tuple& 6011: operator=(const tuple& __in) 6011: { 6011: static_cast<_Inherited&>(*this) = __in; 6011: return *this; 6011: } 6011: 6011: tuple& 6011: operator=(tuple&& __in) 6011: noexcept(is_nothrow_move_assignable<_Inherited>::value) 6011: { 6011: static_cast<_Inherited&>(*this) = std::move(__in); 6011: return *this; 6011: } 6011: 6011: template 6011: tuple& 6011: operator=(const tuple<_U1, _U2>& __in) 6011: { 6011: static_cast<_Inherited&>(*this) = __in; 6011: return *this; 6011: } 6011: 6011: template 6011: tuple& 6011: operator=(tuple<_U1, _U2>&& __in) 6011: { 6011: static_cast<_Inherited&>(*this) = std::move(__in); 6011: return *this; 6011: } 6011: 6011: template 6011: tuple& 6011: operator=(const pair<_U1, _U2>& __in) 6011: { 6011: this->_M_head(*this) = __in.first; 6011: this->_M_tail(*this)._M_head(*this) = __in.second; 6011: return *this; 6011: } 6011: 6011: template 6011: tuple& 6011: operator=(pair<_U1, _U2>&& __in) 6011: { 6011: this->_M_head(*this) = std::forward<_U1>(__in.first); 6011: this->_M_tail(*this)._M_head(*this) = std::forward<_U2>(__in.second); 6011: return *this; 6011: } 6011: 6011: void 6011: swap(tuple& __in) 6011: noexcept(noexcept(__in._M_swap(__in))) 6011: { _Inherited::_M_swap(__in); } 6011: }; 6011: 6011: 6011: 6011: template 6011: struct tuple_size> 6011: : public integral_constant { }; 6011: # 1278 "/usr/include/c++/8/tuple" 3 6011: template 6011: struct tuple_element<__i, tuple<_Head, _Tail...> > 6011: : tuple_element<__i - 1, tuple<_Tail...> > { }; 6011: 6011: 6011: 6011: 6011: template 6011: struct tuple_element<0, tuple<_Head, _Tail...> > 6011: { 6011: typedef _Head type; 6011: }; 6011: 6011: 6011: 6011: 6011: template 6011: struct tuple_element<__i, tuple<>> 6011: { 6011: static_assert(__i < tuple_size>::value, 6011: "tuple index is in range"); 6011: }; 6011: 6011: template 6011: constexpr _Head& 6011: __get_helper(_Tuple_impl<__i, _Head, _Tail...>& __t) noexcept 6011: { return _Tuple_impl<__i, _Head, _Tail...>::_M_head(__t); } 6011: 6011: template 6011: constexpr const _Head& 6011: __get_helper(const _Tuple_impl<__i, _Head, _Tail...>& __t) noexcept 6011: { return _Tuple_impl<__i, _Head, _Tail...>::_M_head(__t); } 6011: 6011: 6011: template 6011: constexpr __tuple_element_t<__i, tuple<_Elements...>>& 6011: get(tuple<_Elements...>& __t) noexcept 6011: { return std::__get_helper<__i>(__t); } 6011: 6011: 6011: template 6011: constexpr const __tuple_element_t<__i, tuple<_Elements...>>& 6011: get(const tuple<_Elements...>& __t) noexcept 6011: { return std::__get_helper<__i>(__t); } 6011: 6011: 6011: template 6011: constexpr __tuple_element_t<__i, tuple<_Elements...>>&& 6011: get(tuple<_Elements...>&& __t) noexcept 6011: { 6011: typedef __tuple_element_t<__i, tuple<_Elements...>> __element_type; 6011: return std::forward<__element_type&&>(std::get<__i>(__t)); 6011: } 6011: 6011: 6011: template 6011: constexpr const __tuple_element_t<__i, tuple<_Elements...>>&& 6011: get(const tuple<_Elements...>&& __t) noexcept 6011: { 6011: typedef __tuple_element_t<__i, tuple<_Elements...>> __element_type; 6011: return std::forward(std::get<__i>(__t)); 6011: } 6011: # 1382 "/usr/include/c++/8/tuple" 3 6011: template 6011: struct __tuple_compare 6011: { 6011: static constexpr bool 6011: __eq(const _Tp& __t, const _Up& __u) 6011: { 6011: return bool(std::get<__i>(__t) == std::get<__i>(__u)) 6011: && __tuple_compare<_Tp, _Up, __i + 1, __size>::__eq(__t, __u); 6011: } 6011: 6011: static constexpr bool 6011: __less(const _Tp& __t, const _Up& __u) 6011: { 6011: return bool(std::get<__i>(__t) < std::get<__i>(__u)) 6011: || (!bool(std::get<__i>(__u) < std::get<__i>(__t)) 6011: && __tuple_compare<_Tp, _Up, __i + 1, __size>::__less(__t, __u)); 6011: } 6011: }; 6011: 6011: template 6011: struct __tuple_compare<_Tp, _Up, __size, __size> 6011: { 6011: static constexpr bool 6011: __eq(const _Tp&, const _Up&) { return true; } 6011: 6011: static constexpr bool 6011: __less(const _Tp&, const _Up&) { return false; } 6011: }; 6011: 6011: template 6011: constexpr bool 6011: operator==(const tuple<_TElements...>& __t, 6011: const tuple<_UElements...>& __u) 6011: { 6011: static_assert(sizeof...(_TElements) == sizeof...(_UElements), 6011: "tuple objects can only be compared if they have equal sizes."); 6011: using __compare = __tuple_compare, 6011: tuple<_UElements...>, 6011: 0, sizeof...(_TElements)>; 6011: return __compare::__eq(__t, __u); 6011: } 6011: 6011: template 6011: constexpr bool 6011: operator<(const tuple<_TElements...>& __t, 6011: const tuple<_UElements...>& __u) 6011: { 6011: static_assert(sizeof...(_TElements) == sizeof...(_UElements), 6011: "tuple objects can only be compared if they have equal sizes."); 6011: using __compare = __tuple_compare, 6011: tuple<_UElements...>, 6011: 0, sizeof...(_TElements)>; 6011: return __compare::__less(__t, __u); 6011: } 6011: 6011: template 6011: constexpr bool 6011: operator!=(const tuple<_TElements...>& __t, 6011: const tuple<_UElements...>& __u) 6011: { return !(__t == __u); } 6011: 6011: template 6011: constexpr bool 6011: operator>(const tuple<_TElements...>& __t, 6011: const tuple<_UElements...>& __u) 6011: { return __u < __t; } 6011: 6011: template 6011: constexpr bool 6011: operator<=(const tuple<_TElements...>& __t, 6011: const tuple<_UElements...>& __u) 6011: { return !(__u < __t); } 6011: 6011: template 6011: constexpr bool 6011: operator>=(const tuple<_TElements...>& __t, 6011: const tuple<_UElements...>& __u) 6011: { return !(__t < __u); } 6011: 6011: 6011: template 6011: constexpr tuple::__type...> 6011: make_tuple(_Elements&&... __args) 6011: { 6011: typedef tuple::__type...> 6011: __result_type; 6011: return __result_type(std::forward<_Elements>(__args)...); 6011: } 6011: 6011: 6011: 6011: template 6011: constexpr tuple<_Elements&&...> 6011: forward_as_tuple(_Elements&&... __args) noexcept 6011: { return tuple<_Elements&&...>(std::forward<_Elements>(__args)...); } 6011: 6011: template 6011: struct __make_tuple_impl; 6011: 6011: template 6011: struct __make_tuple_impl<_Idx, tuple<_Tp...>, _Tuple, _Nm> 6011: : __make_tuple_impl<_Idx + 1, 6011: tuple<_Tp..., __tuple_element_t<_Idx, _Tuple>>, 6011: _Tuple, _Nm> 6011: { }; 6011: 6011: template 6011: struct __make_tuple_impl<_Nm, tuple<_Tp...>, _Tuple, _Nm> 6011: { 6011: typedef tuple<_Tp...> __type; 6011: }; 6011: 6011: template 6011: struct __do_make_tuple 6011: : __make_tuple_impl<0, tuple<>, _Tuple, std::tuple_size<_Tuple>::value> 6011: { }; 6011: 6011: 6011: template 6011: struct __make_tuple 6011: : public __do_make_tuple::type>::type> 6011: { }; 6011: 6011: 6011: template 6011: struct __combine_tuples; 6011: 6011: template<> 6011: struct __combine_tuples<> 6011: { 6011: typedef tuple<> __type; 6011: }; 6011: 6011: template 6011: struct __combine_tuples> 6011: { 6011: typedef tuple<_Ts...> __type; 6011: }; 6011: 6011: template 6011: struct __combine_tuples, tuple<_T2s...>, _Rem...> 6011: { 6011: typedef typename __combine_tuples, 6011: _Rem...>::__type __type; 6011: }; 6011: 6011: 6011: template 6011: struct __tuple_cat_result 6011: { 6011: typedef typename __combine_tuples 6011: ::__type...>::__type __type; 6011: }; 6011: 6011: 6011: 6011: template 6011: struct __make_1st_indices; 6011: 6011: template<> 6011: struct __make_1st_indices<> 6011: { 6011: typedef std::_Index_tuple<> __type; 6011: }; 6011: 6011: template 6011: struct __make_1st_indices<_Tp, _Tpls...> 6011: { 6011: typedef typename std::_Build_index_tuple::type>::value>::__type __type; 6011: }; 6011: 6011: 6011: 6011: 6011: template 6011: struct __tuple_concater; 6011: 6011: template 6011: struct __tuple_concater<_Ret, std::_Index_tuple<_Is...>, _Tp, _Tpls...> 6011: { 6011: template 6011: static constexpr _Ret 6011: _S_do(_Tp&& __tp, _Tpls&&... __tps, _Us&&... __us) 6011: { 6011: typedef typename __make_1st_indices<_Tpls...>::__type __idx; 6011: typedef __tuple_concater<_Ret, __idx, _Tpls...> __next; 6011: return __next::_S_do(std::forward<_Tpls>(__tps)..., 6011: std::forward<_Us>(__us)..., 6011: std::get<_Is>(std::forward<_Tp>(__tp))...); 6011: } 6011: }; 6011: 6011: template 6011: struct __tuple_concater<_Ret, std::_Index_tuple<>> 6011: { 6011: template 6011: static constexpr _Ret 6011: _S_do(_Us&&... __us) 6011: { 6011: return _Ret(std::forward<_Us>(__us)...); 6011: } 6011: }; 6011: 6011: 6011: template...>::value>::type> 6011: constexpr auto 6011: tuple_cat(_Tpls&&... __tpls) 6011: -> typename __tuple_cat_result<_Tpls...>::__type 6011: { 6011: typedef typename __tuple_cat_result<_Tpls...>::__type __ret; 6011: typedef typename __make_1st_indices<_Tpls...>::__type __idx; 6011: typedef __tuple_concater<__ret, __idx, _Tpls...> __concater; 6011: return __concater::_S_do(std::forward<_Tpls>(__tpls)...); 6011: } 6011: 6011: 6011: 6011: 6011: template 6011: constexpr tuple<_Elements&...> 6011: tie(_Elements&... __args) noexcept 6011: { return tuple<_Elements&...>(__args...); } 6011: 6011: 6011: template 6011: inline 6011: 6011: 6011: typename enable_if<__and_<__is_swappable<_Elements>...>::value 6011: >::type 6011: 6011: 6011: 6011: swap(tuple<_Elements...>& __x, tuple<_Elements...>& __y) 6011: noexcept(noexcept(__x.swap(__y))) 6011: { __x.swap(__y); } 6011: 6011: 6011: template 6011: typename enable_if...>::value>::type 6011: swap(tuple<_Elements...>&, tuple<_Elements...>&) = delete; 6011: 6011: 6011: 6011: 6011: 6011: 6011: struct _Swallow_assign 6011: { 6011: template 6011: const _Swallow_assign& 6011: operator=(const _Tp&) const 6011: { return *this; } 6011: }; 6011: 6011: 6011: 6011: constexpr _Swallow_assign ignore{}; 6011: 6011: 6011: template 6011: struct uses_allocator, _Alloc> : true_type { }; 6011: 6011: 6011: template 6011: template 6011: inline 6011: pair<_T1, _T2>:: 6011: pair(piecewise_construct_t, 6011: tuple<_Args1...> __first, tuple<_Args2...> __second) 6011: : pair(__first, __second, 6011: typename _Build_index_tuple::__type(), 6011: typename _Build_index_tuple::__type()) 6011: { } 6011: 6011: template 6011: template 6011: inline 6011: pair<_T1, _T2>:: 6011: pair(tuple<_Args1...>& __tuple1, tuple<_Args2...>& __tuple2, 6011: _Index_tuple<_Indexes1...>, _Index_tuple<_Indexes2...>) 6011: : first(std::forward<_Args1>(std::get<_Indexes1>(__tuple1))...), 6011: second(std::forward<_Args2>(std::get<_Indexes2>(__tuple2))...) 6011: { } 6011: # 1711 "/usr/include/c++/8/tuple" 3 6011: 6011: } 6011: # 55 "/usr/include/c++/8/functional" 2 3 6011: 6011: 6011: 6011: # 1 "/usr/include/c++/8/bits/refwrap.h" 1 3 6011: # 33 "/usr/include/c++/8/bits/refwrap.h" 3 6011: 6011: # 34 "/usr/include/c++/8/bits/refwrap.h" 3 6011: # 43 "/usr/include/c++/8/bits/refwrap.h" 3 6011: namespace std __attribute__ ((__visibility__ ("default"))) 6011: { 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: template 6011: struct _Maybe_unary_or_binary_function { }; 6011: 6011: 6011: template 6011: struct _Maybe_unary_or_binary_function<_Res, _T1> 6011: : std::unary_function<_T1, _Res> { }; 6011: 6011: 6011: template 6011: struct _Maybe_unary_or_binary_function<_Res, _T1, _T2> 6011: : std::binary_function<_T1, _T2, _Res> { }; 6011: 6011: template 6011: struct _Mem_fn_traits; 6011: 6011: template 6011: struct _Mem_fn_traits_base 6011: { 6011: using __result_type = _Res; 6011: using __maybe_type 6011: = _Maybe_unary_or_binary_function<_Res, _Class*, _ArgTypes...>; 6011: using __arity = integral_constant; 6011: }; 6011: # 97 "/usr/include/c++/8/bits/refwrap.h" 3 6011: 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; }; 6011: 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; }; 6011: 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; }; 6011: # 111 "/usr/include/c++/8/bits/refwrap.h" 3 6011: template> 6011: struct _Maybe_get_result_type 6011: { }; 6011: 6011: template 6011: struct _Maybe_get_result_type<_Functor, 6011: __void_t> 6011: { typedef typename _Functor::result_type result_type; }; 6011: 6011: 6011: 6011: 6011: 6011: template 6011: struct _Weak_result_type_impl 6011: : _Maybe_get_result_type<_Functor> 6011: { }; 6011: 6011: 6011: template 6011: struct _Weak_result_type_impl<_Res(_ArgTypes...) > 6011: { typedef _Res result_type; }; 6011: 6011: 6011: template 6011: struct _Weak_result_type_impl<_Res(_ArgTypes......) > 6011: { typedef _Res result_type; }; 6011: 6011: 6011: template 6011: struct _Weak_result_type_impl<_Res(*)(_ArgTypes...) > 6011: { typedef _Res result_type; }; 6011: 6011: 6011: template 6011: struct 6011: _Weak_result_type_impl<_Res(*)(_ArgTypes......) > 6011: { typedef _Res result_type; }; 6011: 6011: 6011: template::value> 6011: struct _Weak_result_type_memfun 6011: : _Weak_result_type_impl<_Functor> 6011: { }; 6011: 6011: 6011: template 6011: struct _Weak_result_type_memfun<_MemFunPtr, true> 6011: { 6011: using result_type = typename _Mem_fn_traits<_MemFunPtr>::__result_type; 6011: }; 6011: 6011: 6011: template 6011: struct _Weak_result_type_memfun<_Func _Class::*, false> 6011: { }; 6011: 6011: 6011: 6011: 6011: 6011: template 6011: struct _Weak_result_type 6011: : _Weak_result_type_memfun::type> 6011: { }; 6011: 6011: 6011: template> 6011: struct _Refwrap_base_arg1 6011: { }; 6011: 6011: 6011: template 6011: struct _Refwrap_base_arg1<_Tp, 6011: __void_t> 6011: { 6011: typedef typename _Tp::argument_type argument_type; 6011: }; 6011: 6011: 6011: template> 6011: struct _Refwrap_base_arg2 6011: { }; 6011: 6011: 6011: template 6011: struct _Refwrap_base_arg2<_Tp, 6011: __void_t> 6011: { 6011: typedef typename _Tp::first_argument_type first_argument_type; 6011: typedef typename _Tp::second_argument_type second_argument_type; 6011: }; 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: template 6011: struct _Reference_wrapper_base 6011: : _Weak_result_type<_Tp>, _Refwrap_base_arg1<_Tp>, _Refwrap_base_arg2<_Tp> 6011: { }; 6011: 6011: 6011: template 6011: struct _Reference_wrapper_base<_Res(_T1) > 6011: : unary_function<_T1, _Res> 6011: { }; 6011: 6011: template 6011: struct _Reference_wrapper_base<_Res(_T1) const> 6011: : unary_function<_T1, _Res> 6011: { }; 6011: 6011: template 6011: struct _Reference_wrapper_base<_Res(_T1) volatile> 6011: : unary_function<_T1, _Res> 6011: { }; 6011: 6011: template 6011: struct _Reference_wrapper_base<_Res(_T1) const volatile> 6011: : unary_function<_T1, _Res> 6011: { }; 6011: 6011: 6011: template 6011: struct _Reference_wrapper_base<_Res(_T1, _T2) > 6011: : binary_function<_T1, _T2, _Res> 6011: { }; 6011: 6011: template 6011: struct _Reference_wrapper_base<_Res(_T1, _T2) const> 6011: : binary_function<_T1, _T2, _Res> 6011: { }; 6011: 6011: template 6011: struct _Reference_wrapper_base<_Res(_T1, _T2) volatile> 6011: : binary_function<_T1, _T2, _Res> 6011: { }; 6011: 6011: template 6011: struct _Reference_wrapper_base<_Res(_T1, _T2) const volatile> 6011: : binary_function<_T1, _T2, _Res> 6011: { }; 6011: 6011: 6011: template 6011: struct _Reference_wrapper_base<_Res(*)(_T1) > 6011: : unary_function<_T1, _Res> 6011: { }; 6011: 6011: 6011: template 6011: struct _Reference_wrapper_base<_Res(*)(_T1, _T2) > 6011: : binary_function<_T1, _T2, _Res> 6011: { }; 6011: 6011: template::value> 6011: struct _Reference_wrapper_base_memfun 6011: : _Reference_wrapper_base<_Tp> 6011: { }; 6011: 6011: template 6011: struct _Reference_wrapper_base_memfun<_MemFunPtr, true> 6011: : _Mem_fn_traits<_MemFunPtr>::__maybe_type 6011: { 6011: using result_type = typename _Mem_fn_traits<_MemFunPtr>::__result_type; 6011: }; 6011: 6011: 6011: 6011: 6011: 6011: 6011: template 6011: class reference_wrapper 6011: : public _Reference_wrapper_base_memfun::type> 6011: { 6011: _Tp* _M_data; 6011: 6011: public: 6011: typedef _Tp type; 6011: 6011: reference_wrapper(_Tp& __indata) noexcept 6011: : _M_data(std::__addressof(__indata)) 6011: { } 6011: 6011: reference_wrapper(_Tp&&) = delete; 6011: 6011: reference_wrapper(const reference_wrapper&) = default; 6011: 6011: reference_wrapper& 6011: operator=(const reference_wrapper&) = default; 6011: 6011: operator _Tp&() const noexcept 6011: { return this->get(); } 6011: 6011: _Tp& 6011: get() const noexcept 6011: { return *_M_data; } 6011: 6011: template 6011: typename result_of<_Tp&(_Args&&...)>::type 6011: operator()(_Args&&... __args) const 6011: { 6011: return std::__invoke(get(), std::forward<_Args>(__args)...); 6011: } 6011: }; 6011: 6011: 6011: 6011: template 6011: inline reference_wrapper<_Tp> 6011: ref(_Tp& __t) noexcept 6011: { return reference_wrapper<_Tp>(__t); } 6011: 6011: 6011: template 6011: inline reference_wrapper 6011: cref(const _Tp& __t) noexcept 6011: { return reference_wrapper(__t); } 6011: 6011: template 6011: void ref(const _Tp&&) = delete; 6011: 6011: template 6011: void cref(const _Tp&&) = delete; 6011: 6011: 6011: template 6011: inline reference_wrapper<_Tp> 6011: ref(reference_wrapper<_Tp> __t) noexcept 6011: { return __t; } 6011: 6011: 6011: template 6011: inline reference_wrapper 6011: cref(reference_wrapper<_Tp> __t) noexcept 6011: { return { __t.get() }; } 6011: 6011: 6011: 6011: 6011: } 6011: # 59 "/usr/include/c++/8/functional" 2 3 6011: # 1 "/usr/include/c++/8/bits/std_function.h" 1 3 6011: # 33 "/usr/include/c++/8/bits/std_function.h" 3 6011: 6011: # 34 "/usr/include/c++/8/bits/std_function.h" 3 6011: # 47 "/usr/include/c++/8/bits/std_function.h" 3 6011: namespace std __attribute__ ((__visibility__ ("default"))) 6011: { 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: class bad_function_call : public std::exception 6011: { 6011: public: 6011: virtual ~bad_function_call() noexcept; 6011: 6011: const char* what() const noexcept; 6011: }; 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: template 6011: struct __is_location_invariant 6011: : is_trivially_copyable<_Tp>::type 6011: { }; 6011: 6011: class _Undefined_class; 6011: 6011: union _Nocopy_types 6011: { 6011: void* _M_object; 6011: const void* _M_const_object; 6011: void (*_M_function_pointer)(); 6011: void (_Undefined_class::*_M_member_pointer)(); 6011: }; 6011: 6011: union [[gnu::may_alias]] _Any_data 6011: { 6011: void* _M_access() { return &_M_pod_data[0]; } 6011: const void* _M_access() const { return &_M_pod_data[0]; } 6011: 6011: template 6011: _Tp& 6011: _M_access() 6011: { return *static_cast<_Tp*>(_M_access()); } 6011: 6011: template 6011: const _Tp& 6011: _M_access() const 6011: { return *static_cast(_M_access()); } 6011: 6011: _Nocopy_types _M_unused; 6011: char _M_pod_data[sizeof(_Nocopy_types)]; 6011: }; 6011: 6011: enum _Manager_operation 6011: { 6011: __get_type_info, 6011: __get_functor_ptr, 6011: __clone_functor, 6011: __destroy_functor 6011: }; 6011: 6011: 6011: 6011: template 6011: struct _Simple_type_wrapper 6011: { 6011: _Simple_type_wrapper(_Tp __value) : __value(__value) { } 6011: 6011: _Tp __value; 6011: }; 6011: 6011: template 6011: struct __is_location_invariant<_Simple_type_wrapper<_Tp> > 6011: : __is_location_invariant<_Tp> 6011: { }; 6011: 6011: template 6011: class function; 6011: 6011: 6011: class _Function_base 6011: { 6011: public: 6011: static const std::size_t _M_max_size = sizeof(_Nocopy_types); 6011: static const std::size_t _M_max_align = __alignof__(_Nocopy_types); 6011: 6011: template 6011: class _Base_manager 6011: { 6011: protected: 6011: static const bool __stored_locally = 6011: (__is_location_invariant<_Functor>::value 6011: && sizeof(_Functor) <= _M_max_size 6011: && __alignof__(_Functor) <= _M_max_align 6011: && (_M_max_align % __alignof__(_Functor) == 0)); 6011: 6011: typedef integral_constant _Local_storage; 6011: 6011: 6011: static _Functor* 6011: _M_get_pointer(const _Any_data& __source) 6011: { 6011: const _Functor* __ptr = 6011: __stored_locally? std::__addressof(__source._M_access<_Functor>()) 6011: : __source._M_access<_Functor*>(); 6011: return const_cast<_Functor*>(__ptr); 6011: } 6011: 6011: 6011: 6011: static void 6011: _M_clone(_Any_data& __dest, const _Any_data& __source, true_type) 6011: { 6011: ::new (__dest._M_access()) _Functor(__source._M_access<_Functor>()); 6011: } 6011: 6011: 6011: 6011: static void 6011: _M_clone(_Any_data& __dest, const _Any_data& __source, false_type) 6011: { 6011: __dest._M_access<_Functor*>() = 6011: new _Functor(*__source._M_access<_Functor*>()); 6011: } 6011: 6011: 6011: 6011: static void 6011: _M_destroy(_Any_data& __victim, true_type) 6011: { 6011: __victim._M_access<_Functor>().~_Functor(); 6011: } 6011: 6011: 6011: static void 6011: _M_destroy(_Any_data& __victim, false_type) 6011: { 6011: delete __victim._M_access<_Functor*>(); 6011: } 6011: 6011: public: 6011: static bool 6011: _M_manager(_Any_data& __dest, const _Any_data& __source, 6011: _Manager_operation __op) 6011: { 6011: switch (__op) 6011: { 6011: 6011: case __get_type_info: 6011: __dest._M_access() = &typeid(_Functor); 6011: break; 6011: 6011: case __get_functor_ptr: 6011: __dest._M_access<_Functor*>() = _M_get_pointer(__source); 6011: break; 6011: 6011: case __clone_functor: 6011: _M_clone(__dest, __source, _Local_storage()); 6011: break; 6011: 6011: case __destroy_functor: 6011: _M_destroy(__dest, _Local_storage()); 6011: break; 6011: } 6011: return false; 6011: } 6011: 6011: static void 6011: _M_init_functor(_Any_data& __functor, _Functor&& __f) 6011: { _M_init_functor(__functor, std::move(__f), _Local_storage()); } 6011: 6011: template 6011: static bool 6011: _M_not_empty_function(const function<_Signature>& __f) 6011: { return static_cast(__f); } 6011: 6011: template 6011: static bool 6011: _M_not_empty_function(_Tp* __fp) 6011: { return __fp != nullptr; } 6011: 6011: template 6011: static bool 6011: _M_not_empty_function(_Tp _Class::* __mp) 6011: { return __mp != nullptr; } 6011: 6011: template 6011: static bool 6011: _M_not_empty_function(const _Tp&) 6011: { return true; } 6011: 6011: private: 6011: static void 6011: _M_init_functor(_Any_data& __functor, _Functor&& __f, true_type) 6011: { ::new (__functor._M_access()) _Functor(std::move(__f)); } 6011: 6011: static void 6011: _M_init_functor(_Any_data& __functor, _Functor&& __f, false_type) 6011: { __functor._M_access<_Functor*>() = new _Functor(std::move(__f)); } 6011: }; 6011: 6011: _Function_base() : _M_manager(nullptr) { } 6011: 6011: ~_Function_base() 6011: { 6011: if (_M_manager) 6011: _M_manager(_M_functor, _M_functor, __destroy_functor); 6011: } 6011: 6011: bool _M_empty() const { return !_M_manager; } 6011: 6011: typedef bool (*_Manager_type)(_Any_data&, const _Any_data&, 6011: _Manager_operation); 6011: 6011: _Any_data _M_functor; 6011: _Manager_type _M_manager; 6011: }; 6011: 6011: template 6011: class _Function_handler; 6011: 6011: template 6011: class _Function_handler<_Res(_ArgTypes...), _Functor> 6011: : public _Function_base::_Base_manager<_Functor> 6011: { 6011: typedef _Function_base::_Base_manager<_Functor> _Base; 6011: 6011: public: 6011: static _Res 6011: _M_invoke(const _Any_data& __functor, _ArgTypes&&... __args) 6011: { 6011: return (*_Base::_M_get_pointer(__functor))( 6011: std::forward<_ArgTypes>(__args)...); 6011: } 6011: }; 6011: 6011: template 6011: class _Function_handler 6011: : public _Function_base::_Base_manager<_Functor> 6011: { 6011: typedef _Function_base::_Base_manager<_Functor> _Base; 6011: 6011: public: 6011: static void 6011: _M_invoke(const _Any_data& __functor, _ArgTypes&&... __args) 6011: { 6011: (*_Base::_M_get_pointer(__functor))( 6011: std::forward<_ArgTypes>(__args)...); 6011: } 6011: }; 6011: 6011: template 6011: class _Function_handler<_Res(_ArgTypes...), _Member _Class::*> 6011: : public _Function_handler 6011: { 6011: typedef _Function_handler 6011: _Base; 6011: 6011: public: 6011: static _Res 6011: _M_invoke(const _Any_data& __functor, _ArgTypes&&... __args) 6011: { 6011: return std::__invoke(_Base::_M_get_pointer(__functor)->__value, 6011: std::forward<_ArgTypes>(__args)...); 6011: } 6011: }; 6011: 6011: template 6011: class _Function_handler 6011: : public _Function_base::_Base_manager< 6011: _Simple_type_wrapper< _Member _Class::* > > 6011: { 6011: typedef _Member _Class::* _Functor; 6011: typedef _Simple_type_wrapper<_Functor> _Wrapper; 6011: typedef _Function_base::_Base_manager<_Wrapper> _Base; 6011: 6011: public: 6011: static bool 6011: _M_manager(_Any_data& __dest, const _Any_data& __source, 6011: _Manager_operation __op) 6011: { 6011: switch (__op) 6011: { 6011: 6011: case __get_type_info: 6011: __dest._M_access() = &typeid(_Functor); 6011: break; 6011: 6011: case __get_functor_ptr: 6011: __dest._M_access<_Functor*>() = 6011: &_Base::_M_get_pointer(__source)->__value; 6011: break; 6011: 6011: default: 6011: _Base::_M_manager(__dest, __source, __op); 6011: } 6011: return false; 6011: } 6011: 6011: static void 6011: _M_invoke(const _Any_data& __functor, _ArgTypes&&... __args) 6011: { 6011: std::__invoke(_Base::_M_get_pointer(__functor)->__value, 6011: std::forward<_ArgTypes>(__args)...); 6011: } 6011: }; 6011: 6011: template 6011: using __check_func_return_type 6011: = __or_, is_same<_From, _To>, is_convertible<_From, _To>>; 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: template 6011: class function<_Res(_ArgTypes...)> 6011: : public _Maybe_unary_or_binary_function<_Res, _ArgTypes...>, 6011: private _Function_base 6011: { 6011: template::type> 6011: struct _Callable : __check_func_return_type<_Res2, _Res> { }; 6011: 6011: 6011: 6011: template 6011: struct _Callable : false_type { }; 6011: 6011: template 6011: using _Requires = typename enable_if<_Cond::value, _Tp>::type; 6011: 6011: public: 6011: typedef _Res result_type; 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: function() noexcept 6011: : _Function_base() { } 6011: 6011: 6011: 6011: 6011: 6011: function(nullptr_t) noexcept 6011: : _Function_base() { } 6011: # 413 "/usr/include/c++/8/bits/std_function.h" 3 6011: function(const function& __x); 6011: # 422 "/usr/include/c++/8/bits/std_function.h" 3 6011: function(function&& __x) noexcept : _Function_base() 6011: { 6011: __x.swap(*this); 6011: } 6011: # 443 "/usr/include/c++/8/bits/std_function.h" 3 6011: template>, void>, 6011: typename = _Requires<_Callable<_Functor>, void>> 6011: function(_Functor); 6011: # 460 "/usr/include/c++/8/bits/std_function.h" 3 6011: function& 6011: operator=(const function& __x) 6011: { 6011: function(__x).swap(*this); 6011: return *this; 6011: } 6011: # 478 "/usr/include/c++/8/bits/std_function.h" 3 6011: function& 6011: operator=(function&& __x) noexcept 6011: { 6011: function(std::move(__x)).swap(*this); 6011: return *this; 6011: } 6011: # 492 "/usr/include/c++/8/bits/std_function.h" 3 6011: function& 6011: operator=(nullptr_t) noexcept 6011: { 6011: if (_M_manager) 6011: { 6011: _M_manager(_M_functor, _M_functor, __destroy_functor); 6011: _M_manager = nullptr; 6011: _M_invoker = nullptr; 6011: } 6011: return *this; 6011: } 6011: # 520 "/usr/include/c++/8/bits/std_function.h" 3 6011: template 6011: _Requires<_Callable::type>, function&> 6011: operator=(_Functor&& __f) 6011: { 6011: function(std::forward<_Functor>(__f)).swap(*this); 6011: return *this; 6011: } 6011: 6011: 6011: template 6011: function& 6011: operator=(reference_wrapper<_Functor> __f) noexcept 6011: { 6011: function(__f).swap(*this); 6011: return *this; 6011: } 6011: # 546 "/usr/include/c++/8/bits/std_function.h" 3 6011: void swap(function& __x) noexcept 6011: { 6011: std::swap(_M_functor, __x._M_functor); 6011: std::swap(_M_manager, __x._M_manager); 6011: std::swap(_M_invoker, __x._M_invoker); 6011: } 6011: # 563 "/usr/include/c++/8/bits/std_function.h" 3 6011: explicit operator bool() const noexcept 6011: { return !_M_empty(); } 6011: # 576 "/usr/include/c++/8/bits/std_function.h" 3 6011: _Res operator()(_ArgTypes... __args) const; 6011: # 589 "/usr/include/c++/8/bits/std_function.h" 3 6011: const type_info& target_type() const noexcept; 6011: # 602 "/usr/include/c++/8/bits/std_function.h" 3 6011: template _Functor* target() noexcept; 6011: 6011: template const _Functor* target() const noexcept; 6011: 6011: 6011: 6011: private: 6011: using _Invoker_type = _Res (*)(const _Any_data&, _ArgTypes&&...); 6011: _Invoker_type _M_invoker; 6011: }; 6011: # 651 "/usr/include/c++/8/bits/std_function.h" 3 6011: template 6011: function<_Res(_ArgTypes...)>:: 6011: function(const function& __x) 6011: : _Function_base() 6011: { 6011: if (static_cast(__x)) 6011: { 6011: __x._M_manager(_M_functor, __x._M_functor, __clone_functor); 6011: _M_invoker = __x._M_invoker; 6011: _M_manager = __x._M_manager; 6011: } 6011: } 6011: 6011: template 6011: template 6011: function<_Res(_ArgTypes...)>:: 6011: function(_Functor __f) 6011: : _Function_base() 6011: { 6011: typedef _Function_handler<_Res(_ArgTypes...), _Functor> _My_handler; 6011: 6011: if (_My_handler::_M_not_empty_function(__f)) 6011: { 6011: _My_handler::_M_init_functor(_M_functor, std::move(__f)); 6011: _M_invoker = &_My_handler::_M_invoke; 6011: _M_manager = &_My_handler::_M_manager; 6011: } 6011: } 6011: 6011: template 6011: _Res 6011: function<_Res(_ArgTypes...)>:: 6011: operator()(_ArgTypes... __args) const 6011: { 6011: if (_M_empty()) 6011: __throw_bad_function_call(); 6011: return _M_invoker(_M_functor, std::forward<_ArgTypes>(__args)...); 6011: } 6011: 6011: 6011: template 6011: const type_info& 6011: function<_Res(_ArgTypes...)>:: 6011: target_type() const noexcept 6011: { 6011: if (_M_manager) 6011: { 6011: _Any_data __typeinfo_result; 6011: _M_manager(__typeinfo_result, _M_functor, __get_type_info); 6011: return *__typeinfo_result._M_access(); 6011: } 6011: else 6011: return typeid(void); 6011: } 6011: 6011: template 6011: template 6011: _Functor* 6011: function<_Res(_ArgTypes...)>:: 6011: target() noexcept 6011: { 6011: const function* __const_this = this; 6011: const _Functor* __func = __const_this->template target<_Functor>(); 6011: return const_cast<_Functor*>(__func); 6011: } 6011: 6011: template 6011: template 6011: const _Functor* 6011: function<_Res(_ArgTypes...)>:: 6011: target() const noexcept 6011: { 6011: if (typeid(_Functor) == target_type() && _M_manager) 6011: { 6011: _Any_data __ptr; 6011: _M_manager(__ptr, _M_functor, __get_functor_ptr); 6011: return __ptr._M_access(); 6011: } 6011: else 6011: return nullptr; 6011: } 6011: # 743 "/usr/include/c++/8/bits/std_function.h" 3 6011: template 6011: inline bool 6011: operator==(const function<_Res(_Args...)>& __f, nullptr_t) noexcept 6011: { return !static_cast(__f); } 6011: 6011: 6011: template 6011: inline bool 6011: operator==(nullptr_t, const function<_Res(_Args...)>& __f) noexcept 6011: { return !static_cast(__f); } 6011: # 761 "/usr/include/c++/8/bits/std_function.h" 3 6011: template 6011: inline bool 6011: operator!=(const function<_Res(_Args...)>& __f, nullptr_t) noexcept 6011: { return static_cast(__f); } 6011: 6011: 6011: template 6011: inline bool 6011: operator!=(nullptr_t, const function<_Res(_Args...)>& __f) noexcept 6011: { return static_cast(__f); } 6011: # 782 "/usr/include/c++/8/bits/std_function.h" 3 6011: template 6011: inline void 6011: swap(function<_Res(_Args...)>& __x, function<_Res(_Args...)>& __y) noexcept 6011: { __x.swap(__y); } 6011: 6011: 6011: } 6011: # 60 "/usr/include/c++/8/functional" 2 3 6011: # 68 "/usr/include/c++/8/functional" 3 6011: namespace std __attribute__ ((__visibility__ ("default"))) 6011: { 6011: 6011: # 86 "/usr/include/c++/8/functional" 3 6011: template::value> 6011: class _Mem_fn_base 6011: : public _Mem_fn_traits<_MemFunPtr>::__maybe_type 6011: { 6011: using _Traits = _Mem_fn_traits<_MemFunPtr>; 6011: 6011: using _Arity = typename _Traits::__arity; 6011: using _Varargs = typename _Traits::__vararg; 6011: 6011: template 6011: friend struct _Bind_check_arity; 6011: 6011: _MemFunPtr _M_pmf; 6011: 6011: public: 6011: 6011: using result_type = typename _Traits::__result_type; 6011: 6011: explicit constexpr 6011: _Mem_fn_base(_MemFunPtr __pmf) noexcept : _M_pmf(__pmf) { } 6011: 6011: template 6011: auto 6011: operator()(_Args&&... __args) const 6011: noexcept(noexcept( 6011: std::__invoke(_M_pmf, std::forward<_Args>(__args)...))) 6011: -> decltype(std::__invoke(_M_pmf, std::forward<_Args>(__args)...)) 6011: { return std::__invoke(_M_pmf, std::forward<_Args>(__args)...); } 6011: }; 6011: 6011: 6011: template 6011: class _Mem_fn_base<_MemObjPtr, false> 6011: { 6011: using _Arity = integral_constant; 6011: using _Varargs = false_type; 6011: 6011: template 6011: friend struct _Bind_check_arity; 6011: 6011: _MemObjPtr _M_pm; 6011: 6011: public: 6011: explicit constexpr 6011: _Mem_fn_base(_MemObjPtr __pm) noexcept : _M_pm(__pm) { } 6011: 6011: template 6011: auto 6011: operator()(_Tp&& __obj) const 6011: noexcept(noexcept(std::__invoke(_M_pm, std::forward<_Tp>(__obj)))) 6011: -> decltype(std::__invoke(_M_pm, std::forward<_Tp>(__obj))) 6011: { return std::__invoke(_M_pm, std::forward<_Tp>(__obj)); } 6011: }; 6011: 6011: template 6011: struct _Mem_fn; 6011: 6011: template 6011: struct _Mem_fn<_Res _Class::*> 6011: : _Mem_fn_base<_Res _Class::*> 6011: { 6011: using _Mem_fn_base<_Res _Class::*>::_Mem_fn_base; 6011: }; 6011: # 158 "/usr/include/c++/8/functional" 3 6011: template 6011: inline _Mem_fn<_Tp _Class::*> 6011: mem_fn(_Tp _Class::* __pm) noexcept 6011: { 6011: return _Mem_fn<_Tp _Class::*>(__pm); 6011: } 6011: # 173 "/usr/include/c++/8/functional" 3 6011: template 6011: struct is_bind_expression 6011: : public false_type { }; 6011: # 184 "/usr/include/c++/8/functional" 3 6011: template 6011: struct is_placeholder 6011: : public integral_constant 6011: { }; 6011: # 199 "/usr/include/c++/8/functional" 3 6011: template struct _Placeholder { }; 6011: 6011: 6011: 6011: 6011: 6011: namespace placeholders 6011: { 6011: 6011: 6011: 6011: 6011: extern const _Placeholder<1> _1; 6011: extern const _Placeholder<2> _2; 6011: extern const _Placeholder<3> _3; 6011: extern const _Placeholder<4> _4; 6011: extern const _Placeholder<5> _5; 6011: extern const _Placeholder<6> _6; 6011: extern const _Placeholder<7> _7; 6011: extern const _Placeholder<8> _8; 6011: extern const _Placeholder<9> _9; 6011: extern const _Placeholder<10> _10; 6011: extern const _Placeholder<11> _11; 6011: extern const _Placeholder<12> _12; 6011: extern const _Placeholder<13> _13; 6011: extern const _Placeholder<14> _14; 6011: extern const _Placeholder<15> _15; 6011: extern const _Placeholder<16> _16; 6011: extern const _Placeholder<17> _17; 6011: extern const _Placeholder<18> _18; 6011: extern const _Placeholder<19> _19; 6011: extern const _Placeholder<20> _20; 6011: extern const _Placeholder<21> _21; 6011: extern const _Placeholder<22> _22; 6011: extern const _Placeholder<23> _23; 6011: extern const _Placeholder<24> _24; 6011: extern const _Placeholder<25> _25; 6011: extern const _Placeholder<26> _26; 6011: extern const _Placeholder<27> _27; 6011: extern const _Placeholder<28> _28; 6011: extern const _Placeholder<29> _29; 6011: } 6011: 6011: 6011: 6011: 6011: 6011: 6011: template 6011: struct is_placeholder<_Placeholder<_Num> > 6011: : public integral_constant 6011: { }; 6011: 6011: template 6011: struct is_placeholder > 6011: : public integral_constant 6011: { }; 6011: 6011: 6011: 6011: template 6011: using _Safe_tuple_element_t 6011: = typename enable_if<(__i < tuple_size<_Tuple>::value), 6011: tuple_element<__i, _Tuple>>::type::type; 6011: # 275 "/usr/include/c++/8/functional" 3 6011: template::value, 6011: bool _IsPlaceholder = (is_placeholder<_Arg>::value > 0)> 6011: class _Mu; 6011: 6011: 6011: 6011: 6011: 6011: 6011: template 6011: class _Mu, false, false> 6011: { 6011: public: 6011: 6011: 6011: 6011: 6011: template 6011: _Tp& 6011: operator()(_CVRef& __arg, _Tuple&) const volatile 6011: { return __arg.get(); } 6011: }; 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: template 6011: class _Mu<_Arg, true, false> 6011: { 6011: public: 6011: template 6011: auto 6011: operator()(_CVArg& __arg, 6011: tuple<_Args...>& __tuple) const volatile 6011: -> decltype(__arg(declval<_Args>()...)) 6011: { 6011: 6011: typedef typename _Build_index_tuple::__type 6011: _Indexes; 6011: return this->__call(__arg, __tuple, _Indexes()); 6011: } 6011: 6011: private: 6011: 6011: 6011: template 6011: auto 6011: __call(_CVArg& __arg, tuple<_Args...>& __tuple, 6011: const _Index_tuple<_Indexes...>&) const volatile 6011: -> decltype(__arg(declval<_Args>()...)) 6011: { 6011: return __arg(std::get<_Indexes>(std::move(__tuple))...); 6011: } 6011: }; 6011: 6011: 6011: 6011: 6011: 6011: 6011: template 6011: class _Mu<_Arg, false, true> 6011: { 6011: public: 6011: template 6011: _Safe_tuple_element_t<(is_placeholder<_Arg>::value - 1), _Tuple>&& 6011: operator()(const volatile _Arg&, _Tuple& __tuple) const volatile 6011: { 6011: return 6011: ::std::get<(is_placeholder<_Arg>::value - 1)>(std::move(__tuple)); 6011: } 6011: }; 6011: 6011: 6011: 6011: 6011: 6011: 6011: template 6011: class _Mu<_Arg, false, false> 6011: { 6011: public: 6011: template 6011: _CVArg&& 6011: operator()(_CVArg&& __arg, _Tuple&) const volatile 6011: { return std::forward<_CVArg>(__arg); } 6011: }; 6011: 6011: 6011: template 6011: inline auto 6011: __volget(volatile tuple<_Tp...>& __tuple) 6011: -> __tuple_element_t<_Ind, tuple<_Tp...>> volatile& 6011: { return std::get<_Ind>(const_cast&>(__tuple)); } 6011: 6011: 6011: template 6011: inline auto 6011: __volget(const volatile tuple<_Tp...>& __tuple) 6011: -> __tuple_element_t<_Ind, tuple<_Tp...>> const volatile& 6011: { return std::get<_Ind>(const_cast&>(__tuple)); } 6011: 6011: 6011: template 6011: struct _Bind; 6011: 6011: template 6011: class _Bind<_Functor(_Bound_args...)> 6011: : public _Weak_result_type<_Functor> 6011: { 6011: typedef typename _Build_index_tuple::__type 6011: _Bound_indexes; 6011: 6011: _Functor _M_f; 6011: tuple<_Bound_args...> _M_bound_args; 6011: 6011: 6011: template 6011: _Result 6011: __call(tuple<_Args...>&& __args, _Index_tuple<_Indexes...>) 6011: { 6011: return std::__invoke(_M_f, 6011: _Mu<_Bound_args>()(std::get<_Indexes>(_M_bound_args), __args)... 6011: ); 6011: } 6011: 6011: 6011: template 6011: _Result 6011: __call_c(tuple<_Args...>&& __args, _Index_tuple<_Indexes...>) const 6011: { 6011: return std::__invoke(_M_f, 6011: _Mu<_Bound_args>()(std::get<_Indexes>(_M_bound_args), __args)... 6011: ); 6011: } 6011: 6011: 6011: template 6011: _Result 6011: __call_v(tuple<_Args...>&& __args, 6011: _Index_tuple<_Indexes...>) volatile 6011: { 6011: return std::__invoke(_M_f, 6011: _Mu<_Bound_args>()(__volget<_Indexes>(_M_bound_args), __args)... 6011: ); 6011: } 6011: 6011: 6011: template 6011: _Result 6011: __call_c_v(tuple<_Args...>&& __args, 6011: _Index_tuple<_Indexes...>) const volatile 6011: { 6011: return std::__invoke(_M_f, 6011: _Mu<_Bound_args>()(__volget<_Indexes>(_M_bound_args), __args)... 6011: ); 6011: } 6011: 6011: template 6011: using _Mu_type = decltype( 6011: _Mu::type>()( 6011: std::declval<_BoundArg&>(), std::declval<_CallArgs&>()) ); 6011: 6011: template 6011: using _Res_type_impl 6011: = typename result_of< _Fn&(_Mu_type<_BArgs, _CallArgs>&&...) >::type; 6011: 6011: template 6011: using _Res_type = _Res_type_impl<_Functor, _CallArgs, _Bound_args...>; 6011: 6011: template 6011: using __dependent = typename 6011: enable_if::value+1), _Functor>::type; 6011: 6011: template class __cv_quals> 6011: using _Res_type_cv = _Res_type_impl< 6011: typename __cv_quals<__dependent<_CallArgs>>::type, 6011: _CallArgs, 6011: typename __cv_quals<_Bound_args>::type...>; 6011: 6011: public: 6011: template 6011: explicit _Bind(const _Functor& __f, _Args&&... __args) 6011: : _M_f(__f), _M_bound_args(std::forward<_Args>(__args)...) 6011: { } 6011: 6011: template 6011: explicit _Bind(_Functor&& __f, _Args&&... __args) 6011: : _M_f(std::move(__f)), _M_bound_args(std::forward<_Args>(__args)...) 6011: { } 6011: 6011: _Bind(const _Bind&) = default; 6011: 6011: _Bind(_Bind&& __b) 6011: : _M_f(std::move(__b._M_f)), _M_bound_args(std::move(__b._M_bound_args)) 6011: { } 6011: 6011: 6011: template>> 6011: _Result 6011: operator()(_Args&&... __args) 6011: { 6011: return this->__call<_Result>( 6011: std::forward_as_tuple(std::forward<_Args>(__args)...), 6011: _Bound_indexes()); 6011: } 6011: 6011: 6011: template, add_const>> 6011: _Result 6011: operator()(_Args&&... __args) const 6011: { 6011: return this->__call_c<_Result>( 6011: std::forward_as_tuple(std::forward<_Args>(__args)...), 6011: _Bound_indexes()); 6011: } 6011: # 505 "/usr/include/c++/8/functional" 3 6011: template, add_volatile>> 6011: 6011: _Result 6011: operator()(_Args&&... __args) volatile 6011: { 6011: return this->__call_v<_Result>( 6011: std::forward_as_tuple(std::forward<_Args>(__args)...), 6011: _Bound_indexes()); 6011: } 6011: 6011: 6011: template, add_cv>> 6011: 6011: _Result 6011: operator()(_Args&&... __args) const volatile 6011: { 6011: return this->__call_c_v<_Result>( 6011: std::forward_as_tuple(std::forward<_Args>(__args)...), 6011: _Bound_indexes()); 6011: } 6011: }; 6011: 6011: 6011: template 6011: struct _Bind_result; 6011: 6011: template 6011: class _Bind_result<_Result, _Functor(_Bound_args...)> 6011: { 6011: typedef typename _Build_index_tuple::__type 6011: _Bound_indexes; 6011: 6011: _Functor _M_f; 6011: tuple<_Bound_args...> _M_bound_args; 6011: 6011: 6011: template 6011: using __enable_if_void 6011: = typename enable_if{}>::type; 6011: 6011: template 6011: using __disable_if_void 6011: = typename enable_if{}, _Result>::type; 6011: 6011: 6011: template 6011: __disable_if_void<_Res> 6011: __call(tuple<_Args...>&& __args, _Index_tuple<_Indexes...>) 6011: { 6011: return std::__invoke(_M_f, _Mu<_Bound_args>() 6011: (std::get<_Indexes>(_M_bound_args), __args)...); 6011: } 6011: 6011: 6011: template 6011: __enable_if_void<_Res> 6011: __call(tuple<_Args...>&& __args, _Index_tuple<_Indexes...>) 6011: { 6011: std::__invoke(_M_f, _Mu<_Bound_args>() 6011: (std::get<_Indexes>(_M_bound_args), __args)...); 6011: } 6011: 6011: 6011: template 6011: __disable_if_void<_Res> 6011: __call(tuple<_Args...>&& __args, _Index_tuple<_Indexes...>) const 6011: { 6011: return std::__invoke(_M_f, _Mu<_Bound_args>() 6011: (std::get<_Indexes>(_M_bound_args), __args)...); 6011: } 6011: 6011: 6011: template 6011: __enable_if_void<_Res> 6011: __call(tuple<_Args...>&& __args, _Index_tuple<_Indexes...>) const 6011: { 6011: std::__invoke(_M_f, _Mu<_Bound_args>() 6011: (std::get<_Indexes>(_M_bound_args), __args)...); 6011: } 6011: 6011: 6011: template 6011: __disable_if_void<_Res> 6011: __call(tuple<_Args...>&& __args, _Index_tuple<_Indexes...>) volatile 6011: { 6011: return std::__invoke(_M_f, _Mu<_Bound_args>() 6011: (__volget<_Indexes>(_M_bound_args), __args)...); 6011: } 6011: 6011: 6011: template 6011: __enable_if_void<_Res> 6011: __call(tuple<_Args...>&& __args, _Index_tuple<_Indexes...>) volatile 6011: { 6011: std::__invoke(_M_f, _Mu<_Bound_args>() 6011: (__volget<_Indexes>(_M_bound_args), __args)...); 6011: } 6011: 6011: 6011: template 6011: __disable_if_void<_Res> 6011: __call(tuple<_Args...>&& __args, 6011: _Index_tuple<_Indexes...>) const volatile 6011: { 6011: return std::__invoke(_M_f, _Mu<_Bound_args>() 6011: (__volget<_Indexes>(_M_bound_args), __args)...); 6011: } 6011: 6011: 6011: template 6011: __enable_if_void<_Res> 6011: __call(tuple<_Args...>&& __args, 6011: _Index_tuple<_Indexes...>) const volatile 6011: { 6011: std::__invoke(_M_f, _Mu<_Bound_args>() 6011: (__volget<_Indexes>(_M_bound_args), __args)...); 6011: } 6011: 6011: public: 6011: typedef _Result result_type; 6011: 6011: template 6011: explicit _Bind_result(const _Functor& __f, _Args&&... __args) 6011: : _M_f(__f), _M_bound_args(std::forward<_Args>(__args)...) 6011: { } 6011: 6011: template 6011: explicit _Bind_result(_Functor&& __f, _Args&&... __args) 6011: : _M_f(std::move(__f)), _M_bound_args(std::forward<_Args>(__args)...) 6011: { } 6011: 6011: _Bind_result(const _Bind_result&) = default; 6011: 6011: _Bind_result(_Bind_result&& __b) 6011: : _M_f(std::move(__b._M_f)), _M_bound_args(std::move(__b._M_bound_args)) 6011: { } 6011: 6011: 6011: template 6011: result_type 6011: operator()(_Args&&... __args) 6011: { 6011: return this->__call<_Result>( 6011: std::forward_as_tuple(std::forward<_Args>(__args)...), 6011: _Bound_indexes()); 6011: } 6011: 6011: 6011: template 6011: result_type 6011: operator()(_Args&&... __args) const 6011: { 6011: return this->__call<_Result>( 6011: std::forward_as_tuple(std::forward<_Args>(__args)...), 6011: _Bound_indexes()); 6011: } 6011: 6011: 6011: template 6011: 6011: result_type 6011: operator()(_Args&&... __args) volatile 6011: { 6011: return this->__call<_Result>( 6011: std::forward_as_tuple(std::forward<_Args>(__args)...), 6011: _Bound_indexes()); 6011: } 6011: 6011: 6011: template 6011: 6011: result_type 6011: operator()(_Args&&... __args) const volatile 6011: { 6011: return this->__call<_Result>( 6011: std::forward_as_tuple(std::forward<_Args>(__args)...), 6011: _Bound_indexes()); 6011: } 6011: }; 6011: 6011: 6011: 6011: 6011: 6011: 6011: template 6011: struct is_bind_expression<_Bind<_Signature> > 6011: : public true_type { }; 6011: 6011: 6011: 6011: 6011: 6011: template 6011: struct is_bind_expression > 6011: : public true_type { }; 6011: 6011: 6011: 6011: 6011: 6011: template 6011: struct is_bind_expression > 6011: : public true_type { }; 6011: 6011: 6011: 6011: 6011: 6011: template 6011: struct is_bind_expression> 6011: : public true_type { }; 6011: 6011: 6011: 6011: 6011: 6011: template 6011: struct is_bind_expression<_Bind_result<_Result, _Signature>> 6011: : public true_type { }; 6011: 6011: 6011: 6011: 6011: 6011: template 6011: struct is_bind_expression> 6011: : public true_type { }; 6011: 6011: 6011: 6011: 6011: 6011: template 6011: struct is_bind_expression> 6011: : public true_type { }; 6011: 6011: 6011: 6011: 6011: 6011: template 6011: struct is_bind_expression> 6011: : public true_type { }; 6011: 6011: template 6011: struct _Bind_check_arity { }; 6011: 6011: template 6011: struct _Bind_check_arity<_Ret (*)(_Args...), _BoundArgs...> 6011: { 6011: static_assert(sizeof...(_BoundArgs) == sizeof...(_Args), 6011: "Wrong number of arguments for function"); 6011: }; 6011: 6011: template 6011: struct _Bind_check_arity<_Ret (*)(_Args......), _BoundArgs...> 6011: { 6011: static_assert(sizeof...(_BoundArgs) >= sizeof...(_Args), 6011: "Wrong number of arguments for function"); 6011: }; 6011: 6011: template 6011: struct _Bind_check_arity<_Tp _Class::*, _BoundArgs...> 6011: { 6011: using _Arity = typename _Mem_fn<_Tp _Class::*>::_Arity; 6011: using _Varargs = typename _Mem_fn<_Tp _Class::*>::_Varargs; 6011: static_assert(_Varargs::value 6011: ? sizeof...(_BoundArgs) >= _Arity::value + 1 6011: : sizeof...(_BoundArgs) == _Arity::value + 1, 6011: "Wrong number of arguments for pointer-to-member"); 6011: }; 6011: 6011: 6011: 6011: 6011: template::type> 6011: using __is_socketlike = __or_, is_enum<_Tp2>>; 6011: 6011: template 6011: struct _Bind_helper 6011: : _Bind_check_arity::type, _BoundArgs...> 6011: { 6011: typedef typename decay<_Func>::type __func_type; 6011: typedef _Bind<__func_type(typename decay<_BoundArgs>::type...)> type; 6011: }; 6011: 6011: 6011: 6011: 6011: template 6011: struct _Bind_helper 6011: { }; 6011: 6011: 6011: 6011: 6011: 6011: template 6011: inline typename 6011: _Bind_helper<__is_socketlike<_Func>::value, _Func, _BoundArgs...>::type 6011: bind(_Func&& __f, _BoundArgs&&... __args) 6011: { 6011: typedef _Bind_helper __helper_type; 6011: return typename __helper_type::type(std::forward<_Func>(__f), 6011: std::forward<_BoundArgs>(__args)...); 6011: } 6011: 6011: template 6011: struct _Bindres_helper 6011: : _Bind_check_arity::type, _BoundArgs...> 6011: { 6011: typedef typename decay<_Func>::type __functor_type; 6011: typedef _Bind_result<_Result, 6011: __functor_type(typename decay<_BoundArgs>::type...)> 6011: type; 6011: }; 6011: 6011: 6011: 6011: 6011: 6011: template 6011: inline 6011: typename _Bindres_helper<_Result, _Func, _BoundArgs...>::type 6011: bind(_Func&& __f, _BoundArgs&&... __args) 6011: { 6011: typedef _Bindres_helper<_Result, _Func, _BoundArgs...> __helper_type; 6011: return typename __helper_type::type(std::forward<_Func>(__f), 6011: std::forward<_BoundArgs>(__args)...); 6011: } 6011: # 1192 "/usr/include/c++/8/functional" 3 6011: 6011: } 6011: # 6 "hash.hh" 2 6011: 6011: # 1 "/usr/include/c++/8/cstddef" 1 3 6011: # 42 "/usr/include/c++/8/cstddef" 3 6011: 6011: # 43 "/usr/include/c++/8/cstddef" 3 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: # 1 "/usr/lib/gcc/arm-linux-gnueabihf/8/include/stddef.h" 1 3 4 6011: # 51 "/usr/include/c++/8/cstddef" 2 3 6011: 6011: 6011: namespace std 6011: { 6011: 6011: using ::max_align_t; 6011: } 6011: # 8 "hash.hh" 2 6011: 6011: 6011: # 9 "hash.hh" 6011: namespace Kakoune 6011: { 6011: 6011: size_t hash_data(const char* data, size_t len); 6011: 6011: template 6011: size_t hash_value(const Type&... val) 6011: { 6011: static_assert(sizeof...(Type) == 1, ""); 6011: return std::hash()(val...); 6011: } 6011: 6011: template 6011: typename std::enable_if::value, size_t>::type 6011: hash_value(const Type& val) 6011: { 6011: return hash_value((typename std::underlying_type::type)val); 6011: } 6011: 6011: template 6011: size_t hash_values(Type&& t) 6011: { 6011: return hash_value(std::forward(t)); 6011: } 6011: 6011: inline size_t combine_hash(size_t lhs, size_t rhs) 6011: { 6011: return lhs ^ (rhs + 0x9e3779b9 + (lhs << 6) + (lhs >> 2)); 6011: } 6011: 6011: template 6011: size_t hash_values(Type&& t, RemainingTypes&&... rt) 6011: { 6011: size_t seed = hash_values(std::forward(rt)...); 6011: return combine_hash(seed, hash_value(std::forward(t))); 6011: } 6011: 6011: template 6011: size_t hash_value(const std::pair& val) 6011: { 6011: return hash_values(val.first, val.second); 6011: } 6011: 6011: template 6011: struct Hash 6011: { 6011: size_t operator()(const Type& val) const 6011: { 6011: return hash_value(val); 6011: } 6011: }; 6011: 6011: } 6011: # 6 "units.hh" 2 6011: 6011: 6011: 6011: namespace Kakoune 6011: { 6011: 6011: template 6011: class StronglyTypedNumber 6011: { 6011: public: 6011: [[gnu::always_inline]] 6011: explicit constexpr StronglyTypedNumber(ValueType value) 6011: : m_value(value) 6011: { 6011: static_assert(std::is_base_of::value, 6011: "RealType is not derived from StronglyTypedNumber"); 6011: } 6011: 6011: [[gnu::always_inline]] 6011: constexpr friend RealType operator+(RealType lhs, RealType rhs) 6011: { return RealType(lhs.m_value + rhs.m_value); } 6011: 6011: [[gnu::always_inline]] 6011: constexpr friend RealType operator-(RealType lhs, RealType rhs) 6011: { return RealType(lhs.m_value - rhs.m_value); } 6011: 6011: [[gnu::always_inline]] 6011: constexpr friend RealType operator*(RealType lhs, RealType rhs) 6011: { return RealType(lhs.m_value * rhs.m_value); } 6011: 6011: [[gnu::always_inline]] 6011: constexpr friend RealType operator/(RealType lhs, RealType rhs) 6011: { return RealType(lhs.m_value / rhs.m_value); } 6011: 6011: [[gnu::always_inline]] 6011: RealType& operator+=(RealType other) 6011: { m_value += other.m_value; return static_cast(*this); } 6011: 6011: [[gnu::always_inline]] 6011: RealType& operator-=(RealType other) 6011: { m_value -= other.m_value; return static_cast(*this); } 6011: 6011: [[gnu::always_inline]] 6011: RealType& operator*=(RealType other) 6011: { m_value *= other.m_value; return static_cast(*this); } 6011: 6011: [[gnu::always_inline]] 6011: RealType& operator/=(RealType other) 6011: { m_value /= other.m_value; return static_cast(*this); } 6011: 6011: [[gnu::always_inline]] 6011: RealType& operator++() 6011: { ++m_value; return static_cast(*this); } 6011: 6011: [[gnu::always_inline]] 6011: RealType& operator--() 6011: { --m_value; return static_cast(*this); } 6011: 6011: [[gnu::always_inline]] 6011: RealType operator++(int) 6011: { RealType backup(static_cast(*this)); ++m_value; return backup; } 6011: 6011: [[gnu::always_inline]] 6011: RealType operator--(int) 6011: { RealType backup(static_cast(*this)); --m_value; return backup; } 6011: 6011: [[gnu::always_inline]] 6011: constexpr RealType operator-() const { return RealType(-m_value); } 6011: 6011: [[gnu::always_inline]] 6011: constexpr friend RealType operator%(RealType lhs, RealType rhs) 6011: { return RealType(lhs.m_value % rhs.m_value); } 6011: 6011: [[gnu::always_inline]] 6011: RealType& operator%=(RealType other) 6011: { m_value %= other.m_value; return static_cast(*this); } 6011: 6011: [[gnu::always_inline]] 6011: constexpr friend bool operator==(RealType lhs, RealType rhs) 6011: { return lhs.m_value == rhs.m_value; } 6011: 6011: [[gnu::always_inline]] 6011: constexpr friend bool operator!=(RealType lhs, RealType rhs) 6011: { return lhs.m_value != rhs.m_value; } 6011: 6011: [[gnu::always_inline]] 6011: constexpr friend bool operator<(RealType lhs, RealType rhs) 6011: { return lhs.m_value < rhs.m_value; } 6011: 6011: [[gnu::always_inline]] 6011: constexpr friend bool operator<=(RealType lhs, RealType rhs) 6011: { return lhs.m_value <= rhs.m_value; } 6011: 6011: [[gnu::always_inline]] 6011: constexpr friend bool operator>(RealType lhs, RealType rhs) 6011: { return lhs.m_value > rhs.m_value; } 6011: 6011: [[gnu::always_inline]] 6011: constexpr friend bool operator>=(RealType lhs, RealType rhs) 6011: { return lhs.m_value >= rhs.m_value; } 6011: 6011: [[gnu::always_inline]] 6011: constexpr bool operator!() const 6011: { return not m_value; } 6011: 6011: [[gnu::always_inline]] 6011: explicit constexpr operator ValueType() const { return m_value; } 6011: [[gnu::always_inline]] 6011: explicit constexpr operator bool() const { return m_value; } 6011: 6011: friend size_t hash_value(RealType val) { return hash_value(val.m_value); } 6011: friend size_t abs(RealType val) { return val.m_value < ValueType(0) ? -val.m_value : val.m_value; } 6011: 6011: 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; } 6011: 6011: protected: 6011: ValueType m_value; 6011: }; 6011: 6011: struct LineCount : public StronglyTypedNumber 6011: { 6011: [[gnu::always_inline]] 6011: constexpr LineCount(int value = 0) : StronglyTypedNumber(value) {} 6011: }; 6011: 6011: [[gnu::always_inline]] 6011: inline constexpr LineCount operator"" _line(unsigned long long int value) 6011: { 6011: return LineCount(value); 6011: } 6011: 6011: struct ByteCount : public StronglyTypedNumber 6011: { 6011: [[gnu::always_inline]] 6011: constexpr ByteCount(int value = 0) : StronglyTypedNumber(value) {} 6011: }; 6011: 6011: [[gnu::always_inline]] 6011: inline constexpr ByteCount operator"" _byte(unsigned long long int value) 6011: { 6011: return ByteCount(value); 6011: } 6011: 6011: struct CharCount : public StronglyTypedNumber 6011: { 6011: [[gnu::always_inline]] 6011: constexpr CharCount(int value = 0) : StronglyTypedNumber(value) {} 6011: }; 6011: 6011: [[gnu::always_inline]] 6011: inline constexpr CharCount operator"" _char(unsigned long long int value) 6011: { 6011: return CharCount(value); 6011: } 6011: 6011: struct ColumnCount : public StronglyTypedNumber 6011: { 6011: [[gnu::always_inline]] 6011: constexpr ColumnCount(int value = 0) : StronglyTypedNumber(value) {} 6011: }; 6011: 6011: [[gnu::always_inline]] 6011: inline constexpr ColumnCount operator"" _col(unsigned long long int value) 6011: { 6011: return ColumnCount(value); 6011: } 6011: 6011: } 6011: # 5 "coord.hh" 2 6011: 6011: 6011: namespace Kakoune 6011: { 6011: 6011: template 6011: struct LineAndColumn 6011: { 6011: LineType line; 6011: ColumnType column; 6011: 6011: [[gnu::always_inline]] 6011: constexpr LineAndColumn(LineType line = 0, ColumnType column = 0) 6011: : line(line), column(column) {} 6011: 6011: [[gnu::always_inline]] 6011: constexpr EffectiveType operator+(EffectiveType other) const 6011: { 6011: return {line + other.line, column + other.column}; 6011: } 6011: 6011: [[gnu::always_inline]] 6011: EffectiveType& operator+=(EffectiveType other) 6011: { 6011: line += other.line; 6011: column += other.column; 6011: return *static_cast(this); 6011: } 6011: 6011: [[gnu::always_inline]] 6011: constexpr EffectiveType operator-(EffectiveType other) const 6011: { 6011: return {line - other.line, column - other.column}; 6011: } 6011: 6011: [[gnu::always_inline]] 6011: EffectiveType& operator-=(EffectiveType other) 6011: { 6011: line -= other.line; 6011: column -= other.column; 6011: return *static_cast(this); 6011: } 6011: 6011: [[gnu::always_inline]] 6011: constexpr bool operator< (EffectiveType other) const 6011: { 6011: return (line != other.line) ? line < other.line 6011: : column < other.column; 6011: } 6011: 6011: [[gnu::always_inline]] 6011: constexpr bool operator<= (EffectiveType other) const 6011: { 6011: return (line != other.line) ? line < other.line 6011: : column <= other.column; 6011: } 6011: 6011: [[gnu::always_inline]] 6011: constexpr bool operator> (EffectiveType other) const 6011: { 6011: return (line != other.line) ? line > other.line 6011: : column > other.column; 6011: } 6011: 6011: [[gnu::always_inline]] 6011: constexpr bool operator>= (EffectiveType other) const 6011: { 6011: return (line != other.line) ? line > other.line 6011: : column >= other.column; 6011: } 6011: 6011: [[gnu::always_inline]] 6011: constexpr bool operator== (EffectiveType other) const 6011: { 6011: return line == other.line and column == other.column; 6011: } 6011: 6011: [[gnu::always_inline]] 6011: constexpr bool operator!= (EffectiveType other) const 6011: { 6011: return line != other.line or column != other.column; 6011: } 6011: 6011: friend size_t hash_value(const EffectiveType& val) 6011: { 6011: return hash_values(val.line, val.column); 6011: } 6011: }; 6011: 6011: struct BufferCoord : LineAndColumn 6011: { 6011: [[gnu::always_inline]] 6011: constexpr BufferCoord(LineCount line = 0, ByteCount column = 0) 6011: : LineAndColumn(line, column) {} 6011: }; 6011: 6011: struct DisplayCoord : LineAndColumn 6011: { 6011: [[gnu::always_inline]] 6011: constexpr DisplayCoord(LineCount line = 0, ColumnCount column = 0) 6011: : LineAndColumn(line, column) {} 6011: 6011: static constexpr const char* option_type_name = "coord"; 6011: }; 6011: 6011: struct BufferCoordAndTarget : BufferCoord 6011: { 6011: [[gnu::always_inline]] 6011: constexpr BufferCoordAndTarget(LineCount line = 0, ByteCount column = 0, ColumnCount target = -1) 6011: : BufferCoord(line, column), target(target) {} 6011: 6011: [[gnu::always_inline]] 6011: constexpr BufferCoordAndTarget(BufferCoord coord, ColumnCount target = -1) 6011: : BufferCoord(coord), target(target) {} 6011: 6011: ColumnCount target; 6011: }; 6011: 6011: inline size_t hash_value(const BufferCoordAndTarget& val) 6011: { 6011: return hash_values(val.line, val.column, val.target); 6011: } 6011: 6011: } 6011: # 5 "keys.hh" 2 6011: # 1 "flags.hh" 1 6011: 6011: 6011: 6011: 6011: 6011: namespace Kakoune 6011: { 6011: 6011: template 6011: struct WithBitOps : std::false_type {}; 6011: 6011: template 6011: using UnderlyingType = typename std::underlying_type::type; 6011: 6011: template 6011: using EnableIfWithBitOps = typename std::enable_if::value, T>::type; 6011: 6011: template 6011: using EnableIfWithoutBitOps = typename std::enable_if::value, T>::type; 6011: 6011: template> 6011: constexpr Flags operator|(Flags lhs, Flags rhs) 6011: { 6011: return (Flags)((UnderlyingType) lhs | (UnderlyingType) rhs); 6011: } 6011: 6011: template> 6011: Flags& operator|=(Flags& lhs, Flags rhs) 6011: { 6011: (UnderlyingType&) lhs |= (UnderlyingType) rhs; 6011: return lhs; 6011: } 6011: 6011: template 6011: struct TestableFlags 6011: { 6011: Flags value; 6011: constexpr operator bool() const { return (UnderlyingType)value; } 6011: constexpr operator Flags() const { return value; } 6011: constexpr operator UnderlyingType() const { return (UnderlyingType)value; } 6011: 6011: bool operator==(const TestableFlags& other) const { return value == other.value; } 6011: bool operator!=(const TestableFlags& other) const { return value != other.value; } 6011: }; 6011: 6011: template> 6011: constexpr TestableFlags operator&(Flags lhs, Flags rhs) 6011: { 6011: return { (Flags)((UnderlyingType) lhs & (UnderlyingType) rhs) }; 6011: } 6011: 6011: template> 6011: Flags& operator&=(Flags& lhs, Flags rhs) 6011: { 6011: (UnderlyingType&) lhs &= (UnderlyingType) rhs; 6011: return lhs; 6011: } 6011: 6011: template> 6011: constexpr Flags operator~(Flags lhs) 6011: { 6011: return (Flags)(~(UnderlyingType)lhs); 6011: } 6011: 6011: template> 6011: constexpr Flags operator^(Flags lhs, Flags rhs) 6011: { 6011: return (Flags)((UnderlyingType) lhs ^ (UnderlyingType) rhs); 6011: } 6011: 6011: template> 6011: Flags& operator^=(Flags& lhs, Flags rhs) 6011: { 6011: (UnderlyingType&) lhs ^= (UnderlyingType) rhs; 6011: return lhs; 6011: } 6011: 6011: } 6011: # 6 "keys.hh" 2 6011: 6011: # 1 "optional.hh" 1 6011: 6011: 6011: 6011: 6011: 6011: namespace Kakoune 6011: { 6011: 6011: template 6011: struct Optional 6011: { 6011: public: 6011: constexpr Optional() : m_valid(false) {} 6011: Optional(const T& other) : m_valid(true) { new (&m_value) T(other); } 6011: Optional(T&& other) : m_valid(true) { new (&m_value) T(std::move(other)); } 6011: 6011: Optional(const Optional& other) 6011: : m_valid(other.m_valid) 6011: { 6011: if (m_valid) 6011: new (&m_value) T(other.m_value); 6011: } 6011: 6011: Optional(Optional&& other) 6011: noexcept(noexcept(new (nullptr) T(std::move(other.m_value)))) 6011: : m_valid(other.m_valid) 6011: { 6011: if (m_valid) 6011: new (&m_value) T(std::move(other.m_value)); 6011: } 6011: 6011: Optional& operator=(const Optional& other) 6011: { 6011: destruct_ifn(); 6011: if ((m_valid = other.m_valid)) 6011: new (&m_value) T(other.m_value); 6011: return *this; 6011: } 6011: 6011: Optional& operator=(Optional&& other) 6011: { 6011: destruct_ifn(); 6011: if ((m_valid = other.m_valid)) 6011: new (&m_value) T(std::move(other.m_value)); 6011: return *this; 6011: } 6011: 6011: ~Optional() { destruct_ifn(); } 6011: 6011: constexpr explicit operator bool() const noexcept { return m_valid; } 6011: 6011: bool operator==(const Optional& other) const 6011: { 6011: return m_valid == other.m_valid and 6011: (not m_valid or m_value == other.m_value); 6011: } 6011: 6011: template 6011: void emplace(Args&&... args) 6011: { 6011: destruct_ifn(); 6011: new (&m_value) T{std::forward(args)...}; 6011: m_valid = true; 6011: } 6011: 6011: T& operator*() 6011: { 6011: if (not (m_valid)) on_assert_failed("assert failed \"" "m_valid" "\" at " "optional.hh" ":" "68"); 6011: return m_value; 6011: } 6011: const T& operator*() const { return *const_cast(*this); } 6011: 6011: T* operator->() 6011: { 6011: if (not (m_valid)) on_assert_failed("assert failed \"" "m_valid" "\" at " "optional.hh" ":" "75"); 6011: return &m_value; 6011: } 6011: const T* operator->() const { return const_cast(*this).operator->(); } 6011: 6011: template 6011: T value_or(U&& fallback) const { return m_valid ? m_value : T{fallback}; } 6011: 6011: void reset() { destruct_ifn(); m_valid = false; } 6011: 6011: private: 6011: void destruct_ifn() { if (m_valid) m_value.~T(); } 6011: 6011: struct Empty {}; 6011: union 6011: { 6011: Empty m_empty; 6011: T m_value; 6011: }; 6011: bool m_valid; 6011: }; 6011: 6011: } 6011: # 8 "keys.hh" 2 6011: # 1 "unicode.hh" 1 6011: 6011: 6011: 6011: 6011: 6011: # 1 "/usr/include/c++/8/locale" 1 3 6011: # 36 "/usr/include/c++/8/locale" 3 6011: 6011: # 37 "/usr/include/c++/8/locale" 3 6011: 6011: 6011: 6011: 6011: # 1 "/usr/include/c++/8/bits/locale_facets_nonio.h" 1 3 6011: # 37 "/usr/include/c++/8/bits/locale_facets_nonio.h" 3 6011: 6011: # 38 "/usr/include/c++/8/bits/locale_facets_nonio.h" 3 6011: 6011: # 1 "/usr/include/c++/8/ctime" 1 3 6011: # 39 "/usr/include/c++/8/ctime" 3 6011: 6011: # 40 "/usr/include/c++/8/ctime" 3 6011: # 58 "/usr/include/c++/8/ctime" 3 6011: 6011: # 58 "/usr/include/c++/8/ctime" 3 6011: namespace std 6011: { 6011: using ::clock_t; 6011: using ::time_t; 6011: using ::tm; 6011: 6011: using ::clock; 6011: using ::difftime; 6011: using ::mktime; 6011: using ::time; 6011: using ::asctime; 6011: using ::ctime; 6011: using ::gmtime; 6011: using ::localtime; 6011: using ::strftime; 6011: } 6011: # 40 "/usr/include/c++/8/bits/locale_facets_nonio.h" 2 3 6011: 6011: namespace std __attribute__ ((__visibility__ ("default"))) 6011: { 6011: 6011: # 52 "/usr/include/c++/8/bits/locale_facets_nonio.h" 3 6011: class time_base 6011: { 6011: public: 6011: enum dateorder { no_order, dmy, mdy, ymd, ydm }; 6011: }; 6011: 6011: template 6011: struct __timepunct_cache : public locale::facet 6011: { 6011: 6011: static const _CharT* _S_timezones[14]; 6011: 6011: const _CharT* _M_date_format; 6011: const _CharT* _M_date_era_format; 6011: const _CharT* _M_time_format; 6011: const _CharT* _M_time_era_format; 6011: const _CharT* _M_date_time_format; 6011: const _CharT* _M_date_time_era_format; 6011: const _CharT* _M_am; 6011: const _CharT* _M_pm; 6011: const _CharT* _M_am_pm_format; 6011: 6011: 6011: const _CharT* _M_day1; 6011: const _CharT* _M_day2; 6011: const _CharT* _M_day3; 6011: const _CharT* _M_day4; 6011: const _CharT* _M_day5; 6011: const _CharT* _M_day6; 6011: const _CharT* _M_day7; 6011: 6011: 6011: const _CharT* _M_aday1; 6011: const _CharT* _M_aday2; 6011: const _CharT* _M_aday3; 6011: const _CharT* _M_aday4; 6011: const _CharT* _M_aday5; 6011: const _CharT* _M_aday6; 6011: const _CharT* _M_aday7; 6011: 6011: 6011: const _CharT* _M_month01; 6011: const _CharT* _M_month02; 6011: const _CharT* _M_month03; 6011: const _CharT* _M_month04; 6011: const _CharT* _M_month05; 6011: const _CharT* _M_month06; 6011: const _CharT* _M_month07; 6011: const _CharT* _M_month08; 6011: const _CharT* _M_month09; 6011: const _CharT* _M_month10; 6011: const _CharT* _M_month11; 6011: const _CharT* _M_month12; 6011: 6011: 6011: const _CharT* _M_amonth01; 6011: const _CharT* _M_amonth02; 6011: const _CharT* _M_amonth03; 6011: const _CharT* _M_amonth04; 6011: const _CharT* _M_amonth05; 6011: const _CharT* _M_amonth06; 6011: const _CharT* _M_amonth07; 6011: const _CharT* _M_amonth08; 6011: const _CharT* _M_amonth09; 6011: const _CharT* _M_amonth10; 6011: const _CharT* _M_amonth11; 6011: const _CharT* _M_amonth12; 6011: 6011: bool _M_allocated; 6011: 6011: __timepunct_cache(size_t __refs = 0) : facet(__refs), 6011: _M_date_format(0), _M_date_era_format(0), _M_time_format(0), 6011: _M_time_era_format(0), _M_date_time_format(0), 6011: _M_date_time_era_format(0), _M_am(0), _M_pm(0), 6011: _M_am_pm_format(0), _M_day1(0), _M_day2(0), _M_day3(0), 6011: _M_day4(0), _M_day5(0), _M_day6(0), _M_day7(0), 6011: _M_aday1(0), _M_aday2(0), _M_aday3(0), _M_aday4(0), 6011: _M_aday5(0), _M_aday6(0), _M_aday7(0), _M_month01(0), 6011: _M_month02(0), _M_month03(0), _M_month04(0), _M_month05(0), 6011: _M_month06(0), _M_month07(0), _M_month08(0), _M_month09(0), 6011: _M_month10(0), _M_month11(0), _M_month12(0), _M_amonth01(0), 6011: _M_amonth02(0), _M_amonth03(0), _M_amonth04(0), 6011: _M_amonth05(0), _M_amonth06(0), _M_amonth07(0), 6011: _M_amonth08(0), _M_amonth09(0), _M_amonth10(0), 6011: _M_amonth11(0), _M_amonth12(0), _M_allocated(false) 6011: { } 6011: 6011: ~__timepunct_cache(); 6011: 6011: private: 6011: __timepunct_cache& 6011: operator=(const __timepunct_cache&); 6011: 6011: explicit 6011: __timepunct_cache(const __timepunct_cache&); 6011: }; 6011: 6011: template 6011: __timepunct_cache<_CharT>::~__timepunct_cache() 6011: { 6011: if (_M_allocated) 6011: { 6011: 6011: } 6011: } 6011: 6011: 6011: template<> 6011: const char* 6011: __timepunct_cache::_S_timezones[14]; 6011: 6011: 6011: template<> 6011: const wchar_t* 6011: __timepunct_cache::_S_timezones[14]; 6011: 6011: 6011: 6011: template 6011: const _CharT* __timepunct_cache<_CharT>::_S_timezones[14]; 6011: 6011: template 6011: class __timepunct : public locale::facet 6011: { 6011: public: 6011: 6011: typedef _CharT __char_type; 6011: typedef __timepunct_cache<_CharT> __cache_type; 6011: 6011: protected: 6011: __cache_type* _M_data; 6011: __c_locale _M_c_locale_timepunct; 6011: const char* _M_name_timepunct; 6011: 6011: public: 6011: 6011: static locale::id id; 6011: 6011: explicit 6011: __timepunct(size_t __refs = 0); 6011: 6011: explicit 6011: __timepunct(__cache_type* __cache, size_t __refs = 0); 6011: # 206 "/usr/include/c++/8/bits/locale_facets_nonio.h" 3 6011: explicit 6011: __timepunct(__c_locale __cloc, const char* __s, size_t __refs = 0); 6011: 6011: 6011: 6011: void 6011: _M_put(_CharT* __s, size_t __maxlen, const _CharT* __format, 6011: const tm* __tm) const throw (); 6011: 6011: void 6011: _M_date_formats(const _CharT** __date) const 6011: { 6011: 6011: __date[0] = _M_data->_M_date_format; 6011: __date[1] = _M_data->_M_date_era_format; 6011: } 6011: 6011: void 6011: _M_time_formats(const _CharT** __time) const 6011: { 6011: 6011: __time[0] = _M_data->_M_time_format; 6011: __time[1] = _M_data->_M_time_era_format; 6011: } 6011: 6011: void 6011: _M_date_time_formats(const _CharT** __dt) const 6011: { 6011: 6011: __dt[0] = _M_data->_M_date_time_format; 6011: __dt[1] = _M_data->_M_date_time_era_format; 6011: } 6011: 6011: 6011: void 6011: _M_am_pm_format(const _CharT*) const 6011: { } 6011: 6011: 6011: void 6011: _M_am_pm(const _CharT** __ampm) const 6011: { 6011: __ampm[0] = _M_data->_M_am; 6011: __ampm[1] = _M_data->_M_pm; 6011: } 6011: 6011: void 6011: _M_days(const _CharT** __days) const 6011: { 6011: __days[0] = _M_data->_M_day1; 6011: __days[1] = _M_data->_M_day2; 6011: __days[2] = _M_data->_M_day3; 6011: __days[3] = _M_data->_M_day4; 6011: __days[4] = _M_data->_M_day5; 6011: __days[5] = _M_data->_M_day6; 6011: __days[6] = _M_data->_M_day7; 6011: } 6011: 6011: void 6011: _M_days_abbreviated(const _CharT** __days) const 6011: { 6011: __days[0] = _M_data->_M_aday1; 6011: __days[1] = _M_data->_M_aday2; 6011: __days[2] = _M_data->_M_aday3; 6011: __days[3] = _M_data->_M_aday4; 6011: __days[4] = _M_data->_M_aday5; 6011: __days[5] = _M_data->_M_aday6; 6011: __days[6] = _M_data->_M_aday7; 6011: } 6011: 6011: void 6011: _M_months(const _CharT** __months) const 6011: { 6011: __months[0] = _M_data->_M_month01; 6011: __months[1] = _M_data->_M_month02; 6011: __months[2] = _M_data->_M_month03; 6011: __months[3] = _M_data->_M_month04; 6011: __months[4] = _M_data->_M_month05; 6011: __months[5] = _M_data->_M_month06; 6011: __months[6] = _M_data->_M_month07; 6011: __months[7] = _M_data->_M_month08; 6011: __months[8] = _M_data->_M_month09; 6011: __months[9] = _M_data->_M_month10; 6011: __months[10] = _M_data->_M_month11; 6011: __months[11] = _M_data->_M_month12; 6011: } 6011: 6011: void 6011: _M_months_abbreviated(const _CharT** __months) const 6011: { 6011: __months[0] = _M_data->_M_amonth01; 6011: __months[1] = _M_data->_M_amonth02; 6011: __months[2] = _M_data->_M_amonth03; 6011: __months[3] = _M_data->_M_amonth04; 6011: __months[4] = _M_data->_M_amonth05; 6011: __months[5] = _M_data->_M_amonth06; 6011: __months[6] = _M_data->_M_amonth07; 6011: __months[7] = _M_data->_M_amonth08; 6011: __months[8] = _M_data->_M_amonth09; 6011: __months[9] = _M_data->_M_amonth10; 6011: __months[10] = _M_data->_M_amonth11; 6011: __months[11] = _M_data->_M_amonth12; 6011: } 6011: 6011: protected: 6011: virtual 6011: ~__timepunct(); 6011: 6011: 6011: void 6011: _M_initialize_timepunct(__c_locale __cloc = 0); 6011: }; 6011: 6011: template 6011: locale::id __timepunct<_CharT>::id; 6011: 6011: 6011: template<> 6011: void 6011: __timepunct::_M_initialize_timepunct(__c_locale __cloc); 6011: 6011: template<> 6011: void 6011: __timepunct::_M_put(char*, size_t, const char*, const tm*) const throw (); 6011: 6011: 6011: template<> 6011: void 6011: __timepunct::_M_initialize_timepunct(__c_locale __cloc); 6011: 6011: template<> 6011: void 6011: __timepunct::_M_put(wchar_t*, size_t, const wchar_t*, 6011: const tm*) const throw (); 6011: 6011: 6011: 6011: } 6011: 6011: 6011: # 1 "/usr/include/arm-linux-gnueabihf/c++/8/bits/time_members.h" 1 3 6011: # 37 "/usr/include/arm-linux-gnueabihf/c++/8/bits/time_members.h" 3 6011: namespace std __attribute__ ((__visibility__ ("default"))) 6011: { 6011: 6011: 6011: template 6011: __timepunct<_CharT>::__timepunct(size_t __refs) 6011: : facet(__refs), _M_data(0), _M_c_locale_timepunct(0), 6011: _M_name_timepunct(_S_get_c_name()) 6011: { _M_initialize_timepunct(); } 6011: 6011: template 6011: __timepunct<_CharT>::__timepunct(__cache_type* __cache, size_t __refs) 6011: : facet(__refs), _M_data(__cache), _M_c_locale_timepunct(0), 6011: _M_name_timepunct(_S_get_c_name()) 6011: { _M_initialize_timepunct(); } 6011: 6011: template 6011: __timepunct<_CharT>::__timepunct(__c_locale __cloc, const char* __s, 6011: size_t __refs) 6011: : facet(__refs), _M_data(0), _M_c_locale_timepunct(0), 6011: _M_name_timepunct(0) 6011: { 6011: if (__builtin_strcmp(__s, _S_get_c_name()) != 0) 6011: { 6011: const size_t __len = __builtin_strlen(__s) + 1; 6011: char* __tmp = new char[__len]; 6011: __builtin_memcpy(__tmp, __s, __len); 6011: _M_name_timepunct = __tmp; 6011: } 6011: else 6011: _M_name_timepunct = _S_get_c_name(); 6011: 6011: try 6011: { _M_initialize_timepunct(__cloc); } 6011: catch(...) 6011: { 6011: if (_M_name_timepunct != _S_get_c_name()) 6011: delete [] _M_name_timepunct; 6011: throw; 6011: } 6011: } 6011: 6011: template 6011: __timepunct<_CharT>::~__timepunct() 6011: { 6011: if (_M_name_timepunct != _S_get_c_name()) 6011: delete [] _M_name_timepunct; 6011: delete _M_data; 6011: _S_destroy_c_locale(_M_c_locale_timepunct); 6011: } 6011: 6011: 6011: } 6011: # 347 "/usr/include/c++/8/bits/locale_facets_nonio.h" 2 3 6011: 6011: namespace std __attribute__ ((__visibility__ ("default"))) 6011: { 6011: 6011: 6011: namespace __cxx11 { 6011: # 367 "/usr/include/c++/8/bits/locale_facets_nonio.h" 3 6011: template 6011: class time_get : public locale::facet, public time_base 6011: { 6011: public: 6011: 6011: 6011: 6011: typedef _CharT char_type; 6011: typedef _InIter iter_type; 6011: 6011: 6011: 6011: static locale::id id; 6011: # 388 "/usr/include/c++/8/bits/locale_facets_nonio.h" 3 6011: explicit 6011: time_get(size_t __refs = 0) 6011: : facet (__refs) { } 6011: # 405 "/usr/include/c++/8/bits/locale_facets_nonio.h" 3 6011: dateorder 6011: date_order() const 6011: { return this->do_date_order(); } 6011: # 429 "/usr/include/c++/8/bits/locale_facets_nonio.h" 3 6011: iter_type 6011: get_time(iter_type __beg, iter_type __end, ios_base& __io, 6011: ios_base::iostate& __err, tm* __tm) const 6011: { return this->do_get_time(__beg, __end, __io, __err, __tm); } 6011: # 454 "/usr/include/c++/8/bits/locale_facets_nonio.h" 3 6011: iter_type 6011: get_date(iter_type __beg, iter_type __end, ios_base& __io, 6011: ios_base::iostate& __err, tm* __tm) const 6011: { return this->do_get_date(__beg, __end, __io, __err, __tm); } 6011: # 482 "/usr/include/c++/8/bits/locale_facets_nonio.h" 3 6011: iter_type 6011: get_weekday(iter_type __beg, iter_type __end, ios_base& __io, 6011: ios_base::iostate& __err, tm* __tm) const 6011: { return this->do_get_weekday(__beg, __end, __io, __err, __tm); } 6011: # 511 "/usr/include/c++/8/bits/locale_facets_nonio.h" 3 6011: iter_type 6011: get_monthname(iter_type __beg, iter_type __end, ios_base& __io, 6011: ios_base::iostate& __err, tm* __tm) const 6011: { return this->do_get_monthname(__beg, __end, __io, __err, __tm); } 6011: # 537 "/usr/include/c++/8/bits/locale_facets_nonio.h" 3 6011: iter_type 6011: get_year(iter_type __beg, iter_type __end, ios_base& __io, 6011: ios_base::iostate& __err, tm* __tm) const 6011: { return this->do_get_year(__beg, __end, __io, __err, __tm); } 6011: # 558 "/usr/include/c++/8/bits/locale_facets_nonio.h" 3 6011: inline 6011: iter_type get(iter_type __s, iter_type __end, ios_base& __io, 6011: ios_base::iostate& __err, tm* __tm, char __format, 6011: char __modifier = 0) const 6011: { 6011: return this->do_get(__s, __end, __io, __err, __tm, __format, 6011: __modifier); 6011: } 6011: # 585 "/usr/include/c++/8/bits/locale_facets_nonio.h" 3 6011: iter_type get(iter_type __s, iter_type __end, ios_base& __io, 6011: ios_base::iostate& __err, tm* __tm, const char_type* __fmt, 6011: const char_type* __fmtend) const; 6011: 6011: 6011: protected: 6011: 6011: virtual 6011: ~time_get() { } 6011: # 605 "/usr/include/c++/8/bits/locale_facets_nonio.h" 3 6011: virtual dateorder 6011: do_date_order() const; 6011: # 623 "/usr/include/c++/8/bits/locale_facets_nonio.h" 3 6011: virtual iter_type 6011: do_get_time(iter_type __beg, iter_type __end, ios_base& __io, 6011: ios_base::iostate& __err, tm* __tm) const; 6011: # 642 "/usr/include/c++/8/bits/locale_facets_nonio.h" 3 6011: virtual iter_type 6011: do_get_date(iter_type __beg, iter_type __end, ios_base& __io, 6011: ios_base::iostate& __err, tm* __tm) const; 6011: # 661 "/usr/include/c++/8/bits/locale_facets_nonio.h" 3 6011: virtual iter_type 6011: do_get_weekday(iter_type __beg, iter_type __end, ios_base&, 6011: ios_base::iostate& __err, tm* __tm) const; 6011: # 680 "/usr/include/c++/8/bits/locale_facets_nonio.h" 3 6011: virtual iter_type 6011: do_get_monthname(iter_type __beg, iter_type __end, ios_base&, 6011: ios_base::iostate& __err, tm* __tm) const; 6011: # 699 "/usr/include/c++/8/bits/locale_facets_nonio.h" 3 6011: virtual iter_type 6011: do_get_year(iter_type __beg, iter_type __end, ios_base& __io, 6011: ios_base::iostate& __err, tm* __tm) const; 6011: # 722 "/usr/include/c++/8/bits/locale_facets_nonio.h" 3 6011: virtual 6011: 6011: iter_type 6011: do_get(iter_type __s, iter_type __end, ios_base& __f, 6011: ios_base::iostate& __err, tm* __tm, 6011: char __format, char __modifier) const; 6011: 6011: 6011: 6011: iter_type 6011: _M_extract_num(iter_type __beg, iter_type __end, int& __member, 6011: int __min, int __max, size_t __len, 6011: ios_base& __io, ios_base::iostate& __err) const; 6011: 6011: 6011: iter_type 6011: _M_extract_name(iter_type __beg, iter_type __end, int& __member, 6011: const _CharT** __names, size_t __indexlen, 6011: ios_base& __io, ios_base::iostate& __err) const; 6011: 6011: 6011: iter_type 6011: _M_extract_wday_or_month(iter_type __beg, iter_type __end, int& __member, 6011: const _CharT** __names, size_t __indexlen, 6011: ios_base& __io, ios_base::iostate& __err) const; 6011: 6011: 6011: iter_type 6011: _M_extract_via_format(iter_type __beg, iter_type __end, ios_base& __io, 6011: ios_base::iostate& __err, tm* __tm, 6011: const _CharT* __format) const; 6011: }; 6011: 6011: template 6011: locale::id time_get<_CharT, _InIter>::id; 6011: 6011: 6011: template 6011: class time_get_byname : public time_get<_CharT, _InIter> 6011: { 6011: public: 6011: 6011: typedef _CharT char_type; 6011: typedef _InIter iter_type; 6011: 6011: explicit 6011: time_get_byname(const char*, size_t __refs = 0) 6011: : time_get<_CharT, _InIter>(__refs) { } 6011: 6011: 6011: explicit 6011: time_get_byname(const string& __s, size_t __refs = 0) 6011: : time_get_byname(__s.c_str(), __refs) { } 6011: 6011: 6011: protected: 6011: virtual 6011: ~time_get_byname() { } 6011: }; 6011: 6011: } 6011: # 796 "/usr/include/c++/8/bits/locale_facets_nonio.h" 3 6011: template 6011: class time_put : public locale::facet 6011: { 6011: public: 6011: 6011: 6011: 6011: typedef _CharT char_type; 6011: typedef _OutIter iter_type; 6011: 6011: 6011: 6011: static locale::id id; 6011: # 817 "/usr/include/c++/8/bits/locale_facets_nonio.h" 3 6011: explicit 6011: time_put(size_t __refs = 0) 6011: : facet(__refs) { } 6011: # 836 "/usr/include/c++/8/bits/locale_facets_nonio.h" 3 6011: iter_type 6011: put(iter_type __s, ios_base& __io, char_type __fill, const tm* __tm, 6011: const _CharT* __beg, const _CharT* __end) const; 6011: # 856 "/usr/include/c++/8/bits/locale_facets_nonio.h" 3 6011: iter_type 6011: put(iter_type __s, ios_base& __io, char_type __fill, 6011: const tm* __tm, char __format, char __mod = 0) const 6011: { return this->do_put(__s, __io, __fill, __tm, __format, __mod); } 6011: 6011: protected: 6011: 6011: virtual 6011: ~time_put() 6011: { } 6011: # 883 "/usr/include/c++/8/bits/locale_facets_nonio.h" 3 6011: virtual iter_type 6011: do_put(iter_type __s, ios_base& __io, char_type __fill, const tm* __tm, 6011: char __format, char __mod) const; 6011: }; 6011: 6011: template 6011: locale::id time_put<_CharT, _OutIter>::id; 6011: 6011: 6011: template 6011: class time_put_byname : public time_put<_CharT, _OutIter> 6011: { 6011: public: 6011: 6011: typedef _CharT char_type; 6011: typedef _OutIter iter_type; 6011: 6011: explicit 6011: time_put_byname(const char*, size_t __refs = 0) 6011: : time_put<_CharT, _OutIter>(__refs) 6011: { } 6011: 6011: 6011: explicit 6011: time_put_byname(const string& __s, size_t __refs = 0) 6011: : time_put_byname(__s.c_str(), __refs) { } 6011: 6011: 6011: protected: 6011: virtual 6011: ~time_put_byname() { } 6011: }; 6011: # 928 "/usr/include/c++/8/bits/locale_facets_nonio.h" 3 6011: class money_base 6011: { 6011: public: 6011: enum part { none, space, symbol, sign, value }; 6011: struct pattern { char field[4]; }; 6011: 6011: static const pattern _S_default_pattern; 6011: 6011: enum 6011: { 6011: _S_minus, 6011: _S_zero, 6011: _S_end = 11 6011: }; 6011: 6011: 6011: 6011: static const char* _S_atoms; 6011: 6011: 6011: 6011: __attribute__ ((__const__)) static pattern 6011: _S_construct_pattern(char __precedes, char __space, char __posn) throw (); 6011: }; 6011: 6011: template 6011: struct __moneypunct_cache : public locale::facet 6011: { 6011: const char* _M_grouping; 6011: size_t _M_grouping_size; 6011: bool _M_use_grouping; 6011: _CharT _M_decimal_point; 6011: _CharT _M_thousands_sep; 6011: const _CharT* _M_curr_symbol; 6011: size_t _M_curr_symbol_size; 6011: const _CharT* _M_positive_sign; 6011: size_t _M_positive_sign_size; 6011: const _CharT* _M_negative_sign; 6011: size_t _M_negative_sign_size; 6011: int _M_frac_digits; 6011: money_base::pattern _M_pos_format; 6011: money_base::pattern _M_neg_format; 6011: 6011: 6011: 6011: 6011: _CharT _M_atoms[money_base::_S_end]; 6011: 6011: bool _M_allocated; 6011: 6011: __moneypunct_cache(size_t __refs = 0) : facet(__refs), 6011: _M_grouping(0), _M_grouping_size(0), _M_use_grouping(false), 6011: _M_decimal_point(_CharT()), _M_thousands_sep(_CharT()), 6011: _M_curr_symbol(0), _M_curr_symbol_size(0), 6011: _M_positive_sign(0), _M_positive_sign_size(0), 6011: _M_negative_sign(0), _M_negative_sign_size(0), 6011: _M_frac_digits(0), 6011: _M_pos_format(money_base::pattern()), 6011: _M_neg_format(money_base::pattern()), _M_allocated(false) 6011: { } 6011: 6011: ~__moneypunct_cache(); 6011: 6011: void 6011: _M_cache(const locale& __loc); 6011: 6011: private: 6011: __moneypunct_cache& 6011: operator=(const __moneypunct_cache&); 6011: 6011: explicit 6011: __moneypunct_cache(const __moneypunct_cache&); 6011: }; 6011: 6011: template 6011: __moneypunct_cache<_CharT, _Intl>::~__moneypunct_cache() 6011: { 6011: if (_M_allocated) 6011: { 6011: delete [] _M_grouping; 6011: delete [] _M_curr_symbol; 6011: delete [] _M_positive_sign; 6011: delete [] _M_negative_sign; 6011: } 6011: } 6011: 6011: namespace __cxx11 { 6011: # 1023 "/usr/include/c++/8/bits/locale_facets_nonio.h" 3 6011: template 6011: class moneypunct : public locale::facet, public money_base 6011: { 6011: public: 6011: 6011: 6011: 6011: typedef _CharT char_type; 6011: typedef basic_string<_CharT> string_type; 6011: 6011: typedef __moneypunct_cache<_CharT, _Intl> __cache_type; 6011: 6011: private: 6011: __cache_type* _M_data; 6011: 6011: public: 6011: 6011: 6011: static const bool intl = _Intl; 6011: 6011: static locale::id id; 6011: # 1052 "/usr/include/c++/8/bits/locale_facets_nonio.h" 3 6011: explicit 6011: moneypunct(size_t __refs = 0) 6011: : facet(__refs), _M_data(0) 6011: { _M_initialize_moneypunct(); } 6011: # 1065 "/usr/include/c++/8/bits/locale_facets_nonio.h" 3 6011: explicit 6011: moneypunct(__cache_type* __cache, size_t __refs = 0) 6011: : facet(__refs), _M_data(__cache) 6011: { _M_initialize_moneypunct(); } 6011: # 1080 "/usr/include/c++/8/bits/locale_facets_nonio.h" 3 6011: explicit 6011: moneypunct(__c_locale __cloc, const char* __s, size_t __refs = 0) 6011: : facet(__refs), _M_data(0) 6011: { _M_initialize_moneypunct(__cloc, __s); } 6011: # 1094 "/usr/include/c++/8/bits/locale_facets_nonio.h" 3 6011: char_type 6011: decimal_point() const 6011: { return this->do_decimal_point(); } 6011: # 1107 "/usr/include/c++/8/bits/locale_facets_nonio.h" 3 6011: char_type 6011: thousands_sep() const 6011: { return this->do_thousands_sep(); } 6011: # 1137 "/usr/include/c++/8/bits/locale_facets_nonio.h" 3 6011: string 6011: grouping() const 6011: { return this->do_grouping(); } 6011: # 1150 "/usr/include/c++/8/bits/locale_facets_nonio.h" 3 6011: string_type 6011: curr_symbol() const 6011: { return this->do_curr_symbol(); } 6011: # 1167 "/usr/include/c++/8/bits/locale_facets_nonio.h" 3 6011: string_type 6011: positive_sign() const 6011: { return this->do_positive_sign(); } 6011: # 1184 "/usr/include/c++/8/bits/locale_facets_nonio.h" 3 6011: string_type 6011: negative_sign() const 6011: { return this->do_negative_sign(); } 6011: # 1200 "/usr/include/c++/8/bits/locale_facets_nonio.h" 3 6011: int 6011: frac_digits() const 6011: { return this->do_frac_digits(); } 6011: # 1236 "/usr/include/c++/8/bits/locale_facets_nonio.h" 3 6011: pattern 6011: pos_format() const 6011: { return this->do_pos_format(); } 6011: 6011: pattern 6011: neg_format() const 6011: { return this->do_neg_format(); } 6011: 6011: 6011: protected: 6011: 6011: virtual 6011: ~moneypunct(); 6011: # 1258 "/usr/include/c++/8/bits/locale_facets_nonio.h" 3 6011: virtual char_type 6011: do_decimal_point() const 6011: { return _M_data->_M_decimal_point; } 6011: # 1270 "/usr/include/c++/8/bits/locale_facets_nonio.h" 3 6011: virtual char_type 6011: do_thousands_sep() const 6011: { return _M_data->_M_thousands_sep; } 6011: # 1283 "/usr/include/c++/8/bits/locale_facets_nonio.h" 3 6011: virtual string 6011: do_grouping() const 6011: { return _M_data->_M_grouping; } 6011: # 1296 "/usr/include/c++/8/bits/locale_facets_nonio.h" 3 6011: virtual string_type 6011: do_curr_symbol() const 6011: { return _M_data->_M_curr_symbol; } 6011: # 1309 "/usr/include/c++/8/bits/locale_facets_nonio.h" 3 6011: virtual string_type 6011: do_positive_sign() const 6011: { return _M_data->_M_positive_sign; } 6011: # 1322 "/usr/include/c++/8/bits/locale_facets_nonio.h" 3 6011: virtual string_type 6011: do_negative_sign() const 6011: { return _M_data->_M_negative_sign; } 6011: # 1336 "/usr/include/c++/8/bits/locale_facets_nonio.h" 3 6011: virtual int 6011: do_frac_digits() const 6011: { return _M_data->_M_frac_digits; } 6011: # 1350 "/usr/include/c++/8/bits/locale_facets_nonio.h" 3 6011: virtual pattern 6011: do_pos_format() const 6011: { return _M_data->_M_pos_format; } 6011: # 1364 "/usr/include/c++/8/bits/locale_facets_nonio.h" 3 6011: virtual pattern 6011: do_neg_format() const 6011: { return _M_data->_M_neg_format; } 6011: 6011: 6011: void 6011: _M_initialize_moneypunct(__c_locale __cloc = 0, 6011: const char* __name = 0); 6011: }; 6011: 6011: template 6011: locale::id moneypunct<_CharT, _Intl>::id; 6011: 6011: template 6011: const bool moneypunct<_CharT, _Intl>::intl; 6011: 6011: template<> 6011: moneypunct::~moneypunct(); 6011: 6011: template<> 6011: moneypunct::~moneypunct(); 6011: 6011: template<> 6011: void 6011: moneypunct::_M_initialize_moneypunct(__c_locale, const char*); 6011: 6011: template<> 6011: void 6011: moneypunct::_M_initialize_moneypunct(__c_locale, const char*); 6011: 6011: 6011: template<> 6011: moneypunct::~moneypunct(); 6011: 6011: template<> 6011: moneypunct::~moneypunct(); 6011: 6011: template<> 6011: void 6011: moneypunct::_M_initialize_moneypunct(__c_locale, 6011: const char*); 6011: 6011: template<> 6011: void 6011: moneypunct::_M_initialize_moneypunct(__c_locale, 6011: const char*); 6011: 6011: 6011: 6011: template 6011: class moneypunct_byname : public moneypunct<_CharT, _Intl> 6011: { 6011: public: 6011: typedef _CharT char_type; 6011: typedef basic_string<_CharT> string_type; 6011: 6011: static const bool intl = _Intl; 6011: 6011: explicit 6011: moneypunct_byname(const char* __s, size_t __refs = 0) 6011: : moneypunct<_CharT, _Intl>(__refs) 6011: { 6011: if (__builtin_strcmp(__s, "C") != 0 6011: && __builtin_strcmp(__s, "POSIX") != 0) 6011: { 6011: __c_locale __tmp; 6011: this->_S_create_c_locale(__tmp, __s); 6011: this->_M_initialize_moneypunct(__tmp); 6011: this->_S_destroy_c_locale(__tmp); 6011: } 6011: } 6011: 6011: 6011: explicit 6011: moneypunct_byname(const string& __s, size_t __refs = 0) 6011: : moneypunct_byname(__s.c_str(), __refs) { } 6011: 6011: 6011: protected: 6011: virtual 6011: ~moneypunct_byname() { } 6011: }; 6011: 6011: template 6011: const bool moneypunct_byname<_CharT, _Intl>::intl; 6011: 6011: } 6011: 6011: namespace __cxx11 { 6011: # 1467 "/usr/include/c++/8/bits/locale_facets_nonio.h" 3 6011: template 6011: class money_get : public locale::facet 6011: { 6011: public: 6011: 6011: 6011: 6011: typedef _CharT char_type; 6011: typedef _InIter iter_type; 6011: typedef basic_string<_CharT> string_type; 6011: 6011: 6011: 6011: static locale::id id; 6011: # 1489 "/usr/include/c++/8/bits/locale_facets_nonio.h" 3 6011: explicit 6011: money_get(size_t __refs = 0) : facet(__refs) { } 6011: # 1519 "/usr/include/c++/8/bits/locale_facets_nonio.h" 3 6011: iter_type 6011: get(iter_type __s, iter_type __end, bool __intl, ios_base& __io, 6011: ios_base::iostate& __err, long double& __units) const 6011: { return this->do_get(__s, __end, __intl, __io, __err, __units); } 6011: # 1550 "/usr/include/c++/8/bits/locale_facets_nonio.h" 3 6011: iter_type 6011: get(iter_type __s, iter_type __end, bool __intl, ios_base& __io, 6011: ios_base::iostate& __err, string_type& __digits) const 6011: { return this->do_get(__s, __end, __intl, __io, __err, __digits); } 6011: 6011: protected: 6011: 6011: virtual 6011: ~money_get() { } 6011: # 1574 "/usr/include/c++/8/bits/locale_facets_nonio.h" 3 6011: virtual iter_type 6011: do_get(iter_type __s, iter_type __end, bool __intl, ios_base& __io, 6011: ios_base::iostate& __err, long double& __units) const; 6011: # 1586 "/usr/include/c++/8/bits/locale_facets_nonio.h" 3 6011: virtual iter_type 6011: do_get(iter_type __s, iter_type __end, bool __intl, ios_base& __io, 6011: ios_base::iostate& __err, string_type& __digits) const; 6011: # 1598 "/usr/include/c++/8/bits/locale_facets_nonio.h" 3 6011: template 6011: iter_type 6011: _M_extract(iter_type __s, iter_type __end, ios_base& __io, 6011: ios_base::iostate& __err, string& __digits) const; 6011: }; 6011: 6011: template 6011: locale::id money_get<_CharT, _InIter>::id; 6011: # 1620 "/usr/include/c++/8/bits/locale_facets_nonio.h" 3 6011: template 6011: class money_put : public locale::facet 6011: { 6011: public: 6011: 6011: 6011: typedef _CharT char_type; 6011: typedef _OutIter iter_type; 6011: typedef basic_string<_CharT> string_type; 6011: 6011: 6011: 6011: static locale::id id; 6011: # 1641 "/usr/include/c++/8/bits/locale_facets_nonio.h" 3 6011: explicit 6011: money_put(size_t __refs = 0) : facet(__refs) { } 6011: # 1661 "/usr/include/c++/8/bits/locale_facets_nonio.h" 3 6011: iter_type 6011: put(iter_type __s, bool __intl, ios_base& __io, 6011: char_type __fill, long double __units) const 6011: { return this->do_put(__s, __intl, __io, __fill, __units); } 6011: # 1684 "/usr/include/c++/8/bits/locale_facets_nonio.h" 3 6011: iter_type 6011: put(iter_type __s, bool __intl, ios_base& __io, 6011: char_type __fill, const string_type& __digits) const 6011: { return this->do_put(__s, __intl, __io, __fill, __digits); } 6011: 6011: protected: 6011: 6011: virtual 6011: ~money_put() { } 6011: # 1719 "/usr/include/c++/8/bits/locale_facets_nonio.h" 3 6011: virtual iter_type 6011: do_put(iter_type __s, bool __intl, ios_base& __io, char_type __fill, 6011: long double __units) const; 6011: # 1743 "/usr/include/c++/8/bits/locale_facets_nonio.h" 3 6011: virtual iter_type 6011: do_put(iter_type __s, bool __intl, ios_base& __io, char_type __fill, 6011: const string_type& __digits) const; 6011: # 1755 "/usr/include/c++/8/bits/locale_facets_nonio.h" 3 6011: template 6011: iter_type 6011: _M_insert(iter_type __s, ios_base& __io, char_type __fill, 6011: const string_type& __digits) const; 6011: }; 6011: 6011: template 6011: locale::id money_put<_CharT, _OutIter>::id; 6011: 6011: } 6011: 6011: 6011: 6011: 6011: 6011: struct messages_base 6011: { 6011: typedef int catalog; 6011: }; 6011: 6011: namespace __cxx11 { 6011: # 1798 "/usr/include/c++/8/bits/locale_facets_nonio.h" 3 6011: template 6011: class messages : public locale::facet, public messages_base 6011: { 6011: public: 6011: 6011: 6011: 6011: typedef _CharT char_type; 6011: typedef basic_string<_CharT> string_type; 6011: 6011: 6011: protected: 6011: 6011: 6011: __c_locale _M_c_locale_messages; 6011: const char* _M_name_messages; 6011: 6011: public: 6011: 6011: static locale::id id; 6011: # 1826 "/usr/include/c++/8/bits/locale_facets_nonio.h" 3 6011: explicit 6011: messages(size_t __refs = 0); 6011: # 1840 "/usr/include/c++/8/bits/locale_facets_nonio.h" 3 6011: explicit 6011: messages(__c_locale __cloc, const char* __s, size_t __refs = 0); 6011: # 1853 "/usr/include/c++/8/bits/locale_facets_nonio.h" 3 6011: catalog 6011: open(const basic_string& __s, const locale& __loc) const 6011: { return this->do_open(__s, __loc); } 6011: # 1871 "/usr/include/c++/8/bits/locale_facets_nonio.h" 3 6011: catalog 6011: open(const basic_string&, const locale&, const char*) const; 6011: # 1889 "/usr/include/c++/8/bits/locale_facets_nonio.h" 3 6011: string_type 6011: get(catalog __c, int __set, int __msgid, const string_type& __s) const 6011: { return this->do_get(__c, __set, __msgid, __s); } 6011: # 1900 "/usr/include/c++/8/bits/locale_facets_nonio.h" 3 6011: void 6011: close(catalog __c) const 6011: { return this->do_close(__c); } 6011: 6011: protected: 6011: 6011: virtual 6011: ~messages(); 6011: # 1920 "/usr/include/c++/8/bits/locale_facets_nonio.h" 3 6011: virtual catalog 6011: do_open(const basic_string&, const locale&) const; 6011: # 1939 "/usr/include/c++/8/bits/locale_facets_nonio.h" 3 6011: virtual string_type 6011: do_get(catalog, int, int, const string_type& __dfault) const; 6011: 6011: 6011: 6011: 6011: 6011: 6011: virtual void 6011: do_close(catalog) const; 6011: 6011: 6011: char* 6011: _M_convert_to_char(const string_type& __msg) const 6011: { 6011: 6011: return reinterpret_cast(const_cast<_CharT*>(__msg.c_str())); 6011: } 6011: 6011: 6011: string_type 6011: _M_convert_from_char(char*) const 6011: { 6011: 6011: return string_type(); 6011: } 6011: }; 6011: 6011: template 6011: locale::id messages<_CharT>::id; 6011: 6011: 6011: template<> 6011: string 6011: messages::do_get(catalog, int, int, const string&) const; 6011: 6011: 6011: template<> 6011: wstring 6011: messages::do_get(catalog, int, int, const wstring&) const; 6011: 6011: 6011: 6011: template 6011: class messages_byname : public messages<_CharT> 6011: { 6011: public: 6011: typedef _CharT char_type; 6011: typedef basic_string<_CharT> string_type; 6011: 6011: explicit 6011: messages_byname(const char* __s, size_t __refs = 0); 6011: 6011: 6011: explicit 6011: messages_byname(const string& __s, size_t __refs = 0) 6011: : messages_byname(__s.c_str(), __refs) { } 6011: 6011: 6011: protected: 6011: virtual 6011: ~messages_byname() 6011: { } 6011: }; 6011: 6011: } 6011: 6011: 6011: } 6011: 6011: 6011: # 1 "/usr/include/arm-linux-gnueabihf/c++/8/bits/messages_members.h" 1 3 6011: # 36 "/usr/include/arm-linux-gnueabihf/c++/8/bits/messages_members.h" 3 6011: # 1 "/usr/include/libintl.h" 1 3 4 6011: # 34 "/usr/include/libintl.h" 3 4 6011: extern "C" { 6011: 6011: 6011: 6011: 6011: extern char *gettext (const char *__msgid) 6011: throw () __attribute__ ((__format_arg__ (1))); 6011: 6011: 6011: 6011: extern char *dgettext (const char *__domainname, const char *__msgid) 6011: throw () __attribute__ ((__format_arg__ (2))); 6011: extern char *__dgettext (const char *__domainname, const char *__msgid) 6011: throw () __attribute__ ((__format_arg__ (2))); 6011: 6011: 6011: 6011: extern char *dcgettext (const char *__domainname, 6011: const char *__msgid, int __category) 6011: throw () __attribute__ ((__format_arg__ (2))); 6011: extern char *__dcgettext (const char *__domainname, 6011: const char *__msgid, int __category) 6011: throw () __attribute__ ((__format_arg__ (2))); 6011: 6011: 6011: 6011: 6011: extern char *ngettext (const char *__msgid1, const char *__msgid2, 6011: unsigned long int __n) 6011: throw () __attribute__ ((__format_arg__ (1))) __attribute__ ((__format_arg__ (2))); 6011: 6011: 6011: 6011: extern char *dngettext (const char *__domainname, const char *__msgid1, 6011: const char *__msgid2, unsigned long int __n) 6011: throw () __attribute__ ((__format_arg__ (2))) __attribute__ ((__format_arg__ (3))); 6011: 6011: 6011: 6011: extern char *dcngettext (const char *__domainname, const char *__msgid1, 6011: const char *__msgid2, unsigned long int __n, 6011: int __category) 6011: throw () __attribute__ ((__format_arg__ (2))) __attribute__ ((__format_arg__ (3))); 6011: 6011: 6011: 6011: 6011: 6011: extern char *textdomain (const char *__domainname) throw (); 6011: 6011: 6011: 6011: extern char *bindtextdomain (const char *__domainname, 6011: const char *__dirname) throw (); 6011: 6011: 6011: 6011: extern char *bind_textdomain_codeset (const char *__domainname, 6011: const char *__codeset) throw (); 6011: # 121 "/usr/include/libintl.h" 3 4 6011: } 6011: # 37 "/usr/include/arm-linux-gnueabihf/c++/8/bits/messages_members.h" 2 3 6011: 6011: namespace std __attribute__ ((__visibility__ ("default"))) 6011: { 6011: 6011: 6011: 6011: template 6011: messages<_CharT>::messages(size_t __refs) 6011: : facet(__refs), _M_c_locale_messages(_S_get_c_locale()), 6011: _M_name_messages(_S_get_c_name()) 6011: { } 6011: 6011: template 6011: messages<_CharT>::messages(__c_locale __cloc, const char* __s, 6011: size_t __refs) 6011: : facet(__refs), _M_c_locale_messages(0), _M_name_messages(0) 6011: { 6011: if (__builtin_strcmp(__s, _S_get_c_name()) != 0) 6011: { 6011: const size_t __len = __builtin_strlen(__s) + 1; 6011: char* __tmp = new char[__len]; 6011: __builtin_memcpy(__tmp, __s, __len); 6011: _M_name_messages = __tmp; 6011: } 6011: else 6011: _M_name_messages = _S_get_c_name(); 6011: 6011: 6011: _M_c_locale_messages = _S_clone_c_locale(__cloc); 6011: } 6011: 6011: template 6011: typename messages<_CharT>::catalog 6011: messages<_CharT>::open(const basic_string& __s, const locale& __loc, 6011: const char* __dir) const 6011: { 6011: bindtextdomain(__s.c_str(), __dir); 6011: return this->do_open(__s, __loc); 6011: } 6011: 6011: 6011: template 6011: messages<_CharT>::~messages() 6011: { 6011: if (_M_name_messages != _S_get_c_name()) 6011: delete [] _M_name_messages; 6011: _S_destroy_c_locale(_M_c_locale_messages); 6011: } 6011: 6011: template 6011: typename messages<_CharT>::catalog 6011: messages<_CharT>::do_open(const basic_string& __s, 6011: const locale&) const 6011: { 6011: 6011: 6011: textdomain(__s.c_str()); 6011: return 0; 6011: } 6011: 6011: template 6011: void 6011: messages<_CharT>::do_close(catalog) const 6011: { } 6011: 6011: 6011: template 6011: messages_byname<_CharT>::messages_byname(const char* __s, size_t __refs) 6011: : messages<_CharT>(__refs) 6011: { 6011: if (this->_M_name_messages != locale::facet::_S_get_c_name()) 6011: { 6011: delete [] this->_M_name_messages; 6011: if (__builtin_strcmp(__s, locale::facet::_S_get_c_name()) != 0) 6011: { 6011: const size_t __len = __builtin_strlen(__s) + 1; 6011: char* __tmp = new char[__len]; 6011: __builtin_memcpy(__tmp, __s, __len); 6011: this->_M_name_messages = __tmp; 6011: } 6011: else 6011: this->_M_name_messages = locale::facet::_S_get_c_name(); 6011: } 6011: 6011: if (__builtin_strcmp(__s, "C") != 0 6011: && __builtin_strcmp(__s, "POSIX") != 0) 6011: { 6011: this->_S_destroy_c_locale(this->_M_c_locale_messages); 6011: this->_S_create_c_locale(this->_M_c_locale_messages, __s); 6011: } 6011: } 6011: 6011: 6011: template<> 6011: typename messages::catalog 6011: messages::do_open(const basic_string&, 6011: const locale&) const; 6011: 6011: template<> 6011: void 6011: messages::do_close(catalog) const; 6011: 6011: 6011: template<> 6011: typename messages::catalog 6011: messages::do_open(const basic_string&, 6011: const locale&) const; 6011: 6011: template<> 6011: void 6011: messages::do_close(catalog) const; 6011: 6011: 6011: 6011: } 6011: # 2011 "/usr/include/c++/8/bits/locale_facets_nonio.h" 2 3 6011: 6011: 6011: # 1 "/usr/include/c++/8/bits/codecvt.h" 1 3 6011: # 39 "/usr/include/c++/8/bits/codecvt.h" 3 6011: 6011: # 40 "/usr/include/c++/8/bits/codecvt.h" 3 6011: 6011: namespace std __attribute__ ((__visibility__ ("default"))) 6011: { 6011: 6011: 6011: 6011: class codecvt_base 6011: { 6011: public: 6011: enum result 6011: { 6011: ok, 6011: partial, 6011: error, 6011: noconv 6011: }; 6011: }; 6011: # 67 "/usr/include/c++/8/bits/codecvt.h" 3 6011: template 6011: class __codecvt_abstract_base 6011: : public locale::facet, public codecvt_base 6011: { 6011: public: 6011: 6011: typedef codecvt_base::result result; 6011: typedef _InternT intern_type; 6011: typedef _ExternT extern_type; 6011: typedef _StateT state_type; 6011: # 115 "/usr/include/c++/8/bits/codecvt.h" 3 6011: result 6011: out(state_type& __state, const intern_type* __from, 6011: const intern_type* __from_end, const intern_type*& __from_next, 6011: extern_type* __to, extern_type* __to_end, 6011: extern_type*& __to_next) const 6011: { 6011: return this->do_out(__state, __from, __from_end, __from_next, 6011: __to, __to_end, __to_next); 6011: } 6011: # 154 "/usr/include/c++/8/bits/codecvt.h" 3 6011: result 6011: unshift(state_type& __state, extern_type* __to, extern_type* __to_end, 6011: extern_type*& __to_next) const 6011: { return this->do_unshift(__state, __to,__to_end,__to_next); } 6011: # 195 "/usr/include/c++/8/bits/codecvt.h" 3 6011: result 6011: in(state_type& __state, const extern_type* __from, 6011: const extern_type* __from_end, const extern_type*& __from_next, 6011: intern_type* __to, intern_type* __to_end, 6011: intern_type*& __to_next) const 6011: { 6011: return this->do_in(__state, __from, __from_end, __from_next, 6011: __to, __to_end, __to_next); 6011: } 6011: 6011: int 6011: encoding() const throw() 6011: { return this->do_encoding(); } 6011: 6011: bool 6011: always_noconv() const throw() 6011: { return this->do_always_noconv(); } 6011: 6011: int 6011: length(state_type& __state, const extern_type* __from, 6011: const extern_type* __end, size_t __max) const 6011: { return this->do_length(__state, __from, __end, __max); } 6011: 6011: int 6011: max_length() const throw() 6011: { return this->do_max_length(); } 6011: 6011: protected: 6011: explicit 6011: __codecvt_abstract_base(size_t __refs = 0) : locale::facet(__refs) { } 6011: 6011: virtual 6011: ~__codecvt_abstract_base() { } 6011: # 236 "/usr/include/c++/8/bits/codecvt.h" 3 6011: virtual result 6011: do_out(state_type& __state, const intern_type* __from, 6011: const intern_type* __from_end, const intern_type*& __from_next, 6011: extern_type* __to, extern_type* __to_end, 6011: extern_type*& __to_next) const = 0; 6011: 6011: virtual result 6011: do_unshift(state_type& __state, extern_type* __to, 6011: extern_type* __to_end, extern_type*& __to_next) const = 0; 6011: 6011: virtual result 6011: do_in(state_type& __state, const extern_type* __from, 6011: const extern_type* __from_end, const extern_type*& __from_next, 6011: intern_type* __to, intern_type* __to_end, 6011: intern_type*& __to_next) const = 0; 6011: 6011: virtual int 6011: do_encoding() const throw() = 0; 6011: 6011: virtual bool 6011: do_always_noconv() const throw() = 0; 6011: 6011: virtual int 6011: do_length(state_type&, const extern_type* __from, 6011: const extern_type* __end, size_t __max) const = 0; 6011: 6011: virtual int 6011: do_max_length() const throw() = 0; 6011: }; 6011: # 273 "/usr/include/c++/8/bits/codecvt.h" 3 6011: template 6011: class codecvt 6011: : public __codecvt_abstract_base<_InternT, _ExternT, _StateT> 6011: { 6011: public: 6011: 6011: typedef codecvt_base::result result; 6011: typedef _InternT intern_type; 6011: typedef _ExternT extern_type; 6011: typedef _StateT state_type; 6011: 6011: protected: 6011: __c_locale _M_c_locale_codecvt; 6011: 6011: public: 6011: static locale::id id; 6011: 6011: explicit 6011: codecvt(size_t __refs = 0) 6011: : __codecvt_abstract_base<_InternT, _ExternT, _StateT> (__refs), 6011: _M_c_locale_codecvt(0) 6011: { } 6011: 6011: explicit 6011: codecvt(__c_locale __cloc, size_t __refs = 0); 6011: 6011: protected: 6011: virtual 6011: ~codecvt() { } 6011: 6011: virtual result 6011: do_out(state_type& __state, const intern_type* __from, 6011: const intern_type* __from_end, const intern_type*& __from_next, 6011: extern_type* __to, extern_type* __to_end, 6011: extern_type*& __to_next) const; 6011: 6011: virtual result 6011: do_unshift(state_type& __state, extern_type* __to, 6011: extern_type* __to_end, extern_type*& __to_next) const; 6011: 6011: virtual result 6011: do_in(state_type& __state, const extern_type* __from, 6011: const extern_type* __from_end, const extern_type*& __from_next, 6011: intern_type* __to, intern_type* __to_end, 6011: intern_type*& __to_next) const; 6011: 6011: virtual int 6011: do_encoding() const throw(); 6011: 6011: virtual bool 6011: do_always_noconv() const throw(); 6011: 6011: virtual int 6011: do_length(state_type&, const extern_type* __from, 6011: const extern_type* __end, size_t __max) const; 6011: 6011: virtual int 6011: do_max_length() const throw(); 6011: }; 6011: 6011: template 6011: locale::id codecvt<_InternT, _ExternT, _StateT>::id; 6011: 6011: 6011: template<> 6011: class codecvt 6011: : public __codecvt_abstract_base 6011: { 6011: friend class messages; 6011: 6011: public: 6011: 6011: typedef char intern_type; 6011: typedef char extern_type; 6011: typedef mbstate_t state_type; 6011: 6011: protected: 6011: __c_locale _M_c_locale_codecvt; 6011: 6011: public: 6011: static locale::id id; 6011: 6011: explicit 6011: codecvt(size_t __refs = 0); 6011: 6011: explicit 6011: codecvt(__c_locale __cloc, size_t __refs = 0); 6011: 6011: protected: 6011: virtual 6011: ~codecvt(); 6011: 6011: virtual result 6011: do_out(state_type& __state, const intern_type* __from, 6011: const intern_type* __from_end, const intern_type*& __from_next, 6011: extern_type* __to, extern_type* __to_end, 6011: extern_type*& __to_next) const; 6011: 6011: virtual result 6011: do_unshift(state_type& __state, extern_type* __to, 6011: extern_type* __to_end, extern_type*& __to_next) const; 6011: 6011: virtual result 6011: do_in(state_type& __state, const extern_type* __from, 6011: const extern_type* __from_end, const extern_type*& __from_next, 6011: intern_type* __to, intern_type* __to_end, 6011: intern_type*& __to_next) const; 6011: 6011: virtual int 6011: do_encoding() const throw(); 6011: 6011: virtual bool 6011: do_always_noconv() const throw(); 6011: 6011: virtual int 6011: do_length(state_type&, const extern_type* __from, 6011: const extern_type* __end, size_t __max) const; 6011: 6011: virtual int 6011: do_max_length() const throw(); 6011: }; 6011: 6011: 6011: 6011: 6011: 6011: 6011: template<> 6011: class codecvt 6011: : public __codecvt_abstract_base 6011: { 6011: friend class messages; 6011: 6011: public: 6011: 6011: typedef wchar_t intern_type; 6011: typedef char extern_type; 6011: typedef mbstate_t state_type; 6011: 6011: protected: 6011: __c_locale _M_c_locale_codecvt; 6011: 6011: public: 6011: static locale::id id; 6011: 6011: explicit 6011: codecvt(size_t __refs = 0); 6011: 6011: explicit 6011: codecvt(__c_locale __cloc, size_t __refs = 0); 6011: 6011: protected: 6011: virtual 6011: ~codecvt(); 6011: 6011: virtual result 6011: do_out(state_type& __state, const intern_type* __from, 6011: const intern_type* __from_end, const intern_type*& __from_next, 6011: extern_type* __to, extern_type* __to_end, 6011: extern_type*& __to_next) const; 6011: 6011: virtual result 6011: do_unshift(state_type& __state, 6011: extern_type* __to, extern_type* __to_end, 6011: extern_type*& __to_next) const; 6011: 6011: virtual result 6011: do_in(state_type& __state, 6011: const extern_type* __from, const extern_type* __from_end, 6011: const extern_type*& __from_next, 6011: intern_type* __to, intern_type* __to_end, 6011: intern_type*& __to_next) const; 6011: 6011: virtual 6011: int do_encoding() const throw(); 6011: 6011: virtual 6011: bool do_always_noconv() const throw(); 6011: 6011: virtual 6011: int do_length(state_type&, const extern_type* __from, 6011: const extern_type* __end, size_t __max) const; 6011: 6011: virtual int 6011: do_max_length() const throw(); 6011: }; 6011: # 467 "/usr/include/c++/8/bits/codecvt.h" 3 6011: template<> 6011: class codecvt 6011: : public __codecvt_abstract_base 6011: { 6011: public: 6011: 6011: typedef char16_t intern_type; 6011: typedef char extern_type; 6011: typedef mbstate_t state_type; 6011: 6011: public: 6011: static locale::id id; 6011: 6011: explicit 6011: codecvt(size_t __refs = 0) 6011: : __codecvt_abstract_base(__refs) { } 6011: 6011: protected: 6011: virtual 6011: ~codecvt(); 6011: 6011: virtual result 6011: do_out(state_type& __state, const intern_type* __from, 6011: const intern_type* __from_end, const intern_type*& __from_next, 6011: extern_type* __to, extern_type* __to_end, 6011: extern_type*& __to_next) const; 6011: 6011: virtual result 6011: do_unshift(state_type& __state, 6011: extern_type* __to, extern_type* __to_end, 6011: extern_type*& __to_next) const; 6011: 6011: virtual result 6011: do_in(state_type& __state, 6011: const extern_type* __from, const extern_type* __from_end, 6011: const extern_type*& __from_next, 6011: intern_type* __to, intern_type* __to_end, 6011: intern_type*& __to_next) const; 6011: 6011: virtual 6011: int do_encoding() const throw(); 6011: 6011: virtual 6011: bool do_always_noconv() const throw(); 6011: 6011: virtual 6011: int do_length(state_type&, const extern_type* __from, 6011: const extern_type* __end, size_t __max) const; 6011: 6011: virtual int 6011: do_max_length() const throw(); 6011: }; 6011: 6011: 6011: 6011: 6011: 6011: template<> 6011: class codecvt 6011: : public __codecvt_abstract_base 6011: { 6011: public: 6011: 6011: typedef char32_t intern_type; 6011: typedef char extern_type; 6011: typedef mbstate_t state_type; 6011: 6011: public: 6011: static locale::id id; 6011: 6011: explicit 6011: codecvt(size_t __refs = 0) 6011: : __codecvt_abstract_base(__refs) { } 6011: 6011: protected: 6011: virtual 6011: ~codecvt(); 6011: 6011: virtual result 6011: do_out(state_type& __state, const intern_type* __from, 6011: const intern_type* __from_end, const intern_type*& __from_next, 6011: extern_type* __to, extern_type* __to_end, 6011: extern_type*& __to_next) const; 6011: 6011: virtual result 6011: do_unshift(state_type& __state, 6011: extern_type* __to, extern_type* __to_end, 6011: extern_type*& __to_next) const; 6011: 6011: virtual result 6011: do_in(state_type& __state, 6011: const extern_type* __from, const extern_type* __from_end, 6011: const extern_type*& __from_next, 6011: intern_type* __to, intern_type* __to_end, 6011: intern_type*& __to_next) const; 6011: 6011: virtual 6011: int do_encoding() const throw(); 6011: 6011: virtual 6011: bool do_always_noconv() const throw(); 6011: 6011: virtual 6011: int do_length(state_type&, const extern_type* __from, 6011: const extern_type* __end, size_t __max) const; 6011: 6011: virtual int 6011: do_max_length() const throw(); 6011: }; 6011: 6011: 6011: 6011: 6011: 6011: template 6011: class codecvt_byname : public codecvt<_InternT, _ExternT, _StateT> 6011: { 6011: public: 6011: explicit 6011: codecvt_byname(const char* __s, size_t __refs = 0) 6011: : codecvt<_InternT, _ExternT, _StateT>(__refs) 6011: { 6011: if (__builtin_strcmp(__s, "C") != 0 6011: && __builtin_strcmp(__s, "POSIX") != 0) 6011: { 6011: this->_S_destroy_c_locale(this->_M_c_locale_codecvt); 6011: this->_S_create_c_locale(this->_M_c_locale_codecvt, __s); 6011: } 6011: } 6011: 6011: 6011: explicit 6011: codecvt_byname(const string& __s, size_t __refs = 0) 6011: : codecvt_byname(__s.c_str(), __refs) { } 6011: 6011: 6011: protected: 6011: virtual 6011: ~codecvt_byname() { } 6011: }; 6011: 6011: 6011: template<> 6011: class codecvt_byname 6011: : public codecvt 6011: { 6011: public: 6011: explicit 6011: codecvt_byname(const char*, size_t __refs = 0) 6011: : codecvt(__refs) { } 6011: 6011: explicit 6011: codecvt_byname(const string& __s, size_t __refs = 0) 6011: : codecvt_byname(__s.c_str(), __refs) { } 6011: 6011: protected: 6011: virtual 6011: ~codecvt_byname() { } 6011: }; 6011: 6011: template<> 6011: class codecvt_byname 6011: : public codecvt 6011: { 6011: public: 6011: explicit 6011: codecvt_byname(const char*, size_t __refs = 0) 6011: : codecvt(__refs) { } 6011: 6011: explicit 6011: codecvt_byname(const string& __s, size_t __refs = 0) 6011: : codecvt_byname(__s.c_str(), __refs) { } 6011: 6011: protected: 6011: virtual 6011: ~codecvt_byname() { } 6011: }; 6011: 6011: 6011: 6011: 6011: 6011: extern template class codecvt_byname; 6011: 6011: extern template 6011: const codecvt& 6011: use_facet >(const locale&); 6011: 6011: extern template 6011: bool 6011: has_facet >(const locale&); 6011: 6011: 6011: extern template class codecvt_byname; 6011: 6011: extern template 6011: const codecvt& 6011: use_facet >(const locale&); 6011: 6011: extern template 6011: bool 6011: has_facet >(const locale&); 6011: 6011: 6011: 6011: extern template class codecvt_byname; 6011: extern template class codecvt_byname; 6011: 6011: 6011: 6011: 6011: 6011: } 6011: # 2014 "/usr/include/c++/8/bits/locale_facets_nonio.h" 2 3 6011: 6011: # 1 "/usr/include/c++/8/bits/locale_facets_nonio.tcc" 1 3 6011: # 33 "/usr/include/c++/8/bits/locale_facets_nonio.tcc" 3 6011: 6011: # 34 "/usr/include/c++/8/bits/locale_facets_nonio.tcc" 3 6011: 6011: namespace std __attribute__ ((__visibility__ ("default"))) 6011: { 6011: 6011: 6011: template 6011: struct __use_cache<__moneypunct_cache<_CharT, _Intl> > 6011: { 6011: const __moneypunct_cache<_CharT, _Intl>* 6011: operator() (const locale& __loc) const 6011: { 6011: const size_t __i = moneypunct<_CharT, _Intl>::id._M_id(); 6011: const locale::facet** __caches = __loc._M_impl->_M_caches; 6011: if (!__caches[__i]) 6011: { 6011: __moneypunct_cache<_CharT, _Intl>* __tmp = 0; 6011: try 6011: { 6011: __tmp = new __moneypunct_cache<_CharT, _Intl>; 6011: __tmp->_M_cache(__loc); 6011: } 6011: catch(...) 6011: { 6011: delete __tmp; 6011: throw; 6011: } 6011: __loc._M_impl->_M_install_cache(__tmp, __i); 6011: } 6011: return static_cast< 6011: const __moneypunct_cache<_CharT, _Intl>*>(__caches[__i]); 6011: } 6011: }; 6011: 6011: template 6011: void 6011: __moneypunct_cache<_CharT, _Intl>::_M_cache(const locale& __loc) 6011: { 6011: const moneypunct<_CharT, _Intl>& __mp = 6011: use_facet >(__loc); 6011: 6011: _M_decimal_point = __mp.decimal_point(); 6011: _M_thousands_sep = __mp.thousands_sep(); 6011: _M_frac_digits = __mp.frac_digits(); 6011: 6011: char* __grouping = 0; 6011: _CharT* __curr_symbol = 0; 6011: _CharT* __positive_sign = 0; 6011: _CharT* __negative_sign = 0; 6011: try 6011: { 6011: const string& __g = __mp.grouping(); 6011: _M_grouping_size = __g.size(); 6011: __grouping = new char[_M_grouping_size]; 6011: __g.copy(__grouping, _M_grouping_size); 6011: _M_use_grouping = (_M_grouping_size 6011: && static_cast(__grouping[0]) > 0 6011: && (__grouping[0] 6011: != __gnu_cxx::__numeric_traits::__max)); 6011: 6011: const basic_string<_CharT>& __cs = __mp.curr_symbol(); 6011: _M_curr_symbol_size = __cs.size(); 6011: __curr_symbol = new _CharT[_M_curr_symbol_size]; 6011: __cs.copy(__curr_symbol, _M_curr_symbol_size); 6011: 6011: const basic_string<_CharT>& __ps = __mp.positive_sign(); 6011: _M_positive_sign_size = __ps.size(); 6011: __positive_sign = new _CharT[_M_positive_sign_size]; 6011: __ps.copy(__positive_sign, _M_positive_sign_size); 6011: 6011: const basic_string<_CharT>& __ns = __mp.negative_sign(); 6011: _M_negative_sign_size = __ns.size(); 6011: __negative_sign = new _CharT[_M_negative_sign_size]; 6011: __ns.copy(__negative_sign, _M_negative_sign_size); 6011: 6011: _M_pos_format = __mp.pos_format(); 6011: _M_neg_format = __mp.neg_format(); 6011: 6011: const ctype<_CharT>& __ct = use_facet >(__loc); 6011: __ct.widen(money_base::_S_atoms, 6011: money_base::_S_atoms + money_base::_S_end, _M_atoms); 6011: 6011: _M_grouping = __grouping; 6011: _M_curr_symbol = __curr_symbol; 6011: _M_positive_sign = __positive_sign; 6011: _M_negative_sign = __negative_sign; 6011: _M_allocated = true; 6011: } 6011: catch(...) 6011: { 6011: delete [] __grouping; 6011: delete [] __curr_symbol; 6011: delete [] __positive_sign; 6011: delete [] __negative_sign; 6011: throw; 6011: } 6011: } 6011: 6011: namespace __cxx11 { 6011: 6011: template 6011: template 6011: _InIter 6011: money_get<_CharT, _InIter>:: 6011: _M_extract(iter_type __beg, iter_type __end, ios_base& __io, 6011: ios_base::iostate& __err, string& __units) const 6011: { 6011: typedef char_traits<_CharT> __traits_type; 6011: typedef typename string_type::size_type size_type; 6011: typedef money_base::part part; 6011: typedef __moneypunct_cache<_CharT, _Intl> __cache_type; 6011: 6011: const locale& __loc = __io._M_getloc(); 6011: const ctype<_CharT>& __ctype = use_facet >(__loc); 6011: 6011: __use_cache<__cache_type> __uc; 6011: const __cache_type* __lc = __uc(__loc); 6011: const char_type* __lit = __lc->_M_atoms; 6011: 6011: 6011: bool __negative = false; 6011: 6011: size_type __sign_size = 0; 6011: 6011: const bool __mandatory_sign = (__lc->_M_positive_sign_size 6011: && __lc->_M_negative_sign_size); 6011: 6011: string __grouping_tmp; 6011: if (__lc->_M_use_grouping) 6011: __grouping_tmp.reserve(32); 6011: 6011: int __last_pos = 0; 6011: 6011: int __n = 0; 6011: 6011: bool __testvalid = true; 6011: 6011: bool __testdecfound = false; 6011: 6011: 6011: string __res; 6011: __res.reserve(32); 6011: 6011: const char_type* __lit_zero = __lit + money_base::_S_zero; 6011: const money_base::pattern __p = __lc->_M_neg_format; 6011: for (int __i = 0; __i < 4 && __testvalid; ++__i) 6011: { 6011: const part __which = static_cast(__p.field[__i]); 6011: switch (__which) 6011: { 6011: case money_base::symbol: 6011: 6011: 6011: 6011: 6011: if (__io.flags() & ios_base::showbase || __sign_size > 1 6011: || __i == 0 6011: || (__i == 1 && (__mandatory_sign 6011: || (static_cast(__p.field[0]) 6011: == money_base::sign) 6011: || (static_cast(__p.field[2]) 6011: == money_base::space))) 6011: || (__i == 2 && ((static_cast(__p.field[3]) 6011: == money_base::value) 6011: || (__mandatory_sign 6011: && (static_cast(__p.field[3]) 6011: == money_base::sign))))) 6011: { 6011: const size_type __len = __lc->_M_curr_symbol_size; 6011: size_type __j = 0; 6011: for (; __beg != __end && __j < __len 6011: && *__beg == __lc->_M_curr_symbol[__j]; 6011: ++__beg, (void)++__j); 6011: if (__j != __len 6011: && (__j || __io.flags() & ios_base::showbase)) 6011: __testvalid = false; 6011: } 6011: break; 6011: case money_base::sign: 6011: 6011: if (__lc->_M_positive_sign_size && __beg != __end 6011: && *__beg == __lc->_M_positive_sign[0]) 6011: { 6011: __sign_size = __lc->_M_positive_sign_size; 6011: ++__beg; 6011: } 6011: else if (__lc->_M_negative_sign_size && __beg != __end 6011: && *__beg == __lc->_M_negative_sign[0]) 6011: { 6011: __negative = true; 6011: __sign_size = __lc->_M_negative_sign_size; 6011: ++__beg; 6011: } 6011: else if (__lc->_M_positive_sign_size 6011: && !__lc->_M_negative_sign_size) 6011: 6011: 6011: __negative = true; 6011: else if (__mandatory_sign) 6011: __testvalid = false; 6011: break; 6011: case money_base::value: 6011: 6011: 6011: for (; __beg != __end; ++__beg) 6011: { 6011: const char_type __c = *__beg; 6011: const char_type* __q = __traits_type::find(__lit_zero, 6011: 10, __c); 6011: if (__q != 0) 6011: { 6011: __res += money_base::_S_atoms[__q - __lit]; 6011: ++__n; 6011: } 6011: else if (__c == __lc->_M_decimal_point 6011: && !__testdecfound) 6011: { 6011: if (__lc->_M_frac_digits <= 0) 6011: break; 6011: 6011: __last_pos = __n; 6011: __n = 0; 6011: __testdecfound = true; 6011: } 6011: else if (__lc->_M_use_grouping 6011: && __c == __lc->_M_thousands_sep 6011: && !__testdecfound) 6011: { 6011: if (__n) 6011: { 6011: 6011: __grouping_tmp += static_cast(__n); 6011: __n = 0; 6011: } 6011: else 6011: { 6011: __testvalid = false; 6011: break; 6011: } 6011: } 6011: else 6011: break; 6011: } 6011: if (__res.empty()) 6011: __testvalid = false; 6011: break; 6011: case money_base::space: 6011: 6011: if (__beg != __end && __ctype.is(ctype_base::space, *__beg)) 6011: ++__beg; 6011: else 6011: __testvalid = false; 6011: 6011: case money_base::none: 6011: 6011: if (__i != 3) 6011: for (; __beg != __end 6011: && __ctype.is(ctype_base::space, *__beg); ++__beg); 6011: break; 6011: } 6011: } 6011: 6011: 6011: if (__sign_size > 1 && __testvalid) 6011: { 6011: const char_type* __sign = __negative ? __lc->_M_negative_sign 6011: : __lc->_M_positive_sign; 6011: size_type __i = 1; 6011: for (; __beg != __end && __i < __sign_size 6011: && *__beg == __sign[__i]; ++__beg, (void)++__i); 6011: 6011: if (__i != __sign_size) 6011: __testvalid = false; 6011: } 6011: 6011: if (__testvalid) 6011: { 6011: 6011: if (__res.size() > 1) 6011: { 6011: const size_type __first = __res.find_first_not_of('0'); 6011: const bool __only_zeros = __first == string::npos; 6011: if (__first) 6011: __res.erase(0, __only_zeros ? __res.size() - 1 : __first); 6011: } 6011: 6011: 6011: if (__negative && __res[0] != '0') 6011: __res.insert(__res.begin(), '-'); 6011: 6011: 6011: if (__grouping_tmp.size()) 6011: { 6011: 6011: __grouping_tmp += static_cast(__testdecfound ? __last_pos 6011: : __n); 6011: if (!std::__verify_grouping(__lc->_M_grouping, 6011: __lc->_M_grouping_size, 6011: __grouping_tmp)) 6011: __err |= ios_base::failbit; 6011: } 6011: 6011: 6011: if (__testdecfound && __n != __lc->_M_frac_digits) 6011: __testvalid = false; 6011: } 6011: 6011: 6011: if (!__testvalid) 6011: __err |= ios_base::failbit; 6011: else 6011: __units.swap(__res); 6011: 6011: 6011: if (__beg == __end) 6011: __err |= ios_base::eofbit; 6011: return __beg; 6011: } 6011: # 368 "/usr/include/c++/8/bits/locale_facets_nonio.tcc" 3 6011: template 6011: _InIter 6011: money_get<_CharT, _InIter>:: 6011: do_get(iter_type __beg, iter_type __end, bool __intl, ios_base& __io, 6011: ios_base::iostate& __err, long double& __units) const 6011: { 6011: string __str; 6011: __beg = __intl ? _M_extract(__beg, __end, __io, __err, __str) 6011: : _M_extract(__beg, __end, __io, __err, __str); 6011: std::__convert_to_v(__str.c_str(), __units, __err, _S_get_c_locale()); 6011: return __beg; 6011: } 6011: 6011: template 6011: _InIter 6011: money_get<_CharT, _InIter>:: 6011: do_get(iter_type __beg, iter_type __end, bool __intl, ios_base& __io, 6011: ios_base::iostate& __err, string_type& __digits) const 6011: { 6011: typedef typename string::size_type size_type; 6011: 6011: const locale& __loc = __io._M_getloc(); 6011: const ctype<_CharT>& __ctype = use_facet >(__loc); 6011: 6011: string __str; 6011: __beg = __intl ? _M_extract(__beg, __end, __io, __err, __str) 6011: : _M_extract(__beg, __end, __io, __err, __str); 6011: const size_type __len = __str.size(); 6011: if (__len) 6011: { 6011: __digits.resize(__len); 6011: __ctype.widen(__str.data(), __str.data() + __len, &__digits[0]); 6011: } 6011: return __beg; 6011: } 6011: 6011: template 6011: template 6011: _OutIter 6011: money_put<_CharT, _OutIter>:: 6011: _M_insert(iter_type __s, ios_base& __io, char_type __fill, 6011: const string_type& __digits) const 6011: { 6011: typedef typename string_type::size_type size_type; 6011: typedef money_base::part part; 6011: typedef __moneypunct_cache<_CharT, _Intl> __cache_type; 6011: 6011: const locale& __loc = __io._M_getloc(); 6011: const ctype<_CharT>& __ctype = use_facet >(__loc); 6011: 6011: __use_cache<__cache_type> __uc; 6011: const __cache_type* __lc = __uc(__loc); 6011: const char_type* __lit = __lc->_M_atoms; 6011: 6011: 6011: 6011: const char_type* __beg = __digits.data(); 6011: 6011: money_base::pattern __p; 6011: const char_type* __sign; 6011: size_type __sign_size; 6011: if (!(*__beg == __lit[money_base::_S_minus])) 6011: { 6011: __p = __lc->_M_pos_format; 6011: __sign = __lc->_M_positive_sign; 6011: __sign_size = __lc->_M_positive_sign_size; 6011: } 6011: else 6011: { 6011: __p = __lc->_M_neg_format; 6011: __sign = __lc->_M_negative_sign; 6011: __sign_size = __lc->_M_negative_sign_size; 6011: if (__digits.size()) 6011: ++__beg; 6011: } 6011: 6011: 6011: size_type __len = __ctype.scan_not(ctype_base::digit, __beg, 6011: __beg + __digits.size()) - __beg; 6011: if (__len) 6011: { 6011: 6011: 6011: 6011: string_type __value; 6011: __value.reserve(2 * __len); 6011: 6011: 6011: 6011: long __paddec = __len - __lc->_M_frac_digits; 6011: if (__paddec > 0) 6011: { 6011: if (__lc->_M_frac_digits < 0) 6011: __paddec = __len; 6011: if (__lc->_M_grouping_size) 6011: { 6011: __value.assign(2 * __paddec, char_type()); 6011: _CharT* __vend = 6011: std::__add_grouping(&__value[0], __lc->_M_thousands_sep, 6011: __lc->_M_grouping, 6011: __lc->_M_grouping_size, 6011: __beg, __beg + __paddec); 6011: __value.erase(__vend - &__value[0]); 6011: } 6011: else 6011: __value.assign(__beg, __paddec); 6011: } 6011: 6011: 6011: if (__lc->_M_frac_digits > 0) 6011: { 6011: __value += __lc->_M_decimal_point; 6011: if (__paddec >= 0) 6011: __value.append(__beg + __paddec, __lc->_M_frac_digits); 6011: else 6011: { 6011: 6011: __value.append(-__paddec, __lit[money_base::_S_zero]); 6011: __value.append(__beg, __len); 6011: } 6011: } 6011: 6011: 6011: const ios_base::fmtflags __f = __io.flags() 6011: & ios_base::adjustfield; 6011: __len = __value.size() + __sign_size; 6011: __len += ((__io.flags() & ios_base::showbase) 6011: ? __lc->_M_curr_symbol_size : 0); 6011: 6011: string_type __res; 6011: __res.reserve(2 * __len); 6011: 6011: const size_type __width = static_cast(__io.width()); 6011: const bool __testipad = (__f == ios_base::internal 6011: && __len < __width); 6011: 6011: for (int __i = 0; __i < 4; ++__i) 6011: { 6011: const part __which = static_cast(__p.field[__i]); 6011: switch (__which) 6011: { 6011: case money_base::symbol: 6011: if (__io.flags() & ios_base::showbase) 6011: __res.append(__lc->_M_curr_symbol, 6011: __lc->_M_curr_symbol_size); 6011: break; 6011: case money_base::sign: 6011: 6011: 6011: 6011: if (__sign_size) 6011: __res += __sign[0]; 6011: break; 6011: case money_base::value: 6011: __res += __value; 6011: break; 6011: case money_base::space: 6011: 6011: 6011: 6011: if (__testipad) 6011: __res.append(__width - __len, __fill); 6011: else 6011: __res += __fill; 6011: break; 6011: case money_base::none: 6011: if (__testipad) 6011: __res.append(__width - __len, __fill); 6011: break; 6011: } 6011: } 6011: 6011: 6011: if (__sign_size > 1) 6011: __res.append(__sign + 1, __sign_size - 1); 6011: 6011: 6011: __len = __res.size(); 6011: if (__width > __len) 6011: { 6011: if (__f == ios_base::left) 6011: 6011: __res.append(__width - __len, __fill); 6011: else 6011: 6011: __res.insert(0, __width - __len, __fill); 6011: __len = __width; 6011: } 6011: 6011: 6011: __s = std::__write(__s, __res.data(), __len); 6011: } 6011: __io.width(0); 6011: return __s; 6011: } 6011: # 574 "/usr/include/c++/8/bits/locale_facets_nonio.tcc" 3 6011: template 6011: _OutIter 6011: money_put<_CharT, _OutIter>:: 6011: do_put(iter_type __s, bool __intl, ios_base& __io, char_type __fill, 6011: long double __units) const 6011: { 6011: const locale __loc = __io.getloc(); 6011: const ctype<_CharT>& __ctype = use_facet >(__loc); 6011: 6011: 6011: int __cs_size = 64; 6011: char* __cs = static_cast(__builtin_alloca(__cs_size)); 6011: 6011: 6011: int __len = std::__convert_from_v(_S_get_c_locale(), __cs, __cs_size, 6011: "%.*Lf", 0, __units); 6011: 6011: if (__len >= __cs_size) 6011: { 6011: __cs_size = __len + 1; 6011: __cs = static_cast(__builtin_alloca(__cs_size)); 6011: __len = std::__convert_from_v(_S_get_c_locale(), __cs, __cs_size, 6011: "%.*Lf", 0, __units); 6011: } 6011: # 606 "/usr/include/c++/8/bits/locale_facets_nonio.tcc" 3 6011: string_type __digits(__len, char_type()); 6011: __ctype.widen(__cs, __cs + __len, &__digits[0]); 6011: return __intl ? _M_insert(__s, __io, __fill, __digits) 6011: : _M_insert(__s, __io, __fill, __digits); 6011: } 6011: 6011: template 6011: _OutIter 6011: money_put<_CharT, _OutIter>:: 6011: do_put(iter_type __s, bool __intl, ios_base& __io, char_type __fill, 6011: const string_type& __digits) const 6011: { return __intl ? _M_insert(__s, __io, __fill, __digits) 6011: : _M_insert(__s, __io, __fill, __digits); } 6011: 6011: } 6011: 6011: 6011: 6011: 6011: template 6011: time_base::dateorder 6011: time_get<_CharT, _InIter>::do_date_order() const 6011: { return time_base::no_order; } 6011: 6011: 6011: 6011: template 6011: _InIter 6011: time_get<_CharT, _InIter>:: 6011: _M_extract_via_format(iter_type __beg, iter_type __end, ios_base& __io, 6011: ios_base::iostate& __err, tm* __tm, 6011: const _CharT* __format) const 6011: { 6011: const locale& __loc = __io._M_getloc(); 6011: const __timepunct<_CharT>& __tp = use_facet<__timepunct<_CharT> >(__loc); 6011: const ctype<_CharT>& __ctype = use_facet >(__loc); 6011: const size_t __len = char_traits<_CharT>::length(__format); 6011: 6011: ios_base::iostate __tmperr = ios_base::goodbit; 6011: size_t __i = 0; 6011: for (; __beg != __end && __i < __len && !__tmperr; ++__i) 6011: { 6011: if (__ctype.narrow(__format[__i], 0) == '%') 6011: { 6011: 6011: char __c = __ctype.narrow(__format[++__i], 0); 6011: int __mem = 0; 6011: if (__c == 'E' || __c == 'O') 6011: __c = __ctype.narrow(__format[++__i], 0); 6011: switch (__c) 6011: { 6011: const char* __cs; 6011: _CharT __wcs[10]; 6011: case 'a': 6011: 6011: const char_type* __days1[7]; 6011: __tp._M_days_abbreviated(__days1); 6011: __beg = _M_extract_name(__beg, __end, __mem, __days1, 6011: 7, __io, __tmperr); 6011: if (!__tmperr) 6011: __tm->tm_wday = __mem; 6011: break; 6011: case 'A': 6011: 6011: const char_type* __days2[7]; 6011: __tp._M_days(__days2); 6011: __beg = _M_extract_name(__beg, __end, __mem, __days2, 6011: 7, __io, __tmperr); 6011: if (!__tmperr) 6011: __tm->tm_wday = __mem; 6011: break; 6011: case 'h': 6011: case 'b': 6011: 6011: const char_type* __months1[12]; 6011: __tp._M_months_abbreviated(__months1); 6011: __beg = _M_extract_name(__beg, __end, __mem, 6011: __months1, 12, __io, __tmperr); 6011: if (!__tmperr) 6011: __tm->tm_mon = __mem; 6011: break; 6011: case 'B': 6011: 6011: const char_type* __months2[12]; 6011: __tp._M_months(__months2); 6011: __beg = _M_extract_name(__beg, __end, __mem, 6011: __months2, 12, __io, __tmperr); 6011: if (!__tmperr) 6011: __tm->tm_mon = __mem; 6011: break; 6011: case 'c': 6011: 6011: const char_type* __dt[2]; 6011: __tp._M_date_time_formats(__dt); 6011: __beg = _M_extract_via_format(__beg, __end, __io, __tmperr, 6011: __tm, __dt[0]); 6011: break; 6011: case 'd': 6011: 6011: __beg = _M_extract_num(__beg, __end, __mem, 1, 31, 2, 6011: __io, __tmperr); 6011: if (!__tmperr) 6011: __tm->tm_mday = __mem; 6011: break; 6011: case 'e': 6011: 6011: 6011: if (__ctype.is(ctype_base::space, *__beg)) 6011: __beg = _M_extract_num(++__beg, __end, __mem, 1, 9, 6011: 1, __io, __tmperr); 6011: else 6011: __beg = _M_extract_num(__beg, __end, __mem, 10, 31, 6011: 2, __io, __tmperr); 6011: if (!__tmperr) 6011: __tm->tm_mday = __mem; 6011: break; 6011: case 'D': 6011: 6011: __cs = "%m/%d/%y"; 6011: __ctype.widen(__cs, __cs + 9, __wcs); 6011: __beg = _M_extract_via_format(__beg, __end, __io, __tmperr, 6011: __tm, __wcs); 6011: break; 6011: case 'H': 6011: 6011: __beg = _M_extract_num(__beg, __end, __mem, 0, 23, 2, 6011: __io, __tmperr); 6011: if (!__tmperr) 6011: __tm->tm_hour = __mem; 6011: break; 6011: case 'I': 6011: 6011: __beg = _M_extract_num(__beg, __end, __mem, 1, 12, 2, 6011: __io, __tmperr); 6011: if (!__tmperr) 6011: __tm->tm_hour = __mem; 6011: break; 6011: case 'm': 6011: 6011: __beg = _M_extract_num(__beg, __end, __mem, 1, 12, 2, 6011: __io, __tmperr); 6011: if (!__tmperr) 6011: __tm->tm_mon = __mem - 1; 6011: break; 6011: case 'M': 6011: 6011: __beg = _M_extract_num(__beg, __end, __mem, 0, 59, 2, 6011: __io, __tmperr); 6011: if (!__tmperr) 6011: __tm->tm_min = __mem; 6011: break; 6011: case 'n': 6011: if (__ctype.narrow(*__beg, 0) == '\n') 6011: ++__beg; 6011: else 6011: __tmperr |= ios_base::failbit; 6011: break; 6011: case 'R': 6011: 6011: __cs = "%H:%M"; 6011: __ctype.widen(__cs, __cs + 6, __wcs); 6011: __beg = _M_extract_via_format(__beg, __end, __io, __tmperr, 6011: __tm, __wcs); 6011: break; 6011: case 'S': 6011: 6011: 6011: 6011: __beg = _M_extract_num(__beg, __end, __mem, 0, 60, 2, 6011: 6011: 6011: 6011: __io, __tmperr); 6011: if (!__tmperr) 6011: __tm->tm_sec = __mem; 6011: break; 6011: case 't': 6011: if (__ctype.narrow(*__beg, 0) == '\t') 6011: ++__beg; 6011: else 6011: __tmperr |= ios_base::failbit; 6011: break; 6011: case 'T': 6011: 6011: __cs = "%H:%M:%S"; 6011: __ctype.widen(__cs, __cs + 9, __wcs); 6011: __beg = _M_extract_via_format(__beg, __end, __io, __tmperr, 6011: __tm, __wcs); 6011: break; 6011: case 'x': 6011: 6011: const char_type* __dates[2]; 6011: __tp._M_date_formats(__dates); 6011: __beg = _M_extract_via_format(__beg, __end, __io, __tmperr, 6011: __tm, __dates[0]); 6011: break; 6011: case 'X': 6011: 6011: const char_type* __times[2]; 6011: __tp._M_time_formats(__times); 6011: __beg = _M_extract_via_format(__beg, __end, __io, __tmperr, 6011: __tm, __times[0]); 6011: break; 6011: case 'y': 6011: case 'C': 6011: 6011: case 'Y': 6011: 6011: 6011: 6011: 6011: __beg = _M_extract_num(__beg, __end, __mem, 0, 9999, 4, 6011: __io, __tmperr); 6011: if (!__tmperr) 6011: __tm->tm_year = __mem < 0 ? __mem + 100 : __mem - 1900; 6011: break; 6011: case 'Z': 6011: 6011: if (__ctype.is(ctype_base::upper, *__beg)) 6011: { 6011: int __tmp; 6011: __beg = _M_extract_name(__beg, __end, __tmp, 6011: __timepunct_cache<_CharT>::_S_timezones, 6011: 14, __io, __tmperr); 6011: 6011: 6011: if (__beg != __end && !__tmperr && __tmp == 0 6011: && (*__beg == __ctype.widen('-') 6011: || *__beg == __ctype.widen('+'))) 6011: { 6011: __beg = _M_extract_num(__beg, __end, __tmp, 0, 23, 2, 6011: __io, __tmperr); 6011: __beg = _M_extract_num(__beg, __end, __tmp, 0, 59, 2, 6011: __io, __tmperr); 6011: } 6011: } 6011: else 6011: __tmperr |= ios_base::failbit; 6011: break; 6011: default: 6011: 6011: __tmperr |= ios_base::failbit; 6011: } 6011: } 6011: else 6011: { 6011: 6011: if (__format[__i] == *__beg) 6011: ++__beg; 6011: else 6011: __tmperr |= ios_base::failbit; 6011: } 6011: } 6011: 6011: if (__tmperr || __i != __len) 6011: __err |= ios_base::failbit; 6011: 6011: return __beg; 6011: } 6011: 6011: template 6011: _InIter 6011: time_get<_CharT, _InIter>:: 6011: _M_extract_num(iter_type __beg, iter_type __end, int& __member, 6011: int __min, int __max, size_t __len, 6011: ios_base& __io, ios_base::iostate& __err) const 6011: { 6011: const locale& __loc = __io._M_getloc(); 6011: const ctype<_CharT>& __ctype = use_facet >(__loc); 6011: 6011: 6011: int __mult = __len == 2 ? 10 : (__len == 4 ? 1000 : 1); 6011: 6011: ++__min; 6011: size_t __i = 0; 6011: int __value = 0; 6011: for (; __beg != __end && __i < __len; ++__beg, (void)++__i) 6011: { 6011: const char __c = __ctype.narrow(*__beg, '*'); 6011: if (__c >= '0' && __c <= '9') 6011: { 6011: __value = __value * 10 + (__c - '0'); 6011: const int __valuec = __value * __mult; 6011: if (__valuec > __max || __valuec + __mult < __min) 6011: break; 6011: __mult /= 10; 6011: } 6011: else 6011: break; 6011: } 6011: if (__i == __len) 6011: __member = __value; 6011: 6011: else if (__len == 4 && __i == 2) 6011: __member = __value - 100; 6011: else 6011: __err |= ios_base::failbit; 6011: 6011: return __beg; 6011: } 6011: 6011: 6011: 6011: template 6011: _InIter 6011: time_get<_CharT, _InIter>:: 6011: _M_extract_name(iter_type __beg, iter_type __end, int& __member, 6011: const _CharT** __names, size_t __indexlen, 6011: ios_base& __io, ios_base::iostate& __err) const 6011: { 6011: typedef char_traits<_CharT> __traits_type; 6011: const locale& __loc = __io._M_getloc(); 6011: const ctype<_CharT>& __ctype = use_facet >(__loc); 6011: 6011: int* __matches = static_cast(__builtin_alloca(sizeof(int) 6011: * __indexlen)); 6011: size_t __nmatches = 0; 6011: size_t __pos = 0; 6011: bool __testvalid = true; 6011: const char_type* __name; 6011: 6011: 6011: 6011: 6011: 6011: if (__beg != __end) 6011: { 6011: const char_type __c = *__beg; 6011: for (size_t __i1 = 0; __i1 < __indexlen; ++__i1) 6011: if (__c == __names[__i1][0] 6011: || __c == __ctype.toupper(__names[__i1][0])) 6011: __matches[__nmatches++] = __i1; 6011: } 6011: 6011: while (__nmatches > 1) 6011: { 6011: 6011: size_t __minlen = __traits_type::length(__names[__matches[0]]); 6011: for (size_t __i2 = 1; __i2 < __nmatches; ++__i2) 6011: __minlen = std::min(__minlen, 6011: __traits_type::length(__names[__matches[__i2]])); 6011: ++__beg; 6011: ++__pos; 6011: if (__pos < __minlen && __beg != __end) 6011: for (size_t __i3 = 0; __i3 < __nmatches;) 6011: { 6011: __name = __names[__matches[__i3]]; 6011: if (!(__name[__pos] == *__beg)) 6011: __matches[__i3] = __matches[--__nmatches]; 6011: else 6011: ++__i3; 6011: } 6011: else 6011: break; 6011: } 6011: 6011: if (__nmatches == 1) 6011: { 6011: 6011: ++__beg; 6011: ++__pos; 6011: __name = __names[__matches[0]]; 6011: const size_t __len = __traits_type::length(__name); 6011: while (__pos < __len && __beg != __end && __name[__pos] == *__beg) 6011: ++__beg, (void)++__pos; 6011: 6011: if (__len == __pos) 6011: __member = __matches[0]; 6011: else 6011: __testvalid = false; 6011: } 6011: else 6011: __testvalid = false; 6011: if (!__testvalid) 6011: __err |= ios_base::failbit; 6011: 6011: return __beg; 6011: } 6011: 6011: template 6011: _InIter 6011: time_get<_CharT, _InIter>:: 6011: _M_extract_wday_or_month(iter_type __beg, iter_type __end, int& __member, 6011: const _CharT** __names, size_t __indexlen, 6011: ios_base& __io, ios_base::iostate& __err) const 6011: { 6011: typedef char_traits<_CharT> __traits_type; 6011: const locale& __loc = __io._M_getloc(); 6011: const ctype<_CharT>& __ctype = use_facet >(__loc); 6011: 6011: int* __matches = static_cast(__builtin_alloca(2 * sizeof(int) 6011: * __indexlen)); 6011: size_t __nmatches = 0; 6011: size_t* __matches_lengths = 0; 6011: size_t __pos = 0; 6011: 6011: if (__beg != __end) 6011: { 6011: const char_type __c = *__beg; 6011: for (size_t __i = 0; __i < 2 * __indexlen; ++__i) 6011: if (__c == __names[__i][0] 6011: || __c == __ctype.toupper(__names[__i][0])) 6011: __matches[__nmatches++] = __i; 6011: } 6011: 6011: if (__nmatches) 6011: { 6011: ++__beg; 6011: ++__pos; 6011: 6011: __matches_lengths 6011: = static_cast(__builtin_alloca(sizeof(size_t) 6011: * __nmatches)); 6011: for (size_t __i = 0; __i < __nmatches; ++__i) 6011: __matches_lengths[__i] 6011: = __traits_type::length(__names[__matches[__i]]); 6011: } 6011: 6011: for (; __beg != __end; ++__beg, (void)++__pos) 6011: { 6011: size_t __nskipped = 0; 6011: const char_type __c = *__beg; 6011: for (size_t __i = 0; __i < __nmatches;) 6011: { 6011: const char_type* __name = __names[__matches[__i]]; 6011: if (__pos >= __matches_lengths[__i]) 6011: ++__nskipped, ++__i; 6011: else if (!(__name[__pos] == __c)) 6011: { 6011: --__nmatches; 6011: __matches[__i] = __matches[__nmatches]; 6011: __matches_lengths[__i] = __matches_lengths[__nmatches]; 6011: } 6011: else 6011: ++__i; 6011: } 6011: if (__nskipped == __nmatches) 6011: break; 6011: } 6011: 6011: if ((__nmatches == 1 && __matches_lengths[0] == __pos) 6011: || (__nmatches == 2 && (__matches_lengths[0] == __pos 6011: || __matches_lengths[1] == __pos))) 6011: __member = (__matches[0] >= __indexlen 6011: ? __matches[0] - __indexlen : __matches[0]); 6011: else 6011: __err |= ios_base::failbit; 6011: 6011: return __beg; 6011: } 6011: 6011: template 6011: _InIter 6011: time_get<_CharT, _InIter>:: 6011: do_get_time(iter_type __beg, iter_type __end, ios_base& __io, 6011: ios_base::iostate& __err, tm* __tm) const 6011: { 6011: const locale& __loc = __io._M_getloc(); 6011: const __timepunct<_CharT>& __tp = use_facet<__timepunct<_CharT> >(__loc); 6011: const char_type* __times[2]; 6011: __tp._M_time_formats(__times); 6011: __beg = _M_extract_via_format(__beg, __end, __io, __err, 6011: __tm, __times[0]); 6011: if (__beg == __end) 6011: __err |= ios_base::eofbit; 6011: return __beg; 6011: } 6011: 6011: template 6011: _InIter 6011: time_get<_CharT, _InIter>:: 6011: do_get_date(iter_type __beg, iter_type __end, ios_base& __io, 6011: ios_base::iostate& __err, tm* __tm) const 6011: { 6011: const locale& __loc = __io._M_getloc(); 6011: const __timepunct<_CharT>& __tp = use_facet<__timepunct<_CharT> >(__loc); 6011: const char_type* __dates[2]; 6011: __tp._M_date_formats(__dates); 6011: __beg = _M_extract_via_format(__beg, __end, __io, __err, 6011: __tm, __dates[0]); 6011: if (__beg == __end) 6011: __err |= ios_base::eofbit; 6011: return __beg; 6011: } 6011: 6011: template 6011: _InIter 6011: time_get<_CharT, _InIter>:: 6011: do_get_weekday(iter_type __beg, iter_type __end, ios_base& __io, 6011: ios_base::iostate& __err, tm* __tm) const 6011: { 6011: const locale& __loc = __io._M_getloc(); 6011: const __timepunct<_CharT>& __tp = use_facet<__timepunct<_CharT> >(__loc); 6011: const char_type* __days[14]; 6011: __tp._M_days_abbreviated(__days); 6011: __tp._M_days(__days + 7); 6011: int __tmpwday; 6011: ios_base::iostate __tmperr = ios_base::goodbit; 6011: 6011: __beg = _M_extract_wday_or_month(__beg, __end, __tmpwday, __days, 7, 6011: __io, __tmperr); 6011: if (!__tmperr) 6011: __tm->tm_wday = __tmpwday; 6011: else 6011: __err |= ios_base::failbit; 6011: 6011: if (__beg == __end) 6011: __err |= ios_base::eofbit; 6011: return __beg; 6011: } 6011: 6011: template 6011: _InIter 6011: time_get<_CharT, _InIter>:: 6011: do_get_monthname(iter_type __beg, iter_type __end, 6011: ios_base& __io, ios_base::iostate& __err, tm* __tm) const 6011: { 6011: const locale& __loc = __io._M_getloc(); 6011: const __timepunct<_CharT>& __tp = use_facet<__timepunct<_CharT> >(__loc); 6011: const char_type* __months[24]; 6011: __tp._M_months_abbreviated(__months); 6011: __tp._M_months(__months + 12); 6011: int __tmpmon; 6011: ios_base::iostate __tmperr = ios_base::goodbit; 6011: 6011: __beg = _M_extract_wday_or_month(__beg, __end, __tmpmon, __months, 12, 6011: __io, __tmperr); 6011: if (!__tmperr) 6011: __tm->tm_mon = __tmpmon; 6011: else 6011: __err |= ios_base::failbit; 6011: 6011: if (__beg == __end) 6011: __err |= ios_base::eofbit; 6011: return __beg; 6011: } 6011: 6011: template 6011: _InIter 6011: time_get<_CharT, _InIter>:: 6011: do_get_year(iter_type __beg, iter_type __end, ios_base& __io, 6011: ios_base::iostate& __err, tm* __tm) const 6011: { 6011: int __tmpyear; 6011: ios_base::iostate __tmperr = ios_base::goodbit; 6011: 6011: __beg = _M_extract_num(__beg, __end, __tmpyear, 0, 9999, 4, 6011: __io, __tmperr); 6011: if (!__tmperr) 6011: __tm->tm_year = __tmpyear < 0 ? __tmpyear + 100 : __tmpyear - 1900; 6011: else 6011: __err |= ios_base::failbit; 6011: 6011: if (__beg == __end) 6011: __err |= ios_base::eofbit; 6011: return __beg; 6011: } 6011: 6011: 6011: template 6011: inline 6011: _InIter 6011: time_get<_CharT, _InIter>:: 6011: get(iter_type __s, iter_type __end, ios_base& __io, 6011: ios_base::iostate& __err, tm* __tm, const char_type* __fmt, 6011: const char_type* __fmtend) const 6011: { 6011: const locale& __loc = __io._M_getloc(); 6011: ctype<_CharT> const& __ctype = use_facet >(__loc); 6011: __err = ios_base::goodbit; 6011: while (__fmt != __fmtend && 6011: __err == ios_base::goodbit) 6011: { 6011: if (__s == __end) 6011: { 6011: __err = ios_base::eofbit | ios_base::failbit; 6011: break; 6011: } 6011: else if (__ctype.narrow(*__fmt, 0) == '%') 6011: { 6011: char __format; 6011: char __mod = 0; 6011: if (++__fmt == __fmtend) 6011: { 6011: __err = ios_base::failbit; 6011: break; 6011: } 6011: const char __c = __ctype.narrow(*__fmt, 0); 6011: if (__c != 'E' && __c != 'O') 6011: __format = __c; 6011: else if (++__fmt != __fmtend) 6011: { 6011: __mod = __c; 6011: __format = __ctype.narrow(*__fmt, 0); 6011: } 6011: else 6011: { 6011: __err = ios_base::failbit; 6011: break; 6011: } 6011: __s = this->do_get(__s, __end, __io, __err, __tm, __format, 6011: __mod); 6011: ++__fmt; 6011: } 6011: else if (__ctype.is(ctype_base::space, *__fmt)) 6011: { 6011: ++__fmt; 6011: while (__fmt != __fmtend && 6011: __ctype.is(ctype_base::space, *__fmt)) 6011: ++__fmt; 6011: 6011: while (__s != __end && 6011: __ctype.is(ctype_base::space, *__s)) 6011: ++__s; 6011: } 6011: 6011: else if (__ctype.tolower(*__s) == __ctype.tolower(*__fmt) || 6011: __ctype.toupper(*__s) == __ctype.toupper(*__fmt)) 6011: { 6011: ++__s; 6011: ++__fmt; 6011: } 6011: else 6011: { 6011: __err = ios_base::failbit; 6011: break; 6011: } 6011: } 6011: return __s; 6011: } 6011: 6011: template 6011: inline 6011: _InIter 6011: time_get<_CharT, _InIter>:: 6011: do_get(iter_type __beg, iter_type __end, ios_base& __io, 6011: ios_base::iostate& __err, tm* __tm, 6011: char __format, char __mod) const 6011: { 6011: const locale& __loc = __io._M_getloc(); 6011: ctype<_CharT> const& __ctype = use_facet >(__loc); 6011: __err = ios_base::goodbit; 6011: 6011: char_type __fmt[4]; 6011: __fmt[0] = __ctype.widen('%'); 6011: if (!__mod) 6011: { 6011: __fmt[1] = __format; 6011: __fmt[2] = char_type(); 6011: } 6011: else 6011: { 6011: __fmt[1] = __mod; 6011: __fmt[2] = __format; 6011: __fmt[3] = char_type(); 6011: } 6011: 6011: __beg = _M_extract_via_format(__beg, __end, __io, __err, __tm, __fmt); 6011: if (__beg == __end) 6011: __err |= ios_base::eofbit; 6011: return __beg; 6011: } 6011: 6011: 6011: 6011: template 6011: _OutIter 6011: time_put<_CharT, _OutIter>:: 6011: put(iter_type __s, ios_base& __io, char_type __fill, const tm* __tm, 6011: const _CharT* __beg, const _CharT* __end) const 6011: { 6011: const locale& __loc = __io._M_getloc(); 6011: ctype<_CharT> const& __ctype = use_facet >(__loc); 6011: for (; __beg != __end; ++__beg) 6011: if (__ctype.narrow(*__beg, 0) != '%') 6011: { 6011: *__s = *__beg; 6011: ++__s; 6011: } 6011: else if (++__beg != __end) 6011: { 6011: char __format; 6011: char __mod = 0; 6011: const char __c = __ctype.narrow(*__beg, 0); 6011: if (__c != 'E' && __c != 'O') 6011: __format = __c; 6011: else if (++__beg != __end) 6011: { 6011: __mod = __c; 6011: __format = __ctype.narrow(*__beg, 0); 6011: } 6011: else 6011: break; 6011: __s = this->do_put(__s, __io, __fill, __tm, __format, __mod); 6011: } 6011: else 6011: break; 6011: return __s; 6011: } 6011: 6011: template 6011: _OutIter 6011: time_put<_CharT, _OutIter>:: 6011: do_put(iter_type __s, ios_base& __io, char_type, const tm* __tm, 6011: char __format, char __mod) const 6011: { 6011: const locale& __loc = __io._M_getloc(); 6011: ctype<_CharT> const& __ctype = use_facet >(__loc); 6011: __timepunct<_CharT> const& __tp = use_facet<__timepunct<_CharT> >(__loc); 6011: 6011: 6011: 6011: const size_t __maxlen = 128; 6011: char_type __res[__maxlen]; 6011: 6011: 6011: 6011: 6011: 6011: 6011: char_type __fmt[4]; 6011: __fmt[0] = __ctype.widen('%'); 6011: if (!__mod) 6011: { 6011: __fmt[1] = __format; 6011: __fmt[2] = char_type(); 6011: } 6011: else 6011: { 6011: __fmt[1] = __mod; 6011: __fmt[2] = __format; 6011: __fmt[3] = char_type(); 6011: } 6011: 6011: __tp._M_put(__res, __maxlen, __fmt, __tm); 6011: 6011: 6011: return std::__write(__s, __res, char_traits::length(__res)); 6011: } 6011: 6011: 6011: 6011: 6011: 6011: extern template class moneypunct; 6011: extern template class moneypunct; 6011: extern template class moneypunct_byname; 6011: extern template class moneypunct_byname; 6011: extern template class __cxx11:: money_get; 6011: extern template class __cxx11:: money_put; 6011: extern template class __timepunct; 6011: extern template class time_put; 6011: extern template class time_put_byname; 6011: extern template class time_get; 6011: extern template class time_get_byname; 6011: extern template class messages; 6011: extern template class messages_byname; 6011: 6011: extern template 6011: const moneypunct& 6011: use_facet >(const locale&); 6011: 6011: extern template 6011: const moneypunct& 6011: use_facet >(const locale&); 6011: 6011: extern template 6011: const money_put& 6011: use_facet >(const locale&); 6011: 6011: extern template 6011: const money_get& 6011: use_facet >(const locale&); 6011: 6011: extern template 6011: const __timepunct& 6011: use_facet<__timepunct >(const locale&); 6011: 6011: extern template 6011: const time_put& 6011: use_facet >(const locale&); 6011: 6011: extern template 6011: const time_get& 6011: use_facet >(const locale&); 6011: 6011: extern template 6011: const messages& 6011: use_facet >(const locale&); 6011: 6011: extern template 6011: bool 6011: has_facet >(const locale&); 6011: 6011: extern template 6011: bool 6011: has_facet >(const locale&); 6011: 6011: extern template 6011: bool 6011: has_facet >(const locale&); 6011: 6011: extern template 6011: bool 6011: has_facet<__timepunct >(const locale&); 6011: 6011: extern template 6011: bool 6011: has_facet >(const locale&); 6011: 6011: extern template 6011: bool 6011: has_facet >(const locale&); 6011: 6011: extern template 6011: bool 6011: has_facet >(const locale&); 6011: 6011: 6011: extern template class moneypunct; 6011: extern template class moneypunct; 6011: extern template class moneypunct_byname; 6011: extern template class moneypunct_byname; 6011: extern template class __cxx11:: money_get; 6011: extern template class __cxx11:: money_put; 6011: extern template class __timepunct; 6011: extern template class time_put; 6011: extern template class time_put_byname; 6011: extern template class time_get; 6011: extern template class time_get_byname; 6011: extern template class messages; 6011: extern template class messages_byname; 6011: 6011: extern template 6011: const moneypunct& 6011: use_facet >(const locale&); 6011: 6011: extern template 6011: const moneypunct& 6011: use_facet >(const locale&); 6011: 6011: extern template 6011: const money_put& 6011: use_facet >(const locale&); 6011: 6011: extern template 6011: const money_get& 6011: use_facet >(const locale&); 6011: 6011: extern template 6011: const __timepunct& 6011: use_facet<__timepunct >(const locale&); 6011: 6011: extern template 6011: const time_put& 6011: use_facet >(const locale&); 6011: 6011: extern template 6011: const time_get& 6011: use_facet >(const locale&); 6011: 6011: extern template 6011: const messages& 6011: use_facet >(const locale&); 6011: 6011: extern template 6011: bool 6011: has_facet >(const locale&); 6011: 6011: extern template 6011: bool 6011: has_facet >(const locale&); 6011: 6011: extern template 6011: bool 6011: has_facet >(const locale&); 6011: 6011: extern template 6011: bool 6011: has_facet<__timepunct >(const locale&); 6011: 6011: extern template 6011: bool 6011: has_facet >(const locale&); 6011: 6011: extern template 6011: bool 6011: has_facet >(const locale&); 6011: 6011: extern template 6011: bool 6011: has_facet >(const locale&); 6011: 6011: 6011: 6011: 6011: } 6011: # 2016 "/usr/include/c++/8/bits/locale_facets_nonio.h" 2 3 6011: # 42 "/usr/include/c++/8/locale" 2 3 6011: 6011: # 1 "/usr/include/c++/8/bits/locale_conv.h" 1 3 6011: # 38 "/usr/include/c++/8/bits/locale_conv.h" 3 6011: # 1 "/usr/include/c++/8/bits/stringfwd.h" 1 3 6011: # 39 "/usr/include/c++/8/bits/locale_conv.h" 2 3 6011: # 1 "/usr/include/c++/8/bits/allocator.h" 1 3 6011: # 40 "/usr/include/c++/8/bits/locale_conv.h" 2 3 6011: # 1 "/usr/include/c++/8/bits/codecvt.h" 1 3 6011: # 41 "/usr/include/c++/8/bits/locale_conv.h" 2 3 6011: # 1 "/usr/include/c++/8/bits/unique_ptr.h" 1 3 6011: # 41 "/usr/include/c++/8/bits/unique_ptr.h" 3 6011: namespace std __attribute__ ((__visibility__ ("default"))) 6011: { 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: #pragma GCC diagnostic push 6011: #pragma GCC diagnostic ignored "-Wdeprecated-declarations" 6011: template class auto_ptr; 6011: #pragma GCC diagnostic pop 6011: 6011: 6011: 6011: template 6011: struct default_delete 6011: { 6011: 6011: constexpr default_delete() noexcept = default; 6011: 6011: 6011: 6011: 6011: 6011: 6011: template::value>::type> 6011: default_delete(const default_delete<_Up>&) noexcept { } 6011: 6011: 6011: void 6011: operator()(_Tp* __ptr) const 6011: { 6011: static_assert(!is_void<_Tp>::value, 6011: "can't delete pointer to incomplete type"); 6011: static_assert(sizeof(_Tp)>0, 6011: "can't delete pointer to incomplete type"); 6011: delete __ptr; 6011: } 6011: }; 6011: 6011: 6011: 6011: 6011: template 6011: struct default_delete<_Tp[]> 6011: { 6011: public: 6011: 6011: constexpr default_delete() noexcept = default; 6011: # 104 "/usr/include/c++/8/bits/unique_ptr.h" 3 6011: template::value>::type> 6011: default_delete(const default_delete<_Up[]>&) noexcept { } 6011: 6011: 6011: template 6011: typename enable_if::value>::type 6011: operator()(_Up* __ptr) const 6011: { 6011: static_assert(sizeof(_Tp)>0, 6011: "can't delete pointer to incomplete type"); 6011: delete [] __ptr; 6011: } 6011: }; 6011: 6011: template 6011: class __uniq_ptr_impl 6011: { 6011: template 6011: struct _Ptr 6011: { 6011: using type = _Up*; 6011: }; 6011: 6011: template 6011: struct 6011: _Ptr<_Up, _Ep, __void_t::type::pointer>> 6011: { 6011: using type = typename remove_reference<_Ep>::type::pointer; 6011: }; 6011: 6011: public: 6011: using _DeleterConstraint = enable_if< 6011: __and_<__not_>, 6011: is_default_constructible<_Dp>>::value>; 6011: 6011: using pointer = typename _Ptr<_Tp, _Dp>::type; 6011: 6011: __uniq_ptr_impl() = default; 6011: __uniq_ptr_impl(pointer __p) : _M_t() { _M_ptr() = __p; } 6011: 6011: template 6011: __uniq_ptr_impl(pointer __p, _Del&& __d) 6011: : _M_t(__p, std::forward<_Del>(__d)) { } 6011: 6011: pointer& _M_ptr() { return std::get<0>(_M_t); } 6011: pointer _M_ptr() const { return std::get<0>(_M_t); } 6011: _Dp& _M_deleter() { return std::get<1>(_M_t); } 6011: const _Dp& _M_deleter() const { return std::get<1>(_M_t); } 6011: 6011: private: 6011: tuple _M_t; 6011: }; 6011: 6011: 6011: template > 6011: class unique_ptr 6011: { 6011: template 6011: using _DeleterConstraint = 6011: typename __uniq_ptr_impl<_Tp, _Up>::_DeleterConstraint::type; 6011: 6011: __uniq_ptr_impl<_Tp, _Dp> _M_t; 6011: 6011: public: 6011: using pointer = typename __uniq_ptr_impl<_Tp, _Dp>::pointer; 6011: using element_type = _Tp; 6011: using deleter_type = _Dp; 6011: 6011: 6011: 6011: template 6011: using __safe_conversion_up = __and_< 6011: is_convertible::pointer, pointer>, 6011: __not_>, 6011: __or_<__and_, 6011: is_same>, 6011: __and_<__not_>, 6011: is_convertible<_Ep, deleter_type>> 6011: > 6011: >; 6011: 6011: 6011: 6011: 6011: template > 6011: constexpr unique_ptr() noexcept 6011: : _M_t() 6011: { } 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: template > 6011: explicit 6011: unique_ptr(pointer __p) noexcept 6011: : _M_t(__p) 6011: { } 6011: # 215 "/usr/include/c++/8/bits/unique_ptr.h" 3 6011: unique_ptr(pointer __p, 6011: typename conditional::value, 6011: deleter_type, const deleter_type&>::type __d) noexcept 6011: : _M_t(__p, __d) { } 6011: # 227 "/usr/include/c++/8/bits/unique_ptr.h" 3 6011: unique_ptr(pointer __p, 6011: typename remove_reference::type&& __d) noexcept 6011: : _M_t(std::move(__p), std::move(__d)) 6011: { static_assert(!std::is_reference::value, 6011: "rvalue deleter bound to reference"); } 6011: 6011: 6011: template > 6011: constexpr unique_ptr(nullptr_t) noexcept : unique_ptr() { } 6011: 6011: 6011: 6011: 6011: unique_ptr(unique_ptr&& __u) noexcept 6011: : _M_t(__u.release(), std::forward(__u.get_deleter())) { } 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: template, 6011: typename conditional::value, 6011: is_same<_Ep, _Dp>, 6011: is_convertible<_Ep, _Dp>>::type>> 6011: unique_ptr(unique_ptr<_Up, _Ep>&& __u) noexcept 6011: : _M_t(__u.release(), std::forward<_Ep>(__u.get_deleter())) 6011: { } 6011: 6011: 6011: #pragma GCC diagnostic push 6011: #pragma GCC diagnostic ignored "-Wdeprecated-declarations" 6011: 6011: template, is_same<_Dp, default_delete<_Tp>>>> 6011: unique_ptr(auto_ptr<_Up>&& __u) noexcept; 6011: #pragma GCC diagnostic pop 6011: 6011: 6011: 6011: ~unique_ptr() noexcept 6011: { 6011: auto& __ptr = _M_t._M_ptr(); 6011: if (__ptr != nullptr) 6011: get_deleter()(__ptr); 6011: __ptr = pointer(); 6011: } 6011: # 286 "/usr/include/c++/8/bits/unique_ptr.h" 3 6011: unique_ptr& 6011: operator=(unique_ptr&& __u) noexcept 6011: { 6011: reset(__u.release()); 6011: get_deleter() = std::forward(__u.get_deleter()); 6011: return *this; 6011: } 6011: # 301 "/usr/include/c++/8/bits/unique_ptr.h" 3 6011: template 6011: typename enable_if< __and_< 6011: __safe_conversion_up<_Up, _Ep>, 6011: is_assignable 6011: >::value, 6011: unique_ptr&>::type 6011: operator=(unique_ptr<_Up, _Ep>&& __u) noexcept 6011: { 6011: reset(__u.release()); 6011: get_deleter() = std::forward<_Ep>(__u.get_deleter()); 6011: return *this; 6011: } 6011: 6011: 6011: unique_ptr& 6011: operator=(nullptr_t) noexcept 6011: { 6011: reset(); 6011: return *this; 6011: } 6011: 6011: 6011: 6011: 6011: typename add_lvalue_reference::type 6011: operator*() const 6011: { 6011: ; 6011: return *get(); 6011: } 6011: 6011: 6011: pointer 6011: operator->() const noexcept 6011: { 6011: ; 6011: return get(); 6011: } 6011: 6011: 6011: pointer 6011: get() const noexcept 6011: { return _M_t._M_ptr(); } 6011: 6011: 6011: deleter_type& 6011: get_deleter() noexcept 6011: { return _M_t._M_deleter(); } 6011: 6011: 6011: const deleter_type& 6011: get_deleter() const noexcept 6011: { return _M_t._M_deleter(); } 6011: 6011: 6011: explicit operator bool() const noexcept 6011: { return get() == pointer() ? false : true; } 6011: 6011: 6011: 6011: 6011: pointer 6011: release() noexcept 6011: { 6011: pointer __p = get(); 6011: _M_t._M_ptr() = pointer(); 6011: return __p; 6011: } 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: void 6011: reset(pointer __p = pointer()) noexcept 6011: { 6011: using std::swap; 6011: swap(_M_t._M_ptr(), __p); 6011: if (__p != pointer()) 6011: get_deleter()(__p); 6011: } 6011: 6011: 6011: void 6011: swap(unique_ptr& __u) noexcept 6011: { 6011: using std::swap; 6011: swap(_M_t, __u._M_t); 6011: } 6011: 6011: 6011: unique_ptr(const unique_ptr&) = delete; 6011: unique_ptr& operator=(const unique_ptr&) = delete; 6011: }; 6011: 6011: 6011: 6011: 6011: 6011: template 6011: class unique_ptr<_Tp[], _Dp> 6011: { 6011: template 6011: using _DeleterConstraint = 6011: typename __uniq_ptr_impl<_Tp, _Up>::_DeleterConstraint::type; 6011: 6011: __uniq_ptr_impl<_Tp, _Dp> _M_t; 6011: 6011: template 6011: using __remove_cv = typename remove_cv<_Up>::type; 6011: 6011: 6011: template 6011: using __is_derived_Tp 6011: = __and_< is_base_of<_Tp, _Up>, 6011: __not_, __remove_cv<_Up>>> >; 6011: 6011: public: 6011: using pointer = typename __uniq_ptr_impl<_Tp, _Dp>::pointer; 6011: using element_type = _Tp; 6011: using deleter_type = _Dp; 6011: 6011: 6011: 6011: template, 6011: typename _Up_element_type = typename _Up_up::element_type> 6011: using __safe_conversion_up = __and_< 6011: is_array<_Up>, 6011: is_same, 6011: is_same, 6011: is_convertible<_Up_element_type(*)[], element_type(*)[]>, 6011: __or_<__and_, is_same>, 6011: __and_<__not_>, 6011: is_convertible<_Ep, deleter_type>>> 6011: >; 6011: 6011: 6011: template 6011: using __safe_conversion_raw = __and_< 6011: __or_<__or_, 6011: is_same<_Up, nullptr_t>>, 6011: __and_, 6011: is_same, 6011: is_convertible< 6011: typename remove_pointer<_Up>::type(*)[], 6011: element_type(*)[]> 6011: > 6011: > 6011: >; 6011: 6011: 6011: 6011: 6011: template > 6011: constexpr unique_ptr() noexcept 6011: : _M_t() 6011: { } 6011: # 470 "/usr/include/c++/8/bits/unique_ptr.h" 3 6011: template, 6011: typename = typename enable_if< 6011: __safe_conversion_raw<_Up>::value, bool>::type> 6011: explicit 6011: unique_ptr(_Up __p) noexcept 6011: : _M_t(__p) 6011: { } 6011: # 488 "/usr/include/c++/8/bits/unique_ptr.h" 3 6011: template::value, bool>::type> 6011: unique_ptr(_Up __p, 6011: typename conditional::value, 6011: deleter_type, const deleter_type&>::type __d) noexcept 6011: : _M_t(__p, __d) { } 6011: # 504 "/usr/include/c++/8/bits/unique_ptr.h" 3 6011: template::value, bool>::type> 6011: unique_ptr(_Up __p, typename 6011: remove_reference::type&& __d) noexcept 6011: : _M_t(std::move(__p), std::move(__d)) 6011: { static_assert(!is_reference::value, 6011: "rvalue deleter bound to reference"); } 6011: 6011: 6011: unique_ptr(unique_ptr&& __u) noexcept 6011: : _M_t(__u.release(), std::forward(__u.get_deleter())) { } 6011: 6011: 6011: template > 6011: constexpr unique_ptr(nullptr_t) noexcept : unique_ptr() { } 6011: 6011: template>> 6011: unique_ptr(unique_ptr<_Up, _Ep>&& __u) noexcept 6011: : _M_t(__u.release(), std::forward<_Ep>(__u.get_deleter())) 6011: { } 6011: 6011: 6011: ~unique_ptr() 6011: { 6011: auto& __ptr = _M_t._M_ptr(); 6011: if (__ptr != nullptr) 6011: get_deleter()(__ptr); 6011: __ptr = pointer(); 6011: } 6011: # 545 "/usr/include/c++/8/bits/unique_ptr.h" 3 6011: unique_ptr& 6011: operator=(unique_ptr&& __u) noexcept 6011: { 6011: reset(__u.release()); 6011: get_deleter() = std::forward(__u.get_deleter()); 6011: return *this; 6011: } 6011: # 560 "/usr/include/c++/8/bits/unique_ptr.h" 3 6011: template 6011: typename 6011: enable_if<__and_<__safe_conversion_up<_Up, _Ep>, 6011: is_assignable 6011: >::value, 6011: unique_ptr&>::type 6011: operator=(unique_ptr<_Up, _Ep>&& __u) noexcept 6011: { 6011: reset(__u.release()); 6011: get_deleter() = std::forward<_Ep>(__u.get_deleter()); 6011: return *this; 6011: } 6011: 6011: 6011: unique_ptr& 6011: operator=(nullptr_t) noexcept 6011: { 6011: reset(); 6011: return *this; 6011: } 6011: 6011: 6011: 6011: 6011: typename std::add_lvalue_reference::type 6011: operator[](size_t __i) const 6011: { 6011: ; 6011: return get()[__i]; 6011: } 6011: 6011: 6011: pointer 6011: get() const noexcept 6011: { return _M_t._M_ptr(); } 6011: 6011: 6011: deleter_type& 6011: get_deleter() noexcept 6011: { return _M_t._M_deleter(); } 6011: 6011: 6011: const deleter_type& 6011: get_deleter() const noexcept 6011: { return _M_t._M_deleter(); } 6011: 6011: 6011: explicit operator bool() const noexcept 6011: { return get() == pointer() ? false : true; } 6011: 6011: 6011: 6011: 6011: pointer 6011: release() noexcept 6011: { 6011: pointer __p = get(); 6011: _M_t._M_ptr() = pointer(); 6011: return __p; 6011: } 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: template , 6011: __and_, 6011: is_pointer<_Up>, 6011: is_convertible< 6011: typename remove_pointer<_Up>::type(*)[], 6011: element_type(*)[] 6011: > 6011: > 6011: > 6011: >> 6011: void 6011: reset(_Up __p) noexcept 6011: { 6011: pointer __ptr = __p; 6011: using std::swap; 6011: swap(_M_t._M_ptr(), __ptr); 6011: if (__ptr != nullptr) 6011: get_deleter()(__ptr); 6011: } 6011: 6011: void reset(nullptr_t = nullptr) noexcept 6011: { 6011: reset(pointer()); 6011: } 6011: 6011: 6011: void 6011: swap(unique_ptr& __u) noexcept 6011: { 6011: using std::swap; 6011: swap(_M_t, __u._M_t); 6011: } 6011: 6011: 6011: unique_ptr(const unique_ptr&) = delete; 6011: unique_ptr& operator=(const unique_ptr&) = delete; 6011: }; 6011: 6011: template 6011: inline 6011: 6011: 6011: typename enable_if<__is_swappable<_Dp>::value>::type 6011: 6011: 6011: 6011: swap(unique_ptr<_Tp, _Dp>& __x, 6011: unique_ptr<_Tp, _Dp>& __y) noexcept 6011: { __x.swap(__y); } 6011: 6011: 6011: template 6011: typename enable_if::value>::type 6011: swap(unique_ptr<_Tp, _Dp>&, 6011: unique_ptr<_Tp, _Dp>&) = delete; 6011: 6011: 6011: template 6011: inline bool 6011: operator==(const unique_ptr<_Tp, _Dp>& __x, 6011: const unique_ptr<_Up, _Ep>& __y) 6011: { return __x.get() == __y.get(); } 6011: 6011: template 6011: inline bool 6011: operator==(const unique_ptr<_Tp, _Dp>& __x, nullptr_t) noexcept 6011: { return !__x; } 6011: 6011: template 6011: inline bool 6011: operator==(nullptr_t, const unique_ptr<_Tp, _Dp>& __x) noexcept 6011: { return !__x; } 6011: 6011: template 6011: inline bool 6011: operator!=(const unique_ptr<_Tp, _Dp>& __x, 6011: const unique_ptr<_Up, _Ep>& __y) 6011: { return __x.get() != __y.get(); } 6011: 6011: template 6011: inline bool 6011: operator!=(const unique_ptr<_Tp, _Dp>& __x, nullptr_t) noexcept 6011: { return (bool)__x; } 6011: 6011: template 6011: inline bool 6011: operator!=(nullptr_t, const unique_ptr<_Tp, _Dp>& __x) noexcept 6011: { return (bool)__x; } 6011: 6011: template 6011: inline bool 6011: operator<(const unique_ptr<_Tp, _Dp>& __x, 6011: const unique_ptr<_Up, _Ep>& __y) 6011: { 6011: typedef typename 6011: std::common_type::pointer, 6011: typename unique_ptr<_Up, _Ep>::pointer>::type _CT; 6011: return std::less<_CT>()(__x.get(), __y.get()); 6011: } 6011: 6011: template 6011: inline bool 6011: operator<(const unique_ptr<_Tp, _Dp>& __x, nullptr_t) 6011: { return std::less::pointer>()(__x.get(), 6011: nullptr); } 6011: 6011: template 6011: inline bool 6011: operator<(nullptr_t, const unique_ptr<_Tp, _Dp>& __x) 6011: { return std::less::pointer>()(nullptr, 6011: __x.get()); } 6011: 6011: template 6011: inline bool 6011: operator<=(const unique_ptr<_Tp, _Dp>& __x, 6011: const unique_ptr<_Up, _Ep>& __y) 6011: { return !(__y < __x); } 6011: 6011: template 6011: inline bool 6011: operator<=(const unique_ptr<_Tp, _Dp>& __x, nullptr_t) 6011: { return !(nullptr < __x); } 6011: 6011: template 6011: inline bool 6011: operator<=(nullptr_t, const unique_ptr<_Tp, _Dp>& __x) 6011: { return !(__x < nullptr); } 6011: 6011: template 6011: inline bool 6011: operator>(const unique_ptr<_Tp, _Dp>& __x, 6011: const unique_ptr<_Up, _Ep>& __y) 6011: { return (__y < __x); } 6011: 6011: template 6011: inline bool 6011: operator>(const unique_ptr<_Tp, _Dp>& __x, nullptr_t) 6011: { return std::less::pointer>()(nullptr, 6011: __x.get()); } 6011: 6011: template 6011: inline bool 6011: operator>(nullptr_t, const unique_ptr<_Tp, _Dp>& __x) 6011: { return std::less::pointer>()(__x.get(), 6011: nullptr); } 6011: 6011: template 6011: inline bool 6011: operator>=(const unique_ptr<_Tp, _Dp>& __x, 6011: const unique_ptr<_Up, _Ep>& __y) 6011: { return !(__x < __y); } 6011: 6011: template 6011: inline bool 6011: operator>=(const unique_ptr<_Tp, _Dp>& __x, nullptr_t) 6011: { return !(__x < nullptr); } 6011: 6011: template 6011: inline bool 6011: operator>=(nullptr_t, const unique_ptr<_Tp, _Dp>& __x) 6011: { return !(nullptr < __x); } 6011: 6011: 6011: template 6011: struct hash> 6011: : public __hash_base>, 6011: private __poison_hash::pointer> 6011: { 6011: size_t 6011: operator()(const unique_ptr<_Tp, _Dp>& __u) const noexcept 6011: { 6011: typedef unique_ptr<_Tp, _Dp> _UP; 6011: return std::hash()(__u.get()); 6011: } 6011: }; 6011: # 847 "/usr/include/c++/8/bits/unique_ptr.h" 3 6011: 6011: } 6011: # 42 "/usr/include/c++/8/bits/locale_conv.h" 2 3 6011: 6011: namespace std __attribute__ ((__visibility__ ("default"))) 6011: { 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: template 6011: bool 6011: __do_str_codecvt(const _InChar* __first, const _InChar* __last, 6011: _OutStr& __outstr, const _Codecvt& __cvt, _State& __state, 6011: size_t& __count, _Fn __fn) 6011: { 6011: if (__first == __last) 6011: { 6011: __outstr.clear(); 6011: __count = 0; 6011: return true; 6011: } 6011: 6011: size_t __outchars = 0; 6011: auto __next = __first; 6011: const auto __maxlen = __cvt.max_length() + 1; 6011: 6011: codecvt_base::result __result; 6011: do 6011: { 6011: __outstr.resize(__outstr.size() + (__last - __next) * __maxlen); 6011: auto __outnext = &__outstr.front() + __outchars; 6011: auto const __outlast = &__outstr.back() + 1; 6011: __result = (__cvt.*__fn)(__state, __next, __last, __next, 6011: __outnext, __outlast, __outnext); 6011: __outchars = __outnext - &__outstr.front(); 6011: } 6011: while (__result == codecvt_base::partial && __next != __last 6011: && (__outstr.size() - __outchars) < __maxlen); 6011: 6011: if (__result == codecvt_base::error) 6011: { 6011: __count = __next - __first; 6011: return false; 6011: } 6011: 6011: if (__result == codecvt_base::noconv) 6011: { 6011: __outstr.assign(__first, __last); 6011: __count = __last - __first; 6011: } 6011: else 6011: { 6011: __outstr.resize(__outchars); 6011: __count = __next - __first; 6011: } 6011: 6011: return true; 6011: } 6011: 6011: 6011: template 6011: inline bool 6011: __str_codecvt_in(const char* __first, const char* __last, 6011: basic_string<_CharT, _Traits, _Alloc>& __outstr, 6011: const codecvt<_CharT, char, _State>& __cvt, 6011: _State& __state, size_t& __count) 6011: { 6011: using _Codecvt = codecvt<_CharT, char, _State>; 6011: using _ConvFn 6011: = codecvt_base::result 6011: (_Codecvt::*)(_State&, const char*, const char*, const char*&, 6011: _CharT*, _CharT*, _CharT*&) const; 6011: _ConvFn __fn = &codecvt<_CharT, char, _State>::in; 6011: return __do_str_codecvt(__first, __last, __outstr, __cvt, __state, 6011: __count, __fn); 6011: } 6011: 6011: template 6011: inline bool 6011: __str_codecvt_in(const char* __first, const char* __last, 6011: basic_string<_CharT, _Traits, _Alloc>& __outstr, 6011: const codecvt<_CharT, char, _State>& __cvt) 6011: { 6011: _State __state = {}; 6011: size_t __n; 6011: return __str_codecvt_in(__first, __last, __outstr, __cvt, __state, __n); 6011: } 6011: 6011: 6011: template 6011: inline bool 6011: __str_codecvt_out(const _CharT* __first, const _CharT* __last, 6011: basic_string& __outstr, 6011: const codecvt<_CharT, char, _State>& __cvt, 6011: _State& __state, size_t& __count) 6011: { 6011: using _Codecvt = codecvt<_CharT, char, _State>; 6011: using _ConvFn 6011: = codecvt_base::result 6011: (_Codecvt::*)(_State&, const _CharT*, const _CharT*, const _CharT*&, 6011: char*, char*, char*&) const; 6011: _ConvFn __fn = &codecvt<_CharT, char, _State>::out; 6011: return __do_str_codecvt(__first, __last, __outstr, __cvt, __state, 6011: __count, __fn); 6011: } 6011: 6011: template 6011: inline bool 6011: __str_codecvt_out(const _CharT* __first, const _CharT* __last, 6011: basic_string& __outstr, 6011: const codecvt<_CharT, char, _State>& __cvt) 6011: { 6011: _State __state = {}; 6011: size_t __n; 6011: return __str_codecvt_out(__first, __last, __outstr, __cvt, __state, __n); 6011: } 6011: 6011: 6011: 6011: namespace __cxx11 { 6011: 6011: 6011: template, 6011: typename _Byte_alloc = allocator> 6011: class wstring_convert 6011: { 6011: public: 6011: typedef basic_string, _Byte_alloc> byte_string; 6011: typedef basic_string<_Elem, char_traits<_Elem>, _Wide_alloc> wide_string; 6011: typedef typename _Codecvt::state_type state_type; 6011: typedef typename wide_string::traits_type::int_type int_type; 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: explicit 6011: wstring_convert(_Codecvt* __pcvt = new _Codecvt()) : _M_cvt(__pcvt) 6011: { 6011: if (!_M_cvt) 6011: __throw_logic_error("wstring_convert"); 6011: } 6011: # 198 "/usr/include/c++/8/bits/locale_conv.h" 3 6011: wstring_convert(_Codecvt* __pcvt, state_type __state) 6011: : _M_cvt(__pcvt), _M_state(__state), _M_with_cvtstate(true) 6011: { 6011: if (!_M_cvt) 6011: __throw_logic_error("wstring_convert"); 6011: } 6011: 6011: 6011: 6011: 6011: 6011: 6011: explicit 6011: wstring_convert(const byte_string& __byte_err, 6011: const wide_string& __wide_err = wide_string()) 6011: : _M_cvt(new _Codecvt), 6011: _M_byte_err_string(__byte_err), _M_wide_err_string(__wide_err), 6011: _M_with_strings(true) 6011: { 6011: if (!_M_cvt) 6011: __throw_logic_error("wstring_convert"); 6011: } 6011: 6011: ~wstring_convert() = default; 6011: 6011: 6011: 6011: wstring_convert(const wstring_convert&) = delete; 6011: wstring_convert& operator=(const wstring_convert&) = delete; 6011: 6011: 6011: wide_string 6011: from_bytes(char __byte) 6011: { 6011: char __bytes[2] = { __byte }; 6011: return from_bytes(__bytes, __bytes+1); 6011: } 6011: 6011: wide_string 6011: from_bytes(const char* __ptr) 6011: { return from_bytes(__ptr, __ptr+char_traits::length(__ptr)); } 6011: 6011: wide_string 6011: from_bytes(const byte_string& __str) 6011: { 6011: auto __ptr = __str.data(); 6011: return from_bytes(__ptr, __ptr + __str.size()); 6011: } 6011: 6011: wide_string 6011: from_bytes(const char* __first, const char* __last) 6011: { 6011: if (!_M_with_cvtstate) 6011: _M_state = state_type(); 6011: wide_string __out{ _M_wide_err_string.get_allocator() }; 6011: if (__str_codecvt_in(__first, __last, __out, *_M_cvt, _M_state, 6011: _M_count)) 6011: return __out; 6011: if (_M_with_strings) 6011: return _M_wide_err_string; 6011: __throw_range_error("wstring_convert::from_bytes"); 6011: } 6011: 6011: 6011: 6011: byte_string 6011: to_bytes(_Elem __wchar) 6011: { 6011: _Elem __wchars[2] = { __wchar }; 6011: return to_bytes(__wchars, __wchars+1); 6011: } 6011: 6011: byte_string 6011: to_bytes(const _Elem* __ptr) 6011: { 6011: return to_bytes(__ptr, __ptr+wide_string::traits_type::length(__ptr)); 6011: } 6011: 6011: byte_string 6011: to_bytes(const wide_string& __wstr) 6011: { 6011: auto __ptr = __wstr.data(); 6011: return to_bytes(__ptr, __ptr + __wstr.size()); 6011: } 6011: 6011: byte_string 6011: to_bytes(const _Elem* __first, const _Elem* __last) 6011: { 6011: if (!_M_with_cvtstate) 6011: _M_state = state_type(); 6011: byte_string __out{ _M_byte_err_string.get_allocator() }; 6011: if (__str_codecvt_out(__first, __last, __out, *_M_cvt, _M_state, 6011: _M_count)) 6011: return __out; 6011: if (_M_with_strings) 6011: return _M_byte_err_string; 6011: __throw_range_error("wstring_convert::to_bytes"); 6011: } 6011: 6011: 6011: 6011: 6011: 6011: size_t converted() const noexcept { return _M_count; } 6011: 6011: 6011: state_type state() const { return _M_state; } 6011: 6011: private: 6011: unique_ptr<_Codecvt> _M_cvt; 6011: byte_string _M_byte_err_string; 6011: wide_string _M_wide_err_string; 6011: state_type _M_state = state_type(); 6011: size_t _M_count = 0; 6011: bool _M_with_cvtstate = false; 6011: bool _M_with_strings = false; 6011: }; 6011: 6011: } 6011: 6011: 6011: template> 6011: class wbuffer_convert : public basic_streambuf<_Elem, _Tr> 6011: { 6011: typedef basic_streambuf<_Elem, _Tr> _Wide_streambuf; 6011: 6011: public: 6011: typedef typename _Codecvt::state_type state_type; 6011: # 336 "/usr/include/c++/8/bits/locale_conv.h" 3 6011: explicit 6011: wbuffer_convert(streambuf* __bytebuf = 0, _Codecvt* __pcvt = new _Codecvt, 6011: state_type __state = state_type()) 6011: : _M_buf(__bytebuf), _M_cvt(__pcvt), _M_state(__state) 6011: { 6011: if (!_M_cvt) 6011: __throw_logic_error("wbuffer_convert"); 6011: 6011: _M_always_noconv = _M_cvt->always_noconv(); 6011: 6011: if (_M_buf) 6011: { 6011: this->setp(_M_put_area, _M_put_area + _S_buffer_length); 6011: this->setg(_M_get_area + _S_putback_length, 6011: _M_get_area + _S_putback_length, 6011: _M_get_area + _S_putback_length); 6011: } 6011: } 6011: 6011: ~wbuffer_convert() = default; 6011: 6011: 6011: 6011: wbuffer_convert(const wbuffer_convert&) = delete; 6011: wbuffer_convert& operator=(const wbuffer_convert&) = delete; 6011: 6011: streambuf* rdbuf() const noexcept { return _M_buf; } 6011: 6011: streambuf* 6011: rdbuf(streambuf *__bytebuf) noexcept 6011: { 6011: auto __prev = _M_buf; 6011: _M_buf = __bytebuf; 6011: return __prev; 6011: } 6011: 6011: 6011: state_type state() const noexcept { return _M_state; } 6011: 6011: protected: 6011: int 6011: sync() 6011: { return _M_buf && _M_conv_put() && !_M_buf->pubsync() ? 0 : -1; } 6011: 6011: typename _Wide_streambuf::int_type 6011: overflow(typename _Wide_streambuf::int_type __out) 6011: { 6011: if (!_M_buf || !_M_conv_put()) 6011: return _Tr::eof(); 6011: else if (!_Tr::eq_int_type(__out, _Tr::eof())) 6011: return this->sputc(__out); 6011: return _Tr::not_eof(__out); 6011: } 6011: 6011: typename _Wide_streambuf::int_type 6011: underflow() 6011: { 6011: if (!_M_buf) 6011: return _Tr::eof(); 6011: 6011: if (this->gptr() < this->egptr() || (_M_buf && _M_conv_get())) 6011: return _Tr::to_int_type(*this->gptr()); 6011: else 6011: return _Tr::eof(); 6011: } 6011: 6011: streamsize 6011: xsputn(const typename _Wide_streambuf::char_type* __s, streamsize __n) 6011: { 6011: if (!_M_buf || __n == 0) 6011: return 0; 6011: streamsize __done = 0; 6011: do 6011: { 6011: auto __nn = std::min(this->epptr() - this->pptr(), 6011: __n - __done); 6011: _Tr::copy(this->pptr(), __s + __done, __nn); 6011: this->pbump(__nn); 6011: __done += __nn; 6011: } while (__done < __n && _M_conv_put()); 6011: return __done; 6011: } 6011: 6011: private: 6011: 6011: bool 6011: _M_conv_get() 6011: { 6011: const streamsize __pb1 = this->gptr() - this->eback(); 6011: const streamsize __pb2 = _S_putback_length; 6011: const streamsize __npb = std::min(__pb1, __pb2); 6011: 6011: _Tr::move(_M_get_area + _S_putback_length - __npb, 6011: this->gptr() - __npb, __npb); 6011: 6011: streamsize __nbytes = sizeof(_M_get_buf) - _M_unconv; 6011: __nbytes = std::min(__nbytes, _M_buf->in_avail()); 6011: if (__nbytes < 1) 6011: __nbytes = 1; 6011: __nbytes = _M_buf->sgetn(_M_get_buf + _M_unconv, __nbytes); 6011: if (__nbytes < 1) 6011: return false; 6011: __nbytes += _M_unconv; 6011: 6011: 6011: 6011: _Elem* __outbuf = _M_get_area + _S_putback_length; 6011: _Elem* __outnext = __outbuf; 6011: const char* __bnext = _M_get_buf; 6011: 6011: codecvt_base::result __result; 6011: if (_M_always_noconv) 6011: __result = codecvt_base::noconv; 6011: else 6011: { 6011: _Elem* __outend = _M_get_area + _S_buffer_length; 6011: 6011: __result = _M_cvt->in(_M_state, 6011: __bnext, __bnext + __nbytes, __bnext, 6011: __outbuf, __outend, __outnext); 6011: } 6011: 6011: if (__result == codecvt_base::noconv) 6011: { 6011: 6011: auto __get_buf = reinterpret_cast(_M_get_buf); 6011: _Tr::copy(__outbuf, __get_buf, __nbytes); 6011: _M_unconv = 0; 6011: return true; 6011: } 6011: 6011: if ((_M_unconv = _M_get_buf + __nbytes - __bnext)) 6011: char_traits::move(_M_get_buf, __bnext, _M_unconv); 6011: 6011: this->setg(__outbuf, __outbuf, __outnext); 6011: 6011: return __result != codecvt_base::error; 6011: } 6011: 6011: 6011: bool 6011: _M_put(...) 6011: { return false; } 6011: 6011: bool 6011: _M_put(const char* __p, streamsize __n) 6011: { 6011: if (_M_buf->sputn(__p, __n) < __n) 6011: return false; 6011: return true; 6011: } 6011: 6011: 6011: bool 6011: _M_conv_put() 6011: { 6011: _Elem* const __first = this->pbase(); 6011: const _Elem* const __last = this->pptr(); 6011: const streamsize __pending = __last - __first; 6011: 6011: if (_M_always_noconv) 6011: return _M_put(__first, __pending); 6011: 6011: char __outbuf[2 * _S_buffer_length]; 6011: 6011: const _Elem* __next = __first; 6011: const _Elem* __start; 6011: do 6011: { 6011: __start = __next; 6011: char* __outnext = __outbuf; 6011: char* const __outlast = __outbuf + sizeof(__outbuf); 6011: auto __result = _M_cvt->out(_M_state, __next, __last, __next, 6011: __outnext, __outlast, __outnext); 6011: if (__result == codecvt_base::error) 6011: return false; 6011: else if (__result == codecvt_base::noconv) 6011: return _M_put(__next, __pending); 6011: 6011: if (!_M_put(__outbuf, __outnext - __outbuf)) 6011: return false; 6011: } 6011: while (__next != __last && __next != __start); 6011: 6011: if (__next != __last) 6011: _Tr::move(__first, __next, __last - __next); 6011: 6011: this->pbump(__first - __next); 6011: return __next != __first; 6011: } 6011: 6011: streambuf* _M_buf; 6011: unique_ptr<_Codecvt> _M_cvt; 6011: state_type _M_state; 6011: 6011: static const streamsize _S_buffer_length = 32; 6011: static const streamsize _S_putback_length = 3; 6011: _Elem _M_put_area[_S_buffer_length]; 6011: _Elem _M_get_area[_S_buffer_length]; 6011: streamsize _M_unconv = 0; 6011: char _M_get_buf[_S_buffer_length-_S_putback_length]; 6011: bool _M_always_noconv; 6011: }; 6011: 6011: 6011: 6011: 6011: 6011: 6011: } 6011: # 44 "/usr/include/c++/8/locale" 2 3 6011: # 7 "unicode.hh" 2 6011: 6011: 6011: 6011: 6011: # 10 "unicode.hh" 6011: namespace Kakoune 6011: { 6011: 6011: using Codepoint = char32_t; 6011: 6011: inline bool is_eol(Codepoint c) 6011: { 6011: return c == '\n'; 6011: } 6011: 6011: inline bool is_horizontal_blank(Codepoint c) 6011: { 6011: return c == ' ' or c == '\t'; 6011: } 6011: 6011: inline bool is_blank(Codepoint c) 6011: { 6011: return c == ' ' or c == '\t' or c == '\n'; 6011: } 6011: 6011: enum WordType { Word, WORD }; 6011: 6011: template 6011: inline bool is_word(Codepoint c) 6011: { 6011: return c == '_' or iswalnum((wchar_t)c); 6011: } 6011: 6011: template<> 6011: inline bool is_word(Codepoint c) 6011: { 6011: return not is_horizontal_blank(c) and not is_eol(c); 6011: } 6011: 6011: inline bool is_punctuation(Codepoint c) 6011: { 6011: return not (is_word(c) or is_horizontal_blank(c) or is_eol(c)); 6011: } 6011: 6011: inline bool is_basic_alpha(Codepoint c) 6011: { 6011: return (c >= 'a' and c <= 'z') or (c >= 'A' and c <= 'Z'); 6011: } 6011: 6011: inline ColumnCount codepoint_width(Codepoint c) 6011: { 6011: return c == '\n' ? 1 : wcwidth((wchar_t)c); 6011: } 6011: 6011: enum class CharCategories 6011: { 6011: Blank, 6011: EndOfLine, 6011: Word, 6011: Punctuation, 6011: }; 6011: 6011: template 6011: inline CharCategories categorize(Codepoint c) 6011: { 6011: if (is_eol(c)) 6011: return CharCategories::EndOfLine; 6011: if (is_horizontal_blank(c)) 6011: return CharCategories::Blank; 6011: if (word_type == WORD or is_word(c)) 6011: return CharCategories::Word; 6011: return CharCategories::Punctuation; 6011: } 6011: 6011: inline Codepoint to_lower(Codepoint cp) { return towlower((wchar_t)cp); } 6011: inline Codepoint to_upper(Codepoint cp) { return towupper((wchar_t)cp); } 6011: 6011: inline char to_lower(char c) { return c >= 'A' and c <= 'Z' ? c - 'A' + 'a' : c; } 6011: inline char to_upper(char c) { return c >= 'a' and c <= 'z' ? c - 'a' + 'A' : c; } 6011: 6011: } 6011: # 9 "keys.hh" 2 6011: # 1 "vector.hh" 1 6011: 6011: 6011: 6011: # 1 "memory.hh" 1 6011: # 10 "memory.hh" 6011: namespace Kakoune 6011: { 6011: 6011: enum class MemoryDomain 6011: { 6011: Undefined, 6011: String, 6011: SharedString, 6011: BufferContent, 6011: BufferMeta, 6011: Options, 6011: Highlight, 6011: Display, 6011: Mapping, 6011: Commands, 6011: Hooks, 6011: Aliases, 6011: EnvVars, 6011: Faces, 6011: Values, 6011: Registers, 6011: Client, 6011: WordDB, 6011: Selections, 6011: History, 6011: Remote, 6011: Events, 6011: Completion, 6011: Count 6011: }; 6011: 6011: inline const char* domain_name(MemoryDomain domain) 6011: { 6011: switch (domain) 6011: { 6011: case MemoryDomain::Undefined: return "Undefined"; 6011: case MemoryDomain::String: return "String"; 6011: case MemoryDomain::SharedString: return "SharedString"; 6011: case MemoryDomain::BufferContent: return "BufferContent"; 6011: case MemoryDomain::BufferMeta: return "BufferMeta"; 6011: case MemoryDomain::Options: return "Options"; 6011: case MemoryDomain::Highlight: return "Highlight"; 6011: case MemoryDomain::Display: return "Display"; 6011: case MemoryDomain::Mapping: return "Mapping"; 6011: case MemoryDomain::Commands: return "Commands"; 6011: case MemoryDomain::Hooks: return "Hooks"; 6011: case MemoryDomain::WordDB: return "WordDB"; 6011: case MemoryDomain::Aliases: return "Aliases"; 6011: case MemoryDomain::EnvVars: return "EnvVars"; 6011: case MemoryDomain::Faces: return "Faces"; 6011: case MemoryDomain::Values: return "Values"; 6011: case MemoryDomain::Registers: return "Registers"; 6011: case MemoryDomain::Client: return "Client"; 6011: case MemoryDomain::Selections: return "Selections"; 6011: case MemoryDomain::History: return "History"; 6011: case MemoryDomain::Remote: return "Remote"; 6011: case MemoryDomain::Events: return "Events"; 6011: case MemoryDomain::Completion: return "Completion"; 6011: case MemoryDomain::Count: break; 6011: } 6011: if (not (false)) on_assert_failed("assert failed \"" "false" "\" at " "memory.hh" ":" "70"); 6011: return ""; 6011: } 6011: 6011: extern size_t domain_allocated_bytes[(size_t)MemoryDomain::Count]; 6011: 6011: inline void on_alloc(MemoryDomain domain, size_t size) 6011: { 6011: domain_allocated_bytes[(int)domain] += size; 6011: } 6011: 6011: inline void on_dealloc(MemoryDomain domain, size_t size) 6011: { 6011: if (not (domain_allocated_bytes[(int)domain] >= size)) on_assert_failed("assert failed \"" "domain_allocated_bytes[(int)domain] >= size" "\" at " "memory.hh" ":" "83"); 6011: domain_allocated_bytes[(int)domain] -= size; 6011: } 6011: 6011: template 6011: struct Allocator 6011: { 6011: using value_type = T; 6011: 6011: using pointer = T*; 6011: using const_pointer = const T*; 6011: using reference = T&; 6011: using const_reference = const T&; 6011: using size_type = std::size_t; 6011: using difference_type = std::ptrdiff_t; 6011: 6011: Allocator() = default; 6011: template 6011: Allocator(const Allocator&) {} 6011: 6011: template 6011: struct rebind { using other = Allocator; }; 6011: 6011: T* allocate(size_t n) 6011: { 6011: size_t size = sizeof(T) * n; 6011: on_alloc(domain, size); 6011: return reinterpret_cast(::operator new(size)); 6011: } 6011: 6011: void deallocate(T* ptr, size_t n) 6011: { 6011: size_t size = sizeof(T) * n; 6011: on_dealloc(domain, size); 6011: ::operator delete(ptr); 6011: } 6011: 6011: template 6011: [[gnu::always_inline]] 6011: void construct(U* p, Args&&... args) 6011: { 6011: new ((void*)p) U(std::forward(args)...); 6011: } 6011: 6011: template 6011: [[gnu::always_inline]] 6011: void destroy(U* p) { p->~U(); } 6011: }; 6011: 6011: template 6011: bool operator==(const Allocator& lhs, const Allocator& rhs) 6011: { 6011: return d1 == d2; 6011: } 6011: 6011: template 6011: bool operator!=(const Allocator& lhs, const Allocator& rhs) 6011: { 6011: return d1 != d2; 6011: } 6011: 6011: template 6011: struct TypeDomain 6011: { 6011: static constexpr MemoryDomain domain() { return TypeDomain::helper((T*)nullptr); } 6011: private: 6011: template static decltype(U::Domain) constexpr helper(U*) { return U::Domain; } 6011: static constexpr MemoryDomain helper(...) { return MemoryDomain::Undefined; } 6011: }; 6011: 6011: template 6011: struct UseMemoryDomain 6011: { 6011: static constexpr MemoryDomain Domain = d; 6011: static void* operator new(size_t size) 6011: { 6011: on_alloc(Domain, size); 6011: return ::operator new(size); 6011: } 6011: 6011: static void* operator new(size_t size, void* ptr) 6011: { 6011: return ::operator new(size, ptr); 6011: } 6011: 6011: static void operator delete(void* ptr, size_t size) 6011: { 6011: on_dealloc(Domain, size); 6011: ::operator delete(ptr); 6011: } 6011: }; 6011: 6011: } 6011: # 5 "vector.hh" 2 6011: 6011: 6011: 6011: namespace Kakoune 6011: { 6011: 6011: template::domain()> 6011: using Vector = std::vector>; 6011: 6011: } 6011: # 10 "keys.hh" 2 6011: 6011: namespace Kakoune 6011: { 6011: 6011: struct Key 6011: { 6011: enum class Modifiers : int 6011: { 6011: None = 0, 6011: Control = 1 << 0, 6011: Alt = 1 << 1, 6011: ControlAlt = Control | Alt, 6011: 6011: MousePress = 1 << 2, 6011: MouseRelease = 1 << 3, 6011: MousePos = 1 << 4, 6011: MouseWheelDown = 1 << 5, 6011: MouseWheelUp = 1 << 6, 6011: MouseEvent = MousePress | MouseRelease | MousePos | 6011: MouseWheelDown | MouseWheelUp, 6011: 6011: Resize = 1 << 7, 6011: }; 6011: enum NamedKey : Codepoint 6011: { 6011: 6011: Backspace = 0xD800, 6011: Delete, 6011: Escape, 6011: Return, 6011: Up, 6011: Down, 6011: Left, 6011: Right, 6011: PageUp, 6011: PageDown, 6011: Home, 6011: End, 6011: Tab, 6011: BackTab, 6011: F1, 6011: F2, 6011: F3, 6011: F4, 6011: F5, 6011: F6, 6011: F7, 6011: F8, 6011: F9, 6011: F10, 6011: F11, 6011: F12, 6011: FocusIn, 6011: FocusOut, 6011: Invalid, 6011: }; 6011: 6011: Modifiers modifiers; 6011: Codepoint key; 6011: 6011: constexpr Key(Modifiers modifiers, Codepoint key) 6011: : modifiers(modifiers), key(key) {} 6011: 6011: constexpr Key(Codepoint key) 6011: : modifiers(Modifiers::None), key(key) {} 6011: 6011: constexpr uint64_t val() const { return (uint64_t)modifiers << 32 | key; } 6011: 6011: constexpr bool operator==(Key other) const { return val() == other.val(); } 6011: constexpr bool operator!=(Key other) const { return val() != other.val(); } 6011: constexpr bool operator<(Key other) const { return val() < other.val(); } 6011: 6011: constexpr DisplayCoord coord() const { return {(int)((key & 0xFFFF0000) >> 16), (int)(key & 0x0000FFFF)}; } 6011: 6011: Optional codepoint() const; 6011: }; 6011: 6011: template<> struct WithBitOps : std::true_type {}; 6011: 6011: using KeyList = Vector; 6011: 6011: class String; 6011: class StringView; 6011: 6011: KeyList parse_keys(StringView str); 6011: String key_to_str(Key key); 6011: 6011: constexpr Key alt(Codepoint key) { return { Key::Modifiers::Alt, key }; } 6011: constexpr Key ctrl(Codepoint key) { return { Key::Modifiers::Control, key }; } 6011: constexpr Key ctrlalt(Codepoint key) { return { Key::Modifiers::ControlAlt, key }; } 6011: 6011: constexpr Codepoint encode_coord(DisplayCoord coord) { return (Codepoint)(((int)coord.line << 16) | ((int)coord.column & 0x0000FFFF)); } 6011: 6011: constexpr Key resize(DisplayCoord dim) { return { Key::Modifiers::Resize, encode_coord(dim) }; } 6011: 6011: inline size_t hash_value(const Key& key) { return hash_values(key.modifiers, key.key); } 6011: 6011: } 6011: # 6 "normal.hh" 2 6011: # 1 "string.hh" 1 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: # 1 "utf8.hh" 1 6011: # 10 "utf8.hh" 6011: namespace Kakoune 6011: { 6011: 6011: namespace utf8 6011: { 6011: 6011: template 6011: [[gnu::always_inline]] 6011: inline char read(Iterator& it) { char c = *it; ++it; return c; } 6011: 6011: 6011: 6011: [[gnu::always_inline]] 6011: inline bool is_character_start(char c) 6011: { 6011: return (c & 0xC0) != 0x80; 6011: } 6011: 6011: namespace InvalidPolicy 6011: { 6011: 6011: struct Assert 6011: { 6011: Codepoint operator()(Codepoint cp) const { if (not (false)) on_assert_failed("assert failed \"" "false" "\" at " "utf8.hh" ":" "33"); return cp; } 6011: }; 6011: 6011: struct Pass 6011: { 6011: Codepoint operator()(Codepoint cp) const { return cp; } 6011: }; 6011: 6011: } 6011: 6011: 6011: 6011: template 6011: Codepoint read_codepoint(Iterator& it, const Iterator& end) 6011: { 6011: if (it == end) 6011: return InvalidPolicy{}(-1); 6011: 6011: 6011: unsigned char byte = read(it); 6011: if (not (byte & 0x80)) 6011: return byte; 6011: 6011: if (it == end) 6011: return InvalidPolicy{}(byte); 6011: 6011: if ((byte & 0xE0) == 0xC0) 6011: return ((byte & 0x1F) << 6) | (read(it) & 0x3F); 6011: 6011: if ((byte & 0xF0) == 0xE0) 6011: { 6011: Codepoint cp = ((byte & 0x0F) << 12) | ((read(it) & 0x3F) << 6); 6011: if (it == end) 6011: return InvalidPolicy{}(cp); 6011: return cp | (read(it) & 0x3F); 6011: } 6011: 6011: if ((byte & 0xF8) == 0xF0) 6011: { 6011: Codepoint cp = ((byte & 0x0F) << 18) | ((read(it) & 0x3F) << 12); 6011: if (it == end) 6011: return InvalidPolicy{}(cp); 6011: cp |= (read(it) & 0x3F) << 6; 6011: if (it == end) 6011: return InvalidPolicy{}(cp); 6011: return cp | (read(it) & 0x3F); 6011: } 6011: return InvalidPolicy{}(byte); 6011: } 6011: 6011: template 6011: Codepoint codepoint(Iterator it, const Iterator& end) 6011: { 6011: return read_codepoint(it, end); 6011: } 6011: 6011: template 6011: ByteCount codepoint_size(char byte) 6011: { 6011: if (not (byte & 0x80)) 6011: return 1; 6011: else if ((byte & 0xE0) == 0xC0) 6011: return 2; 6011: else if ((byte & 0xF0) == 0xE0) 6011: return 3; 6011: else if ((byte & 0xF8) == 0xF0) 6011: return 4; 6011: else 6011: { 6011: InvalidPolicy{}(byte); 6011: return 1; 6011: } 6011: } 6011: 6011: struct invalid_codepoint{}; 6011: 6011: inline ByteCount codepoint_size(Codepoint cp) 6011: { 6011: if (cp <= 0x7F) 6011: return 1; 6011: else if (cp <= 0x7FF) 6011: return 2; 6011: else if (cp <= 0xFFFF) 6011: return 3; 6011: else if (cp <= 0x10FFFF) 6011: return 4; 6011: else 6011: throw invalid_codepoint{}; 6011: } 6011: 6011: template 6011: void to_next(Iterator& it, const Iterator& end) 6011: { 6011: if (it != end and read(it) & 0x80) 6011: while (it != end and (*(it) & 0xC0) == 0x80) 6011: ++it; 6011: } 6011: 6011: 6011: template 6011: Iterator next(Iterator it, const Iterator& end) 6011: { 6011: to_next(it, end); 6011: return it; 6011: } 6011: 6011: 6011: 6011: template 6011: Iterator finish(Iterator it, const Iterator& end) 6011: { 6011: while (it != end and (*(it) & 0xC0) == 0x80) 6011: ++it; 6011: return it; 6011: } 6011: 6011: template 6011: void to_previous(Iterator& it, const Iterator& begin) 6011: { 6011: while (it != begin and (*(--it) & 0xC0) == 0x80) 6011: ; 6011: } 6011: 6011: template 6011: Iterator previous(Iterator it, const Iterator& begin) 6011: { 6011: to_previous(it, begin); 6011: return it; 6011: } 6011: 6011: 6011: 6011: 6011: template 6011: Iterator advance(Iterator it, const Iterator& end, CharCount d) 6011: { 6011: if (it == end) 6011: return it; 6011: 6011: if (d < 0) 6011: { 6011: while (it != end and d != 0) 6011: { 6011: if (is_character_start(*--it)) 6011: ++d; 6011: } 6011: } 6011: else if (d > 0) 6011: { 6011: while (it != end and d != 0) 6011: { 6011: if (is_character_start(*++it)) 6011: --d; 6011: } 6011: } 6011: return it; 6011: } 6011: 6011: 6011: 6011: 6011: template 6011: Iterator advance(Iterator it, const Iterator& end, ColumnCount d) 6011: { 6011: if (it == end) 6011: return it; 6011: 6011: if (d < 0) 6011: { 6011: while (it != end and d < 0) 6011: { 6011: auto cur = it; 6011: to_previous(it, end); 6011: d += codepoint_width(codepoint(it, cur)); 6011: } 6011: } 6011: else if (d > 0) 6011: { 6011: auto begin = it; 6011: while (it != end and d > 0) 6011: { 6011: d -= codepoint_width(read_codepoint(it, end)); 6011: if (it != end and d < 0) 6011: to_previous(it, begin); 6011: } 6011: } 6011: return it; 6011: } 6011: 6011: 6011: template 6011: CharCount distance(Iterator begin, const Iterator& end) 6011: { 6011: CharCount dist = 0; 6011: 6011: while (begin != end) 6011: { 6011: if (is_character_start(read(begin))) 6011: ++dist; 6011: } 6011: return dist; 6011: } 6011: 6011: 6011: template 6011: ColumnCount column_distance(Iterator begin, const Iterator& end) 6011: { 6011: ColumnCount dist = 0; 6011: 6011: while (begin != end) 6011: dist += codepoint_width(read_codepoint(begin, end)); 6011: return dist; 6011: } 6011: 6011: 6011: template 6011: Iterator character_start(Iterator it, const Iterator& begin) 6011: { 6011: while (it != begin and not is_character_start(*it)) 6011: --it; 6011: return it; 6011: } 6011: 6011: template 6011: void dump(OutputIterator&& it, Codepoint cp) 6011: { 6011: if (cp <= 0x7F) 6011: *it++ = cp; 6011: else if (cp <= 0x7FF) 6011: { 6011: *it++ = 0xC0 | (cp >> 6); 6011: *it++ = 0x80 | (cp & 0x3F); 6011: } 6011: else if (cp <= 0xFFFF) 6011: { 6011: *it++ = 0xE0 | (cp >> 12); 6011: *it++ = 0x80 | ((cp >> 6) & 0x3F); 6011: *it++ = 0x80 | (cp & 0x3F); 6011: } 6011: else if (cp <= 0x10FFFF) 6011: { 6011: *it++ = 0xF0 | (cp >> 18); 6011: *it++ = 0x80 | ((cp >> 12) & 0x3F); 6011: *it++ = 0x80 | ((cp >> 6) & 0x3F); 6011: *it++ = 0x80 | (cp & 0x3F); 6011: } 6011: else 6011: throw invalid_codepoint{}; 6011: } 6011: 6011: } 6011: 6011: } 6011: # 9 "string.hh" 2 6011: 6011: 6011: # 1 "/usr/include/string.h" 1 3 4 6011: # 26 "/usr/include/string.h" 3 4 6011: # 1 "/usr/include/arm-linux-gnueabihf/bits/libc-header-start.h" 1 3 4 6011: # 27 "/usr/include/string.h" 2 3 4 6011: 6011: 6011: # 28 "/usr/include/string.h" 3 4 6011: extern "C" { 6011: 6011: 6011: 6011: 6011: # 1 "/usr/lib/gcc/arm-linux-gnueabihf/8/include/stddef.h" 1 3 4 6011: # 34 "/usr/include/string.h" 2 3 4 6011: # 42 "/usr/include/string.h" 3 4 6011: extern void *memcpy (void *__restrict __dest, const void *__restrict __src, 6011: size_t __n) throw () __attribute__ ((__nonnull__ (1, 2))); 6011: 6011: 6011: extern void *memmove (void *__dest, const void *__src, size_t __n) 6011: throw () __attribute__ ((__nonnull__ (1, 2))); 6011: 6011: 6011: 6011: 6011: 6011: extern void *memccpy (void *__restrict __dest, const void *__restrict __src, 6011: int __c, size_t __n) 6011: throw () __attribute__ ((__nonnull__ (1, 2))); 6011: 6011: 6011: 6011: 6011: extern void *memset (void *__s, int __c, size_t __n) throw () __attribute__ ((__nonnull__ (1))); 6011: 6011: 6011: extern int memcmp (const void *__s1, const void *__s2, size_t __n) 6011: throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); 6011: 6011: 6011: 6011: extern "C++" 6011: { 6011: extern void *memchr (void *__s, int __c, size_t __n) 6011: throw () __asm ("memchr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); 6011: extern const void *memchr (const void *__s, int __c, size_t __n) 6011: throw () __asm ("memchr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); 6011: 6011: 6011: extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) void * 6011: memchr (void *__s, int __c, size_t __n) throw () 6011: { 6011: return __builtin_memchr (__s, __c, __n); 6011: } 6011: 6011: extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) const void * 6011: memchr (const void *__s, int __c, size_t __n) throw () 6011: { 6011: return __builtin_memchr (__s, __c, __n); 6011: } 6011: 6011: } 6011: # 98 "/usr/include/string.h" 3 4 6011: extern "C++" void *rawmemchr (void *__s, int __c) 6011: throw () __asm ("rawmemchr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); 6011: extern "C++" const void *rawmemchr (const void *__s, int __c) 6011: throw () __asm ("rawmemchr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: extern "C++" void *memrchr (void *__s, int __c, size_t __n) 6011: throw () __asm ("memrchr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); 6011: extern "C++" const void *memrchr (const void *__s, int __c, size_t __n) 6011: throw () __asm ("memrchr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); 6011: # 121 "/usr/include/string.h" 3 4 6011: extern char *strcpy (char *__restrict __dest, const char *__restrict __src) 6011: throw () __attribute__ ((__nonnull__ (1, 2))); 6011: 6011: extern char *strncpy (char *__restrict __dest, 6011: const char *__restrict __src, size_t __n) 6011: throw () __attribute__ ((__nonnull__ (1, 2))); 6011: 6011: 6011: extern char *strcat (char *__restrict __dest, const char *__restrict __src) 6011: throw () __attribute__ ((__nonnull__ (1, 2))); 6011: 6011: extern char *strncat (char *__restrict __dest, const char *__restrict __src, 6011: size_t __n) throw () __attribute__ ((__nonnull__ (1, 2))); 6011: 6011: 6011: extern int strcmp (const char *__s1, const char *__s2) 6011: throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); 6011: 6011: extern int strncmp (const char *__s1, const char *__s2, size_t __n) 6011: throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); 6011: 6011: 6011: extern int strcoll (const char *__s1, const char *__s2) 6011: throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); 6011: 6011: extern size_t strxfrm (char *__restrict __dest, 6011: const char *__restrict __src, size_t __n) 6011: throw () __attribute__ ((__nonnull__ (2))); 6011: 6011: 6011: 6011: 6011: 6011: 6011: extern int strcoll_l (const char *__s1, const char *__s2, locale_t __l) 6011: throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2, 3))); 6011: 6011: 6011: extern size_t strxfrm_l (char *__dest, const char *__src, size_t __n, 6011: locale_t __l) throw () __attribute__ ((__nonnull__ (2, 4))); 6011: 6011: 6011: 6011: 6011: 6011: extern char *strdup (const char *__s) 6011: throw () __attribute__ ((__malloc__)) __attribute__ ((__nonnull__ (1))); 6011: 6011: 6011: 6011: 6011: 6011: 6011: extern char *strndup (const char *__string, size_t __n) 6011: throw () __attribute__ ((__malloc__)) __attribute__ ((__nonnull__ (1))); 6011: # 203 "/usr/include/string.h" 3 4 6011: extern "C++" 6011: { 6011: extern char *strchr (char *__s, int __c) 6011: throw () __asm ("strchr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); 6011: extern const char *strchr (const char *__s, int __c) 6011: throw () __asm ("strchr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); 6011: 6011: 6011: extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) char * 6011: strchr (char *__s, int __c) throw () 6011: { 6011: return __builtin_strchr (__s, __c); 6011: } 6011: 6011: extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) const char * 6011: strchr (const char *__s, int __c) throw () 6011: { 6011: return __builtin_strchr (__s, __c); 6011: } 6011: 6011: } 6011: 6011: 6011: 6011: 6011: 6011: 6011: extern "C++" 6011: { 6011: extern char *strrchr (char *__s, int __c) 6011: throw () __asm ("strrchr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); 6011: extern const char *strrchr (const char *__s, int __c) 6011: throw () __asm ("strrchr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); 6011: 6011: 6011: extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) char * 6011: strrchr (char *__s, int __c) throw () 6011: { 6011: return __builtin_strrchr (__s, __c); 6011: } 6011: 6011: extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) const char * 6011: strrchr (const char *__s, int __c) throw () 6011: { 6011: return __builtin_strrchr (__s, __c); 6011: } 6011: 6011: } 6011: # 260 "/usr/include/string.h" 3 4 6011: extern "C++" char *strchrnul (char *__s, int __c) 6011: throw () __asm ("strchrnul") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); 6011: extern "C++" const char *strchrnul (const char *__s, int __c) 6011: throw () __asm ("strchrnul") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); 6011: # 272 "/usr/include/string.h" 3 4 6011: extern size_t strcspn (const char *__s, const char *__reject) 6011: throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); 6011: 6011: 6011: extern size_t strspn (const char *__s, const char *__accept) 6011: throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); 6011: 6011: 6011: extern "C++" 6011: { 6011: extern char *strpbrk (char *__s, const char *__accept) 6011: throw () __asm ("strpbrk") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); 6011: extern const char *strpbrk (const char *__s, const char *__accept) 6011: throw () __asm ("strpbrk") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); 6011: 6011: 6011: extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) char * 6011: strpbrk (char *__s, const char *__accept) throw () 6011: { 6011: return __builtin_strpbrk (__s, __accept); 6011: } 6011: 6011: extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) const char * 6011: strpbrk (const char *__s, const char *__accept) throw () 6011: { 6011: return __builtin_strpbrk (__s, __accept); 6011: } 6011: 6011: } 6011: 6011: 6011: 6011: 6011: 6011: 6011: extern "C++" 6011: { 6011: extern char *strstr (char *__haystack, const char *__needle) 6011: throw () __asm ("strstr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); 6011: extern const char *strstr (const char *__haystack, const char *__needle) 6011: throw () __asm ("strstr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); 6011: 6011: 6011: extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) char * 6011: strstr (char *__haystack, const char *__needle) throw () 6011: { 6011: return __builtin_strstr (__haystack, __needle); 6011: } 6011: 6011: extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) const char * 6011: strstr (const char *__haystack, const char *__needle) throw () 6011: { 6011: return __builtin_strstr (__haystack, __needle); 6011: } 6011: 6011: } 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: extern char *strtok (char *__restrict __s, const char *__restrict __delim) 6011: throw () __attribute__ ((__nonnull__ (2))); 6011: 6011: 6011: 6011: extern char *__strtok_r (char *__restrict __s, 6011: const char *__restrict __delim, 6011: char **__restrict __save_ptr) 6011: throw () __attribute__ ((__nonnull__ (2, 3))); 6011: 6011: extern char *strtok_r (char *__restrict __s, const char *__restrict __delim, 6011: char **__restrict __save_ptr) 6011: throw () __attribute__ ((__nonnull__ (2, 3))); 6011: 6011: 6011: 6011: 6011: 6011: extern "C++" char *strcasestr (char *__haystack, const char *__needle) 6011: throw () __asm ("strcasestr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); 6011: extern "C++" const char *strcasestr (const char *__haystack, 6011: const char *__needle) 6011: throw () __asm ("strcasestr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); 6011: # 368 "/usr/include/string.h" 3 4 6011: extern void *memmem (const void *__haystack, size_t __haystacklen, 6011: const void *__needle, size_t __needlelen) 6011: throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 3))); 6011: 6011: 6011: 6011: extern void *__mempcpy (void *__restrict __dest, 6011: const void *__restrict __src, size_t __n) 6011: throw () __attribute__ ((__nonnull__ (1, 2))); 6011: extern void *mempcpy (void *__restrict __dest, 6011: const void *__restrict __src, size_t __n) 6011: throw () __attribute__ ((__nonnull__ (1, 2))); 6011: 6011: 6011: 6011: 6011: extern size_t strlen (const char *__s) 6011: throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); 6011: 6011: 6011: 6011: 6011: extern size_t strnlen (const char *__string, size_t __maxlen) 6011: throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); 6011: 6011: 6011: 6011: 6011: extern char *strerror (int __errnum) throw (); 6011: # 420 "/usr/include/string.h" 3 4 6011: extern char *strerror_r (int __errnum, char *__buf, size_t __buflen) 6011: throw () __attribute__ ((__nonnull__ (2))) __attribute__ ((__warn_unused_result__)); 6011: 6011: 6011: 6011: 6011: 6011: extern char *strerror_l (int __errnum, locale_t __l) throw (); 6011: 6011: 6011: 6011: # 1 "/usr/include/strings.h" 1 3 4 6011: # 23 "/usr/include/strings.h" 3 4 6011: # 1 "/usr/lib/gcc/arm-linux-gnueabihf/8/include/stddef.h" 1 3 4 6011: # 24 "/usr/include/strings.h" 2 3 4 6011: 6011: 6011: 6011: 6011: 6011: 6011: extern "C" { 6011: 6011: 6011: 6011: extern int bcmp (const void *__s1, const void *__s2, size_t __n) 6011: throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); 6011: 6011: 6011: extern void bcopy (const void *__src, void *__dest, size_t __n) 6011: throw () __attribute__ ((__nonnull__ (1, 2))); 6011: 6011: 6011: extern void bzero (void *__s, size_t __n) throw () __attribute__ ((__nonnull__ (1))); 6011: 6011: 6011: 6011: extern "C++" 6011: { 6011: extern char *index (char *__s, int __c) 6011: throw () __asm ("index") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); 6011: extern const char *index (const char *__s, int __c) 6011: throw () __asm ("index") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); 6011: 6011: 6011: extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) char * 6011: index (char *__s, int __c) throw () 6011: { 6011: return __builtin_index (__s, __c); 6011: } 6011: 6011: extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) const char * 6011: index (const char *__s, int __c) throw () 6011: { 6011: return __builtin_index (__s, __c); 6011: } 6011: 6011: } 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: extern "C++" 6011: { 6011: extern char *rindex (char *__s, int __c) 6011: throw () __asm ("rindex") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); 6011: extern const char *rindex (const char *__s, int __c) 6011: throw () __asm ("rindex") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); 6011: 6011: 6011: extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) char * 6011: rindex (char *__s, int __c) throw () 6011: { 6011: return __builtin_rindex (__s, __c); 6011: } 6011: 6011: extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) const char * 6011: rindex (const char *__s, int __c) throw () 6011: { 6011: return __builtin_rindex (__s, __c); 6011: } 6011: 6011: } 6011: # 104 "/usr/include/strings.h" 3 4 6011: extern int ffs (int __i) throw () __attribute__ ((__const__)); 6011: 6011: 6011: 6011: 6011: 6011: extern int ffsl (long int __l) throw () __attribute__ ((__const__)); 6011: __extension__ extern int ffsll (long long int __ll) 6011: throw () __attribute__ ((__const__)); 6011: 6011: 6011: 6011: extern int strcasecmp (const char *__s1, const char *__s2) 6011: throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); 6011: 6011: 6011: extern int strncasecmp (const char *__s1, const char *__s2, size_t __n) 6011: throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); 6011: 6011: 6011: 6011: 6011: 6011: 6011: extern int strcasecmp_l (const char *__s1, const char *__s2, locale_t __loc) 6011: throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2, 3))); 6011: 6011: 6011: 6011: extern int strncasecmp_l (const char *__s1, const char *__s2, 6011: size_t __n, locale_t __loc) 6011: throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2, 4))); 6011: 6011: 6011: } 6011: 6011: 6011: 6011: 6011: 6011: # 1 "/usr/include/arm-linux-gnueabihf/bits/strings_fortified.h" 1 3 4 6011: # 22 "/usr/include/arm-linux-gnueabihf/bits/strings_fortified.h" 3 4 6011: extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) void 6011: __attribute__ ((__leaf__)) bcopy (const void *__src, void *__dest, size_t __len) throw () 6011: { 6011: (void) __builtin___memmove_chk (__dest, __src, __len, __builtin_object_size (__dest, 0)); 6011: } 6011: 6011: extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) void 6011: __attribute__ ((__leaf__)) bzero (void *__dest, size_t __len) throw () 6011: { 6011: (void) __builtin___memset_chk (__dest, '\0', __len, __builtin_object_size (__dest, 0)); 6011: } 6011: # 145 "/usr/include/strings.h" 2 3 4 6011: # 432 "/usr/include/string.h" 2 3 4 6011: 6011: 6011: 6011: extern void explicit_bzero (void *__s, size_t __n) throw () __attribute__ ((__nonnull__ (1))); 6011: 6011: 6011: 6011: extern char *strsep (char **__restrict __stringp, 6011: const char *__restrict __delim) 6011: throw () __attribute__ ((__nonnull__ (1, 2))); 6011: 6011: 6011: 6011: 6011: extern char *strsignal (int __sig) throw (); 6011: 6011: 6011: extern char *__stpcpy (char *__restrict __dest, const char *__restrict __src) 6011: throw () __attribute__ ((__nonnull__ (1, 2))); 6011: extern char *stpcpy (char *__restrict __dest, const char *__restrict __src) 6011: throw () __attribute__ ((__nonnull__ (1, 2))); 6011: 6011: 6011: 6011: extern char *__stpncpy (char *__restrict __dest, 6011: const char *__restrict __src, size_t __n) 6011: throw () __attribute__ ((__nonnull__ (1, 2))); 6011: extern char *stpncpy (char *__restrict __dest, 6011: const char *__restrict __src, size_t __n) 6011: throw () __attribute__ ((__nonnull__ (1, 2))); 6011: 6011: 6011: 6011: 6011: extern int strverscmp (const char *__s1, const char *__s2) 6011: throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); 6011: 6011: 6011: extern char *strfry (char *__string) throw () __attribute__ ((__nonnull__ (1))); 6011: 6011: 6011: extern void *memfrob (void *__s, size_t __n) throw () __attribute__ ((__nonnull__ (1))); 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: extern "C++" char *basename (char *__filename) 6011: throw () __asm ("basename") __attribute__ ((__nonnull__ (1))); 6011: extern "C++" const char *basename (const char *__filename) 6011: throw () __asm ("basename") __attribute__ ((__nonnull__ (1))); 6011: # 494 "/usr/include/string.h" 3 4 6011: # 1 "/usr/include/arm-linux-gnueabihf/bits/string_fortified.h" 1 3 4 6011: # 30 "/usr/include/arm-linux-gnueabihf/bits/string_fortified.h" 3 4 6011: extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) void * 6011: __attribute__ ((__leaf__)) memcpy (void *__restrict __dest, const void *__restrict __src, size_t __len) throw () 6011: 6011: { 6011: return __builtin___memcpy_chk (__dest, __src, __len, __builtin_object_size (__dest, 0)); 6011: } 6011: 6011: extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) void * 6011: __attribute__ ((__leaf__)) memmove (void *__dest, const void *__src, size_t __len) throw () 6011: { 6011: return __builtin___memmove_chk (__dest, __src, __len, __builtin_object_size (__dest, 0)); 6011: } 6011: 6011: 6011: extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) void * 6011: __attribute__ ((__leaf__)) mempcpy (void *__restrict __dest, const void *__restrict __src, size_t __len) throw () 6011: 6011: { 6011: return __builtin___mempcpy_chk (__dest, __src, __len, __builtin_object_size (__dest, 0)); 6011: } 6011: # 58 "/usr/include/arm-linux-gnueabihf/bits/string_fortified.h" 3 4 6011: extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) void * 6011: __attribute__ ((__leaf__)) memset (void *__dest, int __ch, size_t __len) throw () 6011: { 6011: # 71 "/usr/include/arm-linux-gnueabihf/bits/string_fortified.h" 3 4 6011: return __builtin___memset_chk (__dest, __ch, __len, __builtin_object_size (__dest, 0)); 6011: } 6011: 6011: 6011: 6011: 6011: void __explicit_bzero_chk (void *__dest, size_t __len, size_t __destlen) 6011: throw () __attribute__ ((__nonnull__ (1))); 6011: 6011: extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) void 6011: __attribute__ ((__leaf__)) explicit_bzero (void *__dest, size_t __len) throw () 6011: { 6011: __explicit_bzero_chk (__dest, __len, __builtin_object_size (__dest, 0)); 6011: } 6011: 6011: 6011: extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) char * 6011: __attribute__ ((__leaf__)) strcpy (char *__restrict __dest, const char *__restrict __src) throw () 6011: { 6011: return __builtin___strcpy_chk (__dest, __src, __builtin_object_size (__dest, 2 > 1)); 6011: } 6011: 6011: 6011: extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) char * 6011: __attribute__ ((__leaf__)) stpcpy (char *__restrict __dest, const char *__restrict __src) throw () 6011: { 6011: return __builtin___stpcpy_chk (__dest, __src, __builtin_object_size (__dest, 2 > 1)); 6011: } 6011: 6011: 6011: 6011: extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) char * 6011: __attribute__ ((__leaf__)) strncpy (char *__restrict __dest, const char *__restrict __src, size_t __len) throw () 6011: 6011: { 6011: return __builtin___strncpy_chk (__dest, __src, __len, __builtin_object_size (__dest, 2 > 1)); 6011: } 6011: 6011: 6011: extern char *__stpncpy_chk (char *__dest, const char *__src, size_t __n, 6011: size_t __destlen) throw (); 6011: extern char *__stpncpy_alias (char *__dest, const char *__src, size_t __n) throw () __asm__ ("" "stpncpy") 6011: ; 6011: 6011: extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) char * 6011: __attribute__ ((__leaf__)) stpncpy (char *__dest, const char *__src, size_t __n) throw () 6011: { 6011: if (__builtin_object_size (__dest, 2 > 1) != (size_t) -1 6011: && (!__builtin_constant_p (__n) || __n > __builtin_object_size (__dest, 2 > 1))) 6011: return __stpncpy_chk (__dest, __src, __n, __builtin_object_size (__dest, 2 > 1)); 6011: return __stpncpy_alias (__dest, __src, __n); 6011: } 6011: 6011: 6011: extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) char * 6011: __attribute__ ((__leaf__)) strcat (char *__restrict __dest, const char *__restrict __src) throw () 6011: { 6011: return __builtin___strcat_chk (__dest, __src, __builtin_object_size (__dest, 2 > 1)); 6011: } 6011: 6011: 6011: extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) char * 6011: __attribute__ ((__leaf__)) strncat (char *__restrict __dest, const char *__restrict __src, size_t __len) throw () 6011: 6011: { 6011: return __builtin___strncat_chk (__dest, __src, __len, __builtin_object_size (__dest, 2 > 1)); 6011: } 6011: # 495 "/usr/include/string.h" 2 3 4 6011: 6011: 6011: 6011: } 6011: # 12 "string.hh" 2 6011: # 1 "/usr/include/c++/8/climits" 1 3 6011: # 39 "/usr/include/c++/8/climits" 3 6011: 6011: # 40 "/usr/include/c++/8/climits" 3 6011: 6011: 6011: # 1 "/usr/lib/gcc/arm-linux-gnueabihf/8/include-fixed/limits.h" 1 3 4 6011: # 34 "/usr/lib/gcc/arm-linux-gnueabihf/8/include-fixed/limits.h" 3 4 6011: # 1 "/usr/lib/gcc/arm-linux-gnueabihf/8/include-fixed/syslimits.h" 1 3 4 6011: 6011: 6011: 6011: 6011: 6011: 6011: # 1 "/usr/lib/gcc/arm-linux-gnueabihf/8/include-fixed/limits.h" 1 3 4 6011: # 194 "/usr/lib/gcc/arm-linux-gnueabihf/8/include-fixed/limits.h" 3 4 6011: # 1 "/usr/include/limits.h" 1 3 4 6011: # 26 "/usr/include/limits.h" 3 4 6011: # 1 "/usr/include/arm-linux-gnueabihf/bits/libc-header-start.h" 1 3 4 6011: # 27 "/usr/include/limits.h" 2 3 4 6011: # 183 "/usr/include/limits.h" 3 4 6011: # 1 "/usr/include/arm-linux-gnueabihf/bits/posix1_lim.h" 1 3 4 6011: # 160 "/usr/include/arm-linux-gnueabihf/bits/posix1_lim.h" 3 4 6011: # 1 "/usr/include/arm-linux-gnueabihf/bits/local_lim.h" 1 3 4 6011: # 38 "/usr/include/arm-linux-gnueabihf/bits/local_lim.h" 3 4 6011: # 1 "/usr/include/linux/limits.h" 1 3 4 6011: # 39 "/usr/include/arm-linux-gnueabihf/bits/local_lim.h" 2 3 4 6011: # 161 "/usr/include/arm-linux-gnueabihf/bits/posix1_lim.h" 2 3 4 6011: # 184 "/usr/include/limits.h" 2 3 4 6011: 6011: 6011: 6011: # 1 "/usr/include/arm-linux-gnueabihf/bits/posix2_lim.h" 1 3 4 6011: # 188 "/usr/include/limits.h" 2 3 4 6011: 6011: 6011: 6011: # 1 "/usr/include/arm-linux-gnueabihf/bits/xopen_lim.h" 1 3 4 6011: # 64 "/usr/include/arm-linux-gnueabihf/bits/xopen_lim.h" 3 4 6011: # 1 "/usr/include/arm-linux-gnueabihf/bits/uio_lim.h" 1 3 4 6011: # 65 "/usr/include/arm-linux-gnueabihf/bits/xopen_lim.h" 2 3 4 6011: # 192 "/usr/include/limits.h" 2 3 4 6011: # 195 "/usr/lib/gcc/arm-linux-gnueabihf/8/include-fixed/limits.h" 2 3 4 6011: # 8 "/usr/lib/gcc/arm-linux-gnueabihf/8/include-fixed/syslimits.h" 2 3 4 6011: # 35 "/usr/lib/gcc/arm-linux-gnueabihf/8/include-fixed/limits.h" 2 3 4 6011: # 43 "/usr/include/c++/8/climits" 2 3 6011: # 13 "string.hh" 2 6011: 6011: 6011: # 14 "string.hh" 6011: namespace Kakoune 6011: { 6011: 6011: class StringView; 6011: 6011: template 6011: class StringOps 6011: { 6011: public: 6011: using value_type = CharType; 6011: 6011: friend inline size_t hash_value(const Type& str) 6011: { 6011: return hash_data(str.data(), (int)str.length()); 6011: } 6011: 6011: using iterator = CharType*; 6011: using const_iterator = const CharType*; 6011: using reverse_iterator = std::reverse_iterator; 6011: using const_reverse_iterator = std::reverse_iterator; 6011: 6011: [[gnu::always_inline]] 6011: iterator begin() { return type().data(); } 6011: 6011: [[gnu::always_inline]] 6011: const_iterator begin() const { return type().data(); } 6011: 6011: [[gnu::always_inline]] 6011: iterator end() { return type().data() + (int)type().length(); } 6011: 6011: [[gnu::always_inline]] 6011: const_iterator end() const { return type().data() + (int)type().length(); } 6011: 6011: reverse_iterator rbegin() { return reverse_iterator{end()}; } 6011: const_reverse_iterator rbegin() const { return const_reverse_iterator{end()}; } 6011: 6011: reverse_iterator rend() { return reverse_iterator{begin()}; } 6011: const_reverse_iterator rend() const { return const_reverse_iterator{begin()}; } 6011: 6011: CharType& front() { return *type().data(); } 6011: const CharType& front() const { return *type().data(); } 6011: CharType& back() { return type().data()[(int)type().length() - 1]; } 6011: const CharType& back() const { return type().data()[(int)type().length() - 1]; } 6011: 6011: [[gnu::always_inline]] 6011: CharType& operator[](ByteCount pos) { return type().data()[(int)pos]; } 6011: 6011: [[gnu::always_inline]] 6011: const CharType& operator[](ByteCount pos) const { return type().data()[(int)pos]; } 6011: 6011: Codepoint operator[](CharCount pos) const 6011: { return utf8::codepoint(utf8::advance(begin(), end(), pos), end()); } 6011: 6011: CharCount char_length() const { return utf8::distance(begin(), end()); } 6011: ColumnCount column_length() const { return utf8::column_distance(begin(), end()); } 6011: 6011: [[gnu::always_inline]] 6011: bool empty() const { return type().length() == 0_byte; } 6011: 6011: ByteCount byte_count_to(CharCount count) const 6011: { return utf8::advance(begin(), end(), count) - begin(); } 6011: 6011: ByteCount byte_count_to(ColumnCount count) const 6011: { return utf8::advance(begin(), end(), count) - begin(); } 6011: 6011: CharCount char_count_to(ByteCount count) const 6011: { return utf8::distance(begin(), begin() + (int)count); } 6011: 6011: ColumnCount column_count_to(ByteCount count) const 6011: { return utf8::column_distance(begin(), begin() + (int)count); } 6011: 6011: StringView substr(ByteCount from, ByteCount length = 0x7fffffff) const; 6011: StringView substr(CharCount from, CharCount length = 0x7fffffff) const; 6011: StringView substr(ColumnCount from, ColumnCount length = 0x7fffffff) const; 6011: 6011: private: 6011: [[gnu::always_inline]] 6011: Type& type() { return *static_cast(this); } 6011: [[gnu::always_inline]] 6011: const Type& type() const { return *static_cast(this); } 6011: }; 6011: 6011: [[gnu::optimize(3)]] 6011: constexpr ByteCount strlen(const char* s) 6011: { 6011: return *s == 0 ? 0 : strlen(s+1) + 1; 6011: } 6011: 6011: class String : public StringOps 6011: { 6011: public: 6011: String() {} 6011: String(const char* content) : m_data(content, (size_t)strlen(content)) {} 6011: String(const char* content, ByteCount len) : m_data(content, (size_t)len) {} 6011: explicit String(Codepoint cp, CharCount count = 1) 6011: { 6011: reserve(utf8::codepoint_size(cp) * (int)count); 6011: while (count-- > 0) 6011: utf8::dump(std::back_inserter(*this), cp); 6011: } 6011: explicit String(Codepoint cp, ColumnCount count) 6011: { 6011: if (not (count % codepoint_width(cp) == 0)) on_assert_failed("assert failed \"" "count % codepoint_width(cp) == 0" "\" at " "string.hh" ":" "116"); 6011: int cp_count = (int)(count / std::max(codepoint_width(cp), 1_col)); 6011: reserve(utf8::codepoint_size(cp) * cp_count); 6011: while (cp_count-- > 0) 6011: utf8::dump(std::back_inserter(*this), cp); 6011: } 6011: String(const char* begin, const char* end) : m_data(begin, end-begin) {} 6011: 6011: [[gnu::always_inline]] 6011: char* data() { return m_data.data(); } 6011: 6011: [[gnu::always_inline]] 6011: const char* data() const { return m_data.data(); } 6011: 6011: [[gnu::always_inline]] 6011: ByteCount length() const { return m_data.size(); } 6011: 6011: [[gnu::always_inline]] 6011: const char* c_str() const { return m_data.data(); } 6011: 6011: [[gnu::always_inline]] 6011: void append(const char* data, ByteCount count) { m_data.append(data, (size_t)count); } 6011: 6011: void clear() { m_data.clear(); } 6011: 6011: void push_back(char c) { m_data.append(&c, 1); } 6011: void force_size(ByteCount size) { m_data.force_size((size_t)size); } 6011: void reserve(ByteCount size) { m_data.reserve((size_t)size); } 6011: void resize(ByteCount size, char c); 6011: 6011: static const String ms_empty; 6011: static constexpr const char* option_type_name = "str"; 6011: # 156 "string.hh" 6011: union Data 6011: { 6011: using Alloc = Allocator; 6011: 6011: struct Long 6011: { 6011: static constexpr size_t max_capacity = 6011: (size_t)1 << 8 * (sizeof(size_t) - 1); 6011: 6011: char* ptr; 6011: size_t size; 6011: size_t capacity; 6011: } l; 6011: 6011: struct Short 6011: { 6011: static constexpr size_t capacity = sizeof(Long) - 2; 6011: char string[capacity+1]; 6011: unsigned char size; 6011: } s; 6011: 6011: Data() { set_empty(); } 6011: Data(const char* data, size_t size, size_t capacity); 6011: Data(const char* data, size_t size) : Data(data, size, size) {} 6011: Data(const Data& other) : Data{other.data(), other.size()} {} 6011: 6011: ~Data() { release(); } 6011: Data(Data&& other) noexcept; 6011: Data& operator=(const Data& other); 6011: Data& operator=(Data&& other) noexcept; 6011: 6011: bool is_long() const { return (s.size & 1) == 0; } 6011: size_t size() const { return is_long() ? l.size : (s.size >> 1); } 6011: size_t capacity() const { return is_long() ? l.capacity : Short::capacity; } 6011: 6011: const char* data() const { return is_long() ? l.ptr : s.string; } 6011: char* data() { return is_long() ? l.ptr : s.string; } 6011: 6011: template 6011: void reserve(size_t new_capacity); 6011: void set_size(size_t size); 6011: void force_size(size_t new_size); 6011: void append(const char* str, size_t len); 6011: void clear(); 6011: 6011: private: 6011: void release(); 6011: void set_empty() { s.size = 1; } 6011: void set_short(const char* data, size_t size); 6011: }; 6011: 6011: private: 6011: Data m_data; 6011: }; 6011: 6011: class StringView : public StringOps 6011: { 6011: public: 6011: constexpr StringView() = default; 6011: constexpr StringView(const char* data, ByteCount length) 6011: : m_data{data}, m_length{length} {} 6011: constexpr StringView(const char* data) : m_data{data}, m_length{data ? strlen(data) : 0} {} 6011: constexpr StringView(const char* begin, const char* end) : m_data{begin}, m_length{(int)(end - begin)} {} 6011: StringView(const String& str) : m_data{str.data()}, m_length{(int)str.length()} {} 6011: StringView(const char& c) : m_data(&c), m_length(1) {} 6011: StringView(int c) = delete; 6011: StringView(Codepoint c) = delete; 6011: 6011: [[gnu::always_inline]] 6011: constexpr const char* data() const { return m_data; } 6011: 6011: [[gnu::always_inline]] 6011: constexpr ByteCount length() const { return m_length; } 6011: 6011: String str() const { return {m_data, m_length}; } 6011: 6011: struct ZeroTerminatedString 6011: { 6011: ZeroTerminatedString(const char* begin, const char* end) 6011: { 6011: if (*end == '\0') 6011: unowned = begin; 6011: else 6011: owned = String::Data(begin, end - begin); 6011: } 6011: operator const char*() const { return unowned ? unowned : owned.data(); } 6011: 6011: private: 6011: String::Data owned; 6011: const char* unowned = nullptr; 6011: 6011: }; 6011: ZeroTerminatedString zstr() const { return {begin(), end()}; } 6011: 6011: private: 6011: const char* m_data = nullptr; 6011: ByteCount m_length = 0; 6011: }; 6011: 6011: template 6011: inline StringView StringOps::substr(ByteCount from, ByteCount length) const 6011: { 6011: if (length < 0) 6011: length = 0x7fffffff; 6011: const auto str_len = type().length(); 6011: if (not (from >= 0 and from <= str_len)) on_assert_failed("assert failed \"" "from >= 0 and from <= str_len" "\" at " "string.hh" ":" "261"); 6011: return StringView{ type().data() + (int)from, std::min(str_len - from, length) }; 6011: } 6011: 6011: template 6011: inline StringView StringOps::substr(CharCount from, CharCount length) const 6011: { 6011: if (length < 0) 6011: length = 0x7fffffff; 6011: auto beg = utf8::advance(begin(), end(), from); 6011: return StringView{ beg, utf8::advance(beg, end(), length) }; 6011: } 6011: 6011: template 6011: inline StringView StringOps::substr(ColumnCount from, ColumnCount length) const 6011: { 6011: if (length < 0) 6011: length = 0x7fffffff; 6011: auto beg = utf8::advance(begin(), end(), from); 6011: return StringView{ beg, utf8::advance(beg, end(), length) }; 6011: } 6011: 6011: inline String& operator+=(String& lhs, StringView rhs) 6011: { 6011: lhs.append(rhs.data(), rhs.length()); 6011: return lhs; 6011: } 6011: 6011: inline String operator+(StringView lhs, StringView rhs) 6011: { 6011: String res; 6011: res.reserve(lhs.length() + rhs.length()); 6011: res.append(lhs.data(), lhs.length()); 6011: res.append(rhs.data(), rhs.length()); 6011: return res; 6011: } 6011: 6011: [[gnu::always_inline]] 6011: inline bool operator==(const StringView& lhs, const StringView& rhs) 6011: { 6011: return lhs.length() == rhs.length() and 6011: std::equal(lhs.begin(), lhs.end(), rhs.begin()); 6011: } 6011: 6011: [[gnu::always_inline]] 6011: inline bool operator!=(const StringView& lhs, const StringView& rhs) 6011: { return not (lhs == rhs); } 6011: 6011: inline bool operator<(const StringView& lhs, const StringView& rhs) 6011: { 6011: return std::lexicographical_compare(lhs.begin(), lhs.end(), 6011: rhs.begin(), rhs.end()); 6011: } 6011: 6011: inline String operator"" _str(const char* str, size_t) 6011: { 6011: return String(str); 6011: } 6011: 6011: Vector split(StringView str, char separator, char escape); 6011: Vector split(StringView str, char separator); 6011: 6011: String escape(StringView str, StringView characters, char escape); 6011: String unescape(StringView str, StringView characters, char escape); 6011: 6011: String indent(StringView str, StringView indent = " "); 6011: 6011: String replace(StringView str, StringView substr, StringView replacement); 6011: 6011: template 6011: String join(const Container& container, char joiner, bool esc_joiner = true) 6011: { 6011: const char to_escape[2] = { joiner, '\\' }; 6011: String res; 6011: for (const auto& str : container) 6011: { 6011: if (not res.empty()) 6011: res += joiner; 6011: res += esc_joiner ? escape(str, {to_escape, 2}, '\\') : str; 6011: } 6011: return res; 6011: } 6011: 6011: inline bool prefix_match(StringView str, StringView prefix) 6011: { 6011: return str.substr(0_byte, prefix.length()) == prefix; 6011: } 6011: 6011: bool subsequence_match(StringView str, StringView subseq); 6011: 6011: String expand_tabs(StringView line, ColumnCount tabstop, ColumnCount col = 0); 6011: 6011: Vector wrap_lines(StringView text, ColumnCount max_width); 6011: 6011: int str_to_int(StringView str); 6011: Optional str_to_int_ifp(StringView str); 6011: 6011: inline String option_to_string(StringView opt) { return opt.str(); } 6011: inline void option_from_string(StringView str, String& opt) { opt = str.str(); } 6011: inline bool option_add(String& opt, StringView val) { opt += val; return not val.empty(); } 6011: 6011: template 6011: struct InplaceString 6011: { 6011: static_assert(N < 256, "InplaceString cannot handle sizes >= 256"); 6011: 6011: constexpr operator StringView() const { return {m_data, ByteCount{m_length}}; } 6011: operator String() const { return {m_data, ByteCount{m_length}}; } 6011: 6011: unsigned char m_length; 6011: char m_data[N]; 6011: }; 6011: 6011: struct Hex { size_t val; }; 6011: inline Hex hex(size_t val) { return {val}; } 6011: 6011: InplaceString<15> to_string(int val); 6011: InplaceString<23> to_string(long int val); 6011: InplaceString<23> to_string(size_t val); 6011: InplaceString<23> to_string(long long int val); 6011: InplaceString<23> to_string(Hex val); 6011: InplaceString<23> to_string(float val); 6011: InplaceString<7> to_string(Codepoint c); 6011: 6011: template 6011: decltype(to_string(std::declval())) 6011: to_string(const StronglyTypedNumber& val) 6011: { 6011: return to_string((ValueType)val); 6011: } 6011: 6011: namespace detail 6011: { 6011: 6011: template using IsString = std::is_convertible; 6011: 6011: template::value>::type> 6011: auto format_param(const T& val) -> decltype(to_string(val)) { return to_string(val); } 6011: 6011: template::value>::type> 6011: StringView format_param(const T& val) { return val; } 6011: 6011: } 6011: 6011: String format(StringView fmt, ArrayView params); 6011: 6011: template 6011: String format(StringView fmt, Types... params) 6011: { 6011: return format(fmt, ArrayView{detail::format_param(params)...}); 6011: } 6011: 6011: StringView format_to(ArrayView buffer, StringView fmt, ArrayView params); 6011: 6011: template 6011: StringView format_to(ArrayView buffer, StringView fmt, Types... params) 6011: { 6011: return format_to(buffer, fmt, ArrayView{detail::format_param(params)...}); 6011: } 6011: 6011: } 6011: # 7 "normal.hh" 2 6011: 6011: namespace Kakoune 6011: { 6011: 6011: class Context; 6011: 6011: struct NormalParams 6011: { 6011: int count; 6011: char reg; 6011: }; 6011: 6011: struct NormalCmdDesc 6011: { 6011: Key key; 6011: StringView docstring; 6011: void (*func)(Context& context, NormalParams params); 6011: }; 6011: 6011: using KeyMap = const ArrayView; 6011: extern KeyMap keymap; 6011: 6011: } 6011: # 2 "normal.cc" 2 6011: 6011: # 1 "buffer.hh" 1 6011: 6011: 6011: 6011: # 1 "clock.hh" 1 6011: 6011: 6011: 6011: # 1 "/usr/include/c++/8/chrono" 1 3 6011: # 32 "/usr/include/c++/8/chrono" 3 6011: 6011: # 33 "/usr/include/c++/8/chrono" 3 6011: 6011: 6011: 6011: 6011: 6011: # 1 "/usr/include/c++/8/ratio" 1 3 6011: # 32 "/usr/include/c++/8/ratio" 3 6011: 6011: # 33 "/usr/include/c++/8/ratio" 3 6011: # 43 "/usr/include/c++/8/ratio" 3 6011: 6011: # 43 "/usr/include/c++/8/ratio" 3 6011: namespace std __attribute__ ((__visibility__ ("default"))) 6011: { 6011: 6011: # 55 "/usr/include/c++/8/ratio" 3 6011: template 6011: struct __static_sign 6011: : integral_constant 6011: { }; 6011: 6011: template 6011: struct __static_abs 6011: : integral_constant::value> 6011: { }; 6011: 6011: template 6011: struct __static_gcd 6011: : __static_gcd<_Qn, (_Pn % _Qn)> 6011: { }; 6011: 6011: template 6011: struct __static_gcd<_Pn, 0> 6011: : integral_constant::value> 6011: { }; 6011: 6011: template 6011: struct __static_gcd<0, _Qn> 6011: : integral_constant::value> 6011: { }; 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: template 6011: struct __safe_multiply 6011: { 6011: private: 6011: static const uintmax_t __c = uintmax_t(1) << (sizeof(intmax_t) * 4); 6011: 6011: static const uintmax_t __a0 = __static_abs<_Pn>::value % __c; 6011: static const uintmax_t __a1 = __static_abs<_Pn>::value / __c; 6011: static const uintmax_t __b0 = __static_abs<_Qn>::value % __c; 6011: static const uintmax_t __b1 = __static_abs<_Qn>::value / __c; 6011: 6011: static_assert(__a1 == 0 || __b1 == 0, 6011: "overflow in multiplication"); 6011: static_assert(__a0 * __b1 + __b0 * __a1 < (__c >> 1), 6011: "overflow in multiplication"); 6011: static_assert(__b0 * __a0 <= 0x7fffffffffffffffLL, 6011: "overflow in multiplication"); 6011: static_assert((__a0 * __b1 + __b0 * __a1) * __c 6011: <= 0x7fffffffffffffffLL - __b0 * __a0, 6011: "overflow in multiplication"); 6011: 6011: public: 6011: static const intmax_t value = _Pn * _Qn; 6011: }; 6011: 6011: 6011: 6011: template 6011: struct __big_less 6011: : integral_constant 6011: { }; 6011: 6011: template 6011: struct __big_add 6011: { 6011: static constexpr uintmax_t __lo = __lo1 + __lo2; 6011: static constexpr uintmax_t __hi = (__hi1 + __hi2 + 6011: (__lo1 + __lo2 < __lo1)); 6011: }; 6011: 6011: 6011: template 6011: struct __big_sub 6011: { 6011: static_assert(!__big_less<__hi1, __lo1, __hi2, __lo2>::value, 6011: "Internal library error"); 6011: static constexpr uintmax_t __lo = __lo1 - __lo2; 6011: static constexpr uintmax_t __hi = (__hi1 - __hi2 - 6011: (__lo1 < __lo2)); 6011: }; 6011: 6011: 6011: template 6011: struct __big_mul 6011: { 6011: private: 6011: static constexpr uintmax_t __c = uintmax_t(1) << (sizeof(intmax_t) * 4); 6011: static constexpr uintmax_t __x0 = __x % __c; 6011: static constexpr uintmax_t __x1 = __x / __c; 6011: static constexpr uintmax_t __y0 = __y % __c; 6011: static constexpr uintmax_t __y1 = __y / __c; 6011: static constexpr uintmax_t __x0y0 = __x0 * __y0; 6011: static constexpr uintmax_t __x0y1 = __x0 * __y1; 6011: static constexpr uintmax_t __x1y0 = __x1 * __y0; 6011: static constexpr uintmax_t __x1y1 = __x1 * __y1; 6011: static constexpr uintmax_t __mix = __x0y1 + __x1y0; 6011: static constexpr uintmax_t __mix_lo = __mix * __c; 6011: static constexpr uintmax_t __mix_hi 6011: = __mix / __c + ((__mix < __x0y1) ? __c : 0); 6011: typedef __big_add<__mix_hi, __mix_lo, __x1y1, __x0y0> _Res; 6011: public: 6011: static constexpr uintmax_t __hi = _Res::__hi; 6011: static constexpr uintmax_t __lo = _Res::__lo; 6011: }; 6011: 6011: 6011: 6011: template 6011: struct __big_div_impl 6011: { 6011: private: 6011: static_assert(__d >= (uintmax_t(1) << (sizeof(intmax_t) * 8 - 1)), 6011: "Internal library error"); 6011: static_assert(__n1 < __d, "Internal library error"); 6011: static constexpr uintmax_t __c = uintmax_t(1) << (sizeof(intmax_t) * 4); 6011: static constexpr uintmax_t __d1 = __d / __c; 6011: static constexpr uintmax_t __d0 = __d % __c; 6011: 6011: static constexpr uintmax_t __q1x = __n1 / __d1; 6011: static constexpr uintmax_t __r1x = __n1 % __d1; 6011: static constexpr uintmax_t __m = __q1x * __d0; 6011: static constexpr uintmax_t __r1y = __r1x * __c + __n0 / __c; 6011: static constexpr uintmax_t __r1z = __r1y + __d; 6011: static constexpr uintmax_t __r1 6011: = ((__r1y < __m) ? ((__r1z >= __d) && (__r1z < __m)) 6011: ? (__r1z + __d) : __r1z : __r1y) - __m; 6011: static constexpr uintmax_t __q1 6011: = __q1x - ((__r1y < __m) 6011: ? ((__r1z >= __d) && (__r1z < __m)) ? 2 : 1 : 0); 6011: static constexpr uintmax_t __q0x = __r1 / __d1; 6011: static constexpr uintmax_t __r0x = __r1 % __d1; 6011: static constexpr uintmax_t __n = __q0x * __d0; 6011: static constexpr uintmax_t __r0y = __r0x * __c + __n0 % __c; 6011: static constexpr uintmax_t __r0z = __r0y + __d; 6011: static constexpr uintmax_t __r0 6011: = ((__r0y < __n) ? ((__r0z >= __d) && (__r0z < __n)) 6011: ? (__r0z + __d) : __r0z : __r0y) - __n; 6011: static constexpr uintmax_t __q0 6011: = __q0x - ((__r0y < __n) ? ((__r0z >= __d) 6011: && (__r0z < __n)) ? 2 : 1 : 0); 6011: 6011: public: 6011: static constexpr uintmax_t __quot = __q1 * __c + __q0; 6011: static constexpr uintmax_t __rem = __r0; 6011: 6011: private: 6011: typedef __big_mul<__quot, __d> _Prod; 6011: typedef __big_add<_Prod::__hi, _Prod::__lo, 0, __rem> _Sum; 6011: static_assert(_Sum::__hi == __n1 && _Sum::__lo == __n0, 6011: "Internal library error"); 6011: }; 6011: 6011: template 6011: struct __big_div 6011: { 6011: private: 6011: static_assert(__d != 0, "Internal library error"); 6011: static_assert(sizeof (uintmax_t) == sizeof (unsigned long long), 6011: "This library calls __builtin_clzll on uintmax_t, which " 6011: "is unsafe on your platform. Please complain to " 6011: "http://gcc.gnu.org/bugzilla/"); 6011: static constexpr int __shift = __builtin_clzll(__d); 6011: static constexpr int __coshift_ = sizeof(uintmax_t) * 8 - __shift; 6011: static constexpr int __coshift = (__shift != 0) ? __coshift_ : 0; 6011: static constexpr uintmax_t __c1 = uintmax_t(1) << __shift; 6011: static constexpr uintmax_t __c2 = uintmax_t(1) << __coshift; 6011: static constexpr uintmax_t __new_d = __d * __c1; 6011: static constexpr uintmax_t __new_n0 = __n0 * __c1; 6011: static constexpr uintmax_t __n1_shifted = (__n1 % __d) * __c1; 6011: static constexpr uintmax_t __n0_top = (__shift != 0) ? (__n0 / __c2) : 0; 6011: static constexpr uintmax_t __new_n1 = __n1_shifted + __n0_top; 6011: typedef __big_div_impl<__new_n1, __new_n0, __new_d> _Res; 6011: 6011: public: 6011: static constexpr uintmax_t __quot_hi = __n1 / __d; 6011: static constexpr uintmax_t __quot_lo = _Res::__quot; 6011: static constexpr uintmax_t __rem = _Res::__rem / __c1; 6011: 6011: private: 6011: typedef __big_mul<__quot_lo, __d> _P0; 6011: typedef __big_mul<__quot_hi, __d> _P1; 6011: typedef __big_add<_P0::__hi, _P0::__lo, _P1::__lo, __rem> _Sum; 6011: 6011: static_assert(_P1::__hi == 0, "Internal library error"); 6011: static_assert(_Sum::__hi >= _P0::__hi, "Internal library error"); 6011: 6011: static_assert(_Sum::__hi == __n1 && _Sum::__lo == __n0, 6011: "Internal library error"); 6011: static_assert(__rem < __d, "Internal library error"); 6011: }; 6011: # 262 "/usr/include/c++/8/ratio" 3 6011: template 6011: struct ratio 6011: { 6011: static_assert(_Den != 0, "denominator cannot be zero"); 6011: static_assert(_Num >= -0x7fffffffffffffffLL && _Den >= -0x7fffffffffffffffLL, 6011: "out of range"); 6011: 6011: 6011: static constexpr intmax_t num = 6011: _Num * __static_sign<_Den>::value / __static_gcd<_Num, _Den>::value; 6011: 6011: static constexpr intmax_t den = 6011: __static_abs<_Den>::value / __static_gcd<_Num, _Den>::value; 6011: 6011: typedef ratio type; 6011: }; 6011: 6011: template 6011: constexpr intmax_t ratio<_Num, _Den>::num; 6011: 6011: template 6011: constexpr intmax_t ratio<_Num, _Den>::den; 6011: 6011: template 6011: struct __ratio_multiply 6011: { 6011: private: 6011: static const intmax_t __gcd1 = 6011: __static_gcd<_R1::num, _R2::den>::value; 6011: static const intmax_t __gcd2 = 6011: __static_gcd<_R2::num, _R1::den>::value; 6011: 6011: public: 6011: typedef ratio< 6011: __safe_multiply<(_R1::num / __gcd1), 6011: (_R2::num / __gcd2)>::value, 6011: __safe_multiply<(_R1::den / __gcd2), 6011: (_R2::den / __gcd1)>::value> type; 6011: 6011: static constexpr intmax_t num = type::num; 6011: static constexpr intmax_t den = type::den; 6011: }; 6011: 6011: template 6011: constexpr intmax_t __ratio_multiply<_R1, _R2>::num; 6011: 6011: template 6011: constexpr intmax_t __ratio_multiply<_R1, _R2>::den; 6011: 6011: 6011: template 6011: using ratio_multiply = typename __ratio_multiply<_R1, _R2>::type; 6011: 6011: template 6011: struct __ratio_divide 6011: { 6011: static_assert(_R2::num != 0, "division by 0"); 6011: 6011: typedef typename __ratio_multiply< 6011: _R1, 6011: ratio<_R2::den, _R2::num>>::type type; 6011: 6011: static constexpr intmax_t num = type::num; 6011: static constexpr intmax_t den = type::den; 6011: }; 6011: 6011: template 6011: constexpr intmax_t __ratio_divide<_R1, _R2>::num; 6011: 6011: template 6011: constexpr intmax_t __ratio_divide<_R1, _R2>::den; 6011: 6011: 6011: template 6011: using ratio_divide = typename __ratio_divide<_R1, _R2>::type; 6011: 6011: 6011: template 6011: struct ratio_equal 6011: : integral_constant 6011: { }; 6011: 6011: 6011: template 6011: struct ratio_not_equal 6011: : integral_constant::value> 6011: { }; 6011: 6011: 6011: template, 6011: typename _Right = __big_mul<_R2::num,_R1::den> > 6011: struct __ratio_less_impl_1 6011: : integral_constant::value> 6011: { }; 6011: 6011: template::value 6011: != __static_sign<_R2::num>::value)), 6011: bool = (__static_sign<_R1::num>::value == -1 6011: && __static_sign<_R2::num>::value == -1)> 6011: struct __ratio_less_impl 6011: : __ratio_less_impl_1<_R1, _R2>::type 6011: { }; 6011: 6011: template 6011: struct __ratio_less_impl<_R1, _R2, true, false> 6011: : integral_constant 6011: { }; 6011: 6011: template 6011: struct __ratio_less_impl<_R1, _R2, false, true> 6011: : __ratio_less_impl_1, 6011: ratio<-_R1::num, _R1::den> >::type 6011: { }; 6011: 6011: 6011: template 6011: struct ratio_less 6011: : __ratio_less_impl<_R1, _R2>::type 6011: { }; 6011: 6011: 6011: template 6011: struct ratio_less_equal 6011: : integral_constant::value> 6011: { }; 6011: 6011: 6011: template 6011: struct ratio_greater 6011: : integral_constant::value> 6011: { }; 6011: 6011: 6011: template 6011: struct ratio_greater_equal 6011: : integral_constant::value> 6011: { }; 6011: # 421 "/usr/include/c++/8/ratio" 3 6011: template= 0), 6011: bool = (_R2::num >= 0), 6011: bool = ratio_less::value, _R1::den>, 6011: ratio<__static_abs<_R2::num>::value, _R2::den> >::value> 6011: struct __ratio_add_impl 6011: { 6011: private: 6011: typedef typename __ratio_add_impl< 6011: ratio<-_R1::num, _R1::den>, 6011: ratio<-_R2::num, _R2::den> >::type __t; 6011: public: 6011: typedef ratio<-__t::num, __t::den> type; 6011: }; 6011: 6011: 6011: template 6011: struct __ratio_add_impl<_R1, _R2, true, true, __b> 6011: { 6011: private: 6011: static constexpr uintmax_t __g = __static_gcd<_R1::den, _R2::den>::value; 6011: static constexpr uintmax_t __d2 = _R2::den / __g; 6011: typedef __big_mul<_R1::den, __d2> __d; 6011: typedef __big_mul<_R1::num, _R2::den / __g> __x; 6011: typedef __big_mul<_R2::num, _R1::den / __g> __y; 6011: typedef __big_add<__x::__hi, __x::__lo, __y::__hi, __y::__lo> __n; 6011: static_assert(__n::__hi >= __x::__hi, "Internal library error"); 6011: typedef __big_div<__n::__hi, __n::__lo, __g> __ng; 6011: static constexpr uintmax_t __g2 = __static_gcd<__ng::__rem, __g>::value; 6011: typedef __big_div<__n::__hi, __n::__lo, __g2> __n_final; 6011: static_assert(__n_final::__rem == 0, "Internal library error"); 6011: static_assert(__n_final::__quot_hi == 0 && 6011: __n_final::__quot_lo <= 0x7fffffffffffffffLL, "overflow in addition"); 6011: typedef __big_mul<_R1::den / __g2, __d2> __d_final; 6011: static_assert(__d_final::__hi == 0 && 6011: __d_final::__lo <= 0x7fffffffffffffffLL, "overflow in addition"); 6011: public: 6011: typedef ratio<__n_final::__quot_lo, __d_final::__lo> type; 6011: }; 6011: 6011: template 6011: struct __ratio_add_impl<_R1, _R2, false, true, true> 6011: : __ratio_add_impl<_R2, _R1> 6011: { }; 6011: 6011: 6011: template 6011: struct __ratio_add_impl<_R1, _R2, true, false, false> 6011: { 6011: private: 6011: static constexpr uintmax_t __g = __static_gcd<_R1::den, _R2::den>::value; 6011: static constexpr uintmax_t __d2 = _R2::den / __g; 6011: typedef __big_mul<_R1::den, __d2> __d; 6011: typedef __big_mul<_R1::num, _R2::den / __g> __x; 6011: typedef __big_mul<-_R2::num, _R1::den / __g> __y; 6011: typedef __big_sub<__x::__hi, __x::__lo, __y::__hi, __y::__lo> __n; 6011: typedef __big_div<__n::__hi, __n::__lo, __g> __ng; 6011: static constexpr uintmax_t __g2 = __static_gcd<__ng::__rem, __g>::value; 6011: typedef __big_div<__n::__hi, __n::__lo, __g2> __n_final; 6011: static_assert(__n_final::__rem == 0, "Internal library error"); 6011: static_assert(__n_final::__quot_hi == 0 && 6011: __n_final::__quot_lo <= 0x7fffffffffffffffLL, "overflow in addition"); 6011: typedef __big_mul<_R1::den / __g2, __d2> __d_final; 6011: static_assert(__d_final::__hi == 0 && 6011: __d_final::__lo <= 0x7fffffffffffffffLL, "overflow in addition"); 6011: public: 6011: typedef ratio<__n_final::__quot_lo, __d_final::__lo> type; 6011: }; 6011: 6011: template 6011: struct __ratio_add 6011: { 6011: typedef typename __ratio_add_impl<_R1, _R2>::type type; 6011: static constexpr intmax_t num = type::num; 6011: static constexpr intmax_t den = type::den; 6011: }; 6011: 6011: template 6011: constexpr intmax_t __ratio_add<_R1, _R2>::num; 6011: 6011: template 6011: constexpr intmax_t __ratio_add<_R1, _R2>::den; 6011: 6011: 6011: template 6011: using ratio_add = typename __ratio_add<_R1, _R2>::type; 6011: 6011: template 6011: struct __ratio_subtract 6011: { 6011: typedef typename __ratio_add< 6011: _R1, 6011: ratio<-_R2::num, _R2::den>>::type type; 6011: 6011: static constexpr intmax_t num = type::num; 6011: static constexpr intmax_t den = type::den; 6011: }; 6011: 6011: template 6011: constexpr intmax_t __ratio_subtract<_R1, _R2>::num; 6011: 6011: template 6011: constexpr intmax_t __ratio_subtract<_R1, _R2>::den; 6011: 6011: 6011: template 6011: using ratio_subtract = typename __ratio_subtract<_R1, _R2>::type; 6011: 6011: 6011: typedef ratio<1, 1000000000000000000> atto; 6011: typedef ratio<1, 1000000000000000> femto; 6011: typedef ratio<1, 1000000000000> pico; 6011: typedef ratio<1, 1000000000> nano; 6011: typedef ratio<1, 1000000> micro; 6011: typedef ratio<1, 1000> milli; 6011: typedef ratio<1, 100> centi; 6011: typedef ratio<1, 10> deci; 6011: typedef ratio< 10, 1> deca; 6011: typedef ratio< 100, 1> hecto; 6011: typedef ratio< 1000, 1> kilo; 6011: typedef ratio< 1000000, 1> mega; 6011: typedef ratio< 1000000000, 1> giga; 6011: typedef ratio< 1000000000000, 1> tera; 6011: typedef ratio< 1000000000000000, 1> peta; 6011: typedef ratio< 1000000000000000000, 1> exa; 6011: 6011: 6011: 6011: } 6011: # 39 "/usr/include/c++/8/chrono" 2 3 6011: 6011: # 1 "/usr/include/c++/8/limits" 1 3 6011: # 40 "/usr/include/c++/8/limits" 3 6011: 6011: # 41 "/usr/include/c++/8/limits" 3 6011: # 158 "/usr/include/c++/8/limits" 3 6011: namespace std __attribute__ ((__visibility__ ("default"))) 6011: { 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: enum float_round_style 6011: { 6011: round_indeterminate = -1, 6011: round_toward_zero = 0, 6011: round_to_nearest = 1, 6011: round_toward_infinity = 2, 6011: round_toward_neg_infinity = 3 6011: }; 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: enum float_denorm_style 6011: { 6011: 6011: denorm_indeterminate = -1, 6011: 6011: denorm_absent = 0, 6011: 6011: denorm_present = 1 6011: }; 6011: # 202 "/usr/include/c++/8/limits" 3 6011: struct __numeric_limits_base 6011: { 6011: 6011: 6011: static constexpr bool is_specialized = false; 6011: 6011: 6011: 6011: 6011: static constexpr int digits = 0; 6011: 6011: 6011: static constexpr int digits10 = 0; 6011: 6011: 6011: 6011: 6011: static constexpr int max_digits10 = 0; 6011: 6011: 6011: 6011: static constexpr bool is_signed = false; 6011: 6011: 6011: static constexpr bool is_integer = false; 6011: 6011: 6011: 6011: 6011: static constexpr bool is_exact = false; 6011: 6011: 6011: 6011: static constexpr int radix = 0; 6011: 6011: 6011: 6011: static constexpr int min_exponent = 0; 6011: 6011: 6011: 6011: static constexpr int min_exponent10 = 0; 6011: 6011: 6011: 6011: 6011: static constexpr int max_exponent = 0; 6011: 6011: 6011: 6011: static constexpr int max_exponent10 = 0; 6011: 6011: 6011: static constexpr bool has_infinity = false; 6011: 6011: 6011: 6011: static constexpr bool has_quiet_NaN = false; 6011: 6011: 6011: 6011: static constexpr bool has_signaling_NaN = false; 6011: 6011: 6011: static constexpr float_denorm_style has_denorm = denorm_absent; 6011: 6011: 6011: 6011: static constexpr bool has_denorm_loss = false; 6011: 6011: 6011: 6011: static constexpr bool is_iec559 = false; 6011: 6011: 6011: 6011: 6011: static constexpr bool is_bounded = false; 6011: # 288 "/usr/include/c++/8/limits" 3 6011: static constexpr bool is_modulo = false; 6011: 6011: 6011: static constexpr bool traps = false; 6011: 6011: 6011: static constexpr bool tinyness_before = false; 6011: 6011: 6011: 6011: 6011: static constexpr float_round_style round_style = 6011: round_toward_zero; 6011: }; 6011: # 311 "/usr/include/c++/8/limits" 3 6011: template 6011: struct numeric_limits : public __numeric_limits_base 6011: { 6011: 6011: 6011: static constexpr _Tp 6011: min() noexcept { return _Tp(); } 6011: 6011: 6011: static constexpr _Tp 6011: max() noexcept { return _Tp(); } 6011: 6011: 6011: 6011: 6011: static constexpr _Tp 6011: lowest() noexcept { return _Tp(); } 6011: 6011: 6011: 6011: 6011: static constexpr _Tp 6011: epsilon() noexcept { return _Tp(); } 6011: 6011: 6011: static constexpr _Tp 6011: round_error() noexcept { return _Tp(); } 6011: 6011: 6011: static constexpr _Tp 6011: infinity() noexcept { return _Tp(); } 6011: 6011: 6011: 6011: static constexpr _Tp 6011: quiet_NaN() noexcept { return _Tp(); } 6011: 6011: 6011: 6011: static constexpr _Tp 6011: signaling_NaN() noexcept { return _Tp(); } 6011: 6011: 6011: 6011: 6011: static constexpr _Tp 6011: denorm_min() noexcept { return _Tp(); } 6011: }; 6011: 6011: 6011: 6011: 6011: template 6011: struct numeric_limits 6011: : public numeric_limits<_Tp> { }; 6011: 6011: template 6011: struct numeric_limits 6011: : public numeric_limits<_Tp> { }; 6011: 6011: template 6011: struct numeric_limits 6011: : public numeric_limits<_Tp> { }; 6011: # 382 "/usr/include/c++/8/limits" 3 6011: template<> 6011: struct numeric_limits 6011: { 6011: static constexpr bool is_specialized = true; 6011: 6011: static constexpr bool 6011: min() noexcept { return false; } 6011: 6011: static constexpr bool 6011: max() noexcept { return true; } 6011: 6011: 6011: static constexpr bool 6011: lowest() noexcept { return min(); } 6011: 6011: static constexpr int digits = 1; 6011: static constexpr int digits10 = 0; 6011: 6011: static constexpr int max_digits10 = 0; 6011: 6011: static constexpr bool is_signed = false; 6011: static constexpr bool is_integer = true; 6011: static constexpr bool is_exact = true; 6011: static constexpr int radix = 2; 6011: 6011: static constexpr bool 6011: epsilon() noexcept { return false; } 6011: 6011: static constexpr bool 6011: round_error() noexcept { return false; } 6011: 6011: static constexpr int min_exponent = 0; 6011: static constexpr int min_exponent10 = 0; 6011: static constexpr int max_exponent = 0; 6011: static constexpr int max_exponent10 = 0; 6011: 6011: static constexpr bool has_infinity = false; 6011: static constexpr bool has_quiet_NaN = false; 6011: static constexpr bool has_signaling_NaN = false; 6011: static constexpr float_denorm_style has_denorm 6011: = denorm_absent; 6011: static constexpr bool has_denorm_loss = false; 6011: 6011: static constexpr bool 6011: infinity() noexcept { return false; } 6011: 6011: static constexpr bool 6011: quiet_NaN() noexcept { return false; } 6011: 6011: static constexpr bool 6011: signaling_NaN() noexcept { return false; } 6011: 6011: static constexpr bool 6011: denorm_min() noexcept { return false; } 6011: 6011: static constexpr bool is_iec559 = false; 6011: static constexpr bool is_bounded = true; 6011: static constexpr bool is_modulo = false; 6011: 6011: 6011: 6011: 6011: static constexpr bool traps = true; 6011: static constexpr bool tinyness_before = false; 6011: static constexpr float_round_style round_style 6011: = round_toward_zero; 6011: }; 6011: 6011: 6011: template<> 6011: struct numeric_limits 6011: { 6011: static constexpr bool is_specialized = true; 6011: 6011: static constexpr char 6011: 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); } 6011: 6011: static constexpr char 6011: max() noexcept { return (((char)(-1) < 0) ? (((((char)1 << ((sizeof(char) * 8 - ((char)(-1) < 0)) - 1)) - 1) << 1) + 1) : ~(char)0); } 6011: 6011: 6011: static constexpr char 6011: lowest() noexcept { return min(); } 6011: 6011: 6011: static constexpr int digits = (sizeof(char) * 8 - ((char)(-1) < 0)); 6011: static constexpr int digits10 = ((sizeof(char) * 8 - ((char)(-1) < 0)) * 643L / 2136); 6011: 6011: static constexpr int max_digits10 = 0; 6011: 6011: static constexpr bool is_signed = ((char)(-1) < 0); 6011: static constexpr bool is_integer = true; 6011: static constexpr bool is_exact = true; 6011: static constexpr int radix = 2; 6011: 6011: static constexpr char 6011: epsilon() noexcept { return 0; } 6011: 6011: static constexpr char 6011: round_error() noexcept { return 0; } 6011: 6011: static constexpr int min_exponent = 0; 6011: static constexpr int min_exponent10 = 0; 6011: static constexpr int max_exponent = 0; 6011: static constexpr int max_exponent10 = 0; 6011: 6011: static constexpr bool has_infinity = false; 6011: static constexpr bool has_quiet_NaN = false; 6011: static constexpr bool has_signaling_NaN = false; 6011: static constexpr float_denorm_style has_denorm 6011: = denorm_absent; 6011: static constexpr bool has_denorm_loss = false; 6011: 6011: static constexpr 6011: char infinity() noexcept { return char(); } 6011: 6011: static constexpr char 6011: quiet_NaN() noexcept { return char(); } 6011: 6011: static constexpr char 6011: signaling_NaN() noexcept { return char(); } 6011: 6011: static constexpr char 6011: denorm_min() noexcept { return static_cast(0); } 6011: 6011: static constexpr bool is_iec559 = false; 6011: static constexpr bool is_bounded = true; 6011: static constexpr bool is_modulo = !is_signed; 6011: 6011: static constexpr bool traps = true; 6011: static constexpr bool tinyness_before = false; 6011: static constexpr float_round_style round_style 6011: = round_toward_zero; 6011: }; 6011: 6011: 6011: template<> 6011: struct numeric_limits 6011: { 6011: static constexpr bool is_specialized = true; 6011: 6011: static constexpr signed char 6011: min() noexcept { return -0x7f - 1; } 6011: 6011: static constexpr signed char 6011: max() noexcept { return 0x7f; } 6011: 6011: 6011: static constexpr signed char 6011: lowest() noexcept { return min(); } 6011: 6011: 6011: static constexpr int digits = (sizeof(signed char) * 8 - ((signed char)(-1) < 0)); 6011: static constexpr int digits10 6011: = ((sizeof(signed char) * 8 - ((signed char)(-1) < 0)) * 643L / 2136); 6011: 6011: static constexpr int max_digits10 = 0; 6011: 6011: static constexpr bool is_signed = true; 6011: static constexpr bool is_integer = true; 6011: static constexpr bool is_exact = true; 6011: static constexpr int radix = 2; 6011: 6011: static constexpr signed char 6011: epsilon() noexcept { return 0; } 6011: 6011: static constexpr signed char 6011: round_error() noexcept { return 0; } 6011: 6011: static constexpr int min_exponent = 0; 6011: static constexpr int min_exponent10 = 0; 6011: static constexpr int max_exponent = 0; 6011: static constexpr int max_exponent10 = 0; 6011: 6011: static constexpr bool has_infinity = false; 6011: static constexpr bool has_quiet_NaN = false; 6011: static constexpr bool has_signaling_NaN = false; 6011: static constexpr float_denorm_style has_denorm 6011: = denorm_absent; 6011: static constexpr bool has_denorm_loss = false; 6011: 6011: static constexpr signed char 6011: infinity() noexcept { return static_cast(0); } 6011: 6011: static constexpr signed char 6011: quiet_NaN() noexcept { return static_cast(0); } 6011: 6011: static constexpr signed char 6011: signaling_NaN() noexcept 6011: { return static_cast(0); } 6011: 6011: static constexpr signed char 6011: denorm_min() noexcept 6011: { return static_cast(0); } 6011: 6011: static constexpr bool is_iec559 = false; 6011: static constexpr bool is_bounded = true; 6011: static constexpr bool is_modulo = false; 6011: 6011: static constexpr bool traps = true; 6011: static constexpr bool tinyness_before = false; 6011: static constexpr float_round_style round_style 6011: = round_toward_zero; 6011: }; 6011: 6011: 6011: template<> 6011: struct numeric_limits 6011: { 6011: static constexpr bool is_specialized = true; 6011: 6011: static constexpr unsigned char 6011: min() noexcept { return 0; } 6011: 6011: static constexpr unsigned char 6011: max() noexcept { return 0x7f * 2U + 1; } 6011: 6011: 6011: static constexpr unsigned char 6011: lowest() noexcept { return min(); } 6011: 6011: 6011: static constexpr int digits 6011: = (sizeof(unsigned char) * 8 - ((unsigned char)(-1) < 0)); 6011: static constexpr int digits10 6011: = ((sizeof(unsigned char) * 8 - ((unsigned char)(-1) < 0)) * 643L / 2136); 6011: 6011: static constexpr int max_digits10 = 0; 6011: 6011: static constexpr bool is_signed = false; 6011: static constexpr bool is_integer = true; 6011: static constexpr bool is_exact = true; 6011: static constexpr int radix = 2; 6011: 6011: static constexpr unsigned char 6011: epsilon() noexcept { return 0; } 6011: 6011: static constexpr unsigned char 6011: round_error() noexcept { return 0; } 6011: 6011: static constexpr int min_exponent = 0; 6011: static constexpr int min_exponent10 = 0; 6011: static constexpr int max_exponent = 0; 6011: static constexpr int max_exponent10 = 0; 6011: 6011: static constexpr bool has_infinity = false; 6011: static constexpr bool has_quiet_NaN = false; 6011: static constexpr bool has_signaling_NaN = false; 6011: static constexpr float_denorm_style has_denorm 6011: = denorm_absent; 6011: static constexpr bool has_denorm_loss = false; 6011: 6011: static constexpr unsigned char 6011: infinity() noexcept 6011: { return static_cast(0); } 6011: 6011: static constexpr unsigned char 6011: quiet_NaN() noexcept 6011: { return static_cast(0); } 6011: 6011: static constexpr unsigned char 6011: signaling_NaN() noexcept 6011: { return static_cast(0); } 6011: 6011: static constexpr unsigned char 6011: denorm_min() noexcept 6011: { return static_cast(0); } 6011: 6011: static constexpr bool is_iec559 = false; 6011: static constexpr bool is_bounded = true; 6011: static constexpr bool is_modulo = true; 6011: 6011: static constexpr bool traps = true; 6011: static constexpr bool tinyness_before = false; 6011: static constexpr float_round_style round_style 6011: = round_toward_zero; 6011: }; 6011: 6011: 6011: template<> 6011: struct numeric_limits 6011: { 6011: static constexpr bool is_specialized = true; 6011: 6011: static constexpr wchar_t 6011: 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); } 6011: 6011: static constexpr wchar_t 6011: 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); } 6011: 6011: 6011: static constexpr wchar_t 6011: lowest() noexcept { return min(); } 6011: 6011: 6011: static constexpr int digits = (sizeof(wchar_t) * 8 - ((wchar_t)(-1) < 0)); 6011: static constexpr int digits10 6011: = ((sizeof(wchar_t) * 8 - ((wchar_t)(-1) < 0)) * 643L / 2136); 6011: 6011: static constexpr int max_digits10 = 0; 6011: 6011: static constexpr bool is_signed = ((wchar_t)(-1) < 0); 6011: static constexpr bool is_integer = true; 6011: static constexpr bool is_exact = true; 6011: static constexpr int radix = 2; 6011: 6011: static constexpr wchar_t 6011: epsilon() noexcept { return 0; } 6011: 6011: static constexpr wchar_t 6011: round_error() noexcept { return 0; } 6011: 6011: static constexpr int min_exponent = 0; 6011: static constexpr int min_exponent10 = 0; 6011: static constexpr int max_exponent = 0; 6011: static constexpr int max_exponent10 = 0; 6011: 6011: static constexpr bool has_infinity = false; 6011: static constexpr bool has_quiet_NaN = false; 6011: static constexpr bool has_signaling_NaN = false; 6011: static constexpr float_denorm_style has_denorm 6011: = denorm_absent; 6011: static constexpr bool has_denorm_loss = false; 6011: 6011: static constexpr wchar_t 6011: infinity() noexcept { return wchar_t(); } 6011: 6011: static constexpr wchar_t 6011: quiet_NaN() noexcept { return wchar_t(); } 6011: 6011: static constexpr wchar_t 6011: signaling_NaN() noexcept { return wchar_t(); } 6011: 6011: static constexpr wchar_t 6011: denorm_min() noexcept { return wchar_t(); } 6011: 6011: static constexpr bool is_iec559 = false; 6011: static constexpr bool is_bounded = true; 6011: static constexpr bool is_modulo = !is_signed; 6011: 6011: static constexpr bool traps = true; 6011: static constexpr bool tinyness_before = false; 6011: static constexpr float_round_style round_style 6011: = round_toward_zero; 6011: }; 6011: 6011: 6011: 6011: template<> 6011: struct numeric_limits 6011: { 6011: static constexpr bool is_specialized = true; 6011: 6011: static constexpr char16_t 6011: 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); } 6011: 6011: static constexpr char16_t 6011: 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); } 6011: 6011: static constexpr char16_t 6011: lowest() noexcept { return min(); } 6011: 6011: static constexpr int digits = (sizeof(char16_t) * 8 - ((char16_t)(-1) < 0)); 6011: static constexpr int digits10 = ((sizeof(char16_t) * 8 - ((char16_t)(-1) < 0)) * 643L / 2136); 6011: static constexpr int max_digits10 = 0; 6011: static constexpr bool is_signed = ((char16_t)(-1) < 0); 6011: static constexpr bool is_integer = true; 6011: static constexpr bool is_exact = true; 6011: static constexpr int radix = 2; 6011: 6011: static constexpr char16_t 6011: epsilon() noexcept { return 0; } 6011: 6011: static constexpr char16_t 6011: round_error() noexcept { return 0; } 6011: 6011: static constexpr int min_exponent = 0; 6011: static constexpr int min_exponent10 = 0; 6011: static constexpr int max_exponent = 0; 6011: static constexpr int max_exponent10 = 0; 6011: 6011: static constexpr bool has_infinity = false; 6011: static constexpr bool has_quiet_NaN = false; 6011: static constexpr bool has_signaling_NaN = false; 6011: static constexpr float_denorm_style has_denorm = denorm_absent; 6011: static constexpr bool has_denorm_loss = false; 6011: 6011: static constexpr char16_t 6011: infinity() noexcept { return char16_t(); } 6011: 6011: static constexpr char16_t 6011: quiet_NaN() noexcept { return char16_t(); } 6011: 6011: static constexpr char16_t 6011: signaling_NaN() noexcept { return char16_t(); } 6011: 6011: static constexpr char16_t 6011: denorm_min() noexcept { return char16_t(); } 6011: 6011: static constexpr bool is_iec559 = false; 6011: static constexpr bool is_bounded = true; 6011: static constexpr bool is_modulo = !is_signed; 6011: 6011: static constexpr bool traps = true; 6011: static constexpr bool tinyness_before = false; 6011: static constexpr float_round_style round_style = round_toward_zero; 6011: }; 6011: 6011: 6011: template<> 6011: struct numeric_limits 6011: { 6011: static constexpr bool is_specialized = true; 6011: 6011: static constexpr char32_t 6011: 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); } 6011: 6011: static constexpr char32_t 6011: 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); } 6011: 6011: static constexpr char32_t 6011: lowest() noexcept { return min(); } 6011: 6011: static constexpr int digits = (sizeof(char32_t) * 8 - ((char32_t)(-1) < 0)); 6011: static constexpr int digits10 = ((sizeof(char32_t) * 8 - ((char32_t)(-1) < 0)) * 643L / 2136); 6011: static constexpr int max_digits10 = 0; 6011: static constexpr bool is_signed = ((char32_t)(-1) < 0); 6011: static constexpr bool is_integer = true; 6011: static constexpr bool is_exact = true; 6011: static constexpr int radix = 2; 6011: 6011: static constexpr char32_t 6011: epsilon() noexcept { return 0; } 6011: 6011: static constexpr char32_t 6011: round_error() noexcept { return 0; } 6011: 6011: static constexpr int min_exponent = 0; 6011: static constexpr int min_exponent10 = 0; 6011: static constexpr int max_exponent = 0; 6011: static constexpr int max_exponent10 = 0; 6011: 6011: static constexpr bool has_infinity = false; 6011: static constexpr bool has_quiet_NaN = false; 6011: static constexpr bool has_signaling_NaN = false; 6011: static constexpr float_denorm_style has_denorm = denorm_absent; 6011: static constexpr bool has_denorm_loss = false; 6011: 6011: static constexpr char32_t 6011: infinity() noexcept { return char32_t(); } 6011: 6011: static constexpr char32_t 6011: quiet_NaN() noexcept { return char32_t(); } 6011: 6011: static constexpr char32_t 6011: signaling_NaN() noexcept { return char32_t(); } 6011: 6011: static constexpr char32_t 6011: denorm_min() noexcept { return char32_t(); } 6011: 6011: static constexpr bool is_iec559 = false; 6011: static constexpr bool is_bounded = true; 6011: static constexpr bool is_modulo = !is_signed; 6011: 6011: static constexpr bool traps = true; 6011: static constexpr bool tinyness_before = false; 6011: static constexpr float_round_style round_style = round_toward_zero; 6011: }; 6011: 6011: 6011: 6011: template<> 6011: struct numeric_limits 6011: { 6011: static constexpr bool is_specialized = true; 6011: 6011: static constexpr short 6011: min() noexcept { return -0x7fff - 1; } 6011: 6011: static constexpr short 6011: max() noexcept { return 0x7fff; } 6011: 6011: 6011: static constexpr short 6011: lowest() noexcept { return min(); } 6011: 6011: 6011: static constexpr int digits = (sizeof(short) * 8 - ((short)(-1) < 0)); 6011: static constexpr int digits10 = ((sizeof(short) * 8 - ((short)(-1) < 0)) * 643L / 2136); 6011: 6011: static constexpr int max_digits10 = 0; 6011: 6011: static constexpr bool is_signed = true; 6011: static constexpr bool is_integer = true; 6011: static constexpr bool is_exact = true; 6011: static constexpr int radix = 2; 6011: 6011: static constexpr short 6011: epsilon() noexcept { return 0; } 6011: 6011: static constexpr short 6011: round_error() noexcept { return 0; } 6011: 6011: static constexpr int min_exponent = 0; 6011: static constexpr int min_exponent10 = 0; 6011: static constexpr int max_exponent = 0; 6011: static constexpr int max_exponent10 = 0; 6011: 6011: static constexpr bool has_infinity = false; 6011: static constexpr bool has_quiet_NaN = false; 6011: static constexpr bool has_signaling_NaN = false; 6011: static constexpr float_denorm_style has_denorm 6011: = denorm_absent; 6011: static constexpr bool has_denorm_loss = false; 6011: 6011: static constexpr short 6011: infinity() noexcept { return short(); } 6011: 6011: static constexpr short 6011: quiet_NaN() noexcept { return short(); } 6011: 6011: static constexpr short 6011: signaling_NaN() noexcept { return short(); } 6011: 6011: static constexpr short 6011: denorm_min() noexcept { return short(); } 6011: 6011: static constexpr bool is_iec559 = false; 6011: static constexpr bool is_bounded = true; 6011: static constexpr bool is_modulo = false; 6011: 6011: static constexpr bool traps = true; 6011: static constexpr bool tinyness_before = false; 6011: static constexpr float_round_style round_style 6011: = round_toward_zero; 6011: }; 6011: 6011: 6011: template<> 6011: struct numeric_limits 6011: { 6011: static constexpr bool is_specialized = true; 6011: 6011: static constexpr unsigned short 6011: min() noexcept { return 0; } 6011: 6011: static constexpr unsigned short 6011: max() noexcept { return 0x7fff * 2U + 1; } 6011: 6011: 6011: static constexpr unsigned short 6011: lowest() noexcept { return min(); } 6011: 6011: 6011: static constexpr int digits 6011: = (sizeof(unsigned short) * 8 - ((unsigned short)(-1) < 0)); 6011: static constexpr int digits10 6011: = ((sizeof(unsigned short) * 8 - ((unsigned short)(-1) < 0)) * 643L / 2136); 6011: 6011: static constexpr int max_digits10 = 0; 6011: 6011: static constexpr bool is_signed = false; 6011: static constexpr bool is_integer = true; 6011: static constexpr bool is_exact = true; 6011: static constexpr int radix = 2; 6011: 6011: static constexpr unsigned short 6011: epsilon() noexcept { return 0; } 6011: 6011: static constexpr unsigned short 6011: round_error() noexcept { return 0; } 6011: 6011: static constexpr int min_exponent = 0; 6011: static constexpr int min_exponent10 = 0; 6011: static constexpr int max_exponent = 0; 6011: static constexpr int max_exponent10 = 0; 6011: 6011: static constexpr bool has_infinity = false; 6011: static constexpr bool has_quiet_NaN = false; 6011: static constexpr bool has_signaling_NaN = false; 6011: static constexpr float_denorm_style has_denorm 6011: = denorm_absent; 6011: static constexpr bool has_denorm_loss = false; 6011: 6011: static constexpr unsigned short 6011: infinity() noexcept 6011: { return static_cast(0); } 6011: 6011: static constexpr unsigned short 6011: quiet_NaN() noexcept 6011: { return static_cast(0); } 6011: 6011: static constexpr unsigned short 6011: signaling_NaN() noexcept 6011: { return static_cast(0); } 6011: 6011: static constexpr unsigned short 6011: denorm_min() noexcept 6011: { return static_cast(0); } 6011: 6011: static constexpr bool is_iec559 = false; 6011: static constexpr bool is_bounded = true; 6011: static constexpr bool is_modulo = true; 6011: 6011: static constexpr bool traps = true; 6011: static constexpr bool tinyness_before = false; 6011: static constexpr float_round_style round_style 6011: = round_toward_zero; 6011: }; 6011: 6011: 6011: template<> 6011: struct numeric_limits 6011: { 6011: static constexpr bool is_specialized = true; 6011: 6011: static constexpr int 6011: min() noexcept { return -0x7fffffff - 1; } 6011: 6011: static constexpr int 6011: max() noexcept { return 0x7fffffff; } 6011: 6011: 6011: static constexpr int 6011: lowest() noexcept { return min(); } 6011: 6011: 6011: static constexpr int digits = (sizeof(int) * 8 - ((int)(-1) < 0)); 6011: static constexpr int digits10 = ((sizeof(int) * 8 - ((int)(-1) < 0)) * 643L / 2136); 6011: 6011: static constexpr int max_digits10 = 0; 6011: 6011: static constexpr bool is_signed = true; 6011: static constexpr bool is_integer = true; 6011: static constexpr bool is_exact = true; 6011: static constexpr int radix = 2; 6011: 6011: static constexpr int 6011: epsilon() noexcept { return 0; } 6011: 6011: static constexpr int 6011: round_error() noexcept { return 0; } 6011: 6011: static constexpr int min_exponent = 0; 6011: static constexpr int min_exponent10 = 0; 6011: static constexpr int max_exponent = 0; 6011: static constexpr int max_exponent10 = 0; 6011: 6011: static constexpr bool has_infinity = false; 6011: static constexpr bool has_quiet_NaN = false; 6011: static constexpr bool has_signaling_NaN = false; 6011: static constexpr float_denorm_style has_denorm 6011: = denorm_absent; 6011: static constexpr bool has_denorm_loss = false; 6011: 6011: static constexpr int 6011: infinity() noexcept { return static_cast(0); } 6011: 6011: static constexpr int 6011: quiet_NaN() noexcept { return static_cast(0); } 6011: 6011: static constexpr int 6011: signaling_NaN() noexcept { return static_cast(0); } 6011: 6011: static constexpr int 6011: denorm_min() noexcept { return static_cast(0); } 6011: 6011: static constexpr bool is_iec559 = false; 6011: static constexpr bool is_bounded = true; 6011: static constexpr bool is_modulo = false; 6011: 6011: static constexpr bool traps = true; 6011: static constexpr bool tinyness_before = false; 6011: static constexpr float_round_style round_style 6011: = round_toward_zero; 6011: }; 6011: 6011: 6011: template<> 6011: struct numeric_limits 6011: { 6011: static constexpr bool is_specialized = true; 6011: 6011: static constexpr unsigned int 6011: min() noexcept { return 0; } 6011: 6011: static constexpr unsigned int 6011: max() noexcept { return 0x7fffffff * 2U + 1; } 6011: 6011: 6011: static constexpr unsigned int 6011: lowest() noexcept { return min(); } 6011: 6011: 6011: static constexpr int digits 6011: = (sizeof(unsigned int) * 8 - ((unsigned int)(-1) < 0)); 6011: static constexpr int digits10 6011: = ((sizeof(unsigned int) * 8 - ((unsigned int)(-1) < 0)) * 643L / 2136); 6011: 6011: static constexpr int max_digits10 = 0; 6011: 6011: static constexpr bool is_signed = false; 6011: static constexpr bool is_integer = true; 6011: static constexpr bool is_exact = true; 6011: static constexpr int radix = 2; 6011: 6011: static constexpr unsigned int 6011: epsilon() noexcept { return 0; } 6011: 6011: static constexpr unsigned int 6011: round_error() noexcept { return 0; } 6011: 6011: static constexpr int min_exponent = 0; 6011: static constexpr int min_exponent10 = 0; 6011: static constexpr int max_exponent = 0; 6011: static constexpr int max_exponent10 = 0; 6011: 6011: static constexpr bool has_infinity = false; 6011: static constexpr bool has_quiet_NaN = false; 6011: static constexpr bool has_signaling_NaN = false; 6011: static constexpr float_denorm_style has_denorm 6011: = denorm_absent; 6011: static constexpr bool has_denorm_loss = false; 6011: 6011: static constexpr unsigned int 6011: infinity() noexcept { return static_cast(0); } 6011: 6011: static constexpr unsigned int 6011: quiet_NaN() noexcept 6011: { return static_cast(0); } 6011: 6011: static constexpr unsigned int 6011: signaling_NaN() noexcept 6011: { return static_cast(0); } 6011: 6011: static constexpr unsigned int 6011: denorm_min() noexcept 6011: { return static_cast(0); } 6011: 6011: static constexpr bool is_iec559 = false; 6011: static constexpr bool is_bounded = true; 6011: static constexpr bool is_modulo = true; 6011: 6011: static constexpr bool traps = true; 6011: static constexpr bool tinyness_before = false; 6011: static constexpr float_round_style round_style 6011: = round_toward_zero; 6011: }; 6011: 6011: 6011: template<> 6011: struct numeric_limits 6011: { 6011: static constexpr bool is_specialized = true; 6011: 6011: static constexpr long 6011: min() noexcept { return -0x7fffffffL - 1; } 6011: 6011: static constexpr long 6011: max() noexcept { return 0x7fffffffL; } 6011: 6011: 6011: static constexpr long 6011: lowest() noexcept { return min(); } 6011: 6011: 6011: static constexpr int digits = (sizeof(long) * 8 - ((long)(-1) < 0)); 6011: static constexpr int digits10 = ((sizeof(long) * 8 - ((long)(-1) < 0)) * 643L / 2136); 6011: 6011: static constexpr int max_digits10 = 0; 6011: 6011: static constexpr bool is_signed = true; 6011: static constexpr bool is_integer = true; 6011: static constexpr bool is_exact = true; 6011: static constexpr int radix = 2; 6011: 6011: static constexpr long 6011: epsilon() noexcept { return 0; } 6011: 6011: static constexpr long 6011: round_error() noexcept { return 0; } 6011: 6011: static constexpr int min_exponent = 0; 6011: static constexpr int min_exponent10 = 0; 6011: static constexpr int max_exponent = 0; 6011: static constexpr int max_exponent10 = 0; 6011: 6011: static constexpr bool has_infinity = false; 6011: static constexpr bool has_quiet_NaN = false; 6011: static constexpr bool has_signaling_NaN = false; 6011: static constexpr float_denorm_style has_denorm 6011: = denorm_absent; 6011: static constexpr bool has_denorm_loss = false; 6011: 6011: static constexpr long 6011: infinity() noexcept { return static_cast(0); } 6011: 6011: static constexpr long 6011: quiet_NaN() noexcept { return static_cast(0); } 6011: 6011: static constexpr long 6011: signaling_NaN() noexcept { return static_cast(0); } 6011: 6011: static constexpr long 6011: denorm_min() noexcept { return static_cast(0); } 6011: 6011: static constexpr bool is_iec559 = false; 6011: static constexpr bool is_bounded = true; 6011: static constexpr bool is_modulo = false; 6011: 6011: static constexpr bool traps = true; 6011: static constexpr bool tinyness_before = false; 6011: static constexpr float_round_style round_style 6011: = round_toward_zero; 6011: }; 6011: 6011: 6011: template<> 6011: struct numeric_limits 6011: { 6011: static constexpr bool is_specialized = true; 6011: 6011: static constexpr unsigned long 6011: min() noexcept { return 0; } 6011: 6011: static constexpr unsigned long 6011: max() noexcept { return 0x7fffffffL * 2UL + 1; } 6011: 6011: 6011: static constexpr unsigned long 6011: lowest() noexcept { return min(); } 6011: 6011: 6011: static constexpr int digits 6011: = (sizeof(unsigned long) * 8 - ((unsigned long)(-1) < 0)); 6011: static constexpr int digits10 6011: = ((sizeof(unsigned long) * 8 - ((unsigned long)(-1) < 0)) * 643L / 2136); 6011: 6011: static constexpr int max_digits10 = 0; 6011: 6011: static constexpr bool is_signed = false; 6011: static constexpr bool is_integer = true; 6011: static constexpr bool is_exact = true; 6011: static constexpr int radix = 2; 6011: 6011: static constexpr unsigned long 6011: epsilon() noexcept { return 0; } 6011: 6011: static constexpr unsigned long 6011: round_error() noexcept { return 0; } 6011: 6011: static constexpr int min_exponent = 0; 6011: static constexpr int min_exponent10 = 0; 6011: static constexpr int max_exponent = 0; 6011: static constexpr int max_exponent10 = 0; 6011: 6011: static constexpr bool has_infinity = false; 6011: static constexpr bool has_quiet_NaN = false; 6011: static constexpr bool has_signaling_NaN = false; 6011: static constexpr float_denorm_style has_denorm 6011: = denorm_absent; 6011: static constexpr bool has_denorm_loss = false; 6011: 6011: static constexpr unsigned long 6011: infinity() noexcept 6011: { return static_cast(0); } 6011: 6011: static constexpr unsigned long 6011: quiet_NaN() noexcept 6011: { return static_cast(0); } 6011: 6011: static constexpr unsigned long 6011: signaling_NaN() noexcept 6011: { return static_cast(0); } 6011: 6011: static constexpr unsigned long 6011: denorm_min() noexcept 6011: { return static_cast(0); } 6011: 6011: static constexpr bool is_iec559 = false; 6011: static constexpr bool is_bounded = true; 6011: static constexpr bool is_modulo = true; 6011: 6011: static constexpr bool traps = true; 6011: static constexpr bool tinyness_before = false; 6011: static constexpr float_round_style round_style 6011: = round_toward_zero; 6011: }; 6011: 6011: 6011: template<> 6011: struct numeric_limits 6011: { 6011: static constexpr bool is_specialized = true; 6011: 6011: static constexpr long long 6011: min() noexcept { return -0x7fffffffffffffffLL - 1; } 6011: 6011: static constexpr long long 6011: max() noexcept { return 0x7fffffffffffffffLL; } 6011: 6011: 6011: static constexpr long long 6011: lowest() noexcept { return min(); } 6011: 6011: 6011: static constexpr int digits 6011: = (sizeof(long long) * 8 - ((long long)(-1) < 0)); 6011: static constexpr int digits10 6011: = ((sizeof(long long) * 8 - ((long long)(-1) < 0)) * 643L / 2136); 6011: 6011: static constexpr int max_digits10 = 0; 6011: 6011: static constexpr bool is_signed = true; 6011: static constexpr bool is_integer = true; 6011: static constexpr bool is_exact = true; 6011: static constexpr int radix = 2; 6011: 6011: static constexpr long long 6011: epsilon() noexcept { return 0; } 6011: 6011: static constexpr long long 6011: round_error() noexcept { return 0; } 6011: 6011: static constexpr int min_exponent = 0; 6011: static constexpr int min_exponent10 = 0; 6011: static constexpr int max_exponent = 0; 6011: static constexpr int max_exponent10 = 0; 6011: 6011: static constexpr bool has_infinity = false; 6011: static constexpr bool has_quiet_NaN = false; 6011: static constexpr bool has_signaling_NaN = false; 6011: static constexpr float_denorm_style has_denorm 6011: = denorm_absent; 6011: static constexpr bool has_denorm_loss = false; 6011: 6011: static constexpr long long 6011: infinity() noexcept { return static_cast(0); } 6011: 6011: static constexpr long long 6011: quiet_NaN() noexcept { return static_cast(0); } 6011: 6011: static constexpr long long 6011: signaling_NaN() noexcept 6011: { return static_cast(0); } 6011: 6011: static constexpr long long 6011: denorm_min() noexcept { return static_cast(0); } 6011: 6011: static constexpr bool is_iec559 = false; 6011: static constexpr bool is_bounded = true; 6011: static constexpr bool is_modulo = false; 6011: 6011: static constexpr bool traps = true; 6011: static constexpr bool tinyness_before = false; 6011: static constexpr float_round_style round_style 6011: = round_toward_zero; 6011: }; 6011: 6011: 6011: template<> 6011: struct numeric_limits 6011: { 6011: static constexpr bool is_specialized = true; 6011: 6011: static constexpr unsigned long long 6011: min() noexcept { return 0; } 6011: 6011: static constexpr unsigned long long 6011: max() noexcept { return 0x7fffffffffffffffLL * 2ULL + 1; } 6011: 6011: 6011: static constexpr unsigned long long 6011: lowest() noexcept { return min(); } 6011: 6011: 6011: static constexpr int digits 6011: = (sizeof(unsigned long long) * 8 - ((unsigned long long)(-1) < 0)); 6011: static constexpr int digits10 6011: = ((sizeof(unsigned long long) * 8 - ((unsigned long long)(-1) < 0)) * 643L / 2136); 6011: 6011: static constexpr int max_digits10 = 0; 6011: 6011: static constexpr bool is_signed = false; 6011: static constexpr bool is_integer = true; 6011: static constexpr bool is_exact = true; 6011: static constexpr int radix = 2; 6011: 6011: static constexpr unsigned long long 6011: epsilon() noexcept { return 0; } 6011: 6011: static constexpr unsigned long long 6011: round_error() noexcept { return 0; } 6011: 6011: static constexpr int min_exponent = 0; 6011: static constexpr int min_exponent10 = 0; 6011: static constexpr int max_exponent = 0; 6011: static constexpr int max_exponent10 = 0; 6011: 6011: static constexpr bool has_infinity = false; 6011: static constexpr bool has_quiet_NaN = false; 6011: static constexpr bool has_signaling_NaN = false; 6011: static constexpr float_denorm_style has_denorm 6011: = denorm_absent; 6011: static constexpr bool has_denorm_loss = false; 6011: 6011: static constexpr unsigned long long 6011: infinity() noexcept 6011: { return static_cast(0); } 6011: 6011: static constexpr unsigned long long 6011: quiet_NaN() noexcept 6011: { return static_cast(0); } 6011: 6011: static constexpr unsigned long long 6011: signaling_NaN() noexcept 6011: { return static_cast(0); } 6011: 6011: static constexpr unsigned long long 6011: denorm_min() noexcept 6011: { return static_cast(0); } 6011: 6011: static constexpr bool is_iec559 = false; 6011: static constexpr bool is_bounded = true; 6011: static constexpr bool is_modulo = true; 6011: 6011: static constexpr bool traps = true; 6011: static constexpr bool tinyness_before = false; 6011: static constexpr float_round_style round_style 6011: = round_toward_zero; 6011: }; 6011: # 1593 "/usr/include/c++/8/limits" 3 6011: template<> 6011: struct numeric_limits 6011: { 6011: static constexpr bool is_specialized = true; 6011: 6011: static constexpr float 6011: min() noexcept { return 1.1754943508222875e-38F; } 6011: 6011: static constexpr float 6011: max() noexcept { return 3.4028234663852886e+38F; } 6011: 6011: 6011: static constexpr float 6011: lowest() noexcept { return -3.4028234663852886e+38F; } 6011: 6011: 6011: static constexpr int digits = 24; 6011: static constexpr int digits10 = 6; 6011: 6011: static constexpr int max_digits10 6011: = (2 + (24) * 643L / 2136); 6011: 6011: static constexpr bool is_signed = true; 6011: static constexpr bool is_integer = false; 6011: static constexpr bool is_exact = false; 6011: static constexpr int radix = 2; 6011: 6011: static constexpr float 6011: epsilon() noexcept { return 1.1920928955078125e-7F; } 6011: 6011: static constexpr float 6011: round_error() noexcept { return 0.5F; } 6011: 6011: static constexpr int min_exponent = (-125); 6011: static constexpr int min_exponent10 = (-37); 6011: static constexpr int max_exponent = 128; 6011: static constexpr int max_exponent10 = 38; 6011: 6011: static constexpr bool has_infinity = 1; 6011: static constexpr bool has_quiet_NaN = 1; 6011: static constexpr bool has_signaling_NaN = has_quiet_NaN; 6011: static constexpr float_denorm_style has_denorm 6011: = bool(1) ? denorm_present : denorm_absent; 6011: static constexpr bool has_denorm_loss 6011: = false; 6011: 6011: static constexpr float 6011: infinity() noexcept { return __builtin_huge_valf(); } 6011: 6011: static constexpr float 6011: quiet_NaN() noexcept { return __builtin_nanf(""); } 6011: 6011: static constexpr float 6011: signaling_NaN() noexcept { return __builtin_nansf(""); } 6011: 6011: static constexpr float 6011: denorm_min() noexcept { return 1.4012984643248171e-45F; } 6011: 6011: static constexpr bool is_iec559 6011: = has_infinity && has_quiet_NaN && has_denorm == denorm_present; 6011: static constexpr bool is_bounded = true; 6011: static constexpr bool is_modulo = false; 6011: 6011: static constexpr bool traps = false; 6011: static constexpr bool tinyness_before 6011: = false; 6011: static constexpr float_round_style round_style 6011: = round_to_nearest; 6011: }; 6011: 6011: 6011: 6011: 6011: 6011: 6011: template<> 6011: struct numeric_limits 6011: { 6011: static constexpr bool is_specialized = true; 6011: 6011: static constexpr double 6011: min() noexcept { return double(2.2250738585072014e-308L); } 6011: 6011: static constexpr double 6011: max() noexcept { return double(1.7976931348623157e+308L); } 6011: 6011: 6011: static constexpr double 6011: lowest() noexcept { return -double(1.7976931348623157e+308L); } 6011: 6011: 6011: static constexpr int digits = 53; 6011: static constexpr int digits10 = 15; 6011: 6011: static constexpr int max_digits10 6011: = (2 + (53) * 643L / 2136); 6011: 6011: static constexpr bool is_signed = true; 6011: static constexpr bool is_integer = false; 6011: static constexpr bool is_exact = false; 6011: static constexpr int radix = 2; 6011: 6011: static constexpr double 6011: epsilon() noexcept { return double(2.2204460492503131e-16L); } 6011: 6011: static constexpr double 6011: round_error() noexcept { return 0.5; } 6011: 6011: static constexpr int min_exponent = (-1021); 6011: static constexpr int min_exponent10 = (-307); 6011: static constexpr int max_exponent = 1024; 6011: static constexpr int max_exponent10 = 308; 6011: 6011: static constexpr bool has_infinity = 1; 6011: static constexpr bool has_quiet_NaN = 1; 6011: static constexpr bool has_signaling_NaN = has_quiet_NaN; 6011: static constexpr float_denorm_style has_denorm 6011: = bool(1) ? denorm_present : denorm_absent; 6011: static constexpr bool has_denorm_loss 6011: = false; 6011: 6011: static constexpr double 6011: infinity() noexcept { return __builtin_huge_val(); } 6011: 6011: static constexpr double 6011: quiet_NaN() noexcept { return __builtin_nan(""); } 6011: 6011: static constexpr double 6011: signaling_NaN() noexcept { return __builtin_nans(""); } 6011: 6011: static constexpr double 6011: denorm_min() noexcept { return double(4.9406564584124654e-324L); } 6011: 6011: static constexpr bool is_iec559 6011: = has_infinity && has_quiet_NaN && has_denorm == denorm_present; 6011: static constexpr bool is_bounded = true; 6011: static constexpr bool is_modulo = false; 6011: 6011: static constexpr bool traps = false; 6011: static constexpr bool tinyness_before 6011: = false; 6011: static constexpr float_round_style round_style 6011: = round_to_nearest; 6011: }; 6011: 6011: 6011: 6011: 6011: 6011: 6011: template<> 6011: struct numeric_limits 6011: { 6011: static constexpr bool is_specialized = true; 6011: 6011: static constexpr long double 6011: min() noexcept { return 2.2250738585072014e-308L; } 6011: 6011: static constexpr long double 6011: max() noexcept { return 1.7976931348623157e+308L; } 6011: 6011: 6011: static constexpr long double 6011: lowest() noexcept { return -1.7976931348623157e+308L; } 6011: 6011: 6011: static constexpr int digits = 53; 6011: static constexpr int digits10 = 15; 6011: 6011: static constexpr int max_digits10 6011: = (2 + (53) * 643L / 2136); 6011: 6011: static constexpr bool is_signed = true; 6011: static constexpr bool is_integer = false; 6011: static constexpr bool is_exact = false; 6011: static constexpr int radix = 2; 6011: 6011: static constexpr long double 6011: epsilon() noexcept { return 2.2204460492503131e-16L; } 6011: 6011: static constexpr long double 6011: round_error() noexcept { return 0.5L; } 6011: 6011: static constexpr int min_exponent = (-1021); 6011: static constexpr int min_exponent10 = (-307); 6011: static constexpr int max_exponent = 1024; 6011: static constexpr int max_exponent10 = 308; 6011: 6011: static constexpr bool has_infinity = 1; 6011: static constexpr bool has_quiet_NaN = 1; 6011: static constexpr bool has_signaling_NaN = has_quiet_NaN; 6011: static constexpr float_denorm_style has_denorm 6011: = bool(1) ? denorm_present : denorm_absent; 6011: static constexpr bool has_denorm_loss 6011: = false; 6011: 6011: static constexpr long double 6011: infinity() noexcept { return __builtin_huge_vall(); } 6011: 6011: static constexpr long double 6011: quiet_NaN() noexcept { return __builtin_nanl(""); } 6011: 6011: static constexpr long double 6011: signaling_NaN() noexcept { return __builtin_nansl(""); } 6011: 6011: static constexpr long double 6011: denorm_min() noexcept { return 4.9406564584124654e-324L; } 6011: 6011: static constexpr bool is_iec559 6011: = has_infinity && has_quiet_NaN && has_denorm == denorm_present; 6011: static constexpr bool is_bounded = true; 6011: static constexpr bool is_modulo = false; 6011: 6011: static constexpr bool traps = false; 6011: static constexpr bool tinyness_before = 6011: false; 6011: static constexpr float_round_style round_style = 6011: round_to_nearest; 6011: }; 6011: 6011: 6011: 6011: 6011: 6011: 6011: } 6011: # 41 "/usr/include/c++/8/chrono" 2 3 6011: # 1 "/usr/include/c++/8/ctime" 1 3 6011: # 39 "/usr/include/c++/8/ctime" 3 6011: 6011: # 40 "/usr/include/c++/8/ctime" 3 6011: # 42 "/usr/include/c++/8/chrono" 2 3 6011: # 1 "/usr/include/c++/8/bits/parse_numbers.h" 1 3 6011: # 33 "/usr/include/c++/8/bits/parse_numbers.h" 3 6011: 6011: # 34 "/usr/include/c++/8/bits/parse_numbers.h" 3 6011: # 43 "/usr/include/c++/8/chrono" 2 3 6011: 6011: 6011: 6011: namespace std __attribute__ ((__visibility__ ("default"))) 6011: { 6011: 6011: # 61 "/usr/include/c++/8/chrono" 3 6011: namespace chrono 6011: { 6011: template> 6011: struct duration; 6011: 6011: template 6011: struct time_point; 6011: } 6011: 6011: 6011: 6011: template 6011: struct __duration_common_type_wrapper 6011: { 6011: private: 6011: typedef __static_gcd<_Period1::num, _Period2::num> __gcd_num; 6011: typedef __static_gcd<_Period1::den, _Period2::den> __gcd_den; 6011: typedef typename _CT::type __cr; 6011: typedef ratio<__gcd_num::value, 6011: (_Period1::den / __gcd_den::value) * _Period2::den> __r; 6011: public: 6011: typedef __success_type> type; 6011: }; 6011: 6011: template 6011: struct __duration_common_type_wrapper<__failure_type, _Period1, _Period2> 6011: { typedef __failure_type type; }; 6011: 6011: template 6011: struct common_type, 6011: chrono::duration<_Rep2, _Period2>> 6011: : public __duration_common_type_wrapper>::type, _Period1, _Period2>::type 6011: { }; 6011: 6011: 6011: 6011: template 6011: struct __timepoint_common_type_wrapper 6011: { 6011: typedef __success_type> 6011: type; 6011: }; 6011: 6011: template 6011: struct __timepoint_common_type_wrapper<__failure_type, _Clock> 6011: { typedef __failure_type type; }; 6011: 6011: template 6011: struct common_type, 6011: chrono::time_point<_Clock, _Duration2>> 6011: : public __timepoint_common_type_wrapper>::type, _Clock>::type 6011: { }; 6011: 6011: namespace chrono 6011: { 6011: 6011: template 6011: struct __duration_cast_impl 6011: { 6011: template 6011: static constexpr _ToDur 6011: __cast(const duration<_Rep, _Period>& __d) 6011: { 6011: typedef typename _ToDur::rep __to_rep; 6011: return _ToDur(static_cast<__to_rep>(static_cast<_CR>(__d.count()) 6011: * static_cast<_CR>(_CF::num) 6011: / static_cast<_CR>(_CF::den))); 6011: } 6011: }; 6011: 6011: template 6011: struct __duration_cast_impl<_ToDur, _CF, _CR, true, true> 6011: { 6011: template 6011: static constexpr _ToDur 6011: __cast(const duration<_Rep, _Period>& __d) 6011: { 6011: typedef typename _ToDur::rep __to_rep; 6011: return _ToDur(static_cast<__to_rep>(__d.count())); 6011: } 6011: }; 6011: 6011: template 6011: struct __duration_cast_impl<_ToDur, _CF, _CR, true, false> 6011: { 6011: template 6011: static constexpr _ToDur 6011: __cast(const duration<_Rep, _Period>& __d) 6011: { 6011: typedef typename _ToDur::rep __to_rep; 6011: return _ToDur(static_cast<__to_rep>( 6011: static_cast<_CR>(__d.count()) / static_cast<_CR>(_CF::den))); 6011: } 6011: }; 6011: 6011: template 6011: struct __duration_cast_impl<_ToDur, _CF, _CR, false, true> 6011: { 6011: template 6011: static constexpr _ToDur 6011: __cast(const duration<_Rep, _Period>& __d) 6011: { 6011: typedef typename _ToDur::rep __to_rep; 6011: return _ToDur(static_cast<__to_rep>( 6011: static_cast<_CR>(__d.count()) * static_cast<_CR>(_CF::num))); 6011: } 6011: }; 6011: 6011: template 6011: struct __is_duration 6011: : std::false_type 6011: { }; 6011: 6011: template 6011: struct __is_duration> 6011: : std::true_type 6011: { }; 6011: 6011: template 6011: using __enable_if_is_duration 6011: = typename enable_if<__is_duration<_Tp>::value, _Tp>::type; 6011: 6011: template 6011: using __disable_if_is_duration 6011: = typename enable_if::value, _Tp>::type; 6011: 6011: 6011: template 6011: constexpr __enable_if_is_duration<_ToDur> 6011: duration_cast(const duration<_Rep, _Period>& __d) 6011: { 6011: typedef typename _ToDur::period __to_period; 6011: typedef typename _ToDur::rep __to_rep; 6011: typedef ratio_divide<_Period, __to_period> __cf; 6011: typedef typename common_type<__to_rep, _Rep, intmax_t>::type 6011: __cr; 6011: typedef __duration_cast_impl<_ToDur, __cf, __cr, 6011: __cf::num == 1, __cf::den == 1> __dc; 6011: return __dc::__cast(__d); 6011: } 6011: 6011: 6011: template 6011: struct treat_as_floating_point 6011: : is_floating_point<_Rep> 6011: { }; 6011: # 274 "/usr/include/c++/8/chrono" 3 6011: template 6011: struct duration_values 6011: { 6011: static constexpr _Rep 6011: zero() 6011: { return _Rep(0); } 6011: 6011: static constexpr _Rep 6011: max() 6011: { return numeric_limits<_Rep>::max(); } 6011: 6011: static constexpr _Rep 6011: min() 6011: { return numeric_limits<_Rep>::lowest(); } 6011: }; 6011: 6011: template 6011: struct __is_ratio 6011: : std::false_type 6011: { }; 6011: 6011: template 6011: struct __is_ratio> 6011: : std::true_type 6011: { }; 6011: 6011: 6011: template 6011: struct duration 6011: { 6011: private: 6011: template 6011: using __is_float = treat_as_floating_point<_Rep2>; 6011: 6011: 6011: template 6011: using __is_harmonic 6011: = __bool_constant::den == 1>; 6011: 6011: public: 6011: 6011: typedef _Rep rep; 6011: typedef _Period period; 6011: 6011: static_assert(!__is_duration<_Rep>::value, "rep cannot be a duration"); 6011: static_assert(__is_ratio<_Period>::value, 6011: "period must be a specialization of ratio"); 6011: static_assert(_Period::num > 0, "period must be positive"); 6011: 6011: 6011: constexpr duration() = default; 6011: 6011: duration(const duration&) = default; 6011: 6011: template, 6011: __or_<__is_float, __not_<__is_float<_Rep2>>>>> 6011: constexpr explicit duration(const _Rep2& __rep) 6011: : __r(static_cast(__rep)) { } 6011: 6011: template, 6011: __and_<__is_harmonic<_Period2>, 6011: __not_<__is_float<_Rep2>>>>>> 6011: constexpr duration(const duration<_Rep2, _Period2>& __d) 6011: : __r(duration_cast(__d).count()) { } 6011: 6011: ~duration() = default; 6011: duration& operator=(const duration&) = default; 6011: 6011: 6011: constexpr rep 6011: count() const 6011: { return __r; } 6011: 6011: 6011: constexpr duration 6011: operator+() const 6011: { return *this; } 6011: 6011: constexpr duration 6011: operator-() const 6011: { return duration(-__r); } 6011: 6011: duration& 6011: operator++() 6011: { 6011: ++__r; 6011: return *this; 6011: } 6011: 6011: duration 6011: operator++(int) 6011: { return duration(__r++); } 6011: 6011: duration& 6011: operator--() 6011: { 6011: --__r; 6011: return *this; 6011: } 6011: 6011: duration 6011: operator--(int) 6011: { return duration(__r--); } 6011: 6011: duration& 6011: operator+=(const duration& __d) 6011: { 6011: __r += __d.count(); 6011: return *this; 6011: } 6011: 6011: duration& 6011: operator-=(const duration& __d) 6011: { 6011: __r -= __d.count(); 6011: return *this; 6011: } 6011: 6011: duration& 6011: operator*=(const rep& __rhs) 6011: { 6011: __r *= __rhs; 6011: return *this; 6011: } 6011: 6011: duration& 6011: operator/=(const rep& __rhs) 6011: { 6011: __r /= __rhs; 6011: return *this; 6011: } 6011: 6011: 6011: template 6011: 6011: typename enable_if::value, 6011: duration&>::type 6011: operator%=(const rep& __rhs) 6011: { 6011: __r %= __rhs; 6011: return *this; 6011: } 6011: 6011: template 6011: 6011: typename enable_if::value, 6011: duration&>::type 6011: operator%=(const duration& __d) 6011: { 6011: __r %= __d.count(); 6011: return *this; 6011: } 6011: 6011: 6011: static constexpr duration 6011: zero() 6011: { return duration(duration_values::zero()); } 6011: 6011: static constexpr duration 6011: min() 6011: { return duration(duration_values::min()); } 6011: 6011: static constexpr duration 6011: max() 6011: { return duration(duration_values::max()); } 6011: 6011: private: 6011: rep __r; 6011: }; 6011: 6011: template 6011: constexpr typename common_type, 6011: duration<_Rep2, _Period2>>::type 6011: operator+(const duration<_Rep1, _Period1>& __lhs, 6011: const duration<_Rep2, _Period2>& __rhs) 6011: { 6011: typedef duration<_Rep1, _Period1> __dur1; 6011: typedef duration<_Rep2, _Period2> __dur2; 6011: typedef typename common_type<__dur1,__dur2>::type __cd; 6011: return __cd(__cd(__lhs).count() + __cd(__rhs).count()); 6011: } 6011: 6011: template 6011: constexpr typename common_type, 6011: duration<_Rep2, _Period2>>::type 6011: operator-(const duration<_Rep1, _Period1>& __lhs, 6011: const duration<_Rep2, _Period2>& __rhs) 6011: { 6011: typedef duration<_Rep1, _Period1> __dur1; 6011: typedef duration<_Rep2, _Period2> __dur2; 6011: typedef typename common_type<__dur1,__dur2>::type __cd; 6011: return __cd(__cd(__lhs).count() - __cd(__rhs).count()); 6011: } 6011: 6011: 6011: 6011: template::type> 6011: using __common_rep_t 6011: = typename enable_if::value, _CRep>::type; 6011: 6011: template 6011: constexpr duration<__common_rep_t<_Rep1, _Rep2>, _Period> 6011: operator*(const duration<_Rep1, _Period>& __d, const _Rep2& __s) 6011: { 6011: typedef duration::type, _Period> 6011: __cd; 6011: return __cd(__cd(__d).count() * __s); 6011: } 6011: 6011: template 6011: constexpr duration<__common_rep_t<_Rep2, _Rep1>, _Period> 6011: operator*(const _Rep1& __s, const duration<_Rep2, _Period>& __d) 6011: { return __d * __s; } 6011: 6011: template 6011: constexpr 6011: duration<__common_rep_t<_Rep1, __disable_if_is_duration<_Rep2>>, _Period> 6011: operator/(const duration<_Rep1, _Period>& __d, const _Rep2& __s) 6011: { 6011: typedef duration::type, _Period> 6011: __cd; 6011: return __cd(__cd(__d).count() / __s); 6011: } 6011: 6011: template 6011: constexpr typename common_type<_Rep1, _Rep2>::type 6011: operator/(const duration<_Rep1, _Period1>& __lhs, 6011: const duration<_Rep2, _Period2>& __rhs) 6011: { 6011: typedef duration<_Rep1, _Period1> __dur1; 6011: typedef duration<_Rep2, _Period2> __dur2; 6011: typedef typename common_type<__dur1,__dur2>::type __cd; 6011: return __cd(__lhs).count() / __cd(__rhs).count(); 6011: } 6011: 6011: 6011: template 6011: constexpr 6011: duration<__common_rep_t<_Rep1, __disable_if_is_duration<_Rep2>>, _Period> 6011: operator%(const duration<_Rep1, _Period>& __d, const _Rep2& __s) 6011: { 6011: typedef duration::type, _Period> 6011: __cd; 6011: return __cd(__cd(__d).count() % __s); 6011: } 6011: 6011: template 6011: constexpr typename common_type, 6011: duration<_Rep2, _Period2>>::type 6011: operator%(const duration<_Rep1, _Period1>& __lhs, 6011: const duration<_Rep2, _Period2>& __rhs) 6011: { 6011: typedef duration<_Rep1, _Period1> __dur1; 6011: typedef duration<_Rep2, _Period2> __dur2; 6011: typedef typename common_type<__dur1,__dur2>::type __cd; 6011: return __cd(__cd(__lhs).count() % __cd(__rhs).count()); 6011: } 6011: 6011: 6011: template 6011: constexpr bool 6011: operator==(const duration<_Rep1, _Period1>& __lhs, 6011: const duration<_Rep2, _Period2>& __rhs) 6011: { 6011: typedef duration<_Rep1, _Period1> __dur1; 6011: typedef duration<_Rep2, _Period2> __dur2; 6011: typedef typename common_type<__dur1,__dur2>::type __ct; 6011: return __ct(__lhs).count() == __ct(__rhs).count(); 6011: } 6011: 6011: template 6011: constexpr bool 6011: operator<(const duration<_Rep1, _Period1>& __lhs, 6011: const duration<_Rep2, _Period2>& __rhs) 6011: { 6011: typedef duration<_Rep1, _Period1> __dur1; 6011: typedef duration<_Rep2, _Period2> __dur2; 6011: typedef typename common_type<__dur1,__dur2>::type __ct; 6011: return __ct(__lhs).count() < __ct(__rhs).count(); 6011: } 6011: 6011: template 6011: constexpr bool 6011: operator!=(const duration<_Rep1, _Period1>& __lhs, 6011: const duration<_Rep2, _Period2>& __rhs) 6011: { return !(__lhs == __rhs); } 6011: 6011: template 6011: constexpr bool 6011: operator<=(const duration<_Rep1, _Period1>& __lhs, 6011: const duration<_Rep2, _Period2>& __rhs) 6011: { return !(__rhs < __lhs); } 6011: 6011: template 6011: constexpr bool 6011: operator>(const duration<_Rep1, _Period1>& __lhs, 6011: const duration<_Rep2, _Period2>& __rhs) 6011: { return __rhs < __lhs; } 6011: 6011: template 6011: constexpr bool 6011: operator>=(const duration<_Rep1, _Period1>& __lhs, 6011: const duration<_Rep2, _Period2>& __rhs) 6011: { return !(__lhs < __rhs); } 6011: 6011: 6011: typedef duration nanoseconds; 6011: 6011: 6011: typedef duration microseconds; 6011: 6011: 6011: typedef duration milliseconds; 6011: 6011: 6011: typedef duration seconds; 6011: 6011: 6011: typedef duration> minutes; 6011: 6011: 6011: typedef duration> hours; 6011: 6011: 6011: template 6011: struct time_point 6011: { 6011: typedef _Clock clock; 6011: typedef _Dur duration; 6011: typedef typename duration::rep rep; 6011: typedef typename duration::period period; 6011: 6011: constexpr time_point() : __d(duration::zero()) 6011: { } 6011: 6011: constexpr explicit time_point(const duration& __dur) 6011: : __d(__dur) 6011: { } 6011: 6011: 6011: template>> 6011: constexpr time_point(const time_point& __t) 6011: : __d(__t.time_since_epoch()) 6011: { } 6011: 6011: 6011: constexpr duration 6011: time_since_epoch() const 6011: { return __d; } 6011: 6011: 6011: time_point& 6011: operator+=(const duration& __dur) 6011: { 6011: __d += __dur; 6011: return *this; 6011: } 6011: 6011: time_point& 6011: operator-=(const duration& __dur) 6011: { 6011: __d -= __dur; 6011: return *this; 6011: } 6011: 6011: 6011: static constexpr time_point 6011: min() 6011: { return time_point(duration::min()); } 6011: 6011: static constexpr time_point 6011: max() 6011: { return time_point(duration::max()); } 6011: 6011: private: 6011: duration __d; 6011: }; 6011: 6011: 6011: template 6011: constexpr typename enable_if<__is_duration<_ToDur>::value, 6011: time_point<_Clock, _ToDur>>::type 6011: time_point_cast(const time_point<_Clock, _Dur>& __t) 6011: { 6011: typedef time_point<_Clock, _ToDur> __time_point; 6011: return __time_point(duration_cast<_ToDur>(__t.time_since_epoch())); 6011: } 6011: # 707 "/usr/include/c++/8/chrono" 3 6011: template 6011: constexpr time_point<_Clock, 6011: typename common_type<_Dur1, duration<_Rep2, _Period2>>::type> 6011: operator+(const time_point<_Clock, _Dur1>& __lhs, 6011: const duration<_Rep2, _Period2>& __rhs) 6011: { 6011: typedef duration<_Rep2, _Period2> __dur2; 6011: typedef typename common_type<_Dur1,__dur2>::type __ct; 6011: typedef time_point<_Clock, __ct> __time_point; 6011: return __time_point(__lhs.time_since_epoch() + __rhs); 6011: } 6011: 6011: template 6011: constexpr time_point<_Clock, 6011: typename common_type, _Dur2>::type> 6011: operator+(const duration<_Rep1, _Period1>& __lhs, 6011: const time_point<_Clock, _Dur2>& __rhs) 6011: { 6011: typedef duration<_Rep1, _Period1> __dur1; 6011: typedef typename common_type<__dur1,_Dur2>::type __ct; 6011: typedef time_point<_Clock, __ct> __time_point; 6011: return __time_point(__rhs.time_since_epoch() + __lhs); 6011: } 6011: 6011: template 6011: constexpr time_point<_Clock, 6011: typename common_type<_Dur1, duration<_Rep2, _Period2>>::type> 6011: operator-(const time_point<_Clock, _Dur1>& __lhs, 6011: const duration<_Rep2, _Period2>& __rhs) 6011: { 6011: typedef duration<_Rep2, _Period2> __dur2; 6011: typedef typename common_type<_Dur1,__dur2>::type __ct; 6011: typedef time_point<_Clock, __ct> __time_point; 6011: return __time_point(__lhs.time_since_epoch() -__rhs); 6011: } 6011: 6011: template 6011: constexpr typename common_type<_Dur1, _Dur2>::type 6011: operator-(const time_point<_Clock, _Dur1>& __lhs, 6011: const time_point<_Clock, _Dur2>& __rhs) 6011: { return __lhs.time_since_epoch() - __rhs.time_since_epoch(); } 6011: 6011: template 6011: constexpr bool 6011: operator==(const time_point<_Clock, _Dur1>& __lhs, 6011: const time_point<_Clock, _Dur2>& __rhs) 6011: { return __lhs.time_since_epoch() == __rhs.time_since_epoch(); } 6011: 6011: template 6011: constexpr bool 6011: operator!=(const time_point<_Clock, _Dur1>& __lhs, 6011: const time_point<_Clock, _Dur2>& __rhs) 6011: { return !(__lhs == __rhs); } 6011: 6011: template 6011: constexpr bool 6011: operator<(const time_point<_Clock, _Dur1>& __lhs, 6011: const time_point<_Clock, _Dur2>& __rhs) 6011: { return __lhs.time_since_epoch() < __rhs.time_since_epoch(); } 6011: 6011: template 6011: constexpr bool 6011: operator<=(const time_point<_Clock, _Dur1>& __lhs, 6011: const time_point<_Clock, _Dur2>& __rhs) 6011: { return !(__rhs < __lhs); } 6011: 6011: template 6011: constexpr bool 6011: operator>(const time_point<_Clock, _Dur1>& __lhs, 6011: const time_point<_Clock, _Dur2>& __rhs) 6011: { return __rhs < __lhs; } 6011: 6011: template 6011: constexpr bool 6011: operator>=(const time_point<_Clock, _Dur1>& __lhs, 6011: const time_point<_Clock, _Dur2>& __rhs) 6011: { return !(__lhs < __rhs); } 6011: # 807 "/usr/include/c++/8/chrono" 3 6011: inline namespace _V2 { 6011: 6011: 6011: 6011: 6011: 6011: 6011: struct system_clock 6011: { 6011: typedef chrono::nanoseconds duration; 6011: typedef duration::rep rep; 6011: typedef duration::period period; 6011: typedef chrono::time_point time_point; 6011: 6011: static_assert(system_clock::duration::min() 6011: < system_clock::duration::zero(), 6011: "a clock's minimum duration cannot be less than its epoch"); 6011: 6011: static constexpr bool is_steady = false; 6011: 6011: static time_point 6011: now() noexcept; 6011: 6011: 6011: static std::time_t 6011: to_time_t(const time_point& __t) noexcept 6011: { 6011: return std::time_t(duration_cast 6011: (__t.time_since_epoch()).count()); 6011: } 6011: 6011: static time_point 6011: from_time_t(std::time_t __t) noexcept 6011: { 6011: typedef chrono::time_point __from; 6011: return time_point_cast 6011: (__from(chrono::seconds(__t))); 6011: } 6011: }; 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: struct steady_clock 6011: { 6011: typedef chrono::nanoseconds duration; 6011: typedef duration::rep rep; 6011: typedef duration::period period; 6011: typedef chrono::time_point time_point; 6011: 6011: static constexpr bool is_steady = true; 6011: 6011: static time_point 6011: now() noexcept; 6011: }; 6011: # 874 "/usr/include/c++/8/chrono" 3 6011: using high_resolution_clock = system_clock; 6011: 6011: } 6011: } 6011: # 976 "/usr/include/c++/8/chrono" 3 6011: 6011: } 6011: # 5 "clock.hh" 2 6011: 6011: 6011: # 6 "clock.hh" 6011: namespace Kakoune 6011: { 6011: 6011: using Clock = std::chrono::steady_clock; 6011: using TimePoint = Clock::time_point; 6011: 6011: } 6011: # 5 "buffer.hh" 2 6011: 6011: 6011: # 1 "safe_ptr.hh" 1 6011: 6011: 6011: 6011: 6011: 6011: 6011: # 1 "ref_ptr.hh" 1 6011: 6011: 6011: 6011: 6011: 6011: namespace Kakoune 6011: { 6011: 6011: struct RefCountable 6011: { 6011: int refcount = 0; 6011: virtual ~RefCountable() = default; 6011: }; 6011: 6011: struct RefCountablePolicy 6011: { 6011: static void inc_ref(RefCountable* r, void*) { ++r->refcount; } 6011: static void dec_ref(RefCountable* r, void*) { if (--r->refcount == 0) delete r; } 6011: static void ptr_moved(RefCountable*, void*, void*) noexcept {} 6011: }; 6011: 6011: template 6011: struct RefPtr 6011: { 6011: RefPtr() = default; 6011: explicit RefPtr(T* ptr) : m_ptr(ptr) { acquire(); } 6011: ~RefPtr() { release(); } 6011: RefPtr(const RefPtr& other) : m_ptr(other.m_ptr) { acquire(); } 6011: RefPtr(RefPtr&& other) 6011: noexcept(noexcept(std::declval().moved(nullptr))) 6011: : m_ptr(other.m_ptr) { other.m_ptr = nullptr; moved(&other); } 6011: 6011: RefPtr& operator=(const RefPtr& other) 6011: { 6011: if (other.m_ptr != m_ptr) 6011: { 6011: release(); 6011: m_ptr = other.m_ptr; 6011: acquire(); 6011: } 6011: return *this; 6011: } 6011: 6011: RefPtr& operator=(RefPtr&& other) 6011: { 6011: release(); 6011: m_ptr = other.m_ptr; 6011: other.m_ptr = nullptr; 6011: moved(&other); 6011: return *this; 6011: } 6011: 6011: RefPtr& operator=(T* ptr) 6011: { 6011: if (ptr != m_ptr) 6011: { 6011: release(); 6011: m_ptr = ptr; 6011: acquire(); 6011: } 6011: return *this; 6011: } 6011: 6011: [[gnu::always_inline]] 6011: T* operator->() const { return m_ptr; } 6011: [[gnu::always_inline]] 6011: T& operator*() const { return *m_ptr; } 6011: 6011: [[gnu::always_inline]] 6011: T* get() const { return m_ptr; } 6011: 6011: [[gnu::always_inline]] 6011: explicit operator bool() const { return m_ptr; } 6011: 6011: void reset(T* ptr = nullptr) 6011: { 6011: if (ptr == m_ptr) 6011: return; 6011: release(); 6011: m_ptr = ptr; 6011: acquire(); 6011: } 6011: 6011: friend bool operator==(const RefPtr& lhs, const RefPtr& rhs) { return lhs.m_ptr == rhs.m_ptr; } 6011: friend bool operator!=(const RefPtr& lhs, const RefPtr& rhs) { return lhs.m_ptr != rhs.m_ptr; } 6011: 6011: private: 6011: T* m_ptr = nullptr; 6011: 6011: [[gnu::always_inline]] 6011: void acquire() 6011: { 6011: if (m_ptr) 6011: Policy::inc_ref(m_ptr, this); 6011: } 6011: 6011: [[gnu::always_inline]] 6011: void release() 6011: { 6011: if (m_ptr) 6011: Policy::dec_ref(m_ptr, this); 6011: m_ptr = nullptr; 6011: } 6011: 6011: [[gnu::always_inline]] 6011: void moved(void* from) 6011: noexcept(noexcept(Policy::ptr_moved(nullptr, nullptr, nullptr))) 6011: { 6011: if (m_ptr) 6011: Policy::ptr_moved(m_ptr, from, this); 6011: } 6011: }; 6011: 6011: } 6011: # 8 "safe_ptr.hh" 2 6011: # 18 "safe_ptr.hh" 6011: namespace Kakoune 6011: { 6011: 6011: 6011: 6011: class SafeCountable 6011: { 6011: public: 6011: 6011: SafeCountable() : m_count(0) {} 6011: ~SafeCountable() 6011: { 6011: if (not (m_count == 0)) on_assert_failed("assert failed \"" "m_count == 0" "\" at " "safe_ptr.hh" ":" "30"); 6011: 6011: 6011: 6011: } 6011: 6011: private: 6011: friend struct SafeCountablePolicy; 6011: # 48 "safe_ptr.hh" 6011: mutable int m_count; 6011: 6011: }; 6011: 6011: struct SafeCountablePolicy 6011: { 6011: 6011: static void inc_ref(const SafeCountable* sc, void* ptr) 6011: { 6011: ++sc->m_count; 6011: 6011: 6011: 6011: } 6011: 6011: static void dec_ref(const SafeCountable* sc, void* ptr) 6011: { 6011: --sc->m_count; 6011: if (not (sc->m_count >= 0)) on_assert_failed("assert failed \"" "sc->m_count >= 0" "\" at " "safe_ptr.hh" ":" "66"); 6011: 6011: 6011: 6011: 6011: 6011: 6011: } 6011: 6011: static void ptr_moved(const SafeCountable* sc, void* from, void* to) 6011: { 6011: 6011: 6011: 6011: 6011: 6011: 6011: } 6011: 6011: 6011: 6011: 6011: 6011: }; 6011: 6011: template 6011: using SafePtr = RefPtr; 6011: 6011: } 6011: # 8 "buffer.hh" 2 6011: # 1 "scope.hh" 1 6011: 6011: 6011: 6011: # 1 "alias_registry.hh" 1 6011: 6011: 6011: 6011: 6011: 6011: # 1 "id_map.hh" 1 6011: 6011: 6011: 6011: 6011: 6011: 6011: # 1 "/usr/include/c++/8/algorithm" 1 3 6011: # 58 "/usr/include/c++/8/algorithm" 3 6011: 6011: # 59 "/usr/include/c++/8/algorithm" 3 6011: 6011: 6011: 6011: # 1 "/usr/include/c++/8/bits/stl_algo.h" 1 3 6011: # 59 "/usr/include/c++/8/bits/stl_algo.h" 3 6011: # 1 "/usr/include/c++/8/cstdlib" 1 3 6011: # 39 "/usr/include/c++/8/cstdlib" 3 6011: 6011: # 40 "/usr/include/c++/8/cstdlib" 3 6011: # 60 "/usr/include/c++/8/bits/stl_algo.h" 2 3 6011: # 1 "/usr/include/c++/8/bits/algorithmfwd.h" 1 3 6011: # 33 "/usr/include/c++/8/bits/algorithmfwd.h" 3 6011: 6011: # 34 "/usr/include/c++/8/bits/algorithmfwd.h" 3 6011: # 42 "/usr/include/c++/8/bits/algorithmfwd.h" 3 6011: 6011: # 42 "/usr/include/c++/8/bits/algorithmfwd.h" 3 6011: namespace std __attribute__ ((__visibility__ ("default"))) 6011: { 6011: 6011: # 195 "/usr/include/c++/8/bits/algorithmfwd.h" 3 6011: template 6011: bool 6011: all_of(_IIter, _IIter, _Predicate); 6011: 6011: template 6011: bool 6011: any_of(_IIter, _IIter, _Predicate); 6011: 6011: 6011: template 6011: bool 6011: binary_search(_FIter, _FIter, const _Tp&); 6011: 6011: template 6011: bool 6011: binary_search(_FIter, _FIter, const _Tp&, _Compare); 6011: # 224 "/usr/include/c++/8/bits/algorithmfwd.h" 3 6011: template 6011: _OIter 6011: copy(_IIter, _IIter, _OIter); 6011: 6011: template 6011: _BIter2 6011: copy_backward(_BIter1, _BIter1, _BIter2); 6011: 6011: 6011: template 6011: _OIter 6011: copy_if(_IIter, _IIter, _OIter, _Predicate); 6011: 6011: template 6011: _OIter 6011: copy_n(_IIter, _Size, _OIter); 6011: 6011: 6011: 6011: 6011: 6011: template 6011: pair<_FIter, _FIter> 6011: equal_range(_FIter, _FIter, const _Tp&); 6011: 6011: template 6011: pair<_FIter, _FIter> 6011: equal_range(_FIter, _FIter, const _Tp&, _Compare); 6011: 6011: template 6011: void 6011: fill(_FIter, _FIter, const _Tp&); 6011: 6011: template 6011: _OIter 6011: fill_n(_OIter, _Size, const _Tp&); 6011: 6011: 6011: 6011: template 6011: _FIter1 6011: find_end(_FIter1, _FIter1, _FIter2, _FIter2); 6011: 6011: template 6011: _FIter1 6011: find_end(_FIter1, _FIter1, _FIter2, _FIter2, _BinaryPredicate); 6011: 6011: 6011: 6011: 6011: 6011: template 6011: _IIter 6011: find_if_not(_IIter, _IIter, _Predicate); 6011: 6011: 6011: 6011: 6011: 6011: 6011: template 6011: bool 6011: includes(_IIter1, _IIter1, _IIter2, _IIter2); 6011: 6011: template 6011: bool 6011: includes(_IIter1, _IIter1, _IIter2, _IIter2, _Compare); 6011: 6011: template 6011: void 6011: inplace_merge(_BIter, _BIter, _BIter); 6011: 6011: template 6011: void 6011: inplace_merge(_BIter, _BIter, _BIter, _Compare); 6011: 6011: 6011: template 6011: bool 6011: is_heap(_RAIter, _RAIter); 6011: 6011: template 6011: bool 6011: is_heap(_RAIter, _RAIter, _Compare); 6011: 6011: template 6011: _RAIter 6011: is_heap_until(_RAIter, _RAIter); 6011: 6011: template 6011: _RAIter 6011: is_heap_until(_RAIter, _RAIter, _Compare); 6011: 6011: template 6011: bool 6011: is_partitioned(_IIter, _IIter, _Predicate); 6011: 6011: template 6011: bool 6011: is_permutation(_FIter1, _FIter1, _FIter2); 6011: 6011: template 6011: bool 6011: is_permutation(_FIter1, _FIter1, _FIter2, _BinaryPredicate); 6011: 6011: template 6011: bool 6011: is_sorted(_FIter, _FIter); 6011: 6011: template 6011: bool 6011: is_sorted(_FIter, _FIter, _Compare); 6011: 6011: template 6011: _FIter 6011: is_sorted_until(_FIter, _FIter); 6011: 6011: template 6011: _FIter 6011: is_sorted_until(_FIter, _FIter, _Compare); 6011: 6011: 6011: template 6011: void 6011: iter_swap(_FIter1, _FIter2); 6011: 6011: template 6011: _FIter 6011: lower_bound(_FIter, _FIter, const _Tp&); 6011: 6011: template 6011: _FIter 6011: lower_bound(_FIter, _FIter, const _Tp&, _Compare); 6011: 6011: template 6011: void 6011: make_heap(_RAIter, _RAIter); 6011: 6011: template 6011: void 6011: make_heap(_RAIter, _RAIter, _Compare); 6011: 6011: template 6011: 6011: const _Tp& 6011: max(const _Tp&, const _Tp&); 6011: 6011: template 6011: 6011: const _Tp& 6011: max(const _Tp&, const _Tp&, _Compare); 6011: 6011: 6011: 6011: 6011: template 6011: 6011: const _Tp& 6011: min(const _Tp&, const _Tp&); 6011: 6011: template 6011: 6011: const _Tp& 6011: min(const _Tp&, const _Tp&, _Compare); 6011: 6011: 6011: 6011: 6011: template 6011: 6011: pair 6011: minmax(const _Tp&, const _Tp&); 6011: 6011: template 6011: 6011: pair 6011: minmax(const _Tp&, const _Tp&, _Compare); 6011: 6011: template 6011: 6011: pair<_FIter, _FIter> 6011: minmax_element(_FIter, _FIter); 6011: 6011: template 6011: 6011: pair<_FIter, _FIter> 6011: minmax_element(_FIter, _FIter, _Compare); 6011: 6011: template 6011: 6011: _Tp 6011: min(initializer_list<_Tp>); 6011: 6011: template 6011: 6011: _Tp 6011: min(initializer_list<_Tp>, _Compare); 6011: 6011: template 6011: 6011: _Tp 6011: max(initializer_list<_Tp>); 6011: 6011: template 6011: 6011: _Tp 6011: max(initializer_list<_Tp>, _Compare); 6011: 6011: template 6011: 6011: pair<_Tp, _Tp> 6011: minmax(initializer_list<_Tp>); 6011: 6011: template 6011: 6011: pair<_Tp, _Tp> 6011: minmax(initializer_list<_Tp>, _Compare); 6011: 6011: 6011: 6011: 6011: template 6011: bool 6011: next_permutation(_BIter, _BIter); 6011: 6011: template 6011: bool 6011: next_permutation(_BIter, _BIter, _Compare); 6011: 6011: 6011: template 6011: bool 6011: none_of(_IIter, _IIter, _Predicate); 6011: 6011: 6011: 6011: 6011: 6011: template 6011: _RAIter 6011: partial_sort_copy(_IIter, _IIter, _RAIter, _RAIter); 6011: 6011: template 6011: _RAIter 6011: partial_sort_copy(_IIter, _IIter, _RAIter, _RAIter, _Compare); 6011: 6011: 6011: 6011: 6011: template 6011: pair<_OIter1, _OIter2> 6011: partition_copy(_IIter, _IIter, _OIter1, _OIter2, _Predicate); 6011: 6011: template 6011: _FIter 6011: partition_point(_FIter, _FIter, _Predicate); 6011: 6011: 6011: template 6011: void 6011: pop_heap(_RAIter, _RAIter); 6011: 6011: template 6011: void 6011: pop_heap(_RAIter, _RAIter, _Compare); 6011: 6011: template 6011: bool 6011: prev_permutation(_BIter, _BIter); 6011: 6011: template 6011: bool 6011: prev_permutation(_BIter, _BIter, _Compare); 6011: 6011: template 6011: void 6011: push_heap(_RAIter, _RAIter); 6011: 6011: template 6011: void 6011: push_heap(_RAIter, _RAIter, _Compare); 6011: 6011: 6011: 6011: template 6011: _FIter 6011: remove(_FIter, _FIter, const _Tp&); 6011: 6011: template 6011: _FIter 6011: remove_if(_FIter, _FIter, _Predicate); 6011: 6011: template 6011: _OIter 6011: remove_copy(_IIter, _IIter, _OIter, const _Tp&); 6011: 6011: template 6011: _OIter 6011: remove_copy_if(_IIter, _IIter, _OIter, _Predicate); 6011: 6011: 6011: 6011: template 6011: _OIter 6011: replace_copy(_IIter, _IIter, _OIter, const _Tp&, const _Tp&); 6011: 6011: template 6011: _OIter 6011: replace_copy_if(_Iter, _Iter, _OIter, _Predicate, const _Tp&); 6011: 6011: 6011: 6011: template 6011: void 6011: reverse(_BIter, _BIter); 6011: 6011: template 6011: _OIter 6011: reverse_copy(_BIter, _BIter, _OIter); 6011: 6011: inline namespace _V2 6011: { 6011: template 6011: _FIter 6011: rotate(_FIter, _FIter, _FIter); 6011: } 6011: 6011: template 6011: _OIter 6011: rotate_copy(_FIter, _FIter, _FIter, _OIter); 6011: # 565 "/usr/include/c++/8/bits/algorithmfwd.h" 3 6011: template 6011: void 6011: shuffle(_RAIter, _RAIter, _UGenerator&&); 6011: 6011: 6011: template 6011: void 6011: sort_heap(_RAIter, _RAIter); 6011: 6011: template 6011: void 6011: sort_heap(_RAIter, _RAIter, _Compare); 6011: 6011: template 6011: _BIter 6011: stable_partition(_BIter, _BIter, _Predicate); 6011: # 594 "/usr/include/c++/8/bits/algorithmfwd.h" 3 6011: template 6011: _FIter2 6011: swap_ranges(_FIter1, _FIter1, _FIter2); 6011: 6011: 6011: 6011: template 6011: _FIter 6011: unique(_FIter, _FIter); 6011: 6011: template 6011: _FIter 6011: unique(_FIter, _FIter, _BinaryPredicate); 6011: 6011: 6011: 6011: template 6011: _FIter 6011: upper_bound(_FIter, _FIter, const _Tp&); 6011: 6011: template 6011: _FIter 6011: upper_bound(_FIter, _FIter, const _Tp&, _Compare); 6011: 6011: 6011: 6011: template 6011: _FIter 6011: adjacent_find(_FIter, _FIter); 6011: 6011: template 6011: _FIter 6011: adjacent_find(_FIter, _FIter, _BinaryPredicate); 6011: 6011: template 6011: typename iterator_traits<_IIter>::difference_type 6011: count(_IIter, _IIter, const _Tp&); 6011: 6011: template 6011: typename iterator_traits<_IIter>::difference_type 6011: count_if(_IIter, _IIter, _Predicate); 6011: 6011: template 6011: bool 6011: equal(_IIter1, _IIter1, _IIter2); 6011: 6011: template 6011: bool 6011: equal(_IIter1, _IIter1, _IIter2, _BinaryPredicate); 6011: 6011: template 6011: _IIter 6011: find(_IIter, _IIter, const _Tp&); 6011: 6011: template 6011: _FIter1 6011: find_first_of(_FIter1, _FIter1, _FIter2, _FIter2); 6011: 6011: template 6011: _FIter1 6011: find_first_of(_FIter1, _FIter1, _FIter2, _FIter2, _BinaryPredicate); 6011: 6011: template 6011: _IIter 6011: find_if(_IIter, _IIter, _Predicate); 6011: 6011: template 6011: _Funct 6011: for_each(_IIter, _IIter, _Funct); 6011: 6011: template 6011: void 6011: generate(_FIter, _FIter, _Generator); 6011: 6011: template 6011: _OIter 6011: generate_n(_OIter, _Size, _Generator); 6011: 6011: template 6011: bool 6011: lexicographical_compare(_IIter1, _IIter1, _IIter2, _IIter2); 6011: 6011: template 6011: bool 6011: lexicographical_compare(_IIter1, _IIter1, _IIter2, _IIter2, _Compare); 6011: 6011: template 6011: 6011: _FIter 6011: max_element(_FIter, _FIter); 6011: 6011: template 6011: 6011: _FIter 6011: max_element(_FIter, _FIter, _Compare); 6011: 6011: template 6011: _OIter 6011: merge(_IIter1, _IIter1, _IIter2, _IIter2, _OIter); 6011: 6011: template 6011: _OIter 6011: merge(_IIter1, _IIter1, _IIter2, _IIter2, _OIter, _Compare); 6011: 6011: template 6011: 6011: _FIter 6011: min_element(_FIter, _FIter); 6011: 6011: template 6011: 6011: _FIter 6011: min_element(_FIter, _FIter, _Compare); 6011: 6011: template 6011: pair<_IIter1, _IIter2> 6011: mismatch(_IIter1, _IIter1, _IIter2); 6011: 6011: template 6011: pair<_IIter1, _IIter2> 6011: mismatch(_IIter1, _IIter1, _IIter2, _BinaryPredicate); 6011: 6011: template 6011: void 6011: nth_element(_RAIter, _RAIter, _RAIter); 6011: 6011: template 6011: void 6011: nth_element(_RAIter, _RAIter, _RAIter, _Compare); 6011: 6011: template 6011: void 6011: partial_sort(_RAIter, _RAIter, _RAIter); 6011: 6011: template 6011: void 6011: partial_sort(_RAIter, _RAIter, _RAIter, _Compare); 6011: 6011: template 6011: _BIter 6011: partition(_BIter, _BIter, _Predicate); 6011: 6011: template 6011: void 6011: random_shuffle(_RAIter, _RAIter); 6011: 6011: template 6011: void 6011: random_shuffle(_RAIter, _RAIter, 6011: 6011: _Generator&&); 6011: 6011: 6011: 6011: 6011: template 6011: void 6011: replace(_FIter, _FIter, const _Tp&, const _Tp&); 6011: 6011: template 6011: void 6011: replace_if(_FIter, _FIter, _Predicate, const _Tp&); 6011: 6011: template 6011: _FIter1 6011: search(_FIter1, _FIter1, _FIter2, _FIter2); 6011: 6011: template 6011: _FIter1 6011: search(_FIter1, _FIter1, _FIter2, _FIter2, _BinaryPredicate); 6011: 6011: template 6011: _FIter 6011: search_n(_FIter, _FIter, _Size, const _Tp&); 6011: 6011: template 6011: _FIter 6011: search_n(_FIter, _FIter, _Size, const _Tp&, _BinaryPredicate); 6011: 6011: template 6011: _OIter 6011: set_difference(_IIter1, _IIter1, _IIter2, _IIter2, _OIter); 6011: 6011: template 6011: _OIter 6011: set_difference(_IIter1, _IIter1, _IIter2, _IIter2, _OIter, _Compare); 6011: 6011: template 6011: _OIter 6011: set_intersection(_IIter1, _IIter1, _IIter2, _IIter2, _OIter); 6011: 6011: template 6011: _OIter 6011: set_intersection(_IIter1, _IIter1, _IIter2, _IIter2, _OIter, _Compare); 6011: 6011: template 6011: _OIter 6011: set_symmetric_difference(_IIter1, _IIter1, _IIter2, _IIter2, _OIter); 6011: 6011: template 6011: _OIter 6011: set_symmetric_difference(_IIter1, _IIter1, _IIter2, _IIter2, 6011: _OIter, _Compare); 6011: 6011: template 6011: _OIter 6011: set_union(_IIter1, _IIter1, _IIter2, _IIter2, _OIter); 6011: 6011: template 6011: _OIter 6011: set_union(_IIter1, _IIter1, _IIter2, _IIter2, _OIter, _Compare); 6011: 6011: template 6011: void 6011: sort(_RAIter, _RAIter); 6011: 6011: template 6011: void 6011: sort(_RAIter, _RAIter, _Compare); 6011: 6011: template 6011: void 6011: stable_sort(_RAIter, _RAIter); 6011: 6011: template 6011: void 6011: stable_sort(_RAIter, _RAIter, _Compare); 6011: 6011: template 6011: _OIter 6011: transform(_IIter, _IIter, _OIter, _UnaryOperation); 6011: 6011: template 6011: _OIter 6011: transform(_IIter1, _IIter1, _IIter2, _OIter, _BinaryOperation); 6011: 6011: template 6011: _OIter 6011: unique_copy(_IIter, _IIter, _OIter); 6011: 6011: template 6011: _OIter 6011: unique_copy(_IIter, _IIter, _OIter, _BinaryPredicate); 6011: 6011: 6011: 6011: } 6011: # 61 "/usr/include/c++/8/bits/stl_algo.h" 2 3 6011: # 1 "/usr/include/c++/8/bits/stl_heap.h" 1 3 6011: # 62 "/usr/include/c++/8/bits/stl_heap.h" 3 6011: namespace std __attribute__ ((__visibility__ ("default"))) 6011: { 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: template 6011: _Distance 6011: __is_heap_until(_RandomAccessIterator __first, _Distance __n, 6011: _Compare& __comp) 6011: { 6011: _Distance __parent = 0; 6011: for (_Distance __child = 1; __child < __n; ++__child) 6011: { 6011: if (__comp(__first + __parent, __first + __child)) 6011: return __child; 6011: if ((__child & 1) == 0) 6011: ++__parent; 6011: } 6011: return __n; 6011: } 6011: 6011: 6011: 6011: template 6011: inline bool 6011: __is_heap(_RandomAccessIterator __first, _Distance __n) 6011: { 6011: __gnu_cxx::__ops::_Iter_less_iter __comp; 6011: return std::__is_heap_until(__first, __n, __comp) == __n; 6011: } 6011: 6011: template 6011: inline bool 6011: __is_heap(_RandomAccessIterator __first, _Compare __comp, _Distance __n) 6011: { 6011: typedef __decltype(__comp) _Cmp; 6011: __gnu_cxx::__ops::_Iter_comp_iter<_Cmp> __cmp(std::move(__comp)); 6011: return std::__is_heap_until(__first, __n, __cmp) == __n; 6011: } 6011: 6011: template 6011: inline bool 6011: __is_heap(_RandomAccessIterator __first, _RandomAccessIterator __last) 6011: { return std::__is_heap(__first, std::distance(__first, __last)); } 6011: 6011: template 6011: inline bool 6011: __is_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, 6011: _Compare __comp) 6011: { 6011: return std::__is_heap(__first, std::move(__comp), 6011: std::distance(__first, __last)); 6011: } 6011: 6011: 6011: 6011: 6011: template 6011: void 6011: __push_heap(_RandomAccessIterator __first, 6011: _Distance __holeIndex, _Distance __topIndex, _Tp __value, 6011: _Compare& __comp) 6011: { 6011: _Distance __parent = (__holeIndex - 1) / 2; 6011: while (__holeIndex > __topIndex && __comp(__first + __parent, __value)) 6011: { 6011: *(__first + __holeIndex) = std::move(*(__first + __parent)); 6011: __holeIndex = __parent; 6011: __parent = (__holeIndex - 1) / 2; 6011: } 6011: *(__first + __holeIndex) = std::move(__value); 6011: } 6011: # 152 "/usr/include/c++/8/bits/stl_heap.h" 3 6011: template 6011: inline void 6011: push_heap(_RandomAccessIterator __first, _RandomAccessIterator __last) 6011: { 6011: typedef typename iterator_traits<_RandomAccessIterator>::value_type 6011: _ValueType; 6011: typedef typename iterator_traits<_RandomAccessIterator>::difference_type 6011: _DistanceType; 6011: 6011: 6011: 6011: 6011: 6011: ; 6011: ; 6011: ; 6011: 6011: __gnu_cxx::__ops::_Iter_less_val __comp; 6011: _ValueType __value = std::move(*(__last - 1)); 6011: std::__push_heap(__first, _DistanceType((__last - __first) - 1), 6011: _DistanceType(0), std::move(__value), __comp); 6011: } 6011: # 187 "/usr/include/c++/8/bits/stl_heap.h" 3 6011: template 6011: inline void 6011: push_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, 6011: _Compare __comp) 6011: { 6011: typedef typename iterator_traits<_RandomAccessIterator>::value_type 6011: _ValueType; 6011: typedef typename iterator_traits<_RandomAccessIterator>::difference_type 6011: _DistanceType; 6011: 6011: 6011: 6011: 6011: ; 6011: ; 6011: ; 6011: 6011: __decltype(__gnu_cxx::__ops::__iter_comp_val(std::move(__comp))) 6011: __cmp(std::move(__comp)); 6011: _ValueType __value = std::move(*(__last - 1)); 6011: std::__push_heap(__first, _DistanceType((__last - __first) - 1), 6011: _DistanceType(0), std::move(__value), __cmp); 6011: } 6011: 6011: template 6011: void 6011: __adjust_heap(_RandomAccessIterator __first, _Distance __holeIndex, 6011: _Distance __len, _Tp __value, _Compare __comp) 6011: { 6011: const _Distance __topIndex = __holeIndex; 6011: _Distance __secondChild = __holeIndex; 6011: while (__secondChild < (__len - 1) / 2) 6011: { 6011: __secondChild = 2 * (__secondChild + 1); 6011: if (__comp(__first + __secondChild, 6011: __first + (__secondChild - 1))) 6011: __secondChild--; 6011: *(__first + __holeIndex) = std::move(*(__first + __secondChild)); 6011: __holeIndex = __secondChild; 6011: } 6011: if ((__len & 1) == 0 && __secondChild == (__len - 2) / 2) 6011: { 6011: __secondChild = 2 * (__secondChild + 1); 6011: *(__first + __holeIndex) = std::move(*(__first + (__secondChild - 1))) 6011: ; 6011: __holeIndex = __secondChild - 1; 6011: } 6011: __decltype(__gnu_cxx::__ops::__iter_comp_val(std::move(__comp))) 6011: __cmp(std::move(__comp)); 6011: std::__push_heap(__first, __holeIndex, __topIndex, 6011: std::move(__value), __cmp); 6011: } 6011: 6011: template 6011: inline void 6011: __pop_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, 6011: _RandomAccessIterator __result, _Compare& __comp) 6011: { 6011: typedef typename iterator_traits<_RandomAccessIterator>::value_type 6011: _ValueType; 6011: typedef typename iterator_traits<_RandomAccessIterator>::difference_type 6011: _DistanceType; 6011: 6011: _ValueType __value = std::move(*__result); 6011: *__result = std::move(*__first); 6011: std::__adjust_heap(__first, _DistanceType(0), 6011: _DistanceType(__last - __first), 6011: std::move(__value), __comp); 6011: } 6011: # 269 "/usr/include/c++/8/bits/stl_heap.h" 3 6011: template 6011: inline void 6011: pop_heap(_RandomAccessIterator __first, _RandomAccessIterator __last) 6011: { 6011: 6011: 6011: 6011: 6011: 6011: ; 6011: ; 6011: ; 6011: ; 6011: 6011: if (__last - __first > 1) 6011: { 6011: --__last; 6011: __gnu_cxx::__ops::_Iter_less_iter __comp; 6011: std::__pop_heap(__first, __last, __last, __comp); 6011: } 6011: } 6011: # 302 "/usr/include/c++/8/bits/stl_heap.h" 3 6011: template 6011: inline void 6011: pop_heap(_RandomAccessIterator __first, 6011: _RandomAccessIterator __last, _Compare __comp) 6011: { 6011: 6011: 6011: 6011: ; 6011: ; 6011: ; 6011: ; 6011: 6011: if (__last - __first > 1) 6011: { 6011: typedef __decltype(__comp) _Cmp; 6011: __gnu_cxx::__ops::_Iter_comp_iter<_Cmp> __cmp(std::move(__comp)); 6011: --__last; 6011: std::__pop_heap(__first, __last, __last, __cmp); 6011: } 6011: } 6011: 6011: template 6011: void 6011: __make_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, 6011: _Compare& __comp) 6011: { 6011: typedef typename iterator_traits<_RandomAccessIterator>::value_type 6011: _ValueType; 6011: typedef typename iterator_traits<_RandomAccessIterator>::difference_type 6011: _DistanceType; 6011: 6011: if (__last - __first < 2) 6011: return; 6011: 6011: const _DistanceType __len = __last - __first; 6011: _DistanceType __parent = (__len - 2) / 2; 6011: while (true) 6011: { 6011: _ValueType __value = std::move(*(__first + __parent)); 6011: std::__adjust_heap(__first, __parent, __len, std::move(__value), 6011: __comp); 6011: if (__parent == 0) 6011: return; 6011: __parent--; 6011: } 6011: } 6011: # 358 "/usr/include/c++/8/bits/stl_heap.h" 3 6011: template 6011: inline void 6011: make_heap(_RandomAccessIterator __first, _RandomAccessIterator __last) 6011: { 6011: 6011: 6011: 6011: 6011: 6011: ; 6011: ; 6011: 6011: __gnu_cxx::__ops::_Iter_less_iter __comp; 6011: std::__make_heap(__first, __last, __comp); 6011: } 6011: # 384 "/usr/include/c++/8/bits/stl_heap.h" 3 6011: template 6011: inline void 6011: make_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, 6011: _Compare __comp) 6011: { 6011: 6011: 6011: 6011: ; 6011: ; 6011: 6011: typedef __decltype(__comp) _Cmp; 6011: __gnu_cxx::__ops::_Iter_comp_iter<_Cmp> __cmp(std::move(__comp)); 6011: std::__make_heap(__first, __last, __cmp); 6011: } 6011: 6011: template 6011: void 6011: __sort_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, 6011: _Compare& __comp) 6011: { 6011: while (__last - __first > 1) 6011: { 6011: --__last; 6011: std::__pop_heap(__first, __last, __last, __comp); 6011: } 6011: } 6011: # 420 "/usr/include/c++/8/bits/stl_heap.h" 3 6011: template 6011: inline void 6011: sort_heap(_RandomAccessIterator __first, _RandomAccessIterator __last) 6011: { 6011: 6011: 6011: 6011: 6011: 6011: ; 6011: ; 6011: ; 6011: 6011: __gnu_cxx::__ops::_Iter_less_iter __comp; 6011: std::__sort_heap(__first, __last, __comp); 6011: } 6011: # 447 "/usr/include/c++/8/bits/stl_heap.h" 3 6011: template 6011: inline void 6011: sort_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, 6011: _Compare __comp) 6011: { 6011: 6011: 6011: 6011: ; 6011: ; 6011: ; 6011: 6011: typedef __decltype(__comp) _Cmp; 6011: __gnu_cxx::__ops::_Iter_comp_iter<_Cmp> __cmp(std::move(__comp)); 6011: std::__sort_heap(__first, __last, __cmp); 6011: } 6011: # 475 "/usr/include/c++/8/bits/stl_heap.h" 3 6011: template 6011: inline _RandomAccessIterator 6011: is_heap_until(_RandomAccessIterator __first, _RandomAccessIterator __last) 6011: { 6011: 6011: 6011: 6011: 6011: 6011: ; 6011: ; 6011: 6011: __gnu_cxx::__ops::_Iter_less_iter __comp; 6011: return __first + 6011: std::__is_heap_until(__first, std::distance(__first, __last), __comp); 6011: } 6011: # 503 "/usr/include/c++/8/bits/stl_heap.h" 3 6011: template 6011: inline _RandomAccessIterator 6011: is_heap_until(_RandomAccessIterator __first, _RandomAccessIterator __last, 6011: _Compare __comp) 6011: { 6011: 6011: 6011: 6011: ; 6011: ; 6011: 6011: typedef __decltype(__comp) _Cmp; 6011: __gnu_cxx::__ops::_Iter_comp_iter<_Cmp> __cmp(std::move(__comp)); 6011: return __first 6011: + std::__is_heap_until(__first, std::distance(__first, __last), __cmp); 6011: } 6011: # 527 "/usr/include/c++/8/bits/stl_heap.h" 3 6011: template 6011: inline bool 6011: is_heap(_RandomAccessIterator __first, _RandomAccessIterator __last) 6011: { return std::is_heap_until(__first, __last) == __last; } 6011: # 540 "/usr/include/c++/8/bits/stl_heap.h" 3 6011: template 6011: inline bool 6011: is_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, 6011: _Compare __comp) 6011: { 6011: 6011: 6011: 6011: ; 6011: ; 6011: 6011: const auto __dist = std::distance(__first, __last); 6011: typedef __decltype(__comp) _Cmp; 6011: __gnu_cxx::__ops::_Iter_comp_iter<_Cmp> __cmp(std::move(__comp)); 6011: return std::__is_heap_until(__first, __dist, __cmp) == __dist; 6011: } 6011: 6011: 6011: 6011: } 6011: # 62 "/usr/include/c++/8/bits/stl_algo.h" 2 3 6011: # 1 "/usr/include/c++/8/bits/stl_tempbuf.h" 1 3 6011: # 62 "/usr/include/c++/8/bits/stl_tempbuf.h" 3 6011: namespace std __attribute__ ((__visibility__ ("default"))) 6011: { 6011: 6011: # 83 "/usr/include/c++/8/bits/stl_tempbuf.h" 3 6011: template 6011: pair<_Tp*, ptrdiff_t> 6011: get_temporary_buffer(ptrdiff_t __len) noexcept 6011: { 6011: const ptrdiff_t __max = 6011: __gnu_cxx::__numeric_traits::__max / sizeof(_Tp); 6011: if (__len > __max) 6011: __len = __max; 6011: 6011: while (__len > 0) 6011: { 6011: _Tp* __tmp = static_cast<_Tp*>(::operator new(__len * sizeof(_Tp), 6011: std::nothrow)); 6011: if (__tmp != 0) 6011: return std::pair<_Tp*, ptrdiff_t>(__tmp, __len); 6011: __len /= 2; 6011: } 6011: return std::pair<_Tp*, ptrdiff_t>(static_cast<_Tp*>(0), 0); 6011: } 6011: # 110 "/usr/include/c++/8/bits/stl_tempbuf.h" 3 6011: template 6011: inline void 6011: return_temporary_buffer(_Tp* __p) 6011: { ::operator delete(__p, std::nothrow); } 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: template 6011: class _Temporary_buffer 6011: { 6011: 6011: 6011: 6011: public: 6011: typedef _Tp value_type; 6011: typedef value_type* pointer; 6011: typedef pointer iterator; 6011: typedef ptrdiff_t size_type; 6011: 6011: protected: 6011: size_type _M_original_len; 6011: size_type _M_len; 6011: pointer _M_buffer; 6011: 6011: public: 6011: 6011: size_type 6011: size() const 6011: { return _M_len; } 6011: 6011: 6011: size_type 6011: requested_size() const 6011: { return _M_original_len; } 6011: 6011: 6011: iterator 6011: begin() 6011: { return _M_buffer; } 6011: 6011: 6011: iterator 6011: end() 6011: { return _M_buffer + _M_len; } 6011: 6011: 6011: 6011: 6011: 6011: _Temporary_buffer(_ForwardIterator __first, _ForwardIterator __last); 6011: 6011: ~_Temporary_buffer() 6011: { 6011: std::_Destroy(_M_buffer, _M_buffer + _M_len); 6011: std::return_temporary_buffer(_M_buffer); 6011: } 6011: 6011: private: 6011: 6011: _Temporary_buffer(const _Temporary_buffer&); 6011: 6011: void 6011: operator=(const _Temporary_buffer&); 6011: }; 6011: 6011: 6011: template 6011: struct __uninitialized_construct_buf_dispatch 6011: { 6011: template 6011: static void 6011: __ucr(_Pointer __first, _Pointer __last, 6011: _ForwardIterator __seed) 6011: { 6011: if(__first == __last) 6011: return; 6011: 6011: _Pointer __cur = __first; 6011: try 6011: { 6011: std::_Construct(std::__addressof(*__first), 6011: std::move(*__seed)); 6011: _Pointer __prev = __cur; 6011: ++__cur; 6011: for(; __cur != __last; ++__cur, ++__prev) 6011: std::_Construct(std::__addressof(*__cur), 6011: std::move(*__prev)); 6011: *__seed = std::move(*__prev); 6011: } 6011: catch(...) 6011: { 6011: std::_Destroy(__first, __cur); 6011: throw; 6011: } 6011: } 6011: }; 6011: 6011: template<> 6011: struct __uninitialized_construct_buf_dispatch 6011: { 6011: template 6011: static void 6011: __ucr(_Pointer, _Pointer, _ForwardIterator) { } 6011: }; 6011: # 229 "/usr/include/c++/8/bits/stl_tempbuf.h" 3 6011: template 6011: inline void 6011: __uninitialized_construct_buf(_Pointer __first, _Pointer __last, 6011: _ForwardIterator __seed) 6011: { 6011: typedef typename std::iterator_traits<_Pointer>::value_type 6011: _ValueType; 6011: 6011: std::__uninitialized_construct_buf_dispatch< 6011: __has_trivial_constructor(_ValueType)>:: 6011: __ucr(__first, __last, __seed); 6011: } 6011: 6011: template 6011: _Temporary_buffer<_ForwardIterator, _Tp>:: 6011: _Temporary_buffer(_ForwardIterator __first, _ForwardIterator __last) 6011: : _M_original_len(std::distance(__first, __last)), 6011: _M_len(0), _M_buffer(0) 6011: { 6011: try 6011: { 6011: std::pair __p(std::get_temporary_buffer< 6011: value_type>(_M_original_len)); 6011: _M_buffer = __p.first; 6011: _M_len = __p.second; 6011: if (_M_buffer) 6011: std::__uninitialized_construct_buf(_M_buffer, _M_buffer + _M_len, 6011: __first); 6011: } 6011: catch(...) 6011: { 6011: std::return_temporary_buffer(_M_buffer); 6011: _M_buffer = 0; 6011: _M_len = 0; 6011: throw; 6011: } 6011: } 6011: 6011: 6011: } 6011: # 63 "/usr/include/c++/8/bits/stl_algo.h" 2 3 6011: 6011: 6011: 6011: # 1 "/usr/include/c++/8/bits/uniform_int_dist.h" 1 3 6011: # 37 "/usr/include/c++/8/bits/uniform_int_dist.h" 3 6011: namespace std __attribute__ ((__visibility__ ("default"))) 6011: { 6011: 6011: 6011: namespace __detail 6011: { 6011: 6011: template 6011: inline bool 6011: _Power_of_2(_Tp __x) 6011: { 6011: return ((__x - 1) & __x) == 0; 6011: } 6011: } 6011: 6011: 6011: 6011: 6011: 6011: 6011: template 6011: class uniform_int_distribution 6011: { 6011: static_assert(std::is_integral<_IntType>::value, 6011: "template argument must be an integral type"); 6011: 6011: public: 6011: 6011: typedef _IntType result_type; 6011: 6011: struct param_type 6011: { 6011: typedef uniform_int_distribution<_IntType> distribution_type; 6011: 6011: explicit 6011: param_type(_IntType __a = 0, 6011: _IntType __b = std::numeric_limits<_IntType>::max()) 6011: : _M_a(__a), _M_b(__b) 6011: { 6011: ; 6011: } 6011: 6011: result_type 6011: a() const 6011: { return _M_a; } 6011: 6011: result_type 6011: b() const 6011: { return _M_b; } 6011: 6011: friend bool 6011: operator==(const param_type& __p1, const param_type& __p2) 6011: { return __p1._M_a == __p2._M_a && __p1._M_b == __p2._M_b; } 6011: 6011: friend bool 6011: operator!=(const param_type& __p1, const param_type& __p2) 6011: { return !(__p1 == __p2); } 6011: 6011: private: 6011: _IntType _M_a; 6011: _IntType _M_b; 6011: }; 6011: 6011: public: 6011: 6011: 6011: 6011: explicit 6011: uniform_int_distribution(_IntType __a = 0, 6011: _IntType __b = std::numeric_limits<_IntType>::max()) 6011: : _M_param(__a, __b) 6011: { } 6011: 6011: explicit 6011: uniform_int_distribution(const param_type& __p) 6011: : _M_param(__p) 6011: { } 6011: 6011: 6011: 6011: 6011: 6011: 6011: void 6011: reset() { } 6011: 6011: result_type 6011: a() const 6011: { return _M_param.a(); } 6011: 6011: result_type 6011: b() const 6011: { return _M_param.b(); } 6011: 6011: 6011: 6011: 6011: param_type 6011: param() const 6011: { return _M_param; } 6011: 6011: 6011: 6011: 6011: 6011: void 6011: param(const param_type& __param) 6011: { _M_param = __param; } 6011: 6011: 6011: 6011: 6011: result_type 6011: min() const 6011: { return this->a(); } 6011: 6011: 6011: 6011: 6011: result_type 6011: max() const 6011: { return this->b(); } 6011: 6011: 6011: 6011: 6011: template 6011: result_type 6011: operator()(_UniformRandomNumberGenerator& __urng) 6011: { return this->operator()(__urng, _M_param); } 6011: 6011: template 6011: result_type 6011: operator()(_UniformRandomNumberGenerator& __urng, 6011: const param_type& __p); 6011: 6011: template 6011: void 6011: __generate(_ForwardIterator __f, _ForwardIterator __t, 6011: _UniformRandomNumberGenerator& __urng) 6011: { this->__generate(__f, __t, __urng, _M_param); } 6011: 6011: template 6011: void 6011: __generate(_ForwardIterator __f, _ForwardIterator __t, 6011: _UniformRandomNumberGenerator& __urng, 6011: const param_type& __p) 6011: { this->__generate_impl(__f, __t, __urng, __p); } 6011: 6011: template 6011: void 6011: __generate(result_type* __f, result_type* __t, 6011: _UniformRandomNumberGenerator& __urng, 6011: const param_type& __p) 6011: { this->__generate_impl(__f, __t, __urng, __p); } 6011: 6011: 6011: 6011: 6011: 6011: friend bool 6011: operator==(const uniform_int_distribution& __d1, 6011: const uniform_int_distribution& __d2) 6011: { return __d1._M_param == __d2._M_param; } 6011: 6011: private: 6011: template 6011: void 6011: __generate_impl(_ForwardIterator __f, _ForwardIterator __t, 6011: _UniformRandomNumberGenerator& __urng, 6011: const param_type& __p); 6011: 6011: param_type _M_param; 6011: }; 6011: 6011: template 6011: template 6011: typename uniform_int_distribution<_IntType>::result_type 6011: uniform_int_distribution<_IntType>:: 6011: operator()(_UniformRandomNumberGenerator& __urng, 6011: const param_type& __param) 6011: { 6011: typedef typename _UniformRandomNumberGenerator::result_type 6011: _Gresult_type; 6011: typedef typename std::make_unsigned::type __utype; 6011: typedef typename std::common_type<_Gresult_type, __utype>::type 6011: __uctype; 6011: 6011: const __uctype __urngmin = __urng.min(); 6011: const __uctype __urngmax = __urng.max(); 6011: const __uctype __urngrange = __urngmax - __urngmin; 6011: const __uctype __urange 6011: = __uctype(__param.b()) - __uctype(__param.a()); 6011: 6011: __uctype __ret; 6011: 6011: if (__urngrange > __urange) 6011: { 6011: 6011: const __uctype __uerange = __urange + 1; 6011: const __uctype __scaling = __urngrange / __uerange; 6011: const __uctype __past = __uerange * __scaling; 6011: do 6011: __ret = __uctype(__urng()) - __urngmin; 6011: while (__ret >= __past); 6011: __ret /= __scaling; 6011: } 6011: else if (__urngrange < __urange) 6011: { 6011: # 264 "/usr/include/c++/8/bits/uniform_int_dist.h" 3 6011: __uctype __tmp; 6011: do 6011: { 6011: const __uctype __uerngrange = __urngrange + 1; 6011: __tmp = (__uerngrange * operator() 6011: (__urng, param_type(0, __urange / __uerngrange))); 6011: __ret = __tmp + (__uctype(__urng()) - __urngmin); 6011: } 6011: while (__ret > __urange || __ret < __tmp); 6011: } 6011: else 6011: __ret = __uctype(__urng()) - __urngmin; 6011: 6011: return __ret + __param.a(); 6011: } 6011: 6011: 6011: template 6011: template 6011: void 6011: uniform_int_distribution<_IntType>:: 6011: __generate_impl(_ForwardIterator __f, _ForwardIterator __t, 6011: _UniformRandomNumberGenerator& __urng, 6011: const param_type& __param) 6011: { 6011: 6011: typedef typename _UniformRandomNumberGenerator::result_type 6011: _Gresult_type; 6011: typedef typename std::make_unsigned::type __utype; 6011: typedef typename std::common_type<_Gresult_type, __utype>::type 6011: __uctype; 6011: 6011: const __uctype __urngmin = __urng.min(); 6011: const __uctype __urngmax = __urng.max(); 6011: const __uctype __urngrange = __urngmax - __urngmin; 6011: const __uctype __urange 6011: = __uctype(__param.b()) - __uctype(__param.a()); 6011: 6011: __uctype __ret; 6011: 6011: if (__urngrange > __urange) 6011: { 6011: if (__detail::_Power_of_2(__urngrange + 1) 6011: && __detail::_Power_of_2(__urange + 1)) 6011: { 6011: while (__f != __t) 6011: { 6011: __ret = __uctype(__urng()) - __urngmin; 6011: *__f++ = (__ret & __urange) + __param.a(); 6011: } 6011: } 6011: else 6011: { 6011: 6011: const __uctype __uerange = __urange + 1; 6011: const __uctype __scaling = __urngrange / __uerange; 6011: const __uctype __past = __uerange * __scaling; 6011: while (__f != __t) 6011: { 6011: do 6011: __ret = __uctype(__urng()) - __urngmin; 6011: while (__ret >= __past); 6011: *__f++ = __ret / __scaling + __param.a(); 6011: } 6011: } 6011: } 6011: else if (__urngrange < __urange) 6011: { 6011: # 348 "/usr/include/c++/8/bits/uniform_int_dist.h" 3 6011: __uctype __tmp; 6011: while (__f != __t) 6011: { 6011: do 6011: { 6011: const __uctype __uerngrange = __urngrange + 1; 6011: __tmp = (__uerngrange * operator() 6011: (__urng, param_type(0, __urange / __uerngrange))); 6011: __ret = __tmp + (__uctype(__urng()) - __urngmin); 6011: } 6011: while (__ret > __urange || __ret < __tmp); 6011: *__f++ = __ret; 6011: } 6011: } 6011: else 6011: while (__f != __t) 6011: *__f++ = __uctype(__urng()) - __urngmin + __param.a(); 6011: } 6011: 6011: 6011: 6011: 6011: } 6011: # 67 "/usr/include/c++/8/bits/stl_algo.h" 2 3 6011: 6011: 6011: 6011: 6011: namespace std __attribute__ ((__visibility__ ("default"))) 6011: { 6011: 6011: 6011: 6011: template 6011: void 6011: __move_median_to_first(_Iterator __result,_Iterator __a, _Iterator __b, 6011: _Iterator __c, _Compare __comp) 6011: { 6011: if (__comp(__a, __b)) 6011: { 6011: if (__comp(__b, __c)) 6011: std::iter_swap(__result, __b); 6011: else if (__comp(__a, __c)) 6011: std::iter_swap(__result, __c); 6011: else 6011: std::iter_swap(__result, __a); 6011: } 6011: else if (__comp(__a, __c)) 6011: std::iter_swap(__result, __a); 6011: else if (__comp(__b, __c)) 6011: std::iter_swap(__result, __c); 6011: else 6011: std::iter_swap(__result, __b); 6011: } 6011: 6011: 6011: template 6011: inline _InputIterator 6011: __find_if(_InputIterator __first, _InputIterator __last, 6011: _Predicate __pred, input_iterator_tag) 6011: { 6011: while (__first != __last && !__pred(__first)) 6011: ++__first; 6011: return __first; 6011: } 6011: 6011: 6011: template 6011: _RandomAccessIterator 6011: __find_if(_RandomAccessIterator __first, _RandomAccessIterator __last, 6011: _Predicate __pred, random_access_iterator_tag) 6011: { 6011: typename iterator_traits<_RandomAccessIterator>::difference_type 6011: __trip_count = (__last - __first) >> 2; 6011: 6011: for (; __trip_count > 0; --__trip_count) 6011: { 6011: if (__pred(__first)) 6011: return __first; 6011: ++__first; 6011: 6011: if (__pred(__first)) 6011: return __first; 6011: ++__first; 6011: 6011: if (__pred(__first)) 6011: return __first; 6011: ++__first; 6011: 6011: if (__pred(__first)) 6011: return __first; 6011: ++__first; 6011: } 6011: 6011: switch (__last - __first) 6011: { 6011: case 3: 6011: if (__pred(__first)) 6011: return __first; 6011: ++__first; 6011: case 2: 6011: if (__pred(__first)) 6011: return __first; 6011: ++__first; 6011: case 1: 6011: if (__pred(__first)) 6011: return __first; 6011: ++__first; 6011: case 0: 6011: default: 6011: return __last; 6011: } 6011: } 6011: 6011: template 6011: inline _Iterator 6011: __find_if(_Iterator __first, _Iterator __last, _Predicate __pred) 6011: { 6011: return __find_if(__first, __last, __pred, 6011: std::__iterator_category(__first)); 6011: } 6011: 6011: 6011: template 6011: inline _InputIterator 6011: __find_if_not(_InputIterator __first, _InputIterator __last, 6011: _Predicate __pred) 6011: { 6011: return std::__find_if(__first, __last, 6011: __gnu_cxx::__ops::__negate(__pred), 6011: std::__iterator_category(__first)); 6011: } 6011: 6011: 6011: 6011: 6011: template 6011: _InputIterator 6011: __find_if_not_n(_InputIterator __first, _Distance& __len, _Predicate __pred) 6011: { 6011: for (; __len; --__len, (void) ++__first) 6011: if (!__pred(__first)) 6011: break; 6011: return __first; 6011: } 6011: # 202 "/usr/include/c++/8/bits/stl_algo.h" 3 6011: template 6011: _ForwardIterator1 6011: __search(_ForwardIterator1 __first1, _ForwardIterator1 __last1, 6011: _ForwardIterator2 __first2, _ForwardIterator2 __last2, 6011: _BinaryPredicate __predicate) 6011: { 6011: 6011: if (__first1 == __last1 || __first2 == __last2) 6011: return __first1; 6011: 6011: 6011: _ForwardIterator2 __p1(__first2); 6011: if (++__p1 == __last2) 6011: return std::__find_if(__first1, __last1, 6011: __gnu_cxx::__ops::__iter_comp_iter(__predicate, __first2)); 6011: 6011: 6011: _ForwardIterator2 __p; 6011: _ForwardIterator1 __current = __first1; 6011: 6011: for (;;) 6011: { 6011: __first1 = 6011: std::__find_if(__first1, __last1, 6011: __gnu_cxx::__ops::__iter_comp_iter(__predicate, __first2)); 6011: 6011: if (__first1 == __last1) 6011: return __last1; 6011: 6011: __p = __p1; 6011: __current = __first1; 6011: if (++__current == __last1) 6011: return __last1; 6011: 6011: while (__predicate(__current, __p)) 6011: { 6011: if (++__p == __last2) 6011: return __first1; 6011: if (++__current == __last1) 6011: return __last1; 6011: } 6011: ++__first1; 6011: } 6011: return __first1; 6011: } 6011: 6011: 6011: 6011: 6011: 6011: 6011: template 6011: _ForwardIterator 6011: __search_n_aux(_ForwardIterator __first, _ForwardIterator __last, 6011: _Integer __count, _UnaryPredicate __unary_pred, 6011: std::forward_iterator_tag) 6011: { 6011: __first = std::__find_if(__first, __last, __unary_pred); 6011: while (__first != __last) 6011: { 6011: typename iterator_traits<_ForwardIterator>::difference_type 6011: __n = __count; 6011: _ForwardIterator __i = __first; 6011: ++__i; 6011: while (__i != __last && __n != 1 && __unary_pred(__i)) 6011: { 6011: ++__i; 6011: --__n; 6011: } 6011: if (__n == 1) 6011: return __first; 6011: if (__i == __last) 6011: return __last; 6011: __first = std::__find_if(++__i, __last, __unary_pred); 6011: } 6011: return __last; 6011: } 6011: 6011: 6011: 6011: 6011: 6011: template 6011: _RandomAccessIter 6011: __search_n_aux(_RandomAccessIter __first, _RandomAccessIter __last, 6011: _Integer __count, _UnaryPredicate __unary_pred, 6011: std::random_access_iterator_tag) 6011: { 6011: typedef typename std::iterator_traits<_RandomAccessIter>::difference_type 6011: _DistanceType; 6011: 6011: _DistanceType __tailSize = __last - __first; 6011: _DistanceType __remainder = __count; 6011: 6011: while (__remainder <= __tailSize) 6011: { 6011: __first += __remainder; 6011: __tailSize -= __remainder; 6011: 6011: 6011: _RandomAccessIter __backTrack = __first; 6011: while (__unary_pred(--__backTrack)) 6011: { 6011: if (--__remainder == 0) 6011: return (__first - __count); 6011: } 6011: __remainder = __count + 1 - (__first - __backTrack); 6011: } 6011: return __last; 6011: } 6011: 6011: template 6011: _ForwardIterator 6011: __search_n(_ForwardIterator __first, _ForwardIterator __last, 6011: _Integer __count, 6011: _UnaryPredicate __unary_pred) 6011: { 6011: if (__count <= 0) 6011: return __first; 6011: 6011: if (__count == 1) 6011: return std::__find_if(__first, __last, __unary_pred); 6011: 6011: return std::__search_n_aux(__first, __last, __count, __unary_pred, 6011: std::__iterator_category(__first)); 6011: } 6011: 6011: 6011: template 6011: _ForwardIterator1 6011: __find_end(_ForwardIterator1 __first1, _ForwardIterator1 __last1, 6011: _ForwardIterator2 __first2, _ForwardIterator2 __last2, 6011: forward_iterator_tag, forward_iterator_tag, 6011: _BinaryPredicate __comp) 6011: { 6011: if (__first2 == __last2) 6011: return __last1; 6011: 6011: _ForwardIterator1 __result = __last1; 6011: while (1) 6011: { 6011: _ForwardIterator1 __new_result 6011: = std::__search(__first1, __last1, __first2, __last2, __comp); 6011: if (__new_result == __last1) 6011: return __result; 6011: else 6011: { 6011: __result = __new_result; 6011: __first1 = __new_result; 6011: ++__first1; 6011: } 6011: } 6011: } 6011: 6011: 6011: template 6011: _BidirectionalIterator1 6011: __find_end(_BidirectionalIterator1 __first1, 6011: _BidirectionalIterator1 __last1, 6011: _BidirectionalIterator2 __first2, 6011: _BidirectionalIterator2 __last2, 6011: bidirectional_iterator_tag, bidirectional_iterator_tag, 6011: _BinaryPredicate __comp) 6011: { 6011: 6011: 6011: 6011: 6011: 6011: 6011: typedef reverse_iterator<_BidirectionalIterator1> _RevIterator1; 6011: typedef reverse_iterator<_BidirectionalIterator2> _RevIterator2; 6011: 6011: _RevIterator1 __rlast1(__first1); 6011: _RevIterator2 __rlast2(__first2); 6011: _RevIterator1 __rresult = std::__search(_RevIterator1(__last1), __rlast1, 6011: _RevIterator2(__last2), __rlast2, 6011: __comp); 6011: 6011: if (__rresult == __rlast1) 6011: return __last1; 6011: else 6011: { 6011: _BidirectionalIterator1 __result = __rresult.base(); 6011: std::advance(__result, -std::distance(__first2, __last2)); 6011: return __result; 6011: } 6011: } 6011: # 423 "/usr/include/c++/8/bits/stl_algo.h" 3 6011: template 6011: inline _ForwardIterator1 6011: find_end(_ForwardIterator1 __first1, _ForwardIterator1 __last1, 6011: _ForwardIterator2 __first2, _ForwardIterator2 __last2) 6011: { 6011: 6011: 6011: 6011: 6011: 6011: 6011: ; 6011: ; 6011: 6011: return std::__find_end(__first1, __last1, __first2, __last2, 6011: std::__iterator_category(__first1), 6011: std::__iterator_category(__first2), 6011: __gnu_cxx::__ops::__iter_equal_to_iter()); 6011: } 6011: # 471 "/usr/include/c++/8/bits/stl_algo.h" 3 6011: template 6011: inline _ForwardIterator1 6011: find_end(_ForwardIterator1 __first1, _ForwardIterator1 __last1, 6011: _ForwardIterator2 __first2, _ForwardIterator2 __last2, 6011: _BinaryPredicate __comp) 6011: { 6011: 6011: 6011: 6011: 6011: 6011: 6011: ; 6011: ; 6011: 6011: return std::__find_end(__first1, __last1, __first2, __last2, 6011: std::__iterator_category(__first1), 6011: std::__iterator_category(__first2), 6011: __gnu_cxx::__ops::__iter_comp_iter(__comp)); 6011: } 6011: # 506 "/usr/include/c++/8/bits/stl_algo.h" 3 6011: template 6011: inline bool 6011: all_of(_InputIterator __first, _InputIterator __last, _Predicate __pred) 6011: { return __last == std::find_if_not(__first, __last, __pred); } 6011: # 523 "/usr/include/c++/8/bits/stl_algo.h" 3 6011: template 6011: inline bool 6011: none_of(_InputIterator __first, _InputIterator __last, _Predicate __pred) 6011: { return __last == std::find_if(__first, __last, __pred); } 6011: # 541 "/usr/include/c++/8/bits/stl_algo.h" 3 6011: template 6011: inline bool 6011: any_of(_InputIterator __first, _InputIterator __last, _Predicate __pred) 6011: { return !std::none_of(__first, __last, __pred); } 6011: # 556 "/usr/include/c++/8/bits/stl_algo.h" 3 6011: template 6011: inline _InputIterator 6011: find_if_not(_InputIterator __first, _InputIterator __last, 6011: _Predicate __pred) 6011: { 6011: 6011: 6011: 6011: 6011: ; 6011: return std::__find_if_not(__first, __last, 6011: __gnu_cxx::__ops::__pred_iter(__pred)); 6011: } 6011: # 580 "/usr/include/c++/8/bits/stl_algo.h" 3 6011: template 6011: inline bool 6011: is_partitioned(_InputIterator __first, _InputIterator __last, 6011: _Predicate __pred) 6011: { 6011: __first = std::find_if_not(__first, __last, __pred); 6011: if (__first == __last) 6011: return true; 6011: ++__first; 6011: return std::none_of(__first, __last, __pred); 6011: } 6011: # 601 "/usr/include/c++/8/bits/stl_algo.h" 3 6011: template 6011: _ForwardIterator 6011: partition_point(_ForwardIterator __first, _ForwardIterator __last, 6011: _Predicate __pred) 6011: { 6011: 6011: 6011: 6011: 6011: 6011: 6011: ; 6011: 6011: typedef typename iterator_traits<_ForwardIterator>::difference_type 6011: _DistanceType; 6011: 6011: _DistanceType __len = std::distance(__first, __last); 6011: _DistanceType __half; 6011: _ForwardIterator __middle; 6011: 6011: while (__len > 0) 6011: { 6011: __half = __len >> 1; 6011: __middle = __first; 6011: std::advance(__middle, __half); 6011: if (__pred(*__middle)) 6011: { 6011: __first = __middle; 6011: ++__first; 6011: __len = __len - __half - 1; 6011: } 6011: else 6011: __len = __half; 6011: } 6011: return __first; 6011: } 6011: 6011: 6011: template 6011: _OutputIterator 6011: __remove_copy_if(_InputIterator __first, _InputIterator __last, 6011: _OutputIterator __result, _Predicate __pred) 6011: { 6011: for (; __first != __last; ++__first) 6011: if (!__pred(__first)) 6011: { 6011: *__result = *__first; 6011: ++__result; 6011: } 6011: return __result; 6011: } 6011: # 668 "/usr/include/c++/8/bits/stl_algo.h" 3 6011: template 6011: inline _OutputIterator 6011: remove_copy(_InputIterator __first, _InputIterator __last, 6011: _OutputIterator __result, const _Tp& __value) 6011: { 6011: 6011: 6011: 6011: 6011: 6011: 6011: ; 6011: 6011: return std::__remove_copy_if(__first, __last, __result, 6011: __gnu_cxx::__ops::__iter_equals_val(__value)); 6011: } 6011: # 700 "/usr/include/c++/8/bits/stl_algo.h" 3 6011: template 6011: inline _OutputIterator 6011: remove_copy_if(_InputIterator __first, _InputIterator __last, 6011: _OutputIterator __result, _Predicate __pred) 6011: { 6011: 6011: 6011: 6011: 6011: 6011: 6011: ; 6011: 6011: return std::__remove_copy_if(__first, __last, __result, 6011: __gnu_cxx::__ops::__pred_iter(__pred)); 6011: } 6011: # 734 "/usr/include/c++/8/bits/stl_algo.h" 3 6011: template 6011: _OutputIterator 6011: copy_if(_InputIterator __first, _InputIterator __last, 6011: _OutputIterator __result, _Predicate __pred) 6011: { 6011: 6011: 6011: 6011: 6011: 6011: 6011: ; 6011: 6011: for (; __first != __last; ++__first) 6011: if (__pred(*__first)) 6011: { 6011: *__result = *__first; 6011: ++__result; 6011: } 6011: return __result; 6011: } 6011: 6011: template 6011: _OutputIterator 6011: __copy_n(_InputIterator __first, _Size __n, 6011: _OutputIterator __result, input_iterator_tag) 6011: { 6011: if (__n > 0) 6011: { 6011: while (true) 6011: { 6011: *__result = *__first; 6011: ++__result; 6011: if (--__n > 0) 6011: ++__first; 6011: else 6011: break; 6011: } 6011: } 6011: return __result; 6011: } 6011: 6011: template 6011: inline _OutputIterator 6011: __copy_n(_RandomAccessIterator __first, _Size __n, 6011: _OutputIterator __result, random_access_iterator_tag) 6011: { return std::copy(__first, __first + __n, __result); } 6011: # 797 "/usr/include/c++/8/bits/stl_algo.h" 3 6011: template 6011: inline _OutputIterator 6011: copy_n(_InputIterator __first, _Size __n, _OutputIterator __result) 6011: { 6011: 6011: 6011: 6011: 6011: 6011: return std::__copy_n(__first, __n, __result, 6011: std::__iterator_category(__first)); 6011: } 6011: # 825 "/usr/include/c++/8/bits/stl_algo.h" 3 6011: template 6011: pair<_OutputIterator1, _OutputIterator2> 6011: partition_copy(_InputIterator __first, _InputIterator __last, 6011: _OutputIterator1 __out_true, _OutputIterator2 __out_false, 6011: _Predicate __pred) 6011: { 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: ; 6011: 6011: for (; __first != __last; ++__first) 6011: if (__pred(*__first)) 6011: { 6011: *__out_true = *__first; 6011: ++__out_true; 6011: } 6011: else 6011: { 6011: *__out_false = *__first; 6011: ++__out_false; 6011: } 6011: 6011: return pair<_OutputIterator1, _OutputIterator2>(__out_true, __out_false); 6011: } 6011: 6011: 6011: template 6011: _ForwardIterator 6011: __remove_if(_ForwardIterator __first, _ForwardIterator __last, 6011: _Predicate __pred) 6011: { 6011: __first = std::__find_if(__first, __last, __pred); 6011: if (__first == __last) 6011: return __first; 6011: _ForwardIterator __result = __first; 6011: ++__first; 6011: for (; __first != __last; ++__first) 6011: if (!__pred(__first)) 6011: { 6011: *__result = std::move(*__first); 6011: ++__result; 6011: } 6011: return __result; 6011: } 6011: # 894 "/usr/include/c++/8/bits/stl_algo.h" 3 6011: template 6011: inline _ForwardIterator 6011: remove(_ForwardIterator __first, _ForwardIterator __last, 6011: const _Tp& __value) 6011: { 6011: 6011: 6011: 6011: 6011: 6011: ; 6011: 6011: return std::__remove_if(__first, __last, 6011: __gnu_cxx::__ops::__iter_equals_val(__value)); 6011: } 6011: # 927 "/usr/include/c++/8/bits/stl_algo.h" 3 6011: template 6011: inline _ForwardIterator 6011: remove_if(_ForwardIterator __first, _ForwardIterator __last, 6011: _Predicate __pred) 6011: { 6011: 6011: 6011: 6011: 6011: 6011: ; 6011: 6011: return std::__remove_if(__first, __last, 6011: __gnu_cxx::__ops::__pred_iter(__pred)); 6011: } 6011: 6011: template 6011: _ForwardIterator 6011: __adjacent_find(_ForwardIterator __first, _ForwardIterator __last, 6011: _BinaryPredicate __binary_pred) 6011: { 6011: if (__first == __last) 6011: return __last; 6011: _ForwardIterator __next = __first; 6011: while (++__next != __last) 6011: { 6011: if (__binary_pred(__first, __next)) 6011: return __first; 6011: __first = __next; 6011: } 6011: return __last; 6011: } 6011: 6011: template 6011: _ForwardIterator 6011: __unique(_ForwardIterator __first, _ForwardIterator __last, 6011: _BinaryPredicate __binary_pred) 6011: { 6011: 6011: __first = std::__adjacent_find(__first, __last, __binary_pred); 6011: if (__first == __last) 6011: return __last; 6011: 6011: 6011: _ForwardIterator __dest = __first; 6011: ++__first; 6011: while (++__first != __last) 6011: if (!__binary_pred(__dest, __first)) 6011: *++__dest = std::move(*__first); 6011: return ++__dest; 6011: } 6011: # 993 "/usr/include/c++/8/bits/stl_algo.h" 3 6011: template 6011: inline _ForwardIterator 6011: unique(_ForwardIterator __first, _ForwardIterator __last) 6011: { 6011: 6011: 6011: 6011: 6011: 6011: ; 6011: 6011: return std::__unique(__first, __last, 6011: __gnu_cxx::__ops::__iter_equal_to_iter()); 6011: } 6011: # 1023 "/usr/include/c++/8/bits/stl_algo.h" 3 6011: template 6011: inline _ForwardIterator 6011: unique(_ForwardIterator __first, _ForwardIterator __last, 6011: _BinaryPredicate __binary_pred) 6011: { 6011: 6011: 6011: 6011: 6011: 6011: 6011: ; 6011: 6011: return std::__unique(__first, __last, 6011: __gnu_cxx::__ops::__iter_comp_iter(__binary_pred)); 6011: } 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: template 6011: _OutputIterator 6011: __unique_copy(_ForwardIterator __first, _ForwardIterator __last, 6011: _OutputIterator __result, _BinaryPredicate __binary_pred, 6011: forward_iterator_tag, output_iterator_tag) 6011: { 6011: 6011: 6011: 6011: 6011: 6011: _ForwardIterator __next = __first; 6011: *__result = *__first; 6011: while (++__next != __last) 6011: if (!__binary_pred(__first, __next)) 6011: { 6011: __first = __next; 6011: *++__result = *__first; 6011: } 6011: return ++__result; 6011: } 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: template 6011: _OutputIterator 6011: __unique_copy(_InputIterator __first, _InputIterator __last, 6011: _OutputIterator __result, _BinaryPredicate __binary_pred, 6011: input_iterator_tag, output_iterator_tag) 6011: { 6011: 6011: 6011: 6011: 6011: 6011: typename iterator_traits<_InputIterator>::value_type __value = *__first; 6011: __decltype(__gnu_cxx::__ops::__iter_comp_val(__binary_pred)) 6011: __rebound_pred 6011: = __gnu_cxx::__ops::__iter_comp_val(__binary_pred); 6011: *__result = __value; 6011: while (++__first != __last) 6011: if (!__rebound_pred(__first, __value)) 6011: { 6011: __value = *__first; 6011: *++__result = __value; 6011: } 6011: return ++__result; 6011: } 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: template 6011: _ForwardIterator 6011: __unique_copy(_InputIterator __first, _InputIterator __last, 6011: _ForwardIterator __result, _BinaryPredicate __binary_pred, 6011: input_iterator_tag, forward_iterator_tag) 6011: { 6011: 6011: 6011: 6011: 6011: *__result = *__first; 6011: while (++__first != __last) 6011: if (!__binary_pred(__result, __first)) 6011: *++__result = *__first; 6011: return ++__result; 6011: } 6011: 6011: 6011: 6011: 6011: 6011: 6011: template 6011: void 6011: __reverse(_BidirectionalIterator __first, _BidirectionalIterator __last, 6011: bidirectional_iterator_tag) 6011: { 6011: while (true) 6011: if (__first == __last || __first == --__last) 6011: return; 6011: else 6011: { 6011: std::iter_swap(__first, __last); 6011: ++__first; 6011: } 6011: } 6011: 6011: 6011: 6011: 6011: 6011: 6011: template 6011: void 6011: __reverse(_RandomAccessIterator __first, _RandomAccessIterator __last, 6011: random_access_iterator_tag) 6011: { 6011: if (__first == __last) 6011: return; 6011: --__last; 6011: while (__first < __last) 6011: { 6011: std::iter_swap(__first, __last); 6011: ++__first; 6011: --__last; 6011: } 6011: } 6011: # 1178 "/usr/include/c++/8/bits/stl_algo.h" 3 6011: template 6011: inline void 6011: reverse(_BidirectionalIterator __first, _BidirectionalIterator __last) 6011: { 6011: 6011: 6011: 6011: ; 6011: std::__reverse(__first, __last, std::__iterator_category(__first)); 6011: } 6011: # 1205 "/usr/include/c++/8/bits/stl_algo.h" 3 6011: template 6011: _OutputIterator 6011: reverse_copy(_BidirectionalIterator __first, _BidirectionalIterator __last, 6011: _OutputIterator __result) 6011: { 6011: 6011: 6011: 6011: 6011: 6011: ; 6011: 6011: while (__first != __last) 6011: { 6011: --__last; 6011: *__result = *__last; 6011: ++__result; 6011: } 6011: return __result; 6011: } 6011: 6011: 6011: 6011: 6011: 6011: template 6011: _EuclideanRingElement 6011: __gcd(_EuclideanRingElement __m, _EuclideanRingElement __n) 6011: { 6011: while (__n != 0) 6011: { 6011: _EuclideanRingElement __t = __m % __n; 6011: __m = __n; 6011: __n = __t; 6011: } 6011: return __m; 6011: } 6011: 6011: inline namespace _V2 6011: { 6011: 6011: 6011: template 6011: _ForwardIterator 6011: __rotate(_ForwardIterator __first, 6011: _ForwardIterator __middle, 6011: _ForwardIterator __last, 6011: forward_iterator_tag) 6011: { 6011: if (__first == __middle) 6011: return __last; 6011: else if (__last == __middle) 6011: return __first; 6011: 6011: _ForwardIterator __first2 = __middle; 6011: do 6011: { 6011: std::iter_swap(__first, __first2); 6011: ++__first; 6011: ++__first2; 6011: if (__first == __middle) 6011: __middle = __first2; 6011: } 6011: while (__first2 != __last); 6011: 6011: _ForwardIterator __ret = __first; 6011: 6011: __first2 = __middle; 6011: 6011: while (__first2 != __last) 6011: { 6011: std::iter_swap(__first, __first2); 6011: ++__first; 6011: ++__first2; 6011: if (__first == __middle) 6011: __middle = __first2; 6011: else if (__first2 == __last) 6011: __first2 = __middle; 6011: } 6011: return __ret; 6011: } 6011: 6011: 6011: template 6011: _BidirectionalIterator 6011: __rotate(_BidirectionalIterator __first, 6011: _BidirectionalIterator __middle, 6011: _BidirectionalIterator __last, 6011: bidirectional_iterator_tag) 6011: { 6011: 6011: 6011: 6011: 6011: if (__first == __middle) 6011: return __last; 6011: else if (__last == __middle) 6011: return __first; 6011: 6011: std::__reverse(__first, __middle, bidirectional_iterator_tag()); 6011: std::__reverse(__middle, __last, bidirectional_iterator_tag()); 6011: 6011: while (__first != __middle && __middle != __last) 6011: { 6011: std::iter_swap(__first, --__last); 6011: ++__first; 6011: } 6011: 6011: if (__first == __middle) 6011: { 6011: std::__reverse(__middle, __last, bidirectional_iterator_tag()); 6011: return __last; 6011: } 6011: else 6011: { 6011: std::__reverse(__first, __middle, bidirectional_iterator_tag()); 6011: return __first; 6011: } 6011: } 6011: 6011: 6011: template 6011: _RandomAccessIterator 6011: __rotate(_RandomAccessIterator __first, 6011: _RandomAccessIterator __middle, 6011: _RandomAccessIterator __last, 6011: random_access_iterator_tag) 6011: { 6011: 6011: 6011: 6011: 6011: if (__first == __middle) 6011: return __last; 6011: else if (__last == __middle) 6011: return __first; 6011: 6011: typedef typename iterator_traits<_RandomAccessIterator>::difference_type 6011: _Distance; 6011: typedef typename iterator_traits<_RandomAccessIterator>::value_type 6011: _ValueType; 6011: 6011: _Distance __n = __last - __first; 6011: _Distance __k = __middle - __first; 6011: 6011: if (__k == __n - __k) 6011: { 6011: std::swap_ranges(__first, __middle, __middle); 6011: return __middle; 6011: } 6011: 6011: _RandomAccessIterator __p = __first; 6011: _RandomAccessIterator __ret = __first + (__last - __middle); 6011: 6011: for (;;) 6011: { 6011: if (__k < __n - __k) 6011: { 6011: if (__is_pod(_ValueType) && __k == 1) 6011: { 6011: _ValueType __t = std::move(*__p); 6011: std::move(__p + 1, __p + __n, __p); 6011: *(__p + __n - 1) = std::move(__t); 6011: return __ret; 6011: } 6011: _RandomAccessIterator __q = __p + __k; 6011: for (_Distance __i = 0; __i < __n - __k; ++ __i) 6011: { 6011: std::iter_swap(__p, __q); 6011: ++__p; 6011: ++__q; 6011: } 6011: __n %= __k; 6011: if (__n == 0) 6011: return __ret; 6011: std::swap(__n, __k); 6011: __k = __n - __k; 6011: } 6011: else 6011: { 6011: __k = __n - __k; 6011: if (__is_pod(_ValueType) && __k == 1) 6011: { 6011: _ValueType __t = std::move(*(__p + __n - 1)); 6011: std::move_backward(__p, __p + __n - 1, __p + __n); 6011: *__p = std::move(__t); 6011: return __ret; 6011: } 6011: _RandomAccessIterator __q = __p + __n; 6011: __p = __q - __k; 6011: for (_Distance __i = 0; __i < __n - __k; ++ __i) 6011: { 6011: --__p; 6011: --__q; 6011: std::iter_swap(__p, __q); 6011: } 6011: __n %= __k; 6011: if (__n == 0) 6011: return __ret; 6011: std::swap(__n, __k); 6011: } 6011: } 6011: } 6011: # 1432 "/usr/include/c++/8/bits/stl_algo.h" 3 6011: template 6011: inline _ForwardIterator 6011: rotate(_ForwardIterator __first, _ForwardIterator __middle, 6011: _ForwardIterator __last) 6011: { 6011: 6011: 6011: 6011: ; 6011: ; 6011: 6011: return std::__rotate(__first, __middle, __last, 6011: std::__iterator_category(__first)); 6011: } 6011: 6011: } 6011: # 1469 "/usr/include/c++/8/bits/stl_algo.h" 3 6011: template 6011: inline _OutputIterator 6011: rotate_copy(_ForwardIterator __first, _ForwardIterator __middle, 6011: _ForwardIterator __last, _OutputIterator __result) 6011: { 6011: 6011: 6011: 6011: 6011: ; 6011: ; 6011: 6011: return std::copy(__first, __middle, 6011: std::copy(__middle, __last, __result)); 6011: } 6011: 6011: 6011: template 6011: _ForwardIterator 6011: __partition(_ForwardIterator __first, _ForwardIterator __last, 6011: _Predicate __pred, forward_iterator_tag) 6011: { 6011: if (__first == __last) 6011: return __first; 6011: 6011: while (__pred(*__first)) 6011: if (++__first == __last) 6011: return __first; 6011: 6011: _ForwardIterator __next = __first; 6011: 6011: while (++__next != __last) 6011: if (__pred(*__next)) 6011: { 6011: std::iter_swap(__first, __next); 6011: ++__first; 6011: } 6011: 6011: return __first; 6011: } 6011: 6011: 6011: template 6011: _BidirectionalIterator 6011: __partition(_BidirectionalIterator __first, _BidirectionalIterator __last, 6011: _Predicate __pred, bidirectional_iterator_tag) 6011: { 6011: while (true) 6011: { 6011: while (true) 6011: if (__first == __last) 6011: return __first; 6011: else if (__pred(*__first)) 6011: ++__first; 6011: else 6011: break; 6011: --__last; 6011: while (true) 6011: if (__first == __last) 6011: return __first; 6011: else if (!bool(__pred(*__last))) 6011: --__last; 6011: else 6011: break; 6011: std::iter_swap(__first, __last); 6011: ++__first; 6011: } 6011: } 6011: # 1546 "/usr/include/c++/8/bits/stl_algo.h" 3 6011: template 6011: _ForwardIterator 6011: __stable_partition_adaptive(_ForwardIterator __first, 6011: _ForwardIterator __last, 6011: _Predicate __pred, _Distance __len, 6011: _Pointer __buffer, 6011: _Distance __buffer_size) 6011: { 6011: if (__len == 1) 6011: return __first; 6011: 6011: if (__len <= __buffer_size) 6011: { 6011: _ForwardIterator __result1 = __first; 6011: _Pointer __result2 = __buffer; 6011: 6011: 6011: 6011: 6011: *__result2 = std::move(*__first); 6011: ++__result2; 6011: ++__first; 6011: for (; __first != __last; ++__first) 6011: if (__pred(__first)) 6011: { 6011: *__result1 = std::move(*__first); 6011: ++__result1; 6011: } 6011: else 6011: { 6011: *__result2 = std::move(*__first); 6011: ++__result2; 6011: } 6011: 6011: std::move(__buffer, __result2, __result1); 6011: return __result1; 6011: } 6011: 6011: _ForwardIterator __middle = __first; 6011: std::advance(__middle, __len / 2); 6011: _ForwardIterator __left_split = 6011: std::__stable_partition_adaptive(__first, __middle, __pred, 6011: __len / 2, __buffer, 6011: __buffer_size); 6011: 6011: 6011: 6011: _Distance __right_len = __len - __len / 2; 6011: _ForwardIterator __right_split = 6011: std::__find_if_not_n(__middle, __right_len, __pred); 6011: 6011: if (__right_len) 6011: __right_split = 6011: std::__stable_partition_adaptive(__right_split, __last, __pred, 6011: __right_len, 6011: __buffer, __buffer_size); 6011: 6011: std::rotate(__left_split, __middle, __right_split); 6011: std::advance(__left_split, std::distance(__middle, __right_split)); 6011: return __left_split; 6011: } 6011: 6011: template 6011: _ForwardIterator 6011: __stable_partition(_ForwardIterator __first, _ForwardIterator __last, 6011: _Predicate __pred) 6011: { 6011: __first = std::__find_if_not(__first, __last, __pred); 6011: 6011: if (__first == __last) 6011: return __first; 6011: 6011: typedef typename iterator_traits<_ForwardIterator>::value_type 6011: _ValueType; 6011: typedef typename iterator_traits<_ForwardIterator>::difference_type 6011: _DistanceType; 6011: 6011: _Temporary_buffer<_ForwardIterator, _ValueType> __buf(__first, __last); 6011: return 6011: std::__stable_partition_adaptive(__first, __last, __pred, 6011: _DistanceType(__buf.requested_size()), 6011: __buf.begin(), 6011: _DistanceType(__buf.size())); 6011: } 6011: # 1649 "/usr/include/c++/8/bits/stl_algo.h" 3 6011: template 6011: inline _ForwardIterator 6011: stable_partition(_ForwardIterator __first, _ForwardIterator __last, 6011: _Predicate __pred) 6011: { 6011: 6011: 6011: 6011: 6011: 6011: ; 6011: 6011: return std::__stable_partition(__first, __last, 6011: __gnu_cxx::__ops::__pred_iter(__pred)); 6011: } 6011: 6011: 6011: template 6011: void 6011: __heap_select(_RandomAccessIterator __first, 6011: _RandomAccessIterator __middle, 6011: _RandomAccessIterator __last, _Compare __comp) 6011: { 6011: std::__make_heap(__first, __middle, __comp); 6011: for (_RandomAccessIterator __i = __middle; __i < __last; ++__i) 6011: if (__comp(__i, __first)) 6011: std::__pop_heap(__first, __middle, __i, __comp); 6011: } 6011: 6011: 6011: 6011: template 6011: _RandomAccessIterator 6011: __partial_sort_copy(_InputIterator __first, _InputIterator __last, 6011: _RandomAccessIterator __result_first, 6011: _RandomAccessIterator __result_last, 6011: _Compare __comp) 6011: { 6011: typedef typename iterator_traits<_InputIterator>::value_type 6011: _InputValueType; 6011: typedef iterator_traits<_RandomAccessIterator> _RItTraits; 6011: typedef typename _RItTraits::difference_type _DistanceType; 6011: 6011: if (__result_first == __result_last) 6011: return __result_last; 6011: _RandomAccessIterator __result_real_last = __result_first; 6011: while (__first != __last && __result_real_last != __result_last) 6011: { 6011: *__result_real_last = *__first; 6011: ++__result_real_last; 6011: ++__first; 6011: } 6011: 6011: std::__make_heap(__result_first, __result_real_last, __comp); 6011: while (__first != __last) 6011: { 6011: if (__comp(__first, __result_first)) 6011: std::__adjust_heap(__result_first, _DistanceType(0), 6011: _DistanceType(__result_real_last 6011: - __result_first), 6011: _InputValueType(*__first), __comp); 6011: ++__first; 6011: } 6011: std::__sort_heap(__result_first, __result_real_last, __comp); 6011: return __result_real_last; 6011: } 6011: # 1735 "/usr/include/c++/8/bits/stl_algo.h" 3 6011: template 6011: inline _RandomAccessIterator 6011: partial_sort_copy(_InputIterator __first, _InputIterator __last, 6011: _RandomAccessIterator __result_first, 6011: _RandomAccessIterator __result_last) 6011: { 6011: # 1749 "/usr/include/c++/8/bits/stl_algo.h" 3 6011: 6011: 6011: 6011: 6011: 6011: 6011: ; 6011: ; 6011: ; 6011: 6011: return std::__partial_sort_copy(__first, __last, 6011: __result_first, __result_last, 6011: __gnu_cxx::__ops::__iter_less_iter()); 6011: } 6011: # 1784 "/usr/include/c++/8/bits/stl_algo.h" 3 6011: template 6011: inline _RandomAccessIterator 6011: partial_sort_copy(_InputIterator __first, _InputIterator __last, 6011: _RandomAccessIterator __result_first, 6011: _RandomAccessIterator __result_last, 6011: _Compare __comp) 6011: { 6011: # 1800 "/usr/include/c++/8/bits/stl_algo.h" 3 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: ; 6011: ; 6011: ; 6011: 6011: return std::__partial_sort_copy(__first, __last, 6011: __result_first, __result_last, 6011: __gnu_cxx::__ops::__iter_comp_iter(__comp)); 6011: } 6011: 6011: 6011: template 6011: void 6011: __unguarded_linear_insert(_RandomAccessIterator __last, 6011: _Compare __comp) 6011: { 6011: typename iterator_traits<_RandomAccessIterator>::value_type 6011: __val = std::move(*__last); 6011: _RandomAccessIterator __next = __last; 6011: --__next; 6011: while (__comp(__val, __next)) 6011: { 6011: *__last = std::move(*__next); 6011: __last = __next; 6011: --__next; 6011: } 6011: *__last = std::move(__val); 6011: } 6011: 6011: 6011: template 6011: void 6011: __insertion_sort(_RandomAccessIterator __first, 6011: _RandomAccessIterator __last, _Compare __comp) 6011: { 6011: if (__first == __last) return; 6011: 6011: for (_RandomAccessIterator __i = __first + 1; __i != __last; ++__i) 6011: { 6011: if (__comp(__i, __first)) 6011: { 6011: typename iterator_traits<_RandomAccessIterator>::value_type 6011: __val = std::move(*__i); 6011: std::move_backward(__first, __i, __i + 1); 6011: *__first = std::move(__val); 6011: } 6011: else 6011: std::__unguarded_linear_insert(__i, 6011: __gnu_cxx::__ops::__val_comp_iter(__comp)); 6011: } 6011: } 6011: 6011: 6011: template 6011: inline void 6011: __unguarded_insertion_sort(_RandomAccessIterator __first, 6011: _RandomAccessIterator __last, _Compare __comp) 6011: { 6011: for (_RandomAccessIterator __i = __first; __i != __last; ++__i) 6011: std::__unguarded_linear_insert(__i, 6011: __gnu_cxx::__ops::__val_comp_iter(__comp)); 6011: } 6011: 6011: 6011: 6011: 6011: 6011: enum { _S_threshold = 16 }; 6011: 6011: 6011: template 6011: void 6011: __final_insertion_sort(_RandomAccessIterator __first, 6011: _RandomAccessIterator __last, _Compare __comp) 6011: { 6011: if (__last - __first > int(_S_threshold)) 6011: { 6011: std::__insertion_sort(__first, __first + int(_S_threshold), __comp); 6011: std::__unguarded_insertion_sort(__first + int(_S_threshold), __last, 6011: __comp); 6011: } 6011: else 6011: std::__insertion_sort(__first, __last, __comp); 6011: } 6011: 6011: 6011: template 6011: _RandomAccessIterator 6011: __unguarded_partition(_RandomAccessIterator __first, 6011: _RandomAccessIterator __last, 6011: _RandomAccessIterator __pivot, _Compare __comp) 6011: { 6011: while (true) 6011: { 6011: while (__comp(__first, __pivot)) 6011: ++__first; 6011: --__last; 6011: while (__comp(__pivot, __last)) 6011: --__last; 6011: if (!(__first < __last)) 6011: return __first; 6011: std::iter_swap(__first, __last); 6011: ++__first; 6011: } 6011: } 6011: 6011: 6011: template 6011: inline _RandomAccessIterator 6011: __unguarded_partition_pivot(_RandomAccessIterator __first, 6011: _RandomAccessIterator __last, _Compare __comp) 6011: { 6011: _RandomAccessIterator __mid = __first + (__last - __first) / 2; 6011: std::__move_median_to_first(__first, __first + 1, __mid, __last - 1, 6011: __comp); 6011: return std::__unguarded_partition(__first + 1, __last, __first, __comp); 6011: } 6011: 6011: template 6011: inline void 6011: __partial_sort(_RandomAccessIterator __first, 6011: _RandomAccessIterator __middle, 6011: _RandomAccessIterator __last, 6011: _Compare __comp) 6011: { 6011: std::__heap_select(__first, __middle, __last, __comp); 6011: std::__sort_heap(__first, __middle, __comp); 6011: } 6011: 6011: 6011: template 6011: void 6011: __introsort_loop(_RandomAccessIterator __first, 6011: _RandomAccessIterator __last, 6011: _Size __depth_limit, _Compare __comp) 6011: { 6011: while (__last - __first > int(_S_threshold)) 6011: { 6011: if (__depth_limit == 0) 6011: { 6011: std::__partial_sort(__first, __last, __last, __comp); 6011: return; 6011: } 6011: --__depth_limit; 6011: _RandomAccessIterator __cut = 6011: std::__unguarded_partition_pivot(__first, __last, __comp); 6011: std::__introsort_loop(__cut, __last, __depth_limit, __comp); 6011: __last = __cut; 6011: } 6011: } 6011: 6011: 6011: 6011: template 6011: inline void 6011: __sort(_RandomAccessIterator __first, _RandomAccessIterator __last, 6011: _Compare __comp) 6011: { 6011: if (__first != __last) 6011: { 6011: std::__introsort_loop(__first, __last, 6011: std::__lg(__last - __first) * 2, 6011: __comp); 6011: std::__final_insertion_sort(__first, __last, __comp); 6011: } 6011: } 6011: 6011: template 6011: void 6011: __introselect(_RandomAccessIterator __first, _RandomAccessIterator __nth, 6011: _RandomAccessIterator __last, _Size __depth_limit, 6011: _Compare __comp) 6011: { 6011: while (__last - __first > 3) 6011: { 6011: if (__depth_limit == 0) 6011: { 6011: std::__heap_select(__first, __nth + 1, __last, __comp); 6011: 6011: std::iter_swap(__first, __nth); 6011: return; 6011: } 6011: --__depth_limit; 6011: _RandomAccessIterator __cut = 6011: std::__unguarded_partition_pivot(__first, __last, __comp); 6011: if (__cut <= __nth) 6011: __first = __cut; 6011: else 6011: __last = __cut; 6011: } 6011: std::__insertion_sort(__first, __last, __comp); 6011: } 6011: # 2021 "/usr/include/c++/8/bits/stl_algo.h" 3 6011: template 6011: inline _ForwardIterator 6011: lower_bound(_ForwardIterator __first, _ForwardIterator __last, 6011: const _Tp& __val, _Compare __comp) 6011: { 6011: 6011: 6011: 6011: 6011: 6011: ; 6011: 6011: return std::__lower_bound(__first, __last, __val, 6011: __gnu_cxx::__ops::__iter_comp_val(__comp)); 6011: } 6011: 6011: template 6011: _ForwardIterator 6011: __upper_bound(_ForwardIterator __first, _ForwardIterator __last, 6011: const _Tp& __val, _Compare __comp) 6011: { 6011: typedef typename iterator_traits<_ForwardIterator>::difference_type 6011: _DistanceType; 6011: 6011: _DistanceType __len = std::distance(__first, __last); 6011: 6011: while (__len > 0) 6011: { 6011: _DistanceType __half = __len >> 1; 6011: _ForwardIterator __middle = __first; 6011: std::advance(__middle, __half); 6011: if (__comp(__val, __middle)) 6011: __len = __half; 6011: else 6011: { 6011: __first = __middle; 6011: ++__first; 6011: __len = __len - __half - 1; 6011: } 6011: } 6011: return __first; 6011: } 6011: # 2075 "/usr/include/c++/8/bits/stl_algo.h" 3 6011: template 6011: inline _ForwardIterator 6011: upper_bound(_ForwardIterator __first, _ForwardIterator __last, 6011: const _Tp& __val) 6011: { 6011: 6011: 6011: 6011: 6011: ; 6011: 6011: return std::__upper_bound(__first, __last, __val, 6011: __gnu_cxx::__ops::__val_less_iter()); 6011: } 6011: # 2105 "/usr/include/c++/8/bits/stl_algo.h" 3 6011: template 6011: inline _ForwardIterator 6011: upper_bound(_ForwardIterator __first, _ForwardIterator __last, 6011: const _Tp& __val, _Compare __comp) 6011: { 6011: 6011: 6011: 6011: 6011: 6011: ; 6011: 6011: return std::__upper_bound(__first, __last, __val, 6011: __gnu_cxx::__ops::__val_comp_iter(__comp)); 6011: } 6011: 6011: template 6011: pair<_ForwardIterator, _ForwardIterator> 6011: __equal_range(_ForwardIterator __first, _ForwardIterator __last, 6011: const _Tp& __val, 6011: _CompareItTp __comp_it_val, _CompareTpIt __comp_val_it) 6011: { 6011: typedef typename iterator_traits<_ForwardIterator>::difference_type 6011: _DistanceType; 6011: 6011: _DistanceType __len = std::distance(__first, __last); 6011: 6011: while (__len > 0) 6011: { 6011: _DistanceType __half = __len >> 1; 6011: _ForwardIterator __middle = __first; 6011: std::advance(__middle, __half); 6011: if (__comp_it_val(__middle, __val)) 6011: { 6011: __first = __middle; 6011: ++__first; 6011: __len = __len - __half - 1; 6011: } 6011: else if (__comp_val_it(__val, __middle)) 6011: __len = __half; 6011: else 6011: { 6011: _ForwardIterator __left 6011: = std::__lower_bound(__first, __middle, __val, __comp_it_val); 6011: std::advance(__first, __len); 6011: _ForwardIterator __right 6011: = std::__upper_bound(++__middle, __first, __val, __comp_val_it); 6011: return pair<_ForwardIterator, _ForwardIterator>(__left, __right); 6011: } 6011: } 6011: return pair<_ForwardIterator, _ForwardIterator>(__first, __first); 6011: } 6011: # 2176 "/usr/include/c++/8/bits/stl_algo.h" 3 6011: template 6011: inline pair<_ForwardIterator, _ForwardIterator> 6011: equal_range(_ForwardIterator __first, _ForwardIterator __last, 6011: const _Tp& __val) 6011: { 6011: 6011: 6011: 6011: 6011: 6011: 6011: ; 6011: ; 6011: 6011: return std::__equal_range(__first, __last, __val, 6011: __gnu_cxx::__ops::__iter_less_val(), 6011: __gnu_cxx::__ops::__val_less_iter()); 6011: } 6011: # 2212 "/usr/include/c++/8/bits/stl_algo.h" 3 6011: template 6011: inline pair<_ForwardIterator, _ForwardIterator> 6011: equal_range(_ForwardIterator __first, _ForwardIterator __last, 6011: const _Tp& __val, _Compare __comp) 6011: { 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: ; 6011: 6011: ; 6011: 6011: return std::__equal_range(__first, __last, __val, 6011: __gnu_cxx::__ops::__iter_comp_val(__comp), 6011: __gnu_cxx::__ops::__val_comp_iter(__comp)); 6011: } 6011: # 2245 "/usr/include/c++/8/bits/stl_algo.h" 3 6011: template 6011: bool 6011: binary_search(_ForwardIterator __first, _ForwardIterator __last, 6011: const _Tp& __val) 6011: { 6011: 6011: 6011: 6011: 6011: ; 6011: ; 6011: 6011: _ForwardIterator __i 6011: = std::__lower_bound(__first, __last, __val, 6011: __gnu_cxx::__ops::__iter_less_val()); 6011: return __i != __last && !(__val < *__i); 6011: } 6011: # 2278 "/usr/include/c++/8/bits/stl_algo.h" 3 6011: template 6011: bool 6011: binary_search(_ForwardIterator __first, _ForwardIterator __last, 6011: const _Tp& __val, _Compare __comp) 6011: { 6011: 6011: 6011: 6011: 6011: 6011: ; 6011: 6011: ; 6011: 6011: _ForwardIterator __i 6011: = std::__lower_bound(__first, __last, __val, 6011: __gnu_cxx::__ops::__iter_comp_val(__comp)); 6011: return __i != __last && !bool(__comp(__val, *__i)); 6011: } 6011: 6011: 6011: 6011: 6011: template 6011: void 6011: __move_merge_adaptive(_InputIterator1 __first1, _InputIterator1 __last1, 6011: _InputIterator2 __first2, _InputIterator2 __last2, 6011: _OutputIterator __result, _Compare __comp) 6011: { 6011: while (__first1 != __last1 && __first2 != __last2) 6011: { 6011: if (__comp(__first2, __first1)) 6011: { 6011: *__result = std::move(*__first2); 6011: ++__first2; 6011: } 6011: else 6011: { 6011: *__result = std::move(*__first1); 6011: ++__first1; 6011: } 6011: ++__result; 6011: } 6011: if (__first1 != __last1) 6011: std::move(__first1, __last1, __result); 6011: } 6011: 6011: 6011: template 6011: void 6011: __move_merge_adaptive_backward(_BidirectionalIterator1 __first1, 6011: _BidirectionalIterator1 __last1, 6011: _BidirectionalIterator2 __first2, 6011: _BidirectionalIterator2 __last2, 6011: _BidirectionalIterator3 __result, 6011: _Compare __comp) 6011: { 6011: if (__first1 == __last1) 6011: { 6011: std::move_backward(__first2, __last2, __result); 6011: return; 6011: } 6011: else if (__first2 == __last2) 6011: return; 6011: 6011: --__last1; 6011: --__last2; 6011: while (true) 6011: { 6011: if (__comp(__last2, __last1)) 6011: { 6011: *--__result = std::move(*__last1); 6011: if (__first1 == __last1) 6011: { 6011: std::move_backward(__first2, ++__last2, __result); 6011: return; 6011: } 6011: --__last1; 6011: } 6011: else 6011: { 6011: *--__result = std::move(*__last2); 6011: if (__first2 == __last2) 6011: return; 6011: --__last2; 6011: } 6011: } 6011: } 6011: 6011: 6011: template 6011: _BidirectionalIterator1 6011: __rotate_adaptive(_BidirectionalIterator1 __first, 6011: _BidirectionalIterator1 __middle, 6011: _BidirectionalIterator1 __last, 6011: _Distance __len1, _Distance __len2, 6011: _BidirectionalIterator2 __buffer, 6011: _Distance __buffer_size) 6011: { 6011: _BidirectionalIterator2 __buffer_end; 6011: if (__len1 > __len2 && __len2 <= __buffer_size) 6011: { 6011: if (__len2) 6011: { 6011: __buffer_end = std::move(__middle, __last, __buffer); 6011: std::move_backward(__first, __middle, __last); 6011: return std::move(__buffer, __buffer_end, __first); 6011: } 6011: else 6011: return __first; 6011: } 6011: else if (__len1 <= __buffer_size) 6011: { 6011: if (__len1) 6011: { 6011: __buffer_end = std::move(__first, __middle, __buffer); 6011: std::move(__middle, __last, __first); 6011: return std::move_backward(__buffer, __buffer_end, __last); 6011: } 6011: else 6011: return __last; 6011: } 6011: else 6011: { 6011: std::rotate(__first, __middle, __last); 6011: std::advance(__first, std::distance(__middle, __last)); 6011: return __first; 6011: } 6011: } 6011: 6011: 6011: template 6011: void 6011: __merge_adaptive(_BidirectionalIterator __first, 6011: _BidirectionalIterator __middle, 6011: _BidirectionalIterator __last, 6011: _Distance __len1, _Distance __len2, 6011: _Pointer __buffer, _Distance __buffer_size, 6011: _Compare __comp) 6011: { 6011: if (__len1 <= __len2 && __len1 <= __buffer_size) 6011: { 6011: _Pointer __buffer_end = std::move(__first, __middle, __buffer); 6011: std::__move_merge_adaptive(__buffer, __buffer_end, __middle, __last, 6011: __first, __comp); 6011: } 6011: else if (__len2 <= __buffer_size) 6011: { 6011: _Pointer __buffer_end = std::move(__middle, __last, __buffer); 6011: std::__move_merge_adaptive_backward(__first, __middle, __buffer, 6011: __buffer_end, __last, __comp); 6011: } 6011: else 6011: { 6011: _BidirectionalIterator __first_cut = __first; 6011: _BidirectionalIterator __second_cut = __middle; 6011: _Distance __len11 = 0; 6011: _Distance __len22 = 0; 6011: if (__len1 > __len2) 6011: { 6011: __len11 = __len1 / 2; 6011: std::advance(__first_cut, __len11); 6011: __second_cut 6011: = std::__lower_bound(__middle, __last, *__first_cut, 6011: __gnu_cxx::__ops::__iter_comp_val(__comp)); 6011: __len22 = std::distance(__middle, __second_cut); 6011: } 6011: else 6011: { 6011: __len22 = __len2 / 2; 6011: std::advance(__second_cut, __len22); 6011: __first_cut 6011: = std::__upper_bound(__first, __middle, *__second_cut, 6011: __gnu_cxx::__ops::__val_comp_iter(__comp)); 6011: __len11 = std::distance(__first, __first_cut); 6011: } 6011: 6011: _BidirectionalIterator __new_middle 6011: = std::__rotate_adaptive(__first_cut, __middle, __second_cut, 6011: __len1 - __len11, __len22, __buffer, 6011: __buffer_size); 6011: std::__merge_adaptive(__first, __first_cut, __new_middle, __len11, 6011: __len22, __buffer, __buffer_size, __comp); 6011: std::__merge_adaptive(__new_middle, __second_cut, __last, 6011: __len1 - __len11, 6011: __len2 - __len22, __buffer, 6011: __buffer_size, __comp); 6011: } 6011: } 6011: 6011: 6011: template 6011: void 6011: __merge_without_buffer(_BidirectionalIterator __first, 6011: _BidirectionalIterator __middle, 6011: _BidirectionalIterator __last, 6011: _Distance __len1, _Distance __len2, 6011: _Compare __comp) 6011: { 6011: if (__len1 == 0 || __len2 == 0) 6011: return; 6011: 6011: if (__len1 + __len2 == 2) 6011: { 6011: if (__comp(__middle, __first)) 6011: std::iter_swap(__first, __middle); 6011: return; 6011: } 6011: 6011: _BidirectionalIterator __first_cut = __first; 6011: _BidirectionalIterator __second_cut = __middle; 6011: _Distance __len11 = 0; 6011: _Distance __len22 = 0; 6011: if (__len1 > __len2) 6011: { 6011: __len11 = __len1 / 2; 6011: std::advance(__first_cut, __len11); 6011: __second_cut 6011: = std::__lower_bound(__middle, __last, *__first_cut, 6011: __gnu_cxx::__ops::__iter_comp_val(__comp)); 6011: __len22 = std::distance(__middle, __second_cut); 6011: } 6011: else 6011: { 6011: __len22 = __len2 / 2; 6011: std::advance(__second_cut, __len22); 6011: __first_cut 6011: = std::__upper_bound(__first, __middle, *__second_cut, 6011: __gnu_cxx::__ops::__val_comp_iter(__comp)); 6011: __len11 = std::distance(__first, __first_cut); 6011: } 6011: 6011: std::rotate(__first_cut, __middle, __second_cut); 6011: _BidirectionalIterator __new_middle = __first_cut; 6011: std::advance(__new_middle, std::distance(__middle, __second_cut)); 6011: std::__merge_without_buffer(__first, __first_cut, __new_middle, 6011: __len11, __len22, __comp); 6011: std::__merge_without_buffer(__new_middle, __second_cut, __last, 6011: __len1 - __len11, __len2 - __len22, __comp); 6011: } 6011: 6011: template 6011: void 6011: __inplace_merge(_BidirectionalIterator __first, 6011: _BidirectionalIterator __middle, 6011: _BidirectionalIterator __last, 6011: _Compare __comp) 6011: { 6011: typedef typename iterator_traits<_BidirectionalIterator>::value_type 6011: _ValueType; 6011: typedef typename iterator_traits<_BidirectionalIterator>::difference_type 6011: _DistanceType; 6011: 6011: if (__first == __middle || __middle == __last) 6011: return; 6011: 6011: const _DistanceType __len1 = std::distance(__first, __middle); 6011: const _DistanceType __len2 = std::distance(__middle, __last); 6011: 6011: typedef _Temporary_buffer<_BidirectionalIterator, _ValueType> _TmpBuf; 6011: _TmpBuf __buf(__first, __last); 6011: 6011: if (__buf.begin() == 0) 6011: std::__merge_without_buffer 6011: (__first, __middle, __last, __len1, __len2, __comp); 6011: else 6011: std::__merge_adaptive 6011: (__first, __middle, __last, __len1, __len2, __buf.begin(), 6011: _DistanceType(__buf.size()), __comp); 6011: } 6011: # 2572 "/usr/include/c++/8/bits/stl_algo.h" 3 6011: template 6011: inline void 6011: inplace_merge(_BidirectionalIterator __first, 6011: _BidirectionalIterator __middle, 6011: _BidirectionalIterator __last) 6011: { 6011: 6011: 6011: 6011: 6011: 6011: ; 6011: ; 6011: ; 6011: 6011: std::__inplace_merge(__first, __middle, __last, 6011: __gnu_cxx::__ops::__iter_less_iter()); 6011: } 6011: # 2613 "/usr/include/c++/8/bits/stl_algo.h" 3 6011: template 6011: inline void 6011: inplace_merge(_BidirectionalIterator __first, 6011: _BidirectionalIterator __middle, 6011: _BidirectionalIterator __last, 6011: _Compare __comp) 6011: { 6011: 6011: 6011: 6011: 6011: 6011: 6011: ; 6011: ; 6011: ; 6011: 6011: std::__inplace_merge(__first, __middle, __last, 6011: __gnu_cxx::__ops::__iter_comp_iter(__comp)); 6011: } 6011: 6011: 6011: 6011: template 6011: _OutputIterator 6011: __move_merge(_InputIterator __first1, _InputIterator __last1, 6011: _InputIterator __first2, _InputIterator __last2, 6011: _OutputIterator __result, _Compare __comp) 6011: { 6011: while (__first1 != __last1 && __first2 != __last2) 6011: { 6011: if (__comp(__first2, __first1)) 6011: { 6011: *__result = std::move(*__first2); 6011: ++__first2; 6011: } 6011: else 6011: { 6011: *__result = std::move(*__first1); 6011: ++__first1; 6011: } 6011: ++__result; 6011: } 6011: return std::move(__first2, __last2, std::move(__first1, __last1, __result)) 6011: 6011: ; 6011: } 6011: 6011: template 6011: void 6011: __merge_sort_loop(_RandomAccessIterator1 __first, 6011: _RandomAccessIterator1 __last, 6011: _RandomAccessIterator2 __result, _Distance __step_size, 6011: _Compare __comp) 6011: { 6011: const _Distance __two_step = 2 * __step_size; 6011: 6011: while (__last - __first >= __two_step) 6011: { 6011: __result = std::__move_merge(__first, __first + __step_size, 6011: __first + __step_size, 6011: __first + __two_step, 6011: __result, __comp); 6011: __first += __two_step; 6011: } 6011: __step_size = std::min(_Distance(__last - __first), __step_size); 6011: 6011: std::__move_merge(__first, __first + __step_size, 6011: __first + __step_size, __last, __result, __comp); 6011: } 6011: 6011: template 6011: void 6011: __chunk_insertion_sort(_RandomAccessIterator __first, 6011: _RandomAccessIterator __last, 6011: _Distance __chunk_size, _Compare __comp) 6011: { 6011: while (__last - __first >= __chunk_size) 6011: { 6011: std::__insertion_sort(__first, __first + __chunk_size, __comp); 6011: __first += __chunk_size; 6011: } 6011: std::__insertion_sort(__first, __last, __comp); 6011: } 6011: 6011: enum { _S_chunk_size = 7 }; 6011: 6011: template 6011: void 6011: __merge_sort_with_buffer(_RandomAccessIterator __first, 6011: _RandomAccessIterator __last, 6011: _Pointer __buffer, _Compare __comp) 6011: { 6011: typedef typename iterator_traits<_RandomAccessIterator>::difference_type 6011: _Distance; 6011: 6011: const _Distance __len = __last - __first; 6011: const _Pointer __buffer_last = __buffer + __len; 6011: 6011: _Distance __step_size = _S_chunk_size; 6011: std::__chunk_insertion_sort(__first, __last, __step_size, __comp); 6011: 6011: while (__step_size < __len) 6011: { 6011: std::__merge_sort_loop(__first, __last, __buffer, 6011: __step_size, __comp); 6011: __step_size *= 2; 6011: std::__merge_sort_loop(__buffer, __buffer_last, __first, 6011: __step_size, __comp); 6011: __step_size *= 2; 6011: } 6011: } 6011: 6011: template 6011: void 6011: __stable_sort_adaptive(_RandomAccessIterator __first, 6011: _RandomAccessIterator __last, 6011: _Pointer __buffer, _Distance __buffer_size, 6011: _Compare __comp) 6011: { 6011: const _Distance __len = (__last - __first + 1) / 2; 6011: const _RandomAccessIterator __middle = __first + __len; 6011: if (__len > __buffer_size) 6011: { 6011: std::__stable_sort_adaptive(__first, __middle, __buffer, 6011: __buffer_size, __comp); 6011: std::__stable_sort_adaptive(__middle, __last, __buffer, 6011: __buffer_size, __comp); 6011: } 6011: else 6011: { 6011: std::__merge_sort_with_buffer(__first, __middle, __buffer, __comp); 6011: std::__merge_sort_with_buffer(__middle, __last, __buffer, __comp); 6011: } 6011: std::__merge_adaptive(__first, __middle, __last, 6011: _Distance(__middle - __first), 6011: _Distance(__last - __middle), 6011: __buffer, __buffer_size, 6011: __comp); 6011: } 6011: 6011: 6011: template 6011: void 6011: __inplace_stable_sort(_RandomAccessIterator __first, 6011: _RandomAccessIterator __last, _Compare __comp) 6011: { 6011: if (__last - __first < 15) 6011: { 6011: std::__insertion_sort(__first, __last, __comp); 6011: return; 6011: } 6011: _RandomAccessIterator __middle = __first + (__last - __first) / 2; 6011: std::__inplace_stable_sort(__first, __middle, __comp); 6011: std::__inplace_stable_sort(__middle, __last, __comp); 6011: std::__merge_without_buffer(__first, __middle, __last, 6011: __middle - __first, 6011: __last - __middle, 6011: __comp); 6011: } 6011: # 2785 "/usr/include/c++/8/bits/stl_algo.h" 3 6011: template 6011: bool 6011: __includes(_InputIterator1 __first1, _InputIterator1 __last1, 6011: _InputIterator2 __first2, _InputIterator2 __last2, 6011: _Compare __comp) 6011: { 6011: while (__first1 != __last1 && __first2 != __last2) 6011: if (__comp(__first2, __first1)) 6011: return false; 6011: else if (__comp(__first1, __first2)) 6011: ++__first1; 6011: else 6011: { 6011: ++__first1; 6011: ++__first2; 6011: } 6011: 6011: return __first2 == __last2; 6011: } 6011: # 2824 "/usr/include/c++/8/bits/stl_algo.h" 3 6011: template 6011: inline bool 6011: includes(_InputIterator1 __first1, _InputIterator1 __last1, 6011: _InputIterator2 __first2, _InputIterator2 __last2) 6011: { 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: ; 6011: ; 6011: ; 6011: ; 6011: 6011: return std::__includes(__first1, __last1, __first2, __last2, 6011: __gnu_cxx::__ops::__iter_less_iter()); 6011: } 6011: # 2868 "/usr/include/c++/8/bits/stl_algo.h" 3 6011: template 6011: inline bool 6011: includes(_InputIterator1 __first1, _InputIterator1 __last1, 6011: _InputIterator2 __first2, _InputIterator2 __last2, 6011: _Compare __comp) 6011: { 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: ; 6011: ; 6011: ; 6011: ; 6011: 6011: return std::__includes(__first1, __last1, __first2, __last2, 6011: __gnu_cxx::__ops::__iter_comp_iter(__comp)); 6011: } 6011: # 2903 "/usr/include/c++/8/bits/stl_algo.h" 3 6011: template 6011: bool 6011: __next_permutation(_BidirectionalIterator __first, 6011: _BidirectionalIterator __last, _Compare __comp) 6011: { 6011: if (__first == __last) 6011: return false; 6011: _BidirectionalIterator __i = __first; 6011: ++__i; 6011: if (__i == __last) 6011: return false; 6011: __i = __last; 6011: --__i; 6011: 6011: for(;;) 6011: { 6011: _BidirectionalIterator __ii = __i; 6011: --__i; 6011: if (__comp(__i, __ii)) 6011: { 6011: _BidirectionalIterator __j = __last; 6011: while (!__comp(__i, --__j)) 6011: {} 6011: std::iter_swap(__i, __j); 6011: std::__reverse(__ii, __last, 6011: std::__iterator_category(__first)); 6011: return true; 6011: } 6011: if (__i == __first) 6011: { 6011: std::__reverse(__first, __last, 6011: std::__iterator_category(__first)); 6011: return false; 6011: } 6011: } 6011: } 6011: # 2952 "/usr/include/c++/8/bits/stl_algo.h" 3 6011: template 6011: inline bool 6011: next_permutation(_BidirectionalIterator __first, 6011: _BidirectionalIterator __last) 6011: { 6011: 6011: 6011: 6011: 6011: 6011: ; 6011: ; 6011: 6011: return std::__next_permutation 6011: (__first, __last, __gnu_cxx::__ops::__iter_less_iter()); 6011: } 6011: # 2984 "/usr/include/c++/8/bits/stl_algo.h" 3 6011: template 6011: inline bool 6011: next_permutation(_BidirectionalIterator __first, 6011: _BidirectionalIterator __last, _Compare __comp) 6011: { 6011: 6011: 6011: 6011: 6011: 6011: 6011: ; 6011: ; 6011: 6011: return std::__next_permutation 6011: (__first, __last, __gnu_cxx::__ops::__iter_comp_iter(__comp)); 6011: } 6011: 6011: template 6011: bool 6011: __prev_permutation(_BidirectionalIterator __first, 6011: _BidirectionalIterator __last, _Compare __comp) 6011: { 6011: if (__first == __last) 6011: return false; 6011: _BidirectionalIterator __i = __first; 6011: ++__i; 6011: if (__i == __last) 6011: return false; 6011: __i = __last; 6011: --__i; 6011: 6011: for(;;) 6011: { 6011: _BidirectionalIterator __ii = __i; 6011: --__i; 6011: if (__comp(__ii, __i)) 6011: { 6011: _BidirectionalIterator __j = __last; 6011: while (!__comp(--__j, __i)) 6011: {} 6011: std::iter_swap(__i, __j); 6011: std::__reverse(__ii, __last, 6011: std::__iterator_category(__first)); 6011: return true; 6011: } 6011: if (__i == __first) 6011: { 6011: std::__reverse(__first, __last, 6011: std::__iterator_category(__first)); 6011: return false; 6011: } 6011: } 6011: } 6011: # 3052 "/usr/include/c++/8/bits/stl_algo.h" 3 6011: template 6011: inline bool 6011: prev_permutation(_BidirectionalIterator __first, 6011: _BidirectionalIterator __last) 6011: { 6011: 6011: 6011: 6011: 6011: 6011: ; 6011: ; 6011: 6011: return std::__prev_permutation(__first, __last, 6011: __gnu_cxx::__ops::__iter_less_iter()); 6011: } 6011: # 3084 "/usr/include/c++/8/bits/stl_algo.h" 3 6011: template 6011: inline bool 6011: prev_permutation(_BidirectionalIterator __first, 6011: _BidirectionalIterator __last, _Compare __comp) 6011: { 6011: 6011: 6011: 6011: 6011: 6011: 6011: ; 6011: ; 6011: 6011: return std::__prev_permutation(__first, __last, 6011: __gnu_cxx::__ops::__iter_comp_iter(__comp)); 6011: } 6011: 6011: 6011: 6011: 6011: template 6011: _OutputIterator 6011: __replace_copy_if(_InputIterator __first, _InputIterator __last, 6011: _OutputIterator __result, 6011: _Predicate __pred, const _Tp& __new_value) 6011: { 6011: for (; __first != __last; ++__first, (void)++__result) 6011: if (__pred(__first)) 6011: *__result = __new_value; 6011: else 6011: *__result = *__first; 6011: return __result; 6011: } 6011: # 3134 "/usr/include/c++/8/bits/stl_algo.h" 3 6011: template 6011: inline _OutputIterator 6011: replace_copy(_InputIterator __first, _InputIterator __last, 6011: _OutputIterator __result, 6011: const _Tp& __old_value, const _Tp& __new_value) 6011: { 6011: 6011: 6011: 6011: 6011: 6011: 6011: ; 6011: 6011: return std::__replace_copy_if(__first, __last, __result, 6011: __gnu_cxx::__ops::__iter_equals_val(__old_value), 6011: __new_value); 6011: } 6011: # 3168 "/usr/include/c++/8/bits/stl_algo.h" 3 6011: template 6011: inline _OutputIterator 6011: replace_copy_if(_InputIterator __first, _InputIterator __last, 6011: _OutputIterator __result, 6011: _Predicate __pred, const _Tp& __new_value) 6011: { 6011: 6011: 6011: 6011: 6011: 6011: 6011: ; 6011: 6011: return std::__replace_copy_if(__first, __last, __result, 6011: __gnu_cxx::__ops::__pred_iter(__pred), 6011: __new_value); 6011: } 6011: 6011: template 6011: typename iterator_traits<_InputIterator>::difference_type 6011: __count_if(_InputIterator __first, _InputIterator __last, _Predicate __pred) 6011: { 6011: typename iterator_traits<_InputIterator>::difference_type __n = 0; 6011: for (; __first != __last; ++__first) 6011: if (__pred(__first)) 6011: ++__n; 6011: return __n; 6011: } 6011: # 3207 "/usr/include/c++/8/bits/stl_algo.h" 3 6011: template 6011: inline bool 6011: is_sorted(_ForwardIterator __first, _ForwardIterator __last) 6011: { return std::is_sorted_until(__first, __last) == __last; } 6011: # 3221 "/usr/include/c++/8/bits/stl_algo.h" 3 6011: template 6011: inline bool 6011: is_sorted(_ForwardIterator __first, _ForwardIterator __last, 6011: _Compare __comp) 6011: { return std::is_sorted_until(__first, __last, __comp) == __last; } 6011: 6011: template 6011: _ForwardIterator 6011: __is_sorted_until(_ForwardIterator __first, _ForwardIterator __last, 6011: _Compare __comp) 6011: { 6011: if (__first == __last) 6011: return __last; 6011: 6011: _ForwardIterator __next = __first; 6011: for (++__next; __next != __last; __first = __next, (void)++__next) 6011: if (__comp(__next, __first)) 6011: return __next; 6011: return __next; 6011: } 6011: # 3250 "/usr/include/c++/8/bits/stl_algo.h" 3 6011: template 6011: inline _ForwardIterator 6011: is_sorted_until(_ForwardIterator __first, _ForwardIterator __last) 6011: { 6011: 6011: 6011: 6011: 6011: ; 6011: ; 6011: 6011: return std::__is_sorted_until(__first, __last, 6011: __gnu_cxx::__ops::__iter_less_iter()); 6011: } 6011: # 3274 "/usr/include/c++/8/bits/stl_algo.h" 3 6011: template 6011: inline _ForwardIterator 6011: is_sorted_until(_ForwardIterator __first, _ForwardIterator __last, 6011: _Compare __comp) 6011: { 6011: 6011: 6011: 6011: 6011: 6011: ; 6011: ; 6011: 6011: return std::__is_sorted_until(__first, __last, 6011: __gnu_cxx::__ops::__iter_comp_iter(__comp)); 6011: } 6011: # 3299 "/usr/include/c++/8/bits/stl_algo.h" 3 6011: template 6011: 6011: inline pair 6011: minmax(const _Tp& __a, const _Tp& __b) 6011: { 6011: 6011: 6011: 6011: return __b < __a ? pair(__b, __a) 6011: : pair(__a, __b); 6011: } 6011: # 3320 "/usr/include/c++/8/bits/stl_algo.h" 3 6011: template 6011: 6011: inline pair 6011: minmax(const _Tp& __a, const _Tp& __b, _Compare __comp) 6011: { 6011: return __comp(__b, __a) ? pair(__b, __a) 6011: : pair(__a, __b); 6011: } 6011: 6011: template 6011: 6011: pair<_ForwardIterator, _ForwardIterator> 6011: __minmax_element(_ForwardIterator __first, _ForwardIterator __last, 6011: _Compare __comp) 6011: { 6011: _ForwardIterator __next = __first; 6011: if (__first == __last 6011: || ++__next == __last) 6011: return std::make_pair(__first, __first); 6011: 6011: _ForwardIterator __min{}, __max{}; 6011: if (__comp(__next, __first)) 6011: { 6011: __min = __next; 6011: __max = __first; 6011: } 6011: else 6011: { 6011: __min = __first; 6011: __max = __next; 6011: } 6011: 6011: __first = __next; 6011: ++__first; 6011: 6011: while (__first != __last) 6011: { 6011: __next = __first; 6011: if (++__next == __last) 6011: { 6011: if (__comp(__first, __min)) 6011: __min = __first; 6011: else if (!__comp(__first, __max)) 6011: __max = __first; 6011: break; 6011: } 6011: 6011: if (__comp(__next, __first)) 6011: { 6011: if (__comp(__next, __min)) 6011: __min = __next; 6011: if (!__comp(__first, __max)) 6011: __max = __first; 6011: } 6011: else 6011: { 6011: if (__comp(__first, __min)) 6011: __min = __first; 6011: if (!__comp(__next, __max)) 6011: __max = __next; 6011: } 6011: 6011: __first = __next; 6011: ++__first; 6011: } 6011: 6011: return std::make_pair(__min, __max); 6011: } 6011: # 3400 "/usr/include/c++/8/bits/stl_algo.h" 3 6011: template 6011: 6011: inline pair<_ForwardIterator, _ForwardIterator> 6011: minmax_element(_ForwardIterator __first, _ForwardIterator __last) 6011: { 6011: 6011: 6011: 6011: 6011: ; 6011: ; 6011: 6011: return std::__minmax_element(__first, __last, 6011: __gnu_cxx::__ops::__iter_less_iter()); 6011: } 6011: # 3428 "/usr/include/c++/8/bits/stl_algo.h" 3 6011: template 6011: 6011: inline pair<_ForwardIterator, _ForwardIterator> 6011: minmax_element(_ForwardIterator __first, _ForwardIterator __last, 6011: _Compare __comp) 6011: { 6011: 6011: 6011: 6011: 6011: 6011: ; 6011: ; 6011: 6011: return std::__minmax_element(__first, __last, 6011: __gnu_cxx::__ops::__iter_comp_iter(__comp)); 6011: } 6011: 6011: 6011: template 6011: 6011: inline _Tp 6011: min(initializer_list<_Tp> __l) 6011: { return *std::min_element(__l.begin(), __l.end()); } 6011: 6011: template 6011: 6011: inline _Tp 6011: min(initializer_list<_Tp> __l, _Compare __comp) 6011: { return *std::min_element(__l.begin(), __l.end(), __comp); } 6011: 6011: template 6011: 6011: inline _Tp 6011: max(initializer_list<_Tp> __l) 6011: { return *std::max_element(__l.begin(), __l.end()); } 6011: 6011: template 6011: 6011: inline _Tp 6011: max(initializer_list<_Tp> __l, _Compare __comp) 6011: { return *std::max_element(__l.begin(), __l.end(), __comp); } 6011: 6011: template 6011: 6011: inline pair<_Tp, _Tp> 6011: minmax(initializer_list<_Tp> __l) 6011: { 6011: pair __p = 6011: std::minmax_element(__l.begin(), __l.end()); 6011: return std::make_pair(*__p.first, *__p.second); 6011: } 6011: 6011: template 6011: 6011: inline pair<_Tp, _Tp> 6011: minmax(initializer_list<_Tp> __l, _Compare __comp) 6011: { 6011: pair __p = 6011: std::minmax_element(__l.begin(), __l.end(), __comp); 6011: return std::make_pair(*__p.first, *__p.second); 6011: } 6011: 6011: template 6011: bool 6011: __is_permutation(_ForwardIterator1 __first1, _ForwardIterator1 __last1, 6011: _ForwardIterator2 __first2, _BinaryPredicate __pred) 6011: { 6011: 6011: 6011: for (; __first1 != __last1; ++__first1, (void)++__first2) 6011: if (!__pred(__first1, __first2)) 6011: break; 6011: 6011: if (__first1 == __last1) 6011: return true; 6011: 6011: 6011: 6011: _ForwardIterator2 __last2 = __first2; 6011: std::advance(__last2, std::distance(__first1, __last1)); 6011: for (_ForwardIterator1 __scan = __first1; __scan != __last1; ++__scan) 6011: { 6011: if (__scan != std::__find_if(__first1, __scan, 6011: __gnu_cxx::__ops::__iter_comp_iter(__pred, __scan))) 6011: continue; 6011: 6011: auto __matches 6011: = std::__count_if(__first2, __last2, 6011: __gnu_cxx::__ops::__iter_comp_iter(__pred, __scan)); 6011: if (0 == __matches || 6011: std::__count_if(__scan, __last1, 6011: __gnu_cxx::__ops::__iter_comp_iter(__pred, __scan)) 6011: != __matches) 6011: return false; 6011: } 6011: return true; 6011: } 6011: # 3540 "/usr/include/c++/8/bits/stl_algo.h" 3 6011: template 6011: inline bool 6011: is_permutation(_ForwardIterator1 __first1, _ForwardIterator1 __last1, 6011: _ForwardIterator2 __first2) 6011: { 6011: 6011: 6011: 6011: 6011: 6011: 6011: ; 6011: 6011: return std::__is_permutation(__first1, __last1, __first2, 6011: __gnu_cxx::__ops::__iter_equal_to_iter()); 6011: } 6011: # 3571 "/usr/include/c++/8/bits/stl_algo.h" 3 6011: template 6011: inline bool 6011: is_permutation(_ForwardIterator1 __first1, _ForwardIterator1 __last1, 6011: _ForwardIterator2 __first2, _BinaryPredicate __pred) 6011: { 6011: 6011: 6011: 6011: 6011: 6011: 6011: ; 6011: 6011: return std::__is_permutation(__first1, __last1, __first2, 6011: __gnu_cxx::__ops::__iter_comp_iter(__pred)); 6011: } 6011: # 3767 "/usr/include/c++/8/bits/stl_algo.h" 3 6011: template 6011: pair<_IntType, _IntType> 6011: __gen_two_uniform_ints(_IntType __b0, _IntType __b1, 6011: _UniformRandomBitGenerator&& __g) 6011: { 6011: _IntType __x 6011: = uniform_int_distribution<_IntType>{0, (__b0 * __b1) - 1}(__g); 6011: return std::make_pair(__x / __b1, __x % __b1); 6011: } 6011: # 3789 "/usr/include/c++/8/bits/stl_algo.h" 3 6011: template 6011: void 6011: shuffle(_RandomAccessIterator __first, _RandomAccessIterator __last, 6011: _UniformRandomNumberGenerator&& __g) 6011: { 6011: 6011: 6011: 6011: ; 6011: 6011: if (__first == __last) 6011: return; 6011: 6011: typedef typename iterator_traits<_RandomAccessIterator>::difference_type 6011: _DistanceType; 6011: 6011: typedef typename std::make_unsigned<_DistanceType>::type __ud_type; 6011: typedef typename std::uniform_int_distribution<__ud_type> __distr_type; 6011: typedef typename __distr_type::param_type __p_type; 6011: 6011: typedef typename remove_reference<_UniformRandomNumberGenerator>::type 6011: _Gen; 6011: typedef typename common_type::type 6011: __uc_type; 6011: 6011: const __uc_type __urngrange = __g.max() - __g.min(); 6011: const __uc_type __urange = __uc_type(__last - __first); 6011: 6011: if (__urngrange / __urange >= __urange) 6011: 6011: { 6011: _RandomAccessIterator __i = __first + 1; 6011: 6011: 6011: 6011: 6011: 6011: if ((__urange % 2) == 0) 6011: { 6011: __distr_type __d{0, 1}; 6011: std::iter_swap(__i++, __first + __d(__g)); 6011: } 6011: 6011: 6011: 6011: 6011: 6011: while (__i != __last) 6011: { 6011: const __uc_type __swap_range = __uc_type(__i - __first) + 1; 6011: 6011: const pair<__uc_type, __uc_type> __pospos = 6011: __gen_two_uniform_ints(__swap_range, __swap_range + 1, __g); 6011: 6011: std::iter_swap(__i++, __first + __pospos.first); 6011: std::iter_swap(__i++, __first + __pospos.second); 6011: } 6011: 6011: return; 6011: } 6011: 6011: __distr_type __d; 6011: 6011: for (_RandomAccessIterator __i = __first + 1; __i != __last; ++__i) 6011: std::iter_swap(__i, __first + __d(__g, __p_type(0, __i - __first))); 6011: } 6011: 6011: 6011: 6011: 6011: 6011: # 3874 "/usr/include/c++/8/bits/stl_algo.h" 3 6011: template 6011: _Function 6011: for_each(_InputIterator __first, _InputIterator __last, _Function __f) 6011: { 6011: 6011: 6011: ; 6011: for (; __first != __last; ++__first) 6011: __f(*__first); 6011: return __f; 6011: } 6011: # 3895 "/usr/include/c++/8/bits/stl_algo.h" 3 6011: template 6011: inline _InputIterator 6011: find(_InputIterator __first, _InputIterator __last, 6011: const _Tp& __val) 6011: { 6011: 6011: 6011: 6011: 6011: ; 6011: return std::__find_if(__first, __last, 6011: __gnu_cxx::__ops::__iter_equals_val(__val)); 6011: } 6011: # 3919 "/usr/include/c++/8/bits/stl_algo.h" 3 6011: template 6011: inline _InputIterator 6011: find_if(_InputIterator __first, _InputIterator __last, 6011: _Predicate __pred) 6011: { 6011: 6011: 6011: 6011: 6011: ; 6011: 6011: return std::__find_if(__first, __last, 6011: __gnu_cxx::__ops::__pred_iter(__pred)); 6011: } 6011: # 3950 "/usr/include/c++/8/bits/stl_algo.h" 3 6011: template 6011: _InputIterator 6011: find_first_of(_InputIterator __first1, _InputIterator __last1, 6011: _ForwardIterator __first2, _ForwardIterator __last2) 6011: { 6011: 6011: 6011: 6011: 6011: 6011: 6011: ; 6011: ; 6011: 6011: for (; __first1 != __last1; ++__first1) 6011: for (_ForwardIterator __iter = __first2; __iter != __last2; ++__iter) 6011: if (*__first1 == *__iter) 6011: return __first1; 6011: return __last1; 6011: } 6011: # 3990 "/usr/include/c++/8/bits/stl_algo.h" 3 6011: template 6011: _InputIterator 6011: find_first_of(_InputIterator __first1, _InputIterator __last1, 6011: _ForwardIterator __first2, _ForwardIterator __last2, 6011: _BinaryPredicate __comp) 6011: { 6011: 6011: 6011: 6011: 6011: 6011: 6011: ; 6011: ; 6011: 6011: for (; __first1 != __last1; ++__first1) 6011: for (_ForwardIterator __iter = __first2; __iter != __last2; ++__iter) 6011: if (__comp(*__first1, *__iter)) 6011: return __first1; 6011: return __last1; 6011: } 6011: # 4022 "/usr/include/c++/8/bits/stl_algo.h" 3 6011: template 6011: inline _ForwardIterator 6011: adjacent_find(_ForwardIterator __first, _ForwardIterator __last) 6011: { 6011: 6011: 6011: 6011: 6011: ; 6011: 6011: return std::__adjacent_find(__first, __last, 6011: __gnu_cxx::__ops::__iter_equal_to_iter()); 6011: } 6011: # 4047 "/usr/include/c++/8/bits/stl_algo.h" 3 6011: template 6011: inline _ForwardIterator 6011: adjacent_find(_ForwardIterator __first, _ForwardIterator __last, 6011: _BinaryPredicate __binary_pred) 6011: { 6011: 6011: 6011: 6011: 6011: 6011: ; 6011: 6011: return std::__adjacent_find(__first, __last, 6011: __gnu_cxx::__ops::__iter_comp_iter(__binary_pred)); 6011: } 6011: # 4072 "/usr/include/c++/8/bits/stl_algo.h" 3 6011: template 6011: inline typename iterator_traits<_InputIterator>::difference_type 6011: count(_InputIterator __first, _InputIterator __last, const _Tp& __value) 6011: { 6011: 6011: 6011: 6011: 6011: ; 6011: 6011: return std::__count_if(__first, __last, 6011: __gnu_cxx::__ops::__iter_equals_val(__value)); 6011: } 6011: # 4095 "/usr/include/c++/8/bits/stl_algo.h" 3 6011: template 6011: inline typename iterator_traits<_InputIterator>::difference_type 6011: count_if(_InputIterator __first, _InputIterator __last, _Predicate __pred) 6011: { 6011: 6011: 6011: 6011: 6011: ; 6011: 6011: return std::__count_if(__first, __last, 6011: __gnu_cxx::__ops::__pred_iter(__pred)); 6011: } 6011: # 4135 "/usr/include/c++/8/bits/stl_algo.h" 3 6011: template 6011: inline _ForwardIterator1 6011: search(_ForwardIterator1 __first1, _ForwardIterator1 __last1, 6011: _ForwardIterator2 __first2, _ForwardIterator2 __last2) 6011: { 6011: 6011: 6011: 6011: 6011: 6011: 6011: ; 6011: ; 6011: 6011: return std::__search(__first1, __last1, __first2, __last2, 6011: __gnu_cxx::__ops::__iter_equal_to_iter()); 6011: } 6011: # 4174 "/usr/include/c++/8/bits/stl_algo.h" 3 6011: template 6011: inline _ForwardIterator1 6011: search(_ForwardIterator1 __first1, _ForwardIterator1 __last1, 6011: _ForwardIterator2 __first2, _ForwardIterator2 __last2, 6011: _BinaryPredicate __predicate) 6011: { 6011: 6011: 6011: 6011: 6011: 6011: 6011: ; 6011: ; 6011: 6011: return std::__search(__first1, __last1, __first2, __last2, 6011: __gnu_cxx::__ops::__iter_comp_iter(__predicate)); 6011: } 6011: # 4209 "/usr/include/c++/8/bits/stl_algo.h" 3 6011: template 6011: inline _ForwardIterator 6011: search_n(_ForwardIterator __first, _ForwardIterator __last, 6011: _Integer __count, const _Tp& __val) 6011: { 6011: 6011: 6011: 6011: 6011: ; 6011: 6011: return std::__search_n(__first, __last, __count, 6011: __gnu_cxx::__ops::__iter_equals_val(__val)); 6011: } 6011: # 4242 "/usr/include/c++/8/bits/stl_algo.h" 3 6011: template 6011: inline _ForwardIterator 6011: search_n(_ForwardIterator __first, _ForwardIterator __last, 6011: _Integer __count, const _Tp& __val, 6011: _BinaryPredicate __binary_pred) 6011: { 6011: 6011: 6011: 6011: 6011: ; 6011: 6011: return std::__search_n(__first, __last, __count, 6011: __gnu_cxx::__ops::__iter_comp_val(__binary_pred, __val)); 6011: } 6011: # 4290 "/usr/include/c++/8/bits/stl_algo.h" 3 6011: template 6011: _OutputIterator 6011: transform(_InputIterator __first, _InputIterator __last, 6011: _OutputIterator __result, _UnaryOperation __unary_op) 6011: { 6011: 6011: 6011: 6011: 6011: 6011: ; 6011: 6011: for (; __first != __last; ++__first, (void)++__result) 6011: *__result = __unary_op(*__first); 6011: return __result; 6011: } 6011: # 4327 "/usr/include/c++/8/bits/stl_algo.h" 3 6011: template 6011: _OutputIterator 6011: transform(_InputIterator1 __first1, _InputIterator1 __last1, 6011: _InputIterator2 __first2, _OutputIterator __result, 6011: _BinaryOperation __binary_op) 6011: { 6011: 6011: 6011: 6011: 6011: 6011: 6011: ; 6011: 6011: for (; __first1 != __last1; ++__first1, (void)++__first2, ++__result) 6011: *__result = __binary_op(*__first1, *__first2); 6011: return __result; 6011: } 6011: # 4360 "/usr/include/c++/8/bits/stl_algo.h" 3 6011: template 6011: void 6011: replace(_ForwardIterator __first, _ForwardIterator __last, 6011: const _Tp& __old_value, const _Tp& __new_value) 6011: { 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: ; 6011: 6011: for (; __first != __last; ++__first) 6011: if (*__first == __old_value) 6011: *__first = __new_value; 6011: } 6011: # 4392 "/usr/include/c++/8/bits/stl_algo.h" 3 6011: template 6011: void 6011: replace_if(_ForwardIterator __first, _ForwardIterator __last, 6011: _Predicate __pred, const _Tp& __new_value) 6011: { 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: ; 6011: 6011: for (; __first != __last; ++__first) 6011: if (__pred(*__first)) 6011: *__first = __new_value; 6011: } 6011: # 4424 "/usr/include/c++/8/bits/stl_algo.h" 3 6011: template 6011: void 6011: generate(_ForwardIterator __first, _ForwardIterator __last, 6011: _Generator __gen) 6011: { 6011: 6011: 6011: 6011: 6011: ; 6011: 6011: for (; __first != __last; ++__first) 6011: *__first = __gen(); 6011: } 6011: # 4455 "/usr/include/c++/8/bits/stl_algo.h" 3 6011: template 6011: _OutputIterator 6011: generate_n(_OutputIterator __first, _Size __n, _Generator __gen) 6011: { 6011: 6011: 6011: 6011: 6011: 6011: for (__decltype(__n + 0) __niter = __n; 6011: __niter > 0; --__niter, (void) ++__first) 6011: *__first = __gen(); 6011: return __first; 6011: } 6011: # 4491 "/usr/include/c++/8/bits/stl_algo.h" 3 6011: template 6011: inline _OutputIterator 6011: unique_copy(_InputIterator __first, _InputIterator __last, 6011: _OutputIterator __result) 6011: { 6011: 6011: 6011: 6011: 6011: 6011: 6011: ; 6011: 6011: if (__first == __last) 6011: return __result; 6011: return std::__unique_copy(__first, __last, __result, 6011: __gnu_cxx::__ops::__iter_equal_to_iter(), 6011: std::__iterator_category(__first), 6011: std::__iterator_category(__result)); 6011: } 6011: # 4531 "/usr/include/c++/8/bits/stl_algo.h" 3 6011: template 6011: inline _OutputIterator 6011: unique_copy(_InputIterator __first, _InputIterator __last, 6011: _OutputIterator __result, 6011: _BinaryPredicate __binary_pred) 6011: { 6011: 6011: 6011: 6011: 6011: ; 6011: 6011: if (__first == __last) 6011: return __result; 6011: return std::__unique_copy(__first, __last, __result, 6011: __gnu_cxx::__ops::__iter_comp_iter(__binary_pred), 6011: std::__iterator_category(__first), 6011: std::__iterator_category(__result)); 6011: } 6011: # 4564 "/usr/include/c++/8/bits/stl_algo.h" 3 6011: template 6011: inline void 6011: random_shuffle(_RandomAccessIterator __first, _RandomAccessIterator __last) 6011: { 6011: 6011: 6011: 6011: ; 6011: 6011: if (__first != __last) 6011: for (_RandomAccessIterator __i = __first + 1; __i != __last; ++__i) 6011: { 6011: 6011: _RandomAccessIterator __j = __first 6011: + std::rand() % ((__i - __first) + 1); 6011: if (__i != __j) 6011: std::iter_swap(__i, __j); 6011: } 6011: } 6011: # 4599 "/usr/include/c++/8/bits/stl_algo.h" 3 6011: template 6011: void 6011: random_shuffle(_RandomAccessIterator __first, _RandomAccessIterator __last, 6011: 6011: _RandomNumberGenerator&& __rand) 6011: 6011: 6011: 6011: { 6011: 6011: 6011: 6011: ; 6011: 6011: if (__first == __last) 6011: return; 6011: for (_RandomAccessIterator __i = __first + 1; __i != __last; ++__i) 6011: { 6011: _RandomAccessIterator __j = __first + __rand((__i - __first) + 1); 6011: if (__i != __j) 6011: std::iter_swap(__i, __j); 6011: } 6011: } 6011: # 4639 "/usr/include/c++/8/bits/stl_algo.h" 3 6011: template 6011: inline _ForwardIterator 6011: partition(_ForwardIterator __first, _ForwardIterator __last, 6011: _Predicate __pred) 6011: { 6011: 6011: 6011: 6011: 6011: 6011: ; 6011: 6011: return std::__partition(__first, __last, __pred, 6011: std::__iterator_category(__first)); 6011: } 6011: # 4672 "/usr/include/c++/8/bits/stl_algo.h" 3 6011: template 6011: inline void 6011: partial_sort(_RandomAccessIterator __first, 6011: _RandomAccessIterator __middle, 6011: _RandomAccessIterator __last) 6011: { 6011: 6011: 6011: 6011: 6011: 6011: ; 6011: ; 6011: ; 6011: 6011: std::__partial_sort(__first, __middle, __last, 6011: __gnu_cxx::__ops::__iter_less_iter()); 6011: } 6011: # 4710 "/usr/include/c++/8/bits/stl_algo.h" 3 6011: template 6011: inline void 6011: partial_sort(_RandomAccessIterator __first, 6011: _RandomAccessIterator __middle, 6011: _RandomAccessIterator __last, 6011: _Compare __comp) 6011: { 6011: 6011: 6011: 6011: 6011: 6011: 6011: ; 6011: ; 6011: ; 6011: 6011: std::__partial_sort(__first, __middle, __last, 6011: __gnu_cxx::__ops::__iter_comp_iter(__comp)); 6011: } 6011: # 4746 "/usr/include/c++/8/bits/stl_algo.h" 3 6011: template 6011: inline void 6011: nth_element(_RandomAccessIterator __first, _RandomAccessIterator __nth, 6011: _RandomAccessIterator __last) 6011: { 6011: 6011: 6011: 6011: 6011: 6011: ; 6011: ; 6011: ; 6011: 6011: if (__first == __last || __nth == __last) 6011: return; 6011: 6011: std::__introselect(__first, __nth, __last, 6011: std::__lg(__last - __first) * 2, 6011: __gnu_cxx::__ops::__iter_less_iter()); 6011: } 6011: # 4785 "/usr/include/c++/8/bits/stl_algo.h" 3 6011: template 6011: inline void 6011: nth_element(_RandomAccessIterator __first, _RandomAccessIterator __nth, 6011: _RandomAccessIterator __last, _Compare __comp) 6011: { 6011: 6011: 6011: 6011: 6011: 6011: 6011: ; 6011: ; 6011: ; 6011: 6011: if (__first == __last || __nth == __last) 6011: return; 6011: 6011: std::__introselect(__first, __nth, __last, 6011: std::__lg(__last - __first) * 2, 6011: __gnu_cxx::__ops::__iter_comp_iter(__comp)); 6011: } 6011: # 4822 "/usr/include/c++/8/bits/stl_algo.h" 3 6011: template 6011: inline void 6011: sort(_RandomAccessIterator __first, _RandomAccessIterator __last) 6011: { 6011: 6011: 6011: 6011: 6011: 6011: ; 6011: ; 6011: 6011: std::__sort(__first, __last, __gnu_cxx::__ops::__iter_less_iter()); 6011: } 6011: # 4852 "/usr/include/c++/8/bits/stl_algo.h" 3 6011: template 6011: inline void 6011: sort(_RandomAccessIterator __first, _RandomAccessIterator __last, 6011: _Compare __comp) 6011: { 6011: 6011: 6011: 6011: 6011: 6011: 6011: ; 6011: ; 6011: 6011: std::__sort(__first, __last, __gnu_cxx::__ops::__iter_comp_iter(__comp)); 6011: } 6011: 6011: template 6011: _OutputIterator 6011: __merge(_InputIterator1 __first1, _InputIterator1 __last1, 6011: _InputIterator2 __first2, _InputIterator2 __last2, 6011: _OutputIterator __result, _Compare __comp) 6011: { 6011: while (__first1 != __last1 && __first2 != __last2) 6011: { 6011: if (__comp(__first2, __first1)) 6011: { 6011: *__result = *__first2; 6011: ++__first2; 6011: } 6011: else 6011: { 6011: *__result = *__first1; 6011: ++__first1; 6011: } 6011: ++__result; 6011: } 6011: return std::copy(__first2, __last2, 6011: std::copy(__first1, __last1, __result)); 6011: } 6011: # 4913 "/usr/include/c++/8/bits/stl_algo.h" 3 6011: template 6011: inline _OutputIterator 6011: merge(_InputIterator1 __first1, _InputIterator1 __last1, 6011: _InputIterator2 __first2, _InputIterator2 __last2, 6011: _OutputIterator __result) 6011: { 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: ; 6011: ; 6011: ; 6011: ; 6011: 6011: return std::__merge(__first1, __last1, 6011: __first2, __last2, __result, 6011: __gnu_cxx::__ops::__iter_less_iter()); 6011: } 6011: # 4963 "/usr/include/c++/8/bits/stl_algo.h" 3 6011: template 6011: inline _OutputIterator 6011: merge(_InputIterator1 __first1, _InputIterator1 __last1, 6011: _InputIterator2 __first2, _InputIterator2 __last2, 6011: _OutputIterator __result, _Compare __comp) 6011: { 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: ; 6011: ; 6011: ; 6011: ; 6011: 6011: return std::__merge(__first1, __last1, 6011: __first2, __last2, __result, 6011: __gnu_cxx::__ops::__iter_comp_iter(__comp)); 6011: } 6011: 6011: template 6011: inline void 6011: __stable_sort(_RandomAccessIterator __first, _RandomAccessIterator __last, 6011: _Compare __comp) 6011: { 6011: typedef typename iterator_traits<_RandomAccessIterator>::value_type 6011: _ValueType; 6011: typedef typename iterator_traits<_RandomAccessIterator>::difference_type 6011: _DistanceType; 6011: 6011: typedef _Temporary_buffer<_RandomAccessIterator, _ValueType> _TmpBuf; 6011: _TmpBuf __buf(__first, __last); 6011: 6011: if (__buf.begin() == 0) 6011: std::__inplace_stable_sort(__first, __last, __comp); 6011: else 6011: std::__stable_sort_adaptive(__first, __last, __buf.begin(), 6011: _DistanceType(__buf.size()), __comp); 6011: } 6011: # 5027 "/usr/include/c++/8/bits/stl_algo.h" 3 6011: template 6011: inline void 6011: stable_sort(_RandomAccessIterator __first, _RandomAccessIterator __last) 6011: { 6011: 6011: 6011: 6011: 6011: 6011: ; 6011: ; 6011: 6011: std::__stable_sort(__first, __last, 6011: __gnu_cxx::__ops::__iter_less_iter()); 6011: } 6011: # 5061 "/usr/include/c++/8/bits/stl_algo.h" 3 6011: template 6011: inline void 6011: stable_sort(_RandomAccessIterator __first, _RandomAccessIterator __last, 6011: _Compare __comp) 6011: { 6011: 6011: 6011: 6011: 6011: 6011: 6011: ; 6011: ; 6011: 6011: std::__stable_sort(__first, __last, 6011: __gnu_cxx::__ops::__iter_comp_iter(__comp)); 6011: } 6011: 6011: template 6011: _OutputIterator 6011: __set_union(_InputIterator1 __first1, _InputIterator1 __last1, 6011: _InputIterator2 __first2, _InputIterator2 __last2, 6011: _OutputIterator __result, _Compare __comp) 6011: { 6011: while (__first1 != __last1 && __first2 != __last2) 6011: { 6011: if (__comp(__first1, __first2)) 6011: { 6011: *__result = *__first1; 6011: ++__first1; 6011: } 6011: else if (__comp(__first2, __first1)) 6011: { 6011: *__result = *__first2; 6011: ++__first2; 6011: } 6011: else 6011: { 6011: *__result = *__first1; 6011: ++__first1; 6011: ++__first2; 6011: } 6011: ++__result; 6011: } 6011: return std::copy(__first2, __last2, 6011: std::copy(__first1, __last1, __result)); 6011: } 6011: # 5130 "/usr/include/c++/8/bits/stl_algo.h" 3 6011: template 6011: inline _OutputIterator 6011: set_union(_InputIterator1 __first1, _InputIterator1 __last1, 6011: _InputIterator2 __first2, _InputIterator2 __last2, 6011: _OutputIterator __result) 6011: { 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: ; 6011: ; 6011: ; 6011: ; 6011: 6011: return std::__set_union(__first1, __last1, 6011: __first2, __last2, __result, 6011: __gnu_cxx::__ops::__iter_less_iter()); 6011: } 6011: # 5180 "/usr/include/c++/8/bits/stl_algo.h" 3 6011: template 6011: inline _OutputIterator 6011: set_union(_InputIterator1 __first1, _InputIterator1 __last1, 6011: _InputIterator2 __first2, _InputIterator2 __last2, 6011: _OutputIterator __result, _Compare __comp) 6011: { 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: ; 6011: ; 6011: ; 6011: ; 6011: 6011: return std::__set_union(__first1, __last1, 6011: __first2, __last2, __result, 6011: __gnu_cxx::__ops::__iter_comp_iter(__comp)); 6011: } 6011: 6011: template 6011: _OutputIterator 6011: __set_intersection(_InputIterator1 __first1, _InputIterator1 __last1, 6011: _InputIterator2 __first2, _InputIterator2 __last2, 6011: _OutputIterator __result, _Compare __comp) 6011: { 6011: while (__first1 != __last1 && __first2 != __last2) 6011: if (__comp(__first1, __first2)) 6011: ++__first1; 6011: else if (__comp(__first2, __first1)) 6011: ++__first2; 6011: else 6011: { 6011: *__result = *__first1; 6011: ++__first1; 6011: ++__first2; 6011: ++__result; 6011: } 6011: return __result; 6011: } 6011: # 5251 "/usr/include/c++/8/bits/stl_algo.h" 3 6011: template 6011: inline _OutputIterator 6011: set_intersection(_InputIterator1 __first1, _InputIterator1 __last1, 6011: _InputIterator2 __first2, _InputIterator2 __last2, 6011: _OutputIterator __result) 6011: { 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: ; 6011: ; 6011: ; 6011: ; 6011: 6011: return std::__set_intersection(__first1, __last1, 6011: __first2, __last2, __result, 6011: __gnu_cxx::__ops::__iter_less_iter()); 6011: } 6011: # 5300 "/usr/include/c++/8/bits/stl_algo.h" 3 6011: template 6011: inline _OutputIterator 6011: set_intersection(_InputIterator1 __first1, _InputIterator1 __last1, 6011: _InputIterator2 __first2, _InputIterator2 __last2, 6011: _OutputIterator __result, _Compare __comp) 6011: { 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: ; 6011: ; 6011: ; 6011: ; 6011: 6011: return std::__set_intersection(__first1, __last1, 6011: __first2, __last2, __result, 6011: __gnu_cxx::__ops::__iter_comp_iter(__comp)); 6011: } 6011: 6011: template 6011: _OutputIterator 6011: __set_difference(_InputIterator1 __first1, _InputIterator1 __last1, 6011: _InputIterator2 __first2, _InputIterator2 __last2, 6011: _OutputIterator __result, _Compare __comp) 6011: { 6011: while (__first1 != __last1 && __first2 != __last2) 6011: if (__comp(__first1, __first2)) 6011: { 6011: *__result = *__first1; 6011: ++__first1; 6011: ++__result; 6011: } 6011: else if (__comp(__first2, __first1)) 6011: ++__first2; 6011: else 6011: { 6011: ++__first1; 6011: ++__first2; 6011: } 6011: return std::copy(__first1, __last1, __result); 6011: } 6011: # 5373 "/usr/include/c++/8/bits/stl_algo.h" 3 6011: template 6011: inline _OutputIterator 6011: set_difference(_InputIterator1 __first1, _InputIterator1 __last1, 6011: _InputIterator2 __first2, _InputIterator2 __last2, 6011: _OutputIterator __result) 6011: { 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: ; 6011: ; 6011: ; 6011: ; 6011: 6011: return std::__set_difference(__first1, __last1, 6011: __first2, __last2, __result, 6011: __gnu_cxx::__ops::__iter_less_iter()); 6011: } 6011: # 5424 "/usr/include/c++/8/bits/stl_algo.h" 3 6011: template 6011: inline _OutputIterator 6011: set_difference(_InputIterator1 __first1, _InputIterator1 __last1, 6011: _InputIterator2 __first2, _InputIterator2 __last2, 6011: _OutputIterator __result, _Compare __comp) 6011: { 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: ; 6011: ; 6011: ; 6011: ; 6011: 6011: return std::__set_difference(__first1, __last1, 6011: __first2, __last2, __result, 6011: __gnu_cxx::__ops::__iter_comp_iter(__comp)); 6011: } 6011: 6011: template 6011: _OutputIterator 6011: __set_symmetric_difference(_InputIterator1 __first1, 6011: _InputIterator1 __last1, 6011: _InputIterator2 __first2, 6011: _InputIterator2 __last2, 6011: _OutputIterator __result, 6011: _Compare __comp) 6011: { 6011: while (__first1 != __last1 && __first2 != __last2) 6011: if (__comp(__first1, __first2)) 6011: { 6011: *__result = *__first1; 6011: ++__first1; 6011: ++__result; 6011: } 6011: else if (__comp(__first2, __first1)) 6011: { 6011: *__result = *__first2; 6011: ++__first2; 6011: ++__result; 6011: } 6011: else 6011: { 6011: ++__first1; 6011: ++__first2; 6011: } 6011: return std::copy(__first2, __last2, 6011: std::copy(__first1, __last1, __result)); 6011: } 6011: # 5503 "/usr/include/c++/8/bits/stl_algo.h" 3 6011: template 6011: inline _OutputIterator 6011: set_symmetric_difference(_InputIterator1 __first1, _InputIterator1 __last1, 6011: _InputIterator2 __first2, _InputIterator2 __last2, 6011: _OutputIterator __result) 6011: { 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: ; 6011: ; 6011: ; 6011: ; 6011: 6011: return std::__set_symmetric_difference(__first1, __last1, 6011: __first2, __last2, __result, 6011: __gnu_cxx::__ops::__iter_less_iter()); 6011: } 6011: # 5554 "/usr/include/c++/8/bits/stl_algo.h" 3 6011: template 6011: inline _OutputIterator 6011: set_symmetric_difference(_InputIterator1 __first1, _InputIterator1 __last1, 6011: _InputIterator2 __first2, _InputIterator2 __last2, 6011: _OutputIterator __result, 6011: _Compare __comp) 6011: { 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: ; 6011: ; 6011: ; 6011: ; 6011: 6011: return std::__set_symmetric_difference(__first1, __last1, 6011: __first2, __last2, __result, 6011: __gnu_cxx::__ops::__iter_comp_iter(__comp)); 6011: } 6011: 6011: template 6011: 6011: _ForwardIterator 6011: __min_element(_ForwardIterator __first, _ForwardIterator __last, 6011: _Compare __comp) 6011: { 6011: if (__first == __last) 6011: return __first; 6011: _ForwardIterator __result = __first; 6011: while (++__first != __last) 6011: if (__comp(__first, __result)) 6011: __result = __first; 6011: return __result; 6011: } 6011: # 5607 "/usr/include/c++/8/bits/stl_algo.h" 3 6011: template 6011: 6011: _ForwardIterator 6011: inline min_element(_ForwardIterator __first, _ForwardIterator __last) 6011: { 6011: 6011: 6011: 6011: 6011: ; 6011: ; 6011: 6011: return std::__min_element(__first, __last, 6011: __gnu_cxx::__ops::__iter_less_iter()); 6011: } 6011: # 5632 "/usr/include/c++/8/bits/stl_algo.h" 3 6011: template 6011: 6011: inline _ForwardIterator 6011: min_element(_ForwardIterator __first, _ForwardIterator __last, 6011: _Compare __comp) 6011: { 6011: 6011: 6011: 6011: 6011: 6011: ; 6011: ; 6011: 6011: return std::__min_element(__first, __last, 6011: __gnu_cxx::__ops::__iter_comp_iter(__comp)); 6011: } 6011: 6011: template 6011: 6011: _ForwardIterator 6011: __max_element(_ForwardIterator __first, _ForwardIterator __last, 6011: _Compare __comp) 6011: { 6011: if (__first == __last) return __first; 6011: _ForwardIterator __result = __first; 6011: while (++__first != __last) 6011: if (__comp(__result, __first)) 6011: __result = __first; 6011: return __result; 6011: } 6011: # 5671 "/usr/include/c++/8/bits/stl_algo.h" 3 6011: template 6011: 6011: inline _ForwardIterator 6011: max_element(_ForwardIterator __first, _ForwardIterator __last) 6011: { 6011: 6011: 6011: 6011: 6011: ; 6011: ; 6011: 6011: return std::__max_element(__first, __last, 6011: __gnu_cxx::__ops::__iter_less_iter()); 6011: } 6011: # 5696 "/usr/include/c++/8/bits/stl_algo.h" 3 6011: template 6011: 6011: inline _ForwardIterator 6011: max_element(_ForwardIterator __first, _ForwardIterator __last, 6011: _Compare __comp) 6011: { 6011: 6011: 6011: 6011: 6011: 6011: ; 6011: ; 6011: 6011: return std::__max_element(__first, __last, 6011: __gnu_cxx::__ops::__iter_comp_iter(__comp)); 6011: } 6011: # 5839 "/usr/include/c++/8/bits/stl_algo.h" 3 6011: 6011: 6011: } 6011: # 63 "/usr/include/c++/8/algorithm" 2 3 6011: # 8 "id_map.hh" 2 6011: 6011: 6011: # 9 "id_map.hh" 6011: namespace Kakoune 6011: { 6011: 6011: template 6011: class IdMap 6011: { 6011: public: 6011: struct Element 6011: { 6011: Element(String k, Value v) 6011: : hash(hash_value(k)), key(std::move(k)), value(std::move(v)) {} 6011: 6011: size_t hash; 6011: String key; 6011: Value value; 6011: 6011: bool operator==(const Element& other) const 6011: { 6011: return hash == other.hash and key == other.key and value == other.value; 6011: } 6011: }; 6011: 6011: using container_type = Vector; 6011: using iterator = typename container_type::iterator; 6011: using const_iterator = typename container_type::const_iterator; 6011: 6011: IdMap() = default; 6011: 6011: IdMap(std::initializer_list val) : m_content{val} {} 6011: 6011: void append(const Element& value) 6011: { 6011: m_content.push_back(value); 6011: } 6011: 6011: void append(Element&& value) 6011: { 6011: m_content.push_back(std::move(value)); 6011: } 6011: 6011: iterator find(StringView id) 6011: { 6011: const size_t hash = hash_value(id); 6011: return std::find_if(begin(), end(), 6011: [id, hash](const Element& e) 6011: { return e.hash == hash and e.key == id; }); 6011: } 6011: 6011: const_iterator find(StringView id) const 6011: { 6011: return const_cast(this)->find(id); 6011: } 6011: 6011: bool contains(StringView id) const 6011: { 6011: return find(id) != end(); 6011: } 6011: 6011: void remove(StringView id) 6011: { 6011: auto it = find(id); 6011: if (it != end()) 6011: m_content.erase(it); 6011: } 6011: 6011: void remove_all(StringView id) 6011: { 6011: const size_t hash = hash_value(id); 6011: auto it = std::remove_if(begin(), end(), [id, hash](const Element& e) 6011: { return e.hash == hash and e.key == id; }); 6011: m_content.erase(it, end()); 6011: } 6011: 6011: Value& operator[](StringView id) 6011: { 6011: auto it = find(id); 6011: if (it != m_content.end()) 6011: return it->value; 6011: 6011: append({ id.str(), Value{} }); 6011: return (m_content.end()-1)->value; 6011: } 6011: 6011: template 6011: bool operator==(const IdMap& other) const 6011: { 6011: return size() == other.size() and std::equal(begin(), end(), other.begin()); 6011: } 6011: 6011: template 6011: bool operator!=(const IdMap& other) const 6011: { 6011: return not (*this == other); 6011: } 6011: 6011: void reserve(size_t size) { m_content.reserve(size); } 6011: size_t size() const { return m_content.size(); } 6011: void clear() { m_content.clear(); } 6011: void erase(iterator it) { m_content.erase(it); } 6011: 6011: static const String& get_id(const Element& e) { return e.key; } 6011: 6011: bool empty() const { return m_content.empty(); } 6011: 6011: iterator begin() { return m_content.begin(); } 6011: iterator end() { return m_content.end(); } 6011: const_iterator begin() const { return m_content.begin(); } 6011: const_iterator end() const { return m_content.end(); } 6011: 6011: private: 6011: container_type m_content; 6011: }; 6011: 6011: } 6011: # 7 "alias_registry.hh" 2 6011: 6011: namespace Kakoune 6011: { 6011: 6011: class AliasRegistry : public SafeCountable 6011: { 6011: public: 6011: AliasRegistry(AliasRegistry& parent) : m_parent(&parent) {} 6011: void add_alias(String alias, String command); 6011: void remove_alias(StringView alias); 6011: StringView operator[](StringView name) const; 6011: 6011: using AliasMap = IdMap; 6011: using iterator = AliasMap::const_iterator; 6011: 6011: Vector aliases_for(StringView command) const; 6011: using AliasDesc = std::pair; 6011: Vector flatten_aliases() const; 6011: 6011: private: 6011: friend class Scope; 6011: AliasRegistry() {} 6011: 6011: SafePtr m_parent; 6011: AliasMap m_aliases; 6011: }; 6011: 6011: } 6011: # 5 "scope.hh" 2 6011: # 1 "hook_manager.hh" 1 6011: 6011: 6011: 6011: 6011: # 1 "completion.hh" 1 6011: # 11 "completion.hh" 6011: # 1 "ranked_match.hh" 1 6011: 6011: 6011: 6011: 6011: 6011: namespace Kakoune 6011: { 6011: 6011: using UsedLetters = uint64_t; 6011: UsedLetters used_letters(StringView str); 6011: 6011: constexpr UsedLetters upper_mask = 0xFFFFFFC000000; 6011: 6011: inline UsedLetters to_lower(UsedLetters letters) 6011: { 6011: return ((letters & upper_mask) >> 26) | (letters & (~upper_mask)); 6011: } 6011: 6011: struct RankedMatch 6011: { 6011: RankedMatch(StringView candidate, StringView query); 6011: RankedMatch(StringView candidate, UsedLetters candidate_letters, 6011: StringView query, UsedLetters query_letters); 6011: 6011: const StringView& candidate() const { return m_candidate; } 6011: bool operator<(const RankedMatch& other) const; 6011: bool operator==(const RankedMatch& other) const { return m_candidate == other.m_candidate; } 6011: 6011: explicit operator bool() const { return not m_candidate.empty(); } 6011: 6011: private: 6011: template 6011: RankedMatch(StringView candidate, StringView query, TestFunc test); 6011: 6011: enum class Flags : int 6011: { 6011: None = 0, 6011: 6011: FirstCharMatch = 1 << 0, 6011: SingleWord = 1 << 1, 6011: Contiguous = 1 << 2, 6011: OnlyWordBoundary = 1 << 3, 6011: Prefix = 1 << 4, 6011: FullMatch = 1 << 5, 6011: }; 6011: 6011: StringView m_candidate; 6011: Flags m_flags = Flags::None; 6011: int m_word_boundary_match_count = 0; 6011: int m_max_index = 0; 6011: }; 6011: 6011: } 6011: # 12 "completion.hh" 2 6011: 6011: namespace Kakoune 6011: { 6011: 6011: class Context; 6011: 6011: using CandidateList = Vector; 6011: 6011: struct Completions 6011: { 6011: CandidateList candidates; 6011: ByteCount start; 6011: ByteCount end; 6011: 6011: Completions() 6011: : start(0), end(0) {} 6011: 6011: Completions(ByteCount start, ByteCount end) 6011: : start(start), end(end) {} 6011: 6011: Completions(ByteCount start, ByteCount end, CandidateList candidates) 6011: : start(start), end(end), candidates(std::move(candidates)) {} 6011: }; 6011: 6011: enum class CompletionFlags 6011: { 6011: None = 0, 6011: Fast = 1 << 0, 6011: Start = 1 << 2, 6011: }; 6011: 6011: template<> struct WithBitOps : std::true_type {}; 6011: 6011: using Completer = std::function; 6011: 6011: inline Completions complete_nothing(const Context& context, CompletionFlags, 6011: StringView, ByteCount cursor_pos) 6011: { 6011: return {cursor_pos, cursor_pos}; 6011: } 6011: 6011: Completions shell_complete(const Context& context, CompletionFlags, 6011: StringView, ByteCount cursor_pos); 6011: 6011: inline Completions offset_pos(Completions completion, ByteCount offset) 6011: { 6011: return { completion.start + offset, completion.end + offset, 6011: std::move(completion.candidates) }; 6011: } 6011: 6011: template 6011: CandidateList complete(StringView query, ByteCount cursor_pos, 6011: const Container& container) 6011: { 6011: using std::begin; 6011: static_assert(not std::is_same::value, 6011: "complete require long lived strings, not temporaries"); 6011: 6011: query = query.substr(0, cursor_pos); 6011: Vector matches; 6011: for (const auto& str : container) 6011: { 6011: if (RankedMatch match{str, query}) 6011: matches.push_back(match); 6011: } 6011: std::sort(matches.begin(), matches.end()); 6011: CandidateList res; 6011: for (auto& m : matches) 6011: res.push_back(m.candidate().str()); 6011: return res; 6011: } 6011: 6011: } 6011: # 6 "hook_manager.hh" 2 6011: 6011: 6011: namespace Kakoune 6011: { 6011: 6011: class Context; 6011: using HookFunc = std::function; 6011: 6011: class HookManager : public SafeCountable 6011: { 6011: public: 6011: HookManager(HookManager& parent) : m_parent(&parent) {} 6011: 6011: void add_hook(StringView hook_name, String group, HookFunc hook); 6011: void remove_hooks(StringView group); 6011: CandidateList complete_hook_group(StringView prefix, ByteCount pos_in_token); 6011: void run_hook(StringView hook_name, StringView param, 6011: Context& context) const; 6011: 6011: private: 6011: HookManager() 6011: : m_parent(nullptr) {} 6011: 6011: friend class Scope; 6011: 6011: SafePtr m_parent; 6011: IdMap, MemoryDomain::Hooks> m_hook; 6011: mutable Vector, MemoryDomain::Hooks> m_running_hooks; 6011: }; 6011: 6011: } 6011: # 6 "scope.hh" 2 6011: # 1 "keymap_manager.hh" 1 6011: 6011: 6011: 6011: 6011: 6011: 6011: # 1 "unordered_map.hh" 1 6011: 6011: 6011: 6011: 6011: 6011: 6011: # 1 "/usr/include/c++/8/unordered_map" 1 3 6011: # 32 "/usr/include/c++/8/unordered_map" 3 6011: 6011: # 33 "/usr/include/c++/8/unordered_map" 3 6011: # 42 "/usr/include/c++/8/unordered_map" 3 6011: # 1 "/usr/include/c++/8/ext/aligned_buffer.h" 1 3 6011: # 32 "/usr/include/c++/8/ext/aligned_buffer.h" 3 6011: 6011: # 33 "/usr/include/c++/8/ext/aligned_buffer.h" 3 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: # 40 "/usr/include/c++/8/ext/aligned_buffer.h" 3 6011: namespace __gnu_cxx 6011: { 6011: 6011: 6011: 6011: 6011: template 6011: struct __aligned_membuf 6011: { 6011: 6011: 6011: 6011: struct _Tp2 { _Tp _M_t; }; 6011: 6011: alignas(__alignof__(_Tp2::_M_t)) unsigned char _M_storage[sizeof(_Tp)]; 6011: 6011: __aligned_membuf() = default; 6011: 6011: 6011: __aligned_membuf(std::nullptr_t) { } 6011: 6011: void* 6011: _M_addr() noexcept 6011: { return static_cast(&_M_storage); } 6011: 6011: const void* 6011: _M_addr() const noexcept 6011: { return static_cast(&_M_storage); } 6011: 6011: _Tp* 6011: _M_ptr() noexcept 6011: { return static_cast<_Tp*>(_M_addr()); } 6011: 6011: const _Tp* 6011: _M_ptr() const noexcept 6011: { return static_cast(_M_addr()); } 6011: }; 6011: 6011: 6011: 6011: 6011: 6011: 6011: template 6011: struct __aligned_buffer 6011: : std::aligned_storage::value> 6011: { 6011: typename 6011: std::aligned_storage::value>::type 6011: _M_storage; 6011: 6011: __aligned_buffer() = default; 6011: 6011: 6011: __aligned_buffer(std::nullptr_t) { } 6011: 6011: void* 6011: _M_addr() noexcept 6011: { 6011: return static_cast(&_M_storage); 6011: } 6011: 6011: const void* 6011: _M_addr() const noexcept 6011: { 6011: return static_cast(&_M_storage); 6011: } 6011: 6011: _Tp* 6011: _M_ptr() noexcept 6011: { return static_cast<_Tp*>(_M_addr()); } 6011: 6011: const _Tp* 6011: _M_ptr() const noexcept 6011: { return static_cast(_M_addr()); } 6011: }; 6011: 6011: } 6011: # 43 "/usr/include/c++/8/unordered_map" 2 3 6011: 6011: 6011: 6011: # 1 "/usr/include/c++/8/bits/hashtable.h" 1 3 6011: # 33 "/usr/include/c++/8/bits/hashtable.h" 3 6011: 6011: # 34 "/usr/include/c++/8/bits/hashtable.h" 3 6011: 6011: # 1 "/usr/include/c++/8/bits/hashtable_policy.h" 1 3 6011: # 38 "/usr/include/c++/8/bits/hashtable_policy.h" 3 6011: namespace std __attribute__ ((__visibility__ ("default"))) 6011: { 6011: 6011: 6011: template 6011: class _Hashtable; 6011: 6011: namespace __detail 6011: { 6011: 6011: 6011: 6011: 6011: 6011: template 6011: struct _Hashtable_base; 6011: 6011: 6011: 6011: template 6011: inline typename std::iterator_traits<_Iterator>::difference_type 6011: __distance_fw(_Iterator __first, _Iterator __last, 6011: std::input_iterator_tag) 6011: { return __first != __last ? 1 : 0; } 6011: 6011: template 6011: inline typename std::iterator_traits<_Iterator>::difference_type 6011: __distance_fw(_Iterator __first, _Iterator __last, 6011: std::forward_iterator_tag) 6011: { return std::distance(__first, __last); } 6011: 6011: template 6011: inline typename std::iterator_traits<_Iterator>::difference_type 6011: __distance_fw(_Iterator __first, _Iterator __last) 6011: { return __distance_fw(__first, __last, 6011: std::__iterator_category(__first)); } 6011: 6011: struct _Identity 6011: { 6011: template 6011: _Tp&& 6011: operator()(_Tp&& __x) const 6011: { return std::forward<_Tp>(__x); } 6011: }; 6011: 6011: struct _Select1st 6011: { 6011: template 6011: auto 6011: operator()(_Tp&& __x) const 6011: -> decltype(std::get<0>(std::forward<_Tp>(__x))) 6011: { return std::get<0>(std::forward<_Tp>(__x)); } 6011: }; 6011: 6011: template 6011: struct _Hashtable_alloc; 6011: 6011: 6011: 6011: template 6011: struct _ReuseOrAllocNode 6011: { 6011: private: 6011: using __node_alloc_type = _NodeAlloc; 6011: using __hashtable_alloc = _Hashtable_alloc<__node_alloc_type>; 6011: using __node_alloc_traits = 6011: typename __hashtable_alloc::__node_alloc_traits; 6011: using __node_type = typename __hashtable_alloc::__node_type; 6011: 6011: public: 6011: _ReuseOrAllocNode(__node_type* __nodes, __hashtable_alloc& __h) 6011: : _M_nodes(__nodes), _M_h(__h) { } 6011: _ReuseOrAllocNode(const _ReuseOrAllocNode&) = delete; 6011: 6011: ~_ReuseOrAllocNode() 6011: { _M_h._M_deallocate_nodes(_M_nodes); } 6011: 6011: template 6011: __node_type* 6011: operator()(_Arg&& __arg) const 6011: { 6011: if (_M_nodes) 6011: { 6011: __node_type* __node = _M_nodes; 6011: _M_nodes = _M_nodes->_M_next(); 6011: __node->_M_nxt = nullptr; 6011: auto& __a = _M_h._M_node_allocator(); 6011: __node_alloc_traits::destroy(__a, __node->_M_valptr()); 6011: try 6011: { 6011: __node_alloc_traits::construct(__a, __node->_M_valptr(), 6011: std::forward<_Arg>(__arg)); 6011: } 6011: catch(...) 6011: { 6011: __node->~__node_type(); 6011: __node_alloc_traits::deallocate(__a, __node, 1); 6011: throw; 6011: } 6011: return __node; 6011: } 6011: return _M_h._M_allocate_node(std::forward<_Arg>(__arg)); 6011: } 6011: 6011: private: 6011: mutable __node_type* _M_nodes; 6011: __hashtable_alloc& _M_h; 6011: }; 6011: 6011: 6011: 6011: template 6011: struct _AllocNode 6011: { 6011: private: 6011: using __hashtable_alloc = _Hashtable_alloc<_NodeAlloc>; 6011: using __node_type = typename __hashtable_alloc::__node_type; 6011: 6011: public: 6011: _AllocNode(__hashtable_alloc& __h) 6011: : _M_h(__h) { } 6011: 6011: template 6011: __node_type* 6011: operator()(_Arg&& __arg) const 6011: { return _M_h._M_allocate_node(std::forward<_Arg>(__arg)); } 6011: 6011: private: 6011: __hashtable_alloc& _M_h; 6011: }; 6011: # 199 "/usr/include/c++/8/bits/hashtable_policy.h" 3 6011: template 6011: struct _Hashtable_traits 6011: { 6011: using __hash_cached = __bool_constant<_Cache_hash_code>; 6011: using __constant_iterators = __bool_constant<_Constant_iterators>; 6011: using __unique_keys = __bool_constant<_Unique_keys>; 6011: }; 6011: # 215 "/usr/include/c++/8/bits/hashtable_policy.h" 3 6011: struct _Hash_node_base 6011: { 6011: _Hash_node_base* _M_nxt; 6011: 6011: _Hash_node_base() noexcept : _M_nxt() { } 6011: 6011: _Hash_node_base(_Hash_node_base* __next) noexcept : _M_nxt(__next) { } 6011: }; 6011: 6011: 6011: 6011: 6011: 6011: 6011: template 6011: struct _Hash_node_value_base : _Hash_node_base 6011: { 6011: typedef _Value value_type; 6011: 6011: __gnu_cxx::__aligned_buffer<_Value> _M_storage; 6011: 6011: _Value* 6011: _M_valptr() noexcept 6011: { return _M_storage._M_ptr(); } 6011: 6011: const _Value* 6011: _M_valptr() const noexcept 6011: { return _M_storage._M_ptr(); } 6011: 6011: _Value& 6011: _M_v() noexcept 6011: { return *_M_valptr(); } 6011: 6011: const _Value& 6011: _M_v() const noexcept 6011: { return *_M_valptr(); } 6011: }; 6011: 6011: 6011: 6011: 6011: template 6011: struct _Hash_node; 6011: 6011: 6011: 6011: 6011: 6011: 6011: template 6011: struct _Hash_node<_Value, true> : _Hash_node_value_base<_Value> 6011: { 6011: std::size_t _M_hash_code; 6011: 6011: _Hash_node* 6011: _M_next() const noexcept 6011: { return static_cast<_Hash_node*>(this->_M_nxt); } 6011: }; 6011: 6011: 6011: 6011: 6011: 6011: 6011: template 6011: struct _Hash_node<_Value, false> : _Hash_node_value_base<_Value> 6011: { 6011: _Hash_node* 6011: _M_next() const noexcept 6011: { return static_cast<_Hash_node*>(this->_M_nxt); } 6011: }; 6011: 6011: 6011: template 6011: struct _Node_iterator_base 6011: { 6011: using __node_type = _Hash_node<_Value, _Cache_hash_code>; 6011: 6011: __node_type* _M_cur; 6011: 6011: _Node_iterator_base(__node_type* __p) noexcept 6011: : _M_cur(__p) { } 6011: 6011: void 6011: _M_incr() noexcept 6011: { _M_cur = _M_cur->_M_next(); } 6011: }; 6011: 6011: template 6011: inline bool 6011: operator==(const _Node_iterator_base<_Value, _Cache_hash_code>& __x, 6011: const _Node_iterator_base<_Value, _Cache_hash_code >& __y) 6011: noexcept 6011: { return __x._M_cur == __y._M_cur; } 6011: 6011: template 6011: inline bool 6011: operator!=(const _Node_iterator_base<_Value, _Cache_hash_code>& __x, 6011: const _Node_iterator_base<_Value, _Cache_hash_code>& __y) 6011: noexcept 6011: { return __x._M_cur != __y._M_cur; } 6011: 6011: 6011: template 6011: struct _Node_iterator 6011: : public _Node_iterator_base<_Value, __cache> 6011: { 6011: private: 6011: using __base_type = _Node_iterator_base<_Value, __cache>; 6011: using __node_type = typename __base_type::__node_type; 6011: 6011: public: 6011: typedef _Value value_type; 6011: typedef std::ptrdiff_t difference_type; 6011: typedef std::forward_iterator_tag iterator_category; 6011: 6011: using pointer = typename std::conditional<__constant_iterators, 6011: const _Value*, _Value*>::type; 6011: 6011: using reference = typename std::conditional<__constant_iterators, 6011: const _Value&, _Value&>::type; 6011: 6011: _Node_iterator() noexcept 6011: : __base_type(0) { } 6011: 6011: explicit 6011: _Node_iterator(__node_type* __p) noexcept 6011: : __base_type(__p) { } 6011: 6011: reference 6011: operator*() const noexcept 6011: { return this->_M_cur->_M_v(); } 6011: 6011: pointer 6011: operator->() const noexcept 6011: { return this->_M_cur->_M_valptr(); } 6011: 6011: _Node_iterator& 6011: operator++() noexcept 6011: { 6011: this->_M_incr(); 6011: return *this; 6011: } 6011: 6011: _Node_iterator 6011: operator++(int) noexcept 6011: { 6011: _Node_iterator __tmp(*this); 6011: this->_M_incr(); 6011: return __tmp; 6011: } 6011: }; 6011: 6011: 6011: template 6011: struct _Node_const_iterator 6011: : public _Node_iterator_base<_Value, __cache> 6011: { 6011: private: 6011: using __base_type = _Node_iterator_base<_Value, __cache>; 6011: using __node_type = typename __base_type::__node_type; 6011: 6011: public: 6011: typedef _Value value_type; 6011: typedef std::ptrdiff_t difference_type; 6011: typedef std::forward_iterator_tag iterator_category; 6011: 6011: typedef const _Value* pointer; 6011: typedef const _Value& reference; 6011: 6011: _Node_const_iterator() noexcept 6011: : __base_type(0) { } 6011: 6011: explicit 6011: _Node_const_iterator(__node_type* __p) noexcept 6011: : __base_type(__p) { } 6011: 6011: _Node_const_iterator(const _Node_iterator<_Value, __constant_iterators, 6011: __cache>& __x) noexcept 6011: : __base_type(__x._M_cur) { } 6011: 6011: reference 6011: operator*() const noexcept 6011: { return this->_M_cur->_M_v(); } 6011: 6011: pointer 6011: operator->() const noexcept 6011: { return this->_M_cur->_M_valptr(); } 6011: 6011: _Node_const_iterator& 6011: operator++() noexcept 6011: { 6011: this->_M_incr(); 6011: return *this; 6011: } 6011: 6011: _Node_const_iterator 6011: operator++(int) noexcept 6011: { 6011: _Node_const_iterator __tmp(*this); 6011: this->_M_incr(); 6011: return __tmp; 6011: } 6011: }; 6011: 6011: 6011: 6011: 6011: 6011: 6011: struct _Mod_range_hashing 6011: { 6011: typedef std::size_t first_argument_type; 6011: typedef std::size_t second_argument_type; 6011: typedef std::size_t result_type; 6011: 6011: result_type 6011: operator()(first_argument_type __num, 6011: second_argument_type __den) const noexcept 6011: { return __num % __den; } 6011: }; 6011: 6011: 6011: 6011: 6011: 6011: 6011: struct _Default_ranged_hash { }; 6011: 6011: 6011: 6011: struct _Prime_rehash_policy 6011: { 6011: using __has_load_factor = std::true_type; 6011: 6011: _Prime_rehash_policy(float __z = 1.0) noexcept 6011: : _M_max_load_factor(__z), _M_next_resize(0) { } 6011: 6011: float 6011: max_load_factor() const noexcept 6011: { return _M_max_load_factor; } 6011: 6011: 6011: std::size_t 6011: _M_next_bkt(std::size_t __n) const; 6011: 6011: 6011: std::size_t 6011: _M_bkt_for_elements(std::size_t __n) const 6011: { return __builtin_ceil(__n / (long double)_M_max_load_factor); } 6011: 6011: 6011: 6011: 6011: 6011: std::pair 6011: _M_need_rehash(std::size_t __n_bkt, std::size_t __n_elt, 6011: std::size_t __n_ins) const; 6011: 6011: typedef std::size_t _State; 6011: 6011: _State 6011: _M_state() const 6011: { return _M_next_resize; } 6011: 6011: void 6011: _M_reset() noexcept 6011: { _M_next_resize = 0; } 6011: 6011: void 6011: _M_reset(_State __state) 6011: { _M_next_resize = __state; } 6011: 6011: static const std::size_t _S_growth_factor = 2; 6011: 6011: float _M_max_load_factor; 6011: mutable std::size_t _M_next_resize; 6011: }; 6011: 6011: 6011: struct _Mask_range_hashing 6011: { 6011: typedef std::size_t first_argument_type; 6011: typedef std::size_t second_argument_type; 6011: typedef std::size_t result_type; 6011: 6011: result_type 6011: operator()(first_argument_type __num, 6011: second_argument_type __den) const noexcept 6011: { return __num & (__den - 1); } 6011: }; 6011: 6011: 6011: 6011: inline std::size_t 6011: __clp2(std::size_t __n) noexcept 6011: { 6011: 6011: 6011: 6011: std::uint_fast32_t __x = __n; 6011: 6011: 6011: __x = __x - 1; 6011: __x = __x | (__x >> 1); 6011: __x = __x | (__x >> 2); 6011: __x = __x | (__x >> 4); 6011: __x = __x | (__x >> 8); 6011: __x = __x | (__x >>16); 6011: 6011: 6011: 6011: return __x + 1; 6011: } 6011: 6011: 6011: 6011: struct _Power2_rehash_policy 6011: { 6011: using __has_load_factor = std::true_type; 6011: 6011: _Power2_rehash_policy(float __z = 1.0) noexcept 6011: : _M_max_load_factor(__z), _M_next_resize(0) { } 6011: 6011: float 6011: max_load_factor() const noexcept 6011: { return _M_max_load_factor; } 6011: 6011: 6011: 6011: std::size_t 6011: _M_next_bkt(std::size_t __n) noexcept 6011: { 6011: const auto __max_width = std::min(sizeof(size_t), 8); 6011: const auto __max_bkt = size_t(1) << (__max_width * 8 - 1); 6011: std::size_t __res = __clp2(__n); 6011: 6011: if (__res == __n) 6011: __res <<= 1; 6011: 6011: if (__res == 0) 6011: __res = __max_bkt; 6011: 6011: if (__res == __max_bkt) 6011: 6011: 6011: 6011: _M_next_resize = std::size_t(-1); 6011: else 6011: _M_next_resize 6011: = __builtin_ceil(__res * (long double)_M_max_load_factor); 6011: 6011: return __res; 6011: } 6011: 6011: 6011: std::size_t 6011: _M_bkt_for_elements(std::size_t __n) const noexcept 6011: { return __builtin_ceil(__n / (long double)_M_max_load_factor); } 6011: 6011: 6011: 6011: 6011: 6011: std::pair 6011: _M_need_rehash(std::size_t __n_bkt, std::size_t __n_elt, 6011: std::size_t __n_ins) noexcept 6011: { 6011: if (__n_elt + __n_ins >= _M_next_resize) 6011: { 6011: long double __min_bkts = (__n_elt + __n_ins) 6011: / (long double)_M_max_load_factor; 6011: if (__min_bkts >= __n_bkt) 6011: return std::make_pair(true, 6011: _M_next_bkt(std::max(__builtin_floor(__min_bkts) + 1, 6011: __n_bkt * _S_growth_factor))); 6011: 6011: _M_next_resize 6011: = __builtin_floor(__n_bkt * (long double)_M_max_load_factor); 6011: return std::make_pair(false, 0); 6011: } 6011: else 6011: return std::make_pair(false, 0); 6011: } 6011: 6011: typedef std::size_t _State; 6011: 6011: _State 6011: _M_state() const noexcept 6011: { return _M_next_resize; } 6011: 6011: void 6011: _M_reset() noexcept 6011: { _M_next_resize = 0; } 6011: 6011: void 6011: _M_reset(_State __state) noexcept 6011: { _M_next_resize = __state; } 6011: 6011: static const std::size_t _S_growth_factor = 2; 6011: 6011: float _M_max_load_factor; 6011: std::size_t _M_next_resize; 6011: }; 6011: # 638 "/usr/include/c++/8/bits/hashtable_policy.h" 3 6011: template 6011: struct _Map_base { }; 6011: 6011: 6011: template 6011: struct _Map_base<_Key, _Pair, _Alloc, _Select1st, _Equal, 6011: _H1, _H2, _Hash, _RehashPolicy, _Traits, false> 6011: { 6011: using mapped_type = typename std::tuple_element<1, _Pair>::type; 6011: }; 6011: 6011: 6011: template 6011: struct _Map_base<_Key, _Pair, _Alloc, _Select1st, _Equal, 6011: _H1, _H2, _Hash, _RehashPolicy, _Traits, true> 6011: { 6011: private: 6011: using __hashtable_base = __detail::_Hashtable_base<_Key, _Pair, 6011: _Select1st, 6011: _Equal, _H1, _H2, _Hash, 6011: _Traits>; 6011: 6011: using __hashtable = _Hashtable<_Key, _Pair, _Alloc, 6011: _Select1st, _Equal, 6011: _H1, _H2, _Hash, _RehashPolicy, _Traits>; 6011: 6011: using __hash_code = typename __hashtable_base::__hash_code; 6011: using __node_type = typename __hashtable_base::__node_type; 6011: 6011: public: 6011: using key_type = typename __hashtable_base::key_type; 6011: using iterator = typename __hashtable_base::iterator; 6011: using mapped_type = typename std::tuple_element<1, _Pair>::type; 6011: 6011: mapped_type& 6011: operator[](const key_type& __k); 6011: 6011: mapped_type& 6011: operator[](key_type&& __k); 6011: 6011: 6011: 6011: mapped_type& 6011: at(const key_type& __k); 6011: 6011: const mapped_type& 6011: at(const key_type& __k) const; 6011: }; 6011: 6011: template 6011: auto 6011: _Map_base<_Key, _Pair, _Alloc, _Select1st, _Equal, 6011: _H1, _H2, _Hash, _RehashPolicy, _Traits, true>:: 6011: operator[](const key_type& __k) 6011: -> mapped_type& 6011: { 6011: __hashtable* __h = static_cast<__hashtable*>(this); 6011: __hash_code __code = __h->_M_hash_code(__k); 6011: std::size_t __n = __h->_M_bucket_index(__k, __code); 6011: __node_type* __p = __h->_M_find_node(__n, __k, __code); 6011: 6011: if (!__p) 6011: { 6011: __p = __h->_M_allocate_node(std::piecewise_construct, 6011: std::tuple(__k), 6011: std::tuple<>()); 6011: return __h->_M_insert_unique_node(__n, __code, __p)->second; 6011: } 6011: 6011: return __p->_M_v().second; 6011: } 6011: 6011: template 6011: auto 6011: _Map_base<_Key, _Pair, _Alloc, _Select1st, _Equal, 6011: _H1, _H2, _Hash, _RehashPolicy, _Traits, true>:: 6011: operator[](key_type&& __k) 6011: -> mapped_type& 6011: { 6011: __hashtable* __h = static_cast<__hashtable*>(this); 6011: __hash_code __code = __h->_M_hash_code(__k); 6011: std::size_t __n = __h->_M_bucket_index(__k, __code); 6011: __node_type* __p = __h->_M_find_node(__n, __k, __code); 6011: 6011: if (!__p) 6011: { 6011: __p = __h->_M_allocate_node(std::piecewise_construct, 6011: std::forward_as_tuple(std::move(__k)), 6011: std::tuple<>()); 6011: return __h->_M_insert_unique_node(__n, __code, __p)->second; 6011: } 6011: 6011: return __p->_M_v().second; 6011: } 6011: 6011: template 6011: auto 6011: _Map_base<_Key, _Pair, _Alloc, _Select1st, _Equal, 6011: _H1, _H2, _Hash, _RehashPolicy, _Traits, true>:: 6011: at(const key_type& __k) 6011: -> mapped_type& 6011: { 6011: __hashtable* __h = static_cast<__hashtable*>(this); 6011: __hash_code __code = __h->_M_hash_code(__k); 6011: std::size_t __n = __h->_M_bucket_index(__k, __code); 6011: __node_type* __p = __h->_M_find_node(__n, __k, __code); 6011: 6011: if (!__p) 6011: __throw_out_of_range(("_Map_base::at")); 6011: return __p->_M_v().second; 6011: } 6011: 6011: template 6011: auto 6011: _Map_base<_Key, _Pair, _Alloc, _Select1st, _Equal, 6011: _H1, _H2, _Hash, _RehashPolicy, _Traits, true>:: 6011: at(const key_type& __k) const 6011: -> const mapped_type& 6011: { 6011: const __hashtable* __h = static_cast(this); 6011: __hash_code __code = __h->_M_hash_code(__k); 6011: std::size_t __n = __h->_M_bucket_index(__k, __code); 6011: __node_type* __p = __h->_M_find_node(__n, __k, __code); 6011: 6011: if (!__p) 6011: __throw_out_of_range(("_Map_base::at")); 6011: return __p->_M_v().second; 6011: } 6011: 6011: 6011: 6011: 6011: 6011: 6011: template 6011: struct _Insert_base 6011: { 6011: protected: 6011: using __hashtable = _Hashtable<_Key, _Value, _Alloc, _ExtractKey, 6011: _Equal, _H1, _H2, _Hash, 6011: _RehashPolicy, _Traits>; 6011: 6011: using __hashtable_base = _Hashtable_base<_Key, _Value, _ExtractKey, 6011: _Equal, _H1, _H2, _Hash, 6011: _Traits>; 6011: 6011: using value_type = typename __hashtable_base::value_type; 6011: using iterator = typename __hashtable_base::iterator; 6011: using const_iterator = typename __hashtable_base::const_iterator; 6011: using size_type = typename __hashtable_base::size_type; 6011: 6011: using __unique_keys = typename __hashtable_base::__unique_keys; 6011: using __ireturn_type = typename __hashtable_base::__ireturn_type; 6011: using __node_type = _Hash_node<_Value, _Traits::__hash_cached::value>; 6011: using __node_alloc_type = __alloc_rebind<_Alloc, __node_type>; 6011: using __node_gen_type = _AllocNode<__node_alloc_type>; 6011: 6011: __hashtable& 6011: _M_conjure_hashtable() 6011: { return *(static_cast<__hashtable*>(this)); } 6011: 6011: template 6011: void 6011: _M_insert_range(_InputIterator __first, _InputIterator __last, 6011: const _NodeGetter&, true_type); 6011: 6011: template 6011: void 6011: _M_insert_range(_InputIterator __first, _InputIterator __last, 6011: const _NodeGetter&, false_type); 6011: 6011: public: 6011: __ireturn_type 6011: insert(const value_type& __v) 6011: { 6011: __hashtable& __h = _M_conjure_hashtable(); 6011: __node_gen_type __node_gen(__h); 6011: return __h._M_insert(__v, __node_gen, __unique_keys()); 6011: } 6011: 6011: iterator 6011: insert(const_iterator __hint, const value_type& __v) 6011: { 6011: __hashtable& __h = _M_conjure_hashtable(); 6011: __node_gen_type __node_gen(__h); 6011: return __h._M_insert(__hint, __v, __node_gen, __unique_keys()); 6011: } 6011: 6011: void 6011: insert(initializer_list __l) 6011: { this->insert(__l.begin(), __l.end()); } 6011: 6011: template 6011: void 6011: insert(_InputIterator __first, _InputIterator __last) 6011: { 6011: __hashtable& __h = _M_conjure_hashtable(); 6011: __node_gen_type __node_gen(__h); 6011: return _M_insert_range(__first, __last, __node_gen, __unique_keys()); 6011: } 6011: }; 6011: 6011: template 6011: template 6011: void 6011: _Insert_base<_Key, _Value, _Alloc, _ExtractKey, _Equal, _H1, _H2, _Hash, 6011: _RehashPolicy, _Traits>:: 6011: _M_insert_range(_InputIterator __first, _InputIterator __last, 6011: const _NodeGetter& __node_gen, true_type) 6011: { 6011: size_type __n_elt = __detail::__distance_fw(__first, __last); 6011: if (__n_elt == 0) 6011: return; 6011: 6011: __hashtable& __h = _M_conjure_hashtable(); 6011: for (; __first != __last; ++__first) 6011: { 6011: if (__h._M_insert(*__first, __node_gen, __unique_keys(), 6011: __n_elt).second) 6011: __n_elt = 1; 6011: else if (__n_elt != 1) 6011: --__n_elt; 6011: } 6011: } 6011: 6011: template 6011: template 6011: void 6011: _Insert_base<_Key, _Value, _Alloc, _ExtractKey, _Equal, _H1, _H2, _Hash, 6011: _RehashPolicy, _Traits>:: 6011: _M_insert_range(_InputIterator __first, _InputIterator __last, 6011: const _NodeGetter& __node_gen, false_type) 6011: { 6011: using __rehash_type = typename __hashtable::__rehash_type; 6011: using __rehash_state = typename __hashtable::__rehash_state; 6011: using pair_type = std::pair; 6011: 6011: size_type __n_elt = __detail::__distance_fw(__first, __last); 6011: if (__n_elt == 0) 6011: return; 6011: 6011: __hashtable& __h = _M_conjure_hashtable(); 6011: __rehash_type& __rehash = __h._M_rehash_policy; 6011: const __rehash_state& __saved_state = __rehash._M_state(); 6011: pair_type __do_rehash = __rehash._M_need_rehash(__h._M_bucket_count, 6011: __h._M_element_count, 6011: __n_elt); 6011: 6011: if (__do_rehash.first) 6011: __h._M_rehash(__do_rehash.second, __saved_state); 6011: 6011: for (; __first != __last; ++__first) 6011: __h._M_insert(*__first, __node_gen, __unique_keys()); 6011: } 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: template 6011: struct _Insert; 6011: 6011: 6011: template 6011: struct _Insert<_Key, _Value, _Alloc, _ExtractKey, _Equal, _H1, _H2, _Hash, 6011: _RehashPolicy, _Traits, true> 6011: : public _Insert_base<_Key, _Value, _Alloc, _ExtractKey, _Equal, 6011: _H1, _H2, _Hash, _RehashPolicy, _Traits> 6011: { 6011: using __base_type = _Insert_base<_Key, _Value, _Alloc, _ExtractKey, 6011: _Equal, _H1, _H2, _Hash, 6011: _RehashPolicy, _Traits>; 6011: 6011: using __hashtable_base = _Hashtable_base<_Key, _Value, _ExtractKey, 6011: _Equal, _H1, _H2, _Hash, 6011: _Traits>; 6011: 6011: using value_type = typename __base_type::value_type; 6011: using iterator = typename __base_type::iterator; 6011: using const_iterator = typename __base_type::const_iterator; 6011: 6011: using __unique_keys = typename __base_type::__unique_keys; 6011: using __ireturn_type = typename __hashtable_base::__ireturn_type; 6011: using __hashtable = typename __base_type::__hashtable; 6011: using __node_gen_type = typename __base_type::__node_gen_type; 6011: 6011: using __base_type::insert; 6011: 6011: __ireturn_type 6011: insert(value_type&& __v) 6011: { 6011: __hashtable& __h = this->_M_conjure_hashtable(); 6011: __node_gen_type __node_gen(__h); 6011: return __h._M_insert(std::move(__v), __node_gen, __unique_keys()); 6011: } 6011: 6011: iterator 6011: insert(const_iterator __hint, value_type&& __v) 6011: { 6011: __hashtable& __h = this->_M_conjure_hashtable(); 6011: __node_gen_type __node_gen(__h); 6011: return __h._M_insert(__hint, std::move(__v), __node_gen, 6011: __unique_keys()); 6011: } 6011: }; 6011: 6011: 6011: template 6011: struct _Insert<_Key, _Value, _Alloc, _ExtractKey, _Equal, _H1, _H2, _Hash, 6011: _RehashPolicy, _Traits, false> 6011: : public _Insert_base<_Key, _Value, _Alloc, _ExtractKey, _Equal, 6011: _H1, _H2, _Hash, _RehashPolicy, _Traits> 6011: { 6011: using __base_type = _Insert_base<_Key, _Value, _Alloc, _ExtractKey, 6011: _Equal, _H1, _H2, _Hash, 6011: _RehashPolicy, _Traits>; 6011: using value_type = typename __base_type::value_type; 6011: using iterator = typename __base_type::iterator; 6011: using const_iterator = typename __base_type::const_iterator; 6011: 6011: using __unique_keys = typename __base_type::__unique_keys; 6011: using __hashtable = typename __base_type::__hashtable; 6011: using __ireturn_type = typename __base_type::__ireturn_type; 6011: 6011: using __base_type::insert; 6011: 6011: template 6011: using __is_cons = std::is_constructible; 6011: 6011: template 6011: using _IFcons = std::enable_if<__is_cons<_Pair>::value>; 6011: 6011: template 6011: using _IFconsp = typename _IFcons<_Pair>::type; 6011: 6011: template> 6011: __ireturn_type 6011: insert(_Pair&& __v) 6011: { 6011: __hashtable& __h = this->_M_conjure_hashtable(); 6011: return __h._M_emplace(__unique_keys(), std::forward<_Pair>(__v)); 6011: } 6011: 6011: template> 6011: iterator 6011: insert(const_iterator __hint, _Pair&& __v) 6011: { 6011: __hashtable& __h = this->_M_conjure_hashtable(); 6011: return __h._M_emplace(__hint, __unique_keys(), 6011: std::forward<_Pair>(__v)); 6011: } 6011: }; 6011: 6011: template 6011: using __has_load_factor = typename _Policy::__has_load_factor; 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: template> 6011: struct _Rehash_base; 6011: 6011: 6011: template 6011: struct _Rehash_base<_Key, _Value, _Alloc, _ExtractKey, _Equal, 6011: _H1, _H2, _Hash, _RehashPolicy, _Traits, 6011: std::false_type> 6011: { 6011: }; 6011: 6011: 6011: template 6011: struct _Rehash_base<_Key, _Value, _Alloc, _ExtractKey, _Equal, 6011: _H1, _H2, _Hash, _RehashPolicy, _Traits, 6011: std::true_type> 6011: { 6011: using __hashtable = _Hashtable<_Key, _Value, _Alloc, _ExtractKey, 6011: _Equal, _H1, _H2, _Hash, 6011: _RehashPolicy, _Traits>; 6011: 6011: float 6011: max_load_factor() const noexcept 6011: { 6011: const __hashtable* __this = static_cast(this); 6011: return __this->__rehash_policy().max_load_factor(); 6011: } 6011: 6011: void 6011: max_load_factor(float __z) 6011: { 6011: __hashtable* __this = static_cast<__hashtable*>(this); 6011: __this->__rehash_policy(_RehashPolicy(__z)); 6011: } 6011: 6011: void 6011: reserve(std::size_t __n) 6011: { 6011: __hashtable* __this = static_cast<__hashtable*>(this); 6011: __this->rehash(__builtin_ceil(__n / max_load_factor())); 6011: } 6011: }; 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: template 6011: struct _Hashtable_ebo_helper; 6011: 6011: 6011: template 6011: struct _Hashtable_ebo_helper<_Nm, _Tp, true> 6011: : private _Tp 6011: { 6011: _Hashtable_ebo_helper() = default; 6011: 6011: template 6011: _Hashtable_ebo_helper(_OtherTp&& __tp) 6011: : _Tp(std::forward<_OtherTp>(__tp)) 6011: { } 6011: 6011: static const _Tp& 6011: _S_cget(const _Hashtable_ebo_helper& __eboh) 6011: { return static_cast(__eboh); } 6011: 6011: static _Tp& 6011: _S_get(_Hashtable_ebo_helper& __eboh) 6011: { return static_cast<_Tp&>(__eboh); } 6011: }; 6011: 6011: 6011: template 6011: struct _Hashtable_ebo_helper<_Nm, _Tp, false> 6011: { 6011: _Hashtable_ebo_helper() = default; 6011: 6011: template 6011: _Hashtable_ebo_helper(_OtherTp&& __tp) 6011: : _M_tp(std::forward<_OtherTp>(__tp)) 6011: { } 6011: 6011: static const _Tp& 6011: _S_cget(const _Hashtable_ebo_helper& __eboh) 6011: { return __eboh._M_tp; } 6011: 6011: static _Tp& 6011: _S_get(_Hashtable_ebo_helper& __eboh) 6011: { return __eboh._M_tp; } 6011: 6011: private: 6011: _Tp _M_tp; 6011: }; 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: template 6011: struct _Local_iterator_base; 6011: # 1176 "/usr/include/c++/8/bits/hashtable_policy.h" 3 6011: template 6011: struct _Hash_code_base; 6011: 6011: 6011: 6011: template 6011: struct _Hash_code_base<_Key, _Value, _ExtractKey, _H1, _H2, _Hash, false> 6011: : private _Hashtable_ebo_helper<0, _ExtractKey>, 6011: private _Hashtable_ebo_helper<1, _Hash> 6011: { 6011: private: 6011: using __ebo_extract_key = _Hashtable_ebo_helper<0, _ExtractKey>; 6011: using __ebo_hash = _Hashtable_ebo_helper<1, _Hash>; 6011: 6011: protected: 6011: typedef void* __hash_code; 6011: typedef _Hash_node<_Value, false> __node_type; 6011: 6011: 6011: 6011: _Hash_code_base() = default; 6011: 6011: _Hash_code_base(const _ExtractKey& __ex, const _H1&, const _H2&, 6011: const _Hash& __h) 6011: : __ebo_extract_key(__ex), __ebo_hash(__h) { } 6011: 6011: __hash_code 6011: _M_hash_code(const _Key& __key) const 6011: { return 0; } 6011: 6011: std::size_t 6011: _M_bucket_index(const _Key& __k, __hash_code, std::size_t __n) const 6011: { return _M_ranged_hash()(__k, __n); } 6011: 6011: std::size_t 6011: _M_bucket_index(const __node_type* __p, std::size_t __n) const 6011: noexcept( noexcept(declval()(declval(), 6011: (std::size_t)0)) ) 6011: { return _M_ranged_hash()(_M_extract()(__p->_M_v()), __n); } 6011: 6011: void 6011: _M_store_code(__node_type*, __hash_code) const 6011: { } 6011: 6011: void 6011: _M_copy_code(__node_type*, const __node_type*) const 6011: { } 6011: 6011: void 6011: _M_swap(_Hash_code_base& __x) 6011: { 6011: std::swap(_M_extract(), __x._M_extract()); 6011: std::swap(_M_ranged_hash(), __x._M_ranged_hash()); 6011: } 6011: 6011: const _ExtractKey& 6011: _M_extract() const { return __ebo_extract_key::_S_cget(*this); } 6011: 6011: _ExtractKey& 6011: _M_extract() { return __ebo_extract_key::_S_get(*this); } 6011: 6011: const _Hash& 6011: _M_ranged_hash() const { return __ebo_hash::_S_cget(*this); } 6011: 6011: _Hash& 6011: _M_ranged_hash() { return __ebo_hash::_S_get(*this); } 6011: }; 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: template 6011: struct _Hash_code_base<_Key, _Value, _ExtractKey, _H1, _H2, _Hash, true>; 6011: 6011: 6011: 6011: 6011: template 6011: struct _Hash_code_base<_Key, _Value, _ExtractKey, _H1, _H2, 6011: _Default_ranged_hash, false> 6011: : private _Hashtable_ebo_helper<0, _ExtractKey>, 6011: private _Hashtable_ebo_helper<1, _H1>, 6011: private _Hashtable_ebo_helper<2, _H2> 6011: { 6011: private: 6011: using __ebo_extract_key = _Hashtable_ebo_helper<0, _ExtractKey>; 6011: using __ebo_h1 = _Hashtable_ebo_helper<1, _H1>; 6011: using __ebo_h2 = _Hashtable_ebo_helper<2, _H2>; 6011: 6011: 6011: friend struct _Local_iterator_base<_Key, _Value, _ExtractKey, _H1, _H2, 6011: _Default_ranged_hash, false>; 6011: 6011: public: 6011: typedef _H1 hasher; 6011: 6011: hasher 6011: hash_function() const 6011: { return _M_h1(); } 6011: 6011: protected: 6011: typedef std::size_t __hash_code; 6011: typedef _Hash_node<_Value, false> __node_type; 6011: 6011: 6011: 6011: _Hash_code_base() = default; 6011: 6011: _Hash_code_base(const _ExtractKey& __ex, 6011: const _H1& __h1, const _H2& __h2, 6011: const _Default_ranged_hash&) 6011: : __ebo_extract_key(__ex), __ebo_h1(__h1), __ebo_h2(__h2) { } 6011: 6011: __hash_code 6011: _M_hash_code(const _Key& __k) const 6011: { return _M_h1()(__k); } 6011: 6011: std::size_t 6011: _M_bucket_index(const _Key&, __hash_code __c, std::size_t __n) const 6011: { return _M_h2()(__c, __n); } 6011: 6011: std::size_t 6011: _M_bucket_index(const __node_type* __p, std::size_t __n) const 6011: noexcept( noexcept(declval()(declval())) 6011: && noexcept(declval()((__hash_code)0, 6011: (std::size_t)0)) ) 6011: { return _M_h2()(_M_h1()(_M_extract()(__p->_M_v())), __n); } 6011: 6011: void 6011: _M_store_code(__node_type*, __hash_code) const 6011: { } 6011: 6011: void 6011: _M_copy_code(__node_type*, const __node_type*) const 6011: { } 6011: 6011: void 6011: _M_swap(_Hash_code_base& __x) 6011: { 6011: std::swap(_M_extract(), __x._M_extract()); 6011: std::swap(_M_h1(), __x._M_h1()); 6011: std::swap(_M_h2(), __x._M_h2()); 6011: } 6011: 6011: const _ExtractKey& 6011: _M_extract() const { return __ebo_extract_key::_S_cget(*this); } 6011: 6011: _ExtractKey& 6011: _M_extract() { return __ebo_extract_key::_S_get(*this); } 6011: 6011: const _H1& 6011: _M_h1() const { return __ebo_h1::_S_cget(*this); } 6011: 6011: _H1& 6011: _M_h1() { return __ebo_h1::_S_get(*this); } 6011: 6011: const _H2& 6011: _M_h2() const { return __ebo_h2::_S_cget(*this); } 6011: 6011: _H2& 6011: _M_h2() { return __ebo_h2::_S_get(*this); } 6011: }; 6011: 6011: 6011: 6011: 6011: template 6011: struct _Hash_code_base<_Key, _Value, _ExtractKey, _H1, _H2, 6011: _Default_ranged_hash, true> 6011: : private _Hashtable_ebo_helper<0, _ExtractKey>, 6011: private _Hashtable_ebo_helper<1, _H1>, 6011: private _Hashtable_ebo_helper<2, _H2> 6011: { 6011: private: 6011: 6011: friend struct _Local_iterator_base<_Key, _Value, _ExtractKey, _H1, _H2, 6011: _Default_ranged_hash, true>; 6011: 6011: using __ebo_extract_key = _Hashtable_ebo_helper<0, _ExtractKey>; 6011: using __ebo_h1 = _Hashtable_ebo_helper<1, _H1>; 6011: using __ebo_h2 = _Hashtable_ebo_helper<2, _H2>; 6011: 6011: public: 6011: typedef _H1 hasher; 6011: 6011: hasher 6011: hash_function() const 6011: { return _M_h1(); } 6011: 6011: protected: 6011: typedef std::size_t __hash_code; 6011: typedef _Hash_node<_Value, true> __node_type; 6011: 6011: 6011: _Hash_code_base() = default; 6011: _Hash_code_base(const _ExtractKey& __ex, 6011: const _H1& __h1, const _H2& __h2, 6011: const _Default_ranged_hash&) 6011: : __ebo_extract_key(__ex), __ebo_h1(__h1), __ebo_h2(__h2) { } 6011: 6011: __hash_code 6011: _M_hash_code(const _Key& __k) const 6011: { return _M_h1()(__k); } 6011: 6011: std::size_t 6011: _M_bucket_index(const _Key&, __hash_code __c, 6011: std::size_t __n) const 6011: { return _M_h2()(__c, __n); } 6011: 6011: std::size_t 6011: _M_bucket_index(const __node_type* __p, std::size_t __n) const 6011: noexcept( noexcept(declval()((__hash_code)0, 6011: (std::size_t)0)) ) 6011: { return _M_h2()(__p->_M_hash_code, __n); } 6011: 6011: void 6011: _M_store_code(__node_type* __n, __hash_code __c) const 6011: { __n->_M_hash_code = __c; } 6011: 6011: void 6011: _M_copy_code(__node_type* __to, const __node_type* __from) const 6011: { __to->_M_hash_code = __from->_M_hash_code; } 6011: 6011: void 6011: _M_swap(_Hash_code_base& __x) 6011: { 6011: std::swap(_M_extract(), __x._M_extract()); 6011: std::swap(_M_h1(), __x._M_h1()); 6011: std::swap(_M_h2(), __x._M_h2()); 6011: } 6011: 6011: const _ExtractKey& 6011: _M_extract() const { return __ebo_extract_key::_S_cget(*this); } 6011: 6011: _ExtractKey& 6011: _M_extract() { return __ebo_extract_key::_S_get(*this); } 6011: 6011: const _H1& 6011: _M_h1() const { return __ebo_h1::_S_cget(*this); } 6011: 6011: _H1& 6011: _M_h1() { return __ebo_h1::_S_get(*this); } 6011: 6011: const _H2& 6011: _M_h2() const { return __ebo_h2::_S_cget(*this); } 6011: 6011: _H2& 6011: _M_h2() { return __ebo_h2::_S_get(*this); } 6011: }; 6011: 6011: 6011: 6011: 6011: 6011: template 6011: struct _Equal_helper; 6011: 6011: 6011: template 6011: struct _Equal_helper<_Key, _Value, _ExtractKey, _Equal, _HashCodeType, true> 6011: { 6011: static bool 6011: _S_equals(const _Equal& __eq, const _ExtractKey& __extract, 6011: const _Key& __k, _HashCodeType __c, _Hash_node<_Value, true>* __n) 6011: { return __c == __n->_M_hash_code && __eq(__k, __extract(__n->_M_v())); } 6011: }; 6011: 6011: 6011: template 6011: struct _Equal_helper<_Key, _Value, _ExtractKey, _Equal, _HashCodeType, false> 6011: { 6011: static bool 6011: _S_equals(const _Equal& __eq, const _ExtractKey& __extract, 6011: const _Key& __k, _HashCodeType, _Hash_node<_Value, false>* __n) 6011: { return __eq(__k, __extract(__n->_M_v())); } 6011: }; 6011: 6011: 6011: 6011: template 6011: struct _Local_iterator_base<_Key, _Value, _ExtractKey, 6011: _H1, _H2, _Hash, true> 6011: : private _Hashtable_ebo_helper<0, _H2> 6011: { 6011: protected: 6011: using __base_type = _Hashtable_ebo_helper<0, _H2>; 6011: using __hash_code_base = _Hash_code_base<_Key, _Value, _ExtractKey, 6011: _H1, _H2, _Hash, true>; 6011: 6011: _Local_iterator_base() = default; 6011: _Local_iterator_base(const __hash_code_base& __base, 6011: _Hash_node<_Value, true>* __p, 6011: std::size_t __bkt, std::size_t __bkt_count) 6011: : __base_type(__base._M_h2()), 6011: _M_cur(__p), _M_bucket(__bkt), _M_bucket_count(__bkt_count) { } 6011: 6011: void 6011: _M_incr() 6011: { 6011: _M_cur = _M_cur->_M_next(); 6011: if (_M_cur) 6011: { 6011: std::size_t __bkt 6011: = __base_type::_S_get(*this)(_M_cur->_M_hash_code, 6011: _M_bucket_count); 6011: if (__bkt != _M_bucket) 6011: _M_cur = nullptr; 6011: } 6011: } 6011: 6011: _Hash_node<_Value, true>* _M_cur; 6011: std::size_t _M_bucket; 6011: std::size_t _M_bucket_count; 6011: 6011: public: 6011: const void* 6011: _M_curr() const { return _M_cur; } 6011: 6011: std::size_t 6011: _M_get_bucket() const { return _M_bucket; } 6011: }; 6011: 6011: 6011: 6011: 6011: 6011: template::value> 6011: struct _Hash_code_storage 6011: { 6011: __gnu_cxx::__aligned_buffer<_Tp> _M_storage; 6011: 6011: _Tp* 6011: _M_h() { return _M_storage._M_ptr(); } 6011: 6011: const _Tp* 6011: _M_h() const { return _M_storage._M_ptr(); } 6011: }; 6011: 6011: 6011: template 6011: struct _Hash_code_storage<_Tp, true> 6011: { 6011: static_assert( std::is_empty<_Tp>::value, "Type must be empty" ); 6011: 6011: 6011: 6011: _Tp* 6011: _M_h() { return reinterpret_cast<_Tp*>(this); } 6011: 6011: const _Tp* 6011: _M_h() const { return reinterpret_cast(this); } 6011: }; 6011: 6011: template 6011: using __hash_code_for_local_iter 6011: = _Hash_code_storage<_Hash_code_base<_Key, _Value, _ExtractKey, 6011: _H1, _H2, _Hash, false>>; 6011: 6011: 6011: template 6011: struct _Local_iterator_base<_Key, _Value, _ExtractKey, 6011: _H1, _H2, _Hash, false> 6011: : __hash_code_for_local_iter<_Key, _Value, _ExtractKey, _H1, _H2, _Hash> 6011: { 6011: protected: 6011: using __hash_code_base = _Hash_code_base<_Key, _Value, _ExtractKey, 6011: _H1, _H2, _Hash, false>; 6011: 6011: _Local_iterator_base() : _M_bucket_count(-1) { } 6011: 6011: _Local_iterator_base(const __hash_code_base& __base, 6011: _Hash_node<_Value, false>* __p, 6011: std::size_t __bkt, std::size_t __bkt_count) 6011: : _M_cur(__p), _M_bucket(__bkt), _M_bucket_count(__bkt_count) 6011: { _M_init(__base); } 6011: 6011: ~_Local_iterator_base() 6011: { 6011: if (_M_bucket_count != -1) 6011: _M_destroy(); 6011: } 6011: 6011: _Local_iterator_base(const _Local_iterator_base& __iter) 6011: : _M_cur(__iter._M_cur), _M_bucket(__iter._M_bucket), 6011: _M_bucket_count(__iter._M_bucket_count) 6011: { 6011: if (_M_bucket_count != -1) 6011: _M_init(*__iter._M_h()); 6011: } 6011: 6011: _Local_iterator_base& 6011: operator=(const _Local_iterator_base& __iter) 6011: { 6011: if (_M_bucket_count != -1) 6011: _M_destroy(); 6011: _M_cur = __iter._M_cur; 6011: _M_bucket = __iter._M_bucket; 6011: _M_bucket_count = __iter._M_bucket_count; 6011: if (_M_bucket_count != -1) 6011: _M_init(*__iter._M_h()); 6011: return *this; 6011: } 6011: 6011: void 6011: _M_incr() 6011: { 6011: _M_cur = _M_cur->_M_next(); 6011: if (_M_cur) 6011: { 6011: std::size_t __bkt = this->_M_h()->_M_bucket_index(_M_cur, 6011: _M_bucket_count); 6011: if (__bkt != _M_bucket) 6011: _M_cur = nullptr; 6011: } 6011: } 6011: 6011: _Hash_node<_Value, false>* _M_cur; 6011: std::size_t _M_bucket; 6011: std::size_t _M_bucket_count; 6011: 6011: void 6011: _M_init(const __hash_code_base& __base) 6011: { ::new(this->_M_h()) __hash_code_base(__base); } 6011: 6011: void 6011: _M_destroy() { this->_M_h()->~__hash_code_base(); } 6011: 6011: public: 6011: const void* 6011: _M_curr() const { return _M_cur; } 6011: 6011: std::size_t 6011: _M_get_bucket() const { return _M_bucket; } 6011: }; 6011: 6011: template 6011: inline bool 6011: operator==(const _Local_iterator_base<_Key, _Value, _ExtractKey, 6011: _H1, _H2, _Hash, __cache>& __x, 6011: const _Local_iterator_base<_Key, _Value, _ExtractKey, 6011: _H1, _H2, _Hash, __cache>& __y) 6011: { return __x._M_curr() == __y._M_curr(); } 6011: 6011: template 6011: inline bool 6011: operator!=(const _Local_iterator_base<_Key, _Value, _ExtractKey, 6011: _H1, _H2, _Hash, __cache>& __x, 6011: const _Local_iterator_base<_Key, _Value, _ExtractKey, 6011: _H1, _H2, _Hash, __cache>& __y) 6011: { return __x._M_curr() != __y._M_curr(); } 6011: 6011: 6011: template 6011: struct _Local_iterator 6011: : public _Local_iterator_base<_Key, _Value, _ExtractKey, 6011: _H1, _H2, _Hash, __cache> 6011: { 6011: private: 6011: using __base_type = _Local_iterator_base<_Key, _Value, _ExtractKey, 6011: _H1, _H2, _Hash, __cache>; 6011: using __hash_code_base = typename __base_type::__hash_code_base; 6011: public: 6011: typedef _Value value_type; 6011: typedef typename std::conditional<__constant_iterators, 6011: const _Value*, _Value*>::type 6011: pointer; 6011: typedef typename std::conditional<__constant_iterators, 6011: const _Value&, _Value&>::type 6011: reference; 6011: typedef std::ptrdiff_t difference_type; 6011: typedef std::forward_iterator_tag iterator_category; 6011: 6011: _Local_iterator() = default; 6011: 6011: _Local_iterator(const __hash_code_base& __base, 6011: _Hash_node<_Value, __cache>* __p, 6011: std::size_t __bkt, std::size_t __bkt_count) 6011: : __base_type(__base, __p, __bkt, __bkt_count) 6011: { } 6011: 6011: reference 6011: operator*() const 6011: { return this->_M_cur->_M_v(); } 6011: 6011: pointer 6011: operator->() const 6011: { return this->_M_cur->_M_valptr(); } 6011: 6011: _Local_iterator& 6011: operator++() 6011: { 6011: this->_M_incr(); 6011: return *this; 6011: } 6011: 6011: _Local_iterator 6011: operator++(int) 6011: { 6011: _Local_iterator __tmp(*this); 6011: this->_M_incr(); 6011: return __tmp; 6011: } 6011: }; 6011: 6011: 6011: template 6011: struct _Local_const_iterator 6011: : public _Local_iterator_base<_Key, _Value, _ExtractKey, 6011: _H1, _H2, _Hash, __cache> 6011: { 6011: private: 6011: using __base_type = _Local_iterator_base<_Key, _Value, _ExtractKey, 6011: _H1, _H2, _Hash, __cache>; 6011: using __hash_code_base = typename __base_type::__hash_code_base; 6011: 6011: public: 6011: typedef _Value value_type; 6011: typedef const _Value* pointer; 6011: typedef const _Value& reference; 6011: typedef std::ptrdiff_t difference_type; 6011: typedef std::forward_iterator_tag iterator_category; 6011: 6011: _Local_const_iterator() = default; 6011: 6011: _Local_const_iterator(const __hash_code_base& __base, 6011: _Hash_node<_Value, __cache>* __p, 6011: std::size_t __bkt, std::size_t __bkt_count) 6011: : __base_type(__base, __p, __bkt, __bkt_count) 6011: { } 6011: 6011: _Local_const_iterator(const _Local_iterator<_Key, _Value, _ExtractKey, 6011: _H1, _H2, _Hash, 6011: __constant_iterators, 6011: __cache>& __x) 6011: : __base_type(__x) 6011: { } 6011: 6011: reference 6011: operator*() const 6011: { return this->_M_cur->_M_v(); } 6011: 6011: pointer 6011: operator->() const 6011: { return this->_M_cur->_M_valptr(); } 6011: 6011: _Local_const_iterator& 6011: operator++() 6011: { 6011: this->_M_incr(); 6011: return *this; 6011: } 6011: 6011: _Local_const_iterator 6011: operator++(int) 6011: { 6011: _Local_const_iterator __tmp(*this); 6011: this->_M_incr(); 6011: return __tmp; 6011: } 6011: }; 6011: # 1769 "/usr/include/c++/8/bits/hashtable_policy.h" 3 6011: template 6011: struct _Hashtable_base 6011: : public _Hash_code_base<_Key, _Value, _ExtractKey, _H1, _H2, _Hash, 6011: _Traits::__hash_cached::value>, 6011: private _Hashtable_ebo_helper<0, _Equal> 6011: { 6011: public: 6011: typedef _Key key_type; 6011: typedef _Value value_type; 6011: typedef _Equal key_equal; 6011: typedef std::size_t size_type; 6011: typedef std::ptrdiff_t difference_type; 6011: 6011: using __traits_type = _Traits; 6011: using __hash_cached = typename __traits_type::__hash_cached; 6011: using __constant_iterators = typename __traits_type::__constant_iterators; 6011: using __unique_keys = typename __traits_type::__unique_keys; 6011: 6011: using __hash_code_base = _Hash_code_base<_Key, _Value, _ExtractKey, 6011: _H1, _H2, _Hash, 6011: __hash_cached::value>; 6011: 6011: using __hash_code = typename __hash_code_base::__hash_code; 6011: using __node_type = typename __hash_code_base::__node_type; 6011: 6011: using iterator = __detail::_Node_iterator; 6011: 6011: using const_iterator = __detail::_Node_const_iterator; 6011: 6011: using local_iterator = __detail::_Local_iterator; 6011: 6011: using const_local_iterator = __detail::_Local_const_iterator; 6011: 6011: using __ireturn_type = typename std::conditional<__unique_keys::value, 6011: std::pair, 6011: iterator>::type; 6011: private: 6011: using _EqualEBO = _Hashtable_ebo_helper<0, _Equal>; 6011: using _EqualHelper = _Equal_helper<_Key, _Value, _ExtractKey, _Equal, 6011: __hash_code, __hash_cached::value>; 6011: 6011: protected: 6011: _Hashtable_base() = default; 6011: _Hashtable_base(const _ExtractKey& __ex, const _H1& __h1, const _H2& __h2, 6011: const _Hash& __hash, const _Equal& __eq) 6011: : __hash_code_base(__ex, __h1, __h2, __hash), _EqualEBO(__eq) 6011: { } 6011: 6011: bool 6011: _M_equals(const _Key& __k, __hash_code __c, __node_type* __n) const 6011: { 6011: return _EqualHelper::_S_equals(_M_eq(), this->_M_extract(), 6011: __k, __c, __n); 6011: } 6011: 6011: void 6011: _M_swap(_Hashtable_base& __x) 6011: { 6011: __hash_code_base::_M_swap(__x); 6011: std::swap(_M_eq(), __x._M_eq()); 6011: } 6011: 6011: const _Equal& 6011: _M_eq() const { return _EqualEBO::_S_cget(*this); } 6011: 6011: _Equal& 6011: _M_eq() { return _EqualEBO::_S_get(*this); } 6011: }; 6011: 6011: 6011: 6011: 6011: 6011: 6011: struct _Equality_base 6011: { 6011: protected: 6011: template 6011: static bool 6011: _S_is_permutation(_Uiterator, _Uiterator, _Uiterator); 6011: }; 6011: 6011: 6011: template 6011: bool 6011: _Equality_base:: 6011: _S_is_permutation(_Uiterator __first1, _Uiterator __last1, 6011: _Uiterator __first2) 6011: { 6011: for (; __first1 != __last1; ++__first1, ++__first2) 6011: if (!(*__first1 == *__first2)) 6011: break; 6011: 6011: if (__first1 == __last1) 6011: return true; 6011: 6011: _Uiterator __last2 = __first2; 6011: std::advance(__last2, std::distance(__first1, __last1)); 6011: 6011: for (_Uiterator __it1 = __first1; __it1 != __last1; ++__it1) 6011: { 6011: _Uiterator __tmp = __first1; 6011: while (__tmp != __it1 && !bool(*__tmp == *__it1)) 6011: ++__tmp; 6011: 6011: 6011: if (__tmp != __it1) 6011: continue; 6011: 6011: std::ptrdiff_t __n2 = 0; 6011: for (__tmp = __first2; __tmp != __last2; ++__tmp) 6011: if (*__tmp == *__it1) 6011: ++__n2; 6011: 6011: if (!__n2) 6011: return false; 6011: 6011: std::ptrdiff_t __n1 = 0; 6011: for (__tmp = __it1; __tmp != __last1; ++__tmp) 6011: if (*__tmp == *__it1) 6011: ++__n1; 6011: 6011: if (__n1 != __n2) 6011: return false; 6011: } 6011: return true; 6011: } 6011: # 1918 "/usr/include/c++/8/bits/hashtable_policy.h" 3 6011: template 6011: struct _Equality; 6011: 6011: 6011: template 6011: struct _Equality<_Key, _Value, _Alloc, _ExtractKey, _Equal, 6011: _H1, _H2, _Hash, _RehashPolicy, _Traits, true> 6011: { 6011: using __hashtable = _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, 6011: _H1, _H2, _Hash, _RehashPolicy, _Traits>; 6011: 6011: bool 6011: _M_equal(const __hashtable&) const; 6011: }; 6011: 6011: template 6011: bool 6011: _Equality<_Key, _Value, _Alloc, _ExtractKey, _Equal, 6011: _H1, _H2, _Hash, _RehashPolicy, _Traits, true>:: 6011: _M_equal(const __hashtable& __other) const 6011: { 6011: const __hashtable* __this = static_cast(this); 6011: 6011: if (__this->size() != __other.size()) 6011: return false; 6011: 6011: for (auto __itx = __this->begin(); __itx != __this->end(); ++__itx) 6011: { 6011: const auto __ity = __other.find(_ExtractKey()(*__itx)); 6011: if (__ity == __other.end() || !bool(*__ity == *__itx)) 6011: return false; 6011: } 6011: return true; 6011: } 6011: 6011: 6011: template 6011: struct _Equality<_Key, _Value, _Alloc, _ExtractKey, _Equal, 6011: _H1, _H2, _Hash, _RehashPolicy, _Traits, false> 6011: : public _Equality_base 6011: { 6011: using __hashtable = _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, 6011: _H1, _H2, _Hash, _RehashPolicy, _Traits>; 6011: 6011: bool 6011: _M_equal(const __hashtable&) const; 6011: }; 6011: 6011: template 6011: bool 6011: _Equality<_Key, _Value, _Alloc, _ExtractKey, _Equal, 6011: _H1, _H2, _Hash, _RehashPolicy, _Traits, false>:: 6011: _M_equal(const __hashtable& __other) const 6011: { 6011: const __hashtable* __this = static_cast(this); 6011: 6011: if (__this->size() != __other.size()) 6011: return false; 6011: 6011: for (auto __itx = __this->begin(); __itx != __this->end();) 6011: { 6011: const auto __xrange = __this->equal_range(_ExtractKey()(*__itx)); 6011: const auto __yrange = __other.equal_range(_ExtractKey()(*__itx)); 6011: 6011: if (std::distance(__xrange.first, __xrange.second) 6011: != std::distance(__yrange.first, __yrange.second)) 6011: return false; 6011: 6011: if (!_S_is_permutation(__xrange.first, __xrange.second, 6011: __yrange.first)) 6011: return false; 6011: 6011: __itx = __xrange.second; 6011: } 6011: return true; 6011: } 6011: 6011: 6011: 6011: 6011: 6011: template 6011: struct _Hashtable_alloc : private _Hashtable_ebo_helper<0, _NodeAlloc> 6011: { 6011: private: 6011: using __ebo_node_alloc = _Hashtable_ebo_helper<0, _NodeAlloc>; 6011: public: 6011: using __node_type = typename _NodeAlloc::value_type; 6011: using __node_alloc_type = _NodeAlloc; 6011: 6011: using __node_alloc_traits = __gnu_cxx::__alloc_traits<__node_alloc_type>; 6011: 6011: using __value_alloc_traits = typename __node_alloc_traits::template 6011: rebind_traits; 6011: 6011: using __node_base = __detail::_Hash_node_base; 6011: using __bucket_type = __node_base*; 6011: using __bucket_alloc_type = 6011: __alloc_rebind<__node_alloc_type, __bucket_type>; 6011: using __bucket_alloc_traits = std::allocator_traits<__bucket_alloc_type>; 6011: 6011: _Hashtable_alloc() = default; 6011: _Hashtable_alloc(const _Hashtable_alloc&) = default; 6011: _Hashtable_alloc(_Hashtable_alloc&&) = default; 6011: 6011: template 6011: _Hashtable_alloc(_Alloc&& __a) 6011: : __ebo_node_alloc(std::forward<_Alloc>(__a)) 6011: { } 6011: 6011: __node_alloc_type& 6011: _M_node_allocator() 6011: { return __ebo_node_alloc::_S_get(*this); } 6011: 6011: const __node_alloc_type& 6011: _M_node_allocator() const 6011: { return __ebo_node_alloc::_S_cget(*this); } 6011: 6011: template 6011: __node_type* 6011: _M_allocate_node(_Args&&... __args); 6011: 6011: void 6011: _M_deallocate_node(__node_type* __n); 6011: 6011: 6011: void 6011: _M_deallocate_nodes(__node_type* __n); 6011: 6011: __bucket_type* 6011: _M_allocate_buckets(std::size_t __n); 6011: 6011: void 6011: _M_deallocate_buckets(__bucket_type*, std::size_t __n); 6011: }; 6011: 6011: 6011: 6011: template 6011: template 6011: typename _Hashtable_alloc<_NodeAlloc>::__node_type* 6011: _Hashtable_alloc<_NodeAlloc>::_M_allocate_node(_Args&&... __args) 6011: { 6011: auto __nptr = __node_alloc_traits::allocate(_M_node_allocator(), 1); 6011: __node_type* __n = std::__to_address(__nptr); 6011: try 6011: { 6011: ::new ((void*)__n) __node_type; 6011: __node_alloc_traits::construct(_M_node_allocator(), 6011: __n->_M_valptr(), 6011: std::forward<_Args>(__args)...); 6011: return __n; 6011: } 6011: catch(...) 6011: { 6011: __node_alloc_traits::deallocate(_M_node_allocator(), __nptr, 1); 6011: throw; 6011: } 6011: } 6011: 6011: template 6011: void 6011: _Hashtable_alloc<_NodeAlloc>::_M_deallocate_node(__node_type* __n) 6011: { 6011: typedef typename __node_alloc_traits::pointer _Ptr; 6011: auto __ptr = std::pointer_traits<_Ptr>::pointer_to(*__n); 6011: __node_alloc_traits::destroy(_M_node_allocator(), __n->_M_valptr()); 6011: __n->~__node_type(); 6011: __node_alloc_traits::deallocate(_M_node_allocator(), __ptr, 1); 6011: } 6011: 6011: template 6011: void 6011: _Hashtable_alloc<_NodeAlloc>::_M_deallocate_nodes(__node_type* __n) 6011: { 6011: while (__n) 6011: { 6011: __node_type* __tmp = __n; 6011: __n = __n->_M_next(); 6011: _M_deallocate_node(__tmp); 6011: } 6011: } 6011: 6011: template 6011: typename _Hashtable_alloc<_NodeAlloc>::__bucket_type* 6011: _Hashtable_alloc<_NodeAlloc>::_M_allocate_buckets(std::size_t __n) 6011: { 6011: __bucket_alloc_type __alloc(_M_node_allocator()); 6011: 6011: auto __ptr = __bucket_alloc_traits::allocate(__alloc, __n); 6011: __bucket_type* __p = std::__to_address(__ptr); 6011: __builtin_memset(__p, 0, __n * sizeof(__bucket_type)); 6011: return __p; 6011: } 6011: 6011: template 6011: void 6011: _Hashtable_alloc<_NodeAlloc>::_M_deallocate_buckets(__bucket_type* __bkts, 6011: std::size_t __n) 6011: { 6011: typedef typename __bucket_alloc_traits::pointer _Ptr; 6011: auto __ptr = std::pointer_traits<_Ptr>::pointer_to(*__bkts); 6011: __bucket_alloc_type __alloc(_M_node_allocator()); 6011: __bucket_alloc_traits::deallocate(__alloc, __ptr, __n); 6011: } 6011: 6011: 6011: } 6011: 6011: } 6011: # 36 "/usr/include/c++/8/bits/hashtable.h" 2 3 6011: 6011: 6011: 6011: 6011: namespace std __attribute__ ((__visibility__ ("default"))) 6011: { 6011: 6011: 6011: template 6011: using __cache_default 6011: = __not_<__and_< 6011: __is_fast_hash<_Hash>, 6011: 6011: __is_nothrow_invocable>>; 6011: # 169 "/usr/include/c++/8/bits/hashtable.h" 3 6011: template 6011: class _Hashtable 6011: : public __detail::_Hashtable_base<_Key, _Value, _ExtractKey, _Equal, 6011: _H1, _H2, _Hash, _Traits>, 6011: public __detail::_Map_base<_Key, _Value, _Alloc, _ExtractKey, _Equal, 6011: _H1, _H2, _Hash, _RehashPolicy, _Traits>, 6011: public __detail::_Insert<_Key, _Value, _Alloc, _ExtractKey, _Equal, 6011: _H1, _H2, _Hash, _RehashPolicy, _Traits>, 6011: public __detail::_Rehash_base<_Key, _Value, _Alloc, _ExtractKey, _Equal, 6011: _H1, _H2, _Hash, _RehashPolicy, _Traits>, 6011: public __detail::_Equality<_Key, _Value, _Alloc, _ExtractKey, _Equal, 6011: _H1, _H2, _Hash, _RehashPolicy, _Traits>, 6011: private __detail::_Hashtable_alloc< 6011: __alloc_rebind<_Alloc, 6011: __detail::_Hash_node<_Value, 6011: _Traits::__hash_cached::value>>> 6011: { 6011: static_assert(is_same::type, _Value>::value, 6011: "unordered container must have a non-const, non-volatile value_type"); 6011: 6011: 6011: 6011: 6011: static_assert(__is_invocable{}, 6011: "hash function must be invocable with an argument of key type"); 6011: static_assert(__is_invocable{}, 6011: "key equality predicate must be invocable with two arguments of " 6011: "key type"); 6011: 6011: using __traits_type = _Traits; 6011: using __hash_cached = typename __traits_type::__hash_cached; 6011: using __node_type = __detail::_Hash_node<_Value, __hash_cached::value>; 6011: using __node_alloc_type = __alloc_rebind<_Alloc, __node_type>; 6011: 6011: using __hashtable_alloc = __detail::_Hashtable_alloc<__node_alloc_type>; 6011: 6011: using __value_alloc_traits = 6011: typename __hashtable_alloc::__value_alloc_traits; 6011: using __node_alloc_traits = 6011: typename __hashtable_alloc::__node_alloc_traits; 6011: using __node_base = typename __hashtable_alloc::__node_base; 6011: using __bucket_type = typename __hashtable_alloc::__bucket_type; 6011: 6011: public: 6011: typedef _Key key_type; 6011: typedef _Value value_type; 6011: typedef _Alloc allocator_type; 6011: typedef _Equal key_equal; 6011: 6011: 6011: 6011: typedef typename __value_alloc_traits::pointer pointer; 6011: typedef typename __value_alloc_traits::const_pointer const_pointer; 6011: typedef value_type& reference; 6011: typedef const value_type& const_reference; 6011: 6011: private: 6011: using __rehash_type = _RehashPolicy; 6011: using __rehash_state = typename __rehash_type::_State; 6011: 6011: using __constant_iterators = typename __traits_type::__constant_iterators; 6011: using __unique_keys = typename __traits_type::__unique_keys; 6011: 6011: using __key_extract = typename std::conditional< 6011: __constant_iterators::value, 6011: __detail::_Identity, 6011: __detail::_Select1st>::type; 6011: 6011: using __hashtable_base = __detail:: 6011: _Hashtable_base<_Key, _Value, _ExtractKey, 6011: _Equal, _H1, _H2, _Hash, _Traits>; 6011: 6011: using __hash_code_base = typename __hashtable_base::__hash_code_base; 6011: using __hash_code = typename __hashtable_base::__hash_code; 6011: using __ireturn_type = typename __hashtable_base::__ireturn_type; 6011: 6011: using __map_base = __detail::_Map_base<_Key, _Value, _Alloc, _ExtractKey, 6011: _Equal, _H1, _H2, _Hash, 6011: _RehashPolicy, _Traits>; 6011: 6011: using __rehash_base = __detail::_Rehash_base<_Key, _Value, _Alloc, 6011: _ExtractKey, _Equal, 6011: _H1, _H2, _Hash, 6011: _RehashPolicy, _Traits>; 6011: 6011: using __eq_base = __detail::_Equality<_Key, _Value, _Alloc, _ExtractKey, 6011: _Equal, _H1, _H2, _Hash, 6011: _RehashPolicy, _Traits>; 6011: 6011: using __reuse_or_alloc_node_type = 6011: __detail::_ReuseOrAllocNode<__node_alloc_type>; 6011: 6011: 6011: template 6011: using __if_hash_cached = __or_<__not_<__hash_cached>, _Cond>; 6011: 6011: template 6011: using __if_hash_not_cached = __or_<__hash_cached, _Cond>; 6011: 6011: 6011: 6011: 6011: 6011: struct __hash_code_base_access : __hash_code_base 6011: { using __hash_code_base::_M_bucket_index; }; 6011: 6011: 6011: 6011: static_assert(noexcept(declval() 6011: ._M_bucket_index((const __node_type*)nullptr, 6011: (std::size_t)0)), 6011: "Cache the hash code or qualify your functors involved" 6011: " in hash code and bucket index computation with noexcept"); 6011: 6011: 6011: 6011: 6011: 6011: 6011: static_assert(__if_hash_cached>::value, 6011: "Functor used to map hash code to bucket index" 6011: " must be default constructible"); 6011: 6011: template 6011: friend struct __detail::_Map_base; 6011: 6011: template 6011: friend struct __detail::_Insert_base; 6011: 6011: template 6011: friend struct __detail::_Insert; 6011: 6011: public: 6011: using size_type = typename __hashtable_base::size_type; 6011: using difference_type = typename __hashtable_base::difference_type; 6011: 6011: using iterator = typename __hashtable_base::iterator; 6011: using const_iterator = typename __hashtable_base::const_iterator; 6011: 6011: using local_iterator = typename __hashtable_base::local_iterator; 6011: using const_local_iterator = typename __hashtable_base:: 6011: const_local_iterator; 6011: 6011: 6011: 6011: 6011: 6011: 6011: private: 6011: __bucket_type* _M_buckets = &_M_single_bucket; 6011: size_type _M_bucket_count = 1; 6011: __node_base _M_before_begin; 6011: size_type _M_element_count = 0; 6011: _RehashPolicy _M_rehash_policy; 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: __bucket_type _M_single_bucket = nullptr; 6011: 6011: bool 6011: _M_uses_single_bucket(__bucket_type* __bkts) const 6011: { return __builtin_expect(__bkts == &_M_single_bucket, false); } 6011: 6011: bool 6011: _M_uses_single_bucket() const 6011: { return _M_uses_single_bucket(_M_buckets); } 6011: 6011: __hashtable_alloc& 6011: _M_base_alloc() { return *this; } 6011: 6011: __bucket_type* 6011: _M_allocate_buckets(size_type __n) 6011: { 6011: if (__builtin_expect(__n == 1, false)) 6011: { 6011: _M_single_bucket = nullptr; 6011: return &_M_single_bucket; 6011: } 6011: 6011: return __hashtable_alloc::_M_allocate_buckets(__n); 6011: } 6011: 6011: void 6011: _M_deallocate_buckets(__bucket_type* __bkts, size_type __n) 6011: { 6011: if (_M_uses_single_bucket(__bkts)) 6011: return; 6011: 6011: __hashtable_alloc::_M_deallocate_buckets(__bkts, __n); 6011: } 6011: 6011: void 6011: _M_deallocate_buckets() 6011: { _M_deallocate_buckets(_M_buckets, _M_bucket_count); } 6011: 6011: 6011: 6011: __node_type* 6011: _M_bucket_begin(size_type __bkt) const; 6011: 6011: __node_type* 6011: _M_begin() const 6011: { return static_cast<__node_type*>(_M_before_begin._M_nxt); } 6011: 6011: template 6011: void 6011: _M_assign(const _Hashtable&, const _NodeGenerator&); 6011: 6011: void 6011: _M_move_assign(_Hashtable&&, std::true_type); 6011: 6011: void 6011: _M_move_assign(_Hashtable&&, std::false_type); 6011: 6011: void 6011: _M_reset() noexcept; 6011: 6011: _Hashtable(const _H1& __h1, const _H2& __h2, const _Hash& __h, 6011: const _Equal& __eq, const _ExtractKey& __exk, 6011: const allocator_type& __a) 6011: : __hashtable_base(__exk, __h1, __h2, __h, __eq), 6011: __hashtable_alloc(__node_alloc_type(__a)) 6011: { } 6011: 6011: public: 6011: 6011: _Hashtable() = default; 6011: _Hashtable(size_type __bucket_hint, 6011: const _H1&, const _H2&, const _Hash&, 6011: const _Equal&, const _ExtractKey&, 6011: const allocator_type&); 6011: 6011: template 6011: _Hashtable(_InputIterator __first, _InputIterator __last, 6011: size_type __bucket_hint, 6011: const _H1&, const _H2&, const _Hash&, 6011: const _Equal&, const _ExtractKey&, 6011: const allocator_type&); 6011: 6011: _Hashtable(const _Hashtable&); 6011: 6011: _Hashtable(_Hashtable&&) noexcept; 6011: 6011: _Hashtable(const _Hashtable&, const allocator_type&); 6011: 6011: _Hashtable(_Hashtable&&, const allocator_type&); 6011: 6011: 6011: explicit 6011: _Hashtable(const allocator_type& __a) 6011: : __hashtable_alloc(__node_alloc_type(__a)) 6011: { } 6011: 6011: explicit 6011: _Hashtable(size_type __n, 6011: const _H1& __hf = _H1(), 6011: const key_equal& __eql = key_equal(), 6011: const allocator_type& __a = allocator_type()) 6011: : _Hashtable(__n, __hf, _H2(), _Hash(), __eql, 6011: __key_extract(), __a) 6011: { } 6011: 6011: template 6011: _Hashtable(_InputIterator __f, _InputIterator __l, 6011: size_type __n = 0, 6011: const _H1& __hf = _H1(), 6011: const key_equal& __eql = key_equal(), 6011: const allocator_type& __a = allocator_type()) 6011: : _Hashtable(__f, __l, __n, __hf, _H2(), _Hash(), __eql, 6011: __key_extract(), __a) 6011: { } 6011: 6011: _Hashtable(initializer_list __l, 6011: size_type __n = 0, 6011: const _H1& __hf = _H1(), 6011: const key_equal& __eql = key_equal(), 6011: const allocator_type& __a = allocator_type()) 6011: : _Hashtable(__l.begin(), __l.end(), __n, __hf, _H2(), _Hash(), __eql, 6011: __key_extract(), __a) 6011: { } 6011: 6011: _Hashtable& 6011: operator=(const _Hashtable& __ht); 6011: 6011: _Hashtable& 6011: operator=(_Hashtable&& __ht) 6011: noexcept(__node_alloc_traits::_S_nothrow_move() 6011: && is_nothrow_move_assignable<_H1>::value 6011: && is_nothrow_move_assignable<_Equal>::value) 6011: { 6011: constexpr bool __move_storage = 6011: __node_alloc_traits::_S_propagate_on_move_assign() 6011: || __node_alloc_traits::_S_always_equal(); 6011: _M_move_assign(std::move(__ht), __bool_constant<__move_storage>()); 6011: return *this; 6011: } 6011: 6011: _Hashtable& 6011: operator=(initializer_list __l) 6011: { 6011: __reuse_or_alloc_node_type __roan(_M_begin(), *this); 6011: _M_before_begin._M_nxt = nullptr; 6011: clear(); 6011: this->_M_insert_range(__l.begin(), __l.end(), __roan, __unique_keys()); 6011: return *this; 6011: } 6011: 6011: ~_Hashtable() noexcept; 6011: 6011: void 6011: swap(_Hashtable&) 6011: noexcept(__and_<__is_nothrow_swappable<_H1>, 6011: __is_nothrow_swappable<_Equal>>::value); 6011: 6011: 6011: iterator 6011: begin() noexcept 6011: { return iterator(_M_begin()); } 6011: 6011: const_iterator 6011: begin() const noexcept 6011: { return const_iterator(_M_begin()); } 6011: 6011: iterator 6011: end() noexcept 6011: { return iterator(nullptr); } 6011: 6011: const_iterator 6011: end() const noexcept 6011: { return const_iterator(nullptr); } 6011: 6011: const_iterator 6011: cbegin() const noexcept 6011: { return const_iterator(_M_begin()); } 6011: 6011: const_iterator 6011: cend() const noexcept 6011: { return const_iterator(nullptr); } 6011: 6011: size_type 6011: size() const noexcept 6011: { return _M_element_count; } 6011: 6011: bool 6011: empty() const noexcept 6011: { return size() == 0; } 6011: 6011: allocator_type 6011: get_allocator() const noexcept 6011: { return allocator_type(this->_M_node_allocator()); } 6011: 6011: size_type 6011: max_size() const noexcept 6011: { return __node_alloc_traits::max_size(this->_M_node_allocator()); } 6011: 6011: 6011: key_equal 6011: key_eq() const 6011: { return this->_M_eq(); } 6011: 6011: 6011: 6011: 6011: size_type 6011: bucket_count() const noexcept 6011: { return _M_bucket_count; } 6011: 6011: size_type 6011: max_bucket_count() const noexcept 6011: { return max_size(); } 6011: 6011: size_type 6011: bucket_size(size_type __n) const 6011: { return std::distance(begin(__n), end(__n)); } 6011: 6011: size_type 6011: bucket(const key_type& __k) const 6011: { return _M_bucket_index(__k, this->_M_hash_code(__k)); } 6011: 6011: local_iterator 6011: begin(size_type __n) 6011: { 6011: return local_iterator(*this, _M_bucket_begin(__n), 6011: __n, _M_bucket_count); 6011: } 6011: 6011: local_iterator 6011: end(size_type __n) 6011: { return local_iterator(*this, nullptr, __n, _M_bucket_count); } 6011: 6011: const_local_iterator 6011: begin(size_type __n) const 6011: { 6011: return const_local_iterator(*this, _M_bucket_begin(__n), 6011: __n, _M_bucket_count); 6011: } 6011: 6011: const_local_iterator 6011: end(size_type __n) const 6011: { return const_local_iterator(*this, nullptr, __n, _M_bucket_count); } 6011: 6011: 6011: const_local_iterator 6011: cbegin(size_type __n) const 6011: { 6011: return const_local_iterator(*this, _M_bucket_begin(__n), 6011: __n, _M_bucket_count); 6011: } 6011: 6011: const_local_iterator 6011: cend(size_type __n) const 6011: { return const_local_iterator(*this, nullptr, __n, _M_bucket_count); } 6011: 6011: float 6011: load_factor() const noexcept 6011: { 6011: return static_cast(size()) / static_cast(bucket_count()); 6011: } 6011: 6011: 6011: 6011: 6011: 6011: 6011: const _RehashPolicy& 6011: __rehash_policy() const 6011: { return _M_rehash_policy; } 6011: 6011: void 6011: __rehash_policy(const _RehashPolicy& __pol) 6011: { _M_rehash_policy = __pol; } 6011: 6011: 6011: iterator 6011: find(const key_type& __k); 6011: 6011: const_iterator 6011: find(const key_type& __k) const; 6011: 6011: size_type 6011: count(const key_type& __k) const; 6011: 6011: std::pair 6011: equal_range(const key_type& __k); 6011: 6011: std::pair 6011: equal_range(const key_type& __k) const; 6011: 6011: protected: 6011: 6011: size_type 6011: _M_bucket_index(__node_type* __n) const noexcept 6011: { return __hash_code_base::_M_bucket_index(__n, _M_bucket_count); } 6011: 6011: size_type 6011: _M_bucket_index(const key_type& __k, __hash_code __c) const 6011: { return __hash_code_base::_M_bucket_index(__k, __c, _M_bucket_count); } 6011: 6011: 6011: 6011: __node_base* 6011: _M_find_before_node(size_type, const key_type&, __hash_code) const; 6011: 6011: __node_type* 6011: _M_find_node(size_type __bkt, const key_type& __key, 6011: __hash_code __c) const 6011: { 6011: __node_base* __before_n = _M_find_before_node(__bkt, __key, __c); 6011: if (__before_n) 6011: return static_cast<__node_type*>(__before_n->_M_nxt); 6011: return nullptr; 6011: } 6011: 6011: 6011: void 6011: _M_insert_bucket_begin(size_type, __node_type*); 6011: 6011: 6011: void 6011: _M_remove_bucket_begin(size_type __bkt, __node_type* __next_n, 6011: size_type __next_bkt); 6011: 6011: 6011: __node_base* 6011: _M_get_previous_node(size_type __bkt, __node_base* __n); 6011: 6011: 6011: 6011: 6011: iterator 6011: _M_insert_unique_node(size_type __bkt, __hash_code __code, 6011: __node_type* __n, size_type __n_elt = 1); 6011: 6011: 6011: 6011: iterator 6011: _M_insert_multi_node(__node_type* __hint, 6011: __hash_code __code, __node_type* __n); 6011: 6011: template 6011: std::pair 6011: _M_emplace(std::true_type, _Args&&... __args); 6011: 6011: template 6011: iterator 6011: _M_emplace(std::false_type __uk, _Args&&... __args) 6011: { return _M_emplace(cend(), __uk, std::forward<_Args>(__args)...); } 6011: 6011: 6011: template 6011: iterator 6011: _M_emplace(const_iterator, std::true_type __uk, _Args&&... __args) 6011: { return _M_emplace(__uk, std::forward<_Args>(__args)...).first; } 6011: 6011: template 6011: iterator 6011: _M_emplace(const_iterator, std::false_type, _Args&&... __args); 6011: 6011: template 6011: std::pair 6011: _M_insert(_Arg&&, const _NodeGenerator&, true_type, size_type = 1); 6011: 6011: template 6011: iterator 6011: _M_insert(_Arg&& __arg, const _NodeGenerator& __node_gen, 6011: false_type __uk) 6011: { 6011: return _M_insert(cend(), std::forward<_Arg>(__arg), __node_gen, 6011: __uk); 6011: } 6011: 6011: 6011: template 6011: iterator 6011: _M_insert(const_iterator, _Arg&& __arg, 6011: const _NodeGenerator& __node_gen, true_type __uk) 6011: { 6011: return 6011: _M_insert(std::forward<_Arg>(__arg), __node_gen, __uk).first; 6011: } 6011: 6011: 6011: template 6011: iterator 6011: _M_insert(const_iterator, _Arg&&, 6011: const _NodeGenerator&, false_type); 6011: 6011: size_type 6011: _M_erase(std::true_type, const key_type&); 6011: 6011: size_type 6011: _M_erase(std::false_type, const key_type&); 6011: 6011: iterator 6011: _M_erase(size_type __bkt, __node_base* __prev_n, __node_type* __n); 6011: 6011: public: 6011: 6011: template 6011: __ireturn_type 6011: emplace(_Args&&... __args) 6011: { return _M_emplace(__unique_keys(), std::forward<_Args>(__args)...); } 6011: 6011: template 6011: iterator 6011: emplace_hint(const_iterator __hint, _Args&&... __args) 6011: { 6011: return _M_emplace(__hint, __unique_keys(), 6011: std::forward<_Args>(__args)...); 6011: } 6011: 6011: 6011: 6011: 6011: iterator 6011: erase(const_iterator); 6011: 6011: 6011: iterator 6011: erase(iterator __it) 6011: { return erase(const_iterator(__it)); } 6011: 6011: size_type 6011: erase(const key_type& __k) 6011: { return _M_erase(__unique_keys(), __k); } 6011: 6011: iterator 6011: erase(const_iterator, const_iterator); 6011: 6011: void 6011: clear() noexcept; 6011: 6011: 6011: void rehash(size_type __n); 6011: # 918 "/usr/include/c++/8/bits/hashtable.h" 3 6011: private: 6011: 6011: void _M_rehash_aux(size_type __n, std::true_type); 6011: 6011: 6011: void _M_rehash_aux(size_type __n, std::false_type); 6011: 6011: 6011: 6011: void _M_rehash(size_type __n, const __rehash_state& __state); 6011: }; 6011: 6011: 6011: 6011: template 6011: auto 6011: _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, 6011: _H1, _H2, _Hash, _RehashPolicy, _Traits>:: 6011: _M_bucket_begin(size_type __bkt) const 6011: -> __node_type* 6011: { 6011: __node_base* __n = _M_buckets[__bkt]; 6011: return __n ? static_cast<__node_type*>(__n->_M_nxt) : nullptr; 6011: } 6011: 6011: template 6011: _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, 6011: _H1, _H2, _Hash, _RehashPolicy, _Traits>:: 6011: _Hashtable(size_type __bucket_hint, 6011: const _H1& __h1, const _H2& __h2, const _Hash& __h, 6011: const _Equal& __eq, const _ExtractKey& __exk, 6011: const allocator_type& __a) 6011: : _Hashtable(__h1, __h2, __h, __eq, __exk, __a) 6011: { 6011: auto __bkt = _M_rehash_policy._M_next_bkt(__bucket_hint); 6011: if (__bkt > _M_bucket_count) 6011: { 6011: _M_buckets = _M_allocate_buckets(__bkt); 6011: _M_bucket_count = __bkt; 6011: } 6011: } 6011: 6011: template 6011: template 6011: _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, 6011: _H1, _H2, _Hash, _RehashPolicy, _Traits>:: 6011: _Hashtable(_InputIterator __f, _InputIterator __l, 6011: size_type __bucket_hint, 6011: const _H1& __h1, const _H2& __h2, const _Hash& __h, 6011: const _Equal& __eq, const _ExtractKey& __exk, 6011: const allocator_type& __a) 6011: : _Hashtable(__h1, __h2, __h, __eq, __exk, __a) 6011: { 6011: auto __nb_elems = __detail::__distance_fw(__f, __l); 6011: auto __bkt_count = 6011: _M_rehash_policy._M_next_bkt( 6011: std::max(_M_rehash_policy._M_bkt_for_elements(__nb_elems), 6011: __bucket_hint)); 6011: 6011: if (__bkt_count > _M_bucket_count) 6011: { 6011: _M_buckets = _M_allocate_buckets(__bkt_count); 6011: _M_bucket_count = __bkt_count; 6011: } 6011: 6011: for (; __f != __l; ++__f) 6011: this->insert(*__f); 6011: } 6011: 6011: template 6011: auto 6011: _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, 6011: _H1, _H2, _Hash, _RehashPolicy, _Traits>:: 6011: operator=(const _Hashtable& __ht) 6011: -> _Hashtable& 6011: { 6011: if (&__ht == this) 6011: return *this; 6011: 6011: if (__node_alloc_traits::_S_propagate_on_copy_assign()) 6011: { 6011: auto& __this_alloc = this->_M_node_allocator(); 6011: auto& __that_alloc = __ht._M_node_allocator(); 6011: if (!__node_alloc_traits::_S_always_equal() 6011: && __this_alloc != __that_alloc) 6011: { 6011: 6011: this->_M_deallocate_nodes(_M_begin()); 6011: _M_before_begin._M_nxt = nullptr; 6011: _M_deallocate_buckets(); 6011: _M_buckets = nullptr; 6011: std::__alloc_on_copy(__this_alloc, __that_alloc); 6011: __hashtable_base::operator=(__ht); 6011: _M_bucket_count = __ht._M_bucket_count; 6011: _M_element_count = __ht._M_element_count; 6011: _M_rehash_policy = __ht._M_rehash_policy; 6011: try 6011: { 6011: _M_assign(__ht, 6011: [this](const __node_type* __n) 6011: { return this->_M_allocate_node(__n->_M_v()); }); 6011: } 6011: catch(...) 6011: { 6011: 6011: 6011: _M_reset(); 6011: throw; 6011: } 6011: return *this; 6011: } 6011: std::__alloc_on_copy(__this_alloc, __that_alloc); 6011: } 6011: 6011: 6011: __bucket_type* __former_buckets = nullptr; 6011: std::size_t __former_bucket_count = _M_bucket_count; 6011: const __rehash_state& __former_state = _M_rehash_policy._M_state(); 6011: 6011: if (_M_bucket_count != __ht._M_bucket_count) 6011: { 6011: __former_buckets = _M_buckets; 6011: _M_buckets = _M_allocate_buckets(__ht._M_bucket_count); 6011: _M_bucket_count = __ht._M_bucket_count; 6011: } 6011: else 6011: __builtin_memset(_M_buckets, 0, 6011: _M_bucket_count * sizeof(__bucket_type)); 6011: 6011: try 6011: { 6011: __hashtable_base::operator=(__ht); 6011: _M_element_count = __ht._M_element_count; 6011: _M_rehash_policy = __ht._M_rehash_policy; 6011: __reuse_or_alloc_node_type __roan(_M_begin(), *this); 6011: _M_before_begin._M_nxt = nullptr; 6011: _M_assign(__ht, 6011: [&__roan](const __node_type* __n) 6011: { return __roan(__n->_M_v()); }); 6011: if (__former_buckets) 6011: _M_deallocate_buckets(__former_buckets, __former_bucket_count); 6011: } 6011: catch(...) 6011: { 6011: if (__former_buckets) 6011: { 6011: 6011: _M_deallocate_buckets(); 6011: _M_rehash_policy._M_reset(__former_state); 6011: _M_buckets = __former_buckets; 6011: _M_bucket_count = __former_bucket_count; 6011: } 6011: __builtin_memset(_M_buckets, 0, 6011: _M_bucket_count * sizeof(__bucket_type)); 6011: throw; 6011: } 6011: return *this; 6011: } 6011: 6011: template 6011: template 6011: void 6011: _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, 6011: _H1, _H2, _Hash, _RehashPolicy, _Traits>:: 6011: _M_assign(const _Hashtable& __ht, const _NodeGenerator& __node_gen) 6011: { 6011: __bucket_type* __buckets = nullptr; 6011: if (!_M_buckets) 6011: _M_buckets = __buckets = _M_allocate_buckets(_M_bucket_count); 6011: 6011: try 6011: { 6011: if (!__ht._M_before_begin._M_nxt) 6011: return; 6011: 6011: 6011: 6011: __node_type* __ht_n = __ht._M_begin(); 6011: __node_type* __this_n = __node_gen(__ht_n); 6011: this->_M_copy_code(__this_n, __ht_n); 6011: _M_before_begin._M_nxt = __this_n; 6011: _M_buckets[_M_bucket_index(__this_n)] = &_M_before_begin; 6011: 6011: 6011: __node_base* __prev_n = __this_n; 6011: for (__ht_n = __ht_n->_M_next(); __ht_n; __ht_n = __ht_n->_M_next()) 6011: { 6011: __this_n = __node_gen(__ht_n); 6011: __prev_n->_M_nxt = __this_n; 6011: this->_M_copy_code(__this_n, __ht_n); 6011: size_type __bkt = _M_bucket_index(__this_n); 6011: if (!_M_buckets[__bkt]) 6011: _M_buckets[__bkt] = __prev_n; 6011: __prev_n = __this_n; 6011: } 6011: } 6011: catch(...) 6011: { 6011: clear(); 6011: if (__buckets) 6011: _M_deallocate_buckets(); 6011: throw; 6011: } 6011: } 6011: 6011: template 6011: void 6011: _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, 6011: _H1, _H2, _Hash, _RehashPolicy, _Traits>:: 6011: _M_reset() noexcept 6011: { 6011: _M_rehash_policy._M_reset(); 6011: _M_bucket_count = 1; 6011: _M_single_bucket = nullptr; 6011: _M_buckets = &_M_single_bucket; 6011: _M_before_begin._M_nxt = nullptr; 6011: _M_element_count = 0; 6011: } 6011: 6011: template 6011: void 6011: _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, 6011: _H1, _H2, _Hash, _RehashPolicy, _Traits>:: 6011: _M_move_assign(_Hashtable&& __ht, std::true_type) 6011: { 6011: this->_M_deallocate_nodes(_M_begin()); 6011: _M_deallocate_buckets(); 6011: __hashtable_base::operator=(std::move(__ht)); 6011: _M_rehash_policy = __ht._M_rehash_policy; 6011: if (!__ht._M_uses_single_bucket()) 6011: _M_buckets = __ht._M_buckets; 6011: else 6011: { 6011: _M_buckets = &_M_single_bucket; 6011: _M_single_bucket = __ht._M_single_bucket; 6011: } 6011: _M_bucket_count = __ht._M_bucket_count; 6011: _M_before_begin._M_nxt = __ht._M_before_begin._M_nxt; 6011: _M_element_count = __ht._M_element_count; 6011: std::__alloc_on_move(this->_M_node_allocator(), __ht._M_node_allocator()); 6011: 6011: 6011: 6011: if (_M_begin()) 6011: _M_buckets[_M_bucket_index(_M_begin())] = &_M_before_begin; 6011: __ht._M_reset(); 6011: } 6011: 6011: template 6011: void 6011: _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, 6011: _H1, _H2, _Hash, _RehashPolicy, _Traits>:: 6011: _M_move_assign(_Hashtable&& __ht, std::false_type) 6011: { 6011: if (__ht._M_node_allocator() == this->_M_node_allocator()) 6011: _M_move_assign(std::move(__ht), std::true_type()); 6011: else 6011: { 6011: 6011: __bucket_type* __former_buckets = nullptr; 6011: size_type __former_bucket_count = _M_bucket_count; 6011: const __rehash_state& __former_state = _M_rehash_policy._M_state(); 6011: 6011: if (_M_bucket_count != __ht._M_bucket_count) 6011: { 6011: __former_buckets = _M_buckets; 6011: _M_buckets = _M_allocate_buckets(__ht._M_bucket_count); 6011: _M_bucket_count = __ht._M_bucket_count; 6011: } 6011: else 6011: __builtin_memset(_M_buckets, 0, 6011: _M_bucket_count * sizeof(__bucket_type)); 6011: 6011: try 6011: { 6011: __hashtable_base::operator=(std::move(__ht)); 6011: _M_element_count = __ht._M_element_count; 6011: _M_rehash_policy = __ht._M_rehash_policy; 6011: __reuse_or_alloc_node_type __roan(_M_begin(), *this); 6011: _M_before_begin._M_nxt = nullptr; 6011: _M_assign(__ht, 6011: [&__roan](__node_type* __n) 6011: { return __roan(std::move_if_noexcept(__n->_M_v())); }); 6011: __ht.clear(); 6011: } 6011: catch(...) 6011: { 6011: if (__former_buckets) 6011: { 6011: _M_deallocate_buckets(); 6011: _M_rehash_policy._M_reset(__former_state); 6011: _M_buckets = __former_buckets; 6011: _M_bucket_count = __former_bucket_count; 6011: } 6011: __builtin_memset(_M_buckets, 0, 6011: _M_bucket_count * sizeof(__bucket_type)); 6011: throw; 6011: } 6011: } 6011: } 6011: 6011: template 6011: _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, 6011: _H1, _H2, _Hash, _RehashPolicy, _Traits>:: 6011: _Hashtable(const _Hashtable& __ht) 6011: : __hashtable_base(__ht), 6011: __map_base(__ht), 6011: __rehash_base(__ht), 6011: __hashtable_alloc( 6011: __node_alloc_traits::_S_select_on_copy(__ht._M_node_allocator())), 6011: _M_buckets(nullptr), 6011: _M_bucket_count(__ht._M_bucket_count), 6011: _M_element_count(__ht._M_element_count), 6011: _M_rehash_policy(__ht._M_rehash_policy) 6011: { 6011: _M_assign(__ht, 6011: [this](const __node_type* __n) 6011: { return this->_M_allocate_node(__n->_M_v()); }); 6011: } 6011: 6011: template 6011: _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, 6011: _H1, _H2, _Hash, _RehashPolicy, _Traits>:: 6011: _Hashtable(_Hashtable&& __ht) noexcept 6011: : __hashtable_base(__ht), 6011: __map_base(__ht), 6011: __rehash_base(__ht), 6011: __hashtable_alloc(std::move(__ht._M_base_alloc())), 6011: _M_buckets(__ht._M_buckets), 6011: _M_bucket_count(__ht._M_bucket_count), 6011: _M_before_begin(__ht._M_before_begin._M_nxt), 6011: _M_element_count(__ht._M_element_count), 6011: _M_rehash_policy(__ht._M_rehash_policy) 6011: { 6011: 6011: if (__ht._M_uses_single_bucket()) 6011: { 6011: _M_buckets = &_M_single_bucket; 6011: _M_single_bucket = __ht._M_single_bucket; 6011: } 6011: 6011: 6011: 6011: if (_M_begin()) 6011: _M_buckets[_M_bucket_index(_M_begin())] = &_M_before_begin; 6011: 6011: __ht._M_reset(); 6011: } 6011: 6011: template 6011: _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, 6011: _H1, _H2, _Hash, _RehashPolicy, _Traits>:: 6011: _Hashtable(const _Hashtable& __ht, const allocator_type& __a) 6011: : __hashtable_base(__ht), 6011: __map_base(__ht), 6011: __rehash_base(__ht), 6011: __hashtable_alloc(__node_alloc_type(__a)), 6011: _M_buckets(), 6011: _M_bucket_count(__ht._M_bucket_count), 6011: _M_element_count(__ht._M_element_count), 6011: _M_rehash_policy(__ht._M_rehash_policy) 6011: { 6011: _M_assign(__ht, 6011: [this](const __node_type* __n) 6011: { return this->_M_allocate_node(__n->_M_v()); }); 6011: } 6011: 6011: template 6011: _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, 6011: _H1, _H2, _Hash, _RehashPolicy, _Traits>:: 6011: _Hashtable(_Hashtable&& __ht, const allocator_type& __a) 6011: : __hashtable_base(__ht), 6011: __map_base(__ht), 6011: __rehash_base(__ht), 6011: __hashtable_alloc(__node_alloc_type(__a)), 6011: _M_buckets(nullptr), 6011: _M_bucket_count(__ht._M_bucket_count), 6011: _M_element_count(__ht._M_element_count), 6011: _M_rehash_policy(__ht._M_rehash_policy) 6011: { 6011: if (__ht._M_node_allocator() == this->_M_node_allocator()) 6011: { 6011: if (__ht._M_uses_single_bucket()) 6011: { 6011: _M_buckets = &_M_single_bucket; 6011: _M_single_bucket = __ht._M_single_bucket; 6011: } 6011: else 6011: _M_buckets = __ht._M_buckets; 6011: 6011: _M_before_begin._M_nxt = __ht._M_before_begin._M_nxt; 6011: 6011: 6011: if (_M_begin()) 6011: _M_buckets[_M_bucket_index(_M_begin())] = &_M_before_begin; 6011: __ht._M_reset(); 6011: } 6011: else 6011: { 6011: _M_assign(__ht, 6011: [this](__node_type* __n) 6011: { 6011: return this->_M_allocate_node( 6011: std::move_if_noexcept(__n->_M_v())); 6011: }); 6011: __ht.clear(); 6011: } 6011: } 6011: 6011: template 6011: _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, 6011: _H1, _H2, _Hash, _RehashPolicy, _Traits>:: 6011: ~_Hashtable() noexcept 6011: { 6011: clear(); 6011: _M_deallocate_buckets(); 6011: } 6011: 6011: template 6011: void 6011: _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, 6011: _H1, _H2, _Hash, _RehashPolicy, _Traits>:: 6011: swap(_Hashtable& __x) 6011: noexcept(__and_<__is_nothrow_swappable<_H1>, 6011: __is_nothrow_swappable<_Equal>>::value) 6011: { 6011: 6011: 6011: 6011: this->_M_swap(__x); 6011: 6011: std::__alloc_on_swap(this->_M_node_allocator(), __x._M_node_allocator()); 6011: std::swap(_M_rehash_policy, __x._M_rehash_policy); 6011: 6011: 6011: if (this->_M_uses_single_bucket()) 6011: { 6011: if (!__x._M_uses_single_bucket()) 6011: { 6011: _M_buckets = __x._M_buckets; 6011: __x._M_buckets = &__x._M_single_bucket; 6011: } 6011: } 6011: else if (__x._M_uses_single_bucket()) 6011: { 6011: __x._M_buckets = _M_buckets; 6011: _M_buckets = &_M_single_bucket; 6011: } 6011: else 6011: std::swap(_M_buckets, __x._M_buckets); 6011: 6011: std::swap(_M_bucket_count, __x._M_bucket_count); 6011: std::swap(_M_before_begin._M_nxt, __x._M_before_begin._M_nxt); 6011: std::swap(_M_element_count, __x._M_element_count); 6011: std::swap(_M_single_bucket, __x._M_single_bucket); 6011: 6011: 6011: 6011: if (_M_begin()) 6011: _M_buckets[_M_bucket_index(_M_begin())] = &_M_before_begin; 6011: 6011: if (__x._M_begin()) 6011: __x._M_buckets[__x._M_bucket_index(__x._M_begin())] 6011: = &__x._M_before_begin; 6011: } 6011: 6011: template 6011: auto 6011: _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, 6011: _H1, _H2, _Hash, _RehashPolicy, _Traits>:: 6011: find(const key_type& __k) 6011: -> iterator 6011: { 6011: __hash_code __code = this->_M_hash_code(__k); 6011: std::size_t __n = _M_bucket_index(__k, __code); 6011: __node_type* __p = _M_find_node(__n, __k, __code); 6011: return __p ? iterator(__p) : end(); 6011: } 6011: 6011: template 6011: auto 6011: _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, 6011: _H1, _H2, _Hash, _RehashPolicy, _Traits>:: 6011: find(const key_type& __k) const 6011: -> const_iterator 6011: { 6011: __hash_code __code = this->_M_hash_code(__k); 6011: std::size_t __n = _M_bucket_index(__k, __code); 6011: __node_type* __p = _M_find_node(__n, __k, __code); 6011: return __p ? const_iterator(__p) : end(); 6011: } 6011: 6011: template 6011: auto 6011: _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, 6011: _H1, _H2, _Hash, _RehashPolicy, _Traits>:: 6011: count(const key_type& __k) const 6011: -> size_type 6011: { 6011: __hash_code __code = this->_M_hash_code(__k); 6011: std::size_t __n = _M_bucket_index(__k, __code); 6011: __node_type* __p = _M_bucket_begin(__n); 6011: if (!__p) 6011: return 0; 6011: 6011: std::size_t __result = 0; 6011: for (;; __p = __p->_M_next()) 6011: { 6011: if (this->_M_equals(__k, __code, __p)) 6011: ++__result; 6011: else if (__result) 6011: 6011: 6011: 6011: break; 6011: if (!__p->_M_nxt || _M_bucket_index(__p->_M_next()) != __n) 6011: break; 6011: } 6011: return __result; 6011: } 6011: 6011: template 6011: auto 6011: _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, 6011: _H1, _H2, _Hash, _RehashPolicy, _Traits>:: 6011: equal_range(const key_type& __k) 6011: -> pair 6011: { 6011: __hash_code __code = this->_M_hash_code(__k); 6011: std::size_t __n = _M_bucket_index(__k, __code); 6011: __node_type* __p = _M_find_node(__n, __k, __code); 6011: 6011: if (__p) 6011: { 6011: __node_type* __p1 = __p->_M_next(); 6011: while (__p1 && _M_bucket_index(__p1) == __n 6011: && this->_M_equals(__k, __code, __p1)) 6011: __p1 = __p1->_M_next(); 6011: 6011: return std::make_pair(iterator(__p), iterator(__p1)); 6011: } 6011: else 6011: return std::make_pair(end(), end()); 6011: } 6011: 6011: template 6011: auto 6011: _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, 6011: _H1, _H2, _Hash, _RehashPolicy, _Traits>:: 6011: equal_range(const key_type& __k) const 6011: -> pair 6011: { 6011: __hash_code __code = this->_M_hash_code(__k); 6011: std::size_t __n = _M_bucket_index(__k, __code); 6011: __node_type* __p = _M_find_node(__n, __k, __code); 6011: 6011: if (__p) 6011: { 6011: __node_type* __p1 = __p->_M_next(); 6011: while (__p1 && _M_bucket_index(__p1) == __n 6011: && this->_M_equals(__k, __code, __p1)) 6011: __p1 = __p1->_M_next(); 6011: 6011: return std::make_pair(const_iterator(__p), const_iterator(__p1)); 6011: } 6011: else 6011: return std::make_pair(end(), end()); 6011: } 6011: 6011: 6011: 6011: template 6011: auto 6011: _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, 6011: _H1, _H2, _Hash, _RehashPolicy, _Traits>:: 6011: _M_find_before_node(size_type __n, const key_type& __k, 6011: __hash_code __code) const 6011: -> __node_base* 6011: { 6011: __node_base* __prev_p = _M_buckets[__n]; 6011: if (!__prev_p) 6011: return nullptr; 6011: 6011: for (__node_type* __p = static_cast<__node_type*>(__prev_p->_M_nxt);; 6011: __p = __p->_M_next()) 6011: { 6011: if (this->_M_equals(__k, __code, __p)) 6011: return __prev_p; 6011: 6011: if (!__p->_M_nxt || _M_bucket_index(__p->_M_next()) != __n) 6011: break; 6011: __prev_p = __p; 6011: } 6011: return nullptr; 6011: } 6011: 6011: template 6011: void 6011: _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, 6011: _H1, _H2, _Hash, _RehashPolicy, _Traits>:: 6011: _M_insert_bucket_begin(size_type __bkt, __node_type* __node) 6011: { 6011: if (_M_buckets[__bkt]) 6011: { 6011: 6011: 6011: __node->_M_nxt = _M_buckets[__bkt]->_M_nxt; 6011: _M_buckets[__bkt]->_M_nxt = __node; 6011: } 6011: else 6011: { 6011: 6011: 6011: 6011: __node->_M_nxt = _M_before_begin._M_nxt; 6011: _M_before_begin._M_nxt = __node; 6011: if (__node->_M_nxt) 6011: 6011: 6011: _M_buckets[_M_bucket_index(__node->_M_next())] = __node; 6011: _M_buckets[__bkt] = &_M_before_begin; 6011: } 6011: } 6011: 6011: template 6011: void 6011: _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, 6011: _H1, _H2, _Hash, _RehashPolicy, _Traits>:: 6011: _M_remove_bucket_begin(size_type __bkt, __node_type* __next, 6011: size_type __next_bkt) 6011: { 6011: if (!__next || __next_bkt != __bkt) 6011: { 6011: 6011: 6011: if (__next) 6011: _M_buckets[__next_bkt] = _M_buckets[__bkt]; 6011: 6011: 6011: if (&_M_before_begin == _M_buckets[__bkt]) 6011: _M_before_begin._M_nxt = __next; 6011: _M_buckets[__bkt] = nullptr; 6011: } 6011: } 6011: 6011: template 6011: auto 6011: _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, 6011: _H1, _H2, _Hash, _RehashPolicy, _Traits>:: 6011: _M_get_previous_node(size_type __bkt, __node_base* __n) 6011: -> __node_base* 6011: { 6011: __node_base* __prev_n = _M_buckets[__bkt]; 6011: while (__prev_n->_M_nxt != __n) 6011: __prev_n = __prev_n->_M_nxt; 6011: return __prev_n; 6011: } 6011: 6011: template 6011: template 6011: auto 6011: _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, 6011: _H1, _H2, _Hash, _RehashPolicy, _Traits>:: 6011: _M_emplace(std::true_type, _Args&&... __args) 6011: -> pair 6011: { 6011: 6011: __node_type* __node = this->_M_allocate_node(std::forward<_Args>(__args)...); 6011: const key_type& __k = this->_M_extract()(__node->_M_v()); 6011: __hash_code __code; 6011: try 6011: { 6011: __code = this->_M_hash_code(__k); 6011: } 6011: catch(...) 6011: { 6011: this->_M_deallocate_node(__node); 6011: throw; 6011: } 6011: 6011: size_type __bkt = _M_bucket_index(__k, __code); 6011: if (__node_type* __p = _M_find_node(__bkt, __k, __code)) 6011: { 6011: 6011: this->_M_deallocate_node(__node); 6011: return std::make_pair(iterator(__p), false); 6011: } 6011: 6011: 6011: return std::make_pair(_M_insert_unique_node(__bkt, __code, __node), 6011: true); 6011: } 6011: 6011: template 6011: template 6011: auto 6011: _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, 6011: _H1, _H2, _Hash, _RehashPolicy, _Traits>:: 6011: _M_emplace(const_iterator __hint, std::false_type, _Args&&... __args) 6011: -> iterator 6011: { 6011: 6011: __node_type* __node = 6011: this->_M_allocate_node(std::forward<_Args>(__args)...); 6011: 6011: __hash_code __code; 6011: try 6011: { 6011: __code = this->_M_hash_code(this->_M_extract()(__node->_M_v())); 6011: } 6011: catch(...) 6011: { 6011: this->_M_deallocate_node(__node); 6011: throw; 6011: } 6011: 6011: return _M_insert_multi_node(__hint._M_cur, __code, __node); 6011: } 6011: 6011: template 6011: auto 6011: _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, 6011: _H1, _H2, _Hash, _RehashPolicy, _Traits>:: 6011: _M_insert_unique_node(size_type __bkt, __hash_code __code, 6011: __node_type* __node, size_type __n_elt) 6011: -> iterator 6011: { 6011: const __rehash_state& __saved_state = _M_rehash_policy._M_state(); 6011: std::pair __do_rehash 6011: = _M_rehash_policy._M_need_rehash(_M_bucket_count, _M_element_count, 6011: __n_elt); 6011: 6011: try 6011: { 6011: if (__do_rehash.first) 6011: { 6011: _M_rehash(__do_rehash.second, __saved_state); 6011: __bkt = _M_bucket_index(this->_M_extract()(__node->_M_v()), __code); 6011: } 6011: 6011: this->_M_store_code(__node, __code); 6011: 6011: 6011: _M_insert_bucket_begin(__bkt, __node); 6011: ++_M_element_count; 6011: return iterator(__node); 6011: } 6011: catch(...) 6011: { 6011: this->_M_deallocate_node(__node); 6011: throw; 6011: } 6011: } 6011: 6011: 6011: 6011: template 6011: auto 6011: _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, 6011: _H1, _H2, _Hash, _RehashPolicy, _Traits>:: 6011: _M_insert_multi_node(__node_type* __hint, __hash_code __code, 6011: __node_type* __node) 6011: -> iterator 6011: { 6011: const __rehash_state& __saved_state = _M_rehash_policy._M_state(); 6011: std::pair __do_rehash 6011: = _M_rehash_policy._M_need_rehash(_M_bucket_count, _M_element_count, 1); 6011: 6011: try 6011: { 6011: if (__do_rehash.first) 6011: _M_rehash(__do_rehash.second, __saved_state); 6011: 6011: this->_M_store_code(__node, __code); 6011: const key_type& __k = this->_M_extract()(__node->_M_v()); 6011: size_type __bkt = _M_bucket_index(__k, __code); 6011: 6011: 6011: 6011: __node_base* __prev 6011: = __builtin_expect(__hint != nullptr, false) 6011: && this->_M_equals(__k, __code, __hint) 6011: ? __hint 6011: : _M_find_before_node(__bkt, __k, __code); 6011: if (__prev) 6011: { 6011: 6011: __node->_M_nxt = __prev->_M_nxt; 6011: __prev->_M_nxt = __node; 6011: if (__builtin_expect(__prev == __hint, false)) 6011: 6011: 6011: if (__node->_M_nxt 6011: && !this->_M_equals(__k, __code, __node->_M_next())) 6011: { 6011: size_type __next_bkt = _M_bucket_index(__node->_M_next()); 6011: if (__next_bkt != __bkt) 6011: _M_buckets[__next_bkt] = __node; 6011: } 6011: } 6011: else 6011: 6011: 6011: 6011: 6011: _M_insert_bucket_begin(__bkt, __node); 6011: ++_M_element_count; 6011: return iterator(__node); 6011: } 6011: catch(...) 6011: { 6011: this->_M_deallocate_node(__node); 6011: throw; 6011: } 6011: } 6011: 6011: 6011: template 6011: template 6011: auto 6011: _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, 6011: _H1, _H2, _Hash, _RehashPolicy, _Traits>:: 6011: _M_insert(_Arg&& __v, const _NodeGenerator& __node_gen, true_type, 6011: size_type __n_elt) 6011: -> pair 6011: { 6011: const key_type& __k = this->_M_extract()(__v); 6011: __hash_code __code = this->_M_hash_code(__k); 6011: size_type __bkt = _M_bucket_index(__k, __code); 6011: 6011: __node_type* __n = _M_find_node(__bkt, __k, __code); 6011: if (__n) 6011: return std::make_pair(iterator(__n), false); 6011: 6011: __n = __node_gen(std::forward<_Arg>(__v)); 6011: return { _M_insert_unique_node(__bkt, __code, __n, __n_elt), true }; 6011: } 6011: 6011: 6011: template 6011: template 6011: auto 6011: _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, 6011: _H1, _H2, _Hash, _RehashPolicy, _Traits>:: 6011: _M_insert(const_iterator __hint, _Arg&& __v, 6011: const _NodeGenerator& __node_gen, false_type) 6011: -> iterator 6011: { 6011: 6011: 6011: __hash_code __code = this->_M_hash_code(this->_M_extract()(__v)); 6011: 6011: 6011: __node_type* __node = __node_gen(std::forward<_Arg>(__v)); 6011: 6011: return _M_insert_multi_node(__hint._M_cur, __code, __node); 6011: } 6011: 6011: template 6011: auto 6011: _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, 6011: _H1, _H2, _Hash, _RehashPolicy, _Traits>:: 6011: erase(const_iterator __it) 6011: -> iterator 6011: { 6011: __node_type* __n = __it._M_cur; 6011: std::size_t __bkt = _M_bucket_index(__n); 6011: 6011: 6011: 6011: 6011: __node_base* __prev_n = _M_get_previous_node(__bkt, __n); 6011: return _M_erase(__bkt, __prev_n, __n); 6011: } 6011: 6011: template 6011: auto 6011: _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, 6011: _H1, _H2, _Hash, _RehashPolicy, _Traits>:: 6011: _M_erase(size_type __bkt, __node_base* __prev_n, __node_type* __n) 6011: -> iterator 6011: { 6011: if (__prev_n == _M_buckets[__bkt]) 6011: _M_remove_bucket_begin(__bkt, __n->_M_next(), 6011: __n->_M_nxt ? _M_bucket_index(__n->_M_next()) : 0); 6011: else if (__n->_M_nxt) 6011: { 6011: size_type __next_bkt = _M_bucket_index(__n->_M_next()); 6011: if (__next_bkt != __bkt) 6011: _M_buckets[__next_bkt] = __prev_n; 6011: } 6011: 6011: __prev_n->_M_nxt = __n->_M_nxt; 6011: iterator __result(__n->_M_next()); 6011: this->_M_deallocate_node(__n); 6011: --_M_element_count; 6011: 6011: return __result; 6011: } 6011: 6011: template 6011: auto 6011: _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, 6011: _H1, _H2, _Hash, _RehashPolicy, _Traits>:: 6011: _M_erase(std::true_type, const key_type& __k) 6011: -> size_type 6011: { 6011: __hash_code __code = this->_M_hash_code(__k); 6011: std::size_t __bkt = _M_bucket_index(__k, __code); 6011: 6011: 6011: __node_base* __prev_n = _M_find_before_node(__bkt, __k, __code); 6011: if (!__prev_n) 6011: return 0; 6011: 6011: 6011: __node_type* __n = static_cast<__node_type*>(__prev_n->_M_nxt); 6011: _M_erase(__bkt, __prev_n, __n); 6011: return 1; 6011: } 6011: 6011: template 6011: auto 6011: _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, 6011: _H1, _H2, _Hash, _RehashPolicy, _Traits>:: 6011: _M_erase(std::false_type, const key_type& __k) 6011: -> size_type 6011: { 6011: __hash_code __code = this->_M_hash_code(__k); 6011: std::size_t __bkt = _M_bucket_index(__k, __code); 6011: 6011: 6011: __node_base* __prev_n = _M_find_before_node(__bkt, __k, __code); 6011: if (!__prev_n) 6011: return 0; 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: __node_type* __n = static_cast<__node_type*>(__prev_n->_M_nxt); 6011: __node_type* __n_last = __n; 6011: std::size_t __n_last_bkt = __bkt; 6011: do 6011: { 6011: __n_last = __n_last->_M_next(); 6011: if (!__n_last) 6011: break; 6011: __n_last_bkt = _M_bucket_index(__n_last); 6011: } 6011: while (__n_last_bkt == __bkt && this->_M_equals(__k, __code, __n_last)); 6011: 6011: 6011: size_type __result = 0; 6011: do 6011: { 6011: __node_type* __p = __n->_M_next(); 6011: this->_M_deallocate_node(__n); 6011: __n = __p; 6011: ++__result; 6011: --_M_element_count; 6011: } 6011: while (__n != __n_last); 6011: 6011: if (__prev_n == _M_buckets[__bkt]) 6011: _M_remove_bucket_begin(__bkt, __n_last, __n_last_bkt); 6011: else if (__n_last && __n_last_bkt != __bkt) 6011: _M_buckets[__n_last_bkt] = __prev_n; 6011: __prev_n->_M_nxt = __n_last; 6011: return __result; 6011: } 6011: 6011: template 6011: auto 6011: _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, 6011: _H1, _H2, _Hash, _RehashPolicy, _Traits>:: 6011: erase(const_iterator __first, const_iterator __last) 6011: -> iterator 6011: { 6011: __node_type* __n = __first._M_cur; 6011: __node_type* __last_n = __last._M_cur; 6011: if (__n == __last_n) 6011: return iterator(__n); 6011: 6011: std::size_t __bkt = _M_bucket_index(__n); 6011: 6011: __node_base* __prev_n = _M_get_previous_node(__bkt, __n); 6011: bool __is_bucket_begin = __n == _M_bucket_begin(__bkt); 6011: std::size_t __n_bkt = __bkt; 6011: for (;;) 6011: { 6011: do 6011: { 6011: __node_type* __tmp = __n; 6011: __n = __n->_M_next(); 6011: this->_M_deallocate_node(__tmp); 6011: --_M_element_count; 6011: if (!__n) 6011: break; 6011: __n_bkt = _M_bucket_index(__n); 6011: } 6011: while (__n != __last_n && __n_bkt == __bkt); 6011: if (__is_bucket_begin) 6011: _M_remove_bucket_begin(__bkt, __n, __n_bkt); 6011: if (__n == __last_n) 6011: break; 6011: __is_bucket_begin = true; 6011: __bkt = __n_bkt; 6011: } 6011: 6011: if (__n && (__n_bkt != __bkt || __is_bucket_begin)) 6011: _M_buckets[__n_bkt] = __prev_n; 6011: __prev_n->_M_nxt = __n; 6011: return iterator(__n); 6011: } 6011: 6011: template 6011: void 6011: _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, 6011: _H1, _H2, _Hash, _RehashPolicy, _Traits>:: 6011: clear() noexcept 6011: { 6011: this->_M_deallocate_nodes(_M_begin()); 6011: __builtin_memset(_M_buckets, 0, _M_bucket_count * sizeof(__bucket_type)); 6011: _M_element_count = 0; 6011: _M_before_begin._M_nxt = nullptr; 6011: } 6011: 6011: template 6011: void 6011: _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, 6011: _H1, _H2, _Hash, _RehashPolicy, _Traits>:: 6011: rehash(size_type __n) 6011: { 6011: const __rehash_state& __saved_state = _M_rehash_policy._M_state(); 6011: std::size_t __buckets 6011: = std::max(_M_rehash_policy._M_bkt_for_elements(_M_element_count + 1), 6011: __n); 6011: __buckets = _M_rehash_policy._M_next_bkt(__buckets); 6011: 6011: if (__buckets != _M_bucket_count) 6011: _M_rehash(__buckets, __saved_state); 6011: else 6011: 6011: _M_rehash_policy._M_reset(__saved_state); 6011: } 6011: 6011: template 6011: void 6011: _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, 6011: _H1, _H2, _Hash, _RehashPolicy, _Traits>:: 6011: _M_rehash(size_type __n, const __rehash_state& __state) 6011: { 6011: try 6011: { 6011: _M_rehash_aux(__n, __unique_keys()); 6011: } 6011: catch(...) 6011: { 6011: 6011: 6011: _M_rehash_policy._M_reset(__state); 6011: throw; 6011: } 6011: } 6011: 6011: 6011: template 6011: void 6011: _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, 6011: _H1, _H2, _Hash, _RehashPolicy, _Traits>:: 6011: _M_rehash_aux(size_type __n, std::true_type) 6011: { 6011: __bucket_type* __new_buckets = _M_allocate_buckets(__n); 6011: __node_type* __p = _M_begin(); 6011: _M_before_begin._M_nxt = nullptr; 6011: std::size_t __bbegin_bkt = 0; 6011: while (__p) 6011: { 6011: __node_type* __next = __p->_M_next(); 6011: std::size_t __bkt = __hash_code_base::_M_bucket_index(__p, __n); 6011: if (!__new_buckets[__bkt]) 6011: { 6011: __p->_M_nxt = _M_before_begin._M_nxt; 6011: _M_before_begin._M_nxt = __p; 6011: __new_buckets[__bkt] = &_M_before_begin; 6011: if (__p->_M_nxt) 6011: __new_buckets[__bbegin_bkt] = __p; 6011: __bbegin_bkt = __bkt; 6011: } 6011: else 6011: { 6011: __p->_M_nxt = __new_buckets[__bkt]->_M_nxt; 6011: __new_buckets[__bkt]->_M_nxt = __p; 6011: } 6011: __p = __next; 6011: } 6011: 6011: _M_deallocate_buckets(); 6011: _M_bucket_count = __n; 6011: _M_buckets = __new_buckets; 6011: } 6011: 6011: 6011: 6011: template 6011: void 6011: _Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, 6011: _H1, _H2, _Hash, _RehashPolicy, _Traits>:: 6011: _M_rehash_aux(size_type __n, std::false_type) 6011: { 6011: __bucket_type* __new_buckets = _M_allocate_buckets(__n); 6011: 6011: __node_type* __p = _M_begin(); 6011: _M_before_begin._M_nxt = nullptr; 6011: std::size_t __bbegin_bkt = 0; 6011: std::size_t __prev_bkt = 0; 6011: __node_type* __prev_p = nullptr; 6011: bool __check_bucket = false; 6011: 6011: while (__p) 6011: { 6011: __node_type* __next = __p->_M_next(); 6011: std::size_t __bkt = __hash_code_base::_M_bucket_index(__p, __n); 6011: 6011: if (__prev_p && __prev_bkt == __bkt) 6011: { 6011: 6011: 6011: 6011: __p->_M_nxt = __prev_p->_M_nxt; 6011: __prev_p->_M_nxt = __p; 6011: 6011: 6011: 6011: 6011: 6011: 6011: __check_bucket = true; 6011: } 6011: else 6011: { 6011: if (__check_bucket) 6011: { 6011: 6011: 6011: if (__prev_p->_M_nxt) 6011: { 6011: std::size_t __next_bkt 6011: = __hash_code_base::_M_bucket_index(__prev_p->_M_next(), 6011: __n); 6011: if (__next_bkt != __prev_bkt) 6011: __new_buckets[__next_bkt] = __prev_p; 6011: } 6011: __check_bucket = false; 6011: } 6011: 6011: if (!__new_buckets[__bkt]) 6011: { 6011: __p->_M_nxt = _M_before_begin._M_nxt; 6011: _M_before_begin._M_nxt = __p; 6011: __new_buckets[__bkt] = &_M_before_begin; 6011: if (__p->_M_nxt) 6011: __new_buckets[__bbegin_bkt] = __p; 6011: __bbegin_bkt = __bkt; 6011: } 6011: else 6011: { 6011: __p->_M_nxt = __new_buckets[__bkt]->_M_nxt; 6011: __new_buckets[__bkt]->_M_nxt = __p; 6011: } 6011: } 6011: __prev_p = __p; 6011: __prev_bkt = __bkt; 6011: __p = __next; 6011: } 6011: 6011: if (__check_bucket && __prev_p->_M_nxt) 6011: { 6011: std::size_t __next_bkt 6011: = __hash_code_base::_M_bucket_index(__prev_p->_M_next(), __n); 6011: if (__next_bkt != __prev_bkt) 6011: __new_buckets[__next_bkt] = __prev_p; 6011: } 6011: 6011: _M_deallocate_buckets(); 6011: _M_bucket_count = __n; 6011: _M_buckets = __new_buckets; 6011: } 6011: 6011: 6011: 6011: 6011: 6011: 6011: } 6011: # 47 "/usr/include/c++/8/unordered_map" 2 3 6011: # 1 "/usr/include/c++/8/bits/unordered_map.h" 1 3 6011: # 33 "/usr/include/c++/8/bits/unordered_map.h" 3 6011: namespace std __attribute__ ((__visibility__ ("default"))) 6011: { 6011: 6011: 6011: 6011: 6011: template 6011: using __umap_traits = __detail::_Hashtable_traits<_Cache, false, true>; 6011: 6011: template, 6011: typename _Pred = std::equal_to<_Key>, 6011: typename _Alloc = std::allocator >, 6011: typename _Tr = __umap_traits<__cache_default<_Key, _Hash>::value>> 6011: using __umap_hashtable = _Hashtable<_Key, std::pair, 6011: _Alloc, __detail::_Select1st, 6011: _Pred, _Hash, 6011: __detail::_Mod_range_hashing, 6011: __detail::_Default_ranged_hash, 6011: __detail::_Prime_rehash_policy, _Tr>; 6011: 6011: 6011: template 6011: using __ummap_traits = __detail::_Hashtable_traits<_Cache, false, false>; 6011: 6011: template, 6011: typename _Pred = std::equal_to<_Key>, 6011: typename _Alloc = std::allocator >, 6011: typename _Tr = __ummap_traits<__cache_default<_Key, _Hash>::value>> 6011: using __ummap_hashtable = _Hashtable<_Key, std::pair, 6011: _Alloc, __detail::_Select1st, 6011: _Pred, _Hash, 6011: __detail::_Mod_range_hashing, 6011: __detail::_Default_ranged_hash, 6011: __detail::_Prime_rehash_policy, _Tr>; 6011: 6011: template 6011: class unordered_multimap; 6011: # 98 "/usr/include/c++/8/bits/unordered_map.h" 3 6011: template, 6011: typename _Pred = equal_to<_Key>, 6011: typename _Alloc = allocator>> 6011: class unordered_map 6011: { 6011: typedef __umap_hashtable<_Key, _Tp, _Hash, _Pred, _Alloc> _Hashtable; 6011: _Hashtable _M_h; 6011: 6011: public: 6011: 6011: 6011: 6011: typedef typename _Hashtable::key_type key_type; 6011: typedef typename _Hashtable::value_type value_type; 6011: typedef typename _Hashtable::mapped_type mapped_type; 6011: typedef typename _Hashtable::hasher hasher; 6011: typedef typename _Hashtable::key_equal key_equal; 6011: typedef typename _Hashtable::allocator_type allocator_type; 6011: 6011: 6011: 6011: 6011: typedef typename _Hashtable::pointer pointer; 6011: typedef typename _Hashtable::const_pointer const_pointer; 6011: typedef typename _Hashtable::reference reference; 6011: typedef typename _Hashtable::const_reference const_reference; 6011: typedef typename _Hashtable::iterator iterator; 6011: typedef typename _Hashtable::const_iterator const_iterator; 6011: typedef typename _Hashtable::local_iterator local_iterator; 6011: typedef typename _Hashtable::const_local_iterator const_local_iterator; 6011: typedef typename _Hashtable::size_type size_type; 6011: typedef typename _Hashtable::difference_type difference_type; 6011: # 141 "/usr/include/c++/8/bits/unordered_map.h" 3 6011: unordered_map() = default; 6011: # 150 "/usr/include/c++/8/bits/unordered_map.h" 3 6011: explicit 6011: unordered_map(size_type __n, 6011: const hasher& __hf = hasher(), 6011: const key_equal& __eql = key_equal(), 6011: const allocator_type& __a = allocator_type()) 6011: : _M_h(__n, __hf, __eql, __a) 6011: { } 6011: # 171 "/usr/include/c++/8/bits/unordered_map.h" 3 6011: template 6011: unordered_map(_InputIterator __first, _InputIterator __last, 6011: size_type __n = 0, 6011: const hasher& __hf = hasher(), 6011: const key_equal& __eql = key_equal(), 6011: const allocator_type& __a = allocator_type()) 6011: : _M_h(__first, __last, __n, __hf, __eql, __a) 6011: { } 6011: 6011: 6011: unordered_map(const unordered_map&) = default; 6011: 6011: 6011: unordered_map(unordered_map&&) = default; 6011: 6011: 6011: 6011: 6011: 6011: explicit 6011: unordered_map(const allocator_type& __a) 6011: : _M_h(__a) 6011: { } 6011: 6011: 6011: 6011: 6011: 6011: 6011: unordered_map(const unordered_map& __umap, 6011: const allocator_type& __a) 6011: : _M_h(__umap._M_h, __a) 6011: { } 6011: 6011: 6011: 6011: 6011: 6011: 6011: unordered_map(unordered_map&& __umap, 6011: const allocator_type& __a) 6011: : _M_h(std::move(__umap._M_h), __a) 6011: { } 6011: # 226 "/usr/include/c++/8/bits/unordered_map.h" 3 6011: unordered_map(initializer_list __l, 6011: size_type __n = 0, 6011: const hasher& __hf = hasher(), 6011: const key_equal& __eql = key_equal(), 6011: const allocator_type& __a = allocator_type()) 6011: : _M_h(__l, __n, __hf, __eql, __a) 6011: { } 6011: 6011: unordered_map(size_type __n, const allocator_type& __a) 6011: : unordered_map(__n, hasher(), key_equal(), __a) 6011: { } 6011: 6011: unordered_map(size_type __n, const hasher& __hf, 6011: const allocator_type& __a) 6011: : unordered_map(__n, __hf, key_equal(), __a) 6011: { } 6011: 6011: template 6011: unordered_map(_InputIterator __first, _InputIterator __last, 6011: size_type __n, 6011: const allocator_type& __a) 6011: : unordered_map(__first, __last, __n, hasher(), key_equal(), __a) 6011: { } 6011: 6011: template 6011: unordered_map(_InputIterator __first, _InputIterator __last, 6011: size_type __n, const hasher& __hf, 6011: const allocator_type& __a) 6011: : unordered_map(__first, __last, __n, __hf, key_equal(), __a) 6011: { } 6011: 6011: unordered_map(initializer_list __l, 6011: size_type __n, 6011: const allocator_type& __a) 6011: : unordered_map(__l, __n, hasher(), key_equal(), __a) 6011: { } 6011: 6011: unordered_map(initializer_list __l, 6011: size_type __n, const hasher& __hf, 6011: const allocator_type& __a) 6011: : unordered_map(__l, __n, __hf, key_equal(), __a) 6011: { } 6011: 6011: 6011: unordered_map& 6011: operator=(const unordered_map&) = default; 6011: 6011: 6011: unordered_map& 6011: operator=(unordered_map&&) = default; 6011: # 288 "/usr/include/c++/8/bits/unordered_map.h" 3 6011: unordered_map& 6011: operator=(initializer_list __l) 6011: { 6011: _M_h = __l; 6011: return *this; 6011: } 6011: 6011: 6011: allocator_type 6011: get_allocator() const noexcept 6011: { return _M_h.get_allocator(); } 6011: 6011: 6011: 6011: 6011: bool 6011: empty() const noexcept 6011: { return _M_h.empty(); } 6011: 6011: 6011: size_type 6011: size() const noexcept 6011: { return _M_h.size(); } 6011: 6011: 6011: size_type 6011: max_size() const noexcept 6011: { return _M_h.max_size(); } 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: iterator 6011: begin() noexcept 6011: { return _M_h.begin(); } 6011: 6011: 6011: 6011: 6011: 6011: 6011: const_iterator 6011: begin() const noexcept 6011: { return _M_h.begin(); } 6011: 6011: const_iterator 6011: cbegin() const noexcept 6011: { return _M_h.begin(); } 6011: 6011: 6011: 6011: 6011: 6011: 6011: iterator 6011: end() noexcept 6011: { return _M_h.end(); } 6011: 6011: 6011: 6011: 6011: 6011: 6011: const_iterator 6011: end() const noexcept 6011: { return _M_h.end(); } 6011: 6011: const_iterator 6011: cend() const noexcept 6011: { return _M_h.end(); } 6011: # 385 "/usr/include/c++/8/bits/unordered_map.h" 3 6011: template 6011: std::pair 6011: emplace(_Args&&... __args) 6011: { return _M_h.emplace(std::forward<_Args>(__args)...); } 6011: # 416 "/usr/include/c++/8/bits/unordered_map.h" 3 6011: template 6011: iterator 6011: emplace_hint(const_iterator __pos, _Args&&... __args) 6011: { return _M_h.emplace_hint(__pos, std::forward<_Args>(__args)...); } 6011: # 578 "/usr/include/c++/8/bits/unordered_map.h" 3 6011: std::pair 6011: insert(const value_type& __x) 6011: { return _M_h.insert(__x); } 6011: 6011: 6011: 6011: std::pair 6011: insert(value_type&& __x) 6011: { return _M_h.insert(std::move(__x)); } 6011: 6011: template::value>::type> 6011: std::pair 6011: insert(_Pair&& __x) 6011: { return _M_h.insert(std::forward<_Pair>(__x)); } 6011: # 618 "/usr/include/c++/8/bits/unordered_map.h" 3 6011: iterator 6011: insert(const_iterator __hint, const value_type& __x) 6011: { return _M_h.insert(__hint, __x); } 6011: 6011: 6011: 6011: iterator 6011: insert(const_iterator __hint, value_type&& __x) 6011: { return _M_h.insert(__hint, std::move(__x)); } 6011: 6011: template::value>::type> 6011: iterator 6011: insert(const_iterator __hint, _Pair&& __x) 6011: { return _M_h.insert(__hint, std::forward<_Pair>(__x)); } 6011: # 645 "/usr/include/c++/8/bits/unordered_map.h" 3 6011: template 6011: void 6011: insert(_InputIterator __first, _InputIterator __last) 6011: { _M_h.insert(__first, __last); } 6011: # 657 "/usr/include/c++/8/bits/unordered_map.h" 3 6011: void 6011: insert(initializer_list __l) 6011: { _M_h.insert(__l); } 6011: # 794 "/usr/include/c++/8/bits/unordered_map.h" 3 6011: iterator 6011: erase(const_iterator __position) 6011: { return _M_h.erase(__position); } 6011: 6011: 6011: iterator 6011: erase(iterator __position) 6011: { return _M_h.erase(__position); } 6011: # 816 "/usr/include/c++/8/bits/unordered_map.h" 3 6011: size_type 6011: erase(const key_type& __x) 6011: { return _M_h.erase(__x); } 6011: # 834 "/usr/include/c++/8/bits/unordered_map.h" 3 6011: iterator 6011: erase(const_iterator __first, const_iterator __last) 6011: { return _M_h.erase(__first, __last); } 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: void 6011: clear() noexcept 6011: { _M_h.clear(); } 6011: # 858 "/usr/include/c++/8/bits/unordered_map.h" 3 6011: void 6011: swap(unordered_map& __x) 6011: noexcept( noexcept(_M_h.swap(__x._M_h)) ) 6011: { _M_h.swap(__x._M_h); } 6011: # 898 "/usr/include/c++/8/bits/unordered_map.h" 3 6011: hasher 6011: hash_function() const 6011: { return _M_h.hash_function(); } 6011: 6011: 6011: 6011: key_equal 6011: key_eq() const 6011: { return _M_h.key_eq(); } 6011: # 922 "/usr/include/c++/8/bits/unordered_map.h" 3 6011: iterator 6011: find(const key_type& __x) 6011: { return _M_h.find(__x); } 6011: 6011: const_iterator 6011: find(const key_type& __x) const 6011: { return _M_h.find(__x); } 6011: # 940 "/usr/include/c++/8/bits/unordered_map.h" 3 6011: size_type 6011: count(const key_type& __x) const 6011: { return _M_h.count(__x); } 6011: # 953 "/usr/include/c++/8/bits/unordered_map.h" 3 6011: std::pair 6011: equal_range(const key_type& __x) 6011: { return _M_h.equal_range(__x); } 6011: 6011: std::pair 6011: equal_range(const key_type& __x) const 6011: { return _M_h.equal_range(__x); } 6011: # 975 "/usr/include/c++/8/bits/unordered_map.h" 3 6011: mapped_type& 6011: operator[](const key_type& __k) 6011: { return _M_h[__k]; } 6011: 6011: mapped_type& 6011: operator[](key_type&& __k) 6011: { return _M_h[std::move(__k)]; } 6011: # 992 "/usr/include/c++/8/bits/unordered_map.h" 3 6011: mapped_type& 6011: at(const key_type& __k) 6011: { return _M_h.at(__k); } 6011: 6011: const mapped_type& 6011: at(const key_type& __k) const 6011: { return _M_h.at(__k); } 6011: 6011: 6011: 6011: 6011: 6011: size_type 6011: bucket_count() const noexcept 6011: { return _M_h.bucket_count(); } 6011: 6011: 6011: size_type 6011: max_bucket_count() const noexcept 6011: { return _M_h.max_bucket_count(); } 6011: 6011: 6011: 6011: 6011: 6011: 6011: size_type 6011: bucket_size(size_type __n) const 6011: { return _M_h.bucket_size(__n); } 6011: 6011: 6011: 6011: 6011: 6011: 6011: size_type 6011: bucket(const key_type& __key) const 6011: { return _M_h.bucket(__key); } 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: local_iterator 6011: begin(size_type __n) 6011: { return _M_h.begin(__n); } 6011: # 1048 "/usr/include/c++/8/bits/unordered_map.h" 3 6011: const_local_iterator 6011: begin(size_type __n) const 6011: { return _M_h.begin(__n); } 6011: 6011: const_local_iterator 6011: cbegin(size_type __n) const 6011: { return _M_h.cbegin(__n); } 6011: # 1063 "/usr/include/c++/8/bits/unordered_map.h" 3 6011: local_iterator 6011: end(size_type __n) 6011: { return _M_h.end(__n); } 6011: # 1074 "/usr/include/c++/8/bits/unordered_map.h" 3 6011: const_local_iterator 6011: end(size_type __n) const 6011: { return _M_h.end(__n); } 6011: 6011: const_local_iterator 6011: cend(size_type __n) const 6011: { return _M_h.cend(__n); } 6011: 6011: 6011: 6011: 6011: 6011: float 6011: load_factor() const noexcept 6011: { return _M_h.load_factor(); } 6011: 6011: 6011: 6011: float 6011: max_load_factor() const noexcept 6011: { return _M_h.max_load_factor(); } 6011: 6011: 6011: 6011: 6011: 6011: void 6011: max_load_factor(float __z) 6011: { _M_h.max_load_factor(__z); } 6011: # 1111 "/usr/include/c++/8/bits/unordered_map.h" 3 6011: void 6011: rehash(size_type __n) 6011: { _M_h.rehash(__n); } 6011: # 1122 "/usr/include/c++/8/bits/unordered_map.h" 3 6011: void 6011: reserve(size_type __n) 6011: { _M_h.reserve(__n); } 6011: 6011: template 6011: friend bool 6011: operator==(const unordered_map<_Key1, _Tp1, _Hash1, _Pred1, _Alloc1>&, 6011: const unordered_map<_Key1, _Tp1, _Hash1, _Pred1, _Alloc1>&); 6011: }; 6011: # 1232 "/usr/include/c++/8/bits/unordered_map.h" 3 6011: template, 6011: typename _Pred = equal_to<_Key>, 6011: typename _Alloc = allocator>> 6011: class unordered_multimap 6011: { 6011: typedef __ummap_hashtable<_Key, _Tp, _Hash, _Pred, _Alloc> _Hashtable; 6011: _Hashtable _M_h; 6011: 6011: public: 6011: 6011: 6011: 6011: typedef typename _Hashtable::key_type key_type; 6011: typedef typename _Hashtable::value_type value_type; 6011: typedef typename _Hashtable::mapped_type mapped_type; 6011: typedef typename _Hashtable::hasher hasher; 6011: typedef typename _Hashtable::key_equal key_equal; 6011: typedef typename _Hashtable::allocator_type allocator_type; 6011: 6011: 6011: 6011: 6011: typedef typename _Hashtable::pointer pointer; 6011: typedef typename _Hashtable::const_pointer const_pointer; 6011: typedef typename _Hashtable::reference reference; 6011: typedef typename _Hashtable::const_reference const_reference; 6011: typedef typename _Hashtable::iterator iterator; 6011: typedef typename _Hashtable::const_iterator const_iterator; 6011: typedef typename _Hashtable::local_iterator local_iterator; 6011: typedef typename _Hashtable::const_local_iterator const_local_iterator; 6011: typedef typename _Hashtable::size_type size_type; 6011: typedef typename _Hashtable::difference_type difference_type; 6011: # 1274 "/usr/include/c++/8/bits/unordered_map.h" 3 6011: unordered_multimap() = default; 6011: # 1283 "/usr/include/c++/8/bits/unordered_map.h" 3 6011: explicit 6011: unordered_multimap(size_type __n, 6011: const hasher& __hf = hasher(), 6011: const key_equal& __eql = key_equal(), 6011: const allocator_type& __a = allocator_type()) 6011: : _M_h(__n, __hf, __eql, __a) 6011: { } 6011: # 1304 "/usr/include/c++/8/bits/unordered_map.h" 3 6011: template 6011: unordered_multimap(_InputIterator __first, _InputIterator __last, 6011: size_type __n = 0, 6011: const hasher& __hf = hasher(), 6011: const key_equal& __eql = key_equal(), 6011: const allocator_type& __a = allocator_type()) 6011: : _M_h(__first, __last, __n, __hf, __eql, __a) 6011: { } 6011: 6011: 6011: unordered_multimap(const unordered_multimap&) = default; 6011: 6011: 6011: unordered_multimap(unordered_multimap&&) = default; 6011: 6011: 6011: 6011: 6011: 6011: explicit 6011: unordered_multimap(const allocator_type& __a) 6011: : _M_h(__a) 6011: { } 6011: 6011: 6011: 6011: 6011: 6011: 6011: unordered_multimap(const unordered_multimap& __ummap, 6011: const allocator_type& __a) 6011: : _M_h(__ummap._M_h, __a) 6011: { } 6011: 6011: 6011: 6011: 6011: 6011: 6011: unordered_multimap(unordered_multimap&& __ummap, 6011: const allocator_type& __a) 6011: : _M_h(std::move(__ummap._M_h), __a) 6011: { } 6011: # 1359 "/usr/include/c++/8/bits/unordered_map.h" 3 6011: unordered_multimap(initializer_list __l, 6011: size_type __n = 0, 6011: const hasher& __hf = hasher(), 6011: const key_equal& __eql = key_equal(), 6011: const allocator_type& __a = allocator_type()) 6011: : _M_h(__l, __n, __hf, __eql, __a) 6011: { } 6011: 6011: unordered_multimap(size_type __n, const allocator_type& __a) 6011: : unordered_multimap(__n, hasher(), key_equal(), __a) 6011: { } 6011: 6011: unordered_multimap(size_type __n, const hasher& __hf, 6011: const allocator_type& __a) 6011: : unordered_multimap(__n, __hf, key_equal(), __a) 6011: { } 6011: 6011: template 6011: unordered_multimap(_InputIterator __first, _InputIterator __last, 6011: size_type __n, 6011: const allocator_type& __a) 6011: : unordered_multimap(__first, __last, __n, hasher(), key_equal(), __a) 6011: { } 6011: 6011: template 6011: unordered_multimap(_InputIterator __first, _InputIterator __last, 6011: size_type __n, const hasher& __hf, 6011: const allocator_type& __a) 6011: : unordered_multimap(__first, __last, __n, __hf, key_equal(), __a) 6011: { } 6011: 6011: unordered_multimap(initializer_list __l, 6011: size_type __n, 6011: const allocator_type& __a) 6011: : unordered_multimap(__l, __n, hasher(), key_equal(), __a) 6011: { } 6011: 6011: unordered_multimap(initializer_list __l, 6011: size_type __n, const hasher& __hf, 6011: const allocator_type& __a) 6011: : unordered_multimap(__l, __n, __hf, key_equal(), __a) 6011: { } 6011: 6011: 6011: unordered_multimap& 6011: operator=(const unordered_multimap&) = default; 6011: 6011: 6011: unordered_multimap& 6011: operator=(unordered_multimap&&) = default; 6011: # 1421 "/usr/include/c++/8/bits/unordered_map.h" 3 6011: unordered_multimap& 6011: operator=(initializer_list __l) 6011: { 6011: _M_h = __l; 6011: return *this; 6011: } 6011: 6011: 6011: allocator_type 6011: get_allocator() const noexcept 6011: { return _M_h.get_allocator(); } 6011: 6011: 6011: 6011: 6011: bool 6011: empty() const noexcept 6011: { return _M_h.empty(); } 6011: 6011: 6011: size_type 6011: size() const noexcept 6011: { return _M_h.size(); } 6011: 6011: 6011: size_type 6011: max_size() const noexcept 6011: { return _M_h.max_size(); } 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: iterator 6011: begin() noexcept 6011: { return _M_h.begin(); } 6011: 6011: 6011: 6011: 6011: 6011: 6011: const_iterator 6011: begin() const noexcept 6011: { return _M_h.begin(); } 6011: 6011: const_iterator 6011: cbegin() const noexcept 6011: { return _M_h.begin(); } 6011: 6011: 6011: 6011: 6011: 6011: 6011: iterator 6011: end() noexcept 6011: { return _M_h.end(); } 6011: 6011: 6011: 6011: 6011: 6011: 6011: const_iterator 6011: end() const noexcept 6011: { return _M_h.end(); } 6011: 6011: const_iterator 6011: cend() const noexcept 6011: { return _M_h.end(); } 6011: # 1513 "/usr/include/c++/8/bits/unordered_map.h" 3 6011: template 6011: iterator 6011: emplace(_Args&&... __args) 6011: { return _M_h.emplace(std::forward<_Args>(__args)...); } 6011: # 1540 "/usr/include/c++/8/bits/unordered_map.h" 3 6011: template 6011: iterator 6011: emplace_hint(const_iterator __pos, _Args&&... __args) 6011: { return _M_h.emplace_hint(__pos, std::forward<_Args>(__args)...); } 6011: # 1555 "/usr/include/c++/8/bits/unordered_map.h" 3 6011: iterator 6011: insert(const value_type& __x) 6011: { return _M_h.insert(__x); } 6011: 6011: iterator 6011: insert(value_type&& __x) 6011: { return _M_h.insert(std::move(__x)); } 6011: 6011: template::value>::type> 6011: iterator 6011: insert(_Pair&& __x) 6011: { return _M_h.insert(std::forward<_Pair>(__x)); } 6011: # 1591 "/usr/include/c++/8/bits/unordered_map.h" 3 6011: iterator 6011: insert(const_iterator __hint, const value_type& __x) 6011: { return _M_h.insert(__hint, __x); } 6011: 6011: 6011: 6011: iterator 6011: insert(const_iterator __hint, value_type&& __x) 6011: { return _M_h.insert(__hint, std::move(__x)); } 6011: 6011: template::value>::type> 6011: iterator 6011: insert(const_iterator __hint, _Pair&& __x) 6011: { return _M_h.insert(__hint, std::forward<_Pair>(__x)); } 6011: # 1618 "/usr/include/c++/8/bits/unordered_map.h" 3 6011: template 6011: void 6011: insert(_InputIterator __first, _InputIterator __last) 6011: { _M_h.insert(__first, __last); } 6011: # 1631 "/usr/include/c++/8/bits/unordered_map.h" 3 6011: void 6011: insert(initializer_list __l) 6011: { _M_h.insert(__l); } 6011: # 1674 "/usr/include/c++/8/bits/unordered_map.h" 3 6011: iterator 6011: erase(const_iterator __position) 6011: { return _M_h.erase(__position); } 6011: 6011: 6011: iterator 6011: erase(iterator __position) 6011: { return _M_h.erase(__position); } 6011: # 1695 "/usr/include/c++/8/bits/unordered_map.h" 3 6011: size_type 6011: erase(const key_type& __x) 6011: { return _M_h.erase(__x); } 6011: # 1714 "/usr/include/c++/8/bits/unordered_map.h" 3 6011: iterator 6011: erase(const_iterator __first, const_iterator __last) 6011: { return _M_h.erase(__first, __last); } 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: void 6011: clear() noexcept 6011: { _M_h.clear(); } 6011: # 1738 "/usr/include/c++/8/bits/unordered_map.h" 3 6011: void 6011: swap(unordered_multimap& __x) 6011: noexcept( noexcept(_M_h.swap(__x._M_h)) ) 6011: { _M_h.swap(__x._M_h); } 6011: # 1780 "/usr/include/c++/8/bits/unordered_map.h" 3 6011: hasher 6011: hash_function() const 6011: { return _M_h.hash_function(); } 6011: 6011: 6011: 6011: key_equal 6011: key_eq() const 6011: { return _M_h.key_eq(); } 6011: # 1804 "/usr/include/c++/8/bits/unordered_map.h" 3 6011: iterator 6011: find(const key_type& __x) 6011: { return _M_h.find(__x); } 6011: 6011: const_iterator 6011: find(const key_type& __x) const 6011: { return _M_h.find(__x); } 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: size_type 6011: count(const key_type& __x) const 6011: { return _M_h.count(__x); } 6011: # 1829 "/usr/include/c++/8/bits/unordered_map.h" 3 6011: std::pair 6011: equal_range(const key_type& __x) 6011: { return _M_h.equal_range(__x); } 6011: 6011: std::pair 6011: equal_range(const key_type& __x) const 6011: { return _M_h.equal_range(__x); } 6011: 6011: 6011: 6011: 6011: 6011: size_type 6011: bucket_count() const noexcept 6011: { return _M_h.bucket_count(); } 6011: 6011: 6011: size_type 6011: max_bucket_count() const noexcept 6011: { return _M_h.max_bucket_count(); } 6011: 6011: 6011: 6011: 6011: 6011: 6011: size_type 6011: bucket_size(size_type __n) const 6011: { return _M_h.bucket_size(__n); } 6011: 6011: 6011: 6011: 6011: 6011: 6011: size_type 6011: bucket(const key_type& __key) const 6011: { return _M_h.bucket(__key); } 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: local_iterator 6011: begin(size_type __n) 6011: { return _M_h.begin(__n); } 6011: # 1885 "/usr/include/c++/8/bits/unordered_map.h" 3 6011: const_local_iterator 6011: begin(size_type __n) const 6011: { return _M_h.begin(__n); } 6011: 6011: const_local_iterator 6011: cbegin(size_type __n) const 6011: { return _M_h.cbegin(__n); } 6011: # 1900 "/usr/include/c++/8/bits/unordered_map.h" 3 6011: local_iterator 6011: end(size_type __n) 6011: { return _M_h.end(__n); } 6011: # 1911 "/usr/include/c++/8/bits/unordered_map.h" 3 6011: const_local_iterator 6011: end(size_type __n) const 6011: { return _M_h.end(__n); } 6011: 6011: const_local_iterator 6011: cend(size_type __n) const 6011: { return _M_h.cend(__n); } 6011: 6011: 6011: 6011: 6011: 6011: float 6011: load_factor() const noexcept 6011: { return _M_h.load_factor(); } 6011: 6011: 6011: 6011: float 6011: max_load_factor() const noexcept 6011: { return _M_h.max_load_factor(); } 6011: 6011: 6011: 6011: 6011: 6011: void 6011: max_load_factor(float __z) 6011: { _M_h.max_load_factor(__z); } 6011: # 1948 "/usr/include/c++/8/bits/unordered_map.h" 3 6011: void 6011: rehash(size_type __n) 6011: { _M_h.rehash(__n); } 6011: # 1959 "/usr/include/c++/8/bits/unordered_map.h" 3 6011: void 6011: reserve(size_type __n) 6011: { _M_h.reserve(__n); } 6011: 6011: template 6011: friend bool 6011: operator==(const unordered_multimap<_Key1, _Tp1, 6011: _Hash1, _Pred1, _Alloc1>&, 6011: const unordered_multimap<_Key1, _Tp1, 6011: _Hash1, _Pred1, _Alloc1>&); 6011: }; 6011: # 2048 "/usr/include/c++/8/bits/unordered_map.h" 3 6011: template 6011: inline void 6011: swap(unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>& __x, 6011: unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>& __y) 6011: noexcept(noexcept(__x.swap(__y))) 6011: { __x.swap(__y); } 6011: 6011: template 6011: inline void 6011: swap(unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>& __x, 6011: unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>& __y) 6011: noexcept(noexcept(__x.swap(__y))) 6011: { __x.swap(__y); } 6011: 6011: template 6011: inline bool 6011: operator==(const unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>& __x, 6011: const unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>& __y) 6011: { return __x._M_h._M_equal(__y._M_h); } 6011: 6011: template 6011: inline bool 6011: operator!=(const unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>& __x, 6011: const unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>& __y) 6011: { return !(__x == __y); } 6011: 6011: template 6011: inline bool 6011: operator==(const unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>& __x, 6011: const unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>& __y) 6011: { return __x._M_h._M_equal(__y._M_h); } 6011: 6011: template 6011: inline bool 6011: operator!=(const unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>& __x, 6011: const unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>& __y) 6011: { return !(__x == __y); } 6011: 6011: 6011: # 2138 "/usr/include/c++/8/bits/unordered_map.h" 3 6011: 6011: } 6011: # 48 "/usr/include/c++/8/unordered_map" 2 3 6011: # 8 "unordered_map.hh" 2 6011: # 1 "/usr/include/c++/8/unordered_set" 1 3 6011: # 32 "/usr/include/c++/8/unordered_set" 3 6011: 6011: # 33 "/usr/include/c++/8/unordered_set" 3 6011: # 47 "/usr/include/c++/8/unordered_set" 3 6011: # 1 "/usr/include/c++/8/bits/unordered_set.h" 1 3 6011: # 33 "/usr/include/c++/8/bits/unordered_set.h" 3 6011: namespace std __attribute__ ((__visibility__ ("default"))) 6011: { 6011: 6011: 6011: 6011: 6011: template 6011: using __uset_traits = __detail::_Hashtable_traits<_Cache, true, true>; 6011: 6011: template, 6011: typename _Pred = std::equal_to<_Value>, 6011: typename _Alloc = std::allocator<_Value>, 6011: typename _Tr = __uset_traits<__cache_default<_Value, _Hash>::value>> 6011: using __uset_hashtable = _Hashtable<_Value, _Value, _Alloc, 6011: __detail::_Identity, _Pred, _Hash, 6011: __detail::_Mod_range_hashing, 6011: __detail::_Default_ranged_hash, 6011: __detail::_Prime_rehash_policy, _Tr>; 6011: 6011: 6011: template 6011: using __umset_traits = __detail::_Hashtable_traits<_Cache, true, false>; 6011: 6011: template, 6011: typename _Pred = std::equal_to<_Value>, 6011: typename _Alloc = std::allocator<_Value>, 6011: typename _Tr = __umset_traits<__cache_default<_Value, _Hash>::value>> 6011: using __umset_hashtable = _Hashtable<_Value, _Value, _Alloc, 6011: __detail::_Identity, 6011: _Pred, _Hash, 6011: __detail::_Mod_range_hashing, 6011: __detail::_Default_ranged_hash, 6011: __detail::_Prime_rehash_policy, _Tr>; 6011: 6011: template 6011: class unordered_multiset; 6011: # 93 "/usr/include/c++/8/bits/unordered_set.h" 3 6011: template, 6011: typename _Pred = equal_to<_Value>, 6011: typename _Alloc = allocator<_Value>> 6011: class unordered_set 6011: { 6011: typedef __uset_hashtable<_Value, _Hash, _Pred, _Alloc> _Hashtable; 6011: _Hashtable _M_h; 6011: 6011: public: 6011: 6011: 6011: 6011: typedef typename _Hashtable::key_type key_type; 6011: typedef typename _Hashtable::value_type value_type; 6011: typedef typename _Hashtable::hasher hasher; 6011: typedef typename _Hashtable::key_equal key_equal; 6011: typedef typename _Hashtable::allocator_type allocator_type; 6011: 6011: 6011: 6011: 6011: typedef typename _Hashtable::pointer pointer; 6011: typedef typename _Hashtable::const_pointer const_pointer; 6011: typedef typename _Hashtable::reference reference; 6011: typedef typename _Hashtable::const_reference const_reference; 6011: typedef typename _Hashtable::iterator iterator; 6011: typedef typename _Hashtable::const_iterator const_iterator; 6011: typedef typename _Hashtable::local_iterator local_iterator; 6011: typedef typename _Hashtable::const_local_iterator const_local_iterator; 6011: typedef typename _Hashtable::size_type size_type; 6011: typedef typename _Hashtable::difference_type difference_type; 6011: # 135 "/usr/include/c++/8/bits/unordered_set.h" 3 6011: unordered_set() = default; 6011: # 144 "/usr/include/c++/8/bits/unordered_set.h" 3 6011: explicit 6011: unordered_set(size_type __n, 6011: const hasher& __hf = hasher(), 6011: const key_equal& __eql = key_equal(), 6011: const allocator_type& __a = allocator_type()) 6011: : _M_h(__n, __hf, __eql, __a) 6011: { } 6011: # 165 "/usr/include/c++/8/bits/unordered_set.h" 3 6011: template 6011: unordered_set(_InputIterator __first, _InputIterator __last, 6011: size_type __n = 0, 6011: const hasher& __hf = hasher(), 6011: const key_equal& __eql = key_equal(), 6011: const allocator_type& __a = allocator_type()) 6011: : _M_h(__first, __last, __n, __hf, __eql, __a) 6011: { } 6011: 6011: 6011: unordered_set(const unordered_set&) = default; 6011: 6011: 6011: unordered_set(unordered_set&&) = default; 6011: 6011: 6011: 6011: 6011: 6011: explicit 6011: unordered_set(const allocator_type& __a) 6011: : _M_h(__a) 6011: { } 6011: 6011: 6011: 6011: 6011: 6011: 6011: unordered_set(const unordered_set& __uset, 6011: const allocator_type& __a) 6011: : _M_h(__uset._M_h, __a) 6011: { } 6011: 6011: 6011: 6011: 6011: 6011: 6011: unordered_set(unordered_set&& __uset, 6011: const allocator_type& __a) 6011: : _M_h(std::move(__uset._M_h), __a) 6011: { } 6011: # 220 "/usr/include/c++/8/bits/unordered_set.h" 3 6011: unordered_set(initializer_list __l, 6011: size_type __n = 0, 6011: const hasher& __hf = hasher(), 6011: const key_equal& __eql = key_equal(), 6011: const allocator_type& __a = allocator_type()) 6011: : _M_h(__l, __n, __hf, __eql, __a) 6011: { } 6011: 6011: unordered_set(size_type __n, const allocator_type& __a) 6011: : unordered_set(__n, hasher(), key_equal(), __a) 6011: { } 6011: 6011: unordered_set(size_type __n, const hasher& __hf, 6011: const allocator_type& __a) 6011: : unordered_set(__n, __hf, key_equal(), __a) 6011: { } 6011: 6011: template 6011: unordered_set(_InputIterator __first, _InputIterator __last, 6011: size_type __n, 6011: const allocator_type& __a) 6011: : unordered_set(__first, __last, __n, hasher(), key_equal(), __a) 6011: { } 6011: 6011: template 6011: unordered_set(_InputIterator __first, _InputIterator __last, 6011: size_type __n, const hasher& __hf, 6011: const allocator_type& __a) 6011: : unordered_set(__first, __last, __n, __hf, key_equal(), __a) 6011: { } 6011: 6011: unordered_set(initializer_list __l, 6011: size_type __n, 6011: const allocator_type& __a) 6011: : unordered_set(__l, __n, hasher(), key_equal(), __a) 6011: { } 6011: 6011: unordered_set(initializer_list __l, 6011: size_type __n, const hasher& __hf, 6011: const allocator_type& __a) 6011: : unordered_set(__l, __n, __hf, key_equal(), __a) 6011: { } 6011: 6011: 6011: unordered_set& 6011: operator=(const unordered_set&) = default; 6011: 6011: 6011: unordered_set& 6011: operator=(unordered_set&&) = default; 6011: # 282 "/usr/include/c++/8/bits/unordered_set.h" 3 6011: unordered_set& 6011: operator=(initializer_list __l) 6011: { 6011: _M_h = __l; 6011: return *this; 6011: } 6011: 6011: 6011: allocator_type 6011: get_allocator() const noexcept 6011: { return _M_h.get_allocator(); } 6011: 6011: 6011: 6011: 6011: bool 6011: empty() const noexcept 6011: { return _M_h.empty(); } 6011: 6011: 6011: size_type 6011: size() const noexcept 6011: { return _M_h.size(); } 6011: 6011: 6011: size_type 6011: max_size() const noexcept 6011: { return _M_h.max_size(); } 6011: # 318 "/usr/include/c++/8/bits/unordered_set.h" 3 6011: iterator 6011: begin() noexcept 6011: { return _M_h.begin(); } 6011: 6011: const_iterator 6011: begin() const noexcept 6011: { return _M_h.begin(); } 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: iterator 6011: end() noexcept 6011: { return _M_h.end(); } 6011: 6011: const_iterator 6011: end() const noexcept 6011: { return _M_h.end(); } 6011: 6011: 6011: 6011: 6011: 6011: 6011: const_iterator 6011: cbegin() const noexcept 6011: { return _M_h.begin(); } 6011: 6011: 6011: 6011: 6011: 6011: const_iterator 6011: cend() const noexcept 6011: { return _M_h.end(); } 6011: # 374 "/usr/include/c++/8/bits/unordered_set.h" 3 6011: template 6011: std::pair 6011: emplace(_Args&&... __args) 6011: { return _M_h.emplace(std::forward<_Args>(__args)...); } 6011: # 400 "/usr/include/c++/8/bits/unordered_set.h" 3 6011: template 6011: iterator 6011: emplace_hint(const_iterator __pos, _Args&&... __args) 6011: { return _M_h.emplace_hint(__pos, std::forward<_Args>(__args)...); } 6011: # 419 "/usr/include/c++/8/bits/unordered_set.h" 3 6011: std::pair 6011: insert(const value_type& __x) 6011: { return _M_h.insert(__x); } 6011: 6011: std::pair 6011: insert(value_type&& __x) 6011: { return _M_h.insert(std::move(__x)); } 6011: # 448 "/usr/include/c++/8/bits/unordered_set.h" 3 6011: iterator 6011: insert(const_iterator __hint, const value_type& __x) 6011: { return _M_h.insert(__hint, __x); } 6011: 6011: iterator 6011: insert(const_iterator __hint, value_type&& __x) 6011: { return _M_h.insert(__hint, std::move(__x)); } 6011: # 466 "/usr/include/c++/8/bits/unordered_set.h" 3 6011: template 6011: void 6011: insert(_InputIterator __first, _InputIterator __last) 6011: { _M_h.insert(__first, __last); } 6011: # 478 "/usr/include/c++/8/bits/unordered_set.h" 3 6011: void 6011: insert(initializer_list __l) 6011: { _M_h.insert(__l); } 6011: # 521 "/usr/include/c++/8/bits/unordered_set.h" 3 6011: iterator 6011: erase(const_iterator __position) 6011: { return _M_h.erase(__position); } 6011: 6011: 6011: iterator 6011: erase(iterator __position) 6011: { return _M_h.erase(__position); } 6011: # 543 "/usr/include/c++/8/bits/unordered_set.h" 3 6011: size_type 6011: erase(const key_type& __x) 6011: { return _M_h.erase(__x); } 6011: # 561 "/usr/include/c++/8/bits/unordered_set.h" 3 6011: iterator 6011: erase(const_iterator __first, const_iterator __last) 6011: { return _M_h.erase(__first, __last); } 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: void 6011: clear() noexcept 6011: { _M_h.clear(); } 6011: # 584 "/usr/include/c++/8/bits/unordered_set.h" 3 6011: void 6011: swap(unordered_set& __x) 6011: noexcept( noexcept(_M_h.swap(__x._M_h)) ) 6011: { _M_h.swap(__x._M_h); } 6011: # 624 "/usr/include/c++/8/bits/unordered_set.h" 3 6011: hasher 6011: hash_function() const 6011: { return _M_h.hash_function(); } 6011: 6011: 6011: 6011: key_equal 6011: key_eq() const 6011: { return _M_h.key_eq(); } 6011: # 648 "/usr/include/c++/8/bits/unordered_set.h" 3 6011: iterator 6011: find(const key_type& __x) 6011: { return _M_h.find(__x); } 6011: 6011: const_iterator 6011: find(const key_type& __x) const 6011: { return _M_h.find(__x); } 6011: # 666 "/usr/include/c++/8/bits/unordered_set.h" 3 6011: size_type 6011: count(const key_type& __x) const 6011: { return _M_h.count(__x); } 6011: # 679 "/usr/include/c++/8/bits/unordered_set.h" 3 6011: std::pair 6011: equal_range(const key_type& __x) 6011: { return _M_h.equal_range(__x); } 6011: 6011: std::pair 6011: equal_range(const key_type& __x) const 6011: { return _M_h.equal_range(__x); } 6011: 6011: 6011: 6011: 6011: 6011: size_type 6011: bucket_count() const noexcept 6011: { return _M_h.bucket_count(); } 6011: 6011: 6011: size_type 6011: max_bucket_count() const noexcept 6011: { return _M_h.max_bucket_count(); } 6011: 6011: 6011: 6011: 6011: 6011: 6011: size_type 6011: bucket_size(size_type __n) const 6011: { return _M_h.bucket_size(__n); } 6011: 6011: 6011: 6011: 6011: 6011: 6011: size_type 6011: bucket(const key_type& __key) const 6011: { return _M_h.bucket(__key); } 6011: # 725 "/usr/include/c++/8/bits/unordered_set.h" 3 6011: local_iterator 6011: begin(size_type __n) 6011: { return _M_h.begin(__n); } 6011: 6011: const_local_iterator 6011: begin(size_type __n) const 6011: { return _M_h.begin(__n); } 6011: 6011: const_local_iterator 6011: cbegin(size_type __n) const 6011: { return _M_h.cbegin(__n); } 6011: # 745 "/usr/include/c++/8/bits/unordered_set.h" 3 6011: local_iterator 6011: end(size_type __n) 6011: { return _M_h.end(__n); } 6011: 6011: const_local_iterator 6011: end(size_type __n) const 6011: { return _M_h.end(__n); } 6011: 6011: const_local_iterator 6011: cend(size_type __n) const 6011: { return _M_h.cend(__n); } 6011: 6011: 6011: 6011: 6011: 6011: float 6011: load_factor() const noexcept 6011: { return _M_h.load_factor(); } 6011: 6011: 6011: 6011: float 6011: max_load_factor() const noexcept 6011: { return _M_h.max_load_factor(); } 6011: 6011: 6011: 6011: 6011: 6011: void 6011: max_load_factor(float __z) 6011: { _M_h.max_load_factor(__z); } 6011: # 786 "/usr/include/c++/8/bits/unordered_set.h" 3 6011: void 6011: rehash(size_type __n) 6011: { _M_h.rehash(__n); } 6011: # 797 "/usr/include/c++/8/bits/unordered_set.h" 3 6011: void 6011: reserve(size_type __n) 6011: { _M_h.reserve(__n); } 6011: 6011: template 6011: friend bool 6011: operator==(const unordered_set<_Value1, _Hash1, _Pred1, _Alloc1>&, 6011: const unordered_set<_Value1, _Hash1, _Pred1, _Alloc1>&); 6011: }; 6011: # 891 "/usr/include/c++/8/bits/unordered_set.h" 3 6011: template, 6011: typename _Pred = equal_to<_Value>, 6011: typename _Alloc = allocator<_Value>> 6011: class unordered_multiset 6011: { 6011: typedef __umset_hashtable<_Value, _Hash, _Pred, _Alloc> _Hashtable; 6011: _Hashtable _M_h; 6011: 6011: public: 6011: 6011: 6011: 6011: typedef typename _Hashtable::key_type key_type; 6011: typedef typename _Hashtable::value_type value_type; 6011: typedef typename _Hashtable::hasher hasher; 6011: typedef typename _Hashtable::key_equal key_equal; 6011: typedef typename _Hashtable::allocator_type allocator_type; 6011: 6011: 6011: 6011: 6011: typedef typename _Hashtable::pointer pointer; 6011: typedef typename _Hashtable::const_pointer const_pointer; 6011: typedef typename _Hashtable::reference reference; 6011: typedef typename _Hashtable::const_reference const_reference; 6011: typedef typename _Hashtable::iterator iterator; 6011: typedef typename _Hashtable::const_iterator const_iterator; 6011: typedef typename _Hashtable::local_iterator local_iterator; 6011: typedef typename _Hashtable::const_local_iterator const_local_iterator; 6011: typedef typename _Hashtable::size_type size_type; 6011: typedef typename _Hashtable::difference_type difference_type; 6011: # 932 "/usr/include/c++/8/bits/unordered_set.h" 3 6011: unordered_multiset() = default; 6011: # 941 "/usr/include/c++/8/bits/unordered_set.h" 3 6011: explicit 6011: unordered_multiset(size_type __n, 6011: const hasher& __hf = hasher(), 6011: const key_equal& __eql = key_equal(), 6011: const allocator_type& __a = allocator_type()) 6011: : _M_h(__n, __hf, __eql, __a) 6011: { } 6011: # 962 "/usr/include/c++/8/bits/unordered_set.h" 3 6011: template 6011: unordered_multiset(_InputIterator __first, _InputIterator __last, 6011: size_type __n = 0, 6011: const hasher& __hf = hasher(), 6011: const key_equal& __eql = key_equal(), 6011: const allocator_type& __a = allocator_type()) 6011: : _M_h(__first, __last, __n, __hf, __eql, __a) 6011: { } 6011: 6011: 6011: unordered_multiset(const unordered_multiset&) = default; 6011: 6011: 6011: unordered_multiset(unordered_multiset&&) = default; 6011: # 988 "/usr/include/c++/8/bits/unordered_set.h" 3 6011: unordered_multiset(initializer_list __l, 6011: size_type __n = 0, 6011: const hasher& __hf = hasher(), 6011: const key_equal& __eql = key_equal(), 6011: const allocator_type& __a = allocator_type()) 6011: : _M_h(__l, __n, __hf, __eql, __a) 6011: { } 6011: 6011: 6011: unordered_multiset& 6011: operator=(const unordered_multiset&) = default; 6011: 6011: 6011: unordered_multiset& 6011: operator=(unordered_multiset&&) = default; 6011: 6011: 6011: 6011: 6011: 6011: explicit 6011: unordered_multiset(const allocator_type& __a) 6011: : _M_h(__a) 6011: { } 6011: 6011: 6011: 6011: 6011: 6011: 6011: unordered_multiset(const unordered_multiset& __umset, 6011: const allocator_type& __a) 6011: : _M_h(__umset._M_h, __a) 6011: { } 6011: 6011: 6011: 6011: 6011: 6011: 6011: unordered_multiset(unordered_multiset&& __umset, 6011: const allocator_type& __a) 6011: : _M_h(std::move(__umset._M_h), __a) 6011: { } 6011: 6011: unordered_multiset(size_type __n, const allocator_type& __a) 6011: : unordered_multiset(__n, hasher(), key_equal(), __a) 6011: { } 6011: 6011: unordered_multiset(size_type __n, const hasher& __hf, 6011: const allocator_type& __a) 6011: : unordered_multiset(__n, __hf, key_equal(), __a) 6011: { } 6011: 6011: template 6011: unordered_multiset(_InputIterator __first, _InputIterator __last, 6011: size_type __n, 6011: const allocator_type& __a) 6011: : unordered_multiset(__first, __last, __n, hasher(), key_equal(), __a) 6011: { } 6011: 6011: template 6011: unordered_multiset(_InputIterator __first, _InputIterator __last, 6011: size_type __n, const hasher& __hf, 6011: const allocator_type& __a) 6011: : unordered_multiset(__first, __last, __n, __hf, key_equal(), __a) 6011: { } 6011: 6011: unordered_multiset(initializer_list __l, 6011: size_type __n, 6011: const allocator_type& __a) 6011: : unordered_multiset(__l, __n, hasher(), key_equal(), __a) 6011: { } 6011: 6011: unordered_multiset(initializer_list __l, 6011: size_type __n, const hasher& __hf, 6011: const allocator_type& __a) 6011: : unordered_multiset(__l, __n, __hf, key_equal(), __a) 6011: { } 6011: # 1079 "/usr/include/c++/8/bits/unordered_set.h" 3 6011: unordered_multiset& 6011: operator=(initializer_list __l) 6011: { 6011: _M_h = __l; 6011: return *this; 6011: } 6011: 6011: 6011: allocator_type 6011: get_allocator() const noexcept 6011: { return _M_h.get_allocator(); } 6011: 6011: 6011: 6011: 6011: bool 6011: empty() const noexcept 6011: { return _M_h.empty(); } 6011: 6011: 6011: size_type 6011: size() const noexcept 6011: { return _M_h.size(); } 6011: 6011: 6011: size_type 6011: max_size() const noexcept 6011: { return _M_h.max_size(); } 6011: # 1115 "/usr/include/c++/8/bits/unordered_set.h" 3 6011: iterator 6011: begin() noexcept 6011: { return _M_h.begin(); } 6011: 6011: const_iterator 6011: begin() const noexcept 6011: { return _M_h.begin(); } 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: iterator 6011: end() noexcept 6011: { return _M_h.end(); } 6011: 6011: const_iterator 6011: end() const noexcept 6011: { return _M_h.end(); } 6011: 6011: 6011: 6011: 6011: 6011: 6011: const_iterator 6011: cbegin() const noexcept 6011: { return _M_h.begin(); } 6011: 6011: 6011: 6011: 6011: 6011: const_iterator 6011: cend() const noexcept 6011: { return _M_h.end(); } 6011: # 1163 "/usr/include/c++/8/bits/unordered_set.h" 3 6011: template 6011: iterator 6011: emplace(_Args&&... __args) 6011: { return _M_h.emplace(std::forward<_Args>(__args)...); } 6011: # 1185 "/usr/include/c++/8/bits/unordered_set.h" 3 6011: template 6011: iterator 6011: emplace_hint(const_iterator __pos, _Args&&... __args) 6011: { return _M_h.emplace_hint(__pos, std::forward<_Args>(__args)...); } 6011: # 1198 "/usr/include/c++/8/bits/unordered_set.h" 3 6011: iterator 6011: insert(const value_type& __x) 6011: { return _M_h.insert(__x); } 6011: 6011: iterator 6011: insert(value_type&& __x) 6011: { return _M_h.insert(std::move(__x)); } 6011: # 1224 "/usr/include/c++/8/bits/unordered_set.h" 3 6011: iterator 6011: insert(const_iterator __hint, const value_type& __x) 6011: { return _M_h.insert(__hint, __x); } 6011: 6011: iterator 6011: insert(const_iterator __hint, value_type&& __x) 6011: { return _M_h.insert(__hint, std::move(__x)); } 6011: # 1241 "/usr/include/c++/8/bits/unordered_set.h" 3 6011: template 6011: void 6011: insert(_InputIterator __first, _InputIterator __last) 6011: { _M_h.insert(__first, __last); } 6011: # 1253 "/usr/include/c++/8/bits/unordered_set.h" 3 6011: void 6011: insert(initializer_list __l) 6011: { _M_h.insert(__l); } 6011: # 1297 "/usr/include/c++/8/bits/unordered_set.h" 3 6011: iterator 6011: erase(const_iterator __position) 6011: { return _M_h.erase(__position); } 6011: 6011: 6011: iterator 6011: erase(iterator __position) 6011: { return _M_h.erase(__position); } 6011: # 1320 "/usr/include/c++/8/bits/unordered_set.h" 3 6011: size_type 6011: erase(const key_type& __x) 6011: { return _M_h.erase(__x); } 6011: # 1340 "/usr/include/c++/8/bits/unordered_set.h" 3 6011: iterator 6011: erase(const_iterator __first, const_iterator __last) 6011: { return _M_h.erase(__first, __last); } 6011: # 1351 "/usr/include/c++/8/bits/unordered_set.h" 3 6011: void 6011: clear() noexcept 6011: { _M_h.clear(); } 6011: # 1364 "/usr/include/c++/8/bits/unordered_set.h" 3 6011: void 6011: swap(unordered_multiset& __x) 6011: noexcept( noexcept(_M_h.swap(__x._M_h)) ) 6011: { _M_h.swap(__x._M_h); } 6011: # 1406 "/usr/include/c++/8/bits/unordered_set.h" 3 6011: hasher 6011: hash_function() const 6011: { return _M_h.hash_function(); } 6011: 6011: 6011: 6011: key_equal 6011: key_eq() const 6011: { return _M_h.key_eq(); } 6011: # 1430 "/usr/include/c++/8/bits/unordered_set.h" 3 6011: iterator 6011: find(const key_type& __x) 6011: { return _M_h.find(__x); } 6011: 6011: const_iterator 6011: find(const key_type& __x) const 6011: { return _M_h.find(__x); } 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: size_type 6011: count(const key_type& __x) const 6011: { return _M_h.count(__x); } 6011: # 1455 "/usr/include/c++/8/bits/unordered_set.h" 3 6011: std::pair 6011: equal_range(const key_type& __x) 6011: { return _M_h.equal_range(__x); } 6011: 6011: std::pair 6011: equal_range(const key_type& __x) const 6011: { return _M_h.equal_range(__x); } 6011: 6011: 6011: 6011: 6011: 6011: size_type 6011: bucket_count() const noexcept 6011: { return _M_h.bucket_count(); } 6011: 6011: 6011: size_type 6011: max_bucket_count() const noexcept 6011: { return _M_h.max_bucket_count(); } 6011: 6011: 6011: 6011: 6011: 6011: 6011: size_type 6011: bucket_size(size_type __n) const 6011: { return _M_h.bucket_size(__n); } 6011: 6011: 6011: 6011: 6011: 6011: 6011: size_type 6011: bucket(const key_type& __key) const 6011: { return _M_h.bucket(__key); } 6011: # 1501 "/usr/include/c++/8/bits/unordered_set.h" 3 6011: local_iterator 6011: begin(size_type __n) 6011: { return _M_h.begin(__n); } 6011: 6011: const_local_iterator 6011: begin(size_type __n) const 6011: { return _M_h.begin(__n); } 6011: 6011: const_local_iterator 6011: cbegin(size_type __n) const 6011: { return _M_h.cbegin(__n); } 6011: # 1521 "/usr/include/c++/8/bits/unordered_set.h" 3 6011: local_iterator 6011: end(size_type __n) 6011: { return _M_h.end(__n); } 6011: 6011: const_local_iterator 6011: end(size_type __n) const 6011: { return _M_h.end(__n); } 6011: 6011: const_local_iterator 6011: cend(size_type __n) const 6011: { return _M_h.cend(__n); } 6011: 6011: 6011: 6011: 6011: 6011: float 6011: load_factor() const noexcept 6011: { return _M_h.load_factor(); } 6011: 6011: 6011: 6011: float 6011: max_load_factor() const noexcept 6011: { return _M_h.max_load_factor(); } 6011: 6011: 6011: 6011: 6011: 6011: void 6011: max_load_factor(float __z) 6011: { _M_h.max_load_factor(__z); } 6011: # 1562 "/usr/include/c++/8/bits/unordered_set.h" 3 6011: void 6011: rehash(size_type __n) 6011: { _M_h.rehash(__n); } 6011: # 1573 "/usr/include/c++/8/bits/unordered_set.h" 3 6011: void 6011: reserve(size_type __n) 6011: { _M_h.reserve(__n); } 6011: 6011: template 6011: friend bool 6011: operator==(const unordered_multiset<_Value1, _Hash1, _Pred1, _Alloc1>&, 6011: const unordered_multiset<_Value1, _Hash1, _Pred1, _Alloc1>&); 6011: }; 6011: # 1653 "/usr/include/c++/8/bits/unordered_set.h" 3 6011: template 6011: inline void 6011: swap(unordered_set<_Value, _Hash, _Pred, _Alloc>& __x, 6011: unordered_set<_Value, _Hash, _Pred, _Alloc>& __y) 6011: noexcept(noexcept(__x.swap(__y))) 6011: { __x.swap(__y); } 6011: 6011: template 6011: inline void 6011: swap(unordered_multiset<_Value, _Hash, _Pred, _Alloc>& __x, 6011: unordered_multiset<_Value, _Hash, _Pred, _Alloc>& __y) 6011: noexcept(noexcept(__x.swap(__y))) 6011: { __x.swap(__y); } 6011: 6011: template 6011: inline bool 6011: operator==(const unordered_set<_Value, _Hash, _Pred, _Alloc>& __x, 6011: const unordered_set<_Value, _Hash, _Pred, _Alloc>& __y) 6011: { return __x._M_h._M_equal(__y._M_h); } 6011: 6011: template 6011: inline bool 6011: operator!=(const unordered_set<_Value, _Hash, _Pred, _Alloc>& __x, 6011: const unordered_set<_Value, _Hash, _Pred, _Alloc>& __y) 6011: { return !(__x == __y); } 6011: 6011: template 6011: inline bool 6011: operator==(const unordered_multiset<_Value, _Hash, _Pred, _Alloc>& __x, 6011: const unordered_multiset<_Value, _Hash, _Pred, _Alloc>& __y) 6011: { return __x._M_h._M_equal(__y._M_h); } 6011: 6011: template 6011: inline bool 6011: operator!=(const unordered_multiset<_Value, _Hash, _Pred, _Alloc>& __x, 6011: const unordered_multiset<_Value, _Hash, _Pred, _Alloc>& __y) 6011: { return !(__x == __y); } 6011: 6011: 6011: # 1742 "/usr/include/c++/8/bits/unordered_set.h" 3 6011: 6011: } 6011: # 48 "/usr/include/c++/8/unordered_set" 2 3 6011: # 9 "unordered_map.hh" 2 6011: 6011: 6011: # 10 "unordered_map.hh" 6011: namespace Kakoune 6011: { 6011: 6011: template::domain()> 6011: using UnorderedMap = std::unordered_map, std::equal_to, 6011: Allocator, domain>>; 6011: 6011: template::domain()> 6011: using UnorderedSet = std::unordered_set, std::equal_to, 6011: Allocator>; 6011: 6011: } 6011: # 8 "keymap_manager.hh" 2 6011: 6011: 6011: namespace Kakoune 6011: { 6011: 6011: enum class KeymapMode : char 6011: { 6011: None, 6011: Normal, 6011: Insert, 6011: Prompt, 6011: Menu, 6011: Goto, 6011: View, 6011: User, 6011: Object, 6011: }; 6011: 6011: class KeymapManager 6011: { 6011: public: 6011: KeymapManager(KeymapManager& parent) : m_parent(&parent) {} 6011: 6011: using KeyList = Vector; 6011: void map_key(Key key, KeymapMode mode, KeyList mapping); 6011: void unmap_key(Key key, KeymapMode mode); 6011: 6011: bool is_mapped(Key key, KeymapMode mode) const; 6011: ConstArrayView get_mapping(Key key, KeymapMode mode) const; 6011: private: 6011: KeymapManager() 6011: : m_parent(nullptr) {} 6011: 6011: friend class Scope; 6011: 6011: KeymapManager* m_parent; 6011: 6011: using KeyAndMode = std::pair; 6011: using Keymap = UnorderedMap; 6011: Keymap m_mapping; 6011: }; 6011: 6011: } 6011: # 7 "scope.hh" 2 6011: # 1 "option_manager.hh" 1 6011: 6011: 6011: 6011: 6011: # 1 "containers.hh" 1 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: namespace Kakoune 6011: { 6011: 6011: template 6011: struct ContainerView { Factory factory; }; 6011: 6011: template 6011: auto operator| (Container&& container, ContainerView view) -> 6011: decltype(view.factory(std::forward(container))) 6011: { 6011: return view.factory(std::forward(container)); 6011: } 6011: 6011: template 6011: struct ReverseView 6011: { 6011: using iterator = decltype(std::declval().rbegin()); 6011: 6011: iterator begin() { return m_container.rbegin(); } 6011: iterator end() { return m_container.rend(); } 6011: 6011: Container m_container; 6011: }; 6011: 6011: template 6011: using RemoveReference = typename std::remove_reference::type; 6011: 6011: struct ReverseFactory 6011: { 6011: template 6011: ReverseView> operator()(Container&& container) const 6011: { 6011: return {std::move(container)}; 6011: } 6011: 6011: template 6011: ReverseView operator()(Container& container) const 6011: { 6011: return {container}; 6011: } 6011: }; 6011: 6011: inline ContainerView reverse() { return {}; } 6011: 6011: template 6011: using IteratorOf = decltype(std::begin(std::declval())); 6011: 6011: template 6011: using ValueOf = typename Container::value_type; 6011: 6011: template 6011: struct FilterView 6011: { 6011: using ContainerIt = IteratorOf; 6011: 6011: struct Iterator : std::iterator 6011: { 6011: Iterator(const FilterView& view, ContainerIt it, ContainerIt end) 6011: : m_it{std::move(it)}, m_end{std::move(end)}, m_view{view} 6011: { 6011: do_filter(); 6011: } 6011: 6011: auto operator*() -> decltype(*std::declval()) { return *m_it; } 6011: Iterator& operator++() { ++m_it; do_filter(); return *this; } 6011: Iterator operator++(int) { auto copy = *this; ++(*this); return copy; } 6011: 6011: friend bool operator==(const Iterator& lhs, const Iterator& rhs) 6011: { 6011: return lhs.m_it == rhs.m_it; 6011: } 6011: 6011: friend bool operator!=(const Iterator& lhs, const Iterator& rhs) 6011: { 6011: return not (lhs == rhs); 6011: } 6011: 6011: const ContainerIt& base() const { return m_it; } 6011: 6011: private: 6011: void do_filter() 6011: { 6011: while (m_it != m_end and not m_view.m_filter(*m_it)) 6011: ++m_it; 6011: } 6011: 6011: ContainerIt m_it; 6011: ContainerIt m_end; 6011: const FilterView& m_view; 6011: }; 6011: 6011: Iterator begin() const { return {*this, std::begin(m_container), std::end(m_container)}; } 6011: Iterator end() const { return {*this, std::end(m_container), std::end(m_container)}; } 6011: 6011: Container m_container; 6011: mutable Filter m_filter; 6011: }; 6011: 6011: template 6011: struct FilterFactory 6011: { 6011: template 6011: FilterView operator()(Container& container) const { return {container, std::move(m_filter)}; } 6011: 6011: template 6011: FilterView, Filter> operator()(Container&& container) const { return {std::move(container), std::move(m_filter)}; } 6011: 6011: Filter m_filter; 6011: }; 6011: 6011: template 6011: inline ContainerView> filter(Filter f) { return {{std::move(f)}}; } 6011: 6011: template 6011: using TransformedResult = decltype(std::declval()(*std::declval())); 6011: 6011: template 6011: struct TransformView 6011: { 6011: using ContainerIt = IteratorOf; 6011: 6011: struct Iterator : std::iterator>::type> 6011: { 6011: Iterator(const TransformView& view, ContainerIt it) 6011: : m_it{std::move(it)}, m_view{view} {} 6011: 6011: auto operator*() -> TransformedResult { return m_view.m_transform(*m_it); } 6011: Iterator& operator++() { ++m_it; return *this; } 6011: Iterator operator++(int) { auto copy = *this; ++m_it; return copy; } 6011: 6011: friend bool operator==(const Iterator& lhs, const Iterator& rhs) 6011: { 6011: return lhs.m_it == rhs.m_it; 6011: } 6011: 6011: friend bool operator!=(const Iterator& lhs, const Iterator& rhs) 6011: { 6011: return not (lhs == rhs); 6011: } 6011: 6011: ContainerIt base() const { return m_it; } 6011: 6011: private: 6011: ContainerIt m_it; 6011: const TransformView& m_view; 6011: }; 6011: 6011: Iterator begin() const { return {*this, std::begin(m_container)}; } 6011: Iterator end() const { return {*this, std::end(m_container)}; } 6011: 6011: Container m_container; 6011: mutable Transform m_transform; 6011: }; 6011: 6011: template 6011: struct TransformFactory 6011: { 6011: template 6011: TransformView operator()(Container& container) const { return {container, std::move(m_transform)}; } 6011: 6011: template 6011: TransformView, Transform> operator()(Container&& container) const { return {std::move(container), std::move(m_transform)}; } 6011: 6011: Transform m_transform; 6011: }; 6011: 6011: template 6011: inline ContainerView> transform(Transform t) { return {{std::move(t)}}; } 6011: 6011: template, 6011: typename ValueTypeParam = void> 6011: struct SplitView 6011: { 6011: using ContainerIt = IteratorOf; 6011: using ValueType = typename std::conditional::value, 6011: std::pair, IteratorOf>, 6011: ValueTypeParam>::type; 6011: 6011: struct Iterator : std::iterator 6011: { 6011: Iterator(ContainerIt pos, ContainerIt end, char separator) 6011: : pos(pos), sep(pos), end(end), separator(separator) 6011: { 6011: while (sep != end and *sep != separator) 6011: ++sep; 6011: } 6011: 6011: Iterator& operator++() { advance(); return *this; } 6011: Iterator operator++(int) { auto copy = *this; advance(); return copy; } 6011: 6011: bool operator==(const Iterator& other) const { return pos == other.pos; } 6011: bool operator!=(const Iterator& other) const { return pos != other.pos; } 6011: 6011: ValueType operator*() { return {pos, sep}; } 6011: 6011: private: 6011: void advance() 6011: { 6011: if (sep == end) 6011: { 6011: pos = end; 6011: return; 6011: } 6011: 6011: pos = sep+1; 6011: for (sep = pos; sep != end; ++sep) 6011: { 6011: if (*sep == separator) 6011: break; 6011: } 6011: } 6011: 6011: ContainerIt pos; 6011: ContainerIt sep; 6011: ContainerIt end; 6011: Separator separator; 6011: }; 6011: 6011: Iterator begin() const { return {std::begin(m_container), std::end(m_container), m_separator}; } 6011: Iterator end() const { return {std::end(m_container), std::end(m_container), m_separator}; } 6011: 6011: Container m_container; 6011: Separator m_separator; 6011: }; 6011: 6011: template 6011: struct SplitViewFactory 6011: { 6011: template 6011: SplitView, Separator, ValueType> 6011: operator()(Container&& container) const { return {std::move(container), std::move(separator)}; } 6011: 6011: template 6011: SplitView 6011: operator()(Container& container) const { return {container, std::move(separator)}; } 6011: 6011: Separator separator; 6011: }; 6011: 6011: template 6011: ContainerView> split(Separator separator) { return {{std::move(separator)}}; } 6011: 6011: template 6011: struct ConcatView 6011: { 6011: using ContainerIt1 = decltype(begin(std::declval())); 6011: using ContainerIt2 = decltype(begin(std::declval())); 6011: using ValueType = typename std::common_type::type; 6011: 6011: struct Iterator : std::iterator 6011: { 6011: static_assert(std::is_convertible::value, ""); 6011: static_assert(std::is_convertible::value, ""); 6011: 6011: Iterator(ContainerIt1 it1, ContainerIt1 end1, ContainerIt2 it2) 6011: : m_it1(std::move(it1)), m_end1(std::move(end1)), 6011: m_it2(std::move(it2)) {} 6011: 6011: ValueType operator*() { return is2() ? *m_it2 : *m_it1; } 6011: Iterator& operator++() { if (is2()) ++m_it2; else ++m_it1; return *this; } 6011: Iterator operator++(int) { auto copy = *this; ++*this; return copy; } 6011: 6011: friend bool operator==(const Iterator& lhs, const Iterator& rhs) 6011: { 6011: return lhs.m_it1 == rhs.m_it1 and lhs.m_end1 == rhs.m_end1 and 6011: lhs.m_it2 == rhs.m_it2; 6011: } 6011: 6011: friend bool operator!=(const Iterator& lhs, const Iterator& rhs) 6011: { 6011: return not (lhs == rhs); 6011: } 6011: 6011: private: 6011: bool is2() const { return m_it1 == m_end1; } 6011: 6011: ContainerIt1 m_it1; 6011: ContainerIt1 m_end1; 6011: ContainerIt2 m_it2; 6011: }; 6011: 6011: ConcatView(Container1& container1, Container2& container2) 6011: : m_container1(container1), m_container2(container2) {} 6011: 6011: Iterator begin() const { return {m_container1.begin(), m_container1.end(), m_container2.begin()}; } 6011: Iterator end() const { return {m_container1.end(), m_container1.end(), m_container2.end()}; } 6011: 6011: private: 6011: Container1& m_container1; 6011: Container2& m_container2; 6011: }; 6011: 6011: template 6011: ConcatView concatenated(Container1&& container1, Container2&& container2) 6011: { 6011: return {container1, container2}; 6011: } 6011: 6011: 6011: 6011: using std::begin; 6011: using std::end; 6011: 6011: template 6011: auto find(Container&& container, const T& value) -> decltype(begin(container)) 6011: { 6011: return std::find(begin(container), end(container), value); 6011: } 6011: 6011: template 6011: auto find_if(Container&& container, T op) -> decltype(begin(container)) 6011: { 6011: return std::find_if(begin(container), end(container), op); 6011: } 6011: 6011: template 6011: bool contains(Container&& container, const T& value) 6011: { 6011: return find(container, value) != end(container); 6011: } 6011: 6011: template 6011: bool contains_that(Container&& container, T op) 6011: { 6011: return find_if(container, op) != end(container); 6011: } 6011: 6011: template 6011: void unordered_erase(Container&& vec, U&& value) 6011: { 6011: auto it = find(vec, std::forward(value)); 6011: if (it != vec.end()) 6011: { 6011: using std::swap; 6011: swap(vec.back(), *it); 6011: vec.pop_back(); 6011: } 6011: } 6011: 6011: } 6011: # 6 "option_manager.hh" 2 6011: # 1 "exception.hh" 1 6011: 6011: 6011: 6011: 6011: 6011: namespace Kakoune 6011: { 6011: 6011: struct exception 6011: { 6011: virtual ~exception() {} 6011: virtual StringView what() const; 6011: }; 6011: 6011: struct runtime_error : exception 6011: { 6011: runtime_error(String what) 6011: : m_what(std::move(what)) {} 6011: 6011: StringView what() const override { return m_what; } 6011: 6011: private: 6011: String m_what; 6011: }; 6011: 6011: struct logic_error : exception 6011: { 6011: }; 6011: 6011: } 6011: # 7 "option_manager.hh" 2 6011: 6011: # 1 "option_types.hh" 1 6011: # 11 "option_types.hh" 6011: # 1 "enum.hh" 1 6011: # 9 "enum.hh" 6011: namespace Kakoune 6011: { 6011: 6011: template 6011: struct Array 6011: { 6011: constexpr size_t size() const { return N; } 6011: constexpr const T& operator[](int i) const { return m_data[i]; } 6011: constexpr const T* begin() const { return m_data; } 6011: constexpr const T* end() const { return m_data+N; } 6011: 6011: T m_data[N]; 6011: }; 6011: 6011: template struct EnumDesc { T value; StringView name; }; 6011: 6011: template 6011: EnableIfWithBitOps option_to_string(Flags flags) 6011: { 6011: constexpr auto desc = enum_desc(Flags{}); 6011: String res; 6011: for (int i = 0; i < desc.size(); ++i) 6011: { 6011: if (not (flags & desc[i].value)) 6011: continue; 6011: if (not res.empty()) 6011: res += "|"; 6011: res += desc[i].name; 6011: } 6011: return res; 6011: } 6011: 6011: template 6011: EnableIfWithoutBitOps option_to_string(Enum e) 6011: { 6011: constexpr auto desc = enum_desc(Enum{}); 6011: auto it = find_if(desc, [e](const EnumDesc& d) { return d.value == e; }); 6011: if (it != desc.end()) 6011: return it->name.str(); 6011: if (not (false)) on_assert_failed("assert failed \"" "false" "\" at " "enum.hh" ":" "48"); 6011: return {}; 6011: } 6011: 6011: template 6011: EnableIfWithBitOps option_from_string(StringView str, Flags& flags) 6011: { 6011: constexpr auto desc = enum_desc(Flags{}); 6011: flags = Flags{}; 6011: for (auto s : str | split('|')) 6011: { 6011: auto it = find_if(desc, [s](const EnumDesc& d) { return d.name == s; }); 6011: if (it == desc.end()) 6011: throw runtime_error(format("invalid flag value '{}'", s)); 6011: flags |= it->value; 6011: } 6011: } 6011: 6011: template 6011: EnableIfWithoutBitOps option_from_string(StringView str, Enum& e) 6011: { 6011: constexpr auto desc = enum_desc(Enum{}); 6011: auto it = find_if(desc, [str](const EnumDesc& d) { return d.name == str; }); 6011: if (it == desc.end()) 6011: throw runtime_error(format("invalid enum value '{}'", str)); 6011: e = it->value; 6011: } 6011: 6011: } 6011: # 12 "option_types.hh" 2 6011: 6011: 6011: 6011: 6011: namespace Kakoune 6011: { 6011: 6011: template struct option_type_name; 6011: template using void_t = void; 6011: 6011: template 6011: struct option_type_name> 6011: { 6011: static decltype(T::option_type_name) name() { return T::option_type_name; } 6011: }; 6011: 6011: template 6011: struct option_type_name::value>::type> 6011: { 6011: static String name() 6011: { 6011: constexpr StringView type = WithBitOps::value ? "flags" : "enum"; 6011: auto name = enum_desc(Enum{}); 6011: return type + "(" + join(name | transform(std::mem_fn(&EnumDesc::name)), '|') + ")"; 6011: } 6011: }; 6011: 6011: inline String option_to_string(int opt) { return to_string(opt); } 6011: inline void option_from_string(StringView str, int& opt) { opt = str_to_int(str); } 6011: inline bool option_add(int& opt, StringView str) 6011: { 6011: auto val = str_to_int(str); 6011: opt += val; 6011: return val != 0; 6011: } 6011: template<> struct option_type_name { static StringView name() { return "int"; } }; 6011: 6011: inline String option_to_string(size_t opt) { return to_string(opt); } 6011: inline void option_from_string(StringView str, size_t& opt) { opt = str_to_int(str); } 6011: 6011: inline String option_to_string(bool opt) { return opt ? "true" : "false"; } 6011: inline void option_from_string(StringView str, bool& opt) 6011: { 6011: if (str == "true" or str == "yes") 6011: opt = true; 6011: else if (str == "false" or str == "no") 6011: opt = false; 6011: else 6011: throw runtime_error("boolean values are either true, yes, false or no"); 6011: } 6011: template<> struct option_type_name { static StringView name() { return "bool"; } }; 6011: 6011: constexpr char list_separator = ':'; 6011: 6011: template 6011: String option_to_string(const Vector& opt) 6011: { 6011: String res; 6011: for (size_t i = 0; i < opt.size(); ++i) 6011: { 6011: res += escape(option_to_string(opt[i]), list_separator, '\\'); 6011: if (i != opt.size() - 1) 6011: res += list_separator; 6011: } 6011: return res; 6011: } 6011: 6011: template 6011: void option_from_string(StringView str, Vector& opt) 6011: { 6011: opt.clear(); 6011: Vector elems = split(str, list_separator, '\\'); 6011: for (auto& elem: elems) 6011: { 6011: T opt_elem; 6011: option_from_string(elem, opt_elem); 6011: opt.push_back(opt_elem); 6011: } 6011: } 6011: 6011: template 6011: bool option_add(Vector& opt, StringView str) 6011: { 6011: Vector vec; 6011: option_from_string(str, vec); 6011: std::copy(std::make_move_iterator(vec.begin()), 6011: std::make_move_iterator(vec.end()), 6011: back_inserter(opt)); 6011: return not vec.empty(); 6011: } 6011: 6011: template 6011: struct option_type_name> 6011: { 6011: static String name() { return option_type_name::name() + StringView{"-list"}; } 6011: }; 6011: 6011: template 6011: String option_to_string(const IdMap& opt) 6011: { 6011: String res; 6011: for (auto it = begin(opt); it != end(opt); ++it) 6011: { 6011: if (it != begin(opt)) 6011: res += list_separator; 6011: String elem = escape(option_to_string(it->key), '=', '\\') + "=" + 6011: escape(option_to_string(it->value), '=', '\\'); 6011: res += escape(elem, list_separator, '\\'); 6011: } 6011: return res; 6011: } 6011: 6011: template 6011: void option_from_string(StringView str, IdMap& opt) 6011: { 6011: opt.clear(); 6011: for (auto& elem : split(str, list_separator, '\\')) 6011: { 6011: Vector pair_str = split(elem, '=', '\\'); 6011: if (pair_str.size() != 2) 6011: throw runtime_error("map option expects key=value"); 6011: String key; 6011: Value value; 6011: option_from_string(pair_str[0], key); 6011: option_from_string(pair_str[1], value); 6011: opt.append({ std::move(key), std::move(value) }); 6011: } 6011: } 6011: 6011: template 6011: struct option_type_name> 6011: { 6011: static String name() { return format("str-to-{}-map", option_type_name::name()); } 6011: }; 6011: 6011: constexpr char tuple_separator = '|'; 6011: 6011: template 6011: struct TupleOptionDetail 6011: { 6011: static String to_string(const std::tuple& opt) 6011: { 6011: return TupleOptionDetail::to_string(opt) + 6011: tuple_separator + escape(option_to_string(std::get(opt)), tuple_separator, '\\'); 6011: } 6011: 6011: static void from_string(ConstArrayView elems, std::tuple& opt) 6011: { 6011: option_from_string(elems[I], std::get(opt)); 6011: TupleOptionDetail::from_string(elems, opt); 6011: } 6011: }; 6011: 6011: template 6011: struct TupleOptionDetail<0, Types...> 6011: { 6011: static String to_string(const std::tuple& opt) 6011: { 6011: return option_to_string(std::get<0>(opt)); 6011: } 6011: 6011: static void from_string(ConstArrayView elems, std::tuple& opt) 6011: { 6011: option_from_string(elems[0], std::get<0>(opt)); 6011: } 6011: }; 6011: 6011: template 6011: String option_to_string(const std::tuple& opt) 6011: { 6011: return TupleOptionDetail::to_string(opt); 6011: } 6011: 6011: template 6011: void option_from_string(StringView str, std::tuple& opt) 6011: { 6011: auto elems = split(str, tuple_separator, '\\'); 6011: if (elems.size() != sizeof...(Types)) 6011: throw runtime_error(elems.size() < sizeof...(Types) ? 6011: "not enough elements in tuple" 6011: : "to many elements in tuple"); 6011: TupleOptionDetail::from_string(elems, opt); 6011: } 6011: 6011: template 6011: inline String option_to_string(const StronglyTypedNumber& opt) 6011: { 6011: return to_string(opt); 6011: } 6011: 6011: template 6011: inline void option_from_string(StringView str, StronglyTypedNumber& opt) 6011: { 6011: opt = StronglyTypedNumber{str_to_int(str)}; 6011: } 6011: 6011: template 6011: inline bool option_add(StronglyTypedNumber& opt, 6011: StringView str) 6011: { 6011: int val = str_to_int(str); 6011: opt += val; 6011: return val != 0; 6011: } 6011: 6011: template 6011: bool option_add(T&, StringView str) 6011: { 6011: throw runtime_error("no add operation supported for this option type"); 6011: } 6011: 6011: template 6011: inline void option_from_string(StringView str, LineAndColumn& opt) 6011: { 6011: auto vals = split(str, ','); 6011: if (vals.size() != 2) 6011: throw runtime_error("expected ,"); 6011: opt.line = str_to_int(vals[0]); 6011: opt.column = str_to_int(vals[1]); 6011: } 6011: 6011: template 6011: inline String option_to_string(const LineAndColumn& opt) 6011: { 6011: return format("{},{}", opt.line, opt.column); 6011: } 6011: 6011: enum class DebugFlags 6011: { 6011: None = 0, 6011: Hooks = 1 << 0, 6011: Shell = 1 << 1, 6011: Profile = 1 << 2, 6011: Keys = 1 << 3, 6011: }; 6011: 6011: template<> 6011: struct WithBitOps : std::true_type {}; 6011: 6011: constexpr Array, 4> enum_desc(DebugFlags) 6011: { 6011: return { { 6011: { DebugFlags::Hooks, "hooks" }, 6011: { DebugFlags::Shell, "shell" }, 6011: { DebugFlags::Profile, "profile" }, 6011: { DebugFlags::Keys, "keys" } 6011: } }; 6011: } 6011: 6011: template 6011: struct PrefixedList 6011: { 6011: P prefix; 6011: Vector list; 6011: }; 6011: 6011: template 6011: inline bool operator==(const PrefixedList& lhs, const PrefixedList& rhs) 6011: { 6011: return lhs.prefix == rhs.prefix and lhs.list == rhs.list; 6011: } 6011: 6011: template 6011: inline bool operator!=(const PrefixedList& lhs, const PrefixedList& rhs) 6011: { 6011: return not (lhs == rhs); 6011: } 6011: 6011: template 6011: inline String option_to_string(const PrefixedList& opt) 6011: { 6011: return format("{}:{}", opt.prefix, option_to_string(opt.list)); 6011: } 6011: 6011: template 6011: inline void option_from_string(StringView str, PrefixedList& opt) 6011: { 6011: auto it = find(str, ':'); 6011: option_from_string(StringView{str.begin(), it}, opt.prefix); 6011: if (it != str.end()) 6011: option_from_string({it+1, str.end()}, opt.list); 6011: } 6011: 6011: template 6011: inline bool option_add(PrefixedList& opt, StringView str) 6011: { 6011: return option_add(opt.list, str); 6011: } 6011: 6011: template 6011: using TimestampedList = PrefixedList; 6011: 6011: } 6011: # 9 "option_manager.hh" 2 6011: 6011: 6011: # 1 "/usr/include/c++/8/memory" 1 3 6011: # 46 "/usr/include/c++/8/memory" 3 6011: 6011: # 47 "/usr/include/c++/8/memory" 3 6011: # 67 "/usr/include/c++/8/memory" 3 6011: # 1 "/usr/include/c++/8/bits/stl_raw_storage_iter.h" 1 3 6011: # 59 "/usr/include/c++/8/bits/stl_raw_storage_iter.h" 3 6011: 6011: # 59 "/usr/include/c++/8/bits/stl_raw_storage_iter.h" 3 6011: namespace std __attribute__ ((__visibility__ ("default"))) 6011: { 6011: 6011: 6011: 6011: 6011: 6011: 6011: template 6011: class raw_storage_iterator 6011: : public iterator 6011: { 6011: protected: 6011: _OutputIterator _M_iter; 6011: 6011: public: 6011: explicit 6011: raw_storage_iterator(_OutputIterator __x) 6011: : _M_iter(__x) {} 6011: 6011: raw_storage_iterator& 6011: operator*() { return *this; } 6011: 6011: raw_storage_iterator& 6011: operator=(const _Tp& __element) 6011: { 6011: std::_Construct(std::__addressof(*_M_iter), __element); 6011: return *this; 6011: } 6011: 6011: 6011: 6011: 6011: raw_storage_iterator& 6011: operator=(_Tp&& __element) 6011: { 6011: std::_Construct(std::__addressof(*_M_iter), std::move(__element)); 6011: return *this; 6011: } 6011: 6011: 6011: raw_storage_iterator& 6011: operator++() 6011: { 6011: ++_M_iter; 6011: return *this; 6011: } 6011: 6011: raw_storage_iterator 6011: operator++(int) 6011: { 6011: raw_storage_iterator __tmp = *this; 6011: ++_M_iter; 6011: return __tmp; 6011: } 6011: 6011: 6011: 6011: _OutputIterator base() const { return _M_iter; } 6011: }; 6011: 6011: 6011: } 6011: # 68 "/usr/include/c++/8/memory" 2 3 6011: 6011: 6011: 6011: 6011: 6011: 6011: # 1 "/usr/include/c++/8/ext/concurrence.h" 1 3 6011: # 32 "/usr/include/c++/8/ext/concurrence.h" 3 6011: 6011: # 33 "/usr/include/c++/8/ext/concurrence.h" 3 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) 6011: { 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: enum _Lock_policy { _S_single, _S_mutex, _S_atomic }; 6011: 6011: 6011: 6011: static const _Lock_policy __default_lock_policy = 6011: 6011: 6011: 6011: _S_atomic; 6011: # 67 "/usr/include/c++/8/ext/concurrence.h" 3 6011: class __concurrence_lock_error : public std::exception 6011: { 6011: public: 6011: virtual char const* 6011: what() const throw() 6011: { return "__gnu_cxx::__concurrence_lock_error"; } 6011: }; 6011: 6011: class __concurrence_unlock_error : public std::exception 6011: { 6011: public: 6011: virtual char const* 6011: what() const throw() 6011: { return "__gnu_cxx::__concurrence_unlock_error"; } 6011: }; 6011: 6011: class __concurrence_broadcast_error : public std::exception 6011: { 6011: public: 6011: virtual char const* 6011: what() const throw() 6011: { return "__gnu_cxx::__concurrence_broadcast_error"; } 6011: }; 6011: 6011: class __concurrence_wait_error : public std::exception 6011: { 6011: public: 6011: virtual char const* 6011: what() const throw() 6011: { return "__gnu_cxx::__concurrence_wait_error"; } 6011: }; 6011: 6011: 6011: inline void 6011: __throw_concurrence_lock_error() 6011: { (throw (__concurrence_lock_error())); } 6011: 6011: inline void 6011: __throw_concurrence_unlock_error() 6011: { (throw (__concurrence_unlock_error())); } 6011: 6011: 6011: inline void 6011: __throw_concurrence_broadcast_error() 6011: { (throw (__concurrence_broadcast_error())); } 6011: 6011: inline void 6011: __throw_concurrence_wait_error() 6011: { (throw (__concurrence_wait_error())); } 6011: 6011: 6011: class __mutex 6011: { 6011: private: 6011: 6011: __gthread_mutex_t _M_mutex = { { 0, 0, 0, 0, 0, { 0 } } }; 6011: 6011: 6011: 6011: 6011: __mutex(const __mutex&); 6011: __mutex& operator=(const __mutex&); 6011: 6011: public: 6011: __mutex() 6011: { 6011: 6011: 6011: 6011: 6011: } 6011: # 147 "/usr/include/c++/8/ext/concurrence.h" 3 6011: void lock() 6011: { 6011: 6011: if (__gthread_active_p()) 6011: { 6011: if (__gthread_mutex_lock(&_M_mutex) != 0) 6011: __throw_concurrence_lock_error(); 6011: } 6011: 6011: } 6011: 6011: void unlock() 6011: { 6011: 6011: if (__gthread_active_p()) 6011: { 6011: if (__gthread_mutex_unlock(&_M_mutex) != 0) 6011: __throw_concurrence_unlock_error(); 6011: } 6011: 6011: } 6011: 6011: __gthread_mutex_t* gthread_mutex(void) 6011: { return &_M_mutex; } 6011: }; 6011: 6011: class __recursive_mutex 6011: { 6011: private: 6011: 6011: __gthread_recursive_mutex_t _M_mutex = { { 0, 0, 0, PTHREAD_MUTEX_RECURSIVE_NP, 0, { 0 } } }; 6011: 6011: 6011: 6011: 6011: __recursive_mutex(const __recursive_mutex&); 6011: __recursive_mutex& operator=(const __recursive_mutex&); 6011: 6011: public: 6011: __recursive_mutex() 6011: { 6011: 6011: 6011: 6011: 6011: } 6011: # 202 "/usr/include/c++/8/ext/concurrence.h" 3 6011: void lock() 6011: { 6011: 6011: if (__gthread_active_p()) 6011: { 6011: if (__gthread_recursive_mutex_lock(&_M_mutex) != 0) 6011: __throw_concurrence_lock_error(); 6011: } 6011: 6011: } 6011: 6011: void unlock() 6011: { 6011: 6011: if (__gthread_active_p()) 6011: { 6011: if (__gthread_recursive_mutex_unlock(&_M_mutex) != 0) 6011: __throw_concurrence_unlock_error(); 6011: } 6011: 6011: } 6011: 6011: __gthread_recursive_mutex_t* gthread_recursive_mutex(void) 6011: { return &_M_mutex; } 6011: }; 6011: 6011: 6011: 6011: 6011: class __scoped_lock 6011: { 6011: public: 6011: typedef __mutex __mutex_type; 6011: 6011: private: 6011: __mutex_type& _M_device; 6011: 6011: __scoped_lock(const __scoped_lock&); 6011: __scoped_lock& operator=(const __scoped_lock&); 6011: 6011: public: 6011: explicit __scoped_lock(__mutex_type& __name) : _M_device(__name) 6011: { _M_device.lock(); } 6011: 6011: ~__scoped_lock() throw() 6011: { _M_device.unlock(); } 6011: }; 6011: 6011: 6011: class __cond 6011: { 6011: private: 6011: 6011: __gthread_cond_t _M_cond = { { {0}, {0}, {0, 0}, {0, 0}, 0, 0, {0, 0} } }; 6011: 6011: 6011: 6011: 6011: __cond(const __cond&); 6011: __cond& operator=(const __cond&); 6011: 6011: public: 6011: __cond() 6011: { 6011: 6011: 6011: 6011: 6011: } 6011: # 280 "/usr/include/c++/8/ext/concurrence.h" 3 6011: void broadcast() 6011: { 6011: 6011: if (__gthread_active_p()) 6011: { 6011: if (__gthread_cond_broadcast(&_M_cond) != 0) 6011: __throw_concurrence_broadcast_error(); 6011: } 6011: 6011: } 6011: 6011: void wait(__mutex *mutex) 6011: { 6011: 6011: { 6011: if (__gthread_cond_wait(&_M_cond, mutex->gthread_mutex()) != 0) 6011: __throw_concurrence_wait_error(); 6011: } 6011: 6011: } 6011: 6011: void wait_recursive(__recursive_mutex *mutex) 6011: { 6011: 6011: { 6011: if (__gthread_cond_wait_recursive(&_M_cond, 6011: mutex->gthread_recursive_mutex()) 6011: != 0) 6011: __throw_concurrence_wait_error(); 6011: } 6011: 6011: } 6011: }; 6011: 6011: 6011: 6011: } 6011: # 75 "/usr/include/c++/8/memory" 2 3 6011: 6011: 6011: 6011: 6011: 6011: # 1 "/usr/include/c++/8/bits/unique_ptr.h" 1 3 6011: # 81 "/usr/include/c++/8/memory" 2 3 6011: # 1 "/usr/include/c++/8/bits/shared_ptr.h" 1 3 6011: # 52 "/usr/include/c++/8/bits/shared_ptr.h" 3 6011: # 1 "/usr/include/c++/8/bits/shared_ptr_base.h" 1 3 6011: # 55 "/usr/include/c++/8/bits/shared_ptr_base.h" 3 6011: # 1 "/usr/include/c++/8/bits/allocated_ptr.h" 1 3 6011: # 40 "/usr/include/c++/8/bits/allocated_ptr.h" 3 6011: namespace std __attribute__ ((__visibility__ ("default"))) 6011: { 6011: 6011: 6011: 6011: template 6011: struct __allocated_ptr 6011: { 6011: using pointer = typename allocator_traits<_Alloc>::pointer; 6011: using value_type = typename allocator_traits<_Alloc>::value_type; 6011: 6011: 6011: __allocated_ptr(_Alloc& __a, pointer __ptr) noexcept 6011: : _M_alloc(std::__addressof(__a)), _M_ptr(__ptr) 6011: { } 6011: 6011: 6011: template>> 6011: __allocated_ptr(_Alloc& __a, _Ptr __ptr) 6011: : _M_alloc(std::__addressof(__a)), 6011: _M_ptr(pointer_traits::pointer_to(*__ptr)) 6011: { } 6011: 6011: 6011: __allocated_ptr(__allocated_ptr&& __gd) noexcept 6011: : _M_alloc(__gd._M_alloc), _M_ptr(__gd._M_ptr) 6011: { __gd._M_ptr = nullptr; } 6011: 6011: 6011: ~__allocated_ptr() 6011: { 6011: if (_M_ptr != nullptr) 6011: std::allocator_traits<_Alloc>::deallocate(*_M_alloc, _M_ptr, 1); 6011: } 6011: 6011: 6011: __allocated_ptr& 6011: operator=(std::nullptr_t) noexcept 6011: { 6011: _M_ptr = nullptr; 6011: return *this; 6011: } 6011: 6011: 6011: value_type* get() { return std::__to_address(_M_ptr); } 6011: 6011: private: 6011: _Alloc* _M_alloc; 6011: pointer _M_ptr; 6011: }; 6011: 6011: 6011: template 6011: __allocated_ptr<_Alloc> 6011: __allocate_guarded(_Alloc& __a) 6011: { 6011: return { __a, std::allocator_traits<_Alloc>::allocate(__a, 1) }; 6011: } 6011: 6011: 6011: } 6011: # 56 "/usr/include/c++/8/bits/shared_ptr_base.h" 2 3 6011: 6011: 6011: 6011: 6011: namespace std __attribute__ ((__visibility__ ("default"))) 6011: { 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: #pragma GCC diagnostic push 6011: #pragma GCC diagnostic ignored "-Wdeprecated-declarations" 6011: template class auto_ptr; 6011: #pragma GCC diagnostic pop 6011: 6011: 6011: 6011: 6011: 6011: 6011: class bad_weak_ptr : public std::exception 6011: { 6011: public: 6011: virtual char const* what() const noexcept; 6011: 6011: virtual ~bad_weak_ptr() noexcept; 6011: }; 6011: 6011: 6011: inline void 6011: __throw_bad_weak_ptr() 6011: { (throw (bad_weak_ptr())); } 6011: 6011: using __gnu_cxx::_Lock_policy; 6011: using __gnu_cxx::__default_lock_policy; 6011: using __gnu_cxx::_S_single; 6011: using __gnu_cxx::_S_mutex; 6011: using __gnu_cxx::_S_atomic; 6011: 6011: 6011: template<_Lock_policy _Lp> 6011: class _Mutex_base 6011: { 6011: protected: 6011: 6011: enum { _S_need_barriers = 0 }; 6011: }; 6011: 6011: template<> 6011: class _Mutex_base<_S_mutex> 6011: : public __gnu_cxx::__mutex 6011: { 6011: protected: 6011: 6011: 6011: 6011: enum { _S_need_barriers = 1 }; 6011: }; 6011: 6011: template<_Lock_policy _Lp = __default_lock_policy> 6011: class _Sp_counted_base 6011: : public _Mutex_base<_Lp> 6011: { 6011: public: 6011: _Sp_counted_base() noexcept 6011: : _M_use_count(1), _M_weak_count(1) { } 6011: 6011: virtual 6011: ~_Sp_counted_base() noexcept 6011: { } 6011: 6011: 6011: 6011: virtual void 6011: _M_dispose() noexcept = 0; 6011: 6011: 6011: virtual void 6011: _M_destroy() noexcept 6011: { delete this; } 6011: 6011: virtual void* 6011: _M_get_deleter(const std::type_info&) noexcept = 0; 6011: 6011: void 6011: _M_add_ref_copy() 6011: { __gnu_cxx::__atomic_add_dispatch(&_M_use_count, 1); } 6011: 6011: void 6011: _M_add_ref_lock(); 6011: 6011: bool 6011: _M_add_ref_lock_nothrow(); 6011: 6011: void 6011: _M_release() noexcept 6011: { 6011: 6011: ; 6011: if (__gnu_cxx::__exchange_and_add_dispatch(&_M_use_count, -1) == 1) 6011: { 6011: ; 6011: _M_dispose(); 6011: 6011: 6011: 6011: 6011: if (_Mutex_base<_Lp>::_S_need_barriers) 6011: { 6011: __atomic_thread_fence (4); 6011: } 6011: 6011: 6011: ; 6011: if (__gnu_cxx::__exchange_and_add_dispatch(&_M_weak_count, 6011: -1) == 1) 6011: { 6011: ; 6011: _M_destroy(); 6011: } 6011: } 6011: } 6011: 6011: void 6011: _M_weak_add_ref() noexcept 6011: { __gnu_cxx::__atomic_add_dispatch(&_M_weak_count, 1); } 6011: 6011: void 6011: _M_weak_release() noexcept 6011: { 6011: 6011: ; 6011: if (__gnu_cxx::__exchange_and_add_dispatch(&_M_weak_count, -1) == 1) 6011: { 6011: ; 6011: if (_Mutex_base<_Lp>::_S_need_barriers) 6011: { 6011: 6011: 6011: __atomic_thread_fence (4); 6011: } 6011: _M_destroy(); 6011: } 6011: } 6011: 6011: long 6011: _M_get_use_count() const noexcept 6011: { 6011: 6011: 6011: return __atomic_load_n(&_M_use_count, 0); 6011: } 6011: 6011: private: 6011: _Sp_counted_base(_Sp_counted_base const&) = delete; 6011: _Sp_counted_base& operator=(_Sp_counted_base const&) = delete; 6011: 6011: _Atomic_word _M_use_count; 6011: _Atomic_word _M_weak_count; 6011: }; 6011: 6011: template<> 6011: inline void 6011: _Sp_counted_base<_S_single>:: 6011: _M_add_ref_lock() 6011: { 6011: if (_M_use_count == 0) 6011: __throw_bad_weak_ptr(); 6011: ++_M_use_count; 6011: } 6011: 6011: template<> 6011: inline void 6011: _Sp_counted_base<_S_mutex>:: 6011: _M_add_ref_lock() 6011: { 6011: __gnu_cxx::__scoped_lock sentry(*this); 6011: if (__gnu_cxx::__exchange_and_add_dispatch(&_M_use_count, 1) == 0) 6011: { 6011: _M_use_count = 0; 6011: __throw_bad_weak_ptr(); 6011: } 6011: } 6011: 6011: template<> 6011: inline void 6011: _Sp_counted_base<_S_atomic>:: 6011: _M_add_ref_lock() 6011: { 6011: 6011: _Atomic_word __count = _M_get_use_count(); 6011: do 6011: { 6011: if (__count == 0) 6011: __throw_bad_weak_ptr(); 6011: 6011: 6011: } 6011: while (!__atomic_compare_exchange_n(&_M_use_count, &__count, __count + 1, 6011: true, 4, 6011: 0)); 6011: } 6011: 6011: template<> 6011: inline bool 6011: _Sp_counted_base<_S_single>:: 6011: _M_add_ref_lock_nothrow() 6011: { 6011: if (_M_use_count == 0) 6011: return false; 6011: ++_M_use_count; 6011: return true; 6011: } 6011: 6011: template<> 6011: inline bool 6011: _Sp_counted_base<_S_mutex>:: 6011: _M_add_ref_lock_nothrow() 6011: { 6011: __gnu_cxx::__scoped_lock sentry(*this); 6011: if (__gnu_cxx::__exchange_and_add_dispatch(&_M_use_count, 1) == 0) 6011: { 6011: _M_use_count = 0; 6011: return false; 6011: } 6011: return true; 6011: } 6011: 6011: template<> 6011: inline bool 6011: _Sp_counted_base<_S_atomic>:: 6011: _M_add_ref_lock_nothrow() 6011: { 6011: 6011: _Atomic_word __count = _M_get_use_count(); 6011: do 6011: { 6011: if (__count == 0) 6011: return false; 6011: 6011: 6011: } 6011: while (!__atomic_compare_exchange_n(&_M_use_count, &__count, __count + 1, 6011: true, 4, 6011: 0)); 6011: return true; 6011: } 6011: 6011: template<> 6011: inline void 6011: _Sp_counted_base<_S_single>::_M_add_ref_copy() 6011: { ++_M_use_count; } 6011: 6011: template<> 6011: inline void 6011: _Sp_counted_base<_S_single>::_M_release() noexcept 6011: { 6011: if (--_M_use_count == 0) 6011: { 6011: _M_dispose(); 6011: if (--_M_weak_count == 0) 6011: _M_destroy(); 6011: } 6011: } 6011: 6011: template<> 6011: inline void 6011: _Sp_counted_base<_S_single>::_M_weak_add_ref() noexcept 6011: { ++_M_weak_count; } 6011: 6011: template<> 6011: inline void 6011: _Sp_counted_base<_S_single>::_M_weak_release() noexcept 6011: { 6011: if (--_M_weak_count == 0) 6011: _M_destroy(); 6011: } 6011: 6011: template<> 6011: inline long 6011: _Sp_counted_base<_S_single>::_M_get_use_count() const noexcept 6011: { return _M_use_count; } 6011: 6011: 6011: 6011: template 6011: class __shared_ptr; 6011: 6011: template 6011: class __weak_ptr; 6011: 6011: template 6011: class __enable_shared_from_this; 6011: 6011: template 6011: class shared_ptr; 6011: 6011: template 6011: class weak_ptr; 6011: 6011: template 6011: struct owner_less; 6011: 6011: template 6011: class enable_shared_from_this; 6011: 6011: template<_Lock_policy _Lp = __default_lock_policy> 6011: class __weak_count; 6011: 6011: template<_Lock_policy _Lp = __default_lock_policy> 6011: class __shared_count; 6011: 6011: 6011: 6011: template 6011: class _Sp_counted_ptr final : public _Sp_counted_base<_Lp> 6011: { 6011: public: 6011: explicit 6011: _Sp_counted_ptr(_Ptr __p) noexcept 6011: : _M_ptr(__p) { } 6011: 6011: virtual void 6011: _M_dispose() noexcept 6011: { delete _M_ptr; } 6011: 6011: virtual void 6011: _M_destroy() noexcept 6011: { delete this; } 6011: 6011: virtual void* 6011: _M_get_deleter(const std::type_info&) noexcept 6011: { return nullptr; } 6011: 6011: _Sp_counted_ptr(const _Sp_counted_ptr&) = delete; 6011: _Sp_counted_ptr& operator=(const _Sp_counted_ptr&) = delete; 6011: 6011: private: 6011: _Ptr _M_ptr; 6011: }; 6011: 6011: template<> 6011: inline void 6011: _Sp_counted_ptr::_M_dispose() noexcept { } 6011: 6011: template<> 6011: inline void 6011: _Sp_counted_ptr::_M_dispose() noexcept { } 6011: 6011: template<> 6011: inline void 6011: _Sp_counted_ptr::_M_dispose() noexcept { } 6011: 6011: template 6011: struct _Sp_ebo_helper; 6011: 6011: 6011: template 6011: struct _Sp_ebo_helper<_Nm, _Tp, true> : private _Tp 6011: { 6011: explicit _Sp_ebo_helper(const _Tp& __tp) : _Tp(__tp) { } 6011: explicit _Sp_ebo_helper(_Tp&& __tp) : _Tp(std::move(__tp)) { } 6011: 6011: static _Tp& 6011: _S_get(_Sp_ebo_helper& __eboh) { return static_cast<_Tp&>(__eboh); } 6011: }; 6011: 6011: 6011: template 6011: struct _Sp_ebo_helper<_Nm, _Tp, false> 6011: { 6011: explicit _Sp_ebo_helper(const _Tp& __tp) : _M_tp(__tp) { } 6011: explicit _Sp_ebo_helper(_Tp&& __tp) : _M_tp(std::move(__tp)) { } 6011: 6011: static _Tp& 6011: _S_get(_Sp_ebo_helper& __eboh) 6011: { return __eboh._M_tp; } 6011: 6011: private: 6011: _Tp _M_tp; 6011: }; 6011: 6011: 6011: template 6011: class _Sp_counted_deleter final : public _Sp_counted_base<_Lp> 6011: { 6011: class _Impl : _Sp_ebo_helper<0, _Deleter>, _Sp_ebo_helper<1, _Alloc> 6011: { 6011: typedef _Sp_ebo_helper<0, _Deleter> _Del_base; 6011: typedef _Sp_ebo_helper<1, _Alloc> _Alloc_base; 6011: 6011: public: 6011: _Impl(_Ptr __p, _Deleter __d, const _Alloc& __a) noexcept 6011: : _M_ptr(__p), _Del_base(std::move(__d)), _Alloc_base(__a) 6011: { } 6011: 6011: _Deleter& _M_del() noexcept { return _Del_base::_S_get(*this); } 6011: _Alloc& _M_alloc() noexcept { return _Alloc_base::_S_get(*this); } 6011: 6011: _Ptr _M_ptr; 6011: }; 6011: 6011: public: 6011: using __allocator_type = __alloc_rebind<_Alloc, _Sp_counted_deleter>; 6011: 6011: 6011: _Sp_counted_deleter(_Ptr __p, _Deleter __d) noexcept 6011: : _M_impl(__p, std::move(__d), _Alloc()) { } 6011: 6011: 6011: _Sp_counted_deleter(_Ptr __p, _Deleter __d, const _Alloc& __a) noexcept 6011: : _M_impl(__p, std::move(__d), __a) { } 6011: 6011: ~_Sp_counted_deleter() noexcept { } 6011: 6011: virtual void 6011: _M_dispose() noexcept 6011: { _M_impl._M_del()(_M_impl._M_ptr); } 6011: 6011: virtual void 6011: _M_destroy() noexcept 6011: { 6011: __allocator_type __a(_M_impl._M_alloc()); 6011: __allocated_ptr<__allocator_type> __guard_ptr{ __a, this }; 6011: this->~_Sp_counted_deleter(); 6011: } 6011: 6011: virtual void* 6011: _M_get_deleter(const std::type_info& __ti) noexcept 6011: { 6011: 6011: 6011: 6011: return __ti == typeid(_Deleter) 6011: ? std::__addressof(_M_impl._M_del()) 6011: : nullptr; 6011: 6011: 6011: 6011: } 6011: 6011: private: 6011: _Impl _M_impl; 6011: }; 6011: 6011: 6011: 6011: struct _Sp_make_shared_tag 6011: { 6011: # 523 "/usr/include/c++/8/bits/shared_ptr_base.h" 3 6011: }; 6011: 6011: template 6011: class _Sp_counted_ptr_inplace final : public _Sp_counted_base<_Lp> 6011: { 6011: class _Impl : _Sp_ebo_helper<0, _Alloc> 6011: { 6011: typedef _Sp_ebo_helper<0, _Alloc> _A_base; 6011: 6011: public: 6011: explicit _Impl(_Alloc __a) noexcept : _A_base(__a) { } 6011: 6011: _Alloc& _M_alloc() noexcept { return _A_base::_S_get(*this); } 6011: 6011: __gnu_cxx::__aligned_buffer<_Tp> _M_storage; 6011: }; 6011: 6011: public: 6011: using __allocator_type = __alloc_rebind<_Alloc, _Sp_counted_ptr_inplace>; 6011: 6011: template 6011: _Sp_counted_ptr_inplace(_Alloc __a, _Args&&... __args) 6011: : _M_impl(__a) 6011: { 6011: 6011: 6011: allocator_traits<_Alloc>::construct(__a, _M_ptr(), 6011: std::forward<_Args>(__args)...); 6011: } 6011: 6011: ~_Sp_counted_ptr_inplace() noexcept { } 6011: 6011: virtual void 6011: _M_dispose() noexcept 6011: { 6011: allocator_traits<_Alloc>::destroy(_M_impl._M_alloc(), _M_ptr()); 6011: } 6011: 6011: 6011: virtual void 6011: _M_destroy() noexcept 6011: { 6011: __allocator_type __a(_M_impl._M_alloc()); 6011: __allocated_ptr<__allocator_type> __guard_ptr{ __a, this }; 6011: this->~_Sp_counted_ptr_inplace(); 6011: } 6011: 6011: 6011: virtual void* 6011: _M_get_deleter(const std::type_info& __ti) noexcept 6011: { 6011: 6011: if (__ti == typeid(_Sp_make_shared_tag)) 6011: 6011: 6011: 6011: return const_cast::type*>(_M_ptr()); 6011: return nullptr; 6011: } 6011: 6011: private: 6011: _Tp* _M_ptr() noexcept { return _M_impl._M_storage._M_ptr(); } 6011: 6011: _Impl _M_impl; 6011: }; 6011: 6011: 6011: struct __sp_array_delete 6011: { 6011: template 6011: void operator()(_Yp* __p) const { delete[] __p; } 6011: }; 6011: 6011: template<_Lock_policy _Lp> 6011: class __shared_count 6011: { 6011: public: 6011: constexpr __shared_count() noexcept : _M_pi(0) 6011: { } 6011: 6011: template 6011: explicit 6011: __shared_count(_Ptr __p) : _M_pi(0) 6011: { 6011: try 6011: { 6011: _M_pi = new _Sp_counted_ptr<_Ptr, _Lp>(__p); 6011: } 6011: catch(...) 6011: { 6011: delete __p; 6011: throw; 6011: } 6011: } 6011: 6011: template 6011: __shared_count(_Ptr __p, false_type) 6011: : __shared_count(__p) 6011: { } 6011: 6011: template 6011: __shared_count(_Ptr __p, true_type) 6011: : __shared_count(__p, __sp_array_delete{}, allocator()) 6011: { } 6011: 6011: template 6011: __shared_count(_Ptr __p, _Deleter __d) 6011: : __shared_count(__p, std::move(__d), allocator()) 6011: { } 6011: 6011: template 6011: __shared_count(_Ptr __p, _Deleter __d, _Alloc __a) : _M_pi(0) 6011: { 6011: typedef _Sp_counted_deleter<_Ptr, _Deleter, _Alloc, _Lp> _Sp_cd_type; 6011: try 6011: { 6011: typename _Sp_cd_type::__allocator_type __a2(__a); 6011: auto __guard = std::__allocate_guarded(__a2); 6011: _Sp_cd_type* __mem = __guard.get(); 6011: ::new (__mem) _Sp_cd_type(__p, std::move(__d), std::move(__a)); 6011: _M_pi = __mem; 6011: __guard = nullptr; 6011: } 6011: catch(...) 6011: { 6011: __d(__p); 6011: throw; 6011: } 6011: } 6011: 6011: template 6011: __shared_count(_Sp_make_shared_tag, _Tp*, const _Alloc& __a, 6011: _Args&&... __args) 6011: : _M_pi(0) 6011: { 6011: typedef _Sp_counted_ptr_inplace<_Tp, _Alloc, _Lp> _Sp_cp_type; 6011: typename _Sp_cp_type::__allocator_type __a2(__a); 6011: auto __guard = std::__allocate_guarded(__a2); 6011: _Sp_cp_type* __mem = __guard.get(); 6011: ::new (__mem) _Sp_cp_type(std::move(__a), 6011: std::forward<_Args>(__args)...); 6011: _M_pi = __mem; 6011: __guard = nullptr; 6011: } 6011: 6011: 6011: #pragma GCC diagnostic push 6011: #pragma GCC diagnostic ignored "-Wdeprecated-declarations" 6011: 6011: template 6011: explicit 6011: __shared_count(std::auto_ptr<_Tp>&& __r); 6011: #pragma GCC diagnostic pop 6011: 6011: 6011: 6011: template 6011: explicit 6011: __shared_count(std::unique_ptr<_Tp, _Del>&& __r) : _M_pi(0) 6011: { 6011: 6011: 6011: if (__r.get() == nullptr) 6011: return; 6011: 6011: using _Ptr = typename unique_ptr<_Tp, _Del>::pointer; 6011: using _Del2 = typename conditional::value, 6011: reference_wrapper::type>, 6011: _Del>::type; 6011: using _Sp_cd_type 6011: = _Sp_counted_deleter<_Ptr, _Del2, allocator, _Lp>; 6011: using _Alloc = allocator<_Sp_cd_type>; 6011: using _Alloc_traits = allocator_traits<_Alloc>; 6011: _Alloc __a; 6011: _Sp_cd_type* __mem = _Alloc_traits::allocate(__a, 1); 6011: _Alloc_traits::construct(__a, __mem, __r.release(), 6011: __r.get_deleter()); 6011: _M_pi = __mem; 6011: } 6011: 6011: 6011: explicit __shared_count(const __weak_count<_Lp>& __r); 6011: 6011: 6011: explicit __shared_count(const __weak_count<_Lp>& __r, std::nothrow_t); 6011: 6011: ~__shared_count() noexcept 6011: { 6011: if (_M_pi != nullptr) 6011: _M_pi->_M_release(); 6011: } 6011: 6011: __shared_count(const __shared_count& __r) noexcept 6011: : _M_pi(__r._M_pi) 6011: { 6011: if (_M_pi != 0) 6011: _M_pi->_M_add_ref_copy(); 6011: } 6011: 6011: __shared_count& 6011: operator=(const __shared_count& __r) noexcept 6011: { 6011: _Sp_counted_base<_Lp>* __tmp = __r._M_pi; 6011: if (__tmp != _M_pi) 6011: { 6011: if (__tmp != 0) 6011: __tmp->_M_add_ref_copy(); 6011: if (_M_pi != 0) 6011: _M_pi->_M_release(); 6011: _M_pi = __tmp; 6011: } 6011: return *this; 6011: } 6011: 6011: void 6011: _M_swap(__shared_count& __r) noexcept 6011: { 6011: _Sp_counted_base<_Lp>* __tmp = __r._M_pi; 6011: __r._M_pi = _M_pi; 6011: _M_pi = __tmp; 6011: } 6011: 6011: long 6011: _M_get_use_count() const noexcept 6011: { return _M_pi != 0 ? _M_pi->_M_get_use_count() : 0; } 6011: 6011: bool 6011: _M_unique() const noexcept 6011: { return this->_M_get_use_count() == 1; } 6011: 6011: void* 6011: _M_get_deleter(const std::type_info& __ti) const noexcept 6011: { return _M_pi ? _M_pi->_M_get_deleter(__ti) : nullptr; } 6011: 6011: bool 6011: _M_less(const __shared_count& __rhs) const noexcept 6011: { return std::less<_Sp_counted_base<_Lp>*>()(this->_M_pi, __rhs._M_pi); } 6011: 6011: bool 6011: _M_less(const __weak_count<_Lp>& __rhs) const noexcept 6011: { return std::less<_Sp_counted_base<_Lp>*>()(this->_M_pi, __rhs._M_pi); } 6011: 6011: 6011: friend inline bool 6011: operator==(const __shared_count& __a, const __shared_count& __b) noexcept 6011: { return __a._M_pi == __b._M_pi; } 6011: 6011: private: 6011: friend class __weak_count<_Lp>; 6011: 6011: _Sp_counted_base<_Lp>* _M_pi; 6011: }; 6011: 6011: 6011: template<_Lock_policy _Lp> 6011: class __weak_count 6011: { 6011: public: 6011: constexpr __weak_count() noexcept : _M_pi(nullptr) 6011: { } 6011: 6011: __weak_count(const __shared_count<_Lp>& __r) noexcept 6011: : _M_pi(__r._M_pi) 6011: { 6011: if (_M_pi != nullptr) 6011: _M_pi->_M_weak_add_ref(); 6011: } 6011: 6011: __weak_count(const __weak_count& __r) noexcept 6011: : _M_pi(__r._M_pi) 6011: { 6011: if (_M_pi != nullptr) 6011: _M_pi->_M_weak_add_ref(); 6011: } 6011: 6011: __weak_count(__weak_count&& __r) noexcept 6011: : _M_pi(__r._M_pi) 6011: { __r._M_pi = nullptr; } 6011: 6011: ~__weak_count() noexcept 6011: { 6011: if (_M_pi != nullptr) 6011: _M_pi->_M_weak_release(); 6011: } 6011: 6011: __weak_count& 6011: operator=(const __shared_count<_Lp>& __r) noexcept 6011: { 6011: _Sp_counted_base<_Lp>* __tmp = __r._M_pi; 6011: if (__tmp != nullptr) 6011: __tmp->_M_weak_add_ref(); 6011: if (_M_pi != nullptr) 6011: _M_pi->_M_weak_release(); 6011: _M_pi = __tmp; 6011: return *this; 6011: } 6011: 6011: __weak_count& 6011: operator=(const __weak_count& __r) noexcept 6011: { 6011: _Sp_counted_base<_Lp>* __tmp = __r._M_pi; 6011: if (__tmp != nullptr) 6011: __tmp->_M_weak_add_ref(); 6011: if (_M_pi != nullptr) 6011: _M_pi->_M_weak_release(); 6011: _M_pi = __tmp; 6011: return *this; 6011: } 6011: 6011: __weak_count& 6011: operator=(__weak_count&& __r) noexcept 6011: { 6011: if (_M_pi != nullptr) 6011: _M_pi->_M_weak_release(); 6011: _M_pi = __r._M_pi; 6011: __r._M_pi = nullptr; 6011: return *this; 6011: } 6011: 6011: void 6011: _M_swap(__weak_count& __r) noexcept 6011: { 6011: _Sp_counted_base<_Lp>* __tmp = __r._M_pi; 6011: __r._M_pi = _M_pi; 6011: _M_pi = __tmp; 6011: } 6011: 6011: long 6011: _M_get_use_count() const noexcept 6011: { return _M_pi != nullptr ? _M_pi->_M_get_use_count() : 0; } 6011: 6011: bool 6011: _M_less(const __weak_count& __rhs) const noexcept 6011: { return std::less<_Sp_counted_base<_Lp>*>()(this->_M_pi, __rhs._M_pi); } 6011: 6011: bool 6011: _M_less(const __shared_count<_Lp>& __rhs) const noexcept 6011: { return std::less<_Sp_counted_base<_Lp>*>()(this->_M_pi, __rhs._M_pi); } 6011: 6011: 6011: friend inline bool 6011: operator==(const __weak_count& __a, const __weak_count& __b) noexcept 6011: { return __a._M_pi == __b._M_pi; } 6011: 6011: private: 6011: friend class __shared_count<_Lp>; 6011: 6011: _Sp_counted_base<_Lp>* _M_pi; 6011: }; 6011: 6011: 6011: template<_Lock_policy _Lp> 6011: inline 6011: __shared_count<_Lp>::__shared_count(const __weak_count<_Lp>& __r) 6011: : _M_pi(__r._M_pi) 6011: { 6011: if (_M_pi != nullptr) 6011: _M_pi->_M_add_ref_lock(); 6011: else 6011: __throw_bad_weak_ptr(); 6011: } 6011: 6011: 6011: template<_Lock_policy _Lp> 6011: inline 6011: __shared_count<_Lp>:: 6011: __shared_count(const __weak_count<_Lp>& __r, std::nothrow_t) 6011: : _M_pi(__r._M_pi) 6011: { 6011: if (_M_pi != nullptr) 6011: if (!_M_pi->_M_add_ref_lock_nothrow()) 6011: _M_pi = nullptr; 6011: } 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: template 6011: struct __sp_compatible_with 6011: : false_type 6011: { }; 6011: 6011: template 6011: struct __sp_compatible_with<_Yp*, _Tp*> 6011: : is_convertible<_Yp*, _Tp*>::type 6011: { }; 6011: 6011: template 6011: struct __sp_compatible_with<_Up(*)[_Nm], _Up(*)[]> 6011: : true_type 6011: { }; 6011: 6011: template 6011: struct __sp_compatible_with<_Up(*)[_Nm], const _Up(*)[]> 6011: : true_type 6011: { }; 6011: 6011: template 6011: struct __sp_compatible_with<_Up(*)[_Nm], volatile _Up(*)[]> 6011: : true_type 6011: { }; 6011: 6011: template 6011: struct __sp_compatible_with<_Up(*)[_Nm], const volatile _Up(*)[]> 6011: : true_type 6011: { }; 6011: 6011: 6011: template 6011: struct __sp_is_constructible_arrN 6011: : false_type 6011: { }; 6011: 6011: template 6011: struct __sp_is_constructible_arrN<_Up, _Nm, _Yp, __void_t<_Yp[_Nm]>> 6011: : is_convertible<_Yp(*)[_Nm], _Up(*)[_Nm]>::type 6011: { }; 6011: 6011: 6011: template 6011: struct __sp_is_constructible_arr 6011: : false_type 6011: { }; 6011: 6011: template 6011: struct __sp_is_constructible_arr<_Up, _Yp, __void_t<_Yp[]>> 6011: : is_convertible<_Yp(*)[], _Up(*)[]>::type 6011: { }; 6011: 6011: 6011: template 6011: struct __sp_is_constructible; 6011: 6011: 6011: template 6011: struct __sp_is_constructible<_Up[_Nm], _Yp> 6011: : __sp_is_constructible_arrN<_Up, _Nm, _Yp>::type 6011: { }; 6011: 6011: 6011: template 6011: struct __sp_is_constructible<_Up[], _Yp> 6011: : __sp_is_constructible_arr<_Up, _Yp>::type 6011: { }; 6011: 6011: 6011: template 6011: struct __sp_is_constructible 6011: : is_convertible<_Yp*, _Tp*>::type 6011: { }; 6011: 6011: 6011: 6011: template::value, bool = is_void<_Tp>::value> 6011: class __shared_ptr_access 6011: { 6011: public: 6011: using element_type = _Tp; 6011: 6011: element_type& 6011: operator*() const noexcept 6011: { 6011: ; 6011: return *_M_get(); 6011: } 6011: 6011: element_type* 6011: operator->() const noexcept 6011: { 6011: ; 6011: return _M_get(); 6011: } 6011: 6011: private: 6011: element_type* 6011: _M_get() const noexcept 6011: { return static_cast*>(this)->get(); } 6011: }; 6011: 6011: 6011: template 6011: class __shared_ptr_access<_Tp, _Lp, false, true> 6011: { 6011: public: 6011: using element_type = _Tp; 6011: 6011: element_type* 6011: operator->() const noexcept 6011: { 6011: auto __ptr = static_cast*>(this)->get(); 6011: ; 6011: return __ptr; 6011: } 6011: }; 6011: 6011: 6011: template 6011: class __shared_ptr_access<_Tp, _Lp, true, false> 6011: { 6011: public: 6011: using element_type = typename remove_extent<_Tp>::type; 6011: 6011: 6011: [[__deprecated__("shared_ptr::operator* is absent from C++17")]] 6011: element_type& 6011: operator*() const noexcept 6011: { 6011: ; 6011: return *_M_get(); 6011: } 6011: 6011: [[__deprecated__("shared_ptr::operator-> is absent from C++17")]] 6011: element_type* 6011: operator->() const noexcept 6011: { 6011: ; 6011: return _M_get(); 6011: } 6011: 6011: 6011: element_type& 6011: operator[](ptrdiff_t __i) const 6011: { 6011: ; 6011: ; 6011: return _M_get()[__i]; 6011: } 6011: 6011: private: 6011: element_type* 6011: _M_get() const noexcept 6011: { return static_cast*>(this)->get(); } 6011: }; 6011: 6011: template 6011: class __shared_ptr 6011: : public __shared_ptr_access<_Tp, _Lp> 6011: { 6011: public: 6011: using element_type = typename remove_extent<_Tp>::type; 6011: 6011: private: 6011: 6011: template 6011: using _SafeConv 6011: = typename enable_if<__sp_is_constructible<_Tp, _Yp>::value>::type; 6011: 6011: 6011: template 6011: using _Compatible = typename 6011: enable_if<__sp_compatible_with<_Yp*, _Tp*>::value, _Res>::type; 6011: 6011: 6011: template 6011: using _Assignable = _Compatible<_Yp, __shared_ptr&>; 6011: 6011: 6011: template::pointer> 6011: using _UniqCompatible = typename enable_if<__and_< 6011: __sp_compatible_with<_Yp*, _Tp*>, is_convertible<_Ptr, element_type*> 6011: >::value, _Res>::type; 6011: 6011: 6011: template 6011: using _UniqAssignable = _UniqCompatible<_Yp, _Del, __shared_ptr&>; 6011: 6011: public: 6011: 6011: 6011: 6011: 6011: 6011: constexpr __shared_ptr() noexcept 6011: : _M_ptr(0), _M_refcount() 6011: { } 6011: 6011: template> 6011: explicit 6011: __shared_ptr(_Yp* __p) 6011: : _M_ptr(__p), _M_refcount(__p, typename is_array<_Tp>::type()) 6011: { 6011: static_assert( !is_void<_Yp>::value, "incomplete type" ); 6011: static_assert( sizeof(_Yp) > 0, "incomplete type" ); 6011: _M_enable_shared_from_this_with(__p); 6011: } 6011: 6011: template> 6011: __shared_ptr(_Yp* __p, _Deleter __d) 6011: : _M_ptr(__p), _M_refcount(__p, std::move(__d)) 6011: { 6011: static_assert(__is_invocable<_Deleter&, _Yp*&>::value, 6011: "deleter expression d(p) is well-formed"); 6011: _M_enable_shared_from_this_with(__p); 6011: } 6011: 6011: template> 6011: __shared_ptr(_Yp* __p, _Deleter __d, _Alloc __a) 6011: : _M_ptr(__p), _M_refcount(__p, std::move(__d), std::move(__a)) 6011: { 6011: static_assert(__is_invocable<_Deleter&, _Yp*&>::value, 6011: "deleter expression d(p) is well-formed"); 6011: _M_enable_shared_from_this_with(__p); 6011: } 6011: 6011: template 6011: __shared_ptr(nullptr_t __p, _Deleter __d) 6011: : _M_ptr(0), _M_refcount(__p, std::move(__d)) 6011: { } 6011: 6011: template 6011: __shared_ptr(nullptr_t __p, _Deleter __d, _Alloc __a) 6011: : _M_ptr(0), _M_refcount(__p, std::move(__d), std::move(__a)) 6011: { } 6011: 6011: template 6011: __shared_ptr(const __shared_ptr<_Yp, _Lp>& __r, 6011: element_type* __p) noexcept 6011: : _M_ptr(__p), _M_refcount(__r._M_refcount) 6011: { } 6011: 6011: __shared_ptr(const __shared_ptr&) noexcept = default; 6011: __shared_ptr& operator=(const __shared_ptr&) noexcept = default; 6011: ~__shared_ptr() = default; 6011: 6011: template> 6011: __shared_ptr(const __shared_ptr<_Yp, _Lp>& __r) noexcept 6011: : _M_ptr(__r._M_ptr), _M_refcount(__r._M_refcount) 6011: { } 6011: 6011: __shared_ptr(__shared_ptr&& __r) noexcept 6011: : _M_ptr(__r._M_ptr), _M_refcount() 6011: { 6011: _M_refcount._M_swap(__r._M_refcount); 6011: __r._M_ptr = 0; 6011: } 6011: 6011: template> 6011: __shared_ptr(__shared_ptr<_Yp, _Lp>&& __r) noexcept 6011: : _M_ptr(__r._M_ptr), _M_refcount() 6011: { 6011: _M_refcount._M_swap(__r._M_refcount); 6011: __r._M_ptr = 0; 6011: } 6011: 6011: template> 6011: explicit __shared_ptr(const __weak_ptr<_Yp, _Lp>& __r) 6011: : _M_refcount(__r._M_refcount) 6011: { 6011: 6011: 6011: _M_ptr = __r._M_ptr; 6011: } 6011: 6011: 6011: template> 6011: __shared_ptr(unique_ptr<_Yp, _Del>&& __r) 6011: : _M_ptr(__r.get()), _M_refcount() 6011: { 6011: auto __raw = __to_address(__r.get()); 6011: _M_refcount = __shared_count<_Lp>(std::move(__r)); 6011: _M_enable_shared_from_this_with(__raw); 6011: } 6011: 6011: 6011: protected: 6011: 6011: template>, is_array<_Tp1>, 6011: is_convertible::pointer, _Tp*> 6011: >::value, bool>::type = true> 6011: __shared_ptr(unique_ptr<_Tp1, _Del>&& __r, __sp_array_delete) 6011: : _M_ptr(__r.get()), _M_refcount() 6011: { 6011: auto __raw = __to_address(__r.get()); 6011: _M_refcount = __shared_count<_Lp>(std::move(__r)); 6011: _M_enable_shared_from_this_with(__raw); 6011: } 6011: public: 6011: 6011: 6011: 6011: #pragma GCC diagnostic push 6011: #pragma GCC diagnostic ignored "-Wdeprecated-declarations" 6011: 6011: template> 6011: __shared_ptr(auto_ptr<_Yp>&& __r); 6011: #pragma GCC diagnostic pop 6011: 6011: 6011: constexpr __shared_ptr(nullptr_t) noexcept : __shared_ptr() { } 6011: 6011: template 6011: _Assignable<_Yp> 6011: operator=(const __shared_ptr<_Yp, _Lp>& __r) noexcept 6011: { 6011: _M_ptr = __r._M_ptr; 6011: _M_refcount = __r._M_refcount; 6011: return *this; 6011: } 6011: 6011: 6011: #pragma GCC diagnostic push 6011: #pragma GCC diagnostic ignored "-Wdeprecated-declarations" 6011: template 6011: _Assignable<_Yp> 6011: operator=(auto_ptr<_Yp>&& __r) 6011: { 6011: __shared_ptr(std::move(__r)).swap(*this); 6011: return *this; 6011: } 6011: #pragma GCC diagnostic pop 6011: 6011: 6011: __shared_ptr& 6011: operator=(__shared_ptr&& __r) noexcept 6011: { 6011: __shared_ptr(std::move(__r)).swap(*this); 6011: return *this; 6011: } 6011: 6011: template 6011: _Assignable<_Yp> 6011: operator=(__shared_ptr<_Yp, _Lp>&& __r) noexcept 6011: { 6011: __shared_ptr(std::move(__r)).swap(*this); 6011: return *this; 6011: } 6011: 6011: template 6011: _UniqAssignable<_Yp, _Del> 6011: operator=(unique_ptr<_Yp, _Del>&& __r) 6011: { 6011: __shared_ptr(std::move(__r)).swap(*this); 6011: return *this; 6011: } 6011: 6011: void 6011: reset() noexcept 6011: { __shared_ptr().swap(*this); } 6011: 6011: template 6011: _SafeConv<_Yp> 6011: reset(_Yp* __p) 6011: { 6011: 6011: ; 6011: __shared_ptr(__p).swap(*this); 6011: } 6011: 6011: template 6011: _SafeConv<_Yp> 6011: reset(_Yp* __p, _Deleter __d) 6011: { __shared_ptr(__p, std::move(__d)).swap(*this); } 6011: 6011: template 6011: _SafeConv<_Yp> 6011: reset(_Yp* __p, _Deleter __d, _Alloc __a) 6011: { __shared_ptr(__p, std::move(__d), std::move(__a)).swap(*this); } 6011: 6011: element_type* 6011: get() const noexcept 6011: { return _M_ptr; } 6011: 6011: explicit operator bool() const 6011: { return _M_ptr == 0 ? false : true; } 6011: 6011: bool 6011: unique() const noexcept 6011: { return _M_refcount._M_unique(); } 6011: 6011: long 6011: use_count() const noexcept 6011: { return _M_refcount._M_get_use_count(); } 6011: 6011: void 6011: swap(__shared_ptr<_Tp, _Lp>& __other) noexcept 6011: { 6011: std::swap(_M_ptr, __other._M_ptr); 6011: _M_refcount._M_swap(__other._M_refcount); 6011: } 6011: 6011: template 6011: bool 6011: owner_before(__shared_ptr<_Tp1, _Lp> const& __rhs) const noexcept 6011: { return _M_refcount._M_less(__rhs._M_refcount); } 6011: 6011: template 6011: bool 6011: owner_before(__weak_ptr<_Tp1, _Lp> const& __rhs) const noexcept 6011: { return _M_refcount._M_less(__rhs._M_refcount); } 6011: 6011: protected: 6011: 6011: template 6011: __shared_ptr(_Sp_make_shared_tag __tag, const _Alloc& __a, 6011: _Args&&... __args) 6011: : _M_ptr(), _M_refcount(__tag, (_Tp*)0, __a, 6011: std::forward<_Args>(__args)...) 6011: { 6011: 6011: 6011: 6011: void* __p = _M_refcount._M_get_deleter(typeid(__tag)); 6011: 6011: 6011: 6011: _M_ptr = static_cast<_Tp*>(__p); 6011: _M_enable_shared_from_this_with(_M_ptr); 6011: } 6011: 6011: template 6011: friend __shared_ptr<_Tp1, _Lp1> 6011: __allocate_shared(const _Alloc& __a, _Args&&... __args); 6011: 6011: 6011: 6011: __shared_ptr(const __weak_ptr<_Tp, _Lp>& __r, std::nothrow_t) 6011: : _M_refcount(__r._M_refcount, std::nothrow) 6011: { 6011: _M_ptr = _M_refcount._M_get_use_count() ? __r._M_ptr : nullptr; 6011: } 6011: 6011: friend class __weak_ptr<_Tp, _Lp>; 6011: 6011: private: 6011: 6011: template 6011: using __esft_base_t = decltype(__enable_shared_from_this_base( 6011: std::declval&>(), 6011: std::declval<_Yp*>())); 6011: 6011: 6011: template 6011: struct __has_esft_base 6011: : false_type { }; 6011: 6011: template 6011: struct __has_esft_base<_Yp, __void_t<__esft_base_t<_Yp>>> 6011: : __not_> { }; 6011: 6011: template::type> 6011: typename enable_if<__has_esft_base<_Yp2>::value>::type 6011: _M_enable_shared_from_this_with(_Yp* __p) noexcept 6011: { 6011: if (auto __base = __enable_shared_from_this_base(_M_refcount, __p)) 6011: __base->_M_weak_assign(const_cast<_Yp2*>(__p), _M_refcount); 6011: } 6011: 6011: template::type> 6011: typename enable_if::value>::type 6011: _M_enable_shared_from_this_with(_Yp*) noexcept 6011: { } 6011: 6011: void* 6011: _M_get_deleter(const std::type_info& __ti) const noexcept 6011: { return _M_refcount._M_get_deleter(__ti); } 6011: 6011: template friend class __shared_ptr; 6011: template friend class __weak_ptr; 6011: 6011: template 6011: friend _Del* get_deleter(const __shared_ptr<_Tp1, _Lp1>&) noexcept; 6011: 6011: template 6011: friend _Del* get_deleter(const shared_ptr<_Tp1>&) noexcept; 6011: 6011: element_type* _M_ptr; 6011: __shared_count<_Lp> _M_refcount; 6011: }; 6011: 6011: 6011: 6011: template 6011: inline bool 6011: operator==(const __shared_ptr<_Tp1, _Lp>& __a, 6011: const __shared_ptr<_Tp2, _Lp>& __b) noexcept 6011: { return __a.get() == __b.get(); } 6011: 6011: template 6011: inline bool 6011: operator==(const __shared_ptr<_Tp, _Lp>& __a, nullptr_t) noexcept 6011: { return !__a; } 6011: 6011: template 6011: inline bool 6011: operator==(nullptr_t, const __shared_ptr<_Tp, _Lp>& __a) noexcept 6011: { return !__a; } 6011: 6011: template 6011: inline bool 6011: operator!=(const __shared_ptr<_Tp1, _Lp>& __a, 6011: const __shared_ptr<_Tp2, _Lp>& __b) noexcept 6011: { return __a.get() != __b.get(); } 6011: 6011: template 6011: inline bool 6011: operator!=(const __shared_ptr<_Tp, _Lp>& __a, nullptr_t) noexcept 6011: { return (bool)__a; } 6011: 6011: template 6011: inline bool 6011: operator!=(nullptr_t, const __shared_ptr<_Tp, _Lp>& __a) noexcept 6011: { return (bool)__a; } 6011: 6011: template 6011: inline bool 6011: operator<(const __shared_ptr<_Tp, _Lp>& __a, 6011: const __shared_ptr<_Up, _Lp>& __b) noexcept 6011: { 6011: using _Tp_elt = typename __shared_ptr<_Tp, _Lp>::element_type; 6011: using _Up_elt = typename __shared_ptr<_Up, _Lp>::element_type; 6011: using _Vp = typename common_type<_Tp_elt*, _Up_elt*>::type; 6011: return less<_Vp>()(__a.get(), __b.get()); 6011: } 6011: 6011: template 6011: inline bool 6011: operator<(const __shared_ptr<_Tp, _Lp>& __a, nullptr_t) noexcept 6011: { 6011: using _Tp_elt = typename __shared_ptr<_Tp, _Lp>::element_type; 6011: return less<_Tp_elt*>()(__a.get(), nullptr); 6011: } 6011: 6011: template 6011: inline bool 6011: operator<(nullptr_t, const __shared_ptr<_Tp, _Lp>& __a) noexcept 6011: { 6011: using _Tp_elt = typename __shared_ptr<_Tp, _Lp>::element_type; 6011: return less<_Tp_elt*>()(nullptr, __a.get()); 6011: } 6011: 6011: template 6011: inline bool 6011: operator<=(const __shared_ptr<_Tp1, _Lp>& __a, 6011: const __shared_ptr<_Tp2, _Lp>& __b) noexcept 6011: { return !(__b < __a); } 6011: 6011: template 6011: inline bool 6011: operator<=(const __shared_ptr<_Tp, _Lp>& __a, nullptr_t) noexcept 6011: { return !(nullptr < __a); } 6011: 6011: template 6011: inline bool 6011: operator<=(nullptr_t, const __shared_ptr<_Tp, _Lp>& __a) noexcept 6011: { return !(__a < nullptr); } 6011: 6011: template 6011: inline bool 6011: operator>(const __shared_ptr<_Tp1, _Lp>& __a, 6011: const __shared_ptr<_Tp2, _Lp>& __b) noexcept 6011: { return (__b < __a); } 6011: 6011: template 6011: inline bool 6011: operator>(const __shared_ptr<_Tp, _Lp>& __a, nullptr_t) noexcept 6011: { return nullptr < __a; } 6011: 6011: template 6011: inline bool 6011: operator>(nullptr_t, const __shared_ptr<_Tp, _Lp>& __a) noexcept 6011: { return __a < nullptr; } 6011: 6011: template 6011: inline bool 6011: operator>=(const __shared_ptr<_Tp1, _Lp>& __a, 6011: const __shared_ptr<_Tp2, _Lp>& __b) noexcept 6011: { return !(__a < __b); } 6011: 6011: template 6011: inline bool 6011: operator>=(const __shared_ptr<_Tp, _Lp>& __a, nullptr_t) noexcept 6011: { return !(__a < nullptr); } 6011: 6011: template 6011: inline bool 6011: operator>=(nullptr_t, const __shared_ptr<_Tp, _Lp>& __a) noexcept 6011: { return !(nullptr < __a); } 6011: 6011: template 6011: struct _Sp_less : public binary_function<_Sp, _Sp, bool> 6011: { 6011: bool 6011: operator()(const _Sp& __lhs, const _Sp& __rhs) const noexcept 6011: { 6011: typedef typename _Sp::element_type element_type; 6011: return std::less()(__lhs.get(), __rhs.get()); 6011: } 6011: }; 6011: 6011: template 6011: struct less<__shared_ptr<_Tp, _Lp>> 6011: : public _Sp_less<__shared_ptr<_Tp, _Lp>> 6011: { }; 6011: 6011: 6011: template 6011: inline void 6011: swap(__shared_ptr<_Tp, _Lp>& __a, __shared_ptr<_Tp, _Lp>& __b) noexcept 6011: { __a.swap(__b); } 6011: # 1540 "/usr/include/c++/8/bits/shared_ptr_base.h" 3 6011: template 6011: inline __shared_ptr<_Tp, _Lp> 6011: static_pointer_cast(const __shared_ptr<_Tp1, _Lp>& __r) noexcept 6011: { 6011: using _Sp = __shared_ptr<_Tp, _Lp>; 6011: return _Sp(__r, static_cast(__r.get())); 6011: } 6011: 6011: 6011: 6011: 6011: 6011: 6011: template 6011: inline __shared_ptr<_Tp, _Lp> 6011: const_pointer_cast(const __shared_ptr<_Tp1, _Lp>& __r) noexcept 6011: { 6011: using _Sp = __shared_ptr<_Tp, _Lp>; 6011: return _Sp(__r, const_cast(__r.get())); 6011: } 6011: 6011: 6011: 6011: 6011: 6011: 6011: template 6011: inline __shared_ptr<_Tp, _Lp> 6011: dynamic_pointer_cast(const __shared_ptr<_Tp1, _Lp>& __r) noexcept 6011: { 6011: using _Sp = __shared_ptr<_Tp, _Lp>; 6011: if (auto* __p = dynamic_cast(__r.get())) 6011: return _Sp(__r, __p); 6011: return _Sp(); 6011: } 6011: # 1586 "/usr/include/c++/8/bits/shared_ptr_base.h" 3 6011: template 6011: class __weak_ptr 6011: { 6011: template 6011: using _Compatible = typename 6011: enable_if<__sp_compatible_with<_Yp*, _Tp*>::value, _Res>::type; 6011: 6011: 6011: template 6011: using _Assignable = _Compatible<_Yp, __weak_ptr&>; 6011: 6011: public: 6011: using element_type = typename remove_extent<_Tp>::type; 6011: 6011: constexpr __weak_ptr() noexcept 6011: : _M_ptr(nullptr), _M_refcount() 6011: { } 6011: 6011: __weak_ptr(const __weak_ptr&) noexcept = default; 6011: 6011: ~__weak_ptr() = default; 6011: # 1622 "/usr/include/c++/8/bits/shared_ptr_base.h" 3 6011: template> 6011: __weak_ptr(const __weak_ptr<_Yp, _Lp>& __r) noexcept 6011: : _M_refcount(__r._M_refcount) 6011: { _M_ptr = __r.lock().get(); } 6011: 6011: template> 6011: __weak_ptr(const __shared_ptr<_Yp, _Lp>& __r) noexcept 6011: : _M_ptr(__r._M_ptr), _M_refcount(__r._M_refcount) 6011: { } 6011: 6011: __weak_ptr(__weak_ptr&& __r) noexcept 6011: : _M_ptr(__r._M_ptr), _M_refcount(std::move(__r._M_refcount)) 6011: { __r._M_ptr = nullptr; } 6011: 6011: template> 6011: __weak_ptr(__weak_ptr<_Yp, _Lp>&& __r) noexcept 6011: : _M_ptr(__r.lock().get()), _M_refcount(std::move(__r._M_refcount)) 6011: { __r._M_ptr = nullptr; } 6011: 6011: __weak_ptr& 6011: operator=(const __weak_ptr& __r) noexcept = default; 6011: 6011: template 6011: _Assignable<_Yp> 6011: operator=(const __weak_ptr<_Yp, _Lp>& __r) noexcept 6011: { 6011: _M_ptr = __r.lock().get(); 6011: _M_refcount = __r._M_refcount; 6011: return *this; 6011: } 6011: 6011: template 6011: _Assignable<_Yp> 6011: operator=(const __shared_ptr<_Yp, _Lp>& __r) noexcept 6011: { 6011: _M_ptr = __r._M_ptr; 6011: _M_refcount = __r._M_refcount; 6011: return *this; 6011: } 6011: 6011: __weak_ptr& 6011: operator=(__weak_ptr&& __r) noexcept 6011: { 6011: _M_ptr = __r._M_ptr; 6011: _M_refcount = std::move(__r._M_refcount); 6011: __r._M_ptr = nullptr; 6011: return *this; 6011: } 6011: 6011: template 6011: _Assignable<_Yp> 6011: operator=(__weak_ptr<_Yp, _Lp>&& __r) noexcept 6011: { 6011: _M_ptr = __r.lock().get(); 6011: _M_refcount = std::move(__r._M_refcount); 6011: __r._M_ptr = nullptr; 6011: return *this; 6011: } 6011: 6011: __shared_ptr<_Tp, _Lp> 6011: lock() const noexcept 6011: { return __shared_ptr(*this, std::nothrow); } 6011: 6011: long 6011: use_count() const noexcept 6011: { return _M_refcount._M_get_use_count(); } 6011: 6011: bool 6011: expired() const noexcept 6011: { return _M_refcount._M_get_use_count() == 0; } 6011: 6011: template 6011: bool 6011: owner_before(const __shared_ptr<_Tp1, _Lp>& __rhs) const noexcept 6011: { return _M_refcount._M_less(__rhs._M_refcount); } 6011: 6011: template 6011: bool 6011: owner_before(const __weak_ptr<_Tp1, _Lp>& __rhs) const noexcept 6011: { return _M_refcount._M_less(__rhs._M_refcount); } 6011: 6011: void 6011: reset() noexcept 6011: { __weak_ptr().swap(*this); } 6011: 6011: void 6011: swap(__weak_ptr& __s) noexcept 6011: { 6011: std::swap(_M_ptr, __s._M_ptr); 6011: _M_refcount._M_swap(__s._M_refcount); 6011: } 6011: 6011: private: 6011: 6011: void 6011: _M_assign(_Tp* __ptr, const __shared_count<_Lp>& __refcount) noexcept 6011: { 6011: if (use_count() == 0) 6011: { 6011: _M_ptr = __ptr; 6011: _M_refcount = __refcount; 6011: } 6011: } 6011: 6011: template friend class __shared_ptr; 6011: template friend class __weak_ptr; 6011: friend class __enable_shared_from_this<_Tp, _Lp>; 6011: friend class enable_shared_from_this<_Tp>; 6011: 6011: element_type* _M_ptr; 6011: __weak_count<_Lp> _M_refcount; 6011: }; 6011: 6011: 6011: template 6011: inline void 6011: swap(__weak_ptr<_Tp, _Lp>& __a, __weak_ptr<_Tp, _Lp>& __b) noexcept 6011: { __a.swap(__b); } 6011: 6011: template 6011: struct _Sp_owner_less : public binary_function<_Tp, _Tp, bool> 6011: { 6011: bool 6011: operator()(const _Tp& __lhs, const _Tp& __rhs) const noexcept 6011: { return __lhs.owner_before(__rhs); } 6011: 6011: bool 6011: operator()(const _Tp& __lhs, const _Tp1& __rhs) const noexcept 6011: { return __lhs.owner_before(__rhs); } 6011: 6011: bool 6011: operator()(const _Tp1& __lhs, const _Tp& __rhs) const noexcept 6011: { return __lhs.owner_before(__rhs); } 6011: }; 6011: 6011: template<> 6011: struct _Sp_owner_less 6011: { 6011: template 6011: auto 6011: operator()(const _Tp& __lhs, const _Up& __rhs) const noexcept 6011: -> decltype(__lhs.owner_before(__rhs)) 6011: { return __lhs.owner_before(__rhs); } 6011: 6011: using is_transparent = void; 6011: }; 6011: 6011: template 6011: struct owner_less<__shared_ptr<_Tp, _Lp>> 6011: : public _Sp_owner_less<__shared_ptr<_Tp, _Lp>, __weak_ptr<_Tp, _Lp>> 6011: { }; 6011: 6011: template 6011: struct owner_less<__weak_ptr<_Tp, _Lp>> 6011: : public _Sp_owner_less<__weak_ptr<_Tp, _Lp>, __shared_ptr<_Tp, _Lp>> 6011: { }; 6011: 6011: 6011: template 6011: class __enable_shared_from_this 6011: { 6011: protected: 6011: constexpr __enable_shared_from_this() noexcept { } 6011: 6011: __enable_shared_from_this(const __enable_shared_from_this&) noexcept { } 6011: 6011: __enable_shared_from_this& 6011: operator=(const __enable_shared_from_this&) noexcept 6011: { return *this; } 6011: 6011: ~__enable_shared_from_this() { } 6011: 6011: public: 6011: __shared_ptr<_Tp, _Lp> 6011: shared_from_this() 6011: { return __shared_ptr<_Tp, _Lp>(this->_M_weak_this); } 6011: 6011: __shared_ptr 6011: shared_from_this() const 6011: { return __shared_ptr(this->_M_weak_this); } 6011: 6011: 6011: __weak_ptr<_Tp, _Lp> 6011: weak_from_this() noexcept 6011: { return this->_M_weak_this; } 6011: 6011: __weak_ptr 6011: weak_from_this() const noexcept 6011: { return this->_M_weak_this; } 6011: 6011: 6011: private: 6011: template 6011: void 6011: _M_weak_assign(_Tp1* __p, const __shared_count<_Lp>& __n) const noexcept 6011: { _M_weak_this._M_assign(__p, __n); } 6011: 6011: friend const __enable_shared_from_this* 6011: __enable_shared_from_this_base(const __shared_count<_Lp>&, 6011: const __enable_shared_from_this* __p) 6011: { return __p; } 6011: 6011: template 6011: friend class __shared_ptr; 6011: 6011: mutable __weak_ptr<_Tp, _Lp> _M_weak_this; 6011: }; 6011: 6011: template 6011: inline __shared_ptr<_Tp, _Lp> 6011: __allocate_shared(const _Alloc& __a, _Args&&... __args) 6011: { 6011: return __shared_ptr<_Tp, _Lp>(_Sp_make_shared_tag(), __a, 6011: std::forward<_Args>(__args)...); 6011: } 6011: 6011: template 6011: inline __shared_ptr<_Tp, _Lp> 6011: __make_shared(_Args&&... __args) 6011: { 6011: typedef typename std::remove_const<_Tp>::type _Tp_nc; 6011: return std::__allocate_shared<_Tp, _Lp>(std::allocator<_Tp_nc>(), 6011: std::forward<_Args>(__args)...); 6011: } 6011: 6011: 6011: template 6011: struct hash<__shared_ptr<_Tp, _Lp>> 6011: : public __hash_base> 6011: { 6011: size_t 6011: operator()(const __shared_ptr<_Tp, _Lp>& __s) const noexcept 6011: { 6011: return hash::element_type*>()( 6011: __s.get()); 6011: } 6011: }; 6011: 6011: 6011: } 6011: # 53 "/usr/include/c++/8/bits/shared_ptr.h" 2 3 6011: 6011: namespace std __attribute__ ((__visibility__ ("default"))) 6011: { 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: template 6011: inline std::basic_ostream<_Ch, _Tr>& 6011: operator<<(std::basic_ostream<_Ch, _Tr>& __os, 6011: const __shared_ptr<_Tp, _Lp>& __p) 6011: { 6011: __os << __p.get(); 6011: return __os; 6011: } 6011: 6011: template 6011: inline _Del* 6011: get_deleter(const __shared_ptr<_Tp, _Lp>& __p) noexcept 6011: { 6011: 6011: return static_cast<_Del*>(__p._M_get_deleter(typeid(_Del))); 6011: 6011: 6011: 6011: } 6011: 6011: 6011: template 6011: inline _Del* 6011: get_deleter(const shared_ptr<_Tp>& __p) noexcept 6011: { 6011: 6011: return static_cast<_Del*>(__p._M_get_deleter(typeid(_Del))); 6011: 6011: 6011: 6011: } 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: template 6011: class shared_ptr : public __shared_ptr<_Tp> 6011: { 6011: template 6011: using _Constructible = typename enable_if< 6011: is_constructible<__shared_ptr<_Tp>, _Args...>::value 6011: >::type; 6011: 6011: template 6011: using _Assignable = typename enable_if< 6011: is_assignable<__shared_ptr<_Tp>&, _Arg>::value, shared_ptr& 6011: >::type; 6011: 6011: public: 6011: 6011: using element_type = typename __shared_ptr<_Tp>::element_type; 6011: # 127 "/usr/include/c++/8/bits/shared_ptr.h" 3 6011: constexpr shared_ptr() noexcept : __shared_ptr<_Tp>() { } 6011: 6011: shared_ptr(const shared_ptr&) noexcept = default; 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: template> 6011: explicit 6011: shared_ptr(_Yp* __p) : __shared_ptr<_Tp>(__p) { } 6011: # 154 "/usr/include/c++/8/bits/shared_ptr.h" 3 6011: template> 6011: shared_ptr(_Yp* __p, _Deleter __d) 6011: : __shared_ptr<_Tp>(__p, std::move(__d)) { } 6011: # 172 "/usr/include/c++/8/bits/shared_ptr.h" 3 6011: template 6011: shared_ptr(nullptr_t __p, _Deleter __d) 6011: : __shared_ptr<_Tp>(__p, std::move(__d)) { } 6011: # 191 "/usr/include/c++/8/bits/shared_ptr.h" 3 6011: template> 6011: shared_ptr(_Yp* __p, _Deleter __d, _Alloc __a) 6011: : __shared_ptr<_Tp>(__p, std::move(__d), std::move(__a)) { } 6011: # 211 "/usr/include/c++/8/bits/shared_ptr.h" 3 6011: template 6011: shared_ptr(nullptr_t __p, _Deleter __d, _Alloc __a) 6011: : __shared_ptr<_Tp>(__p, std::move(__d), std::move(__a)) { } 6011: # 233 "/usr/include/c++/8/bits/shared_ptr.h" 3 6011: template 6011: shared_ptr(const shared_ptr<_Yp>& __r, element_type* __p) noexcept 6011: : __shared_ptr<_Tp>(__r, __p) { } 6011: # 244 "/usr/include/c++/8/bits/shared_ptr.h" 3 6011: template&>> 6011: shared_ptr(const shared_ptr<_Yp>& __r) noexcept 6011: : __shared_ptr<_Tp>(__r) { } 6011: 6011: 6011: 6011: 6011: 6011: 6011: shared_ptr(shared_ptr&& __r) noexcept 6011: : __shared_ptr<_Tp>(std::move(__r)) { } 6011: 6011: 6011: 6011: 6011: 6011: 6011: template>> 6011: shared_ptr(shared_ptr<_Yp>&& __r) noexcept 6011: : __shared_ptr<_Tp>(std::move(__r)) { } 6011: # 274 "/usr/include/c++/8/bits/shared_ptr.h" 3 6011: template&>> 6011: explicit shared_ptr(const weak_ptr<_Yp>& __r) 6011: : __shared_ptr<_Tp>(__r) { } 6011: 6011: 6011: #pragma GCC diagnostic push 6011: #pragma GCC diagnostic ignored "-Wdeprecated-declarations" 6011: template>> 6011: shared_ptr(auto_ptr<_Yp>&& __r); 6011: #pragma GCC diagnostic pop 6011: 6011: 6011: 6011: 6011: template>> 6011: shared_ptr(unique_ptr<_Yp, _Del>&& __r) 6011: : __shared_ptr<_Tp>(std::move(__r)) { } 6011: 6011: 6011: 6011: 6011: 6011: template, __sp_array_delete>* = 0> 6011: shared_ptr(unique_ptr<_Yp, _Del>&& __r) 6011: : __shared_ptr<_Tp>(std::move(__r), __sp_array_delete()) { } 6011: 6011: 6011: 6011: 6011: 6011: 6011: constexpr shared_ptr(nullptr_t) noexcept : shared_ptr() { } 6011: 6011: shared_ptr& operator=(const shared_ptr&) noexcept = default; 6011: 6011: template 6011: _Assignable&> 6011: operator=(const shared_ptr<_Yp>& __r) noexcept 6011: { 6011: this->__shared_ptr<_Tp>::operator=(__r); 6011: return *this; 6011: } 6011: 6011: 6011: #pragma GCC diagnostic push 6011: #pragma GCC diagnostic ignored "-Wdeprecated-declarations" 6011: template 6011: _Assignable> 6011: operator=(auto_ptr<_Yp>&& __r) 6011: { 6011: this->__shared_ptr<_Tp>::operator=(std::move(__r)); 6011: return *this; 6011: } 6011: #pragma GCC diagnostic pop 6011: 6011: 6011: shared_ptr& 6011: operator=(shared_ptr&& __r) noexcept 6011: { 6011: this->__shared_ptr<_Tp>::operator=(std::move(__r)); 6011: return *this; 6011: } 6011: 6011: template 6011: _Assignable> 6011: operator=(shared_ptr<_Yp>&& __r) noexcept 6011: { 6011: this->__shared_ptr<_Tp>::operator=(std::move(__r)); 6011: return *this; 6011: } 6011: 6011: template 6011: _Assignable> 6011: operator=(unique_ptr<_Yp, _Del>&& __r) 6011: { 6011: this->__shared_ptr<_Tp>::operator=(std::move(__r)); 6011: return *this; 6011: } 6011: 6011: private: 6011: 6011: template 6011: shared_ptr(_Sp_make_shared_tag __tag, const _Alloc& __a, 6011: _Args&&... __args) 6011: : __shared_ptr<_Tp>(__tag, __a, std::forward<_Args>(__args)...) 6011: { } 6011: 6011: template 6011: friend shared_ptr<_Yp> 6011: allocate_shared(const _Alloc& __a, _Args&&... __args); 6011: 6011: 6011: shared_ptr(const weak_ptr<_Tp>& __r, std::nothrow_t) 6011: : __shared_ptr<_Tp>(__r, std::nothrow) { } 6011: 6011: friend class weak_ptr<_Tp>; 6011: }; 6011: # 382 "/usr/include/c++/8/bits/shared_ptr.h" 3 6011: template 6011: inline bool 6011: operator==(const shared_ptr<_Tp>& __a, const shared_ptr<_Up>& __b) noexcept 6011: { return __a.get() == __b.get(); } 6011: 6011: template 6011: inline bool 6011: operator==(const shared_ptr<_Tp>& __a, nullptr_t) noexcept 6011: { return !__a; } 6011: 6011: template 6011: inline bool 6011: operator==(nullptr_t, const shared_ptr<_Tp>& __a) noexcept 6011: { return !__a; } 6011: 6011: template 6011: inline bool 6011: operator!=(const shared_ptr<_Tp>& __a, const shared_ptr<_Up>& __b) noexcept 6011: { return __a.get() != __b.get(); } 6011: 6011: template 6011: inline bool 6011: operator!=(const shared_ptr<_Tp>& __a, nullptr_t) noexcept 6011: { return (bool)__a; } 6011: 6011: template 6011: inline bool 6011: operator!=(nullptr_t, const shared_ptr<_Tp>& __a) noexcept 6011: { return (bool)__a; } 6011: 6011: template 6011: inline bool 6011: operator<(const shared_ptr<_Tp>& __a, const shared_ptr<_Up>& __b) noexcept 6011: { 6011: using _Tp_elt = typename shared_ptr<_Tp>::element_type; 6011: using _Up_elt = typename shared_ptr<_Up>::element_type; 6011: using _Vp = typename common_type<_Tp_elt*, _Up_elt*>::type; 6011: return less<_Vp>()(__a.get(), __b.get()); 6011: } 6011: 6011: template 6011: inline bool 6011: operator<(const shared_ptr<_Tp>& __a, nullptr_t) noexcept 6011: { 6011: using _Tp_elt = typename shared_ptr<_Tp>::element_type; 6011: return less<_Tp_elt*>()(__a.get(), nullptr); 6011: } 6011: 6011: template 6011: inline bool 6011: operator<(nullptr_t, const shared_ptr<_Tp>& __a) noexcept 6011: { 6011: using _Tp_elt = typename shared_ptr<_Tp>::element_type; 6011: return less<_Tp_elt*>()(nullptr, __a.get()); 6011: } 6011: 6011: template 6011: inline bool 6011: operator<=(const shared_ptr<_Tp>& __a, const shared_ptr<_Up>& __b) noexcept 6011: { return !(__b < __a); } 6011: 6011: template 6011: inline bool 6011: operator<=(const shared_ptr<_Tp>& __a, nullptr_t) noexcept 6011: { return !(nullptr < __a); } 6011: 6011: template 6011: inline bool 6011: operator<=(nullptr_t, const shared_ptr<_Tp>& __a) noexcept 6011: { return !(__a < nullptr); } 6011: 6011: template 6011: inline bool 6011: operator>(const shared_ptr<_Tp>& __a, const shared_ptr<_Up>& __b) noexcept 6011: { return (__b < __a); } 6011: 6011: template 6011: inline bool 6011: operator>(const shared_ptr<_Tp>& __a, nullptr_t) noexcept 6011: { return nullptr < __a; } 6011: 6011: template 6011: inline bool 6011: operator>(nullptr_t, const shared_ptr<_Tp>& __a) noexcept 6011: { return __a < nullptr; } 6011: 6011: template 6011: inline bool 6011: operator>=(const shared_ptr<_Tp>& __a, const shared_ptr<_Up>& __b) noexcept 6011: { return !(__a < __b); } 6011: 6011: template 6011: inline bool 6011: operator>=(const shared_ptr<_Tp>& __a, nullptr_t) noexcept 6011: { return !(__a < nullptr); } 6011: 6011: template 6011: inline bool 6011: operator>=(nullptr_t, const shared_ptr<_Tp>& __a) noexcept 6011: { return !(nullptr < __a); } 6011: 6011: template 6011: struct less> : public _Sp_less> 6011: { }; 6011: 6011: 6011: template 6011: inline void 6011: swap(shared_ptr<_Tp>& __a, shared_ptr<_Tp>& __b) noexcept 6011: { __a.swap(__b); } 6011: 6011: 6011: template 6011: inline shared_ptr<_Tp> 6011: static_pointer_cast(const shared_ptr<_Up>& __r) noexcept 6011: { 6011: using _Sp = shared_ptr<_Tp>; 6011: return _Sp(__r, static_cast(__r.get())); 6011: } 6011: 6011: template 6011: inline shared_ptr<_Tp> 6011: const_pointer_cast(const shared_ptr<_Up>& __r) noexcept 6011: { 6011: using _Sp = shared_ptr<_Tp>; 6011: return _Sp(__r, const_cast(__r.get())); 6011: } 6011: 6011: template 6011: inline shared_ptr<_Tp> 6011: dynamic_pointer_cast(const shared_ptr<_Up>& __r) noexcept 6011: { 6011: using _Sp = shared_ptr<_Tp>; 6011: if (auto* __p = dynamic_cast(__r.get())) 6011: return _Sp(__r, __p); 6011: return _Sp(); 6011: } 6011: # 535 "/usr/include/c++/8/bits/shared_ptr.h" 3 6011: template 6011: class weak_ptr : public __weak_ptr<_Tp> 6011: { 6011: template 6011: using _Constructible = typename enable_if< 6011: is_constructible<__weak_ptr<_Tp>, _Arg>::value 6011: >::type; 6011: 6011: template 6011: using _Assignable = typename enable_if< 6011: is_assignable<__weak_ptr<_Tp>&, _Arg>::value, weak_ptr& 6011: >::type; 6011: 6011: public: 6011: constexpr weak_ptr() noexcept = default; 6011: 6011: template&>> 6011: weak_ptr(const shared_ptr<_Yp>& __r) noexcept 6011: : __weak_ptr<_Tp>(__r) { } 6011: 6011: weak_ptr(const weak_ptr&) noexcept = default; 6011: 6011: template&>> 6011: weak_ptr(const weak_ptr<_Yp>& __r) noexcept 6011: : __weak_ptr<_Tp>(__r) { } 6011: 6011: weak_ptr(weak_ptr&&) noexcept = default; 6011: 6011: template>> 6011: weak_ptr(weak_ptr<_Yp>&& __r) noexcept 6011: : __weak_ptr<_Tp>(std::move(__r)) { } 6011: 6011: weak_ptr& 6011: operator=(const weak_ptr& __r) noexcept = default; 6011: 6011: template 6011: _Assignable&> 6011: operator=(const weak_ptr<_Yp>& __r) noexcept 6011: { 6011: this->__weak_ptr<_Tp>::operator=(__r); 6011: return *this; 6011: } 6011: 6011: template 6011: _Assignable&> 6011: operator=(const shared_ptr<_Yp>& __r) noexcept 6011: { 6011: this->__weak_ptr<_Tp>::operator=(__r); 6011: return *this; 6011: } 6011: 6011: weak_ptr& 6011: operator=(weak_ptr&& __r) noexcept = default; 6011: 6011: template 6011: _Assignable> 6011: operator=(weak_ptr<_Yp>&& __r) noexcept 6011: { 6011: this->__weak_ptr<_Tp>::operator=(std::move(__r)); 6011: return *this; 6011: } 6011: 6011: shared_ptr<_Tp> 6011: lock() const noexcept 6011: { return shared_ptr<_Tp>(*this, std::nothrow); } 6011: }; 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: template 6011: inline void 6011: swap(weak_ptr<_Tp>& __a, weak_ptr<_Tp>& __b) noexcept 6011: { __a.swap(__b); } 6011: 6011: 6011: 6011: template 6011: struct owner_less; 6011: 6011: 6011: template<> 6011: struct owner_less : _Sp_owner_less 6011: { }; 6011: 6011: 6011: template 6011: struct owner_less> 6011: : public _Sp_owner_less, weak_ptr<_Tp>> 6011: { }; 6011: 6011: 6011: template 6011: struct owner_less> 6011: : public _Sp_owner_less, shared_ptr<_Tp>> 6011: { }; 6011: 6011: 6011: 6011: 6011: template 6011: class enable_shared_from_this 6011: { 6011: protected: 6011: constexpr enable_shared_from_this() noexcept { } 6011: 6011: enable_shared_from_this(const enable_shared_from_this&) noexcept { } 6011: 6011: enable_shared_from_this& 6011: operator=(const enable_shared_from_this&) noexcept 6011: { return *this; } 6011: 6011: ~enable_shared_from_this() { } 6011: 6011: public: 6011: shared_ptr<_Tp> 6011: shared_from_this() 6011: { return shared_ptr<_Tp>(this->_M_weak_this); } 6011: 6011: shared_ptr 6011: shared_from_this() const 6011: { return shared_ptr(this->_M_weak_this); } 6011: 6011: 6011: 6011: weak_ptr<_Tp> 6011: weak_from_this() noexcept 6011: { return this->_M_weak_this; } 6011: 6011: weak_ptr 6011: weak_from_this() const noexcept 6011: { return this->_M_weak_this; } 6011: 6011: 6011: private: 6011: template 6011: void 6011: _M_weak_assign(_Tp1* __p, const __shared_count<>& __n) const noexcept 6011: { _M_weak_this._M_assign(__p, __n); } 6011: 6011: 6011: friend const enable_shared_from_this* 6011: __enable_shared_from_this_base(const __shared_count<>&, 6011: const enable_shared_from_this* __p) 6011: { return __p; } 6011: 6011: template 6011: friend class __shared_ptr; 6011: 6011: mutable weak_ptr<_Tp> _M_weak_this; 6011: }; 6011: # 702 "/usr/include/c++/8/bits/shared_ptr.h" 3 6011: template 6011: inline shared_ptr<_Tp> 6011: allocate_shared(const _Alloc& __a, _Args&&... __args) 6011: { 6011: return shared_ptr<_Tp>(_Sp_make_shared_tag(), __a, 6011: std::forward<_Args>(__args)...); 6011: } 6011: # 717 "/usr/include/c++/8/bits/shared_ptr.h" 3 6011: template 6011: inline shared_ptr<_Tp> 6011: make_shared(_Args&&... __args) 6011: { 6011: typedef typename std::remove_const<_Tp>::type _Tp_nc; 6011: return std::allocate_shared<_Tp>(std::allocator<_Tp_nc>(), 6011: std::forward<_Args>(__args)...); 6011: } 6011: 6011: 6011: template 6011: struct hash> 6011: : public __hash_base> 6011: { 6011: size_t 6011: operator()(const shared_ptr<_Tp>& __s) const noexcept 6011: { 6011: return std::hash::element_type*>()(__s.get()); 6011: } 6011: }; 6011: 6011: 6011: 6011: 6011: } 6011: # 82 "/usr/include/c++/8/memory" 2 3 6011: # 1 "/usr/include/c++/8/bits/shared_ptr_atomic.h" 1 3 6011: # 33 "/usr/include/c++/8/bits/shared_ptr_atomic.h" 3 6011: # 1 "/usr/include/c++/8/bits/atomic_base.h" 1 3 6011: # 33 "/usr/include/c++/8/bits/atomic_base.h" 3 6011: 6011: # 34 "/usr/include/c++/8/bits/atomic_base.h" 3 6011: 6011: 6011: 6011: # 1 "/usr/include/c++/8/bits/atomic_lockfree_defines.h" 1 3 6011: # 33 "/usr/include/c++/8/bits/atomic_lockfree_defines.h" 3 6011: 6011: # 34 "/usr/include/c++/8/bits/atomic_lockfree_defines.h" 3 6011: # 38 "/usr/include/c++/8/bits/atomic_base.h" 2 3 6011: 6011: 6011: 6011: 6011: 6011: namespace std __attribute__ ((__visibility__ ("default"))) 6011: { 6011: 6011: # 55 "/usr/include/c++/8/bits/atomic_base.h" 3 6011: typedef enum memory_order 6011: { 6011: memory_order_relaxed, 6011: memory_order_consume, 6011: memory_order_acquire, 6011: memory_order_release, 6011: memory_order_acq_rel, 6011: memory_order_seq_cst 6011: } memory_order; 6011: 6011: enum __memory_order_modifier 6011: { 6011: __memory_order_mask = 0x0ffff, 6011: __memory_order_modifier_mask = 0xffff0000, 6011: __memory_order_hle_acquire = 0x10000, 6011: __memory_order_hle_release = 0x20000 6011: }; 6011: 6011: constexpr memory_order 6011: operator|(memory_order __m, __memory_order_modifier __mod) 6011: { 6011: return memory_order(__m | int(__mod)); 6011: } 6011: 6011: constexpr memory_order 6011: operator&(memory_order __m, __memory_order_modifier __mod) 6011: { 6011: return memory_order(__m & int(__mod)); 6011: } 6011: 6011: 6011: constexpr memory_order 6011: __cmpexch_failure_order2(memory_order __m) noexcept 6011: { 6011: return __m == memory_order_acq_rel ? memory_order_acquire 6011: : __m == memory_order_release ? memory_order_relaxed : __m; 6011: } 6011: 6011: constexpr memory_order 6011: __cmpexch_failure_order(memory_order __m) noexcept 6011: { 6011: return memory_order(__cmpexch_failure_order2(__m & __memory_order_mask) 6011: | (__m & __memory_order_modifier_mask)); 6011: } 6011: 6011: inline __attribute__((__always_inline__)) void 6011: atomic_thread_fence(memory_order __m) noexcept 6011: { __atomic_thread_fence(__m); } 6011: 6011: inline __attribute__((__always_inline__)) void 6011: atomic_signal_fence(memory_order __m) noexcept 6011: { __atomic_signal_fence(__m); } 6011: 6011: 6011: template 6011: inline _Tp 6011: kill_dependency(_Tp __y) noexcept 6011: { 6011: _Tp __ret(__y); 6011: return __ret; 6011: } 6011: 6011: 6011: 6011: template 6011: struct __atomic_base; 6011: 6011: 6011: 6011: 6011: template 6011: struct atomic; 6011: 6011: template 6011: struct atomic<_Tp*>; 6011: 6011: 6011: 6011: typedef bool __atomic_flag_data_type; 6011: # 148 "/usr/include/c++/8/bits/atomic_base.h" 3 6011: extern "C" { 6011: 6011: struct __atomic_flag_base 6011: { 6011: __atomic_flag_data_type _M_i; 6011: }; 6011: 6011: } 6011: 6011: 6011: 6011: 6011: struct atomic_flag : public __atomic_flag_base 6011: { 6011: atomic_flag() noexcept = default; 6011: ~atomic_flag() noexcept = default; 6011: atomic_flag(const atomic_flag&) = delete; 6011: atomic_flag& operator=(const atomic_flag&) = delete; 6011: atomic_flag& operator=(const atomic_flag&) volatile = delete; 6011: 6011: 6011: constexpr atomic_flag(bool __i) noexcept 6011: : __atomic_flag_base{ _S_init(__i) } 6011: { } 6011: 6011: inline __attribute__((__always_inline__)) bool 6011: test_and_set(memory_order __m = memory_order_seq_cst) noexcept 6011: { 6011: return __atomic_test_and_set (&_M_i, __m); 6011: } 6011: 6011: inline __attribute__((__always_inline__)) bool 6011: test_and_set(memory_order __m = memory_order_seq_cst) volatile noexcept 6011: { 6011: return __atomic_test_and_set (&_M_i, __m); 6011: } 6011: 6011: inline __attribute__((__always_inline__)) void 6011: clear(memory_order __m = memory_order_seq_cst) noexcept 6011: { 6011: memory_order __b = __m & __memory_order_mask; 6011: ; 6011: ; 6011: ; 6011: 6011: __atomic_clear (&_M_i, __m); 6011: } 6011: 6011: inline __attribute__((__always_inline__)) void 6011: clear(memory_order __m = memory_order_seq_cst) volatile noexcept 6011: { 6011: memory_order __b = __m & __memory_order_mask; 6011: ; 6011: ; 6011: ; 6011: 6011: __atomic_clear (&_M_i, __m); 6011: } 6011: 6011: private: 6011: static constexpr __atomic_flag_data_type 6011: _S_init(bool __i) 6011: { return __i ? 1 : 0; } 6011: }; 6011: # 237 "/usr/include/c++/8/bits/atomic_base.h" 3 6011: template 6011: struct __atomic_base 6011: { 6011: private: 6011: typedef _ITp __int_type; 6011: 6011: static constexpr int _S_alignment = 6011: sizeof(_ITp) > alignof(_ITp) ? sizeof(_ITp) : alignof(_ITp); 6011: 6011: alignas(_S_alignment) __int_type _M_i; 6011: 6011: public: 6011: __atomic_base() noexcept = default; 6011: ~__atomic_base() noexcept = default; 6011: __atomic_base(const __atomic_base&) = delete; 6011: __atomic_base& operator=(const __atomic_base&) = delete; 6011: __atomic_base& operator=(const __atomic_base&) volatile = delete; 6011: 6011: 6011: constexpr __atomic_base(__int_type __i) noexcept : _M_i (__i) { } 6011: 6011: operator __int_type() const noexcept 6011: { return load(); } 6011: 6011: operator __int_type() const volatile noexcept 6011: { return load(); } 6011: 6011: __int_type 6011: operator=(__int_type __i) noexcept 6011: { 6011: store(__i); 6011: return __i; 6011: } 6011: 6011: __int_type 6011: operator=(__int_type __i) volatile noexcept 6011: { 6011: store(__i); 6011: return __i; 6011: } 6011: 6011: __int_type 6011: operator++(int) noexcept 6011: { return fetch_add(1); } 6011: 6011: __int_type 6011: operator++(int) volatile noexcept 6011: { return fetch_add(1); } 6011: 6011: __int_type 6011: operator--(int) noexcept 6011: { return fetch_sub(1); } 6011: 6011: __int_type 6011: operator--(int) volatile noexcept 6011: { return fetch_sub(1); } 6011: 6011: __int_type 6011: operator++() noexcept 6011: { return __atomic_add_fetch(&_M_i, 1, memory_order_seq_cst); } 6011: 6011: __int_type 6011: operator++() volatile noexcept 6011: { return __atomic_add_fetch(&_M_i, 1, memory_order_seq_cst); } 6011: 6011: __int_type 6011: operator--() noexcept 6011: { return __atomic_sub_fetch(&_M_i, 1, memory_order_seq_cst); } 6011: 6011: __int_type 6011: operator--() volatile noexcept 6011: { return __atomic_sub_fetch(&_M_i, 1, memory_order_seq_cst); } 6011: 6011: __int_type 6011: operator+=(__int_type __i) noexcept 6011: { return __atomic_add_fetch(&_M_i, __i, memory_order_seq_cst); } 6011: 6011: __int_type 6011: operator+=(__int_type __i) volatile noexcept 6011: { return __atomic_add_fetch(&_M_i, __i, memory_order_seq_cst); } 6011: 6011: __int_type 6011: operator-=(__int_type __i) noexcept 6011: { return __atomic_sub_fetch(&_M_i, __i, memory_order_seq_cst); } 6011: 6011: __int_type 6011: operator-=(__int_type __i) volatile noexcept 6011: { return __atomic_sub_fetch(&_M_i, __i, memory_order_seq_cst); } 6011: 6011: __int_type 6011: operator&=(__int_type __i) noexcept 6011: { return __atomic_and_fetch(&_M_i, __i, memory_order_seq_cst); } 6011: 6011: __int_type 6011: operator&=(__int_type __i) volatile noexcept 6011: { return __atomic_and_fetch(&_M_i, __i, memory_order_seq_cst); } 6011: 6011: __int_type 6011: operator|=(__int_type __i) noexcept 6011: { return __atomic_or_fetch(&_M_i, __i, memory_order_seq_cst); } 6011: 6011: __int_type 6011: operator|=(__int_type __i) volatile noexcept 6011: { return __atomic_or_fetch(&_M_i, __i, memory_order_seq_cst); } 6011: 6011: __int_type 6011: operator^=(__int_type __i) noexcept 6011: { return __atomic_xor_fetch(&_M_i, __i, memory_order_seq_cst); } 6011: 6011: __int_type 6011: operator^=(__int_type __i) volatile noexcept 6011: { return __atomic_xor_fetch(&_M_i, __i, memory_order_seq_cst); } 6011: 6011: bool 6011: is_lock_free() const noexcept 6011: { 6011: 6011: return __atomic_is_lock_free(sizeof(_M_i), 6011: reinterpret_cast(-__alignof(_M_i))); 6011: } 6011: 6011: bool 6011: is_lock_free() const volatile noexcept 6011: { 6011: 6011: return __atomic_is_lock_free(sizeof(_M_i), 6011: reinterpret_cast(-__alignof(_M_i))); 6011: } 6011: 6011: inline __attribute__((__always_inline__)) void 6011: store(__int_type __i, memory_order __m = memory_order_seq_cst) noexcept 6011: { 6011: memory_order __b = __m & __memory_order_mask; 6011: ; 6011: ; 6011: ; 6011: 6011: __atomic_store_n(&_M_i, __i, __m); 6011: } 6011: 6011: inline __attribute__((__always_inline__)) void 6011: store(__int_type __i, 6011: memory_order __m = memory_order_seq_cst) volatile noexcept 6011: { 6011: memory_order __b = __m & __memory_order_mask; 6011: ; 6011: ; 6011: ; 6011: 6011: __atomic_store_n(&_M_i, __i, __m); 6011: } 6011: 6011: inline __attribute__((__always_inline__)) __int_type 6011: load(memory_order __m = memory_order_seq_cst) const noexcept 6011: { 6011: memory_order __b = __m & __memory_order_mask; 6011: ; 6011: ; 6011: 6011: return __atomic_load_n(&_M_i, __m); 6011: } 6011: 6011: inline __attribute__((__always_inline__)) __int_type 6011: load(memory_order __m = memory_order_seq_cst) const volatile noexcept 6011: { 6011: memory_order __b = __m & __memory_order_mask; 6011: ; 6011: ; 6011: 6011: return __atomic_load_n(&_M_i, __m); 6011: } 6011: 6011: inline __attribute__((__always_inline__)) __int_type 6011: exchange(__int_type __i, 6011: memory_order __m = memory_order_seq_cst) noexcept 6011: { 6011: return __atomic_exchange_n(&_M_i, __i, __m); 6011: } 6011: 6011: 6011: inline __attribute__((__always_inline__)) __int_type 6011: exchange(__int_type __i, 6011: memory_order __m = memory_order_seq_cst) volatile noexcept 6011: { 6011: return __atomic_exchange_n(&_M_i, __i, __m); 6011: } 6011: 6011: inline __attribute__((__always_inline__)) bool 6011: compare_exchange_weak(__int_type& __i1, __int_type __i2, 6011: memory_order __m1, memory_order __m2) noexcept 6011: { 6011: memory_order __b2 = __m2 & __memory_order_mask; 6011: memory_order __b1 = __m1 & __memory_order_mask; 6011: ; 6011: ; 6011: ; 6011: 6011: return __atomic_compare_exchange_n(&_M_i, &__i1, __i2, 1, __m1, __m2); 6011: } 6011: 6011: inline __attribute__((__always_inline__)) bool 6011: compare_exchange_weak(__int_type& __i1, __int_type __i2, 6011: memory_order __m1, 6011: memory_order __m2) volatile noexcept 6011: { 6011: memory_order __b2 = __m2 & __memory_order_mask; 6011: memory_order __b1 = __m1 & __memory_order_mask; 6011: ; 6011: ; 6011: ; 6011: 6011: return __atomic_compare_exchange_n(&_M_i, &__i1, __i2, 1, __m1, __m2); 6011: } 6011: 6011: inline __attribute__((__always_inline__)) bool 6011: compare_exchange_weak(__int_type& __i1, __int_type __i2, 6011: memory_order __m = memory_order_seq_cst) noexcept 6011: { 6011: return compare_exchange_weak(__i1, __i2, __m, 6011: __cmpexch_failure_order(__m)); 6011: } 6011: 6011: inline __attribute__((__always_inline__)) bool 6011: compare_exchange_weak(__int_type& __i1, __int_type __i2, 6011: memory_order __m = memory_order_seq_cst) volatile noexcept 6011: { 6011: return compare_exchange_weak(__i1, __i2, __m, 6011: __cmpexch_failure_order(__m)); 6011: } 6011: 6011: inline __attribute__((__always_inline__)) bool 6011: compare_exchange_strong(__int_type& __i1, __int_type __i2, 6011: memory_order __m1, memory_order __m2) noexcept 6011: { 6011: memory_order __b2 = __m2 & __memory_order_mask; 6011: memory_order __b1 = __m1 & __memory_order_mask; 6011: ; 6011: ; 6011: ; 6011: 6011: return __atomic_compare_exchange_n(&_M_i, &__i1, __i2, 0, __m1, __m2); 6011: } 6011: 6011: inline __attribute__((__always_inline__)) bool 6011: compare_exchange_strong(__int_type& __i1, __int_type __i2, 6011: memory_order __m1, 6011: memory_order __m2) volatile noexcept 6011: { 6011: memory_order __b2 = __m2 & __memory_order_mask; 6011: memory_order __b1 = __m1 & __memory_order_mask; 6011: 6011: ; 6011: ; 6011: ; 6011: 6011: return __atomic_compare_exchange_n(&_M_i, &__i1, __i2, 0, __m1, __m2); 6011: } 6011: 6011: inline __attribute__((__always_inline__)) bool 6011: compare_exchange_strong(__int_type& __i1, __int_type __i2, 6011: memory_order __m = memory_order_seq_cst) noexcept 6011: { 6011: return compare_exchange_strong(__i1, __i2, __m, 6011: __cmpexch_failure_order(__m)); 6011: } 6011: 6011: inline __attribute__((__always_inline__)) bool 6011: compare_exchange_strong(__int_type& __i1, __int_type __i2, 6011: memory_order __m = memory_order_seq_cst) volatile noexcept 6011: { 6011: return compare_exchange_strong(__i1, __i2, __m, 6011: __cmpexch_failure_order(__m)); 6011: } 6011: 6011: inline __attribute__((__always_inline__)) __int_type 6011: fetch_add(__int_type __i, 6011: memory_order __m = memory_order_seq_cst) noexcept 6011: { return __atomic_fetch_add(&_M_i, __i, __m); } 6011: 6011: inline __attribute__((__always_inline__)) __int_type 6011: fetch_add(__int_type __i, 6011: memory_order __m = memory_order_seq_cst) volatile noexcept 6011: { return __atomic_fetch_add(&_M_i, __i, __m); } 6011: 6011: inline __attribute__((__always_inline__)) __int_type 6011: fetch_sub(__int_type __i, 6011: memory_order __m = memory_order_seq_cst) noexcept 6011: { return __atomic_fetch_sub(&_M_i, __i, __m); } 6011: 6011: inline __attribute__((__always_inline__)) __int_type 6011: fetch_sub(__int_type __i, 6011: memory_order __m = memory_order_seq_cst) volatile noexcept 6011: { return __atomic_fetch_sub(&_M_i, __i, __m); } 6011: 6011: inline __attribute__((__always_inline__)) __int_type 6011: fetch_and(__int_type __i, 6011: memory_order __m = memory_order_seq_cst) noexcept 6011: { return __atomic_fetch_and(&_M_i, __i, __m); } 6011: 6011: inline __attribute__((__always_inline__)) __int_type 6011: fetch_and(__int_type __i, 6011: memory_order __m = memory_order_seq_cst) volatile noexcept 6011: { return __atomic_fetch_and(&_M_i, __i, __m); } 6011: 6011: inline __attribute__((__always_inline__)) __int_type 6011: fetch_or(__int_type __i, 6011: memory_order __m = memory_order_seq_cst) noexcept 6011: { return __atomic_fetch_or(&_M_i, __i, __m); } 6011: 6011: inline __attribute__((__always_inline__)) __int_type 6011: fetch_or(__int_type __i, 6011: memory_order __m = memory_order_seq_cst) volatile noexcept 6011: { return __atomic_fetch_or(&_M_i, __i, __m); } 6011: 6011: inline __attribute__((__always_inline__)) __int_type 6011: fetch_xor(__int_type __i, 6011: memory_order __m = memory_order_seq_cst) noexcept 6011: { return __atomic_fetch_xor(&_M_i, __i, __m); } 6011: 6011: inline __attribute__((__always_inline__)) __int_type 6011: fetch_xor(__int_type __i, 6011: memory_order __m = memory_order_seq_cst) volatile noexcept 6011: { return __atomic_fetch_xor(&_M_i, __i, __m); } 6011: }; 6011: 6011: 6011: 6011: template 6011: struct __atomic_base<_PTp*> 6011: { 6011: private: 6011: typedef _PTp* __pointer_type; 6011: 6011: __pointer_type _M_p; 6011: 6011: 6011: constexpr ptrdiff_t 6011: _M_type_size(ptrdiff_t __d) const { return __d * sizeof(_PTp); } 6011: 6011: constexpr ptrdiff_t 6011: _M_type_size(ptrdiff_t __d) const volatile { return __d * sizeof(_PTp); } 6011: 6011: public: 6011: __atomic_base() noexcept = default; 6011: ~__atomic_base() noexcept = default; 6011: __atomic_base(const __atomic_base&) = delete; 6011: __atomic_base& operator=(const __atomic_base&) = delete; 6011: __atomic_base& operator=(const __atomic_base&) volatile = delete; 6011: 6011: 6011: constexpr __atomic_base(__pointer_type __p) noexcept : _M_p (__p) { } 6011: 6011: operator __pointer_type() const noexcept 6011: { return load(); } 6011: 6011: operator __pointer_type() const volatile noexcept 6011: { return load(); } 6011: 6011: __pointer_type 6011: operator=(__pointer_type __p) noexcept 6011: { 6011: store(__p); 6011: return __p; 6011: } 6011: 6011: __pointer_type 6011: operator=(__pointer_type __p) volatile noexcept 6011: { 6011: store(__p); 6011: return __p; 6011: } 6011: 6011: __pointer_type 6011: operator++(int) noexcept 6011: { return fetch_add(1); } 6011: 6011: __pointer_type 6011: operator++(int) volatile noexcept 6011: { return fetch_add(1); } 6011: 6011: __pointer_type 6011: operator--(int) noexcept 6011: { return fetch_sub(1); } 6011: 6011: __pointer_type 6011: operator--(int) volatile noexcept 6011: { return fetch_sub(1); } 6011: 6011: __pointer_type 6011: operator++() noexcept 6011: { return __atomic_add_fetch(&_M_p, _M_type_size(1), 6011: memory_order_seq_cst); } 6011: 6011: __pointer_type 6011: operator++() volatile noexcept 6011: { return __atomic_add_fetch(&_M_p, _M_type_size(1), 6011: memory_order_seq_cst); } 6011: 6011: __pointer_type 6011: operator--() noexcept 6011: { return __atomic_sub_fetch(&_M_p, _M_type_size(1), 6011: memory_order_seq_cst); } 6011: 6011: __pointer_type 6011: operator--() volatile noexcept 6011: { return __atomic_sub_fetch(&_M_p, _M_type_size(1), 6011: memory_order_seq_cst); } 6011: 6011: __pointer_type 6011: operator+=(ptrdiff_t __d) noexcept 6011: { return __atomic_add_fetch(&_M_p, _M_type_size(__d), 6011: memory_order_seq_cst); } 6011: 6011: __pointer_type 6011: operator+=(ptrdiff_t __d) volatile noexcept 6011: { return __atomic_add_fetch(&_M_p, _M_type_size(__d), 6011: memory_order_seq_cst); } 6011: 6011: __pointer_type 6011: operator-=(ptrdiff_t __d) noexcept 6011: { return __atomic_sub_fetch(&_M_p, _M_type_size(__d), 6011: memory_order_seq_cst); } 6011: 6011: __pointer_type 6011: operator-=(ptrdiff_t __d) volatile noexcept 6011: { return __atomic_sub_fetch(&_M_p, _M_type_size(__d), 6011: memory_order_seq_cst); } 6011: 6011: bool 6011: is_lock_free() const noexcept 6011: { 6011: 6011: return __atomic_is_lock_free(sizeof(_M_p), 6011: reinterpret_cast(-__alignof(_M_p))); 6011: } 6011: 6011: bool 6011: is_lock_free() const volatile noexcept 6011: { 6011: 6011: return __atomic_is_lock_free(sizeof(_M_p), 6011: reinterpret_cast(-__alignof(_M_p))); 6011: } 6011: 6011: inline __attribute__((__always_inline__)) void 6011: store(__pointer_type __p, 6011: memory_order __m = memory_order_seq_cst) noexcept 6011: { 6011: memory_order __b = __m & __memory_order_mask; 6011: 6011: ; 6011: ; 6011: ; 6011: 6011: __atomic_store_n(&_M_p, __p, __m); 6011: } 6011: 6011: inline __attribute__((__always_inline__)) void 6011: store(__pointer_type __p, 6011: memory_order __m = memory_order_seq_cst) volatile noexcept 6011: { 6011: memory_order __b = __m & __memory_order_mask; 6011: ; 6011: ; 6011: ; 6011: 6011: __atomic_store_n(&_M_p, __p, __m); 6011: } 6011: 6011: inline __attribute__((__always_inline__)) __pointer_type 6011: load(memory_order __m = memory_order_seq_cst) const noexcept 6011: { 6011: memory_order __b = __m & __memory_order_mask; 6011: ; 6011: ; 6011: 6011: return __atomic_load_n(&_M_p, __m); 6011: } 6011: 6011: inline __attribute__((__always_inline__)) __pointer_type 6011: load(memory_order __m = memory_order_seq_cst) const volatile noexcept 6011: { 6011: memory_order __b = __m & __memory_order_mask; 6011: ; 6011: ; 6011: 6011: return __atomic_load_n(&_M_p, __m); 6011: } 6011: 6011: inline __attribute__((__always_inline__)) __pointer_type 6011: exchange(__pointer_type __p, 6011: memory_order __m = memory_order_seq_cst) noexcept 6011: { 6011: return __atomic_exchange_n(&_M_p, __p, __m); 6011: } 6011: 6011: 6011: inline __attribute__((__always_inline__)) __pointer_type 6011: exchange(__pointer_type __p, 6011: memory_order __m = memory_order_seq_cst) volatile noexcept 6011: { 6011: return __atomic_exchange_n(&_M_p, __p, __m); 6011: } 6011: 6011: inline __attribute__((__always_inline__)) bool 6011: compare_exchange_strong(__pointer_type& __p1, __pointer_type __p2, 6011: memory_order __m1, 6011: memory_order __m2) noexcept 6011: { 6011: memory_order __b2 = __m2 & __memory_order_mask; 6011: memory_order __b1 = __m1 & __memory_order_mask; 6011: ; 6011: ; 6011: ; 6011: 6011: return __atomic_compare_exchange_n(&_M_p, &__p1, __p2, 0, __m1, __m2); 6011: } 6011: 6011: inline __attribute__((__always_inline__)) bool 6011: compare_exchange_strong(__pointer_type& __p1, __pointer_type __p2, 6011: memory_order __m1, 6011: memory_order __m2) volatile noexcept 6011: { 6011: memory_order __b2 = __m2 & __memory_order_mask; 6011: memory_order __b1 = __m1 & __memory_order_mask; 6011: 6011: ; 6011: ; 6011: ; 6011: 6011: return __atomic_compare_exchange_n(&_M_p, &__p1, __p2, 0, __m1, __m2); 6011: } 6011: 6011: inline __attribute__((__always_inline__)) __pointer_type 6011: fetch_add(ptrdiff_t __d, 6011: memory_order __m = memory_order_seq_cst) noexcept 6011: { return __atomic_fetch_add(&_M_p, _M_type_size(__d), __m); } 6011: 6011: inline __attribute__((__always_inline__)) __pointer_type 6011: fetch_add(ptrdiff_t __d, 6011: memory_order __m = memory_order_seq_cst) volatile noexcept 6011: { return __atomic_fetch_add(&_M_p, _M_type_size(__d), __m); } 6011: 6011: inline __attribute__((__always_inline__)) __pointer_type 6011: fetch_sub(ptrdiff_t __d, 6011: memory_order __m = memory_order_seq_cst) noexcept 6011: { return __atomic_fetch_sub(&_M_p, _M_type_size(__d), __m); } 6011: 6011: inline __attribute__((__always_inline__)) __pointer_type 6011: fetch_sub(ptrdiff_t __d, 6011: memory_order __m = memory_order_seq_cst) volatile noexcept 6011: { return __atomic_fetch_sub(&_M_p, _M_type_size(__d), __m); } 6011: }; 6011: 6011: 6011: 6011: 6011: } 6011: # 34 "/usr/include/c++/8/bits/shared_ptr_atomic.h" 2 3 6011: 6011: namespace std __attribute__ ((__visibility__ ("default"))) 6011: { 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: struct _Sp_locker 6011: { 6011: _Sp_locker(const _Sp_locker&) = delete; 6011: _Sp_locker& operator=(const _Sp_locker&) = delete; 6011: 6011: 6011: explicit 6011: _Sp_locker(const void*) noexcept; 6011: _Sp_locker(const void*, const void*) noexcept; 6011: ~_Sp_locker(); 6011: 6011: private: 6011: unsigned char _M_key1; 6011: unsigned char _M_key2; 6011: 6011: 6011: 6011: }; 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: template 6011: inline bool 6011: atomic_is_lock_free(const __shared_ptr<_Tp, _Lp>* __p) 6011: { 6011: 6011: return __gthread_active_p() == 0; 6011: 6011: 6011: 6011: } 6011: 6011: template 6011: inline bool 6011: atomic_is_lock_free(const shared_ptr<_Tp>* __p) 6011: { return std::atomic_is_lock_free<_Tp, __default_lock_policy>(__p); } 6011: # 96 "/usr/include/c++/8/bits/shared_ptr_atomic.h" 3 6011: template 6011: inline shared_ptr<_Tp> 6011: atomic_load_explicit(const shared_ptr<_Tp>* __p, memory_order) 6011: { 6011: _Sp_locker __lock{__p}; 6011: return *__p; 6011: } 6011: 6011: template 6011: inline shared_ptr<_Tp> 6011: atomic_load(const shared_ptr<_Tp>* __p) 6011: { return std::atomic_load_explicit(__p, memory_order_seq_cst); } 6011: 6011: template 6011: inline __shared_ptr<_Tp, _Lp> 6011: atomic_load_explicit(const __shared_ptr<_Tp, _Lp>* __p, memory_order) 6011: { 6011: _Sp_locker __lock{__p}; 6011: return *__p; 6011: } 6011: 6011: template 6011: inline __shared_ptr<_Tp, _Lp> 6011: atomic_load(const __shared_ptr<_Tp, _Lp>* __p) 6011: { return std::atomic_load_explicit(__p, memory_order_seq_cst); } 6011: # 132 "/usr/include/c++/8/bits/shared_ptr_atomic.h" 3 6011: template 6011: inline void 6011: atomic_store_explicit(shared_ptr<_Tp>* __p, shared_ptr<_Tp> __r, 6011: memory_order) 6011: { 6011: _Sp_locker __lock{__p}; 6011: __p->swap(__r); 6011: } 6011: 6011: template 6011: inline void 6011: atomic_store(shared_ptr<_Tp>* __p, shared_ptr<_Tp> __r) 6011: { std::atomic_store_explicit(__p, std::move(__r), memory_order_seq_cst); } 6011: 6011: template 6011: inline void 6011: atomic_store_explicit(__shared_ptr<_Tp, _Lp>* __p, 6011: __shared_ptr<_Tp, _Lp> __r, 6011: memory_order) 6011: { 6011: _Sp_locker __lock{__p}; 6011: __p->swap(__r); 6011: } 6011: 6011: template 6011: inline void 6011: atomic_store(__shared_ptr<_Tp, _Lp>* __p, __shared_ptr<_Tp, _Lp> __r) 6011: { std::atomic_store_explicit(__p, std::move(__r), memory_order_seq_cst); } 6011: # 169 "/usr/include/c++/8/bits/shared_ptr_atomic.h" 3 6011: template 6011: inline shared_ptr<_Tp> 6011: atomic_exchange_explicit(shared_ptr<_Tp>* __p, shared_ptr<_Tp> __r, 6011: memory_order) 6011: { 6011: _Sp_locker __lock{__p}; 6011: __p->swap(__r); 6011: return __r; 6011: } 6011: 6011: template 6011: inline shared_ptr<_Tp> 6011: atomic_exchange(shared_ptr<_Tp>* __p, shared_ptr<_Tp> __r) 6011: { 6011: return std::atomic_exchange_explicit(__p, std::move(__r), 6011: memory_order_seq_cst); 6011: } 6011: 6011: template 6011: inline __shared_ptr<_Tp, _Lp> 6011: atomic_exchange_explicit(__shared_ptr<_Tp, _Lp>* __p, 6011: __shared_ptr<_Tp, _Lp> __r, 6011: memory_order) 6011: { 6011: _Sp_locker __lock{__p}; 6011: __p->swap(__r); 6011: return __r; 6011: } 6011: 6011: template 6011: inline __shared_ptr<_Tp, _Lp> 6011: atomic_exchange(__shared_ptr<_Tp, _Lp>* __p, __shared_ptr<_Tp, _Lp> __r) 6011: { 6011: return std::atomic_exchange_explicit(__p, std::move(__r), 6011: memory_order_seq_cst); 6011: } 6011: # 218 "/usr/include/c++/8/bits/shared_ptr_atomic.h" 3 6011: template 6011: bool 6011: atomic_compare_exchange_strong_explicit(shared_ptr<_Tp>* __p, 6011: shared_ptr<_Tp>* __v, 6011: shared_ptr<_Tp> __w, 6011: memory_order, 6011: memory_order) 6011: { 6011: shared_ptr<_Tp> __x; 6011: _Sp_locker __lock{__p, __v}; 6011: owner_less> __less; 6011: if (*__p == *__v && !__less(*__p, *__v) && !__less(*__v, *__p)) 6011: { 6011: __x = std::move(*__p); 6011: *__p = std::move(__w); 6011: return true; 6011: } 6011: __x = std::move(*__v); 6011: *__v = *__p; 6011: return false; 6011: } 6011: 6011: template 6011: inline bool 6011: atomic_compare_exchange_strong(shared_ptr<_Tp>* __p, shared_ptr<_Tp>* __v, 6011: shared_ptr<_Tp> __w) 6011: { 6011: return std::atomic_compare_exchange_strong_explicit(__p, __v, 6011: std::move(__w), memory_order_seq_cst, memory_order_seq_cst); 6011: } 6011: 6011: template 6011: inline bool 6011: atomic_compare_exchange_weak_explicit(shared_ptr<_Tp>* __p, 6011: shared_ptr<_Tp>* __v, 6011: shared_ptr<_Tp> __w, 6011: memory_order __success, 6011: memory_order __failure) 6011: { 6011: return std::atomic_compare_exchange_strong_explicit(__p, __v, 6011: std::move(__w), __success, __failure); 6011: } 6011: 6011: template 6011: inline bool 6011: atomic_compare_exchange_weak(shared_ptr<_Tp>* __p, shared_ptr<_Tp>* __v, 6011: shared_ptr<_Tp> __w) 6011: { 6011: return std::atomic_compare_exchange_weak_explicit(__p, __v, 6011: std::move(__w), memory_order_seq_cst, memory_order_seq_cst); 6011: } 6011: 6011: template 6011: bool 6011: atomic_compare_exchange_strong_explicit(__shared_ptr<_Tp, _Lp>* __p, 6011: __shared_ptr<_Tp, _Lp>* __v, 6011: __shared_ptr<_Tp, _Lp> __w, 6011: memory_order, 6011: memory_order) 6011: { 6011: __shared_ptr<_Tp, _Lp> __x; 6011: _Sp_locker __lock{__p, __v}; 6011: owner_less<__shared_ptr<_Tp, _Lp>> __less; 6011: if (*__p == *__v && !__less(*__p, *__v) && !__less(*__v, *__p)) 6011: { 6011: __x = std::move(*__p); 6011: *__p = std::move(__w); 6011: return true; 6011: } 6011: __x = std::move(*__v); 6011: *__v = *__p; 6011: return false; 6011: } 6011: 6011: template 6011: inline bool 6011: atomic_compare_exchange_strong(__shared_ptr<_Tp, _Lp>* __p, 6011: __shared_ptr<_Tp, _Lp>* __v, 6011: __shared_ptr<_Tp, _Lp> __w) 6011: { 6011: return std::atomic_compare_exchange_strong_explicit(__p, __v, 6011: std::move(__w), memory_order_seq_cst, memory_order_seq_cst); 6011: } 6011: 6011: template 6011: inline bool 6011: atomic_compare_exchange_weak_explicit(__shared_ptr<_Tp, _Lp>* __p, 6011: __shared_ptr<_Tp, _Lp>* __v, 6011: __shared_ptr<_Tp, _Lp> __w, 6011: memory_order __success, 6011: memory_order __failure) 6011: { 6011: return std::atomic_compare_exchange_strong_explicit(__p, __v, 6011: std::move(__w), __success, __failure); 6011: } 6011: 6011: template 6011: inline bool 6011: atomic_compare_exchange_weak(__shared_ptr<_Tp, _Lp>* __p, 6011: __shared_ptr<_Tp, _Lp>* __v, 6011: __shared_ptr<_Tp, _Lp> __w) 6011: { 6011: return std::atomic_compare_exchange_weak_explicit(__p, __v, 6011: std::move(__w), memory_order_seq_cst, memory_order_seq_cst); 6011: } 6011: 6011: 6011: 6011: 6011: 6011: } 6011: # 83 "/usr/include/c++/8/memory" 2 3 6011: 6011: # 1 "/usr/include/c++/8/backward/auto_ptr.h" 1 3 6011: # 36 "/usr/include/c++/8/backward/auto_ptr.h" 3 6011: namespace std __attribute__ ((__visibility__ ("default"))) 6011: { 6011: 6011: # 47 "/usr/include/c++/8/backward/auto_ptr.h" 3 6011: template 6011: struct auto_ptr_ref 6011: { 6011: _Tp1* _M_ptr; 6011: 6011: explicit 6011: auto_ptr_ref(_Tp1* __p): _M_ptr(__p) { } 6011: } __attribute__ ((__deprecated__)); 6011: 6011: #pragma GCC diagnostic push 6011: #pragma GCC diagnostic ignored "-Wdeprecated-declarations" 6011: # 88 "/usr/include/c++/8/backward/auto_ptr.h" 3 6011: template 6011: class auto_ptr 6011: { 6011: private: 6011: _Tp* _M_ptr; 6011: 6011: public: 6011: 6011: typedef _Tp element_type; 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: explicit 6011: auto_ptr(element_type* __p = 0) throw() : _M_ptr(__p) { } 6011: # 114 "/usr/include/c++/8/backward/auto_ptr.h" 3 6011: auto_ptr(auto_ptr& __a) throw() : _M_ptr(__a.release()) { } 6011: # 126 "/usr/include/c++/8/backward/auto_ptr.h" 3 6011: template 6011: auto_ptr(auto_ptr<_Tp1>& __a) throw() : _M_ptr(__a.release()) { } 6011: # 137 "/usr/include/c++/8/backward/auto_ptr.h" 3 6011: auto_ptr& 6011: operator=(auto_ptr& __a) throw() 6011: { 6011: reset(__a.release()); 6011: return *this; 6011: } 6011: # 154 "/usr/include/c++/8/backward/auto_ptr.h" 3 6011: template 6011: auto_ptr& 6011: operator=(auto_ptr<_Tp1>& __a) throw() 6011: { 6011: reset(__a.release()); 6011: return *this; 6011: } 6011: # 172 "/usr/include/c++/8/backward/auto_ptr.h" 3 6011: ~auto_ptr() { delete _M_ptr; } 6011: # 182 "/usr/include/c++/8/backward/auto_ptr.h" 3 6011: element_type& 6011: operator*() const throw() 6011: { 6011: ; 6011: return *_M_ptr; 6011: } 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: element_type* 6011: operator->() const throw() 6011: { 6011: ; 6011: return _M_ptr; 6011: } 6011: # 212 "/usr/include/c++/8/backward/auto_ptr.h" 3 6011: element_type* 6011: get() const throw() { return _M_ptr; } 6011: # 226 "/usr/include/c++/8/backward/auto_ptr.h" 3 6011: element_type* 6011: release() throw() 6011: { 6011: element_type* __tmp = _M_ptr; 6011: _M_ptr = 0; 6011: return __tmp; 6011: } 6011: # 241 "/usr/include/c++/8/backward/auto_ptr.h" 3 6011: void 6011: reset(element_type* __p = 0) throw() 6011: { 6011: if (__p != _M_ptr) 6011: { 6011: delete _M_ptr; 6011: _M_ptr = __p; 6011: } 6011: } 6011: # 266 "/usr/include/c++/8/backward/auto_ptr.h" 3 6011: auto_ptr(auto_ptr_ref __ref) throw() 6011: : _M_ptr(__ref._M_ptr) { } 6011: 6011: auto_ptr& 6011: operator=(auto_ptr_ref __ref) throw() 6011: { 6011: if (__ref._M_ptr != this->get()) 6011: { 6011: delete _M_ptr; 6011: _M_ptr = __ref._M_ptr; 6011: } 6011: return *this; 6011: } 6011: 6011: template 6011: operator auto_ptr_ref<_Tp1>() throw() 6011: { return auto_ptr_ref<_Tp1>(this->release()); } 6011: 6011: template 6011: operator auto_ptr<_Tp1>() throw() 6011: { return auto_ptr<_Tp1>(this->release()); } 6011: } __attribute__ ((__deprecated__)); 6011: 6011: 6011: 6011: template<> 6011: class auto_ptr 6011: { 6011: public: 6011: typedef void element_type; 6011: } __attribute__ ((__deprecated__)); 6011: 6011: 6011: template<_Lock_policy _Lp> 6011: template 6011: inline 6011: __shared_count<_Lp>::__shared_count(std::auto_ptr<_Tp>&& __r) 6011: : _M_pi(new _Sp_counted_ptr<_Tp*, _Lp>(__r.get())) 6011: { __r.release(); } 6011: 6011: template 6011: template 6011: inline 6011: __shared_ptr<_Tp, _Lp>::__shared_ptr(std::auto_ptr<_Tp1>&& __r) 6011: : _M_ptr(__r.get()), _M_refcount() 6011: { 6011: 6011: static_assert( sizeof(_Tp1) > 0, "incomplete type" ); 6011: _Tp1* __tmp = __r.get(); 6011: _M_refcount = __shared_count<_Lp>(std::move(__r)); 6011: _M_enable_shared_from_this_with(__tmp); 6011: } 6011: 6011: template 6011: template 6011: inline 6011: shared_ptr<_Tp>::shared_ptr(std::auto_ptr<_Tp1>&& __r) 6011: : __shared_ptr<_Tp>(std::move(__r)) { } 6011: 6011: template 6011: template 6011: inline 6011: unique_ptr<_Tp, _Dp>::unique_ptr(auto_ptr<_Up>&& __u) noexcept 6011: : _M_t(__u.release(), deleter_type()) { } 6011: 6011: 6011: #pragma GCC diagnostic pop 6011: 6011: 6011: } 6011: # 85 "/usr/include/c++/8/memory" 2 3 6011: # 93 "/usr/include/c++/8/memory" 3 6011: namespace std __attribute__ ((__visibility__ ("default"))) 6011: { 6011: 6011: # 113 "/usr/include/c++/8/memory" 3 6011: inline void* 6011: align(size_t __align, size_t __size, void*& __ptr, size_t& __space) noexcept 6011: { 6011: const auto __intptr = reinterpret_cast(__ptr); 6011: const auto __aligned = (__intptr - 1u + __align) & -__align; 6011: const auto __diff = __aligned - __intptr; 6011: if ((__size + __diff) > __space) 6011: return nullptr; 6011: else 6011: { 6011: __space -= __diff; 6011: return __ptr = reinterpret_cast(__aligned); 6011: } 6011: } 6011: 6011: 6011: 6011: enum class pointer_safety { relaxed, preferred, strict }; 6011: 6011: inline void 6011: declare_reachable(void*) { } 6011: 6011: template 6011: inline _Tp* 6011: undeclare_reachable(_Tp* __p) { return __p; } 6011: 6011: inline void 6011: declare_no_pointers(char*, size_t) { } 6011: 6011: inline void 6011: undeclare_no_pointers(char*, size_t) { } 6011: 6011: inline pointer_safety 6011: get_pointer_safety() noexcept { return pointer_safety::relaxed; } 6011: 6011: 6011: } 6011: # 12 "option_manager.hh" 2 6011: 6011: 6011: 6011: # 14 "option_manager.hh" 6011: namespace Kakoune 6011: { 6011: 6011: class OptionManager; 6011: 6011: enum class OptionFlags 6011: { 6011: None = 0, 6011: Hidden = 1, 6011: }; 6011: 6011: template<> struct WithBitOps : std::true_type {}; 6011: 6011: class OptionDesc 6011: { 6011: public: 6011: OptionDesc(String name, String docstring, OptionFlags flags); 6011: 6011: const String& name() const { return m_name; } 6011: const String& docstring() const { return m_docstring; } 6011: 6011: OptionFlags flags() const { return m_flags; } 6011: 6011: private: 6011: String m_name; 6011: String m_docstring; 6011: OptionFlags m_flags; 6011: }; 6011: 6011: class Option 6011: { 6011: public: 6011: virtual ~Option() = default; 6011: 6011: template const T& get() const; 6011: template T& get_mutable(); 6011: template void set(const T& val, bool notify=true); 6011: template bool is_of_type() const; 6011: 6011: virtual String get_as_string() const = 0; 6011: virtual void set_from_string(StringView str) = 0; 6011: virtual void add_from_string(StringView str) = 0; 6011: 6011: virtual Option* clone(OptionManager& manager) const = 0; 6011: OptionManager& manager() const { return m_manager; } 6011: 6011: const String& name() const { return m_desc.name(); } 6011: const String& docstring() const { return m_desc.docstring(); } 6011: OptionFlags flags() const { return m_desc.flags(); } 6011: 6011: protected: 6011: Option(const OptionDesc& desc, OptionManager& manager); 6011: 6011: OptionManager& m_manager; 6011: const OptionDesc& m_desc; 6011: }; 6011: 6011: class OptionManagerWatcher 6011: { 6011: public: 6011: virtual ~OptionManagerWatcher() {} 6011: 6011: virtual void on_option_changed(const Option& option) = 0; 6011: }; 6011: 6011: class OptionManager : private OptionManagerWatcher 6011: { 6011: public: 6011: OptionManager(OptionManager& parent); 6011: ~OptionManager(); 6011: 6011: Option& operator[] (StringView name); 6011: const Option& operator[] (StringView name) const; 6011: Option& get_local_option(StringView name); 6011: 6011: void unset_option(StringView name); 6011: 6011: using OptionList = Vector; 6011: OptionList flatten_options() const; 6011: 6011: void register_watcher(OptionManagerWatcher& watcher) const; 6011: void unregister_watcher(OptionManagerWatcher& watcher) const; 6011: 6011: void on_option_changed(const Option& option) override; 6011: private: 6011: OptionManager() 6011: : m_parent(nullptr) {} 6011: 6011: friend class Scope; 6011: friend class OptionsRegistry; 6011: 6011: Vector, MemoryDomain::Options> m_options; 6011: OptionManager* m_parent; 6011: 6011: mutable Vector m_watchers; 6011: }; 6011: 6011: template 6011: class TypedOption : public Option 6011: { 6011: public: 6011: TypedOption(OptionManager& manager, const OptionDesc& desc, const T& value) 6011: : Option(desc, manager), m_value(value) {} 6011: 6011: void set(T value, bool notify = true) 6011: { 6011: validate(value); 6011: if (m_value != value) 6011: { 6011: m_value = std::move(value); 6011: if (notify) 6011: manager().on_option_changed(*this); 6011: } 6011: } 6011: const T& get() const { return m_value; } 6011: T& get_mutable() { return m_value; } 6011: 6011: String get_as_string() const override 6011: { 6011: return option_to_string(m_value); 6011: } 6011: void set_from_string(StringView str) override 6011: { 6011: T val; 6011: option_from_string(str, val); 6011: set(std::move(val)); 6011: } 6011: void add_from_string(StringView str) override 6011: { 6011: if (option_add(m_value, str)) 6011: m_manager.on_option_changed(*this); 6011: } 6011: 6011: using Alloc = Allocator; 6011: static void* operator new (std::size_t sz) 6011: { 6011: if (not (sz == sizeof(TypedOption))) on_assert_failed("assert failed \"" "sz == sizeof(TypedOption)" "\" at " "option_manager.hh" ":" "150"); 6011: return Alloc{}.allocate(1); 6011: } 6011: 6011: static void operator delete (void* ptr) 6011: { 6011: return Alloc{}.deallocate(reinterpret_cast(ptr), 1); 6011: } 6011: private: 6011: virtual void validate(const T& value) const {} 6011: T m_value; 6011: }; 6011: 6011: template 6011: class TypedCheckedOption : public TypedOption 6011: { 6011: using TypedOption::TypedOption; 6011: 6011: Option* clone(OptionManager& manager) const override 6011: { 6011: return new TypedCheckedOption{manager, this->m_desc, this->get()}; 6011: } 6011: 6011: void validate(const T& value) const override { if (validator != nullptr) validator(value); } 6011: }; 6011: 6011: template const T& Option::get() const 6011: { 6011: auto* typed_opt = dynamic_cast*>(this); 6011: if (not typed_opt) 6011: throw runtime_error(format("option '{}' is not of type '{}'", name(), typeid(T).name())); 6011: return typed_opt->get(); 6011: } 6011: 6011: template T& Option::get_mutable() 6011: { 6011: return const_cast(get()); 6011: } 6011: 6011: template void Option::set(const T& val, bool notify) 6011: { 6011: auto* typed_opt = dynamic_cast*>(this); 6011: if (not typed_opt) 6011: throw runtime_error(format("option '{}' is not of type '{}'", name(), typeid(T).name())); 6011: return typed_opt->set(val, notify); 6011: } 6011: 6011: template bool Option::is_of_type() const 6011: { 6011: return dynamic_cast*>(this) != nullptr; 6011: } 6011: 6011: template 6011: auto find_option(T& container, StringView name) -> decltype(container.begin()) 6011: { 6011: using ptr_type = decltype(*container.begin()); 6011: return find_if(container, [&name](const ptr_type& opt) { return opt->name() == name; }); 6011: } 6011: 6011: class OptionsRegistry 6011: { 6011: public: 6011: OptionsRegistry(OptionManager& global_manager) : m_global_manager(global_manager) {} 6011: 6011: template 6011: Option& declare_option(StringView name, StringView docstring, 6011: const T& value, 6011: OptionFlags flags = OptionFlags::None) 6011: { 6011: auto is_not_identifier = [](char c) { 6011: return (c < 'a' or c > 'z') and 6011: (c < 'A' or c > 'Z') and 6011: (c < '0' or c > '9') and c != '_'; 6011: }; 6011: 6011: if (contains_that(name, is_not_identifier)) 6011: throw runtime_error{format("name '{}' contains char out of [a-zA-Z0-9_]", name)}; 6011: 6011: auto& opts = m_global_manager.m_options; 6011: auto it = find_option(opts, name); 6011: if (it != opts.end()) 6011: { 6011: if ((*it)->is_of_type() and (*it)->flags() == flags) 6011: return **it; 6011: throw runtime_error{format("option '{}' already declared with different type or flags", name)}; 6011: } 6011: String doc = docstring.empty() ? format("[{}]", option_type_name::name()) 6011: : format("[{}] - {}", option_type_name::name(), docstring); 6011: m_descs.emplace_back(new OptionDesc{name.str(), std::move(doc), flags}); 6011: opts.emplace_back(new TypedCheckedOption{m_global_manager, *m_descs.back(), value}); 6011: return *opts.back(); 6011: } 6011: 6011: const OptionDesc* option_desc(StringView name) const 6011: { 6011: auto it = find_if(m_descs, 6011: [&name](const std::unique_ptr& opt) 6011: { return opt->name() == name; }); 6011: return it != m_descs.end() ? it->get() : nullptr; 6011: } 6011: 6011: bool option_exists(StringView name) const { return option_desc(name) != nullptr; } 6011: 6011: CandidateList complete_option_name(StringView prefix, ByteCount cursor_pos) const; 6011: private: 6011: OptionManager& m_global_manager; 6011: Vector, MemoryDomain::Options> m_descs; 6011: }; 6011: 6011: } 6011: # 8 "scope.hh" 2 6011: # 1 "utils.hh" 1 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: namespace Kakoune 6011: { 6011: 6011: 6011: 6011: 6011: 6011: template 6011: class Singleton 6011: { 6011: public: 6011: Singleton(const Singleton&) = delete; 6011: Singleton& operator=(const Singleton&) = delete; 6011: 6011: static T& instance() 6011: { 6011: if (not (ms_instance)) on_assert_failed("assert failed \"" "ms_instance" "\" at " "utils.hh" ":" "24"); 6011: return *ms_instance; 6011: } 6011: 6011: static bool has_instance() 6011: { 6011: return ms_instance != nullptr; 6011: } 6011: 6011: protected: 6011: Singleton() 6011: { 6011: if (not (not ms_instance)) on_assert_failed("assert failed \"" "not ms_instance" "\" at " "utils.hh" ":" "36"); 6011: ms_instance = static_cast(this); 6011: } 6011: 6011: ~Singleton() 6011: { 6011: if (not (ms_instance == this)) on_assert_failed("assert failed \"" "ms_instance == this" "\" at " "utils.hh" ":" "42"); 6011: ms_instance = nullptr; 6011: } 6011: 6011: private: 6011: static T* ms_instance; 6011: }; 6011: 6011: template 6011: T* Singleton::ms_instance = nullptr; 6011: # 63 "utils.hh" 6011: template 6011: class OnScopeEnd 6011: { 6011: public: 6011: [[gnu::always_inline]] 6011: OnScopeEnd(T func) : m_func(std::move(func)) {} 6011: 6011: [[gnu::always_inline]] 6011: ~OnScopeEnd() { m_func(); } 6011: private: 6011: T m_func; 6011: }; 6011: 6011: template 6011: OnScopeEnd on_scope_end(T t) 6011: { 6011: return OnScopeEnd(t); 6011: } 6011: 6011: 6011: 6011: template 6011: std::unique_ptr make_unique(Args&&... args) 6011: { 6011: return std::unique_ptr(new T(std::forward(args)...)); 6011: } 6011: 6011: template 6011: bool operator== (const std::unique_ptr& lhs, T* rhs) 6011: { 6011: return lhs.get() == rhs; 6011: } 6011: 6011: template 6011: const T& clamp(const T& val, const T& min, const T& max) 6011: { 6011: return (val < min ? min : (val > max ? max : val)); 6011: } 6011: 6011: template 6011: bool skip_while(Iterator& it, const EndIterator& end, T condition) 6011: { 6011: while (it != end and condition(*it)) 6011: ++it; 6011: return it != end; 6011: } 6011: 6011: template 6011: bool skip_while_reverse(Iterator& it, const BeginIterator& begin, T condition) 6011: { 6011: while (it != begin and condition(*it)) 6011: --it; 6011: return condition(*it); 6011: } 6011: 6011: } 6011: # 9 "scope.hh" 2 6011: 6011: namespace Kakoune 6011: { 6011: 6011: class Scope 6011: { 6011: public: 6011: Scope(Scope& parent) 6011: : m_options(parent.options()), 6011: m_hooks(parent.hooks()), 6011: m_keymaps(parent.keymaps()), 6011: m_aliases(parent.aliases()) {} 6011: 6011: OptionManager& options() { return m_options; } 6011: const OptionManager& options() const { return m_options; } 6011: HookManager& hooks() { return m_hooks; } 6011: const HookManager& hooks() const { return m_hooks; } 6011: KeymapManager& keymaps() { return m_keymaps; } 6011: const KeymapManager& keymaps() const { return m_keymaps; } 6011: AliasRegistry& aliases() { return m_aliases; } 6011: const AliasRegistry& aliases() const { return m_aliases; } 6011: 6011: private: 6011: friend class GlobalScope; 6011: Scope() = default; 6011: 6011: OptionManager m_options; 6011: HookManager m_hooks; 6011: KeymapManager m_keymaps; 6011: AliasRegistry m_aliases; 6011: }; 6011: 6011: class GlobalScope : public Scope, public Singleton 6011: { 6011: public: 6011: GlobalScope() : m_option_registry(m_options) {} 6011: 6011: OptionsRegistry& option_registry() { return m_option_registry; } 6011: const OptionsRegistry& option_registry() const { return m_option_registry; } 6011: private: 6011: OptionsRegistry m_option_registry; 6011: }; 6011: 6011: } 6011: # 9 "buffer.hh" 2 6011: # 1 "shared_string.hh" 1 6011: # 9 "shared_string.hh" 6011: namespace Kakoune 6011: { 6011: 6011: struct StringData : UseMemoryDomain 6011: { 6011: int refcount; 6011: int length; 6011: uint32_t hash; 6011: 6011: StringData(int ref, int len) : refcount(ref), length(len) {} 6011: 6011: [[gnu::always_inline]] 6011: char* data() { return reinterpret_cast(this + 1); } 6011: [[gnu::always_inline]] 6011: const char* data() const { return reinterpret_cast(this + 1); } 6011: [[gnu::always_inline]] 6011: StringView strview() const { return {data(), length}; } 6011: 6011: struct PtrPolicy 6011: { 6011: static void inc_ref(StringData* r, void*) { ++r->refcount; } 6011: static void dec_ref(StringData* r, void*) { if (--r->refcount == 0) delete r; } 6011: static void ptr_moved(StringData*, void*, void*) noexcept {} 6011: }; 6011: 6011: static RefPtr create(StringView str, char back = 0) 6011: { 6011: const int len = (int)str.length() + (back != 0 ? 1 : 0); 6011: void* ptr = StringData::operator new(sizeof(StringData) + len + 1); 6011: StringData* res = new (ptr) StringData(0, len); 6011: std::copy(str.begin(), str.end(), res->data()); 6011: if (back != 0) 6011: res->data()[len-1] = back; 6011: res->data()[len] = 0; 6011: res->hash = hash_data(res->data(), res->length); 6011: return RefPtr{res}; 6011: } 6011: 6011: static void destroy(StringData* s) 6011: { 6011: StringData::operator delete(s, sizeof(StringData) + s->length + 1); 6011: } 6011: 6011: friend void inc_ref_count(StringData* s, void*) 6011: { 6011: ++s->refcount; 6011: } 6011: 6011: friend void dec_ref_count(StringData* s, void*) 6011: { 6011: if (--s->refcount == 0) 6011: StringData::destroy(s); 6011: } 6011: }; 6011: 6011: using StringDataPtr = RefPtr; 6011: 6011: class StringRegistry : public Singleton 6011: { 6011: public: 6011: void debug_stats() const; 6011: StringDataPtr intern(StringView str); 6011: void purge_unused(); 6011: 6011: private: 6011: UnorderedMap m_strings; 6011: }; 6011: 6011: inline StringDataPtr intern(StringView str) 6011: { 6011: return StringRegistry::instance().intern(str); 6011: } 6011: 6011: } 6011: # 10 "buffer.hh" 2 6011: # 1 "value.hh" 1 6011: # 10 "value.hh" 6011: namespace Kakoune 6011: { 6011: 6011: struct bad_value_cast {}; 6011: 6011: struct Value 6011: { 6011: Value() = default; 6011: 6011: template::value>::type> 6011: Value(T&& val) 6011: : m_value{new Model::type>{std::forward(val)}} {} 6011: 6011: Value(const Value& val) = delete; 6011: Value(Value&&) = default; 6011: 6011: Value& operator=(const Value& val) = delete; 6011: Value& operator=(Value&& val) = default; 6011: 6011: explicit operator bool() const { return (bool)m_value; } 6011: 6011: template 6011: bool is_a() const 6011: { 6011: return m_value and m_value->type() == typeid(T); 6011: } 6011: 6011: template 6011: T& as() 6011: { 6011: if (not is_a()) 6011: throw bad_value_cast{}; 6011: return static_cast*>(m_value.get())->m_content; 6011: } 6011: 6011: template 6011: const T& as() const 6011: { 6011: return const_cast(this)->as(); 6011: } 6011: 6011: private: 6011: struct Concept 6011: { 6011: virtual ~Concept() {} 6011: virtual const std::type_info& type() const = 0; 6011: }; 6011: 6011: template 6011: struct Model : public Concept, public UseMemoryDomain 6011: { 6011: Model(T&& val) : m_content(std::move(val)) {} 6011: const std::type_info& type() const override { return typeid(T); } 6011: 6011: T m_content; 6011: }; 6011: 6011: std::unique_ptr m_value; 6011: }; 6011: 6011: enum class ValueId : int {}; 6011: 6011: inline ValueId get_free_value_id() 6011: { 6011: static int next = 0; 6011: return (ValueId)(next++); 6011: } 6011: 6011: using ValueMap = UnorderedMap; 6011: 6011: } 6011: # 11 "buffer.hh" 2 6011: 6011: 6011: 6011: 6011: namespace Kakoune 6011: { 6011: 6011: enum class EolFormat 6011: { 6011: Lf, 6011: Crlf 6011: }; 6011: 6011: constexpr Array, 2> enum_desc(EolFormat) 6011: { 6011: return { { 6011: { EolFormat::Lf, "lf" }, 6011: { EolFormat::Crlf, "crlf" }, 6011: } }; 6011: } 6011: 6011: enum class ByteOrderMark 6011: { 6011: None, 6011: Utf8 6011: }; 6011: 6011: constexpr Array, 2> enum_desc(ByteOrderMark) 6011: { 6011: return { { 6011: { ByteOrderMark::None, "none" }, 6011: { ByteOrderMark::Utf8, "utf8" }, 6011: } }; 6011: } 6011: 6011: class Buffer; 6011: 6011: constexpr timespec InvalidTime = { -1, -1 }; 6011: 6011: 6011: class BufferIterator 6011: { 6011: public: 6011: using value_type = char; 6011: using difference_type = ssize_t; 6011: using pointer = const value_type*; 6011: using reference = const value_type&; 6011: using iterator_category = std::random_access_iterator_tag; 6011: 6011: BufferIterator() : m_buffer(nullptr) {} 6011: BufferIterator(const Buffer& buffer, BufferCoord coord); 6011: 6011: bool operator== (const BufferIterator& iterator) const; 6011: bool operator!= (const BufferIterator& iterator) const; 6011: bool operator< (const BufferIterator& iterator) const; 6011: bool operator<= (const BufferIterator& iterator) const; 6011: bool operator> (const BufferIterator& iterator) const; 6011: bool operator>= (const BufferIterator& iterator) const; 6011: 6011: const char& operator* () const; 6011: const char& operator[](size_t n) const; 6011: size_t operator- (const BufferIterator& iterator) const; 6011: 6011: BufferIterator operator+ (ByteCount size) const; 6011: BufferIterator operator- (ByteCount size) const; 6011: 6011: BufferIterator& operator+= (ByteCount size); 6011: BufferIterator& operator-= (ByteCount size); 6011: 6011: BufferIterator& operator++ (); 6011: BufferIterator& operator-- (); 6011: 6011: BufferIterator operator++ (int); 6011: BufferIterator operator-- (int); 6011: 6011: const BufferCoord& coord() const { return m_coord; } 6011: 6011: private: 6011: SafePtr m_buffer; 6011: StringView m_line; 6011: BufferCoord m_coord; 6011: LineCount m_last_line; 6011: }; 6011: 6011: using BufferLines = Vector; 6011: 6011: 6011: 6011: 6011: 6011: 6011: class Buffer : public SafeCountable, public OptionManagerWatcher, public Scope 6011: { 6011: public: 6011: enum class Flags 6011: { 6011: None = 0, 6011: File = 1 << 0, 6011: New = 1 << 1, 6011: Fifo = 1 << 2, 6011: NoUndo = 1 << 3, 6011: NoHooks = 1 << 4, 6011: Debug = 1 << 5, 6011: ReadOnly = 1 << 6, 6011: }; 6011: 6011: Buffer(String name, Flags flags, StringView data = {}, 6011: timespec fs_timestamp = InvalidTime); 6011: Buffer(const Buffer&) = delete; 6011: Buffer& operator= (const Buffer&) = delete; 6011: ~Buffer(); 6011: 6011: Flags flags() const { return m_flags; } 6011: Flags& flags() { return m_flags; } 6011: 6011: bool set_name(String name); 6011: void update_display_name(); 6011: 6011: BufferCoord insert(BufferCoord pos, StringView content); 6011: BufferCoord erase(BufferCoord begin, BufferCoord end); 6011: BufferCoord replace(BufferCoord begin, BufferCoord end, StringView content); 6011: 6011: size_t timestamp() const; 6011: timespec fs_timestamp() const; 6011: void set_fs_timestamp(timespec ts); 6011: 6011: void commit_undo_group(); 6011: bool undo(size_t count = 1) noexcept; 6011: bool redo(size_t count = 1) noexcept; 6011: bool move_to(size_t history_id) noexcept; 6011: size_t current_history_id() const noexcept; 6011: 6011: String string(BufferCoord begin, BufferCoord end) const; 6011: 6011: const char& byte_at(BufferCoord c) const; 6011: ByteCount distance(BufferCoord begin, BufferCoord end) const; 6011: BufferCoord advance(BufferCoord coord, ByteCount count) const; 6011: BufferCoord next(BufferCoord coord) const; 6011: BufferCoord prev(BufferCoord coord) const; 6011: 6011: BufferCoord char_next(BufferCoord coord) const; 6011: BufferCoord char_prev(BufferCoord coord) const; 6011: 6011: BufferCoord back_coord() const; 6011: BufferCoord end_coord() const; 6011: 6011: bool is_valid(BufferCoord c) const; 6011: bool is_end(BufferCoord c) const; 6011: 6011: BufferCoord last_modification_coord() const; 6011: 6011: BufferIterator begin() const; 6011: BufferIterator end() const; 6011: LineCount line_count() const; 6011: 6011: StringView operator[](LineCount line) const 6011: { return m_lines[line]; } 6011: 6011: const StringDataPtr& line_storage(LineCount line) const 6011: { return m_lines.get_storage(line); } 6011: 6011: 6011: BufferIterator iterator_at(BufferCoord coord) const; 6011: 6011: 6011: BufferCoord clamp(BufferCoord coord) const; 6011: 6011: BufferCoord offset_coord(BufferCoord coord, CharCount offset); 6011: BufferCoordAndTarget offset_coord(BufferCoordAndTarget coord, LineCount offset); 6011: 6011: const String& name() const { return m_name; } 6011: const String& display_name() const { return m_display_name; } 6011: 6011: 6011: 6011: bool is_modified() const; 6011: 6011: 6011: void notify_saved(); 6011: 6011: ValueMap& values() const { return m_values; } 6011: 6011: void run_hook_in_own_context(StringView hook_name, StringView param, 6011: String client_name = ""); 6011: 6011: void reload(StringView data, timespec fs_timestamp = InvalidTime); 6011: 6011: void check_invariant() const; 6011: 6011: struct Change 6011: { 6011: enum Type : char { Insert, Erase }; 6011: Type type; 6011: bool at_end; 6011: BufferCoord begin; 6011: BufferCoord end; 6011: }; 6011: ConstArrayView changes_since(size_t timestamp) const; 6011: 6011: String debug_description() const; 6011: 6011: 6011: void on_registered(); 6011: void on_unregistered(); 6011: private: 6011: 6011: void on_option_changed(const Option& option) override; 6011: 6011: BufferCoord do_insert(BufferCoord pos, StringView content); 6011: BufferCoord do_erase(BufferCoord begin, BufferCoord end); 6011: 6011: struct Modification; 6011: 6011: void apply_modification(const Modification& modification); 6011: void revert_modification(const Modification& modification); 6011: 6011: struct LineList : BufferLines 6011: { 6011: [[gnu::always_inline]] 6011: StringDataPtr& get_storage(LineCount line) 6011: { return BufferLines::operator[]((int)line); } 6011: 6011: [[gnu::always_inline]] 6011: const StringDataPtr& get_storage(LineCount line) const 6011: { return BufferLines::operator[]((int)line); } 6011: 6011: [[gnu::always_inline]] 6011: StringView operator[](LineCount line) const 6011: { return get_storage(line)->strview(); } 6011: 6011: StringView front() const { return BufferLines::front()->strview(); } 6011: StringView back() const { return BufferLines::back()->strview(); } 6011: }; 6011: LineList m_lines; 6011: 6011: String m_name; 6011: String m_display_name; 6011: Flags m_flags; 6011: 6011: using UndoGroup = Vector; 6011: 6011: struct HistoryNode : SafeCountable, UseMemoryDomain 6011: { 6011: HistoryNode(size_t id, HistoryNode* parent); 6011: 6011: size_t id; 6011: SafePtr parent; 6011: UndoGroup undo_group; 6011: Vector, MemoryDomain::BufferMeta> children; 6011: SafePtr redo_child; 6011: TimePoint timepoint; 6011: }; 6011: 6011: size_t m_next_history_id = 0; 6011: HistoryNode m_history; 6011: SafePtr m_history_cursor; 6011: SafePtr m_last_save_history_cursor; 6011: UndoGroup m_current_undo_group; 6011: 6011: void move_to(HistoryNode* history_node) noexcept; 6011: 6011: template HistoryNode* find_history_node(HistoryNode* node, const Func& func); 6011: 6011: Vector m_changes; 6011: 6011: timespec m_fs_timestamp; 6011: 6011: 6011: 6011: mutable ValueMap m_values; 6011: }; 6011: 6011: template<> struct WithBitOps : std::true_type {}; 6011: 6011: } 6011: 6011: # 1 "buffer.inl.hh" 1 6011: 6011: 6011: 6011: 6011: 6011: namespace Kakoune 6011: { 6011: 6011: [[gnu::always_inline]] 6011: inline const char& Buffer::byte_at(BufferCoord c) const 6011: { 6011: 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"); 6011: return m_lines[c.line][c.column]; 6011: } 6011: 6011: inline BufferCoord Buffer::next(BufferCoord coord) const 6011: { 6011: if (coord.column < m_lines[coord.line].length() - 1) 6011: ++coord.column; 6011: else if (coord.line == m_lines.size() - 1) 6011: coord.column = m_lines.back().length(); 6011: else 6011: { 6011: ++coord.line; 6011: coord.column = 0; 6011: } 6011: return coord; 6011: } 6011: 6011: inline BufferCoord Buffer::prev(BufferCoord coord) const 6011: { 6011: if (coord.column == 0) 6011: { 6011: if (coord.line > 0) 6011: coord.column = m_lines[--coord.line].length() - 1; 6011: } 6011: else 6011: --coord.column; 6011: return coord; 6011: } 6011: 6011: inline ByteCount Buffer::distance(BufferCoord begin, BufferCoord end) const 6011: { 6011: if (begin > end) 6011: return -distance(end, begin); 6011: if (begin.line == end.line) 6011: return end.column - begin.column; 6011: 6011: ByteCount res = m_lines[begin.line].length() - begin.column; 6011: for (LineCount l = begin.line+1; l < end.line; ++l) 6011: res += m_lines[l].length(); 6011: res += end.column; 6011: return res; 6011: } 6011: 6011: inline bool Buffer::is_valid(BufferCoord c) const 6011: { 6011: if (c.line < 0 or c.column < 0) 6011: return false; 6011: 6011: return (c.line < line_count() and c.column < m_lines[c.line].length()) or 6011: (c.line == line_count() - 1 and c.column == m_lines.back().length()) or 6011: (c.line == line_count() and c.column == 0); 6011: } 6011: 6011: inline bool Buffer::is_end(BufferCoord c) const 6011: { 6011: return c >= end_coord(); 6011: } 6011: 6011: inline BufferIterator Buffer::begin() const 6011: { 6011: return {*this, { 0_line, 0 }}; 6011: } 6011: 6011: inline BufferIterator Buffer::end() const 6011: { 6011: return {*this, end_coord()}; 6011: } 6011: 6011: [[gnu::always_inline]] 6011: inline LineCount Buffer::line_count() const 6011: { 6011: return LineCount(m_lines.size()); 6011: } 6011: 6011: inline size_t Buffer::timestamp() const 6011: { 6011: return m_changes.size(); 6011: } 6011: 6011: inline ConstArrayView Buffer::changes_since(size_t timestamp) const 6011: { 6011: if (timestamp < m_changes.size()) 6011: return { m_changes.data() + timestamp, 6011: m_changes.data() + m_changes.size() }; 6011: return {}; 6011: } 6011: 6011: inline BufferCoord Buffer::back_coord() const 6011: { 6011: return { line_count() - 1, m_lines.back().length() - 1 }; 6011: } 6011: 6011: inline BufferCoord Buffer::end_coord() const 6011: { 6011: return m_lines.empty() ? 6011: BufferCoord{0,0} : BufferCoord{ line_count() - 1, m_lines.back().length() }; 6011: } 6011: 6011: inline BufferIterator::BufferIterator(const Buffer& buffer, BufferCoord coord) 6011: : m_buffer(&buffer), m_coord(coord), 6011: m_line((*m_buffer)[coord.line]), 6011: m_last_line(buffer.line_count()-1) 6011: { 6011: 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"); 6011: } 6011: 6011: inline bool BufferIterator::operator==(const BufferIterator& iterator) const 6011: { 6011: return m_buffer == iterator.m_buffer and m_coord == iterator.m_coord; 6011: } 6011: 6011: inline bool BufferIterator::operator!=(const BufferIterator& iterator) const 6011: { 6011: return m_buffer != iterator.m_buffer or m_coord != iterator.m_coord; 6011: } 6011: 6011: inline bool BufferIterator::operator<(const BufferIterator& iterator) const 6011: { 6011: if (not (m_buffer == iterator.m_buffer)) on_assert_failed("assert failed \"" "m_buffer == iterator.m_buffer" "\" at " "buffer.inl.hh" ":" "131"); 6011: return (m_coord < iterator.m_coord); 6011: } 6011: 6011: inline bool BufferIterator::operator<=(const BufferIterator& iterator) const 6011: { 6011: if (not (m_buffer == iterator.m_buffer)) on_assert_failed("assert failed \"" "m_buffer == iterator.m_buffer" "\" at " "buffer.inl.hh" ":" "137"); 6011: return (m_coord <= iterator.m_coord); 6011: } 6011: 6011: inline bool BufferIterator::operator>(const BufferIterator& iterator) const 6011: { 6011: if (not (m_buffer == iterator.m_buffer)) on_assert_failed("assert failed \"" "m_buffer == iterator.m_buffer" "\" at " "buffer.inl.hh" ":" "143"); 6011: return (m_coord > iterator.m_coord); 6011: } 6011: 6011: inline bool BufferIterator::operator>=(const BufferIterator& iterator) const 6011: { 6011: if (not (m_buffer == iterator.m_buffer)) on_assert_failed("assert failed \"" "m_buffer == iterator.m_buffer" "\" at " "buffer.inl.hh" ":" "149"); 6011: return (m_coord >= iterator.m_coord); 6011: } 6011: 6011: [[gnu::always_inline]] 6011: inline const char& BufferIterator::operator*() const 6011: { 6011: return m_line[m_coord.column]; 6011: } 6011: 6011: inline const char& BufferIterator::operator[](size_t n) const 6011: { 6011: return m_buffer->byte_at(m_buffer->advance(m_coord, n)); 6011: } 6011: 6011: inline size_t BufferIterator::operator-(const BufferIterator& iterator) const 6011: { 6011: if (not (m_buffer == iterator.m_buffer)) on_assert_failed("assert failed \"" "m_buffer == iterator.m_buffer" "\" at " "buffer.inl.hh" ":" "166"); 6011: return (size_t)m_buffer->distance(iterator.m_coord, m_coord); 6011: } 6011: 6011: inline BufferIterator BufferIterator::operator+(ByteCount size) const 6011: { 6011: if (not (m_buffer)) on_assert_failed("assert failed \"" "m_buffer" "\" at " "buffer.inl.hh" ":" "172"); 6011: return { *m_buffer, m_buffer->advance(m_coord, size) }; 6011: } 6011: 6011: inline BufferIterator BufferIterator::operator-(ByteCount size) const 6011: { 6011: return { *m_buffer, m_buffer->advance(m_coord, -size) }; 6011: } 6011: 6011: inline BufferIterator& BufferIterator::operator+=(ByteCount size) 6011: { 6011: m_coord = m_buffer->advance(m_coord, size); 6011: m_line = (*m_buffer)[m_coord.line]; 6011: return *this; 6011: } 6011: 6011: inline BufferIterator& BufferIterator::operator-=(ByteCount size) 6011: { 6011: m_coord = m_buffer->advance(m_coord, -size); 6011: m_line = (*m_buffer)[m_coord.line]; 6011: return *this; 6011: } 6011: 6011: inline BufferIterator& BufferIterator::operator++() 6011: { 6011: if (++m_coord.column == m_line.length() and m_coord.line != m_last_line) 6011: { 6011: m_line = (*m_buffer)[++m_coord.line]; 6011: m_coord.column = 0; 6011: } 6011: return *this; 6011: } 6011: 6011: inline BufferIterator& BufferIterator::operator--() 6011: { 6011: if (m_coord.column == 0 and m_coord.line > 0) 6011: { 6011: m_line = (*m_buffer)[--m_coord.line]; 6011: m_coord.column = m_line.length() - 1; 6011: } 6011: else 6011: --m_coord.column; 6011: return *this; 6011: } 6011: 6011: inline BufferIterator BufferIterator::operator++(int) 6011: { 6011: BufferIterator save = *this; 6011: ++*this; 6011: return save; 6011: } 6011: 6011: inline BufferIterator BufferIterator::operator--(int) 6011: { 6011: BufferIterator save = *this; 6011: --*this; 6011: return save; 6011: } 6011: 6011: } 6011: # 288 "buffer.hh" 2 6011: # 4 "normal.cc" 2 6011: # 1 "buffer_manager.hh" 1 6011: # 9 "buffer_manager.hh" 6011: namespace Kakoune 6011: { 6011: 6011: class BufferManager : public Singleton 6011: { 6011: public: 6011: using BufferList = Vector, MemoryDomain::BufferMeta>; 6011: using iterator = BufferList::const_iterator; 6011: 6011: ~BufferManager(); 6011: 6011: Buffer* create_buffer(String name, Buffer::Flags flags, 6011: StringView data = {}, 6011: timespec fs_timestamp = InvalidTime); 6011: 6011: void delete_buffer(Buffer& buffer); 6011: 6011: iterator begin() const { return m_buffers.cbegin(); } 6011: iterator end() const { return m_buffers.cend(); } 6011: size_t count() const { return m_buffers.size(); } 6011: 6011: Buffer* get_buffer_ifp(StringView name); 6011: Buffer& get_buffer(StringView name); 6011: 6011: Buffer& get_first_buffer(); 6011: 6011: void backup_modified_buffers(); 6011: 6011: void clear_buffer_trash(); 6011: private: 6011: BufferList m_buffers; 6011: BufferList m_buffer_trash; 6011: }; 6011: 6011: } 6011: # 5 "normal.cc" 2 6011: # 1 "buffer_utils.hh" 1 6011: 6011: 6011: 6011: 6011: # 1 "selection.hh" 1 6011: 6011: 6011: 6011: 6011: 6011: namespace Kakoune 6011: { 6011: 6011: using CaptureList = Vector; 6011: 6011: 6011: struct Selection 6011: { 6011: static constexpr MemoryDomain Domain = MemoryDomain::Selections; 6011: 6011: Selection() = default; 6011: Selection(BufferCoord pos) : Selection(pos,pos) {} 6011: Selection(BufferCoord anchor, BufferCoord cursor, 6011: CaptureList captures = {}) 6011: : m_anchor{anchor}, m_cursor{cursor}, 6011: m_captures(std::move(captures)) {} 6011: 6011: void merge_with(const Selection& range); 6011: 6011: BufferCoord& anchor() { return m_anchor; } 6011: BufferCoordAndTarget& cursor() { return m_cursor; } 6011: 6011: const BufferCoord& anchor() const { return m_anchor; } 6011: const BufferCoordAndTarget& cursor() const { return m_cursor; } 6011: 6011: CaptureList& captures() { return m_captures; } 6011: const CaptureList& captures() const { return m_captures; } 6011: 6011: bool operator== (const Selection& other) const 6011: { 6011: return m_anchor == other.m_anchor and m_cursor == other.m_cursor; 6011: } 6011: 6011: const BufferCoord& min() const { return m_anchor < m_cursor ? m_anchor : m_cursor; } 6011: const BufferCoord& max() const { return m_anchor < m_cursor ? m_cursor : m_anchor; } 6011: 6011: BufferCoord& min() { return m_anchor < m_cursor ? m_anchor : m_cursor; } 6011: BufferCoord& max() { return m_anchor < m_cursor ? m_cursor : m_anchor; } 6011: 6011: private: 6011: BufferCoord m_anchor; 6011: BufferCoordAndTarget m_cursor; 6011: 6011: CaptureList m_captures; 6011: }; 6011: 6011: inline bool overlaps(const Selection& lhs, const Selection& rhs) 6011: { 6011: return lhs.min() <= rhs.min() ? lhs.max() >= rhs.min() 6011: : lhs.min() <= rhs.max(); 6011: } 6011: 6011: void update_selections(Vector& selections, size_t& main, 6011: Buffer& buffer, size_t timestamp); 6011: 6011: enum class InsertMode : unsigned 6011: { 6011: Insert, 6011: InsertCursor, 6011: Append, 6011: Replace, 6011: InsertAtLineBegin, 6011: InsertAtNextLineBegin, 6011: AppendAtLineEnd, 6011: OpenLineBelow, 6011: OpenLineAbove 6011: }; 6011: 6011: struct SelectionList 6011: { 6011: static constexpr MemoryDomain Domain = MemoryDomain::Selections; 6011: 6011: SelectionList(Buffer& buffer, Selection s); 6011: SelectionList(Buffer& buffer, Selection s, size_t timestamp); 6011: SelectionList(Buffer& buffer, Vector s); 6011: SelectionList(Buffer& buffer, Vector s, size_t timestamp); 6011: 6011: void update(); 6011: 6011: void check_invariant() const; 6011: 6011: const Selection& main() const { return (*this)[m_main]; } 6011: Selection& main() { return (*this)[m_main]; } 6011: size_t main_index() const { return m_main; } 6011: 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; } 6011: 6011: void rotate_main(int count) { m_main = (m_main + count) % size(); } 6011: 6011: void avoid_eol(); 6011: 6011: void push_back(const Selection& sel) { m_selections.push_back(sel); } 6011: void push_back(Selection&& sel) { m_selections.push_back(std::move(sel)); } 6011: 6011: Selection& operator[](size_t i) { return m_selections[i]; } 6011: const Selection& operator[](size_t i) const { return m_selections[i]; } 6011: 6011: SelectionList& operator=(Vector list) 6011: { 6011: m_selections = std::move(list); 6011: m_main = size()-1; 6011: sort_and_merge_overlapping(); 6011: update_timestamp(); 6011: check_invariant(); 6011: return *this; 6011: } 6011: 6011: using iterator = Vector::iterator; 6011: iterator begin() { return m_selections.begin(); } 6011: iterator end() { return m_selections.end(); } 6011: 6011: using const_iterator = Vector::const_iterator; 6011: const_iterator begin() const { return m_selections.begin(); } 6011: const_iterator end() const { return m_selections.end(); } 6011: 6011: void remove(size_t index) { m_selections.erase(begin() + index); } 6011: 6011: size_t size() const { return m_selections.size(); } 6011: 6011: bool operator==(const SelectionList& other) const { return m_buffer == other.m_buffer and m_selections == other.m_selections; } 6011: bool operator!=(const SelectionList& other) const { return not ((*this) == other); } 6011: 6011: void sort(); 6011: void merge_overlapping(); 6011: void merge_consecutive(); 6011: void sort_and_merge_overlapping(); 6011: 6011: Buffer& buffer() const { return *m_buffer; } 6011: 6011: size_t timestamp() const { return m_timestamp; } 6011: void update_timestamp() { m_timestamp = m_buffer->timestamp(); } 6011: 6011: void insert(ConstArrayView strings, InsertMode mode, 6011: bool select_inserted = false); 6011: void erase(); 6011: 6011: private: 6011: size_t m_main = 0; 6011: Vector m_selections; 6011: 6011: SafePtr m_buffer; 6011: size_t m_timestamp; 6011: }; 6011: 6011: Vector compute_modified_ranges(Buffer& buffer, size_t timestamp); 6011: 6011: String selection_to_string(const Selection& selection); 6011: String selection_list_to_string(const SelectionList& selection); 6011: Selection selection_from_string(StringView desc); 6011: SelectionList selection_list_from_string(Buffer& buffer, StringView desc); 6011: 6011: } 6011: # 6 "buffer_utils.hh" 2 6011: 6011: # 1 "utf8_iterator.hh" 1 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: namespace Kakoune 6011: { 6011: 6011: namespace utf8 6011: { 6011: 6011: 6011: 6011: template 6011: class iterator : public std::iterator 6011: { 6011: public: 6011: iterator() = default; 6011: 6011: iterator(Iterator it, Iterator begin, Iterator end) 6011: : m_it{std::move(it)}, m_begin{std::move(begin)}, m_end{std::move(end)} 6011: {} 6011: 6011: template 6011: iterator(Iterator it, const Container& c) 6011: : m_it{std::move(it)}, m_begin{std::begin(c)}, m_end{std::end(c)} 6011: {} 6011: 6011: iterator& operator++() 6011: { 6011: utf8::to_next(m_it, m_end); 6011: invalidate_value(); 6011: return *this; 6011: } 6011: 6011: iterator operator++(int) 6011: { 6011: iterator save = *this; 6011: ++*this; 6011: return save; 6011: } 6011: 6011: iterator& operator--() 6011: { 6011: utf8::to_previous(m_it, m_begin); 6011: invalidate_value(); 6011: return *this; 6011: } 6011: 6011: iterator operator--(int) 6011: { 6011: iterator save = *this; 6011: --*this; 6011: return save; 6011: } 6011: 6011: iterator operator+(DifferenceType count) const 6011: { 6011: if (count < 0) 6011: return operator-(-count); 6011: 6011: iterator res = *this; 6011: while (count--) 6011: ++res; 6011: return res; 6011: } 6011: 6011: iterator operator-(DifferenceType count) const 6011: { 6011: if (count < 0) 6011: return operator+(-count); 6011: 6011: iterator res = *this; 6011: while (count--) 6011: --res; 6011: return res; 6011: } 6011: 6011: bool operator==(const iterator& other) const { return m_it == other.m_it; } 6011: bool operator!=(const iterator& other) const { return m_it != other.m_it; } 6011: 6011: bool operator< (const iterator& other) const { return m_it < other.m_it; } 6011: bool operator<= (const iterator& other) const { return m_it <= other.m_it; } 6011: 6011: bool operator> (const iterator& other) const { return m_it > other.m_it; } 6011: bool operator>= (const iterator& other) const { return m_it >= other.m_it; } 6011: 6011: bool operator==(const Iterator& other) { return m_it == other; } 6011: bool operator!=(const Iterator& other) { return m_it != other; } 6011: 6011: bool operator< (const Iterator& other) const { return m_it < other; } 6011: bool operator<= (const Iterator& other) const { return m_it <= other; } 6011: 6011: bool operator> (const Iterator& other) const { return m_it > other; } 6011: bool operator>= (const Iterator& other) const { return m_it >= other; } 6011: 6011: DifferenceType operator-(const iterator& other) const 6011: { 6011: return (DifferenceType)utf8::distance(other.m_it, m_it); 6011: } 6011: 6011: CodepointType operator*() const 6011: { 6011: return get_value(); 6011: } 6011: 6011: const Iterator& base() const { return m_it; } 6011: Iterator& base() { return m_it; } 6011: 6011: private: 6011: void invalidate_value() { m_value = -1; } 6011: CodepointType get_value() const 6011: { 6011: if (m_value == (CodepointType)-1) 6011: m_value = (CodepointType)utf8::codepoint(m_it, m_end); 6011: return m_value; 6011: } 6011: 6011: Iterator m_it; 6011: Iterator m_begin; 6011: Iterator m_end; 6011: mutable CodepointType m_value = -1; 6011: }; 6011: 6011: } 6011: 6011: } 6011: # 8 "buffer_utils.hh" 2 6011: 6011: 6011: namespace Kakoune 6011: { 6011: 6011: inline String content(const Buffer& buffer, const Selection& range) 6011: { 6011: return buffer.string(range.min(), buffer.char_next(range.max())); 6011: } 6011: 6011: inline BufferCoord erase(Buffer& buffer, const Selection& range) 6011: { 6011: return buffer.erase(range.min(), buffer.char_next(range.max())); 6011: } 6011: 6011: inline BufferCoord replace(Buffer& buffer, const Selection& range, StringView content) 6011: { 6011: return buffer.replace(range.min(), buffer.char_next(range.max()), content); 6011: } 6011: 6011: inline CharCount char_length(const Buffer& buffer, const Selection& range) 6011: { 6011: return utf8::distance(buffer.iterator_at(range.min()), 6011: buffer.iterator_at(buffer.char_next(range.max()))); 6011: } 6011: 6011: inline CharCount char_length(const Buffer& buffer, const BufferCoord& begin, const BufferCoord& end) 6011: { 6011: return utf8::distance(buffer.iterator_at(begin), buffer.iterator_at(end)); 6011: } 6011: 6011: inline ColumnCount column_length(const Buffer& buffer, const BufferCoord& begin, const BufferCoord& end) 6011: { 6011: return utf8::column_distance(buffer.iterator_at(begin), buffer.iterator_at(end)); 6011: } 6011: 6011: inline bool is_bol(BufferCoord coord) 6011: { 6011: return coord.column == 0; 6011: } 6011: 6011: inline bool is_eol(const Buffer& buffer, BufferCoord coord) 6011: { 6011: return buffer.is_end(coord) or buffer[coord.line].length() == coord.column+1; 6011: } 6011: 6011: inline bool is_bow(const Buffer& buffer, BufferCoord coord) 6011: { 6011: auto it = utf8::iterator(buffer.iterator_at(coord), buffer); 6011: if (coord == BufferCoord{0,0}) 6011: return is_word(*it); 6011: 6011: return not is_word(*(it-1)) and is_word(*it); 6011: } 6011: 6011: inline bool is_eow(const Buffer& buffer, BufferCoord coord) 6011: { 6011: if (buffer.is_end(coord) or coord == BufferCoord{0,0}) 6011: return true; 6011: 6011: auto it = utf8::iterator(buffer.iterator_at(coord), buffer); 6011: return is_word(*(it-1)) and not is_word(*it); 6011: } 6011: 6011: ColumnCount get_column(const Buffer& buffer, 6011: ColumnCount tabstop, BufferCoord coord); 6011: 6011: ByteCount get_byte_to_column(const Buffer& buffer, ColumnCount tabstop, 6011: DisplayCoord coord); 6011: 6011: Buffer* create_fifo_buffer(String name, int fd, bool scroll = false); 6011: Buffer* open_file_buffer(StringView filename, 6011: Buffer::Flags flags = Buffer::Flags::None); 6011: Buffer* open_or_create_file_buffer(StringView filename, 6011: Buffer::Flags flags = Buffer::Flags::None); 6011: void reload_file_buffer(Buffer& buffer); 6011: 6011: void write_to_debug_buffer(StringView str); 6011: 6011: } 6011: # 6 "normal.cc" 2 6011: # 1 "client_manager.hh" 1 6011: 6011: 6011: 6011: # 1 "client.hh" 1 6011: 6011: 6011: 6011: # 1 "display_buffer.hh" 1 6011: 6011: 6011: 6011: # 1 "face.hh" 1 6011: 6011: 6011: 6011: # 1 "color.hh" 1 6011: 6011: 6011: 6011: 6011: 6011: namespace Kakoune 6011: { 6011: 6011: class String; 6011: class StringView; 6011: 6011: struct Color 6011: { 6011: enum NamedColor : char 6011: { 6011: Default, 6011: Black, 6011: Red, 6011: Green, 6011: Yellow, 6011: Blue, 6011: Magenta, 6011: Cyan, 6011: White, 6011: RGB, 6011: }; 6011: 6011: NamedColor color; 6011: unsigned char r = 0; 6011: unsigned char g = 0; 6011: unsigned char b = 0; 6011: 6011: constexpr Color() : Color{Default} {} 6011: constexpr Color(NamedColor c) : color{c} {} 6011: constexpr Color(unsigned char r, unsigned char g, unsigned char b) 6011: : color{RGB}, r{r}, g{g}, b{b} {} 6011: }; 6011: 6011: constexpr bool operator==(Color lhs, Color rhs) 6011: { 6011: return lhs.color == rhs.color and 6011: lhs.r == rhs.r and lhs.g == rhs.g and lhs.b == rhs.b; 6011: } 6011: 6011: constexpr bool operator!=(Color lhs, Color rhs) 6011: { 6011: return not (lhs == rhs); 6011: } 6011: 6011: Color str_to_color(StringView color); 6011: String color_to_str(Color color); 6011: 6011: String option_to_string(Color color); 6011: void option_from_string(StringView str, Color& color); 6011: 6011: bool is_color_name(StringView color); 6011: 6011: inline size_t hash_value(const Color& val) 6011: { 6011: return val.color == Color::RGB ? 6011: hash_values(val.color, val.r, val.g, val.b) 6011: : hash_value(val.color); 6011: } 6011: 6011: } 6011: # 5 "face.hh" 2 6011: 6011: 6011: namespace Kakoune 6011: { 6011: 6011: enum class Attribute : int 6011: { 6011: Normal = 0, 6011: Exclusive = 1 << 1, 6011: Underline = 1 << 2, 6011: Reverse = 1 << 3, 6011: Blink = 1 << 4, 6011: Bold = 1 << 5, 6011: Dim = 1 << 6, 6011: Italic = 1 << 7, 6011: }; 6011: 6011: template<> struct WithBitOps : std::true_type {}; 6011: 6011: struct Face 6011: { 6011: Color fg; 6011: Color bg; 6011: Attribute attributes; 6011: 6011: constexpr Face(Color fg = Color::Default, Color bg = Color::Default, 6011: Attribute attributes = Attribute::Normal) 6011: : fg{fg}, bg{bg}, attributes{attributes} {} 6011: }; 6011: 6011: constexpr bool operator==(const Face& lhs, const Face& rhs) 6011: { 6011: return lhs.fg == rhs.fg and 6011: lhs.bg == rhs.bg and 6011: lhs.attributes == rhs.attributes; 6011: } 6011: 6011: constexpr bool operator!=(const Face& lhs, const Face& rhs) 6011: { 6011: return not (lhs == rhs); 6011: } 6011: 6011: constexpr Face merge_faces(const Face& base, const Face& face) 6011: { 6011: return face.attributes & Attribute::Exclusive ? 6011: face : Face{ face.fg == Color::Default ? base.fg : face.fg, 6011: face.bg == Color::Default ? base.bg : face.bg, 6011: face.attributes | base.attributes }; 6011: } 6011: 6011: } 6011: # 5 "display_buffer.hh" 2 6011: 6011: 6011: 6011: 6011: 6011: namespace Kakoune 6011: { 6011: 6011: class Buffer; 6011: struct BufferRange{ BufferCoord begin, end; }; 6011: 6011: String option_to_string(BufferRange range); 6011: void option_from_string(StringView str, BufferRange& opt); 6011: 6011: inline bool operator==(const BufferRange& lhs, const BufferRange& rhs) 6011: { 6011: return lhs.begin == rhs.begin and lhs.end == rhs.end; 6011: } 6011: 6011: inline 6011: size_t hash_value(const BufferRange& range) 6011: { 6011: return hash_values(range.begin, range.end); 6011: } 6011: 6011: struct DisplayAtom : public UseMemoryDomain 6011: { 6011: public: 6011: enum Type { Range, ReplacedRange, Text }; 6011: 6011: DisplayAtom(const Buffer& buffer, BufferCoord begin, BufferCoord end) 6011: : m_type(Range), m_buffer(&buffer), m_range{begin, end} 6011: { check_invariant(); } 6011: 6011: DisplayAtom(String str, Face face = Face{}) 6011: : m_type(Text), m_text(std::move(str)), face(face) 6011: { check_invariant(); } 6011: 6011: StringView content() const; 6011: ColumnCount length() const; 6011: 6011: const BufferCoord& begin() const 6011: { 6011: if (not (has_buffer_range())) on_assert_failed("assert failed \"" "has_buffer_range()" "\" at " "display_buffer.hh" ":" "48"); 6011: return m_range.begin; 6011: } 6011: 6011: const BufferCoord& end() const 6011: { 6011: if (not (has_buffer_range())) on_assert_failed("assert failed \"" "has_buffer_range()" "\" at " "display_buffer.hh" ":" "54"); 6011: return m_range.end; 6011: } 6011: 6011: void replace(String text) 6011: { 6011: if (not (m_type == Range)) on_assert_failed("assert failed \"" "m_type == Range" "\" at " "display_buffer.hh" ":" "60"); 6011: m_type = ReplacedRange; 6011: m_text = std::move(text); 6011: } 6011: 6011: bool has_buffer_range() const 6011: { 6011: return m_type == Range or m_type == ReplacedRange; 6011: } 6011: 6011: const Buffer& buffer() const { if (not (m_buffer)) on_assert_failed("assert failed \"" "m_buffer" "\" at " "display_buffer.hh" ":" "70"); return *m_buffer; } 6011: 6011: Type type() const { return m_type; } 6011: 6011: void trim_begin(ColumnCount count); 6011: void trim_end(ColumnCount count); 6011: 6011: void check_invariant() const; 6011: 6011: bool operator==(const DisplayAtom& other) const 6011: { 6011: return face == other.face and type() == other.type() and 6011: content() == other.content(); 6011: } 6011: 6011: public: 6011: Face face; 6011: 6011: private: 6011: friend class DisplayLine; 6011: 6011: Type m_type; 6011: 6011: const Buffer* m_buffer = nullptr; 6011: BufferRange m_range; 6011: String m_text; 6011: }; 6011: 6011: using AtomList = Vector; 6011: 6011: class DisplayLine : public UseMemoryDomain 6011: { 6011: public: 6011: using iterator = AtomList::iterator; 6011: using const_iterator = AtomList::const_iterator; 6011: using value_type = AtomList::value_type; 6011: 6011: DisplayLine() = default; 6011: DisplayLine(AtomList atoms); 6011: DisplayLine(String str, Face face = Face{}) 6011: { push_back({ std::move(str), face }); } 6011: 6011: iterator begin() { return m_atoms.begin(); } 6011: iterator end() { return m_atoms.end(); } 6011: 6011: const_iterator begin() const { return m_atoms.begin(); } 6011: const_iterator end() const { return m_atoms.end(); } 6011: 6011: const AtomList& atoms() const { return m_atoms; } 6011: 6011: ColumnCount length() const; 6011: const BufferRange& range() const { return m_range; } 6011: 6011: 6011: 6011: iterator split(iterator it, BufferCoord pos); 6011: 6011: 6011: 6011: iterator split(iterator it, ColumnCount pos); 6011: 6011: iterator insert(iterator it, DisplayAtom atom); 6011: iterator erase(iterator beg, iterator end); 6011: void push_back(DisplayAtom atom); 6011: 6011: 6011: 6011: void trim(ColumnCount first_col, ColumnCount col_count, bool only_buffer); 6011: 6011: void optimize(); 6011: private: 6011: void compute_range(); 6011: BufferRange m_range = { { 0x7fffffff, 0x7fffffff }, { 6011: # 142 "display_buffer.hh" 3 4 6011: (-0x7fffffff - 1) 6011: # 142 "display_buffer.hh" 6011: , 6011: # 142 "display_buffer.hh" 3 4 6011: (-0x7fffffff - 1) 6011: # 142 "display_buffer.hh" 6011: } }; 6011: AtomList m_atoms; 6011: }; 6011: 6011: DisplayLine parse_display_line(StringView line); 6011: 6011: class DisplayBuffer : public UseMemoryDomain 6011: { 6011: public: 6011: using LineList = Vector; 6011: DisplayBuffer() {} 6011: 6011: LineList& lines() { return m_lines; } 6011: const LineList& lines() const { return m_lines; } 6011: 6011: 6011: const BufferRange& range() const { return m_range; } 6011: void optimize(); 6011: void compute_range(); 6011: 6011: private: 6011: LineList m_lines; 6011: BufferRange m_range; 6011: }; 6011: 6011: } 6011: # 5 "client.hh" 2 6011: # 1 "env_vars.hh" 1 6011: 6011: 6011: 6011: 6011: 6011: namespace Kakoune 6011: { 6011: 6011: class String; 6011: using EnvVarMap = IdMap; 6011: 6011: EnvVarMap get_env_vars(); 6011: 6011: } 6011: # 6 "client.hh" 2 6011: # 1 "input_handler.hh" 1 6011: 6011: 6011: 6011: 6011: # 1 "context.hh" 1 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: namespace Kakoune 6011: { 6011: 6011: class Window; 6011: class Buffer; 6011: class Client; 6011: class Scope; 6011: class InputHandler; 6011: class UserInterface; 6011: class DisplayLine; 6011: class KeymapManager; 6011: class AliasRegistry; 6011: 6011: 6011: 6011: struct NestedBool 6011: { 6011: void set() { m_count++; } 6011: void unset() { if (not (m_count > 0)) on_assert_failed("assert failed \"" "m_count > 0" "\" at " "context.hh" ":" "26"); m_count--; } 6011: 6011: operator bool() const { return m_count > 0; } 6011: private: 6011: int m_count = 0; 6011: }; 6011: 6011: struct ScopedSetBool 6011: { 6011: ScopedSetBool(NestedBool& nested_bool, bool condition = true) 6011: : m_nested_bool(nested_bool), m_condition(condition) 6011: { 6011: if (m_condition) 6011: m_nested_bool.set(); 6011: } 6011: 6011: ~ScopedSetBool() 6011: { 6011: if (m_condition) 6011: m_nested_bool.unset(); 6011: } 6011: 6011: private: 6011: NestedBool& m_nested_bool; 6011: bool m_condition; 6011: }; 6011: 6011: struct JumpList 6011: { 6011: void push(SelectionList jump); 6011: const SelectionList& forward(); 6011: const SelectionList& backward(const SelectionList& current); 6011: void forget_buffer(Buffer& buffer); 6011: 6011: friend bool operator==(const JumpList& lhs, const JumpList& rhs) 6011: { 6011: return lhs.m_jumps == rhs.m_jumps and lhs.m_current == rhs.m_current; 6011: } 6011: 6011: friend bool operator!=(const JumpList& lhs, const JumpList& rhs) { return not (lhs == rhs); } 6011: 6011: private: 6011: using Contents = Vector; 6011: Contents m_jumps; 6011: size_t m_current = 0; 6011: }; 6011: 6011: using LastSelectFunc = std::function; 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: class Context 6011: { 6011: public: 6011: enum class Flags 6011: { 6011: None = 0, 6011: Transient = 1, 6011: }; 6011: 6011: Context(InputHandler& input_handler, SelectionList selections, 6011: Flags flags, String name = ""); 6011: 6011: struct EmptyContextFlag {}; 6011: explicit Context(EmptyContextFlag); 6011: ~Context(); 6011: 6011: Context(const Context&) = delete; 6011: Context& operator=(const Context&) = delete; 6011: 6011: Buffer& buffer() const; 6011: bool has_buffer() const { return (bool)m_selections; } 6011: 6011: Window& window() const; 6011: bool has_window() const { return (bool)m_window; } 6011: 6011: Client& client() const; 6011: bool has_client() const { return (bool)m_client; } 6011: 6011: InputHandler& input_handler() const; 6011: bool has_input_handler() const { return (bool)m_input_handler; } 6011: 6011: SelectionList& selections(); 6011: const SelectionList& selections() const; 6011: Vector selections_content() const; 6011: 6011: 6011: SelectionList& selections_write_only(); 6011: 6011: void change_buffer(Buffer& buffer); 6011: 6011: void set_client(Client& client); 6011: void set_window(Window& window); 6011: 6011: Scope& scope() const; 6011: 6011: OptionManager& options() const { return scope().options(); } 6011: HookManager& hooks() const { return scope().hooks(); } 6011: KeymapManager& keymaps() const { return scope().keymaps(); } 6011: AliasRegistry& aliases() const { return scope().aliases(); } 6011: 6011: void print_status(DisplayLine status, bool immediate = false) const; 6011: 6011: StringView main_sel_register_value(StringView reg) const; 6011: 6011: const String& name() const { return m_name; } 6011: void set_name(String name) { m_name = std::move(name); } 6011: 6011: bool is_editing() const { return m_edition_level!= 0; } 6011: void disable_undo_handling() { m_edition_level = -1; } 6011: 6011: NestedBool& hooks_disabled() { return m_hooks_disabled; } 6011: const NestedBool& hooks_disabled() const { return m_hooks_disabled; } 6011: 6011: NestedBool& keymaps_disabled() { return m_keymaps_disabled; } 6011: const NestedBool& keymaps_disabled() const { return m_keymaps_disabled; } 6011: 6011: NestedBool& history_disabled() { return m_history_disabled; } 6011: const NestedBool& history_disabled() const { return m_history_disabled; } 6011: 6011: Flags flags() const { return m_flags; } 6011: 6011: JumpList& jump_list() { return m_jump_list; } 6011: void push_jump() { m_jump_list.push(selections()); } 6011: 6011: template 6011: void set_last_select(Func&& last_select) { m_last_select = std::forward(last_select); } 6011: 6011: void repeat_last_select() { if (m_last_select) m_last_select(*this); } 6011: 6011: private: 6011: void begin_edition(); 6011: void end_edition(); 6011: int m_edition_level = 0; 6011: 6011: friend struct ScopedEdition; 6011: 6011: Flags m_flags; 6011: 6011: SafePtr m_input_handler; 6011: SafePtr m_window; 6011: SafePtr m_client; 6011: 6011: Optional m_selections; 6011: 6011: String m_name; 6011: 6011: JumpList m_jump_list; 6011: 6011: LastSelectFunc m_last_select; 6011: 6011: NestedBool m_hooks_disabled; 6011: NestedBool m_keymaps_disabled; 6011: NestedBool m_history_disabled; 6011: }; 6011: 6011: template<> 6011: struct WithBitOps : std::true_type {}; 6011: 6011: struct ScopedEdition 6011: { 6011: ScopedEdition(Context& context) 6011: : m_context(context), m_buffer(&context.buffer()) 6011: { m_context.begin_edition(); } 6011: 6011: ~ScopedEdition() { m_context.end_edition(); } 6011: 6011: Context& context() const { return m_context; } 6011: private: 6011: Context& m_context; 6011: SafePtr m_buffer; 6011: }; 6011: 6011: } 6011: # 6 "input_handler.hh" 2 6011: # 14 "input_handler.hh" 6011: namespace Kakoune 6011: { 6011: 6011: enum class MenuEvent 6011: { 6011: Select, 6011: Abort, 6011: Validate 6011: }; 6011: using MenuCallback = std::function; 6011: 6011: enum class PromptEvent 6011: { 6011: Change, 6011: Abort, 6011: Validate 6011: }; 6011: using PromptCallback = std::function; 6011: enum class PromptFlags 6011: { 6011: None = 0, 6011: Password = 1 << 0, 6011: DropHistoryEntriesWithBlankPrefix = 1 << 1 6011: }; 6011: template<> struct WithBitOps : std::true_type {}; 6011: 6011: 6011: using KeyCallback = std::function; 6011: 6011: class InputMode; 6011: enum class InsertMode : unsigned; 6011: enum class KeymapMode : char; 6011: 6011: class InputHandler : public SafeCountable 6011: { 6011: public: 6011: InputHandler(SelectionList selections, 6011: Context::Flags flags = Context::Flags::None, 6011: String name = ""); 6011: ~InputHandler(); 6011: 6011: 6011: void insert(InsertMode mode, int count); 6011: 6011: void repeat_last_insert(); 6011: 6011: 6011: 6011: 6011: 6011: void prompt(StringView prompt, String initstr, 6011: Face prompt_face, PromptFlags flags, 6011: Completer completer, PromptCallback callback); 6011: void set_prompt_face(Face prompt_face); 6011: 6011: 6011: 6011: 6011: 6011: void menu(Vector choices, MenuCallback callback); 6011: 6011: 6011: 6011: void on_next_key(KeymapMode mode, KeyCallback callback); 6011: 6011: 6011: void handle_key(Key key); 6011: 6011: void start_recording(char reg); 6011: bool is_recording() const; 6011: void stop_recording(); 6011: char recording_reg() const { return m_recording_reg; } 6011: 6011: void reset_normal_mode(); 6011: 6011: Context& context() { return m_context; } 6011: const Context& context() const { return m_context; } 6011: 6011: DisplayLine mode_line() const; 6011: 6011: 6011: struct ScopedForceNormal 6011: { 6011: ScopedForceNormal(InputHandler& handler, NormalParams params); 6011: ~ScopedForceNormal(); 6011: 6011: private: 6011: InputHandler& m_handler; 6011: InputMode* m_mode; 6011: }; 6011: 6011: private: 6011: Context m_context; 6011: 6011: friend class InputMode; 6011: Vector, MemoryDomain::Client> m_mode_stack; 6011: 6011: InputMode& current_mode() const { return *m_mode_stack.back(); } 6011: 6011: void push_mode(InputMode* new_mode); 6011: void pop_mode(InputMode* current_mode); 6011: 6011: struct Insertion{ InsertMode mode; Vector keys; bool disable_hooks; }; 6011: Insertion m_last_insert = { InsertMode::Insert, {}, false }; 6011: 6011: char m_recording_reg = 0; 6011: String m_recorded_keys; 6011: int m_recording_level = -1; 6011: 6011: int m_handle_key_level = 0; 6011: }; 6011: 6011: enum class AutoInfo 6011: { 6011: None = 0, 6011: Command = 1 << 0, 6011: OnKey = 1 << 1, 6011: Normal = 1 << 2 6011: }; 6011: 6011: template<> 6011: struct WithBitOps : std::true_type {}; 6011: 6011: constexpr Array, 3> enum_desc(AutoInfo) 6011: { 6011: return { { 6011: { AutoInfo::Command, "command"}, 6011: { AutoInfo::OnKey, "onkey"}, 6011: { AutoInfo::Normal, "normal" } 6011: } }; 6011: } 6011: 6011: bool show_auto_info_ifn(StringView title, StringView info, AutoInfo mask, const Context& context); 6011: void hide_auto_info_ifn(const Context& context, bool hide); 6011: 6011: template 6011: void on_next_key_with_autoinfo(const Context& context, KeymapMode keymap_mode, Cmd cmd, 6011: StringView title, StringView info) 6011: { 6011: const bool hide = show_auto_info_ifn(title, info, AutoInfo::OnKey, context); 6011: context.input_handler().on_next_key( 6011: keymap_mode, [hide,cmd](Key key, Context& context) mutable { 6011: hide_auto_info_ifn(context, hide); 6011: cmd(key, context); 6011: }); 6011: } 6011: 6011: void scroll_window(Context& context, LineCount offset); 6011: 6011: } 6011: # 7 "client.hh" 2 6011: 6011: 6011: 6011: 6011: 6011: namespace Kakoune 6011: { 6011: 6011: class Window; 6011: class UserInterface; 6011: class String; 6011: struct Key; 6011: 6011: enum class EventMode; 6011: enum class InfoStyle; 6011: enum class MenuStyle; 6011: 6011: 6011: class Client : public SafeCountable, public OptionManagerWatcher 6011: { 6011: public: 6011: Client(std::unique_ptr&& ui, 6011: std::unique_ptr&& window, 6011: SelectionList selections, 6011: EnvVarMap env_vars, 6011: String name); 6011: ~Client(); 6011: 6011: Client(Client&&) = delete; 6011: 6011: bool process_pending_inputs(); 6011: 6011: void menu_show(Vector choices, BufferCoord anchor, MenuStyle style); 6011: void menu_select(int selected); 6011: void menu_hide(); 6011: 6011: void info_show(String title, String content, BufferCoord anchor, InfoStyle style); 6011: void info_hide(); 6011: 6011: void print_status(DisplayLine status_line, bool immediate = false); 6011: 6011: DisplayCoord dimensions() const; 6011: 6011: void force_redraw(); 6011: void redraw_ifn(); 6011: 6011: void check_if_buffer_needs_reloading(); 6011: 6011: Context& context() { return m_input_handler.context(); } 6011: const Context& context() const { return m_input_handler.context(); } 6011: 6011: InputHandler& input_handler() { return m_input_handler; } 6011: const InputHandler& input_handler() const { return m_input_handler; } 6011: 6011: void change_buffer(Buffer& buffer); 6011: 6011: StringView get_env_var(StringView name) const; 6011: 6011: Buffer* last_buffer() const { return m_last_buffer.get(); } 6011: void set_last_buffer(Buffer* last_buffer) { m_last_buffer = last_buffer; } 6011: 6011: private: 6011: void on_option_changed(const Option& option) override; 6011: 6011: void on_buffer_reload_key(Key key); 6011: void close_buffer_reload_dialog(); 6011: void reload_buffer(); 6011: 6011: Optional get_next_key(EventMode mode); 6011: 6011: DisplayLine generate_mode_line() const; 6011: 6011: std::unique_ptr m_ui; 6011: std::unique_ptr m_window; 6011: 6011: EnvVarMap m_env_vars; 6011: 6011: InputHandler m_input_handler; 6011: 6011: DisplayLine m_status_line; 6011: DisplayLine m_mode_line; 6011: 6011: enum PendingUI : int 6011: { 6011: MenuShow = 1 << 0, 6011: MenuSelect = 1 << 1, 6011: MenuHide = 1 << 2, 6011: InfoShow = 1 << 3, 6011: InfoHide = 1 << 4, 6011: StatusLine = 1 << 5, 6011: Draw = 1 << 6, 6011: Refresh = 1 << 7, 6011: }; 6011: int m_ui_pending = 0; 6011: 6011: struct Menu 6011: { 6011: Vector items; 6011: BufferCoord anchor; 6011: DisplayCoord ui_anchor; 6011: MenuStyle style; 6011: int selected; 6011: } m_menu; 6011: 6011: struct Info 6011: { 6011: String title; 6011: String content; 6011: BufferCoord anchor; 6011: DisplayCoord ui_anchor; 6011: InfoStyle style; 6011: } m_info; 6011: 6011: Vector m_pending_keys; 6011: 6011: bool m_buffer_reload_dialog_opened = false; 6011: 6011: SafePtr m_last_buffer; 6011: }; 6011: 6011: enum class Autoreload 6011: { 6011: Yes, 6011: No, 6011: Ask 6011: }; 6011: 6011: constexpr Array, 5> enum_desc(Autoreload) 6011: { 6011: return { { 6011: { Autoreload::Yes, "yes" }, 6011: { Autoreload::No, "no" }, 6011: { Autoreload::Ask, "ask" }, 6011: { Autoreload::Yes, "true" }, 6011: { Autoreload::No, "false" } 6011: } }; 6011: } 6011: 6011: } 6011: # 5 "client_manager.hh" 2 6011: 6011: 6011: namespace Kakoune 6011: { 6011: 6011: struct WindowAndSelections 6011: { 6011: std::unique_ptr window; 6011: SelectionList selections; 6011: size_t timestamp; 6011: }; 6011: 6011: class ClientManager : public Singleton 6011: { 6011: public: 6011: ClientManager(); 6011: ~ClientManager(); 6011: 6011: Client* create_client(std::unique_ptr&& ui, 6011: EnvVarMap env_vars, StringView init_cmds, 6011: BufferCoord init_coord); 6011: 6011: bool empty() const { return m_clients.empty(); } 6011: size_t count() const { return m_clients.size(); } 6011: 6011: void clear(); 6011: 6011: void ensure_no_client_uses_buffer(Buffer& buffer); 6011: 6011: WindowAndSelections get_free_window(Buffer& buffer); 6011: void add_free_window(std::unique_ptr&& window, SelectionList selections); 6011: 6011: void redraw_clients() const; 6011: void process_pending_inputs() const; 6011: 6011: Client* get_client_ifp(StringView name); 6011: Client& get_client(StringView name); 6011: bool validate_client_name(StringView name) const; 6011: void remove_client(Client& client, bool graceful); 6011: 6011: using ClientList = Vector, MemoryDomain::Client>; 6011: using iterator = ClientList::const_iterator; 6011: 6011: iterator begin() const { return m_clients.begin(); } 6011: iterator end() const { return m_clients.end(); } 6011: 6011: CandidateList complete_client_name(StringView name, 6011: ByteCount cursor_pos = -1) const; 6011: 6011: void clear_window_trash(); 6011: void clear_client_trash(); 6011: private: 6011: String generate_name() const; 6011: 6011: ClientList m_clients; 6011: ClientList m_client_trash; 6011: Vector m_free_windows; 6011: Vector, MemoryDomain::Client> m_window_trash; 6011: }; 6011: 6011: } 6011: # 7 "normal.cc" 2 6011: # 1 "command_manager.hh" 1 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: # 1 "shell_manager.hh" 1 6011: # 11 "shell_manager.hh" 6011: namespace Kakoune 6011: { 6011: 6011: class Context; 6011: 6011: using EnvVarRetriever = std::function; 6011: 6011: struct ShellContext 6011: { 6011: ConstArrayView params; 6011: EnvVarMap env_vars; 6011: }; 6011: 6011: class ShellManager : public Singleton 6011: { 6011: public: 6011: ShellManager(); 6011: 6011: enum class Flags 6011: { 6011: None = 0, 6011: WaitForStdout = 1 6011: }; 6011: 6011: std::pair eval(StringView cmdline, const Context& context, 6011: StringView input = {}, 6011: Flags flags = Flags::WaitForStdout, 6011: const ShellContext& shell_context = {}); 6011: 6011: void register_env_var(StringView str, bool prefix, EnvVarRetriever retriever); 6011: String get_val(StringView name, const Context& context) const; 6011: 6011: CandidateList complete_env_var(StringView prefix, ByteCount cursor_pos) const; 6011: 6011: private: 6011: String m_shell; 6011: 6011: struct EnvVarDesc { String str; bool prefix; EnvVarRetriever func; }; 6011: Vector m_env_vars; 6011: }; 6011: 6011: template<> struct WithBitOps : std::true_type {}; 6011: 6011: } 6011: # 9 "command_manager.hh" 2 6011: # 1 "parameters_parser.hh" 1 6011: # 11 "parameters_parser.hh" 6011: namespace Kakoune 6011: { 6011: 6011: using ParameterList = ConstArrayView; 6011: 6011: struct parameter_error : public runtime_error 6011: { 6011: using runtime_error::runtime_error; 6011: }; 6011: 6011: struct unknown_option : public parameter_error 6011: { 6011: unknown_option(StringView name) 6011: : parameter_error(format("unknown option '{}'", name)) {} 6011: }; 6011: 6011: struct missing_option_value: public parameter_error 6011: { 6011: missing_option_value(StringView name) 6011: : parameter_error(format("missing value for option '{}'", name)) {} 6011: }; 6011: 6011: struct wrong_argument_count : public parameter_error 6011: { 6011: wrong_argument_count() : parameter_error("wrong argument count") {} 6011: }; 6011: 6011: struct SwitchDesc 6011: { 6011: bool takes_arg; 6011: String description; 6011: }; 6011: 6011: using SwitchMap = IdMap; 6011: 6011: String generate_switches_doc(const SwitchMap& opts); 6011: 6011: struct ParameterDesc 6011: { 6011: enum class Flags 6011: { 6011: None = 0, 6011: SwitchesOnlyAtStart = 1, 6011: SwitchesAsPositional = 2, 6011: }; 6011: 6011: ParameterDesc() = default; 6011: ParameterDesc(SwitchMap switches, Flags flags = Flags::None, 6011: size_t min_positionals = 0, size_t max_positionals = -1) 6011: : switches(std::move(switches)), flags(flags), 6011: min_positionals(min_positionals), max_positionals(max_positionals) {} 6011: 6011: SwitchMap switches; 6011: Flags flags = Flags::None; 6011: size_t min_positionals = 0; 6011: size_t max_positionals = -1; 6011: }; 6011: 6011: template<> struct WithBitOps : std::true_type {}; 6011: 6011: 6011: 6011: 6011: 6011: 6011: struct ParametersParser 6011: { 6011: 6011: 6011: 6011: ParametersParser(ParameterList params, const ParameterDesc& desc); 6011: 6011: 6011: 6011: Optional get_switch(StringView name) const; 6011: 6011: struct iterator : std::iterator 6011: { 6011: iterator(const ParametersParser& parser, size_t index) 6011: : m_parser(parser), m_index(index) {} 6011: 6011: const String& operator*() const { return m_parser[m_index]; } 6011: const String* operator->() const { return &m_parser[m_index]; } 6011: 6011: iterator& operator++() { ++m_index; return *this; } 6011: iterator operator++(int) { auto copy = *this; ++m_index; return copy; } 6011: 6011: bool operator==(const iterator& other) const 6011: { 6011: if (not (&m_parser == &other.m_parser)) on_assert_failed("assert failed \"" "&m_parser == &other.m_parser" "\" at " "parameters_parser.hh" ":" "100"); 6011: return m_index == other.m_index; 6011: } 6011: 6011: bool operator!=(const iterator& other) const 6011: { 6011: return not (*this == other); 6011: } 6011: 6011: private: 6011: const ParametersParser& m_parser; 6011: size_t m_index; 6011: }; 6011: 6011: 6011: size_t positional_count() const { return m_positional_indices.size(); } 6011: 6011: 6011: const String& operator[] (size_t index) const 6011: { 6011: if (not (index < positional_count())) on_assert_failed("assert failed \"" "index < positional_count()" "\" at " "parameters_parser.hh" ":" "120"); 6011: return m_params[m_positional_indices[index]]; 6011: } 6011: 6011: iterator begin() const { return iterator(*this, 0); } 6011: iterator end() const { return iterator(*this, m_positional_indices.size()); } 6011: 6011: private: 6011: ParameterList m_params; 6011: Vector m_positional_indices; 6011: const ParameterDesc& m_desc; 6011: }; 6011: 6011: } 6011: # 10 "command_manager.hh" 2 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: namespace Kakoune 6011: { 6011: 6011: class Context; 6011: using CommandParameters = ConstArrayView; 6011: using Command = std::function; 6011: 6011: using CommandCompleter = std::function; 6011: 6011: using CommandHelper = std::function; 6011: 6011: enum class CommandFlags 6011: { 6011: None = 0, 6011: Hidden = 1, 6011: }; 6011: 6011: template<> struct WithBitOps : std::true_type {}; 6011: 6011: using CommandInfo = std::pair; 6011: 6011: struct Token 6011: { 6011: enum class Type 6011: { 6011: Raw, 6011: RawQuoted, 6011: RawEval, 6011: ShellExpand, 6011: RegisterExpand, 6011: OptionExpand, 6011: ValExpand, 6011: ArgExpand, 6011: CommandSeparator 6011: }; 6011: Token() : m_type(Type::Raw) {} 6011: 6011: Token(Type type, ByteCount b, ByteCount e, DisplayCoord coord, String str = "") 6011: : m_type(type), m_begin(b), m_end(e), m_coord(coord), m_content(std::move(str)) {} 6011: 6011: Type type() const { return m_type; } 6011: ByteCount begin() const { return m_begin; } 6011: ByteCount end() const { return m_end; } 6011: DisplayCoord coord() const { return m_coord; } 6011: const String& content() const { return m_content; } 6011: 6011: private: 6011: Type m_type; 6011: ByteCount m_begin; 6011: ByteCount m_end; 6011: DisplayCoord m_coord; 6011: String m_content; 6011: }; 6011: 6011: using TokenList = Vector; 6011: 6011: template 6011: TokenList parse(StringView line); 6011: 6011: class CommandManager : public Singleton 6011: { 6011: public: 6011: void execute(StringView command_line, Context& context, 6011: const ShellContext& shell_context = ShellContext{}); 6011: 6011: Completions complete(const Context& context, CompletionFlags flags, 6011: StringView command_line, ByteCount cursor_pos); 6011: 6011: Completions complete(const Context& context, CompletionFlags flags, 6011: CommandParameters params, 6011: size_t token_to_complete, ByteCount pos_in_token); 6011: 6011: CommandInfo command_info(const Context& context, 6011: StringView command_line) const; 6011: 6011: bool command_defined(const String& command_name) const; 6011: 6011: void register_command(String command_name, Command command, 6011: String docstring, 6011: ParameterDesc param_desc, 6011: CommandFlags flags = CommandFlags::None, 6011: CommandHelper helper = CommandHelper(), 6011: CommandCompleter completer = CommandCompleter()); 6011: 6011: Completions complete_command_name(const Context& context, StringView query, bool with_aliases) const; 6011: 6011: void clear_last_complete_command() { m_last_complete_command = String{}; } 6011: 6011: private: 6011: void execute_single_command(CommandParameters params, 6011: Context& context, 6011: const ShellContext& shell_context, 6011: DisplayCoord pos) const; 6011: 6011: struct CommandDescriptor 6011: { 6011: Command command; 6011: String docstring; 6011: ParameterDesc param_desc; 6011: CommandFlags flags; 6011: CommandHelper helper; 6011: CommandCompleter completer; 6011: }; 6011: using CommandMap = UnorderedMap; 6011: CommandMap m_commands; 6011: String m_last_complete_command; 6011: 6011: CommandMap::const_iterator find_command(const Context& context, 6011: const String& name) const; 6011: }; 6011: 6011: String expand(StringView str, const Context& context, 6011: const ShellContext& shell_context = ShellContext{}); 6011: 6011: String expand(StringView str, const Context& context, 6011: const ShellContext& shell_context, 6011: std::function postprocess); 6011: 6011: } 6011: # 8 "normal.cc" 2 6011: # 1 "commands.hh" 1 6011: 6011: 6011: 6011: namespace Kakoune 6011: { 6011: 6011: void register_commands(); 6011: 6011: struct kill_session {}; 6011: 6011: } 6011: # 9 "normal.cc" 2 6011: 6011: 6011: # 1 "face_registry.hh" 1 6011: # 9 "face_registry.hh" 6011: namespace Kakoune 6011: { 6011: 6011: class FaceRegistry : public Singleton 6011: { 6011: public: 6011: FaceRegistry(); 6011: 6011: Face operator[](const String& facedesc); 6011: void register_alias(const String& name, const String& facedesc, 6011: bool override = false); 6011: 6011: CandidateList complete_alias_name(StringView prefix, 6011: ByteCount cursor_pos) const; 6011: private: 6011: struct FaceOrAlias 6011: { 6011: Face face; 6011: String alias; 6011: 6011: FaceOrAlias(Face face = Face{}) : face(face) {} 6011: }; 6011: 6011: using AliasMap = UnorderedMap; 6011: AliasMap m_aliases; 6011: }; 6011: 6011: inline Face get_face(const String& facedesc) 6011: { 6011: if (FaceRegistry::has_instance()) 6011: return FaceRegistry::instance()[facedesc]; 6011: return Face{}; 6011: } 6011: 6011: } 6011: # 12 "normal.cc" 2 6011: # 1 "file.hh" 1 6011: # 10 "file.hh" 6011: # 1 "/usr/include/arm-linux-gnueabihf/sys/stat.h" 1 3 4 6011: # 99 "/usr/include/arm-linux-gnueabihf/sys/stat.h" 3 4 6011: 6011: # 99 "/usr/include/arm-linux-gnueabihf/sys/stat.h" 3 4 6011: extern "C" { 6011: 6011: # 1 "/usr/include/arm-linux-gnueabihf/bits/stat.h" 1 3 4 6011: # 38 "/usr/include/arm-linux-gnueabihf/bits/stat.h" 3 4 6011: struct stat 6011: { 6011: __dev_t st_dev; 6011: unsigned short int __pad1; 6011: 6011: __ino_t st_ino; 6011: 6011: 6011: 6011: __mode_t st_mode; 6011: __nlink_t st_nlink; 6011: __uid_t st_uid; 6011: __gid_t st_gid; 6011: __dev_t st_rdev; 6011: unsigned short int __pad2; 6011: 6011: __off_t st_size; 6011: 6011: 6011: 6011: __blksize_t st_blksize; 6011: 6011: 6011: __blkcnt_t st_blocks; 6011: # 72 "/usr/include/arm-linux-gnueabihf/bits/stat.h" 3 4 6011: struct timespec st_atim; 6011: struct timespec st_mtim; 6011: struct timespec st_ctim; 6011: # 87 "/usr/include/arm-linux-gnueabihf/bits/stat.h" 3 4 6011: unsigned long int __glibc_reserved4; 6011: unsigned long int __glibc_reserved5; 6011: 6011: 6011: 6011: }; 6011: 6011: 6011: struct stat64 6011: { 6011: __dev_t st_dev; 6011: unsigned int __pad1; 6011: 6011: __ino_t __st_ino; 6011: __mode_t st_mode; 6011: __nlink_t st_nlink; 6011: __uid_t st_uid; 6011: __gid_t st_gid; 6011: __dev_t st_rdev; 6011: unsigned int __pad2; 6011: __off64_t st_size; 6011: __blksize_t st_blksize; 6011: 6011: __blkcnt64_t st_blocks; 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: struct timespec st_atim; 6011: struct timespec st_mtim; 6011: struct timespec st_ctim; 6011: # 129 "/usr/include/arm-linux-gnueabihf/bits/stat.h" 3 4 6011: __ino64_t st_ino; 6011: }; 6011: # 102 "/usr/include/arm-linux-gnueabihf/sys/stat.h" 2 3 4 6011: # 205 "/usr/include/arm-linux-gnueabihf/sys/stat.h" 3 4 6011: extern int stat (const char *__restrict __file, 6011: struct stat *__restrict __buf) throw () __attribute__ ((__nonnull__ (1, 2))); 6011: 6011: 6011: 6011: extern int fstat (int __fd, struct stat *__buf) throw () __attribute__ ((__nonnull__ (2))); 6011: # 224 "/usr/include/arm-linux-gnueabihf/sys/stat.h" 3 4 6011: extern int stat64 (const char *__restrict __file, 6011: struct stat64 *__restrict __buf) throw () __attribute__ ((__nonnull__ (1, 2))); 6011: extern int fstat64 (int __fd, struct stat64 *__buf) throw () __attribute__ ((__nonnull__ (2))); 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: extern int fstatat (int __fd, const char *__restrict __file, 6011: struct stat *__restrict __buf, int __flag) 6011: throw () __attribute__ ((__nonnull__ (2, 3))); 6011: # 249 "/usr/include/arm-linux-gnueabihf/sys/stat.h" 3 4 6011: extern int fstatat64 (int __fd, const char *__restrict __file, 6011: struct stat64 *__restrict __buf, int __flag) 6011: throw () __attribute__ ((__nonnull__ (2, 3))); 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: extern int lstat (const char *__restrict __file, 6011: struct stat *__restrict __buf) throw () __attribute__ ((__nonnull__ (1, 2))); 6011: # 272 "/usr/include/arm-linux-gnueabihf/sys/stat.h" 3 4 6011: extern int lstat64 (const char *__restrict __file, 6011: struct stat64 *__restrict __buf) 6011: throw () __attribute__ ((__nonnull__ (1, 2))); 6011: 6011: 6011: 6011: 6011: 6011: extern int chmod (const char *__file, __mode_t __mode) 6011: throw () __attribute__ ((__nonnull__ (1))); 6011: 6011: 6011: 6011: 6011: 6011: extern int lchmod (const char *__file, __mode_t __mode) 6011: throw () __attribute__ ((__nonnull__ (1))); 6011: 6011: 6011: 6011: 6011: extern int fchmod (int __fd, __mode_t __mode) throw (); 6011: 6011: 6011: 6011: 6011: 6011: extern int fchmodat (int __fd, const char *__file, __mode_t __mode, 6011: int __flag) 6011: throw () __attribute__ ((__nonnull__ (2))) __attribute__ ((__warn_unused_result__)); 6011: 6011: 6011: 6011: 6011: 6011: 6011: extern __mode_t umask (__mode_t __mask) throw (); 6011: 6011: 6011: 6011: 6011: extern __mode_t getumask (void) throw (); 6011: 6011: 6011: 6011: extern int mkdir (const char *__path, __mode_t __mode) 6011: throw () __attribute__ ((__nonnull__ (1))); 6011: 6011: 6011: 6011: 6011: 6011: extern int mkdirat (int __fd, const char *__path, __mode_t __mode) 6011: throw () __attribute__ ((__nonnull__ (2))); 6011: 6011: 6011: 6011: 6011: 6011: 6011: extern int mknod (const char *__path, __mode_t __mode, __dev_t __dev) 6011: throw () __attribute__ ((__nonnull__ (1))); 6011: 6011: 6011: 6011: 6011: 6011: extern int mknodat (int __fd, const char *__path, __mode_t __mode, 6011: __dev_t __dev) throw () __attribute__ ((__nonnull__ (2))); 6011: 6011: 6011: 6011: 6011: 6011: extern int mkfifo (const char *__path, __mode_t __mode) 6011: throw () __attribute__ ((__nonnull__ (1))); 6011: 6011: 6011: 6011: 6011: 6011: extern int mkfifoat (int __fd, const char *__path, __mode_t __mode) 6011: throw () __attribute__ ((__nonnull__ (2))); 6011: 6011: 6011: 6011: 6011: 6011: extern int utimensat (int __fd, const char *__path, 6011: const struct timespec __times[2], 6011: int __flags) 6011: throw () __attribute__ ((__nonnull__ (2))); 6011: 6011: 6011: 6011: 6011: extern int futimens (int __fd, const struct timespec __times[2]) throw (); 6011: # 395 "/usr/include/arm-linux-gnueabihf/sys/stat.h" 3 4 6011: extern int __fxstat (int __ver, int __fildes, struct stat *__stat_buf) 6011: throw () __attribute__ ((__nonnull__ (3))); 6011: extern int __xstat (int __ver, const char *__filename, 6011: struct stat *__stat_buf) throw () __attribute__ ((__nonnull__ (2, 3))); 6011: extern int __lxstat (int __ver, const char *__filename, 6011: struct stat *__stat_buf) throw () __attribute__ ((__nonnull__ (2, 3))); 6011: extern int __fxstatat (int __ver, int __fildes, const char *__filename, 6011: struct stat *__stat_buf, int __flag) 6011: throw () __attribute__ ((__nonnull__ (3, 4))); 6011: # 428 "/usr/include/arm-linux-gnueabihf/sys/stat.h" 3 4 6011: extern int __fxstat64 (int __ver, int __fildes, struct stat64 *__stat_buf) 6011: throw () __attribute__ ((__nonnull__ (3))); 6011: extern int __xstat64 (int __ver, const char *__filename, 6011: struct stat64 *__stat_buf) throw () __attribute__ ((__nonnull__ (2, 3))); 6011: extern int __lxstat64 (int __ver, const char *__filename, 6011: struct stat64 *__stat_buf) throw () __attribute__ ((__nonnull__ (2, 3))); 6011: extern int __fxstatat64 (int __ver, int __fildes, const char *__filename, 6011: struct stat64 *__stat_buf, int __flag) 6011: throw () __attribute__ ((__nonnull__ (3, 4))); 6011: 6011: extern int __xmknod (int __ver, const char *__path, __mode_t __mode, 6011: __dev_t *__dev) throw () __attribute__ ((__nonnull__ (2, 4))); 6011: 6011: extern int __xmknodat (int __ver, int __fd, const char *__path, 6011: __mode_t __mode, __dev_t *__dev) 6011: throw () __attribute__ ((__nonnull__ (3, 5))); 6011: 6011: 6011: 6011: 6011: extern __inline __attribute__ ((__gnu_inline__)) int 6011: __attribute__ ((__leaf__)) stat (const char *__path, struct stat *__statbuf) throw () 6011: { 6011: return __xstat (3, __path, __statbuf); 6011: } 6011: 6011: 6011: extern __inline __attribute__ ((__gnu_inline__)) int 6011: __attribute__ ((__leaf__)) lstat (const char *__path, struct stat *__statbuf) throw () 6011: { 6011: return __lxstat (3, __path, __statbuf); 6011: } 6011: 6011: 6011: extern __inline __attribute__ ((__gnu_inline__)) int 6011: __attribute__ ((__leaf__)) fstat (int __fd, struct stat *__statbuf) throw () 6011: { 6011: return __fxstat (3, __fd, __statbuf); 6011: } 6011: 6011: 6011: extern __inline __attribute__ ((__gnu_inline__)) int 6011: __attribute__ ((__leaf__)) fstatat (int __fd, const char *__filename, struct stat *__statbuf, int __flag) throw () 6011: 6011: { 6011: return __fxstatat (3, __fd, __filename, __statbuf, __flag); 6011: } 6011: 6011: 6011: 6011: extern __inline __attribute__ ((__gnu_inline__)) int 6011: __attribute__ ((__leaf__)) mknod (const char *__path, __mode_t __mode, __dev_t __dev) throw () 6011: { 6011: return __xmknod (1, __path, __mode, &__dev); 6011: } 6011: 6011: 6011: 6011: extern __inline __attribute__ ((__gnu_inline__)) int 6011: __attribute__ ((__leaf__)) mknodat (int __fd, const char *__path, __mode_t __mode, __dev_t __dev) throw () 6011: 6011: { 6011: return __xmknodat (1, __fd, __path, __mode, &__dev); 6011: } 6011: 6011: 6011: 6011: 6011: 6011: extern __inline __attribute__ ((__gnu_inline__)) int 6011: __attribute__ ((__leaf__)) stat64 (const char *__path, struct stat64 *__statbuf) throw () 6011: { 6011: return __xstat64 (3, __path, __statbuf); 6011: } 6011: 6011: 6011: extern __inline __attribute__ ((__gnu_inline__)) int 6011: __attribute__ ((__leaf__)) lstat64 (const char *__path, struct stat64 *__statbuf) throw () 6011: { 6011: return __lxstat64 (3, __path, __statbuf); 6011: } 6011: 6011: 6011: extern __inline __attribute__ ((__gnu_inline__)) int 6011: __attribute__ ((__leaf__)) fstat64 (int __fd, struct stat64 *__statbuf) throw () 6011: { 6011: return __fxstat64 (3, __fd, __statbuf); 6011: } 6011: 6011: 6011: extern __inline __attribute__ ((__gnu_inline__)) int 6011: __attribute__ ((__leaf__)) fstatat64 (int __fd, const char *__filename, struct stat64 *__statbuf, int __flag) throw () 6011: 6011: { 6011: return __fxstatat64 (3, __fd, __filename, __statbuf, __flag); 6011: } 6011: 6011: 6011: 6011: 6011: 6011: 6011: } 6011: # 11 "file.hh" 2 6011: 6011: 6011: # 12 "file.hh" 6011: namespace Kakoune 6011: { 6011: 6011: class Buffer; 6011: class String; 6011: class StringView; 6011: class Regex; 6011: 6011: using CandidateList = Vector; 6011: 6011: 6011: String parse_filename(StringView filename); 6011: String real_path(StringView filename); 6011: String compact_path(StringView filename); 6011: 6011: 6011: std::pair split_path(StringView path); 6011: 6011: String get_kak_binary_path(); 6011: 6011: bool fd_readable(int fd); 6011: bool fd_writable(int fd); 6011: String read_fd(int fd, bool text = false); 6011: String read_file(StringView filename, bool text = false); 6011: void write(int fd, StringView data); 6011: 6011: struct MappedFile 6011: { 6011: MappedFile(StringView filename); 6011: ~MappedFile(); 6011: 6011: operator StringView() const; 6011: 6011: int fd; 6011: const char* data; 6011: struct stat st {}; 6011: }; 6011: 6011: void write_buffer_to_file(Buffer& buffer, StringView filename); 6011: void write_buffer_to_fd(Buffer& buffer, int fd); 6011: void write_buffer_to_backup_file(Buffer& buffer); 6011: 6011: String find_file(StringView filename, ConstArrayView paths); 6011: bool file_exists(StringView filename); 6011: 6011: Vector list_files(StringView directory); 6011: 6011: void make_directory(StringView dir, mode_t mode); 6011: 6011: timespec get_fs_timestamp(StringView filename); 6011: 6011: constexpr bool operator==(const timespec& lhs, const timespec& rhs) 6011: { 6011: return lhs.tv_sec == rhs.tv_sec and lhs.tv_nsec == rhs.tv_nsec; 6011: } 6011: 6011: constexpr bool operator!=(const timespec& lhs, const timespec& rhs) 6011: { 6011: return not (lhs == rhs); 6011: } 6011: 6011: enum class FilenameFlags 6011: { 6011: None = 0, 6011: OnlyDirectories = 1 << 0, 6011: Expand = 1 << 1 6011: }; 6011: 6011: template<> struct WithBitOps : std::true_type {}; 6011: 6011: CandidateList complete_filename(StringView prefix, const Regex& ignore_regex, 6011: ByteCount cursor_pos = -1, 6011: FilenameFlags flags = FilenameFlags::None); 6011: 6011: CandidateList complete_command(StringView prefix, ByteCount cursor_pos = -1); 6011: 6011: } 6011: # 13 "normal.cc" 2 6011: 6011: 6011: # 1 "register_manager.hh" 1 6011: # 11 "register_manager.hh" 6011: namespace Kakoune 6011: { 6011: 6011: class Context; 6011: 6011: class Register 6011: { 6011: public: 6011: virtual ~Register() {} 6011: virtual Register& operator=(ConstArrayView values) = 0; 6011: 6011: virtual ConstArrayView values(const Context& context) = 0; 6011: }; 6011: 6011: 6011: 6011: class StaticRegister : public Register 6011: { 6011: public: 6011: Register& operator=(ConstArrayView values) override 6011: { 6011: m_content = Vector(values.begin(), values.end()); 6011: return *this; 6011: } 6011: 6011: ConstArrayView values(const Context&) override 6011: { 6011: if (m_content.empty()) 6011: return ConstArrayView(String::ms_empty); 6011: else 6011: return ConstArrayView(m_content); 6011: } 6011: protected: 6011: Vector m_content; 6011: }; 6011: 6011: 6011: 6011: template 6011: class DynamicRegister : public StaticRegister 6011: { 6011: public: 6011: DynamicRegister(Func function) 6011: : m_function(std::move(function)) {} 6011: 6011: Register& operator=(ConstArrayView values) override 6011: { 6011: throw runtime_error("this register is not assignable"); 6011: } 6011: 6011: ConstArrayView values(const Context& context) override 6011: { 6011: m_content = m_function(context); 6011: return StaticRegister::values(context); 6011: } 6011: 6011: private: 6011: Func m_function; 6011: }; 6011: 6011: template 6011: std::unique_ptr make_dyn_reg(Func func) 6011: { 6011: return make_unique>(std::move(func)); 6011: } 6011: 6011: class NullRegister : public Register 6011: { 6011: public: 6011: Register& operator=(ConstArrayView values) override 6011: { 6011: return *this; 6011: } 6011: 6011: ConstArrayView values(const Context& context) override 6011: { 6011: return ConstArrayView(String::ms_empty); 6011: } 6011: }; 6011: 6011: class RegisterManager : public Singleton 6011: { 6011: public: 6011: Register& operator[](StringView reg) const; 6011: Register& operator[](Codepoint c) const; 6011: void add_register(char c, std::unique_ptr reg); 6011: 6011: protected: 6011: UnorderedMap, MemoryDomain::Registers> m_registers; 6011: }; 6011: 6011: } 6011: # 16 "normal.cc" 2 6011: # 1 "selectors.hh" 1 6011: # 9 "selectors.hh" 6011: # 1 "regex.hh" 1 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: # 1 "/usr/include/boost/regex.hpp" 1 3 4 6011: # 28 "/usr/include/boost/regex.hpp" 3 4 6011: # 1 "/usr/include/boost/regex/config.hpp" 1 3 4 6011: # 28 "/usr/include/boost/regex/config.hpp" 3 4 6011: # 1 "/usr/include/boost/version.hpp" 1 3 4 6011: # 29 "/usr/include/boost/regex/config.hpp" 2 3 4 6011: # 42 "/usr/include/boost/regex/config.hpp" 3 4 6011: # 1 "/usr/include/boost/regex/user.hpp" 1 3 4 6011: # 43 "/usr/include/boost/regex/config.hpp" 2 3 4 6011: 6011: # 1 "/usr/include/boost/config.hpp" 1 3 4 6011: # 30 "/usr/include/boost/config.hpp" 3 4 6011: # 1 "/usr/include/boost/config/user.hpp" 1 3 4 6011: # 31 "/usr/include/boost/config.hpp" 2 3 4 6011: 6011: 6011: 6011: 6011: # 1 "/usr/include/boost/config/detail/select_compiler_config.hpp" 1 3 4 6011: # 36 "/usr/include/boost/config.hpp" 2 3 4 6011: 6011: 6011: 6011: # 1 "/usr/include/boost/config/compiler/gcc.hpp" 1 3 4 6011: # 40 "/usr/include/boost/config.hpp" 2 3 4 6011: 6011: 6011: 6011: 6011: # 1 "/usr/include/boost/config/detail/select_stdlib_config.hpp" 1 3 4 6011: # 45 "/usr/include/boost/config.hpp" 2 3 4 6011: 6011: 6011: 6011: # 1 "/usr/include/boost/config/stdlib/libstdcpp3.hpp" 1 3 4 6011: # 78 "/usr/include/boost/config/stdlib/libstdcpp3.hpp" 3 4 6011: # 1 "/usr/include/unistd.h" 1 3 4 6011: # 27 "/usr/include/unistd.h" 3 4 6011: 6011: # 27 "/usr/include/unistd.h" 3 4 6011: extern "C" { 6011: # 205 "/usr/include/unistd.h" 3 4 6011: # 1 "/usr/include/arm-linux-gnueabihf/bits/posix_opt.h" 1 3 4 6011: # 206 "/usr/include/unistd.h" 2 3 4 6011: 6011: 6011: 6011: # 1 "/usr/include/arm-linux-gnueabihf/bits/environments.h" 1 3 4 6011: # 22 "/usr/include/arm-linux-gnueabihf/bits/environments.h" 3 4 6011: # 1 "/usr/include/arm-linux-gnueabihf/bits/wordsize.h" 1 3 4 6011: # 23 "/usr/include/arm-linux-gnueabihf/bits/environments.h" 2 3 4 6011: # 210 "/usr/include/unistd.h" 2 3 4 6011: # 229 "/usr/include/unistd.h" 3 4 6011: # 1 "/usr/lib/gcc/arm-linux-gnueabihf/8/include/stddef.h" 1 3 4 6011: # 230 "/usr/include/unistd.h" 2 3 4 6011: # 277 "/usr/include/unistd.h" 3 4 6011: typedef __socklen_t socklen_t; 6011: # 290 "/usr/include/unistd.h" 3 4 6011: extern int access (const char *__name, int __type) throw () __attribute__ ((__nonnull__ (1))); 6011: 6011: 6011: 6011: 6011: extern int euidaccess (const char *__name, int __type) 6011: throw () __attribute__ ((__nonnull__ (1))); 6011: 6011: 6011: extern int eaccess (const char *__name, int __type) 6011: throw () __attribute__ ((__nonnull__ (1))); 6011: 6011: 6011: 6011: 6011: 6011: 6011: extern int faccessat (int __fd, const char *__file, int __type, int __flag) 6011: throw () __attribute__ ((__nonnull__ (2))) __attribute__ ((__warn_unused_result__)); 6011: # 337 "/usr/include/unistd.h" 3 4 6011: extern __off_t lseek (int __fd, __off_t __offset, int __whence) throw (); 6011: # 348 "/usr/include/unistd.h" 3 4 6011: extern __off64_t lseek64 (int __fd, __off64_t __offset, int __whence) 6011: throw (); 6011: 6011: 6011: 6011: 6011: 6011: 6011: extern int close (int __fd); 6011: 6011: 6011: 6011: 6011: 6011: 6011: extern ssize_t read (int __fd, void *__buf, size_t __nbytes) __attribute__ ((__warn_unused_result__)); 6011: 6011: 6011: 6011: 6011: 6011: extern ssize_t write (int __fd, const void *__buf, size_t __n) __attribute__ ((__warn_unused_result__)); 6011: # 379 "/usr/include/unistd.h" 3 4 6011: extern ssize_t pread (int __fd, void *__buf, size_t __nbytes, 6011: __off_t __offset) __attribute__ ((__warn_unused_result__)); 6011: 6011: 6011: 6011: 6011: 6011: 6011: extern ssize_t pwrite (int __fd, const void *__buf, size_t __n, 6011: __off_t __offset) __attribute__ ((__warn_unused_result__)); 6011: # 407 "/usr/include/unistd.h" 3 4 6011: extern ssize_t pread64 (int __fd, void *__buf, size_t __nbytes, 6011: __off64_t __offset) __attribute__ ((__warn_unused_result__)); 6011: 6011: 6011: extern ssize_t pwrite64 (int __fd, const void *__buf, size_t __n, 6011: __off64_t __offset) __attribute__ ((__warn_unused_result__)); 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: extern int pipe (int __pipedes[2]) throw () __attribute__ ((__warn_unused_result__)); 6011: 6011: 6011: 6011: 6011: extern int pipe2 (int __pipedes[2], int __flags) throw () __attribute__ ((__warn_unused_result__)); 6011: # 435 "/usr/include/unistd.h" 3 4 6011: extern unsigned int alarm (unsigned int __seconds) throw (); 6011: # 447 "/usr/include/unistd.h" 3 4 6011: extern unsigned int sleep (unsigned int __seconds); 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: extern __useconds_t ualarm (__useconds_t __value, __useconds_t __interval) 6011: throw (); 6011: 6011: 6011: 6011: 6011: 6011: 6011: extern int usleep (__useconds_t __useconds); 6011: # 472 "/usr/include/unistd.h" 3 4 6011: extern int pause (void); 6011: 6011: 6011: 6011: extern int chown (const char *__file, __uid_t __owner, __gid_t __group) 6011: throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); 6011: 6011: 6011: 6011: extern int fchown (int __fd, __uid_t __owner, __gid_t __group) throw () __attribute__ ((__warn_unused_result__)); 6011: 6011: 6011: 6011: 6011: extern int lchown (const char *__file, __uid_t __owner, __gid_t __group) 6011: throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); 6011: 6011: 6011: 6011: 6011: 6011: 6011: extern int fchownat (int __fd, const char *__file, __uid_t __owner, 6011: __gid_t __group, int __flag) 6011: throw () __attribute__ ((__nonnull__ (2))) __attribute__ ((__warn_unused_result__)); 6011: 6011: 6011: 6011: extern int chdir (const char *__path) throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); 6011: 6011: 6011: 6011: extern int fchdir (int __fd) throw () __attribute__ ((__warn_unused_result__)); 6011: # 514 "/usr/include/unistd.h" 3 4 6011: extern char *getcwd (char *__buf, size_t __size) throw () __attribute__ ((__warn_unused_result__)); 6011: 6011: 6011: 6011: 6011: 6011: extern char *get_current_dir_name (void) throw (); 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: extern char *getwd (char *__buf) 6011: throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__deprecated__)) __attribute__ ((__warn_unused_result__)); 6011: 6011: 6011: 6011: 6011: extern int dup (int __fd) throw () __attribute__ ((__warn_unused_result__)); 6011: 6011: 6011: extern int dup2 (int __fd, int __fd2) throw (); 6011: 6011: 6011: 6011: 6011: extern int dup3 (int __fd, int __fd2, int __flags) throw (); 6011: 6011: 6011: 6011: extern char **__environ; 6011: 6011: extern char **environ; 6011: 6011: 6011: 6011: 6011: 6011: extern int execve (const char *__path, char *const __argv[], 6011: char *const __envp[]) throw () __attribute__ ((__nonnull__ (1, 2))); 6011: 6011: 6011: 6011: 6011: extern int fexecve (int __fd, char *const __argv[], char *const __envp[]) 6011: throw () __attribute__ ((__nonnull__ (2))); 6011: 6011: 6011: 6011: 6011: extern int execv (const char *__path, char *const __argv[]) 6011: throw () __attribute__ ((__nonnull__ (1, 2))); 6011: 6011: 6011: 6011: extern int execle (const char *__path, const char *__arg, ...) 6011: throw () __attribute__ ((__nonnull__ (1, 2))); 6011: 6011: 6011: 6011: extern int execl (const char *__path, const char *__arg, ...) 6011: throw () __attribute__ ((__nonnull__ (1, 2))); 6011: 6011: 6011: 6011: extern int execvp (const char *__file, char *const __argv[]) 6011: throw () __attribute__ ((__nonnull__ (1, 2))); 6011: 6011: 6011: 6011: 6011: extern int execlp (const char *__file, const char *__arg, ...) 6011: throw () __attribute__ ((__nonnull__ (1, 2))); 6011: 6011: 6011: 6011: 6011: extern int execvpe (const char *__file, char *const __argv[], 6011: char *const __envp[]) 6011: throw () __attribute__ ((__nonnull__ (1, 2))); 6011: 6011: 6011: 6011: 6011: 6011: extern int nice (int __inc) throw () __attribute__ ((__warn_unused_result__)); 6011: 6011: 6011: 6011: 6011: extern void _exit (int __status) __attribute__ ((__noreturn__)); 6011: 6011: 6011: 6011: 6011: 6011: # 1 "/usr/include/arm-linux-gnueabihf/bits/confname.h" 1 3 4 6011: # 24 "/usr/include/arm-linux-gnueabihf/bits/confname.h" 3 4 6011: enum 6011: { 6011: _PC_LINK_MAX, 6011: 6011: _PC_MAX_CANON, 6011: 6011: _PC_MAX_INPUT, 6011: 6011: _PC_NAME_MAX, 6011: 6011: _PC_PATH_MAX, 6011: 6011: _PC_PIPE_BUF, 6011: 6011: _PC_CHOWN_RESTRICTED, 6011: 6011: _PC_NO_TRUNC, 6011: 6011: _PC_VDISABLE, 6011: 6011: _PC_SYNC_IO, 6011: 6011: _PC_ASYNC_IO, 6011: 6011: _PC_PRIO_IO, 6011: 6011: _PC_SOCK_MAXBUF, 6011: 6011: _PC_FILESIZEBITS, 6011: 6011: _PC_REC_INCR_XFER_SIZE, 6011: 6011: _PC_REC_MAX_XFER_SIZE, 6011: 6011: _PC_REC_MIN_XFER_SIZE, 6011: 6011: _PC_REC_XFER_ALIGN, 6011: 6011: _PC_ALLOC_SIZE_MIN, 6011: 6011: _PC_SYMLINK_MAX, 6011: 6011: _PC_2_SYMLINKS 6011: 6011: }; 6011: 6011: 6011: enum 6011: { 6011: _SC_ARG_MAX, 6011: 6011: _SC_CHILD_MAX, 6011: 6011: _SC_CLK_TCK, 6011: 6011: _SC_NGROUPS_MAX, 6011: 6011: _SC_OPEN_MAX, 6011: 6011: _SC_STREAM_MAX, 6011: 6011: _SC_TZNAME_MAX, 6011: 6011: _SC_JOB_CONTROL, 6011: 6011: _SC_SAVED_IDS, 6011: 6011: _SC_REALTIME_SIGNALS, 6011: 6011: _SC_PRIORITY_SCHEDULING, 6011: 6011: _SC_TIMERS, 6011: 6011: _SC_ASYNCHRONOUS_IO, 6011: 6011: _SC_PRIORITIZED_IO, 6011: 6011: _SC_SYNCHRONIZED_IO, 6011: 6011: _SC_FSYNC, 6011: 6011: _SC_MAPPED_FILES, 6011: 6011: _SC_MEMLOCK, 6011: 6011: _SC_MEMLOCK_RANGE, 6011: 6011: _SC_MEMORY_PROTECTION, 6011: 6011: _SC_MESSAGE_PASSING, 6011: 6011: _SC_SEMAPHORES, 6011: 6011: _SC_SHARED_MEMORY_OBJECTS, 6011: 6011: _SC_AIO_LISTIO_MAX, 6011: 6011: _SC_AIO_MAX, 6011: 6011: _SC_AIO_PRIO_DELTA_MAX, 6011: 6011: _SC_DELAYTIMER_MAX, 6011: 6011: _SC_MQ_OPEN_MAX, 6011: 6011: _SC_MQ_PRIO_MAX, 6011: 6011: _SC_VERSION, 6011: 6011: _SC_PAGESIZE, 6011: 6011: 6011: _SC_RTSIG_MAX, 6011: 6011: _SC_SEM_NSEMS_MAX, 6011: 6011: _SC_SEM_VALUE_MAX, 6011: 6011: _SC_SIGQUEUE_MAX, 6011: 6011: _SC_TIMER_MAX, 6011: 6011: 6011: 6011: 6011: _SC_BC_BASE_MAX, 6011: 6011: _SC_BC_DIM_MAX, 6011: 6011: _SC_BC_SCALE_MAX, 6011: 6011: _SC_BC_STRING_MAX, 6011: 6011: _SC_COLL_WEIGHTS_MAX, 6011: 6011: _SC_EQUIV_CLASS_MAX, 6011: 6011: _SC_EXPR_NEST_MAX, 6011: 6011: _SC_LINE_MAX, 6011: 6011: _SC_RE_DUP_MAX, 6011: 6011: _SC_CHARCLASS_NAME_MAX, 6011: 6011: 6011: _SC_2_VERSION, 6011: 6011: _SC_2_C_BIND, 6011: 6011: _SC_2_C_DEV, 6011: 6011: _SC_2_FORT_DEV, 6011: 6011: _SC_2_FORT_RUN, 6011: 6011: _SC_2_SW_DEV, 6011: 6011: _SC_2_LOCALEDEF, 6011: 6011: 6011: _SC_PII, 6011: 6011: _SC_PII_XTI, 6011: 6011: _SC_PII_SOCKET, 6011: 6011: _SC_PII_INTERNET, 6011: 6011: _SC_PII_OSI, 6011: 6011: _SC_POLL, 6011: 6011: _SC_SELECT, 6011: 6011: _SC_UIO_MAXIOV, 6011: 6011: _SC_IOV_MAX = _SC_UIO_MAXIOV, 6011: 6011: _SC_PII_INTERNET_STREAM, 6011: 6011: _SC_PII_INTERNET_DGRAM, 6011: 6011: _SC_PII_OSI_COTS, 6011: 6011: _SC_PII_OSI_CLTS, 6011: 6011: _SC_PII_OSI_M, 6011: 6011: _SC_T_IOV_MAX, 6011: 6011: 6011: 6011: _SC_THREADS, 6011: 6011: _SC_THREAD_SAFE_FUNCTIONS, 6011: 6011: _SC_GETGR_R_SIZE_MAX, 6011: 6011: _SC_GETPW_R_SIZE_MAX, 6011: 6011: _SC_LOGIN_NAME_MAX, 6011: 6011: _SC_TTY_NAME_MAX, 6011: 6011: _SC_THREAD_DESTRUCTOR_ITERATIONS, 6011: 6011: _SC_THREAD_KEYS_MAX, 6011: 6011: _SC_THREAD_STACK_MIN, 6011: 6011: _SC_THREAD_THREADS_MAX, 6011: 6011: _SC_THREAD_ATTR_STACKADDR, 6011: 6011: _SC_THREAD_ATTR_STACKSIZE, 6011: 6011: _SC_THREAD_PRIORITY_SCHEDULING, 6011: 6011: _SC_THREAD_PRIO_INHERIT, 6011: 6011: _SC_THREAD_PRIO_PROTECT, 6011: 6011: _SC_THREAD_PROCESS_SHARED, 6011: 6011: 6011: _SC_NPROCESSORS_CONF, 6011: 6011: _SC_NPROCESSORS_ONLN, 6011: 6011: _SC_PHYS_PAGES, 6011: 6011: _SC_AVPHYS_PAGES, 6011: 6011: _SC_ATEXIT_MAX, 6011: 6011: _SC_PASS_MAX, 6011: 6011: 6011: _SC_XOPEN_VERSION, 6011: 6011: _SC_XOPEN_XCU_VERSION, 6011: 6011: _SC_XOPEN_UNIX, 6011: 6011: _SC_XOPEN_CRYPT, 6011: 6011: _SC_XOPEN_ENH_I18N, 6011: 6011: _SC_XOPEN_SHM, 6011: 6011: 6011: _SC_2_CHAR_TERM, 6011: 6011: _SC_2_C_VERSION, 6011: 6011: _SC_2_UPE, 6011: 6011: 6011: _SC_XOPEN_XPG2, 6011: 6011: _SC_XOPEN_XPG3, 6011: 6011: _SC_XOPEN_XPG4, 6011: 6011: 6011: _SC_CHAR_BIT, 6011: 6011: _SC_CHAR_MAX, 6011: 6011: _SC_CHAR_MIN, 6011: 6011: _SC_INT_MAX, 6011: 6011: _SC_INT_MIN, 6011: 6011: _SC_LONG_BIT, 6011: 6011: _SC_WORD_BIT, 6011: 6011: _SC_MB_LEN_MAX, 6011: 6011: _SC_NZERO, 6011: 6011: _SC_SSIZE_MAX, 6011: 6011: _SC_SCHAR_MAX, 6011: 6011: _SC_SCHAR_MIN, 6011: 6011: _SC_SHRT_MAX, 6011: 6011: _SC_SHRT_MIN, 6011: 6011: _SC_UCHAR_MAX, 6011: 6011: _SC_UINT_MAX, 6011: 6011: _SC_ULONG_MAX, 6011: 6011: _SC_USHRT_MAX, 6011: 6011: 6011: _SC_NL_ARGMAX, 6011: 6011: _SC_NL_LANGMAX, 6011: 6011: _SC_NL_MSGMAX, 6011: 6011: _SC_NL_NMAX, 6011: 6011: _SC_NL_SETMAX, 6011: 6011: _SC_NL_TEXTMAX, 6011: 6011: 6011: _SC_XBS5_ILP32_OFF32, 6011: 6011: _SC_XBS5_ILP32_OFFBIG, 6011: 6011: _SC_XBS5_LP64_OFF64, 6011: 6011: _SC_XBS5_LPBIG_OFFBIG, 6011: 6011: 6011: _SC_XOPEN_LEGACY, 6011: 6011: _SC_XOPEN_REALTIME, 6011: 6011: _SC_XOPEN_REALTIME_THREADS, 6011: 6011: 6011: _SC_ADVISORY_INFO, 6011: 6011: _SC_BARRIERS, 6011: 6011: _SC_BASE, 6011: 6011: _SC_C_LANG_SUPPORT, 6011: 6011: _SC_C_LANG_SUPPORT_R, 6011: 6011: _SC_CLOCK_SELECTION, 6011: 6011: _SC_CPUTIME, 6011: 6011: _SC_THREAD_CPUTIME, 6011: 6011: _SC_DEVICE_IO, 6011: 6011: _SC_DEVICE_SPECIFIC, 6011: 6011: _SC_DEVICE_SPECIFIC_R, 6011: 6011: _SC_FD_MGMT, 6011: 6011: _SC_FIFO, 6011: 6011: _SC_PIPE, 6011: 6011: _SC_FILE_ATTRIBUTES, 6011: 6011: _SC_FILE_LOCKING, 6011: 6011: _SC_FILE_SYSTEM, 6011: 6011: _SC_MONOTONIC_CLOCK, 6011: 6011: _SC_MULTI_PROCESS, 6011: 6011: _SC_SINGLE_PROCESS, 6011: 6011: _SC_NETWORKING, 6011: 6011: _SC_READER_WRITER_LOCKS, 6011: 6011: _SC_SPIN_LOCKS, 6011: 6011: _SC_REGEXP, 6011: 6011: _SC_REGEX_VERSION, 6011: 6011: _SC_SHELL, 6011: 6011: _SC_SIGNALS, 6011: 6011: _SC_SPAWN, 6011: 6011: _SC_SPORADIC_SERVER, 6011: 6011: _SC_THREAD_SPORADIC_SERVER, 6011: 6011: _SC_SYSTEM_DATABASE, 6011: 6011: _SC_SYSTEM_DATABASE_R, 6011: 6011: _SC_TIMEOUTS, 6011: 6011: _SC_TYPED_MEMORY_OBJECTS, 6011: 6011: _SC_USER_GROUPS, 6011: 6011: _SC_USER_GROUPS_R, 6011: 6011: _SC_2_PBS, 6011: 6011: _SC_2_PBS_ACCOUNTING, 6011: 6011: _SC_2_PBS_LOCATE, 6011: 6011: _SC_2_PBS_MESSAGE, 6011: 6011: _SC_2_PBS_TRACK, 6011: 6011: _SC_SYMLOOP_MAX, 6011: 6011: _SC_STREAMS, 6011: 6011: _SC_2_PBS_CHECKPOINT, 6011: 6011: 6011: _SC_V6_ILP32_OFF32, 6011: 6011: _SC_V6_ILP32_OFFBIG, 6011: 6011: _SC_V6_LP64_OFF64, 6011: 6011: _SC_V6_LPBIG_OFFBIG, 6011: 6011: 6011: _SC_HOST_NAME_MAX, 6011: 6011: _SC_TRACE, 6011: 6011: _SC_TRACE_EVENT_FILTER, 6011: 6011: _SC_TRACE_INHERIT, 6011: 6011: _SC_TRACE_LOG, 6011: 6011: 6011: _SC_LEVEL1_ICACHE_SIZE, 6011: 6011: _SC_LEVEL1_ICACHE_ASSOC, 6011: 6011: _SC_LEVEL1_ICACHE_LINESIZE, 6011: 6011: _SC_LEVEL1_DCACHE_SIZE, 6011: 6011: _SC_LEVEL1_DCACHE_ASSOC, 6011: 6011: _SC_LEVEL1_DCACHE_LINESIZE, 6011: 6011: _SC_LEVEL2_CACHE_SIZE, 6011: 6011: _SC_LEVEL2_CACHE_ASSOC, 6011: 6011: _SC_LEVEL2_CACHE_LINESIZE, 6011: 6011: _SC_LEVEL3_CACHE_SIZE, 6011: 6011: _SC_LEVEL3_CACHE_ASSOC, 6011: 6011: _SC_LEVEL3_CACHE_LINESIZE, 6011: 6011: _SC_LEVEL4_CACHE_SIZE, 6011: 6011: _SC_LEVEL4_CACHE_ASSOC, 6011: 6011: _SC_LEVEL4_CACHE_LINESIZE, 6011: 6011: 6011: 6011: _SC_IPV6 = _SC_LEVEL1_ICACHE_SIZE + 50, 6011: 6011: _SC_RAW_SOCKETS, 6011: 6011: 6011: _SC_V7_ILP32_OFF32, 6011: 6011: _SC_V7_ILP32_OFFBIG, 6011: 6011: _SC_V7_LP64_OFF64, 6011: 6011: _SC_V7_LPBIG_OFFBIG, 6011: 6011: 6011: _SC_SS_REPL_MAX, 6011: 6011: 6011: _SC_TRACE_EVENT_NAME_MAX, 6011: 6011: _SC_TRACE_NAME_MAX, 6011: 6011: _SC_TRACE_SYS_MAX, 6011: 6011: _SC_TRACE_USER_EVENT_MAX, 6011: 6011: 6011: _SC_XOPEN_STREAMS, 6011: 6011: 6011: _SC_THREAD_ROBUST_PRIO_INHERIT, 6011: 6011: _SC_THREAD_ROBUST_PRIO_PROTECT 6011: 6011: }; 6011: 6011: 6011: enum 6011: { 6011: _CS_PATH, 6011: 6011: 6011: _CS_V6_WIDTH_RESTRICTED_ENVS, 6011: 6011: 6011: 6011: _CS_GNU_LIBC_VERSION, 6011: 6011: _CS_GNU_LIBPTHREAD_VERSION, 6011: 6011: 6011: _CS_V5_WIDTH_RESTRICTED_ENVS, 6011: 6011: 6011: 6011: _CS_V7_WIDTH_RESTRICTED_ENVS, 6011: 6011: 6011: 6011: _CS_LFS_CFLAGS = 1000, 6011: 6011: _CS_LFS_LDFLAGS, 6011: 6011: _CS_LFS_LIBS, 6011: 6011: _CS_LFS_LINTFLAGS, 6011: 6011: _CS_LFS64_CFLAGS, 6011: 6011: _CS_LFS64_LDFLAGS, 6011: 6011: _CS_LFS64_LIBS, 6011: 6011: _CS_LFS64_LINTFLAGS, 6011: 6011: 6011: _CS_XBS5_ILP32_OFF32_CFLAGS = 1100, 6011: 6011: _CS_XBS5_ILP32_OFF32_LDFLAGS, 6011: 6011: _CS_XBS5_ILP32_OFF32_LIBS, 6011: 6011: _CS_XBS5_ILP32_OFF32_LINTFLAGS, 6011: 6011: _CS_XBS5_ILP32_OFFBIG_CFLAGS, 6011: 6011: _CS_XBS5_ILP32_OFFBIG_LDFLAGS, 6011: 6011: _CS_XBS5_ILP32_OFFBIG_LIBS, 6011: 6011: _CS_XBS5_ILP32_OFFBIG_LINTFLAGS, 6011: 6011: _CS_XBS5_LP64_OFF64_CFLAGS, 6011: 6011: _CS_XBS5_LP64_OFF64_LDFLAGS, 6011: 6011: _CS_XBS5_LP64_OFF64_LIBS, 6011: 6011: _CS_XBS5_LP64_OFF64_LINTFLAGS, 6011: 6011: _CS_XBS5_LPBIG_OFFBIG_CFLAGS, 6011: 6011: _CS_XBS5_LPBIG_OFFBIG_LDFLAGS, 6011: 6011: _CS_XBS5_LPBIG_OFFBIG_LIBS, 6011: 6011: _CS_XBS5_LPBIG_OFFBIG_LINTFLAGS, 6011: 6011: 6011: _CS_POSIX_V6_ILP32_OFF32_CFLAGS, 6011: 6011: _CS_POSIX_V6_ILP32_OFF32_LDFLAGS, 6011: 6011: _CS_POSIX_V6_ILP32_OFF32_LIBS, 6011: 6011: _CS_POSIX_V6_ILP32_OFF32_LINTFLAGS, 6011: 6011: _CS_POSIX_V6_ILP32_OFFBIG_CFLAGS, 6011: 6011: _CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS, 6011: 6011: _CS_POSIX_V6_ILP32_OFFBIG_LIBS, 6011: 6011: _CS_POSIX_V6_ILP32_OFFBIG_LINTFLAGS, 6011: 6011: _CS_POSIX_V6_LP64_OFF64_CFLAGS, 6011: 6011: _CS_POSIX_V6_LP64_OFF64_LDFLAGS, 6011: 6011: _CS_POSIX_V6_LP64_OFF64_LIBS, 6011: 6011: _CS_POSIX_V6_LP64_OFF64_LINTFLAGS, 6011: 6011: _CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS, 6011: 6011: _CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS, 6011: 6011: _CS_POSIX_V6_LPBIG_OFFBIG_LIBS, 6011: 6011: _CS_POSIX_V6_LPBIG_OFFBIG_LINTFLAGS, 6011: 6011: 6011: _CS_POSIX_V7_ILP32_OFF32_CFLAGS, 6011: 6011: _CS_POSIX_V7_ILP32_OFF32_LDFLAGS, 6011: 6011: _CS_POSIX_V7_ILP32_OFF32_LIBS, 6011: 6011: _CS_POSIX_V7_ILP32_OFF32_LINTFLAGS, 6011: 6011: _CS_POSIX_V7_ILP32_OFFBIG_CFLAGS, 6011: 6011: _CS_POSIX_V7_ILP32_OFFBIG_LDFLAGS, 6011: 6011: _CS_POSIX_V7_ILP32_OFFBIG_LIBS, 6011: 6011: _CS_POSIX_V7_ILP32_OFFBIG_LINTFLAGS, 6011: 6011: _CS_POSIX_V7_LP64_OFF64_CFLAGS, 6011: 6011: _CS_POSIX_V7_LP64_OFF64_LDFLAGS, 6011: 6011: _CS_POSIX_V7_LP64_OFF64_LIBS, 6011: 6011: _CS_POSIX_V7_LP64_OFF64_LINTFLAGS, 6011: 6011: _CS_POSIX_V7_LPBIG_OFFBIG_CFLAGS, 6011: 6011: _CS_POSIX_V7_LPBIG_OFFBIG_LDFLAGS, 6011: 6011: _CS_POSIX_V7_LPBIG_OFFBIG_LIBS, 6011: 6011: _CS_POSIX_V7_LPBIG_OFFBIG_LINTFLAGS, 6011: 6011: 6011: _CS_V6_ENV, 6011: 6011: _CS_V7_ENV 6011: 6011: }; 6011: # 613 "/usr/include/unistd.h" 2 3 4 6011: 6011: 6011: extern long int pathconf (const char *__path, int __name) 6011: throw () __attribute__ ((__nonnull__ (1))); 6011: 6011: 6011: extern long int fpathconf (int __fd, int __name) throw (); 6011: 6011: 6011: extern long int sysconf (int __name) throw (); 6011: 6011: 6011: 6011: extern size_t confstr (int __name, char *__buf, size_t __len) throw (); 6011: 6011: 6011: 6011: 6011: extern __pid_t getpid (void) throw (); 6011: 6011: 6011: extern __pid_t getppid (void) throw (); 6011: 6011: 6011: extern __pid_t getpgrp (void) throw (); 6011: 6011: 6011: extern __pid_t __getpgid (__pid_t __pid) throw (); 6011: 6011: extern __pid_t getpgid (__pid_t __pid) throw (); 6011: 6011: 6011: 6011: 6011: 6011: 6011: extern int setpgid (__pid_t __pid, __pid_t __pgid) throw (); 6011: # 663 "/usr/include/unistd.h" 3 4 6011: extern int setpgrp (void) throw (); 6011: 6011: 6011: 6011: 6011: 6011: 6011: extern __pid_t setsid (void) throw (); 6011: 6011: 6011: 6011: extern __pid_t getsid (__pid_t __pid) throw (); 6011: 6011: 6011: 6011: extern __uid_t getuid (void) throw (); 6011: 6011: 6011: extern __uid_t geteuid (void) throw (); 6011: 6011: 6011: extern __gid_t getgid (void) throw (); 6011: 6011: 6011: extern __gid_t getegid (void) throw (); 6011: 6011: 6011: 6011: 6011: extern int getgroups (int __size, __gid_t __list[]) throw () __attribute__ ((__warn_unused_result__)); 6011: 6011: 6011: 6011: extern int group_member (__gid_t __gid) throw (); 6011: 6011: 6011: 6011: 6011: 6011: 6011: extern int setuid (__uid_t __uid) throw () __attribute__ ((__warn_unused_result__)); 6011: 6011: 6011: 6011: 6011: extern int setreuid (__uid_t __ruid, __uid_t __euid) throw () __attribute__ ((__warn_unused_result__)); 6011: 6011: 6011: 6011: 6011: extern int seteuid (__uid_t __uid) throw () __attribute__ ((__warn_unused_result__)); 6011: 6011: 6011: 6011: 6011: 6011: 6011: extern int setgid (__gid_t __gid) throw () __attribute__ ((__warn_unused_result__)); 6011: 6011: 6011: 6011: 6011: extern int setregid (__gid_t __rgid, __gid_t __egid) throw () __attribute__ ((__warn_unused_result__)); 6011: 6011: 6011: 6011: 6011: extern int setegid (__gid_t __gid) throw () __attribute__ ((__warn_unused_result__)); 6011: 6011: 6011: 6011: 6011: 6011: extern int getresuid (__uid_t *__ruid, __uid_t *__euid, __uid_t *__suid) 6011: throw (); 6011: 6011: 6011: 6011: extern int getresgid (__gid_t *__rgid, __gid_t *__egid, __gid_t *__sgid) 6011: throw (); 6011: 6011: 6011: 6011: extern int setresuid (__uid_t __ruid, __uid_t __euid, __uid_t __suid) 6011: throw () __attribute__ ((__warn_unused_result__)); 6011: 6011: 6011: 6011: extern int setresgid (__gid_t __rgid, __gid_t __egid, __gid_t __sgid) 6011: throw () __attribute__ ((__warn_unused_result__)); 6011: 6011: 6011: 6011: 6011: 6011: 6011: extern __pid_t fork (void) throw (); 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: extern __pid_t vfork (void) throw (); 6011: 6011: 6011: 6011: 6011: 6011: extern char *ttyname (int __fd) throw (); 6011: 6011: 6011: 6011: extern int ttyname_r (int __fd, char *__buf, size_t __buflen) 6011: throw () __attribute__ ((__nonnull__ (2))) __attribute__ ((__warn_unused_result__)); 6011: 6011: 6011: 6011: extern int isatty (int __fd) throw (); 6011: 6011: 6011: 6011: 6011: extern int ttyslot (void) throw (); 6011: 6011: 6011: 6011: 6011: extern int link (const char *__from, const char *__to) 6011: throw () __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__warn_unused_result__)); 6011: 6011: 6011: 6011: 6011: extern int linkat (int __fromfd, const char *__from, int __tofd, 6011: const char *__to, int __flags) 6011: throw () __attribute__ ((__nonnull__ (2, 4))) __attribute__ ((__warn_unused_result__)); 6011: 6011: 6011: 6011: 6011: extern int symlink (const char *__from, const char *__to) 6011: throw () __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__warn_unused_result__)); 6011: 6011: 6011: 6011: 6011: extern ssize_t readlink (const char *__restrict __path, 6011: char *__restrict __buf, size_t __len) 6011: throw () __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__warn_unused_result__)); 6011: 6011: 6011: 6011: 6011: extern int symlinkat (const char *__from, int __tofd, 6011: const char *__to) throw () __attribute__ ((__nonnull__ (1, 3))) __attribute__ ((__warn_unused_result__)); 6011: 6011: 6011: extern ssize_t readlinkat (int __fd, const char *__restrict __path, 6011: char *__restrict __buf, size_t __len) 6011: throw () __attribute__ ((__nonnull__ (2, 3))) __attribute__ ((__warn_unused_result__)); 6011: 6011: 6011: 6011: extern int unlink (const char *__name) throw () __attribute__ ((__nonnull__ (1))); 6011: 6011: 6011: 6011: extern int unlinkat (int __fd, const char *__name, int __flag) 6011: throw () __attribute__ ((__nonnull__ (2))); 6011: 6011: 6011: 6011: extern int rmdir (const char *__path) throw () __attribute__ ((__nonnull__ (1))); 6011: 6011: 6011: 6011: extern __pid_t tcgetpgrp (int __fd) throw (); 6011: 6011: 6011: extern int tcsetpgrp (int __fd, __pid_t __pgrp_id) throw (); 6011: 6011: 6011: 6011: 6011: 6011: 6011: extern char *getlogin (void); 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: extern int getlogin_r (char *__name, size_t __name_len) __attribute__ ((__nonnull__ (1))); 6011: 6011: 6011: 6011: 6011: extern int setlogin (const char *__name) throw () __attribute__ ((__nonnull__ (1))); 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: # 1 "/usr/include/arm-linux-gnueabihf/bits/getopt_posix.h" 1 3 4 6011: # 27 "/usr/include/arm-linux-gnueabihf/bits/getopt_posix.h" 3 4 6011: # 1 "/usr/include/arm-linux-gnueabihf/bits/getopt_core.h" 1 3 4 6011: # 28 "/usr/include/arm-linux-gnueabihf/bits/getopt_core.h" 3 4 6011: extern "C" { 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: extern char *optarg; 6011: # 50 "/usr/include/arm-linux-gnueabihf/bits/getopt_core.h" 3 4 6011: extern int optind; 6011: 6011: 6011: 6011: 6011: extern int opterr; 6011: 6011: 6011: 6011: extern int optopt; 6011: # 91 "/usr/include/arm-linux-gnueabihf/bits/getopt_core.h" 3 4 6011: extern int getopt (int ___argc, char *const *___argv, const char *__shortopts) 6011: throw () __attribute__ ((__nonnull__ (2, 3))); 6011: 6011: } 6011: # 28 "/usr/include/arm-linux-gnueabihf/bits/getopt_posix.h" 2 3 4 6011: 6011: extern "C" { 6011: # 49 "/usr/include/arm-linux-gnueabihf/bits/getopt_posix.h" 3 4 6011: } 6011: # 873 "/usr/include/unistd.h" 2 3 4 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: extern int gethostname (char *__name, size_t __len) throw () __attribute__ ((__nonnull__ (1))); 6011: 6011: 6011: 6011: 6011: 6011: 6011: extern int sethostname (const char *__name, size_t __len) 6011: throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); 6011: 6011: 6011: 6011: extern int sethostid (long int __id) throw () __attribute__ ((__warn_unused_result__)); 6011: 6011: 6011: 6011: 6011: 6011: extern int getdomainname (char *__name, size_t __len) 6011: throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); 6011: extern int setdomainname (const char *__name, size_t __len) 6011: throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); 6011: 6011: 6011: 6011: 6011: 6011: extern int vhangup (void) throw (); 6011: 6011: 6011: extern int revoke (const char *__file) throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: extern int profil (unsigned short int *__sample_buffer, size_t __size, 6011: size_t __offset, unsigned int __scale) 6011: throw () __attribute__ ((__nonnull__ (1))); 6011: 6011: 6011: 6011: 6011: 6011: extern int acct (const char *__name) throw (); 6011: 6011: 6011: 6011: extern char *getusershell (void) throw (); 6011: extern void endusershell (void) throw (); 6011: extern void setusershell (void) throw (); 6011: 6011: 6011: 6011: 6011: 6011: extern int daemon (int __nochdir, int __noclose) throw () __attribute__ ((__warn_unused_result__)); 6011: 6011: 6011: 6011: 6011: 6011: 6011: extern int chroot (const char *__path) throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); 6011: 6011: 6011: 6011: extern char *getpass (const char *__prompt) __attribute__ ((__nonnull__ (1))); 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: extern int fsync (int __fd); 6011: 6011: 6011: 6011: 6011: 6011: extern int syncfs (int __fd) throw (); 6011: 6011: 6011: 6011: 6011: 6011: 6011: extern long int gethostid (void); 6011: 6011: 6011: extern void sync (void) throw (); 6011: 6011: 6011: 6011: 6011: 6011: extern int getpagesize (void) throw () __attribute__ ((__const__)); 6011: 6011: 6011: 6011: 6011: extern int getdtablesize (void) throw (); 6011: # 994 "/usr/include/unistd.h" 3 4 6011: extern int truncate (const char *__file, __off_t __length) 6011: throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); 6011: # 1006 "/usr/include/unistd.h" 3 4 6011: extern int truncate64 (const char *__file, __off64_t __length) 6011: throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); 6011: # 1017 "/usr/include/unistd.h" 3 4 6011: extern int ftruncate (int __fd, __off_t __length) throw () __attribute__ ((__warn_unused_result__)); 6011: # 1027 "/usr/include/unistd.h" 3 4 6011: extern int ftruncate64 (int __fd, __off64_t __length) throw () __attribute__ ((__warn_unused_result__)); 6011: # 1038 "/usr/include/unistd.h" 3 4 6011: extern int brk (void *__addr) throw () __attribute__ ((__warn_unused_result__)); 6011: 6011: 6011: 6011: 6011: 6011: extern void *sbrk (intptr_t __delta) throw (); 6011: # 1059 "/usr/include/unistd.h" 3 4 6011: extern long int syscall (long int __sysno, ...) throw (); 6011: # 1082 "/usr/include/unistd.h" 3 4 6011: extern int lockf (int __fd, int __cmd, __off_t __len) __attribute__ ((__warn_unused_result__)); 6011: # 1092 "/usr/include/unistd.h" 3 4 6011: extern int lockf64 (int __fd, int __cmd, __off64_t __len) __attribute__ ((__warn_unused_result__)); 6011: # 1113 "/usr/include/unistd.h" 3 4 6011: extern int fdatasync (int __fildes); 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: extern char *crypt (const char *__key, const char *__salt) 6011: throw () __attribute__ ((__nonnull__ (1, 2))); 6011: 6011: 6011: 6011: extern void encrypt (char *__glibc_block, int __edflag) 6011: throw () __attribute__ ((__nonnull__ (1))); 6011: 6011: 6011: 6011: 6011: 6011: 6011: extern void swab (const void *__restrict __from, void *__restrict __to, 6011: ssize_t __n) throw () __attribute__ ((__nonnull__ (1, 2))); 6011: # 1162 "/usr/include/unistd.h" 3 4 6011: int getentropy (void *__buffer, size_t __length) __attribute__ ((__warn_unused_result__)); 6011: 6011: 6011: 6011: 6011: # 1 "/usr/include/arm-linux-gnueabihf/bits/unistd.h" 1 3 4 6011: # 23 "/usr/include/arm-linux-gnueabihf/bits/unistd.h" 3 4 6011: extern ssize_t __read_chk (int __fd, void *__buf, size_t __nbytes, 6011: size_t __buflen) __attribute__ ((__warn_unused_result__)); 6011: extern ssize_t __read_alias (int __fd, void *__buf, size_t __nbytes) __asm__ ("" "read") 6011: __attribute__ ((__warn_unused_result__)); 6011: extern ssize_t __read_chk_warn (int __fd, void *__buf, size_t __nbytes, size_t __buflen) __asm__ ("" "__read_chk") 6011: 6011: 6011: __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("read called with bigger length than size of " "the destination buffer"))) 6011: ; 6011: 6011: extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__warn_unused_result__)) ssize_t 6011: read (int __fd, void *__buf, size_t __nbytes) 6011: { 6011: if (__builtin_object_size (__buf, 0) != (size_t) -1) 6011: { 6011: if (!__builtin_constant_p (__nbytes)) 6011: return __read_chk (__fd, __buf, __nbytes, __builtin_object_size (__buf, 0)); 6011: 6011: if (__nbytes > __builtin_object_size (__buf, 0)) 6011: return __read_chk_warn (__fd, __buf, __nbytes, __builtin_object_size (__buf, 0)); 6011: } 6011: return __read_alias (__fd, __buf, __nbytes); 6011: } 6011: 6011: 6011: extern ssize_t __pread_chk (int __fd, void *__buf, size_t __nbytes, 6011: __off_t __offset, size_t __bufsize) __attribute__ ((__warn_unused_result__)); 6011: extern ssize_t __pread64_chk (int __fd, void *__buf, size_t __nbytes, 6011: __off64_t __offset, size_t __bufsize) __attribute__ ((__warn_unused_result__)); 6011: extern ssize_t __pread_alias (int __fd, void *__buf, size_t __nbytes, __off_t __offset) __asm__ ("" "pread") 6011: 6011: __attribute__ ((__warn_unused_result__)); 6011: extern ssize_t __pread64_alias (int __fd, void *__buf, size_t __nbytes, __off64_t __offset) __asm__ ("" "pread64") 6011: 6011: __attribute__ ((__warn_unused_result__)); 6011: extern ssize_t __pread_chk_warn (int __fd, void *__buf, size_t __nbytes, __off_t __offset, size_t __bufsize) __asm__ ("" "__pread_chk") 6011: 6011: 6011: __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("pread called with bigger length than size of " "the destination buffer"))) 6011: ; 6011: extern ssize_t __pread64_chk_warn (int __fd, void *__buf, size_t __nbytes, __off64_t __offset, size_t __bufsize) __asm__ ("" "__pread64_chk") 6011: 6011: 6011: 6011: __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("pread64 called with bigger length than size of " "the destination buffer"))) 6011: ; 6011: 6011: 6011: extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__warn_unused_result__)) ssize_t 6011: pread (int __fd, void *__buf, size_t __nbytes, __off_t __offset) 6011: { 6011: if (__builtin_object_size (__buf, 0) != (size_t) -1) 6011: { 6011: if (!__builtin_constant_p (__nbytes)) 6011: return __pread_chk (__fd, __buf, __nbytes, __offset, __builtin_object_size (__buf, 0)); 6011: 6011: if ( __nbytes > __builtin_object_size (__buf, 0)) 6011: return __pread_chk_warn (__fd, __buf, __nbytes, __offset, 6011: __builtin_object_size (__buf, 0)); 6011: } 6011: return __pread_alias (__fd, __buf, __nbytes, __offset); 6011: } 6011: # 104 "/usr/include/arm-linux-gnueabihf/bits/unistd.h" 3 4 6011: extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__warn_unused_result__)) ssize_t 6011: pread64 (int __fd, void *__buf, size_t __nbytes, __off64_t __offset) 6011: { 6011: if (__builtin_object_size (__buf, 0) != (size_t) -1) 6011: { 6011: if (!__builtin_constant_p (__nbytes)) 6011: return __pread64_chk (__fd, __buf, __nbytes, __offset, __builtin_object_size (__buf, 0)); 6011: 6011: if ( __nbytes > __builtin_object_size (__buf, 0)) 6011: return __pread64_chk_warn (__fd, __buf, __nbytes, __offset, 6011: __builtin_object_size (__buf, 0)); 6011: } 6011: 6011: return __pread64_alias (__fd, __buf, __nbytes, __offset); 6011: } 6011: 6011: 6011: 6011: 6011: extern ssize_t __readlink_chk (const char *__restrict __path, 6011: char *__restrict __buf, size_t __len, 6011: size_t __buflen) 6011: throw () __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__warn_unused_result__)); 6011: extern ssize_t __readlink_alias (const char *__restrict __path, char *__restrict __buf, size_t __len) throw () __asm__ ("" "readlink") 6011: 6011: 6011: __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__warn_unused_result__)); 6011: extern ssize_t __readlink_chk_warn (const char *__restrict __path, char *__restrict __buf, size_t __len, size_t __buflen) throw () __asm__ ("" "__readlink_chk") 6011: 6011: 6011: 6011: __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("readlink called with bigger length " "than size of destination buffer"))) 6011: ; 6011: 6011: extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__warn_unused_result__)) ssize_t 6011: __attribute__ ((__leaf__)) readlink (const char *__restrict __path, char *__restrict __buf, size_t __len) throw () 6011: 6011: { 6011: if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1) 6011: { 6011: if (!__builtin_constant_p (__len)) 6011: return __readlink_chk (__path, __buf, __len, __builtin_object_size (__buf, 2 > 1)); 6011: 6011: if ( __len > __builtin_object_size (__buf, 2 > 1)) 6011: return __readlink_chk_warn (__path, __buf, __len, __builtin_object_size (__buf, 2 > 1)); 6011: } 6011: return __readlink_alias (__path, __buf, __len); 6011: } 6011: 6011: 6011: 6011: extern ssize_t __readlinkat_chk (int __fd, const char *__restrict __path, 6011: char *__restrict __buf, size_t __len, 6011: size_t __buflen) 6011: throw () __attribute__ ((__nonnull__ (2, 3))) __attribute__ ((__warn_unused_result__)); 6011: extern ssize_t __readlinkat_alias (int __fd, const char *__restrict __path, char *__restrict __buf, size_t __len) throw () __asm__ ("" "readlinkat") 6011: 6011: 6011: 6011: __attribute__ ((__nonnull__ (2, 3))) __attribute__ ((__warn_unused_result__)); 6011: 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") 6011: 6011: 6011: 6011: __attribute__ ((__nonnull__ (2, 3))) __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("readlinkat called with bigger " "length than size of destination " "buffer"))) 6011: 6011: ; 6011: 6011: extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__nonnull__ (2, 3))) __attribute__ ((__warn_unused_result__)) ssize_t 6011: __attribute__ ((__leaf__)) readlinkat (int __fd, const char *__restrict __path, char *__restrict __buf, size_t __len) throw () 6011: 6011: { 6011: if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1) 6011: { 6011: if (!__builtin_constant_p (__len)) 6011: return __readlinkat_chk (__fd, __path, __buf, __len, __builtin_object_size (__buf, 2 > 1)); 6011: 6011: if (__len > __builtin_object_size (__buf, 2 > 1)) 6011: return __readlinkat_chk_warn (__fd, __path, __buf, __len, 6011: __builtin_object_size (__buf, 2 > 1)); 6011: } 6011: return __readlinkat_alias (__fd, __path, __buf, __len); 6011: } 6011: 6011: 6011: extern char *__getcwd_chk (char *__buf, size_t __size, size_t __buflen) 6011: throw () __attribute__ ((__warn_unused_result__)); 6011: extern char *__getcwd_alias (char *__buf, size_t __size) throw () __asm__ ("" "getcwd") 6011: __attribute__ ((__warn_unused_result__)); 6011: extern char *__getcwd_chk_warn (char *__buf, size_t __size, size_t __buflen) throw () __asm__ ("" "__getcwd_chk") 6011: 6011: 6011: __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("getcwd caller with bigger length than size of " "destination buffer"))) 6011: ; 6011: 6011: extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__warn_unused_result__)) char * 6011: __attribute__ ((__leaf__)) getcwd (char *__buf, size_t __size) throw () 6011: { 6011: if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1) 6011: { 6011: if (!__builtin_constant_p (__size)) 6011: return __getcwd_chk (__buf, __size, __builtin_object_size (__buf, 2 > 1)); 6011: 6011: if (__size > __builtin_object_size (__buf, 2 > 1)) 6011: return __getcwd_chk_warn (__buf, __size, __builtin_object_size (__buf, 2 > 1)); 6011: } 6011: return __getcwd_alias (__buf, __size); 6011: } 6011: 6011: 6011: extern char *__getwd_chk (char *__buf, size_t buflen) 6011: throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); 6011: extern char *__getwd_warn (char *__buf) throw () __asm__ ("" "getwd") 6011: __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("please use getcwd instead, as getwd " "doesn't specify buffer size"))) 6011: ; 6011: 6011: extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__deprecated__)) __attribute__ ((__warn_unused_result__)) char * 6011: __attribute__ ((__leaf__)) getwd (char *__buf) throw () 6011: { 6011: if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1) 6011: return __getwd_chk (__buf, __builtin_object_size (__buf, 2 > 1)); 6011: return __getwd_warn (__buf); 6011: } 6011: 6011: 6011: extern size_t __confstr_chk (int __name, char *__buf, size_t __len, 6011: size_t __buflen) throw (); 6011: extern size_t __confstr_alias (int __name, char *__buf, size_t __len) throw () __asm__ ("" "confstr") 6011: ; 6011: extern size_t __confstr_chk_warn (int __name, char *__buf, size_t __len, size_t __buflen) throw () __asm__ ("" "__confstr_chk") 6011: 6011: 6011: __attribute__((__warning__ ("confstr called with bigger length than size of destination " "buffer"))) 6011: ; 6011: 6011: extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) size_t 6011: __attribute__ ((__leaf__)) confstr (int __name, char *__buf, size_t __len) throw () 6011: { 6011: if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1) 6011: { 6011: if (!__builtin_constant_p (__len)) 6011: return __confstr_chk (__name, __buf, __len, __builtin_object_size (__buf, 2 > 1)); 6011: 6011: if (__builtin_object_size (__buf, 2 > 1) < __len) 6011: return __confstr_chk_warn (__name, __buf, __len, __builtin_object_size (__buf, 2 > 1)); 6011: } 6011: return __confstr_alias (__name, __buf, __len); 6011: } 6011: 6011: 6011: extern int __getgroups_chk (int __size, __gid_t __list[], size_t __listlen) 6011: throw () __attribute__ ((__warn_unused_result__)); 6011: extern int __getgroups_alias (int __size, __gid_t __list[]) throw () __asm__ ("" "getgroups") 6011: __attribute__ ((__warn_unused_result__)); 6011: extern int __getgroups_chk_warn (int __size, __gid_t __list[], size_t __listlen) throw () __asm__ ("" "__getgroups_chk") 6011: 6011: 6011: __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("getgroups called with bigger group count than what " "can fit into destination buffer"))) 6011: ; 6011: 6011: extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int 6011: __attribute__ ((__leaf__)) getgroups (int __size, __gid_t __list[]) throw () 6011: { 6011: if (__builtin_object_size (__list, 2 > 1) != (size_t) -1) 6011: { 6011: if (!__builtin_constant_p (__size) || __size < 0) 6011: return __getgroups_chk (__size, __list, __builtin_object_size (__list, 2 > 1)); 6011: 6011: if (__size * sizeof (__gid_t) > __builtin_object_size (__list, 2 > 1)) 6011: return __getgroups_chk_warn (__size, __list, __builtin_object_size (__list, 2 > 1)); 6011: } 6011: return __getgroups_alias (__size, __list); 6011: } 6011: 6011: 6011: extern int __ttyname_r_chk (int __fd, char *__buf, size_t __buflen, 6011: size_t __nreal) throw () __attribute__ ((__nonnull__ (2))); 6011: extern int __ttyname_r_alias (int __fd, char *__buf, size_t __buflen) throw () __asm__ ("" "ttyname_r") 6011: 6011: __attribute__ ((__nonnull__ (2))); 6011: extern int __ttyname_r_chk_warn (int __fd, char *__buf, size_t __buflen, size_t __nreal) throw () __asm__ ("" "__ttyname_r_chk") 6011: 6011: 6011: __attribute__ ((__nonnull__ (2))) __attribute__((__warning__ ("ttyname_r called with bigger buflen than " "size of destination buffer"))) 6011: ; 6011: 6011: extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int 6011: __attribute__ ((__leaf__)) ttyname_r (int __fd, char *__buf, size_t __buflen) throw () 6011: { 6011: if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1) 6011: { 6011: if (!__builtin_constant_p (__buflen)) 6011: return __ttyname_r_chk (__fd, __buf, __buflen, __builtin_object_size (__buf, 2 > 1)); 6011: 6011: if (__buflen > __builtin_object_size (__buf, 2 > 1)) 6011: return __ttyname_r_chk_warn (__fd, __buf, __buflen, __builtin_object_size (__buf, 2 > 1)); 6011: } 6011: return __ttyname_r_alias (__fd, __buf, __buflen); 6011: } 6011: 6011: 6011: 6011: extern int __getlogin_r_chk (char *__buf, size_t __buflen, size_t __nreal) 6011: __attribute__ ((__nonnull__ (1))); 6011: extern int __getlogin_r_alias (char *__buf, size_t __buflen) __asm__ ("" "getlogin_r") 6011: __attribute__ ((__nonnull__ (1))); 6011: extern int __getlogin_r_chk_warn (char *__buf, size_t __buflen, size_t __nreal) __asm__ ("" "__getlogin_r_chk") 6011: 6011: 6011: __attribute__ ((__nonnull__ (1))) __attribute__((__warning__ ("getlogin_r called with bigger buflen than " "size of destination buffer"))) 6011: ; 6011: 6011: extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int 6011: getlogin_r (char *__buf, size_t __buflen) 6011: { 6011: if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1) 6011: { 6011: if (!__builtin_constant_p (__buflen)) 6011: return __getlogin_r_chk (__buf, __buflen, __builtin_object_size (__buf, 2 > 1)); 6011: 6011: if (__buflen > __builtin_object_size (__buf, 2 > 1)) 6011: return __getlogin_r_chk_warn (__buf, __buflen, __builtin_object_size (__buf, 2 > 1)); 6011: } 6011: return __getlogin_r_alias (__buf, __buflen); 6011: } 6011: 6011: 6011: 6011: 6011: extern int __gethostname_chk (char *__buf, size_t __buflen, size_t __nreal) 6011: throw () __attribute__ ((__nonnull__ (1))); 6011: extern int __gethostname_alias (char *__buf, size_t __buflen) throw () __asm__ ("" "gethostname") 6011: __attribute__ ((__nonnull__ (1))); 6011: extern int __gethostname_chk_warn (char *__buf, size_t __buflen, size_t __nreal) throw () __asm__ ("" "__gethostname_chk") 6011: 6011: 6011: __attribute__ ((__nonnull__ (1))) __attribute__((__warning__ ("gethostname called with bigger buflen than " "size of destination buffer"))) 6011: ; 6011: 6011: extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int 6011: __attribute__ ((__leaf__)) gethostname (char *__buf, size_t __buflen) throw () 6011: { 6011: if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1) 6011: { 6011: if (!__builtin_constant_p (__buflen)) 6011: return __gethostname_chk (__buf, __buflen, __builtin_object_size (__buf, 2 > 1)); 6011: 6011: if (__buflen > __builtin_object_size (__buf, 2 > 1)) 6011: return __gethostname_chk_warn (__buf, __buflen, __builtin_object_size (__buf, 2 > 1)); 6011: } 6011: return __gethostname_alias (__buf, __buflen); 6011: } 6011: 6011: 6011: 6011: 6011: extern int __getdomainname_chk (char *__buf, size_t __buflen, size_t __nreal) 6011: throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); 6011: extern int __getdomainname_alias (char *__buf, size_t __buflen) throw () __asm__ ("" "getdomainname") 6011: 6011: __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); 6011: extern int __getdomainname_chk_warn (char *__buf, size_t __buflen, size_t __nreal) throw () __asm__ ("" "__getdomainname_chk") 6011: 6011: 6011: __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("getdomainname called with bigger " "buflen than size of destination " "buffer"))) 6011: 6011: ; 6011: 6011: extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int 6011: __attribute__ ((__leaf__)) getdomainname (char *__buf, size_t __buflen) throw () 6011: { 6011: if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1) 6011: { 6011: if (!__builtin_constant_p (__buflen)) 6011: return __getdomainname_chk (__buf, __buflen, __builtin_object_size (__buf, 2 > 1)); 6011: 6011: if (__buflen > __builtin_object_size (__buf, 2 > 1)) 6011: return __getdomainname_chk_warn (__buf, __buflen, __builtin_object_size (__buf, 2 > 1)); 6011: } 6011: return __getdomainname_alias (__buf, __buflen); 6011: } 6011: # 1168 "/usr/include/unistd.h" 2 3 4 6011: 6011: 6011: } 6011: # 79 "/usr/include/boost/config/stdlib/libstdcpp3.hpp" 2 3 4 6011: # 49 "/usr/include/boost/config.hpp" 2 3 4 6011: 6011: 6011: 6011: 6011: # 1 "/usr/include/boost/config/detail/select_platform_config.hpp" 1 3 4 6011: # 54 "/usr/include/boost/config.hpp" 2 3 4 6011: 6011: 6011: 6011: # 1 "/usr/include/boost/config/platform/linux.hpp" 1 3 4 6011: # 15 "/usr/include/boost/config/platform/linux.hpp" 3 4 6011: # 1 "/usr/include/c++/8/cstdlib" 1 3 4 6011: # 39 "/usr/include/c++/8/cstdlib" 3 4 6011: 6011: # 40 "/usr/include/c++/8/cstdlib" 3 6011: # 16 "/usr/include/boost/config/platform/linux.hpp" 2 3 4 6011: # 75 "/usr/include/boost/config/platform/linux.hpp" 3 4 6011: # 1 "/usr/include/boost/config/detail/posix_features.hpp" 1 3 4 6011: # 76 "/usr/include/boost/config/platform/linux.hpp" 2 3 4 6011: # 58 "/usr/include/boost/config.hpp" 2 3 4 6011: 6011: 6011: 6011: # 1 "/usr/include/boost/config/detail/suffix.hpp" 1 3 4 6011: # 34 "/usr/include/boost/config/detail/suffix.hpp" 3 4 6011: 6011: # 35 "/usr/include/boost/config/detail/suffix.hpp" 3 6011: # 484 "/usr/include/boost/config/detail/suffix.hpp" 3 6011: namespace boost{ 6011: 6011: __extension__ typedef long long long_long_type; 6011: __extension__ typedef unsigned long long ulong_long_type; 6011: 6011: 6011: 6011: 6011: } 6011: # 62 "/usr/include/boost/config.hpp" 2 3 4 6011: 6011: 6011: 6011: # 45 "/usr/include/boost/regex/config.hpp" 2 3 4 6011: # 1 "/usr/include/boost/predef.h" 1 3 4 6011: # 13 "/usr/include/boost/predef.h" 3 4 6011: # 1 "/usr/include/boost/predef/language.h" 1 3 4 6011: # 13 "/usr/include/boost/predef/language.h" 3 4 6011: # 1 "/usr/include/boost/predef/language/stdc.h" 1 3 4 6011: # 11 "/usr/include/boost/predef/language/stdc.h" 3 4 6011: # 1 "/usr/include/boost/predef/version_number.h" 1 3 4 6011: # 12 "/usr/include/boost/predef/language/stdc.h" 2 3 4 6011: # 1 "/usr/include/boost/predef/make.h" 1 3 4 6011: 6011: 6011: 6011: 6011: 6011: 6011: # 1 "/usr/include/boost/predef/detail/test.h" 1 3 4 6011: # 8 "/usr/include/boost/predef/make.h" 2 3 4 6011: # 13 "/usr/include/boost/predef/language/stdc.h" 2 3 4 6011: # 53 "/usr/include/boost/predef/language/stdc.h" 3 4 6011: 6011: # 14 "/usr/include/boost/predef/language.h" 2 3 4 6011: # 1 "/usr/include/boost/predef/language/stdcpp.h" 1 3 4 6011: # 12 "/usr/include/boost/predef/language/stdcpp.h" 3 4 6011: # 1 "/usr/include/boost/predef/make.h" 1 3 4 6011: # 13 "/usr/include/boost/predef/language/stdcpp.h" 2 3 4 6011: # 115 "/usr/include/boost/predef/language/stdcpp.h" 3 4 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: # 15 "/usr/include/boost/predef/language.h" 2 3 4 6011: # 1 "/usr/include/boost/predef/language/objc.h" 1 3 4 6011: # 12 "/usr/include/boost/predef/language/objc.h" 3 4 6011: # 1 "/usr/include/boost/predef/make.h" 1 3 4 6011: # 13 "/usr/include/boost/predef/language/objc.h" 2 3 4 6011: # 42 "/usr/include/boost/predef/language/objc.h" 3 4 6011: 6011: # 16 "/usr/include/boost/predef/language.h" 2 3 4 6011: # 14 "/usr/include/boost/predef.h" 2 3 4 6011: # 1 "/usr/include/boost/predef/architecture.h" 1 3 4 6011: # 13 "/usr/include/boost/predef/architecture.h" 3 4 6011: # 1 "/usr/include/boost/predef/architecture/alpha.h" 1 3 4 6011: # 12 "/usr/include/boost/predef/architecture/alpha.h" 3 4 6011: # 1 "/usr/include/boost/predef/make.h" 1 3 4 6011: # 13 "/usr/include/boost/predef/architecture/alpha.h" 2 3 4 6011: # 59 "/usr/include/boost/predef/architecture/alpha.h" 3 4 6011: 6011: # 14 "/usr/include/boost/predef/architecture.h" 2 3 4 6011: # 1 "/usr/include/boost/predef/architecture/arm.h" 1 3 4 6011: # 14 "/usr/include/boost/predef/architecture/arm.h" 3 4 6011: # 1 "/usr/include/boost/predef/make.h" 1 3 4 6011: # 15 "/usr/include/boost/predef/architecture/arm.h" 2 3 4 6011: # 75 "/usr/include/boost/predef/architecture/arm.h" 3 4 6011: 6011: # 15 "/usr/include/boost/predef/architecture.h" 2 3 4 6011: # 1 "/usr/include/boost/predef/architecture/blackfin.h" 1 3 4 6011: # 12 "/usr/include/boost/predef/architecture/blackfin.h" 3 4 6011: # 1 "/usr/include/boost/predef/make.h" 1 3 4 6011: # 13 "/usr/include/boost/predef/architecture/blackfin.h" 2 3 4 6011: # 46 "/usr/include/boost/predef/architecture/blackfin.h" 3 4 6011: 6011: # 16 "/usr/include/boost/predef/architecture.h" 2 3 4 6011: # 1 "/usr/include/boost/predef/architecture/convex.h" 1 3 4 6011: # 12 "/usr/include/boost/predef/architecture/convex.h" 3 4 6011: # 1 "/usr/include/boost/predef/make.h" 1 3 4 6011: # 13 "/usr/include/boost/predef/architecture/convex.h" 2 3 4 6011: # 65 "/usr/include/boost/predef/architecture/convex.h" 3 4 6011: 6011: # 17 "/usr/include/boost/predef/architecture.h" 2 3 4 6011: # 1 "/usr/include/boost/predef/architecture/ia64.h" 1 3 4 6011: # 12 "/usr/include/boost/predef/architecture/ia64.h" 3 4 6011: # 1 "/usr/include/boost/predef/make.h" 1 3 4 6011: # 13 "/usr/include/boost/predef/architecture/ia64.h" 2 3 4 6011: # 49 "/usr/include/boost/predef/architecture/ia64.h" 3 4 6011: 6011: # 18 "/usr/include/boost/predef/architecture.h" 2 3 4 6011: # 1 "/usr/include/boost/predef/architecture/m68k.h" 1 3 4 6011: # 12 "/usr/include/boost/predef/architecture/m68k.h" 3 4 6011: # 1 "/usr/include/boost/predef/make.h" 1 3 4 6011: # 13 "/usr/include/boost/predef/architecture/m68k.h" 2 3 4 6011: # 82 "/usr/include/boost/predef/architecture/m68k.h" 3 4 6011: 6011: # 19 "/usr/include/boost/predef/architecture.h" 2 3 4 6011: # 1 "/usr/include/boost/predef/architecture/mips.h" 1 3 4 6011: # 12 "/usr/include/boost/predef/architecture/mips.h" 3 4 6011: # 1 "/usr/include/boost/predef/make.h" 1 3 4 6011: # 13 "/usr/include/boost/predef/architecture/mips.h" 2 3 4 6011: # 73 "/usr/include/boost/predef/architecture/mips.h" 3 4 6011: 6011: # 20 "/usr/include/boost/predef/architecture.h" 2 3 4 6011: # 1 "/usr/include/boost/predef/architecture/parisc.h" 1 3 4 6011: # 12 "/usr/include/boost/predef/architecture/parisc.h" 3 4 6011: # 1 "/usr/include/boost/predef/make.h" 1 3 4 6011: # 13 "/usr/include/boost/predef/architecture/parisc.h" 2 3 4 6011: # 64 "/usr/include/boost/predef/architecture/parisc.h" 3 4 6011: 6011: # 21 "/usr/include/boost/predef/architecture.h" 2 3 4 6011: # 1 "/usr/include/boost/predef/architecture/ppc.h" 1 3 4 6011: # 12 "/usr/include/boost/predef/architecture/ppc.h" 3 4 6011: # 1 "/usr/include/boost/predef/make.h" 1 3 4 6011: # 13 "/usr/include/boost/predef/architecture/ppc.h" 2 3 4 6011: # 72 "/usr/include/boost/predef/architecture/ppc.h" 3 4 6011: 6011: # 22 "/usr/include/boost/predef/architecture.h" 2 3 4 6011: # 1 "/usr/include/boost/predef/architecture/pyramid.h" 1 3 4 6011: # 12 "/usr/include/boost/predef/architecture/pyramid.h" 3 4 6011: # 1 "/usr/include/boost/predef/make.h" 1 3 4 6011: # 13 "/usr/include/boost/predef/architecture/pyramid.h" 2 3 4 6011: # 42 "/usr/include/boost/predef/architecture/pyramid.h" 3 4 6011: 6011: # 23 "/usr/include/boost/predef/architecture.h" 2 3 4 6011: # 1 "/usr/include/boost/predef/architecture/rs6k.h" 1 3 4 6011: # 12 "/usr/include/boost/predef/architecture/rs6k.h" 3 4 6011: # 1 "/usr/include/boost/predef/make.h" 1 3 4 6011: # 13 "/usr/include/boost/predef/architecture/rs6k.h" 2 3 4 6011: # 56 "/usr/include/boost/predef/architecture/rs6k.h" 3 4 6011: 6011: # 24 "/usr/include/boost/predef/architecture.h" 2 3 4 6011: # 1 "/usr/include/boost/predef/architecture/sparc.h" 1 3 4 6011: # 12 "/usr/include/boost/predef/architecture/sparc.h" 3 4 6011: # 1 "/usr/include/boost/predef/make.h" 1 3 4 6011: # 13 "/usr/include/boost/predef/architecture/sparc.h" 2 3 4 6011: # 54 "/usr/include/boost/predef/architecture/sparc.h" 3 4 6011: 6011: # 25 "/usr/include/boost/predef/architecture.h" 2 3 4 6011: # 1 "/usr/include/boost/predef/architecture/superh.h" 1 3 4 6011: # 12 "/usr/include/boost/predef/architecture/superh.h" 3 4 6011: # 1 "/usr/include/boost/predef/make.h" 1 3 4 6011: # 13 "/usr/include/boost/predef/architecture/superh.h" 2 3 4 6011: # 67 "/usr/include/boost/predef/architecture/superh.h" 3 4 6011: 6011: # 26 "/usr/include/boost/predef/architecture.h" 2 3 4 6011: # 1 "/usr/include/boost/predef/architecture/sys370.h" 1 3 4 6011: # 12 "/usr/include/boost/predef/architecture/sys370.h" 3 4 6011: # 1 "/usr/include/boost/predef/make.h" 1 3 4 6011: # 13 "/usr/include/boost/predef/architecture/sys370.h" 2 3 4 6011: # 43 "/usr/include/boost/predef/architecture/sys370.h" 3 4 6011: 6011: # 27 "/usr/include/boost/predef/architecture.h" 2 3 4 6011: # 1 "/usr/include/boost/predef/architecture/sys390.h" 1 3 4 6011: # 12 "/usr/include/boost/predef/architecture/sys390.h" 3 4 6011: # 1 "/usr/include/boost/predef/make.h" 1 3 4 6011: # 13 "/usr/include/boost/predef/architecture/sys390.h" 2 3 4 6011: # 43 "/usr/include/boost/predef/architecture/sys390.h" 3 4 6011: 6011: # 28 "/usr/include/boost/predef/architecture.h" 2 3 4 6011: # 1 "/usr/include/boost/predef/architecture/x86.h" 1 3 4 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: # 1 "/usr/include/boost/predef/architecture/x86/32.h" 1 3 4 6011: # 12 "/usr/include/boost/predef/architecture/x86/32.h" 3 4 6011: # 1 "/usr/include/boost/predef/make.h" 1 3 4 6011: # 13 "/usr/include/boost/predef/architecture/x86/32.h" 2 3 4 6011: # 82 "/usr/include/boost/predef/architecture/x86/32.h" 3 4 6011: # 1 "/usr/include/boost/predef/architecture/x86.h" 1 3 4 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: # 1 "/usr/include/boost/predef/architecture/x86/32.h" 1 3 4 6011: # 87 "/usr/include/boost/predef/architecture/x86/32.h" 3 4 6011: 6011: # 9 "/usr/include/boost/predef/architecture/x86.h" 2 3 4 6011: # 1 "/usr/include/boost/predef/architecture/x86/64.h" 1 3 4 6011: # 12 "/usr/include/boost/predef/architecture/x86/64.h" 3 4 6011: # 1 "/usr/include/boost/predef/make.h" 1 3 4 6011: # 13 "/usr/include/boost/predef/architecture/x86/64.h" 2 3 4 6011: # 45 "/usr/include/boost/predef/architecture/x86/64.h" 3 4 6011: # 1 "/usr/include/boost/predef/architecture/x86.h" 1 3 4 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: # 1 "/usr/include/boost/predef/architecture/x86/32.h" 1 3 4 6011: # 87 "/usr/include/boost/predef/architecture/x86/32.h" 3 4 6011: 6011: # 9 "/usr/include/boost/predef/architecture/x86.h" 2 3 4 6011: # 1 "/usr/include/boost/predef/architecture/x86/64.h" 1 3 4 6011: # 50 "/usr/include/boost/predef/architecture/x86/64.h" 3 4 6011: 6011: # 10 "/usr/include/boost/predef/architecture/x86.h" 2 3 4 6011: # 38 "/usr/include/boost/predef/architecture/x86.h" 3 4 6011: 6011: # 46 "/usr/include/boost/predef/architecture/x86/64.h" 2 3 4 6011: 6011: 6011: 6011: 6011: 6011: # 10 "/usr/include/boost/predef/architecture/x86.h" 2 3 4 6011: # 38 "/usr/include/boost/predef/architecture/x86.h" 3 4 6011: 6011: # 83 "/usr/include/boost/predef/architecture/x86/32.h" 2 3 4 6011: 6011: 6011: 6011: 6011: 6011: # 9 "/usr/include/boost/predef/architecture/x86.h" 2 3 4 6011: # 1 "/usr/include/boost/predef/architecture/x86/64.h" 1 3 4 6011: # 50 "/usr/include/boost/predef/architecture/x86/64.h" 3 4 6011: 6011: # 10 "/usr/include/boost/predef/architecture/x86.h" 2 3 4 6011: # 38 "/usr/include/boost/predef/architecture/x86.h" 3 4 6011: 6011: # 29 "/usr/include/boost/predef/architecture.h" 2 3 4 6011: # 1 "/usr/include/boost/predef/architecture/z.h" 1 3 4 6011: # 12 "/usr/include/boost/predef/architecture/z.h" 3 4 6011: # 1 "/usr/include/boost/predef/make.h" 1 3 4 6011: # 13 "/usr/include/boost/predef/architecture/z.h" 2 3 4 6011: # 42 "/usr/include/boost/predef/architecture/z.h" 3 4 6011: 6011: # 30 "/usr/include/boost/predef/architecture.h" 2 3 4 6011: # 15 "/usr/include/boost/predef.h" 2 3 4 6011: # 1 "/usr/include/boost/predef/compiler.h" 1 3 4 6011: # 13 "/usr/include/boost/predef/compiler.h" 3 4 6011: # 1 "/usr/include/boost/predef/compiler/borland.h" 1 3 4 6011: # 12 "/usr/include/boost/predef/compiler/borland.h" 3 4 6011: # 1 "/usr/include/boost/predef/make.h" 1 3 4 6011: # 13 "/usr/include/boost/predef/compiler/borland.h" 2 3 4 6011: # 58 "/usr/include/boost/predef/compiler/borland.h" 3 4 6011: 6011: # 14 "/usr/include/boost/predef/compiler.h" 2 3 4 6011: # 1 "/usr/include/boost/predef/compiler/clang.h" 1 3 4 6011: # 12 "/usr/include/boost/predef/compiler/clang.h" 3 4 6011: # 1 "/usr/include/boost/predef/make.h" 1 3 4 6011: # 13 "/usr/include/boost/predef/compiler/clang.h" 2 3 4 6011: # 51 "/usr/include/boost/predef/compiler/clang.h" 3 4 6011: 6011: # 15 "/usr/include/boost/predef/compiler.h" 2 3 4 6011: # 1 "/usr/include/boost/predef/compiler/comeau.h" 1 3 4 6011: # 12 "/usr/include/boost/predef/compiler/comeau.h" 3 4 6011: # 1 "/usr/include/boost/predef/make.h" 1 3 4 6011: # 13 "/usr/include/boost/predef/compiler/comeau.h" 2 3 4 6011: # 56 "/usr/include/boost/predef/compiler/comeau.h" 3 4 6011: 6011: # 16 "/usr/include/boost/predef/compiler.h" 2 3 4 6011: # 1 "/usr/include/boost/predef/compiler/compaq.h" 1 3 4 6011: # 12 "/usr/include/boost/predef/compiler/compaq.h" 3 4 6011: # 1 "/usr/include/boost/predef/make.h" 1 3 4 6011: # 13 "/usr/include/boost/predef/compiler/compaq.h" 2 3 4 6011: # 61 "/usr/include/boost/predef/compiler/compaq.h" 3 4 6011: 6011: # 17 "/usr/include/boost/predef/compiler.h" 2 3 4 6011: # 1 "/usr/include/boost/predef/compiler/diab.h" 1 3 4 6011: # 12 "/usr/include/boost/predef/compiler/diab.h" 3 4 6011: # 1 "/usr/include/boost/predef/make.h" 1 3 4 6011: # 13 "/usr/include/boost/predef/compiler/diab.h" 2 3 4 6011: # 51 "/usr/include/boost/predef/compiler/diab.h" 3 4 6011: 6011: # 18 "/usr/include/boost/predef/compiler.h" 2 3 4 6011: # 1 "/usr/include/boost/predef/compiler/digitalmars.h" 1 3 4 6011: # 12 "/usr/include/boost/predef/compiler/digitalmars.h" 3 4 6011: # 1 "/usr/include/boost/predef/make.h" 1 3 4 6011: # 13 "/usr/include/boost/predef/compiler/digitalmars.h" 2 3 4 6011: # 51 "/usr/include/boost/predef/compiler/digitalmars.h" 3 4 6011: 6011: # 19 "/usr/include/boost/predef/compiler.h" 2 3 4 6011: # 1 "/usr/include/boost/predef/compiler/dignus.h" 1 3 4 6011: # 12 "/usr/include/boost/predef/compiler/dignus.h" 3 4 6011: # 1 "/usr/include/boost/predef/make.h" 1 3 4 6011: # 13 "/usr/include/boost/predef/compiler/dignus.h" 2 3 4 6011: # 51 "/usr/include/boost/predef/compiler/dignus.h" 3 4 6011: 6011: # 20 "/usr/include/boost/predef/compiler.h" 2 3 4 6011: # 1 "/usr/include/boost/predef/compiler/edg.h" 1 3 4 6011: # 12 "/usr/include/boost/predef/compiler/edg.h" 3 4 6011: # 1 "/usr/include/boost/predef/make.h" 1 3 4 6011: # 13 "/usr/include/boost/predef/compiler/edg.h" 2 3 4 6011: # 51 "/usr/include/boost/predef/compiler/edg.h" 3 4 6011: 6011: # 21 "/usr/include/boost/predef/compiler.h" 2 3 4 6011: # 1 "/usr/include/boost/predef/compiler/ekopath.h" 1 3 4 6011: # 12 "/usr/include/boost/predef/compiler/ekopath.h" 3 4 6011: # 1 "/usr/include/boost/predef/make.h" 1 3 4 6011: # 13 "/usr/include/boost/predef/compiler/ekopath.h" 2 3 4 6011: # 52 "/usr/include/boost/predef/compiler/ekopath.h" 3 4 6011: 6011: # 22 "/usr/include/boost/predef/compiler.h" 2 3 4 6011: # 1 "/usr/include/boost/predef/compiler/gcc_xml.h" 1 3 4 6011: # 12 "/usr/include/boost/predef/compiler/gcc_xml.h" 3 4 6011: # 1 "/usr/include/boost/predef/make.h" 1 3 4 6011: # 13 "/usr/include/boost/predef/compiler/gcc_xml.h" 2 3 4 6011: # 48 "/usr/include/boost/predef/compiler/gcc_xml.h" 3 4 6011: 6011: # 23 "/usr/include/boost/predef/compiler.h" 2 3 4 6011: # 1 "/usr/include/boost/predef/compiler/gcc.h" 1 3 4 6011: # 13 "/usr/include/boost/predef/compiler/gcc.h" 3 4 6011: # 1 "/usr/include/boost/predef/compiler/clang.h" 1 3 4 6011: # 51 "/usr/include/boost/predef/compiler/clang.h" 3 4 6011: 6011: # 14 "/usr/include/boost/predef/compiler/gcc.h" 2 3 4 6011: 6011: 6011: # 1 "/usr/include/boost/predef/make.h" 1 3 4 6011: # 17 "/usr/include/boost/predef/compiler/gcc.h" 2 3 4 6011: # 55 "/usr/include/boost/predef/compiler/gcc.h" 3 4 6011: # 1 "/usr/include/boost/predef/detail/comp_detected.h" 1 3 4 6011: # 56 "/usr/include/boost/predef/compiler/gcc.h" 2 3 4 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: # 24 "/usr/include/boost/predef/compiler.h" 2 3 4 6011: # 1 "/usr/include/boost/predef/compiler/greenhills.h" 1 3 4 6011: # 12 "/usr/include/boost/predef/compiler/greenhills.h" 3 4 6011: # 1 "/usr/include/boost/predef/make.h" 1 3 4 6011: # 13 "/usr/include/boost/predef/compiler/greenhills.h" 2 3 4 6011: # 61 "/usr/include/boost/predef/compiler/greenhills.h" 3 4 6011: 6011: # 25 "/usr/include/boost/predef/compiler.h" 2 3 4 6011: # 1 "/usr/include/boost/predef/compiler/hp_acc.h" 1 3 4 6011: # 12 "/usr/include/boost/predef/compiler/hp_acc.h" 3 4 6011: # 1 "/usr/include/boost/predef/make.h" 1 3 4 6011: # 13 "/usr/include/boost/predef/compiler/hp_acc.h" 2 3 4 6011: # 56 "/usr/include/boost/predef/compiler/hp_acc.h" 3 4 6011: 6011: # 26 "/usr/include/boost/predef/compiler.h" 2 3 4 6011: # 1 "/usr/include/boost/predef/compiler/iar.h" 1 3 4 6011: # 12 "/usr/include/boost/predef/compiler/iar.h" 3 4 6011: # 1 "/usr/include/boost/predef/make.h" 1 3 4 6011: # 13 "/usr/include/boost/predef/compiler/iar.h" 2 3 4 6011: # 51 "/usr/include/boost/predef/compiler/iar.h" 3 4 6011: 6011: # 27 "/usr/include/boost/predef/compiler.h" 2 3 4 6011: # 1 "/usr/include/boost/predef/compiler/ibm.h" 1 3 4 6011: # 12 "/usr/include/boost/predef/compiler/ibm.h" 3 4 6011: # 1 "/usr/include/boost/predef/make.h" 1 3 4 6011: # 13 "/usr/include/boost/predef/compiler/ibm.h" 2 3 4 6011: # 67 "/usr/include/boost/predef/compiler/ibm.h" 3 4 6011: 6011: # 28 "/usr/include/boost/predef/compiler.h" 2 3 4 6011: # 1 "/usr/include/boost/predef/compiler/intel.h" 1 3 4 6011: # 12 "/usr/include/boost/predef/compiler/intel.h" 3 4 6011: # 1 "/usr/include/boost/predef/make.h" 1 3 4 6011: # 13 "/usr/include/boost/predef/compiler/intel.h" 2 3 4 6011: # 74 "/usr/include/boost/predef/compiler/intel.h" 3 4 6011: 6011: # 29 "/usr/include/boost/predef/compiler.h" 2 3 4 6011: # 1 "/usr/include/boost/predef/compiler/kai.h" 1 3 4 6011: # 12 "/usr/include/boost/predef/compiler/kai.h" 3 4 6011: # 1 "/usr/include/boost/predef/make.h" 1 3 4 6011: # 13 "/usr/include/boost/predef/compiler/kai.h" 2 3 4 6011: # 51 "/usr/include/boost/predef/compiler/kai.h" 3 4 6011: 6011: # 30 "/usr/include/boost/predef/compiler.h" 2 3 4 6011: # 1 "/usr/include/boost/predef/compiler/llvm.h" 1 3 4 6011: # 13 "/usr/include/boost/predef/compiler/llvm.h" 3 4 6011: # 1 "/usr/include/boost/predef/compiler/clang.h" 1 3 4 6011: # 51 "/usr/include/boost/predef/compiler/clang.h" 3 4 6011: 6011: # 14 "/usr/include/boost/predef/compiler/llvm.h" 2 3 4 6011: 6011: 6011: # 1 "/usr/include/boost/predef/make.h" 1 3 4 6011: # 17 "/usr/include/boost/predef/compiler/llvm.h" 2 3 4 6011: # 52 "/usr/include/boost/predef/compiler/llvm.h" 3 4 6011: 6011: # 31 "/usr/include/boost/predef/compiler.h" 2 3 4 6011: # 1 "/usr/include/boost/predef/compiler/metaware.h" 1 3 4 6011: # 12 "/usr/include/boost/predef/compiler/metaware.h" 3 4 6011: # 1 "/usr/include/boost/predef/make.h" 1 3 4 6011: # 13 "/usr/include/boost/predef/compiler/metaware.h" 2 3 4 6011: # 48 "/usr/include/boost/predef/compiler/metaware.h" 3 4 6011: 6011: # 32 "/usr/include/boost/predef/compiler.h" 2 3 4 6011: # 1 "/usr/include/boost/predef/compiler/metrowerks.h" 1 3 4 6011: # 12 "/usr/include/boost/predef/compiler/metrowerks.h" 3 4 6011: # 1 "/usr/include/boost/predef/make.h" 1 3 4 6011: # 13 "/usr/include/boost/predef/compiler/metrowerks.h" 2 3 4 6011: # 72 "/usr/include/boost/predef/compiler/metrowerks.h" 3 4 6011: 6011: # 33 "/usr/include/boost/predef/compiler.h" 2 3 4 6011: # 1 "/usr/include/boost/predef/compiler/microtec.h" 1 3 4 6011: # 12 "/usr/include/boost/predef/compiler/microtec.h" 3 4 6011: # 1 "/usr/include/boost/predef/make.h" 1 3 4 6011: # 13 "/usr/include/boost/predef/compiler/microtec.h" 2 3 4 6011: # 48 "/usr/include/boost/predef/compiler/microtec.h" 3 4 6011: 6011: # 34 "/usr/include/boost/predef/compiler.h" 2 3 4 6011: # 1 "/usr/include/boost/predef/compiler/mpw.h" 1 3 4 6011: # 12 "/usr/include/boost/predef/compiler/mpw.h" 3 4 6011: # 1 "/usr/include/boost/predef/make.h" 1 3 4 6011: # 13 "/usr/include/boost/predef/compiler/mpw.h" 2 3 4 6011: # 58 "/usr/include/boost/predef/compiler/mpw.h" 3 4 6011: 6011: # 35 "/usr/include/boost/predef/compiler.h" 2 3 4 6011: # 1 "/usr/include/boost/predef/compiler/palm.h" 1 3 4 6011: # 12 "/usr/include/boost/predef/compiler/palm.h" 3 4 6011: # 1 "/usr/include/boost/predef/make.h" 1 3 4 6011: # 13 "/usr/include/boost/predef/compiler/palm.h" 2 3 4 6011: # 51 "/usr/include/boost/predef/compiler/palm.h" 3 4 6011: 6011: # 36 "/usr/include/boost/predef/compiler.h" 2 3 4 6011: # 1 "/usr/include/boost/predef/compiler/pgi.h" 1 3 4 6011: # 12 "/usr/include/boost/predef/compiler/pgi.h" 3 4 6011: # 1 "/usr/include/boost/predef/make.h" 1 3 4 6011: # 13 "/usr/include/boost/predef/compiler/pgi.h" 2 3 4 6011: # 55 "/usr/include/boost/predef/compiler/pgi.h" 3 4 6011: 6011: # 37 "/usr/include/boost/predef/compiler.h" 2 3 4 6011: # 1 "/usr/include/boost/predef/compiler/sgi_mipspro.h" 1 3 4 6011: # 12 "/usr/include/boost/predef/compiler/sgi_mipspro.h" 3 4 6011: # 1 "/usr/include/boost/predef/make.h" 1 3 4 6011: # 13 "/usr/include/boost/predef/compiler/sgi_mipspro.h" 2 3 4 6011: # 61 "/usr/include/boost/predef/compiler/sgi_mipspro.h" 3 4 6011: 6011: # 38 "/usr/include/boost/predef/compiler.h" 2 3 4 6011: # 1 "/usr/include/boost/predef/compiler/sunpro.h" 1 3 4 6011: # 12 "/usr/include/boost/predef/compiler/sunpro.h" 3 4 6011: # 1 "/usr/include/boost/predef/make.h" 1 3 4 6011: # 13 "/usr/include/boost/predef/compiler/sunpro.h" 2 3 4 6011: # 71 "/usr/include/boost/predef/compiler/sunpro.h" 3 4 6011: 6011: # 39 "/usr/include/boost/predef/compiler.h" 2 3 4 6011: # 1 "/usr/include/boost/predef/compiler/tendra.h" 1 3 4 6011: # 12 "/usr/include/boost/predef/compiler/tendra.h" 3 4 6011: # 1 "/usr/include/boost/predef/make.h" 1 3 4 6011: # 13 "/usr/include/boost/predef/compiler/tendra.h" 2 3 4 6011: # 48 "/usr/include/boost/predef/compiler/tendra.h" 3 4 6011: 6011: # 40 "/usr/include/boost/predef/compiler.h" 2 3 4 6011: # 1 "/usr/include/boost/predef/compiler/visualc.h" 1 3 4 6011: # 13 "/usr/include/boost/predef/compiler/visualc.h" 3 4 6011: # 1 "/usr/include/boost/predef/compiler/clang.h" 1 3 4 6011: # 51 "/usr/include/boost/predef/compiler/clang.h" 3 4 6011: 6011: # 14 "/usr/include/boost/predef/compiler/visualc.h" 2 3 4 6011: 6011: 6011: # 1 "/usr/include/boost/predef/make.h" 1 3 4 6011: # 17 "/usr/include/boost/predef/compiler/visualc.h" 2 3 4 6011: # 100 "/usr/include/boost/predef/compiler/visualc.h" 3 4 6011: 6011: # 41 "/usr/include/boost/predef/compiler.h" 2 3 4 6011: # 1 "/usr/include/boost/predef/compiler/watcom.h" 1 3 4 6011: # 12 "/usr/include/boost/predef/compiler/watcom.h" 3 4 6011: # 1 "/usr/include/boost/predef/make.h" 1 3 4 6011: # 13 "/usr/include/boost/predef/compiler/watcom.h" 2 3 4 6011: # 51 "/usr/include/boost/predef/compiler/watcom.h" 3 4 6011: 6011: # 42 "/usr/include/boost/predef/compiler.h" 2 3 4 6011: # 16 "/usr/include/boost/predef.h" 2 3 4 6011: # 1 "/usr/include/boost/predef/library.h" 1 3 4 6011: # 13 "/usr/include/boost/predef/library.h" 3 4 6011: # 1 "/usr/include/boost/predef/library/c.h" 1 3 4 6011: # 13 "/usr/include/boost/predef/library/c.h" 3 4 6011: # 1 "/usr/include/boost/predef/library/c/_prefix.h" 1 3 4 6011: # 11 "/usr/include/boost/predef/library/c/_prefix.h" 3 4 6011: # 1 "/usr/include/boost/predef/detail/_cassert.h" 1 3 4 6011: # 12 "/usr/include/boost/predef/detail/_cassert.h" 3 4 6011: # 1 "/usr/include/c++/8/cassert" 1 3 4 6011: # 41 "/usr/include/c++/8/cassert" 3 4 6011: 6011: # 42 "/usr/include/c++/8/cassert" 3 6011: 6011: 6011: # 1 "/usr/include/assert.h" 1 3 4 6011: # 66 "/usr/include/assert.h" 3 4 6011: extern "C" { 6011: 6011: 6011: extern void __assert_fail (const char *__assertion, const char *__file, 6011: unsigned int __line, const char *__function) 6011: throw () __attribute__ ((__noreturn__)); 6011: 6011: 6011: extern void __assert_perror_fail (int __errnum, const char *__file, 6011: unsigned int __line, const char *__function) 6011: throw () __attribute__ ((__noreturn__)); 6011: 6011: 6011: 6011: 6011: extern void __assert (const char *__assertion, const char *__file, int __line) 6011: throw () __attribute__ ((__noreturn__)); 6011: 6011: 6011: } 6011: # 44 "/usr/include/c++/8/cassert" 2 3 6011: # 13 "/usr/include/boost/predef/detail/_cassert.h" 2 3 4 6011: # 12 "/usr/include/boost/predef/library/c/_prefix.h" 2 3 4 6011: # 14 "/usr/include/boost/predef/library/c.h" 2 3 4 6011: 6011: # 1 "/usr/include/boost/predef/library/c/gnu.h" 1 3 4 6011: # 12 "/usr/include/boost/predef/library/c/gnu.h" 3 4 6011: # 1 "/usr/include/boost/predef/make.h" 1 3 4 6011: # 13 "/usr/include/boost/predef/library/c/gnu.h" 2 3 4 6011: 6011: 6011: 6011: 6011: # 1 "/usr/lib/gcc/arm-linux-gnueabihf/8/include/stddef.h" 1 3 4 6011: # 18 "/usr/include/boost/predef/library/c/gnu.h" 2 3 4 6011: # 61 "/usr/include/boost/predef/library/c/gnu.h" 3 4 6011: 6011: # 16 "/usr/include/boost/predef/library/c.h" 2 3 4 6011: # 1 "/usr/include/boost/predef/library/c/uc.h" 1 3 4 6011: # 14 "/usr/include/boost/predef/library/c/uc.h" 3 4 6011: # 1 "/usr/include/boost/predef/make.h" 1 3 4 6011: # 15 "/usr/include/boost/predef/library/c/uc.h" 2 3 4 6011: # 47 "/usr/include/boost/predef/library/c/uc.h" 3 4 6011: 6011: # 17 "/usr/include/boost/predef/library/c.h" 2 3 4 6011: # 1 "/usr/include/boost/predef/library/c/vms.h" 1 3 4 6011: # 14 "/usr/include/boost/predef/library/c/vms.h" 3 4 6011: # 1 "/usr/include/boost/predef/make.h" 1 3 4 6011: # 15 "/usr/include/boost/predef/library/c/vms.h" 2 3 4 6011: # 47 "/usr/include/boost/predef/library/c/vms.h" 3 4 6011: 6011: # 18 "/usr/include/boost/predef/library/c.h" 2 3 4 6011: # 1 "/usr/include/boost/predef/library/c/zos.h" 1 3 4 6011: # 14 "/usr/include/boost/predef/library/c/zos.h" 3 4 6011: # 1 "/usr/include/boost/predef/make.h" 1 3 4 6011: # 15 "/usr/include/boost/predef/library/c/zos.h" 2 3 4 6011: # 56 "/usr/include/boost/predef/library/c/zos.h" 3 4 6011: 6011: # 19 "/usr/include/boost/predef/library/c.h" 2 3 4 6011: # 14 "/usr/include/boost/predef/library.h" 2 3 4 6011: # 1 "/usr/include/boost/predef/library/std.h" 1 3 4 6011: # 12 "/usr/include/boost/predef/library/std.h" 3 4 6011: # 1 "/usr/include/boost/predef/library/std/_prefix.h" 1 3 4 6011: # 21 "/usr/include/boost/predef/library/std/_prefix.h" 3 4 6011: # 1 "/usr/include/boost/predef/detail/_exception.h" 1 3 4 6011: # 22 "/usr/include/boost/predef/library/std/_prefix.h" 2 3 4 6011: # 13 "/usr/include/boost/predef/library/std.h" 2 3 4 6011: 6011: # 1 "/usr/include/boost/predef/library/std/cxx.h" 1 3 4 6011: # 14 "/usr/include/boost/predef/library/std/cxx.h" 3 4 6011: # 1 "/usr/include/boost/predef/make.h" 1 3 4 6011: # 15 "/usr/include/boost/predef/library/std/cxx.h" 2 3 4 6011: # 46 "/usr/include/boost/predef/library/std/cxx.h" 3 4 6011: 6011: # 15 "/usr/include/boost/predef/library/std.h" 2 3 4 6011: # 1 "/usr/include/boost/predef/library/std/dinkumware.h" 1 3 4 6011: # 14 "/usr/include/boost/predef/library/std/dinkumware.h" 3 4 6011: # 1 "/usr/include/boost/predef/make.h" 1 3 4 6011: # 15 "/usr/include/boost/predef/library/std/dinkumware.h" 2 3 4 6011: # 52 "/usr/include/boost/predef/library/std/dinkumware.h" 3 4 6011: 6011: # 16 "/usr/include/boost/predef/library/std.h" 2 3 4 6011: # 1 "/usr/include/boost/predef/library/std/libcomo.h" 1 3 4 6011: # 14 "/usr/include/boost/predef/library/std/libcomo.h" 3 4 6011: # 1 "/usr/include/boost/predef/make.h" 1 3 4 6011: # 15 "/usr/include/boost/predef/library/std/libcomo.h" 2 3 4 6011: # 47 "/usr/include/boost/predef/library/std/libcomo.h" 3 4 6011: 6011: # 17 "/usr/include/boost/predef/library/std.h" 2 3 4 6011: # 1 "/usr/include/boost/predef/library/std/modena.h" 1 3 4 6011: # 14 "/usr/include/boost/predef/library/std/modena.h" 3 4 6011: # 1 "/usr/include/boost/predef/make.h" 1 3 4 6011: # 15 "/usr/include/boost/predef/library/std/modena.h" 2 3 4 6011: # 45 "/usr/include/boost/predef/library/std/modena.h" 3 4 6011: 6011: # 18 "/usr/include/boost/predef/library/std.h" 2 3 4 6011: # 1 "/usr/include/boost/predef/library/std/msl.h" 1 3 4 6011: # 14 "/usr/include/boost/predef/library/std/msl.h" 3 4 6011: # 1 "/usr/include/boost/predef/make.h" 1 3 4 6011: # 15 "/usr/include/boost/predef/library/std/msl.h" 2 3 4 6011: # 53 "/usr/include/boost/predef/library/std/msl.h" 3 4 6011: 6011: # 19 "/usr/include/boost/predef/library/std.h" 2 3 4 6011: # 1 "/usr/include/boost/predef/library/std/roguewave.h" 1 3 4 6011: # 14 "/usr/include/boost/predef/library/std/roguewave.h" 3 4 6011: # 1 "/usr/include/boost/predef/make.h" 1 3 4 6011: # 15 "/usr/include/boost/predef/library/std/roguewave.h" 2 3 4 6011: # 56 "/usr/include/boost/predef/library/std/roguewave.h" 3 4 6011: 6011: # 20 "/usr/include/boost/predef/library/std.h" 2 3 4 6011: # 1 "/usr/include/boost/predef/library/std/sgi.h" 1 3 4 6011: # 14 "/usr/include/boost/predef/library/std/sgi.h" 3 4 6011: # 1 "/usr/include/boost/predef/make.h" 1 3 4 6011: # 15 "/usr/include/boost/predef/library/std/sgi.h" 2 3 4 6011: # 51 "/usr/include/boost/predef/library/std/sgi.h" 3 4 6011: 6011: # 21 "/usr/include/boost/predef/library/std.h" 2 3 4 6011: # 1 "/usr/include/boost/predef/library/std/stdcpp3.h" 1 3 4 6011: # 14 "/usr/include/boost/predef/library/std/stdcpp3.h" 3 4 6011: # 1 "/usr/include/boost/predef/make.h" 1 3 4 6011: # 15 "/usr/include/boost/predef/library/std/stdcpp3.h" 2 3 4 6011: # 53 "/usr/include/boost/predef/library/std/stdcpp3.h" 3 4 6011: 6011: # 22 "/usr/include/boost/predef/library/std.h" 2 3 4 6011: # 1 "/usr/include/boost/predef/library/std/stlport.h" 1 3 4 6011: # 14 "/usr/include/boost/predef/library/std/stlport.h" 3 4 6011: # 1 "/usr/include/boost/predef/make.h" 1 3 4 6011: # 15 "/usr/include/boost/predef/library/std/stlport.h" 2 3 4 6011: # 59 "/usr/include/boost/predef/library/std/stlport.h" 3 4 6011: 6011: # 23 "/usr/include/boost/predef/library/std.h" 2 3 4 6011: # 1 "/usr/include/boost/predef/library/std/vacpp.h" 1 3 4 6011: # 14 "/usr/include/boost/predef/library/std/vacpp.h" 3 4 6011: # 1 "/usr/include/boost/predef/make.h" 1 3 4 6011: # 15 "/usr/include/boost/predef/library/std/vacpp.h" 2 3 4 6011: # 44 "/usr/include/boost/predef/library/std/vacpp.h" 3 4 6011: 6011: # 24 "/usr/include/boost/predef/library/std.h" 2 3 4 6011: # 15 "/usr/include/boost/predef/library.h" 2 3 4 6011: # 17 "/usr/include/boost/predef.h" 2 3 4 6011: # 1 "/usr/include/boost/predef/os.h" 1 3 4 6011: # 14 "/usr/include/boost/predef/os.h" 3 4 6011: # 1 "/usr/include/boost/predef/os/aix.h" 1 3 4 6011: # 12 "/usr/include/boost/predef/os/aix.h" 3 4 6011: # 1 "/usr/include/boost/predef/make.h" 1 3 4 6011: # 13 "/usr/include/boost/predef/os/aix.h" 2 3 4 6011: # 66 "/usr/include/boost/predef/os/aix.h" 3 4 6011: 6011: # 15 "/usr/include/boost/predef/os.h" 2 3 4 6011: # 1 "/usr/include/boost/predef/os/amigaos.h" 1 3 4 6011: # 12 "/usr/include/boost/predef/os/amigaos.h" 3 4 6011: # 1 "/usr/include/boost/predef/make.h" 1 3 4 6011: # 13 "/usr/include/boost/predef/os/amigaos.h" 2 3 4 6011: # 46 "/usr/include/boost/predef/os/amigaos.h" 3 4 6011: 6011: # 16 "/usr/include/boost/predef/os.h" 2 3 4 6011: # 1 "/usr/include/boost/predef/os/android.h" 1 3 4 6011: # 12 "/usr/include/boost/predef/os/android.h" 3 4 6011: # 1 "/usr/include/boost/predef/make.h" 1 3 4 6011: # 13 "/usr/include/boost/predef/os/android.h" 2 3 4 6011: # 45 "/usr/include/boost/predef/os/android.h" 3 4 6011: 6011: # 17 "/usr/include/boost/predef/os.h" 2 3 4 6011: # 1 "/usr/include/boost/predef/os/beos.h" 1 3 4 6011: # 12 "/usr/include/boost/predef/os/beos.h" 3 4 6011: # 1 "/usr/include/boost/predef/make.h" 1 3 4 6011: # 13 "/usr/include/boost/predef/os/beos.h" 2 3 4 6011: # 45 "/usr/include/boost/predef/os/beos.h" 3 4 6011: 6011: # 18 "/usr/include/boost/predef/os.h" 2 3 4 6011: # 1 "/usr/include/boost/predef/os/bsd.h" 1 3 4 6011: # 16 "/usr/include/boost/predef/os/bsd.h" 3 4 6011: # 1 "/usr/include/boost/predef/os/macos.h" 1 3 4 6011: # 17 "/usr/include/boost/predef/os/macos.h" 3 4 6011: # 1 "/usr/include/boost/predef/os/ios.h" 1 3 4 6011: # 13 "/usr/include/boost/predef/os/ios.h" 3 4 6011: # 1 "/usr/include/boost/predef/make.h" 1 3 4 6011: # 14 "/usr/include/boost/predef/os/ios.h" 2 3 4 6011: # 51 "/usr/include/boost/predef/os/ios.h" 3 4 6011: 6011: # 18 "/usr/include/boost/predef/os/macos.h" 2 3 4 6011: 6011: 6011: # 1 "/usr/include/boost/predef/make.h" 1 3 4 6011: # 21 "/usr/include/boost/predef/os/macos.h" 2 3 4 6011: # 65 "/usr/include/boost/predef/os/macos.h" 3 4 6011: 6011: # 17 "/usr/include/boost/predef/os/bsd.h" 2 3 4 6011: 6011: 6011: # 1 "/usr/include/boost/predef/make.h" 1 3 4 6011: # 20 "/usr/include/boost/predef/os/bsd.h" 2 3 4 6011: # 52 "/usr/include/boost/predef/os/bsd.h" 3 4 6011: # 1 "/usr/include/boost/predef/os/bsd/bsdi.h" 1 3 4 6011: # 11 "/usr/include/boost/predef/os/bsd/bsdi.h" 3 4 6011: # 1 "/usr/include/boost/predef/os/bsd.h" 1 3 4 6011: # 94 "/usr/include/boost/predef/os/bsd.h" 3 4 6011: # 1 "/usr/include/boost/predef/os/bsd/bsdi.h" 1 3 4 6011: # 48 "/usr/include/boost/predef/os/bsd/bsdi.h" 3 4 6011: 6011: # 95 "/usr/include/boost/predef/os/bsd.h" 2 3 4 6011: # 1 "/usr/include/boost/predef/os/bsd/dragonfly.h" 1 3 4 6011: # 11 "/usr/include/boost/predef/os/bsd/dragonfly.h" 3 4 6011: # 1 "/usr/include/boost/predef/os/bsd.h" 1 3 4 6011: # 94 "/usr/include/boost/predef/os/bsd.h" 3 4 6011: # 1 "/usr/include/boost/predef/os/bsd/bsdi.h" 1 3 4 6011: # 48 "/usr/include/boost/predef/os/bsd/bsdi.h" 3 4 6011: 6011: # 95 "/usr/include/boost/predef/os/bsd.h" 2 3 4 6011: # 1 "/usr/include/boost/predef/os/bsd/dragonfly.h" 1 3 4 6011: # 50 "/usr/include/boost/predef/os/bsd/dragonfly.h" 3 4 6011: 6011: # 96 "/usr/include/boost/predef/os/bsd.h" 2 3 4 6011: # 1 "/usr/include/boost/predef/os/bsd/free.h" 1 3 4 6011: # 11 "/usr/include/boost/predef/os/bsd/free.h" 3 4 6011: # 1 "/usr/include/boost/predef/os/bsd.h" 1 3 4 6011: # 94 "/usr/include/boost/predef/os/bsd.h" 3 4 6011: # 1 "/usr/include/boost/predef/os/bsd/bsdi.h" 1 3 4 6011: # 48 "/usr/include/boost/predef/os/bsd/bsdi.h" 3 4 6011: 6011: # 95 "/usr/include/boost/predef/os/bsd.h" 2 3 4 6011: # 1 "/usr/include/boost/predef/os/bsd/dragonfly.h" 1 3 4 6011: # 50 "/usr/include/boost/predef/os/bsd/dragonfly.h" 3 4 6011: 6011: # 96 "/usr/include/boost/predef/os/bsd.h" 2 3 4 6011: # 1 "/usr/include/boost/predef/os/bsd/free.h" 1 3 4 6011: # 60 "/usr/include/boost/predef/os/bsd/free.h" 3 4 6011: 6011: # 97 "/usr/include/boost/predef/os/bsd.h" 2 3 4 6011: # 1 "/usr/include/boost/predef/os/bsd/open.h" 1 3 4 6011: # 11 "/usr/include/boost/predef/os/bsd/open.h" 3 4 6011: # 1 "/usr/include/boost/predef/os/bsd.h" 1 3 4 6011: # 94 "/usr/include/boost/predef/os/bsd.h" 3 4 6011: # 1 "/usr/include/boost/predef/os/bsd/bsdi.h" 1 3 4 6011: # 48 "/usr/include/boost/predef/os/bsd/bsdi.h" 3 4 6011: 6011: # 95 "/usr/include/boost/predef/os/bsd.h" 2 3 4 6011: # 1 "/usr/include/boost/predef/os/bsd/dragonfly.h" 1 3 4 6011: # 50 "/usr/include/boost/predef/os/bsd/dragonfly.h" 3 4 6011: 6011: # 96 "/usr/include/boost/predef/os/bsd.h" 2 3 4 6011: # 1 "/usr/include/boost/predef/os/bsd/free.h" 1 3 4 6011: # 60 "/usr/include/boost/predef/os/bsd/free.h" 3 4 6011: 6011: # 97 "/usr/include/boost/predef/os/bsd.h" 2 3 4 6011: # 1 "/usr/include/boost/predef/os/bsd/open.h" 1 3 4 6011: # 171 "/usr/include/boost/predef/os/bsd/open.h" 3 4 6011: 6011: # 98 "/usr/include/boost/predef/os/bsd.h" 2 3 4 6011: # 1 "/usr/include/boost/predef/os/bsd/net.h" 1 3 4 6011: # 11 "/usr/include/boost/predef/os/bsd/net.h" 3 4 6011: # 1 "/usr/include/boost/predef/os/bsd.h" 1 3 4 6011: # 94 "/usr/include/boost/predef/os/bsd.h" 3 4 6011: # 1 "/usr/include/boost/predef/os/bsd/bsdi.h" 1 3 4 6011: # 48 "/usr/include/boost/predef/os/bsd/bsdi.h" 3 4 6011: 6011: # 95 "/usr/include/boost/predef/os/bsd.h" 2 3 4 6011: # 1 "/usr/include/boost/predef/os/bsd/dragonfly.h" 1 3 4 6011: # 50 "/usr/include/boost/predef/os/bsd/dragonfly.h" 3 4 6011: 6011: # 96 "/usr/include/boost/predef/os/bsd.h" 2 3 4 6011: # 1 "/usr/include/boost/predef/os/bsd/free.h" 1 3 4 6011: # 60 "/usr/include/boost/predef/os/bsd/free.h" 3 4 6011: 6011: # 97 "/usr/include/boost/predef/os/bsd.h" 2 3 4 6011: # 1 "/usr/include/boost/predef/os/bsd/open.h" 1 3 4 6011: # 171 "/usr/include/boost/predef/os/bsd/open.h" 3 4 6011: 6011: # 98 "/usr/include/boost/predef/os/bsd.h" 2 3 4 6011: # 1 "/usr/include/boost/predef/os/bsd/net.h" 1 3 4 6011: # 84 "/usr/include/boost/predef/os/bsd/net.h" 3 4 6011: 6011: # 99 "/usr/include/boost/predef/os/bsd.h" 2 3 4 6011: 6011: 6011: 6011: 6011: 6011: # 12 "/usr/include/boost/predef/os/bsd/net.h" 2 3 4 6011: # 84 "/usr/include/boost/predef/os/bsd/net.h" 3 4 6011: 6011: # 99 "/usr/include/boost/predef/os/bsd.h" 2 3 4 6011: 6011: 6011: 6011: 6011: 6011: # 12 "/usr/include/boost/predef/os/bsd/open.h" 2 3 4 6011: # 171 "/usr/include/boost/predef/os/bsd/open.h" 3 4 6011: 6011: # 98 "/usr/include/boost/predef/os/bsd.h" 2 3 4 6011: # 1 "/usr/include/boost/predef/os/bsd/net.h" 1 3 4 6011: # 84 "/usr/include/boost/predef/os/bsd/net.h" 3 4 6011: 6011: # 99 "/usr/include/boost/predef/os/bsd.h" 2 3 4 6011: 6011: 6011: 6011: 6011: 6011: # 12 "/usr/include/boost/predef/os/bsd/free.h" 2 3 4 6011: # 60 "/usr/include/boost/predef/os/bsd/free.h" 3 4 6011: 6011: # 97 "/usr/include/boost/predef/os/bsd.h" 2 3 4 6011: # 1 "/usr/include/boost/predef/os/bsd/open.h" 1 3 4 6011: # 171 "/usr/include/boost/predef/os/bsd/open.h" 3 4 6011: 6011: # 98 "/usr/include/boost/predef/os/bsd.h" 2 3 4 6011: # 1 "/usr/include/boost/predef/os/bsd/net.h" 1 3 4 6011: # 84 "/usr/include/boost/predef/os/bsd/net.h" 3 4 6011: 6011: # 99 "/usr/include/boost/predef/os/bsd.h" 2 3 4 6011: 6011: 6011: 6011: 6011: 6011: # 12 "/usr/include/boost/predef/os/bsd/dragonfly.h" 2 3 4 6011: # 50 "/usr/include/boost/predef/os/bsd/dragonfly.h" 3 4 6011: 6011: # 96 "/usr/include/boost/predef/os/bsd.h" 2 3 4 6011: # 1 "/usr/include/boost/predef/os/bsd/free.h" 1 3 4 6011: # 60 "/usr/include/boost/predef/os/bsd/free.h" 3 4 6011: 6011: # 97 "/usr/include/boost/predef/os/bsd.h" 2 3 4 6011: # 1 "/usr/include/boost/predef/os/bsd/open.h" 1 3 4 6011: # 171 "/usr/include/boost/predef/os/bsd/open.h" 3 4 6011: 6011: # 98 "/usr/include/boost/predef/os/bsd.h" 2 3 4 6011: # 1 "/usr/include/boost/predef/os/bsd/net.h" 1 3 4 6011: # 84 "/usr/include/boost/predef/os/bsd/net.h" 3 4 6011: 6011: # 99 "/usr/include/boost/predef/os/bsd.h" 2 3 4 6011: 6011: 6011: 6011: 6011: 6011: # 12 "/usr/include/boost/predef/os/bsd/bsdi.h" 2 3 4 6011: # 48 "/usr/include/boost/predef/os/bsd/bsdi.h" 3 4 6011: 6011: # 53 "/usr/include/boost/predef/os/bsd.h" 2 3 4 6011: # 1 "/usr/include/boost/predef/os/bsd/dragonfly.h" 1 3 4 6011: # 50 "/usr/include/boost/predef/os/bsd/dragonfly.h" 3 4 6011: 6011: # 54 "/usr/include/boost/predef/os/bsd.h" 2 3 4 6011: # 1 "/usr/include/boost/predef/os/bsd/free.h" 1 3 4 6011: # 60 "/usr/include/boost/predef/os/bsd/free.h" 3 4 6011: 6011: # 55 "/usr/include/boost/predef/os/bsd.h" 2 3 4 6011: # 1 "/usr/include/boost/predef/os/bsd/open.h" 1 3 4 6011: # 171 "/usr/include/boost/predef/os/bsd/open.h" 3 4 6011: 6011: # 56 "/usr/include/boost/predef/os/bsd.h" 2 3 4 6011: # 1 "/usr/include/boost/predef/os/bsd/net.h" 1 3 4 6011: # 84 "/usr/include/boost/predef/os/bsd/net.h" 3 4 6011: 6011: # 57 "/usr/include/boost/predef/os/bsd.h" 2 3 4 6011: # 103 "/usr/include/boost/predef/os/bsd.h" 3 4 6011: 6011: # 19 "/usr/include/boost/predef/os.h" 2 3 4 6011: # 1 "/usr/include/boost/predef/os/cygwin.h" 1 3 4 6011: # 12 "/usr/include/boost/predef/os/cygwin.h" 3 4 6011: # 1 "/usr/include/boost/predef/make.h" 1 3 4 6011: # 13 "/usr/include/boost/predef/os/cygwin.h" 2 3 4 6011: # 45 "/usr/include/boost/predef/os/cygwin.h" 3 4 6011: 6011: # 20 "/usr/include/boost/predef/os.h" 2 3 4 6011: # 1 "/usr/include/boost/predef/os/haiku.h" 1 3 4 6011: # 13 "/usr/include/boost/predef/os/haiku.h" 3 4 6011: # 1 "/usr/include/boost/predef/make.h" 1 3 4 6011: # 14 "/usr/include/boost/predef/os/haiku.h" 2 3 4 6011: # 46 "/usr/include/boost/predef/os/haiku.h" 3 4 6011: 6011: # 21 "/usr/include/boost/predef/os.h" 2 3 4 6011: # 1 "/usr/include/boost/predef/os/hpux.h" 1 3 4 6011: # 12 "/usr/include/boost/predef/os/hpux.h" 3 4 6011: # 1 "/usr/include/boost/predef/make.h" 1 3 4 6011: # 13 "/usr/include/boost/predef/os/hpux.h" 2 3 4 6011: # 47 "/usr/include/boost/predef/os/hpux.h" 3 4 6011: 6011: # 22 "/usr/include/boost/predef/os.h" 2 3 4 6011: # 1 "/usr/include/boost/predef/os/irix.h" 1 3 4 6011: # 12 "/usr/include/boost/predef/os/irix.h" 3 4 6011: # 1 "/usr/include/boost/predef/make.h" 1 3 4 6011: # 13 "/usr/include/boost/predef/os/irix.h" 2 3 4 6011: # 46 "/usr/include/boost/predef/os/irix.h" 3 4 6011: 6011: # 23 "/usr/include/boost/predef/os.h" 2 3 4 6011: # 1 "/usr/include/boost/predef/os/ios.h" 1 3 4 6011: # 51 "/usr/include/boost/predef/os/ios.h" 3 4 6011: 6011: # 24 "/usr/include/boost/predef/os.h" 2 3 4 6011: # 1 "/usr/include/boost/predef/os/linux.h" 1 3 4 6011: # 12 "/usr/include/boost/predef/os/linux.h" 3 4 6011: # 1 "/usr/include/boost/predef/make.h" 1 3 4 6011: # 13 "/usr/include/boost/predef/os/linux.h" 2 3 4 6011: # 38 "/usr/include/boost/predef/os/linux.h" 3 4 6011: # 1 "/usr/include/boost/predef/detail/os_detected.h" 1 3 4 6011: # 39 "/usr/include/boost/predef/os/linux.h" 2 3 4 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: # 25 "/usr/include/boost/predef/os.h" 2 3 4 6011: # 1 "/usr/include/boost/predef/os/macos.h" 1 3 4 6011: # 65 "/usr/include/boost/predef/os/macos.h" 3 4 6011: 6011: # 26 "/usr/include/boost/predef/os.h" 2 3 4 6011: # 1 "/usr/include/boost/predef/os/os400.h" 1 3 4 6011: # 12 "/usr/include/boost/predef/os/os400.h" 3 4 6011: # 1 "/usr/include/boost/predef/make.h" 1 3 4 6011: # 13 "/usr/include/boost/predef/os/os400.h" 2 3 4 6011: # 45 "/usr/include/boost/predef/os/os400.h" 3 4 6011: 6011: # 27 "/usr/include/boost/predef/os.h" 2 3 4 6011: # 1 "/usr/include/boost/predef/os/qnxnto.h" 1 3 4 6011: # 12 "/usr/include/boost/predef/os/qnxnto.h" 3 4 6011: # 1 "/usr/include/boost/predef/make.h" 1 3 4 6011: # 13 "/usr/include/boost/predef/os/qnxnto.h" 2 3 4 6011: # 59 "/usr/include/boost/predef/os/qnxnto.h" 3 4 6011: 6011: # 28 "/usr/include/boost/predef/os.h" 2 3 4 6011: # 1 "/usr/include/boost/predef/os/solaris.h" 1 3 4 6011: # 12 "/usr/include/boost/predef/os/solaris.h" 3 4 6011: # 1 "/usr/include/boost/predef/make.h" 1 3 4 6011: # 13 "/usr/include/boost/predef/os/solaris.h" 2 3 4 6011: # 46 "/usr/include/boost/predef/os/solaris.h" 3 4 6011: 6011: # 29 "/usr/include/boost/predef/os.h" 2 3 4 6011: # 1 "/usr/include/boost/predef/os/unix.h" 1 3 4 6011: # 12 "/usr/include/boost/predef/os/unix.h" 3 4 6011: # 1 "/usr/include/boost/predef/make.h" 1 3 4 6011: # 13 "/usr/include/boost/predef/os/unix.h" 2 3 4 6011: # 75 "/usr/include/boost/predef/os/unix.h" 3 4 6011: 6011: 6011: # 30 "/usr/include/boost/predef/os.h" 2 3 4 6011: # 1 "/usr/include/boost/predef/os/vms.h" 1 3 4 6011: # 12 "/usr/include/boost/predef/os/vms.h" 3 4 6011: # 1 "/usr/include/boost/predef/make.h" 1 3 4 6011: # 13 "/usr/include/boost/predef/os/vms.h" 2 3 4 6011: # 52 "/usr/include/boost/predef/os/vms.h" 3 4 6011: 6011: # 31 "/usr/include/boost/predef/os.h" 2 3 4 6011: # 1 "/usr/include/boost/predef/os/windows.h" 1 3 4 6011: # 12 "/usr/include/boost/predef/os/windows.h" 3 4 6011: # 1 "/usr/include/boost/predef/make.h" 1 3 4 6011: # 13 "/usr/include/boost/predef/os/windows.h" 2 3 4 6011: # 51 "/usr/include/boost/predef/os/windows.h" 3 4 6011: 6011: # 32 "/usr/include/boost/predef/os.h" 2 3 4 6011: # 18 "/usr/include/boost/predef.h" 2 3 4 6011: # 1 "/usr/include/boost/predef/other.h" 1 3 4 6011: # 13 "/usr/include/boost/predef/other.h" 3 4 6011: # 1 "/usr/include/boost/predef/other/endian.h" 1 3 4 6011: # 12 "/usr/include/boost/predef/other/endian.h" 3 4 6011: # 1 "/usr/include/boost/predef/make.h" 1 3 4 6011: # 13 "/usr/include/boost/predef/other/endian.h" 2 3 4 6011: # 1 "/usr/include/boost/predef/library/c/gnu.h" 1 3 4 6011: # 61 "/usr/include/boost/predef/library/c/gnu.h" 3 4 6011: 6011: # 14 "/usr/include/boost/predef/other/endian.h" 2 3 4 6011: # 1 "/usr/include/boost/predef/os/macos.h" 1 3 4 6011: # 65 "/usr/include/boost/predef/os/macos.h" 3 4 6011: 6011: # 15 "/usr/include/boost/predef/other/endian.h" 2 3 4 6011: # 1 "/usr/include/boost/predef/os/bsd.h" 1 3 4 6011: # 94 "/usr/include/boost/predef/os/bsd.h" 3 4 6011: # 1 "/usr/include/boost/predef/os/bsd/bsdi.h" 1 3 4 6011: # 48 "/usr/include/boost/predef/os/bsd/bsdi.h" 3 4 6011: 6011: # 95 "/usr/include/boost/predef/os/bsd.h" 2 3 4 6011: # 1 "/usr/include/boost/predef/os/bsd/dragonfly.h" 1 3 4 6011: # 50 "/usr/include/boost/predef/os/bsd/dragonfly.h" 3 4 6011: 6011: # 96 "/usr/include/boost/predef/os/bsd.h" 2 3 4 6011: # 1 "/usr/include/boost/predef/os/bsd/free.h" 1 3 4 6011: # 60 "/usr/include/boost/predef/os/bsd/free.h" 3 4 6011: 6011: # 97 "/usr/include/boost/predef/os/bsd.h" 2 3 4 6011: # 1 "/usr/include/boost/predef/os/bsd/open.h" 1 3 4 6011: # 171 "/usr/include/boost/predef/os/bsd/open.h" 3 4 6011: 6011: # 98 "/usr/include/boost/predef/os/bsd.h" 2 3 4 6011: # 1 "/usr/include/boost/predef/os/bsd/net.h" 1 3 4 6011: # 84 "/usr/include/boost/predef/os/bsd/net.h" 3 4 6011: 6011: # 99 "/usr/include/boost/predef/os/bsd.h" 2 3 4 6011: 6011: 6011: 6011: 6011: 6011: # 16 "/usr/include/boost/predef/other/endian.h" 2 3 4 6011: # 1 "/usr/include/boost/predef/os/android.h" 1 3 4 6011: # 45 "/usr/include/boost/predef/os/android.h" 3 4 6011: 6011: # 17 "/usr/include/boost/predef/other/endian.h" 2 3 4 6011: # 195 "/usr/include/boost/predef/other/endian.h" 3 4 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: # 14 "/usr/include/boost/predef/other.h" 2 3 4 6011: # 19 "/usr/include/boost/predef.h" 2 3 4 6011: # 1 "/usr/include/boost/predef/platform.h" 1 3 4 6011: # 14 "/usr/include/boost/predef/platform.h" 3 4 6011: # 1 "/usr/include/boost/predef/platform/mingw.h" 1 3 4 6011: # 12 "/usr/include/boost/predef/platform/mingw.h" 3 4 6011: # 1 "/usr/include/boost/predef/make.h" 1 3 4 6011: # 13 "/usr/include/boost/predef/platform/mingw.h" 2 3 4 6011: # 64 "/usr/include/boost/predef/platform/mingw.h" 3 4 6011: 6011: # 15 "/usr/include/boost/predef/platform.h" 2 3 4 6011: # 1 "/usr/include/boost/predef/platform/windows_desktop.h" 1 3 4 6011: # 13 "/usr/include/boost/predef/platform/windows_desktop.h" 3 4 6011: # 1 "/usr/include/boost/predef/make.h" 1 3 4 6011: # 14 "/usr/include/boost/predef/platform/windows_desktop.h" 2 3 4 6011: # 1 "/usr/include/boost/predef/os/windows.h" 1 3 4 6011: # 51 "/usr/include/boost/predef/os/windows.h" 3 4 6011: 6011: # 15 "/usr/include/boost/predef/platform/windows_desktop.h" 2 3 4 6011: # 45 "/usr/include/boost/predef/platform/windows_desktop.h" 3 4 6011: 6011: # 16 "/usr/include/boost/predef/platform.h" 2 3 4 6011: # 1 "/usr/include/boost/predef/platform/windows_store.h" 1 3 4 6011: # 13 "/usr/include/boost/predef/platform/windows_store.h" 3 4 6011: # 1 "/usr/include/boost/predef/make.h" 1 3 4 6011: # 14 "/usr/include/boost/predef/platform/windows_store.h" 2 3 4 6011: # 1 "/usr/include/boost/predef/os/windows.h" 1 3 4 6011: # 51 "/usr/include/boost/predef/os/windows.h" 3 4 6011: 6011: # 15 "/usr/include/boost/predef/platform/windows_store.h" 2 3 4 6011: # 43 "/usr/include/boost/predef/platform/windows_store.h" 3 4 6011: 6011: # 17 "/usr/include/boost/predef/platform.h" 2 3 4 6011: # 1 "/usr/include/boost/predef/platform/windows_phone.h" 1 3 4 6011: # 13 "/usr/include/boost/predef/platform/windows_phone.h" 3 4 6011: # 1 "/usr/include/boost/predef/make.h" 1 3 4 6011: # 14 "/usr/include/boost/predef/platform/windows_phone.h" 2 3 4 6011: # 1 "/usr/include/boost/predef/os/windows.h" 1 3 4 6011: # 51 "/usr/include/boost/predef/os/windows.h" 3 4 6011: 6011: # 15 "/usr/include/boost/predef/platform/windows_phone.h" 2 3 4 6011: # 43 "/usr/include/boost/predef/platform/windows_phone.h" 3 4 6011: 6011: # 18 "/usr/include/boost/predef/platform.h" 2 3 4 6011: # 1 "/usr/include/boost/predef/platform/windows_runtime.h" 1 3 4 6011: # 13 "/usr/include/boost/predef/platform/windows_runtime.h" 3 4 6011: # 1 "/usr/include/boost/predef/make.h" 1 3 4 6011: # 14 "/usr/include/boost/predef/platform/windows_runtime.h" 2 3 4 6011: # 1 "/usr/include/boost/predef/os/windows.h" 1 3 4 6011: # 51 "/usr/include/boost/predef/os/windows.h" 3 4 6011: 6011: # 15 "/usr/include/boost/predef/platform/windows_runtime.h" 2 3 4 6011: # 45 "/usr/include/boost/predef/platform/windows_runtime.h" 3 4 6011: 6011: # 19 "/usr/include/boost/predef/platform.h" 2 3 4 6011: # 1 "/usr/include/boost/predef/platform/ios.h" 1 3 4 6011: # 12 "/usr/include/boost/predef/platform/ios.h" 3 4 6011: # 1 "/usr/include/boost/predef/os/ios.h" 1 3 4 6011: # 51 "/usr/include/boost/predef/os/ios.h" 3 4 6011: 6011: # 13 "/usr/include/boost/predef/platform/ios.h" 2 3 4 6011: # 57 "/usr/include/boost/predef/platform/ios.h" 3 4 6011: 6011: 6011: # 20 "/usr/include/boost/predef/platform.h" 2 3 4 6011: # 20 "/usr/include/boost/predef.h" 2 3 4 6011: # 1 "/usr/include/boost/predef/hardware.h" 1 3 4 6011: # 14 "/usr/include/boost/predef/hardware.h" 3 4 6011: # 1 "/usr/include/boost/predef/hardware/simd.h" 1 3 4 6011: # 9 "/usr/include/boost/predef/hardware/simd.h" 3 4 6011: # 1 "/usr/include/boost/predef/hardware/simd/x86.h" 1 3 4 6011: # 13 "/usr/include/boost/predef/hardware/simd/x86.h" 3 4 6011: # 1 "/usr/include/boost/predef/hardware/simd/x86/versions.h" 1 3 4 6011: # 14 "/usr/include/boost/predef/hardware/simd/x86.h" 2 3 4 6011: # 123 "/usr/include/boost/predef/hardware/simd/x86.h" 3 4 6011: 6011: # 10 "/usr/include/boost/predef/hardware/simd.h" 2 3 4 6011: # 1 "/usr/include/boost/predef/hardware/simd/x86_amd.h" 1 3 4 6011: # 13 "/usr/include/boost/predef/hardware/simd/x86_amd.h" 3 4 6011: # 1 "/usr/include/boost/predef/hardware/simd/x86_amd/versions.h" 1 3 4 6011: # 14 "/usr/include/boost/predef/hardware/simd/x86_amd.h" 2 3 4 6011: # 87 "/usr/include/boost/predef/hardware/simd/x86_amd.h" 3 4 6011: 6011: # 11 "/usr/include/boost/predef/hardware/simd.h" 2 3 4 6011: # 1 "/usr/include/boost/predef/hardware/simd/arm.h" 1 3 4 6011: # 13 "/usr/include/boost/predef/hardware/simd/arm.h" 3 4 6011: # 1 "/usr/include/boost/predef/hardware/simd/arm/versions.h" 1 3 4 6011: # 14 "/usr/include/boost/predef/hardware/simd/arm.h" 2 3 4 6011: # 59 "/usr/include/boost/predef/hardware/simd/arm.h" 3 4 6011: 6011: # 12 "/usr/include/boost/predef/hardware/simd.h" 2 3 4 6011: # 1 "/usr/include/boost/predef/hardware/simd/ppc.h" 1 3 4 6011: # 13 "/usr/include/boost/predef/hardware/simd/ppc.h" 3 4 6011: # 1 "/usr/include/boost/predef/hardware/simd/ppc/versions.h" 1 3 4 6011: # 14 "/usr/include/boost/predef/hardware/simd/ppc.h" 2 3 4 6011: # 69 "/usr/include/boost/predef/hardware/simd/ppc.h" 3 4 6011: 6011: # 13 "/usr/include/boost/predef/hardware/simd.h" 2 3 4 6011: # 119 "/usr/include/boost/predef/hardware/simd.h" 3 4 6011: 6011: # 15 "/usr/include/boost/predef/hardware.h" 2 3 4 6011: # 21 "/usr/include/boost/predef.h" 2 3 4 6011: 6011: # 1 "/usr/include/boost/predef/version.h" 1 3 4 6011: # 23 "/usr/include/boost/predef.h" 2 3 4 6011: # 46 "/usr/include/boost/regex/config.hpp" 2 3 4 6011: # 136 "/usr/include/boost/regex/config.hpp" 3 4 6011: # 1 "/usr/include/boost/regex/config/cwchar.hpp" 1 3 4 6011: # 22 "/usr/include/boost/regex/config/cwchar.hpp" 3 4 6011: # 1 "/usr/include/c++/8/cwchar" 1 3 4 6011: # 39 "/usr/include/c++/8/cwchar" 3 4 6011: 6011: # 40 "/usr/include/c++/8/cwchar" 3 6011: # 23 "/usr/include/boost/regex/config/cwchar.hpp" 2 3 4 6011: # 1 "/usr/include/c++/8/cwctype" 1 3 4 6011: # 39 "/usr/include/c++/8/cwctype" 3 4 6011: 6011: # 40 "/usr/include/c++/8/cwctype" 3 6011: # 24 "/usr/include/boost/regex/config/cwchar.hpp" 2 3 4 6011: # 49 "/usr/include/boost/regex/config/cwchar.hpp" 3 4 6011: namespace std{ 6011: 6011: 6011: extern "C"{ 6011: # 201 "/usr/include/boost/regex/config/cwchar.hpp" 3 4 6011: } 6011: 6011: 6011: } 6011: # 137 "/usr/include/boost/regex/config.hpp" 2 3 4 6011: # 249 "/usr/include/boost/regex/config.hpp" 3 4 6011: # 1 "/usr/include/boost/config/auto_link.hpp" 1 3 4 6011: # 250 "/usr/include/boost/regex/config.hpp" 2 3 4 6011: # 432 "/usr/include/boost/regex/config.hpp" 3 4 6011: namespace boost{ namespace re_detail_106501{ 6011: 6011: void* get_mem_block(); 6011: void put_mem_block(void*); 6011: 6011: }} 6011: # 29 "/usr/include/boost/regex.hpp" 2 3 4 6011: 6011: 6011: # 1 "/usr/include/boost/regex/v4/regex.hpp" 1 3 4 6011: # 32 "/usr/include/boost/regex/v4/regex.hpp" 3 4 6011: # 1 "/usr/include/boost/regex/v4/regex_workaround.hpp" 1 3 4 6011: # 24 "/usr/include/boost/regex/v4/regex_workaround.hpp" 3 4 6011: # 1 "/usr/include/c++/8/cstring" 1 3 4 6011: # 39 "/usr/include/c++/8/cstring" 3 4 6011: 6011: # 40 "/usr/include/c++/8/cstring" 3 6011: # 71 "/usr/include/c++/8/cstring" 3 6011: namespace std __attribute__ ((__visibility__ ("default"))) 6011: { 6011: 6011: 6011: using ::memchr; 6011: using ::memcmp; 6011: using ::memcpy; 6011: using ::memmove; 6011: using ::memset; 6011: using ::strcat; 6011: using ::strcmp; 6011: using ::strcoll; 6011: using ::strcpy; 6011: using ::strcspn; 6011: using ::strerror; 6011: using ::strlen; 6011: using ::strncat; 6011: using ::strncmp; 6011: using ::strncpy; 6011: using ::strspn; 6011: using ::strtok; 6011: using ::strxfrm; 6011: using ::strchr; 6011: using ::strpbrk; 6011: using ::strrchr; 6011: using ::strstr; 6011: # 120 "/usr/include/c++/8/cstring" 3 6011: 6011: } 6011: # 25 "/usr/include/boost/regex/v4/regex_workaround.hpp" 2 3 4 6011: # 1 "/usr/include/c++/8/cstdlib" 1 3 4 6011: # 39 "/usr/include/c++/8/cstdlib" 3 4 6011: 6011: # 40 "/usr/include/c++/8/cstdlib" 3 6011: # 26 "/usr/include/boost/regex/v4/regex_workaround.hpp" 2 3 4 6011: 6011: # 1 "/usr/include/c++/8/cassert" 1 3 4 6011: # 41 "/usr/include/c++/8/cassert" 3 4 6011: 6011: # 42 "/usr/include/c++/8/cassert" 3 6011: 6011: 6011: # 1 "/usr/include/assert.h" 1 3 4 6011: # 44 "/usr/include/c++/8/cassert" 2 3 6011: # 28 "/usr/include/boost/regex/v4/regex_workaround.hpp" 2 3 4 6011: # 1 "/usr/include/c++/8/cstdio" 1 3 4 6011: # 39 "/usr/include/c++/8/cstdio" 3 4 6011: 6011: # 40 "/usr/include/c++/8/cstdio" 3 6011: # 29 "/usr/include/boost/regex/v4/regex_workaround.hpp" 2 3 4 6011: # 1 "/usr/include/c++/8/climits" 1 3 4 6011: # 39 "/usr/include/c++/8/climits" 3 4 6011: 6011: # 40 "/usr/include/c++/8/climits" 3 6011: 6011: 6011: # 1 "/usr/lib/gcc/arm-linux-gnueabihf/8/include-fixed/limits.h" 1 3 4 6011: # 43 "/usr/include/c++/8/climits" 2 3 6011: # 30 "/usr/include/boost/regex/v4/regex_workaround.hpp" 2 3 4 6011: 6011: 6011: 6011: 6011: 6011: 6011: # 1 "/usr/include/c++/8/set" 1 3 4 6011: # 58 "/usr/include/c++/8/set" 3 4 6011: 6011: # 59 "/usr/include/c++/8/set" 3 6011: 6011: # 1 "/usr/include/c++/8/bits/stl_tree.h" 1 3 6011: # 61 "/usr/include/c++/8/bits/stl_tree.h" 3 6011: 6011: # 62 "/usr/include/c++/8/bits/stl_tree.h" 3 6011: # 75 "/usr/include/c++/8/bits/stl_tree.h" 3 6011: namespace std __attribute__ ((__visibility__ ("default"))) 6011: { 6011: 6011: # 99 "/usr/include/c++/8/bits/stl_tree.h" 3 6011: enum _Rb_tree_color { _S_red = false, _S_black = true }; 6011: 6011: struct _Rb_tree_node_base 6011: { 6011: typedef _Rb_tree_node_base* _Base_ptr; 6011: typedef const _Rb_tree_node_base* _Const_Base_ptr; 6011: 6011: _Rb_tree_color _M_color; 6011: _Base_ptr _M_parent; 6011: _Base_ptr _M_left; 6011: _Base_ptr _M_right; 6011: 6011: static _Base_ptr 6011: _S_minimum(_Base_ptr __x) noexcept 6011: { 6011: while (__x->_M_left != 0) __x = __x->_M_left; 6011: return __x; 6011: } 6011: 6011: static _Const_Base_ptr 6011: _S_minimum(_Const_Base_ptr __x) noexcept 6011: { 6011: while (__x->_M_left != 0) __x = __x->_M_left; 6011: return __x; 6011: } 6011: 6011: static _Base_ptr 6011: _S_maximum(_Base_ptr __x) noexcept 6011: { 6011: while (__x->_M_right != 0) __x = __x->_M_right; 6011: return __x; 6011: } 6011: 6011: static _Const_Base_ptr 6011: _S_maximum(_Const_Base_ptr __x) noexcept 6011: { 6011: while (__x->_M_right != 0) __x = __x->_M_right; 6011: return __x; 6011: } 6011: }; 6011: 6011: 6011: template 6011: struct _Rb_tree_key_compare 6011: { 6011: _Key_compare _M_key_compare; 6011: 6011: _Rb_tree_key_compare() 6011: noexcept(is_nothrow_default_constructible<_Key_compare>::value) 6011: 6011: : _M_key_compare() 6011: { } 6011: 6011: _Rb_tree_key_compare(const _Key_compare& __comp) 6011: : _M_key_compare(__comp) 6011: { } 6011: 6011: 6011: 6011: _Rb_tree_key_compare(const _Rb_tree_key_compare&) = default; 6011: 6011: _Rb_tree_key_compare(_Rb_tree_key_compare&& __x) 6011: noexcept(is_nothrow_copy_constructible<_Key_compare>::value) 6011: : _M_key_compare(__x._M_key_compare) 6011: { } 6011: 6011: }; 6011: 6011: 6011: struct _Rb_tree_header 6011: { 6011: _Rb_tree_node_base _M_header; 6011: size_t _M_node_count; 6011: 6011: _Rb_tree_header() noexcept 6011: { 6011: _M_header._M_color = _S_red; 6011: _M_reset(); 6011: } 6011: 6011: 6011: _Rb_tree_header(_Rb_tree_header&& __x) noexcept 6011: { 6011: if (__x._M_header._M_parent != nullptr) 6011: _M_move_data(__x); 6011: else 6011: { 6011: _M_header._M_color = _S_red; 6011: _M_reset(); 6011: } 6011: } 6011: 6011: 6011: void 6011: _M_move_data(_Rb_tree_header& __from) 6011: { 6011: _M_header._M_color = __from._M_header._M_color; 6011: _M_header._M_parent = __from._M_header._M_parent; 6011: _M_header._M_left = __from._M_header._M_left; 6011: _M_header._M_right = __from._M_header._M_right; 6011: _M_header._M_parent->_M_parent = &_M_header; 6011: _M_node_count = __from._M_node_count; 6011: 6011: __from._M_reset(); 6011: } 6011: 6011: void 6011: _M_reset() 6011: { 6011: _M_header._M_parent = 0; 6011: _M_header._M_left = &_M_header; 6011: _M_header._M_right = &_M_header; 6011: _M_node_count = 0; 6011: } 6011: }; 6011: 6011: template 6011: struct _Rb_tree_node : public _Rb_tree_node_base 6011: { 6011: typedef _Rb_tree_node<_Val>* _Link_type; 6011: # 231 "/usr/include/c++/8/bits/stl_tree.h" 3 6011: __gnu_cxx::__aligned_membuf<_Val> _M_storage; 6011: 6011: _Val* 6011: _M_valptr() 6011: { return _M_storage._M_ptr(); } 6011: 6011: const _Val* 6011: _M_valptr() const 6011: { return _M_storage._M_ptr(); } 6011: 6011: }; 6011: 6011: __attribute__ ((__pure__)) _Rb_tree_node_base* 6011: _Rb_tree_increment(_Rb_tree_node_base* __x) throw (); 6011: 6011: __attribute__ ((__pure__)) const _Rb_tree_node_base* 6011: _Rb_tree_increment(const _Rb_tree_node_base* __x) throw (); 6011: 6011: __attribute__ ((__pure__)) _Rb_tree_node_base* 6011: _Rb_tree_decrement(_Rb_tree_node_base* __x) throw (); 6011: 6011: __attribute__ ((__pure__)) const _Rb_tree_node_base* 6011: _Rb_tree_decrement(const _Rb_tree_node_base* __x) throw (); 6011: 6011: template 6011: struct _Rb_tree_iterator 6011: { 6011: typedef _Tp value_type; 6011: typedef _Tp& reference; 6011: typedef _Tp* pointer; 6011: 6011: typedef bidirectional_iterator_tag iterator_category; 6011: typedef ptrdiff_t difference_type; 6011: 6011: typedef _Rb_tree_iterator<_Tp> _Self; 6011: typedef _Rb_tree_node_base::_Base_ptr _Base_ptr; 6011: typedef _Rb_tree_node<_Tp>* _Link_type; 6011: 6011: _Rb_tree_iterator() noexcept 6011: : _M_node() { } 6011: 6011: explicit 6011: _Rb_tree_iterator(_Base_ptr __x) noexcept 6011: : _M_node(__x) { } 6011: 6011: reference 6011: operator*() const noexcept 6011: { return *static_cast<_Link_type>(_M_node)->_M_valptr(); } 6011: 6011: pointer 6011: operator->() const noexcept 6011: { return static_cast<_Link_type> (_M_node)->_M_valptr(); } 6011: 6011: _Self& 6011: operator++() noexcept 6011: { 6011: _M_node = _Rb_tree_increment(_M_node); 6011: return *this; 6011: } 6011: 6011: _Self 6011: operator++(int) noexcept 6011: { 6011: _Self __tmp = *this; 6011: _M_node = _Rb_tree_increment(_M_node); 6011: return __tmp; 6011: } 6011: 6011: _Self& 6011: operator--() noexcept 6011: { 6011: _M_node = _Rb_tree_decrement(_M_node); 6011: return *this; 6011: } 6011: 6011: _Self 6011: operator--(int) noexcept 6011: { 6011: _Self __tmp = *this; 6011: _M_node = _Rb_tree_decrement(_M_node); 6011: return __tmp; 6011: } 6011: 6011: bool 6011: operator==(const _Self& __x) const noexcept 6011: { return _M_node == __x._M_node; } 6011: 6011: bool 6011: operator!=(const _Self& __x) const noexcept 6011: { return _M_node != __x._M_node; } 6011: 6011: _Base_ptr _M_node; 6011: }; 6011: 6011: template 6011: struct _Rb_tree_const_iterator 6011: { 6011: typedef _Tp value_type; 6011: typedef const _Tp& reference; 6011: typedef const _Tp* pointer; 6011: 6011: typedef _Rb_tree_iterator<_Tp> iterator; 6011: 6011: typedef bidirectional_iterator_tag iterator_category; 6011: typedef ptrdiff_t difference_type; 6011: 6011: typedef _Rb_tree_const_iterator<_Tp> _Self; 6011: typedef _Rb_tree_node_base::_Const_Base_ptr _Base_ptr; 6011: typedef const _Rb_tree_node<_Tp>* _Link_type; 6011: 6011: _Rb_tree_const_iterator() noexcept 6011: : _M_node() { } 6011: 6011: explicit 6011: _Rb_tree_const_iterator(_Base_ptr __x) noexcept 6011: : _M_node(__x) { } 6011: 6011: _Rb_tree_const_iterator(const iterator& __it) noexcept 6011: : _M_node(__it._M_node) { } 6011: 6011: iterator 6011: _M_const_cast() const noexcept 6011: { return iterator(const_cast(_M_node)); } 6011: 6011: reference 6011: operator*() const noexcept 6011: { return *static_cast<_Link_type>(_M_node)->_M_valptr(); } 6011: 6011: pointer 6011: operator->() const noexcept 6011: { return static_cast<_Link_type>(_M_node)->_M_valptr(); } 6011: 6011: _Self& 6011: operator++() noexcept 6011: { 6011: _M_node = _Rb_tree_increment(_M_node); 6011: return *this; 6011: } 6011: 6011: _Self 6011: operator++(int) noexcept 6011: { 6011: _Self __tmp = *this; 6011: _M_node = _Rb_tree_increment(_M_node); 6011: return __tmp; 6011: } 6011: 6011: _Self& 6011: operator--() noexcept 6011: { 6011: _M_node = _Rb_tree_decrement(_M_node); 6011: return *this; 6011: } 6011: 6011: _Self 6011: operator--(int) noexcept 6011: { 6011: _Self __tmp = *this; 6011: _M_node = _Rb_tree_decrement(_M_node); 6011: return __tmp; 6011: } 6011: 6011: bool 6011: operator==(const _Self& __x) const noexcept 6011: { return _M_node == __x._M_node; } 6011: 6011: bool 6011: operator!=(const _Self& __x) const noexcept 6011: { return _M_node != __x._M_node; } 6011: 6011: _Base_ptr _M_node; 6011: }; 6011: 6011: template 6011: inline bool 6011: operator==(const _Rb_tree_iterator<_Val>& __x, 6011: const _Rb_tree_const_iterator<_Val>& __y) noexcept 6011: { return __x._M_node == __y._M_node; } 6011: 6011: template 6011: inline bool 6011: operator!=(const _Rb_tree_iterator<_Val>& __x, 6011: const _Rb_tree_const_iterator<_Val>& __y) noexcept 6011: { return __x._M_node != __y._M_node; } 6011: 6011: void 6011: _Rb_tree_insert_and_rebalance(const bool __insert_left, 6011: _Rb_tree_node_base* __x, 6011: _Rb_tree_node_base* __p, 6011: _Rb_tree_node_base& __header) throw (); 6011: 6011: _Rb_tree_node_base* 6011: _Rb_tree_rebalance_for_erase(_Rb_tree_node_base* const __z, 6011: _Rb_tree_node_base& __header) throw (); 6011: # 442 "/usr/include/c++/8/bits/stl_tree.h" 3 6011: template > 6011: class _Rb_tree 6011: { 6011: typedef typename __gnu_cxx::__alloc_traits<_Alloc>::template 6011: rebind<_Rb_tree_node<_Val> >::other _Node_allocator; 6011: 6011: typedef __gnu_cxx::__alloc_traits<_Node_allocator> _Alloc_traits; 6011: 6011: 6011: static_assert(__is_invocable<_Compare&, const _Key&, const _Key&>{}, 6011: "comparison object must be invocable with two arguments of key type"); 6011: # 462 "/usr/include/c++/8/bits/stl_tree.h" 3 6011: protected: 6011: typedef _Rb_tree_node_base* _Base_ptr; 6011: typedef const _Rb_tree_node_base* _Const_Base_ptr; 6011: typedef _Rb_tree_node<_Val>* _Link_type; 6011: typedef const _Rb_tree_node<_Val>* _Const_Link_type; 6011: 6011: private: 6011: 6011: 6011: struct _Reuse_or_alloc_node 6011: { 6011: _Reuse_or_alloc_node(_Rb_tree& __t) 6011: : _M_root(__t._M_root()), _M_nodes(__t._M_rightmost()), _M_t(__t) 6011: { 6011: if (_M_root) 6011: { 6011: _M_root->_M_parent = 0; 6011: 6011: if (_M_nodes->_M_left) 6011: _M_nodes = _M_nodes->_M_left; 6011: } 6011: else 6011: _M_nodes = 0; 6011: } 6011: 6011: 6011: _Reuse_or_alloc_node(const _Reuse_or_alloc_node&) = delete; 6011: 6011: 6011: ~_Reuse_or_alloc_node() 6011: { _M_t._M_erase(static_cast<_Link_type>(_M_root)); } 6011: 6011: template 6011: _Link_type 6011: 6011: 6011: 6011: operator()(_Arg&& __arg) 6011: 6011: { 6011: _Link_type __node = static_cast<_Link_type>(_M_extract()); 6011: if (__node) 6011: { 6011: _M_t._M_destroy_node(__node); 6011: _M_t._M_construct_node(__node, std::forward<_Arg>(__arg)); 6011: return __node; 6011: } 6011: 6011: return _M_t._M_create_node(std::forward<_Arg>(__arg)); 6011: } 6011: 6011: private: 6011: _Base_ptr 6011: _M_extract() 6011: { 6011: if (!_M_nodes) 6011: return _M_nodes; 6011: 6011: _Base_ptr __node = _M_nodes; 6011: _M_nodes = _M_nodes->_M_parent; 6011: if (_M_nodes) 6011: { 6011: if (_M_nodes->_M_right == __node) 6011: { 6011: _M_nodes->_M_right = 0; 6011: 6011: if (_M_nodes->_M_left) 6011: { 6011: _M_nodes = _M_nodes->_M_left; 6011: 6011: while (_M_nodes->_M_right) 6011: _M_nodes = _M_nodes->_M_right; 6011: 6011: if (_M_nodes->_M_left) 6011: _M_nodes = _M_nodes->_M_left; 6011: } 6011: } 6011: else 6011: _M_nodes->_M_left = 0; 6011: } 6011: else 6011: _M_root = 0; 6011: 6011: return __node; 6011: } 6011: 6011: _Base_ptr _M_root; 6011: _Base_ptr _M_nodes; 6011: _Rb_tree& _M_t; 6011: }; 6011: 6011: 6011: 6011: struct _Alloc_node 6011: { 6011: _Alloc_node(_Rb_tree& __t) 6011: : _M_t(__t) { } 6011: 6011: template 6011: _Link_type 6011: 6011: 6011: 6011: operator()(_Arg&& __arg) const 6011: 6011: { return _M_t._M_create_node(std::forward<_Arg>(__arg)); } 6011: 6011: private: 6011: _Rb_tree& _M_t; 6011: }; 6011: 6011: public: 6011: typedef _Key key_type; 6011: typedef _Val value_type; 6011: typedef value_type* pointer; 6011: typedef const value_type* const_pointer; 6011: typedef value_type& reference; 6011: typedef const value_type& const_reference; 6011: typedef size_t size_type; 6011: typedef ptrdiff_t difference_type; 6011: typedef _Alloc allocator_type; 6011: 6011: _Node_allocator& 6011: _M_get_Node_allocator() noexcept 6011: { return this->_M_impl; } 6011: 6011: const _Node_allocator& 6011: _M_get_Node_allocator() const noexcept 6011: { return this->_M_impl; } 6011: 6011: allocator_type 6011: get_allocator() const noexcept 6011: { return allocator_type(_M_get_Node_allocator()); } 6011: 6011: protected: 6011: _Link_type 6011: _M_get_node() 6011: { return _Alloc_traits::allocate(_M_get_Node_allocator(), 1); } 6011: 6011: void 6011: _M_put_node(_Link_type __p) noexcept 6011: { _Alloc_traits::deallocate(_M_get_Node_allocator(), __p, 1); } 6011: # 630 "/usr/include/c++/8/bits/stl_tree.h" 3 6011: template 6011: void 6011: _M_construct_node(_Link_type __node, _Args&&... __args) 6011: { 6011: try 6011: { 6011: ::new(__node) _Rb_tree_node<_Val>; 6011: _Alloc_traits::construct(_M_get_Node_allocator(), 6011: __node->_M_valptr(), 6011: std::forward<_Args>(__args)...); 6011: } 6011: catch(...) 6011: { 6011: __node->~_Rb_tree_node<_Val>(); 6011: _M_put_node(__node); 6011: throw; 6011: } 6011: } 6011: 6011: template 6011: _Link_type 6011: _M_create_node(_Args&&... __args) 6011: { 6011: _Link_type __tmp = _M_get_node(); 6011: _M_construct_node(__tmp, std::forward<_Args>(__args)...); 6011: return __tmp; 6011: } 6011: 6011: void 6011: _M_destroy_node(_Link_type __p) noexcept 6011: { 6011: _Alloc_traits::destroy(_M_get_Node_allocator(), __p->_M_valptr()); 6011: __p->~_Rb_tree_node<_Val>(); 6011: } 6011: 6011: 6011: void 6011: _M_drop_node(_Link_type __p) noexcept 6011: { 6011: _M_destroy_node(__p); 6011: _M_put_node(__p); 6011: } 6011: 6011: template 6011: _Link_type 6011: _M_clone_node(_Const_Link_type __x, _NodeGen& __node_gen) 6011: { 6011: _Link_type __tmp = __node_gen(*__x->_M_valptr()); 6011: __tmp->_M_color = __x->_M_color; 6011: __tmp->_M_left = 0; 6011: __tmp->_M_right = 0; 6011: return __tmp; 6011: } 6011: 6011: protected: 6011: 6011: 6011: 6011: 6011: template 6011: 6011: struct _Rb_tree_impl 6011: : public _Node_allocator 6011: , public _Rb_tree_key_compare<_Key_compare> 6011: , public _Rb_tree_header 6011: { 6011: typedef _Rb_tree_key_compare<_Key_compare> _Base_key_compare; 6011: 6011: _Rb_tree_impl() 6011: noexcept(is_nothrow_default_constructible<_Node_allocator>::value && is_nothrow_default_constructible<_Base_key_compare>::value) 6011: 6011: 6011: : _Node_allocator() 6011: { } 6011: 6011: _Rb_tree_impl(const _Rb_tree_impl& __x) 6011: : _Node_allocator(_Alloc_traits::_S_select_on_copy(__x)) 6011: , _Base_key_compare(__x._M_key_compare) 6011: { } 6011: 6011: 6011: 6011: 6011: 6011: 6011: _Rb_tree_impl(_Rb_tree_impl&&) = default; 6011: 6011: _Rb_tree_impl(const _Key_compare& __comp, _Node_allocator&& __a) 6011: : _Node_allocator(std::move(__a)), _Base_key_compare(__comp) 6011: { } 6011: 6011: }; 6011: 6011: _Rb_tree_impl<_Compare> _M_impl; 6011: 6011: protected: 6011: _Base_ptr& 6011: _M_root() noexcept 6011: { return this->_M_impl._M_header._M_parent; } 6011: 6011: _Const_Base_ptr 6011: _M_root() const noexcept 6011: { return this->_M_impl._M_header._M_parent; } 6011: 6011: _Base_ptr& 6011: _M_leftmost() noexcept 6011: { return this->_M_impl._M_header._M_left; } 6011: 6011: _Const_Base_ptr 6011: _M_leftmost() const noexcept 6011: { return this->_M_impl._M_header._M_left; } 6011: 6011: _Base_ptr& 6011: _M_rightmost() noexcept 6011: { return this->_M_impl._M_header._M_right; } 6011: 6011: _Const_Base_ptr 6011: _M_rightmost() const noexcept 6011: { return this->_M_impl._M_header._M_right; } 6011: 6011: _Link_type 6011: _M_begin() noexcept 6011: { return static_cast<_Link_type>(this->_M_impl._M_header._M_parent); } 6011: 6011: _Const_Link_type 6011: _M_begin() const noexcept 6011: { 6011: return static_cast<_Const_Link_type> 6011: (this->_M_impl._M_header._M_parent); 6011: } 6011: 6011: _Base_ptr 6011: _M_end() noexcept 6011: { return &this->_M_impl._M_header; } 6011: 6011: _Const_Base_ptr 6011: _M_end() const noexcept 6011: { return &this->_M_impl._M_header; } 6011: 6011: static const_reference 6011: _S_value(_Const_Link_type __x) 6011: { return *__x->_M_valptr(); } 6011: 6011: static const _Key& 6011: _S_key(_Const_Link_type __x) 6011: { return _KeyOfValue()(_S_value(__x)); } 6011: 6011: static _Link_type 6011: _S_left(_Base_ptr __x) noexcept 6011: { return static_cast<_Link_type>(__x->_M_left); } 6011: 6011: static _Const_Link_type 6011: _S_left(_Const_Base_ptr __x) noexcept 6011: { return static_cast<_Const_Link_type>(__x->_M_left); } 6011: 6011: static _Link_type 6011: _S_right(_Base_ptr __x) noexcept 6011: { return static_cast<_Link_type>(__x->_M_right); } 6011: 6011: static _Const_Link_type 6011: _S_right(_Const_Base_ptr __x) noexcept 6011: { return static_cast<_Const_Link_type>(__x->_M_right); } 6011: 6011: static const_reference 6011: _S_value(_Const_Base_ptr __x) 6011: { return *static_cast<_Const_Link_type>(__x)->_M_valptr(); } 6011: 6011: static const _Key& 6011: _S_key(_Const_Base_ptr __x) 6011: { return _KeyOfValue()(_S_value(__x)); } 6011: 6011: static _Base_ptr 6011: _S_minimum(_Base_ptr __x) noexcept 6011: { return _Rb_tree_node_base::_S_minimum(__x); } 6011: 6011: static _Const_Base_ptr 6011: _S_minimum(_Const_Base_ptr __x) noexcept 6011: { return _Rb_tree_node_base::_S_minimum(__x); } 6011: 6011: static _Base_ptr 6011: _S_maximum(_Base_ptr __x) noexcept 6011: { return _Rb_tree_node_base::_S_maximum(__x); } 6011: 6011: static _Const_Base_ptr 6011: _S_maximum(_Const_Base_ptr __x) noexcept 6011: { return _Rb_tree_node_base::_S_maximum(__x); } 6011: 6011: public: 6011: typedef _Rb_tree_iterator iterator; 6011: typedef _Rb_tree_const_iterator const_iterator; 6011: 6011: typedef std::reverse_iterator reverse_iterator; 6011: typedef std::reverse_iterator const_reverse_iterator; 6011: # 832 "/usr/include/c++/8/bits/stl_tree.h" 3 6011: pair<_Base_ptr, _Base_ptr> 6011: _M_get_insert_unique_pos(const key_type& __k); 6011: 6011: pair<_Base_ptr, _Base_ptr> 6011: _M_get_insert_equal_pos(const key_type& __k); 6011: 6011: pair<_Base_ptr, _Base_ptr> 6011: _M_get_insert_hint_unique_pos(const_iterator __pos, 6011: const key_type& __k); 6011: 6011: pair<_Base_ptr, _Base_ptr> 6011: _M_get_insert_hint_equal_pos(const_iterator __pos, 6011: const key_type& __k); 6011: 6011: private: 6011: 6011: template 6011: iterator 6011: _M_insert_(_Base_ptr __x, _Base_ptr __y, _Arg&& __v, _NodeGen&); 6011: 6011: iterator 6011: _M_insert_node(_Base_ptr __x, _Base_ptr __y, _Link_type __z); 6011: 6011: template 6011: iterator 6011: _M_insert_lower(_Base_ptr __y, _Arg&& __v); 6011: 6011: template 6011: iterator 6011: _M_insert_equal_lower(_Arg&& __x); 6011: 6011: iterator 6011: _M_insert_lower_node(_Base_ptr __p, _Link_type __z); 6011: 6011: iterator 6011: _M_insert_equal_lower_node(_Link_type __z); 6011: # 883 "/usr/include/c++/8/bits/stl_tree.h" 3 6011: template 6011: _Link_type 6011: _M_copy(_Const_Link_type __x, _Base_ptr __p, _NodeGen&); 6011: 6011: template 6011: _Link_type 6011: _M_copy(const _Rb_tree& __x, _NodeGen& __gen) 6011: { 6011: _Link_type __root = _M_copy(__x._M_begin(), _M_end(), __gen); 6011: _M_leftmost() = _S_minimum(__root); 6011: _M_rightmost() = _S_maximum(__root); 6011: _M_impl._M_node_count = __x._M_impl._M_node_count; 6011: return __root; 6011: } 6011: 6011: _Link_type 6011: _M_copy(const _Rb_tree& __x) 6011: { 6011: _Alloc_node __an(*this); 6011: return _M_copy(__x, __an); 6011: } 6011: 6011: void 6011: _M_erase(_Link_type __x); 6011: 6011: iterator 6011: _M_lower_bound(_Link_type __x, _Base_ptr __y, 6011: const _Key& __k); 6011: 6011: const_iterator 6011: _M_lower_bound(_Const_Link_type __x, _Const_Base_ptr __y, 6011: const _Key& __k) const; 6011: 6011: iterator 6011: _M_upper_bound(_Link_type __x, _Base_ptr __y, 6011: const _Key& __k); 6011: 6011: const_iterator 6011: _M_upper_bound(_Const_Link_type __x, _Const_Base_ptr __y, 6011: const _Key& __k) const; 6011: 6011: public: 6011: 6011: 6011: 6011: 6011: _Rb_tree() = default; 6011: 6011: 6011: _Rb_tree(const _Compare& __comp, 6011: const allocator_type& __a = allocator_type()) 6011: : _M_impl(__comp, _Node_allocator(__a)) { } 6011: 6011: _Rb_tree(const _Rb_tree& __x) 6011: : _M_impl(__x._M_impl) 6011: { 6011: if (__x._M_root() != 0) 6011: _M_root() = _M_copy(__x); 6011: } 6011: 6011: 6011: _Rb_tree(const allocator_type& __a) 6011: : _M_impl(_Compare(), _Node_allocator(__a)) 6011: { } 6011: 6011: _Rb_tree(const _Rb_tree& __x, const allocator_type& __a) 6011: : _M_impl(__x._M_impl._M_key_compare, _Node_allocator(__a)) 6011: { 6011: if (__x._M_root() != nullptr) 6011: _M_root() = _M_copy(__x); 6011: } 6011: 6011: _Rb_tree(_Rb_tree&&) = default; 6011: 6011: _Rb_tree(_Rb_tree&& __x, const allocator_type& __a) 6011: : _Rb_tree(std::move(__x), _Node_allocator(__a)) 6011: { } 6011: 6011: _Rb_tree(_Rb_tree&& __x, _Node_allocator&& __a); 6011: 6011: 6011: ~_Rb_tree() noexcept 6011: { _M_erase(_M_begin()); } 6011: 6011: _Rb_tree& 6011: operator=(const _Rb_tree& __x); 6011: 6011: 6011: _Compare 6011: key_comp() const 6011: { return _M_impl._M_key_compare; } 6011: 6011: iterator 6011: begin() noexcept 6011: { return iterator(this->_M_impl._M_header._M_left); } 6011: 6011: const_iterator 6011: begin() const noexcept 6011: { return const_iterator(this->_M_impl._M_header._M_left); } 6011: 6011: iterator 6011: end() noexcept 6011: { return iterator(&this->_M_impl._M_header); } 6011: 6011: const_iterator 6011: end() const noexcept 6011: { return const_iterator(&this->_M_impl._M_header); } 6011: 6011: reverse_iterator 6011: rbegin() noexcept 6011: { return reverse_iterator(end()); } 6011: 6011: const_reverse_iterator 6011: rbegin() const noexcept 6011: { return const_reverse_iterator(end()); } 6011: 6011: reverse_iterator 6011: rend() noexcept 6011: { return reverse_iterator(begin()); } 6011: 6011: const_reverse_iterator 6011: rend() const noexcept 6011: { return const_reverse_iterator(begin()); } 6011: 6011: bool 6011: empty() const noexcept 6011: { return _M_impl._M_node_count == 0; } 6011: 6011: size_type 6011: size() const noexcept 6011: { return _M_impl._M_node_count; } 6011: 6011: size_type 6011: max_size() const noexcept 6011: { return _Alloc_traits::max_size(_M_get_Node_allocator()); } 6011: 6011: void 6011: swap(_Rb_tree& __t) 6011: noexcept(__is_nothrow_swappable<_Compare>::value); 6011: 6011: 6011: 6011: template 6011: pair 6011: _M_insert_unique(_Arg&& __x); 6011: 6011: template 6011: iterator 6011: _M_insert_equal(_Arg&& __x); 6011: 6011: template 6011: iterator 6011: _M_insert_unique_(const_iterator __pos, _Arg&& __x, _NodeGen&); 6011: 6011: template 6011: iterator 6011: _M_insert_unique_(const_iterator __pos, _Arg&& __x) 6011: { 6011: _Alloc_node __an(*this); 6011: return _M_insert_unique_(__pos, std::forward<_Arg>(__x), __an); 6011: } 6011: 6011: template 6011: iterator 6011: _M_insert_equal_(const_iterator __pos, _Arg&& __x, _NodeGen&); 6011: 6011: template 6011: iterator 6011: _M_insert_equal_(const_iterator __pos, _Arg&& __x) 6011: { 6011: _Alloc_node __an(*this); 6011: return _M_insert_equal_(__pos, std::forward<_Arg>(__x), __an); 6011: } 6011: 6011: template 6011: pair 6011: _M_emplace_unique(_Args&&... __args); 6011: 6011: template 6011: iterator 6011: _M_emplace_equal(_Args&&... __args); 6011: 6011: template 6011: iterator 6011: _M_emplace_hint_unique(const_iterator __pos, _Args&&... __args); 6011: 6011: template 6011: iterator 6011: _M_emplace_hint_equal(const_iterator __pos, _Args&&... __args); 6011: # 1103 "/usr/include/c++/8/bits/stl_tree.h" 3 6011: template 6011: void 6011: _M_insert_unique(_InputIterator __first, _InputIterator __last); 6011: 6011: template 6011: void 6011: _M_insert_equal(_InputIterator __first, _InputIterator __last); 6011: 6011: private: 6011: void 6011: _M_erase_aux(const_iterator __position); 6011: 6011: void 6011: _M_erase_aux(const_iterator __first, const_iterator __last); 6011: 6011: public: 6011: 6011: 6011: 6011: __attribute ((__abi_tag__ ("cxx11"))) 6011: iterator 6011: erase(const_iterator __position) 6011: { 6011: ; 6011: const_iterator __result = __position; 6011: ++__result; 6011: _M_erase_aux(__position); 6011: return __result._M_const_cast(); 6011: } 6011: 6011: 6011: __attribute ((__abi_tag__ ("cxx11"))) 6011: iterator 6011: erase(iterator __position) 6011: { 6011: ; 6011: iterator __result = __position; 6011: ++__result; 6011: _M_erase_aux(__position); 6011: return __result; 6011: } 6011: # 1159 "/usr/include/c++/8/bits/stl_tree.h" 3 6011: size_type 6011: erase(const key_type& __x); 6011: 6011: 6011: 6011: 6011: __attribute ((__abi_tag__ ("cxx11"))) 6011: iterator 6011: erase(const_iterator __first, const_iterator __last) 6011: { 6011: _M_erase_aux(__first, __last); 6011: return __last._M_const_cast(); 6011: } 6011: # 1181 "/usr/include/c++/8/bits/stl_tree.h" 3 6011: void 6011: erase(const key_type* __first, const key_type* __last); 6011: 6011: void 6011: clear() noexcept 6011: { 6011: _M_erase(_M_begin()); 6011: _M_impl._M_reset(); 6011: } 6011: 6011: 6011: iterator 6011: find(const key_type& __k); 6011: 6011: const_iterator 6011: find(const key_type& __k) const; 6011: 6011: size_type 6011: count(const key_type& __k) const; 6011: 6011: iterator 6011: lower_bound(const key_type& __k) 6011: { return _M_lower_bound(_M_begin(), _M_end(), __k); } 6011: 6011: const_iterator 6011: lower_bound(const key_type& __k) const 6011: { return _M_lower_bound(_M_begin(), _M_end(), __k); } 6011: 6011: iterator 6011: upper_bound(const key_type& __k) 6011: { return _M_upper_bound(_M_begin(), _M_end(), __k); } 6011: 6011: const_iterator 6011: upper_bound(const key_type& __k) const 6011: { return _M_upper_bound(_M_begin(), _M_end(), __k); } 6011: 6011: pair 6011: equal_range(const key_type& __k); 6011: 6011: pair 6011: equal_range(const key_type& __k) const; 6011: # 1341 "/usr/include/c++/8/bits/stl_tree.h" 3 6011: bool 6011: __rb_verify() const; 6011: 6011: 6011: _Rb_tree& 6011: operator=(_Rb_tree&&) 6011: noexcept(_Alloc_traits::_S_nothrow_move() 6011: && is_nothrow_move_assignable<_Compare>::value); 6011: 6011: template 6011: void 6011: _M_assign_unique(_Iterator, _Iterator); 6011: 6011: template 6011: void 6011: _M_assign_equal(_Iterator, _Iterator); 6011: 6011: private: 6011: 6011: void 6011: _M_move_data(_Rb_tree& __x, std::true_type) 6011: { _M_impl._M_move_data(__x._M_impl); } 6011: 6011: 6011: 6011: void 6011: _M_move_data(_Rb_tree&, std::false_type); 6011: 6011: 6011: void 6011: _M_move_assign(_Rb_tree&, std::true_type); 6011: 6011: 6011: 6011: void 6011: _M_move_assign(_Rb_tree&, std::false_type); 6011: # 1544 "/usr/include/c++/8/bits/stl_tree.h" 3 6011: }; 6011: 6011: template 6011: inline bool 6011: operator==(const _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __x, 6011: const _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __y) 6011: { 6011: return __x.size() == __y.size() 6011: && std::equal(__x.begin(), __x.end(), __y.begin()); 6011: } 6011: 6011: template 6011: inline bool 6011: operator<(const _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __x, 6011: const _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __y) 6011: { 6011: return std::lexicographical_compare(__x.begin(), __x.end(), 6011: __y.begin(), __y.end()); 6011: } 6011: 6011: template 6011: inline bool 6011: operator!=(const _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __x, 6011: const _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __y) 6011: { return !(__x == __y); } 6011: 6011: template 6011: inline bool 6011: operator>(const _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __x, 6011: const _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __y) 6011: { return __y < __x; } 6011: 6011: template 6011: inline bool 6011: operator<=(const _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __x, 6011: const _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __y) 6011: { return !(__y < __x); } 6011: 6011: template 6011: inline bool 6011: operator>=(const _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __x, 6011: const _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __y) 6011: { return !(__x < __y); } 6011: 6011: template 6011: inline void 6011: swap(_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __x, 6011: _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __y) 6011: { __x.swap(__y); } 6011: 6011: 6011: template 6011: _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: 6011: _Rb_tree(_Rb_tree&& __x, _Node_allocator&& __a) 6011: : _M_impl(__x._M_impl._M_key_compare, std::move(__a)) 6011: { 6011: using __eq = typename _Alloc_traits::is_always_equal; 6011: if (__x._M_root() != nullptr) 6011: _M_move_data(__x, __eq()); 6011: } 6011: 6011: template 6011: void 6011: _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: 6011: _M_move_data(_Rb_tree& __x, std::false_type) 6011: { 6011: if (_M_get_Node_allocator() == __x._M_get_Node_allocator()) 6011: _M_move_data(__x, std::true_type()); 6011: else 6011: { 6011: _Alloc_node __an(*this); 6011: auto __lbd = 6011: [&__an](const value_type& __cval) 6011: { 6011: auto& __val = const_cast(__cval); 6011: return __an(std::move_if_noexcept(__val)); 6011: }; 6011: _M_root() = _M_copy(__x, __lbd); 6011: } 6011: } 6011: 6011: template 6011: inline void 6011: _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: 6011: _M_move_assign(_Rb_tree& __x, true_type) 6011: { 6011: clear(); 6011: if (__x._M_root() != nullptr) 6011: _M_move_data(__x, std::true_type()); 6011: std::__alloc_on_move(_M_get_Node_allocator(), 6011: __x._M_get_Node_allocator()); 6011: } 6011: 6011: template 6011: void 6011: _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: 6011: _M_move_assign(_Rb_tree& __x, false_type) 6011: { 6011: if (_M_get_Node_allocator() == __x._M_get_Node_allocator()) 6011: return _M_move_assign(__x, true_type{}); 6011: 6011: 6011: 6011: _Reuse_or_alloc_node __roan(*this); 6011: _M_impl._M_reset(); 6011: if (__x._M_root() != nullptr) 6011: { 6011: auto __lbd = 6011: [&__roan](const value_type& __cval) 6011: { 6011: auto& __val = const_cast(__cval); 6011: return __roan(std::move_if_noexcept(__val)); 6011: }; 6011: _M_root() = _M_copy(__x, __lbd); 6011: __x.clear(); 6011: } 6011: } 6011: 6011: template 6011: inline _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& 6011: _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: 6011: operator=(_Rb_tree&& __x) 6011: noexcept(_Alloc_traits::_S_nothrow_move() 6011: && is_nothrow_move_assignable<_Compare>::value) 6011: { 6011: _M_impl._M_key_compare = std::move(__x._M_impl._M_key_compare); 6011: _M_move_assign(__x, __bool_constant<_Alloc_traits::_S_nothrow_move()>()); 6011: return *this; 6011: } 6011: 6011: template 6011: template 6011: void 6011: _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: 6011: _M_assign_unique(_Iterator __first, _Iterator __last) 6011: { 6011: _Reuse_or_alloc_node __roan(*this); 6011: _M_impl._M_reset(); 6011: for (; __first != __last; ++__first) 6011: _M_insert_unique_(end(), *__first, __roan); 6011: } 6011: 6011: template 6011: template 6011: void 6011: _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: 6011: _M_assign_equal(_Iterator __first, _Iterator __last) 6011: { 6011: _Reuse_or_alloc_node __roan(*this); 6011: _M_impl._M_reset(); 6011: for (; __first != __last; ++__first) 6011: _M_insert_equal_(end(), *__first, __roan); 6011: } 6011: 6011: 6011: template 6011: _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& 6011: _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: 6011: operator=(const _Rb_tree& __x) 6011: { 6011: if (this != &__x) 6011: { 6011: 6011: 6011: if (_Alloc_traits::_S_propagate_on_copy_assign()) 6011: { 6011: auto& __this_alloc = this->_M_get_Node_allocator(); 6011: auto& __that_alloc = __x._M_get_Node_allocator(); 6011: if (!_Alloc_traits::_S_always_equal() 6011: && __this_alloc != __that_alloc) 6011: { 6011: 6011: 6011: clear(); 6011: std::__alloc_on_copy(__this_alloc, __that_alloc); 6011: } 6011: } 6011: 6011: 6011: _Reuse_or_alloc_node __roan(*this); 6011: _M_impl._M_reset(); 6011: _M_impl._M_key_compare = __x._M_impl._M_key_compare; 6011: if (__x._M_root() != 0) 6011: _M_root() = _M_copy(__x, __roan); 6011: } 6011: 6011: return *this; 6011: } 6011: 6011: template 6011: 6011: template 6011: 6011: 6011: 6011: typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator 6011: _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: 6011: _M_insert_(_Base_ptr __x, _Base_ptr __p, 6011: 6011: _Arg&& __v, 6011: 6011: 6011: 6011: _NodeGen& __node_gen) 6011: { 6011: bool __insert_left = (__x != 0 || __p == _M_end() 6011: || _M_impl._M_key_compare(_KeyOfValue()(__v), 6011: _S_key(__p))); 6011: 6011: _Link_type __z = __node_gen(std::forward<_Arg>(__v)); 6011: 6011: _Rb_tree_insert_and_rebalance(__insert_left, __z, __p, 6011: this->_M_impl._M_header); 6011: ++_M_impl._M_node_count; 6011: return iterator(__z); 6011: } 6011: 6011: template 6011: 6011: template 6011: 6011: typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator 6011: _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: 6011: 6011: _M_insert_lower(_Base_ptr __p, _Arg&& __v) 6011: 6011: 6011: 6011: { 6011: bool __insert_left = (__p == _M_end() 6011: || !_M_impl._M_key_compare(_S_key(__p), 6011: _KeyOfValue()(__v))); 6011: 6011: _Link_type __z = _M_create_node(std::forward<_Arg>(__v)); 6011: 6011: _Rb_tree_insert_and_rebalance(__insert_left, __z, __p, 6011: this->_M_impl._M_header); 6011: ++_M_impl._M_node_count; 6011: return iterator(__z); 6011: } 6011: 6011: template 6011: 6011: template 6011: 6011: typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator 6011: _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: 6011: 6011: _M_insert_equal_lower(_Arg&& __v) 6011: 6011: 6011: 6011: { 6011: _Link_type __x = _M_begin(); 6011: _Base_ptr __y = _M_end(); 6011: while (__x != 0) 6011: { 6011: __y = __x; 6011: __x = !_M_impl._M_key_compare(_S_key(__x), _KeyOfValue()(__v)) ? 6011: _S_left(__x) : _S_right(__x); 6011: } 6011: return _M_insert_lower(__y, std::forward<_Arg>(__v)); 6011: } 6011: 6011: template 6011: template 6011: typename _Rb_tree<_Key, _Val, _KoV, _Compare, _Alloc>::_Link_type 6011: _Rb_tree<_Key, _Val, _KoV, _Compare, _Alloc>:: 6011: _M_copy(_Const_Link_type __x, _Base_ptr __p, _NodeGen& __node_gen) 6011: { 6011: 6011: _Link_type __top = _M_clone_node(__x, __node_gen); 6011: __top->_M_parent = __p; 6011: 6011: try 6011: { 6011: if (__x->_M_right) 6011: __top->_M_right = _M_copy(_S_right(__x), __top, __node_gen); 6011: __p = __top; 6011: __x = _S_left(__x); 6011: 6011: while (__x != 0) 6011: { 6011: _Link_type __y = _M_clone_node(__x, __node_gen); 6011: __p->_M_left = __y; 6011: __y->_M_parent = __p; 6011: if (__x->_M_right) 6011: __y->_M_right = _M_copy(_S_right(__x), __y, __node_gen); 6011: __p = __y; 6011: __x = _S_left(__x); 6011: } 6011: } 6011: catch(...) 6011: { 6011: _M_erase(__top); 6011: throw; 6011: } 6011: return __top; 6011: } 6011: 6011: template 6011: void 6011: _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: 6011: _M_erase(_Link_type __x) 6011: { 6011: 6011: while (__x != 0) 6011: { 6011: _M_erase(_S_right(__x)); 6011: _Link_type __y = _S_left(__x); 6011: _M_drop_node(__x); 6011: __x = __y; 6011: } 6011: } 6011: 6011: template 6011: typename _Rb_tree<_Key, _Val, _KeyOfValue, 6011: _Compare, _Alloc>::iterator 6011: _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: 6011: _M_lower_bound(_Link_type __x, _Base_ptr __y, 6011: const _Key& __k) 6011: { 6011: while (__x != 0) 6011: if (!_M_impl._M_key_compare(_S_key(__x), __k)) 6011: __y = __x, __x = _S_left(__x); 6011: else 6011: __x = _S_right(__x); 6011: return iterator(__y); 6011: } 6011: 6011: template 6011: typename _Rb_tree<_Key, _Val, _KeyOfValue, 6011: _Compare, _Alloc>::const_iterator 6011: _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: 6011: _M_lower_bound(_Const_Link_type __x, _Const_Base_ptr __y, 6011: const _Key& __k) const 6011: { 6011: while (__x != 0) 6011: if (!_M_impl._M_key_compare(_S_key(__x), __k)) 6011: __y = __x, __x = _S_left(__x); 6011: else 6011: __x = _S_right(__x); 6011: return const_iterator(__y); 6011: } 6011: 6011: template 6011: typename _Rb_tree<_Key, _Val, _KeyOfValue, 6011: _Compare, _Alloc>::iterator 6011: _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: 6011: _M_upper_bound(_Link_type __x, _Base_ptr __y, 6011: const _Key& __k) 6011: { 6011: while (__x != 0) 6011: if (_M_impl._M_key_compare(__k, _S_key(__x))) 6011: __y = __x, __x = _S_left(__x); 6011: else 6011: __x = _S_right(__x); 6011: return iterator(__y); 6011: } 6011: 6011: template 6011: typename _Rb_tree<_Key, _Val, _KeyOfValue, 6011: _Compare, _Alloc>::const_iterator 6011: _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: 6011: _M_upper_bound(_Const_Link_type __x, _Const_Base_ptr __y, 6011: const _Key& __k) const 6011: { 6011: while (__x != 0) 6011: if (_M_impl._M_key_compare(__k, _S_key(__x))) 6011: __y = __x, __x = _S_left(__x); 6011: else 6011: __x = _S_right(__x); 6011: return const_iterator(__y); 6011: } 6011: 6011: template 6011: pair::iterator, 6011: typename _Rb_tree<_Key, _Val, _KeyOfValue, 6011: _Compare, _Alloc>::iterator> 6011: _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: 6011: equal_range(const _Key& __k) 6011: { 6011: _Link_type __x = _M_begin(); 6011: _Base_ptr __y = _M_end(); 6011: while (__x != 0) 6011: { 6011: if (_M_impl._M_key_compare(_S_key(__x), __k)) 6011: __x = _S_right(__x); 6011: else if (_M_impl._M_key_compare(__k, _S_key(__x))) 6011: __y = __x, __x = _S_left(__x); 6011: else 6011: { 6011: _Link_type __xu(__x); 6011: _Base_ptr __yu(__y); 6011: __y = __x, __x = _S_left(__x); 6011: __xu = _S_right(__xu); 6011: return pair(_M_lower_bound(__x, __y, __k), 6011: _M_upper_bound(__xu, __yu, __k)); 6011: } 6011: } 6011: return pair(iterator(__y), 6011: iterator(__y)); 6011: } 6011: 6011: template 6011: pair::const_iterator, 6011: typename _Rb_tree<_Key, _Val, _KeyOfValue, 6011: _Compare, _Alloc>::const_iterator> 6011: _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: 6011: equal_range(const _Key& __k) const 6011: { 6011: _Const_Link_type __x = _M_begin(); 6011: _Const_Base_ptr __y = _M_end(); 6011: while (__x != 0) 6011: { 6011: if (_M_impl._M_key_compare(_S_key(__x), __k)) 6011: __x = _S_right(__x); 6011: else if (_M_impl._M_key_compare(__k, _S_key(__x))) 6011: __y = __x, __x = _S_left(__x); 6011: else 6011: { 6011: _Const_Link_type __xu(__x); 6011: _Const_Base_ptr __yu(__y); 6011: __y = __x, __x = _S_left(__x); 6011: __xu = _S_right(__xu); 6011: return pair(_M_lower_bound(__x, __y, __k), 6011: _M_upper_bound(__xu, __yu, __k)); 6011: } 6011: } 6011: return pair(const_iterator(__y), 6011: const_iterator(__y)); 6011: } 6011: 6011: template 6011: void 6011: _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: 6011: swap(_Rb_tree& __t) 6011: noexcept(__is_nothrow_swappable<_Compare>::value) 6011: { 6011: if (_M_root() == 0) 6011: { 6011: if (__t._M_root() != 0) 6011: _M_impl._M_move_data(__t._M_impl); 6011: } 6011: else if (__t._M_root() == 0) 6011: __t._M_impl._M_move_data(_M_impl); 6011: else 6011: { 6011: std::swap(_M_root(),__t._M_root()); 6011: std::swap(_M_leftmost(),__t._M_leftmost()); 6011: std::swap(_M_rightmost(),__t._M_rightmost()); 6011: 6011: _M_root()->_M_parent = _M_end(); 6011: __t._M_root()->_M_parent = __t._M_end(); 6011: std::swap(this->_M_impl._M_node_count, __t._M_impl._M_node_count); 6011: } 6011: 6011: std::swap(this->_M_impl._M_key_compare, __t._M_impl._M_key_compare); 6011: 6011: _Alloc_traits::_S_on_swap(_M_get_Node_allocator(), 6011: __t._M_get_Node_allocator()); 6011: } 6011: 6011: template 6011: pair::_Base_ptr, 6011: typename _Rb_tree<_Key, _Val, _KeyOfValue, 6011: _Compare, _Alloc>::_Base_ptr> 6011: _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: 6011: _M_get_insert_unique_pos(const key_type& __k) 6011: { 6011: typedef pair<_Base_ptr, _Base_ptr> _Res; 6011: _Link_type __x = _M_begin(); 6011: _Base_ptr __y = _M_end(); 6011: bool __comp = true; 6011: while (__x != 0) 6011: { 6011: __y = __x; 6011: __comp = _M_impl._M_key_compare(__k, _S_key(__x)); 6011: __x = __comp ? _S_left(__x) : _S_right(__x); 6011: } 6011: iterator __j = iterator(__y); 6011: if (__comp) 6011: { 6011: if (__j == begin()) 6011: return _Res(__x, __y); 6011: else 6011: --__j; 6011: } 6011: if (_M_impl._M_key_compare(_S_key(__j._M_node), __k)) 6011: return _Res(__x, __y); 6011: return _Res(__j._M_node, 0); 6011: } 6011: 6011: template 6011: pair::_Base_ptr, 6011: typename _Rb_tree<_Key, _Val, _KeyOfValue, 6011: _Compare, _Alloc>::_Base_ptr> 6011: _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: 6011: _M_get_insert_equal_pos(const key_type& __k) 6011: { 6011: typedef pair<_Base_ptr, _Base_ptr> _Res; 6011: _Link_type __x = _M_begin(); 6011: _Base_ptr __y = _M_end(); 6011: while (__x != 0) 6011: { 6011: __y = __x; 6011: __x = _M_impl._M_key_compare(__k, _S_key(__x)) ? 6011: _S_left(__x) : _S_right(__x); 6011: } 6011: return _Res(__x, __y); 6011: } 6011: 6011: template 6011: 6011: template 6011: 6011: pair::iterator, bool> 6011: _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: 6011: 6011: _M_insert_unique(_Arg&& __v) 6011: 6011: 6011: 6011: { 6011: typedef pair _Res; 6011: pair<_Base_ptr, _Base_ptr> __res 6011: = _M_get_insert_unique_pos(_KeyOfValue()(__v)); 6011: 6011: if (__res.second) 6011: { 6011: _Alloc_node __an(*this); 6011: return _Res(_M_insert_(__res.first, __res.second, 6011: std::forward<_Arg>(__v), __an), 6011: true); 6011: } 6011: 6011: return _Res(iterator(__res.first), false); 6011: } 6011: 6011: template 6011: 6011: template 6011: 6011: typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator 6011: _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: 6011: 6011: _M_insert_equal(_Arg&& __v) 6011: 6011: 6011: 6011: { 6011: pair<_Base_ptr, _Base_ptr> __res 6011: = _M_get_insert_equal_pos(_KeyOfValue()(__v)); 6011: _Alloc_node __an(*this); 6011: return _M_insert_(__res.first, __res.second, 6011: std::forward<_Arg>(__v), __an); 6011: } 6011: 6011: template 6011: pair::_Base_ptr, 6011: typename _Rb_tree<_Key, _Val, _KeyOfValue, 6011: _Compare, _Alloc>::_Base_ptr> 6011: _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: 6011: _M_get_insert_hint_unique_pos(const_iterator __position, 6011: const key_type& __k) 6011: { 6011: iterator __pos = __position._M_const_cast(); 6011: typedef pair<_Base_ptr, _Base_ptr> _Res; 6011: 6011: 6011: if (__pos._M_node == _M_end()) 6011: { 6011: if (size() > 0 6011: && _M_impl._M_key_compare(_S_key(_M_rightmost()), __k)) 6011: return _Res(0, _M_rightmost()); 6011: else 6011: return _M_get_insert_unique_pos(__k); 6011: } 6011: else if (_M_impl._M_key_compare(__k, _S_key(__pos._M_node))) 6011: { 6011: 6011: iterator __before = __pos; 6011: if (__pos._M_node == _M_leftmost()) 6011: return _Res(_M_leftmost(), _M_leftmost()); 6011: else if (_M_impl._M_key_compare(_S_key((--__before)._M_node), __k)) 6011: { 6011: if (_S_right(__before._M_node) == 0) 6011: return _Res(0, __before._M_node); 6011: else 6011: return _Res(__pos._M_node, __pos._M_node); 6011: } 6011: else 6011: return _M_get_insert_unique_pos(__k); 6011: } 6011: else if (_M_impl._M_key_compare(_S_key(__pos._M_node), __k)) 6011: { 6011: 6011: iterator __after = __pos; 6011: if (__pos._M_node == _M_rightmost()) 6011: return _Res(0, _M_rightmost()); 6011: else if (_M_impl._M_key_compare(__k, _S_key((++__after)._M_node))) 6011: { 6011: if (_S_right(__pos._M_node) == 0) 6011: return _Res(0, __pos._M_node); 6011: else 6011: return _Res(__after._M_node, __after._M_node); 6011: } 6011: else 6011: return _M_get_insert_unique_pos(__k); 6011: } 6011: else 6011: 6011: return _Res(__pos._M_node, 0); 6011: } 6011: 6011: template 6011: 6011: template 6011: 6011: 6011: 6011: typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator 6011: _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: 6011: _M_insert_unique_(const_iterator __position, 6011: 6011: _Arg&& __v, 6011: 6011: 6011: 6011: _NodeGen& __node_gen) 6011: { 6011: pair<_Base_ptr, _Base_ptr> __res 6011: = _M_get_insert_hint_unique_pos(__position, _KeyOfValue()(__v)); 6011: 6011: if (__res.second) 6011: return _M_insert_(__res.first, __res.second, 6011: std::forward<_Arg>(__v), 6011: __node_gen); 6011: return iterator(__res.first); 6011: } 6011: 6011: template 6011: pair::_Base_ptr, 6011: typename _Rb_tree<_Key, _Val, _KeyOfValue, 6011: _Compare, _Alloc>::_Base_ptr> 6011: _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: 6011: _M_get_insert_hint_equal_pos(const_iterator __position, const key_type& __k) 6011: { 6011: iterator __pos = __position._M_const_cast(); 6011: typedef pair<_Base_ptr, _Base_ptr> _Res; 6011: 6011: 6011: if (__pos._M_node == _M_end()) 6011: { 6011: if (size() > 0 6011: && !_M_impl._M_key_compare(__k, _S_key(_M_rightmost()))) 6011: return _Res(0, _M_rightmost()); 6011: else 6011: return _M_get_insert_equal_pos(__k); 6011: } 6011: else if (!_M_impl._M_key_compare(_S_key(__pos._M_node), __k)) 6011: { 6011: 6011: iterator __before = __pos; 6011: if (__pos._M_node == _M_leftmost()) 6011: return _Res(_M_leftmost(), _M_leftmost()); 6011: else if (!_M_impl._M_key_compare(__k, _S_key((--__before)._M_node))) 6011: { 6011: if (_S_right(__before._M_node) == 0) 6011: return _Res(0, __before._M_node); 6011: else 6011: return _Res(__pos._M_node, __pos._M_node); 6011: } 6011: else 6011: return _M_get_insert_equal_pos(__k); 6011: } 6011: else 6011: { 6011: 6011: iterator __after = __pos; 6011: if (__pos._M_node == _M_rightmost()) 6011: return _Res(0, _M_rightmost()); 6011: else if (!_M_impl._M_key_compare(_S_key((++__after)._M_node), __k)) 6011: { 6011: if (_S_right(__pos._M_node) == 0) 6011: return _Res(0, __pos._M_node); 6011: else 6011: return _Res(__after._M_node, __after._M_node); 6011: } 6011: else 6011: return _Res(0, 0); 6011: } 6011: } 6011: 6011: template 6011: 6011: template 6011: 6011: 6011: 6011: typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator 6011: _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: 6011: _M_insert_equal_(const_iterator __position, 6011: 6011: _Arg&& __v, 6011: 6011: 6011: 6011: _NodeGen& __node_gen) 6011: { 6011: pair<_Base_ptr, _Base_ptr> __res 6011: = _M_get_insert_hint_equal_pos(__position, _KeyOfValue()(__v)); 6011: 6011: if (__res.second) 6011: return _M_insert_(__res.first, __res.second, 6011: std::forward<_Arg>(__v), 6011: __node_gen); 6011: 6011: return _M_insert_equal_lower(std::forward<_Arg>(__v)); 6011: } 6011: 6011: 6011: template 6011: typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator 6011: _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: 6011: _M_insert_node(_Base_ptr __x, _Base_ptr __p, _Link_type __z) 6011: { 6011: bool __insert_left = (__x != 0 || __p == _M_end() 6011: || _M_impl._M_key_compare(_S_key(__z), 6011: _S_key(__p))); 6011: 6011: _Rb_tree_insert_and_rebalance(__insert_left, __z, __p, 6011: this->_M_impl._M_header); 6011: ++_M_impl._M_node_count; 6011: return iterator(__z); 6011: } 6011: 6011: template 6011: typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator 6011: _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: 6011: _M_insert_lower_node(_Base_ptr __p, _Link_type __z) 6011: { 6011: bool __insert_left = (__p == _M_end() 6011: || !_M_impl._M_key_compare(_S_key(__p), 6011: _S_key(__z))); 6011: 6011: _Rb_tree_insert_and_rebalance(__insert_left, __z, __p, 6011: this->_M_impl._M_header); 6011: ++_M_impl._M_node_count; 6011: return iterator(__z); 6011: } 6011: 6011: template 6011: typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator 6011: _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: 6011: _M_insert_equal_lower_node(_Link_type __z) 6011: { 6011: _Link_type __x = _M_begin(); 6011: _Base_ptr __y = _M_end(); 6011: while (__x != 0) 6011: { 6011: __y = __x; 6011: __x = !_M_impl._M_key_compare(_S_key(__x), _S_key(__z)) ? 6011: _S_left(__x) : _S_right(__x); 6011: } 6011: return _M_insert_lower_node(__y, __z); 6011: } 6011: 6011: template 6011: template 6011: pair::iterator, bool> 6011: _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: 6011: _M_emplace_unique(_Args&&... __args) 6011: { 6011: _Link_type __z = _M_create_node(std::forward<_Args>(__args)...); 6011: 6011: try 6011: { 6011: typedef pair _Res; 6011: auto __res = _M_get_insert_unique_pos(_S_key(__z)); 6011: if (__res.second) 6011: return _Res(_M_insert_node(__res.first, __res.second, __z), true); 6011: 6011: _M_drop_node(__z); 6011: return _Res(iterator(__res.first), false); 6011: } 6011: catch(...) 6011: { 6011: _M_drop_node(__z); 6011: throw; 6011: } 6011: } 6011: 6011: template 6011: template 6011: typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator 6011: _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: 6011: _M_emplace_equal(_Args&&... __args) 6011: { 6011: _Link_type __z = _M_create_node(std::forward<_Args>(__args)...); 6011: 6011: try 6011: { 6011: auto __res = _M_get_insert_equal_pos(_S_key(__z)); 6011: return _M_insert_node(__res.first, __res.second, __z); 6011: } 6011: catch(...) 6011: { 6011: _M_drop_node(__z); 6011: throw; 6011: } 6011: } 6011: 6011: template 6011: template 6011: typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator 6011: _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: 6011: _M_emplace_hint_unique(const_iterator __pos, _Args&&... __args) 6011: { 6011: _Link_type __z = _M_create_node(std::forward<_Args>(__args)...); 6011: 6011: try 6011: { 6011: auto __res = _M_get_insert_hint_unique_pos(__pos, _S_key(__z)); 6011: 6011: if (__res.second) 6011: return _M_insert_node(__res.first, __res.second, __z); 6011: 6011: _M_drop_node(__z); 6011: return iterator(__res.first); 6011: } 6011: catch(...) 6011: { 6011: _M_drop_node(__z); 6011: throw; 6011: } 6011: } 6011: 6011: template 6011: template 6011: typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator 6011: _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: 6011: _M_emplace_hint_equal(const_iterator __pos, _Args&&... __args) 6011: { 6011: _Link_type __z = _M_create_node(std::forward<_Args>(__args)...); 6011: 6011: try 6011: { 6011: auto __res = _M_get_insert_hint_equal_pos(__pos, _S_key(__z)); 6011: 6011: if (__res.second) 6011: return _M_insert_node(__res.first, __res.second, __z); 6011: 6011: return _M_insert_equal_lower_node(__z); 6011: } 6011: catch(...) 6011: { 6011: _M_drop_node(__z); 6011: throw; 6011: } 6011: } 6011: 6011: 6011: template 6011: template 6011: void 6011: _Rb_tree<_Key, _Val, _KoV, _Cmp, _Alloc>:: 6011: _M_insert_unique(_II __first, _II __last) 6011: { 6011: _Alloc_node __an(*this); 6011: for (; __first != __last; ++__first) 6011: _M_insert_unique_(end(), *__first, __an); 6011: } 6011: 6011: template 6011: template 6011: void 6011: _Rb_tree<_Key, _Val, _KoV, _Cmp, _Alloc>:: 6011: _M_insert_equal(_II __first, _II __last) 6011: { 6011: _Alloc_node __an(*this); 6011: for (; __first != __last; ++__first) 6011: _M_insert_equal_(end(), *__first, __an); 6011: } 6011: 6011: template 6011: void 6011: _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: 6011: _M_erase_aux(const_iterator __position) 6011: { 6011: _Link_type __y = 6011: static_cast<_Link_type>(_Rb_tree_rebalance_for_erase 6011: (const_cast<_Base_ptr>(__position._M_node), 6011: this->_M_impl._M_header)); 6011: _M_drop_node(__y); 6011: --_M_impl._M_node_count; 6011: } 6011: 6011: template 6011: void 6011: _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: 6011: _M_erase_aux(const_iterator __first, const_iterator __last) 6011: { 6011: if (__first == begin() && __last == end()) 6011: clear(); 6011: else 6011: while (__first != __last) 6011: _M_erase_aux(__first++); 6011: } 6011: 6011: template 6011: typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::size_type 6011: _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: 6011: erase(const _Key& __x) 6011: { 6011: pair __p = equal_range(__x); 6011: const size_type __old_size = size(); 6011: _M_erase_aux(__p.first, __p.second); 6011: return __old_size - size(); 6011: } 6011: 6011: template 6011: void 6011: _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: 6011: erase(const _Key* __first, const _Key* __last) 6011: { 6011: while (__first != __last) 6011: erase(*__first++); 6011: } 6011: 6011: template 6011: typename _Rb_tree<_Key, _Val, _KeyOfValue, 6011: _Compare, _Alloc>::iterator 6011: _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: 6011: find(const _Key& __k) 6011: { 6011: iterator __j = _M_lower_bound(_M_begin(), _M_end(), __k); 6011: return (__j == end() 6011: || _M_impl._M_key_compare(__k, 6011: _S_key(__j._M_node))) ? end() : __j; 6011: } 6011: 6011: template 6011: typename _Rb_tree<_Key, _Val, _KeyOfValue, 6011: _Compare, _Alloc>::const_iterator 6011: _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: 6011: find(const _Key& __k) const 6011: { 6011: const_iterator __j = _M_lower_bound(_M_begin(), _M_end(), __k); 6011: return (__j == end() 6011: || _M_impl._M_key_compare(__k, 6011: _S_key(__j._M_node))) ? end() : __j; 6011: } 6011: 6011: template 6011: typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::size_type 6011: _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: 6011: count(const _Key& __k) const 6011: { 6011: pair __p = equal_range(__k); 6011: const size_type __n = std::distance(__p.first, __p.second); 6011: return __n; 6011: } 6011: 6011: __attribute__ ((__pure__)) unsigned int 6011: _Rb_tree_black_count(const _Rb_tree_node_base* __node, 6011: const _Rb_tree_node_base* __root) throw (); 6011: 6011: template 6011: bool 6011: _Rb_tree<_Key,_Val,_KeyOfValue,_Compare,_Alloc>::__rb_verify() const 6011: { 6011: if (_M_impl._M_node_count == 0 || begin() == end()) 6011: return _M_impl._M_node_count == 0 && begin() == end() 6011: && this->_M_impl._M_header._M_left == _M_end() 6011: && this->_M_impl._M_header._M_right == _M_end(); 6011: 6011: unsigned int __len = _Rb_tree_black_count(_M_leftmost(), _M_root()); 6011: for (const_iterator __it = begin(); __it != end(); ++__it) 6011: { 6011: _Const_Link_type __x = static_cast<_Const_Link_type>(__it._M_node); 6011: _Const_Link_type __L = _S_left(__x); 6011: _Const_Link_type __R = _S_right(__x); 6011: 6011: if (__x->_M_color == _S_red) 6011: if ((__L && __L->_M_color == _S_red) 6011: || (__R && __R->_M_color == _S_red)) 6011: return false; 6011: 6011: if (__L && _M_impl._M_key_compare(_S_key(__x), _S_key(__L))) 6011: return false; 6011: if (__R && _M_impl._M_key_compare(_S_key(__R), _S_key(__x))) 6011: return false; 6011: 6011: if (!__L && !__R && _Rb_tree_black_count(__x, _M_root()) != __len) 6011: return false; 6011: } 6011: 6011: if (_M_leftmost() != _Rb_tree_node_base::_S_minimum(_M_root())) 6011: return false; 6011: if (_M_rightmost() != _Rb_tree_node_base::_S_maximum(_M_root())) 6011: return false; 6011: return true; 6011: } 6011: # 2627 "/usr/include/c++/8/bits/stl_tree.h" 3 6011: 6011: } 6011: # 61 "/usr/include/c++/8/set" 2 3 6011: # 1 "/usr/include/c++/8/bits/stl_set.h" 1 3 6011: # 64 "/usr/include/c++/8/bits/stl_set.h" 3 6011: namespace std __attribute__ ((__visibility__ ("default"))) 6011: { 6011: 6011: 6011: 6011: template 6011: class multiset; 6011: # 92 "/usr/include/c++/8/bits/stl_set.h" 3 6011: template, 6011: typename _Alloc = std::allocator<_Key> > 6011: class set 6011: { 6011: # 108 "/usr/include/c++/8/bits/stl_set.h" 3 6011: static_assert(is_same::type, _Key>::value, 6011: "std::set must have a non-const, non-volatile value_type"); 6011: 6011: 6011: 6011: 6011: 6011: 6011: public: 6011: 6011: 6011: 6011: typedef _Key key_type; 6011: typedef _Key value_type; 6011: typedef _Compare key_compare; 6011: typedef _Compare value_compare; 6011: typedef _Alloc allocator_type; 6011: 6011: 6011: private: 6011: typedef typename __gnu_cxx::__alloc_traits<_Alloc>::template 6011: rebind<_Key>::other _Key_alloc_type; 6011: 6011: typedef _Rb_tree, 6011: key_compare, _Key_alloc_type> _Rep_type; 6011: _Rep_type _M_t; 6011: 6011: typedef __gnu_cxx::__alloc_traits<_Key_alloc_type> _Alloc_traits; 6011: 6011: public: 6011: 6011: 6011: typedef typename _Alloc_traits::pointer pointer; 6011: typedef typename _Alloc_traits::const_pointer const_pointer; 6011: typedef typename _Alloc_traits::reference reference; 6011: typedef typename _Alloc_traits::const_reference const_reference; 6011: 6011: 6011: 6011: typedef typename _Rep_type::const_iterator iterator; 6011: typedef typename _Rep_type::const_iterator const_iterator; 6011: typedef typename _Rep_type::const_reverse_iterator reverse_iterator; 6011: typedef typename _Rep_type::const_reverse_iterator const_reverse_iterator; 6011: typedef typename _Rep_type::size_type size_type; 6011: typedef typename _Rep_type::difference_type difference_type; 6011: # 167 "/usr/include/c++/8/bits/stl_set.h" 3 6011: set() = default; 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: explicit 6011: set(const _Compare& __comp, 6011: const allocator_type& __a = allocator_type()) 6011: : _M_t(__comp, _Key_alloc_type(__a)) { } 6011: # 190 "/usr/include/c++/8/bits/stl_set.h" 3 6011: template 6011: set(_InputIterator __first, _InputIterator __last) 6011: : _M_t() 6011: { _M_t._M_insert_unique(__first, __last); } 6011: # 207 "/usr/include/c++/8/bits/stl_set.h" 3 6011: template 6011: set(_InputIterator __first, _InputIterator __last, 6011: const _Compare& __comp, 6011: const allocator_type& __a = allocator_type()) 6011: : _M_t(__comp, _Key_alloc_type(__a)) 6011: { _M_t._M_insert_unique(__first, __last); } 6011: # 223 "/usr/include/c++/8/bits/stl_set.h" 3 6011: set(const set&) = default; 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: set(set&&) = default; 6011: # 243 "/usr/include/c++/8/bits/stl_set.h" 3 6011: set(initializer_list __l, 6011: const _Compare& __comp = _Compare(), 6011: const allocator_type& __a = allocator_type()) 6011: : _M_t(__comp, _Key_alloc_type(__a)) 6011: { _M_t._M_insert_unique(__l.begin(), __l.end()); } 6011: 6011: 6011: explicit 6011: set(const allocator_type& __a) 6011: : _M_t(_Compare(), _Key_alloc_type(__a)) { } 6011: 6011: 6011: set(const set& __x, const allocator_type& __a) 6011: : _M_t(__x._M_t, _Key_alloc_type(__a)) { } 6011: 6011: 6011: set(set&& __x, const allocator_type& __a) 6011: noexcept(is_nothrow_copy_constructible<_Compare>::value 6011: && _Alloc_traits::_S_always_equal()) 6011: : _M_t(std::move(__x._M_t), _Key_alloc_type(__a)) { } 6011: 6011: 6011: set(initializer_list __l, const allocator_type& __a) 6011: : _M_t(_Compare(), _Key_alloc_type(__a)) 6011: { _M_t._M_insert_unique(__l.begin(), __l.end()); } 6011: 6011: 6011: template 6011: set(_InputIterator __first, _InputIterator __last, 6011: const allocator_type& __a) 6011: : _M_t(_Compare(), _Key_alloc_type(__a)) 6011: { _M_t._M_insert_unique(__first, __last); } 6011: 6011: 6011: 6011: 6011: 6011: 6011: ~set() = default; 6011: # 297 "/usr/include/c++/8/bits/stl_set.h" 3 6011: set& 6011: operator=(const set&) = default; 6011: 6011: 6011: set& 6011: operator=(set&&) = default; 6011: # 315 "/usr/include/c++/8/bits/stl_set.h" 3 6011: set& 6011: operator=(initializer_list __l) 6011: { 6011: _M_t._M_assign_unique(__l.begin(), __l.end()); 6011: return *this; 6011: } 6011: 6011: 6011: 6011: 6011: 6011: key_compare 6011: key_comp() const 6011: { return _M_t.key_comp(); } 6011: 6011: value_compare 6011: value_comp() const 6011: { return _M_t.key_comp(); } 6011: 6011: allocator_type 6011: get_allocator() const noexcept 6011: { return allocator_type(_M_t.get_allocator()); } 6011: 6011: 6011: 6011: 6011: 6011: 6011: iterator 6011: begin() const noexcept 6011: { return _M_t.begin(); } 6011: 6011: 6011: 6011: 6011: 6011: 6011: iterator 6011: end() const noexcept 6011: { return _M_t.end(); } 6011: 6011: 6011: 6011: 6011: 6011: 6011: reverse_iterator 6011: rbegin() const noexcept 6011: { return _M_t.rbegin(); } 6011: 6011: 6011: 6011: 6011: 6011: 6011: reverse_iterator 6011: rend() const noexcept 6011: { return _M_t.rend(); } 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: iterator 6011: cbegin() const noexcept 6011: { return _M_t.begin(); } 6011: 6011: 6011: 6011: 6011: 6011: 6011: iterator 6011: cend() const noexcept 6011: { return _M_t.end(); } 6011: 6011: 6011: 6011: 6011: 6011: 6011: reverse_iterator 6011: crbegin() const noexcept 6011: { return _M_t.rbegin(); } 6011: 6011: 6011: 6011: 6011: 6011: 6011: reverse_iterator 6011: crend() const noexcept 6011: { return _M_t.rend(); } 6011: 6011: 6011: 6011: bool 6011: empty() const noexcept 6011: { return _M_t.empty(); } 6011: 6011: 6011: size_type 6011: size() const noexcept 6011: { return _M_t.size(); } 6011: 6011: 6011: size_type 6011: max_size() const noexcept 6011: { return _M_t.max_size(); } 6011: # 440 "/usr/include/c++/8/bits/stl_set.h" 3 6011: void 6011: swap(set& __x) 6011: noexcept(__is_nothrow_swappable<_Compare>::value) 6011: { _M_t.swap(__x._M_t); } 6011: # 460 "/usr/include/c++/8/bits/stl_set.h" 3 6011: template 6011: std::pair 6011: emplace(_Args&&... __args) 6011: { return _M_t._M_emplace_unique(std::forward<_Args>(__args)...); } 6011: # 486 "/usr/include/c++/8/bits/stl_set.h" 3 6011: template 6011: iterator 6011: emplace_hint(const_iterator __pos, _Args&&... __args) 6011: { 6011: return _M_t._M_emplace_hint_unique(__pos, 6011: std::forward<_Args>(__args)...); 6011: } 6011: # 508 "/usr/include/c++/8/bits/stl_set.h" 3 6011: std::pair 6011: insert(const value_type& __x) 6011: { 6011: std::pair __p = 6011: _M_t._M_insert_unique(__x); 6011: return std::pair(__p.first, __p.second); 6011: } 6011: 6011: 6011: std::pair 6011: insert(value_type&& __x) 6011: { 6011: std::pair __p = 6011: _M_t._M_insert_unique(std::move(__x)); 6011: return std::pair(__p.first, __p.second); 6011: } 6011: # 545 "/usr/include/c++/8/bits/stl_set.h" 3 6011: iterator 6011: insert(const_iterator __position, const value_type& __x) 6011: { return _M_t._M_insert_unique_(__position, __x); } 6011: 6011: 6011: iterator 6011: insert(const_iterator __position, value_type&& __x) 6011: { return _M_t._M_insert_unique_(__position, std::move(__x)); } 6011: # 564 "/usr/include/c++/8/bits/stl_set.h" 3 6011: template 6011: void 6011: insert(_InputIterator __first, _InputIterator __last) 6011: { _M_t._M_insert_unique(__first, __last); } 6011: # 577 "/usr/include/c++/8/bits/stl_set.h" 3 6011: void 6011: insert(initializer_list __l) 6011: { this->insert(__l.begin(), __l.end()); } 6011: # 652 "/usr/include/c++/8/bits/stl_set.h" 3 6011: __attribute ((__abi_tag__ ("cxx11"))) 6011: iterator 6011: erase(const_iterator __position) 6011: { return _M_t.erase(__position); } 6011: # 683 "/usr/include/c++/8/bits/stl_set.h" 3 6011: size_type 6011: erase(const key_type& __x) 6011: { return _M_t.erase(__x); } 6011: # 704 "/usr/include/c++/8/bits/stl_set.h" 3 6011: __attribute ((__abi_tag__ ("cxx11"))) 6011: iterator 6011: erase(const_iterator __first, const_iterator __last) 6011: { return _M_t.erase(__first, __last); } 6011: # 732 "/usr/include/c++/8/bits/stl_set.h" 3 6011: void 6011: clear() noexcept 6011: { _M_t.clear(); } 6011: # 747 "/usr/include/c++/8/bits/stl_set.h" 3 6011: size_type 6011: count(const key_type& __x) const 6011: { return _M_t.find(__x) == _M_t.end() ? 0 : 1; } 6011: # 774 "/usr/include/c++/8/bits/stl_set.h" 3 6011: iterator 6011: find(const key_type& __x) 6011: { return _M_t.find(__x); } 6011: 6011: const_iterator 6011: find(const key_type& __x) const 6011: { return _M_t.find(__x); } 6011: # 809 "/usr/include/c++/8/bits/stl_set.h" 3 6011: iterator 6011: lower_bound(const key_type& __x) 6011: { return _M_t.lower_bound(__x); } 6011: 6011: const_iterator 6011: lower_bound(const key_type& __x) const 6011: { return _M_t.lower_bound(__x); } 6011: # 839 "/usr/include/c++/8/bits/stl_set.h" 3 6011: iterator 6011: upper_bound(const key_type& __x) 6011: { return _M_t.upper_bound(__x); } 6011: 6011: const_iterator 6011: upper_bound(const key_type& __x) const 6011: { return _M_t.upper_bound(__x); } 6011: # 878 "/usr/include/c++/8/bits/stl_set.h" 3 6011: std::pair 6011: equal_range(const key_type& __x) 6011: { return _M_t.equal_range(__x); } 6011: 6011: std::pair 6011: equal_range(const key_type& __x) const 6011: { return _M_t.equal_range(__x); } 6011: # 901 "/usr/include/c++/8/bits/stl_set.h" 3 6011: template 6011: friend bool 6011: operator==(const set<_K1, _C1, _A1>&, const set<_K1, _C1, _A1>&); 6011: 6011: template 6011: friend bool 6011: operator<(const set<_K1, _C1, _A1>&, const set<_K1, _C1, _A1>&); 6011: }; 6011: # 956 "/usr/include/c++/8/bits/stl_set.h" 3 6011: template 6011: inline bool 6011: operator==(const set<_Key, _Compare, _Alloc>& __x, 6011: const set<_Key, _Compare, _Alloc>& __y) 6011: { return __x._M_t == __y._M_t; } 6011: # 973 "/usr/include/c++/8/bits/stl_set.h" 3 6011: template 6011: inline bool 6011: operator<(const set<_Key, _Compare, _Alloc>& __x, 6011: const set<_Key, _Compare, _Alloc>& __y) 6011: { return __x._M_t < __y._M_t; } 6011: 6011: 6011: template 6011: inline bool 6011: operator!=(const set<_Key, _Compare, _Alloc>& __x, 6011: const set<_Key, _Compare, _Alloc>& __y) 6011: { return !(__x == __y); } 6011: 6011: 6011: template 6011: inline bool 6011: operator>(const set<_Key, _Compare, _Alloc>& __x, 6011: const set<_Key, _Compare, _Alloc>& __y) 6011: { return __y < __x; } 6011: 6011: 6011: template 6011: inline bool 6011: operator<=(const set<_Key, _Compare, _Alloc>& __x, 6011: const set<_Key, _Compare, _Alloc>& __y) 6011: { return !(__y < __x); } 6011: 6011: 6011: template 6011: inline bool 6011: operator>=(const set<_Key, _Compare, _Alloc>& __x, 6011: const set<_Key, _Compare, _Alloc>& __y) 6011: { return !(__x < __y); } 6011: 6011: 6011: template 6011: inline void 6011: swap(set<_Key, _Compare, _Alloc>& __x, set<_Key, _Compare, _Alloc>& __y) 6011: noexcept(noexcept(__x.swap(__y))) 6011: { __x.swap(__y); } 6011: 6011: 6011: # 1035 "/usr/include/c++/8/bits/stl_set.h" 3 6011: 6011: } 6011: # 62 "/usr/include/c++/8/set" 2 3 6011: # 1 "/usr/include/c++/8/bits/stl_multiset.h" 1 3 6011: # 64 "/usr/include/c++/8/bits/stl_multiset.h" 3 6011: namespace std __attribute__ ((__visibility__ ("default"))) 6011: { 6011: 6011: 6011: 6011: template 6011: class set; 6011: # 94 "/usr/include/c++/8/bits/stl_multiset.h" 3 6011: template , 6011: typename _Alloc = std::allocator<_Key> > 6011: class multiset 6011: { 6011: # 110 "/usr/include/c++/8/bits/stl_multiset.h" 3 6011: static_assert(is_same::type, _Key>::value, 6011: "std::multiset must have a non-const, non-volatile value_type"); 6011: 6011: 6011: 6011: 6011: 6011: 6011: public: 6011: 6011: typedef _Key key_type; 6011: typedef _Key value_type; 6011: typedef _Compare key_compare; 6011: typedef _Compare value_compare; 6011: typedef _Alloc allocator_type; 6011: 6011: private: 6011: 6011: typedef typename __gnu_cxx::__alloc_traits<_Alloc>::template 6011: rebind<_Key>::other _Key_alloc_type; 6011: 6011: typedef _Rb_tree, 6011: key_compare, _Key_alloc_type> _Rep_type; 6011: 6011: _Rep_type _M_t; 6011: 6011: typedef __gnu_cxx::__alloc_traits<_Key_alloc_type> _Alloc_traits; 6011: 6011: public: 6011: typedef typename _Alloc_traits::pointer pointer; 6011: typedef typename _Alloc_traits::const_pointer const_pointer; 6011: typedef typename _Alloc_traits::reference reference; 6011: typedef typename _Alloc_traits::const_reference const_reference; 6011: 6011: 6011: 6011: typedef typename _Rep_type::const_iterator iterator; 6011: typedef typename _Rep_type::const_iterator const_iterator; 6011: typedef typename _Rep_type::const_reverse_iterator reverse_iterator; 6011: typedef typename _Rep_type::const_reverse_iterator const_reverse_iterator; 6011: typedef typename _Rep_type::size_type size_type; 6011: typedef typename _Rep_type::difference_type difference_type; 6011: # 164 "/usr/include/c++/8/bits/stl_multiset.h" 3 6011: multiset() = default; 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: explicit 6011: multiset(const _Compare& __comp, 6011: const allocator_type& __a = allocator_type()) 6011: : _M_t(__comp, _Key_alloc_type(__a)) { } 6011: # 186 "/usr/include/c++/8/bits/stl_multiset.h" 3 6011: template 6011: multiset(_InputIterator __first, _InputIterator __last) 6011: : _M_t() 6011: { _M_t._M_insert_equal(__first, __last); } 6011: # 202 "/usr/include/c++/8/bits/stl_multiset.h" 3 6011: template 6011: multiset(_InputIterator __first, _InputIterator __last, 6011: const _Compare& __comp, 6011: const allocator_type& __a = allocator_type()) 6011: : _M_t(__comp, _Key_alloc_type(__a)) 6011: { _M_t._M_insert_equal(__first, __last); } 6011: # 218 "/usr/include/c++/8/bits/stl_multiset.h" 3 6011: multiset(const multiset&) = default; 6011: # 227 "/usr/include/c++/8/bits/stl_multiset.h" 3 6011: multiset(multiset&&) = default; 6011: # 239 "/usr/include/c++/8/bits/stl_multiset.h" 3 6011: multiset(initializer_list __l, 6011: const _Compare& __comp = _Compare(), 6011: const allocator_type& __a = allocator_type()) 6011: : _M_t(__comp, _Key_alloc_type(__a)) 6011: { _M_t._M_insert_equal(__l.begin(), __l.end()); } 6011: 6011: 6011: explicit 6011: multiset(const allocator_type& __a) 6011: : _M_t(_Compare(), _Key_alloc_type(__a)) { } 6011: 6011: 6011: multiset(const multiset& __m, const allocator_type& __a) 6011: : _M_t(__m._M_t, _Key_alloc_type(__a)) { } 6011: 6011: 6011: multiset(multiset&& __m, const allocator_type& __a) 6011: noexcept(is_nothrow_copy_constructible<_Compare>::value 6011: && _Alloc_traits::_S_always_equal()) 6011: : _M_t(std::move(__m._M_t), _Key_alloc_type(__a)) { } 6011: 6011: 6011: multiset(initializer_list __l, const allocator_type& __a) 6011: : _M_t(_Compare(), _Key_alloc_type(__a)) 6011: { _M_t._M_insert_equal(__l.begin(), __l.end()); } 6011: 6011: 6011: template 6011: multiset(_InputIterator __first, _InputIterator __last, 6011: const allocator_type& __a) 6011: : _M_t(_Compare(), _Key_alloc_type(__a)) 6011: { _M_t._M_insert_equal(__first, __last); } 6011: 6011: 6011: 6011: 6011: 6011: 6011: ~multiset() = default; 6011: # 293 "/usr/include/c++/8/bits/stl_multiset.h" 3 6011: multiset& 6011: operator=(const multiset&) = default; 6011: 6011: 6011: multiset& 6011: operator=(multiset&&) = default; 6011: # 311 "/usr/include/c++/8/bits/stl_multiset.h" 3 6011: multiset& 6011: operator=(initializer_list __l) 6011: { 6011: _M_t._M_assign_equal(__l.begin(), __l.end()); 6011: return *this; 6011: } 6011: 6011: 6011: 6011: 6011: 6011: key_compare 6011: key_comp() const 6011: { return _M_t.key_comp(); } 6011: 6011: value_compare 6011: value_comp() const 6011: { return _M_t.key_comp(); } 6011: 6011: allocator_type 6011: get_allocator() const noexcept 6011: { return allocator_type(_M_t.get_allocator()); } 6011: 6011: 6011: 6011: 6011: 6011: 6011: iterator 6011: begin() const noexcept 6011: { return _M_t.begin(); } 6011: 6011: 6011: 6011: 6011: 6011: 6011: iterator 6011: end() const noexcept 6011: { return _M_t.end(); } 6011: 6011: 6011: 6011: 6011: 6011: 6011: reverse_iterator 6011: rbegin() const noexcept 6011: { return _M_t.rbegin(); } 6011: 6011: 6011: 6011: 6011: 6011: 6011: reverse_iterator 6011: rend() const noexcept 6011: { return _M_t.rend(); } 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: iterator 6011: cbegin() const noexcept 6011: { return _M_t.begin(); } 6011: 6011: 6011: 6011: 6011: 6011: 6011: iterator 6011: cend() const noexcept 6011: { return _M_t.end(); } 6011: 6011: 6011: 6011: 6011: 6011: 6011: reverse_iterator 6011: crbegin() const noexcept 6011: { return _M_t.rbegin(); } 6011: 6011: 6011: 6011: 6011: 6011: 6011: reverse_iterator 6011: crend() const noexcept 6011: { return _M_t.rend(); } 6011: 6011: 6011: 6011: bool 6011: empty() const noexcept 6011: { return _M_t.empty(); } 6011: 6011: 6011: size_type 6011: size() const noexcept 6011: { return _M_t.size(); } 6011: 6011: 6011: size_type 6011: max_size() const noexcept 6011: { return _M_t.max_size(); } 6011: # 436 "/usr/include/c++/8/bits/stl_multiset.h" 3 6011: void 6011: swap(multiset& __x) 6011: noexcept(__is_nothrow_swappable<_Compare>::value) 6011: { _M_t.swap(__x._M_t); } 6011: # 455 "/usr/include/c++/8/bits/stl_multiset.h" 3 6011: template 6011: iterator 6011: emplace(_Args&&... __args) 6011: { return _M_t._M_emplace_equal(std::forward<_Args>(__args)...); } 6011: # 481 "/usr/include/c++/8/bits/stl_multiset.h" 3 6011: template 6011: iterator 6011: emplace_hint(const_iterator __pos, _Args&&... __args) 6011: { 6011: return _M_t._M_emplace_hint_equal(__pos, 6011: std::forward<_Args>(__args)...); 6011: } 6011: # 501 "/usr/include/c++/8/bits/stl_multiset.h" 3 6011: iterator 6011: insert(const value_type& __x) 6011: { return _M_t._M_insert_equal(__x); } 6011: 6011: 6011: iterator 6011: insert(value_type&& __x) 6011: { return _M_t._M_insert_equal(std::move(__x)); } 6011: # 531 "/usr/include/c++/8/bits/stl_multiset.h" 3 6011: iterator 6011: insert(const_iterator __position, const value_type& __x) 6011: { return _M_t._M_insert_equal_(__position, __x); } 6011: 6011: 6011: iterator 6011: insert(const_iterator __position, value_type&& __x) 6011: { return _M_t._M_insert_equal_(__position, std::move(__x)); } 6011: # 549 "/usr/include/c++/8/bits/stl_multiset.h" 3 6011: template 6011: void 6011: insert(_InputIterator __first, _InputIterator __last) 6011: { _M_t._M_insert_equal(__first, __last); } 6011: # 562 "/usr/include/c++/8/bits/stl_multiset.h" 3 6011: void 6011: insert(initializer_list __l) 6011: { this->insert(__l.begin(), __l.end()); } 6011: # 637 "/usr/include/c++/8/bits/stl_multiset.h" 3 6011: __attribute ((__abi_tag__ ("cxx11"))) 6011: iterator 6011: erase(const_iterator __position) 6011: { return _M_t.erase(__position); } 6011: # 668 "/usr/include/c++/8/bits/stl_multiset.h" 3 6011: size_type 6011: erase(const key_type& __x) 6011: { return _M_t.erase(__x); } 6011: # 689 "/usr/include/c++/8/bits/stl_multiset.h" 3 6011: __attribute ((__abi_tag__ ("cxx11"))) 6011: iterator 6011: erase(const_iterator __first, const_iterator __last) 6011: { return _M_t.erase(__first, __last); } 6011: # 717 "/usr/include/c++/8/bits/stl_multiset.h" 3 6011: void 6011: clear() noexcept 6011: { _M_t.clear(); } 6011: # 729 "/usr/include/c++/8/bits/stl_multiset.h" 3 6011: size_type 6011: count(const key_type& __x) const 6011: { return _M_t.count(__x); } 6011: # 755 "/usr/include/c++/8/bits/stl_multiset.h" 3 6011: iterator 6011: find(const key_type& __x) 6011: { return _M_t.find(__x); } 6011: 6011: const_iterator 6011: find(const key_type& __x) const 6011: { return _M_t.find(__x); } 6011: # 790 "/usr/include/c++/8/bits/stl_multiset.h" 3 6011: iterator 6011: lower_bound(const key_type& __x) 6011: { return _M_t.lower_bound(__x); } 6011: 6011: const_iterator 6011: lower_bound(const key_type& __x) const 6011: { return _M_t.lower_bound(__x); } 6011: # 820 "/usr/include/c++/8/bits/stl_multiset.h" 3 6011: iterator 6011: upper_bound(const key_type& __x) 6011: { return _M_t.upper_bound(__x); } 6011: 6011: const_iterator 6011: upper_bound(const key_type& __x) const 6011: { return _M_t.upper_bound(__x); } 6011: # 859 "/usr/include/c++/8/bits/stl_multiset.h" 3 6011: std::pair 6011: equal_range(const key_type& __x) 6011: { return _M_t.equal_range(__x); } 6011: 6011: std::pair 6011: equal_range(const key_type& __x) const 6011: { return _M_t.equal_range(__x); } 6011: # 882 "/usr/include/c++/8/bits/stl_multiset.h" 3 6011: template 6011: friend bool 6011: operator==(const multiset<_K1, _C1, _A1>&, 6011: const multiset<_K1, _C1, _A1>&); 6011: 6011: template 6011: friend bool 6011: operator< (const multiset<_K1, _C1, _A1>&, 6011: const multiset<_K1, _C1, _A1>&); 6011: }; 6011: # 941 "/usr/include/c++/8/bits/stl_multiset.h" 3 6011: template 6011: inline bool 6011: operator==(const multiset<_Key, _Compare, _Alloc>& __x, 6011: const multiset<_Key, _Compare, _Alloc>& __y) 6011: { return __x._M_t == __y._M_t; } 6011: # 958 "/usr/include/c++/8/bits/stl_multiset.h" 3 6011: template 6011: inline bool 6011: operator<(const multiset<_Key, _Compare, _Alloc>& __x, 6011: const multiset<_Key, _Compare, _Alloc>& __y) 6011: { return __x._M_t < __y._M_t; } 6011: 6011: 6011: template 6011: inline bool 6011: operator!=(const multiset<_Key, _Compare, _Alloc>& __x, 6011: const multiset<_Key, _Compare, _Alloc>& __y) 6011: { return !(__x == __y); } 6011: 6011: 6011: template 6011: inline bool 6011: operator>(const multiset<_Key,_Compare,_Alloc>& __x, 6011: const multiset<_Key,_Compare,_Alloc>& __y) 6011: { return __y < __x; } 6011: 6011: 6011: template 6011: inline bool 6011: operator<=(const multiset<_Key, _Compare, _Alloc>& __x, 6011: const multiset<_Key, _Compare, _Alloc>& __y) 6011: { return !(__y < __x); } 6011: 6011: 6011: template 6011: inline bool 6011: operator>=(const multiset<_Key, _Compare, _Alloc>& __x, 6011: const multiset<_Key, _Compare, _Alloc>& __y) 6011: { return !(__x < __y); } 6011: 6011: 6011: template 6011: inline void 6011: swap(multiset<_Key, _Compare, _Alloc>& __x, 6011: multiset<_Key, _Compare, _Alloc>& __y) 6011: noexcept(noexcept(__x.swap(__y))) 6011: { __x.swap(__y); } 6011: 6011: 6011: # 1023 "/usr/include/c++/8/bits/stl_multiset.h" 3 6011: 6011: } 6011: # 63 "/usr/include/c++/8/set" 2 3 6011: # 37 "/usr/include/boost/regex/v4/regex_workaround.hpp" 2 3 4 6011: # 1 "/usr/include/c++/8/map" 1 3 4 6011: # 58 "/usr/include/c++/8/map" 3 4 6011: 6011: # 59 "/usr/include/c++/8/map" 3 6011: 6011: 6011: # 1 "/usr/include/c++/8/bits/stl_map.h" 1 3 6011: # 66 "/usr/include/c++/8/bits/stl_map.h" 3 6011: namespace std __attribute__ ((__visibility__ ("default"))) 6011: { 6011: 6011: 6011: 6011: template 6011: class multimap; 6011: # 98 "/usr/include/c++/8/bits/stl_map.h" 3 6011: template , 6011: typename _Alloc = std::allocator > > 6011: class map 6011: { 6011: public: 6011: typedef _Key key_type; 6011: typedef _Tp mapped_type; 6011: typedef std::pair value_type; 6011: typedef _Compare key_compare; 6011: typedef _Alloc allocator_type; 6011: 6011: private: 6011: # 126 "/usr/include/c++/8/bits/stl_map.h" 3 6011: public: 6011: class value_compare 6011: : public std::binary_function 6011: { 6011: friend class map<_Key, _Tp, _Compare, _Alloc>; 6011: protected: 6011: _Compare comp; 6011: 6011: value_compare(_Compare __c) 6011: : comp(__c) { } 6011: 6011: public: 6011: bool operator()(const value_type& __x, const value_type& __y) const 6011: { return comp(__x.first, __y.first); } 6011: }; 6011: 6011: private: 6011: 6011: typedef typename __gnu_cxx::__alloc_traits<_Alloc>::template 6011: rebind::other _Pair_alloc_type; 6011: 6011: typedef _Rb_tree, 6011: key_compare, _Pair_alloc_type> _Rep_type; 6011: 6011: 6011: _Rep_type _M_t; 6011: 6011: typedef __gnu_cxx::__alloc_traits<_Pair_alloc_type> _Alloc_traits; 6011: 6011: public: 6011: 6011: 6011: typedef typename _Alloc_traits::pointer pointer; 6011: typedef typename _Alloc_traits::const_pointer const_pointer; 6011: typedef typename _Alloc_traits::reference reference; 6011: typedef typename _Alloc_traits::const_reference const_reference; 6011: typedef typename _Rep_type::iterator iterator; 6011: typedef typename _Rep_type::const_iterator const_iterator; 6011: typedef typename _Rep_type::size_type size_type; 6011: typedef typename _Rep_type::difference_type difference_type; 6011: typedef typename _Rep_type::reverse_iterator reverse_iterator; 6011: typedef typename _Rep_type::const_reverse_iterator const_reverse_iterator; 6011: # 183 "/usr/include/c++/8/bits/stl_map.h" 3 6011: map() = default; 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: explicit 6011: map(const _Compare& __comp, 6011: const allocator_type& __a = allocator_type()) 6011: : _M_t(__comp, _Pair_alloc_type(__a)) { } 6011: # 205 "/usr/include/c++/8/bits/stl_map.h" 3 6011: map(const map&) = default; 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: map(map&&) = default; 6011: # 226 "/usr/include/c++/8/bits/stl_map.h" 3 6011: map(initializer_list __l, 6011: const _Compare& __comp = _Compare(), 6011: const allocator_type& __a = allocator_type()) 6011: : _M_t(__comp, _Pair_alloc_type(__a)) 6011: { _M_t._M_insert_unique(__l.begin(), __l.end()); } 6011: 6011: 6011: explicit 6011: map(const allocator_type& __a) 6011: : _M_t(_Compare(), _Pair_alloc_type(__a)) { } 6011: 6011: 6011: map(const map& __m, const allocator_type& __a) 6011: : _M_t(__m._M_t, _Pair_alloc_type(__a)) { } 6011: 6011: 6011: map(map&& __m, const allocator_type& __a) 6011: noexcept(is_nothrow_copy_constructible<_Compare>::value 6011: && _Alloc_traits::_S_always_equal()) 6011: : _M_t(std::move(__m._M_t), _Pair_alloc_type(__a)) { } 6011: 6011: 6011: map(initializer_list __l, const allocator_type& __a) 6011: : _M_t(_Compare(), _Pair_alloc_type(__a)) 6011: { _M_t._M_insert_unique(__l.begin(), __l.end()); } 6011: 6011: 6011: template 6011: map(_InputIterator __first, _InputIterator __last, 6011: const allocator_type& __a) 6011: : _M_t(_Compare(), _Pair_alloc_type(__a)) 6011: { _M_t._M_insert_unique(__first, __last); } 6011: # 270 "/usr/include/c++/8/bits/stl_map.h" 3 6011: template 6011: map(_InputIterator __first, _InputIterator __last) 6011: : _M_t() 6011: { _M_t._M_insert_unique(__first, __last); } 6011: # 287 "/usr/include/c++/8/bits/stl_map.h" 3 6011: template 6011: map(_InputIterator __first, _InputIterator __last, 6011: const _Compare& __comp, 6011: const allocator_type& __a = allocator_type()) 6011: : _M_t(__comp, _Pair_alloc_type(__a)) 6011: { _M_t._M_insert_unique(__first, __last); } 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: ~map() = default; 6011: # 316 "/usr/include/c++/8/bits/stl_map.h" 3 6011: map& 6011: operator=(const map&) = default; 6011: 6011: 6011: map& 6011: operator=(map&&) = default; 6011: # 334 "/usr/include/c++/8/bits/stl_map.h" 3 6011: map& 6011: operator=(initializer_list __l) 6011: { 6011: _M_t._M_assign_unique(__l.begin(), __l.end()); 6011: return *this; 6011: } 6011: 6011: 6011: 6011: allocator_type 6011: get_allocator() const noexcept 6011: { return allocator_type(_M_t.get_allocator()); } 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: iterator 6011: begin() noexcept 6011: { return _M_t.begin(); } 6011: 6011: 6011: 6011: 6011: 6011: 6011: const_iterator 6011: begin() const noexcept 6011: { return _M_t.begin(); } 6011: 6011: 6011: 6011: 6011: 6011: 6011: iterator 6011: end() noexcept 6011: { return _M_t.end(); } 6011: 6011: 6011: 6011: 6011: 6011: 6011: const_iterator 6011: end() const noexcept 6011: { return _M_t.end(); } 6011: 6011: 6011: 6011: 6011: 6011: 6011: reverse_iterator 6011: rbegin() noexcept 6011: { return _M_t.rbegin(); } 6011: 6011: 6011: 6011: 6011: 6011: 6011: const_reverse_iterator 6011: rbegin() const noexcept 6011: { return _M_t.rbegin(); } 6011: 6011: 6011: 6011: 6011: 6011: 6011: reverse_iterator 6011: rend() noexcept 6011: { return _M_t.rend(); } 6011: 6011: 6011: 6011: 6011: 6011: 6011: const_reverse_iterator 6011: rend() const noexcept 6011: { return _M_t.rend(); } 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: const_iterator 6011: cbegin() const noexcept 6011: { return _M_t.begin(); } 6011: 6011: 6011: 6011: 6011: 6011: 6011: const_iterator 6011: cend() const noexcept 6011: { return _M_t.end(); } 6011: 6011: 6011: 6011: 6011: 6011: 6011: const_reverse_iterator 6011: crbegin() const noexcept 6011: { return _M_t.rbegin(); } 6011: 6011: 6011: 6011: 6011: 6011: 6011: const_reverse_iterator 6011: crend() const noexcept 6011: { return _M_t.rend(); } 6011: 6011: 6011: 6011: 6011: 6011: 6011: bool 6011: empty() const noexcept 6011: { return _M_t.empty(); } 6011: 6011: 6011: size_type 6011: size() const noexcept 6011: { return _M_t.size(); } 6011: 6011: 6011: size_type 6011: max_size() const noexcept 6011: { return _M_t.max_size(); } 6011: # 489 "/usr/include/c++/8/bits/stl_map.h" 3 6011: mapped_type& 6011: operator[](const key_type& __k) 6011: { 6011: 6011: 6011: 6011: iterator __i = lower_bound(__k); 6011: 6011: if (__i == end() || key_comp()(__k, (*__i).first)) 6011: 6011: __i = _M_t._M_emplace_hint_unique(__i, std::piecewise_construct, 6011: std::tuple(__k), 6011: std::tuple<>()); 6011: 6011: 6011: 6011: return (*__i).second; 6011: } 6011: 6011: 6011: mapped_type& 6011: operator[](key_type&& __k) 6011: { 6011: 6011: 6011: 6011: iterator __i = lower_bound(__k); 6011: 6011: if (__i == end() || key_comp()(__k, (*__i).first)) 6011: __i = _M_t._M_emplace_hint_unique(__i, std::piecewise_construct, 6011: std::forward_as_tuple(std::move(__k)), 6011: std::tuple<>()); 6011: return (*__i).second; 6011: } 6011: # 534 "/usr/include/c++/8/bits/stl_map.h" 3 6011: mapped_type& 6011: at(const key_type& __k) 6011: { 6011: iterator __i = lower_bound(__k); 6011: if (__i == end() || key_comp()(__k, (*__i).first)) 6011: __throw_out_of_range(("map::at")); 6011: return (*__i).second; 6011: } 6011: 6011: const mapped_type& 6011: at(const key_type& __k) const 6011: { 6011: const_iterator __i = lower_bound(__k); 6011: if (__i == end() || key_comp()(__k, (*__i).first)) 6011: __throw_out_of_range(("map::at")); 6011: return (*__i).second; 6011: } 6011: # 572 "/usr/include/c++/8/bits/stl_map.h" 3 6011: template 6011: std::pair 6011: emplace(_Args&&... __args) 6011: { return _M_t._M_emplace_unique(std::forward<_Args>(__args)...); } 6011: # 602 "/usr/include/c++/8/bits/stl_map.h" 3 6011: template 6011: iterator 6011: emplace_hint(const_iterator __pos, _Args&&... __args) 6011: { 6011: return _M_t._M_emplace_hint_unique(__pos, 6011: std::forward<_Args>(__args)...); 6011: } 6011: # 800 "/usr/include/c++/8/bits/stl_map.h" 3 6011: std::pair 6011: insert(const value_type& __x) 6011: { return _M_t._M_insert_unique(__x); } 6011: 6011: 6011: 6011: 6011: std::pair 6011: insert(value_type&& __x) 6011: { return _M_t._M_insert_unique(std::move(__x)); } 6011: 6011: template::value>::type> 6011: std::pair 6011: insert(_Pair&& __x) 6011: { return _M_t._M_insert_unique(std::forward<_Pair>(__x)); } 6011: # 828 "/usr/include/c++/8/bits/stl_map.h" 3 6011: void 6011: insert(std::initializer_list __list) 6011: { insert(__list.begin(), __list.end()); } 6011: # 857 "/usr/include/c++/8/bits/stl_map.h" 3 6011: iterator 6011: 6011: insert(const_iterator __position, const value_type& __x) 6011: 6011: 6011: 6011: { return _M_t._M_insert_unique_(__position, __x); } 6011: 6011: 6011: 6011: 6011: iterator 6011: insert(const_iterator __position, value_type&& __x) 6011: { return _M_t._M_insert_unique_(__position, std::move(__x)); } 6011: 6011: template::value>::type> 6011: iterator 6011: insert(const_iterator __position, _Pair&& __x) 6011: { return _M_t._M_insert_unique_(__position, 6011: std::forward<_Pair>(__x)); } 6011: # 890 "/usr/include/c++/8/bits/stl_map.h" 3 6011: template 6011: void 6011: insert(_InputIterator __first, _InputIterator __last) 6011: { _M_t._M_insert_unique(__first, __last); } 6011: # 1030 "/usr/include/c++/8/bits/stl_map.h" 3 6011: iterator 6011: erase(const_iterator __position) 6011: { return _M_t.erase(__position); } 6011: 6011: 6011: __attribute ((__abi_tag__ ("cxx11"))) 6011: iterator 6011: erase(iterator __position) 6011: { return _M_t.erase(__position); } 6011: # 1067 "/usr/include/c++/8/bits/stl_map.h" 3 6011: size_type 6011: erase(const key_type& __x) 6011: { return _M_t.erase(__x); } 6011: # 1087 "/usr/include/c++/8/bits/stl_map.h" 3 6011: iterator 6011: erase(const_iterator __first, const_iterator __last) 6011: { return _M_t.erase(__first, __last); } 6011: # 1121 "/usr/include/c++/8/bits/stl_map.h" 3 6011: void 6011: swap(map& __x) 6011: noexcept(__is_nothrow_swappable<_Compare>::value) 6011: { _M_t.swap(__x._M_t); } 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: void 6011: clear() noexcept 6011: { _M_t.clear(); } 6011: 6011: 6011: 6011: 6011: 6011: 6011: key_compare 6011: key_comp() const 6011: { return _M_t.key_comp(); } 6011: 6011: 6011: 6011: 6011: 6011: value_compare 6011: value_comp() const 6011: { return value_compare(_M_t.key_comp()); } 6011: # 1168 "/usr/include/c++/8/bits/stl_map.h" 3 6011: iterator 6011: find(const key_type& __x) 6011: { return _M_t.find(__x); } 6011: # 1193 "/usr/include/c++/8/bits/stl_map.h" 3 6011: const_iterator 6011: find(const key_type& __x) const 6011: { return _M_t.find(__x); } 6011: # 1214 "/usr/include/c++/8/bits/stl_map.h" 3 6011: size_type 6011: count(const key_type& __x) const 6011: { return _M_t.find(__x) == _M_t.end() ? 0 : 1; } 6011: # 1238 "/usr/include/c++/8/bits/stl_map.h" 3 6011: iterator 6011: lower_bound(const key_type& __x) 6011: { return _M_t.lower_bound(__x); } 6011: # 1263 "/usr/include/c++/8/bits/stl_map.h" 3 6011: const_iterator 6011: lower_bound(const key_type& __x) const 6011: { return _M_t.lower_bound(__x); } 6011: # 1283 "/usr/include/c++/8/bits/stl_map.h" 3 6011: iterator 6011: upper_bound(const key_type& __x) 6011: { return _M_t.upper_bound(__x); } 6011: # 1303 "/usr/include/c++/8/bits/stl_map.h" 3 6011: const_iterator 6011: upper_bound(const key_type& __x) const 6011: { return _M_t.upper_bound(__x); } 6011: # 1332 "/usr/include/c++/8/bits/stl_map.h" 3 6011: std::pair 6011: equal_range(const key_type& __x) 6011: { return _M_t.equal_range(__x); } 6011: # 1361 "/usr/include/c++/8/bits/stl_map.h" 3 6011: std::pair 6011: equal_range(const key_type& __x) const 6011: { return _M_t.equal_range(__x); } 6011: # 1378 "/usr/include/c++/8/bits/stl_map.h" 3 6011: template 6011: friend bool 6011: operator==(const map<_K1, _T1, _C1, _A1>&, 6011: const map<_K1, _T1, _C1, _A1>&); 6011: 6011: template 6011: friend bool 6011: operator<(const map<_K1, _T1, _C1, _A1>&, 6011: const map<_K1, _T1, _C1, _A1>&); 6011: }; 6011: # 1433 "/usr/include/c++/8/bits/stl_map.h" 3 6011: template 6011: inline bool 6011: operator==(const map<_Key, _Tp, _Compare, _Alloc>& __x, 6011: const map<_Key, _Tp, _Compare, _Alloc>& __y) 6011: { return __x._M_t == __y._M_t; } 6011: # 1450 "/usr/include/c++/8/bits/stl_map.h" 3 6011: template 6011: inline bool 6011: operator<(const map<_Key, _Tp, _Compare, _Alloc>& __x, 6011: const map<_Key, _Tp, _Compare, _Alloc>& __y) 6011: { return __x._M_t < __y._M_t; } 6011: 6011: 6011: template 6011: inline bool 6011: operator!=(const map<_Key, _Tp, _Compare, _Alloc>& __x, 6011: const map<_Key, _Tp, _Compare, _Alloc>& __y) 6011: { return !(__x == __y); } 6011: 6011: 6011: template 6011: inline bool 6011: operator>(const map<_Key, _Tp, _Compare, _Alloc>& __x, 6011: const map<_Key, _Tp, _Compare, _Alloc>& __y) 6011: { return __y < __x; } 6011: 6011: 6011: template 6011: inline bool 6011: operator<=(const map<_Key, _Tp, _Compare, _Alloc>& __x, 6011: const map<_Key, _Tp, _Compare, _Alloc>& __y) 6011: { return !(__y < __x); } 6011: 6011: 6011: template 6011: inline bool 6011: operator>=(const map<_Key, _Tp, _Compare, _Alloc>& __x, 6011: const map<_Key, _Tp, _Compare, _Alloc>& __y) 6011: { return !(__x < __y); } 6011: 6011: 6011: template 6011: inline void 6011: swap(map<_Key, _Tp, _Compare, _Alloc>& __x, 6011: map<_Key, _Tp, _Compare, _Alloc>& __y) 6011: noexcept(noexcept(__x.swap(__y))) 6011: { __x.swap(__y); } 6011: 6011: 6011: # 1515 "/usr/include/c++/8/bits/stl_map.h" 3 6011: 6011: } 6011: # 62 "/usr/include/c++/8/map" 2 3 6011: # 1 "/usr/include/c++/8/bits/stl_multimap.h" 1 3 6011: # 64 "/usr/include/c++/8/bits/stl_multimap.h" 3 6011: namespace std __attribute__ ((__visibility__ ("default"))) 6011: { 6011: 6011: 6011: 6011: template 6011: class map; 6011: # 96 "/usr/include/c++/8/bits/stl_multimap.h" 3 6011: template , 6011: typename _Alloc = std::allocator > > 6011: class multimap 6011: { 6011: public: 6011: typedef _Key key_type; 6011: typedef _Tp mapped_type; 6011: typedef std::pair value_type; 6011: typedef _Compare key_compare; 6011: typedef _Alloc allocator_type; 6011: 6011: private: 6011: # 125 "/usr/include/c++/8/bits/stl_multimap.h" 3 6011: public: 6011: class value_compare 6011: : public std::binary_function 6011: { 6011: friend class multimap<_Key, _Tp, _Compare, _Alloc>; 6011: protected: 6011: _Compare comp; 6011: 6011: value_compare(_Compare __c) 6011: : comp(__c) { } 6011: 6011: public: 6011: bool operator()(const value_type& __x, const value_type& __y) const 6011: { return comp(__x.first, __y.first); } 6011: }; 6011: 6011: private: 6011: 6011: typedef typename __gnu_cxx::__alloc_traits<_Alloc>::template 6011: rebind::other _Pair_alloc_type; 6011: 6011: typedef _Rb_tree, 6011: key_compare, _Pair_alloc_type> _Rep_type; 6011: 6011: _Rep_type _M_t; 6011: 6011: typedef __gnu_cxx::__alloc_traits<_Pair_alloc_type> _Alloc_traits; 6011: 6011: public: 6011: 6011: 6011: typedef typename _Alloc_traits::pointer pointer; 6011: typedef typename _Alloc_traits::const_pointer const_pointer; 6011: typedef typename _Alloc_traits::reference reference; 6011: typedef typename _Alloc_traits::const_reference const_reference; 6011: typedef typename _Rep_type::iterator iterator; 6011: typedef typename _Rep_type::const_iterator const_iterator; 6011: typedef typename _Rep_type::size_type size_type; 6011: typedef typename _Rep_type::difference_type difference_type; 6011: typedef typename _Rep_type::reverse_iterator reverse_iterator; 6011: typedef typename _Rep_type::const_reverse_iterator const_reverse_iterator; 6011: # 180 "/usr/include/c++/8/bits/stl_multimap.h" 3 6011: multimap() = default; 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: explicit 6011: multimap(const _Compare& __comp, 6011: const allocator_type& __a = allocator_type()) 6011: : _M_t(__comp, _Pair_alloc_type(__a)) { } 6011: # 202 "/usr/include/c++/8/bits/stl_multimap.h" 3 6011: multimap(const multimap&) = default; 6011: # 211 "/usr/include/c++/8/bits/stl_multimap.h" 3 6011: multimap(multimap&&) = default; 6011: # 223 "/usr/include/c++/8/bits/stl_multimap.h" 3 6011: multimap(initializer_list __l, 6011: const _Compare& __comp = _Compare(), 6011: const allocator_type& __a = allocator_type()) 6011: : _M_t(__comp, _Pair_alloc_type(__a)) 6011: { _M_t._M_insert_equal(__l.begin(), __l.end()); } 6011: 6011: 6011: explicit 6011: multimap(const allocator_type& __a) 6011: : _M_t(_Compare(), _Pair_alloc_type(__a)) { } 6011: 6011: 6011: multimap(const multimap& __m, const allocator_type& __a) 6011: : _M_t(__m._M_t, _Pair_alloc_type(__a)) { } 6011: 6011: 6011: multimap(multimap&& __m, const allocator_type& __a) 6011: noexcept(is_nothrow_copy_constructible<_Compare>::value 6011: && _Alloc_traits::_S_always_equal()) 6011: : _M_t(std::move(__m._M_t), _Pair_alloc_type(__a)) { } 6011: 6011: 6011: multimap(initializer_list __l, const allocator_type& __a) 6011: : _M_t(_Compare(), _Pair_alloc_type(__a)) 6011: { _M_t._M_insert_equal(__l.begin(), __l.end()); } 6011: 6011: 6011: template 6011: multimap(_InputIterator __first, _InputIterator __last, 6011: const allocator_type& __a) 6011: : _M_t(_Compare(), _Pair_alloc_type(__a)) 6011: { _M_t._M_insert_equal(__first, __last); } 6011: # 266 "/usr/include/c++/8/bits/stl_multimap.h" 3 6011: template 6011: multimap(_InputIterator __first, _InputIterator __last) 6011: : _M_t() 6011: { _M_t._M_insert_equal(__first, __last); } 6011: # 282 "/usr/include/c++/8/bits/stl_multimap.h" 3 6011: template 6011: multimap(_InputIterator __first, _InputIterator __last, 6011: const _Compare& __comp, 6011: const allocator_type& __a = allocator_type()) 6011: : _M_t(__comp, _Pair_alloc_type(__a)) 6011: { _M_t._M_insert_equal(__first, __last); } 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: ~multimap() = default; 6011: # 311 "/usr/include/c++/8/bits/stl_multimap.h" 3 6011: multimap& 6011: operator=(const multimap&) = default; 6011: 6011: 6011: multimap& 6011: operator=(multimap&&) = default; 6011: # 329 "/usr/include/c++/8/bits/stl_multimap.h" 3 6011: multimap& 6011: operator=(initializer_list __l) 6011: { 6011: _M_t._M_assign_equal(__l.begin(), __l.end()); 6011: return *this; 6011: } 6011: 6011: 6011: 6011: allocator_type 6011: get_allocator() const noexcept 6011: { return allocator_type(_M_t.get_allocator()); } 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: iterator 6011: begin() noexcept 6011: { return _M_t.begin(); } 6011: 6011: 6011: 6011: 6011: 6011: 6011: const_iterator 6011: begin() const noexcept 6011: { return _M_t.begin(); } 6011: 6011: 6011: 6011: 6011: 6011: 6011: iterator 6011: end() noexcept 6011: { return _M_t.end(); } 6011: 6011: 6011: 6011: 6011: 6011: 6011: const_iterator 6011: end() const noexcept 6011: { return _M_t.end(); } 6011: 6011: 6011: 6011: 6011: 6011: 6011: reverse_iterator 6011: rbegin() noexcept 6011: { return _M_t.rbegin(); } 6011: 6011: 6011: 6011: 6011: 6011: 6011: const_reverse_iterator 6011: rbegin() const noexcept 6011: { return _M_t.rbegin(); } 6011: 6011: 6011: 6011: 6011: 6011: 6011: reverse_iterator 6011: rend() noexcept 6011: { return _M_t.rend(); } 6011: 6011: 6011: 6011: 6011: 6011: 6011: const_reverse_iterator 6011: rend() const noexcept 6011: { return _M_t.rend(); } 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: const_iterator 6011: cbegin() const noexcept 6011: { return _M_t.begin(); } 6011: 6011: 6011: 6011: 6011: 6011: 6011: const_iterator 6011: cend() const noexcept 6011: { return _M_t.end(); } 6011: 6011: 6011: 6011: 6011: 6011: 6011: const_reverse_iterator 6011: crbegin() const noexcept 6011: { return _M_t.rbegin(); } 6011: 6011: 6011: 6011: 6011: 6011: 6011: const_reverse_iterator 6011: crend() const noexcept 6011: { return _M_t.rend(); } 6011: 6011: 6011: 6011: 6011: bool 6011: empty() const noexcept 6011: { return _M_t.empty(); } 6011: 6011: 6011: size_type 6011: size() const noexcept 6011: { return _M_t.size(); } 6011: 6011: 6011: size_type 6011: max_size() const noexcept 6011: { return _M_t.max_size(); } 6011: # 487 "/usr/include/c++/8/bits/stl_multimap.h" 3 6011: template 6011: iterator 6011: emplace(_Args&&... __args) 6011: { return _M_t._M_emplace_equal(std::forward<_Args>(__args)...); } 6011: # 514 "/usr/include/c++/8/bits/stl_multimap.h" 3 6011: template 6011: iterator 6011: emplace_hint(const_iterator __pos, _Args&&... __args) 6011: { 6011: return _M_t._M_emplace_hint_equal(__pos, 6011: std::forward<_Args>(__args)...); 6011: } 6011: # 536 "/usr/include/c++/8/bits/stl_multimap.h" 3 6011: iterator 6011: insert(const value_type& __x) 6011: { return _M_t._M_insert_equal(__x); } 6011: 6011: 6011: 6011: 6011: iterator 6011: insert(value_type&& __x) 6011: { return _M_t._M_insert_equal(std::move(__x)); } 6011: 6011: template::value>::type> 6011: iterator 6011: insert(_Pair&& __x) 6011: { return _M_t._M_insert_equal(std::forward<_Pair>(__x)); } 6011: # 577 "/usr/include/c++/8/bits/stl_multimap.h" 3 6011: iterator 6011: 6011: insert(const_iterator __position, const value_type& __x) 6011: 6011: 6011: 6011: { return _M_t._M_insert_equal_(__position, __x); } 6011: 6011: 6011: 6011: 6011: iterator 6011: insert(const_iterator __position, value_type&& __x) 6011: { return _M_t._M_insert_equal_(__position, std::move(__x)); } 6011: 6011: template::value>::type> 6011: iterator 6011: insert(const_iterator __position, _Pair&& __x) 6011: { return _M_t._M_insert_equal_(__position, 6011: std::forward<_Pair>(__x)); } 6011: # 611 "/usr/include/c++/8/bits/stl_multimap.h" 3 6011: template 6011: void 6011: insert(_InputIterator __first, _InputIterator __last) 6011: { _M_t._M_insert_equal(__first, __last); } 6011: # 624 "/usr/include/c++/8/bits/stl_multimap.h" 3 6011: void 6011: insert(initializer_list __l) 6011: { this->insert(__l.begin(), __l.end()); } 6011: # 701 "/usr/include/c++/8/bits/stl_multimap.h" 3 6011: iterator 6011: erase(const_iterator __position) 6011: { return _M_t.erase(__position); } 6011: 6011: 6011: __attribute ((__abi_tag__ ("cxx11"))) 6011: iterator 6011: erase(iterator __position) 6011: { return _M_t.erase(__position); } 6011: # 738 "/usr/include/c++/8/bits/stl_multimap.h" 3 6011: size_type 6011: erase(const key_type& __x) 6011: { return _M_t.erase(__x); } 6011: # 759 "/usr/include/c++/8/bits/stl_multimap.h" 3 6011: iterator 6011: erase(const_iterator __first, const_iterator __last) 6011: { return _M_t.erase(__first, __last); } 6011: # 796 "/usr/include/c++/8/bits/stl_multimap.h" 3 6011: void 6011: swap(multimap& __x) 6011: noexcept(__is_nothrow_swappable<_Compare>::value) 6011: { _M_t.swap(__x._M_t); } 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: void 6011: clear() noexcept 6011: { _M_t.clear(); } 6011: 6011: 6011: 6011: 6011: 6011: 6011: key_compare 6011: key_comp() const 6011: { return _M_t.key_comp(); } 6011: 6011: 6011: 6011: 6011: 6011: value_compare 6011: value_comp() const 6011: { return value_compare(_M_t.key_comp()); } 6011: # 842 "/usr/include/c++/8/bits/stl_multimap.h" 3 6011: iterator 6011: find(const key_type& __x) 6011: { return _M_t.find(__x); } 6011: # 866 "/usr/include/c++/8/bits/stl_multimap.h" 3 6011: const_iterator 6011: find(const key_type& __x) const 6011: { return _M_t.find(__x); } 6011: # 884 "/usr/include/c++/8/bits/stl_multimap.h" 3 6011: size_type 6011: count(const key_type& __x) const 6011: { return _M_t.count(__x); } 6011: # 908 "/usr/include/c++/8/bits/stl_multimap.h" 3 6011: iterator 6011: lower_bound(const key_type& __x) 6011: { return _M_t.lower_bound(__x); } 6011: # 933 "/usr/include/c++/8/bits/stl_multimap.h" 3 6011: const_iterator 6011: lower_bound(const key_type& __x) const 6011: { return _M_t.lower_bound(__x); } 6011: # 953 "/usr/include/c++/8/bits/stl_multimap.h" 3 6011: iterator 6011: upper_bound(const key_type& __x) 6011: { return _M_t.upper_bound(__x); } 6011: # 973 "/usr/include/c++/8/bits/stl_multimap.h" 3 6011: const_iterator 6011: upper_bound(const key_type& __x) const 6011: { return _M_t.upper_bound(__x); } 6011: # 1000 "/usr/include/c++/8/bits/stl_multimap.h" 3 6011: std::pair 6011: equal_range(const key_type& __x) 6011: { return _M_t.equal_range(__x); } 6011: # 1027 "/usr/include/c++/8/bits/stl_multimap.h" 3 6011: std::pair 6011: equal_range(const key_type& __x) const 6011: { return _M_t.equal_range(__x); } 6011: # 1044 "/usr/include/c++/8/bits/stl_multimap.h" 3 6011: template 6011: friend bool 6011: operator==(const multimap<_K1, _T1, _C1, _A1>&, 6011: const multimap<_K1, _T1, _C1, _A1>&); 6011: 6011: template 6011: friend bool 6011: operator<(const multimap<_K1, _T1, _C1, _A1>&, 6011: const multimap<_K1, _T1, _C1, _A1>&); 6011: }; 6011: # 1098 "/usr/include/c++/8/bits/stl_multimap.h" 3 6011: template 6011: inline bool 6011: operator==(const multimap<_Key, _Tp, _Compare, _Alloc>& __x, 6011: const multimap<_Key, _Tp, _Compare, _Alloc>& __y) 6011: { return __x._M_t == __y._M_t; } 6011: # 1115 "/usr/include/c++/8/bits/stl_multimap.h" 3 6011: template 6011: inline bool 6011: operator<(const multimap<_Key, _Tp, _Compare, _Alloc>& __x, 6011: const multimap<_Key, _Tp, _Compare, _Alloc>& __y) 6011: { return __x._M_t < __y._M_t; } 6011: 6011: 6011: template 6011: inline bool 6011: operator!=(const multimap<_Key, _Tp, _Compare, _Alloc>& __x, 6011: const multimap<_Key, _Tp, _Compare, _Alloc>& __y) 6011: { return !(__x == __y); } 6011: 6011: 6011: template 6011: inline bool 6011: operator>(const multimap<_Key, _Tp, _Compare, _Alloc>& __x, 6011: const multimap<_Key, _Tp, _Compare, _Alloc>& __y) 6011: { return __y < __x; } 6011: 6011: 6011: template 6011: inline bool 6011: operator<=(const multimap<_Key, _Tp, _Compare, _Alloc>& __x, 6011: const multimap<_Key, _Tp, _Compare, _Alloc>& __y) 6011: { return !(__y < __x); } 6011: 6011: 6011: template 6011: inline bool 6011: operator>=(const multimap<_Key, _Tp, _Compare, _Alloc>& __x, 6011: const multimap<_Key, _Tp, _Compare, _Alloc>& __y) 6011: { return !(__x < __y); } 6011: 6011: 6011: template 6011: inline void 6011: swap(multimap<_Key, _Tp, _Compare, _Alloc>& __x, 6011: multimap<_Key, _Tp, _Compare, _Alloc>& __y) 6011: noexcept(noexcept(__x.swap(__y))) 6011: { __x.swap(__y); } 6011: 6011: 6011: # 1180 "/usr/include/c++/8/bits/stl_multimap.h" 3 6011: 6011: } 6011: # 63 "/usr/include/c++/8/map" 2 3 6011: # 38 "/usr/include/boost/regex/v4/regex_workaround.hpp" 2 3 4 6011: # 1 "/usr/include/boost/limits.hpp" 1 3 4 6011: # 39 "/usr/include/boost/regex/v4/regex_workaround.hpp" 2 3 4 6011: # 1 "/usr/include/boost/assert.hpp" 1 3 4 6011: # 58 "/usr/include/boost/assert.hpp" 3 4 6011: # 1 "/usr/include/assert.h" 1 3 4 6011: # 59 "/usr/include/boost/assert.hpp" 2 3 4 6011: # 40 "/usr/include/boost/regex/v4/regex_workaround.hpp" 2 3 4 6011: # 1 "/usr/include/boost/cstdint.hpp" 1 3 4 6011: # 103 "/usr/include/boost/cstdint.hpp" 3 4 6011: namespace boost 6011: { 6011: 6011: using ::int8_t; 6011: using ::int_least8_t; 6011: using ::int_fast8_t; 6011: using ::uint8_t; 6011: using ::uint_least8_t; 6011: using ::uint_fast8_t; 6011: 6011: using ::int16_t; 6011: using ::int_least16_t; 6011: using ::int_fast16_t; 6011: using ::uint16_t; 6011: using ::uint_least16_t; 6011: using ::uint_fast16_t; 6011: 6011: using ::int32_t; 6011: using ::int_least32_t; 6011: using ::int_fast32_t; 6011: using ::uint32_t; 6011: using ::uint_least32_t; 6011: using ::uint_fast32_t; 6011: 6011: 6011: 6011: using ::int64_t; 6011: using ::int_least64_t; 6011: using ::int_fast64_t; 6011: using ::uint64_t; 6011: using ::uint_least64_t; 6011: using ::uint_fast64_t; 6011: 6011: 6011: 6011: using ::intmax_t; 6011: using ::uintmax_t; 6011: 6011: } 6011: # 379 "/usr/include/boost/cstdint.hpp" 3 4 6011: namespace boost { 6011: using ::intptr_t; 6011: using ::uintptr_t; 6011: } 6011: # 41 "/usr/include/boost/regex/v4/regex_workaround.hpp" 2 3 4 6011: # 1 "/usr/include/boost/throw_exception.hpp" 1 3 4 6011: 6011: 6011: 6011: 6011: # 5 "/usr/include/boost/throw_exception.hpp" 3 6011: # 29 "/usr/include/boost/throw_exception.hpp" 3 6011: # 1 "/usr/include/boost/detail/workaround.hpp" 1 3 4 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: # 1 "/usr/include/boost/config/workaround.hpp" 1 3 4 6011: # 9 "/usr/include/boost/detail/workaround.hpp" 2 3 4 6011: # 30 "/usr/include/boost/throw_exception.hpp" 2 3 6011: # 42 "/usr/include/boost/throw_exception.hpp" 3 6011: # 1 "/usr/include/boost/exception/exception.hpp" 1 3 4 6011: # 9 "/usr/include/boost/exception/exception.hpp" 3 4 6011: 6011: # 10 "/usr/include/boost/exception/exception.hpp" 3 6011: # 19 "/usr/include/boost/exception/exception.hpp" 3 6011: namespace boost { template class shared_ptr; }; 6011: namespace boost { namespace exception_detail { using boost::shared_ptr; } } 6011: 6011: 6011: namespace 6011: boost 6011: { 6011: namespace 6011: exception_detail 6011: { 6011: template 6011: class 6011: refcount_ptr 6011: { 6011: public: 6011: 6011: refcount_ptr(): 6011: px_(0) 6011: { 6011: } 6011: 6011: ~refcount_ptr() 6011: { 6011: release(); 6011: } 6011: 6011: refcount_ptr( refcount_ptr const & x ): 6011: px_(x.px_) 6011: { 6011: add_ref(); 6011: } 6011: 6011: refcount_ptr & 6011: operator=( refcount_ptr const & x ) 6011: { 6011: adopt(x.px_); 6011: return *this; 6011: } 6011: 6011: void 6011: adopt( T * px ) 6011: { 6011: release(); 6011: px_=px; 6011: add_ref(); 6011: } 6011: 6011: T * 6011: get() const 6011: { 6011: return px_; 6011: } 6011: 6011: private: 6011: 6011: T * px_; 6011: 6011: void 6011: add_ref() 6011: { 6011: if( px_ ) 6011: px_->add_ref(); 6011: } 6011: 6011: void 6011: release() 6011: { 6011: if( px_ && px_->release() ) 6011: px_=0; 6011: } 6011: }; 6011: } 6011: 6011: 6011: 6011: template 6011: class error_info; 6011: 6011: typedef error_info throw_function; 6011: typedef error_info throw_file; 6011: typedef error_info throw_line; 6011: 6011: template <> 6011: class 6011: error_info 6011: { 6011: public: 6011: typedef char const * value_type; 6011: value_type v_; 6011: explicit 6011: error_info( value_type v ): 6011: v_(v) 6011: { 6011: } 6011: }; 6011: 6011: template <> 6011: class 6011: error_info 6011: { 6011: public: 6011: typedef char const * value_type; 6011: value_type v_; 6011: explicit 6011: error_info( value_type v ): 6011: v_(v) 6011: { 6011: } 6011: }; 6011: 6011: template <> 6011: class 6011: error_info 6011: { 6011: public: 6011: typedef int value_type; 6011: value_type v_; 6011: explicit 6011: error_info( value_type v ): 6011: v_(v) 6011: { 6011: } 6011: }; 6011: 6011: 6011: 6011: #pragma GCC visibility push (default) 6011: 6011: 6011: class exception; 6011: 6011: 6011: #pragma GCC visibility pop 6011: 6011: 6011: 6011: namespace 6011: exception_detail 6011: { 6011: class error_info_base; 6011: struct type_info_; 6011: 6011: struct 6011: error_info_container 6011: { 6011: virtual char const * diagnostic_information( char const * ) const = 0; 6011: virtual shared_ptr get( type_info_ const & ) const = 0; 6011: virtual void set( shared_ptr const &, type_info_ const & ) = 0; 6011: virtual void add_ref() const = 0; 6011: virtual bool release() const = 0; 6011: virtual refcount_ptr clone() const = 0; 6011: 6011: protected: 6011: 6011: ~error_info_container() throw() 6011: { 6011: } 6011: }; 6011: 6011: template 6011: struct get_info; 6011: 6011: template <> 6011: struct get_info; 6011: 6011: template <> 6011: struct get_info; 6011: 6011: template <> 6011: struct get_info; 6011: 6011: template 6011: struct set_info_rv; 6011: 6011: template <> 6011: struct set_info_rv; 6011: 6011: template <> 6011: struct set_info_rv; 6011: 6011: template <> 6011: struct set_info_rv; 6011: 6011: char const * get_diagnostic_information( exception const &, char const * ); 6011: 6011: void copy_boost_exception( exception *, exception const * ); 6011: 6011: template 6011: E const & set_info( E const &, error_info const & ); 6011: 6011: template 6011: E const & set_info( E const &, throw_function const & ); 6011: 6011: template 6011: E const & set_info( E const &, throw_file const & ); 6011: 6011: template 6011: E const & set_info( E const &, throw_line const & ); 6011: } 6011: 6011: 6011: 6011: #pragma GCC visibility push (default) 6011: 6011: 6011: class 6011: exception 6011: { 6011: 6011: public: 6011: template void set( typename Tag::type const & ); 6011: template typename Tag::type const * get() const; 6011: 6011: 6011: protected: 6011: 6011: exception(): 6011: throw_function_(0), 6011: throw_file_(0), 6011: throw_line_(-1) 6011: { 6011: } 6011: # 254 "/usr/include/boost/exception/exception.hpp" 3 6011: virtual ~exception() throw() 6011: 6011: = 0 6011: 6011: ; 6011: 6011: 6011: 6011: 6011: private: 6011: 6011: template 6011: friend E const & exception_detail::set_info( E const &, throw_function const & ); 6011: 6011: template 6011: friend E const & exception_detail::set_info( E const &, throw_file const & ); 6011: 6011: template 6011: friend E const & exception_detail::set_info( E const &, throw_line const & ); 6011: 6011: template 6011: friend E const & exception_detail::set_info( E const &, error_info const & ); 6011: 6011: friend char const * exception_detail::get_diagnostic_information( exception const &, char const * ); 6011: 6011: template 6011: friend struct exception_detail::get_info; 6011: friend struct exception_detail::get_info; 6011: friend struct exception_detail::get_info; 6011: friend struct exception_detail::get_info; 6011: template 6011: friend struct exception_detail::set_info_rv; 6011: friend struct exception_detail::set_info_rv; 6011: friend struct exception_detail::set_info_rv; 6011: friend struct exception_detail::set_info_rv; 6011: friend void exception_detail::copy_boost_exception( exception *, exception const * ); 6011: 6011: mutable exception_detail::refcount_ptr data_; 6011: mutable char const * throw_function_; 6011: mutable char const * throw_file_; 6011: mutable int throw_line_; 6011: }; 6011: 6011: 6011: #pragma GCC visibility pop 6011: 6011: 6011: 6011: inline 6011: exception:: 6011: ~exception() throw() 6011: { 6011: } 6011: 6011: namespace 6011: exception_detail 6011: { 6011: template 6011: E const & 6011: set_info( E const & x, throw_function const & y ) 6011: { 6011: x.throw_function_=y.v_; 6011: return x; 6011: } 6011: 6011: template 6011: E const & 6011: set_info( E const & x, throw_file const & y ) 6011: { 6011: x.throw_file_=y.v_; 6011: return x; 6011: } 6011: 6011: template 6011: E const & 6011: set_info( E const & x, throw_line const & y ) 6011: { 6011: x.throw_line_=y.v_; 6011: return x; 6011: } 6011: } 6011: 6011: 6011: 6011: namespace 6011: exception_detail 6011: { 6011: 6011: 6011: #pragma GCC visibility push (default) 6011: 6011: 6011: template 6011: struct 6011: error_info_injector: 6011: public T, 6011: public exception 6011: { 6011: explicit 6011: error_info_injector( T const & x ): 6011: T(x) 6011: { 6011: } 6011: 6011: ~error_info_injector() throw() 6011: { 6011: } 6011: }; 6011: 6011: 6011: #pragma GCC visibility pop 6011: 6011: 6011: 6011: struct large_size { char c[256]; }; 6011: large_size dispatch_boost_exception( exception const * ); 6011: 6011: struct small_size { }; 6011: small_size dispatch_boost_exception( void const * ); 6011: 6011: template 6011: struct enable_error_info_helper; 6011: 6011: template 6011: struct 6011: enable_error_info_helper 6011: { 6011: typedef T type; 6011: }; 6011: 6011: template 6011: struct 6011: enable_error_info_helper 6011: { 6011: typedef error_info_injector type; 6011: }; 6011: 6011: template 6011: struct 6011: enable_error_info_return_type 6011: { 6011: typedef typename enable_error_info_helper(0)))>::type type; 6011: }; 6011: } 6011: 6011: template 6011: inline 6011: typename 6011: exception_detail::enable_error_info_return_type::type 6011: enable_error_info( T const & x ) 6011: { 6011: typedef typename exception_detail::enable_error_info_return_type::type rt; 6011: return rt(x); 6011: } 6011: 6011: 6011: 6011: namespace 6011: exception_detail 6011: { 6011: 6011: 6011: #pragma GCC visibility push (default) 6011: 6011: 6011: class 6011: clone_base 6011: { 6011: public: 6011: 6011: virtual clone_base const * clone() const = 0; 6011: virtual void rethrow() const = 0; 6011: 6011: virtual 6011: ~clone_base() throw() 6011: { 6011: } 6011: }; 6011: 6011: 6011: #pragma GCC visibility pop 6011: 6011: 6011: 6011: inline 6011: void 6011: copy_boost_exception( exception * a, exception const * b ) 6011: { 6011: refcount_ptr data; 6011: if( error_info_container * d=b->data_.get() ) 6011: data = d->clone(); 6011: a->throw_file_ = b->throw_file_; 6011: a->throw_line_ = b->throw_line_; 6011: a->throw_function_ = b->throw_function_; 6011: a->data_ = data; 6011: } 6011: 6011: inline 6011: void 6011: copy_boost_exception( void *, void const * ) 6011: { 6011: } 6011: 6011: 6011: 6011: #pragma GCC visibility push (default) 6011: 6011: 6011: template 6011: class 6011: clone_impl: 6011: public T, 6011: public virtual clone_base 6011: { 6011: struct clone_tag { }; 6011: clone_impl( clone_impl const & x, clone_tag ): 6011: T(x) 6011: { 6011: copy_boost_exception(this,&x); 6011: } 6011: 6011: public: 6011: 6011: explicit 6011: clone_impl( T const & x ): 6011: T(x) 6011: { 6011: copy_boost_exception(this,&x); 6011: } 6011: 6011: ~clone_impl() throw() 6011: { 6011: } 6011: 6011: private: 6011: 6011: clone_base const * 6011: clone() const 6011: { 6011: return new clone_impl(*this,clone_tag()); 6011: } 6011: 6011: void 6011: rethrow() const 6011: { 6011: throw*this; 6011: } 6011: }; 6011: } 6011: 6011: 6011: #pragma GCC visibility pop 6011: 6011: 6011: 6011: template 6011: inline 6011: exception_detail::clone_impl 6011: enable_current_exception( T const & x ) 6011: { 6011: return exception_detail::clone_impl(x); 6011: } 6011: } 6011: # 43 "/usr/include/boost/throw_exception.hpp" 2 3 6011: 6011: # 1 "/usr/include/boost/current_function.hpp" 1 3 4 6011: # 22 "/usr/include/boost/current_function.hpp" 3 4 6011: namespace boost 6011: { 6011: 6011: namespace detail 6011: { 6011: 6011: inline void current_function_helper() 6011: { 6011: # 69 "/usr/include/boost/current_function.hpp" 3 4 6011: } 6011: 6011: } 6011: 6011: } 6011: # 45 "/usr/include/boost/throw_exception.hpp" 2 3 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: namespace boost 6011: { 6011: 6011: 6011: 6011: 6011: 6011: 6011: inline void throw_exception_assert_compatibility( std::exception const & ) { } 6011: 6011: template __attribute__ ((__noreturn__)) inline void throw_exception( E const & e ) 6011: { 6011: 6011: 6011: throw_exception_assert_compatibility(e); 6011: 6011: 6011: throw enable_current_exception(enable_error_info(e)); 6011: 6011: 6011: 6011: } 6011: 6011: 6011: 6011: 6011: namespace 6011: exception_detail 6011: { 6011: template 6011: __attribute__ ((__noreturn__)) 6011: void 6011: throw_exception_( E const & x, char const * current_function, char const * file, int line ) 6011: { 6011: boost::throw_exception( 6011: set_info( 6011: set_info( 6011: set_info( 6011: enable_error_info(x), 6011: throw_function(current_function)), 6011: throw_file(file)), 6011: throw_line(line))); 6011: } 6011: } 6011: 6011: } 6011: # 42 "/usr/include/boost/regex/v4/regex_workaround.hpp" 2 3 4 6011: # 1 "/usr/include/boost/scoped_ptr.hpp" 1 3 4 6011: # 13 "/usr/include/boost/scoped_ptr.hpp" 3 4 6011: # 1 "/usr/include/boost/smart_ptr/scoped_ptr.hpp" 1 3 4 6011: # 14 "/usr/include/boost/smart_ptr/scoped_ptr.hpp" 3 4 6011: # 1 "/usr/include/boost/assert.hpp" 1 3 4 6011: # 58 "/usr/include/boost/assert.hpp" 3 4 6011: # 1 "/usr/include/assert.h" 1 3 4 6011: # 59 "/usr/include/boost/assert.hpp" 2 3 4 6011: # 15 "/usr/include/boost/smart_ptr/scoped_ptr.hpp" 2 3 4 6011: # 1 "/usr/include/boost/checked_delete.hpp" 1 3 4 6011: # 15 "/usr/include/boost/checked_delete.hpp" 3 4 6011: # 1 "/usr/include/boost/core/checked_delete.hpp" 1 3 4 6011: # 24 "/usr/include/boost/core/checked_delete.hpp" 3 4 6011: namespace boost 6011: { 6011: 6011: 6011: 6011: template inline void checked_delete(T * x) 6011: { 6011: 6011: typedef char type_must_be_complete[ sizeof(T)? 1: -1 ]; 6011: (void) sizeof(type_must_be_complete); 6011: delete x; 6011: } 6011: 6011: template inline void checked_array_delete(T * x) 6011: { 6011: typedef char type_must_be_complete[ sizeof(T)? 1: -1 ]; 6011: (void) sizeof(type_must_be_complete); 6011: delete [] x; 6011: } 6011: 6011: template struct checked_deleter 6011: { 6011: typedef void result_type; 6011: typedef T * argument_type; 6011: 6011: void operator()(T * x) const 6011: { 6011: 6011: boost::checked_delete(x); 6011: } 6011: }; 6011: 6011: template struct checked_array_deleter 6011: { 6011: typedef void result_type; 6011: typedef T * argument_type; 6011: 6011: void operator()(T * x) const 6011: { 6011: boost::checked_array_delete(x); 6011: } 6011: }; 6011: 6011: } 6011: # 16 "/usr/include/boost/checked_delete.hpp" 2 3 4 6011: # 16 "/usr/include/boost/smart_ptr/scoped_ptr.hpp" 2 3 4 6011: # 1 "/usr/include/boost/smart_ptr/detail/sp_nullptr_t.hpp" 1 3 4 6011: # 23 "/usr/include/boost/smart_ptr/detail/sp_nullptr_t.hpp" 3 4 6011: namespace boost 6011: { 6011: 6011: namespace detail 6011: { 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: typedef std::nullptr_t sp_nullptr_t; 6011: 6011: 6011: 6011: } 6011: 6011: } 6011: # 17 "/usr/include/boost/smart_ptr/scoped_ptr.hpp" 2 3 4 6011: # 1 "/usr/include/boost/smart_ptr/detail/sp_disable_deprecated.hpp" 1 3 4 6011: # 18 "/usr/include/boost/smart_ptr/scoped_ptr.hpp" 2 3 4 6011: # 1 "/usr/include/boost/smart_ptr/detail/sp_noexcept.hpp" 1 3 4 6011: # 19 "/usr/include/boost/smart_ptr/scoped_ptr.hpp" 2 3 4 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: #pragma GCC diagnostic push 6011: #pragma GCC diagnostic ignored "-Wdeprecated-declarations" 6011: 6011: 6011: namespace boost 6011: { 6011: # 47 "/usr/include/boost/smart_ptr/scoped_ptr.hpp" 3 4 6011: template class scoped_ptr 6011: { 6011: private: 6011: 6011: T * px; 6011: 6011: scoped_ptr(scoped_ptr const &); 6011: scoped_ptr & operator=(scoped_ptr const &); 6011: 6011: typedef scoped_ptr this_type; 6011: 6011: void operator==( scoped_ptr const& ) const; 6011: void operator!=( scoped_ptr const& ) const; 6011: 6011: public: 6011: 6011: typedef T element_type; 6011: 6011: explicit scoped_ptr( T * p = 0 ) noexcept : px( p ) 6011: { 6011: 6011: 6011: 6011: } 6011: 6011: 6011: 6011: explicit scoped_ptr( std::auto_ptr p ) noexcept : px( p.release() ) 6011: { 6011: 6011: 6011: 6011: } 6011: 6011: 6011: 6011: ~scoped_ptr() noexcept 6011: { 6011: 6011: 6011: 6011: boost::checked_delete( px ); 6011: } 6011: 6011: void reset(T * p = 0) noexcept 6011: { 6011: (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__)); 6011: this_type(p).swap(*this); 6011: } 6011: 6011: T & operator*() const noexcept 6011: { 6011: (static_cast (px != 0) ? void (0) : __assert_fail ("px != 0", "/usr/include/boost/smart_ptr/scoped_ptr.hpp", 99, __extension__ __PRETTY_FUNCTION__)); 6011: return *px; 6011: } 6011: 6011: T * operator->() const noexcept 6011: { 6011: (static_cast (px != 0) ? void (0) : __assert_fail ("px != 0", "/usr/include/boost/smart_ptr/scoped_ptr.hpp", 105, __extension__ __PRETTY_FUNCTION__)); 6011: return px; 6011: } 6011: 6011: T * get() const noexcept 6011: { 6011: return px; 6011: } 6011: 6011: 6011: # 1 "/usr/include/boost/smart_ptr/detail/operator_bool.hpp" 1 3 4 6011: # 12 "/usr/include/boost/smart_ptr/detail/operator_bool.hpp" 3 4 6011: explicit operator bool () const noexcept 6011: { 6011: return px != 0; 6011: } 6011: # 61 "/usr/include/boost/smart_ptr/detail/operator_bool.hpp" 3 4 6011: bool operator! () const noexcept 6011: { 6011: return px == 0; 6011: } 6011: # 116 "/usr/include/boost/smart_ptr/scoped_ptr.hpp" 2 3 4 6011: 6011: void swap(scoped_ptr & b) noexcept 6011: { 6011: T * tmp = b.px; 6011: b.px = px; 6011: px = tmp; 6011: } 6011: }; 6011: 6011: 6011: 6011: template inline bool operator==( scoped_ptr const & p, boost::detail::sp_nullptr_t ) noexcept 6011: { 6011: return p.get() == 0; 6011: } 6011: 6011: template inline bool operator==( boost::detail::sp_nullptr_t, scoped_ptr const & p ) noexcept 6011: { 6011: return p.get() == 0; 6011: } 6011: 6011: template inline bool operator!=( scoped_ptr const & p, boost::detail::sp_nullptr_t ) noexcept 6011: { 6011: return p.get() != 0; 6011: } 6011: 6011: template inline bool operator!=( boost::detail::sp_nullptr_t, scoped_ptr const & p ) noexcept 6011: { 6011: return p.get() != 0; 6011: } 6011: 6011: 6011: 6011: template inline void swap(scoped_ptr & a, scoped_ptr & b) noexcept 6011: { 6011: a.swap(b); 6011: } 6011: 6011: 6011: 6011: template inline T * get_pointer(scoped_ptr const & p) noexcept 6011: { 6011: return p.get(); 6011: } 6011: 6011: } 6011: 6011: 6011: #pragma GCC diagnostic pop 6011: # 14 "/usr/include/boost/scoped_ptr.hpp" 2 3 4 6011: # 43 "/usr/include/boost/regex/v4/regex_workaround.hpp" 2 3 4 6011: # 1 "/usr/include/boost/scoped_array.hpp" 1 3 4 6011: # 13 "/usr/include/boost/scoped_array.hpp" 3 4 6011: # 1 "/usr/include/boost/smart_ptr/scoped_array.hpp" 1 3 4 6011: # 14 "/usr/include/boost/smart_ptr/scoped_array.hpp" 3 4 6011: # 1 "/usr/include/boost/assert.hpp" 1 3 4 6011: # 58 "/usr/include/boost/assert.hpp" 3 4 6011: # 1 "/usr/include/assert.h" 1 3 4 6011: # 59 "/usr/include/boost/assert.hpp" 2 3 4 6011: # 15 "/usr/include/boost/smart_ptr/scoped_array.hpp" 2 3 4 6011: # 23 "/usr/include/boost/smart_ptr/scoped_array.hpp" 3 4 6011: namespace boost 6011: { 6011: # 39 "/usr/include/boost/smart_ptr/scoped_array.hpp" 3 4 6011: template class scoped_array 6011: { 6011: private: 6011: 6011: T * px; 6011: 6011: scoped_array(scoped_array const &); 6011: scoped_array & operator=(scoped_array const &); 6011: 6011: typedef scoped_array this_type; 6011: 6011: void operator==( scoped_array const& ) const; 6011: void operator!=( scoped_array const& ) const; 6011: 6011: public: 6011: 6011: typedef T element_type; 6011: 6011: explicit scoped_array( T * p = 0 ) noexcept : px( p ) 6011: { 6011: 6011: 6011: 6011: } 6011: 6011: ~scoped_array() noexcept 6011: { 6011: 6011: 6011: 6011: boost::checked_array_delete( px ); 6011: } 6011: 6011: void reset(T * p = 0) noexcept 6011: { 6011: (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__)); 6011: this_type(p).swap(*this); 6011: } 6011: 6011: T & operator[](std::ptrdiff_t i) const noexcept 6011: { 6011: (static_cast (px != 0) ? void (0) : __assert_fail ("px != 0", "/usr/include/boost/smart_ptr/scoped_array.hpp", 80, __extension__ __PRETTY_FUNCTION__)); 6011: (static_cast (i >= 0) ? void (0) : __assert_fail ("i >= 0", "/usr/include/boost/smart_ptr/scoped_array.hpp", 81, __extension__ __PRETTY_FUNCTION__)); 6011: return px[i]; 6011: } 6011: 6011: T * get() const noexcept 6011: { 6011: return px; 6011: } 6011: 6011: 6011: # 1 "/usr/include/boost/smart_ptr/detail/operator_bool.hpp" 1 3 4 6011: # 12 "/usr/include/boost/smart_ptr/detail/operator_bool.hpp" 3 4 6011: explicit operator bool () const noexcept 6011: { 6011: return px != 0; 6011: } 6011: # 61 "/usr/include/boost/smart_ptr/detail/operator_bool.hpp" 3 4 6011: bool operator! () const noexcept 6011: { 6011: return px == 0; 6011: } 6011: # 92 "/usr/include/boost/smart_ptr/scoped_array.hpp" 2 3 4 6011: 6011: void swap(scoped_array & b) noexcept 6011: { 6011: T * tmp = b.px; 6011: b.px = px; 6011: px = tmp; 6011: } 6011: }; 6011: 6011: 6011: 6011: template inline bool operator==( scoped_array const & p, boost::detail::sp_nullptr_t ) noexcept 6011: { 6011: return p.get() == 0; 6011: } 6011: 6011: template inline bool operator==( boost::detail::sp_nullptr_t, scoped_array const & p ) noexcept 6011: { 6011: return p.get() == 0; 6011: } 6011: 6011: template inline bool operator!=( scoped_array const & p, boost::detail::sp_nullptr_t ) noexcept 6011: { 6011: return p.get() != 0; 6011: } 6011: 6011: template inline bool operator!=( boost::detail::sp_nullptr_t, scoped_array const & p ) noexcept 6011: { 6011: return p.get() != 0; 6011: } 6011: 6011: 6011: 6011: template inline void swap(scoped_array & a, scoped_array & b) noexcept 6011: { 6011: a.swap(b); 6011: } 6011: 6011: } 6011: # 14 "/usr/include/boost/scoped_array.hpp" 2 3 4 6011: # 44 "/usr/include/boost/regex/v4/regex_workaround.hpp" 2 3 4 6011: # 1 "/usr/include/boost/shared_ptr.hpp" 1 3 4 6011: # 17 "/usr/include/boost/shared_ptr.hpp" 3 4 6011: # 1 "/usr/include/boost/smart_ptr/shared_ptr.hpp" 1 3 4 6011: # 23 "/usr/include/boost/smart_ptr/shared_ptr.hpp" 3 4 6011: # 1 "/usr/include/boost/config/no_tr1/memory.hpp" 1 3 4 6011: # 24 "/usr/include/boost/smart_ptr/shared_ptr.hpp" 2 3 4 6011: 6011: # 1 "/usr/include/boost/assert.hpp" 1 3 4 6011: # 58 "/usr/include/boost/assert.hpp" 3 4 6011: # 1 "/usr/include/assert.h" 1 3 4 6011: # 59 "/usr/include/boost/assert.hpp" 2 3 4 6011: # 26 "/usr/include/boost/smart_ptr/shared_ptr.hpp" 2 3 4 6011: 6011: 6011: # 1 "/usr/include/boost/smart_ptr/detail/shared_count.hpp" 1 3 4 6011: # 28 "/usr/include/boost/smart_ptr/detail/shared_count.hpp" 3 4 6011: # 1 "/usr/include/boost/smart_ptr/bad_weak_ptr.hpp" 1 3 4 6011: # 27 "/usr/include/boost/smart_ptr/bad_weak_ptr.hpp" 3 4 6011: namespace boost 6011: { 6011: # 46 "/usr/include/boost/smart_ptr/bad_weak_ptr.hpp" 3 4 6011: class bad_weak_ptr: public std::exception 6011: { 6011: public: 6011: 6011: virtual char const * what() const throw() 6011: { 6011: return "tr1::bad_weak_ptr"; 6011: } 6011: }; 6011: # 64 "/usr/include/boost/smart_ptr/bad_weak_ptr.hpp" 3 4 6011: } 6011: # 29 "/usr/include/boost/smart_ptr/detail/shared_count.hpp" 2 3 4 6011: # 1 "/usr/include/boost/smart_ptr/detail/sp_counted_base.hpp" 1 3 4 6011: # 21 "/usr/include/boost/smart_ptr/detail/sp_counted_base.hpp" 3 4 6011: # 1 "/usr/include/boost/smart_ptr/detail/sp_has_sync.hpp" 1 3 4 6011: # 22 "/usr/include/boost/smart_ptr/detail/sp_counted_base.hpp" 2 3 4 6011: # 48 "/usr/include/boost/smart_ptr/detail/sp_counted_base.hpp" 3 4 6011: # 1 "/usr/include/boost/smart_ptr/detail/sp_counted_base_std_atomic.hpp" 1 3 4 6011: # 18 "/usr/include/boost/smart_ptr/detail/sp_counted_base_std_atomic.hpp" 3 4 6011: # 1 "/usr/include/boost/detail/sp_typeinfo.hpp" 1 3 4 6011: # 20 "/usr/include/boost/detail/sp_typeinfo.hpp" 3 4 6011: # 1 "/usr/include/boost/core/typeinfo.hpp" 1 3 4 6011: # 119 "/usr/include/boost/core/typeinfo.hpp" 3 4 6011: # 1 "/usr/include/boost/core/demangle.hpp" 1 3 4 6011: # 17 "/usr/include/boost/core/demangle.hpp" 3 4 6011: 6011: # 32 "/usr/include/boost/core/demangle.hpp" 3 4 6011: # 1 "/usr/include/c++/8/cxxabi.h" 1 3 4 6011: # 44 "/usr/include/c++/8/cxxabi.h" 3 4 6011: 6011: # 45 "/usr/include/c++/8/cxxabi.h" 3 6011: 6011: #pragma GCC visibility push(default) 6011: 6011: # 1 "/usr/lib/gcc/arm-linux-gnueabihf/8/include/stddef.h" 1 3 4 6011: # 49 "/usr/include/c++/8/cxxabi.h" 2 3 6011: 6011: # 1 "/usr/include/arm-linux-gnueabihf/c++/8/bits/cxxabi_tweaks.h" 1 3 6011: # 34 "/usr/include/arm-linux-gnueabihf/c++/8/bits/cxxabi_tweaks.h" 3 6011: namespace __cxxabiv1 6011: { 6011: extern "C" 6011: { 6011: # 48 "/usr/include/arm-linux-gnueabihf/c++/8/bits/cxxabi_tweaks.h" 3 6011: typedef int __guard; 6011: 6011: 6011: 6011: 6011: 6011: typedef void * __cxa_vec_ctor_return_type; 6011: 6011: 6011: typedef void * __cxa_cdtor_return_type; 6011: # 78 "/usr/include/arm-linux-gnueabihf/c++/8/bits/cxxabi_tweaks.h" 3 6011: } 6011: } 6011: # 51 "/usr/include/c++/8/cxxabi.h" 2 3 6011: 6011: 6011: 6011: 6011: namespace __cxxabiv1 6011: { 6011: extern "C" 6011: { 6011: 6011: 6011: typedef __cxa_cdtor_return_type (*__cxa_cdtor_type)(void *); 6011: 6011: 6011: void* 6011: __cxa_vec_new(size_t __element_count, size_t __element_size, 6011: size_t __padding_size, __cxa_cdtor_type __constructor, 6011: __cxa_cdtor_type __destructor); 6011: 6011: void* 6011: __cxa_vec_new2(size_t __element_count, size_t __element_size, 6011: size_t __padding_size, __cxa_cdtor_type __constructor, 6011: __cxa_cdtor_type __destructor, void *(*__alloc) (size_t), 6011: void (*__dealloc) (void*)); 6011: 6011: void* 6011: __cxa_vec_new3(size_t __element_count, size_t __element_size, 6011: size_t __padding_size, __cxa_cdtor_type __constructor, 6011: __cxa_cdtor_type __destructor, void *(*__alloc) (size_t), 6011: void (*__dealloc) (void*, size_t)); 6011: 6011: 6011: __cxa_vec_ctor_return_type 6011: __cxa_vec_ctor(void* __array_address, size_t __element_count, 6011: size_t __element_size, __cxa_cdtor_type __constructor, 6011: __cxa_cdtor_type __destructor); 6011: 6011: __cxa_vec_ctor_return_type 6011: __cxa_vec_cctor(void* __dest_array, void* __src_array, 6011: size_t __element_count, size_t __element_size, 6011: __cxa_cdtor_return_type (*__constructor) (void*, void*), 6011: __cxa_cdtor_type __destructor); 6011: 6011: 6011: void 6011: __cxa_vec_dtor(void* __array_address, size_t __element_count, 6011: size_t __element_size, __cxa_cdtor_type __destructor); 6011: 6011: void 6011: __cxa_vec_cleanup(void* __array_address, size_t __element_count, size_t __s, 6011: __cxa_cdtor_type __destructor) noexcept; 6011: 6011: 6011: void 6011: __cxa_vec_delete(void* __array_address, size_t __element_size, 6011: size_t __padding_size, __cxa_cdtor_type __destructor); 6011: 6011: void 6011: __cxa_vec_delete2(void* __array_address, size_t __element_size, 6011: size_t __padding_size, __cxa_cdtor_type __destructor, 6011: void (*__dealloc) (void*)); 6011: 6011: void 6011: __cxa_vec_delete3(void* __array_address, size_t __element_size, 6011: size_t __padding_size, __cxa_cdtor_type __destructor, 6011: void (*__dealloc) (void*, size_t)); 6011: 6011: int 6011: __cxa_guard_acquire(__guard*); 6011: 6011: void 6011: __cxa_guard_release(__guard*) noexcept; 6011: 6011: void 6011: __cxa_guard_abort(__guard*) noexcept; 6011: 6011: 6011: int 6011: __cxa_atexit(void (*)(void*), void*, void*) noexcept; 6011: 6011: int 6011: __cxa_finalize(void*); 6011: 6011: 6011: int 6011: __cxa_thread_atexit(void (*)(void*), void*, void *) noexcept; 6011: 6011: 6011: void 6011: __cxa_pure_virtual(void) __attribute__ ((__noreturn__)); 6011: 6011: void 6011: __cxa_deleted_virtual(void) __attribute__ ((__noreturn__)); 6011: 6011: 6011: void 6011: __cxa_bad_cast() __attribute__((__noreturn__)); 6011: 6011: void 6011: __cxa_bad_typeid() __attribute__((__noreturn__)); 6011: 6011: void 6011: __cxa_throw_bad_array_new_length() __attribute__((__noreturn__)); 6011: # 194 "/usr/include/c++/8/cxxabi.h" 3 6011: char* 6011: __cxa_demangle(const char* __mangled_name, char* __output_buffer, 6011: size_t* __length, int* __status); 6011: 6011: 6011: } 6011: } 6011: 6011: 6011: 6011: 6011: 6011: 6011: namespace __cxxabiv1 6011: { 6011: 6011: class __fundamental_type_info : public std::type_info 6011: { 6011: public: 6011: explicit 6011: __fundamental_type_info(const char* __n) : std::type_info(__n) { } 6011: 6011: virtual 6011: ~__fundamental_type_info(); 6011: }; 6011: 6011: 6011: class __array_type_info : public std::type_info 6011: { 6011: public: 6011: explicit 6011: __array_type_info(const char* __n) : std::type_info(__n) { } 6011: 6011: virtual 6011: ~__array_type_info(); 6011: }; 6011: 6011: 6011: class __function_type_info : public std::type_info 6011: { 6011: public: 6011: explicit 6011: __function_type_info(const char* __n) : std::type_info(__n) { } 6011: 6011: virtual 6011: ~__function_type_info(); 6011: 6011: protected: 6011: 6011: virtual bool 6011: __is_function_p() const; 6011: }; 6011: 6011: 6011: class __enum_type_info : public std::type_info 6011: { 6011: public: 6011: explicit 6011: __enum_type_info(const char* __n) : std::type_info(__n) { } 6011: 6011: virtual 6011: ~__enum_type_info(); 6011: }; 6011: 6011: 6011: class __pbase_type_info : public std::type_info 6011: { 6011: public: 6011: unsigned int __flags; 6011: const std::type_info* __pointee; 6011: 6011: explicit 6011: __pbase_type_info(const char* __n, int __quals, 6011: const std::type_info* __type) 6011: : std::type_info(__n), __flags(__quals), __pointee(__type) 6011: { } 6011: 6011: virtual 6011: ~__pbase_type_info(); 6011: 6011: 6011: enum __masks 6011: { 6011: __const_mask = 0x1, 6011: __volatile_mask = 0x2, 6011: __restrict_mask = 0x4, 6011: __incomplete_mask = 0x8, 6011: __incomplete_class_mask = 0x10, 6011: __transaction_safe_mask = 0x20, 6011: __noexcept_mask = 0x40 6011: }; 6011: 6011: protected: 6011: __pbase_type_info(const __pbase_type_info&); 6011: 6011: __pbase_type_info& 6011: operator=(const __pbase_type_info&); 6011: 6011: 6011: virtual bool 6011: __do_catch(const std::type_info* __thr_type, void** __thr_obj, 6011: unsigned int __outer) const; 6011: 6011: inline virtual bool 6011: __pointer_catch(const __pbase_type_info* __thr_type, void** __thr_obj, 6011: unsigned __outer) const; 6011: }; 6011: 6011: inline bool __pbase_type_info:: 6011: __pointer_catch (const __pbase_type_info *thrown_type, 6011: void **thr_obj, 6011: unsigned outer) const 6011: { 6011: return __pointee->__do_catch (thrown_type->__pointee, thr_obj, outer + 2); 6011: } 6011: 6011: 6011: class __pointer_type_info : public __pbase_type_info 6011: { 6011: public: 6011: explicit 6011: __pointer_type_info(const char* __n, int __quals, 6011: const std::type_info* __type) 6011: : __pbase_type_info (__n, __quals, __type) { } 6011: 6011: 6011: virtual 6011: ~__pointer_type_info(); 6011: 6011: protected: 6011: 6011: virtual bool 6011: __is_pointer_p() const; 6011: 6011: virtual bool 6011: __pointer_catch(const __pbase_type_info* __thr_type, void** __thr_obj, 6011: unsigned __outer) const; 6011: }; 6011: 6011: class __class_type_info; 6011: 6011: 6011: class __pointer_to_member_type_info : public __pbase_type_info 6011: { 6011: public: 6011: __class_type_info* __context; 6011: 6011: explicit 6011: __pointer_to_member_type_info(const char* __n, int __quals, 6011: const std::type_info* __type, 6011: __class_type_info* __klass) 6011: : __pbase_type_info(__n, __quals, __type), __context(__klass) { } 6011: 6011: virtual 6011: ~__pointer_to_member_type_info(); 6011: 6011: protected: 6011: __pointer_to_member_type_info(const __pointer_to_member_type_info&); 6011: 6011: __pointer_to_member_type_info& 6011: operator=(const __pointer_to_member_type_info&); 6011: 6011: 6011: virtual bool 6011: __pointer_catch(const __pbase_type_info* __thr_type, void** __thr_obj, 6011: unsigned __outer) const; 6011: }; 6011: 6011: 6011: class __base_class_type_info 6011: { 6011: public: 6011: const __class_type_info* __base_type; 6011: 6011: 6011: 6011: long __offset_flags; 6011: 6011: 6011: enum __offset_flags_masks 6011: { 6011: __virtual_mask = 0x1, 6011: __public_mask = 0x2, 6011: __hwm_bit = 2, 6011: __offset_shift = 8 6011: }; 6011: 6011: 6011: bool 6011: __is_virtual_p() const 6011: { return __offset_flags & __virtual_mask; } 6011: 6011: bool 6011: __is_public_p() const 6011: { return __offset_flags & __public_mask; } 6011: 6011: ptrdiff_t 6011: __offset() const 6011: { 6011: 6011: 6011: 6011: return static_cast(__offset_flags) >> __offset_shift; 6011: } 6011: }; 6011: 6011: 6011: class __class_type_info : public std::type_info 6011: { 6011: public: 6011: explicit 6011: __class_type_info (const char *__n) : type_info(__n) { } 6011: 6011: virtual 6011: ~__class_type_info (); 6011: 6011: 6011: 6011: 6011: 6011: 6011: enum __sub_kind 6011: { 6011: 6011: __unknown = 0, 6011: 6011: 6011: 6011: __not_contained, 6011: 6011: 6011: __contained_ambig, 6011: 6011: 6011: __contained_virtual_mask = __base_class_type_info::__virtual_mask, 6011: 6011: 6011: __contained_public_mask = __base_class_type_info::__public_mask, 6011: 6011: 6011: __contained_mask = 1 << __base_class_type_info::__hwm_bit, 6011: 6011: __contained_private = __contained_mask, 6011: __contained_public = __contained_mask | __contained_public_mask 6011: }; 6011: 6011: struct __upcast_result; 6011: struct __dyncast_result; 6011: 6011: protected: 6011: 6011: virtual bool 6011: __do_upcast(const __class_type_info* __dst_type, void**__obj_ptr) const; 6011: 6011: virtual bool 6011: __do_catch(const type_info* __thr_type, void** __thr_obj, 6011: unsigned __outer) const; 6011: 6011: public: 6011: 6011: 6011: virtual bool 6011: __do_upcast(const __class_type_info* __dst, const void* __obj, 6011: __upcast_result& __restrict __result) const; 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: inline __sub_kind 6011: __find_public_src(ptrdiff_t __src2dst, const void* __obj_ptr, 6011: const __class_type_info* __src_type, 6011: const void* __src_ptr) const; 6011: # 477 "/usr/include/c++/8/cxxabi.h" 3 6011: virtual bool 6011: __do_dyncast(ptrdiff_t __src2dst, __sub_kind __access_path, 6011: const __class_type_info* __dst_type, const void* __obj_ptr, 6011: const __class_type_info* __src_type, const void* __src_ptr, 6011: __dyncast_result& __result) const; 6011: 6011: 6011: 6011: 6011: 6011: virtual __sub_kind 6011: __do_find_public_src(ptrdiff_t __src2dst, const void* __obj_ptr, 6011: const __class_type_info* __src_type, 6011: const void* __src_ptr) const; 6011: }; 6011: 6011: 6011: class __si_class_type_info : public __class_type_info 6011: { 6011: public: 6011: const __class_type_info* __base_type; 6011: 6011: explicit 6011: __si_class_type_info(const char *__n, const __class_type_info *__base) 6011: : __class_type_info(__n), __base_type(__base) { } 6011: 6011: virtual 6011: ~__si_class_type_info(); 6011: 6011: protected: 6011: __si_class_type_info(const __si_class_type_info&); 6011: 6011: __si_class_type_info& 6011: operator=(const __si_class_type_info&); 6011: 6011: 6011: virtual bool 6011: __do_dyncast(ptrdiff_t __src2dst, __sub_kind __access_path, 6011: const __class_type_info* __dst_type, const void* __obj_ptr, 6011: const __class_type_info* __src_type, const void* __src_ptr, 6011: __dyncast_result& __result) const; 6011: 6011: virtual __sub_kind 6011: __do_find_public_src(ptrdiff_t __src2dst, const void* __obj_ptr, 6011: const __class_type_info* __src_type, 6011: const void* __sub_ptr) const; 6011: 6011: virtual bool 6011: __do_upcast(const __class_type_info*__dst, const void*__obj, 6011: __upcast_result& __restrict __result) const; 6011: }; 6011: 6011: 6011: class __vmi_class_type_info : public __class_type_info 6011: { 6011: public: 6011: unsigned int __flags; 6011: unsigned int __base_count; 6011: 6011: 6011: 6011: 6011: __base_class_type_info __base_info[1]; 6011: 6011: explicit 6011: __vmi_class_type_info(const char* __n, int ___flags) 6011: : __class_type_info(__n), __flags(___flags), __base_count(0) { } 6011: 6011: virtual 6011: ~__vmi_class_type_info(); 6011: 6011: 6011: enum __flags_masks 6011: { 6011: __non_diamond_repeat_mask = 0x1, 6011: __diamond_shaped_mask = 0x2, 6011: __flags_unknown_mask = 0x10 6011: }; 6011: 6011: protected: 6011: 6011: virtual bool 6011: __do_dyncast(ptrdiff_t __src2dst, __sub_kind __access_path, 6011: const __class_type_info* __dst_type, const void* __obj_ptr, 6011: const __class_type_info* __src_type, const void* __src_ptr, 6011: __dyncast_result& __result) const; 6011: 6011: virtual __sub_kind 6011: __do_find_public_src(ptrdiff_t __src2dst, const void* __obj_ptr, 6011: const __class_type_info* __src_type, 6011: const void* __src_ptr) const; 6011: 6011: virtual bool 6011: __do_upcast(const __class_type_info* __dst, const void* __obj, 6011: __upcast_result& __restrict __result) const; 6011: }; 6011: 6011: 6011: struct __cxa_exception; 6011: struct __cxa_refcounted_exception; 6011: struct __cxa_dependent_exception; 6011: struct __cxa_eh_globals; 6011: 6011: extern "C" 6011: { 6011: # 590 "/usr/include/c++/8/cxxabi.h" 3 6011: void* 6011: __dynamic_cast(const void* __src_ptr, 6011: const __class_type_info* __src_type, 6011: const __class_type_info* __dst_type, 6011: ptrdiff_t __src2dst); 6011: # 603 "/usr/include/c++/8/cxxabi.h" 3 6011: __cxa_eh_globals* 6011: __cxa_get_globals() noexcept __attribute__ ((__const__)); 6011: 6011: __cxa_eh_globals* 6011: __cxa_get_globals_fast() noexcept __attribute__ ((__const__)); 6011: 6011: 6011: void 6011: __cxa_free_exception(void*) noexcept; 6011: 6011: 6011: void 6011: __cxa_throw(void*, std::type_info*, void ( *) (void *)) 6011: __attribute__((__noreturn__)); 6011: 6011: 6011: void* 6011: __cxa_get_exception_ptr(void*) noexcept __attribute__ ((__pure__)); 6011: 6011: void* 6011: __cxa_begin_catch(void*) noexcept; 6011: 6011: void 6011: __cxa_end_catch(); 6011: 6011: void 6011: __cxa_rethrow() __attribute__((__noreturn__)); 6011: 6011: 6011: 6011: std::type_info* 6011: __cxa_current_exception_type() noexcept __attribute__ ((__pure__)); 6011: 6011: 6011: 6011: 6011: __cxa_dependent_exception* 6011: __cxa_allocate_dependent_exception() noexcept; 6011: 6011: 6011: void 6011: __cxa_free_dependent_exception(__cxa_dependent_exception*) noexcept; 6011: 6011: } 6011: 6011: 6011: 6011: class __foreign_exception 6011: { 6011: virtual ~__foreign_exception() throw(); 6011: virtual void __pure_dummy() = 0; 6011: }; 6011: 6011: } 6011: # 678 "/usr/include/c++/8/cxxabi.h" 3 6011: namespace abi = __cxxabiv1; 6011: 6011: namespace __gnu_cxx 6011: { 6011: # 694 "/usr/include/c++/8/cxxabi.h" 3 6011: class recursive_init_error: public std::exception 6011: { 6011: public: 6011: recursive_init_error() throw() { } 6011: virtual ~recursive_init_error() throw (); 6011: }; 6011: } 6011: 6011: 6011: #pragma GCC visibility pop 6011: # 33 "/usr/include/boost/core/demangle.hpp" 2 3 4 6011: 6011: 6011: 6011: 6011: 6011: 6011: # 1 "/usr/include/c++/8/cstdlib" 1 3 4 6011: # 39 "/usr/include/c++/8/cstdlib" 3 4 6011: 6011: # 40 "/usr/include/c++/8/cstdlib" 3 6011: # 40 "/usr/include/boost/core/demangle.hpp" 2 3 4 6011: 6011: 6011: 6011: 6011: namespace boost 6011: { 6011: 6011: namespace core 6011: { 6011: 6011: inline char const * demangle_alloc( char const * name ) noexcept; 6011: inline void demangle_free( char const * name ) noexcept; 6011: 6011: class scoped_demangled_name 6011: { 6011: private: 6011: char const * m_p; 6011: 6011: public: 6011: explicit scoped_demangled_name( char const * name ) noexcept : 6011: m_p( demangle_alloc( name ) ) 6011: { 6011: } 6011: 6011: ~scoped_demangled_name() noexcept 6011: { 6011: demangle_free( m_p ); 6011: } 6011: 6011: char const * get() const noexcept 6011: { 6011: return m_p; 6011: } 6011: 6011: scoped_demangled_name( scoped_demangled_name const& ) = delete; 6011: scoped_demangled_name& operator= ( scoped_demangled_name const& ) = delete; 6011: }; 6011: 6011: 6011: 6011: 6011: inline char const * demangle_alloc( char const * name ) noexcept 6011: { 6011: int status = 0; 6011: std::size_t size = 0; 6011: return abi::__cxa_demangle( name, __null, &size, &status ); 6011: } 6011: 6011: inline void demangle_free( char const * name ) noexcept 6011: { 6011: std::free( const_cast< char* >( name ) ); 6011: } 6011: 6011: inline std::string demangle( char const * name ) 6011: { 6011: scoped_demangled_name demangled_name( name ); 6011: char const * p = demangled_name.get(); 6011: if( !p ) 6011: p = name; 6011: return p; 6011: } 6011: # 120 "/usr/include/boost/core/demangle.hpp" 3 4 6011: } 6011: 6011: } 6011: # 120 "/usr/include/boost/core/typeinfo.hpp" 2 3 4 6011: 6011: 6011: namespace boost 6011: { 6011: 6011: namespace core 6011: { 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: typedef std::type_info typeinfo; 6011: 6011: 6011: 6011: inline std::string demangled_name( core::typeinfo const & ti ) 6011: { 6011: return core::demangle( ti.name() ); 6011: } 6011: 6011: } 6011: 6011: } 6011: # 21 "/usr/include/boost/detail/sp_typeinfo.hpp" 2 3 4 6011: 6011: namespace boost 6011: { 6011: 6011: namespace detail 6011: { 6011: 6011: typedef boost::core::typeinfo sp_typeinfo; 6011: 6011: } 6011: 6011: } 6011: # 19 "/usr/include/boost/smart_ptr/detail/sp_counted_base_std_atomic.hpp" 2 3 4 6011: # 1 "/usr/include/c++/8/atomic" 1 3 4 6011: # 35 "/usr/include/c++/8/atomic" 3 4 6011: 6011: # 36 "/usr/include/c++/8/atomic" 3 6011: # 44 "/usr/include/c++/8/atomic" 3 6011: namespace std __attribute__ ((__visibility__ ("default"))) 6011: { 6011: 6011: # 57 "/usr/include/c++/8/atomic" 3 6011: template 6011: struct atomic; 6011: 6011: 6011: 6011: template<> 6011: struct atomic 6011: { 6011: private: 6011: __atomic_base _M_base; 6011: 6011: public: 6011: atomic() noexcept = default; 6011: ~atomic() noexcept = default; 6011: atomic(const atomic&) = delete; 6011: atomic& operator=(const atomic&) = delete; 6011: atomic& operator=(const atomic&) volatile = delete; 6011: 6011: constexpr atomic(bool __i) noexcept : _M_base(__i) { } 6011: 6011: bool 6011: operator=(bool __i) noexcept 6011: { return _M_base.operator=(__i); } 6011: 6011: bool 6011: operator=(bool __i) volatile noexcept 6011: { return _M_base.operator=(__i); } 6011: 6011: operator bool() const noexcept 6011: { return _M_base.load(); } 6011: 6011: operator bool() const volatile noexcept 6011: { return _M_base.load(); } 6011: 6011: bool 6011: is_lock_free() const noexcept { return _M_base.is_lock_free(); } 6011: 6011: bool 6011: is_lock_free() const volatile noexcept { return _M_base.is_lock_free(); } 6011: 6011: 6011: 6011: 6011: 6011: void 6011: store(bool __i, memory_order __m = memory_order_seq_cst) noexcept 6011: { _M_base.store(__i, __m); } 6011: 6011: void 6011: store(bool __i, memory_order __m = memory_order_seq_cst) volatile noexcept 6011: { _M_base.store(__i, __m); } 6011: 6011: bool 6011: load(memory_order __m = memory_order_seq_cst) const noexcept 6011: { return _M_base.load(__m); } 6011: 6011: bool 6011: load(memory_order __m = memory_order_seq_cst) const volatile noexcept 6011: { return _M_base.load(__m); } 6011: 6011: bool 6011: exchange(bool __i, memory_order __m = memory_order_seq_cst) noexcept 6011: { return _M_base.exchange(__i, __m); } 6011: 6011: bool 6011: exchange(bool __i, 6011: memory_order __m = memory_order_seq_cst) volatile noexcept 6011: { return _M_base.exchange(__i, __m); } 6011: 6011: bool 6011: compare_exchange_weak(bool& __i1, bool __i2, memory_order __m1, 6011: memory_order __m2) noexcept 6011: { return _M_base.compare_exchange_weak(__i1, __i2, __m1, __m2); } 6011: 6011: bool 6011: compare_exchange_weak(bool& __i1, bool __i2, memory_order __m1, 6011: memory_order __m2) volatile noexcept 6011: { return _M_base.compare_exchange_weak(__i1, __i2, __m1, __m2); } 6011: 6011: bool 6011: compare_exchange_weak(bool& __i1, bool __i2, 6011: memory_order __m = memory_order_seq_cst) noexcept 6011: { return _M_base.compare_exchange_weak(__i1, __i2, __m); } 6011: 6011: bool 6011: compare_exchange_weak(bool& __i1, bool __i2, 6011: memory_order __m = memory_order_seq_cst) volatile noexcept 6011: { return _M_base.compare_exchange_weak(__i1, __i2, __m); } 6011: 6011: bool 6011: compare_exchange_strong(bool& __i1, bool __i2, memory_order __m1, 6011: memory_order __m2) noexcept 6011: { return _M_base.compare_exchange_strong(__i1, __i2, __m1, __m2); } 6011: 6011: bool 6011: compare_exchange_strong(bool& __i1, bool __i2, memory_order __m1, 6011: memory_order __m2) volatile noexcept 6011: { return _M_base.compare_exchange_strong(__i1, __i2, __m1, __m2); } 6011: 6011: bool 6011: compare_exchange_strong(bool& __i1, bool __i2, 6011: memory_order __m = memory_order_seq_cst) noexcept 6011: { return _M_base.compare_exchange_strong(__i1, __i2, __m); } 6011: 6011: bool 6011: compare_exchange_strong(bool& __i1, bool __i2, 6011: memory_order __m = memory_order_seq_cst) volatile noexcept 6011: { return _M_base.compare_exchange_strong(__i1, __i2, __m); } 6011: }; 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: template 6011: struct atomic 6011: { 6011: private: 6011: 6011: static constexpr int _S_min_alignment 6011: = (sizeof(_Tp) & (sizeof(_Tp) - 1)) || sizeof(_Tp) > 16 6011: ? 0 : sizeof(_Tp); 6011: 6011: static constexpr int _S_alignment 6011: = _S_min_alignment > alignof(_Tp) ? _S_min_alignment : alignof(_Tp); 6011: 6011: alignas(_S_alignment) _Tp _M_i; 6011: 6011: static_assert(__is_trivially_copyable(_Tp), 6011: "std::atomic requires a trivially copyable type"); 6011: 6011: static_assert(sizeof(_Tp) > 0, 6011: "Incomplete or zero-sized types are not supported"); 6011: 6011: public: 6011: atomic() noexcept = default; 6011: ~atomic() noexcept = default; 6011: atomic(const atomic&) = delete; 6011: atomic& operator=(const atomic&) = delete; 6011: atomic& operator=(const atomic&) volatile = delete; 6011: 6011: constexpr atomic(_Tp __i) noexcept : _M_i(__i) { } 6011: 6011: operator _Tp() const noexcept 6011: { return load(); } 6011: 6011: operator _Tp() const volatile noexcept 6011: { return load(); } 6011: 6011: _Tp 6011: operator=(_Tp __i) noexcept 6011: { store(__i); return __i; } 6011: 6011: _Tp 6011: operator=(_Tp __i) volatile noexcept 6011: { store(__i); return __i; } 6011: 6011: bool 6011: is_lock_free() const noexcept 6011: { 6011: 6011: return __atomic_is_lock_free(sizeof(_M_i), 6011: reinterpret_cast(-__alignof(_M_i))); 6011: } 6011: 6011: bool 6011: is_lock_free() const volatile noexcept 6011: { 6011: 6011: return __atomic_is_lock_free(sizeof(_M_i), 6011: reinterpret_cast(-__alignof(_M_i))); 6011: } 6011: 6011: 6011: 6011: 6011: 6011: 6011: void 6011: store(_Tp __i, memory_order __m = memory_order_seq_cst) noexcept 6011: { __atomic_store(std::__addressof(_M_i), std::__addressof(__i), __m); } 6011: 6011: void 6011: store(_Tp __i, memory_order __m = memory_order_seq_cst) volatile noexcept 6011: { __atomic_store(std::__addressof(_M_i), std::__addressof(__i), __m); } 6011: 6011: _Tp 6011: load(memory_order __m = memory_order_seq_cst) const noexcept 6011: { 6011: alignas(_Tp) unsigned char __buf[sizeof(_Tp)]; 6011: _Tp* __ptr = reinterpret_cast<_Tp*>(__buf); 6011: __atomic_load(std::__addressof(_M_i), __ptr, __m); 6011: return *__ptr; 6011: } 6011: 6011: _Tp 6011: load(memory_order __m = memory_order_seq_cst) const volatile noexcept 6011: { 6011: alignas(_Tp) unsigned char __buf[sizeof(_Tp)]; 6011: _Tp* __ptr = reinterpret_cast<_Tp*>(__buf); 6011: __atomic_load(std::__addressof(_M_i), __ptr, __m); 6011: return *__ptr; 6011: } 6011: 6011: _Tp 6011: exchange(_Tp __i, memory_order __m = memory_order_seq_cst) noexcept 6011: { 6011: alignas(_Tp) unsigned char __buf[sizeof(_Tp)]; 6011: _Tp* __ptr = reinterpret_cast<_Tp*>(__buf); 6011: __atomic_exchange(std::__addressof(_M_i), std::__addressof(__i), 6011: __ptr, __m); 6011: return *__ptr; 6011: } 6011: 6011: _Tp 6011: exchange(_Tp __i, 6011: memory_order __m = memory_order_seq_cst) volatile noexcept 6011: { 6011: alignas(_Tp) unsigned char __buf[sizeof(_Tp)]; 6011: _Tp* __ptr = reinterpret_cast<_Tp*>(__buf); 6011: __atomic_exchange(std::__addressof(_M_i), std::__addressof(__i), 6011: __ptr, __m); 6011: return *__ptr; 6011: } 6011: 6011: bool 6011: compare_exchange_weak(_Tp& __e, _Tp __i, memory_order __s, 6011: memory_order __f) noexcept 6011: { 6011: return __atomic_compare_exchange(std::__addressof(_M_i), 6011: std::__addressof(__e), 6011: std::__addressof(__i), 6011: true, __s, __f); 6011: } 6011: 6011: bool 6011: compare_exchange_weak(_Tp& __e, _Tp __i, memory_order __s, 6011: memory_order __f) volatile noexcept 6011: { 6011: return __atomic_compare_exchange(std::__addressof(_M_i), 6011: std::__addressof(__e), 6011: std::__addressof(__i), 6011: true, __s, __f); 6011: } 6011: 6011: bool 6011: compare_exchange_weak(_Tp& __e, _Tp __i, 6011: memory_order __m = memory_order_seq_cst) noexcept 6011: { return compare_exchange_weak(__e, __i, __m, 6011: __cmpexch_failure_order(__m)); } 6011: 6011: bool 6011: compare_exchange_weak(_Tp& __e, _Tp __i, 6011: memory_order __m = memory_order_seq_cst) volatile noexcept 6011: { return compare_exchange_weak(__e, __i, __m, 6011: __cmpexch_failure_order(__m)); } 6011: 6011: bool 6011: compare_exchange_strong(_Tp& __e, _Tp __i, memory_order __s, 6011: memory_order __f) noexcept 6011: { 6011: return __atomic_compare_exchange(std::__addressof(_M_i), 6011: std::__addressof(__e), 6011: std::__addressof(__i), 6011: false, __s, __f); 6011: } 6011: 6011: bool 6011: compare_exchange_strong(_Tp& __e, _Tp __i, memory_order __s, 6011: memory_order __f) volatile noexcept 6011: { 6011: return __atomic_compare_exchange(std::__addressof(_M_i), 6011: std::__addressof(__e), 6011: std::__addressof(__i), 6011: false, __s, __f); 6011: } 6011: 6011: bool 6011: compare_exchange_strong(_Tp& __e, _Tp __i, 6011: memory_order __m = memory_order_seq_cst) noexcept 6011: { return compare_exchange_strong(__e, __i, __m, 6011: __cmpexch_failure_order(__m)); } 6011: 6011: bool 6011: compare_exchange_strong(_Tp& __e, _Tp __i, 6011: memory_order __m = memory_order_seq_cst) volatile noexcept 6011: { return compare_exchange_strong(__e, __i, __m, 6011: __cmpexch_failure_order(__m)); } 6011: }; 6011: 6011: 6011: 6011: template 6011: struct atomic<_Tp*> 6011: { 6011: typedef _Tp* __pointer_type; 6011: typedef __atomic_base<_Tp*> __base_type; 6011: __base_type _M_b; 6011: 6011: atomic() noexcept = default; 6011: ~atomic() noexcept = default; 6011: atomic(const atomic&) = delete; 6011: atomic& operator=(const atomic&) = delete; 6011: atomic& operator=(const atomic&) volatile = delete; 6011: 6011: constexpr atomic(__pointer_type __p) noexcept : _M_b(__p) { } 6011: 6011: operator __pointer_type() const noexcept 6011: { return __pointer_type(_M_b); } 6011: 6011: operator __pointer_type() const volatile noexcept 6011: { return __pointer_type(_M_b); } 6011: 6011: __pointer_type 6011: operator=(__pointer_type __p) noexcept 6011: { return _M_b.operator=(__p); } 6011: 6011: __pointer_type 6011: operator=(__pointer_type __p) volatile noexcept 6011: { return _M_b.operator=(__p); } 6011: 6011: __pointer_type 6011: operator++(int) noexcept 6011: { return _M_b++; } 6011: 6011: __pointer_type 6011: operator++(int) volatile noexcept 6011: { return _M_b++; } 6011: 6011: __pointer_type 6011: operator--(int) noexcept 6011: { return _M_b--; } 6011: 6011: __pointer_type 6011: operator--(int) volatile noexcept 6011: { return _M_b--; } 6011: 6011: __pointer_type 6011: operator++() noexcept 6011: { return ++_M_b; } 6011: 6011: __pointer_type 6011: operator++() volatile noexcept 6011: { return ++_M_b; } 6011: 6011: __pointer_type 6011: operator--() noexcept 6011: { return --_M_b; } 6011: 6011: __pointer_type 6011: operator--() volatile noexcept 6011: { return --_M_b; } 6011: 6011: __pointer_type 6011: operator+=(ptrdiff_t __d) noexcept 6011: { return _M_b.operator+=(__d); } 6011: 6011: __pointer_type 6011: operator+=(ptrdiff_t __d) volatile noexcept 6011: { return _M_b.operator+=(__d); } 6011: 6011: __pointer_type 6011: operator-=(ptrdiff_t __d) noexcept 6011: { return _M_b.operator-=(__d); } 6011: 6011: __pointer_type 6011: operator-=(ptrdiff_t __d) volatile noexcept 6011: { return _M_b.operator-=(__d); } 6011: 6011: bool 6011: is_lock_free() const noexcept 6011: { return _M_b.is_lock_free(); } 6011: 6011: bool 6011: is_lock_free() const volatile noexcept 6011: { return _M_b.is_lock_free(); } 6011: 6011: 6011: 6011: 6011: 6011: void 6011: store(__pointer_type __p, 6011: memory_order __m = memory_order_seq_cst) noexcept 6011: { return _M_b.store(__p, __m); } 6011: 6011: void 6011: store(__pointer_type __p, 6011: memory_order __m = memory_order_seq_cst) volatile noexcept 6011: { return _M_b.store(__p, __m); } 6011: 6011: __pointer_type 6011: load(memory_order __m = memory_order_seq_cst) const noexcept 6011: { return _M_b.load(__m); } 6011: 6011: __pointer_type 6011: load(memory_order __m = memory_order_seq_cst) const volatile noexcept 6011: { return _M_b.load(__m); } 6011: 6011: __pointer_type 6011: exchange(__pointer_type __p, 6011: memory_order __m = memory_order_seq_cst) noexcept 6011: { return _M_b.exchange(__p, __m); } 6011: 6011: __pointer_type 6011: exchange(__pointer_type __p, 6011: memory_order __m = memory_order_seq_cst) volatile noexcept 6011: { return _M_b.exchange(__p, __m); } 6011: 6011: bool 6011: compare_exchange_weak(__pointer_type& __p1, __pointer_type __p2, 6011: memory_order __m1, memory_order __m2) noexcept 6011: { return _M_b.compare_exchange_strong(__p1, __p2, __m1, __m2); } 6011: 6011: bool 6011: compare_exchange_weak(__pointer_type& __p1, __pointer_type __p2, 6011: memory_order __m1, 6011: memory_order __m2) volatile noexcept 6011: { return _M_b.compare_exchange_strong(__p1, __p2, __m1, __m2); } 6011: 6011: bool 6011: compare_exchange_weak(__pointer_type& __p1, __pointer_type __p2, 6011: memory_order __m = memory_order_seq_cst) noexcept 6011: { 6011: return compare_exchange_weak(__p1, __p2, __m, 6011: __cmpexch_failure_order(__m)); 6011: } 6011: 6011: bool 6011: compare_exchange_weak(__pointer_type& __p1, __pointer_type __p2, 6011: memory_order __m = memory_order_seq_cst) volatile noexcept 6011: { 6011: return compare_exchange_weak(__p1, __p2, __m, 6011: __cmpexch_failure_order(__m)); 6011: } 6011: 6011: bool 6011: compare_exchange_strong(__pointer_type& __p1, __pointer_type __p2, 6011: memory_order __m1, memory_order __m2) noexcept 6011: { return _M_b.compare_exchange_strong(__p1, __p2, __m1, __m2); } 6011: 6011: bool 6011: compare_exchange_strong(__pointer_type& __p1, __pointer_type __p2, 6011: memory_order __m1, 6011: memory_order __m2) volatile noexcept 6011: { return _M_b.compare_exchange_strong(__p1, __p2, __m1, __m2); } 6011: 6011: bool 6011: compare_exchange_strong(__pointer_type& __p1, __pointer_type __p2, 6011: memory_order __m = memory_order_seq_cst) noexcept 6011: { 6011: return _M_b.compare_exchange_strong(__p1, __p2, __m, 6011: __cmpexch_failure_order(__m)); 6011: } 6011: 6011: bool 6011: compare_exchange_strong(__pointer_type& __p1, __pointer_type __p2, 6011: memory_order __m = memory_order_seq_cst) volatile noexcept 6011: { 6011: return _M_b.compare_exchange_strong(__p1, __p2, __m, 6011: __cmpexch_failure_order(__m)); 6011: } 6011: 6011: __pointer_type 6011: fetch_add(ptrdiff_t __d, 6011: memory_order __m = memory_order_seq_cst) noexcept 6011: { return _M_b.fetch_add(__d, __m); } 6011: 6011: __pointer_type 6011: fetch_add(ptrdiff_t __d, 6011: memory_order __m = memory_order_seq_cst) volatile noexcept 6011: { return _M_b.fetch_add(__d, __m); } 6011: 6011: __pointer_type 6011: fetch_sub(ptrdiff_t __d, 6011: memory_order __m = memory_order_seq_cst) noexcept 6011: { return _M_b.fetch_sub(__d, __m); } 6011: 6011: __pointer_type 6011: fetch_sub(ptrdiff_t __d, 6011: memory_order __m = memory_order_seq_cst) volatile noexcept 6011: { return _M_b.fetch_sub(__d, __m); } 6011: }; 6011: 6011: 6011: 6011: template<> 6011: struct atomic : __atomic_base 6011: { 6011: typedef char __integral_type; 6011: typedef __atomic_base __base_type; 6011: 6011: atomic() noexcept = default; 6011: ~atomic() noexcept = default; 6011: atomic(const atomic&) = delete; 6011: atomic& operator=(const atomic&) = delete; 6011: atomic& operator=(const atomic&) volatile = delete; 6011: 6011: constexpr atomic(__integral_type __i) noexcept : __base_type(__i) { } 6011: 6011: using __base_type::operator __integral_type; 6011: using __base_type::operator=; 6011: 6011: 6011: 6011: 6011: }; 6011: 6011: 6011: template<> 6011: struct atomic : __atomic_base 6011: { 6011: typedef signed char __integral_type; 6011: typedef __atomic_base __base_type; 6011: 6011: atomic() noexcept= default; 6011: ~atomic() noexcept = default; 6011: atomic(const atomic&) = delete; 6011: atomic& operator=(const atomic&) = delete; 6011: atomic& operator=(const atomic&) volatile = delete; 6011: 6011: constexpr atomic(__integral_type __i) noexcept : __base_type(__i) { } 6011: 6011: using __base_type::operator __integral_type; 6011: using __base_type::operator=; 6011: 6011: 6011: 6011: 6011: }; 6011: 6011: 6011: template<> 6011: struct atomic : __atomic_base 6011: { 6011: typedef unsigned char __integral_type; 6011: typedef __atomic_base __base_type; 6011: 6011: atomic() noexcept= default; 6011: ~atomic() noexcept = default; 6011: atomic(const atomic&) = delete; 6011: atomic& operator=(const atomic&) = delete; 6011: atomic& operator=(const atomic&) volatile = delete; 6011: 6011: constexpr atomic(__integral_type __i) noexcept : __base_type(__i) { } 6011: 6011: using __base_type::operator __integral_type; 6011: using __base_type::operator=; 6011: 6011: 6011: 6011: 6011: }; 6011: 6011: 6011: template<> 6011: struct atomic : __atomic_base 6011: { 6011: typedef short __integral_type; 6011: typedef __atomic_base __base_type; 6011: 6011: atomic() noexcept = default; 6011: ~atomic() noexcept = default; 6011: atomic(const atomic&) = delete; 6011: atomic& operator=(const atomic&) = delete; 6011: atomic& operator=(const atomic&) volatile = delete; 6011: 6011: constexpr atomic(__integral_type __i) noexcept : __base_type(__i) { } 6011: 6011: using __base_type::operator __integral_type; 6011: using __base_type::operator=; 6011: 6011: 6011: 6011: 6011: }; 6011: 6011: 6011: template<> 6011: struct atomic : __atomic_base 6011: { 6011: typedef unsigned short __integral_type; 6011: typedef __atomic_base __base_type; 6011: 6011: atomic() noexcept = default; 6011: ~atomic() noexcept = default; 6011: atomic(const atomic&) = delete; 6011: atomic& operator=(const atomic&) = delete; 6011: atomic& operator=(const atomic&) volatile = delete; 6011: 6011: constexpr atomic(__integral_type __i) noexcept : __base_type(__i) { } 6011: 6011: using __base_type::operator __integral_type; 6011: using __base_type::operator=; 6011: 6011: 6011: 6011: 6011: }; 6011: 6011: 6011: template<> 6011: struct atomic : __atomic_base 6011: { 6011: typedef int __integral_type; 6011: typedef __atomic_base __base_type; 6011: 6011: atomic() noexcept = default; 6011: ~atomic() noexcept = default; 6011: atomic(const atomic&) = delete; 6011: atomic& operator=(const atomic&) = delete; 6011: atomic& operator=(const atomic&) volatile = delete; 6011: 6011: constexpr atomic(__integral_type __i) noexcept : __base_type(__i) { } 6011: 6011: using __base_type::operator __integral_type; 6011: using __base_type::operator=; 6011: 6011: 6011: 6011: 6011: }; 6011: 6011: 6011: template<> 6011: struct atomic : __atomic_base 6011: { 6011: typedef unsigned int __integral_type; 6011: typedef __atomic_base __base_type; 6011: 6011: atomic() noexcept = default; 6011: ~atomic() noexcept = default; 6011: atomic(const atomic&) = delete; 6011: atomic& operator=(const atomic&) = delete; 6011: atomic& operator=(const atomic&) volatile = delete; 6011: 6011: constexpr atomic(__integral_type __i) noexcept : __base_type(__i) { } 6011: 6011: using __base_type::operator __integral_type; 6011: using __base_type::operator=; 6011: 6011: 6011: 6011: 6011: }; 6011: 6011: 6011: template<> 6011: struct atomic : __atomic_base 6011: { 6011: typedef long __integral_type; 6011: typedef __atomic_base __base_type; 6011: 6011: atomic() noexcept = default; 6011: ~atomic() noexcept = default; 6011: atomic(const atomic&) = delete; 6011: atomic& operator=(const atomic&) = delete; 6011: atomic& operator=(const atomic&) volatile = delete; 6011: 6011: constexpr atomic(__integral_type __i) noexcept : __base_type(__i) { } 6011: 6011: using __base_type::operator __integral_type; 6011: using __base_type::operator=; 6011: 6011: 6011: 6011: 6011: }; 6011: 6011: 6011: template<> 6011: struct atomic : __atomic_base 6011: { 6011: typedef unsigned long __integral_type; 6011: typedef __atomic_base __base_type; 6011: 6011: atomic() noexcept = default; 6011: ~atomic() noexcept = default; 6011: atomic(const atomic&) = delete; 6011: atomic& operator=(const atomic&) = delete; 6011: atomic& operator=(const atomic&) volatile = delete; 6011: 6011: constexpr atomic(__integral_type __i) noexcept : __base_type(__i) { } 6011: 6011: using __base_type::operator __integral_type; 6011: using __base_type::operator=; 6011: 6011: 6011: 6011: 6011: }; 6011: 6011: 6011: template<> 6011: struct atomic : __atomic_base 6011: { 6011: typedef long long __integral_type; 6011: typedef __atomic_base __base_type; 6011: 6011: atomic() noexcept = default; 6011: ~atomic() noexcept = default; 6011: atomic(const atomic&) = delete; 6011: atomic& operator=(const atomic&) = delete; 6011: atomic& operator=(const atomic&) volatile = delete; 6011: 6011: constexpr atomic(__integral_type __i) noexcept : __base_type(__i) { } 6011: 6011: using __base_type::operator __integral_type; 6011: using __base_type::operator=; 6011: 6011: 6011: 6011: 6011: }; 6011: 6011: 6011: template<> 6011: struct atomic : __atomic_base 6011: { 6011: typedef unsigned long long __integral_type; 6011: typedef __atomic_base __base_type; 6011: 6011: atomic() noexcept = default; 6011: ~atomic() noexcept = default; 6011: atomic(const atomic&) = delete; 6011: atomic& operator=(const atomic&) = delete; 6011: atomic& operator=(const atomic&) volatile = delete; 6011: 6011: constexpr atomic(__integral_type __i) noexcept : __base_type(__i) { } 6011: 6011: using __base_type::operator __integral_type; 6011: using __base_type::operator=; 6011: 6011: 6011: 6011: 6011: }; 6011: 6011: 6011: template<> 6011: struct atomic : __atomic_base 6011: { 6011: typedef wchar_t __integral_type; 6011: typedef __atomic_base __base_type; 6011: 6011: atomic() noexcept = default; 6011: ~atomic() noexcept = default; 6011: atomic(const atomic&) = delete; 6011: atomic& operator=(const atomic&) = delete; 6011: atomic& operator=(const atomic&) volatile = delete; 6011: 6011: constexpr atomic(__integral_type __i) noexcept : __base_type(__i) { } 6011: 6011: using __base_type::operator __integral_type; 6011: using __base_type::operator=; 6011: 6011: 6011: 6011: 6011: }; 6011: 6011: 6011: template<> 6011: struct atomic : __atomic_base 6011: { 6011: typedef char16_t __integral_type; 6011: typedef __atomic_base __base_type; 6011: 6011: atomic() noexcept = default; 6011: ~atomic() noexcept = default; 6011: atomic(const atomic&) = delete; 6011: atomic& operator=(const atomic&) = delete; 6011: atomic& operator=(const atomic&) volatile = delete; 6011: 6011: constexpr atomic(__integral_type __i) noexcept : __base_type(__i) { } 6011: 6011: using __base_type::operator __integral_type; 6011: using __base_type::operator=; 6011: 6011: 6011: 6011: 6011: }; 6011: 6011: 6011: template<> 6011: struct atomic : __atomic_base 6011: { 6011: typedef char32_t __integral_type; 6011: typedef __atomic_base __base_type; 6011: 6011: atomic() noexcept = default; 6011: ~atomic() noexcept = default; 6011: atomic(const atomic&) = delete; 6011: atomic& operator=(const atomic&) = delete; 6011: atomic& operator=(const atomic&) volatile = delete; 6011: 6011: constexpr atomic(__integral_type __i) noexcept : __base_type(__i) { } 6011: 6011: using __base_type::operator __integral_type; 6011: using __base_type::operator=; 6011: 6011: 6011: 6011: 6011: }; 6011: 6011: 6011: 6011: typedef atomic atomic_bool; 6011: 6011: 6011: typedef atomic atomic_char; 6011: 6011: 6011: typedef atomic atomic_schar; 6011: 6011: 6011: typedef atomic atomic_uchar; 6011: 6011: 6011: typedef atomic atomic_short; 6011: 6011: 6011: typedef atomic atomic_ushort; 6011: 6011: 6011: typedef atomic atomic_int; 6011: 6011: 6011: typedef atomic atomic_uint; 6011: 6011: 6011: typedef atomic atomic_long; 6011: 6011: 6011: typedef atomic atomic_ulong; 6011: 6011: 6011: typedef atomic atomic_llong; 6011: 6011: 6011: typedef atomic atomic_ullong; 6011: 6011: 6011: typedef atomic atomic_wchar_t; 6011: 6011: 6011: typedef atomic atomic_char16_t; 6011: 6011: 6011: typedef atomic atomic_char32_t; 6011: 6011: 6011: 6011: 6011: 6011: 6011: typedef atomic atomic_int8_t; 6011: 6011: 6011: typedef atomic atomic_uint8_t; 6011: 6011: 6011: typedef atomic atomic_int16_t; 6011: 6011: 6011: typedef atomic atomic_uint16_t; 6011: 6011: 6011: typedef atomic atomic_int32_t; 6011: 6011: 6011: typedef atomic atomic_uint32_t; 6011: 6011: 6011: typedef atomic atomic_int64_t; 6011: 6011: 6011: typedef atomic atomic_uint64_t; 6011: 6011: 6011: 6011: typedef atomic atomic_int_least8_t; 6011: 6011: 6011: typedef atomic atomic_uint_least8_t; 6011: 6011: 6011: typedef atomic atomic_int_least16_t; 6011: 6011: 6011: typedef atomic atomic_uint_least16_t; 6011: 6011: 6011: typedef atomic atomic_int_least32_t; 6011: 6011: 6011: typedef atomic atomic_uint_least32_t; 6011: 6011: 6011: typedef atomic atomic_int_least64_t; 6011: 6011: 6011: typedef atomic atomic_uint_least64_t; 6011: 6011: 6011: 6011: typedef atomic atomic_int_fast8_t; 6011: 6011: 6011: typedef atomic atomic_uint_fast8_t; 6011: 6011: 6011: typedef atomic atomic_int_fast16_t; 6011: 6011: 6011: typedef atomic atomic_uint_fast16_t; 6011: 6011: 6011: typedef atomic atomic_int_fast32_t; 6011: 6011: 6011: typedef atomic atomic_uint_fast32_t; 6011: 6011: 6011: typedef atomic atomic_int_fast64_t; 6011: 6011: 6011: typedef atomic atomic_uint_fast64_t; 6011: 6011: 6011: 6011: 6011: typedef atomic atomic_intptr_t; 6011: 6011: 6011: typedef atomic atomic_uintptr_t; 6011: 6011: 6011: typedef atomic atomic_size_t; 6011: 6011: 6011: typedef atomic atomic_ptrdiff_t; 6011: 6011: 6011: 6011: typedef atomic atomic_intmax_t; 6011: 6011: 6011: typedef atomic atomic_uintmax_t; 6011: 6011: 6011: 6011: inline bool 6011: atomic_flag_test_and_set_explicit(atomic_flag* __a, 6011: memory_order __m) noexcept 6011: { return __a->test_and_set(__m); } 6011: 6011: inline bool 6011: atomic_flag_test_and_set_explicit(volatile atomic_flag* __a, 6011: memory_order __m) noexcept 6011: { return __a->test_and_set(__m); } 6011: 6011: inline void 6011: atomic_flag_clear_explicit(atomic_flag* __a, memory_order __m) noexcept 6011: { __a->clear(__m); } 6011: 6011: inline void 6011: atomic_flag_clear_explicit(volatile atomic_flag* __a, 6011: memory_order __m) noexcept 6011: { __a->clear(__m); } 6011: 6011: inline bool 6011: atomic_flag_test_and_set(atomic_flag* __a) noexcept 6011: { return atomic_flag_test_and_set_explicit(__a, memory_order_seq_cst); } 6011: 6011: inline bool 6011: atomic_flag_test_and_set(volatile atomic_flag* __a) noexcept 6011: { return atomic_flag_test_and_set_explicit(__a, memory_order_seq_cst); } 6011: 6011: inline void 6011: atomic_flag_clear(atomic_flag* __a) noexcept 6011: { atomic_flag_clear_explicit(__a, memory_order_seq_cst); } 6011: 6011: inline void 6011: atomic_flag_clear(volatile atomic_flag* __a) noexcept 6011: { atomic_flag_clear_explicit(__a, memory_order_seq_cst); } 6011: 6011: 6011: 6011: template 6011: inline bool 6011: atomic_is_lock_free(const atomic<_ITp>* __a) noexcept 6011: { return __a->is_lock_free(); } 6011: 6011: template 6011: inline bool 6011: atomic_is_lock_free(const volatile atomic<_ITp>* __a) noexcept 6011: { return __a->is_lock_free(); } 6011: 6011: template 6011: inline void 6011: atomic_init(atomic<_ITp>* __a, _ITp __i) noexcept 6011: { __a->store(__i, memory_order_relaxed); } 6011: 6011: template 6011: inline void 6011: atomic_init(volatile atomic<_ITp>* __a, _ITp __i) noexcept 6011: { __a->store(__i, memory_order_relaxed); } 6011: 6011: template 6011: inline void 6011: atomic_store_explicit(atomic<_ITp>* __a, _ITp __i, 6011: memory_order __m) noexcept 6011: { __a->store(__i, __m); } 6011: 6011: template 6011: inline void 6011: atomic_store_explicit(volatile atomic<_ITp>* __a, _ITp __i, 6011: memory_order __m) noexcept 6011: { __a->store(__i, __m); } 6011: 6011: template 6011: inline _ITp 6011: atomic_load_explicit(const atomic<_ITp>* __a, memory_order __m) noexcept 6011: { return __a->load(__m); } 6011: 6011: template 6011: inline _ITp 6011: atomic_load_explicit(const volatile atomic<_ITp>* __a, 6011: memory_order __m) noexcept 6011: { return __a->load(__m); } 6011: 6011: template 6011: inline _ITp 6011: atomic_exchange_explicit(atomic<_ITp>* __a, _ITp __i, 6011: memory_order __m) noexcept 6011: { return __a->exchange(__i, __m); } 6011: 6011: template 6011: inline _ITp 6011: atomic_exchange_explicit(volatile atomic<_ITp>* __a, _ITp __i, 6011: memory_order __m) noexcept 6011: { return __a->exchange(__i, __m); } 6011: 6011: template 6011: inline bool 6011: atomic_compare_exchange_weak_explicit(atomic<_ITp>* __a, 6011: _ITp* __i1, _ITp __i2, 6011: memory_order __m1, 6011: memory_order __m2) noexcept 6011: { return __a->compare_exchange_weak(*__i1, __i2, __m1, __m2); } 6011: 6011: template 6011: inline bool 6011: atomic_compare_exchange_weak_explicit(volatile atomic<_ITp>* __a, 6011: _ITp* __i1, _ITp __i2, 6011: memory_order __m1, 6011: memory_order __m2) noexcept 6011: { return __a->compare_exchange_weak(*__i1, __i2, __m1, __m2); } 6011: 6011: template 6011: inline bool 6011: atomic_compare_exchange_strong_explicit(atomic<_ITp>* __a, 6011: _ITp* __i1, _ITp __i2, 6011: memory_order __m1, 6011: memory_order __m2) noexcept 6011: { return __a->compare_exchange_strong(*__i1, __i2, __m1, __m2); } 6011: 6011: template 6011: inline bool 6011: atomic_compare_exchange_strong_explicit(volatile atomic<_ITp>* __a, 6011: _ITp* __i1, _ITp __i2, 6011: memory_order __m1, 6011: memory_order __m2) noexcept 6011: { return __a->compare_exchange_strong(*__i1, __i2, __m1, __m2); } 6011: 6011: 6011: template 6011: inline void 6011: atomic_store(atomic<_ITp>* __a, _ITp __i) noexcept 6011: { atomic_store_explicit(__a, __i, memory_order_seq_cst); } 6011: 6011: template 6011: inline void 6011: atomic_store(volatile atomic<_ITp>* __a, _ITp __i) noexcept 6011: { atomic_store_explicit(__a, __i, memory_order_seq_cst); } 6011: 6011: template 6011: inline _ITp 6011: atomic_load(const atomic<_ITp>* __a) noexcept 6011: { return atomic_load_explicit(__a, memory_order_seq_cst); } 6011: 6011: template 6011: inline _ITp 6011: atomic_load(const volatile atomic<_ITp>* __a) noexcept 6011: { return atomic_load_explicit(__a, memory_order_seq_cst); } 6011: 6011: template 6011: inline _ITp 6011: atomic_exchange(atomic<_ITp>* __a, _ITp __i) noexcept 6011: { return atomic_exchange_explicit(__a, __i, memory_order_seq_cst); } 6011: 6011: template 6011: inline _ITp 6011: atomic_exchange(volatile atomic<_ITp>* __a, _ITp __i) noexcept 6011: { return atomic_exchange_explicit(__a, __i, memory_order_seq_cst); } 6011: 6011: template 6011: inline bool 6011: atomic_compare_exchange_weak(atomic<_ITp>* __a, 6011: _ITp* __i1, _ITp __i2) noexcept 6011: { 6011: return atomic_compare_exchange_weak_explicit(__a, __i1, __i2, 6011: memory_order_seq_cst, 6011: memory_order_seq_cst); 6011: } 6011: 6011: template 6011: inline bool 6011: atomic_compare_exchange_weak(volatile atomic<_ITp>* __a, 6011: _ITp* __i1, _ITp __i2) noexcept 6011: { 6011: return atomic_compare_exchange_weak_explicit(__a, __i1, __i2, 6011: memory_order_seq_cst, 6011: memory_order_seq_cst); 6011: } 6011: 6011: template 6011: inline bool 6011: atomic_compare_exchange_strong(atomic<_ITp>* __a, 6011: _ITp* __i1, _ITp __i2) noexcept 6011: { 6011: return atomic_compare_exchange_strong_explicit(__a, __i1, __i2, 6011: memory_order_seq_cst, 6011: memory_order_seq_cst); 6011: } 6011: 6011: template 6011: inline bool 6011: atomic_compare_exchange_strong(volatile atomic<_ITp>* __a, 6011: _ITp* __i1, _ITp __i2) noexcept 6011: { 6011: return atomic_compare_exchange_strong_explicit(__a, __i1, __i2, 6011: memory_order_seq_cst, 6011: memory_order_seq_cst); 6011: } 6011: 6011: 6011: 6011: 6011: 6011: template 6011: inline _ITp 6011: atomic_fetch_add_explicit(__atomic_base<_ITp>* __a, _ITp __i, 6011: memory_order __m) noexcept 6011: { return __a->fetch_add(__i, __m); } 6011: 6011: template 6011: inline _ITp 6011: atomic_fetch_add_explicit(volatile __atomic_base<_ITp>* __a, _ITp __i, 6011: memory_order __m) noexcept 6011: { return __a->fetch_add(__i, __m); } 6011: 6011: template 6011: inline _ITp 6011: atomic_fetch_sub_explicit(__atomic_base<_ITp>* __a, _ITp __i, 6011: memory_order __m) noexcept 6011: { return __a->fetch_sub(__i, __m); } 6011: 6011: template 6011: inline _ITp 6011: atomic_fetch_sub_explicit(volatile __atomic_base<_ITp>* __a, _ITp __i, 6011: memory_order __m) noexcept 6011: { return __a->fetch_sub(__i, __m); } 6011: 6011: template 6011: inline _ITp 6011: atomic_fetch_and_explicit(__atomic_base<_ITp>* __a, _ITp __i, 6011: memory_order __m) noexcept 6011: { return __a->fetch_and(__i, __m); } 6011: 6011: template 6011: inline _ITp 6011: atomic_fetch_and_explicit(volatile __atomic_base<_ITp>* __a, _ITp __i, 6011: memory_order __m) noexcept 6011: { return __a->fetch_and(__i, __m); } 6011: 6011: template 6011: inline _ITp 6011: atomic_fetch_or_explicit(__atomic_base<_ITp>* __a, _ITp __i, 6011: memory_order __m) noexcept 6011: { return __a->fetch_or(__i, __m); } 6011: 6011: template 6011: inline _ITp 6011: atomic_fetch_or_explicit(volatile __atomic_base<_ITp>* __a, _ITp __i, 6011: memory_order __m) noexcept 6011: { return __a->fetch_or(__i, __m); } 6011: 6011: template 6011: inline _ITp 6011: atomic_fetch_xor_explicit(__atomic_base<_ITp>* __a, _ITp __i, 6011: memory_order __m) noexcept 6011: { return __a->fetch_xor(__i, __m); } 6011: 6011: template 6011: inline _ITp 6011: atomic_fetch_xor_explicit(volatile __atomic_base<_ITp>* __a, _ITp __i, 6011: memory_order __m) noexcept 6011: { return __a->fetch_xor(__i, __m); } 6011: 6011: template 6011: inline _ITp 6011: atomic_fetch_add(__atomic_base<_ITp>* __a, _ITp __i) noexcept 6011: { return atomic_fetch_add_explicit(__a, __i, memory_order_seq_cst); } 6011: 6011: template 6011: inline _ITp 6011: atomic_fetch_add(volatile __atomic_base<_ITp>* __a, _ITp __i) noexcept 6011: { return atomic_fetch_add_explicit(__a, __i, memory_order_seq_cst); } 6011: 6011: template 6011: inline _ITp 6011: atomic_fetch_sub(__atomic_base<_ITp>* __a, _ITp __i) noexcept 6011: { return atomic_fetch_sub_explicit(__a, __i, memory_order_seq_cst); } 6011: 6011: template 6011: inline _ITp 6011: atomic_fetch_sub(volatile __atomic_base<_ITp>* __a, _ITp __i) noexcept 6011: { return atomic_fetch_sub_explicit(__a, __i, memory_order_seq_cst); } 6011: 6011: template 6011: inline _ITp 6011: atomic_fetch_and(__atomic_base<_ITp>* __a, _ITp __i) noexcept 6011: { return atomic_fetch_and_explicit(__a, __i, memory_order_seq_cst); } 6011: 6011: template 6011: inline _ITp 6011: atomic_fetch_and(volatile __atomic_base<_ITp>* __a, _ITp __i) noexcept 6011: { return atomic_fetch_and_explicit(__a, __i, memory_order_seq_cst); } 6011: 6011: template 6011: inline _ITp 6011: atomic_fetch_or(__atomic_base<_ITp>* __a, _ITp __i) noexcept 6011: { return atomic_fetch_or_explicit(__a, __i, memory_order_seq_cst); } 6011: 6011: template 6011: inline _ITp 6011: atomic_fetch_or(volatile __atomic_base<_ITp>* __a, _ITp __i) noexcept 6011: { return atomic_fetch_or_explicit(__a, __i, memory_order_seq_cst); } 6011: 6011: template 6011: inline _ITp 6011: atomic_fetch_xor(__atomic_base<_ITp>* __a, _ITp __i) noexcept 6011: { return atomic_fetch_xor_explicit(__a, __i, memory_order_seq_cst); } 6011: 6011: template 6011: inline _ITp 6011: atomic_fetch_xor(volatile __atomic_base<_ITp>* __a, _ITp __i) noexcept 6011: { return atomic_fetch_xor_explicit(__a, __i, memory_order_seq_cst); } 6011: 6011: 6011: 6011: template 6011: inline _ITp* 6011: atomic_fetch_add_explicit(atomic<_ITp*>* __a, ptrdiff_t __d, 6011: memory_order __m) noexcept 6011: { return __a->fetch_add(__d, __m); } 6011: 6011: template 6011: inline _ITp* 6011: atomic_fetch_add_explicit(volatile atomic<_ITp*>* __a, ptrdiff_t __d, 6011: memory_order __m) noexcept 6011: { return __a->fetch_add(__d, __m); } 6011: 6011: template 6011: inline _ITp* 6011: atomic_fetch_add(volatile atomic<_ITp*>* __a, ptrdiff_t __d) noexcept 6011: { return __a->fetch_add(__d); } 6011: 6011: template 6011: inline _ITp* 6011: atomic_fetch_add(atomic<_ITp*>* __a, ptrdiff_t __d) noexcept 6011: { return __a->fetch_add(__d); } 6011: 6011: template 6011: inline _ITp* 6011: atomic_fetch_sub_explicit(volatile atomic<_ITp*>* __a, 6011: ptrdiff_t __d, memory_order __m) noexcept 6011: { return __a->fetch_sub(__d, __m); } 6011: 6011: template 6011: inline _ITp* 6011: atomic_fetch_sub_explicit(atomic<_ITp*>* __a, ptrdiff_t __d, 6011: memory_order __m) noexcept 6011: { return __a->fetch_sub(__d, __m); } 6011: 6011: template 6011: inline _ITp* 6011: atomic_fetch_sub(volatile atomic<_ITp*>* __a, ptrdiff_t __d) noexcept 6011: { return __a->fetch_sub(__d); } 6011: 6011: template 6011: inline _ITp* 6011: atomic_fetch_sub(atomic<_ITp*>* __a, ptrdiff_t __d) noexcept 6011: { return __a->fetch_sub(__d); } 6011: 6011: 6011: 6011: } 6011: # 20 "/usr/include/boost/smart_ptr/detail/sp_counted_base_std_atomic.hpp" 2 3 4 6011: 6011: 6011: namespace boost 6011: { 6011: 6011: namespace detail 6011: { 6011: 6011: inline void atomic_increment( std::atomic_int_least32_t * pw ) 6011: { 6011: pw->fetch_add( 1, std::memory_order_relaxed ); 6011: } 6011: 6011: inline std::int_least32_t atomic_decrement( std::atomic_int_least32_t * pw ) 6011: { 6011: return pw->fetch_sub( 1, std::memory_order_acq_rel ); 6011: } 6011: 6011: inline std::int_least32_t atomic_conditional_increment( std::atomic_int_least32_t * pw ) 6011: { 6011: 6011: 6011: 6011: 6011: std::int_least32_t r = pw->load( std::memory_order_relaxed ); 6011: 6011: for( ;; ) 6011: { 6011: if( r == 0 ) 6011: { 6011: return r; 6011: } 6011: 6011: if( pw->compare_exchange_weak( r, r + 1, std::memory_order_relaxed, std::memory_order_relaxed ) ) 6011: { 6011: return r; 6011: } 6011: } 6011: } 6011: 6011: class sp_counted_base 6011: { 6011: private: 6011: 6011: sp_counted_base( sp_counted_base const & ); 6011: sp_counted_base & operator= ( sp_counted_base const & ); 6011: 6011: std::atomic_int_least32_t use_count_; 6011: std::atomic_int_least32_t weak_count_; 6011: 6011: public: 6011: 6011: sp_counted_base(): use_count_( 1 ), weak_count_( 1 ) 6011: { 6011: } 6011: 6011: virtual ~sp_counted_base() 6011: { 6011: } 6011: 6011: 6011: 6011: 6011: virtual void dispose() = 0; 6011: 6011: 6011: 6011: virtual void destroy() 6011: { 6011: delete this; 6011: } 6011: 6011: virtual void * get_deleter( sp_typeinfo const & ti ) = 0; 6011: virtual void * get_local_deleter( sp_typeinfo const & ti ) = 0; 6011: virtual void * get_untyped_deleter() = 0; 6011: 6011: void add_ref_copy() 6011: { 6011: atomic_increment( &use_count_ ); 6011: } 6011: 6011: bool add_ref_lock() 6011: { 6011: return atomic_conditional_increment( &use_count_ ) != 0; 6011: } 6011: 6011: void release() 6011: { 6011: if( atomic_decrement( &use_count_ ) == 1 ) 6011: { 6011: dispose(); 6011: weak_release(); 6011: } 6011: } 6011: 6011: void weak_add_ref() 6011: { 6011: atomic_increment( &weak_count_ ); 6011: } 6011: 6011: void weak_release() 6011: { 6011: if( atomic_decrement( &weak_count_ ) == 1 ) 6011: { 6011: destroy(); 6011: } 6011: } 6011: 6011: long use_count() const 6011: { 6011: return use_count_.load( std::memory_order_acquire ); 6011: } 6011: }; 6011: 6011: } 6011: 6011: } 6011: # 49 "/usr/include/boost/smart_ptr/detail/sp_counted_base.hpp" 2 3 4 6011: # 30 "/usr/include/boost/smart_ptr/detail/shared_count.hpp" 2 3 4 6011: # 1 "/usr/include/boost/smart_ptr/detail/sp_counted_impl.hpp" 1 3 4 6011: # 29 "/usr/include/boost/smart_ptr/detail/sp_counted_impl.hpp" 3 4 6011: # 1 "/usr/include/boost/core/addressof.hpp" 1 3 4 6011: # 34 "/usr/include/boost/core/addressof.hpp" 3 4 6011: namespace boost { 6011: 6011: template 6011: constexpr inline T* 6011: addressof(T& o) noexcept 6011: { 6011: return __builtin_addressof(o); 6011: } 6011: 6011: } 6011: # 266 "/usr/include/boost/core/addressof.hpp" 3 4 6011: namespace boost { 6011: 6011: template 6011: const T* addressof(const T&&) = delete; 6011: 6011: } 6011: # 30 "/usr/include/boost/smart_ptr/detail/sp_counted_impl.hpp" 2 3 4 6011: # 41 "/usr/include/boost/smart_ptr/detail/sp_counted_impl.hpp" 3 4 6011: namespace boost 6011: { 6011: # 51 "/usr/include/boost/smart_ptr/detail/sp_counted_impl.hpp" 3 4 6011: namespace detail 6011: { 6011: 6011: 6011: 6011: template class local_sp_deleter; 6011: 6011: template D * get_local_deleter( D * ) 6011: { 6011: return 0; 6011: } 6011: 6011: template D * get_local_deleter( local_sp_deleter * p ); 6011: 6011: 6011: 6011: template class sp_counted_impl_p: public sp_counted_base 6011: { 6011: private: 6011: 6011: X * px_; 6011: 6011: sp_counted_impl_p( sp_counted_impl_p const & ); 6011: sp_counted_impl_p & operator= ( sp_counted_impl_p const & ); 6011: 6011: typedef sp_counted_impl_p this_type; 6011: 6011: public: 6011: 6011: explicit sp_counted_impl_p( X * px ): px_( px ) 6011: { 6011: 6011: 6011: 6011: } 6011: 6011: virtual void dispose() 6011: { 6011: 6011: 6011: 6011: boost::checked_delete( px_ ); 6011: } 6011: 6011: virtual void * get_deleter( sp_typeinfo const & ) 6011: { 6011: return 0; 6011: } 6011: 6011: virtual void * get_local_deleter( sp_typeinfo const & ) 6011: { 6011: return 0; 6011: } 6011: 6011: virtual void * get_untyped_deleter() 6011: { 6011: return 0; 6011: } 6011: # 137 "/usr/include/boost/smart_ptr/detail/sp_counted_impl.hpp" 3 4 6011: }; 6011: # 146 "/usr/include/boost/smart_ptr/detail/sp_counted_impl.hpp" 3 4 6011: template class sp_counted_impl_pd: public sp_counted_base 6011: { 6011: private: 6011: 6011: P ptr; 6011: D del; 6011: 6011: sp_counted_impl_pd( sp_counted_impl_pd const & ); 6011: sp_counted_impl_pd & operator= ( sp_counted_impl_pd const & ); 6011: 6011: typedef sp_counted_impl_pd this_type; 6011: 6011: public: 6011: 6011: 6011: 6011: sp_counted_impl_pd( P p, D & d ): ptr( p ), del( d ) 6011: { 6011: } 6011: 6011: sp_counted_impl_pd( P p ): ptr( p ), del() 6011: { 6011: } 6011: 6011: virtual void dispose() 6011: { 6011: del( ptr ); 6011: } 6011: 6011: virtual void * get_deleter( sp_typeinfo const & ti ) 6011: { 6011: return ti == typeid(D)? &reinterpret_cast( del ): 0; 6011: } 6011: 6011: virtual void * get_local_deleter( sp_typeinfo const & ti ) 6011: { 6011: return ti == typeid(D)? boost::detail::get_local_deleter( boost::addressof( del ) ): 0; 6011: } 6011: 6011: virtual void * get_untyped_deleter() 6011: { 6011: return &reinterpret_cast( del ); 6011: } 6011: # 217 "/usr/include/boost/smart_ptr/detail/sp_counted_impl.hpp" 3 4 6011: }; 6011: 6011: template class sp_counted_impl_pda: public sp_counted_base 6011: { 6011: private: 6011: 6011: P p_; 6011: D d_; 6011: A a_; 6011: 6011: sp_counted_impl_pda( sp_counted_impl_pda const & ); 6011: sp_counted_impl_pda & operator= ( sp_counted_impl_pda const & ); 6011: 6011: typedef sp_counted_impl_pda this_type; 6011: 6011: public: 6011: 6011: 6011: 6011: sp_counted_impl_pda( P p, D & d, A a ): p_( p ), d_( d ), a_( a ) 6011: { 6011: } 6011: 6011: sp_counted_impl_pda( P p, A a ): p_( p ), d_( a ), a_( a ) 6011: { 6011: } 6011: 6011: virtual void dispose() 6011: { 6011: d_( p_ ); 6011: } 6011: 6011: virtual void destroy() 6011: { 6011: 6011: 6011: typedef typename std::allocator_traits::template rebind_alloc< this_type > A2; 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: A2 a2( a_ ); 6011: 6011: this->~this_type(); 6011: 6011: a2.deallocate( this, 1 ); 6011: } 6011: 6011: virtual void * get_deleter( sp_typeinfo const & ti ) 6011: { 6011: return ti == typeid(D)? &reinterpret_cast( d_ ): 0; 6011: } 6011: 6011: virtual void * get_local_deleter( sp_typeinfo const & ti ) 6011: { 6011: return ti == typeid(D)? boost::detail::get_local_deleter( boost::addressof( d_ ) ): 0; 6011: } 6011: 6011: virtual void * get_untyped_deleter() 6011: { 6011: return &reinterpret_cast( d_ ); 6011: } 6011: }; 6011: 6011: 6011: 6011: 6011: 6011: } 6011: 6011: } 6011: # 31 "/usr/include/boost/smart_ptr/detail/shared_count.hpp" 2 3 4 6011: # 47 "/usr/include/boost/smart_ptr/detail/shared_count.hpp" 3 4 6011: #pragma GCC diagnostic push 6011: #pragma GCC diagnostic ignored "-Wdeprecated-declarations" 6011: 6011: 6011: namespace boost 6011: { 6011: 6011: namespace movelib 6011: { 6011: 6011: template< class T, class D > class unique_ptr; 6011: 6011: } 6011: 6011: namespace detail 6011: { 6011: # 71 "/usr/include/boost/smart_ptr/detail/shared_count.hpp" 3 4 6011: struct sp_nothrow_tag {}; 6011: 6011: template< class D > struct sp_inplace_tag 6011: { 6011: }; 6011: 6011: template< class T > class sp_reference_wrapper 6011: { 6011: public: 6011: 6011: explicit sp_reference_wrapper( T & t): t_( boost::addressof( t ) ) 6011: { 6011: } 6011: 6011: template< class Y > void operator()( Y * p ) const 6011: { 6011: (*t_)( p ); 6011: } 6011: 6011: private: 6011: 6011: T * t_; 6011: }; 6011: 6011: template< class D > struct sp_convert_reference 6011: { 6011: typedef D type; 6011: }; 6011: 6011: template< class D > struct sp_convert_reference< D& > 6011: { 6011: typedef sp_reference_wrapper< D > type; 6011: }; 6011: 6011: class weak_count; 6011: 6011: class shared_count 6011: { 6011: private: 6011: 6011: sp_counted_base * pi_; 6011: 6011: 6011: 6011: 6011: 6011: friend class weak_count; 6011: 6011: public: 6011: 6011: constexpr shared_count(): pi_(0) 6011: 6011: 6011: 6011: { 6011: } 6011: 6011: constexpr explicit shared_count( sp_counted_base * pi ): pi_( pi ) 6011: 6011: 6011: 6011: { 6011: } 6011: 6011: template explicit shared_count( Y * p ): pi_( 0 ) 6011: 6011: 6011: 6011: { 6011: 6011: 6011: try 6011: { 6011: pi_ = new sp_counted_impl_p( p ); 6011: } 6011: catch(...) 6011: { 6011: boost::checked_delete( p ); 6011: throw; 6011: } 6011: # 163 "/usr/include/boost/smart_ptr/detail/shared_count.hpp" 3 4 6011: } 6011: 6011: 6011: 6011: 6011: template shared_count( P p, D d ): pi_(0) 6011: 6011: 6011: 6011: 6011: { 6011: 6011: 6011: 6011: 6011: 6011: try 6011: { 6011: pi_ = new sp_counted_impl_pd(p, d); 6011: } 6011: catch(...) 6011: { 6011: d(p); 6011: throw; 6011: } 6011: # 200 "/usr/include/boost/smart_ptr/detail/shared_count.hpp" 3 4 6011: } 6011: 6011: 6011: 6011: template< class P, class D > shared_count( P p, sp_inplace_tag ): pi_( 0 ) 6011: 6011: 6011: 6011: { 6011: 6011: 6011: try 6011: { 6011: pi_ = new sp_counted_impl_pd< P, D >( p ); 6011: } 6011: catch( ... ) 6011: { 6011: D::operator_fn( p ); 6011: throw; 6011: } 6011: # 232 "/usr/include/boost/smart_ptr/detail/shared_count.hpp" 3 4 6011: } 6011: 6011: 6011: 6011: template shared_count( P p, D d, A a ): pi_( 0 ) 6011: 6011: 6011: 6011: { 6011: typedef sp_counted_impl_pda impl_type; 6011: 6011: 6011: 6011: typedef typename std::allocator_traits::template rebind_alloc< impl_type > A2; 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: A2 a2( a ); 6011: 6011: 6011: 6011: try 6011: { 6011: pi_ = a2.allocate( 1 ); 6011: ::new( static_cast< void* >( pi_ ) ) impl_type( p, d, a ); 6011: } 6011: catch(...) 6011: { 6011: d( p ); 6011: 6011: if( pi_ != 0 ) 6011: { 6011: a2.deallocate( static_cast< impl_type* >( pi_ ), 1 ); 6011: } 6011: 6011: throw; 6011: } 6011: # 289 "/usr/include/boost/smart_ptr/detail/shared_count.hpp" 3 4 6011: } 6011: 6011: 6011: 6011: template< class P, class D, class A > shared_count( P p, sp_inplace_tag< D >, A a ): pi_( 0 ) 6011: 6011: 6011: 6011: { 6011: typedef sp_counted_impl_pda< P, D, A > impl_type; 6011: 6011: 6011: 6011: typedef typename std::allocator_traits::template rebind_alloc< impl_type > A2; 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: A2 a2( a ); 6011: 6011: 6011: 6011: try 6011: { 6011: pi_ = a2.allocate( 1 ); 6011: ::new( static_cast< void* >( pi_ ) ) impl_type( p, a ); 6011: } 6011: catch(...) 6011: { 6011: D::operator_fn( p ); 6011: 6011: if( pi_ != 0 ) 6011: { 6011: a2.deallocate( static_cast< impl_type* >( pi_ ), 1 ); 6011: } 6011: 6011: throw; 6011: } 6011: # 346 "/usr/include/boost/smart_ptr/detail/shared_count.hpp" 3 4 6011: } 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: template 6011: explicit shared_count( std::auto_ptr & r ): pi_( new sp_counted_impl_p( r.get() ) ) 6011: 6011: 6011: 6011: { 6011: # 369 "/usr/include/boost/smart_ptr/detail/shared_count.hpp" 3 4 6011: r.release(); 6011: } 6011: 6011: 6011: 6011: 6011: 6011: template 6011: explicit shared_count( std::unique_ptr & r ): pi_( 0 ) 6011: 6011: 6011: 6011: { 6011: typedef typename sp_convert_reference::type D2; 6011: 6011: D2 d2( r.get_deleter() ); 6011: pi_ = new sp_counted_impl_pd< typename std::unique_ptr::pointer, D2 >( r.get(), d2 ); 6011: # 396 "/usr/include/boost/smart_ptr/detail/shared_count.hpp" 3 4 6011: r.release(); 6011: } 6011: 6011: 6011: 6011: template 6011: explicit shared_count( boost::movelib::unique_ptr & r ): pi_( 0 ) 6011: 6011: 6011: 6011: { 6011: typedef typename sp_convert_reference::type D2; 6011: 6011: D2 d2( r.get_deleter() ); 6011: pi_ = new sp_counted_impl_pd< typename boost::movelib::unique_ptr::pointer, D2 >( r.get(), d2 ); 6011: # 421 "/usr/include/boost/smart_ptr/detail/shared_count.hpp" 3 4 6011: r.release(); 6011: } 6011: 6011: ~shared_count() 6011: { 6011: if( pi_ != 0 ) pi_->release(); 6011: 6011: 6011: 6011: } 6011: 6011: shared_count(shared_count const & r): pi_(r.pi_) 6011: 6011: 6011: 6011: { 6011: if( pi_ != 0 ) pi_->add_ref_copy(); 6011: } 6011: 6011: 6011: 6011: shared_count(shared_count && r): pi_(r.pi_) 6011: 6011: 6011: 6011: { 6011: r.pi_ = 0; 6011: } 6011: 6011: 6011: 6011: explicit shared_count(weak_count const & r); 6011: shared_count( weak_count const & r, sp_nothrow_tag ); 6011: 6011: shared_count & operator= (shared_count const & r) 6011: { 6011: sp_counted_base * tmp = r.pi_; 6011: 6011: if( tmp != pi_ ) 6011: { 6011: if( tmp != 0 ) tmp->add_ref_copy(); 6011: if( pi_ != 0 ) pi_->release(); 6011: pi_ = tmp; 6011: } 6011: 6011: return *this; 6011: } 6011: 6011: void swap(shared_count & r) 6011: { 6011: sp_counted_base * tmp = r.pi_; 6011: r.pi_ = pi_; 6011: pi_ = tmp; 6011: } 6011: 6011: long use_count() const 6011: { 6011: return pi_ != 0? pi_->use_count(): 0; 6011: } 6011: 6011: bool unique() const 6011: { 6011: return use_count() == 1; 6011: } 6011: 6011: bool empty() const 6011: { 6011: return pi_ == 0; 6011: } 6011: 6011: friend inline bool operator==(shared_count const & a, shared_count const & b) 6011: { 6011: return a.pi_ == b.pi_; 6011: } 6011: 6011: friend inline bool operator<(shared_count const & a, shared_count const & b) 6011: { 6011: return std::less()( a.pi_, b.pi_ ); 6011: } 6011: 6011: void * get_deleter( sp_typeinfo const & ti ) const 6011: { 6011: return pi_? pi_->get_deleter( ti ): 0; 6011: } 6011: 6011: void * get_local_deleter( sp_typeinfo const & ti ) const 6011: { 6011: return pi_? pi_->get_local_deleter( ti ): 0; 6011: } 6011: 6011: void * get_untyped_deleter() const 6011: { 6011: return pi_? pi_->get_untyped_deleter(): 0; 6011: } 6011: }; 6011: 6011: 6011: class weak_count 6011: { 6011: private: 6011: 6011: sp_counted_base * pi_; 6011: 6011: 6011: 6011: 6011: 6011: friend class shared_count; 6011: 6011: public: 6011: 6011: constexpr weak_count(): pi_(0) 6011: 6011: 6011: 6011: { 6011: } 6011: 6011: weak_count(shared_count const & r): pi_(r.pi_) 6011: 6011: 6011: 6011: { 6011: if(pi_ != 0) pi_->weak_add_ref(); 6011: } 6011: 6011: weak_count(weak_count const & r): pi_(r.pi_) 6011: 6011: 6011: 6011: { 6011: if(pi_ != 0) pi_->weak_add_ref(); 6011: } 6011: 6011: 6011: 6011: 6011: 6011: weak_count(weak_count && r): pi_(r.pi_) 6011: 6011: 6011: 6011: { 6011: r.pi_ = 0; 6011: } 6011: 6011: 6011: 6011: ~weak_count() 6011: { 6011: if(pi_ != 0) pi_->weak_release(); 6011: 6011: 6011: 6011: } 6011: 6011: weak_count & operator= (shared_count const & r) 6011: { 6011: sp_counted_base * tmp = r.pi_; 6011: 6011: if( tmp != pi_ ) 6011: { 6011: if(tmp != 0) tmp->weak_add_ref(); 6011: if(pi_ != 0) pi_->weak_release(); 6011: pi_ = tmp; 6011: } 6011: 6011: return *this; 6011: } 6011: 6011: weak_count & operator= (weak_count const & r) 6011: { 6011: sp_counted_base * tmp = r.pi_; 6011: 6011: if( tmp != pi_ ) 6011: { 6011: if(tmp != 0) tmp->weak_add_ref(); 6011: if(pi_ != 0) pi_->weak_release(); 6011: pi_ = tmp; 6011: } 6011: 6011: return *this; 6011: } 6011: 6011: void swap(weak_count & r) 6011: { 6011: sp_counted_base * tmp = r.pi_; 6011: r.pi_ = pi_; 6011: pi_ = tmp; 6011: } 6011: 6011: long use_count() const 6011: { 6011: return pi_ != 0? pi_->use_count(): 0; 6011: } 6011: 6011: bool empty() const 6011: { 6011: return pi_ == 0; 6011: } 6011: 6011: friend inline bool operator==(weak_count const & a, weak_count const & b) 6011: { 6011: return a.pi_ == b.pi_; 6011: } 6011: 6011: friend inline bool operator<(weak_count const & a, weak_count const & b) 6011: { 6011: return std::less()(a.pi_, b.pi_); 6011: } 6011: }; 6011: 6011: inline shared_count::shared_count( weak_count const & r ): pi_( r.pi_ ) 6011: 6011: 6011: 6011: { 6011: if( pi_ == 0 || !pi_->add_ref_lock() ) 6011: { 6011: boost::throw_exception( boost::bad_weak_ptr() ); 6011: } 6011: } 6011: 6011: inline shared_count::shared_count( weak_count const & r, sp_nothrow_tag ): pi_( r.pi_ ) 6011: 6011: 6011: 6011: { 6011: if( pi_ != 0 && !pi_->add_ref_lock() ) 6011: { 6011: pi_ = 0; 6011: } 6011: } 6011: 6011: } 6011: 6011: } 6011: 6011: 6011: #pragma GCC diagnostic pop 6011: # 29 "/usr/include/boost/smart_ptr/shared_ptr.hpp" 2 3 4 6011: 6011: # 1 "/usr/include/boost/smart_ptr/detail/sp_convertible.hpp" 1 3 4 6011: # 35 "/usr/include/boost/smart_ptr/detail/sp_convertible.hpp" 3 4 6011: namespace boost 6011: { 6011: 6011: namespace detail 6011: { 6011: 6011: template< class Y, class T > struct sp_convertible 6011: { 6011: typedef char (&yes) [1]; 6011: typedef char (&no) [2]; 6011: 6011: static yes f( T* ); 6011: static no f( ... ); 6011: 6011: enum _vt { value = sizeof( (f)( static_cast(0) ) ) == sizeof(yes) }; 6011: }; 6011: 6011: template< class Y, class T > struct sp_convertible< Y, T[] > 6011: { 6011: enum _vt { value = false }; 6011: }; 6011: 6011: template< class Y, class T > struct sp_convertible< Y[], T[] > 6011: { 6011: enum _vt { value = sp_convertible< Y[1], T[1] >::value }; 6011: }; 6011: 6011: template< class Y, std::size_t N, class T > struct sp_convertible< Y[N], T[] > 6011: { 6011: enum _vt { value = sp_convertible< Y[1], T[1] >::value }; 6011: }; 6011: 6011: struct sp_empty 6011: { 6011: }; 6011: 6011: template< bool > struct sp_enable_if_convertible_impl; 6011: 6011: template<> struct sp_enable_if_convertible_impl 6011: { 6011: typedef sp_empty type; 6011: }; 6011: 6011: template<> struct sp_enable_if_convertible_impl 6011: { 6011: }; 6011: 6011: template< class Y, class T > struct sp_enable_if_convertible: public sp_enable_if_convertible_impl< sp_convertible< Y, T >::value > 6011: { 6011: }; 6011: 6011: } 6011: 6011: } 6011: # 31 "/usr/include/boost/smart_ptr/shared_ptr.hpp" 2 3 4 6011: 6011: 6011: 6011: 6011: 6011: # 1 "/usr/include/boost/smart_ptr/detail/spinlock_pool.hpp" 1 3 4 6011: # 25 "/usr/include/boost/smart_ptr/detail/spinlock_pool.hpp" 3 4 6011: # 1 "/usr/include/boost/smart_ptr/detail/spinlock.hpp" 1 3 4 6011: # 47 "/usr/include/boost/smart_ptr/detail/spinlock.hpp" 3 4 6011: # 1 "/usr/include/boost/smart_ptr/detail/spinlock_std_atomic.hpp" 1 3 4 6011: # 18 "/usr/include/boost/smart_ptr/detail/spinlock_std_atomic.hpp" 3 4 6011: # 1 "/usr/include/boost/smart_ptr/detail/yield_k.hpp" 1 3 4 6011: # 28 "/usr/include/boost/smart_ptr/detail/yield_k.hpp" 3 4 6011: # 1 "/usr/include/boost/predef.h" 1 3 4 6011: # 29 "/usr/include/boost/smart_ptr/detail/yield_k.hpp" 2 3 4 6011: # 119 "/usr/include/boost/smart_ptr/detail/yield_k.hpp" 3 4 6011: namespace boost 6011: { 6011: 6011: namespace detail 6011: { 6011: 6011: inline void yield( unsigned k ) 6011: { 6011: if( k < 4 ) 6011: { 6011: } 6011: 6011: 6011: 6011: 6011: 6011: 6011: else if( k < 32 || k & 1 ) 6011: { 6011: sched_yield(); 6011: } 6011: else 6011: { 6011: 6011: struct timespec rqtp = { 0, 0 }; 6011: 6011: 6011: 6011: 6011: rqtp.tv_sec = 0; 6011: rqtp.tv_nsec = 1000; 6011: 6011: nanosleep( &rqtp, 0 ); 6011: } 6011: } 6011: 6011: } 6011: 6011: } 6011: # 19 "/usr/include/boost/smart_ptr/detail/spinlock_std_atomic.hpp" 2 3 4 6011: 6011: 6011: namespace boost 6011: { 6011: 6011: namespace detail 6011: { 6011: 6011: class spinlock 6011: { 6011: public: 6011: 6011: std::atomic_flag v_; 6011: 6011: public: 6011: 6011: bool try_lock() 6011: { 6011: return !v_.test_and_set( std::memory_order_acquire ); 6011: } 6011: 6011: void lock() 6011: { 6011: for( unsigned k = 0; !try_lock(); ++k ) 6011: { 6011: boost::detail::yield( k ); 6011: } 6011: } 6011: 6011: void unlock() 6011: { 6011: v_ .clear( std::memory_order_release ); 6011: } 6011: 6011: public: 6011: 6011: class scoped_lock 6011: { 6011: private: 6011: 6011: spinlock & sp_; 6011: 6011: scoped_lock( scoped_lock const & ); 6011: scoped_lock & operator=( scoped_lock const & ); 6011: 6011: public: 6011: 6011: explicit scoped_lock( spinlock & sp ): sp_( sp ) 6011: { 6011: sp.lock(); 6011: } 6011: 6011: ~scoped_lock() 6011: { 6011: sp_.unlock(); 6011: } 6011: }; 6011: }; 6011: 6011: } 6011: } 6011: # 48 "/usr/include/boost/smart_ptr/detail/spinlock.hpp" 2 3 4 6011: # 26 "/usr/include/boost/smart_ptr/detail/spinlock_pool.hpp" 2 3 4 6011: 6011: 6011: namespace boost 6011: { 6011: 6011: namespace detail 6011: { 6011: 6011: template< int M > class spinlock_pool 6011: { 6011: private: 6011: 6011: static spinlock pool_[ 41 ]; 6011: 6011: public: 6011: 6011: static spinlock & spinlock_for( void const * pv ) 6011: { 6011: 6011: 6011: 6011: std::size_t i = reinterpret_cast< std::size_t >( pv ) % 41; 6011: 6011: return pool_[ i ]; 6011: } 6011: 6011: class scoped_lock 6011: { 6011: private: 6011: 6011: spinlock & sp_; 6011: 6011: scoped_lock( scoped_lock const & ); 6011: scoped_lock & operator=( scoped_lock const & ); 6011: 6011: public: 6011: 6011: explicit scoped_lock( void const * pv ): sp_( spinlock_for( pv ) ) 6011: { 6011: sp_.lock(); 6011: } 6011: 6011: ~scoped_lock() 6011: { 6011: sp_.unlock(); 6011: } 6011: }; 6011: }; 6011: 6011: template< int M > spinlock spinlock_pool< M >::pool_[ 41 ] = 6011: { 6011: { { 0 } }, { { 0 } }, { { 0 } }, { { 0 } }, { { 0 } }, 6011: { { 0 } }, { { 0 } }, { { 0 } }, { { 0 } }, { { 0 } }, 6011: { { 0 } }, { { 0 } }, { { 0 } }, { { 0 } }, { { 0 } }, 6011: { { 0 } }, { { 0 } }, { { 0 } }, { { 0 } }, { { 0 } }, 6011: { { 0 } }, { { 0 } }, { { 0 } }, { { 0 } }, { { 0 } }, 6011: { { 0 } }, { { 0 } }, { { 0 } }, { { 0 } }, { { 0 } }, 6011: { { 0 } }, { { 0 } }, { { 0 } }, { { 0 } }, { { 0 } }, 6011: { { 0 } }, { { 0 } }, { { 0 } }, { { 0 } }, { { 0 } }, 6011: { { 0 } } 6011: }; 6011: 6011: } 6011: } 6011: # 37 "/usr/include/boost/smart_ptr/shared_ptr.hpp" 2 3 4 6011: # 53 "/usr/include/boost/smart_ptr/shared_ptr.hpp" 3 4 6011: #pragma GCC diagnostic push 6011: #pragma GCC diagnostic ignored "-Wdeprecated-declarations" 6011: 6011: 6011: namespace boost 6011: { 6011: 6011: template class shared_ptr; 6011: template class weak_ptr; 6011: template class enable_shared_from_this; 6011: class enable_shared_from_raw; 6011: 6011: namespace movelib 6011: { 6011: 6011: template< class T, class D > class unique_ptr; 6011: 6011: } 6011: 6011: namespace detail 6011: { 6011: 6011: 6011: 6011: template< class T > struct sp_element 6011: { 6011: typedef T type; 6011: }; 6011: 6011: 6011: 6011: template< class T > struct sp_element< T[] > 6011: { 6011: typedef T type; 6011: }; 6011: 6011: 6011: 6011: template< class T, std::size_t N > struct sp_element< T[N] > 6011: { 6011: typedef T type; 6011: }; 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: template< class T > struct sp_dereference 6011: { 6011: typedef T & type; 6011: }; 6011: 6011: template<> struct sp_dereference< void > 6011: { 6011: typedef void type; 6011: }; 6011: 6011: 6011: 6011: template<> struct sp_dereference< void const > 6011: { 6011: typedef void type; 6011: }; 6011: 6011: template<> struct sp_dereference< void volatile > 6011: { 6011: typedef void type; 6011: }; 6011: 6011: template<> struct sp_dereference< void const volatile > 6011: { 6011: typedef void type; 6011: }; 6011: 6011: 6011: 6011: 6011: 6011: template< class T > struct sp_dereference< T[] > 6011: { 6011: typedef void type; 6011: }; 6011: 6011: 6011: 6011: template< class T, std::size_t N > struct sp_dereference< T[N] > 6011: { 6011: typedef void type; 6011: }; 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: template< class T > struct sp_member_access 6011: { 6011: typedef T * type; 6011: }; 6011: 6011: 6011: 6011: template< class T > struct sp_member_access< T[] > 6011: { 6011: typedef void type; 6011: }; 6011: 6011: 6011: 6011: template< class T, std::size_t N > struct sp_member_access< T[N] > 6011: { 6011: typedef void type; 6011: }; 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: template< class T > struct sp_array_access 6011: { 6011: typedef void type; 6011: }; 6011: 6011: 6011: 6011: template< class T > struct sp_array_access< T[] > 6011: { 6011: typedef T & type; 6011: }; 6011: 6011: 6011: 6011: template< class T, std::size_t N > struct sp_array_access< T[N] > 6011: { 6011: typedef T & type; 6011: }; 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: template< class T > struct sp_extent 6011: { 6011: enum _vt { value = 0 }; 6011: }; 6011: 6011: 6011: 6011: template< class T, std::size_t N > struct sp_extent< T[N] > 6011: { 6011: enum _vt { value = N }; 6011: }; 6011: 6011: 6011: 6011: 6011: 6011: 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 ) 6011: { 6011: if( pe != 0 ) 6011: { 6011: pe->_internal_accept_owner( ppx, const_cast< Y* >( py ) ); 6011: } 6011: } 6011: 6011: 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 ); 6011: # 242 "/usr/include/boost/smart_ptr/shared_ptr.hpp" 3 4 6011: inline void sp_enable_shared_from_this( ... ) 6011: { 6011: } 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: template< class T, class R > struct sp_enable_if_auto_ptr 6011: { 6011: }; 6011: 6011: template< class T, class R > struct sp_enable_if_auto_ptr< std::auto_ptr< T >, R > 6011: { 6011: typedef R type; 6011: }; 6011: 6011: 6011: 6011: 6011: 6011: template< class Y, class T > inline void sp_assert_convertible() noexcept 6011: { 6011: 6011: 6011: 6011: typedef char tmp[ sp_convertible< Y, T >::value? 1: -1 ]; 6011: (void)sizeof( tmp ); 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: } 6011: 6011: 6011: 6011: template< class T, class Y > inline void sp_pointer_construct( boost::shared_ptr< T > * ppx, Y * p, boost::detail::shared_count & pn ) 6011: { 6011: boost::detail::shared_count( p ).swap( pn ); 6011: boost::detail::sp_enable_shared_from_this( ppx, p, p ); 6011: } 6011: 6011: 6011: 6011: template< class T, class Y > inline void sp_pointer_construct( boost::shared_ptr< T[] > * , Y * p, boost::detail::shared_count & pn ) 6011: { 6011: sp_assert_convertible< Y[], T[] >(); 6011: boost::detail::shared_count( p, boost::checked_array_deleter< T >() ).swap( pn ); 6011: } 6011: 6011: 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 ) 6011: { 6011: sp_assert_convertible< Y[N], T[N] >(); 6011: boost::detail::shared_count( p, boost::checked_array_deleter< T >() ).swap( pn ); 6011: } 6011: 6011: 6011: 6011: 6011: 6011: template< class T, class Y > inline void sp_deleter_construct( boost::shared_ptr< T > * ppx, Y * p ) 6011: { 6011: boost::detail::sp_enable_shared_from_this( ppx, p, p ); 6011: } 6011: 6011: 6011: 6011: template< class T, class Y > inline void sp_deleter_construct( boost::shared_ptr< T[] > * , Y * ) 6011: { 6011: sp_assert_convertible< Y[], T[] >(); 6011: } 6011: 6011: template< class T, std::size_t N, class Y > inline void sp_deleter_construct( boost::shared_ptr< T[N] > * , Y * ) 6011: { 6011: sp_assert_convertible< Y[N], T[N] >(); 6011: } 6011: 6011: 6011: 6011: struct sp_internal_constructor_tag 6011: { 6011: }; 6011: 6011: } 6011: # 341 "/usr/include/boost/smart_ptr/shared_ptr.hpp" 3 4 6011: template class shared_ptr 6011: { 6011: private: 6011: 6011: 6011: typedef shared_ptr this_type; 6011: 6011: public: 6011: 6011: typedef typename boost::detail::sp_element< T >::type element_type; 6011: 6011: constexpr shared_ptr() noexcept : px( 0 ), pn() 6011: { 6011: } 6011: 6011: 6011: 6011: constexpr shared_ptr( boost::detail::sp_nullptr_t ) noexcept : px( 0 ), pn() 6011: { 6011: } 6011: 6011: 6011: 6011: constexpr shared_ptr( boost::detail::sp_internal_constructor_tag, element_type * px_, boost::detail::shared_count const & pn_ ) noexcept : px( px_ ), pn( pn_ ) 6011: { 6011: } 6011: 6011: 6011: 6011: constexpr shared_ptr( boost::detail::sp_internal_constructor_tag, element_type * px_, boost::detail::shared_count && pn_ ) noexcept : px( px_ ), pn( std::move( pn_ ) ) 6011: { 6011: } 6011: 6011: 6011: 6011: template 6011: explicit shared_ptr( Y * p ): px( p ), pn() 6011: { 6011: boost::detail::sp_pointer_construct( this, p, pn ); 6011: } 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: template shared_ptr( Y * p, D d ): px( p ), pn( p, d ) 6011: { 6011: boost::detail::sp_deleter_construct( this, p ); 6011: } 6011: 6011: 6011: 6011: template shared_ptr( boost::detail::sp_nullptr_t p, D d ): px( p ), pn( p, d ) 6011: { 6011: } 6011: 6011: 6011: 6011: 6011: 6011: template shared_ptr( Y * p, D d, A a ): px( p ), pn( p, d, a ) 6011: { 6011: boost::detail::sp_deleter_construct( this, p ); 6011: } 6011: 6011: 6011: 6011: template shared_ptr( boost::detail::sp_nullptr_t p, D d, A a ): px( p ), pn( p, d, a ) 6011: { 6011: } 6011: # 422 "/usr/include/boost/smart_ptr/shared_ptr.hpp" 3 4 6011: shared_ptr( shared_ptr const & r ) noexcept : px( r.px ), pn( r.pn ) 6011: { 6011: } 6011: 6011: 6011: 6011: template 6011: explicit shared_ptr( weak_ptr const & r ): pn( r.pn ) 6011: { 6011: boost::detail::sp_assert_convertible< Y, T >(); 6011: 6011: 6011: px = r.px; 6011: } 6011: 6011: template 6011: shared_ptr( weak_ptr const & r, boost::detail::sp_nothrow_tag ) 6011: noexcept : px( 0 ), pn( r.pn, boost::detail::sp_nothrow_tag() ) 6011: { 6011: if( !pn.empty() ) 6011: { 6011: px = r.px; 6011: } 6011: } 6011: 6011: template 6011: 6011: 6011: shared_ptr( shared_ptr const & r, typename boost::detail::sp_enable_if_convertible::type = boost::detail::sp_empty() ) 6011: 6011: 6011: 6011: 6011: 6011: 6011: noexcept : px( r.px ), pn( r.pn ) 6011: { 6011: boost::detail::sp_assert_convertible< Y, T >(); 6011: } 6011: 6011: 6011: template< class Y > 6011: shared_ptr( shared_ptr const & r, element_type * p ) noexcept : px( p ), pn( r.pn ) 6011: { 6011: } 6011: 6011: 6011: 6011: template 6011: explicit shared_ptr( std::auto_ptr & r ): px(r.get()), pn() 6011: { 6011: boost::detail::sp_assert_convertible< Y, T >(); 6011: 6011: Y * tmp = r.get(); 6011: pn = boost::detail::shared_count( r ); 6011: 6011: boost::detail::sp_deleter_construct( this, tmp ); 6011: } 6011: 6011: 6011: 6011: template 6011: shared_ptr( std::auto_ptr && r ): px(r.get()), pn() 6011: { 6011: boost::detail::sp_assert_convertible< Y, T >(); 6011: 6011: Y * tmp = r.get(); 6011: pn = boost::detail::shared_count( r ); 6011: 6011: boost::detail::sp_deleter_construct( this, tmp ); 6011: } 6011: # 515 "/usr/include/boost/smart_ptr/shared_ptr.hpp" 3 4 6011: template< class Y, class D > 6011: shared_ptr( std::unique_ptr< Y, D > && r ): px( r.get() ), pn() 6011: { 6011: boost::detail::sp_assert_convertible< Y, T >(); 6011: 6011: typename std::unique_ptr< Y, D >::pointer tmp = r.get(); 6011: 6011: if( tmp != 0 ) 6011: { 6011: pn = boost::detail::shared_count( r ); 6011: boost::detail::sp_deleter_construct( this, tmp ); 6011: } 6011: } 6011: 6011: 6011: 6011: template< class Y, class D > 6011: shared_ptr( boost::movelib::unique_ptr< Y, D > r ): px( r.get() ), pn() 6011: { 6011: boost::detail::sp_assert_convertible< Y, T >(); 6011: 6011: typename boost::movelib::unique_ptr< Y, D >::pointer tmp = r.get(); 6011: 6011: if( tmp != 0 ) 6011: { 6011: pn = boost::detail::shared_count( r ); 6011: boost::detail::sp_deleter_construct( this, tmp ); 6011: } 6011: } 6011: 6011: 6011: 6011: shared_ptr & operator=( shared_ptr const & r ) noexcept 6011: { 6011: this_type(r).swap(*this); 6011: return *this; 6011: } 6011: 6011: 6011: 6011: template 6011: shared_ptr & operator=(shared_ptr const & r) noexcept 6011: { 6011: this_type(r).swap(*this); 6011: return *this; 6011: } 6011: 6011: 6011: 6011: 6011: 6011: template 6011: shared_ptr & operator=( std::auto_ptr & r ) 6011: { 6011: this_type( r ).swap( *this ); 6011: return *this; 6011: } 6011: 6011: 6011: 6011: template 6011: shared_ptr & operator=( std::auto_ptr && r ) 6011: { 6011: this_type( static_cast< std::auto_ptr && >( r ) ).swap( *this ); 6011: return *this; 6011: } 6011: # 597 "/usr/include/boost/smart_ptr/shared_ptr.hpp" 3 4 6011: template 6011: shared_ptr & operator=( std::unique_ptr && r ) 6011: { 6011: this_type( static_cast< std::unique_ptr && >( r ) ).swap(*this); 6011: return *this; 6011: } 6011: 6011: 6011: 6011: template 6011: shared_ptr & operator=( boost::movelib::unique_ptr r ) 6011: { 6011: 6011: 6011: boost::detail::sp_assert_convertible< Y, T >(); 6011: 6011: typename boost::movelib::unique_ptr< Y, D >::pointer p = r.get(); 6011: 6011: shared_ptr tmp; 6011: 6011: if( p != 0 ) 6011: { 6011: tmp.px = p; 6011: tmp.pn = boost::detail::shared_count( r ); 6011: 6011: boost::detail::sp_deleter_construct( &tmp, p ); 6011: } 6011: 6011: tmp.swap( *this ); 6011: 6011: return *this; 6011: } 6011: 6011: 6011: 6011: 6011: 6011: shared_ptr( shared_ptr && r ) noexcept : px( r.px ), pn() 6011: { 6011: pn.swap( r.pn ); 6011: r.px = 0; 6011: } 6011: 6011: template 6011: 6011: 6011: shared_ptr( shared_ptr && r, typename boost::detail::sp_enable_if_convertible::type = boost::detail::sp_empty() ) 6011: 6011: 6011: 6011: 6011: 6011: 6011: noexcept : px( r.px ), pn() 6011: { 6011: boost::detail::sp_assert_convertible< Y, T >(); 6011: 6011: pn.swap( r.pn ); 6011: r.px = 0; 6011: } 6011: 6011: shared_ptr & operator=( shared_ptr && r ) noexcept 6011: { 6011: this_type( static_cast< shared_ptr && >( r ) ).swap( *this ); 6011: return *this; 6011: } 6011: 6011: template 6011: shared_ptr & operator=( shared_ptr && r ) noexcept 6011: { 6011: this_type( static_cast< shared_ptr && >( r ) ).swap( *this ); 6011: return *this; 6011: } 6011: 6011: 6011: template 6011: shared_ptr( shared_ptr && r, element_type * p ) noexcept : px( p ), pn() 6011: { 6011: pn.swap( r.pn ); 6011: r.px = 0; 6011: } 6011: 6011: 6011: 6011: 6011: 6011: shared_ptr & operator=( boost::detail::sp_nullptr_t ) noexcept 6011: { 6011: this_type().swap(*this); 6011: return *this; 6011: } 6011: 6011: 6011: 6011: void reset() noexcept 6011: { 6011: this_type().swap(*this); 6011: } 6011: 6011: template void reset( Y * p ) 6011: { 6011: (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__)); 6011: this_type( p ).swap( *this ); 6011: } 6011: 6011: template void reset( Y * p, D d ) 6011: { 6011: this_type( p, d ).swap( *this ); 6011: } 6011: 6011: template void reset( Y * p, D d, A a ) 6011: { 6011: this_type( p, d, a ).swap( *this ); 6011: } 6011: 6011: template void reset( shared_ptr const & r, element_type * p ) noexcept 6011: { 6011: this_type( r, p ).swap( *this ); 6011: } 6011: 6011: 6011: 6011: template void reset( shared_ptr && r, element_type * p ) noexcept 6011: { 6011: this_type( static_cast< shared_ptr && >( r ), p ).swap( *this ); 6011: } 6011: 6011: 6011: 6011: typename boost::detail::sp_dereference< T >::type operator* () const noexcept 6011: { 6011: (static_cast (px != 0) ? void (0) : __assert_fail ("px != 0", "/usr/include/boost/smart_ptr/shared_ptr.hpp", 728, __extension__ __PRETTY_FUNCTION__)); 6011: return *px; 6011: } 6011: 6011: typename boost::detail::sp_member_access< T >::type operator-> () const noexcept 6011: { 6011: (static_cast (px != 0) ? void (0) : __assert_fail ("px != 0", "/usr/include/boost/smart_ptr/shared_ptr.hpp", 734, __extension__ __PRETTY_FUNCTION__)); 6011: return px; 6011: } 6011: 6011: typename boost::detail::sp_array_access< T >::type operator[] ( std::ptrdiff_t i ) const noexcept 6011: { 6011: (static_cast (px != 0) ? void (0) : __assert_fail ("px != 0", "/usr/include/boost/smart_ptr/shared_ptr.hpp", 740, __extension__ __PRETTY_FUNCTION__)); 6011: (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__)); 6011: 6011: return static_cast< typename boost::detail::sp_array_access< T >::type >( px[ i ] ); 6011: } 6011: 6011: element_type * get() const noexcept 6011: { 6011: return px; 6011: } 6011: 6011: 6011: # 1 "/usr/include/boost/smart_ptr/detail/operator_bool.hpp" 1 3 4 6011: # 12 "/usr/include/boost/smart_ptr/detail/operator_bool.hpp" 3 4 6011: explicit operator bool () const noexcept 6011: { 6011: return px != 0; 6011: } 6011: # 61 "/usr/include/boost/smart_ptr/detail/operator_bool.hpp" 3 4 6011: bool operator! () const noexcept 6011: { 6011: return px == 0; 6011: } 6011: # 753 "/usr/include/boost/smart_ptr/shared_ptr.hpp" 2 3 4 6011: 6011: bool unique() const noexcept 6011: { 6011: return pn.unique(); 6011: } 6011: 6011: long use_count() const noexcept 6011: { 6011: return pn.use_count(); 6011: } 6011: 6011: void swap( shared_ptr & other ) noexcept 6011: { 6011: std::swap(px, other.px); 6011: pn.swap(other.pn); 6011: } 6011: 6011: template bool owner_before( shared_ptr const & rhs ) const noexcept 6011: { 6011: return pn < rhs.pn; 6011: } 6011: 6011: template bool owner_before( weak_ptr const & rhs ) const noexcept 6011: { 6011: return pn < rhs.pn; 6011: } 6011: 6011: void * _internal_get_deleter( boost::detail::sp_typeinfo const & ti ) const noexcept 6011: { 6011: return pn.get_deleter( ti ); 6011: } 6011: 6011: void * _internal_get_local_deleter( boost::detail::sp_typeinfo const & ti ) const noexcept 6011: { 6011: return pn.get_local_deleter( ti ); 6011: } 6011: 6011: void * _internal_get_untyped_deleter() const noexcept 6011: { 6011: return pn.get_untyped_deleter(); 6011: } 6011: 6011: bool _internal_equiv( shared_ptr const & r ) const noexcept 6011: { 6011: return px == r.px && pn == r.pn; 6011: } 6011: 6011: boost::detail::shared_count _internal_count() const noexcept 6011: { 6011: return pn; 6011: } 6011: 6011: 6011: 6011: 6011: 6011: 6011: private: 6011: 6011: template friend class shared_ptr; 6011: template friend class weak_ptr; 6011: 6011: 6011: 6011: 6011: element_type * px; 6011: boost::detail::shared_count pn; 6011: 6011: }; 6011: 6011: template inline bool operator==(shared_ptr const & a, shared_ptr const & b) noexcept 6011: { 6011: return a.get() == b.get(); 6011: } 6011: 6011: template inline bool operator!=(shared_ptr const & a, shared_ptr const & b) noexcept 6011: { 6011: return a.get() != b.get(); 6011: } 6011: # 846 "/usr/include/boost/smart_ptr/shared_ptr.hpp" 3 4 6011: template inline bool operator==( shared_ptr const & p, boost::detail::sp_nullptr_t ) noexcept 6011: { 6011: return p.get() == 0; 6011: } 6011: 6011: template inline bool operator==( boost::detail::sp_nullptr_t, shared_ptr const & p ) noexcept 6011: { 6011: return p.get() == 0; 6011: } 6011: 6011: template inline bool operator!=( shared_ptr const & p, boost::detail::sp_nullptr_t ) noexcept 6011: { 6011: return p.get() != 0; 6011: } 6011: 6011: template inline bool operator!=( boost::detail::sp_nullptr_t, shared_ptr const & p ) noexcept 6011: { 6011: return p.get() != 0; 6011: } 6011: 6011: 6011: 6011: template inline bool operator<(shared_ptr const & a, shared_ptr const & b) noexcept 6011: { 6011: return a.owner_before( b ); 6011: } 6011: 6011: template inline void swap(shared_ptr & a, shared_ptr & b) noexcept 6011: { 6011: a.swap(b); 6011: } 6011: 6011: template shared_ptr static_pointer_cast( shared_ptr const & r ) noexcept 6011: { 6011: (void) static_cast< T* >( static_cast< U* >( 0 ) ); 6011: 6011: typedef typename shared_ptr::element_type E; 6011: 6011: E * p = static_cast< E* >( r.get() ); 6011: return shared_ptr( r, p ); 6011: } 6011: 6011: template shared_ptr const_pointer_cast( shared_ptr const & r ) noexcept 6011: { 6011: (void) const_cast< T* >( static_cast< U* >( 0 ) ); 6011: 6011: typedef typename shared_ptr::element_type E; 6011: 6011: E * p = const_cast< E* >( r.get() ); 6011: return shared_ptr( r, p ); 6011: } 6011: 6011: template shared_ptr dynamic_pointer_cast( shared_ptr const & r ) noexcept 6011: { 6011: (void) dynamic_cast< T* >( static_cast< U* >( 0 ) ); 6011: 6011: typedef typename shared_ptr::element_type E; 6011: 6011: E * p = dynamic_cast< E* >( r.get() ); 6011: return p? shared_ptr( r, p ): shared_ptr(); 6011: } 6011: 6011: template shared_ptr reinterpret_pointer_cast( shared_ptr const & r ) noexcept 6011: { 6011: (void) reinterpret_cast< T* >( static_cast< U* >( 0 ) ); 6011: 6011: typedef typename shared_ptr::element_type E; 6011: 6011: E * p = reinterpret_cast< E* >( r.get() ); 6011: return shared_ptr( r, p ); 6011: } 6011: 6011: 6011: 6011: template shared_ptr static_pointer_cast( shared_ptr && r ) noexcept 6011: { 6011: (void) static_cast< T* >( static_cast< U* >( 0 ) ); 6011: 6011: typedef typename shared_ptr::element_type E; 6011: 6011: E * p = static_cast< E* >( r.get() ); 6011: return shared_ptr( std::move(r), p ); 6011: } 6011: 6011: template shared_ptr const_pointer_cast( shared_ptr && r ) noexcept 6011: { 6011: (void) const_cast< T* >( static_cast< U* >( 0 ) ); 6011: 6011: typedef typename shared_ptr::element_type E; 6011: 6011: E * p = const_cast< E* >( r.get() ); 6011: return shared_ptr( std::move(r), p ); 6011: } 6011: 6011: template shared_ptr dynamic_pointer_cast( shared_ptr && r ) noexcept 6011: { 6011: (void) dynamic_cast< T* >( static_cast< U* >( 0 ) ); 6011: 6011: typedef typename shared_ptr::element_type E; 6011: 6011: E * p = dynamic_cast< E* >( r.get() ); 6011: return p? shared_ptr( std::move(r), p ): shared_ptr(); 6011: } 6011: 6011: template shared_ptr reinterpret_pointer_cast( shared_ptr && r ) noexcept 6011: { 6011: (void) reinterpret_cast< T* >( static_cast< U* >( 0 ) ); 6011: 6011: typedef typename shared_ptr::element_type E; 6011: 6011: E * p = reinterpret_cast< E* >( r.get() ); 6011: return shared_ptr( std::move(r), p ); 6011: } 6011: 6011: 6011: 6011: 6011: 6011: template inline typename shared_ptr::element_type * get_pointer(shared_ptr const & p) noexcept 6011: { 6011: return p.get(); 6011: } 6011: # 991 "/usr/include/boost/smart_ptr/shared_ptr.hpp" 3 4 6011: template std::basic_ostream & operator<< (std::basic_ostream & os, shared_ptr const & p) 6011: 6011: { 6011: os << p.get(); 6011: return os; 6011: } 6011: # 1006 "/usr/include/boost/smart_ptr/shared_ptr.hpp" 3 4 6011: namespace detail 6011: { 6011: 6011: template D * basic_get_deleter( shared_ptr const & p ) noexcept 6011: { 6011: return static_cast( p._internal_get_deleter(typeid(D)) ); 6011: } 6011: 6011: template D * basic_get_local_deleter( D *, shared_ptr const & p ) noexcept; 6011: template D const * basic_get_local_deleter( D const *, shared_ptr const & p ) noexcept; 6011: 6011: class esft2_deleter_wrapper 6011: { 6011: private: 6011: 6011: shared_ptr deleter_; 6011: 6011: public: 6011: 6011: esft2_deleter_wrapper() 6011: { 6011: } 6011: 6011: template< class T > void set_deleter( shared_ptr const & deleter ) noexcept 6011: { 6011: deleter_ = deleter; 6011: } 6011: 6011: template D* get_deleter() const noexcept 6011: { 6011: return boost::detail::basic_get_deleter( deleter_ ); 6011: } 6011: 6011: template< class T> void operator()( T* ) noexcept 6011: { 6011: (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__)); 6011: deleter_.reset(); 6011: } 6011: }; 6011: 6011: } 6011: 6011: template D * get_deleter( shared_ptr const & p ) noexcept 6011: { 6011: D * d = boost::detail::basic_get_deleter( p ); 6011: 6011: if( d == 0 ) 6011: { 6011: d = boost::detail::basic_get_local_deleter( d, p ); 6011: } 6011: 6011: if( d == 0 ) 6011: { 6011: boost::detail::esft2_deleter_wrapper *del_wrapper = boost::detail::basic_get_deleter(p); 6011: 6011: 6011: if(del_wrapper) d = del_wrapper->::boost::detail::esft2_deleter_wrapper::get_deleter(); 6011: } 6011: 6011: return d; 6011: } 6011: 6011: 6011: 6011: 6011: 6011: template inline bool atomic_is_lock_free( shared_ptr const * ) noexcept 6011: { 6011: return false; 6011: } 6011: 6011: template shared_ptr atomic_load( shared_ptr const * p ) noexcept 6011: { 6011: boost::detail::spinlock_pool<2>::scoped_lock lock( p ); 6011: return *p; 6011: } 6011: 6011: template inline shared_ptr atomic_load_explicit( shared_ptr const * p, int ) noexcept 6011: { 6011: return atomic_load( p ); 6011: } 6011: 6011: template void atomic_store( shared_ptr * p, shared_ptr r ) noexcept 6011: { 6011: boost::detail::spinlock_pool<2>::scoped_lock lock( p ); 6011: p->swap( r ); 6011: } 6011: 6011: template inline void atomic_store_explicit( shared_ptr * p, shared_ptr r, int ) noexcept 6011: { 6011: atomic_store( p, r ); 6011: } 6011: 6011: template shared_ptr atomic_exchange( shared_ptr * p, shared_ptr r ) noexcept 6011: { 6011: boost::detail::spinlock & sp = boost::detail::spinlock_pool<2>::spinlock_for( p ); 6011: 6011: sp.lock(); 6011: p->swap( r ); 6011: sp.unlock(); 6011: 6011: return r; 6011: } 6011: 6011: template shared_ptr inline atomic_exchange_explicit( shared_ptr * p, shared_ptr r, int ) noexcept 6011: { 6011: return atomic_exchange( p, r ); 6011: } 6011: 6011: template bool atomic_compare_exchange( shared_ptr * p, shared_ptr * v, shared_ptr w ) noexcept 6011: { 6011: boost::detail::spinlock & sp = boost::detail::spinlock_pool<2>::spinlock_for( p ); 6011: 6011: sp.lock(); 6011: 6011: if( p->_internal_equiv( *v ) ) 6011: { 6011: p->swap( w ); 6011: 6011: sp.unlock(); 6011: 6011: return true; 6011: } 6011: else 6011: { 6011: shared_ptr tmp( *p ); 6011: 6011: sp.unlock(); 6011: 6011: tmp.swap( *v ); 6011: return false; 6011: } 6011: } 6011: 6011: template inline bool atomic_compare_exchange_explicit( shared_ptr * p, shared_ptr * v, shared_ptr w, int, int ) noexcept 6011: { 6011: return atomic_compare_exchange( p, v, w ); 6011: } 6011: 6011: 6011: 6011: 6011: 6011: template< class T > struct hash; 6011: 6011: template< class T > std::size_t hash_value( boost::shared_ptr const & p ) noexcept 6011: { 6011: return boost::hash< typename boost::shared_ptr::element_type* >()( p.get() ); 6011: } 6011: 6011: } 6011: 6011: # 1 "/usr/include/boost/smart_ptr/detail/local_sp_deleter.hpp" 1 3 4 6011: # 20 "/usr/include/boost/smart_ptr/detail/local_sp_deleter.hpp" 3 4 6011: # 1 "/usr/include/boost/smart_ptr/detail/local_counted_base.hpp" 1 3 4 6011: # 24 "/usr/include/boost/smart_ptr/detail/local_counted_base.hpp" 3 4 6011: namespace boost 6011: { 6011: 6011: namespace detail 6011: { 6011: 6011: class local_counted_base 6011: { 6011: private: 6011: 6011: local_counted_base & operator= ( local_counted_base const & ); 6011: 6011: private: 6011: 6011: 6011: enum count_type { min_ = 0, initial_ = 1, max_ = 2147483647 }; 6011: 6011: count_type local_use_count_; 6011: 6011: public: 6011: 6011: constexpr local_counted_base() noexcept: local_use_count_( initial_ ) 6011: { 6011: } 6011: 6011: constexpr local_counted_base( local_counted_base const & ) noexcept: local_use_count_( initial_ ) 6011: { 6011: } 6011: 6011: virtual ~local_counted_base() 6011: { 6011: } 6011: 6011: virtual void local_cb_destroy() noexcept = 0; 6011: 6011: virtual boost::detail::shared_count local_cb_get_shared_count() const noexcept = 0; 6011: 6011: void add_ref() noexcept 6011: { 6011: # 73 "/usr/include/boost/smart_ptr/detail/local_counted_base.hpp" 3 4 6011: local_use_count_ = static_cast( local_use_count_ + 1 ); 6011: } 6011: 6011: void release() noexcept 6011: { 6011: local_use_count_ = static_cast( local_use_count_ - 1 ); 6011: 6011: if( local_use_count_ == 0 ) 6011: { 6011: local_cb_destroy(); 6011: } 6011: } 6011: 6011: long local_use_count() const noexcept 6011: { 6011: return local_use_count_; 6011: } 6011: }; 6011: 6011: class local_counted_impl: public local_counted_base 6011: { 6011: private: 6011: 6011: local_counted_impl( local_counted_impl const & ); 6011: 6011: private: 6011: 6011: shared_count pn_; 6011: 6011: public: 6011: 6011: explicit local_counted_impl( shared_count const& pn ): pn_( pn ) 6011: { 6011: } 6011: 6011: 6011: 6011: explicit local_counted_impl( shared_count && pn ): pn_( std::move(pn) ) 6011: { 6011: } 6011: 6011: 6011: 6011: virtual void local_cb_destroy() noexcept 6011: { 6011: delete this; 6011: } 6011: 6011: virtual boost::detail::shared_count local_cb_get_shared_count() const noexcept 6011: { 6011: return pn_; 6011: } 6011: }; 6011: 6011: class local_counted_impl_em: public local_counted_base 6011: { 6011: public: 6011: 6011: shared_count pn_; 6011: 6011: virtual void local_cb_destroy() noexcept 6011: { 6011: shared_count().swap( pn_ ); 6011: } 6011: 6011: virtual boost::detail::shared_count local_cb_get_shared_count() const noexcept 6011: { 6011: return pn_; 6011: } 6011: }; 6011: 6011: } 6011: 6011: } 6011: # 21 "/usr/include/boost/smart_ptr/detail/local_sp_deleter.hpp" 2 3 4 6011: 6011: 6011: namespace boost 6011: { 6011: 6011: namespace detail 6011: { 6011: 6011: template class local_sp_deleter: public local_counted_impl_em 6011: { 6011: private: 6011: 6011: D d_; 6011: 6011: public: 6011: 6011: local_sp_deleter(): d_() 6011: { 6011: } 6011: 6011: explicit local_sp_deleter( D const& d ) noexcept: d_( d ) 6011: { 6011: } 6011: 6011: 6011: 6011: explicit local_sp_deleter( D&& d ) noexcept: d_( std::move(d) ) 6011: { 6011: } 6011: 6011: 6011: 6011: D& deleter() 6011: { 6011: return d_; 6011: } 6011: 6011: template void operator()( Y* p ) noexcept 6011: { 6011: d_( p ); 6011: } 6011: 6011: 6011: 6011: void operator()( boost::detail::sp_nullptr_t p ) noexcept 6011: { 6011: d_( p ); 6011: } 6011: 6011: 6011: }; 6011: 6011: template<> class local_sp_deleter 6011: { 6011: }; 6011: 6011: template D * get_local_deleter( local_sp_deleter * p ) 6011: { 6011: return &p->deleter(); 6011: } 6011: 6011: inline void * get_local_deleter( local_sp_deleter * ) 6011: { 6011: return 0; 6011: } 6011: 6011: } 6011: 6011: } 6011: # 1159 "/usr/include/boost/smart_ptr/shared_ptr.hpp" 2 3 4 6011: 6011: namespace boost 6011: { 6011: 6011: namespace detail 6011: { 6011: 6011: template D * basic_get_local_deleter( D *, shared_ptr const & p ) noexcept 6011: { 6011: return static_cast( p._internal_get_local_deleter( typeid(local_sp_deleter) ) ); 6011: } 6011: 6011: template D const * basic_get_local_deleter( D const *, shared_ptr const & p ) noexcept 6011: { 6011: return static_cast( p._internal_get_local_deleter( typeid(local_sp_deleter) ) ); 6011: } 6011: 6011: } 6011: 6011: } 6011: 6011: 6011: #pragma GCC diagnostic pop 6011: # 18 "/usr/include/boost/shared_ptr.hpp" 2 3 4 6011: # 45 "/usr/include/boost/regex/v4/regex_workaround.hpp" 2 3 4 6011: # 1 "/usr/include/boost/mpl/bool_fwd.hpp" 1 3 4 6011: # 17 "/usr/include/boost/mpl/bool_fwd.hpp" 3 4 6011: # 1 "/usr/include/boost/mpl/aux_/adl_barrier.hpp" 1 3 4 6011: # 17 "/usr/include/boost/mpl/aux_/adl_barrier.hpp" 3 4 6011: # 1 "/usr/include/boost/mpl/aux_/config/adl.hpp" 1 3 4 6011: # 17 "/usr/include/boost/mpl/aux_/config/adl.hpp" 3 4 6011: # 1 "/usr/include/boost/mpl/aux_/config/msvc.hpp" 1 3 4 6011: # 18 "/usr/include/boost/mpl/aux_/config/adl.hpp" 2 3 4 6011: # 1 "/usr/include/boost/mpl/aux_/config/intel.hpp" 1 3 4 6011: # 19 "/usr/include/boost/mpl/aux_/config/adl.hpp" 2 3 4 6011: # 1 "/usr/include/boost/mpl/aux_/config/gcc.hpp" 1 3 4 6011: # 20 "/usr/include/boost/mpl/aux_/config/adl.hpp" 2 3 4 6011: # 1 "/usr/include/boost/mpl/aux_/config/workaround.hpp" 1 3 4 6011: # 21 "/usr/include/boost/mpl/aux_/config/adl.hpp" 2 3 4 6011: # 18 "/usr/include/boost/mpl/aux_/adl_barrier.hpp" 2 3 4 6011: # 33 "/usr/include/boost/mpl/aux_/adl_barrier.hpp" 3 4 6011: namespace mpl_ { namespace aux {} } 6011: namespace boost { namespace mpl { using namespace mpl_; 6011: namespace aux { using namespace mpl_::aux; } 6011: }} 6011: # 18 "/usr/include/boost/mpl/bool_fwd.hpp" 2 3 4 6011: 6011: namespace mpl_ { 6011: 6011: template< bool C_ > struct bool_; 6011: 6011: 6011: typedef bool_ true_; 6011: typedef bool_ false_; 6011: 6011: } 6011: 6011: namespace boost { namespace mpl { using ::mpl_::bool_; } } 6011: namespace boost { namespace mpl { using ::mpl_::true_; } } 6011: namespace boost { namespace mpl { using ::mpl_::false_; } } 6011: # 46 "/usr/include/boost/regex/v4/regex_workaround.hpp" 2 3 4 6011: # 57 "/usr/include/boost/regex/v4/regex_workaround.hpp" 3 4 6011: namespace boost{ namespace re_detail_106501{ 6011: 6011: 6011: 6011: 6011: 6011: using std::distance; 6011: 6011: }} 6011: # 99 "/usr/include/boost/regex/v4/regex_workaround.hpp" 3 4 6011: namespace boost{ namespace re_detail_106501{ 6011: 6011: 6011: 6011: 6011: 6011: 6011: template 6011: inline void pointer_destroy(T* p) 6011: { p->~T(); (void)p; } 6011: 6011: 6011: 6011: 6011: 6011: template 6011: inline void pointer_construct(T* p, const T& t) 6011: { new (p) T(t); } 6011: 6011: }} 6011: # 128 "/usr/include/boost/regex/v4/regex_workaround.hpp" 3 4 6011: namespace boost{ namespace re_detail_106501{ 6011: # 186 "/usr/include/boost/regex/v4/regex_workaround.hpp" 3 4 6011: using std::copy; 6011: using std::equal; 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: inline std::size_t strcpy_s( 6011: char *strDestination, 6011: std::size_t sizeInBytes, 6011: const char *strSource 6011: ) 6011: { 6011: if(std::strlen(strSource)+1 > sizeInBytes) 6011: return 1; 6011: std::strcpy(strDestination, strSource); 6011: return 0; 6011: } 6011: inline std::size_t strcat_s( 6011: char *strDestination, 6011: std::size_t sizeInBytes, 6011: const char *strSource 6011: ) 6011: { 6011: if(std::strlen(strSource) + std::strlen(strDestination) + 1 > sizeInBytes) 6011: return 1; 6011: std::strcat(strDestination, strSource); 6011: return 0; 6011: } 6011: 6011: 6011: 6011: inline void overflow_error_if_not_zero(std::size_t i) 6011: { 6011: if(i) 6011: { 6011: std::overflow_error e("String buffer too small"); 6011: boost::throw_exception(e); 6011: } 6011: } 6011: 6011: }} 6011: # 33 "/usr/include/boost/regex/v4/regex.hpp" 2 3 4 6011: 6011: 6011: 6011: # 1 "/usr/include/boost/regex_fwd.hpp" 1 3 4 6011: # 27 "/usr/include/boost/regex_fwd.hpp" 3 4 6011: # 1 "/usr/include/boost/regex/v4/regex_fwd.hpp" 1 3 4 6011: # 37 "/usr/include/boost/regex/v4/regex_fwd.hpp" 3 4 6011: namespace boost{ 6011: 6011: template 6011: class cpp_regex_traits; 6011: template 6011: struct c_regex_traits; 6011: template 6011: class w32_regex_traits; 6011: 6011: 6011: 6011: 6011: 6011: template > 6011: struct regex_traits; 6011: 6011: 6011: 6011: 6011: 6011: template > 6011: class basic_regex; 6011: 6011: typedef basic_regex > regex; 6011: 6011: typedef basic_regex > wregex; 6011: 6011: 6011: } 6011: # 28 "/usr/include/boost/regex_fwd.hpp" 2 3 4 6011: # 37 "/usr/include/boost/regex/v4/regex.hpp" 2 3 4 6011: 6011: 6011: # 1 "/usr/include/boost/regex/regex_traits.hpp" 1 3 4 6011: # 27 "/usr/include/boost/regex/regex_traits.hpp" 3 4 6011: # 1 "/usr/include/boost/regex/v4/regex_traits.hpp" 1 3 4 6011: # 29 "/usr/include/boost/regex/v4/regex_traits.hpp" 3 4 6011: # 1 "/usr/include/boost/regex/v4/syntax_type.hpp" 1 3 4 6011: # 22 "/usr/include/boost/regex/v4/syntax_type.hpp" 3 4 6011: namespace boost{ 6011: namespace regex_constants{ 6011: 6011: typedef unsigned char syntax_type; 6011: 6011: 6011: 6011: 6011: static const syntax_type syntax_char = 0; 6011: static const syntax_type syntax_open_mark = 1; 6011: static const syntax_type syntax_close_mark = 2; 6011: static const syntax_type syntax_dollar = 3; 6011: static const syntax_type syntax_caret = 4; 6011: static const syntax_type syntax_dot = 5; 6011: static const syntax_type syntax_star = 6; 6011: static const syntax_type syntax_plus = 7; 6011: static const syntax_type syntax_question = 8; 6011: static const syntax_type syntax_open_set = 9; 6011: static const syntax_type syntax_close_set = 10; 6011: static const syntax_type syntax_or = 11; 6011: static const syntax_type syntax_escape = 12; 6011: static const syntax_type syntax_dash = 14; 6011: static const syntax_type syntax_open_brace = 15; 6011: static const syntax_type syntax_close_brace = 16; 6011: static const syntax_type syntax_digit = 17; 6011: static const syntax_type syntax_comma = 27; 6011: static const syntax_type syntax_equal = 37; 6011: static const syntax_type syntax_colon = 36; 6011: static const syntax_type syntax_not = 53; 6011: 6011: 6011: 6011: static const syntax_type syntax_hash = 13; 6011: static const syntax_type syntax_newline = 26; 6011: 6011: 6011: 6011: typedef syntax_type escape_syntax_type; 6011: 6011: static const escape_syntax_type escape_type_word_assert = 18; 6011: static const escape_syntax_type escape_type_not_word_assert = 19; 6011: static const escape_syntax_type escape_type_control_f = 29; 6011: static const escape_syntax_type escape_type_control_n = 30; 6011: static const escape_syntax_type escape_type_control_r = 31; 6011: static const escape_syntax_type escape_type_control_t = 32; 6011: static const escape_syntax_type escape_type_control_v = 33; 6011: static const escape_syntax_type escape_type_ascii_control = 35; 6011: static const escape_syntax_type escape_type_hex = 34; 6011: static const escape_syntax_type escape_type_unicode = 0; 6011: static const escape_syntax_type escape_type_identity = 0; 6011: static const escape_syntax_type escape_type_backref = syntax_digit; 6011: static const escape_syntax_type escape_type_decimal = syntax_digit; 6011: static const escape_syntax_type escape_type_class = 22; 6011: static const escape_syntax_type escape_type_not_class = 23; 6011: 6011: 6011: 6011: static const escape_syntax_type escape_type_left_word = 20; 6011: static const escape_syntax_type escape_type_right_word = 21; 6011: static const escape_syntax_type escape_type_start_buffer = 24; 6011: static const escape_syntax_type escape_type_end_buffer = 25; 6011: static const escape_syntax_type escape_type_control_a = 28; 6011: static const escape_syntax_type escape_type_e = 38; 6011: static const escape_syntax_type escape_type_E = 47; 6011: static const escape_syntax_type escape_type_Q = 48; 6011: static const escape_syntax_type escape_type_X = 49; 6011: static const escape_syntax_type escape_type_C = 50; 6011: static const escape_syntax_type escape_type_Z = 51; 6011: static const escape_syntax_type escape_type_G = 52; 6011: 6011: static const escape_syntax_type escape_type_property = 54; 6011: static const escape_syntax_type escape_type_not_property = 55; 6011: static const escape_syntax_type escape_type_named_char = 56; 6011: static const escape_syntax_type escape_type_extended_backref = 57; 6011: static const escape_syntax_type escape_type_reset_start_mark = 58; 6011: static const escape_syntax_type escape_type_line_ending = 59; 6011: 6011: static const escape_syntax_type syntax_max = 60; 6011: 6011: } 6011: } 6011: # 30 "/usr/include/boost/regex/v4/regex_traits.hpp" 2 3 4 6011: 6011: 6011: # 1 "/usr/include/boost/regex/v4/error_type.hpp" 1 3 4 6011: # 23 "/usr/include/boost/regex/v4/error_type.hpp" 3 4 6011: namespace boost{ 6011: 6011: 6011: 6011: namespace regex_constants{ 6011: 6011: enum error_type{ 6011: 6011: error_ok = 0, 6011: error_no_match = 1, 6011: error_bad_pattern = 2, 6011: error_collate = 3, 6011: error_ctype = 4, 6011: error_escape = 5, 6011: error_backref = 6, 6011: error_brack = 7, 6011: error_paren = 8, 6011: error_brace = 9, 6011: error_badbrace = 10, 6011: error_range = 11, 6011: error_space = 12, 6011: error_badrepeat = 13, 6011: error_end = 14, 6011: error_size = 15, 6011: error_right_paren = 16, 6011: error_empty = 17, 6011: error_complexity = 18, 6011: error_stack = 19, 6011: error_perl_extension = 20, 6011: error_unknown = 21 6011: }; 6011: 6011: } 6011: } 6011: # 33 "/usr/include/boost/regex/v4/regex_traits.hpp" 2 3 4 6011: 6011: 6011: # 1 "/usr/include/boost/regex/v4/regex_traits_defaults.hpp" 1 3 4 6011: # 41 "/usr/include/boost/regex/v4/regex_traits_defaults.hpp" 3 4 6011: # 1 "/usr/include/boost/type_traits/make_unsigned.hpp" 1 3 4 6011: # 12 "/usr/include/boost/type_traits/make_unsigned.hpp" 3 4 6011: # 1 "/usr/include/boost/type_traits/conditional.hpp" 1 3 4 6011: # 12 "/usr/include/boost/type_traits/conditional.hpp" 3 4 6011: namespace boost { 6011: 6011: template struct conditional { typedef T type; }; 6011: template struct conditional { typedef U type; }; 6011: 6011: 6011: 6011: template using conditional_t = typename conditional::type; 6011: 6011: 6011: 6011: } 6011: # 13 "/usr/include/boost/type_traits/make_unsigned.hpp" 2 3 4 6011: # 1 "/usr/include/boost/type_traits/is_integral.hpp" 1 3 4 6011: # 13 "/usr/include/boost/type_traits/is_integral.hpp" 3 4 6011: # 1 "/usr/include/boost/type_traits/integral_constant.hpp" 1 3 4 6011: # 30 "/usr/include/boost/type_traits/integral_constant.hpp" 3 4 6011: namespace mpl_{ 6011: 6011: template struct bool_; 6011: template struct integral_c; 6011: struct integral_c_tag; 6011: } 6011: 6011: namespace boost 6011: { 6011: namespace mpl 6011: { 6011: using ::mpl_::bool_; 6011: using ::mpl_::integral_c; 6011: using ::mpl_::integral_c_tag; 6011: } 6011: } 6011: 6011: 6011: 6011: namespace boost{ 6011: 6011: template 6011: struct integral_constant 6011: { 6011: typedef mpl::integral_c_tag tag; 6011: typedef T value_type; 6011: typedef integral_constant type; 6011: static const T value = val; 6011: 6011: 6011: 6011: 6011: template 6011: static U& dereference(U* p) { return *p; } 6011: 6011: operator const mpl::integral_c& ()const 6011: { 6011: static const char data[sizeof(long)] = { 0 }; 6011: return dereference(reinterpret_cast*>(&data)); 6011: } 6011: constexpr operator T()const { return val; } 6011: }; 6011: 6011: template 6011: T const integral_constant::value; 6011: 6011: template 6011: struct integral_constant 6011: { 6011: typedef mpl::integral_c_tag tag; 6011: typedef bool value_type; 6011: typedef integral_constant type; 6011: static const bool value = val; 6011: 6011: 6011: 6011: 6011: template 6011: static T& dereference(T* p) { return *p; } 6011: 6011: operator const mpl::bool_& ()const 6011: { 6011: static const char data = 0; 6011: return dereference(reinterpret_cast*>(&data)); 6011: } 6011: constexpr operator bool()const { return val; } 6011: }; 6011: 6011: template 6011: bool const integral_constant::value; 6011: 6011: typedef integral_constant true_type; 6011: typedef integral_constant false_type; 6011: 6011: } 6011: # 14 "/usr/include/boost/type_traits/is_integral.hpp" 2 3 4 6011: 6011: namespace boost { 6011: 6011: 6011: 6011: 6011: 6011: 6011: template struct is_integral : public false_type {}; 6011: template struct is_integral : public is_integral {}; 6011: template struct is_integral : public is_integral{}; 6011: template struct is_integral : public is_integral{}; 6011: 6011: 6011: 6011: 6011: template<> struct is_integral : public true_type {}; 6011: template<> struct is_integral : public true_type{}; 6011: template<> struct is_integral : public true_type{}; 6011: template<> struct is_integral : public true_type{}; 6011: 6011: template<> struct is_integral : public true_type{}; 6011: template<> struct is_integral : public true_type{}; 6011: template<> struct is_integral : public true_type{}; 6011: template<> struct is_integral : public true_type{}; 6011: 6011: template<> struct is_integral : public true_type{}; 6011: template<> struct is_integral : public true_type{}; 6011: 6011: 6011: 6011: 6011: 6011: template<> struct is_integral : public true_type{}; 6011: # 67 "/usr/include/boost/type_traits/is_integral.hpp" 3 4 6011: template<> struct is_integral< ::boost::ulong_long_type> : public true_type{}; 6011: template<> struct is_integral< ::boost::long_long_type> : public true_type{}; 6011: # 79 "/usr/include/boost/type_traits/is_integral.hpp" 3 4 6011: template<> struct is_integral : public true_type{}; 6011: 6011: 6011: template<> struct is_integral : public true_type{}; 6011: 6011: 6011: 6011: 6011: } 6011: # 14 "/usr/include/boost/type_traits/make_unsigned.hpp" 2 3 4 6011: # 1 "/usr/include/boost/type_traits/is_signed.hpp" 1 3 4 6011: # 14 "/usr/include/boost/type_traits/is_signed.hpp" 3 4 6011: # 1 "/usr/include/boost/type_traits/remove_cv.hpp" 1 3 4 6011: # 18 "/usr/include/boost/type_traits/remove_cv.hpp" 3 4 6011: namespace boost { 6011: 6011: 6011: template struct remove_cv{ typedef T type; }; 6011: template struct remove_cv{ typedef T type; }; 6011: template struct remove_cv{ typedef T type; }; 6011: template struct remove_cv{ typedef T type; }; 6011: 6011: 6011: template struct remove_cv{ typedef T type[N]; }; 6011: template struct remove_cv{ typedef T type[N]; }; 6011: template struct remove_cv{ typedef T type[N]; }; 6011: 6011: template struct remove_cv{ typedef T type[]; }; 6011: template struct remove_cv{ typedef T type[]; }; 6011: template struct remove_cv{ typedef T type[]; }; 6011: 6011: 6011: 6011: 6011: 6011: template using remove_cv_t = typename remove_cv::type; 6011: 6011: 6011: 6011: } 6011: # 15 "/usr/include/boost/type_traits/is_signed.hpp" 2 3 4 6011: # 1 "/usr/include/boost/type_traits/is_enum.hpp" 1 3 4 6011: # 14 "/usr/include/boost/type_traits/is_enum.hpp" 3 4 6011: # 1 "/usr/include/boost/type_traits/intrinsics.hpp" 1 3 4 6011: # 16 "/usr/include/boost/type_traits/intrinsics.hpp" 3 4 6011: # 1 "/usr/include/boost/type_traits/detail/config.hpp" 1 3 4 6011: # 17 "/usr/include/boost/type_traits/intrinsics.hpp" 2 3 4 6011: # 15 "/usr/include/boost/type_traits/is_enum.hpp" 2 3 4 6011: # 32 "/usr/include/boost/type_traits/is_enum.hpp" 3 4 6011: namespace boost { 6011: # 160 "/usr/include/boost/type_traits/is_enum.hpp" 3 4 6011: template struct is_enum : public integral_constant {}; 6011: 6011: 6011: 6011: } 6011: # 16 "/usr/include/boost/type_traits/is_signed.hpp" 2 3 4 6011: # 1 "/usr/include/c++/8/climits" 1 3 4 6011: # 39 "/usr/include/c++/8/climits" 3 4 6011: 6011: # 40 "/usr/include/c++/8/climits" 3 6011: 6011: 6011: # 1 "/usr/lib/gcc/arm-linux-gnueabihf/8/include-fixed/limits.h" 1 3 4 6011: # 43 "/usr/include/c++/8/climits" 2 3 6011: # 17 "/usr/include/boost/type_traits/is_signed.hpp" 2 3 4 6011: 6011: namespace boost { 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: namespace detail{ 6011: 6011: template 6011: struct is_signed_values 6011: { 6011: 6011: 6011: 6011: 6011: 6011: typedef typename remove_cv::type no_cv_t; 6011: static const no_cv_t minus_one = (static_cast(-1)); 6011: static const no_cv_t zero = (static_cast(0)); 6011: }; 6011: 6011: template 6011: struct is_signed_helper 6011: { 6011: typedef typename remove_cv::type no_cv_t; 6011: static const bool value = (!(::boost::detail::is_signed_values::minus_one > boost::detail::is_signed_values::zero)); 6011: }; 6011: 6011: template 6011: struct is_signed_select_helper 6011: { 6011: template 6011: struct rebind 6011: { 6011: typedef is_signed_helper type; 6011: }; 6011: }; 6011: 6011: template <> 6011: struct is_signed_select_helper 6011: { 6011: template 6011: struct rebind 6011: { 6011: typedef false_type type; 6011: }; 6011: }; 6011: 6011: template 6011: struct is_signed_impl 6011: { 6011: typedef ::boost::detail::is_signed_select_helper< ::boost::is_integral::value || ::boost::is_enum::value> selector; 6011: typedef typename selector::template rebind binder; 6011: typedef typename binder::type type; 6011: static const bool value = type::value; 6011: }; 6011: 6011: } 6011: 6011: template struct is_signed : public integral_constant::value> {}; 6011: # 91 "/usr/include/boost/type_traits/is_signed.hpp" 3 4 6011: template <> struct is_signed : public true_type{}; 6011: template <> struct is_signed : public true_type{}; 6011: template <> struct is_signed : public true_type{}; 6011: template <> struct is_signed : public true_type{}; 6011: template <> struct is_signed : public true_type{}; 6011: template <> struct is_signed : public true_type{}; 6011: template <> struct is_signed : public true_type{}; 6011: template <> struct is_signed : public true_type{}; 6011: template <> struct is_signed : public true_type{}; 6011: template <> struct is_signed : public true_type{}; 6011: template <> struct is_signed : public true_type{}; 6011: template <> struct is_signed : public true_type{}; 6011: template <> struct is_signed : public true_type{}; 6011: template <> struct is_signed : public true_type{}; 6011: template <> struct is_signed : public true_type{}; 6011: template <> struct is_signed : public true_type{}; 6011: 6011: template <> struct is_signed : public false_type{}; 6011: template <> struct is_signed : public false_type{}; 6011: template <> struct is_signed : public false_type{}; 6011: template <> struct is_signed : public false_type{}; 6011: template <> struct is_signed : public false_type{}; 6011: template <> struct is_signed : public false_type{}; 6011: template <> struct is_signed : public false_type{}; 6011: template <> struct is_signed : public false_type{}; 6011: template <> struct is_signed : public false_type{}; 6011: template <> struct is_signed : public false_type{}; 6011: template <> struct is_signed : public false_type{}; 6011: template <> struct is_signed : public false_type{}; 6011: template <> struct is_signed : public false_type{}; 6011: template <> struct is_signed : public false_type{}; 6011: template <> struct is_signed : public false_type{}; 6011: template <> struct is_signed : public false_type{}; 6011: 6011: template <> struct is_signed< ::boost::long_long_type> : public true_type{}; 6011: template <> struct is_signed : public true_type{}; 6011: template <> struct is_signed : public true_type{}; 6011: template <> struct is_signed : public true_type{}; 6011: 6011: template <> struct is_signed< ::boost::ulong_long_type> : public false_type{}; 6011: template <> struct is_signed : public false_type{}; 6011: template <> struct is_signed : public false_type{}; 6011: template <> struct is_signed : public false_type{}; 6011: # 142 "/usr/include/boost/type_traits/is_signed.hpp" 3 4 6011: template <> struct is_signed : public false_type{}; 6011: template <> struct is_signed : public false_type{}; 6011: template <> struct is_signed : public false_type{}; 6011: template <> struct is_signed : public false_type{}; 6011: # 155 "/usr/include/boost/type_traits/is_signed.hpp" 3 4 6011: template <> struct is_signed : public false_type{}; 6011: template <> struct is_signed : public false_type{}; 6011: template <> struct is_signed : public false_type{}; 6011: template <> struct is_signed : public false_type{}; 6011: 6011: 6011: } 6011: # 15 "/usr/include/boost/type_traits/make_unsigned.hpp" 2 3 4 6011: # 1 "/usr/include/boost/type_traits/is_unsigned.hpp" 1 3 4 6011: # 17 "/usr/include/boost/type_traits/is_unsigned.hpp" 3 4 6011: # 1 "/usr/include/c++/8/climits" 1 3 4 6011: # 39 "/usr/include/c++/8/climits" 3 4 6011: 6011: # 40 "/usr/include/c++/8/climits" 3 6011: 6011: 6011: # 1 "/usr/lib/gcc/arm-linux-gnueabihf/8/include-fixed/limits.h" 1 3 4 6011: # 43 "/usr/include/c++/8/climits" 2 3 6011: # 18 "/usr/include/boost/type_traits/is_unsigned.hpp" 2 3 4 6011: 6011: namespace boost { 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: namespace detail{ 6011: 6011: template 6011: struct is_unsigned_values 6011: { 6011: 6011: 6011: 6011: 6011: 6011: typedef typename remove_cv::type no_cv_t; 6011: static const no_cv_t minus_one = (static_cast(-1)); 6011: static const no_cv_t zero = (static_cast(0)); 6011: }; 6011: 6011: template 6011: struct is_ununsigned_helper 6011: { 6011: static const bool value = (::boost::detail::is_unsigned_values::minus_one > ::boost::detail::is_unsigned_values::zero); 6011: }; 6011: 6011: template 6011: struct is_unsigned_select_helper 6011: { 6011: template 6011: struct rebind 6011: { 6011: typedef is_ununsigned_helper type; 6011: }; 6011: }; 6011: 6011: template <> 6011: struct is_unsigned_select_helper 6011: { 6011: template 6011: struct rebind 6011: { 6011: typedef false_type type; 6011: }; 6011: }; 6011: 6011: template 6011: struct is_unsigned 6011: { 6011: typedef ::boost::detail::is_unsigned_select_helper< ::boost::is_integral::value || ::boost::is_enum::value > selector; 6011: typedef typename selector::template rebind binder; 6011: typedef typename binder::type type; 6011: static const bool value = type::value; 6011: }; 6011: 6011: } 6011: 6011: template struct is_unsigned : public integral_constant::value> {}; 6011: # 91 "/usr/include/boost/type_traits/is_unsigned.hpp" 3 4 6011: template <> struct is_unsigned : public true_type{}; 6011: template <> struct is_unsigned : public true_type{}; 6011: template <> struct is_unsigned : public true_type{}; 6011: template <> struct is_unsigned : public true_type{}; 6011: template <> struct is_unsigned : public true_type{}; 6011: template <> struct is_unsigned : public true_type{}; 6011: template <> struct is_unsigned : public true_type{}; 6011: template <> struct is_unsigned : public true_type{}; 6011: template <> struct is_unsigned : public true_type{}; 6011: template <> struct is_unsigned : public true_type{}; 6011: template <> struct is_unsigned : public true_type{}; 6011: template <> struct is_unsigned : public true_type{}; 6011: template <> struct is_unsigned : public true_type{}; 6011: template <> struct is_unsigned : public true_type{}; 6011: template <> struct is_unsigned : public true_type{}; 6011: template <> struct is_unsigned : public true_type{}; 6011: 6011: template <> struct is_unsigned : public false_type{}; 6011: template <> struct is_unsigned : public false_type{}; 6011: template <> struct is_unsigned : public false_type{}; 6011: template <> struct is_unsigned : public false_type{}; 6011: template <> struct is_unsigned< short> : public false_type{}; 6011: template <> struct is_unsigned : public false_type{}; 6011: template <> struct is_unsigned : public false_type{}; 6011: template <> struct is_unsigned : public false_type{}; 6011: template <> struct is_unsigned< int> : public false_type{}; 6011: template <> struct is_unsigned : public false_type{}; 6011: template <> struct is_unsigned : public false_type{}; 6011: template <> struct is_unsigned : public false_type{}; 6011: template <> struct is_unsigned< long> : public false_type{}; 6011: template <> struct is_unsigned : public false_type{}; 6011: template <> struct is_unsigned : public false_type{}; 6011: template <> struct is_unsigned : public false_type{}; 6011: 6011: template <> struct is_unsigned< ::boost::ulong_long_type> : public true_type{}; 6011: template <> struct is_unsigned : public true_type{}; 6011: template <> struct is_unsigned : public true_type{}; 6011: template <> struct is_unsigned : public true_type{}; 6011: 6011: template <> struct is_unsigned< ::boost::long_long_type> : public false_type{}; 6011: template <> struct is_unsigned : public false_type{}; 6011: template <> struct is_unsigned : public false_type{}; 6011: template <> struct is_unsigned : public false_type{}; 6011: 6011: 6011: 6011: template <> struct is_unsigned : public true_type{}; 6011: template <> struct is_unsigned : public true_type{}; 6011: template <> struct is_unsigned : public true_type{}; 6011: template <> struct is_unsigned : public true_type{}; 6011: # 150 "/usr/include/boost/type_traits/is_unsigned.hpp" 3 4 6011: template <> struct is_unsigned : public true_type{}; 6011: template <> struct is_unsigned : public true_type{}; 6011: template <> struct is_unsigned : public true_type{}; 6011: template <> struct is_unsigned : public true_type{}; 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: } 6011: # 16 "/usr/include/boost/type_traits/make_unsigned.hpp" 2 3 4 6011: 6011: # 1 "/usr/include/boost/type_traits/is_same.hpp" 1 3 4 6011: # 26 "/usr/include/boost/type_traits/is_same.hpp" 3 4 6011: namespace boost { 6011: 6011: 6011: template struct is_same : public false_type {}; 6011: template struct is_same : public true_type {}; 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: } 6011: # 18 "/usr/include/boost/type_traits/make_unsigned.hpp" 2 3 4 6011: 6011: # 1 "/usr/include/boost/type_traits/is_const.hpp" 1 3 4 6011: # 27 "/usr/include/boost/type_traits/is_const.hpp" 3 4 6011: namespace boost { 6011: # 36 "/usr/include/boost/type_traits/is_const.hpp" 3 4 6011: template 6011: struct is_const : public false_type {}; 6011: template struct is_const : public true_type{}; 6011: template struct is_const : public true_type{}; 6011: template struct is_const : public true_type{}; 6011: 6011: 6011: 6011: } 6011: # 20 "/usr/include/boost/type_traits/make_unsigned.hpp" 2 3 4 6011: # 1 "/usr/include/boost/type_traits/is_volatile.hpp" 1 3 4 6011: # 27 "/usr/include/boost/type_traits/is_volatile.hpp" 3 4 6011: namespace boost { 6011: # 36 "/usr/include/boost/type_traits/is_volatile.hpp" 3 4 6011: template 6011: struct is_volatile : public false_type {}; 6011: template struct is_volatile : public true_type{}; 6011: template struct is_volatile : public true_type{}; 6011: template struct is_volatile : public true_type{}; 6011: 6011: 6011: 6011: } 6011: # 21 "/usr/include/boost/type_traits/make_unsigned.hpp" 2 3 4 6011: # 1 "/usr/include/boost/type_traits/add_const.hpp" 1 3 4 6011: # 15 "/usr/include/boost/type_traits/add_const.hpp" 3 4 6011: namespace boost { 6011: # 30 "/usr/include/boost/type_traits/add_const.hpp" 3 4 6011: template struct add_const 6011: { 6011: typedef T const type; 6011: }; 6011: 6011: 6011: 6011: 6011: 6011: template struct add_const 6011: { 6011: typedef T& type; 6011: }; 6011: 6011: 6011: 6011: template using add_const_t = typename add_const::type; 6011: 6011: 6011: 6011: } 6011: # 22 "/usr/include/boost/type_traits/make_unsigned.hpp" 2 3 4 6011: # 1 "/usr/include/boost/type_traits/add_volatile.hpp" 1 3 4 6011: # 15 "/usr/include/boost/type_traits/add_volatile.hpp" 3 4 6011: namespace boost { 6011: # 30 "/usr/include/boost/type_traits/add_volatile.hpp" 3 4 6011: template struct add_volatile{ typedef T volatile type; }; 6011: 6011: 6011: 6011: 6011: 6011: template struct add_volatile{ typedef T& type; }; 6011: 6011: 6011: 6011: template using add_volatile_t = typename add_volatile::type; 6011: 6011: 6011: 6011: } 6011: # 23 "/usr/include/boost/type_traits/make_unsigned.hpp" 2 3 4 6011: # 1 "/usr/include/boost/static_assert.hpp" 1 3 4 6011: # 24 "/usr/include/boost/type_traits/make_unsigned.hpp" 2 3 4 6011: 6011: namespace boost { 6011: 6011: template 6011: struct make_unsigned 6011: { 6011: private: 6011: static_assert((::boost::is_integral::value || ::boost::is_enum::value), "The template argument to make_unsigned must be an integer or enum type."); 6011: static_assert((! ::boost::is_same::type, bool>::value), "The template argument to make_unsigned must not be the type bool"); 6011: 6011: typedef typename remove_cv::type t_no_cv; 6011: typedef typename conditional< 6011: (::boost::is_unsigned::value && ::boost::is_integral::value 6011: && ! ::boost::is_same::value 6011: && ! ::boost::is_same::value 6011: && ! ::boost::is_same::value), 6011: T, 6011: typename conditional< 6011: (::boost::is_integral::value 6011: && ! ::boost::is_same::value 6011: && ! ::boost::is_same::value 6011: && ! ::boost::is_same::value), 6011: typename conditional< 6011: is_same::value, 6011: unsigned char, 6011: typename conditional< 6011: is_same::value, 6011: unsigned short, 6011: typename conditional< 6011: is_same::value, 6011: unsigned int, 6011: typename conditional< 6011: is_same::value, 6011: unsigned long, 6011: # 66 "/usr/include/boost/type_traits/make_unsigned.hpp" 3 4 6011: boost::ulong_long_type 6011: 6011: 6011: 6011: 6011: 6011: 6011: >::type 6011: >::type 6011: >::type 6011: >::type, 6011: 6011: typename conditional< 6011: sizeof(t_no_cv) == sizeof(unsigned char), 6011: unsigned char, 6011: typename conditional< 6011: sizeof(t_no_cv) == sizeof(unsigned short), 6011: unsigned short, 6011: typename conditional< 6011: sizeof(t_no_cv) == sizeof(unsigned int), 6011: unsigned int, 6011: typename conditional< 6011: sizeof(t_no_cv) == sizeof(unsigned long), 6011: unsigned long, 6011: # 98 "/usr/include/boost/type_traits/make_unsigned.hpp" 3 4 6011: boost::ulong_long_type 6011: 6011: 6011: 6011: 6011: 6011: 6011: >::type 6011: >::type 6011: >::type 6011: >::type 6011: >::type 6011: >::type base_integer_type; 6011: 6011: 6011: typedef typename conditional< 6011: is_const::value, 6011: typename add_const::type, 6011: base_integer_type 6011: >::type const_base_integer_type; 6011: public: 6011: 6011: typedef typename conditional< 6011: is_volatile::value, 6011: typename add_volatile::type, 6011: const_base_integer_type 6011: >::type type; 6011: }; 6011: 6011: 6011: 6011: template using make_unsigned_t = typename make_unsigned::type; 6011: 6011: 6011: 6011: } 6011: # 42 "/usr/include/boost/regex/v4/regex_traits_defaults.hpp" 2 3 4 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: namespace boost{ namespace re_detail_106501{ 6011: 6011: 6011: 6011: 6011: 6011: template 6011: inline bool is_extended(charT c) 6011: { 6011: typedef typename make_unsigned::type unsigned_type; 6011: return (sizeof(charT) > 1) && (static_cast(c) >= 256u); 6011: } 6011: inline bool is_extended(char) 6011: { return false; } 6011: 6011: 6011: const char* get_default_syntax(regex_constants::syntax_type n); 6011: const char* get_default_error_string(regex_constants::error_type n); 6011: regex_constants::syntax_type get_default_syntax_type(char c); 6011: regex_constants::escape_syntax_type get_default_escape_syntax_type(char c); 6011: 6011: 6011: bool is_combining_implementation(uint_least16_t s); 6011: 6011: template 6011: inline bool is_combining(charT c) 6011: { 6011: return (c <= static_cast(0)) ? false : ((c >= static_cast((std::numeric_limits::max)())) ? false : is_combining_implementation(static_cast(c))); 6011: } 6011: template <> 6011: inline bool is_combining(char) 6011: { 6011: return false; 6011: } 6011: template <> 6011: inline bool is_combining(signed char) 6011: { 6011: return false; 6011: } 6011: template <> 6011: inline bool is_combining(unsigned char) 6011: { 6011: return false; 6011: } 6011: # 108 "/usr/include/boost/regex/v4/regex_traits_defaults.hpp" 3 4 6011: template<> 6011: inline bool is_combining(wchar_t c) 6011: { 6011: return (c >= (std::numeric_limits::max)()) ? false : is_combining_implementation(static_cast(c)); 6011: } 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: template 6011: inline bool is_separator(charT c) 6011: { 6011: 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)) 6011: 6011: 6011: 6011: 6011: 6011: ; 6011: } 6011: template <> 6011: inline bool is_separator(char c) 6011: { 6011: return static_cast((c == '\n') || (c == '\r') || (c == '\f')); 6011: } 6011: 6011: 6011: 6011: 6011: std::string lookup_default_collate_name(const std::string& name); 6011: 6011: 6011: 6011: 6011: 6011: template 6011: struct character_pointer_range 6011: { 6011: const charT* p1; 6011: const charT* p2; 6011: 6011: bool operator < (const character_pointer_range& r)const 6011: { 6011: return std::lexicographical_compare(p1, p2, r.p1, r.p2); 6011: } 6011: bool operator == (const character_pointer_range& r)const 6011: { 6011: 6011: 6011: 6011: 6011: return ((p2 - p1) == (r.p2 - r.p1)) && re_detail_106501::equal(p1, p2, r.p1); 6011: } 6011: }; 6011: template 6011: int get_default_class_id(const charT* p1, const charT* p2) 6011: { 6011: static const charT data[73] = { 6011: 'a', 'l', 'n', 'u', 'm', 6011: 'a', 'l', 'p', 'h', 'a', 6011: 'b', 'l', 'a', 'n', 'k', 6011: 'c', 'n', 't', 'r', 'l', 6011: 'd', 'i', 'g', 'i', 't', 6011: 'g', 'r', 'a', 'p', 'h', 6011: 'l', 'o', 'w', 'e', 'r', 6011: 'p', 'r', 'i', 'n', 't', 6011: 'p', 'u', 'n', 'c', 't', 6011: 's', 'p', 'a', 'c', 'e', 6011: 'u', 'n', 'i', 'c', 'o', 'd', 'e', 6011: 'u', 'p', 'p', 'e', 'r', 6011: 'v', 6011: 'w', 'o', 'r', 'd', 6011: 'x', 'd', 'i', 'g', 'i', 't', 6011: }; 6011: 6011: static const character_pointer_range ranges[21] = 6011: { 6011: {data+0, data+5,}, 6011: {data+5, data+10,}, 6011: {data+10, data+15,}, 6011: {data+15, data+20,}, 6011: {data+20, data+21,}, 6011: {data+20, data+25,}, 6011: {data+25, data+30,}, 6011: {data+29, data+30,}, 6011: {data+30, data+31,}, 6011: {data+30, data+35,}, 6011: {data+35, data+40,}, 6011: {data+40, data+45,}, 6011: {data+45, data+46,}, 6011: {data+45, data+50,}, 6011: {data+57, data+58,}, 6011: {data+50, data+57,}, 6011: {data+57, data+62,}, 6011: {data+62, data+63,}, 6011: {data+63, data+64,}, 6011: {data+63, data+67,}, 6011: {data+67, data+73,}, 6011: }; 6011: static const character_pointer_range* ranges_begin = ranges; 6011: static const character_pointer_range* ranges_end = ranges + (sizeof(ranges)/sizeof(ranges[0])); 6011: 6011: character_pointer_range t = { p1, p2, }; 6011: const character_pointer_range* p = std::lower_bound(ranges_begin, ranges_end, t); 6011: if((p != ranges_end) && (t == *p)) 6011: return static_cast(p - ranges); 6011: return -1; 6011: } 6011: 6011: 6011: 6011: 6011: template 6011: std::ptrdiff_t global_length(const charT* p) 6011: { 6011: std::ptrdiff_t n = 0; 6011: while(*p) 6011: { 6011: ++p; 6011: ++n; 6011: } 6011: return n; 6011: } 6011: template<> 6011: inline std::ptrdiff_t global_length(const char* p) 6011: { 6011: return (std::strlen)(p); 6011: } 6011: 6011: template<> 6011: inline std::ptrdiff_t global_length(const wchar_t* p) 6011: { 6011: return (std::wcslen)(p); 6011: } 6011: 6011: template 6011: inline charT global_lower(charT c) 6011: { 6011: return c; 6011: } 6011: template 6011: inline charT global_upper(charT c) 6011: { 6011: return c; 6011: } 6011: 6011: char do_global_lower(char c); 6011: char do_global_upper(char c); 6011: 6011: wchar_t do_global_lower(wchar_t c); 6011: wchar_t do_global_upper(wchar_t c); 6011: # 277 "/usr/include/boost/regex/v4/regex_traits_defaults.hpp" 3 4 6011: template<> inline char global_lower(char c){ return do_global_lower(c); } 6011: template<> inline char global_upper(char c){ return do_global_upper(c); } 6011: 6011: template<> inline wchar_t global_lower(wchar_t c){ return do_global_lower(c); } 6011: template<> inline wchar_t global_upper(wchar_t c){ return do_global_upper(c); } 6011: 6011: 6011: 6011: 6011: 6011: 6011: template 6011: int global_value(charT c) 6011: { 6011: static const charT zero = '0'; 6011: static const charT nine = '9'; 6011: static const charT a = 'a'; 6011: static const charT f = 'f'; 6011: static const charT A = 'A'; 6011: static const charT F = 'F'; 6011: 6011: if(c > f) return -1; 6011: if(c >= a) return 10 + (c - a); 6011: if(c > F) return -1; 6011: if(c >= A) return 10 + (c - A); 6011: if(c > nine) return -1; 6011: if(c >= zero) return c - zero; 6011: return -1; 6011: } 6011: template 6011: boost::intmax_t global_toi(const charT*& p1, const charT* p2, int radix, const traits& t) 6011: { 6011: (void)t; 6011: boost::intmax_t next_value = t.value(*p1, radix); 6011: if((p1 == p2) || (next_value < 0) || (next_value >= radix)) 6011: return -1; 6011: boost::intmax_t result = 0; 6011: while(p1 != p2) 6011: { 6011: next_value = t.value(*p1, radix); 6011: if((next_value < 0) || (next_value >= radix)) 6011: break; 6011: result *= radix; 6011: result += next_value; 6011: ++p1; 6011: } 6011: return result; 6011: } 6011: 6011: template 6011: inline const charT* get_escape_R_string() 6011: { 6011: 6011: 6011: 6011: 6011: static const charT e1[] = { '(', '?', '>', '\x0D', '\x0A', '?', 6011: '|', '[', '\x0A', '\x0B', '\x0C', static_cast('\x85'), '\\', 'x', '{', '2', '0', '2', '8', '}', 6011: '\\', 'x', '{', '2', '0', '2', '9', '}', ']', ')', '\0' }; 6011: static const charT e2[] = { '(', '?', '>', '\x0D', '\x0A', '?', 6011: '|', '[', '\x0A', '\x0B', '\x0C', static_cast('\x85'), ']', ')', '\0' }; 6011: 6011: charT c = static_cast(0x2029u); 6011: bool b = (static_cast(c) == 0x2029u); 6011: 6011: return (b ? e1 : e2); 6011: 6011: 6011: 6011: } 6011: 6011: template <> 6011: inline const char* get_escape_R_string() 6011: { 6011: 6011: 6011: 6011: 6011: static const char e2[] = { '(', '?', '>', '\x0D', '\x0A', '?', 6011: '|', '[', '\x0A', '\x0B', '\x0C', '\x85', ']', ')', '\0' }; 6011: return e2; 6011: 6011: 6011: 6011: } 6011: 6011: } 6011: } 6011: # 36 "/usr/include/boost/regex/v4/regex_traits.hpp" 2 3 4 6011: 6011: 6011: 6011: # 1 "/usr/include/boost/regex/v4/cpp_regex_traits.hpp" 1 3 4 6011: # 23 "/usr/include/boost/regex/v4/cpp_regex_traits.hpp" 3 4 6011: # 1 "/usr/include/boost/integer.hpp" 1 3 4 6011: # 18 "/usr/include/boost/integer.hpp" 3 4 6011: # 1 "/usr/include/boost/integer_fwd.hpp" 1 3 4 6011: # 12 "/usr/include/boost/integer_fwd.hpp" 3 4 6011: # 1 "/usr/include/c++/8/climits" 1 3 4 6011: # 39 "/usr/include/c++/8/climits" 3 4 6011: 6011: # 40 "/usr/include/c++/8/climits" 3 6011: 6011: 6011: # 1 "/usr/lib/gcc/arm-linux-gnueabihf/8/include-fixed/limits.h" 1 3 4 6011: # 43 "/usr/include/c++/8/climits" 2 3 6011: # 13 "/usr/include/boost/integer_fwd.hpp" 2 3 4 6011: 6011: 6011: 6011: 6011: # 1 "/usr/include/boost/cstdint.hpp" 1 3 4 6011: # 18 "/usr/include/boost/integer_fwd.hpp" 2 3 4 6011: 6011: 6011: namespace boost 6011: { 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: typedef boost::uintmax_t static_min_max_unsigned_type; 6011: typedef boost::intmax_t static_min_max_signed_type; 6011: typedef boost::uintmax_t static_log2_argument_type; 6011: typedef int static_log2_result_type; 6011: # 42 "/usr/include/boost/integer_fwd.hpp" 3 4 6011: template < class T > 6011: class integer_traits; 6011: 6011: template < > 6011: class integer_traits< bool >; 6011: 6011: template < > 6011: class integer_traits< char >; 6011: 6011: template < > 6011: class integer_traits< signed char >; 6011: 6011: template < > 6011: class integer_traits< unsigned char >; 6011: 6011: 6011: template < > 6011: class integer_traits< wchar_t >; 6011: 6011: 6011: template < > 6011: class integer_traits< short >; 6011: 6011: template < > 6011: class integer_traits< unsigned short >; 6011: 6011: template < > 6011: class integer_traits< int >; 6011: 6011: template < > 6011: class integer_traits< unsigned int >; 6011: 6011: template < > 6011: class integer_traits< long >; 6011: 6011: template < > 6011: class integer_traits< unsigned long >; 6011: 6011: 6011: template < > 6011: class integer_traits< ::boost::long_long_type>; 6011: 6011: template < > 6011: class integer_traits< ::boost::ulong_long_type >; 6011: # 97 "/usr/include/boost/integer_fwd.hpp" 3 4 6011: template < typename LeastInt > 6011: struct int_fast_t; 6011: 6011: template< int Bits > 6011: struct int_t; 6011: 6011: template< int Bits > 6011: struct uint_t; 6011: 6011: 6011: template< boost::long_long_type MaxValue > 6011: 6011: 6011: 6011: struct int_max_value_t; 6011: 6011: 6011: template< boost::long_long_type MinValue > 6011: 6011: 6011: 6011: struct int_min_value_t; 6011: 6011: 6011: template< boost::ulong_long_type MaxValue > 6011: 6011: 6011: 6011: struct uint_value_t; 6011: 6011: 6011: 6011: 6011: template < std::size_t Bit > 6011: struct high_bit_mask_t; 6011: 6011: template < std::size_t Bits > 6011: struct low_bits_mask_t; 6011: 6011: template < > 6011: struct low_bits_mask_t< ::std::numeric_limits::digits >; 6011: 6011: 6011: 6011: template 6011: struct static_log2; 6011: 6011: template <> struct static_log2<0u>; 6011: 6011: 6011: 6011: 6011: template 6011: struct static_signed_min; 6011: 6011: template 6011: struct static_signed_max; 6011: 6011: template 6011: struct static_unsigned_min; 6011: 6011: template 6011: struct static_unsigned_max; 6011: 6011: 6011: namespace integer 6011: { 6011: 6011: 6011: 6011: 6011: 6011: typedef boost::uintmax_t static_gcd_type; 6011: 6011: 6011: template < static_gcd_type Value1, static_gcd_type Value2 > 6011: struct static_gcd; 6011: template < static_gcd_type Value1, static_gcd_type Value2 > 6011: struct static_lcm; 6011: 6011: 6011: 6011: 6011: template < typename IntegerType > 6011: class gcd_evaluator; 6011: template < typename IntegerType > 6011: class lcm_evaluator; 6011: 6011: } 6011: 6011: } 6011: # 19 "/usr/include/boost/integer.hpp" 2 3 4 6011: 6011: # 1 "/usr/include/boost/integer_traits.hpp" 1 3 4 6011: # 23 "/usr/include/boost/integer_traits.hpp" 3 4 6011: # 1 "/usr/lib/gcc/arm-linux-gnueabihf/8/include-fixed/limits.h" 1 3 4 6011: # 24 "/usr/include/boost/integer_traits.hpp" 2 3 4 6011: # 39 "/usr/include/boost/integer_traits.hpp" 3 4 6011: 6011: # 40 "/usr/include/boost/integer_traits.hpp" 3 6011: 6011: 6011: namespace boost { 6011: template 6011: class integer_traits : public std::numeric_limits 6011: { 6011: public: 6011: static const bool is_integral = false; 6011: }; 6011: 6011: namespace detail { 6011: template 6011: class integer_traits_base 6011: { 6011: public: 6011: static const bool is_integral = true; 6011: static const T const_min = min_val; 6011: static const T const_max = max_val; 6011: }; 6011: 6011: 6011: 6011: template 6011: const bool integer_traits_base::is_integral; 6011: 6011: template 6011: const T integer_traits_base::const_min; 6011: 6011: template 6011: const T integer_traits_base::const_max; 6011: 6011: 6011: } 6011: 6011: template<> 6011: class integer_traits 6011: : public std::numeric_limits, 6011: public detail::integer_traits_base 6011: { }; 6011: 6011: template<> 6011: class integer_traits 6011: : public std::numeric_limits, 6011: public detail::integer_traits_base 6011: { }; 6011: 6011: template<> 6011: class integer_traits 6011: : public std::numeric_limits, 6011: public detail::integer_traits_base 6011: { }; 6011: 6011: template<> 6011: class integer_traits 6011: : public std::numeric_limits, 6011: public detail::integer_traits_base 6011: { }; 6011: 6011: 6011: template<> 6011: class integer_traits 6011: : public std::numeric_limits, 6011: 6011: 6011: 6011: public detail::integer_traits_base 6011: # 125 "/usr/include/boost/integer_traits.hpp" 3 6011: { }; 6011: 6011: 6011: template<> 6011: class integer_traits 6011: : public std::numeric_limits, 6011: public detail::integer_traits_base 6011: { }; 6011: 6011: template<> 6011: class integer_traits 6011: : public std::numeric_limits, 6011: public detail::integer_traits_base 6011: { }; 6011: 6011: template<> 6011: class integer_traits 6011: : public std::numeric_limits, 6011: public detail::integer_traits_base 6011: { }; 6011: 6011: template<> 6011: class integer_traits 6011: : public std::numeric_limits, 6011: public detail::integer_traits_base 6011: { }; 6011: 6011: template<> 6011: class integer_traits 6011: : public std::numeric_limits, 6011: public detail::integer_traits_base 6011: { }; 6011: 6011: template<> 6011: class integer_traits 6011: : public std::numeric_limits, 6011: public detail::integer_traits_base 6011: { }; 6011: 6011: 6011: 6011: 6011: template<> 6011: class integer_traits< ::boost::long_long_type> 6011: : public std::numeric_limits< ::boost::long_long_type>, 6011: public detail::integer_traits_base< ::boost::long_long_type, (-0x7fffffffffffffffLL -1), 0x7fffffffffffffffLL> 6011: { }; 6011: 6011: template<> 6011: class integer_traits< ::boost::ulong_long_type> 6011: : public std::numeric_limits< ::boost::ulong_long_type>, 6011: public detail::integer_traits_base< ::boost::ulong_long_type, 0, (0x7fffffffffffffffLL * 2ULL + 1)> 6011: { }; 6011: # 251 "/usr/include/boost/integer_traits.hpp" 3 6011: } 6011: # 21 "/usr/include/boost/integer.hpp" 2 3 4 6011: 6011: # 1 "/usr/include/boost/cstdint.hpp" 1 3 4 6011: # 23 "/usr/include/boost/integer.hpp" 2 3 4 6011: # 34 "/usr/include/boost/integer.hpp" 3 4 6011: 6011: # 35 "/usr/include/boost/integer.hpp" 3 6011: 6011: 6011: namespace boost 6011: { 6011: 6011: 6011: 6011: 6011: 6011: template< typename LeastInt > 6011: struct int_fast_t 6011: { 6011: typedef LeastInt fast; 6011: typedef fast type; 6011: }; 6011: 6011: namespace detail{ 6011: 6011: 6011: template< int Category > struct int_least_helper {}; 6011: template< int Category > struct uint_least_helper {}; 6011: 6011: 6011: 6011: 6011: 6011: template<> struct int_least_helper<1> { typedef boost::long_long_type least; }; 6011: 6011: 6011: 6011: template<> struct int_least_helper<2> { typedef long least; }; 6011: template<> struct int_least_helper<3> { typedef int least; }; 6011: template<> struct int_least_helper<4> { typedef short least; }; 6011: template<> struct int_least_helper<5> { typedef signed char least; }; 6011: 6011: template<> struct uint_least_helper<1> { typedef boost::ulong_long_type least; }; 6011: 6011: 6011: 6011: template<> struct uint_least_helper<2> { typedef unsigned long least; }; 6011: template<> struct uint_least_helper<3> { typedef unsigned int least; }; 6011: template<> struct uint_least_helper<4> { typedef unsigned short least; }; 6011: template<> struct uint_least_helper<5> { typedef unsigned char least; }; 6011: 6011: template 6011: struct exact_signed_base_helper{}; 6011: template 6011: struct exact_unsigned_base_helper{}; 6011: 6011: template <> struct exact_signed_base_helper { typedef signed char exact; }; 6011: template <> struct exact_unsigned_base_helper { typedef unsigned char exact; }; 6011: 6011: template <> struct exact_signed_base_helper { typedef short exact; }; 6011: template <> struct exact_unsigned_base_helper { typedef unsigned short exact; }; 6011: 6011: 6011: template <> struct exact_signed_base_helper { typedef int exact; }; 6011: template <> struct exact_unsigned_base_helper { typedef unsigned int exact; }; 6011: # 104 "/usr/include/boost/integer.hpp" 3 6011: template <> struct exact_signed_base_helper { typedef boost::long_long_type exact; }; 6011: template <> struct exact_unsigned_base_helper { typedef boost::ulong_long_type exact; }; 6011: 6011: 6011: 6011: } 6011: 6011: 6011: 6011: 6011: template< int Bits > 6011: struct int_t : public boost::detail::exact_signed_base_helper 6011: { 6011: static_assert(Bits <= (int)(sizeof(boost::intmax_t) * 8), "No suitable signed integer type with the requested number of bits is available.") 6011: ; 6011: typedef typename boost::detail::int_least_helper 6011: < 6011: 6011: (Bits <= (int)(sizeof(boost::long_long_type) * 8)) + 6011: 6011: 6011: 6011: (Bits-1 <= ::std::numeric_limits::digits) + 6011: (Bits-1 <= ::std::numeric_limits::digits) + 6011: (Bits-1 <= ::std::numeric_limits::digits) + 6011: (Bits-1 <= ::std::numeric_limits::digits) 6011: >::least least; 6011: typedef typename int_fast_t::type fast; 6011: }; 6011: 6011: 6011: template< int Bits > 6011: struct uint_t : public boost::detail::exact_unsigned_base_helper 6011: { 6011: static_assert(Bits <= (int)(sizeof(boost::uintmax_t) * 8), "No suitable unsigned integer type with the requested number of bits is available.") 6011: ; 6011: # 150 "/usr/include/boost/integer.hpp" 3 6011: typedef typename boost::detail::uint_least_helper 6011: < 6011: 6011: (Bits <= (int)(sizeof(boost::long_long_type) * 8)) + 6011: 6011: 6011: 6011: (Bits <= ::std::numeric_limits::digits) + 6011: (Bits <= ::std::numeric_limits::digits) + 6011: (Bits <= ::std::numeric_limits::digits) + 6011: (Bits <= ::std::numeric_limits::digits) 6011: >::least least; 6011: 6011: typedef typename int_fast_t::type fast; 6011: 6011: }; 6011: 6011: 6011: 6011: 6011: 6011: template< boost::long_long_type MaxValue > 6011: 6011: 6011: 6011: struct int_max_value_t 6011: { 6011: typedef typename boost::detail::int_least_helper 6011: < 6011: 6011: (MaxValue <= ::boost::integer_traits::const_max) + 6011: 6011: 6011: 6011: (MaxValue <= ::boost::integer_traits::const_max) + 6011: (MaxValue <= ::boost::integer_traits::const_max) + 6011: (MaxValue <= ::boost::integer_traits::const_max) + 6011: (MaxValue <= ::boost::integer_traits::const_max) 6011: >::least least; 6011: typedef typename int_fast_t::type fast; 6011: }; 6011: 6011: 6011: template< boost::long_long_type MinValue > 6011: 6011: 6011: 6011: struct int_min_value_t 6011: { 6011: typedef typename boost::detail::int_least_helper 6011: < 6011: 6011: (MinValue >= ::boost::integer_traits::const_min) + 6011: 6011: 6011: 6011: (MinValue >= ::boost::integer_traits::const_min) + 6011: (MinValue >= ::boost::integer_traits::const_min) + 6011: (MinValue >= ::boost::integer_traits::const_min) + 6011: (MinValue >= ::boost::integer_traits::const_min) 6011: >::least least; 6011: typedef typename int_fast_t::type fast; 6011: }; 6011: 6011: 6011: 6011: template< boost::ulong_long_type MaxValue > 6011: 6011: 6011: 6011: struct uint_value_t 6011: { 6011: # 243 "/usr/include/boost/integer.hpp" 3 6011: typedef typename boost::detail::uint_least_helper 6011: < 6011: 6011: (MaxValue <= ::boost::integer_traits::const_max) + 6011: 6011: 6011: 6011: (MaxValue <= ::boost::integer_traits::const_max) + 6011: (MaxValue <= ::boost::integer_traits::const_max) + 6011: (MaxValue <= ::boost::integer_traits::const_max) + 6011: (MaxValue <= ::boost::integer_traits::const_max) 6011: >::least least; 6011: 6011: typedef typename int_fast_t::type fast; 6011: }; 6011: 6011: 6011: } 6011: # 24 "/usr/include/boost/regex/v4/cpp_regex_traits.hpp" 2 3 4 6011: 6011: 6011: 6011: 6011: 6011: # 1 "/usr/include/boost/regex/pattern_except.hpp" 1 3 4 6011: # 30 "/usr/include/boost/regex/pattern_except.hpp" 3 4 6011: namespace boost{ 6011: # 47 "/usr/include/boost/regex/pattern_except.hpp" 3 4 6011: class regex_error : public std::runtime_error 6011: { 6011: public: 6011: explicit regex_error(const std::string& s, regex_constants::error_type err = regex_constants::error_unknown, std::ptrdiff_t pos = 0); 6011: explicit regex_error(regex_constants::error_type err); 6011: ~regex_error() throw(); 6011: regex_constants::error_type code()const 6011: { return m_error_code; } 6011: std::ptrdiff_t position()const 6011: { return m_position; } 6011: void raise()const; 6011: private: 6011: regex_constants::error_type m_error_code; 6011: std::ptrdiff_t m_position; 6011: }; 6011: 6011: typedef regex_error bad_pattern; 6011: typedef regex_error bad_expression; 6011: 6011: namespace re_detail_106501{ 6011: 6011: void raise_runtime_error(const std::runtime_error& ex); 6011: 6011: template 6011: void raise_error(const traits& t, regex_constants::error_type code) 6011: { 6011: (void)t; 6011: std::runtime_error e(t.error_string(code)); 6011: ::boost::re_detail_106501::raise_runtime_error(e); 6011: } 6011: 6011: } 6011: # 95 "/usr/include/boost/regex/pattern_except.hpp" 3 4 6011: } 6011: # 30 "/usr/include/boost/regex/v4/cpp_regex_traits.hpp" 2 3 4 6011: 6011: 6011: 6011: 6011: 6011: # 1 "/usr/include/boost/regex/pending/static_mutex.hpp" 1 3 4 6011: # 37 "/usr/include/boost/regex/pending/static_mutex.hpp" 3 4 6011: namespace boost{ 6011: 6011: class static_mutex; 6011: 6011: 6011: 6011: class scoped_static_mutex_lock 6011: { 6011: public: 6011: scoped_static_mutex_lock(static_mutex& mut, bool lk = true); 6011: ~scoped_static_mutex_lock(); 6011: inline bool locked()const 6011: { 6011: return m_have_lock; 6011: } 6011: inline operator void const*()const 6011: { 6011: return locked() ? this : 0; 6011: } 6011: void lock(); 6011: void unlock(); 6011: private: 6011: static_mutex& m_mutex; 6011: bool m_have_lock; 6011: }; 6011: 6011: class static_mutex 6011: { 6011: public: 6011: typedef scoped_static_mutex_lock scoped_lock; 6011: pthread_mutex_t m_mutex; 6011: }; 6011: 6011: } 6011: # 36 "/usr/include/boost/regex/v4/cpp_regex_traits.hpp" 2 3 4 6011: 6011: 6011: # 1 "/usr/include/boost/regex/v4/primary_transform.hpp" 1 3 4 6011: # 34 "/usr/include/boost/regex/v4/primary_transform.hpp" 3 4 6011: namespace boost{ 6011: namespace re_detail_106501{ 6011: 6011: 6011: enum{ 6011: sort_C, 6011: sort_fixed, 6011: sort_delim, 6011: sort_unknown 6011: }; 6011: 6011: template 6011: unsigned count_chars(const S& s, charT c) 6011: { 6011: 6011: 6011: 6011: 6011: 6011: 6011: unsigned int count = 0; 6011: for(unsigned pos = 0; pos < s.size(); ++pos) 6011: { 6011: if(s[pos] == c) ++count; 6011: } 6011: return count; 6011: } 6011: 6011: 6011: template 6011: unsigned find_sort_syntax(const traits* pt, charT* delim) 6011: { 6011: 6011: 6011: 6011: 6011: typedef typename traits::string_type string_type; 6011: typedef typename traits::char_type char_type; 6011: 6011: 6011: (void)pt; 6011: 6011: char_type a[2] = {'a', '\0', }; 6011: string_type sa(pt->transform(a, a+1)); 6011: if(sa == a) 6011: { 6011: *delim = 0; 6011: return sort_C; 6011: } 6011: char_type A[2] = { 'A', '\0', }; 6011: string_type sA(pt->transform(A, A+1)); 6011: char_type c[2] = { ';', '\0', }; 6011: string_type sc(pt->transform(c, c+1)); 6011: 6011: int pos = 0; 6011: while((pos <= static_cast(sa.size())) && (pos <= static_cast(sA.size())) && (sa[pos] == sA[pos])) ++pos; 6011: --pos; 6011: if(pos < 0) 6011: { 6011: *delim = 0; 6011: return sort_unknown; 6011: } 6011: 6011: 6011: 6011: 6011: charT maybe_delim = sa[pos]; 6011: if((pos != 0) && (count_chars(sa, maybe_delim) == count_chars(sA, maybe_delim)) && (count_chars(sa, maybe_delim) == count_chars(sc, maybe_delim))) 6011: { 6011: *delim = maybe_delim; 6011: return sort_delim; 6011: } 6011: 6011: 6011: 6011: if((sa.size() == sA.size()) && (sa.size() == sc.size())) 6011: { 6011: 6011: 6011: 6011: *delim = static_cast(++pos); 6011: return sort_fixed; 6011: } 6011: 6011: 6011: 6011: *delim = 0; 6011: return sort_unknown; 6011: } 6011: 6011: 6011: } 6011: } 6011: # 39 "/usr/include/boost/regex/v4/cpp_regex_traits.hpp" 2 3 4 6011: 6011: 6011: # 1 "/usr/include/boost/regex/pending/object_cache.hpp" 1 3 4 6011: # 23 "/usr/include/boost/regex/pending/object_cache.hpp" 3 4 6011: # 1 "/usr/include/c++/8/list" 1 3 4 6011: # 58 "/usr/include/c++/8/list" 3 4 6011: 6011: # 59 "/usr/include/c++/8/list" 3 6011: 6011: 6011: 6011: 6011: # 1 "/usr/include/c++/8/bits/stl_list.h" 1 3 6011: # 67 "/usr/include/c++/8/bits/stl_list.h" 3 6011: namespace std __attribute__ ((__visibility__ ("default"))) 6011: { 6011: 6011: 6011: namespace __detail 6011: { 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: struct _List_node_base 6011: { 6011: _List_node_base* _M_next; 6011: _List_node_base* _M_prev; 6011: 6011: static void 6011: swap(_List_node_base& __x, _List_node_base& __y) noexcept; 6011: 6011: void 6011: _M_transfer(_List_node_base* const __first, 6011: _List_node_base* const __last) noexcept; 6011: 6011: void 6011: _M_reverse() noexcept; 6011: 6011: void 6011: _M_hook(_List_node_base* const __position) noexcept; 6011: 6011: void 6011: _M_unhook() noexcept; 6011: }; 6011: 6011: 6011: struct _List_node_header : public _List_node_base 6011: { 6011: 6011: std::size_t _M_size; 6011: 6011: 6011: _List_node_header() noexcept 6011: { _M_init(); } 6011: 6011: 6011: _List_node_header(_List_node_header&& __x) noexcept 6011: : _List_node_base{ __x._M_next, __x._M_prev } 6011: 6011: , _M_size(__x._M_size) 6011: 6011: { 6011: if (__x._M_base()->_M_next == __x._M_base()) 6011: this->_M_next = this->_M_prev = this; 6011: else 6011: { 6011: this->_M_next->_M_prev = this->_M_prev->_M_next = this->_M_base(); 6011: __x._M_init(); 6011: } 6011: } 6011: 6011: void 6011: _M_move_nodes(_List_node_header&& __x) 6011: { 6011: _List_node_base* const __xnode = __x._M_base(); 6011: if (__xnode->_M_next == __xnode) 6011: _M_init(); 6011: else 6011: { 6011: _List_node_base* const __node = this->_M_base(); 6011: __node->_M_next = __xnode->_M_next; 6011: __node->_M_prev = __xnode->_M_prev; 6011: __node->_M_next->_M_prev = __node->_M_prev->_M_next = __node; 6011: 6011: _M_size = __x._M_size; 6011: 6011: __x._M_init(); 6011: } 6011: } 6011: 6011: 6011: void 6011: _M_init() noexcept 6011: { 6011: this->_M_next = this->_M_prev = this; 6011: 6011: this->_M_size = 0; 6011: 6011: } 6011: 6011: private: 6011: _List_node_base* _M_base() { return this; } 6011: }; 6011: } 6011: 6011: 6011: 6011: 6011: template 6011: struct _List_node : public __detail::_List_node_base 6011: { 6011: 6011: __gnu_cxx::__aligned_membuf<_Tp> _M_storage; 6011: _Tp* _M_valptr() { return _M_storage._M_ptr(); } 6011: _Tp const* _M_valptr() const { return _M_storage._M_ptr(); } 6011: 6011: 6011: 6011: 6011: 6011: }; 6011: 6011: 6011: 6011: 6011: 6011: 6011: template 6011: struct _List_iterator 6011: { 6011: typedef _List_iterator<_Tp> _Self; 6011: typedef _List_node<_Tp> _Node; 6011: 6011: typedef ptrdiff_t difference_type; 6011: typedef std::bidirectional_iterator_tag iterator_category; 6011: typedef _Tp value_type; 6011: typedef _Tp* pointer; 6011: typedef _Tp& reference; 6011: 6011: _List_iterator() noexcept 6011: : _M_node() { } 6011: 6011: explicit 6011: _List_iterator(__detail::_List_node_base* __x) noexcept 6011: : _M_node(__x) { } 6011: 6011: _Self 6011: _M_const_cast() const noexcept 6011: { return *this; } 6011: 6011: 6011: reference 6011: operator*() const noexcept 6011: { return *static_cast<_Node*>(_M_node)->_M_valptr(); } 6011: 6011: pointer 6011: operator->() const noexcept 6011: { return static_cast<_Node*>(_M_node)->_M_valptr(); } 6011: 6011: _Self& 6011: operator++() noexcept 6011: { 6011: _M_node = _M_node->_M_next; 6011: return *this; 6011: } 6011: 6011: _Self 6011: operator++(int) noexcept 6011: { 6011: _Self __tmp = *this; 6011: _M_node = _M_node->_M_next; 6011: return __tmp; 6011: } 6011: 6011: _Self& 6011: operator--() noexcept 6011: { 6011: _M_node = _M_node->_M_prev; 6011: return *this; 6011: } 6011: 6011: _Self 6011: operator--(int) noexcept 6011: { 6011: _Self __tmp = *this; 6011: _M_node = _M_node->_M_prev; 6011: return __tmp; 6011: } 6011: 6011: bool 6011: operator==(const _Self& __x) const noexcept 6011: { return _M_node == __x._M_node; } 6011: 6011: bool 6011: operator!=(const _Self& __x) const noexcept 6011: { return _M_node != __x._M_node; } 6011: 6011: 6011: __detail::_List_node_base* _M_node; 6011: }; 6011: 6011: 6011: 6011: 6011: 6011: 6011: template 6011: struct _List_const_iterator 6011: { 6011: typedef _List_const_iterator<_Tp> _Self; 6011: typedef const _List_node<_Tp> _Node; 6011: typedef _List_iterator<_Tp> iterator; 6011: 6011: typedef ptrdiff_t difference_type; 6011: typedef std::bidirectional_iterator_tag iterator_category; 6011: typedef _Tp value_type; 6011: typedef const _Tp* pointer; 6011: typedef const _Tp& reference; 6011: 6011: _List_const_iterator() noexcept 6011: : _M_node() { } 6011: 6011: explicit 6011: _List_const_iterator(const __detail::_List_node_base* __x) 6011: noexcept 6011: : _M_node(__x) { } 6011: 6011: _List_const_iterator(const iterator& __x) noexcept 6011: : _M_node(__x._M_node) { } 6011: 6011: iterator 6011: _M_const_cast() const noexcept 6011: { return iterator(const_cast<__detail::_List_node_base*>(_M_node)); } 6011: 6011: 6011: reference 6011: operator*() const noexcept 6011: { return *static_cast<_Node*>(_M_node)->_M_valptr(); } 6011: 6011: pointer 6011: operator->() const noexcept 6011: { return static_cast<_Node*>(_M_node)->_M_valptr(); } 6011: 6011: _Self& 6011: operator++() noexcept 6011: { 6011: _M_node = _M_node->_M_next; 6011: return *this; 6011: } 6011: 6011: _Self 6011: operator++(int) noexcept 6011: { 6011: _Self __tmp = *this; 6011: _M_node = _M_node->_M_next; 6011: return __tmp; 6011: } 6011: 6011: _Self& 6011: operator--() noexcept 6011: { 6011: _M_node = _M_node->_M_prev; 6011: return *this; 6011: } 6011: 6011: _Self 6011: operator--(int) noexcept 6011: { 6011: _Self __tmp = *this; 6011: _M_node = _M_node->_M_prev; 6011: return __tmp; 6011: } 6011: 6011: bool 6011: operator==(const _Self& __x) const noexcept 6011: { return _M_node == __x._M_node; } 6011: 6011: bool 6011: operator!=(const _Self& __x) const noexcept 6011: { return _M_node != __x._M_node; } 6011: 6011: 6011: const __detail::_List_node_base* _M_node; 6011: }; 6011: 6011: template 6011: inline bool 6011: operator==(const _List_iterator<_Val>& __x, 6011: const _List_const_iterator<_Val>& __y) noexcept 6011: { return __x._M_node == __y._M_node; } 6011: 6011: template 6011: inline bool 6011: operator!=(const _List_iterator<_Val>& __x, 6011: const _List_const_iterator<_Val>& __y) noexcept 6011: { return __x._M_node != __y._M_node; } 6011: 6011: namespace __cxx11 { 6011: 6011: template 6011: class _List_base 6011: { 6011: protected: 6011: typedef typename __gnu_cxx::__alloc_traits<_Alloc>::template 6011: rebind<_Tp>::other _Tp_alloc_type; 6011: typedef __gnu_cxx::__alloc_traits<_Tp_alloc_type> _Tp_alloc_traits; 6011: typedef typename _Tp_alloc_traits::template 6011: rebind<_List_node<_Tp> >::other _Node_alloc_type; 6011: typedef __gnu_cxx::__alloc_traits<_Node_alloc_type> _Node_alloc_traits; 6011: 6011: 6011: static size_t 6011: _S_distance(const __detail::_List_node_base* __first, 6011: const __detail::_List_node_base* __last) 6011: { 6011: size_t __n = 0; 6011: while (__first != __last) 6011: { 6011: __first = __first->_M_next; 6011: ++__n; 6011: } 6011: return __n; 6011: } 6011: 6011: 6011: struct _List_impl 6011: : public _Node_alloc_type 6011: { 6011: __detail::_List_node_header _M_node; 6011: 6011: _List_impl() noexcept(noexcept(_Node_alloc_type())) 6011: : _Node_alloc_type() 6011: { } 6011: 6011: _List_impl(const _Node_alloc_type& __a) noexcept 6011: : _Node_alloc_type(__a) 6011: { } 6011: 6011: 6011: _List_impl(_List_impl&&) = default; 6011: 6011: _List_impl(_Node_alloc_type&& __a, _List_impl&& __x) 6011: : _Node_alloc_type(std::move(__a)), _M_node(std::move(__x._M_node)) 6011: { } 6011: 6011: _List_impl(_Node_alloc_type&& __a) noexcept 6011: : _Node_alloc_type(std::move(__a)) 6011: { } 6011: 6011: }; 6011: 6011: _List_impl _M_impl; 6011: 6011: 6011: size_t _M_get_size() const { return _M_impl._M_node._M_size; } 6011: 6011: void _M_set_size(size_t __n) { _M_impl._M_node._M_size = __n; } 6011: 6011: void _M_inc_size(size_t __n) { _M_impl._M_node._M_size += __n; } 6011: 6011: void _M_dec_size(size_t __n) { _M_impl._M_node._M_size -= __n; } 6011: 6011: 6011: size_t 6011: _M_distance(const __detail::_List_node_base* __first, 6011: const __detail::_List_node_base* __last) const 6011: { return _S_distance(__first, __last); } 6011: 6011: 6011: size_t _M_node_count() const { return _M_get_size(); } 6011: # 447 "/usr/include/c++/8/bits/stl_list.h" 3 6011: typename _Node_alloc_traits::pointer 6011: _M_get_node() 6011: { return _Node_alloc_traits::allocate(_M_impl, 1); } 6011: 6011: void 6011: _M_put_node(typename _Node_alloc_traits::pointer __p) noexcept 6011: { _Node_alloc_traits::deallocate(_M_impl, __p, 1); } 6011: 6011: public: 6011: typedef _Alloc allocator_type; 6011: 6011: _Node_alloc_type& 6011: _M_get_Node_allocator() noexcept 6011: { return _M_impl; } 6011: 6011: const _Node_alloc_type& 6011: _M_get_Node_allocator() const noexcept 6011: { return _M_impl; } 6011: 6011: 6011: _List_base() = default; 6011: 6011: 6011: 6011: 6011: _List_base(const _Node_alloc_type& __a) noexcept 6011: : _M_impl(__a) 6011: { } 6011: 6011: 6011: _List_base(_List_base&&) = default; 6011: 6011: 6011: _List_base(_List_base&& __x, _Node_alloc_type&& __a) 6011: : _M_impl(std::move(__a)) 6011: { 6011: if (__x._M_get_Node_allocator() == _M_get_Node_allocator()) 6011: _M_move_nodes(std::move(__x)); 6011: 6011: } 6011: 6011: 6011: 6011: _List_base(_Node_alloc_type&& __a, _List_base&& __x) 6011: : _M_impl(std::move(__a), std::move(__x._M_impl)) 6011: { } 6011: 6011: 6011: _List_base(_Node_alloc_type&& __a) 6011: : _M_impl(std::move(__a)) 6011: { } 6011: 6011: void 6011: _M_move_nodes(_List_base&& __x) 6011: { _M_impl._M_node._M_move_nodes(std::move(__x._M_impl._M_node)); } 6011: 6011: 6011: 6011: ~_List_base() noexcept 6011: { _M_clear(); } 6011: 6011: void 6011: _M_clear() noexcept; 6011: 6011: void 6011: _M_init() noexcept 6011: { this->_M_impl._M_node._M_init(); } 6011: }; 6011: # 562 "/usr/include/c++/8/bits/stl_list.h" 3 6011: template > 6011: class list : protected _List_base<_Tp, _Alloc> 6011: { 6011: # 575 "/usr/include/c++/8/bits/stl_list.h" 3 6011: static_assert(is_same::type, _Tp>::value, 6011: "std::list must have a non-const, non-volatile value_type"); 6011: 6011: 6011: 6011: 6011: 6011: 6011: typedef _List_base<_Tp, _Alloc> _Base; 6011: typedef typename _Base::_Tp_alloc_type _Tp_alloc_type; 6011: typedef typename _Base::_Tp_alloc_traits _Tp_alloc_traits; 6011: typedef typename _Base::_Node_alloc_type _Node_alloc_type; 6011: typedef typename _Base::_Node_alloc_traits _Node_alloc_traits; 6011: 6011: public: 6011: typedef _Tp value_type; 6011: typedef typename _Tp_alloc_traits::pointer pointer; 6011: typedef typename _Tp_alloc_traits::const_pointer const_pointer; 6011: typedef typename _Tp_alloc_traits::reference reference; 6011: typedef typename _Tp_alloc_traits::const_reference const_reference; 6011: typedef _List_iterator<_Tp> iterator; 6011: typedef _List_const_iterator<_Tp> const_iterator; 6011: typedef std::reverse_iterator const_reverse_iterator; 6011: typedef std::reverse_iterator reverse_iterator; 6011: typedef size_t size_type; 6011: typedef ptrdiff_t difference_type; 6011: typedef _Alloc allocator_type; 6011: 6011: protected: 6011: 6011: 6011: typedef _List_node<_Tp> _Node; 6011: 6011: using _Base::_M_impl; 6011: using _Base::_M_put_node; 6011: using _Base::_M_get_node; 6011: using _Base::_M_get_Node_allocator; 6011: # 637 "/usr/include/c++/8/bits/stl_list.h" 3 6011: template 6011: _Node* 6011: _M_create_node(_Args&&... __args) 6011: { 6011: auto __p = this->_M_get_node(); 6011: auto& __alloc = _M_get_Node_allocator(); 6011: __allocated_ptr<_Node_alloc_type> __guard{__alloc, __p}; 6011: _Node_alloc_traits::construct(__alloc, __p->_M_valptr(), 6011: std::forward<_Args>(__args)...); 6011: __guard = nullptr; 6011: return __p; 6011: } 6011: 6011: 6011: 6011: static size_t 6011: _S_distance(const_iterator __first, const_iterator __last) 6011: { return std::distance(__first, __last); } 6011: 6011: 6011: size_t 6011: _M_node_count() const 6011: { return this->_M_get_size(); } 6011: # 672 "/usr/include/c++/8/bits/stl_list.h" 3 6011: public: 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: list() = default; 6011: # 689 "/usr/include/c++/8/bits/stl_list.h" 3 6011: explicit 6011: list(const allocator_type& __a) noexcept 6011: : _Base(_Node_alloc_type(__a)) { } 6011: # 702 "/usr/include/c++/8/bits/stl_list.h" 3 6011: explicit 6011: list(size_type __n, const allocator_type& __a = allocator_type()) 6011: : _Base(_Node_alloc_type(__a)) 6011: { _M_default_initialize(__n); } 6011: # 715 "/usr/include/c++/8/bits/stl_list.h" 3 6011: list(size_type __n, const value_type& __value, 6011: const allocator_type& __a = allocator_type()) 6011: : _Base(_Node_alloc_type(__a)) 6011: { _M_fill_initialize(__n, __value); } 6011: # 742 "/usr/include/c++/8/bits/stl_list.h" 3 6011: list(const list& __x) 6011: : _Base(_Node_alloc_traits:: 6011: _S_select_on_copy(__x._M_get_Node_allocator())) 6011: { _M_initialize_dispatch(__x.begin(), __x.end(), __false_type()); } 6011: # 755 "/usr/include/c++/8/bits/stl_list.h" 3 6011: list(list&&) = default; 6011: # 765 "/usr/include/c++/8/bits/stl_list.h" 3 6011: list(initializer_list __l, 6011: const allocator_type& __a = allocator_type()) 6011: : _Base(_Node_alloc_type(__a)) 6011: { _M_initialize_dispatch(__l.begin(), __l.end(), __false_type()); } 6011: 6011: list(const list& __x, const allocator_type& __a) 6011: : _Base(_Node_alloc_type(__a)) 6011: { _M_initialize_dispatch(__x.begin(), __x.end(), __false_type()); } 6011: 6011: private: 6011: list(list&& __x, const allocator_type& __a, true_type) noexcept 6011: : _Base(_Node_alloc_type(__a), std::move(__x)) 6011: { } 6011: 6011: list(list&& __x, const allocator_type& __a, false_type) 6011: : _Base(_Node_alloc_type(__a)) 6011: { 6011: if (__x._M_get_Node_allocator() == this->_M_get_Node_allocator()) 6011: this->_M_move_nodes(std::move(__x)); 6011: else 6011: insert(begin(), std::__make_move_if_noexcept_iterator(__x.begin()), 6011: std::__make_move_if_noexcept_iterator(__x.end())); 6011: } 6011: 6011: public: 6011: list(list&& __x, const allocator_type& __a) 6011: noexcept(_Node_alloc_traits::_S_always_equal()) 6011: : list(std::move(__x), __a, 6011: typename _Node_alloc_traits::is_always_equal{}) 6011: { } 6011: # 808 "/usr/include/c++/8/bits/stl_list.h" 3 6011: template> 6011: list(_InputIterator __first, _InputIterator __last, 6011: const allocator_type& __a = allocator_type()) 6011: : _Base(_Node_alloc_type(__a)) 6011: { _M_initialize_dispatch(__first, __last, __false_type()); } 6011: # 834 "/usr/include/c++/8/bits/stl_list.h" 3 6011: ~list() = default; 6011: # 845 "/usr/include/c++/8/bits/stl_list.h" 3 6011: list& 6011: operator=(const list& __x); 6011: # 859 "/usr/include/c++/8/bits/stl_list.h" 3 6011: list& 6011: operator=(list&& __x) 6011: noexcept(_Node_alloc_traits::_S_nothrow_move()) 6011: { 6011: constexpr bool __move_storage = 6011: _Node_alloc_traits::_S_propagate_on_move_assign() 6011: || _Node_alloc_traits::_S_always_equal(); 6011: _M_move_assign(std::move(__x), __bool_constant<__move_storage>()); 6011: return *this; 6011: } 6011: # 877 "/usr/include/c++/8/bits/stl_list.h" 3 6011: list& 6011: operator=(initializer_list __l) 6011: { 6011: this->assign(__l.begin(), __l.end()); 6011: return *this; 6011: } 6011: # 895 "/usr/include/c++/8/bits/stl_list.h" 3 6011: void 6011: assign(size_type __n, const value_type& __val) 6011: { _M_fill_assign(__n, __val); } 6011: # 912 "/usr/include/c++/8/bits/stl_list.h" 3 6011: template> 6011: void 6011: assign(_InputIterator __first, _InputIterator __last) 6011: { _M_assign_dispatch(__first, __last, __false_type()); } 6011: # 936 "/usr/include/c++/8/bits/stl_list.h" 3 6011: void 6011: assign(initializer_list __l) 6011: { this->_M_assign_dispatch(__l.begin(), __l.end(), __false_type()); } 6011: 6011: 6011: 6011: allocator_type 6011: get_allocator() const noexcept 6011: { return allocator_type(_Base::_M_get_Node_allocator()); } 6011: 6011: 6011: 6011: 6011: 6011: 6011: iterator 6011: begin() noexcept 6011: { return iterator(this->_M_impl._M_node._M_next); } 6011: 6011: 6011: 6011: 6011: 6011: 6011: const_iterator 6011: begin() const noexcept 6011: { return const_iterator(this->_M_impl._M_node._M_next); } 6011: 6011: 6011: 6011: 6011: 6011: 6011: iterator 6011: end() noexcept 6011: { return iterator(&this->_M_impl._M_node); } 6011: 6011: 6011: 6011: 6011: 6011: 6011: const_iterator 6011: end() const noexcept 6011: { return const_iterator(&this->_M_impl._M_node); } 6011: 6011: 6011: 6011: 6011: 6011: 6011: reverse_iterator 6011: rbegin() noexcept 6011: { return reverse_iterator(end()); } 6011: 6011: 6011: 6011: 6011: 6011: 6011: const_reverse_iterator 6011: rbegin() const noexcept 6011: { return const_reverse_iterator(end()); } 6011: 6011: 6011: 6011: 6011: 6011: 6011: reverse_iterator 6011: rend() noexcept 6011: { return reverse_iterator(begin()); } 6011: 6011: 6011: 6011: 6011: 6011: 6011: const_reverse_iterator 6011: rend() const noexcept 6011: { return const_reverse_iterator(begin()); } 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: const_iterator 6011: cbegin() const noexcept 6011: { return const_iterator(this->_M_impl._M_node._M_next); } 6011: 6011: 6011: 6011: 6011: 6011: 6011: const_iterator 6011: cend() const noexcept 6011: { return const_iterator(&this->_M_impl._M_node); } 6011: 6011: 6011: 6011: 6011: 6011: 6011: const_reverse_iterator 6011: crbegin() const noexcept 6011: { return const_reverse_iterator(end()); } 6011: 6011: 6011: 6011: 6011: 6011: 6011: const_reverse_iterator 6011: crend() const noexcept 6011: { return const_reverse_iterator(begin()); } 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: bool 6011: empty() const noexcept 6011: { return this->_M_impl._M_node._M_next == &this->_M_impl._M_node; } 6011: 6011: 6011: size_type 6011: size() const noexcept 6011: { return _M_node_count(); } 6011: 6011: 6011: size_type 6011: max_size() const noexcept 6011: { return _Node_alloc_traits::max_size(_M_get_Node_allocator()); } 6011: # 1085 "/usr/include/c++/8/bits/stl_list.h" 3 6011: void 6011: resize(size_type __new_size); 6011: # 1098 "/usr/include/c++/8/bits/stl_list.h" 3 6011: void 6011: resize(size_type __new_size, const value_type& __x); 6011: # 1120 "/usr/include/c++/8/bits/stl_list.h" 3 6011: reference 6011: front() noexcept 6011: { return *begin(); } 6011: 6011: 6011: 6011: 6011: 6011: const_reference 6011: front() const noexcept 6011: { return *begin(); } 6011: 6011: 6011: 6011: 6011: 6011: reference 6011: back() noexcept 6011: { 6011: iterator __tmp = end(); 6011: --__tmp; 6011: return *__tmp; 6011: } 6011: 6011: 6011: 6011: 6011: 6011: const_reference 6011: back() const noexcept 6011: { 6011: const_iterator __tmp = end(); 6011: --__tmp; 6011: return *__tmp; 6011: } 6011: # 1167 "/usr/include/c++/8/bits/stl_list.h" 3 6011: void 6011: push_front(const value_type& __x) 6011: { this->_M_insert(begin(), __x); } 6011: 6011: 6011: void 6011: push_front(value_type&& __x) 6011: { this->_M_insert(begin(), std::move(__x)); } 6011: 6011: template 6011: 6011: 6011: 6011: void 6011: 6011: emplace_front(_Args&&... __args) 6011: { 6011: this->_M_insert(begin(), std::forward<_Args>(__args)...); 6011: 6011: 6011: 6011: } 6011: # 1203 "/usr/include/c++/8/bits/stl_list.h" 3 6011: void 6011: pop_front() noexcept 6011: { this->_M_erase(begin()); } 6011: # 1217 "/usr/include/c++/8/bits/stl_list.h" 3 6011: void 6011: push_back(const value_type& __x) 6011: { this->_M_insert(end(), __x); } 6011: 6011: 6011: void 6011: push_back(value_type&& __x) 6011: { this->_M_insert(end(), std::move(__x)); } 6011: 6011: template 6011: 6011: 6011: 6011: void 6011: 6011: emplace_back(_Args&&... __args) 6011: { 6011: this->_M_insert(end(), std::forward<_Args>(__args)...); 6011: 6011: 6011: 6011: } 6011: # 1252 "/usr/include/c++/8/bits/stl_list.h" 3 6011: void 6011: pop_back() noexcept 6011: { this->_M_erase(iterator(this->_M_impl._M_node._M_prev)); } 6011: # 1269 "/usr/include/c++/8/bits/stl_list.h" 3 6011: template 6011: iterator 6011: emplace(const_iterator __position, _Args&&... __args); 6011: # 1284 "/usr/include/c++/8/bits/stl_list.h" 3 6011: iterator 6011: insert(const_iterator __position, const value_type& __x); 6011: # 1314 "/usr/include/c++/8/bits/stl_list.h" 3 6011: iterator 6011: insert(const_iterator __position, value_type&& __x) 6011: { return emplace(__position, std::move(__x)); } 6011: # 1333 "/usr/include/c++/8/bits/stl_list.h" 3 6011: iterator 6011: insert(const_iterator __p, initializer_list __l) 6011: { return this->insert(__p, __l.begin(), __l.end()); } 6011: # 1353 "/usr/include/c++/8/bits/stl_list.h" 3 6011: iterator 6011: insert(const_iterator __position, size_type __n, const value_type& __x); 6011: # 1392 "/usr/include/c++/8/bits/stl_list.h" 3 6011: template> 6011: iterator 6011: insert(const_iterator __position, _InputIterator __first, 6011: _InputIterator __last); 6011: # 1436 "/usr/include/c++/8/bits/stl_list.h" 3 6011: iterator 6011: 6011: erase(const_iterator __position) noexcept; 6011: # 1461 "/usr/include/c++/8/bits/stl_list.h" 3 6011: iterator 6011: 6011: erase(const_iterator __first, const_iterator __last) noexcept 6011: 6011: 6011: 6011: { 6011: while (__first != __last) 6011: __first = erase(__first); 6011: return __last._M_const_cast(); 6011: } 6011: # 1484 "/usr/include/c++/8/bits/stl_list.h" 3 6011: void 6011: swap(list& __x) noexcept 6011: { 6011: __detail::_List_node_base::swap(this->_M_impl._M_node, 6011: __x._M_impl._M_node); 6011: 6011: size_t __xsize = __x._M_get_size(); 6011: __x._M_set_size(this->_M_get_size()); 6011: this->_M_set_size(__xsize); 6011: 6011: _Node_alloc_traits::_S_on_swap(this->_M_get_Node_allocator(), 6011: __x._M_get_Node_allocator()); 6011: } 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: void 6011: clear() noexcept 6011: { 6011: _Base::_M_clear(); 6011: _Base::_M_init(); 6011: } 6011: # 1523 "/usr/include/c++/8/bits/stl_list.h" 3 6011: void 6011: 6011: splice(const_iterator __position, list&& __x) noexcept 6011: 6011: 6011: 6011: { 6011: if (!__x.empty()) 6011: { 6011: _M_check_equal_allocators(__x); 6011: 6011: this->_M_transfer(__position._M_const_cast(), 6011: __x.begin(), __x.end()); 6011: 6011: this->_M_inc_size(__x._M_get_size()); 6011: __x._M_set_size(0); 6011: } 6011: } 6011: 6011: 6011: void 6011: splice(const_iterator __position, list& __x) noexcept 6011: { splice(__position, std::move(__x)); } 6011: # 1559 "/usr/include/c++/8/bits/stl_list.h" 3 6011: void 6011: splice(const_iterator __position, list&& __x, const_iterator __i) noexcept 6011: # 1574 "/usr/include/c++/8/bits/stl_list.h" 3 6011: { 6011: iterator __j = __i._M_const_cast(); 6011: ++__j; 6011: if (__position == __i || __position == __j) 6011: return; 6011: 6011: if (this != std::__addressof(__x)) 6011: _M_check_equal_allocators(__x); 6011: 6011: this->_M_transfer(__position._M_const_cast(), 6011: __i._M_const_cast(), __j); 6011: 6011: this->_M_inc_size(1); 6011: __x._M_dec_size(1); 6011: } 6011: # 1601 "/usr/include/c++/8/bits/stl_list.h" 3 6011: void 6011: splice(const_iterator __position, list& __x, const_iterator __i) noexcept 6011: { splice(__position, std::move(__x), __i); } 6011: # 1620 "/usr/include/c++/8/bits/stl_list.h" 3 6011: void 6011: splice(const_iterator __position, list&& __x, const_iterator __first, 6011: const_iterator __last) noexcept 6011: # 1640 "/usr/include/c++/8/bits/stl_list.h" 3 6011: { 6011: if (__first != __last) 6011: { 6011: if (this != std::__addressof(__x)) 6011: _M_check_equal_allocators(__x); 6011: 6011: size_t __n = _S_distance(__first, __last); 6011: this->_M_inc_size(__n); 6011: __x._M_dec_size(__n); 6011: 6011: this->_M_transfer(__position._M_const_cast(), 6011: __first._M_const_cast(), 6011: __last._M_const_cast()); 6011: } 6011: } 6011: # 1670 "/usr/include/c++/8/bits/stl_list.h" 3 6011: void 6011: splice(const_iterator __position, list& __x, const_iterator __first, 6011: const_iterator __last) noexcept 6011: { splice(__position, std::move(__x), __first, __last); } 6011: # 1687 "/usr/include/c++/8/bits/stl_list.h" 3 6011: void 6011: remove(const _Tp& __value); 6011: # 1701 "/usr/include/c++/8/bits/stl_list.h" 3 6011: template 6011: void 6011: remove_if(_Predicate); 6011: # 1715 "/usr/include/c++/8/bits/stl_list.h" 3 6011: void 6011: unique(); 6011: # 1730 "/usr/include/c++/8/bits/stl_list.h" 3 6011: template 6011: void 6011: unique(_BinaryPredicate); 6011: # 1744 "/usr/include/c++/8/bits/stl_list.h" 3 6011: void 6011: merge(list&& __x); 6011: 6011: void 6011: merge(list& __x) 6011: { merge(std::move(__x)); } 6011: # 1769 "/usr/include/c++/8/bits/stl_list.h" 3 6011: template 6011: void 6011: merge(list&& __x, _StrictWeakOrdering __comp); 6011: 6011: template 6011: void 6011: merge(list& __x, _StrictWeakOrdering __comp) 6011: { merge(std::move(__x), __comp); } 6011: # 1788 "/usr/include/c++/8/bits/stl_list.h" 3 6011: void 6011: reverse() noexcept 6011: { this->_M_impl._M_node._M_reverse(); } 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: void 6011: sort(); 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: template 6011: void 6011: sort(_StrictWeakOrdering); 6011: 6011: protected: 6011: 6011: 6011: 6011: 6011: 6011: 6011: template 6011: void 6011: _M_initialize_dispatch(_Integer __n, _Integer __x, __true_type) 6011: { _M_fill_initialize(static_cast(__n), __x); } 6011: 6011: 6011: template 6011: void 6011: _M_initialize_dispatch(_InputIterator __first, _InputIterator __last, 6011: __false_type) 6011: { 6011: for (; __first != __last; ++__first) 6011: 6011: emplace_back(*__first); 6011: 6011: 6011: 6011: } 6011: 6011: 6011: 6011: void 6011: _M_fill_initialize(size_type __n, const value_type& __x) 6011: { 6011: for (; __n; --__n) 6011: push_back(__x); 6011: } 6011: 6011: 6011: 6011: void 6011: _M_default_initialize(size_type __n) 6011: { 6011: for (; __n; --__n) 6011: emplace_back(); 6011: } 6011: 6011: 6011: void 6011: _M_default_append(size_type __n); 6011: # 1866 "/usr/include/c++/8/bits/stl_list.h" 3 6011: template 6011: void 6011: _M_assign_dispatch(_Integer __n, _Integer __val, __true_type) 6011: { _M_fill_assign(__n, __val); } 6011: 6011: 6011: template 6011: void 6011: _M_assign_dispatch(_InputIterator __first, _InputIterator __last, 6011: __false_type); 6011: 6011: 6011: 6011: void 6011: _M_fill_assign(size_type __n, const value_type& __val); 6011: 6011: 6011: 6011: void 6011: _M_transfer(iterator __position, iterator __first, iterator __last) 6011: { __position._M_node->_M_transfer(__first._M_node, __last._M_node); } 6011: # 1898 "/usr/include/c++/8/bits/stl_list.h" 3 6011: template 6011: void 6011: _M_insert(iterator __position, _Args&&... __args) 6011: { 6011: _Node* __tmp = _M_create_node(std::forward<_Args>(__args)...); 6011: __tmp->_M_hook(__position._M_node); 6011: this->_M_inc_size(1); 6011: } 6011: 6011: 6011: 6011: void 6011: _M_erase(iterator __position) noexcept 6011: { 6011: this->_M_dec_size(1); 6011: __position._M_node->_M_unhook(); 6011: _Node* __n = static_cast<_Node*>(__position._M_node); 6011: 6011: _Node_alloc_traits::destroy(_M_get_Node_allocator(), __n->_M_valptr()); 6011: 6011: 6011: 6011: 6011: _M_put_node(__n); 6011: } 6011: 6011: 6011: void 6011: _M_check_equal_allocators(list& __x) noexcept 6011: { 6011: if (std::__alloc_neq:: 6011: _S_do_it(_M_get_Node_allocator(), __x._M_get_Node_allocator())) 6011: __builtin_abort(); 6011: } 6011: 6011: 6011: const_iterator 6011: _M_resize_pos(size_type& __new_size) const; 6011: 6011: 6011: void 6011: _M_move_assign(list&& __x, true_type) noexcept 6011: { 6011: this->_M_clear(); 6011: this->_M_move_nodes(std::move(__x)); 6011: std::__alloc_on_move(this->_M_get_Node_allocator(), 6011: __x._M_get_Node_allocator()); 6011: } 6011: 6011: void 6011: _M_move_assign(list&& __x, false_type) 6011: { 6011: if (__x._M_get_Node_allocator() == this->_M_get_Node_allocator()) 6011: _M_move_assign(std::move(__x), true_type{}); 6011: else 6011: 6011: 6011: _M_assign_dispatch(std::__make_move_if_noexcept_iterator(__x.begin()), 6011: std::__make_move_if_noexcept_iterator(__x.end()), 6011: __false_type{}); 6011: } 6011: 6011: }; 6011: # 1972 "/usr/include/c++/8/bits/stl_list.h" 3 6011: } 6011: # 1984 "/usr/include/c++/8/bits/stl_list.h" 3 6011: template 6011: inline bool 6011: operator==(const list<_Tp, _Alloc>& __x, const list<_Tp, _Alloc>& __y) 6011: { 6011: 6011: if (__x.size() != __y.size()) 6011: return false; 6011: 6011: 6011: typedef typename list<_Tp, _Alloc>::const_iterator const_iterator; 6011: const_iterator __end1 = __x.end(); 6011: const_iterator __end2 = __y.end(); 6011: 6011: const_iterator __i1 = __x.begin(); 6011: const_iterator __i2 = __y.begin(); 6011: while (__i1 != __end1 && __i2 != __end2 && *__i1 == *__i2) 6011: { 6011: ++__i1; 6011: ++__i2; 6011: } 6011: return __i1 == __end1 && __i2 == __end2; 6011: } 6011: # 2018 "/usr/include/c++/8/bits/stl_list.h" 3 6011: template 6011: inline bool 6011: operator<(const list<_Tp, _Alloc>& __x, const list<_Tp, _Alloc>& __y) 6011: { return std::lexicographical_compare(__x.begin(), __x.end(), 6011: __y.begin(), __y.end()); } 6011: 6011: 6011: template 6011: inline bool 6011: operator!=(const list<_Tp, _Alloc>& __x, const list<_Tp, _Alloc>& __y) 6011: { return !(__x == __y); } 6011: 6011: 6011: template 6011: inline bool 6011: operator>(const list<_Tp, _Alloc>& __x, const list<_Tp, _Alloc>& __y) 6011: { return __y < __x; } 6011: 6011: 6011: template 6011: inline bool 6011: operator<=(const list<_Tp, _Alloc>& __x, const list<_Tp, _Alloc>& __y) 6011: { return !(__y < __x); } 6011: 6011: 6011: template 6011: inline bool 6011: operator>=(const list<_Tp, _Alloc>& __x, const list<_Tp, _Alloc>& __y) 6011: { return !(__x < __y); } 6011: 6011: 6011: template 6011: inline void 6011: swap(list<_Tp, _Alloc>& __x, list<_Tp, _Alloc>& __y) 6011: noexcept(noexcept(__x.swap(__y))) 6011: { __x.swap(__y); } 6011: 6011: 6011: 6011: 6011: 6011: 6011: template 6011: inline ptrdiff_t 6011: __distance(std::_List_iterator<_Tp> __first, 6011: std::_List_iterator<_Tp> __last, 6011: input_iterator_tag __tag) 6011: { 6011: typedef std::_List_const_iterator<_Tp> _CIter; 6011: return std::__distance(_CIter(__first), _CIter(__last), __tag); 6011: } 6011: 6011: template 6011: inline ptrdiff_t 6011: __distance(std::_List_const_iterator<_Tp> __first, 6011: std::_List_const_iterator<_Tp> __last, 6011: input_iterator_tag) 6011: { 6011: typedef __detail::_List_node_header _Sentinel; 6011: std::_List_const_iterator<_Tp> __beyond = __last; 6011: ++__beyond; 6011: const bool __whole = __first == __beyond; 6011: if (__builtin_constant_p (__whole) && __whole) 6011: return static_cast(__last._M_node)->_M_size; 6011: 6011: ptrdiff_t __n = 0; 6011: while (__first != __last) 6011: { 6011: ++__first; 6011: ++__n; 6011: } 6011: return __n; 6011: } 6011: 6011: 6011: 6011: } 6011: # 64 "/usr/include/c++/8/list" 2 3 6011: # 1 "/usr/include/c++/8/bits/list.tcc" 1 3 6011: # 59 "/usr/include/c++/8/bits/list.tcc" 3 6011: namespace std __attribute__ ((__visibility__ ("default"))) 6011: { 6011: 6011: 6011: 6011: template 6011: void 6011: _List_base<_Tp, _Alloc>:: 6011: _M_clear() noexcept 6011: { 6011: typedef _List_node<_Tp> _Node; 6011: __detail::_List_node_base* __cur = _M_impl._M_node._M_next; 6011: while (__cur != &_M_impl._M_node) 6011: { 6011: _Node* __tmp = static_cast<_Node*>(__cur); 6011: __cur = __tmp->_M_next; 6011: _Tp* __val = __tmp->_M_valptr(); 6011: 6011: _Node_alloc_traits::destroy(_M_get_Node_allocator(), __val); 6011: 6011: 6011: 6011: _M_put_node(__tmp); 6011: } 6011: } 6011: 6011: 6011: template 6011: template 6011: typename list<_Tp, _Alloc>::iterator 6011: list<_Tp, _Alloc>:: 6011: emplace(const_iterator __position, _Args&&... __args) 6011: { 6011: _Node* __tmp = _M_create_node(std::forward<_Args>(__args)...); 6011: __tmp->_M_hook(__position._M_const_cast()._M_node); 6011: this->_M_inc_size(1); 6011: return iterator(__tmp); 6011: } 6011: 6011: 6011: template 6011: typename list<_Tp, _Alloc>::iterator 6011: list<_Tp, _Alloc>:: 6011: 6011: insert(const_iterator __position, const value_type& __x) 6011: 6011: 6011: 6011: { 6011: _Node* __tmp = _M_create_node(__x); 6011: __tmp->_M_hook(__position._M_const_cast()._M_node); 6011: this->_M_inc_size(1); 6011: return iterator(__tmp); 6011: } 6011: 6011: 6011: template 6011: typename list<_Tp, _Alloc>::iterator 6011: list<_Tp, _Alloc>:: 6011: insert(const_iterator __position, size_type __n, const value_type& __x) 6011: { 6011: if (__n) 6011: { 6011: list __tmp(__n, __x, get_allocator()); 6011: iterator __it = __tmp.begin(); 6011: splice(__position, __tmp); 6011: return __it; 6011: } 6011: return __position._M_const_cast(); 6011: } 6011: 6011: template 6011: template 6011: typename list<_Tp, _Alloc>::iterator 6011: list<_Tp, _Alloc>:: 6011: insert(const_iterator __position, _InputIterator __first, 6011: _InputIterator __last) 6011: { 6011: list __tmp(__first, __last, get_allocator()); 6011: if (!__tmp.empty()) 6011: { 6011: iterator __it = __tmp.begin(); 6011: splice(__position, __tmp); 6011: return __it; 6011: } 6011: return __position._M_const_cast(); 6011: } 6011: 6011: 6011: template 6011: typename list<_Tp, _Alloc>::iterator 6011: list<_Tp, _Alloc>:: 6011: 6011: erase(const_iterator __position) noexcept 6011: 6011: 6011: 6011: { 6011: iterator __ret = iterator(__position._M_node->_M_next); 6011: _M_erase(__position._M_const_cast()); 6011: return __ret; 6011: } 6011: # 173 "/usr/include/c++/8/bits/list.tcc" 3 6011: template 6011: typename list<_Tp, _Alloc>::const_iterator 6011: list<_Tp, _Alloc>:: 6011: _M_resize_pos(size_type& __new_size) const 6011: { 6011: const_iterator __i; 6011: 6011: const size_type __len = size(); 6011: if (__new_size < __len) 6011: { 6011: if (__new_size <= __len / 2) 6011: { 6011: __i = begin(); 6011: std::advance(__i, __new_size); 6011: } 6011: else 6011: { 6011: __i = end(); 6011: ptrdiff_t __num_erase = __len - __new_size; 6011: std::advance(__i, -__num_erase); 6011: } 6011: __new_size = 0; 6011: return __i; 6011: } 6011: else 6011: __i = end(); 6011: 6011: 6011: 6011: 6011: 6011: __new_size -= __len; 6011: return __i; 6011: } 6011: 6011: 6011: template 6011: void 6011: list<_Tp, _Alloc>:: 6011: _M_default_append(size_type __n) 6011: { 6011: size_type __i = 0; 6011: try 6011: { 6011: for (; __i < __n; ++__i) 6011: emplace_back(); 6011: } 6011: catch(...) 6011: { 6011: for (; __i; --__i) 6011: pop_back(); 6011: throw; 6011: } 6011: } 6011: 6011: template 6011: void 6011: list<_Tp, _Alloc>:: 6011: resize(size_type __new_size) 6011: { 6011: const_iterator __i = _M_resize_pos(__new_size); 6011: if (__new_size) 6011: _M_default_append(__new_size); 6011: else 6011: erase(__i, end()); 6011: } 6011: 6011: template 6011: void 6011: list<_Tp, _Alloc>:: 6011: resize(size_type __new_size, const value_type& __x) 6011: { 6011: const_iterator __i = _M_resize_pos(__new_size); 6011: if (__new_size) 6011: insert(end(), __new_size, __x); 6011: else 6011: erase(__i, end()); 6011: } 6011: # 265 "/usr/include/c++/8/bits/list.tcc" 3 6011: template 6011: list<_Tp, _Alloc>& 6011: list<_Tp, _Alloc>:: 6011: operator=(const list& __x) 6011: { 6011: if (this != std::__addressof(__x)) 6011: { 6011: 6011: if (_Node_alloc_traits::_S_propagate_on_copy_assign()) 6011: { 6011: auto& __this_alloc = this->_M_get_Node_allocator(); 6011: auto& __that_alloc = __x._M_get_Node_allocator(); 6011: if (!_Node_alloc_traits::_S_always_equal() 6011: && __this_alloc != __that_alloc) 6011: { 6011: 6011: clear(); 6011: } 6011: std::__alloc_on_copy(__this_alloc, __that_alloc); 6011: } 6011: 6011: _M_assign_dispatch(__x.begin(), __x.end(), __false_type()); 6011: } 6011: return *this; 6011: } 6011: 6011: template 6011: void 6011: list<_Tp, _Alloc>:: 6011: _M_fill_assign(size_type __n, const value_type& __val) 6011: { 6011: iterator __i = begin(); 6011: for (; __i != end() && __n > 0; ++__i, --__n) 6011: *__i = __val; 6011: if (__n > 0) 6011: insert(end(), __n, __val); 6011: else 6011: erase(__i, end()); 6011: } 6011: 6011: template 6011: template 6011: void 6011: list<_Tp, _Alloc>:: 6011: _M_assign_dispatch(_InputIterator __first2, _InputIterator __last2, 6011: __false_type) 6011: { 6011: iterator __first1 = begin(); 6011: iterator __last1 = end(); 6011: for (; __first1 != __last1 && __first2 != __last2; 6011: ++__first1, ++__first2) 6011: *__first1 = *__first2; 6011: if (__first2 == __last2) 6011: erase(__first1, __last1); 6011: else 6011: insert(__last1, __first2, __last2); 6011: } 6011: 6011: template 6011: void 6011: list<_Tp, _Alloc>:: 6011: remove(const value_type& __value) 6011: { 6011: iterator __first = begin(); 6011: iterator __last = end(); 6011: iterator __extra = __last; 6011: while (__first != __last) 6011: { 6011: iterator __next = __first; 6011: ++__next; 6011: if (*__first == __value) 6011: { 6011: 6011: 6011: 6011: if (std::__addressof(*__first) != std::__addressof(__value)) 6011: _M_erase(__first); 6011: else 6011: __extra = __first; 6011: } 6011: __first = __next; 6011: } 6011: if (__extra != __last) 6011: _M_erase(__extra); 6011: } 6011: 6011: template 6011: void 6011: list<_Tp, _Alloc>:: 6011: unique() 6011: { 6011: iterator __first = begin(); 6011: iterator __last = end(); 6011: if (__first == __last) 6011: return; 6011: iterator __next = __first; 6011: while (++__next != __last) 6011: { 6011: if (*__first == *__next) 6011: _M_erase(__next); 6011: else 6011: __first = __next; 6011: __next = __first; 6011: } 6011: } 6011: 6011: template 6011: void 6011: list<_Tp, _Alloc>:: 6011: 6011: merge(list&& __x) 6011: 6011: 6011: 6011: { 6011: 6011: 6011: if (this != std::__addressof(__x)) 6011: { 6011: _M_check_equal_allocators(__x); 6011: 6011: iterator __first1 = begin(); 6011: iterator __last1 = end(); 6011: iterator __first2 = __x.begin(); 6011: iterator __last2 = __x.end(); 6011: const size_t __orig_size = __x.size(); 6011: try { 6011: while (__first1 != __last1 && __first2 != __last2) 6011: if (*__first2 < *__first1) 6011: { 6011: iterator __next = __first2; 6011: _M_transfer(__first1, __first2, ++__next); 6011: __first2 = __next; 6011: } 6011: else 6011: ++__first1; 6011: if (__first2 != __last2) 6011: _M_transfer(__last1, __first2, __last2); 6011: 6011: this->_M_inc_size(__x._M_get_size()); 6011: __x._M_set_size(0); 6011: } 6011: catch(...) 6011: { 6011: const size_t __dist = std::distance(__first2, __last2); 6011: this->_M_inc_size(__orig_size - __dist); 6011: __x._M_set_size(__dist); 6011: throw; 6011: } 6011: } 6011: } 6011: 6011: template 6011: template 6011: void 6011: list<_Tp, _Alloc>:: 6011: 6011: merge(list&& __x, _StrictWeakOrdering __comp) 6011: 6011: 6011: 6011: { 6011: 6011: 6011: if (this != std::__addressof(__x)) 6011: { 6011: _M_check_equal_allocators(__x); 6011: 6011: iterator __first1 = begin(); 6011: iterator __last1 = end(); 6011: iterator __first2 = __x.begin(); 6011: iterator __last2 = __x.end(); 6011: const size_t __orig_size = __x.size(); 6011: try 6011: { 6011: while (__first1 != __last1 && __first2 != __last2) 6011: if (__comp(*__first2, *__first1)) 6011: { 6011: iterator __next = __first2; 6011: _M_transfer(__first1, __first2, ++__next); 6011: __first2 = __next; 6011: } 6011: else 6011: ++__first1; 6011: if (__first2 != __last2) 6011: _M_transfer(__last1, __first2, __last2); 6011: 6011: this->_M_inc_size(__x._M_get_size()); 6011: __x._M_set_size(0); 6011: } 6011: catch(...) 6011: { 6011: const size_t __dist = std::distance(__first2, __last2); 6011: this->_M_inc_size(__orig_size - __dist); 6011: __x._M_set_size(__dist); 6011: throw; 6011: } 6011: } 6011: } 6011: 6011: template 6011: void 6011: list<_Tp, _Alloc>:: 6011: sort() 6011: { 6011: 6011: if (this->_M_impl._M_node._M_next != &this->_M_impl._M_node 6011: && this->_M_impl._M_node._M_next->_M_next != &this->_M_impl._M_node) 6011: { 6011: list __carry; 6011: list __tmp[64]; 6011: list * __fill = __tmp; 6011: list * __counter; 6011: try 6011: { 6011: do 6011: { 6011: __carry.splice(__carry.begin(), *this, begin()); 6011: 6011: for(__counter = __tmp; 6011: __counter != __fill && !__counter->empty(); 6011: ++__counter) 6011: { 6011: __counter->merge(__carry); 6011: __carry.swap(*__counter); 6011: } 6011: __carry.swap(*__counter); 6011: if (__counter == __fill) 6011: ++__fill; 6011: } 6011: while ( !empty() ); 6011: 6011: for (__counter = __tmp + 1; __counter != __fill; ++__counter) 6011: __counter->merge(*(__counter - 1)); 6011: swap( *(__fill - 1) ); 6011: } 6011: catch(...) 6011: { 6011: this->splice(this->end(), __carry); 6011: for (int __i = 0; __i < sizeof(__tmp)/sizeof(__tmp[0]); ++__i) 6011: this->splice(this->end(), __tmp[__i]); 6011: throw; 6011: } 6011: } 6011: } 6011: 6011: template 6011: template 6011: void 6011: list<_Tp, _Alloc>:: 6011: remove_if(_Predicate __pred) 6011: { 6011: iterator __first = begin(); 6011: iterator __last = end(); 6011: while (__first != __last) 6011: { 6011: iterator __next = __first; 6011: ++__next; 6011: if (__pred(*__first)) 6011: _M_erase(__first); 6011: __first = __next; 6011: } 6011: } 6011: 6011: template 6011: template 6011: void 6011: list<_Tp, _Alloc>:: 6011: unique(_BinaryPredicate __binary_pred) 6011: { 6011: iterator __first = begin(); 6011: iterator __last = end(); 6011: if (__first == __last) 6011: return; 6011: iterator __next = __first; 6011: while (++__next != __last) 6011: { 6011: if (__binary_pred(*__first, *__next)) 6011: _M_erase(__next); 6011: else 6011: __first = __next; 6011: __next = __first; 6011: } 6011: } 6011: 6011: template 6011: template 6011: void 6011: list<_Tp, _Alloc>:: 6011: sort(_StrictWeakOrdering __comp) 6011: { 6011: 6011: if (this->_M_impl._M_node._M_next != &this->_M_impl._M_node 6011: && this->_M_impl._M_node._M_next->_M_next != &this->_M_impl._M_node) 6011: { 6011: list __carry; 6011: list __tmp[64]; 6011: list * __fill = __tmp; 6011: list * __counter; 6011: try 6011: { 6011: do 6011: { 6011: __carry.splice(__carry.begin(), *this, begin()); 6011: 6011: for(__counter = __tmp; 6011: __counter != __fill && !__counter->empty(); 6011: ++__counter) 6011: { 6011: __counter->merge(__carry, __comp); 6011: __carry.swap(*__counter); 6011: } 6011: __carry.swap(*__counter); 6011: if (__counter == __fill) 6011: ++__fill; 6011: } 6011: while ( !empty() ); 6011: 6011: for (__counter = __tmp + 1; __counter != __fill; ++__counter) 6011: __counter->merge(*(__counter - 1), __comp); 6011: swap(*(__fill - 1)); 6011: } 6011: catch(...) 6011: { 6011: this->splice(this->end(), __carry); 6011: for (int __i = 0; __i < sizeof(__tmp)/sizeof(__tmp[0]); ++__i) 6011: this->splice(this->end(), __tmp[__i]); 6011: throw; 6011: } 6011: } 6011: } 6011: 6011: 6011: 6011: } 6011: # 65 "/usr/include/c++/8/list" 2 3 6011: # 24 "/usr/include/boost/regex/pending/object_cache.hpp" 2 3 4 6011: # 32 "/usr/include/boost/regex/pending/object_cache.hpp" 3 4 6011: namespace boost{ 6011: 6011: template 6011: class object_cache 6011: { 6011: public: 6011: typedef std::pair< ::boost::shared_ptr, Key const*> value_type; 6011: typedef std::list list_type; 6011: typedef typename list_type::iterator list_iterator; 6011: typedef std::map map_type; 6011: typedef typename map_type::iterator map_iterator; 6011: typedef typename list_type::size_type size_type; 6011: static boost::shared_ptr get(const Key& k, size_type l_max_cache_size); 6011: 6011: private: 6011: static boost::shared_ptr do_get(const Key& k, size_type l_max_cache_size); 6011: 6011: struct data 6011: { 6011: list_type cont; 6011: map_type index; 6011: }; 6011: 6011: 6011: 6011: friend struct data; 6011: }; 6011: 6011: template 6011: boost::shared_ptr object_cache::get(const Key& k, size_type l_max_cache_size) 6011: { 6011: 6011: static boost::static_mutex mut = { { { 0, 0, 0, 0, 0, { 0 } } }, }; 6011: 6011: boost::static_mutex::scoped_lock l(mut); 6011: if(l) 6011: { 6011: return do_get(k, l_max_cache_size); 6011: } 6011: 6011: 6011: 6011: 6011: ::boost::throw_exception(std::runtime_error("Error in thread safety code: could not acquire a lock")); 6011: 6011: 6011: 6011: 6011: 6011: 6011: } 6011: 6011: template 6011: boost::shared_ptr object_cache::do_get(const Key& k, size_type l_max_cache_size) 6011: { 6011: typedef typename object_cache::data object_data; 6011: typedef typename map_type::size_type map_size_type; 6011: static object_data s_data; 6011: 6011: 6011: 6011: 6011: map_iterator mpos = s_data.index.find(k); 6011: if(mpos != s_data.index.end()) 6011: { 6011: 6011: 6011: 6011: 6011: if(--(s_data.cont.end()) != mpos->second) 6011: { 6011: 6011: list_type temp; 6011: temp.splice(temp.end(), s_data.cont, mpos->second); 6011: 6011: s_data.cont.splice(s_data.cont.end(), temp, temp.begin()); 6011: (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__)); 6011: 6011: mpos->second = --(s_data.cont.end()); 6011: (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__)); 6011: (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__)); 6011: } 6011: return s_data.cont.back().first; 6011: } 6011: 6011: 6011: 6011: 6011: boost::shared_ptr result(new Object(k)); 6011: 6011: 6011: 6011: s_data.cont.push_back(value_type(result, static_cast(0))); 6011: s_data.index.insert(std::make_pair(k, --(s_data.cont.end()))); 6011: s_data.cont.back().second = &(s_data.index.find(k)->first); 6011: map_size_type s = s_data.index.size(); 6011: (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__)); 6011: (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__)); 6011: (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__)); 6011: if(s > l_max_cache_size) 6011: { 6011: 6011: 6011: 6011: 6011: 6011: list_iterator pos = s_data.cont.begin(); 6011: list_iterator last = s_data.cont.end(); 6011: while((pos != last) && (s > l_max_cache_size)) 6011: { 6011: if(pos->first.unique()) 6011: { 6011: list_iterator condemmed(pos); 6011: ++pos; 6011: 6011: 6011: (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__)); 6011: s_data.index.erase(*(condemmed->second)); 6011: s_data.cont.erase(condemmed); 6011: --s; 6011: } 6011: else 6011: ++pos; 6011: } 6011: (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__)); 6011: (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__)); 6011: (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__)); 6011: } 6011: return result; 6011: } 6011: 6011: } 6011: # 42 "/usr/include/boost/regex/v4/cpp_regex_traits.hpp" 2 3 4 6011: 6011: 6011: 6011: 6011: # 1 "/usr/include/c++/8/climits" 1 3 4 6011: # 39 "/usr/include/c++/8/climits" 3 4 6011: 6011: # 40 "/usr/include/c++/8/climits" 3 6011: 6011: 6011: # 1 "/usr/lib/gcc/arm-linux-gnueabihf/8/include-fixed/limits.h" 1 3 4 6011: # 43 "/usr/include/c++/8/climits" 2 3 6011: # 47 "/usr/include/boost/regex/v4/cpp_regex_traits.hpp" 2 3 4 6011: # 64 "/usr/include/boost/regex/v4/cpp_regex_traits.hpp" 3 4 6011: namespace boost{ 6011: 6011: 6011: 6011: 6011: template 6011: class cpp_regex_traits; 6011: 6011: namespace re_detail_106501{ 6011: 6011: 6011: 6011: 6011: 6011: template > 6011: class parser_buf : public ::std::basic_streambuf 6011: { 6011: typedef ::std::basic_streambuf base_type; 6011: typedef typename base_type::int_type int_type; 6011: typedef typename base_type::char_type char_type; 6011: typedef typename base_type::pos_type pos_type; 6011: typedef ::std::streamsize streamsize; 6011: typedef typename base_type::off_type off_type; 6011: public: 6011: parser_buf() : base_type() { setbuf(0, 0); } 6011: const charT* getnext() { return this->gptr(); } 6011: protected: 6011: std::basic_streambuf* setbuf(char_type* s, streamsize n); 6011: typename parser_buf::pos_type seekpos(pos_type sp, ::std::ios_base::openmode which); 6011: typename parser_buf::pos_type seekoff(off_type off, ::std::ios_base::seekdir way, ::std::ios_base::openmode which); 6011: private: 6011: parser_buf& operator=(const parser_buf&); 6011: parser_buf(const parser_buf&); 6011: }; 6011: 6011: template 6011: std::basic_streambuf* 6011: parser_buf::setbuf(char_type* s, streamsize n) 6011: { 6011: this->setg(s, s, s + n); 6011: return this; 6011: } 6011: 6011: template 6011: typename parser_buf::pos_type 6011: parser_buf::seekoff(off_type off, ::std::ios_base::seekdir way, ::std::ios_base::openmode which) 6011: { 6011: typedef typename boost::int_t::least cast_type; 6011: 6011: if(which & ::std::ios_base::out) 6011: return pos_type(off_type(-1)); 6011: std::ptrdiff_t size = this->egptr() - this->eback(); 6011: std::ptrdiff_t pos = this->gptr() - this->eback(); 6011: charT* g = this->eback(); 6011: switch(static_cast(way)) 6011: { 6011: case ::std::ios_base::beg: 6011: if((off < 0) || (off > size)) 6011: return pos_type(off_type(-1)); 6011: else 6011: this->setg(g, g + off, g + size); 6011: break; 6011: case ::std::ios_base::end: 6011: if((off < 0) || (off > size)) 6011: return pos_type(off_type(-1)); 6011: else 6011: this->setg(g, g + size - off, g + size); 6011: break; 6011: case ::std::ios_base::cur: 6011: { 6011: std::ptrdiff_t newpos = static_cast(pos + off); 6011: if((newpos < 0) || (newpos > size)) 6011: return pos_type(off_type(-1)); 6011: else 6011: this->setg(g, g + newpos, g + size); 6011: break; 6011: } 6011: default: ; 6011: } 6011: 6011: 6011: 6011: 6011: return static_cast(this->gptr() - this->eback()); 6011: 6011: 6011: 6011: } 6011: 6011: template 6011: typename parser_buf::pos_type 6011: parser_buf::seekpos(pos_type sp, ::std::ios_base::openmode which) 6011: { 6011: if(which & ::std::ios_base::out) 6011: return pos_type(off_type(-1)); 6011: off_type size = static_cast(this->egptr() - this->eback()); 6011: charT* g = this->eback(); 6011: if(off_type(sp) <= size) 6011: { 6011: this->setg(g, g + off_type(sp), g + size); 6011: } 6011: return pos_type(off_type(-1)); 6011: } 6011: 6011: 6011: 6011: 6011: 6011: template 6011: struct cpp_regex_traits_base 6011: { 6011: cpp_regex_traits_base(const std::locale& l) 6011: { imbue(l); } 6011: std::locale imbue(const std::locale& l); 6011: 6011: std::locale m_locale; 6011: std::ctype const* m_pctype; 6011: 6011: std::messages const* m_pmessages; 6011: 6011: std::collate const* m_pcollate; 6011: 6011: bool operator<(const cpp_regex_traits_base& b)const 6011: { 6011: if(m_pctype == b.m_pctype) 6011: { 6011: 6011: if(m_pmessages == b.m_pmessages) 6011: { 6011: return m_pcollate < b.m_pcollate; 6011: } 6011: return m_pmessages < b.m_pmessages; 6011: 6011: 6011: 6011: } 6011: return m_pctype < b.m_pctype; 6011: } 6011: bool operator==(const cpp_regex_traits_base& b)const 6011: { 6011: return (m_pctype == b.m_pctype) 6011: 6011: && (m_pmessages == b.m_pmessages) 6011: 6011: && (m_pcollate == b.m_pcollate); 6011: } 6011: }; 6011: 6011: template 6011: std::locale cpp_regex_traits_base::imbue(const std::locale& l) 6011: { 6011: std::locale result(m_locale); 6011: m_locale = l; 6011: m_pctype = &std::use_facet< std::ctype >(l); 6011: 6011: m_pmessages = std::has_facet< std::messages >(l) ? &std::use_facet< std::messages >(l) : 0; 6011: 6011: m_pcollate = &std::use_facet< std::collate >(l); 6011: return result; 6011: } 6011: 6011: 6011: 6011: 6011: 6011: template 6011: class cpp_regex_traits_char_layer : public cpp_regex_traits_base 6011: { 6011: typedef std::basic_string string_type; 6011: typedef std::map map_type; 6011: typedef typename map_type::const_iterator map_iterator_type; 6011: public: 6011: cpp_regex_traits_char_layer(const std::locale& l) 6011: : cpp_regex_traits_base(l) 6011: { 6011: init(); 6011: } 6011: cpp_regex_traits_char_layer(const cpp_regex_traits_base& b) 6011: : cpp_regex_traits_base(b) 6011: { 6011: init(); 6011: } 6011: void init(); 6011: 6011: regex_constants::syntax_type syntax_type(charT c)const 6011: { 6011: map_iterator_type i = m_char_map.find(c); 6011: return ((i == m_char_map.end()) ? 0 : i->second); 6011: } 6011: regex_constants::escape_syntax_type escape_syntax_type(charT c) const 6011: { 6011: map_iterator_type i = m_char_map.find(c); 6011: if(i == m_char_map.end()) 6011: { 6011: if(this->m_pctype->is(std::ctype_base::lower, c)) return regex_constants::escape_type_class; 6011: if(this->m_pctype->is(std::ctype_base::upper, c)) return regex_constants::escape_type_not_class; 6011: return 0; 6011: } 6011: return i->second; 6011: } 6011: 6011: private: 6011: string_type get_default_message(regex_constants::syntax_type); 6011: 6011: map_type m_char_map; 6011: }; 6011: 6011: template 6011: void cpp_regex_traits_char_layer::init() 6011: { 6011: 6011: 6011: 6011: 6011: typename std::messages::catalog cat = static_cast::catalog>(-1); 6011: 6011: 6011: 6011: std::string cat_name(cpp_regex_traits::get_catalog_name()); 6011: if(cat_name.size() && (this->m_pmessages != 0)) 6011: { 6011: cat = this->m_pmessages->open( 6011: cat_name, 6011: this->m_locale); 6011: if((int)cat < 0) 6011: { 6011: std::string m("Unable to open message catalog: "); 6011: std::runtime_error err(m + cat_name); 6011: boost::re_detail_106501::raise_runtime_error(err); 6011: } 6011: } 6011: 6011: 6011: 6011: if((int)cat >= 0) 6011: { 6011: 6011: try{ 6011: 6011: for(regex_constants::syntax_type i = 1; i < regex_constants::syntax_max; ++i) 6011: { 6011: string_type mss = this->m_pmessages->get(cat, 0, i, get_default_message(i)); 6011: for(typename string_type::size_type j = 0; j < mss.size(); ++j) 6011: { 6011: m_char_map[mss[j]] = i; 6011: } 6011: } 6011: this->m_pmessages->close(cat); 6011: 6011: } 6011: catch(...) 6011: { 6011: if(this->m_pmessages) 6011: this->m_pmessages->close(cat); 6011: throw; 6011: } 6011: 6011: } 6011: else 6011: { 6011: 6011: for(regex_constants::syntax_type i = 1; i < regex_constants::syntax_max; ++i) 6011: { 6011: const char* ptr = get_default_syntax(i); 6011: while(ptr && *ptr) 6011: { 6011: m_char_map[this->m_pctype->widen(*ptr)] = i; 6011: ++ptr; 6011: } 6011: } 6011: 6011: } 6011: 6011: } 6011: 6011: template 6011: typename cpp_regex_traits_char_layer::string_type 6011: cpp_regex_traits_char_layer::get_default_message(regex_constants::syntax_type i) 6011: { 6011: const char* ptr = get_default_syntax(i); 6011: string_type result; 6011: while(ptr && *ptr) 6011: { 6011: result.append(1, this->m_pctype->widen(*ptr)); 6011: ++ptr; 6011: } 6011: return result; 6011: } 6011: 6011: 6011: 6011: 6011: template <> 6011: class cpp_regex_traits_char_layer : public cpp_regex_traits_base 6011: { 6011: typedef std::string string_type; 6011: public: 6011: cpp_regex_traits_char_layer(const std::locale& l) 6011: : cpp_regex_traits_base(l) 6011: { 6011: init(); 6011: } 6011: cpp_regex_traits_char_layer(const cpp_regex_traits_base& l) 6011: : cpp_regex_traits_base(l) 6011: { 6011: init(); 6011: } 6011: 6011: regex_constants::syntax_type syntax_type(char c)const 6011: { 6011: return m_char_map[static_cast(c)]; 6011: } 6011: regex_constants::escape_syntax_type escape_syntax_type(char c) const 6011: { 6011: return m_char_map[static_cast(c)]; 6011: } 6011: 6011: private: 6011: regex_constants::syntax_type m_char_map[1u << 8]; 6011: void init(); 6011: }; 6011: # 414 "/usr/include/boost/regex/v4/cpp_regex_traits.hpp" 3 4 6011: template 6011: class cpp_regex_traits_implementation : public cpp_regex_traits_char_layer 6011: { 6011: public: 6011: typedef typename cpp_regex_traits::char_class_type char_class_type; 6011: typedef typename std::ctype::mask native_mask_type; 6011: typedef typename boost::make_unsigned::type unsigned_native_mask_type; 6011: 6011: static const char_class_type mask_blank = 1u << 24; 6011: static const char_class_type mask_word = 1u << 25; 6011: static const char_class_type mask_unicode = 1u << 26; 6011: static const char_class_type mask_horizontal = 1u << 27; 6011: static const char_class_type mask_vertical = 1u << 28; 6011: 6011: 6011: typedef std::basic_string string_type; 6011: typedef charT char_type; 6011: 6011: cpp_regex_traits_implementation(const std::locale& l) 6011: : cpp_regex_traits_char_layer(l) 6011: { 6011: init(); 6011: } 6011: cpp_regex_traits_implementation(const cpp_regex_traits_base& l) 6011: : cpp_regex_traits_char_layer(l) 6011: { 6011: init(); 6011: } 6011: std::string error_string(regex_constants::error_type n) const 6011: { 6011: if(!m_error_strings.empty()) 6011: { 6011: std::map::const_iterator p = m_error_strings.find(n); 6011: return (p == m_error_strings.end()) ? std::string(get_default_error_string(n)) : p->second; 6011: } 6011: return get_default_error_string(n); 6011: } 6011: char_class_type lookup_classname(const charT* p1, const charT* p2) const 6011: { 6011: char_class_type result = lookup_classname_imp(p1, p2); 6011: if(result == 0) 6011: { 6011: string_type temp(p1, p2); 6011: this->m_pctype->tolower(&*temp.begin(), &*temp.begin() + temp.size()); 6011: result = lookup_classname_imp(&*temp.begin(), &*temp.begin() + temp.size()); 6011: } 6011: return result; 6011: } 6011: string_type lookup_collatename(const charT* p1, const charT* p2) const; 6011: string_type transform_primary(const charT* p1, const charT* p2) const; 6011: string_type transform(const charT* p1, const charT* p2) const; 6011: private: 6011: std::map m_error_strings; 6011: std::map m_custom_class_names; 6011: std::map m_custom_collate_names; 6011: unsigned m_collate_type; 6011: charT m_collate_delim; 6011: 6011: 6011: 6011: char_class_type lookup_classname_imp(const charT* p1, const charT* p2) const; 6011: void init(); 6011: 6011: 6011: 6011: 6011: }; 6011: 6011: 6011: 6011: 6011: template 6011: typename cpp_regex_traits_implementation::char_class_type const cpp_regex_traits_implementation::mask_blank; 6011: template 6011: typename cpp_regex_traits_implementation::char_class_type const cpp_regex_traits_implementation::mask_word; 6011: template 6011: typename cpp_regex_traits_implementation::char_class_type const cpp_regex_traits_implementation::mask_unicode; 6011: template 6011: typename cpp_regex_traits_implementation::char_class_type const cpp_regex_traits_implementation::mask_vertical; 6011: template 6011: typename cpp_regex_traits_implementation::char_class_type const cpp_regex_traits_implementation::mask_horizontal; 6011: 6011: 6011: 6011: 6011: template 6011: typename cpp_regex_traits_implementation::string_type 6011: cpp_regex_traits_implementation::transform_primary(const charT* p1, const charT* p2) const 6011: { 6011: # 511 "/usr/include/boost/regex/v4/cpp_regex_traits.hpp" 3 4 6011: (static_cast (*p2 == 0) ? void (0) : __assert_fail ("*p2 == 0", "/usr/include/boost/regex/v4/cpp_regex_traits.hpp", 511, __extension__ __PRETTY_FUNCTION__)); 6011: string_type result; 6011: # 530 "/usr/include/boost/regex/v4/cpp_regex_traits.hpp" 3 4 6011: try{ 6011: 6011: 6011: 6011: 6011: 6011: switch(m_collate_type) 6011: { 6011: case sort_C: 6011: case sort_unknown: 6011: 6011: { 6011: result.assign(p1, p2); 6011: this->m_pctype->tolower(&*result.begin(), &*result.begin() + result.size()); 6011: result = this->m_pcollate->transform(&*result.begin(), &*result.begin() + result.size()); 6011: break; 6011: } 6011: case sort_fixed: 6011: { 6011: 6011: result.assign(this->m_pcollate->transform(p1, p2)); 6011: result.erase(this->m_collate_delim); 6011: break; 6011: } 6011: case sort_delim: 6011: 6011: result.assign(this->m_pcollate->transform(p1, p2)); 6011: std::size_t i; 6011: for(i = 0; i < result.size(); ++i) 6011: { 6011: if(result[i] == m_collate_delim) 6011: break; 6011: } 6011: result.erase(i); 6011: break; 6011: } 6011: 6011: }catch(...){} 6011: 6011: while(result.size() && (charT(0) == *result.rbegin())) 6011: result.erase(result.size() - 1); 6011: if(result.empty()) 6011: { 6011: 6011: result = string_type(1, charT(0)); 6011: } 6011: return result; 6011: } 6011: 6011: template 6011: typename cpp_regex_traits_implementation::string_type 6011: cpp_regex_traits_implementation::transform(const charT* p1, const charT* p2) const 6011: { 6011: # 591 "/usr/include/boost/regex/v4/cpp_regex_traits.hpp" 3 4 6011: (static_cast (*p2 == 0) ? void (0) : __assert_fail ("*p2 == 0", "/usr/include/boost/regex/v4/cpp_regex_traits.hpp", 591, __extension__ __PRETTY_FUNCTION__)); 6011: 6011: 6011: 6011: 6011: 6011: string_type result, result2; 6011: # 610 "/usr/include/boost/regex/v4/cpp_regex_traits.hpp" 3 4 6011: try{ 6011: 6011: result = this->m_pcollate->transform(p1, p2); 6011: # 624 "/usr/include/boost/regex/v4/cpp_regex_traits.hpp" 3 4 6011: while(result.size() && (charT(0) == *result.rbegin())) 6011: result.erase(result.size() - 1); 6011: # 636 "/usr/include/boost/regex/v4/cpp_regex_traits.hpp" 3 4 6011: typedef typename make_unsigned::type uchar_type; 6011: result2.reserve(result.size() * 2 + 2); 6011: for(unsigned i = 0; i < result.size(); ++i) 6011: { 6011: if(static_cast(result[i]) == (std::numeric_limits::max)()) 6011: { 6011: result2.append(1, charT((std::numeric_limits::max)())).append(1, charT('b')); 6011: } 6011: else 6011: { 6011: result2.append(1, static_cast(1 + static_cast(result[i]))).append(1, charT('b') - 1); 6011: } 6011: } 6011: (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__)); 6011: 6011: } 6011: catch(...) 6011: { 6011: } 6011: 6011: return result2; 6011: } 6011: 6011: 6011: template 6011: typename cpp_regex_traits_implementation::string_type 6011: cpp_regex_traits_implementation::lookup_collatename(const charT* p1, const charT* p2) const 6011: { 6011: typedef typename std::map::const_iterator iter_type; 6011: if(m_custom_collate_names.size()) 6011: { 6011: iter_type pos = m_custom_collate_names.find(string_type(p1, p2)); 6011: if(pos != m_custom_collate_names.end()) 6011: return pos->second; 6011: } 6011: 6011: 6011: std::string name(p1, p2); 6011: 6011: 6011: 6011: 6011: 6011: 6011: name = lookup_default_collate_name(name); 6011: 6011: 6011: if(name.size()) 6011: return string_type(name.begin(), name.end()); 6011: # 697 "/usr/include/boost/regex/v4/cpp_regex_traits.hpp" 3 4 6011: if(p2 - p1 == 1) 6011: return string_type(1, *p1); 6011: return string_type(); 6011: } 6011: 6011: template 6011: void cpp_regex_traits_implementation::init() 6011: { 6011: 6011: 6011: typename std::messages::catalog cat = static_cast::catalog>(-1); 6011: 6011: 6011: 6011: std::string cat_name(cpp_regex_traits::get_catalog_name()); 6011: if(cat_name.size() && (this->m_pmessages != 0)) 6011: { 6011: cat = this->m_pmessages->open( 6011: cat_name, 6011: this->m_locale); 6011: if((int)cat < 0) 6011: { 6011: std::string m("Unable to open message catalog: "); 6011: std::runtime_error err(m + cat_name); 6011: boost::re_detail_106501::raise_runtime_error(err); 6011: } 6011: } 6011: 6011: 6011: 6011: if((int)cat >= 0) 6011: { 6011: 6011: 6011: 6011: for(boost::regex_constants::error_type i = static_cast(0); 6011: i <= boost::regex_constants::error_unknown; 6011: i = static_cast(i + 1)) 6011: { 6011: const char* p = get_default_error_string(i); 6011: string_type default_message; 6011: while(*p) 6011: { 6011: default_message.append(1, this->m_pctype->widen(*p)); 6011: ++p; 6011: } 6011: string_type s = this->m_pmessages->get(cat, 0, i+200, default_message); 6011: std::string result; 6011: for(std::string::size_type j = 0; j < s.size(); ++j) 6011: { 6011: result.append(1, this->m_pctype->narrow(s[j], 0)); 6011: } 6011: m_error_strings[i] = result; 6011: } 6011: 6011: 6011: 6011: 6011: static const char_class_type masks[16] = 6011: { 6011: static_cast(std::ctype::alnum), 6011: static_cast(std::ctype::alpha), 6011: static_cast(std::ctype::cntrl), 6011: static_cast(std::ctype::digit), 6011: static_cast(std::ctype::graph), 6011: cpp_regex_traits_implementation::mask_horizontal, 6011: static_cast(std::ctype::lower), 6011: static_cast(std::ctype::print), 6011: static_cast(std::ctype::punct), 6011: static_cast(std::ctype::space), 6011: static_cast(std::ctype::upper), 6011: cpp_regex_traits_implementation::mask_vertical, 6011: static_cast(std::ctype::xdigit), 6011: cpp_regex_traits_implementation::mask_blank, 6011: cpp_regex_traits_implementation::mask_word, 6011: cpp_regex_traits_implementation::mask_unicode, 6011: }; 6011: # 795 "/usr/include/boost/regex/v4/cpp_regex_traits.hpp" 3 4 6011: static const string_type null_string; 6011: for(unsigned int j = 0; j <= 13; ++j) 6011: { 6011: string_type s(this->m_pmessages->get(cat, 0, j+300, null_string)); 6011: if(s.size()) 6011: this->m_custom_class_names[s] = masks[j]; 6011: } 6011: } 6011: 6011: 6011: 6011: 6011: m_collate_type = re_detail_106501::find_sort_syntax(this, &m_collate_delim); 6011: } 6011: 6011: template 6011: typename cpp_regex_traits_implementation::char_class_type 6011: cpp_regex_traits_implementation::lookup_classname_imp(const charT* p1, const charT* p2) const 6011: { 6011: 6011: static const char_class_type masks[22] = 6011: { 6011: 0, 6011: static_cast(std::ctype::alnum), 6011: static_cast(std::ctype::alpha), 6011: cpp_regex_traits_implementation::mask_blank, 6011: static_cast(std::ctype::cntrl), 6011: static_cast(std::ctype::digit), 6011: static_cast(std::ctype::digit), 6011: static_cast(std::ctype::graph), 6011: cpp_regex_traits_implementation::mask_horizontal, 6011: static_cast(std::ctype::lower), 6011: static_cast(std::ctype::lower), 6011: static_cast(std::ctype::print), 6011: static_cast(std::ctype::punct), 6011: static_cast(std::ctype::space), 6011: static_cast(std::ctype::space), 6011: static_cast(std::ctype::upper), 6011: cpp_regex_traits_implementation::mask_unicode, 6011: static_cast(std::ctype::upper), 6011: cpp_regex_traits_implementation::mask_vertical, 6011: static_cast(std::ctype::alnum) | cpp_regex_traits_implementation::mask_word, 6011: static_cast(std::ctype::alnum) | cpp_regex_traits_implementation::mask_word, 6011: static_cast(std::ctype::xdigit), 6011: }; 6011: # 867 "/usr/include/boost/regex/v4/cpp_regex_traits.hpp" 3 4 6011: if(m_custom_class_names.size()) 6011: { 6011: typedef typename std::map, char_class_type>::const_iterator map_iter; 6011: map_iter pos = m_custom_class_names.find(string_type(p1, p2)); 6011: if(pos != m_custom_class_names.end()) 6011: return pos->second; 6011: } 6011: std::size_t state_id = 1 + re_detail_106501::get_default_class_id(p1, p2); 6011: (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__)); 6011: return masks[state_id]; 6011: } 6011: # 902 "/usr/include/boost/regex/v4/cpp_regex_traits.hpp" 3 4 6011: template 6011: inline boost::shared_ptr > create_cpp_regex_traits(const std::locale& l) 6011: { 6011: cpp_regex_traits_base key(l); 6011: return ::boost::object_cache, cpp_regex_traits_implementation >::get(key, 5); 6011: } 6011: 6011: } 6011: 6011: template 6011: class cpp_regex_traits 6011: { 6011: private: 6011: typedef std::ctype ctype_type; 6011: public: 6011: typedef charT char_type; 6011: typedef std::size_t size_type; 6011: typedef std::basic_string string_type; 6011: typedef std::locale locale_type; 6011: typedef boost::uint_least32_t char_class_type; 6011: 6011: struct boost_extensions_tag{}; 6011: 6011: cpp_regex_traits() 6011: : m_pimpl(re_detail_106501::create_cpp_regex_traits(std::locale())) 6011: { } 6011: static size_type length(const char_type* p) 6011: { 6011: return std::char_traits::length(p); 6011: } 6011: regex_constants::syntax_type syntax_type(charT c)const 6011: { 6011: return m_pimpl->syntax_type(c); 6011: } 6011: regex_constants::escape_syntax_type escape_syntax_type(charT c) const 6011: { 6011: return m_pimpl->escape_syntax_type(c); 6011: } 6011: charT translate(charT c) const 6011: { 6011: return c; 6011: } 6011: charT translate_nocase(charT c) const 6011: { 6011: return m_pimpl->m_pctype->tolower(c); 6011: } 6011: charT translate(charT c, bool icase) const 6011: { 6011: return icase ? m_pimpl->m_pctype->tolower(c) : c; 6011: } 6011: charT tolower(charT c) const 6011: { 6011: return m_pimpl->m_pctype->tolower(c); 6011: } 6011: charT toupper(charT c) const 6011: { 6011: return m_pimpl->m_pctype->toupper(c); 6011: } 6011: string_type transform(const charT* p1, const charT* p2) const 6011: { 6011: return m_pimpl->transform(p1, p2); 6011: } 6011: string_type transform_primary(const charT* p1, const charT* p2) const 6011: { 6011: return m_pimpl->transform_primary(p1, p2); 6011: } 6011: char_class_type lookup_classname(const charT* p1, const charT* p2) const 6011: { 6011: return m_pimpl->lookup_classname(p1, p2); 6011: } 6011: string_type lookup_collatename(const charT* p1, const charT* p2) const 6011: { 6011: return m_pimpl->lookup_collatename(p1, p2); 6011: } 6011: bool isctype(charT c, char_class_type f) const 6011: { 6011: 6011: typedef typename std::ctype::mask ctype_mask; 6011: 6011: static const ctype_mask mask_base = 6011: static_cast( 6011: std::ctype::alnum 6011: | std::ctype::alpha 6011: | std::ctype::cntrl 6011: | std::ctype::digit 6011: | std::ctype::graph 6011: | std::ctype::lower 6011: | std::ctype::print 6011: | std::ctype::punct 6011: | std::ctype::space 6011: | std::ctype::upper 6011: | std::ctype::xdigit); 6011: 6011: if((f & mask_base) 6011: && (m_pimpl->m_pctype->is( 6011: static_cast(f & mask_base), c))) 6011: return true; 6011: else if((f & re_detail_106501::cpp_regex_traits_implementation::mask_unicode) && re_detail_106501::is_extended(c)) 6011: return true; 6011: else if((f & re_detail_106501::cpp_regex_traits_implementation::mask_word) && (c == '_')) 6011: return true; 6011: else if((f & re_detail_106501::cpp_regex_traits_implementation::mask_blank) 6011: && m_pimpl->m_pctype->is(std::ctype::space, c) 6011: && !re_detail_106501::is_separator(c)) 6011: return true; 6011: else if((f & re_detail_106501::cpp_regex_traits_implementation::mask_vertical) 6011: && (::boost::re_detail_106501::is_separator(c) || (c == '\v'))) 6011: return true; 6011: else if((f & re_detail_106501::cpp_regex_traits_implementation::mask_horizontal) 6011: && this->isctype(c, std::ctype::space) && !this->isctype(c, re_detail_106501::cpp_regex_traits_implementation::mask_vertical)) 6011: return true; 6011: # 1025 "/usr/include/boost/regex/v4/cpp_regex_traits.hpp" 3 4 6011: return false; 6011: 6011: 6011: 6011: } 6011: boost::intmax_t toi(const charT*& p1, const charT* p2, int radix)const; 6011: int value(charT c, int radix)const 6011: { 6011: const charT* pc = &c; 6011: return (int)toi(pc, pc + 1, radix); 6011: } 6011: locale_type imbue(locale_type l) 6011: { 6011: std::locale result(getloc()); 6011: m_pimpl = re_detail_106501::create_cpp_regex_traits(l); 6011: return result; 6011: } 6011: locale_type getloc()const 6011: { 6011: return m_pimpl->m_locale; 6011: } 6011: std::string error_string(regex_constants::error_type n) const 6011: { 6011: return m_pimpl->error_string(n); 6011: } 6011: 6011: 6011: 6011: 6011: 6011: static std::string catalog_name(const std::string& name); 6011: static std::string get_catalog_name(); 6011: 6011: private: 6011: boost::shared_ptr > m_pimpl; 6011: 6011: 6011: 6011: static std::string& get_catalog_name_inst(); 6011: 6011: 6011: static static_mutex& get_mutex_inst(); 6011: 6011: }; 6011: 6011: 6011: template 6011: boost::intmax_t cpp_regex_traits::toi(const charT*& first, const charT* last, int radix)const 6011: { 6011: re_detail_106501::parser_buf sbuf; 6011: std::basic_istream is(&sbuf); 6011: 6011: 6011: last = std::find(first, last, std::use_facet< std::numpunct >(is.getloc()).thousands_sep()); 6011: 6011: sbuf.pubsetbuf(const_cast(static_cast(first)), static_cast(last-first)); 6011: is.clear(); 6011: if(std::abs(radix) == 16) is >> std::hex; 6011: else if(std::abs(radix) == 8) is >> std::oct; 6011: else is >> std::dec; 6011: boost::intmax_t val; 6011: if(is >> val) 6011: { 6011: first = first + ((last - first) - sbuf.in_avail()); 6011: return val; 6011: } 6011: else 6011: return -1; 6011: } 6011: 6011: template 6011: std::string cpp_regex_traits::catalog_name(const std::string& name) 6011: { 6011: 6011: static_mutex::scoped_lock lk(get_mutex_inst()); 6011: 6011: std::string result(get_catalog_name_inst()); 6011: get_catalog_name_inst() = name; 6011: return result; 6011: } 6011: 6011: template 6011: std::string& cpp_regex_traits::get_catalog_name_inst() 6011: { 6011: static std::string s_name; 6011: return s_name; 6011: } 6011: 6011: template 6011: std::string cpp_regex_traits::get_catalog_name() 6011: { 6011: 6011: static_mutex::scoped_lock lk(get_mutex_inst()); 6011: 6011: std::string result(get_catalog_name_inst()); 6011: return result; 6011: } 6011: 6011: 6011: template 6011: static_mutex& cpp_regex_traits::get_mutex_inst() 6011: { 6011: static static_mutex s_mutex = { { { 0, 0, 0, 0, 0, { 0 } } }, }; 6011: return s_mutex; 6011: } 6011: 6011: 6011: 6011: } 6011: # 40 "/usr/include/boost/regex/v4/regex_traits.hpp" 2 3 4 6011: 6011: 6011: 6011: 6011: # 1 "/usr/include/boost/regex/v4/c_regex_traits.hpp" 1 3 4 6011: # 29 "/usr/include/boost/regex/v4/c_regex_traits.hpp" 3 4 6011: # 1 "/usr/include/c++/8/cctype" 1 3 4 6011: # 39 "/usr/include/c++/8/cctype" 3 4 6011: 6011: # 40 "/usr/include/c++/8/cctype" 3 6011: # 30 "/usr/include/boost/regex/v4/c_regex_traits.hpp" 2 3 4 6011: # 48 "/usr/include/boost/regex/v4/c_regex_traits.hpp" 3 4 6011: namespace boost{ 6011: 6011: template 6011: struct c_regex_traits; 6011: 6011: template<> 6011: struct c_regex_traits 6011: { 6011: c_regex_traits(){} 6011: typedef char char_type; 6011: typedef std::size_t size_type; 6011: typedef std::string string_type; 6011: struct locale_type{}; 6011: typedef boost::uint32_t char_class_type; 6011: 6011: static size_type length(const char_type* p) 6011: { 6011: return (std::strlen)(p); 6011: } 6011: 6011: char translate(char c) const 6011: { 6011: return c; 6011: } 6011: char translate_nocase(char c) const 6011: { 6011: return static_cast((std::tolower)(static_cast(c))); 6011: } 6011: 6011: static string_type transform(const char* p1, const char* p2); 6011: static string_type transform_primary(const char* p1, const char* p2); 6011: 6011: static char_class_type lookup_classname(const char* p1, const char* p2); 6011: static string_type lookup_collatename(const char* p1, const char* p2); 6011: 6011: static bool isctype(char, char_class_type); 6011: static int value(char, int); 6011: 6011: locale_type imbue(locale_type l) 6011: { return l; } 6011: locale_type getloc()const 6011: { return locale_type(); } 6011: 6011: private: 6011: 6011: c_regex_traits(const c_regex_traits&); 6011: c_regex_traits& operator=(const c_regex_traits&); 6011: }; 6011: 6011: 6011: template<> 6011: struct c_regex_traits 6011: { 6011: c_regex_traits(){} 6011: typedef wchar_t char_type; 6011: typedef std::size_t size_type; 6011: typedef std::wstring string_type; 6011: struct locale_type{}; 6011: typedef boost::uint32_t char_class_type; 6011: 6011: static size_type length(const char_type* p) 6011: { 6011: return (std::wcslen)(p); 6011: } 6011: 6011: wchar_t translate(wchar_t c) const 6011: { 6011: return c; 6011: } 6011: wchar_t translate_nocase(wchar_t c) const 6011: { 6011: return (std::towlower)(c); 6011: } 6011: 6011: static string_type transform(const wchar_t* p1, const wchar_t* p2); 6011: static string_type transform_primary(const wchar_t* p1, const wchar_t* p2); 6011: 6011: static char_class_type lookup_classname(const wchar_t* p1, const wchar_t* p2); 6011: static string_type lookup_collatename(const wchar_t* p1, const wchar_t* p2); 6011: 6011: static bool isctype(wchar_t, char_class_type); 6011: static int value(wchar_t, int); 6011: 6011: locale_type imbue(locale_type l) 6011: { return l; } 6011: locale_type getloc()const 6011: { return locale_type(); } 6011: 6011: private: 6011: 6011: c_regex_traits(const c_regex_traits&); 6011: c_regex_traits& operator=(const c_regex_traits&); 6011: }; 6011: # 195 "/usr/include/boost/regex/v4/c_regex_traits.hpp" 3 4 6011: } 6011: # 45 "/usr/include/boost/regex/v4/regex_traits.hpp" 2 3 4 6011: # 56 "/usr/include/boost/regex/v4/regex_traits.hpp" 3 4 6011: # 1 "/usr/include/boost/mpl/has_xxx.hpp" 1 3 4 6011: # 19 "/usr/include/boost/mpl/has_xxx.hpp" 3 4 6011: # 1 "/usr/include/boost/mpl/bool.hpp" 1 3 4 6011: # 18 "/usr/include/boost/mpl/bool.hpp" 3 4 6011: # 1 "/usr/include/boost/mpl/integral_c_tag.hpp" 1 3 4 6011: # 19 "/usr/include/boost/mpl/integral_c_tag.hpp" 3 4 6011: # 1 "/usr/include/boost/mpl/aux_/config/static_constant.hpp" 1 3 4 6011: # 20 "/usr/include/boost/mpl/integral_c_tag.hpp" 2 3 4 6011: 6011: namespace mpl_ { 6011: struct integral_c_tag { static const int value = 0; }; 6011: } 6011: namespace boost { namespace mpl { using ::mpl_::integral_c_tag; } } 6011: # 19 "/usr/include/boost/mpl/bool.hpp" 2 3 4 6011: 6011: 6011: namespace mpl_ { 6011: 6011: template< bool C_ > struct bool_ 6011: { 6011: static const bool value = C_; 6011: typedef integral_c_tag tag; 6011: typedef bool_ type; 6011: typedef bool value_type; 6011: constexpr operator bool() const { return this->value; } 6011: }; 6011: 6011: 6011: template< bool C_ > 6011: bool const bool_::value; 6011: 6011: 6011: } 6011: # 20 "/usr/include/boost/mpl/has_xxx.hpp" 2 3 4 6011: # 1 "/usr/include/boost/mpl/aux_/na_spec.hpp" 1 3 4 6011: # 18 "/usr/include/boost/mpl/aux_/na_spec.hpp" 3 4 6011: # 1 "/usr/include/boost/mpl/lambda_fwd.hpp" 1 3 4 6011: # 17 "/usr/include/boost/mpl/lambda_fwd.hpp" 3 4 6011: # 1 "/usr/include/boost/mpl/void_fwd.hpp" 1 3 4 6011: # 19 "/usr/include/boost/mpl/void_fwd.hpp" 3 4 6011: namespace mpl_ { 6011: 6011: struct void_; 6011: 6011: } 6011: namespace boost { namespace mpl { using ::mpl_::void_; } } 6011: # 18 "/usr/include/boost/mpl/lambda_fwd.hpp" 2 3 4 6011: # 1 "/usr/include/boost/mpl/aux_/na.hpp" 1 3 4 6011: # 18 "/usr/include/boost/mpl/aux_/na.hpp" 3 4 6011: # 1 "/usr/include/boost/mpl/aux_/na_fwd.hpp" 1 3 4 6011: # 19 "/usr/include/boost/mpl/aux_/na_fwd.hpp" 3 4 6011: namespace mpl_ { 6011: 6011: 6011: struct na 6011: { 6011: typedef na type; 6011: enum { value = 0 }; 6011: }; 6011: 6011: } 6011: namespace boost { namespace mpl { using ::mpl_::na; } } 6011: # 19 "/usr/include/boost/mpl/aux_/na.hpp" 2 3 4 6011: 6011: # 1 "/usr/include/boost/mpl/aux_/config/ctps.hpp" 1 3 4 6011: # 21 "/usr/include/boost/mpl/aux_/na.hpp" 2 3 4 6011: 6011: namespace boost { namespace mpl { 6011: 6011: template< typename T > 6011: struct is_na 6011: : false_ 6011: { 6011: 6011: 6011: 6011: }; 6011: 6011: template<> 6011: struct is_na 6011: : true_ 6011: { 6011: 6011: 6011: 6011: }; 6011: 6011: template< typename T > 6011: struct is_not_na 6011: : true_ 6011: { 6011: 6011: 6011: 6011: }; 6011: 6011: template<> 6011: struct is_not_na 6011: : false_ 6011: { 6011: 6011: 6011: 6011: }; 6011: 6011: 6011: template< typename T, typename U > struct if_na 6011: { 6011: typedef T type; 6011: }; 6011: 6011: template< typename U > struct if_na 6011: { 6011: typedef U type; 6011: }; 6011: # 93 "/usr/include/boost/mpl/aux_/na.hpp" 3 4 6011: }} 6011: # 19 "/usr/include/boost/mpl/lambda_fwd.hpp" 2 3 4 6011: # 1 "/usr/include/boost/mpl/aux_/config/lambda.hpp" 1 3 4 6011: # 17 "/usr/include/boost/mpl/aux_/config/lambda.hpp" 3 4 6011: # 1 "/usr/include/boost/mpl/aux_/config/ttp.hpp" 1 3 4 6011: # 18 "/usr/include/boost/mpl/aux_/config/lambda.hpp" 2 3 4 6011: # 20 "/usr/include/boost/mpl/lambda_fwd.hpp" 2 3 4 6011: 6011: 6011: 6011: # 1 "/usr/include/boost/mpl/int.hpp" 1 3 4 6011: # 17 "/usr/include/boost/mpl/int.hpp" 3 4 6011: # 1 "/usr/include/boost/mpl/int_fwd.hpp" 1 3 4 6011: # 18 "/usr/include/boost/mpl/int_fwd.hpp" 3 4 6011: # 1 "/usr/include/boost/mpl/aux_/nttp_decl.hpp" 1 3 4 6011: # 17 "/usr/include/boost/mpl/aux_/nttp_decl.hpp" 3 4 6011: # 1 "/usr/include/boost/mpl/aux_/config/nttp.hpp" 1 3 4 6011: # 18 "/usr/include/boost/mpl/aux_/nttp_decl.hpp" 2 3 4 6011: # 19 "/usr/include/boost/mpl/int_fwd.hpp" 2 3 4 6011: 6011: namespace mpl_ { 6011: 6011: template< int N > struct int_; 6011: 6011: } 6011: namespace boost { namespace mpl { using ::mpl_::int_; } } 6011: # 18 "/usr/include/boost/mpl/int.hpp" 2 3 4 6011: 6011: 6011: # 1 "/usr/include/boost/mpl/aux_/integral_wrapper.hpp" 1 3 4 6011: # 17 "/usr/include/boost/mpl/aux_/integral_wrapper.hpp" 3 4 6011: # 1 "/usr/include/boost/mpl/aux_/static_cast.hpp" 1 3 4 6011: # 18 "/usr/include/boost/mpl/aux_/integral_wrapper.hpp" 2 3 4 6011: 6011: 6011: 6011: 6011: # 1 "/usr/include/boost/preprocessor/cat.hpp" 1 3 4 6011: # 17 "/usr/include/boost/preprocessor/cat.hpp" 3 4 6011: # 1 "/usr/include/boost/preprocessor/config/config.hpp" 1 3 4 6011: # 18 "/usr/include/boost/preprocessor/cat.hpp" 2 3 4 6011: # 23 "/usr/include/boost/mpl/aux_/integral_wrapper.hpp" 2 3 4 6011: # 40 "/usr/include/boost/mpl/aux_/integral_wrapper.hpp" 3 4 6011: namespace mpl_ { 6011: 6011: template< int N > 6011: struct int_ 6011: { 6011: static const int value = N; 6011: 6011: 6011: 6011: 6011: 6011: typedef int_ type; 6011: 6011: typedef int value_type; 6011: typedef integral_c_tag tag; 6011: # 72 "/usr/include/boost/mpl/aux_/integral_wrapper.hpp" 3 4 6011: typedef mpl_::int_< static_cast((value + 1)) > next; 6011: typedef mpl_::int_< static_cast((value - 1)) > prior; 6011: 6011: 6011: 6011: 6011: 6011: 6011: constexpr operator int() const { return static_cast(this->value); } 6011: }; 6011: 6011: 6011: template< int N > 6011: int const mpl_::int_< N >::value; 6011: 6011: 6011: } 6011: # 21 "/usr/include/boost/mpl/int.hpp" 2 3 4 6011: # 24 "/usr/include/boost/mpl/lambda_fwd.hpp" 2 3 4 6011: # 1 "/usr/include/boost/mpl/aux_/lambda_arity_param.hpp" 1 3 4 6011: # 25 "/usr/include/boost/mpl/lambda_fwd.hpp" 2 3 4 6011: # 1 "/usr/include/boost/mpl/aux_/template_arity_fwd.hpp" 1 3 4 6011: # 17 "/usr/include/boost/mpl/aux_/template_arity_fwd.hpp" 3 4 6011: namespace boost { namespace mpl { namespace aux { 6011: 6011: template< typename F > struct template_arity; 6011: 6011: }}} 6011: # 26 "/usr/include/boost/mpl/lambda_fwd.hpp" 2 3 4 6011: 6011: namespace boost { namespace mpl { 6011: 6011: template< 6011: typename T = na 6011: , typename Tag = void_ 6011: , typename Arity = int_< aux::template_arity::value > 6011: 6011: 6011: > 6011: struct lambda; 6011: 6011: }} 6011: # 19 "/usr/include/boost/mpl/aux_/na_spec.hpp" 2 3 4 6011: 6011: 6011: 6011: # 1 "/usr/include/boost/mpl/aux_/arity.hpp" 1 3 4 6011: # 17 "/usr/include/boost/mpl/aux_/arity.hpp" 3 4 6011: # 1 "/usr/include/boost/mpl/aux_/config/dtp.hpp" 1 3 4 6011: # 18 "/usr/include/boost/mpl/aux_/arity.hpp" 2 3 4 6011: # 23 "/usr/include/boost/mpl/aux_/na_spec.hpp" 2 3 4 6011: 6011: 6011: 6011: # 1 "/usr/include/boost/mpl/aux_/preprocessor/params.hpp" 1 3 4 6011: # 17 "/usr/include/boost/mpl/aux_/preprocessor/params.hpp" 3 4 6011: # 1 "/usr/include/boost/mpl/aux_/config/preprocessor.hpp" 1 3 4 6011: # 18 "/usr/include/boost/mpl/aux_/preprocessor/params.hpp" 2 3 4 6011: # 45 "/usr/include/boost/mpl/aux_/preprocessor/params.hpp" 3 4 6011: # 1 "/usr/include/boost/preprocessor/comma_if.hpp" 1 3 4 6011: # 15 "/usr/include/boost/preprocessor/comma_if.hpp" 3 4 6011: # 1 "/usr/include/boost/preprocessor/punctuation/comma_if.hpp" 1 3 4 6011: # 18 "/usr/include/boost/preprocessor/punctuation/comma_if.hpp" 3 4 6011: # 1 "/usr/include/boost/preprocessor/control/if.hpp" 1 3 4 6011: # 18 "/usr/include/boost/preprocessor/control/if.hpp" 3 4 6011: # 1 "/usr/include/boost/preprocessor/control/iif.hpp" 1 3 4 6011: # 19 "/usr/include/boost/preprocessor/control/if.hpp" 2 3 4 6011: # 1 "/usr/include/boost/preprocessor/logical/bool.hpp" 1 3 4 6011: # 20 "/usr/include/boost/preprocessor/control/if.hpp" 2 3 4 6011: # 19 "/usr/include/boost/preprocessor/punctuation/comma_if.hpp" 2 3 4 6011: # 1 "/usr/include/boost/preprocessor/facilities/empty.hpp" 1 3 4 6011: # 20 "/usr/include/boost/preprocessor/punctuation/comma_if.hpp" 2 3 4 6011: # 1 "/usr/include/boost/preprocessor/punctuation/comma.hpp" 1 3 4 6011: # 21 "/usr/include/boost/preprocessor/punctuation/comma_if.hpp" 2 3 4 6011: # 16 "/usr/include/boost/preprocessor/comma_if.hpp" 2 3 4 6011: # 46 "/usr/include/boost/mpl/aux_/preprocessor/params.hpp" 2 3 4 6011: # 1 "/usr/include/boost/preprocessor/repeat.hpp" 1 3 4 6011: # 15 "/usr/include/boost/preprocessor/repeat.hpp" 3 4 6011: # 1 "/usr/include/boost/preprocessor/repetition/repeat.hpp" 1 3 4 6011: # 19 "/usr/include/boost/preprocessor/repetition/repeat.hpp" 3 4 6011: # 1 "/usr/include/boost/preprocessor/debug/error.hpp" 1 3 4 6011: # 20 "/usr/include/boost/preprocessor/repetition/repeat.hpp" 2 3 4 6011: # 1 "/usr/include/boost/preprocessor/detail/auto_rec.hpp" 1 3 4 6011: # 21 "/usr/include/boost/preprocessor/repetition/repeat.hpp" 2 3 4 6011: # 1 "/usr/include/boost/preprocessor/tuple/eat.hpp" 1 3 4 6011: # 22 "/usr/include/boost/preprocessor/repetition/repeat.hpp" 2 3 4 6011: # 16 "/usr/include/boost/preprocessor/repeat.hpp" 2 3 4 6011: # 47 "/usr/include/boost/mpl/aux_/preprocessor/params.hpp" 2 3 4 6011: # 1 "/usr/include/boost/preprocessor/inc.hpp" 1 3 4 6011: # 15 "/usr/include/boost/preprocessor/inc.hpp" 3 4 6011: # 1 "/usr/include/boost/preprocessor/arithmetic/inc.hpp" 1 3 4 6011: # 16 "/usr/include/boost/preprocessor/inc.hpp" 2 3 4 6011: # 48 "/usr/include/boost/mpl/aux_/preprocessor/params.hpp" 2 3 4 6011: # 27 "/usr/include/boost/mpl/aux_/na_spec.hpp" 2 3 4 6011: # 1 "/usr/include/boost/mpl/aux_/preprocessor/enum.hpp" 1 3 4 6011: # 28 "/usr/include/boost/mpl/aux_/na_spec.hpp" 2 3 4 6011: # 1 "/usr/include/boost/mpl/aux_/preprocessor/def_params_tail.hpp" 1 3 4 6011: # 17 "/usr/include/boost/mpl/aux_/preprocessor/def_params_tail.hpp" 3 4 6011: # 1 "/usr/include/boost/mpl/limits/arity.hpp" 1 3 4 6011: # 18 "/usr/include/boost/mpl/aux_/preprocessor/def_params_tail.hpp" 2 3 4 6011: 6011: 6011: 6011: 6011: # 1 "/usr/include/boost/preprocessor/logical/and.hpp" 1 3 4 6011: # 19 "/usr/include/boost/preprocessor/logical/and.hpp" 3 4 6011: # 1 "/usr/include/boost/preprocessor/logical/bitand.hpp" 1 3 4 6011: # 20 "/usr/include/boost/preprocessor/logical/and.hpp" 2 3 4 6011: # 23 "/usr/include/boost/mpl/aux_/preprocessor/def_params_tail.hpp" 2 3 4 6011: # 1 "/usr/include/boost/preprocessor/identity.hpp" 1 3 4 6011: # 15 "/usr/include/boost/preprocessor/identity.hpp" 3 4 6011: # 1 "/usr/include/boost/preprocessor/facilities/identity.hpp" 1 3 4 6011: # 16 "/usr/include/boost/preprocessor/identity.hpp" 2 3 4 6011: # 24 "/usr/include/boost/mpl/aux_/preprocessor/def_params_tail.hpp" 2 3 4 6011: # 1 "/usr/include/boost/preprocessor/empty.hpp" 1 3 4 6011: # 25 "/usr/include/boost/mpl/aux_/preprocessor/def_params_tail.hpp" 2 3 4 6011: # 66 "/usr/include/boost/mpl/aux_/preprocessor/def_params_tail.hpp" 3 4 6011: # 1 "/usr/include/boost/preprocessor/arithmetic/add.hpp" 1 3 4 6011: # 17 "/usr/include/boost/preprocessor/arithmetic/add.hpp" 3 4 6011: # 1 "/usr/include/boost/preprocessor/arithmetic/dec.hpp" 1 3 4 6011: # 18 "/usr/include/boost/preprocessor/arithmetic/add.hpp" 2 3 4 6011: 6011: 6011: # 1 "/usr/include/boost/preprocessor/control/while.hpp" 1 3 4 6011: # 20 "/usr/include/boost/preprocessor/control/while.hpp" 3 4 6011: # 1 "/usr/include/boost/preprocessor/detail/auto_rec.hpp" 1 3 4 6011: # 21 "/usr/include/boost/preprocessor/control/while.hpp" 2 3 4 6011: # 1 "/usr/include/boost/preprocessor/list/fold_left.hpp" 1 3 4 6011: # 18 "/usr/include/boost/preprocessor/list/fold_left.hpp" 3 4 6011: # 1 "/usr/include/boost/preprocessor/control/while.hpp" 1 3 4 6011: # 19 "/usr/include/boost/preprocessor/list/fold_left.hpp" 2 3 4 6011: 6011: # 1 "/usr/include/boost/preprocessor/detail/auto_rec.hpp" 1 3 4 6011: # 21 "/usr/include/boost/preprocessor/list/fold_left.hpp" 2 3 4 6011: # 41 "/usr/include/boost/preprocessor/list/fold_left.hpp" 3 4 6011: # 1 "/usr/include/boost/preprocessor/list/detail/fold_left.hpp" 1 3 4 6011: # 17 "/usr/include/boost/preprocessor/list/detail/fold_left.hpp" 3 4 6011: # 1 "/usr/include/boost/preprocessor/control/expr_iif.hpp" 1 3 4 6011: # 18 "/usr/include/boost/preprocessor/list/detail/fold_left.hpp" 2 3 4 6011: 6011: # 1 "/usr/include/boost/preprocessor/list/adt.hpp" 1 3 4 6011: # 18 "/usr/include/boost/preprocessor/list/adt.hpp" 3 4 6011: # 1 "/usr/include/boost/preprocessor/detail/is_binary.hpp" 1 3 4 6011: # 16 "/usr/include/boost/preprocessor/detail/is_binary.hpp" 3 4 6011: # 1 "/usr/include/boost/preprocessor/detail/check.hpp" 1 3 4 6011: # 17 "/usr/include/boost/preprocessor/detail/is_binary.hpp" 2 3 4 6011: # 19 "/usr/include/boost/preprocessor/list/adt.hpp" 2 3 4 6011: # 1 "/usr/include/boost/preprocessor/logical/compl.hpp" 1 3 4 6011: # 20 "/usr/include/boost/preprocessor/list/adt.hpp" 2 3 4 6011: # 20 "/usr/include/boost/preprocessor/list/detail/fold_left.hpp" 2 3 4 6011: # 42 "/usr/include/boost/preprocessor/list/fold_left.hpp" 2 3 4 6011: # 22 "/usr/include/boost/preprocessor/control/while.hpp" 2 3 4 6011: # 1 "/usr/include/boost/preprocessor/list/fold_right.hpp" 1 3 4 6011: # 20 "/usr/include/boost/preprocessor/list/fold_right.hpp" 3 4 6011: # 1 "/usr/include/boost/preprocessor/detail/auto_rec.hpp" 1 3 4 6011: # 21 "/usr/include/boost/preprocessor/list/fold_right.hpp" 2 3 4 6011: # 37 "/usr/include/boost/preprocessor/list/fold_right.hpp" 3 4 6011: # 1 "/usr/include/boost/preprocessor/list/detail/fold_right.hpp" 1 3 4 6011: # 18 "/usr/include/boost/preprocessor/list/detail/fold_right.hpp" 3 4 6011: # 1 "/usr/include/boost/preprocessor/list/reverse.hpp" 1 3 4 6011: # 19 "/usr/include/boost/preprocessor/list/detail/fold_right.hpp" 2 3 4 6011: # 38 "/usr/include/boost/preprocessor/list/fold_right.hpp" 2 3 4 6011: # 23 "/usr/include/boost/preprocessor/control/while.hpp" 2 3 4 6011: # 48 "/usr/include/boost/preprocessor/control/while.hpp" 3 4 6011: # 1 "/usr/include/boost/preprocessor/control/detail/while.hpp" 1 3 4 6011: # 49 "/usr/include/boost/preprocessor/control/while.hpp" 2 3 4 6011: # 21 "/usr/include/boost/preprocessor/arithmetic/add.hpp" 2 3 4 6011: # 1 "/usr/include/boost/preprocessor/tuple/elem.hpp" 1 3 4 6011: # 20 "/usr/include/boost/preprocessor/tuple/elem.hpp" 3 4 6011: # 1 "/usr/include/boost/preprocessor/facilities/expand.hpp" 1 3 4 6011: # 21 "/usr/include/boost/preprocessor/tuple/elem.hpp" 2 3 4 6011: # 1 "/usr/include/boost/preprocessor/facilities/overload.hpp" 1 3 4 6011: # 17 "/usr/include/boost/preprocessor/facilities/overload.hpp" 3 4 6011: # 1 "/usr/include/boost/preprocessor/variadic/size.hpp" 1 3 4 6011: # 18 "/usr/include/boost/preprocessor/facilities/overload.hpp" 2 3 4 6011: # 22 "/usr/include/boost/preprocessor/tuple/elem.hpp" 2 3 4 6011: # 1 "/usr/include/boost/preprocessor/tuple/rem.hpp" 1 3 4 6011: # 20 "/usr/include/boost/preprocessor/tuple/rem.hpp" 3 4 6011: # 1 "/usr/include/boost/preprocessor/tuple/detail/is_single_return.hpp" 1 3 4 6011: # 21 "/usr/include/boost/preprocessor/tuple/rem.hpp" 2 3 4 6011: # 23 "/usr/include/boost/preprocessor/tuple/elem.hpp" 2 3 4 6011: # 1 "/usr/include/boost/preprocessor/variadic/elem.hpp" 1 3 4 6011: # 24 "/usr/include/boost/preprocessor/tuple/elem.hpp" 2 3 4 6011: # 22 "/usr/include/boost/preprocessor/arithmetic/add.hpp" 2 3 4 6011: # 67 "/usr/include/boost/mpl/aux_/preprocessor/def_params_tail.hpp" 2 3 4 6011: # 1 "/usr/include/boost/preprocessor/arithmetic/sub.hpp" 1 3 4 6011: # 68 "/usr/include/boost/mpl/aux_/preprocessor/def_params_tail.hpp" 2 3 4 6011: # 29 "/usr/include/boost/mpl/aux_/na_spec.hpp" 2 3 4 6011: 6011: 6011: # 1 "/usr/include/boost/mpl/aux_/config/eti.hpp" 1 3 4 6011: # 32 "/usr/include/boost/mpl/aux_/na_spec.hpp" 2 3 4 6011: 6011: 6011: 6011: # 1 "/usr/include/boost/mpl/aux_/config/overload_resolution.hpp" 1 3 4 6011: # 36 "/usr/include/boost/mpl/aux_/na_spec.hpp" 2 3 4 6011: # 21 "/usr/include/boost/mpl/has_xxx.hpp" 2 3 4 6011: # 1 "/usr/include/boost/mpl/aux_/type_wrapper.hpp" 1 3 4 6011: # 20 "/usr/include/boost/mpl/aux_/type_wrapper.hpp" 3 4 6011: namespace boost { namespace mpl { namespace aux { 6011: 6011: template< typename T > struct type_wrapper 6011: { 6011: typedef T type; 6011: }; 6011: 6011: 6011: 6011: 6011: 6011: 6011: template< typename T > struct wrapped_type; 6011: 6011: template< typename T > struct wrapped_type< type_wrapper > 6011: { 6011: typedef T type; 6011: }; 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: }}} 6011: # 22 "/usr/include/boost/mpl/has_xxx.hpp" 2 3 4 6011: # 1 "/usr/include/boost/mpl/aux_/yes_no.hpp" 1 3 4 6011: # 18 "/usr/include/boost/mpl/aux_/yes_no.hpp" 3 4 6011: # 1 "/usr/include/boost/mpl/aux_/config/arrays.hpp" 1 3 4 6011: # 19 "/usr/include/boost/mpl/aux_/yes_no.hpp" 2 3 4 6011: 6011: 6011: 6011: 6011: namespace boost { namespace mpl { namespace aux { 6011: 6011: typedef char (&no_tag)[1]; 6011: typedef char (&yes_tag)[2]; 6011: 6011: template< bool C_ > struct yes_no_tag 6011: { 6011: typedef no_tag type; 6011: }; 6011: 6011: template<> struct yes_no_tag 6011: { 6011: typedef yes_tag type; 6011: }; 6011: 6011: 6011: template< long n > struct weighted_tag 6011: { 6011: 6011: typedef char (&type)[n]; 6011: 6011: 6011: 6011: 6011: }; 6011: # 56 "/usr/include/boost/mpl/aux_/yes_no.hpp" 3 4 6011: }}} 6011: # 23 "/usr/include/boost/mpl/has_xxx.hpp" 2 3 4 6011: 6011: # 1 "/usr/include/boost/mpl/aux_/config/has_xxx.hpp" 1 3 4 6011: # 25 "/usr/include/boost/mpl/has_xxx.hpp" 2 3 4 6011: # 1 "/usr/include/boost/mpl/aux_/config/msvc_typename.hpp" 1 3 4 6011: # 26 "/usr/include/boost/mpl/has_xxx.hpp" 2 3 4 6011: 6011: 6011: 6011: 6011: # 1 "/usr/include/boost/preprocessor/array/elem.hpp" 1 3 4 6011: # 15 "/usr/include/boost/preprocessor/array/elem.hpp" 3 4 6011: # 1 "/usr/include/boost/preprocessor/array/data.hpp" 1 3 4 6011: # 16 "/usr/include/boost/preprocessor/array/elem.hpp" 2 3 4 6011: # 1 "/usr/include/boost/preprocessor/array/size.hpp" 1 3 4 6011: # 17 "/usr/include/boost/preprocessor/array/elem.hpp" 2 3 4 6011: # 31 "/usr/include/boost/mpl/has_xxx.hpp" 2 3 4 6011: 6011: 6011: # 1 "/usr/include/boost/preprocessor/repetition/enum_params.hpp" 1 3 4 6011: # 34 "/usr/include/boost/mpl/has_xxx.hpp" 2 3 4 6011: # 1 "/usr/include/boost/preprocessor/repetition/enum_trailing_params.hpp" 1 3 4 6011: # 35 "/usr/include/boost/mpl/has_xxx.hpp" 2 3 4 6011: # 57 "/usr/include/boost/regex/v4/regex_traits.hpp" 2 3 4 6011: # 70 "/usr/include/boost/regex/v4/regex_traits.hpp" 3 4 6011: namespace boost{ 6011: 6011: template 6011: struct regex_traits : public implementationT 6011: { 6011: regex_traits() : implementationT() {} 6011: }; 6011: # 85 "/usr/include/boost/regex/v4/regex_traits.hpp" 3 4 6011: namespace re_detail_106501{ 6011: 6011: 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; }; 6011: # 96 "/usr/include/boost/regex/v4/regex_traits.hpp" 3 4 6011: template 6011: struct default_wrapper : public BaseT 6011: { 6011: typedef typename BaseT::char_type char_type; 6011: std::string error_string(::boost::regex_constants::error_type e)const 6011: { 6011: return ::boost::re_detail_106501::get_default_error_string(e); 6011: } 6011: ::boost::regex_constants::syntax_type syntax_type(char_type c)const 6011: { 6011: return ((c & 0x7f) == c) ? get_default_syntax_type(static_cast(c)) : ::boost::regex_constants::syntax_char; 6011: } 6011: ::boost::regex_constants::escape_syntax_type escape_syntax_type(char_type c)const 6011: { 6011: return ((c & 0x7f) == c) ? get_default_escape_syntax_type(static_cast(c)) : ::boost::regex_constants::escape_type_identity; 6011: } 6011: boost::intmax_t toi(const char_type*& p1, const char_type* p2, int radix)const 6011: { 6011: return ::boost::re_detail_106501::global_toi(p1, p2, radix, *this); 6011: } 6011: char_type translate(char_type c, bool icase)const 6011: { 6011: return (icase ? this->translate_nocase(c) : this->translate(c)); 6011: } 6011: char_type translate(char_type c)const 6011: { 6011: return BaseT::translate(c); 6011: } 6011: char_type tolower(char_type c)const 6011: { 6011: return ::boost::re_detail_106501::global_lower(c); 6011: } 6011: char_type toupper(char_type c)const 6011: { 6011: return ::boost::re_detail_106501::global_upper(c); 6011: } 6011: }; 6011: 6011: template 6011: struct compute_wrapper_base 6011: { 6011: typedef BaseT type; 6011: }; 6011: 6011: template 6011: struct compute_wrapper_base 6011: { 6011: typedef default_wrapper type; 6011: }; 6011: # 160 "/usr/include/boost/regex/v4/regex_traits.hpp" 3 4 6011: } 6011: 6011: template 6011: struct regex_traits_wrapper 6011: : public ::boost::re_detail_106501::compute_wrapper_base< 6011: BaseT, 6011: ::boost::re_detail_106501::has_boost_extensions_tag::value 6011: >::type 6011: { 6011: regex_traits_wrapper(){} 6011: private: 6011: regex_traits_wrapper(const regex_traits_wrapper&); 6011: regex_traits_wrapper& operator=(const regex_traits_wrapper&); 6011: }; 6011: 6011: } 6011: # 28 "/usr/include/boost/regex/regex_traits.hpp" 2 3 4 6011: # 40 "/usr/include/boost/regex/v4/regex.hpp" 2 3 4 6011: 6011: 6011: 6011: 6011: 6011: # 1 "/usr/include/boost/regex/v4/match_flags.hpp" 1 3 4 6011: # 23 "/usr/include/boost/regex/v4/match_flags.hpp" 3 4 6011: # 1 "/usr/include/boost/cstdint.hpp" 1 3 4 6011: # 24 "/usr/include/boost/regex/v4/match_flags.hpp" 2 3 4 6011: 6011: 6011: 6011: 6011: namespace boost{ 6011: namespace regex_constants{ 6011: 6011: 6011: typedef enum _match_flags 6011: { 6011: match_default = 0, 6011: match_not_bol = 1, 6011: match_not_eol = match_not_bol << 1, 6011: match_not_bob = match_not_eol << 1, 6011: match_not_eob = match_not_bob << 1, 6011: match_not_bow = match_not_eob << 1, 6011: match_not_eow = match_not_bow << 1, 6011: match_not_dot_newline = match_not_eow << 1, 6011: match_not_dot_null = match_not_dot_newline << 1, 6011: match_prev_avail = match_not_dot_null << 1, 6011: match_init = match_prev_avail << 1, 6011: match_any = match_init << 1, 6011: match_not_null = match_any << 1, 6011: match_continuous = match_not_null << 1, 6011: 6011: match_partial = match_continuous << 1, 6011: 6011: match_stop = match_partial << 1, 6011: match_not_initial_null = match_stop, 6011: match_all = match_stop << 1, 6011: match_perl = match_all << 1, 6011: match_posix = match_perl << 1, 6011: match_nosubs = match_posix << 1, 6011: match_extra = match_nosubs << 1, 6011: match_single_line = match_extra << 1, 6011: match_unused1 = match_single_line << 1, 6011: match_unused2 = match_unused1 << 1, 6011: match_unused3 = match_unused2 << 1, 6011: match_max = match_unused3, 6011: 6011: format_perl = 0, 6011: format_default = 0, 6011: format_sed = match_max << 1, 6011: format_all = format_sed << 1, 6011: format_no_copy = format_all << 1, 6011: format_first_only = format_no_copy << 1, 6011: format_is_if = format_first_only << 1, 6011: format_literal = format_is_if << 1, 6011: 6011: match_not_any = match_not_bol | match_not_eol | match_not_bob 6011: | match_not_eob | match_not_bow | match_not_eow | match_not_dot_newline 6011: | match_not_dot_null | match_prev_avail | match_init | match_not_null 6011: | match_continuous | match_partial | match_stop | match_not_initial_null 6011: | match_stop | match_all | match_perl | match_posix | match_nosubs 6011: | match_extra | match_single_line | match_unused1 | match_unused2 6011: | match_unused3 | match_max | format_perl | format_default | format_sed 6011: | format_all | format_no_copy | format_first_only | format_is_if 6011: | format_literal 6011: 6011: 6011: } match_flags; 6011: 6011: 6011: 6011: 6011: typedef match_flags match_flag_type; 6011: 6011: 6011: 6011: inline match_flags operator&(match_flags m1, match_flags m2) 6011: { return static_cast(static_cast(m1) & static_cast(m2)); } 6011: inline match_flags operator|(match_flags m1, match_flags m2) 6011: { return static_cast(static_cast(m1) | static_cast(m2)); } 6011: inline match_flags operator^(match_flags m1, match_flags m2) 6011: { return static_cast(static_cast(m1) ^ static_cast(m2)); } 6011: inline match_flags operator~(match_flags m1) 6011: { return static_cast(~static_cast(m1)); } 6011: inline match_flags& operator&=(match_flags& m1, match_flags m2) 6011: { m1 = m1&m2; return m1; } 6011: inline match_flags& operator|=(match_flags& m1, match_flags m2) 6011: { m1 = m1|m2; return m1; } 6011: inline match_flags& operator^=(match_flags& m1, match_flags m2) 6011: { m1 = m1^m2; return m1; } 6011: 6011: 6011: 6011: 6011: } 6011: 6011: 6011: 6011: using regex_constants::match_flag_type; 6011: using regex_constants::match_default; 6011: using regex_constants::match_not_bol; 6011: using regex_constants::match_not_eol; 6011: using regex_constants::match_not_bob; 6011: using regex_constants::match_not_eob; 6011: using regex_constants::match_not_bow; 6011: using regex_constants::match_not_eow; 6011: using regex_constants::match_not_dot_newline; 6011: using regex_constants::match_not_dot_null; 6011: using regex_constants::match_prev_avail; 6011: 6011: using regex_constants::match_any; 6011: using regex_constants::match_not_null; 6011: using regex_constants::match_continuous; 6011: using regex_constants::match_partial; 6011: 6011: using regex_constants::match_all; 6011: using regex_constants::match_perl; 6011: using regex_constants::match_posix; 6011: using regex_constants::match_nosubs; 6011: using regex_constants::match_extra; 6011: using regex_constants::match_single_line; 6011: 6011: using regex_constants::format_all; 6011: using regex_constants::format_sed; 6011: using regex_constants::format_perl; 6011: using regex_constants::format_default; 6011: using regex_constants::format_no_copy; 6011: using regex_constants::format_first_only; 6011: 6011: 6011: } 6011: # 46 "/usr/include/boost/regex/v4/regex.hpp" 2 3 4 6011: 6011: 6011: # 1 "/usr/include/boost/regex/v4/regex_raw_buffer.hpp" 1 3 4 6011: # 31 "/usr/include/boost/regex/v4/regex_raw_buffer.hpp" 3 4 6011: namespace boost{ 6011: namespace re_detail_106501{ 6011: # 45 "/usr/include/boost/regex/v4/regex_raw_buffer.hpp" 3 4 6011: struct empty_padding{}; 6011: 6011: union padding 6011: { 6011: void* p; 6011: unsigned int i; 6011: }; 6011: 6011: template 6011: struct padding3 6011: { 6011: enum{ 6011: padding_size = 8, 6011: padding_mask = 7 6011: }; 6011: }; 6011: 6011: template<> 6011: struct padding3<2> 6011: { 6011: enum{ 6011: padding_size = 2, 6011: padding_mask = 1 6011: }; 6011: }; 6011: 6011: template<> 6011: struct padding3<4> 6011: { 6011: enum{ 6011: padding_size = 4, 6011: padding_mask = 3 6011: }; 6011: }; 6011: 6011: template<> 6011: struct padding3<8> 6011: { 6011: enum{ 6011: padding_size = 8, 6011: padding_mask = 7 6011: }; 6011: }; 6011: 6011: template<> 6011: struct padding3<16> 6011: { 6011: enum{ 6011: padding_size = 16, 6011: padding_mask = 15 6011: }; 6011: }; 6011: 6011: enum{ 6011: padding_size = padding3::padding_size, 6011: padding_mask = padding3::padding_mask 6011: }; 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: class raw_storage 6011: { 6011: public: 6011: typedef std::size_t size_type; 6011: typedef unsigned char* pointer; 6011: private: 6011: pointer last, start, end; 6011: public: 6011: 6011: raw_storage(); 6011: raw_storage(size_type n); 6011: 6011: ~raw_storage() 6011: { 6011: ::operator delete(start); 6011: } 6011: 6011: void resize(size_type n); 6011: 6011: void* extend(size_type n) 6011: { 6011: if(size_type(last - end) < n) 6011: resize(n + (end - start)); 6011: pointer result = end; 6011: end += n; 6011: return result; 6011: } 6011: 6011: void* insert(size_type pos, size_type n); 6011: 6011: size_type size() 6011: { 6011: return end - start; 6011: } 6011: 6011: size_type capacity() 6011: { 6011: return last - start; 6011: } 6011: 6011: void* data()const 6011: { 6011: return start; 6011: } 6011: 6011: size_type index(void* ptr) 6011: { 6011: return static_cast(ptr) - static_cast(data()); 6011: } 6011: 6011: void clear() 6011: { 6011: end = start; 6011: } 6011: 6011: void align() 6011: { 6011: 6011: end = start + (((end - start) + padding_mask) & ~padding_mask); 6011: } 6011: void swap(raw_storage& that) 6011: { 6011: std::swap(start, that.start); 6011: std::swap(end, that.end); 6011: std::swap(last, that.last); 6011: } 6011: }; 6011: 6011: inline raw_storage::raw_storage() 6011: { 6011: last = start = end = 0; 6011: } 6011: 6011: inline raw_storage::raw_storage(size_type n) 6011: { 6011: start = end = static_cast(::operator new(n)); 6011: 6011: last = start + n; 6011: } 6011: # 201 "/usr/include/boost/regex/v4/regex_raw_buffer.hpp" 3 4 6011: } 6011: } 6011: # 49 "/usr/include/boost/regex/v4/regex.hpp" 2 3 4 6011: 6011: 6011: 6011: 6011: 6011: 6011: # 1 "/usr/include/boost/regex/v4/char_regex_traits.hpp" 1 3 4 6011: # 34 "/usr/include/boost/regex/v4/char_regex_traits.hpp" 3 4 6011: namespace boost{ 6011: 6011: namespace deprecated{ 6011: 6011: 6011: 6011: template 6011: class char_regex_traits_i : public regex_traits {}; 6011: 6011: template<> 6011: class char_regex_traits_i : public regex_traits 6011: { 6011: public: 6011: typedef char char_type; 6011: typedef unsigned char uchar_type; 6011: typedef unsigned int size_type; 6011: typedef regex_traits base_type; 6011: 6011: }; 6011: 6011: 6011: template<> 6011: class char_regex_traits_i : public regex_traits 6011: { 6011: public: 6011: typedef wchar_t char_type; 6011: typedef unsigned short uchar_type; 6011: typedef unsigned int size_type; 6011: typedef regex_traits base_type; 6011: 6011: }; 6011: 6011: } 6011: } 6011: # 56 "/usr/include/boost/regex/v4/regex.hpp" 2 3 4 6011: 6011: 6011: # 1 "/usr/include/boost/regex/v4/states.hpp" 1 3 4 6011: # 33 "/usr/include/boost/regex/v4/states.hpp" 3 4 6011: namespace boost{ 6011: namespace re_detail_106501{ 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: enum mask_type 6011: { 6011: mask_take = 1, 6011: mask_skip = 2, 6011: mask_init = 4, 6011: mask_any = mask_skip | mask_take, 6011: mask_all = mask_any 6011: }; 6011: 6011: 6011: 6011: 6011: 6011: struct _narrow_type{}; 6011: struct _wide_type{}; 6011: template struct is_byte; 6011: template<> struct is_byte { typedef _narrow_type width_type; }; 6011: template<> struct is_byte{ typedef _narrow_type width_type; }; 6011: template<> struct is_byte { typedef _narrow_type width_type; }; 6011: template struct is_byte { typedef _wide_type width_type; }; 6011: 6011: 6011: 6011: 6011: enum syntax_element_type 6011: { 6011: 6011: syntax_element_startmark = 0, 6011: 6011: syntax_element_endmark = syntax_element_startmark + 1, 6011: 6011: syntax_element_literal = syntax_element_endmark + 1, 6011: 6011: syntax_element_start_line = syntax_element_literal + 1, 6011: 6011: syntax_element_end_line = syntax_element_start_line + 1, 6011: 6011: syntax_element_wild = syntax_element_end_line + 1, 6011: 6011: syntax_element_match = syntax_element_wild + 1, 6011: 6011: syntax_element_word_boundary = syntax_element_match + 1, 6011: 6011: syntax_element_within_word = syntax_element_word_boundary + 1, 6011: 6011: syntax_element_word_start = syntax_element_within_word + 1, 6011: 6011: syntax_element_word_end = syntax_element_word_start + 1, 6011: 6011: syntax_element_buffer_start = syntax_element_word_end + 1, 6011: 6011: syntax_element_buffer_end = syntax_element_buffer_start + 1, 6011: 6011: syntax_element_backref = syntax_element_buffer_end + 1, 6011: 6011: syntax_element_long_set = syntax_element_backref + 1, 6011: 6011: syntax_element_set = syntax_element_long_set + 1, 6011: 6011: syntax_element_jump = syntax_element_set + 1, 6011: 6011: syntax_element_alt = syntax_element_jump + 1, 6011: 6011: syntax_element_rep = syntax_element_alt + 1, 6011: 6011: syntax_element_combining = syntax_element_rep + 1, 6011: 6011: syntax_element_soft_buffer_end = syntax_element_combining + 1, 6011: 6011: syntax_element_restart_continue = syntax_element_soft_buffer_end + 1, 6011: 6011: syntax_element_dot_rep = syntax_element_restart_continue + 1, 6011: syntax_element_char_rep = syntax_element_dot_rep + 1, 6011: syntax_element_short_set_rep = syntax_element_char_rep + 1, 6011: syntax_element_long_set_rep = syntax_element_short_set_rep + 1, 6011: 6011: syntax_element_backstep = syntax_element_long_set_rep + 1, 6011: 6011: syntax_element_assert_backref = syntax_element_backstep + 1, 6011: syntax_element_toggle_case = syntax_element_assert_backref + 1, 6011: 6011: syntax_element_recurse = syntax_element_toggle_case + 1, 6011: 6011: syntax_element_fail = syntax_element_recurse + 1, 6011: syntax_element_accept = syntax_element_fail + 1, 6011: syntax_element_commit = syntax_element_accept + 1, 6011: syntax_element_then = syntax_element_commit + 1 6011: }; 6011: 6011: 6011: 6011: 6011: 6011: 6011: struct re_syntax_base; 6011: 6011: 6011: 6011: 6011: 6011: 6011: union offset_type 6011: { 6011: re_syntax_base* p; 6011: std::ptrdiff_t i; 6011: }; 6011: 6011: 6011: 6011: 6011: struct re_syntax_base 6011: { 6011: syntax_element_type type; 6011: offset_type next; 6011: }; 6011: 6011: 6011: 6011: 6011: struct re_brace : public re_syntax_base 6011: { 6011: 6011: 6011: int index; 6011: bool icase; 6011: }; 6011: 6011: 6011: 6011: 6011: enum 6011: { 6011: dont_care = 1, 6011: force_not_newline = 0, 6011: force_newline = 2, 6011: 6011: test_not_newline = 2, 6011: test_newline = 3 6011: }; 6011: struct re_dot : public re_syntax_base 6011: { 6011: unsigned char mask; 6011: }; 6011: 6011: 6011: 6011: 6011: 6011: struct re_literal : public re_syntax_base 6011: { 6011: unsigned int length; 6011: }; 6011: 6011: 6011: 6011: 6011: struct re_case : public re_syntax_base 6011: { 6011: bool icase; 6011: }; 6011: # 210 "/usr/include/boost/regex/v4/states.hpp" 3 4 6011: template 6011: struct re_set_long : public re_syntax_base 6011: { 6011: unsigned int csingles, cranges, cequivalents; 6011: mask_type cclasses; 6011: mask_type cnclasses; 6011: bool isnot; 6011: bool singleton; 6011: }; 6011: 6011: 6011: 6011: 6011: struct re_set : public re_syntax_base 6011: { 6011: unsigned char _map[1 << 8]; 6011: }; 6011: 6011: 6011: 6011: 6011: struct re_jump : public re_syntax_base 6011: { 6011: offset_type alt; 6011: }; 6011: 6011: 6011: 6011: 6011: struct re_alt : public re_jump 6011: { 6011: unsigned char _map[1 << 8]; 6011: unsigned int can_be_null; 6011: }; 6011: 6011: 6011: 6011: 6011: struct re_repeat : public re_alt 6011: { 6011: std::size_t min, max; 6011: int state_id; 6011: bool leading; 6011: bool greedy; 6011: }; 6011: 6011: 6011: 6011: 6011: struct re_recurse : public re_jump 6011: { 6011: int state_id; 6011: }; 6011: 6011: 6011: 6011: 6011: 6011: enum commit_type 6011: { 6011: commit_prune, 6011: commit_skip, 6011: commit_commit 6011: }; 6011: struct re_commit : public re_syntax_base 6011: { 6011: commit_type action; 6011: }; 6011: 6011: 6011: 6011: 6011: 6011: 6011: enum re_jump_size_type 6011: { 6011: re_jump_size = (sizeof(re_jump) + padding_mask) & ~(padding_mask), 6011: re_repeater_size = (sizeof(re_repeat) + padding_mask) & ~(padding_mask), 6011: re_alt_size = (sizeof(re_alt) + padding_mask) & ~(padding_mask) 6011: }; 6011: 6011: 6011: 6011: 6011: 6011: template 6011: struct regex_data; 6011: 6011: template 6011: iterator re_is_set_member(iterator next, 6011: iterator last, 6011: const re_set_long* set_, 6011: const regex_data& e, bool icase); 6011: 6011: } 6011: 6011: } 6011: # 59 "/usr/include/boost/regex/v4/regex.hpp" 2 3 4 6011: 6011: 6011: # 1 "/usr/include/boost/regex/v4/regbase.hpp" 1 3 4 6011: # 33 "/usr/include/boost/regex/v4/regbase.hpp" 3 4 6011: namespace boost{ 6011: 6011: 6011: 6011: 6011: class regbase 6011: { 6011: public: 6011: enum flag_type_ 6011: { 6011: # 53 "/usr/include/boost/regex/v4/regbase.hpp" 3 4 6011: perl_syntax_group = 0, 6011: basic_syntax_group = 1, 6011: literal = 2, 6011: main_option_type = literal | basic_syntax_group | perl_syntax_group, 6011: 6011: 6011: 6011: no_bk_refs = 1 << 8, 6011: no_perl_ex = 1 << 9, 6011: no_mod_m = 1 << 10, 6011: mod_x = 1 << 11, 6011: mod_s = 1 << 12, 6011: no_mod_s = 1 << 13, 6011: 6011: 6011: 6011: 6011: no_char_classes = 1 << 8, 6011: no_intervals = 1 << 9, 6011: bk_plus_qm = 1 << 10, 6011: bk_vbar = 1 << 11, 6011: emacs_ex = 1 << 12, 6011: 6011: 6011: 6011: 6011: no_escape_in_lists = 1 << 16, 6011: newline_alt = 1 << 17, 6011: no_except = 1 << 18, 6011: failbit = 1 << 19, 6011: icase = 1 << 20, 6011: nocollate = 0, 6011: collate = 1 << 21, 6011: nosubs = 1 << 22, 6011: save_subexpression_location = 1 << 23, 6011: no_empty_expressions = 1 << 24, 6011: optimize = 0, 6011: 6011: 6011: 6011: basic = basic_syntax_group | collate | no_escape_in_lists, 6011: extended = no_bk_refs | collate | no_perl_ex | no_escape_in_lists, 6011: normal = 0, 6011: emacs = basic_syntax_group | collate | emacs_ex | bk_vbar, 6011: awk = no_bk_refs | collate | no_perl_ex, 6011: grep = basic | newline_alt, 6011: egrep = extended | newline_alt, 6011: sed = basic, 6011: perl = normal, 6011: ECMAScript = normal, 6011: JavaScript = normal, 6011: JScript = normal 6011: }; 6011: typedef unsigned int flag_type; 6011: 6011: enum restart_info 6011: { 6011: restart_any = 0, 6011: restart_word = 1, 6011: restart_line = 2, 6011: restart_buf = 3, 6011: restart_continue = 4, 6011: restart_lit = 5, 6011: restart_fixed_lit = 6, 6011: restart_count = 7 6011: }; 6011: }; 6011: 6011: 6011: 6011: 6011: namespace regex_constants{ 6011: 6011: enum flag_type_ 6011: { 6011: 6011: no_except = ::boost::regbase::no_except, 6011: failbit = ::boost::regbase::failbit, 6011: literal = ::boost::regbase::literal, 6011: icase = ::boost::regbase::icase, 6011: nocollate = ::boost::regbase::nocollate, 6011: collate = ::boost::regbase::collate, 6011: nosubs = ::boost::regbase::nosubs, 6011: optimize = ::boost::regbase::optimize, 6011: bk_plus_qm = ::boost::regbase::bk_plus_qm, 6011: bk_vbar = ::boost::regbase::bk_vbar, 6011: no_intervals = ::boost::regbase::no_intervals, 6011: no_char_classes = ::boost::regbase::no_char_classes, 6011: no_escape_in_lists = ::boost::regbase::no_escape_in_lists, 6011: no_mod_m = ::boost::regbase::no_mod_m, 6011: mod_x = ::boost::regbase::mod_x, 6011: mod_s = ::boost::regbase::mod_s, 6011: no_mod_s = ::boost::regbase::no_mod_s, 6011: save_subexpression_location = ::boost::regbase::save_subexpression_location, 6011: no_empty_expressions = ::boost::regbase::no_empty_expressions, 6011: 6011: basic = ::boost::regbase::basic, 6011: extended = ::boost::regbase::extended, 6011: normal = ::boost::regbase::normal, 6011: emacs = ::boost::regbase::emacs, 6011: awk = ::boost::regbase::awk, 6011: grep = ::boost::regbase::grep, 6011: egrep = ::boost::regbase::egrep, 6011: sed = basic, 6011: perl = normal, 6011: ECMAScript = normal, 6011: JavaScript = normal, 6011: JScript = normal 6011: }; 6011: typedef ::boost::regbase::flag_type syntax_option_type; 6011: 6011: } 6011: 6011: } 6011: # 62 "/usr/include/boost/regex/v4/regex.hpp" 2 3 4 6011: 6011: 6011: # 1 "/usr/include/boost/regex/v4/iterator_traits.hpp" 1 3 4 6011: # 33 "/usr/include/boost/regex/v4/iterator_traits.hpp" 3 4 6011: namespace boost{ 6011: namespace re_detail_106501{ 6011: # 115 "/usr/include/boost/regex/v4/iterator_traits.hpp" 3 4 6011: template 6011: struct regex_iterator_traits : public std::iterator_traits {}; 6011: 6011: 6011: 6011: } 6011: } 6011: # 65 "/usr/include/boost/regex/v4/regex.hpp" 2 3 4 6011: 6011: 6011: # 1 "/usr/include/boost/regex/v4/basic_regex.hpp" 1 3 4 6011: # 23 "/usr/include/boost/regex/v4/basic_regex.hpp" 3 4 6011: # 1 "/usr/include/boost/functional/hash.hpp" 1 3 4 6011: 6011: 6011: 6011: 6011: 6011: # 1 "/usr/include/boost/functional/hash/hash.hpp" 1 3 4 6011: # 19 "/usr/include/boost/functional/hash/hash.hpp" 3 4 6011: # 1 "/usr/include/boost/functional/hash/hash_fwd.hpp" 1 3 4 6011: # 15 "/usr/include/boost/functional/hash/hash_fwd.hpp" 3 4 6011: 6011: 6011: 6011: 6011: 6011: 6011: namespace boost 6011: { 6011: template struct hash; 6011: 6011: template void hash_combine(std::size_t& seed, T const& v); 6011: 6011: template std::size_t hash_range(It, It); 6011: template void hash_range(std::size_t&, It, It); 6011: 6011: 6011: 6011: 6011: 6011: } 6011: # 20 "/usr/include/boost/functional/hash/hash.hpp" 2 3 4 6011: 6011: # 1 "/usr/include/boost/functional/hash/detail/hash_float.hpp" 1 3 4 6011: # 11 "/usr/include/boost/functional/hash/detail/hash_float.hpp" 3 4 6011: 6011: 6011: 6011: # 1 "/usr/include/boost/functional/hash/detail/float_functions.hpp" 1 3 4 6011: # 11 "/usr/include/boost/functional/hash/detail/float_functions.hpp" 3 4 6011: 6011: 6011: 6011: # 1 "/usr/include/boost/config/no_tr1/cmath.hpp" 1 3 4 6011: # 21 "/usr/include/boost/config/no_tr1/cmath.hpp" 3 4 6011: # 1 "/usr/include/c++/8/cmath" 1 3 4 6011: # 39 "/usr/include/c++/8/cmath" 3 4 6011: 6011: # 40 "/usr/include/c++/8/cmath" 3 6011: 6011: 6011: 6011: 6011: 6011: # 1 "/usr/include/math.h" 1 3 4 6011: # 27 "/usr/include/math.h" 3 4 6011: # 1 "/usr/include/arm-linux-gnueabihf/bits/libc-header-start.h" 1 3 4 6011: # 28 "/usr/include/math.h" 2 3 4 6011: 6011: extern "C" { 6011: 6011: 6011: 6011: 6011: 6011: # 1 "/usr/include/arm-linux-gnueabihf/bits/math-vector.h" 1 3 4 6011: # 27 "/usr/include/arm-linux-gnueabihf/bits/math-vector.h" 3 4 6011: # 1 "/usr/include/arm-linux-gnueabihf/bits/libm-simd-decl-stubs.h" 1 3 4 6011: # 27 "/usr/include/arm-linux-gnueabihf/bits/math-vector.h" 2 3 4 6011: # 36 "/usr/include/math.h" 2 3 4 6011: 6011: 6011: # 1 "/usr/include/arm-linux-gnueabihf/bits/floatn.h" 1 3 4 6011: # 39 "/usr/include/math.h" 2 3 4 6011: 6011: 6011: 6011: # 1 "/usr/include/arm-linux-gnueabihf/bits/huge_val.h" 1 3 4 6011: # 43 "/usr/include/math.h" 2 3 4 6011: 6011: 6011: 6011: 6011: 6011: 6011: # 1 "/usr/include/arm-linux-gnueabihf/bits/huge_valf.h" 1 3 4 6011: # 50 "/usr/include/math.h" 2 3 4 6011: # 1 "/usr/include/arm-linux-gnueabihf/bits/huge_vall.h" 1 3 4 6011: # 51 "/usr/include/math.h" 2 3 4 6011: 6011: 6011: # 1 "/usr/include/arm-linux-gnueabihf/bits/inf.h" 1 3 4 6011: # 54 "/usr/include/math.h" 2 3 4 6011: 6011: 6011: # 1 "/usr/include/arm-linux-gnueabihf/bits/nan.h" 1 3 4 6011: # 57 "/usr/include/math.h" 2 3 4 6011: # 72 "/usr/include/math.h" 3 4 6011: # 1 "/usr/include/arm-linux-gnueabihf/bits/flt-eval-method.h" 1 3 4 6011: # 73 "/usr/include/math.h" 2 3 4 6011: # 83 "/usr/include/math.h" 3 4 6011: typedef float float_t; 6011: typedef double double_t; 6011: # 124 "/usr/include/math.h" 3 4 6011: # 1 "/usr/include/arm-linux-gnueabihf/bits/fp-logb.h" 1 3 4 6011: # 125 "/usr/include/math.h" 2 3 4 6011: # 167 "/usr/include/math.h" 3 4 6011: # 1 "/usr/include/arm-linux-gnueabihf/bits/fp-fast.h" 1 3 4 6011: # 168 "/usr/include/math.h" 2 3 4 6011: 6011: 6011: 6011: enum 6011: { 6011: FP_INT_UPWARD = 6011: 6011: 0, 6011: FP_INT_DOWNWARD = 6011: 6011: 1, 6011: FP_INT_TOWARDZERO = 6011: 6011: 2, 6011: FP_INT_TONEARESTFROMZERO = 6011: 6011: 3, 6011: FP_INT_TONEAREST = 6011: 6011: 4, 6011: }; 6011: # 223 "/usr/include/math.h" 3 4 6011: # 1 "/usr/include/arm-linux-gnueabihf/bits/mathcalls-helper-functions.h" 1 3 4 6011: # 21 "/usr/include/arm-linux-gnueabihf/bits/mathcalls-helper-functions.h" 3 4 6011: extern int __fpclassify (double __value) throw () 6011: __attribute__ ((__const__)); 6011: 6011: 6011: extern int __signbit (double __value) throw () 6011: __attribute__ ((__const__)); 6011: 6011: 6011: 6011: extern int __isinf (double __value) throw () __attribute__ ((__const__)); 6011: 6011: 6011: extern int __finite (double __value) throw () __attribute__ ((__const__)); 6011: 6011: 6011: extern int __isnan (double __value) throw () __attribute__ ((__const__)); 6011: 6011: 6011: extern int __iseqsig (double __x, double __y) throw (); 6011: 6011: 6011: extern int __issignaling (double __value) throw () 6011: __attribute__ ((__const__)); 6011: # 224 "/usr/include/math.h" 2 3 4 6011: # 1 "/usr/include/arm-linux-gnueabihf/bits/mathcalls.h" 1 3 4 6011: # 53 "/usr/include/arm-linux-gnueabihf/bits/mathcalls.h" 3 4 6011: extern double acos (double __x) throw (); extern double __acos (double __x) throw (); 6011: 6011: extern double asin (double __x) throw (); extern double __asin (double __x) throw (); 6011: 6011: extern double atan (double __x) throw (); extern double __atan (double __x) throw (); 6011: 6011: extern double atan2 (double __y, double __x) throw (); extern double __atan2 (double __y, double __x) throw (); 6011: 6011: 6011: extern double cos (double __x) throw (); extern double __cos (double __x) throw (); 6011: 6011: extern double sin (double __x) throw (); extern double __sin (double __x) throw (); 6011: 6011: extern double tan (double __x) throw (); extern double __tan (double __x) throw (); 6011: 6011: 6011: 6011: 6011: extern double cosh (double __x) throw (); extern double __cosh (double __x) throw (); 6011: 6011: extern double sinh (double __x) throw (); extern double __sinh (double __x) throw (); 6011: 6011: extern double tanh (double __x) throw (); extern double __tanh (double __x) throw (); 6011: 6011: 6011: 6011: extern void sincos (double __x, double *__sinx, double *__cosx) throw (); extern void __sincos (double __x, double *__sinx, double *__cosx) throw () 6011: ; 6011: 6011: 6011: 6011: 6011: extern double acosh (double __x) throw (); extern double __acosh (double __x) throw (); 6011: 6011: extern double asinh (double __x) throw (); extern double __asinh (double __x) throw (); 6011: 6011: extern double atanh (double __x) throw (); extern double __atanh (double __x) throw (); 6011: 6011: 6011: 6011: 6011: 6011: extern double exp (double __x) throw (); extern double __exp (double __x) throw (); 6011: 6011: 6011: extern double frexp (double __x, int *__exponent) throw (); extern double __frexp (double __x, int *__exponent) throw (); 6011: 6011: 6011: extern double ldexp (double __x, int __exponent) throw (); extern double __ldexp (double __x, int __exponent) throw (); 6011: 6011: 6011: extern double log (double __x) throw (); extern double __log (double __x) throw (); 6011: 6011: 6011: extern double log10 (double __x) throw (); extern double __log10 (double __x) throw (); 6011: 6011: 6011: extern double modf (double __x, double *__iptr) throw (); extern double __modf (double __x, double *__iptr) throw () __attribute__ ((__nonnull__ (2))); 6011: 6011: 6011: 6011: extern double exp10 (double __x) throw (); extern double __exp10 (double __x) throw (); 6011: 6011: 6011: 6011: 6011: extern double pow10 (double __x) throw (); extern double __pow10 (double __x) throw (); 6011: 6011: 6011: 6011: 6011: 6011: extern double expm1 (double __x) throw (); extern double __expm1 (double __x) throw (); 6011: 6011: 6011: extern double log1p (double __x) throw (); extern double __log1p (double __x) throw (); 6011: 6011: 6011: extern double logb (double __x) throw (); extern double __logb (double __x) throw (); 6011: 6011: 6011: 6011: 6011: extern double exp2 (double __x) throw (); extern double __exp2 (double __x) throw (); 6011: 6011: 6011: extern double log2 (double __x) throw (); extern double __log2 (double __x) throw (); 6011: 6011: 6011: 6011: 6011: 6011: 6011: extern double pow (double __x, double __y) throw (); extern double __pow (double __x, double __y) throw (); 6011: 6011: 6011: extern double sqrt (double __x) throw (); extern double __sqrt (double __x) throw (); 6011: 6011: 6011: 6011: extern double hypot (double __x, double __y) throw (); extern double __hypot (double __x, double __y) throw (); 6011: 6011: 6011: 6011: 6011: extern double cbrt (double __x) throw (); extern double __cbrt (double __x) throw (); 6011: 6011: 6011: 6011: 6011: 6011: 6011: extern double ceil (double __x) throw () __attribute__ ((__const__)); extern double __ceil (double __x) throw () __attribute__ ((__const__)); 6011: 6011: 6011: extern double fabs (double __x) throw () __attribute__ ((__const__)); extern double __fabs (double __x) throw () __attribute__ ((__const__)); 6011: 6011: 6011: extern double floor (double __x) throw () __attribute__ ((__const__)); extern double __floor (double __x) throw () __attribute__ ((__const__)); 6011: 6011: 6011: extern double fmod (double __x, double __y) throw (); extern double __fmod (double __x, double __y) throw (); 6011: # 188 "/usr/include/arm-linux-gnueabihf/bits/mathcalls.h" 3 4 6011: extern int finite (double __value) throw () __attribute__ ((__const__)); 6011: 6011: 6011: extern double drem (double __x, double __y) throw (); extern double __drem (double __x, double __y) throw (); 6011: 6011: 6011: 6011: extern double significand (double __x) throw (); extern double __significand (double __x) throw (); 6011: 6011: 6011: 6011: 6011: 6011: 6011: extern double copysign (double __x, double __y) throw () __attribute__ ((__const__)); extern double __copysign (double __x, double __y) throw () __attribute__ ((__const__)); 6011: 6011: 6011: 6011: 6011: extern double nan (const char *__tagb) throw () __attribute__ ((__const__)); extern double __nan (const char *__tagb) throw () __attribute__ ((__const__)); 6011: # 223 "/usr/include/arm-linux-gnueabihf/bits/mathcalls.h" 3 4 6011: extern double j0 (double) throw (); extern double __j0 (double) throw (); 6011: extern double j1 (double) throw (); extern double __j1 (double) throw (); 6011: extern double jn (int, double) throw (); extern double __jn (int, double) throw (); 6011: extern double y0 (double) throw (); extern double __y0 (double) throw (); 6011: extern double y1 (double) throw (); extern double __y1 (double) throw (); 6011: extern double yn (int, double) throw (); extern double __yn (int, double) throw (); 6011: 6011: 6011: 6011: 6011: 6011: extern double erf (double) throw (); extern double __erf (double) throw (); 6011: extern double erfc (double) throw (); extern double __erfc (double) throw (); 6011: extern double lgamma (double) throw (); extern double __lgamma (double) throw (); 6011: 6011: 6011: 6011: 6011: extern double tgamma (double) throw (); extern double __tgamma (double) throw (); 6011: 6011: 6011: 6011: 6011: 6011: extern double gamma (double) throw (); extern double __gamma (double) throw (); 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: extern double lgamma_r (double, int *__signgamp) throw (); extern double __lgamma_r (double, int *__signgamp) throw (); 6011: 6011: 6011: 6011: 6011: 6011: 6011: extern double rint (double __x) throw (); extern double __rint (double __x) throw (); 6011: 6011: 6011: extern double nextafter (double __x, double __y) throw () __attribute__ ((__const__)); extern double __nextafter (double __x, double __y) throw () __attribute__ ((__const__)); 6011: 6011: extern double nexttoward (double __x, long double __y) throw () __attribute__ ((__const__)); extern double __nexttoward (double __x, long double __y) throw () __attribute__ ((__const__)); 6011: 6011: 6011: 6011: 6011: extern double nextdown (double __x) throw (); extern double __nextdown (double __x) throw (); 6011: 6011: extern double nextup (double __x) throw (); extern double __nextup (double __x) throw (); 6011: 6011: 6011: 6011: extern double remainder (double __x, double __y) throw (); extern double __remainder (double __x, double __y) throw (); 6011: 6011: 6011: 6011: extern double scalbn (double __x, int __n) throw (); extern double __scalbn (double __x, int __n) throw (); 6011: 6011: 6011: 6011: extern int ilogb (double __x) throw (); extern int __ilogb (double __x) throw (); 6011: 6011: 6011: 6011: 6011: extern long int llogb (double __x) throw (); extern long int __llogb (double __x) throw (); 6011: 6011: 6011: 6011: 6011: extern double scalbln (double __x, long int __n) throw (); extern double __scalbln (double __x, long int __n) throw (); 6011: 6011: 6011: 6011: extern double nearbyint (double __x) throw (); extern double __nearbyint (double __x) throw (); 6011: 6011: 6011: 6011: extern double round (double __x) throw () __attribute__ ((__const__)); extern double __round (double __x) throw () __attribute__ ((__const__)); 6011: 6011: 6011: 6011: extern double trunc (double __x) throw () __attribute__ ((__const__)); extern double __trunc (double __x) throw () __attribute__ ((__const__)); 6011: 6011: 6011: 6011: 6011: extern double remquo (double __x, double __y, int *__quo) throw (); extern double __remquo (double __x, double __y, int *__quo) throw (); 6011: 6011: 6011: 6011: 6011: 6011: 6011: extern long int lrint (double __x) throw (); extern long int __lrint (double __x) throw (); 6011: __extension__ 6011: extern long long int llrint (double __x) throw (); extern long long int __llrint (double __x) throw (); 6011: 6011: 6011: 6011: extern long int lround (double __x) throw (); extern long int __lround (double __x) throw (); 6011: __extension__ 6011: extern long long int llround (double __x) throw (); extern long long int __llround (double __x) throw (); 6011: 6011: 6011: 6011: extern double fdim (double __x, double __y) throw (); extern double __fdim (double __x, double __y) throw (); 6011: 6011: 6011: extern double fmax (double __x, double __y) throw () __attribute__ ((__const__)); extern double __fmax (double __x, double __y) throw () __attribute__ ((__const__)); 6011: 6011: 6011: extern double fmin (double __x, double __y) throw () __attribute__ ((__const__)); extern double __fmin (double __x, double __y) throw () __attribute__ ((__const__)); 6011: 6011: 6011: extern double fma (double __x, double __y, double __z) throw (); extern double __fma (double __x, double __y, double __z) throw (); 6011: 6011: 6011: 6011: 6011: extern double roundeven (double __x) throw () __attribute__ ((__const__)); extern double __roundeven (double __x) throw () __attribute__ ((__const__)); 6011: 6011: 6011: 6011: extern __intmax_t fromfp (double __x, int __round, unsigned int __width) throw (); extern __intmax_t __fromfp (double __x, int __round, unsigned int __width) throw () 6011: ; 6011: 6011: 6011: 6011: extern __uintmax_t ufromfp (double __x, int __round, unsigned int __width) throw (); extern __uintmax_t __ufromfp (double __x, int __round, unsigned int __width) throw () 6011: ; 6011: 6011: 6011: 6011: 6011: extern __intmax_t fromfpx (double __x, int __round, unsigned int __width) throw (); extern __intmax_t __fromfpx (double __x, int __round, unsigned int __width) throw () 6011: ; 6011: 6011: 6011: 6011: 6011: extern __uintmax_t ufromfpx (double __x, int __round, unsigned int __width) throw (); extern __uintmax_t __ufromfpx (double __x, int __round, unsigned int __width) throw () 6011: ; 6011: 6011: 6011: extern double fmaxmag (double __x, double __y) throw () __attribute__ ((__const__)); extern double __fmaxmag (double __x, double __y) throw () __attribute__ ((__const__)); 6011: 6011: 6011: extern double fminmag (double __x, double __y) throw () __attribute__ ((__const__)); extern double __fminmag (double __x, double __y) throw () __attribute__ ((__const__)); 6011: 6011: 6011: extern int totalorder (double __x, double __y) throw () 6011: __attribute__ ((__const__)); 6011: 6011: 6011: extern int totalordermag (double __x, double __y) throw () 6011: __attribute__ ((__const__)); 6011: 6011: 6011: extern int canonicalize (double *__cx, const double *__x) throw (); 6011: 6011: 6011: extern double getpayload (const double *__x) throw (); extern double __getpayload (const double *__x) throw (); 6011: 6011: 6011: extern int setpayload (double *__x, double __payload) throw (); 6011: 6011: 6011: extern int setpayloadsig (double *__x, double __payload) throw (); 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: extern double scalb (double __x, double __n) throw (); extern double __scalb (double __x, double __n) throw (); 6011: # 225 "/usr/include/math.h" 2 3 4 6011: # 243 "/usr/include/math.h" 3 4 6011: # 1 "/usr/include/arm-linux-gnueabihf/bits/mathcalls-helper-functions.h" 1 3 4 6011: # 21 "/usr/include/arm-linux-gnueabihf/bits/mathcalls-helper-functions.h" 3 4 6011: extern int __fpclassifyf (float __value) throw () 6011: __attribute__ ((__const__)); 6011: 6011: 6011: extern int __signbitf (float __value) throw () 6011: __attribute__ ((__const__)); 6011: 6011: 6011: 6011: extern int __isinff (float __value) throw () __attribute__ ((__const__)); 6011: 6011: 6011: extern int __finitef (float __value) throw () __attribute__ ((__const__)); 6011: 6011: 6011: extern int __isnanf (float __value) throw () __attribute__ ((__const__)); 6011: 6011: 6011: extern int __iseqsigf (float __x, float __y) throw (); 6011: 6011: 6011: extern int __issignalingf (float __value) throw () 6011: __attribute__ ((__const__)); 6011: # 244 "/usr/include/math.h" 2 3 4 6011: # 1 "/usr/include/arm-linux-gnueabihf/bits/mathcalls.h" 1 3 4 6011: # 53 "/usr/include/arm-linux-gnueabihf/bits/mathcalls.h" 3 4 6011: extern float acosf (float __x) throw (); extern float __acosf (float __x) throw (); 6011: 6011: extern float asinf (float __x) throw (); extern float __asinf (float __x) throw (); 6011: 6011: extern float atanf (float __x) throw (); extern float __atanf (float __x) throw (); 6011: 6011: extern float atan2f (float __y, float __x) throw (); extern float __atan2f (float __y, float __x) throw (); 6011: 6011: 6011: extern float cosf (float __x) throw (); extern float __cosf (float __x) throw (); 6011: 6011: extern float sinf (float __x) throw (); extern float __sinf (float __x) throw (); 6011: 6011: extern float tanf (float __x) throw (); extern float __tanf (float __x) throw (); 6011: 6011: 6011: 6011: 6011: extern float coshf (float __x) throw (); extern float __coshf (float __x) throw (); 6011: 6011: extern float sinhf (float __x) throw (); extern float __sinhf (float __x) throw (); 6011: 6011: extern float tanhf (float __x) throw (); extern float __tanhf (float __x) throw (); 6011: 6011: 6011: 6011: extern void sincosf (float __x, float *__sinx, float *__cosx) throw (); extern void __sincosf (float __x, float *__sinx, float *__cosx) throw () 6011: ; 6011: 6011: 6011: 6011: 6011: extern float acoshf (float __x) throw (); extern float __acoshf (float __x) throw (); 6011: 6011: extern float asinhf (float __x) throw (); extern float __asinhf (float __x) throw (); 6011: 6011: extern float atanhf (float __x) throw (); extern float __atanhf (float __x) throw (); 6011: 6011: 6011: 6011: 6011: 6011: extern float expf (float __x) throw (); extern float __expf (float __x) throw (); 6011: 6011: 6011: extern float frexpf (float __x, int *__exponent) throw (); extern float __frexpf (float __x, int *__exponent) throw (); 6011: 6011: 6011: extern float ldexpf (float __x, int __exponent) throw (); extern float __ldexpf (float __x, int __exponent) throw (); 6011: 6011: 6011: extern float logf (float __x) throw (); extern float __logf (float __x) throw (); 6011: 6011: 6011: extern float log10f (float __x) throw (); extern float __log10f (float __x) throw (); 6011: 6011: 6011: extern float modff (float __x, float *__iptr) throw (); extern float __modff (float __x, float *__iptr) throw () __attribute__ ((__nonnull__ (2))); 6011: 6011: 6011: 6011: extern float exp10f (float __x) throw (); extern float __exp10f (float __x) throw (); 6011: 6011: 6011: 6011: 6011: extern float pow10f (float __x) throw (); extern float __pow10f (float __x) throw (); 6011: 6011: 6011: 6011: 6011: 6011: extern float expm1f (float __x) throw (); extern float __expm1f (float __x) throw (); 6011: 6011: 6011: extern float log1pf (float __x) throw (); extern float __log1pf (float __x) throw (); 6011: 6011: 6011: extern float logbf (float __x) throw (); extern float __logbf (float __x) throw (); 6011: 6011: 6011: 6011: 6011: extern float exp2f (float __x) throw (); extern float __exp2f (float __x) throw (); 6011: 6011: 6011: extern float log2f (float __x) throw (); extern float __log2f (float __x) throw (); 6011: 6011: 6011: 6011: 6011: 6011: 6011: extern float powf (float __x, float __y) throw (); extern float __powf (float __x, float __y) throw (); 6011: 6011: 6011: extern float sqrtf (float __x) throw (); extern float __sqrtf (float __x) throw (); 6011: 6011: 6011: 6011: extern float hypotf (float __x, float __y) throw (); extern float __hypotf (float __x, float __y) throw (); 6011: 6011: 6011: 6011: 6011: extern float cbrtf (float __x) throw (); extern float __cbrtf (float __x) throw (); 6011: 6011: 6011: 6011: 6011: 6011: 6011: extern float ceilf (float __x) throw () __attribute__ ((__const__)); extern float __ceilf (float __x) throw () __attribute__ ((__const__)); 6011: 6011: 6011: extern float fabsf (float __x) throw () __attribute__ ((__const__)); extern float __fabsf (float __x) throw () __attribute__ ((__const__)); 6011: 6011: 6011: extern float floorf (float __x) throw () __attribute__ ((__const__)); extern float __floorf (float __x) throw () __attribute__ ((__const__)); 6011: 6011: 6011: extern float fmodf (float __x, float __y) throw (); extern float __fmodf (float __x, float __y) throw (); 6011: # 183 "/usr/include/arm-linux-gnueabihf/bits/mathcalls.h" 3 4 6011: extern int isinff (float __value) throw () __attribute__ ((__const__)); 6011: 6011: 6011: 6011: 6011: extern int finitef (float __value) throw () __attribute__ ((__const__)); 6011: 6011: 6011: extern float dremf (float __x, float __y) throw (); extern float __dremf (float __x, float __y) throw (); 6011: 6011: 6011: 6011: extern float significandf (float __x) throw (); extern float __significandf (float __x) throw (); 6011: 6011: 6011: 6011: 6011: 6011: 6011: extern float copysignf (float __x, float __y) throw () __attribute__ ((__const__)); extern float __copysignf (float __x, float __y) throw () __attribute__ ((__const__)); 6011: 6011: 6011: 6011: 6011: extern float nanf (const char *__tagb) throw () __attribute__ ((__const__)); extern float __nanf (const char *__tagb) throw () __attribute__ ((__const__)); 6011: # 217 "/usr/include/arm-linux-gnueabihf/bits/mathcalls.h" 3 4 6011: extern int isnanf (float __value) throw () __attribute__ ((__const__)); 6011: 6011: 6011: 6011: 6011: 6011: extern float j0f (float) throw (); extern float __j0f (float) throw (); 6011: extern float j1f (float) throw (); extern float __j1f (float) throw (); 6011: extern float jnf (int, float) throw (); extern float __jnf (int, float) throw (); 6011: extern float y0f (float) throw (); extern float __y0f (float) throw (); 6011: extern float y1f (float) throw (); extern float __y1f (float) throw (); 6011: extern float ynf (int, float) throw (); extern float __ynf (int, float) throw (); 6011: 6011: 6011: 6011: 6011: 6011: extern float erff (float) throw (); extern float __erff (float) throw (); 6011: extern float erfcf (float) throw (); extern float __erfcf (float) throw (); 6011: extern float lgammaf (float) throw (); extern float __lgammaf (float) throw (); 6011: 6011: 6011: 6011: 6011: extern float tgammaf (float) throw (); extern float __tgammaf (float) throw (); 6011: 6011: 6011: 6011: 6011: 6011: extern float gammaf (float) throw (); extern float __gammaf (float) throw (); 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: extern float lgammaf_r (float, int *__signgamp) throw (); extern float __lgammaf_r (float, int *__signgamp) throw (); 6011: 6011: 6011: 6011: 6011: 6011: 6011: extern float rintf (float __x) throw (); extern float __rintf (float __x) throw (); 6011: 6011: 6011: extern float nextafterf (float __x, float __y) throw () __attribute__ ((__const__)); extern float __nextafterf (float __x, float __y) throw () __attribute__ ((__const__)); 6011: 6011: extern float nexttowardf (float __x, long double __y) throw () __attribute__ ((__const__)); extern float __nexttowardf (float __x, long double __y) throw () __attribute__ ((__const__)); 6011: 6011: 6011: 6011: 6011: extern float nextdownf (float __x) throw (); extern float __nextdownf (float __x) throw (); 6011: 6011: extern float nextupf (float __x) throw (); extern float __nextupf (float __x) throw (); 6011: 6011: 6011: 6011: extern float remainderf (float __x, float __y) throw (); extern float __remainderf (float __x, float __y) throw (); 6011: 6011: 6011: 6011: extern float scalbnf (float __x, int __n) throw (); extern float __scalbnf (float __x, int __n) throw (); 6011: 6011: 6011: 6011: extern int ilogbf (float __x) throw (); extern int __ilogbf (float __x) throw (); 6011: 6011: 6011: 6011: 6011: extern long int llogbf (float __x) throw (); extern long int __llogbf (float __x) throw (); 6011: 6011: 6011: 6011: 6011: extern float scalblnf (float __x, long int __n) throw (); extern float __scalblnf (float __x, long int __n) throw (); 6011: 6011: 6011: 6011: extern float nearbyintf (float __x) throw (); extern float __nearbyintf (float __x) throw (); 6011: 6011: 6011: 6011: extern float roundf (float __x) throw () __attribute__ ((__const__)); extern float __roundf (float __x) throw () __attribute__ ((__const__)); 6011: 6011: 6011: 6011: extern float truncf (float __x) throw () __attribute__ ((__const__)); extern float __truncf (float __x) throw () __attribute__ ((__const__)); 6011: 6011: 6011: 6011: 6011: extern float remquof (float __x, float __y, int *__quo) throw (); extern float __remquof (float __x, float __y, int *__quo) throw (); 6011: 6011: 6011: 6011: 6011: 6011: 6011: extern long int lrintf (float __x) throw (); extern long int __lrintf (float __x) throw (); 6011: __extension__ 6011: extern long long int llrintf (float __x) throw (); extern long long int __llrintf (float __x) throw (); 6011: 6011: 6011: 6011: extern long int lroundf (float __x) throw (); extern long int __lroundf (float __x) throw (); 6011: __extension__ 6011: extern long long int llroundf (float __x) throw (); extern long long int __llroundf (float __x) throw (); 6011: 6011: 6011: 6011: extern float fdimf (float __x, float __y) throw (); extern float __fdimf (float __x, float __y) throw (); 6011: 6011: 6011: extern float fmaxf (float __x, float __y) throw () __attribute__ ((__const__)); extern float __fmaxf (float __x, float __y) throw () __attribute__ ((__const__)); 6011: 6011: 6011: extern float fminf (float __x, float __y) throw () __attribute__ ((__const__)); extern float __fminf (float __x, float __y) throw () __attribute__ ((__const__)); 6011: 6011: 6011: extern float fmaf (float __x, float __y, float __z) throw (); extern float __fmaf (float __x, float __y, float __z) throw (); 6011: 6011: 6011: 6011: 6011: extern float roundevenf (float __x) throw () __attribute__ ((__const__)); extern float __roundevenf (float __x) throw () __attribute__ ((__const__)); 6011: 6011: 6011: 6011: extern __intmax_t fromfpf (float __x, int __round, unsigned int __width) throw (); extern __intmax_t __fromfpf (float __x, int __round, unsigned int __width) throw () 6011: ; 6011: 6011: 6011: 6011: extern __uintmax_t ufromfpf (float __x, int __round, unsigned int __width) throw (); extern __uintmax_t __ufromfpf (float __x, int __round, unsigned int __width) throw () 6011: ; 6011: 6011: 6011: 6011: 6011: extern __intmax_t fromfpxf (float __x, int __round, unsigned int __width) throw (); extern __intmax_t __fromfpxf (float __x, int __round, unsigned int __width) throw () 6011: ; 6011: 6011: 6011: 6011: 6011: extern __uintmax_t ufromfpxf (float __x, int __round, unsigned int __width) throw (); extern __uintmax_t __ufromfpxf (float __x, int __round, unsigned int __width) throw () 6011: ; 6011: 6011: 6011: extern float fmaxmagf (float __x, float __y) throw () __attribute__ ((__const__)); extern float __fmaxmagf (float __x, float __y) throw () __attribute__ ((__const__)); 6011: 6011: 6011: extern float fminmagf (float __x, float __y) throw () __attribute__ ((__const__)); extern float __fminmagf (float __x, float __y) throw () __attribute__ ((__const__)); 6011: 6011: 6011: extern int totalorderf (float __x, float __y) throw () 6011: __attribute__ ((__const__)); 6011: 6011: 6011: extern int totalordermagf (float __x, float __y) throw () 6011: __attribute__ ((__const__)); 6011: 6011: 6011: extern int canonicalizef (float *__cx, const float *__x) throw (); 6011: 6011: 6011: extern float getpayloadf (const float *__x) throw (); extern float __getpayloadf (const float *__x) throw (); 6011: 6011: 6011: extern int setpayloadf (float *__x, float __payload) throw (); 6011: 6011: 6011: extern int setpayloadsigf (float *__x, float __payload) throw (); 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: extern float scalbf (float __x, float __n) throw (); extern float __scalbf (float __x, float __n) throw (); 6011: # 245 "/usr/include/math.h" 2 3 4 6011: # 289 "/usr/include/math.h" 3 4 6011: # 1 "/usr/include/arm-linux-gnueabihf/bits/mathcalls-helper-functions.h" 1 3 4 6011: # 21 "/usr/include/arm-linux-gnueabihf/bits/mathcalls-helper-functions.h" 3 4 6011: extern int __fpclassifyl (long double __value) throw () 6011: __attribute__ ((__const__)); 6011: 6011: 6011: extern int __signbitl (long double __value) throw () 6011: __attribute__ ((__const__)); 6011: 6011: 6011: 6011: extern int __isinfl (long double __value) throw () __attribute__ ((__const__)); 6011: 6011: 6011: extern int __finitel (long double __value) throw () __attribute__ ((__const__)); 6011: 6011: 6011: extern int __isnanl (long double __value) throw () __attribute__ ((__const__)); 6011: 6011: 6011: extern int __iseqsigl (long double __x, long double __y) throw (); 6011: 6011: 6011: extern int __issignalingl (long double __value) throw () 6011: __attribute__ ((__const__)); 6011: # 290 "/usr/include/math.h" 2 3 4 6011: # 1 "/usr/include/arm-linux-gnueabihf/bits/mathcalls.h" 1 3 4 6011: # 53 "/usr/include/arm-linux-gnueabihf/bits/mathcalls.h" 3 4 6011: extern long double acosl (long double __x) throw (); extern long double __acosl (long double __x) throw (); 6011: 6011: extern long double asinl (long double __x) throw (); extern long double __asinl (long double __x) throw (); 6011: 6011: extern long double atanl (long double __x) throw (); extern long double __atanl (long double __x) throw (); 6011: 6011: extern long double atan2l (long double __y, long double __x) throw (); extern long double __atan2l (long double __y, long double __x) throw (); 6011: 6011: 6011: extern long double cosl (long double __x) throw (); extern long double __cosl (long double __x) throw (); 6011: 6011: extern long double sinl (long double __x) throw (); extern long double __sinl (long double __x) throw (); 6011: 6011: extern long double tanl (long double __x) throw (); extern long double __tanl (long double __x) throw (); 6011: 6011: 6011: 6011: 6011: extern long double coshl (long double __x) throw (); extern long double __coshl (long double __x) throw (); 6011: 6011: extern long double sinhl (long double __x) throw (); extern long double __sinhl (long double __x) throw (); 6011: 6011: extern long double tanhl (long double __x) throw (); extern long double __tanhl (long double __x) throw (); 6011: 6011: 6011: 6011: 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 () 6011: ; 6011: 6011: 6011: 6011: 6011: extern long double acoshl (long double __x) throw (); extern long double __acoshl (long double __x) throw (); 6011: 6011: extern long double asinhl (long double __x) throw (); extern long double __asinhl (long double __x) throw (); 6011: 6011: extern long double atanhl (long double __x) throw (); extern long double __atanhl (long double __x) throw (); 6011: 6011: 6011: 6011: 6011: 6011: extern long double expl (long double __x) throw (); extern long double __expl (long double __x) throw (); 6011: 6011: 6011: extern long double frexpl (long double __x, int *__exponent) throw (); extern long double __frexpl (long double __x, int *__exponent) throw (); 6011: 6011: 6011: extern long double ldexpl (long double __x, int __exponent) throw (); extern long double __ldexpl (long double __x, int __exponent) throw (); 6011: 6011: 6011: extern long double logl (long double __x) throw (); extern long double __logl (long double __x) throw (); 6011: 6011: 6011: extern long double log10l (long double __x) throw (); extern long double __log10l (long double __x) throw (); 6011: 6011: 6011: 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))); 6011: 6011: 6011: 6011: extern long double exp10l (long double __x) throw (); extern long double __exp10l (long double __x) throw (); 6011: 6011: 6011: 6011: 6011: extern long double pow10l (long double __x) throw (); extern long double __pow10l (long double __x) throw (); 6011: 6011: 6011: 6011: 6011: 6011: extern long double expm1l (long double __x) throw (); extern long double __expm1l (long double __x) throw (); 6011: 6011: 6011: extern long double log1pl (long double __x) throw (); extern long double __log1pl (long double __x) throw (); 6011: 6011: 6011: extern long double logbl (long double __x) throw (); extern long double __logbl (long double __x) throw (); 6011: 6011: 6011: 6011: 6011: extern long double exp2l (long double __x) throw (); extern long double __exp2l (long double __x) throw (); 6011: 6011: 6011: extern long double log2l (long double __x) throw (); extern long double __log2l (long double __x) throw (); 6011: 6011: 6011: 6011: 6011: 6011: 6011: extern long double powl (long double __x, long double __y) throw (); extern long double __powl (long double __x, long double __y) throw (); 6011: 6011: 6011: extern long double sqrtl (long double __x) throw (); extern long double __sqrtl (long double __x) throw (); 6011: 6011: 6011: 6011: extern long double hypotl (long double __x, long double __y) throw (); extern long double __hypotl (long double __x, long double __y) throw (); 6011: 6011: 6011: 6011: 6011: extern long double cbrtl (long double __x) throw (); extern long double __cbrtl (long double __x) throw (); 6011: 6011: 6011: 6011: 6011: 6011: 6011: extern long double ceill (long double __x) throw () __attribute__ ((__const__)); extern long double __ceill (long double __x) throw () __attribute__ ((__const__)); 6011: 6011: 6011: extern long double fabsl (long double __x) throw () __attribute__ ((__const__)); extern long double __fabsl (long double __x) throw () __attribute__ ((__const__)); 6011: 6011: 6011: extern long double floorl (long double __x) throw () __attribute__ ((__const__)); extern long double __floorl (long double __x) throw () __attribute__ ((__const__)); 6011: 6011: 6011: extern long double fmodl (long double __x, long double __y) throw (); extern long double __fmodl (long double __x, long double __y) throw (); 6011: # 183 "/usr/include/arm-linux-gnueabihf/bits/mathcalls.h" 3 4 6011: extern int isinfl (long double __value) throw () __attribute__ ((__const__)); 6011: 6011: 6011: 6011: 6011: extern int finitel (long double __value) throw () __attribute__ ((__const__)); 6011: 6011: 6011: extern long double dreml (long double __x, long double __y) throw (); extern long double __dreml (long double __x, long double __y) throw (); 6011: 6011: 6011: 6011: extern long double significandl (long double __x) throw (); extern long double __significandl (long double __x) throw (); 6011: 6011: 6011: 6011: 6011: 6011: 6011: 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__)); 6011: 6011: 6011: 6011: 6011: extern long double nanl (const char *__tagb) throw () __attribute__ ((__const__)); extern long double __nanl (const char *__tagb) throw () __attribute__ ((__const__)); 6011: # 217 "/usr/include/arm-linux-gnueabihf/bits/mathcalls.h" 3 4 6011: extern int isnanl (long double __value) throw () __attribute__ ((__const__)); 6011: 6011: 6011: 6011: 6011: 6011: extern long double j0l (long double) throw (); extern long double __j0l (long double) throw (); 6011: extern long double j1l (long double) throw (); extern long double __j1l (long double) throw (); 6011: extern long double jnl (int, long double) throw (); extern long double __jnl (int, long double) throw (); 6011: extern long double y0l (long double) throw (); extern long double __y0l (long double) throw (); 6011: extern long double y1l (long double) throw (); extern long double __y1l (long double) throw (); 6011: extern long double ynl (int, long double) throw (); extern long double __ynl (int, long double) throw (); 6011: 6011: 6011: 6011: 6011: 6011: extern long double erfl (long double) throw (); extern long double __erfl (long double) throw (); 6011: extern long double erfcl (long double) throw (); extern long double __erfcl (long double) throw (); 6011: extern long double lgammal (long double) throw (); extern long double __lgammal (long double) throw (); 6011: 6011: 6011: 6011: 6011: extern long double tgammal (long double) throw (); extern long double __tgammal (long double) throw (); 6011: 6011: 6011: 6011: 6011: 6011: extern long double gammal (long double) throw (); extern long double __gammal (long double) throw (); 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: extern long double lgammal_r (long double, int *__signgamp) throw (); extern long double __lgammal_r (long double, int *__signgamp) throw (); 6011: 6011: 6011: 6011: 6011: 6011: 6011: extern long double rintl (long double __x) throw (); extern long double __rintl (long double __x) throw (); 6011: 6011: 6011: 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__)); 6011: 6011: 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__)); 6011: 6011: 6011: 6011: 6011: extern long double nextdownl (long double __x) throw (); extern long double __nextdownl (long double __x) throw (); 6011: 6011: extern long double nextupl (long double __x) throw (); extern long double __nextupl (long double __x) throw (); 6011: 6011: 6011: 6011: extern long double remainderl (long double __x, long double __y) throw (); extern long double __remainderl (long double __x, long double __y) throw (); 6011: 6011: 6011: 6011: extern long double scalbnl (long double __x, int __n) throw (); extern long double __scalbnl (long double __x, int __n) throw (); 6011: 6011: 6011: 6011: extern int ilogbl (long double __x) throw (); extern int __ilogbl (long double __x) throw (); 6011: 6011: 6011: 6011: 6011: extern long int llogbl (long double __x) throw (); extern long int __llogbl (long double __x) throw (); 6011: 6011: 6011: 6011: 6011: extern long double scalblnl (long double __x, long int __n) throw (); extern long double __scalblnl (long double __x, long int __n) throw (); 6011: 6011: 6011: 6011: extern long double nearbyintl (long double __x) throw (); extern long double __nearbyintl (long double __x) throw (); 6011: 6011: 6011: 6011: extern long double roundl (long double __x) throw () __attribute__ ((__const__)); extern long double __roundl (long double __x) throw () __attribute__ ((__const__)); 6011: 6011: 6011: 6011: extern long double truncl (long double __x) throw () __attribute__ ((__const__)); extern long double __truncl (long double __x) throw () __attribute__ ((__const__)); 6011: 6011: 6011: 6011: 6011: 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 (); 6011: 6011: 6011: 6011: 6011: 6011: 6011: extern long int lrintl (long double __x) throw (); extern long int __lrintl (long double __x) throw (); 6011: __extension__ 6011: extern long long int llrintl (long double __x) throw (); extern long long int __llrintl (long double __x) throw (); 6011: 6011: 6011: 6011: extern long int lroundl (long double __x) throw (); extern long int __lroundl (long double __x) throw (); 6011: __extension__ 6011: extern long long int llroundl (long double __x) throw (); extern long long int __llroundl (long double __x) throw (); 6011: 6011: 6011: 6011: extern long double fdiml (long double __x, long double __y) throw (); extern long double __fdiml (long double __x, long double __y) throw (); 6011: 6011: 6011: 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__)); 6011: 6011: 6011: 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__)); 6011: 6011: 6011: 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 (); 6011: 6011: 6011: 6011: 6011: extern long double roundevenl (long double __x) throw () __attribute__ ((__const__)); extern long double __roundevenl (long double __x) throw () __attribute__ ((__const__)); 6011: 6011: 6011: 6011: 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 () 6011: ; 6011: 6011: 6011: 6011: 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 () 6011: ; 6011: 6011: 6011: 6011: 6011: 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 () 6011: ; 6011: 6011: 6011: 6011: 6011: 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 () 6011: ; 6011: 6011: 6011: 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__)); 6011: 6011: 6011: 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__)); 6011: 6011: 6011: extern int totalorderl (long double __x, long double __y) throw () 6011: __attribute__ ((__const__)); 6011: 6011: 6011: extern int totalordermagl (long double __x, long double __y) throw () 6011: __attribute__ ((__const__)); 6011: 6011: 6011: extern int canonicalizel (long double *__cx, const long double *__x) throw (); 6011: 6011: 6011: extern long double getpayloadl (const long double *__x) throw (); extern long double __getpayloadl (const long double *__x) throw (); 6011: 6011: 6011: extern int setpayloadl (long double *__x, long double __payload) throw (); 6011: 6011: 6011: extern int setpayloadsigl (long double *__x, long double __payload) throw (); 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: extern long double scalbl (long double __x, long double __n) throw (); extern long double __scalbl (long double __x, long double __n) throw (); 6011: # 291 "/usr/include/math.h" 2 3 4 6011: # 330 "/usr/include/math.h" 3 4 6011: extern int signgam; 6011: # 380 "/usr/include/math.h" 3 4 6011: enum 6011: { 6011: FP_NAN = 6011: 6011: 0, 6011: FP_INFINITE = 6011: 6011: 1, 6011: FP_ZERO = 6011: 6011: 2, 6011: FP_SUBNORMAL = 6011: 6011: 3, 6011: FP_NORMAL = 6011: 6011: 4 6011: }; 6011: # 480 "/usr/include/math.h" 3 4 6011: # 1 "/usr/include/arm-linux-gnueabihf/bits/iscanonical.h" 1 3 4 6011: # 481 "/usr/include/math.h" 2 3 4 6011: # 492 "/usr/include/math.h" 3 4 6011: extern "C++" { 6011: inline int issignaling (float __val) { return __issignalingf (__val); } 6011: inline int issignaling (double __val) { return __issignaling (__val); } 6011: inline int 6011: issignaling (long double __val) 6011: { 6011: 6011: return __issignaling (__val); 6011: 6011: 6011: 6011: } 6011: 6011: 6011: 6011: } 6011: # 521 "/usr/include/math.h" 3 4 6011: extern "C++" { 6011: # 550 "/usr/include/math.h" 3 4 6011: template inline bool 6011: iszero (__T __val) 6011: { 6011: return __val == 0; 6011: } 6011: 6011: } 6011: 6011: 6011: 6011: 6011: 6011: typedef enum 6011: { 6011: _IEEE_ = -1, 6011: _SVID_, 6011: _XOPEN_, 6011: _POSIX_, 6011: _ISOC_ 6011: } _LIB_VERSION_TYPE; 6011: 6011: 6011: 6011: 6011: extern _LIB_VERSION_TYPE _LIB_VERSION; 6011: # 585 "/usr/include/math.h" 3 4 6011: struct __exception 6011: 6011: 6011: 6011: { 6011: int type; 6011: char *name; 6011: double arg1; 6011: double arg2; 6011: double retval; 6011: }; 6011: 6011: 6011: extern int matherr (struct __exception *__exc) throw (); 6011: # 702 "/usr/include/math.h" 3 4 6011: # 1 "/usr/include/arm-linux-gnueabihf/bits/mathinline.h" 1 3 4 6011: # 703 "/usr/include/math.h" 2 3 4 6011: # 843 "/usr/include/math.h" 3 4 6011: } 6011: # 46 "/usr/include/c++/8/cmath" 2 3 6011: # 77 "/usr/include/c++/8/cmath" 3 6011: extern "C++" 6011: { 6011: namespace std __attribute__ ((__visibility__ ("default"))) 6011: { 6011: 6011: 6011: using ::acos; 6011: 6011: 6011: inline constexpr float 6011: acos(float __x) 6011: { return __builtin_acosf(__x); } 6011: 6011: inline constexpr long double 6011: acos(long double __x) 6011: { return __builtin_acosl(__x); } 6011: 6011: 6011: template 6011: inline constexpr 6011: typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, 6011: double>::__type 6011: acos(_Tp __x) 6011: { return __builtin_acos(__x); } 6011: 6011: using ::asin; 6011: 6011: 6011: inline constexpr float 6011: asin(float __x) 6011: { return __builtin_asinf(__x); } 6011: 6011: inline constexpr long double 6011: asin(long double __x) 6011: { return __builtin_asinl(__x); } 6011: 6011: 6011: template 6011: inline constexpr 6011: typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, 6011: double>::__type 6011: asin(_Tp __x) 6011: { return __builtin_asin(__x); } 6011: 6011: using ::atan; 6011: 6011: 6011: inline constexpr float 6011: atan(float __x) 6011: { return __builtin_atanf(__x); } 6011: 6011: inline constexpr long double 6011: atan(long double __x) 6011: { return __builtin_atanl(__x); } 6011: 6011: 6011: template 6011: inline constexpr 6011: typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, 6011: double>::__type 6011: atan(_Tp __x) 6011: { return __builtin_atan(__x); } 6011: 6011: using ::atan2; 6011: 6011: 6011: inline constexpr float 6011: atan2(float __y, float __x) 6011: { return __builtin_atan2f(__y, __x); } 6011: 6011: inline constexpr long double 6011: atan2(long double __y, long double __x) 6011: { return __builtin_atan2l(__y, __x); } 6011: 6011: 6011: template 6011: inline constexpr 6011: typename __gnu_cxx::__promote_2<_Tp, _Up>::__type 6011: atan2(_Tp __y, _Up __x) 6011: { 6011: typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; 6011: return atan2(__type(__y), __type(__x)); 6011: } 6011: 6011: using ::ceil; 6011: 6011: 6011: inline constexpr float 6011: ceil(float __x) 6011: { return __builtin_ceilf(__x); } 6011: 6011: inline constexpr long double 6011: ceil(long double __x) 6011: { return __builtin_ceill(__x); } 6011: 6011: 6011: template 6011: inline constexpr 6011: typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, 6011: double>::__type 6011: ceil(_Tp __x) 6011: { return __builtin_ceil(__x); } 6011: 6011: using ::cos; 6011: 6011: 6011: inline constexpr float 6011: cos(float __x) 6011: { return __builtin_cosf(__x); } 6011: 6011: inline constexpr long double 6011: cos(long double __x) 6011: { return __builtin_cosl(__x); } 6011: 6011: 6011: template 6011: inline constexpr 6011: typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, 6011: double>::__type 6011: cos(_Tp __x) 6011: { return __builtin_cos(__x); } 6011: 6011: using ::cosh; 6011: 6011: 6011: inline constexpr float 6011: cosh(float __x) 6011: { return __builtin_coshf(__x); } 6011: 6011: inline constexpr long double 6011: cosh(long double __x) 6011: { return __builtin_coshl(__x); } 6011: 6011: 6011: template 6011: inline constexpr 6011: typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, 6011: double>::__type 6011: cosh(_Tp __x) 6011: { return __builtin_cosh(__x); } 6011: 6011: using ::exp; 6011: 6011: 6011: inline constexpr float 6011: exp(float __x) 6011: { return __builtin_expf(__x); } 6011: 6011: inline constexpr long double 6011: exp(long double __x) 6011: { return __builtin_expl(__x); } 6011: 6011: 6011: template 6011: inline constexpr 6011: typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, 6011: double>::__type 6011: exp(_Tp __x) 6011: { return __builtin_exp(__x); } 6011: 6011: using ::fabs; 6011: 6011: 6011: inline constexpr float 6011: fabs(float __x) 6011: { return __builtin_fabsf(__x); } 6011: 6011: inline constexpr long double 6011: fabs(long double __x) 6011: { return __builtin_fabsl(__x); } 6011: 6011: 6011: template 6011: inline constexpr 6011: typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, 6011: double>::__type 6011: fabs(_Tp __x) 6011: { return __builtin_fabs(__x); } 6011: 6011: using ::floor; 6011: 6011: 6011: inline constexpr float 6011: floor(float __x) 6011: { return __builtin_floorf(__x); } 6011: 6011: inline constexpr long double 6011: floor(long double __x) 6011: { return __builtin_floorl(__x); } 6011: 6011: 6011: template 6011: inline constexpr 6011: typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, 6011: double>::__type 6011: floor(_Tp __x) 6011: { return __builtin_floor(__x); } 6011: 6011: using ::fmod; 6011: 6011: 6011: inline constexpr float 6011: fmod(float __x, float __y) 6011: { return __builtin_fmodf(__x, __y); } 6011: 6011: inline constexpr long double 6011: fmod(long double __x, long double __y) 6011: { return __builtin_fmodl(__x, __y); } 6011: 6011: 6011: template 6011: inline constexpr 6011: typename __gnu_cxx::__promote_2<_Tp, _Up>::__type 6011: fmod(_Tp __x, _Up __y) 6011: { 6011: typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; 6011: return fmod(__type(__x), __type(__y)); 6011: } 6011: 6011: using ::frexp; 6011: 6011: 6011: inline float 6011: frexp(float __x, int* __exp) 6011: { return __builtin_frexpf(__x, __exp); } 6011: 6011: inline long double 6011: frexp(long double __x, int* __exp) 6011: { return __builtin_frexpl(__x, __exp); } 6011: 6011: 6011: template 6011: inline constexpr 6011: typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, 6011: double>::__type 6011: frexp(_Tp __x, int* __exp) 6011: { return __builtin_frexp(__x, __exp); } 6011: 6011: using ::ldexp; 6011: 6011: 6011: inline constexpr float 6011: ldexp(float __x, int __exp) 6011: { return __builtin_ldexpf(__x, __exp); } 6011: 6011: inline constexpr long double 6011: ldexp(long double __x, int __exp) 6011: { return __builtin_ldexpl(__x, __exp); } 6011: 6011: 6011: template 6011: inline constexpr 6011: typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, 6011: double>::__type 6011: ldexp(_Tp __x, int __exp) 6011: { return __builtin_ldexp(__x, __exp); } 6011: 6011: using ::log; 6011: 6011: 6011: inline constexpr float 6011: log(float __x) 6011: { return __builtin_logf(__x); } 6011: 6011: inline constexpr long double 6011: log(long double __x) 6011: { return __builtin_logl(__x); } 6011: 6011: 6011: template 6011: inline constexpr 6011: typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, 6011: double>::__type 6011: log(_Tp __x) 6011: { return __builtin_log(__x); } 6011: 6011: using ::log10; 6011: 6011: 6011: inline constexpr float 6011: log10(float __x) 6011: { return __builtin_log10f(__x); } 6011: 6011: inline constexpr long double 6011: log10(long double __x) 6011: { return __builtin_log10l(__x); } 6011: 6011: 6011: template 6011: inline constexpr 6011: typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, 6011: double>::__type 6011: log10(_Tp __x) 6011: { return __builtin_log10(__x); } 6011: 6011: using ::modf; 6011: 6011: 6011: inline float 6011: modf(float __x, float* __iptr) 6011: { return __builtin_modff(__x, __iptr); } 6011: 6011: inline long double 6011: modf(long double __x, long double* __iptr) 6011: { return __builtin_modfl(__x, __iptr); } 6011: 6011: 6011: using ::pow; 6011: 6011: 6011: inline constexpr float 6011: pow(float __x, float __y) 6011: { return __builtin_powf(__x, __y); } 6011: 6011: inline constexpr long double 6011: pow(long double __x, long double __y) 6011: { return __builtin_powl(__x, __y); } 6011: # 412 "/usr/include/c++/8/cmath" 3 6011: template 6011: inline constexpr 6011: typename __gnu_cxx::__promote_2<_Tp, _Up>::__type 6011: pow(_Tp __x, _Up __y) 6011: { 6011: typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; 6011: return pow(__type(__x), __type(__y)); 6011: } 6011: 6011: using ::sin; 6011: 6011: 6011: inline constexpr float 6011: sin(float __x) 6011: { return __builtin_sinf(__x); } 6011: 6011: inline constexpr long double 6011: sin(long double __x) 6011: { return __builtin_sinl(__x); } 6011: 6011: 6011: template 6011: inline constexpr 6011: typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, 6011: double>::__type 6011: sin(_Tp __x) 6011: { return __builtin_sin(__x); } 6011: 6011: using ::sinh; 6011: 6011: 6011: inline constexpr float 6011: sinh(float __x) 6011: { return __builtin_sinhf(__x); } 6011: 6011: inline constexpr long double 6011: sinh(long double __x) 6011: { return __builtin_sinhl(__x); } 6011: 6011: 6011: template 6011: inline constexpr 6011: typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, 6011: double>::__type 6011: sinh(_Tp __x) 6011: { return __builtin_sinh(__x); } 6011: 6011: using ::sqrt; 6011: 6011: 6011: inline constexpr float 6011: sqrt(float __x) 6011: { return __builtin_sqrtf(__x); } 6011: 6011: inline constexpr long double 6011: sqrt(long double __x) 6011: { return __builtin_sqrtl(__x); } 6011: 6011: 6011: template 6011: inline constexpr 6011: typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, 6011: double>::__type 6011: sqrt(_Tp __x) 6011: { return __builtin_sqrt(__x); } 6011: 6011: using ::tan; 6011: 6011: 6011: inline constexpr float 6011: tan(float __x) 6011: { return __builtin_tanf(__x); } 6011: 6011: inline constexpr long double 6011: tan(long double __x) 6011: { return __builtin_tanl(__x); } 6011: 6011: 6011: template 6011: inline constexpr 6011: typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, 6011: double>::__type 6011: tan(_Tp __x) 6011: { return __builtin_tan(__x); } 6011: 6011: using ::tanh; 6011: 6011: 6011: inline constexpr float 6011: tanh(float __x) 6011: { return __builtin_tanhf(__x); } 6011: 6011: inline constexpr long double 6011: tanh(long double __x) 6011: { return __builtin_tanhl(__x); } 6011: 6011: 6011: template 6011: inline constexpr 6011: typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, 6011: double>::__type 6011: tanh(_Tp __x) 6011: { return __builtin_tanh(__x); } 6011: # 536 "/usr/include/c++/8/cmath" 3 6011: constexpr int 6011: fpclassify(float __x) 6011: { return __builtin_fpclassify(0, 1, 4, 6011: 3, 2, __x); } 6011: 6011: constexpr int 6011: fpclassify(double __x) 6011: { return __builtin_fpclassify(0, 1, 4, 6011: 3, 2, __x); } 6011: 6011: constexpr int 6011: fpclassify(long double __x) 6011: { return __builtin_fpclassify(0, 1, 4, 6011: 3, 2, __x); } 6011: 6011: 6011: 6011: template 6011: constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, 6011: int>::__type 6011: fpclassify(_Tp __x) 6011: { return __x != 0 ? 4 : 2; } 6011: 6011: 6011: 6011: constexpr bool 6011: isfinite(float __x) 6011: { return __builtin_isfinite(__x); } 6011: 6011: constexpr bool 6011: isfinite(double __x) 6011: { return __builtin_isfinite(__x); } 6011: 6011: constexpr bool 6011: isfinite(long double __x) 6011: { return __builtin_isfinite(__x); } 6011: 6011: 6011: 6011: template 6011: constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, 6011: bool>::__type 6011: isfinite(_Tp __x) 6011: { return true; } 6011: 6011: 6011: 6011: constexpr bool 6011: isinf(float __x) 6011: { return __builtin_isinf(__x); } 6011: 6011: 6011: 6011: 6011: 6011: constexpr bool 6011: isinf(double __x) 6011: { return __builtin_isinf(__x); } 6011: 6011: 6011: constexpr bool 6011: isinf(long double __x) 6011: { return __builtin_isinf(__x); } 6011: 6011: 6011: 6011: template 6011: constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, 6011: bool>::__type 6011: isinf(_Tp __x) 6011: { return false; } 6011: 6011: 6011: 6011: constexpr bool 6011: isnan(float __x) 6011: { return __builtin_isnan(__x); } 6011: 6011: 6011: 6011: 6011: 6011: constexpr bool 6011: isnan(double __x) 6011: { return __builtin_isnan(__x); } 6011: 6011: 6011: constexpr bool 6011: isnan(long double __x) 6011: { return __builtin_isnan(__x); } 6011: 6011: 6011: 6011: template 6011: constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, 6011: bool>::__type 6011: isnan(_Tp __x) 6011: { return false; } 6011: 6011: 6011: 6011: constexpr bool 6011: isnormal(float __x) 6011: { return __builtin_isnormal(__x); } 6011: 6011: constexpr bool 6011: isnormal(double __x) 6011: { return __builtin_isnormal(__x); } 6011: 6011: constexpr bool 6011: isnormal(long double __x) 6011: { return __builtin_isnormal(__x); } 6011: 6011: 6011: 6011: template 6011: constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, 6011: bool>::__type 6011: isnormal(_Tp __x) 6011: { return __x != 0 ? true : false; } 6011: 6011: 6011: 6011: 6011: constexpr bool 6011: signbit(float __x) 6011: { return __builtin_signbit(__x); } 6011: 6011: constexpr bool 6011: signbit(double __x) 6011: { return __builtin_signbit(__x); } 6011: 6011: constexpr bool 6011: signbit(long double __x) 6011: { return __builtin_signbit(__x); } 6011: 6011: 6011: 6011: template 6011: constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, 6011: bool>::__type 6011: signbit(_Tp __x) 6011: { return __x < 0 ? true : false; } 6011: 6011: 6011: 6011: constexpr bool 6011: isgreater(float __x, float __y) 6011: { return __builtin_isgreater(__x, __y); } 6011: 6011: constexpr bool 6011: isgreater(double __x, double __y) 6011: { return __builtin_isgreater(__x, __y); } 6011: 6011: constexpr bool 6011: isgreater(long double __x, long double __y) 6011: { return __builtin_isgreater(__x, __y); } 6011: 6011: 6011: 6011: template 6011: constexpr typename 6011: __gnu_cxx::__enable_if<(__is_arithmetic<_Tp>::__value 6011: && __is_arithmetic<_Up>::__value), bool>::__type 6011: isgreater(_Tp __x, _Up __y) 6011: { 6011: typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; 6011: return __builtin_isgreater(__type(__x), __type(__y)); 6011: } 6011: 6011: 6011: 6011: constexpr bool 6011: isgreaterequal(float __x, float __y) 6011: { return __builtin_isgreaterequal(__x, __y); } 6011: 6011: constexpr bool 6011: isgreaterequal(double __x, double __y) 6011: { return __builtin_isgreaterequal(__x, __y); } 6011: 6011: constexpr bool 6011: isgreaterequal(long double __x, long double __y) 6011: { return __builtin_isgreaterequal(__x, __y); } 6011: 6011: 6011: 6011: template 6011: constexpr typename 6011: __gnu_cxx::__enable_if<(__is_arithmetic<_Tp>::__value 6011: && __is_arithmetic<_Up>::__value), bool>::__type 6011: isgreaterequal(_Tp __x, _Up __y) 6011: { 6011: typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; 6011: return __builtin_isgreaterequal(__type(__x), __type(__y)); 6011: } 6011: 6011: 6011: 6011: constexpr bool 6011: isless(float __x, float __y) 6011: { return __builtin_isless(__x, __y); } 6011: 6011: constexpr bool 6011: isless(double __x, double __y) 6011: { return __builtin_isless(__x, __y); } 6011: 6011: constexpr bool 6011: isless(long double __x, long double __y) 6011: { return __builtin_isless(__x, __y); } 6011: 6011: 6011: 6011: template 6011: constexpr typename 6011: __gnu_cxx::__enable_if<(__is_arithmetic<_Tp>::__value 6011: && __is_arithmetic<_Up>::__value), bool>::__type 6011: isless(_Tp __x, _Up __y) 6011: { 6011: typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; 6011: return __builtin_isless(__type(__x), __type(__y)); 6011: } 6011: 6011: 6011: 6011: constexpr bool 6011: islessequal(float __x, float __y) 6011: { return __builtin_islessequal(__x, __y); } 6011: 6011: constexpr bool 6011: islessequal(double __x, double __y) 6011: { return __builtin_islessequal(__x, __y); } 6011: 6011: constexpr bool 6011: islessequal(long double __x, long double __y) 6011: { return __builtin_islessequal(__x, __y); } 6011: 6011: 6011: 6011: template 6011: constexpr typename 6011: __gnu_cxx::__enable_if<(__is_arithmetic<_Tp>::__value 6011: && __is_arithmetic<_Up>::__value), bool>::__type 6011: islessequal(_Tp __x, _Up __y) 6011: { 6011: typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; 6011: return __builtin_islessequal(__type(__x), __type(__y)); 6011: } 6011: 6011: 6011: 6011: constexpr bool 6011: islessgreater(float __x, float __y) 6011: { return __builtin_islessgreater(__x, __y); } 6011: 6011: constexpr bool 6011: islessgreater(double __x, double __y) 6011: { return __builtin_islessgreater(__x, __y); } 6011: 6011: constexpr bool 6011: islessgreater(long double __x, long double __y) 6011: { return __builtin_islessgreater(__x, __y); } 6011: 6011: 6011: 6011: template 6011: constexpr typename 6011: __gnu_cxx::__enable_if<(__is_arithmetic<_Tp>::__value 6011: && __is_arithmetic<_Up>::__value), bool>::__type 6011: islessgreater(_Tp __x, _Up __y) 6011: { 6011: typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; 6011: return __builtin_islessgreater(__type(__x), __type(__y)); 6011: } 6011: 6011: 6011: 6011: constexpr bool 6011: isunordered(float __x, float __y) 6011: { return __builtin_isunordered(__x, __y); } 6011: 6011: constexpr bool 6011: isunordered(double __x, double __y) 6011: { return __builtin_isunordered(__x, __y); } 6011: 6011: constexpr bool 6011: isunordered(long double __x, long double __y) 6011: { return __builtin_isunordered(__x, __y); } 6011: 6011: 6011: 6011: template 6011: constexpr typename 6011: __gnu_cxx::__enable_if<(__is_arithmetic<_Tp>::__value 6011: && __is_arithmetic<_Up>::__value), bool>::__type 6011: isunordered(_Tp __x, _Up __y) 6011: { 6011: typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; 6011: return __builtin_isunordered(__type(__x), __type(__y)); 6011: } 6011: # 1065 "/usr/include/c++/8/cmath" 3 6011: using ::double_t; 6011: using ::float_t; 6011: 6011: 6011: using ::acosh; 6011: using ::acoshf; 6011: using ::acoshl; 6011: 6011: using ::asinh; 6011: using ::asinhf; 6011: using ::asinhl; 6011: 6011: using ::atanh; 6011: using ::atanhf; 6011: using ::atanhl; 6011: 6011: using ::cbrt; 6011: using ::cbrtf; 6011: using ::cbrtl; 6011: 6011: using ::copysign; 6011: using ::copysignf; 6011: using ::copysignl; 6011: 6011: using ::erf; 6011: using ::erff; 6011: using ::erfl; 6011: 6011: using ::erfc; 6011: using ::erfcf; 6011: using ::erfcl; 6011: 6011: using ::exp2; 6011: using ::exp2f; 6011: using ::exp2l; 6011: 6011: using ::expm1; 6011: using ::expm1f; 6011: using ::expm1l; 6011: 6011: using ::fdim; 6011: using ::fdimf; 6011: using ::fdiml; 6011: 6011: using ::fma; 6011: using ::fmaf; 6011: using ::fmal; 6011: 6011: using ::fmax; 6011: using ::fmaxf; 6011: using ::fmaxl; 6011: 6011: using ::fmin; 6011: using ::fminf; 6011: using ::fminl; 6011: 6011: using ::hypot; 6011: using ::hypotf; 6011: using ::hypotl; 6011: 6011: using ::ilogb; 6011: using ::ilogbf; 6011: using ::ilogbl; 6011: 6011: using ::lgamma; 6011: using ::lgammaf; 6011: using ::lgammal; 6011: 6011: 6011: using ::llrint; 6011: using ::llrintf; 6011: using ::llrintl; 6011: 6011: using ::llround; 6011: using ::llroundf; 6011: using ::llroundl; 6011: 6011: 6011: using ::log1p; 6011: using ::log1pf; 6011: using ::log1pl; 6011: 6011: using ::log2; 6011: using ::log2f; 6011: using ::log2l; 6011: 6011: using ::logb; 6011: using ::logbf; 6011: using ::logbl; 6011: 6011: using ::lrint; 6011: using ::lrintf; 6011: using ::lrintl; 6011: 6011: using ::lround; 6011: using ::lroundf; 6011: using ::lroundl; 6011: 6011: using ::nan; 6011: using ::nanf; 6011: using ::nanl; 6011: 6011: using ::nearbyint; 6011: using ::nearbyintf; 6011: using ::nearbyintl; 6011: 6011: using ::nextafter; 6011: using ::nextafterf; 6011: using ::nextafterl; 6011: 6011: using ::nexttoward; 6011: using ::nexttowardf; 6011: using ::nexttowardl; 6011: 6011: using ::remainder; 6011: using ::remainderf; 6011: using ::remainderl; 6011: 6011: using ::remquo; 6011: using ::remquof; 6011: using ::remquol; 6011: 6011: using ::rint; 6011: using ::rintf; 6011: using ::rintl; 6011: 6011: using ::round; 6011: using ::roundf; 6011: using ::roundl; 6011: 6011: using ::scalbln; 6011: using ::scalblnf; 6011: using ::scalblnl; 6011: 6011: using ::scalbn; 6011: using ::scalbnf; 6011: using ::scalbnl; 6011: 6011: using ::tgamma; 6011: using ::tgammaf; 6011: using ::tgammal; 6011: 6011: using ::trunc; 6011: using ::truncf; 6011: using ::truncl; 6011: 6011: 6011: 6011: constexpr float 6011: acosh(float __x) 6011: { return __builtin_acoshf(__x); } 6011: 6011: constexpr long double 6011: acosh(long double __x) 6011: { return __builtin_acoshl(__x); } 6011: 6011: 6011: 6011: template 6011: constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, 6011: double>::__type 6011: acosh(_Tp __x) 6011: { return __builtin_acosh(__x); } 6011: 6011: 6011: 6011: constexpr float 6011: asinh(float __x) 6011: { return __builtin_asinhf(__x); } 6011: 6011: constexpr long double 6011: asinh(long double __x) 6011: { return __builtin_asinhl(__x); } 6011: 6011: 6011: 6011: template 6011: constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, 6011: double>::__type 6011: asinh(_Tp __x) 6011: { return __builtin_asinh(__x); } 6011: 6011: 6011: 6011: constexpr float 6011: atanh(float __x) 6011: { return __builtin_atanhf(__x); } 6011: 6011: constexpr long double 6011: atanh(long double __x) 6011: { return __builtin_atanhl(__x); } 6011: 6011: 6011: 6011: template 6011: constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, 6011: double>::__type 6011: atanh(_Tp __x) 6011: { return __builtin_atanh(__x); } 6011: 6011: 6011: 6011: constexpr float 6011: cbrt(float __x) 6011: { return __builtin_cbrtf(__x); } 6011: 6011: constexpr long double 6011: cbrt(long double __x) 6011: { return __builtin_cbrtl(__x); } 6011: 6011: 6011: 6011: template 6011: constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, 6011: double>::__type 6011: cbrt(_Tp __x) 6011: { return __builtin_cbrt(__x); } 6011: 6011: 6011: 6011: constexpr float 6011: copysign(float __x, float __y) 6011: { return __builtin_copysignf(__x, __y); } 6011: 6011: constexpr long double 6011: copysign(long double __x, long double __y) 6011: { return __builtin_copysignl(__x, __y); } 6011: 6011: 6011: 6011: template 6011: constexpr typename __gnu_cxx::__promote_2<_Tp, _Up>::__type 6011: copysign(_Tp __x, _Up __y) 6011: { 6011: typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; 6011: return copysign(__type(__x), __type(__y)); 6011: } 6011: 6011: 6011: 6011: constexpr float 6011: erf(float __x) 6011: { return __builtin_erff(__x); } 6011: 6011: constexpr long double 6011: erf(long double __x) 6011: { return __builtin_erfl(__x); } 6011: 6011: 6011: 6011: template 6011: constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, 6011: double>::__type 6011: erf(_Tp __x) 6011: { return __builtin_erf(__x); } 6011: 6011: 6011: 6011: constexpr float 6011: erfc(float __x) 6011: { return __builtin_erfcf(__x); } 6011: 6011: constexpr long double 6011: erfc(long double __x) 6011: { return __builtin_erfcl(__x); } 6011: 6011: 6011: 6011: template 6011: constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, 6011: double>::__type 6011: erfc(_Tp __x) 6011: { return __builtin_erfc(__x); } 6011: 6011: 6011: 6011: constexpr float 6011: exp2(float __x) 6011: { return __builtin_exp2f(__x); } 6011: 6011: constexpr long double 6011: exp2(long double __x) 6011: { return __builtin_exp2l(__x); } 6011: 6011: 6011: 6011: template 6011: constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, 6011: double>::__type 6011: exp2(_Tp __x) 6011: { return __builtin_exp2(__x); } 6011: 6011: 6011: 6011: constexpr float 6011: expm1(float __x) 6011: { return __builtin_expm1f(__x); } 6011: 6011: constexpr long double 6011: expm1(long double __x) 6011: { return __builtin_expm1l(__x); } 6011: 6011: 6011: 6011: template 6011: constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, 6011: double>::__type 6011: expm1(_Tp __x) 6011: { return __builtin_expm1(__x); } 6011: 6011: 6011: 6011: constexpr float 6011: fdim(float __x, float __y) 6011: { return __builtin_fdimf(__x, __y); } 6011: 6011: constexpr long double 6011: fdim(long double __x, long double __y) 6011: { return __builtin_fdiml(__x, __y); } 6011: 6011: 6011: 6011: template 6011: constexpr typename __gnu_cxx::__promote_2<_Tp, _Up>::__type 6011: fdim(_Tp __x, _Up __y) 6011: { 6011: typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; 6011: return fdim(__type(__x), __type(__y)); 6011: } 6011: 6011: 6011: 6011: constexpr float 6011: fma(float __x, float __y, float __z) 6011: { return __builtin_fmaf(__x, __y, __z); } 6011: 6011: constexpr long double 6011: fma(long double __x, long double __y, long double __z) 6011: { return __builtin_fmal(__x, __y, __z); } 6011: 6011: 6011: 6011: template 6011: constexpr typename __gnu_cxx::__promote_3<_Tp, _Up, _Vp>::__type 6011: fma(_Tp __x, _Up __y, _Vp __z) 6011: { 6011: typedef typename __gnu_cxx::__promote_3<_Tp, _Up, _Vp>::__type __type; 6011: return fma(__type(__x), __type(__y), __type(__z)); 6011: } 6011: 6011: 6011: 6011: constexpr float 6011: fmax(float __x, float __y) 6011: { return __builtin_fmaxf(__x, __y); } 6011: 6011: constexpr long double 6011: fmax(long double __x, long double __y) 6011: { return __builtin_fmaxl(__x, __y); } 6011: 6011: 6011: 6011: template 6011: constexpr typename __gnu_cxx::__promote_2<_Tp, _Up>::__type 6011: fmax(_Tp __x, _Up __y) 6011: { 6011: typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; 6011: return fmax(__type(__x), __type(__y)); 6011: } 6011: 6011: 6011: 6011: constexpr float 6011: fmin(float __x, float __y) 6011: { return __builtin_fminf(__x, __y); } 6011: 6011: constexpr long double 6011: fmin(long double __x, long double __y) 6011: { return __builtin_fminl(__x, __y); } 6011: 6011: 6011: 6011: template 6011: constexpr typename __gnu_cxx::__promote_2<_Tp, _Up>::__type 6011: fmin(_Tp __x, _Up __y) 6011: { 6011: typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; 6011: return fmin(__type(__x), __type(__y)); 6011: } 6011: 6011: 6011: 6011: constexpr float 6011: hypot(float __x, float __y) 6011: { return __builtin_hypotf(__x, __y); } 6011: 6011: constexpr long double 6011: hypot(long double __x, long double __y) 6011: { return __builtin_hypotl(__x, __y); } 6011: 6011: 6011: 6011: template 6011: constexpr typename __gnu_cxx::__promote_2<_Tp, _Up>::__type 6011: hypot(_Tp __x, _Up __y) 6011: { 6011: typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; 6011: return hypot(__type(__x), __type(__y)); 6011: } 6011: 6011: 6011: 6011: constexpr int 6011: ilogb(float __x) 6011: { return __builtin_ilogbf(__x); } 6011: 6011: constexpr int 6011: ilogb(long double __x) 6011: { return __builtin_ilogbl(__x); } 6011: 6011: 6011: 6011: template 6011: constexpr 6011: typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, 6011: int>::__type 6011: ilogb(_Tp __x) 6011: { return __builtin_ilogb(__x); } 6011: 6011: 6011: 6011: constexpr float 6011: lgamma(float __x) 6011: { return __builtin_lgammaf(__x); } 6011: 6011: constexpr long double 6011: lgamma(long double __x) 6011: { return __builtin_lgammal(__x); } 6011: 6011: 6011: 6011: template 6011: constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, 6011: double>::__type 6011: lgamma(_Tp __x) 6011: { return __builtin_lgamma(__x); } 6011: 6011: 6011: 6011: constexpr long long 6011: llrint(float __x) 6011: { return __builtin_llrintf(__x); } 6011: 6011: constexpr long long 6011: llrint(long double __x) 6011: { return __builtin_llrintl(__x); } 6011: 6011: 6011: 6011: template 6011: constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, 6011: long long>::__type 6011: llrint(_Tp __x) 6011: { return __builtin_llrint(__x); } 6011: 6011: 6011: 6011: constexpr long long 6011: llround(float __x) 6011: { return __builtin_llroundf(__x); } 6011: 6011: constexpr long long 6011: llround(long double __x) 6011: { return __builtin_llroundl(__x); } 6011: 6011: 6011: 6011: template 6011: constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, 6011: long long>::__type 6011: llround(_Tp __x) 6011: { return __builtin_llround(__x); } 6011: 6011: 6011: 6011: constexpr float 6011: log1p(float __x) 6011: { return __builtin_log1pf(__x); } 6011: 6011: constexpr long double 6011: log1p(long double __x) 6011: { return __builtin_log1pl(__x); } 6011: 6011: 6011: 6011: template 6011: constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, 6011: double>::__type 6011: log1p(_Tp __x) 6011: { return __builtin_log1p(__x); } 6011: 6011: 6011: 6011: 6011: constexpr float 6011: log2(float __x) 6011: { return __builtin_log2f(__x); } 6011: 6011: constexpr long double 6011: log2(long double __x) 6011: { return __builtin_log2l(__x); } 6011: 6011: 6011: 6011: template 6011: constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, 6011: double>::__type 6011: log2(_Tp __x) 6011: { return __builtin_log2(__x); } 6011: 6011: 6011: 6011: constexpr float 6011: logb(float __x) 6011: { return __builtin_logbf(__x); } 6011: 6011: constexpr long double 6011: logb(long double __x) 6011: { return __builtin_logbl(__x); } 6011: 6011: 6011: 6011: template 6011: constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, 6011: double>::__type 6011: logb(_Tp __x) 6011: { return __builtin_logb(__x); } 6011: 6011: 6011: 6011: constexpr long 6011: lrint(float __x) 6011: { return __builtin_lrintf(__x); } 6011: 6011: constexpr long 6011: lrint(long double __x) 6011: { return __builtin_lrintl(__x); } 6011: 6011: 6011: 6011: template 6011: constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, 6011: long>::__type 6011: lrint(_Tp __x) 6011: { return __builtin_lrint(__x); } 6011: 6011: 6011: 6011: constexpr long 6011: lround(float __x) 6011: { return __builtin_lroundf(__x); } 6011: 6011: constexpr long 6011: lround(long double __x) 6011: { return __builtin_lroundl(__x); } 6011: 6011: 6011: 6011: template 6011: constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, 6011: long>::__type 6011: lround(_Tp __x) 6011: { return __builtin_lround(__x); } 6011: 6011: 6011: 6011: constexpr float 6011: nearbyint(float __x) 6011: { return __builtin_nearbyintf(__x); } 6011: 6011: constexpr long double 6011: nearbyint(long double __x) 6011: { return __builtin_nearbyintl(__x); } 6011: 6011: 6011: 6011: template 6011: constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, 6011: double>::__type 6011: nearbyint(_Tp __x) 6011: { return __builtin_nearbyint(__x); } 6011: 6011: 6011: 6011: constexpr float 6011: nextafter(float __x, float __y) 6011: { return __builtin_nextafterf(__x, __y); } 6011: 6011: constexpr long double 6011: nextafter(long double __x, long double __y) 6011: { return __builtin_nextafterl(__x, __y); } 6011: 6011: 6011: 6011: template 6011: constexpr typename __gnu_cxx::__promote_2<_Tp, _Up>::__type 6011: nextafter(_Tp __x, _Up __y) 6011: { 6011: typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; 6011: return nextafter(__type(__x), __type(__y)); 6011: } 6011: 6011: 6011: 6011: constexpr float 6011: nexttoward(float __x, long double __y) 6011: { return __builtin_nexttowardf(__x, __y); } 6011: 6011: constexpr long double 6011: nexttoward(long double __x, long double __y) 6011: { return __builtin_nexttowardl(__x, __y); } 6011: 6011: 6011: 6011: template 6011: constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, 6011: double>::__type 6011: nexttoward(_Tp __x, long double __y) 6011: { return __builtin_nexttoward(__x, __y); } 6011: 6011: 6011: 6011: constexpr float 6011: remainder(float __x, float __y) 6011: { return __builtin_remainderf(__x, __y); } 6011: 6011: constexpr long double 6011: remainder(long double __x, long double __y) 6011: { return __builtin_remainderl(__x, __y); } 6011: 6011: 6011: 6011: template 6011: constexpr typename __gnu_cxx::__promote_2<_Tp, _Up>::__type 6011: remainder(_Tp __x, _Up __y) 6011: { 6011: typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; 6011: return remainder(__type(__x), __type(__y)); 6011: } 6011: 6011: 6011: 6011: inline float 6011: remquo(float __x, float __y, int* __pquo) 6011: { return __builtin_remquof(__x, __y, __pquo); } 6011: 6011: inline long double 6011: remquo(long double __x, long double __y, int* __pquo) 6011: { return __builtin_remquol(__x, __y, __pquo); } 6011: 6011: 6011: 6011: template 6011: inline typename __gnu_cxx::__promote_2<_Tp, _Up>::__type 6011: remquo(_Tp __x, _Up __y, int* __pquo) 6011: { 6011: typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; 6011: return remquo(__type(__x), __type(__y), __pquo); 6011: } 6011: 6011: 6011: 6011: constexpr float 6011: rint(float __x) 6011: { return __builtin_rintf(__x); } 6011: 6011: constexpr long double 6011: rint(long double __x) 6011: { return __builtin_rintl(__x); } 6011: 6011: 6011: 6011: template 6011: constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, 6011: double>::__type 6011: rint(_Tp __x) 6011: { return __builtin_rint(__x); } 6011: 6011: 6011: 6011: constexpr float 6011: round(float __x) 6011: { return __builtin_roundf(__x); } 6011: 6011: constexpr long double 6011: round(long double __x) 6011: { return __builtin_roundl(__x); } 6011: 6011: 6011: 6011: template 6011: constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, 6011: double>::__type 6011: round(_Tp __x) 6011: { return __builtin_round(__x); } 6011: 6011: 6011: 6011: constexpr float 6011: scalbln(float __x, long __ex) 6011: { return __builtin_scalblnf(__x, __ex); } 6011: 6011: constexpr long double 6011: scalbln(long double __x, long __ex) 6011: { return __builtin_scalblnl(__x, __ex); } 6011: 6011: 6011: 6011: template 6011: constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, 6011: double>::__type 6011: scalbln(_Tp __x, long __ex) 6011: { return __builtin_scalbln(__x, __ex); } 6011: 6011: 6011: 6011: constexpr float 6011: scalbn(float __x, int __ex) 6011: { return __builtin_scalbnf(__x, __ex); } 6011: 6011: constexpr long double 6011: scalbn(long double __x, int __ex) 6011: { return __builtin_scalbnl(__x, __ex); } 6011: 6011: 6011: 6011: template 6011: constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, 6011: double>::__type 6011: scalbn(_Tp __x, int __ex) 6011: { return __builtin_scalbn(__x, __ex); } 6011: 6011: 6011: 6011: constexpr float 6011: tgamma(float __x) 6011: { return __builtin_tgammaf(__x); } 6011: 6011: constexpr long double 6011: tgamma(long double __x) 6011: { return __builtin_tgammal(__x); } 6011: 6011: 6011: 6011: template 6011: constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, 6011: double>::__type 6011: tgamma(_Tp __x) 6011: { return __builtin_tgamma(__x); } 6011: 6011: 6011: 6011: constexpr float 6011: trunc(float __x) 6011: { return __builtin_truncf(__x); } 6011: 6011: constexpr long double 6011: trunc(long double __x) 6011: { return __builtin_truncl(__x); } 6011: 6011: 6011: 6011: template 6011: constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, 6011: double>::__type 6011: trunc(_Tp __x) 6011: { return __builtin_trunc(__x); } 6011: # 1888 "/usr/include/c++/8/cmath" 3 6011: 6011: } 6011: 6011: 6011: 6011: 6011: 6011: } 6011: # 22 "/usr/include/boost/config/no_tr1/cmath.hpp" 2 3 4 6011: # 15 "/usr/include/boost/functional/hash/detail/float_functions.hpp" 2 3 4 6011: # 76 "/usr/include/boost/functional/hash/detail/float_functions.hpp" 3 4 6011: namespace boost { 6011: namespace hash_detail { 6011: template 6011: struct call_ldexp { 6011: typedef Float float_type; 6011: inline Float operator()(Float x, int y) const { 6011: return std::ldexp(x, y); 6011: } 6011: }; 6011: 6011: template 6011: struct call_frexp { 6011: typedef Float float_type; 6011: inline Float operator()(Float x, int* y) const { 6011: return std::frexp(x, y); 6011: } 6011: }; 6011: 6011: template 6011: struct select_hash_type 6011: { 6011: typedef Float type; 6011: }; 6011: } 6011: } 6011: # 15 "/usr/include/boost/functional/hash/detail/hash_float.hpp" 2 3 4 6011: # 1 "/usr/include/boost/functional/hash/detail/limits.hpp" 1 3 4 6011: # 14 "/usr/include/boost/functional/hash/detail/limits.hpp" 3 4 6011: 6011: # 27 "/usr/include/boost/functional/hash/detail/limits.hpp" 3 4 6011: namespace boost 6011: { 6011: namespace hash_detail 6011: { 6011: template 6011: struct limits : std::numeric_limits {}; 6011: # 59 "/usr/include/boost/functional/hash/detail/limits.hpp" 3 4 6011: } 6011: } 6011: # 16 "/usr/include/boost/functional/hash/detail/hash_float.hpp" 2 3 4 6011: # 1 "/usr/include/boost/utility/enable_if.hpp" 1 3 4 6011: # 15 "/usr/include/boost/utility/enable_if.hpp" 3 4 6011: # 1 "/usr/include/boost/core/enable_if.hpp" 1 3 4 6011: # 24 "/usr/include/boost/core/enable_if.hpp" 3 4 6011: namespace boost 6011: { 6011: template 6011: struct enable_if_has_type 6011: { 6011: typedef R type; 6011: }; 6011: 6011: template 6011: struct enable_if_c { 6011: typedef T type; 6011: }; 6011: 6011: template 6011: struct enable_if_c {}; 6011: 6011: template 6011: struct enable_if : public enable_if_c {}; 6011: 6011: template 6011: struct lazy_enable_if_c { 6011: typedef typename T::type type; 6011: }; 6011: 6011: template 6011: struct lazy_enable_if_c {}; 6011: 6011: template 6011: struct lazy_enable_if : public lazy_enable_if_c {}; 6011: 6011: 6011: template 6011: struct disable_if_c { 6011: typedef T type; 6011: }; 6011: 6011: template 6011: struct disable_if_c {}; 6011: 6011: template 6011: struct disable_if : public disable_if_c {}; 6011: 6011: template 6011: struct lazy_disable_if_c { 6011: typedef typename T::type type; 6011: }; 6011: 6011: template 6011: struct lazy_disable_if_c {}; 6011: 6011: template 6011: struct lazy_disable_if : public lazy_disable_if_c {}; 6011: 6011: } 6011: # 16 "/usr/include/boost/utility/enable_if.hpp" 2 3 4 6011: # 17 "/usr/include/boost/functional/hash/detail/hash_float.hpp" 2 3 4 6011: # 1 "/usr/include/boost/integer/static_log2.hpp" 1 3 4 6011: # 21 "/usr/include/boost/integer/static_log2.hpp" 3 4 6011: namespace boost { 6011: 6011: namespace detail { 6011: 6011: namespace static_log2_impl { 6011: # 44 "/usr/include/boost/integer/static_log2.hpp" 3 4 6011: typedef boost::static_log2_argument_type argument_type; 6011: typedef boost::static_log2_result_type result_type; 6011: 6011: template 6011: struct choose_initial_n { 6011: 6011: static const bool c = (argument_type(1) << n << n) != 0; 6011: static const result_type value = !c*n + choose_initial_n<2*c*n>::value 6011: 6011: 6011: ; 6011: 6011: }; 6011: 6011: template <> 6011: struct choose_initial_n<0> { 6011: static const result_type value = 0; 6011: }; 6011: 6011: 6011: 6011: 6011: const result_type n_zero = 16; 6011: const result_type initial_n = choose_initial_n::value; 6011: # 84 "/usr/include/boost/integer/static_log2.hpp" 3 4 6011: template 6011: struct static_log2_impl { 6011: 6011: static const bool c = (x >> n) > 0; 6011: static const result_type value = c*n + (static_log2_impl< (x>>c*n), n/2 >::value) 6011: 6011: 6011: ; 6011: 6011: }; 6011: 6011: template <> 6011: struct static_log2_impl<1, 0> { 6011: static const result_type value = 0; 6011: }; 6011: 6011: } 6011: } 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: template 6011: struct static_log2 { 6011: 6011: static const static_log2_result_type value = detail::static_log2_impl::static_log2_impl::value 6011: 6011: 6011: ; 6011: 6011: }; 6011: 6011: 6011: template <> 6011: struct static_log2<0> { }; 6011: 6011: } 6011: # 18 "/usr/include/boost/functional/hash/detail/hash_float.hpp" 2 3 4 6011: # 1 "/usr/include/boost/cstdint.hpp" 1 3 4 6011: # 19 "/usr/include/boost/functional/hash/detail/hash_float.hpp" 2 3 4 6011: # 1 "/usr/include/boost/assert.hpp" 1 3 4 6011: # 58 "/usr/include/boost/assert.hpp" 3 4 6011: # 1 "/usr/include/assert.h" 1 3 4 6011: # 59 "/usr/include/boost/assert.hpp" 2 3 4 6011: # 20 "/usr/include/boost/functional/hash/detail/hash_float.hpp" 2 3 4 6011: 6011: # 1 "/usr/include/c++/8/cstring" 1 3 4 6011: # 39 "/usr/include/c++/8/cstring" 3 4 6011: 6011: # 40 "/usr/include/c++/8/cstring" 3 6011: # 22 "/usr/include/boost/functional/hash/detail/hash_float.hpp" 2 3 4 6011: # 51 "/usr/include/boost/functional/hash/detail/hash_float.hpp" 3 4 6011: namespace boost 6011: { 6011: namespace hash_detail 6011: { 6011: inline void hash_float_combine(std::size_t& seed, std::size_t value) 6011: { 6011: seed ^= value + (seed<<6) + (seed>>2); 6011: } 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: inline std::size_t hash_binary(char* ptr, std::size_t length) 6011: { 6011: std::size_t seed = 0; 6011: 6011: if (length >= sizeof(std::size_t)) { 6011: std::memcpy(&seed, ptr, sizeof(std::size_t)); 6011: length -= sizeof(std::size_t); 6011: ptr += sizeof(std::size_t); 6011: 6011: while(length >= sizeof(std::size_t)) { 6011: std::size_t buffer = 0; 6011: std::memcpy(&buffer, ptr, sizeof(std::size_t)); 6011: hash_float_combine(seed, buffer); 6011: length -= sizeof(std::size_t); 6011: ptr += sizeof(std::size_t); 6011: } 6011: } 6011: 6011: if (length > 0) { 6011: std::size_t buffer = 0; 6011: std::memcpy(&buffer, ptr, length); 6011: hash_float_combine(seed, buffer); 6011: } 6011: 6011: return seed; 6011: } 6011: 6011: template 6011: struct enable_binary_hash 6011: { 6011: 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 6011: 6011: 6011: 6011: ; 6011: }; 6011: 6011: template 6011: inline std::size_t float_hash_impl(Float v, 6011: typename boost::enable_if_c< 6011: enable_binary_hash::value, 6011: std::size_t>::type) 6011: { 6011: return hash_binary((char*) &v, 4); 6011: } 6011: 6011: 6011: template 6011: inline std::size_t float_hash_impl(Float v, 6011: typename boost::enable_if_c< 6011: enable_binary_hash::value, 6011: std::size_t>::type) 6011: { 6011: return hash_binary((char*) &v, 8); 6011: } 6011: 6011: template 6011: inline std::size_t float_hash_impl(Float v, 6011: typename boost::enable_if_c< 6011: enable_binary_hash::value, 6011: std::size_t>::type) 6011: { 6011: return hash_binary((char*) &v, 10); 6011: } 6011: 6011: template 6011: inline std::size_t float_hash_impl(Float v, 6011: typename boost::enable_if_c< 6011: enable_binary_hash::value, 6011: std::size_t>::type) 6011: { 6011: return hash_binary((char*) &v, 16); 6011: } 6011: 6011: 6011: 6011: 6011: 6011: 6011: template 6011: inline std::size_t float_hash_impl2(T v) 6011: { 6011: boost::hash_detail::call_frexp frexp; 6011: boost::hash_detail::call_ldexp ldexp; 6011: 6011: int exp = 0; 6011: 6011: v = frexp(v, &exp); 6011: 6011: 6011: 6011: if(v < 0) { 6011: v = -v; 6011: exp += limits::max_exponent - 6011: limits::min_exponent; 6011: } 6011: 6011: v = ldexp(v, limits::digits); 6011: std::size_t seed = static_cast(v); 6011: v -= static_cast(seed); 6011: 6011: 6011: std::size_t const length 6011: = (limits::digits * 6011: boost::static_log2::radix>::value 6011: + limits::digits - 1) 6011: / limits::digits; 6011: 6011: for(std::size_t i = 0; i != length; ++i) 6011: { 6011: v = ldexp(v, limits::digits); 6011: std::size_t part = static_cast(v); 6011: v -= static_cast(part); 6011: hash_float_combine(seed, part); 6011: } 6011: 6011: hash_float_combine(seed, static_cast(exp)); 6011: 6011: return seed; 6011: } 6011: 6011: 6011: template 6011: inline std::size_t float_hash_impl(T v, ...) 6011: { 6011: typedef typename select_hash_type::type type; 6011: return float_hash_impl2(static_cast(v)); 6011: } 6011: 6011: } 6011: } 6011: 6011: 6011: 6011: 6011: 6011: namespace boost 6011: { 6011: namespace hash_detail 6011: { 6011: template 6011: inline std::size_t float_hash_value(T v) 6011: { 6011: 6011: 6011: 6011: switch (std::fpclassify(v)) 6011: 6011: 6011: 6011: 6011: { 6011: case 2: 6011: return 0; 6011: case 1: 6011: return (std::size_t)(v > 0 ? -1 : -2); 6011: case 0: 6011: return (std::size_t)(-3); 6011: case 4: 6011: case 3: 6011: return float_hash_impl(v, 0); 6011: default: 6011: (static_cast (0) ? void (0) : __assert_fail ("0", "/usr/include/boost/functional/hash/detail/hash_float.hpp", 228, __extension__ __PRETTY_FUNCTION__)); 6011: return 0; 6011: } 6011: } 6011: } 6011: } 6011: # 22 "/usr/include/boost/functional/hash/hash.hpp" 2 3 4 6011: 6011: 6011: 6011: 6011: 6011: # 1 "/usr/include/boost/cstdint.hpp" 1 3 4 6011: # 28 "/usr/include/boost/functional/hash/hash.hpp" 2 3 4 6011: 6011: 6011: 6011: 6011: 6011: 6011: # 1 "/usr/include/c++/8/typeindex" 1 3 4 6011: # 32 "/usr/include/c++/8/typeindex" 3 4 6011: 6011: # 33 "/usr/include/c++/8/typeindex" 3 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: namespace std __attribute__ ((__visibility__ ("default"))) 6011: { 6011: 6011: # 52 "/usr/include/c++/8/typeindex" 3 6011: struct type_index 6011: { 6011: type_index(const type_info& __rhs) noexcept 6011: : _M_target(&__rhs) { } 6011: 6011: bool 6011: operator==(const type_index& __rhs) const noexcept 6011: { return *_M_target == *__rhs._M_target; } 6011: 6011: bool 6011: operator!=(const type_index& __rhs) const noexcept 6011: { return *_M_target != *__rhs._M_target; } 6011: 6011: bool 6011: operator<(const type_index& __rhs) const noexcept 6011: { return _M_target->before(*__rhs._M_target); } 6011: 6011: bool 6011: operator<=(const type_index& __rhs) const noexcept 6011: { return !__rhs._M_target->before(*_M_target); } 6011: 6011: bool 6011: operator>(const type_index& __rhs) const noexcept 6011: { return __rhs._M_target->before(*_M_target); } 6011: 6011: bool 6011: operator>=(const type_index& __rhs) const noexcept 6011: { return !_M_target->before(*__rhs._M_target); } 6011: 6011: size_t 6011: hash_code() const noexcept 6011: { return _M_target->hash_code(); } 6011: 6011: const char* 6011: name() const noexcept 6011: { return _M_target->name(); } 6011: 6011: private: 6011: const type_info* _M_target; 6011: }; 6011: 6011: template struct hash; 6011: 6011: 6011: template<> 6011: struct hash 6011: { 6011: typedef size_t result_type; 6011: typedef type_index argument_type; 6011: 6011: size_t 6011: operator()(const type_index& __ti) const noexcept 6011: { return __ti.hash_code(); } 6011: }; 6011: 6011: 6011: } 6011: # 35 "/usr/include/boost/functional/hash/hash.hpp" 2 3 4 6011: # 61 "/usr/include/boost/functional/hash/hash.hpp" 3 4 6011: namespace boost 6011: { 6011: namespace hash_detail 6011: { 6011: # 73 "/usr/include/boost/functional/hash/hash.hpp" 3 4 6011: template 6011: struct hash_base : std::unary_function {}; 6011: 6011: 6011: struct enable_hash_value { typedef std::size_t type; }; 6011: 6011: template struct basic_numbers {}; 6011: template struct long_numbers; 6011: template struct ulong_numbers; 6011: template struct float_numbers {}; 6011: 6011: template <> struct basic_numbers : 6011: boost::hash_detail::enable_hash_value {}; 6011: template <> struct basic_numbers : 6011: boost::hash_detail::enable_hash_value {}; 6011: template <> struct basic_numbers : 6011: boost::hash_detail::enable_hash_value {}; 6011: template <> struct basic_numbers : 6011: boost::hash_detail::enable_hash_value {}; 6011: template <> struct basic_numbers : 6011: boost::hash_detail::enable_hash_value {}; 6011: template <> struct basic_numbers : 6011: boost::hash_detail::enable_hash_value {}; 6011: template <> struct basic_numbers : 6011: boost::hash_detail::enable_hash_value {}; 6011: template <> struct basic_numbers : 6011: boost::hash_detail::enable_hash_value {}; 6011: template <> struct basic_numbers : 6011: boost::hash_detail::enable_hash_value {}; 6011: template <> struct basic_numbers : 6011: boost::hash_detail::enable_hash_value {}; 6011: 6011: 6011: template <> struct basic_numbers : 6011: boost::hash_detail::enable_hash_value {}; 6011: 6011: 6011: 6011: template <> struct basic_numbers : 6011: boost::hash_detail::enable_hash_value {}; 6011: 6011: 6011: 6011: template <> struct basic_numbers : 6011: boost::hash_detail::enable_hash_value {}; 6011: 6011: 6011: 6011: 6011: 6011: template struct long_numbers2 {}; 6011: template struct ulong_numbers2 {}; 6011: template struct long_numbers : long_numbers2 {}; 6011: template struct ulong_numbers : ulong_numbers2 {}; 6011: 6011: 6011: template <> struct long_numbers : 6011: boost::hash_detail::enable_hash_value {}; 6011: template <> struct ulong_numbers : 6011: boost::hash_detail::enable_hash_value {}; 6011: # 142 "/usr/include/boost/functional/hash/hash.hpp" 3 4 6011: template <> struct float_numbers : 6011: boost::hash_detail::enable_hash_value {}; 6011: template <> struct float_numbers : 6011: boost::hash_detail::enable_hash_value {}; 6011: template <> struct float_numbers : 6011: boost::hash_detail::enable_hash_value {}; 6011: } 6011: 6011: template 6011: typename boost::hash_detail::basic_numbers::type hash_value(T); 6011: template 6011: typename boost::hash_detail::long_numbers::type hash_value(T); 6011: template 6011: typename boost::hash_detail::ulong_numbers::type hash_value(T); 6011: 6011: template 6011: typename boost::enable_if, std::size_t>::type 6011: hash_value(T); 6011: 6011: 6011: template std::size_t hash_value(T* const&); 6011: 6011: 6011: 6011: 6011: 6011: template< class T, unsigned N > 6011: std::size_t hash_value(const T (&x)[N]); 6011: 6011: template< class T, unsigned N > 6011: std::size_t hash_value(T (&x)[N]); 6011: 6011: 6011: template 6011: std::size_t hash_value( 6011: std::basic_string, A> const&); 6011: 6011: template 6011: typename boost::hash_detail::float_numbers::type hash_value(T); 6011: 6011: 6011: std::size_t hash_value(std::type_index); 6011: 6011: 6011: 6011: 6011: namespace hash_detail 6011: { 6011: template 6011: inline std::size_t hash_value_signed(T val) 6011: { 6011: const unsigned int size_t_bits = std::numeric_limits::digits; 6011: 6011: const int length = (std::numeric_limits::digits - 1) 6011: / static_cast(size_t_bits); 6011: 6011: std::size_t seed = 0; 6011: T positive = val < 0 ? -1 - val : val; 6011: 6011: 6011: for(unsigned int i = length * size_t_bits; i > 0; i -= size_t_bits) 6011: { 6011: seed ^= (std::size_t) (positive >> i) + (seed<<6) + (seed>>2); 6011: } 6011: seed ^= (std::size_t) val + (seed<<6) + (seed>>2); 6011: 6011: return seed; 6011: } 6011: 6011: template 6011: inline std::size_t hash_value_unsigned(T val) 6011: { 6011: const unsigned int size_t_bits = std::numeric_limits::digits; 6011: 6011: const int length = (std::numeric_limits::digits - 1) 6011: / static_cast(size_t_bits); 6011: 6011: std::size_t seed = 0; 6011: 6011: 6011: for(unsigned int i = length * size_t_bits; i > 0; i -= size_t_bits) 6011: { 6011: seed ^= (std::size_t) (val >> i) + (seed<<6) + (seed>>2); 6011: } 6011: seed ^= (std::size_t) val + (seed<<6) + (seed>>2); 6011: 6011: return seed; 6011: } 6011: 6011: template 6011: inline void hash_combine_impl(SizeT& seed, SizeT value) 6011: { 6011: seed ^= value + 0x9e3779b9 + (seed<<6) + (seed>>2); 6011: } 6011: 6011: inline void hash_combine_impl(boost::uint32_t& h1, 6011: boost::uint32_t k1) 6011: { 6011: const uint32_t c1 = 0xcc9e2d51; 6011: const uint32_t c2 = 0x1b873593; 6011: 6011: k1 *= c1; 6011: k1 = (k1 << 15) | (k1 >> (32 - 15)); 6011: k1 *= c2; 6011: 6011: h1 ^= k1; 6011: h1 = (h1 << 13) | (h1 >> (32 - 13)); 6011: h1 = h1*5+0xe6546b64; 6011: } 6011: # 277 "/usr/include/boost/functional/hash/hash.hpp" 3 4 6011: } 6011: 6011: template 6011: typename boost::hash_detail::basic_numbers::type hash_value(T v) 6011: { 6011: return static_cast(v); 6011: } 6011: 6011: template 6011: typename boost::hash_detail::long_numbers::type hash_value(T v) 6011: { 6011: return hash_detail::hash_value_signed(v); 6011: } 6011: 6011: template 6011: typename boost::hash_detail::ulong_numbers::type hash_value(T v) 6011: { 6011: return hash_detail::hash_value_unsigned(v); 6011: } 6011: 6011: template 6011: typename boost::enable_if, std::size_t>::type 6011: hash_value(T v) 6011: { 6011: return static_cast(v); 6011: } 6011: 6011: 6011: 6011: template std::size_t hash_value(T* const& v) 6011: 6011: 6011: 6011: { 6011: 6011: 6011: 6011: 6011: 6011: 6011: std::size_t x = static_cast( 6011: reinterpret_cast(v)); 6011: 6011: return x + (x >> 3); 6011: } 6011: # 333 "/usr/include/boost/functional/hash/hash.hpp" 3 4 6011: template 6011: inline void hash_combine(std::size_t& seed, T const& v) 6011: { 6011: boost::hash hasher; 6011: return boost::hash_detail::hash_combine_impl(seed, hasher(v)); 6011: } 6011: 6011: 6011: 6011: 6011: 6011: template 6011: inline std::size_t hash_range(It first, It last) 6011: { 6011: std::size_t seed = 0; 6011: 6011: for(; first != last; ++first) 6011: { 6011: hash_combine(seed, *first); 6011: } 6011: 6011: return seed; 6011: } 6011: 6011: template 6011: inline void hash_range(std::size_t& seed, It first, It last) 6011: { 6011: for(; first != last; ++first) 6011: { 6011: hash_combine(seed, *first); 6011: } 6011: } 6011: # 393 "/usr/include/boost/functional/hash/hash.hpp" 3 4 6011: template< class T, unsigned N > 6011: inline std::size_t hash_value(const T (&x)[N]) 6011: { 6011: return hash_range(x, x + N); 6011: } 6011: 6011: template< class T, unsigned N > 6011: inline std::size_t hash_value(T (&x)[N]) 6011: { 6011: return hash_range(x, x + N); 6011: } 6011: 6011: 6011: template 6011: inline std::size_t hash_value( 6011: std::basic_string, A> const& v) 6011: { 6011: return hash_range(v.begin(), v.end()); 6011: } 6011: 6011: template 6011: typename boost::hash_detail::float_numbers::type hash_value(T v) 6011: { 6011: return boost::hash_detail::float_hash_value(v); 6011: } 6011: 6011: 6011: inline std::size_t hash_value(std::type_index v) 6011: { 6011: return v.hash_code(); 6011: } 6011: # 462 "/usr/include/boost/functional/hash/hash.hpp" 3 4 6011: template <> struct hash : public boost::hash_detail::hash_base { std::size_t operator()(bool v) const { return boost::hash_value(v); } }; 6011: template <> struct hash : public boost::hash_detail::hash_base { std::size_t operator()(char v) const { return boost::hash_value(v); } }; 6011: template <> struct hash : public boost::hash_detail::hash_base { std::size_t operator()(signed char v) const { return boost::hash_value(v); } }; 6011: template <> struct hash : public boost::hash_detail::hash_base { std::size_t operator()(unsigned char v) const { return boost::hash_value(v); } }; 6011: 6011: template <> struct hash : public boost::hash_detail::hash_base { std::size_t operator()(wchar_t v) const { return boost::hash_value(v); } }; 6011: 6011: 6011: template <> struct hash : public boost::hash_detail::hash_base { std::size_t operator()(char16_t v) const { return boost::hash_value(v); } }; 6011: 6011: 6011: template <> struct hash : public boost::hash_detail::hash_base { std::size_t operator()(char32_t v) const { return boost::hash_value(v); } }; 6011: 6011: template <> struct hash : public boost::hash_detail::hash_base { std::size_t operator()(short v) const { return boost::hash_value(v); } }; 6011: template <> struct hash : public boost::hash_detail::hash_base { std::size_t operator()(unsigned short v) const { return boost::hash_value(v); } }; 6011: template <> struct hash : public boost::hash_detail::hash_base { std::size_t operator()(int v) const { return boost::hash_value(v); } }; 6011: template <> struct hash : public boost::hash_detail::hash_base { std::size_t operator()(unsigned int v) const { return boost::hash_value(v); } }; 6011: template <> struct hash : public boost::hash_detail::hash_base { std::size_t operator()(long v) const { return boost::hash_value(v); } }; 6011: template <> struct hash : public boost::hash_detail::hash_base { std::size_t operator()(unsigned long v) const { return boost::hash_value(v); } }; 6011: 6011: template <> struct hash : public boost::hash_detail::hash_base { std::size_t operator()(float v) const { return boost::hash_value(v); } }; 6011: template <> struct hash : public boost::hash_detail::hash_base { std::size_t operator()(double v) const { return boost::hash_value(v); } }; 6011: template <> struct hash : public boost::hash_detail::hash_base { std::size_t operator()(long double v) const { return boost::hash_value(v); } }; 6011: 6011: template <> struct hash : public boost::hash_detail::hash_base { std::size_t operator()(std::string const& v) const { return boost::hash_value(v); } }; 6011: 6011: template <> struct hash : public boost::hash_detail::hash_base { std::size_t operator()(std::wstring const& v) const { return boost::hash_value(v); } }; 6011: 6011: 6011: template <> struct hash > : public boost::hash_detail::hash_base > { std::size_t operator()(std::basic_string const& v) const { return boost::hash_value(v); } }; 6011: 6011: 6011: template <> struct hash > : public boost::hash_detail::hash_base > { std::size_t operator()(std::basic_string const& v) const { return boost::hash_value(v); } }; 6011: 6011: 6011: 6011: template <> struct hash : public boost::hash_detail::hash_base { std::size_t operator()(boost::long_long_type v) const { return boost::hash_value(v); } }; 6011: template <> struct hash : public boost::hash_detail::hash_base { std::size_t operator()(boost::ulong_long_type v) const { return boost::hash_value(v); } }; 6011: # 508 "/usr/include/boost/functional/hash/hash.hpp" 3 4 6011: template <> struct hash : public boost::hash_detail::hash_base { std::size_t operator()(std::type_index v) const { return boost::hash_value(v); } }; 6011: # 518 "/usr/include/boost/functional/hash/hash.hpp" 3 4 6011: template 6011: struct hash 6011: : public boost::hash_detail::hash_base 6011: { 6011: std::size_t operator()(T* v) const 6011: { 6011: 6011: return boost::hash_value(v); 6011: 6011: 6011: 6011: 6011: 6011: 6011: } 6011: }; 6011: # 577 "/usr/include/boost/functional/hash/hash.hpp" 3 4 6011: } 6011: # 594 "/usr/include/boost/functional/hash/hash.hpp" 3 4 6011: # 1 "/usr/include/boost/functional/hash/extensions.hpp" 1 3 4 6011: # 18 "/usr/include/boost/functional/hash/extensions.hpp" 3 4 6011: 6011: 6011: 6011: # 1 "/usr/include/boost/functional/hash/hash.hpp" 1 3 4 6011: # 22 "/usr/include/boost/functional/hash/extensions.hpp" 2 3 4 6011: # 1 "/usr/include/boost/detail/container_fwd.hpp" 1 3 4 6011: # 91 "/usr/include/boost/detail/container_fwd.hpp" 3 4 6011: # 1 "/usr/include/c++/8/deque" 1 3 4 6011: # 58 "/usr/include/c++/8/deque" 3 4 6011: 6011: # 59 "/usr/include/c++/8/deque" 3 6011: 6011: 6011: 6011: 6011: 6011: # 1 "/usr/include/c++/8/bits/stl_deque.h" 1 3 6011: # 68 "/usr/include/c++/8/bits/stl_deque.h" 3 6011: namespace std __attribute__ ((__visibility__ ("default"))) 6011: { 6011: 6011: 6011: # 91 "/usr/include/c++/8/bits/stl_deque.h" 3 6011: constexpr inline size_t 6011: __deque_buf_size(size_t __size) 6011: { return (__size < 512 6011: ? size_t(512 / __size) : size_t(1)); } 6011: # 108 "/usr/include/c++/8/bits/stl_deque.h" 3 6011: template 6011: struct _Deque_iterator 6011: { 6011: 6011: 6011: 6011: 6011: 6011: 6011: private: 6011: template 6011: using __ptr_to = typename pointer_traits<_Ptr>::template rebind<_Up>; 6011: template 6011: using __iter = _Deque_iterator<_Tp, _CvTp&, __ptr_to<_CvTp>>; 6011: public: 6011: typedef __iter<_Tp> iterator; 6011: typedef __iter const_iterator; 6011: typedef __ptr_to<_Tp> _Elt_pointer; 6011: typedef __ptr_to<_Elt_pointer> _Map_pointer; 6011: 6011: 6011: static size_t _S_buffer_size() noexcept 6011: { return __deque_buf_size(sizeof(_Tp)); } 6011: 6011: typedef std::random_access_iterator_tag iterator_category; 6011: typedef _Tp value_type; 6011: typedef _Ptr pointer; 6011: typedef _Ref reference; 6011: typedef size_t size_type; 6011: typedef ptrdiff_t difference_type; 6011: typedef _Deque_iterator _Self; 6011: 6011: _Elt_pointer _M_cur; 6011: _Elt_pointer _M_first; 6011: _Elt_pointer _M_last; 6011: _Map_pointer _M_node; 6011: 6011: _Deque_iterator(_Elt_pointer __x, _Map_pointer __y) noexcept 6011: : _M_cur(__x), _M_first(*__y), 6011: _M_last(*__y + _S_buffer_size()), _M_node(__y) { } 6011: 6011: _Deque_iterator() noexcept 6011: : _M_cur(), _M_first(), _M_last(), _M_node() { } 6011: 6011: _Deque_iterator(const iterator& __x) noexcept 6011: : _M_cur(__x._M_cur), _M_first(__x._M_first), 6011: _M_last(__x._M_last), _M_node(__x._M_node) { } 6011: 6011: iterator 6011: _M_const_cast() const noexcept 6011: { return iterator(_M_cur, _M_node); } 6011: 6011: reference 6011: operator*() const noexcept 6011: { return *_M_cur; } 6011: 6011: pointer 6011: operator->() const noexcept 6011: { return _M_cur; } 6011: 6011: _Self& 6011: operator++() noexcept 6011: { 6011: ++_M_cur; 6011: if (_M_cur == _M_last) 6011: { 6011: _M_set_node(_M_node + 1); 6011: _M_cur = _M_first; 6011: } 6011: return *this; 6011: } 6011: 6011: _Self 6011: operator++(int) noexcept 6011: { 6011: _Self __tmp = *this; 6011: ++*this; 6011: return __tmp; 6011: } 6011: 6011: _Self& 6011: operator--() noexcept 6011: { 6011: if (_M_cur == _M_first) 6011: { 6011: _M_set_node(_M_node - 1); 6011: _M_cur = _M_last; 6011: } 6011: --_M_cur; 6011: return *this; 6011: } 6011: 6011: _Self 6011: operator--(int) noexcept 6011: { 6011: _Self __tmp = *this; 6011: --*this; 6011: return __tmp; 6011: } 6011: 6011: _Self& 6011: operator+=(difference_type __n) noexcept 6011: { 6011: const difference_type __offset = __n + (_M_cur - _M_first); 6011: if (__offset >= 0 && __offset < difference_type(_S_buffer_size())) 6011: _M_cur += __n; 6011: else 6011: { 6011: const difference_type __node_offset = 6011: __offset > 0 ? __offset / difference_type(_S_buffer_size()) 6011: : -difference_type((-__offset - 1) 6011: / _S_buffer_size()) - 1; 6011: _M_set_node(_M_node + __node_offset); 6011: _M_cur = _M_first + (__offset - __node_offset 6011: * difference_type(_S_buffer_size())); 6011: } 6011: return *this; 6011: } 6011: 6011: _Self 6011: operator+(difference_type __n) const noexcept 6011: { 6011: _Self __tmp = *this; 6011: return __tmp += __n; 6011: } 6011: 6011: _Self& 6011: operator-=(difference_type __n) noexcept 6011: { return *this += -__n; } 6011: 6011: _Self 6011: operator-(difference_type __n) const noexcept 6011: { 6011: _Self __tmp = *this; 6011: return __tmp -= __n; 6011: } 6011: 6011: reference 6011: operator[](difference_type __n) const noexcept 6011: { return *(*this + __n); } 6011: 6011: 6011: 6011: 6011: 6011: 6011: void 6011: _M_set_node(_Map_pointer __new_node) noexcept 6011: { 6011: _M_node = __new_node; 6011: _M_first = *__new_node; 6011: _M_last = _M_first + difference_type(_S_buffer_size()); 6011: } 6011: }; 6011: 6011: 6011: 6011: 6011: template 6011: inline bool 6011: operator==(const _Deque_iterator<_Tp, _Ref, _Ptr>& __x, 6011: const _Deque_iterator<_Tp, _Ref, _Ptr>& __y) noexcept 6011: { return __x._M_cur == __y._M_cur; } 6011: 6011: template 6011: inline bool 6011: operator==(const _Deque_iterator<_Tp, _RefL, _PtrL>& __x, 6011: const _Deque_iterator<_Tp, _RefR, _PtrR>& __y) noexcept 6011: { return __x._M_cur == __y._M_cur; } 6011: 6011: template 6011: inline bool 6011: operator!=(const _Deque_iterator<_Tp, _Ref, _Ptr>& __x, 6011: const _Deque_iterator<_Tp, _Ref, _Ptr>& __y) noexcept 6011: { return !(__x == __y); } 6011: 6011: template 6011: inline bool 6011: operator!=(const _Deque_iterator<_Tp, _RefL, _PtrL>& __x, 6011: const _Deque_iterator<_Tp, _RefR, _PtrR>& __y) noexcept 6011: { return !(__x == __y); } 6011: 6011: template 6011: inline bool 6011: operator<(const _Deque_iterator<_Tp, _Ref, _Ptr>& __x, 6011: const _Deque_iterator<_Tp, _Ref, _Ptr>& __y) noexcept 6011: { return (__x._M_node == __y._M_node) ? (__x._M_cur < __y._M_cur) 6011: : (__x._M_node < __y._M_node); } 6011: 6011: template 6011: inline bool 6011: operator<(const _Deque_iterator<_Tp, _RefL, _PtrL>& __x, 6011: const _Deque_iterator<_Tp, _RefR, _PtrR>& __y) noexcept 6011: { return (__x._M_node == __y._M_node) ? (__x._M_cur < __y._M_cur) 6011: : (__x._M_node < __y._M_node); } 6011: 6011: template 6011: inline bool 6011: operator>(const _Deque_iterator<_Tp, _Ref, _Ptr>& __x, 6011: const _Deque_iterator<_Tp, _Ref, _Ptr>& __y) noexcept 6011: { return __y < __x; } 6011: 6011: template 6011: inline bool 6011: operator>(const _Deque_iterator<_Tp, _RefL, _PtrL>& __x, 6011: const _Deque_iterator<_Tp, _RefR, _PtrR>& __y) noexcept 6011: { return __y < __x; } 6011: 6011: template 6011: inline bool 6011: operator<=(const _Deque_iterator<_Tp, _Ref, _Ptr>& __x, 6011: const _Deque_iterator<_Tp, _Ref, _Ptr>& __y) noexcept 6011: { return !(__y < __x); } 6011: 6011: template 6011: inline bool 6011: operator<=(const _Deque_iterator<_Tp, _RefL, _PtrL>& __x, 6011: const _Deque_iterator<_Tp, _RefR, _PtrR>& __y) noexcept 6011: { return !(__y < __x); } 6011: 6011: template 6011: inline bool 6011: operator>=(const _Deque_iterator<_Tp, _Ref, _Ptr>& __x, 6011: const _Deque_iterator<_Tp, _Ref, _Ptr>& __y) noexcept 6011: { return !(__x < __y); } 6011: 6011: template 6011: inline bool 6011: operator>=(const _Deque_iterator<_Tp, _RefL, _PtrL>& __x, 6011: const _Deque_iterator<_Tp, _RefR, _PtrR>& __y) noexcept 6011: { return !(__x < __y); } 6011: 6011: 6011: 6011: 6011: 6011: template 6011: inline typename _Deque_iterator<_Tp, _Ref, _Ptr>::difference_type 6011: operator-(const _Deque_iterator<_Tp, _Ref, _Ptr>& __x, 6011: const _Deque_iterator<_Tp, _Ref, _Ptr>& __y) noexcept 6011: { 6011: return typename _Deque_iterator<_Tp, _Ref, _Ptr>::difference_type 6011: (_Deque_iterator<_Tp, _Ref, _Ptr>::_S_buffer_size()) 6011: * (__x._M_node - __y._M_node - 1) + (__x._M_cur - __x._M_first) 6011: + (__y._M_last - __y._M_cur); 6011: } 6011: 6011: template 6011: inline typename _Deque_iterator<_Tp, _RefL, _PtrL>::difference_type 6011: operator-(const _Deque_iterator<_Tp, _RefL, _PtrL>& __x, 6011: const _Deque_iterator<_Tp, _RefR, _PtrR>& __y) noexcept 6011: { 6011: return typename _Deque_iterator<_Tp, _RefL, _PtrL>::difference_type 6011: (_Deque_iterator<_Tp, _RefL, _PtrL>::_S_buffer_size()) 6011: * (__x._M_node - __y._M_node - 1) + (__x._M_cur - __x._M_first) 6011: + (__y._M_last - __y._M_cur); 6011: } 6011: 6011: template 6011: inline _Deque_iterator<_Tp, _Ref, _Ptr> 6011: operator+(ptrdiff_t __n, const _Deque_iterator<_Tp, _Ref, _Ptr>& __x) 6011: noexcept 6011: { return __x + __n; } 6011: 6011: template 6011: void 6011: fill(const _Deque_iterator<_Tp, _Tp&, _Tp*>&, 6011: const _Deque_iterator<_Tp, _Tp&, _Tp*>&, const _Tp&); 6011: 6011: template 6011: _Deque_iterator<_Tp, _Tp&, _Tp*> 6011: copy(_Deque_iterator<_Tp, const _Tp&, const _Tp*>, 6011: _Deque_iterator<_Tp, const _Tp&, const _Tp*>, 6011: _Deque_iterator<_Tp, _Tp&, _Tp*>); 6011: 6011: template 6011: inline _Deque_iterator<_Tp, _Tp&, _Tp*> 6011: copy(_Deque_iterator<_Tp, _Tp&, _Tp*> __first, 6011: _Deque_iterator<_Tp, _Tp&, _Tp*> __last, 6011: _Deque_iterator<_Tp, _Tp&, _Tp*> __result) 6011: { return std::copy(_Deque_iterator<_Tp, const _Tp&, const _Tp*>(__first), 6011: _Deque_iterator<_Tp, const _Tp&, const _Tp*>(__last), 6011: __result); } 6011: 6011: template 6011: _Deque_iterator<_Tp, _Tp&, _Tp*> 6011: copy_backward(_Deque_iterator<_Tp, const _Tp&, const _Tp*>, 6011: _Deque_iterator<_Tp, const _Tp&, const _Tp*>, 6011: _Deque_iterator<_Tp, _Tp&, _Tp*>); 6011: 6011: template 6011: inline _Deque_iterator<_Tp, _Tp&, _Tp*> 6011: copy_backward(_Deque_iterator<_Tp, _Tp&, _Tp*> __first, 6011: _Deque_iterator<_Tp, _Tp&, _Tp*> __last, 6011: _Deque_iterator<_Tp, _Tp&, _Tp*> __result) 6011: { return std::copy_backward(_Deque_iterator<_Tp, 6011: const _Tp&, const _Tp*>(__first), 6011: _Deque_iterator<_Tp, 6011: const _Tp&, const _Tp*>(__last), 6011: __result); } 6011: 6011: 6011: template 6011: _Deque_iterator<_Tp, _Tp&, _Tp*> 6011: move(_Deque_iterator<_Tp, const _Tp&, const _Tp*>, 6011: _Deque_iterator<_Tp, const _Tp&, const _Tp*>, 6011: _Deque_iterator<_Tp, _Tp&, _Tp*>); 6011: 6011: template 6011: inline _Deque_iterator<_Tp, _Tp&, _Tp*> 6011: move(_Deque_iterator<_Tp, _Tp&, _Tp*> __first, 6011: _Deque_iterator<_Tp, _Tp&, _Tp*> __last, 6011: _Deque_iterator<_Tp, _Tp&, _Tp*> __result) 6011: { return std::move(_Deque_iterator<_Tp, const _Tp&, const _Tp*>(__first), 6011: _Deque_iterator<_Tp, const _Tp&, const _Tp*>(__last), 6011: __result); } 6011: 6011: template 6011: _Deque_iterator<_Tp, _Tp&, _Tp*> 6011: move_backward(_Deque_iterator<_Tp, const _Tp&, const _Tp*>, 6011: _Deque_iterator<_Tp, const _Tp&, const _Tp*>, 6011: _Deque_iterator<_Tp, _Tp&, _Tp*>); 6011: 6011: template 6011: inline _Deque_iterator<_Tp, _Tp&, _Tp*> 6011: move_backward(_Deque_iterator<_Tp, _Tp&, _Tp*> __first, 6011: _Deque_iterator<_Tp, _Tp&, _Tp*> __last, 6011: _Deque_iterator<_Tp, _Tp&, _Tp*> __result) 6011: { return std::move_backward(_Deque_iterator<_Tp, 6011: const _Tp&, const _Tp*>(__first), 6011: _Deque_iterator<_Tp, 6011: const _Tp&, const _Tp*>(__last), 6011: __result); } 6011: # 460 "/usr/include/c++/8/bits/stl_deque.h" 3 6011: template 6011: class _Deque_base 6011: { 6011: protected: 6011: typedef typename __gnu_cxx::__alloc_traits<_Alloc>::template 6011: rebind<_Tp>::other _Tp_alloc_type; 6011: typedef __gnu_cxx::__alloc_traits<_Tp_alloc_type> _Alloc_traits; 6011: 6011: 6011: 6011: 6011: 6011: typedef typename _Alloc_traits::pointer _Ptr; 6011: typedef typename _Alloc_traits::const_pointer _Ptr_const; 6011: 6011: 6011: typedef typename _Alloc_traits::template rebind<_Ptr>::other 6011: _Map_alloc_type; 6011: typedef __gnu_cxx::__alloc_traits<_Map_alloc_type> _Map_alloc_traits; 6011: 6011: public: 6011: typedef _Alloc allocator_type; 6011: typedef typename _Alloc_traits::size_type size_type; 6011: 6011: allocator_type 6011: get_allocator() const noexcept 6011: { return allocator_type(_M_get_Tp_allocator()); } 6011: 6011: typedef _Deque_iterator<_Tp, _Tp&, _Ptr> iterator; 6011: typedef _Deque_iterator<_Tp, const _Tp&, _Ptr_const> const_iterator; 6011: 6011: _Deque_base() 6011: : _M_impl() 6011: { _M_initialize_map(0); } 6011: 6011: _Deque_base(size_t __num_elements) 6011: : _M_impl() 6011: { _M_initialize_map(__num_elements); } 6011: 6011: _Deque_base(const allocator_type& __a, size_t __num_elements) 6011: : _M_impl(__a) 6011: { _M_initialize_map(__num_elements); } 6011: 6011: _Deque_base(const allocator_type& __a) 6011: : _M_impl(__a) 6011: { } 6011: 6011: 6011: _Deque_base(_Deque_base&& __x, false_type) 6011: : _M_impl(__x._M_move_impl()) 6011: { } 6011: 6011: _Deque_base(_Deque_base&& __x, true_type) 6011: : _M_impl(std::move(__x._M_get_Tp_allocator())) 6011: { 6011: _M_initialize_map(0); 6011: if (__x._M_impl._M_map) 6011: this->_M_impl._M_swap_data(__x._M_impl); 6011: } 6011: 6011: _Deque_base(_Deque_base&& __x) 6011: : _Deque_base(std::move(__x), typename _Alloc_traits::is_always_equal{}) 6011: { } 6011: 6011: _Deque_base(_Deque_base&& __x, const allocator_type& __a, size_type __n) 6011: : _M_impl(__a) 6011: { 6011: if (__x.get_allocator() == __a) 6011: { 6011: if (__x._M_impl._M_map) 6011: { 6011: _M_initialize_map(0); 6011: this->_M_impl._M_swap_data(__x._M_impl); 6011: } 6011: } 6011: else 6011: { 6011: _M_initialize_map(__n); 6011: } 6011: } 6011: 6011: 6011: ~_Deque_base() noexcept; 6011: 6011: protected: 6011: typedef typename iterator::_Map_pointer _Map_pointer; 6011: 6011: 6011: 6011: 6011: struct _Deque_impl 6011: : public _Tp_alloc_type 6011: { 6011: _Map_pointer _M_map; 6011: size_t _M_map_size; 6011: iterator _M_start; 6011: iterator _M_finish; 6011: 6011: _Deque_impl() 6011: : _Tp_alloc_type(), _M_map(), _M_map_size(0), 6011: _M_start(), _M_finish() 6011: { } 6011: 6011: _Deque_impl(const _Tp_alloc_type& __a) noexcept 6011: : _Tp_alloc_type(__a), _M_map(), _M_map_size(0), 6011: _M_start(), _M_finish() 6011: { } 6011: 6011: 6011: _Deque_impl(_Deque_impl&&) = default; 6011: 6011: _Deque_impl(_Tp_alloc_type&& __a) noexcept 6011: : _Tp_alloc_type(std::move(__a)), _M_map(), _M_map_size(0), 6011: _M_start(), _M_finish() 6011: { } 6011: 6011: 6011: void _M_swap_data(_Deque_impl& __x) noexcept 6011: { 6011: using std::swap; 6011: swap(this->_M_start, __x._M_start); 6011: swap(this->_M_finish, __x._M_finish); 6011: swap(this->_M_map, __x._M_map); 6011: swap(this->_M_map_size, __x._M_map_size); 6011: } 6011: }; 6011: 6011: _Tp_alloc_type& 6011: _M_get_Tp_allocator() noexcept 6011: { return *static_cast<_Tp_alloc_type*>(&this->_M_impl); } 6011: 6011: const _Tp_alloc_type& 6011: _M_get_Tp_allocator() const noexcept 6011: { return *static_cast(&this->_M_impl); } 6011: 6011: _Map_alloc_type 6011: _M_get_map_allocator() const noexcept 6011: { return _Map_alloc_type(_M_get_Tp_allocator()); } 6011: 6011: _Ptr 6011: _M_allocate_node() 6011: { 6011: typedef __gnu_cxx::__alloc_traits<_Tp_alloc_type> _Traits; 6011: return _Traits::allocate(_M_impl, __deque_buf_size(sizeof(_Tp))); 6011: } 6011: 6011: void 6011: _M_deallocate_node(_Ptr __p) noexcept 6011: { 6011: typedef __gnu_cxx::__alloc_traits<_Tp_alloc_type> _Traits; 6011: _Traits::deallocate(_M_impl, __p, __deque_buf_size(sizeof(_Tp))); 6011: } 6011: 6011: _Map_pointer 6011: _M_allocate_map(size_t __n) 6011: { 6011: _Map_alloc_type __map_alloc = _M_get_map_allocator(); 6011: return _Map_alloc_traits::allocate(__map_alloc, __n); 6011: } 6011: 6011: void 6011: _M_deallocate_map(_Map_pointer __p, size_t __n) noexcept 6011: { 6011: _Map_alloc_type __map_alloc = _M_get_map_allocator(); 6011: _Map_alloc_traits::deallocate(__map_alloc, __p, __n); 6011: } 6011: 6011: protected: 6011: void _M_initialize_map(size_t); 6011: void _M_create_nodes(_Map_pointer __nstart, _Map_pointer __nfinish); 6011: void _M_destroy_nodes(_Map_pointer __nstart, 6011: _Map_pointer __nfinish) noexcept; 6011: enum { _S_initial_map_size = 8 }; 6011: 6011: _Deque_impl _M_impl; 6011: 6011: 6011: private: 6011: _Deque_impl 6011: _M_move_impl() 6011: { 6011: if (!_M_impl._M_map) 6011: return std::move(_M_impl); 6011: 6011: 6011: _Tp_alloc_type __alloc{_M_get_Tp_allocator()}; 6011: 6011: _Tp_alloc_type __sink __attribute((__unused__)) {std::move(__alloc)}; 6011: 6011: _Deque_base __empty{__alloc}; 6011: __empty._M_initialize_map(0); 6011: 6011: _Deque_impl __ret{std::move(_M_get_Tp_allocator())}; 6011: _M_impl._M_swap_data(__ret); 6011: _M_impl._M_swap_data(__empty._M_impl); 6011: return __ret; 6011: } 6011: 6011: }; 6011: 6011: template 6011: _Deque_base<_Tp, _Alloc>:: 6011: ~_Deque_base() noexcept 6011: { 6011: if (this->_M_impl._M_map) 6011: { 6011: _M_destroy_nodes(this->_M_impl._M_start._M_node, 6011: this->_M_impl._M_finish._M_node + 1); 6011: _M_deallocate_map(this->_M_impl._M_map, this->_M_impl._M_map_size); 6011: } 6011: } 6011: # 680 "/usr/include/c++/8/bits/stl_deque.h" 3 6011: template 6011: void 6011: _Deque_base<_Tp, _Alloc>:: 6011: _M_initialize_map(size_t __num_elements) 6011: { 6011: const size_t __num_nodes = (__num_elements/ __deque_buf_size(sizeof(_Tp)) 6011: + 1); 6011: 6011: this->_M_impl._M_map_size = std::max((size_t) _S_initial_map_size, 6011: size_t(__num_nodes + 2)); 6011: this->_M_impl._M_map = _M_allocate_map(this->_M_impl._M_map_size); 6011: 6011: 6011: 6011: 6011: 6011: 6011: _Map_pointer __nstart = (this->_M_impl._M_map 6011: + (this->_M_impl._M_map_size - __num_nodes) / 2); 6011: _Map_pointer __nfinish = __nstart + __num_nodes; 6011: 6011: try 6011: { _M_create_nodes(__nstart, __nfinish); } 6011: catch(...) 6011: { 6011: _M_deallocate_map(this->_M_impl._M_map, this->_M_impl._M_map_size); 6011: this->_M_impl._M_map = _Map_pointer(); 6011: this->_M_impl._M_map_size = 0; 6011: throw; 6011: } 6011: 6011: this->_M_impl._M_start._M_set_node(__nstart); 6011: this->_M_impl._M_finish._M_set_node(__nfinish - 1); 6011: this->_M_impl._M_start._M_cur = _M_impl._M_start._M_first; 6011: this->_M_impl._M_finish._M_cur = (this->_M_impl._M_finish._M_first 6011: + __num_elements 6011: % __deque_buf_size(sizeof(_Tp))); 6011: } 6011: 6011: template 6011: void 6011: _Deque_base<_Tp, _Alloc>:: 6011: _M_create_nodes(_Map_pointer __nstart, _Map_pointer __nfinish) 6011: { 6011: _Map_pointer __cur; 6011: try 6011: { 6011: for (__cur = __nstart; __cur < __nfinish; ++__cur) 6011: *__cur = this->_M_allocate_node(); 6011: } 6011: catch(...) 6011: { 6011: _M_destroy_nodes(__nstart, __cur); 6011: throw; 6011: } 6011: } 6011: 6011: template 6011: void 6011: _Deque_base<_Tp, _Alloc>:: 6011: _M_destroy_nodes(_Map_pointer __nstart, 6011: _Map_pointer __nfinish) noexcept 6011: { 6011: for (_Map_pointer __n = __nstart; __n < __nfinish; ++__n) 6011: _M_deallocate_node(*__n); 6011: } 6011: # 831 "/usr/include/c++/8/bits/stl_deque.h" 3 6011: template > 6011: class deque : protected _Deque_base<_Tp, _Alloc> 6011: { 6011: # 844 "/usr/include/c++/8/bits/stl_deque.h" 3 6011: static_assert(is_same::type, _Tp>::value, 6011: "std::deque must have a non-const, non-volatile value_type"); 6011: 6011: 6011: 6011: 6011: 6011: 6011: typedef _Deque_base<_Tp, _Alloc> _Base; 6011: typedef typename _Base::_Tp_alloc_type _Tp_alloc_type; 6011: typedef typename _Base::_Alloc_traits _Alloc_traits; 6011: typedef typename _Base::_Map_pointer _Map_pointer; 6011: 6011: public: 6011: typedef _Tp value_type; 6011: typedef typename _Alloc_traits::pointer pointer; 6011: typedef typename _Alloc_traits::const_pointer const_pointer; 6011: typedef typename _Alloc_traits::reference reference; 6011: typedef typename _Alloc_traits::const_reference const_reference; 6011: typedef typename _Base::iterator iterator; 6011: typedef typename _Base::const_iterator const_iterator; 6011: typedef std::reverse_iterator const_reverse_iterator; 6011: typedef std::reverse_iterator reverse_iterator; 6011: typedef size_t size_type; 6011: typedef ptrdiff_t difference_type; 6011: typedef _Alloc allocator_type; 6011: 6011: protected: 6011: static size_t _S_buffer_size() noexcept 6011: { return __deque_buf_size(sizeof(_Tp)); } 6011: 6011: 6011: using _Base::_M_initialize_map; 6011: using _Base::_M_create_nodes; 6011: using _Base::_M_destroy_nodes; 6011: using _Base::_M_allocate_node; 6011: using _Base::_M_deallocate_node; 6011: using _Base::_M_allocate_map; 6011: using _Base::_M_deallocate_map; 6011: using _Base::_M_get_Tp_allocator; 6011: 6011: 6011: 6011: 6011: 6011: using _Base::_M_impl; 6011: 6011: public: 6011: 6011: 6011: 6011: 6011: 6011: 6011: deque() : _Base() { } 6011: 6011: 6011: 6011: 6011: 6011: explicit 6011: deque(const allocator_type& __a) 6011: : _Base(__a, 0) { } 6011: # 917 "/usr/include/c++/8/bits/stl_deque.h" 3 6011: explicit 6011: deque(size_type __n, const allocator_type& __a = allocator_type()) 6011: : _Base(__a, __n) 6011: { _M_default_initialize(); } 6011: # 930 "/usr/include/c++/8/bits/stl_deque.h" 3 6011: deque(size_type __n, const value_type& __value, 6011: const allocator_type& __a = allocator_type()) 6011: : _Base(__a, __n) 6011: { _M_fill_initialize(__value); } 6011: # 957 "/usr/include/c++/8/bits/stl_deque.h" 3 6011: deque(const deque& __x) 6011: : _Base(_Alloc_traits::_S_select_on_copy(__x._M_get_Tp_allocator()), 6011: __x.size()) 6011: { std::__uninitialized_copy_a(__x.begin(), __x.end(), 6011: this->_M_impl._M_start, 6011: _M_get_Tp_allocator()); } 6011: # 972 "/usr/include/c++/8/bits/stl_deque.h" 3 6011: deque(deque&& __x) 6011: : _Base(std::move(__x)) { } 6011: 6011: 6011: deque(const deque& __x, const allocator_type& __a) 6011: : _Base(__a, __x.size()) 6011: { std::__uninitialized_copy_a(__x.begin(), __x.end(), 6011: this->_M_impl._M_start, 6011: _M_get_Tp_allocator()); } 6011: 6011: 6011: deque(deque&& __x, const allocator_type& __a) 6011: : _Base(std::move(__x), __a, __x.size()) 6011: { 6011: if (__x.get_allocator() != __a) 6011: { 6011: std::__uninitialized_move_a(__x.begin(), __x.end(), 6011: this->_M_impl._M_start, 6011: _M_get_Tp_allocator()); 6011: __x.clear(); 6011: } 6011: } 6011: # 1006 "/usr/include/c++/8/bits/stl_deque.h" 3 6011: deque(initializer_list __l, 6011: const allocator_type& __a = allocator_type()) 6011: : _Base(__a) 6011: { 6011: _M_range_initialize(__l.begin(), __l.end(), 6011: random_access_iterator_tag()); 6011: } 6011: # 1031 "/usr/include/c++/8/bits/stl_deque.h" 3 6011: template> 6011: deque(_InputIterator __first, _InputIterator __last, 6011: const allocator_type& __a = allocator_type()) 6011: : _Base(__a) 6011: { _M_initialize_dispatch(__first, __last, __false_type()); } 6011: # 1054 "/usr/include/c++/8/bits/stl_deque.h" 3 6011: ~deque() 6011: { _M_destroy_data(begin(), end(), _M_get_Tp_allocator()); } 6011: # 1066 "/usr/include/c++/8/bits/stl_deque.h" 3 6011: deque& 6011: operator=(const deque& __x); 6011: # 1078 "/usr/include/c++/8/bits/stl_deque.h" 3 6011: deque& 6011: operator=(deque&& __x) noexcept(_Alloc_traits::_S_always_equal()) 6011: { 6011: using __always_equal = typename _Alloc_traits::is_always_equal; 6011: _M_move_assign1(std::move(__x), __always_equal{}); 6011: return *this; 6011: } 6011: # 1097 "/usr/include/c++/8/bits/stl_deque.h" 3 6011: deque& 6011: operator=(initializer_list __l) 6011: { 6011: _M_assign_aux(__l.begin(), __l.end(), 6011: random_access_iterator_tag()); 6011: return *this; 6011: } 6011: # 1116 "/usr/include/c++/8/bits/stl_deque.h" 3 6011: void 6011: assign(size_type __n, const value_type& __val) 6011: { _M_fill_assign(__n, __val); } 6011: # 1133 "/usr/include/c++/8/bits/stl_deque.h" 3 6011: template> 6011: void 6011: assign(_InputIterator __first, _InputIterator __last) 6011: { _M_assign_dispatch(__first, __last, __false_type()); } 6011: # 1160 "/usr/include/c++/8/bits/stl_deque.h" 3 6011: void 6011: assign(initializer_list __l) 6011: { _M_assign_aux(__l.begin(), __l.end(), random_access_iterator_tag()); } 6011: 6011: 6011: 6011: allocator_type 6011: get_allocator() const noexcept 6011: { return _Base::get_allocator(); } 6011: 6011: 6011: 6011: 6011: 6011: 6011: iterator 6011: begin() noexcept 6011: { return this->_M_impl._M_start; } 6011: 6011: 6011: 6011: 6011: 6011: const_iterator 6011: begin() const noexcept 6011: { return this->_M_impl._M_start; } 6011: 6011: 6011: 6011: 6011: 6011: 6011: iterator 6011: end() noexcept 6011: { return this->_M_impl._M_finish; } 6011: 6011: 6011: 6011: 6011: 6011: 6011: const_iterator 6011: end() const noexcept 6011: { return this->_M_impl._M_finish; } 6011: 6011: 6011: 6011: 6011: 6011: 6011: reverse_iterator 6011: rbegin() noexcept 6011: { return reverse_iterator(this->_M_impl._M_finish); } 6011: 6011: 6011: 6011: 6011: 6011: 6011: const_reverse_iterator 6011: rbegin() const noexcept 6011: { return const_reverse_iterator(this->_M_impl._M_finish); } 6011: 6011: 6011: 6011: 6011: 6011: 6011: reverse_iterator 6011: rend() noexcept 6011: { return reverse_iterator(this->_M_impl._M_start); } 6011: 6011: 6011: 6011: 6011: 6011: 6011: const_reverse_iterator 6011: rend() const noexcept 6011: { return const_reverse_iterator(this->_M_impl._M_start); } 6011: 6011: 6011: 6011: 6011: 6011: 6011: const_iterator 6011: cbegin() const noexcept 6011: { return this->_M_impl._M_start; } 6011: 6011: 6011: 6011: 6011: 6011: 6011: const_iterator 6011: cend() const noexcept 6011: { return this->_M_impl._M_finish; } 6011: 6011: 6011: 6011: 6011: 6011: 6011: const_reverse_iterator 6011: crbegin() const noexcept 6011: { return const_reverse_iterator(this->_M_impl._M_finish); } 6011: 6011: 6011: 6011: 6011: 6011: 6011: const_reverse_iterator 6011: crend() const noexcept 6011: { return const_reverse_iterator(this->_M_impl._M_start); } 6011: 6011: 6011: 6011: 6011: size_type 6011: size() const noexcept 6011: { return this->_M_impl._M_finish - this->_M_impl._M_start; } 6011: 6011: 6011: size_type 6011: max_size() const noexcept 6011: { return _Alloc_traits::max_size(_M_get_Tp_allocator()); } 6011: # 1299 "/usr/include/c++/8/bits/stl_deque.h" 3 6011: void 6011: resize(size_type __new_size) 6011: { 6011: const size_type __len = size(); 6011: if (__new_size > __len) 6011: _M_default_append(__new_size - __len); 6011: else if (__new_size < __len) 6011: _M_erase_at_end(this->_M_impl._M_start 6011: + difference_type(__new_size)); 6011: } 6011: # 1321 "/usr/include/c++/8/bits/stl_deque.h" 3 6011: void 6011: resize(size_type __new_size, const value_type& __x) 6011: { 6011: const size_type __len = size(); 6011: if (__new_size > __len) 6011: _M_fill_insert(this->_M_impl._M_finish, __new_size - __len, __x); 6011: else if (__new_size < __len) 6011: _M_erase_at_end(this->_M_impl._M_start 6011: + difference_type(__new_size)); 6011: } 6011: # 1357 "/usr/include/c++/8/bits/stl_deque.h" 3 6011: void 6011: shrink_to_fit() noexcept 6011: { _M_shrink_to_fit(); } 6011: 6011: 6011: 6011: 6011: 6011: 6011: bool 6011: empty() const noexcept 6011: { return this->_M_impl._M_finish == this->_M_impl._M_start; } 6011: # 1382 "/usr/include/c++/8/bits/stl_deque.h" 3 6011: reference 6011: operator[](size_type __n) noexcept 6011: { 6011: ; 6011: return this->_M_impl._M_start[difference_type(__n)]; 6011: } 6011: # 1400 "/usr/include/c++/8/bits/stl_deque.h" 3 6011: const_reference 6011: operator[](size_type __n) const noexcept 6011: { 6011: ; 6011: return this->_M_impl._M_start[difference_type(__n)]; 6011: } 6011: 6011: protected: 6011: 6011: void 6011: _M_range_check(size_type __n) const 6011: { 6011: if (__n >= this->size()) 6011: __throw_out_of_range_fmt(("deque::_M_range_check: __n " "(which is %zu)>= this->size() " "(which is %zu)") 6011: 6011: , 6011: __n, this->size()); 6011: } 6011: 6011: public: 6011: # 1431 "/usr/include/c++/8/bits/stl_deque.h" 3 6011: reference 6011: at(size_type __n) 6011: { 6011: _M_range_check(__n); 6011: return (*this)[__n]; 6011: } 6011: # 1449 "/usr/include/c++/8/bits/stl_deque.h" 3 6011: const_reference 6011: at(size_type __n) const 6011: { 6011: _M_range_check(__n); 6011: return (*this)[__n]; 6011: } 6011: 6011: 6011: 6011: 6011: 6011: reference 6011: front() noexcept 6011: { 6011: ; 6011: return *begin(); 6011: } 6011: 6011: 6011: 6011: 6011: 6011: const_reference 6011: front() const noexcept 6011: { 6011: ; 6011: return *begin(); 6011: } 6011: 6011: 6011: 6011: 6011: 6011: reference 6011: back() noexcept 6011: { 6011: ; 6011: iterator __tmp = end(); 6011: --__tmp; 6011: return *__tmp; 6011: } 6011: 6011: 6011: 6011: 6011: 6011: const_reference 6011: back() const noexcept 6011: { 6011: ; 6011: const_iterator __tmp = end(); 6011: --__tmp; 6011: return *__tmp; 6011: } 6011: # 1514 "/usr/include/c++/8/bits/stl_deque.h" 3 6011: void 6011: push_front(const value_type& __x) 6011: { 6011: if (this->_M_impl._M_start._M_cur != this->_M_impl._M_start._M_first) 6011: { 6011: _Alloc_traits::construct(this->_M_impl, 6011: this->_M_impl._M_start._M_cur - 1, 6011: __x); 6011: --this->_M_impl._M_start._M_cur; 6011: } 6011: else 6011: _M_push_front_aux(__x); 6011: } 6011: 6011: 6011: void 6011: push_front(value_type&& __x) 6011: { emplace_front(std::move(__x)); } 6011: 6011: template 6011: 6011: 6011: 6011: void 6011: 6011: emplace_front(_Args&&... __args); 6011: # 1551 "/usr/include/c++/8/bits/stl_deque.h" 3 6011: void 6011: push_back(const value_type& __x) 6011: { 6011: if (this->_M_impl._M_finish._M_cur 6011: != this->_M_impl._M_finish._M_last - 1) 6011: { 6011: _Alloc_traits::construct(this->_M_impl, 6011: this->_M_impl._M_finish._M_cur, __x); 6011: ++this->_M_impl._M_finish._M_cur; 6011: } 6011: else 6011: _M_push_back_aux(__x); 6011: } 6011: 6011: 6011: void 6011: push_back(value_type&& __x) 6011: { emplace_back(std::move(__x)); } 6011: 6011: template 6011: 6011: 6011: 6011: void 6011: 6011: emplace_back(_Args&&... __args); 6011: # 1587 "/usr/include/c++/8/bits/stl_deque.h" 3 6011: void 6011: pop_front() noexcept 6011: { 6011: ; 6011: if (this->_M_impl._M_start._M_cur 6011: != this->_M_impl._M_start._M_last - 1) 6011: { 6011: _Alloc_traits::destroy(this->_M_impl, 6011: this->_M_impl._M_start._M_cur); 6011: ++this->_M_impl._M_start._M_cur; 6011: } 6011: else 6011: _M_pop_front_aux(); 6011: } 6011: # 1610 "/usr/include/c++/8/bits/stl_deque.h" 3 6011: void 6011: pop_back() noexcept 6011: { 6011: ; 6011: if (this->_M_impl._M_finish._M_cur 6011: != this->_M_impl._M_finish._M_first) 6011: { 6011: --this->_M_impl._M_finish._M_cur; 6011: _Alloc_traits::destroy(this->_M_impl, 6011: this->_M_impl._M_finish._M_cur); 6011: } 6011: else 6011: _M_pop_back_aux(); 6011: } 6011: # 1635 "/usr/include/c++/8/bits/stl_deque.h" 3 6011: template 6011: iterator 6011: emplace(const_iterator __position, _Args&&... __args); 6011: # 1648 "/usr/include/c++/8/bits/stl_deque.h" 3 6011: iterator 6011: insert(const_iterator __position, const value_type& __x); 6011: # 1674 "/usr/include/c++/8/bits/stl_deque.h" 3 6011: iterator 6011: insert(const_iterator __position, value_type&& __x) 6011: { return emplace(__position, std::move(__x)); } 6011: # 1687 "/usr/include/c++/8/bits/stl_deque.h" 3 6011: iterator 6011: insert(const_iterator __p, initializer_list __l) 6011: { 6011: auto __offset = __p - cbegin(); 6011: _M_range_insert_aux(__p._M_const_cast(), __l.begin(), __l.end(), 6011: std::random_access_iterator_tag()); 6011: return begin() + __offset; 6011: } 6011: # 1708 "/usr/include/c++/8/bits/stl_deque.h" 3 6011: iterator 6011: insert(const_iterator __position, size_type __n, const value_type& __x) 6011: { 6011: difference_type __offset = __position - cbegin(); 6011: _M_fill_insert(__position._M_const_cast(), __n, __x); 6011: return begin() + __offset; 6011: } 6011: # 1742 "/usr/include/c++/8/bits/stl_deque.h" 3 6011: template> 6011: iterator 6011: insert(const_iterator __position, _InputIterator __first, 6011: _InputIterator __last) 6011: { 6011: difference_type __offset = __position - cbegin(); 6011: _M_insert_dispatch(__position._M_const_cast(), 6011: __first, __last, __false_type()); 6011: return begin() + __offset; 6011: } 6011: # 1788 "/usr/include/c++/8/bits/stl_deque.h" 3 6011: iterator 6011: 6011: erase(const_iterator __position) 6011: 6011: 6011: 6011: { return _M_erase(__position._M_const_cast()); } 6011: # 1812 "/usr/include/c++/8/bits/stl_deque.h" 3 6011: iterator 6011: 6011: erase(const_iterator __first, const_iterator __last) 6011: 6011: 6011: 6011: { return _M_erase(__first._M_const_cast(), __last._M_const_cast()); } 6011: # 1831 "/usr/include/c++/8/bits/stl_deque.h" 3 6011: void 6011: swap(deque& __x) noexcept 6011: { 6011: 6011: 6011: ; 6011: 6011: _M_impl._M_swap_data(__x._M_impl); 6011: _Alloc_traits::_S_on_swap(_M_get_Tp_allocator(), 6011: __x._M_get_Tp_allocator()); 6011: } 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: void 6011: clear() noexcept 6011: { _M_erase_at_end(begin()); } 6011: 6011: protected: 6011: 6011: 6011: 6011: 6011: 6011: 6011: template 6011: void 6011: _M_initialize_dispatch(_Integer __n, _Integer __x, __true_type) 6011: { 6011: _M_initialize_map(static_cast(__n)); 6011: _M_fill_initialize(__x); 6011: } 6011: 6011: 6011: template 6011: void 6011: _M_initialize_dispatch(_InputIterator __first, _InputIterator __last, 6011: __false_type) 6011: { 6011: _M_range_initialize(__first, __last, 6011: std::__iterator_category(__first)); 6011: } 6011: # 1890 "/usr/include/c++/8/bits/stl_deque.h" 3 6011: template 6011: void 6011: _M_range_initialize(_InputIterator __first, _InputIterator __last, 6011: std::input_iterator_tag); 6011: 6011: 6011: template 6011: void 6011: _M_range_initialize(_ForwardIterator __first, _ForwardIterator __last, 6011: std::forward_iterator_tag); 6011: # 1912 "/usr/include/c++/8/bits/stl_deque.h" 3 6011: void 6011: _M_fill_initialize(const value_type& __value); 6011: 6011: 6011: 6011: void 6011: _M_default_initialize(); 6011: # 1928 "/usr/include/c++/8/bits/stl_deque.h" 3 6011: template 6011: void 6011: _M_assign_dispatch(_Integer __n, _Integer __val, __true_type) 6011: { _M_fill_assign(__n, __val); } 6011: 6011: 6011: template 6011: void 6011: _M_assign_dispatch(_InputIterator __first, _InputIterator __last, 6011: __false_type) 6011: { _M_assign_aux(__first, __last, std::__iterator_category(__first)); } 6011: 6011: 6011: template 6011: void 6011: _M_assign_aux(_InputIterator __first, _InputIterator __last, 6011: std::input_iterator_tag); 6011: 6011: 6011: template 6011: void 6011: _M_assign_aux(_ForwardIterator __first, _ForwardIterator __last, 6011: std::forward_iterator_tag) 6011: { 6011: const size_type __len = std::distance(__first, __last); 6011: if (__len > size()) 6011: { 6011: _ForwardIterator __mid = __first; 6011: std::advance(__mid, size()); 6011: std::copy(__first, __mid, begin()); 6011: _M_range_insert_aux(end(), __mid, __last, 6011: std::__iterator_category(__first)); 6011: } 6011: else 6011: _M_erase_at_end(std::copy(__first, __last, begin())); 6011: } 6011: 6011: 6011: 6011: void 6011: _M_fill_assign(size_type __n, const value_type& __val) 6011: { 6011: if (__n > size()) 6011: { 6011: std::fill(begin(), end(), __val); 6011: _M_fill_insert(end(), __n - size(), __val); 6011: } 6011: else 6011: { 6011: _M_erase_at_end(begin() + difference_type(__n)); 6011: std::fill(begin(), end(), __val); 6011: } 6011: } 6011: # 1989 "/usr/include/c++/8/bits/stl_deque.h" 3 6011: template 6011: void _M_push_back_aux(_Args&&... __args); 6011: 6011: template 6011: void _M_push_front_aux(_Args&&... __args); 6011: 6011: 6011: void _M_pop_back_aux(); 6011: 6011: void _M_pop_front_aux(); 6011: # 2008 "/usr/include/c++/8/bits/stl_deque.h" 3 6011: template 6011: void 6011: _M_insert_dispatch(iterator __pos, 6011: _Integer __n, _Integer __x, __true_type) 6011: { _M_fill_insert(__pos, __n, __x); } 6011: 6011: 6011: template 6011: void 6011: _M_insert_dispatch(iterator __pos, 6011: _InputIterator __first, _InputIterator __last, 6011: __false_type) 6011: { 6011: _M_range_insert_aux(__pos, __first, __last, 6011: std::__iterator_category(__first)); 6011: } 6011: 6011: 6011: template 6011: void 6011: _M_range_insert_aux(iterator __pos, _InputIterator __first, 6011: _InputIterator __last, std::input_iterator_tag); 6011: 6011: 6011: template 6011: void 6011: _M_range_insert_aux(iterator __pos, _ForwardIterator __first, 6011: _ForwardIterator __last, std::forward_iterator_tag); 6011: 6011: 6011: 6011: 6011: void 6011: _M_fill_insert(iterator __pos, size_type __n, const value_type& __x); 6011: 6011: 6011: 6011: 6011: 6011: 6011: template 6011: iterator 6011: _M_insert_aux(iterator __pos, _Args&&... __args); 6011: 6011: 6011: 6011: void 6011: _M_insert_aux(iterator __pos, size_type __n, const value_type& __x); 6011: 6011: 6011: template 6011: void 6011: _M_insert_aux(iterator __pos, 6011: _ForwardIterator __first, _ForwardIterator __last, 6011: size_type __n); 6011: 6011: 6011: 6011: 6011: void 6011: _M_destroy_data_aux(iterator __first, iterator __last); 6011: 6011: 6011: 6011: template 6011: void 6011: _M_destroy_data(iterator __first, iterator __last, const _Alloc1&) 6011: { _M_destroy_data_aux(__first, __last); } 6011: 6011: void 6011: _M_destroy_data(iterator __first, iterator __last, 6011: const std::allocator<_Tp>&) 6011: { 6011: if (!__has_trivial_destructor(value_type)) 6011: _M_destroy_data_aux(__first, __last); 6011: } 6011: 6011: 6011: void 6011: _M_erase_at_begin(iterator __pos) 6011: { 6011: _M_destroy_data(begin(), __pos, _M_get_Tp_allocator()); 6011: _M_destroy_nodes(this->_M_impl._M_start._M_node, __pos._M_node); 6011: this->_M_impl._M_start = __pos; 6011: } 6011: 6011: 6011: 6011: void 6011: _M_erase_at_end(iterator __pos) 6011: { 6011: _M_destroy_data(__pos, end(), _M_get_Tp_allocator()); 6011: _M_destroy_nodes(__pos._M_node + 1, 6011: this->_M_impl._M_finish._M_node + 1); 6011: this->_M_impl._M_finish = __pos; 6011: } 6011: 6011: iterator 6011: _M_erase(iterator __pos); 6011: 6011: iterator 6011: _M_erase(iterator __first, iterator __last); 6011: 6011: 6011: 6011: void 6011: _M_default_append(size_type __n); 6011: 6011: bool 6011: _M_shrink_to_fit(); 6011: 6011: 6011: 6011: 6011: iterator 6011: _M_reserve_elements_at_front(size_type __n) 6011: { 6011: const size_type __vacancies = this->_M_impl._M_start._M_cur 6011: - this->_M_impl._M_start._M_first; 6011: if (__n > __vacancies) 6011: _M_new_elements_at_front(__n - __vacancies); 6011: return this->_M_impl._M_start - difference_type(__n); 6011: } 6011: 6011: iterator 6011: _M_reserve_elements_at_back(size_type __n) 6011: { 6011: const size_type __vacancies = (this->_M_impl._M_finish._M_last 6011: - this->_M_impl._M_finish._M_cur) - 1; 6011: if (__n > __vacancies) 6011: _M_new_elements_at_back(__n - __vacancies); 6011: return this->_M_impl._M_finish + difference_type(__n); 6011: } 6011: 6011: void 6011: _M_new_elements_at_front(size_type __new_elements); 6011: 6011: void 6011: _M_new_elements_at_back(size_type __new_elements); 6011: # 2158 "/usr/include/c++/8/bits/stl_deque.h" 3 6011: void 6011: _M_reserve_map_at_back(size_type __nodes_to_add = 1) 6011: { 6011: if (__nodes_to_add + 1 > this->_M_impl._M_map_size 6011: - (this->_M_impl._M_finish._M_node - this->_M_impl._M_map)) 6011: _M_reallocate_map(__nodes_to_add, false); 6011: } 6011: 6011: void 6011: _M_reserve_map_at_front(size_type __nodes_to_add = 1) 6011: { 6011: if (__nodes_to_add > size_type(this->_M_impl._M_start._M_node 6011: - this->_M_impl._M_map)) 6011: _M_reallocate_map(__nodes_to_add, true); 6011: } 6011: 6011: void 6011: _M_reallocate_map(size_type __nodes_to_add, bool __add_at_front); 6011: 6011: 6011: 6011: 6011: 6011: void 6011: _M_move_assign1(deque&& __x, true_type) noexcept 6011: { 6011: this->_M_impl._M_swap_data(__x._M_impl); 6011: __x.clear(); 6011: std::__alloc_on_move(_M_get_Tp_allocator(), __x._M_get_Tp_allocator()); 6011: } 6011: 6011: 6011: 6011: 6011: void 6011: _M_move_assign1(deque&& __x, false_type) 6011: { 6011: constexpr bool __move_storage = 6011: _Alloc_traits::_S_propagate_on_move_assign(); 6011: _M_move_assign2(std::move(__x), __bool_constant<__move_storage>()); 6011: } 6011: 6011: 6011: 6011: template 6011: void 6011: _M_replace_map(_Args&&... __args) 6011: { 6011: 6011: deque __newobj(std::forward<_Args>(__args)...); 6011: 6011: clear(); 6011: _M_deallocate_node(*begin()._M_node); 6011: _M_deallocate_map(this->_M_impl._M_map, this->_M_impl._M_map_size); 6011: this->_M_impl._M_map = nullptr; 6011: this->_M_impl._M_map_size = 0; 6011: 6011: this->_M_impl._M_swap_data(__newobj._M_impl); 6011: } 6011: 6011: 6011: void 6011: _M_move_assign2(deque&& __x, true_type) 6011: { 6011: 6011: auto __alloc = __x._M_get_Tp_allocator(); 6011: 6011: 6011: _M_replace_map(std::move(__x)); 6011: 6011: _M_get_Tp_allocator() = std::move(__alloc); 6011: } 6011: 6011: 6011: 6011: void 6011: _M_move_assign2(deque&& __x, false_type) 6011: { 6011: if (__x._M_get_Tp_allocator() == this->_M_get_Tp_allocator()) 6011: { 6011: 6011: 6011: _M_replace_map(std::move(__x), __x.get_allocator()); 6011: } 6011: else 6011: { 6011: 6011: 6011: _M_assign_aux(std::__make_move_if_noexcept_iterator(__x.begin()), 6011: std::__make_move_if_noexcept_iterator(__x.end()), 6011: std::random_access_iterator_tag()); 6011: __x.clear(); 6011: } 6011: } 6011: 6011: }; 6011: # 2275 "/usr/include/c++/8/bits/stl_deque.h" 3 6011: template 6011: inline bool 6011: operator==(const deque<_Tp, _Alloc>& __x, 6011: const deque<_Tp, _Alloc>& __y) 6011: { return __x.size() == __y.size() 6011: && std::equal(__x.begin(), __x.end(), __y.begin()); } 6011: # 2293 "/usr/include/c++/8/bits/stl_deque.h" 3 6011: template 6011: inline bool 6011: operator<(const deque<_Tp, _Alloc>& __x, 6011: const deque<_Tp, _Alloc>& __y) 6011: { return std::lexicographical_compare(__x.begin(), __x.end(), 6011: __y.begin(), __y.end()); } 6011: 6011: 6011: template 6011: inline bool 6011: operator!=(const deque<_Tp, _Alloc>& __x, 6011: const deque<_Tp, _Alloc>& __y) 6011: { return !(__x == __y); } 6011: 6011: 6011: template 6011: inline bool 6011: operator>(const deque<_Tp, _Alloc>& __x, 6011: const deque<_Tp, _Alloc>& __y) 6011: { return __y < __x; } 6011: 6011: 6011: template 6011: inline bool 6011: operator<=(const deque<_Tp, _Alloc>& __x, 6011: const deque<_Tp, _Alloc>& __y) 6011: { return !(__y < __x); } 6011: 6011: 6011: template 6011: inline bool 6011: operator>=(const deque<_Tp, _Alloc>& __x, 6011: const deque<_Tp, _Alloc>& __y) 6011: { return !(__x < __y); } 6011: 6011: 6011: template 6011: inline void 6011: swap(deque<_Tp,_Alloc>& __x, deque<_Tp,_Alloc>& __y) 6011: noexcept(noexcept(__x.swap(__y))) 6011: { __x.swap(__y); } 6011: 6011: 6011: 6011: 6011: 6011: } 6011: # 65 "/usr/include/c++/8/deque" 2 3 6011: 6011: # 1 "/usr/include/c++/8/bits/deque.tcc" 1 3 6011: # 59 "/usr/include/c++/8/bits/deque.tcc" 3 6011: namespace std __attribute__ ((__visibility__ ("default"))) 6011: { 6011: 6011: 6011: 6011: 6011: template 6011: void 6011: deque<_Tp, _Alloc>:: 6011: _M_default_initialize() 6011: { 6011: _Map_pointer __cur; 6011: try 6011: { 6011: for (__cur = this->_M_impl._M_start._M_node; 6011: __cur < this->_M_impl._M_finish._M_node; 6011: ++__cur) 6011: std::__uninitialized_default_a(*__cur, *__cur + _S_buffer_size(), 6011: _M_get_Tp_allocator()); 6011: std::__uninitialized_default_a(this->_M_impl._M_finish._M_first, 6011: this->_M_impl._M_finish._M_cur, 6011: _M_get_Tp_allocator()); 6011: } 6011: catch(...) 6011: { 6011: std::_Destroy(this->_M_impl._M_start, iterator(*__cur, __cur), 6011: _M_get_Tp_allocator()); 6011: throw; 6011: } 6011: } 6011: 6011: 6011: template 6011: deque<_Tp, _Alloc>& 6011: deque<_Tp, _Alloc>:: 6011: operator=(const deque& __x) 6011: { 6011: if (&__x != this) 6011: { 6011: 6011: if (_Alloc_traits::_S_propagate_on_copy_assign()) 6011: { 6011: if (!_Alloc_traits::_S_always_equal() 6011: && _M_get_Tp_allocator() != __x._M_get_Tp_allocator()) 6011: { 6011: 6011: 6011: _M_replace_map(__x, __x.get_allocator()); 6011: std::__alloc_on_copy(_M_get_Tp_allocator(), 6011: __x._M_get_Tp_allocator()); 6011: return *this; 6011: } 6011: std::__alloc_on_copy(_M_get_Tp_allocator(), 6011: __x._M_get_Tp_allocator()); 6011: } 6011: 6011: const size_type __len = size(); 6011: if (__len >= __x.size()) 6011: _M_erase_at_end(std::copy(__x.begin(), __x.end(), 6011: this->_M_impl._M_start)); 6011: else 6011: { 6011: const_iterator __mid = __x.begin() + difference_type(__len); 6011: std::copy(__x.begin(), __mid, this->_M_impl._M_start); 6011: _M_range_insert_aux(this->_M_impl._M_finish, __mid, __x.end(), 6011: std::random_access_iterator_tag()); 6011: } 6011: } 6011: return *this; 6011: } 6011: 6011: 6011: template 6011: template 6011: 6011: 6011: 6011: void 6011: 6011: deque<_Tp, _Alloc>:: 6011: emplace_front(_Args&&... __args) 6011: { 6011: if (this->_M_impl._M_start._M_cur != this->_M_impl._M_start._M_first) 6011: { 6011: _Alloc_traits::construct(this->_M_impl, 6011: this->_M_impl._M_start._M_cur - 1, 6011: std::forward<_Args>(__args)...); 6011: --this->_M_impl._M_start._M_cur; 6011: } 6011: else 6011: _M_push_front_aux(std::forward<_Args>(__args)...); 6011: 6011: 6011: 6011: } 6011: 6011: template 6011: template 6011: 6011: 6011: 6011: void 6011: 6011: deque<_Tp, _Alloc>:: 6011: emplace_back(_Args&&... __args) 6011: { 6011: if (this->_M_impl._M_finish._M_cur 6011: != this->_M_impl._M_finish._M_last - 1) 6011: { 6011: _Alloc_traits::construct(this->_M_impl, 6011: this->_M_impl._M_finish._M_cur, 6011: std::forward<_Args>(__args)...); 6011: ++this->_M_impl._M_finish._M_cur; 6011: } 6011: else 6011: _M_push_back_aux(std::forward<_Args>(__args)...); 6011: 6011: 6011: 6011: } 6011: 6011: 6011: 6011: template 6011: template 6011: typename deque<_Tp, _Alloc>::iterator 6011: deque<_Tp, _Alloc>:: 6011: emplace(const_iterator __position, _Args&&... __args) 6011: { 6011: if (__position._M_cur == this->_M_impl._M_start._M_cur) 6011: { 6011: emplace_front(std::forward<_Args>(__args)...); 6011: return this->_M_impl._M_start; 6011: } 6011: else if (__position._M_cur == this->_M_impl._M_finish._M_cur) 6011: { 6011: emplace_back(std::forward<_Args>(__args)...); 6011: iterator __tmp = this->_M_impl._M_finish; 6011: --__tmp; 6011: return __tmp; 6011: } 6011: else 6011: return _M_insert_aux(__position._M_const_cast(), 6011: std::forward<_Args>(__args)...); 6011: } 6011: 6011: 6011: template 6011: typename deque<_Tp, _Alloc>::iterator 6011: deque<_Tp, _Alloc>:: 6011: 6011: insert(const_iterator __position, const value_type& __x) 6011: 6011: 6011: 6011: { 6011: if (__position._M_cur == this->_M_impl._M_start._M_cur) 6011: { 6011: push_front(__x); 6011: return this->_M_impl._M_start; 6011: } 6011: else if (__position._M_cur == this->_M_impl._M_finish._M_cur) 6011: { 6011: push_back(__x); 6011: iterator __tmp = this->_M_impl._M_finish; 6011: --__tmp; 6011: return __tmp; 6011: } 6011: else 6011: return _M_insert_aux(__position._M_const_cast(), __x); 6011: } 6011: 6011: template 6011: typename deque<_Tp, _Alloc>::iterator 6011: deque<_Tp, _Alloc>:: 6011: _M_erase(iterator __position) 6011: { 6011: iterator __next = __position; 6011: ++__next; 6011: const difference_type __index = __position - begin(); 6011: if (static_cast(__index) < (size() >> 1)) 6011: { 6011: if (__position != begin()) 6011: std::move_backward(begin(), __position, __next); 6011: pop_front(); 6011: } 6011: else 6011: { 6011: if (__next != end()) 6011: std::move(__next, end(), __position); 6011: pop_back(); 6011: } 6011: return begin() + __index; 6011: } 6011: 6011: template 6011: typename deque<_Tp, _Alloc>::iterator 6011: deque<_Tp, _Alloc>:: 6011: _M_erase(iterator __first, iterator __last) 6011: { 6011: if (__first == __last) 6011: return __first; 6011: else if (__first == begin() && __last == end()) 6011: { 6011: clear(); 6011: return end(); 6011: } 6011: else 6011: { 6011: const difference_type __n = __last - __first; 6011: const difference_type __elems_before = __first - begin(); 6011: if (static_cast(__elems_before) <= (size() - __n) / 2) 6011: { 6011: if (__first != begin()) 6011: std::move_backward(begin(), __first, __last); 6011: _M_erase_at_begin(begin() + __n); 6011: } 6011: else 6011: { 6011: if (__last != end()) 6011: std::move(__last, end(), __first); 6011: _M_erase_at_end(end() - __n); 6011: } 6011: return begin() + __elems_before; 6011: } 6011: } 6011: 6011: template 6011: template 6011: void 6011: deque<_Tp, _Alloc>:: 6011: _M_assign_aux(_InputIterator __first, _InputIterator __last, 6011: std::input_iterator_tag) 6011: { 6011: iterator __cur = begin(); 6011: for (; __first != __last && __cur != end(); ++__cur, ++__first) 6011: *__cur = *__first; 6011: if (__first == __last) 6011: _M_erase_at_end(__cur); 6011: else 6011: _M_range_insert_aux(end(), __first, __last, 6011: std::__iterator_category(__first)); 6011: } 6011: 6011: template 6011: void 6011: deque<_Tp, _Alloc>:: 6011: _M_fill_insert(iterator __pos, size_type __n, const value_type& __x) 6011: { 6011: if (__pos._M_cur == this->_M_impl._M_start._M_cur) 6011: { 6011: iterator __new_start = _M_reserve_elements_at_front(__n); 6011: try 6011: { 6011: std::__uninitialized_fill_a(__new_start, this->_M_impl._M_start, 6011: __x, _M_get_Tp_allocator()); 6011: this->_M_impl._M_start = __new_start; 6011: } 6011: catch(...) 6011: { 6011: _M_destroy_nodes(__new_start._M_node, 6011: this->_M_impl._M_start._M_node); 6011: throw; 6011: } 6011: } 6011: else if (__pos._M_cur == this->_M_impl._M_finish._M_cur) 6011: { 6011: iterator __new_finish = _M_reserve_elements_at_back(__n); 6011: try 6011: { 6011: std::__uninitialized_fill_a(this->_M_impl._M_finish, 6011: __new_finish, __x, 6011: _M_get_Tp_allocator()); 6011: this->_M_impl._M_finish = __new_finish; 6011: } 6011: catch(...) 6011: { 6011: _M_destroy_nodes(this->_M_impl._M_finish._M_node + 1, 6011: __new_finish._M_node + 1); 6011: throw; 6011: } 6011: } 6011: else 6011: _M_insert_aux(__pos, __n, __x); 6011: } 6011: 6011: 6011: template 6011: void 6011: deque<_Tp, _Alloc>:: 6011: _M_default_append(size_type __n) 6011: { 6011: if (__n) 6011: { 6011: iterator __new_finish = _M_reserve_elements_at_back(__n); 6011: try 6011: { 6011: std::__uninitialized_default_a(this->_M_impl._M_finish, 6011: __new_finish, 6011: _M_get_Tp_allocator()); 6011: this->_M_impl._M_finish = __new_finish; 6011: } 6011: catch(...) 6011: { 6011: _M_destroy_nodes(this->_M_impl._M_finish._M_node + 1, 6011: __new_finish._M_node + 1); 6011: throw; 6011: } 6011: } 6011: } 6011: 6011: template 6011: bool 6011: deque<_Tp, _Alloc>:: 6011: _M_shrink_to_fit() 6011: { 6011: const difference_type __front_capacity 6011: = (this->_M_impl._M_start._M_cur - this->_M_impl._M_start._M_first); 6011: if (__front_capacity == 0) 6011: return false; 6011: 6011: const difference_type __back_capacity 6011: = (this->_M_impl._M_finish._M_last - this->_M_impl._M_finish._M_cur); 6011: if (__front_capacity + __back_capacity < _S_buffer_size()) 6011: return false; 6011: 6011: return std::__shrink_to_fit_aux::_S_do_it(*this); 6011: } 6011: 6011: 6011: template 6011: void 6011: deque<_Tp, _Alloc>:: 6011: _M_fill_initialize(const value_type& __value) 6011: { 6011: _Map_pointer __cur; 6011: try 6011: { 6011: for (__cur = this->_M_impl._M_start._M_node; 6011: __cur < this->_M_impl._M_finish._M_node; 6011: ++__cur) 6011: std::__uninitialized_fill_a(*__cur, *__cur + _S_buffer_size(), 6011: __value, _M_get_Tp_allocator()); 6011: std::__uninitialized_fill_a(this->_M_impl._M_finish._M_first, 6011: this->_M_impl._M_finish._M_cur, 6011: __value, _M_get_Tp_allocator()); 6011: } 6011: catch(...) 6011: { 6011: std::_Destroy(this->_M_impl._M_start, iterator(*__cur, __cur), 6011: _M_get_Tp_allocator()); 6011: throw; 6011: } 6011: } 6011: 6011: template 6011: template 6011: void 6011: deque<_Tp, _Alloc>:: 6011: _M_range_initialize(_InputIterator __first, _InputIterator __last, 6011: std::input_iterator_tag) 6011: { 6011: this->_M_initialize_map(0); 6011: try 6011: { 6011: for (; __first != __last; ++__first) 6011: 6011: emplace_back(*__first); 6011: 6011: 6011: 6011: } 6011: catch(...) 6011: { 6011: clear(); 6011: throw; 6011: } 6011: } 6011: 6011: template 6011: template 6011: void 6011: deque<_Tp, _Alloc>:: 6011: _M_range_initialize(_ForwardIterator __first, _ForwardIterator __last, 6011: std::forward_iterator_tag) 6011: { 6011: const size_type __n = std::distance(__first, __last); 6011: this->_M_initialize_map(__n); 6011: 6011: _Map_pointer __cur_node; 6011: try 6011: { 6011: for (__cur_node = this->_M_impl._M_start._M_node; 6011: __cur_node < this->_M_impl._M_finish._M_node; 6011: ++__cur_node) 6011: { 6011: _ForwardIterator __mid = __first; 6011: std::advance(__mid, _S_buffer_size()); 6011: std::__uninitialized_copy_a(__first, __mid, *__cur_node, 6011: _M_get_Tp_allocator()); 6011: __first = __mid; 6011: } 6011: std::__uninitialized_copy_a(__first, __last, 6011: this->_M_impl._M_finish._M_first, 6011: _M_get_Tp_allocator()); 6011: } 6011: catch(...) 6011: { 6011: std::_Destroy(this->_M_impl._M_start, 6011: iterator(*__cur_node, __cur_node), 6011: _M_get_Tp_allocator()); 6011: throw; 6011: } 6011: } 6011: 6011: 6011: template 6011: 6011: template 6011: void 6011: deque<_Tp, _Alloc>:: 6011: _M_push_back_aux(_Args&&... __args) 6011: 6011: 6011: 6011: 6011: 6011: { 6011: _M_reserve_map_at_back(); 6011: *(this->_M_impl._M_finish._M_node + 1) = this->_M_allocate_node(); 6011: try 6011: { 6011: 6011: _Alloc_traits::construct(this->_M_impl, 6011: this->_M_impl._M_finish._M_cur, 6011: std::forward<_Args>(__args)...); 6011: 6011: 6011: 6011: this->_M_impl._M_finish._M_set_node(this->_M_impl._M_finish._M_node 6011: + 1); 6011: this->_M_impl._M_finish._M_cur = this->_M_impl._M_finish._M_first; 6011: } 6011: catch(...) 6011: { 6011: _M_deallocate_node(*(this->_M_impl._M_finish._M_node + 1)); 6011: throw; 6011: } 6011: } 6011: 6011: 6011: template 6011: 6011: template 6011: void 6011: deque<_Tp, _Alloc>:: 6011: _M_push_front_aux(_Args&&... __args) 6011: 6011: 6011: 6011: 6011: 6011: { 6011: _M_reserve_map_at_front(); 6011: *(this->_M_impl._M_start._M_node - 1) = this->_M_allocate_node(); 6011: try 6011: { 6011: this->_M_impl._M_start._M_set_node(this->_M_impl._M_start._M_node 6011: - 1); 6011: this->_M_impl._M_start._M_cur = this->_M_impl._M_start._M_last - 1; 6011: 6011: _Alloc_traits::construct(this->_M_impl, 6011: this->_M_impl._M_start._M_cur, 6011: std::forward<_Args>(__args)...); 6011: 6011: 6011: 6011: } 6011: catch(...) 6011: { 6011: ++this->_M_impl._M_start; 6011: _M_deallocate_node(*(this->_M_impl._M_start._M_node - 1)); 6011: throw; 6011: } 6011: } 6011: 6011: 6011: template 6011: void deque<_Tp, _Alloc>:: 6011: _M_pop_back_aux() 6011: { 6011: _M_deallocate_node(this->_M_impl._M_finish._M_first); 6011: this->_M_impl._M_finish._M_set_node(this->_M_impl._M_finish._M_node - 1); 6011: this->_M_impl._M_finish._M_cur = this->_M_impl._M_finish._M_last - 1; 6011: _Alloc_traits::destroy(_M_get_Tp_allocator(), 6011: this->_M_impl._M_finish._M_cur); 6011: } 6011: 6011: 6011: 6011: 6011: 6011: 6011: template 6011: void deque<_Tp, _Alloc>:: 6011: _M_pop_front_aux() 6011: { 6011: _Alloc_traits::destroy(_M_get_Tp_allocator(), 6011: this->_M_impl._M_start._M_cur); 6011: _M_deallocate_node(this->_M_impl._M_start._M_first); 6011: this->_M_impl._M_start._M_set_node(this->_M_impl._M_start._M_node + 1); 6011: this->_M_impl._M_start._M_cur = this->_M_impl._M_start._M_first; 6011: } 6011: 6011: template 6011: template 6011: void 6011: deque<_Tp, _Alloc>:: 6011: _M_range_insert_aux(iterator __pos, 6011: _InputIterator __first, _InputIterator __last, 6011: std::input_iterator_tag) 6011: { std::copy(__first, __last, std::inserter(*this, __pos)); } 6011: 6011: template 6011: template 6011: void 6011: deque<_Tp, _Alloc>:: 6011: _M_range_insert_aux(iterator __pos, 6011: _ForwardIterator __first, _ForwardIterator __last, 6011: std::forward_iterator_tag) 6011: { 6011: const size_type __n = std::distance(__first, __last); 6011: if (__pos._M_cur == this->_M_impl._M_start._M_cur) 6011: { 6011: iterator __new_start = _M_reserve_elements_at_front(__n); 6011: try 6011: { 6011: std::__uninitialized_copy_a(__first, __last, __new_start, 6011: _M_get_Tp_allocator()); 6011: this->_M_impl._M_start = __new_start; 6011: } 6011: catch(...) 6011: { 6011: _M_destroy_nodes(__new_start._M_node, 6011: this->_M_impl._M_start._M_node); 6011: throw; 6011: } 6011: } 6011: else if (__pos._M_cur == this->_M_impl._M_finish._M_cur) 6011: { 6011: iterator __new_finish = _M_reserve_elements_at_back(__n); 6011: try 6011: { 6011: std::__uninitialized_copy_a(__first, __last, 6011: this->_M_impl._M_finish, 6011: _M_get_Tp_allocator()); 6011: this->_M_impl._M_finish = __new_finish; 6011: } 6011: catch(...) 6011: { 6011: _M_destroy_nodes(this->_M_impl._M_finish._M_node + 1, 6011: __new_finish._M_node + 1); 6011: throw; 6011: } 6011: } 6011: else 6011: _M_insert_aux(__pos, __first, __last, __n); 6011: } 6011: 6011: template 6011: 6011: template 6011: typename deque<_Tp, _Alloc>::iterator 6011: deque<_Tp, _Alloc>:: 6011: _M_insert_aux(iterator __pos, _Args&&... __args) 6011: { 6011: value_type __x_copy(std::forward<_Args>(__args)...); 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: difference_type __index = __pos - this->_M_impl._M_start; 6011: if (static_cast(__index) < size() / 2) 6011: { 6011: push_front(std::move(front())); 6011: iterator __front1 = this->_M_impl._M_start; 6011: ++__front1; 6011: iterator __front2 = __front1; 6011: ++__front2; 6011: __pos = this->_M_impl._M_start + __index; 6011: iterator __pos1 = __pos; 6011: ++__pos1; 6011: std::move(__front2, __pos1, __front1); 6011: } 6011: else 6011: { 6011: push_back(std::move(back())); 6011: iterator __back1 = this->_M_impl._M_finish; 6011: --__back1; 6011: iterator __back2 = __back1; 6011: --__back2; 6011: __pos = this->_M_impl._M_start + __index; 6011: std::move_backward(__pos, __back2, __back1); 6011: } 6011: *__pos = std::move(__x_copy); 6011: return __pos; 6011: } 6011: 6011: template 6011: void 6011: deque<_Tp, _Alloc>:: 6011: _M_insert_aux(iterator __pos, size_type __n, const value_type& __x) 6011: { 6011: const difference_type __elems_before = __pos - this->_M_impl._M_start; 6011: const size_type __length = this->size(); 6011: value_type __x_copy = __x; 6011: if (__elems_before < difference_type(__length / 2)) 6011: { 6011: iterator __new_start = _M_reserve_elements_at_front(__n); 6011: iterator __old_start = this->_M_impl._M_start; 6011: __pos = this->_M_impl._M_start + __elems_before; 6011: try 6011: { 6011: if (__elems_before >= difference_type(__n)) 6011: { 6011: iterator __start_n = (this->_M_impl._M_start 6011: + difference_type(__n)); 6011: std::__uninitialized_move_a(this->_M_impl._M_start, 6011: __start_n, __new_start, 6011: _M_get_Tp_allocator()); 6011: this->_M_impl._M_start = __new_start; 6011: std::move(__start_n, __pos, __old_start); 6011: std::fill(__pos - difference_type(__n), __pos, __x_copy); 6011: } 6011: else 6011: { 6011: std::__uninitialized_move_fill(this->_M_impl._M_start, 6011: __pos, __new_start, 6011: this->_M_impl._M_start, 6011: __x_copy, 6011: _M_get_Tp_allocator()); 6011: this->_M_impl._M_start = __new_start; 6011: std::fill(__old_start, __pos, __x_copy); 6011: } 6011: } 6011: catch(...) 6011: { 6011: _M_destroy_nodes(__new_start._M_node, 6011: this->_M_impl._M_start._M_node); 6011: throw; 6011: } 6011: } 6011: else 6011: { 6011: iterator __new_finish = _M_reserve_elements_at_back(__n); 6011: iterator __old_finish = this->_M_impl._M_finish; 6011: const difference_type __elems_after = 6011: difference_type(__length) - __elems_before; 6011: __pos = this->_M_impl._M_finish - __elems_after; 6011: try 6011: { 6011: if (__elems_after > difference_type(__n)) 6011: { 6011: iterator __finish_n = (this->_M_impl._M_finish 6011: - difference_type(__n)); 6011: std::__uninitialized_move_a(__finish_n, 6011: this->_M_impl._M_finish, 6011: this->_M_impl._M_finish, 6011: _M_get_Tp_allocator()); 6011: this->_M_impl._M_finish = __new_finish; 6011: std::move_backward(__pos, __finish_n, __old_finish); 6011: std::fill(__pos, __pos + difference_type(__n), __x_copy); 6011: } 6011: else 6011: { 6011: std::__uninitialized_fill_move(this->_M_impl._M_finish, 6011: __pos + difference_type(__n), 6011: __x_copy, __pos, 6011: this->_M_impl._M_finish, 6011: _M_get_Tp_allocator()); 6011: this->_M_impl._M_finish = __new_finish; 6011: std::fill(__pos, __old_finish, __x_copy); 6011: } 6011: } 6011: catch(...) 6011: { 6011: _M_destroy_nodes(this->_M_impl._M_finish._M_node + 1, 6011: __new_finish._M_node + 1); 6011: throw; 6011: } 6011: } 6011: } 6011: 6011: template 6011: template 6011: void 6011: deque<_Tp, _Alloc>:: 6011: _M_insert_aux(iterator __pos, 6011: _ForwardIterator __first, _ForwardIterator __last, 6011: size_type __n) 6011: { 6011: const difference_type __elemsbefore = __pos - this->_M_impl._M_start; 6011: const size_type __length = size(); 6011: if (static_cast(__elemsbefore) < __length / 2) 6011: { 6011: iterator __new_start = _M_reserve_elements_at_front(__n); 6011: iterator __old_start = this->_M_impl._M_start; 6011: __pos = this->_M_impl._M_start + __elemsbefore; 6011: try 6011: { 6011: if (__elemsbefore >= difference_type(__n)) 6011: { 6011: iterator __start_n = (this->_M_impl._M_start 6011: + difference_type(__n)); 6011: std::__uninitialized_move_a(this->_M_impl._M_start, 6011: __start_n, __new_start, 6011: _M_get_Tp_allocator()); 6011: this->_M_impl._M_start = __new_start; 6011: std::move(__start_n, __pos, __old_start); 6011: std::copy(__first, __last, __pos - difference_type(__n)); 6011: } 6011: else 6011: { 6011: _ForwardIterator __mid = __first; 6011: std::advance(__mid, difference_type(__n) - __elemsbefore); 6011: std::__uninitialized_move_copy(this->_M_impl._M_start, 6011: __pos, __first, __mid, 6011: __new_start, 6011: _M_get_Tp_allocator()); 6011: this->_M_impl._M_start = __new_start; 6011: std::copy(__mid, __last, __old_start); 6011: } 6011: } 6011: catch(...) 6011: { 6011: _M_destroy_nodes(__new_start._M_node, 6011: this->_M_impl._M_start._M_node); 6011: throw; 6011: } 6011: } 6011: else 6011: { 6011: iterator __new_finish = _M_reserve_elements_at_back(__n); 6011: iterator __old_finish = this->_M_impl._M_finish; 6011: const difference_type __elemsafter = 6011: difference_type(__length) - __elemsbefore; 6011: __pos = this->_M_impl._M_finish - __elemsafter; 6011: try 6011: { 6011: if (__elemsafter > difference_type(__n)) 6011: { 6011: iterator __finish_n = (this->_M_impl._M_finish 6011: - difference_type(__n)); 6011: std::__uninitialized_move_a(__finish_n, 6011: this->_M_impl._M_finish, 6011: this->_M_impl._M_finish, 6011: _M_get_Tp_allocator()); 6011: this->_M_impl._M_finish = __new_finish; 6011: std::move_backward(__pos, __finish_n, __old_finish); 6011: std::copy(__first, __last, __pos); 6011: } 6011: else 6011: { 6011: _ForwardIterator __mid = __first; 6011: std::advance(__mid, __elemsafter); 6011: std::__uninitialized_copy_move(__mid, __last, __pos, 6011: this->_M_impl._M_finish, 6011: this->_M_impl._M_finish, 6011: _M_get_Tp_allocator()); 6011: this->_M_impl._M_finish = __new_finish; 6011: std::copy(__first, __mid, __pos); 6011: } 6011: } 6011: catch(...) 6011: { 6011: _M_destroy_nodes(this->_M_impl._M_finish._M_node + 1, 6011: __new_finish._M_node + 1); 6011: throw; 6011: } 6011: } 6011: } 6011: 6011: template 6011: void 6011: deque<_Tp, _Alloc>:: 6011: _M_destroy_data_aux(iterator __first, iterator __last) 6011: { 6011: for (_Map_pointer __node = __first._M_node + 1; 6011: __node < __last._M_node; ++__node) 6011: std::_Destroy(*__node, *__node + _S_buffer_size(), 6011: _M_get_Tp_allocator()); 6011: 6011: if (__first._M_node != __last._M_node) 6011: { 6011: std::_Destroy(__first._M_cur, __first._M_last, 6011: _M_get_Tp_allocator()); 6011: std::_Destroy(__last._M_first, __last._M_cur, 6011: _M_get_Tp_allocator()); 6011: } 6011: else 6011: std::_Destroy(__first._M_cur, __last._M_cur, 6011: _M_get_Tp_allocator()); 6011: } 6011: 6011: template 6011: void 6011: deque<_Tp, _Alloc>:: 6011: _M_new_elements_at_front(size_type __new_elems) 6011: { 6011: if (this->max_size() - this->size() < __new_elems) 6011: __throw_length_error(("deque::_M_new_elements_at_front")); 6011: 6011: const size_type __new_nodes = ((__new_elems + _S_buffer_size() - 1) 6011: / _S_buffer_size()); 6011: _M_reserve_map_at_front(__new_nodes); 6011: size_type __i; 6011: try 6011: { 6011: for (__i = 1; __i <= __new_nodes; ++__i) 6011: *(this->_M_impl._M_start._M_node - __i) = this->_M_allocate_node(); 6011: } 6011: catch(...) 6011: { 6011: for (size_type __j = 1; __j < __i; ++__j) 6011: _M_deallocate_node(*(this->_M_impl._M_start._M_node - __j)); 6011: throw; 6011: } 6011: } 6011: 6011: template 6011: void 6011: deque<_Tp, _Alloc>:: 6011: _M_new_elements_at_back(size_type __new_elems) 6011: { 6011: if (this->max_size() - this->size() < __new_elems) 6011: __throw_length_error(("deque::_M_new_elements_at_back")); 6011: 6011: const size_type __new_nodes = ((__new_elems + _S_buffer_size() - 1) 6011: / _S_buffer_size()); 6011: _M_reserve_map_at_back(__new_nodes); 6011: size_type __i; 6011: try 6011: { 6011: for (__i = 1; __i <= __new_nodes; ++__i) 6011: *(this->_M_impl._M_finish._M_node + __i) = this->_M_allocate_node(); 6011: } 6011: catch(...) 6011: { 6011: for (size_type __j = 1; __j < __i; ++__j) 6011: _M_deallocate_node(*(this->_M_impl._M_finish._M_node + __j)); 6011: throw; 6011: } 6011: } 6011: 6011: template 6011: void 6011: deque<_Tp, _Alloc>:: 6011: _M_reallocate_map(size_type __nodes_to_add, bool __add_at_front) 6011: { 6011: const size_type __old_num_nodes 6011: = this->_M_impl._M_finish._M_node - this->_M_impl._M_start._M_node + 1; 6011: const size_type __new_num_nodes = __old_num_nodes + __nodes_to_add; 6011: 6011: _Map_pointer __new_nstart; 6011: if (this->_M_impl._M_map_size > 2 * __new_num_nodes) 6011: { 6011: __new_nstart = this->_M_impl._M_map + (this->_M_impl._M_map_size 6011: - __new_num_nodes) / 2 6011: + (__add_at_front ? __nodes_to_add : 0); 6011: if (__new_nstart < this->_M_impl._M_start._M_node) 6011: std::copy(this->_M_impl._M_start._M_node, 6011: this->_M_impl._M_finish._M_node + 1, 6011: __new_nstart); 6011: else 6011: std::copy_backward(this->_M_impl._M_start._M_node, 6011: this->_M_impl._M_finish._M_node + 1, 6011: __new_nstart + __old_num_nodes); 6011: } 6011: else 6011: { 6011: size_type __new_map_size = this->_M_impl._M_map_size 6011: + std::max(this->_M_impl._M_map_size, 6011: __nodes_to_add) + 2; 6011: 6011: _Map_pointer __new_map = this->_M_allocate_map(__new_map_size); 6011: __new_nstart = __new_map + (__new_map_size - __new_num_nodes) / 2 6011: + (__add_at_front ? __nodes_to_add : 0); 6011: std::copy(this->_M_impl._M_start._M_node, 6011: this->_M_impl._M_finish._M_node + 1, 6011: __new_nstart); 6011: _M_deallocate_map(this->_M_impl._M_map, this->_M_impl._M_map_size); 6011: 6011: this->_M_impl._M_map = __new_map; 6011: this->_M_impl._M_map_size = __new_map_size; 6011: } 6011: 6011: this->_M_impl._M_start._M_set_node(__new_nstart); 6011: this->_M_impl._M_finish._M_set_node(__new_nstart + __old_num_nodes - 1); 6011: } 6011: 6011: 6011: 6011: template 6011: void 6011: fill(const _Deque_iterator<_Tp, _Tp&, _Tp*>& __first, 6011: const _Deque_iterator<_Tp, _Tp&, _Tp*>& __last, const _Tp& __value) 6011: { 6011: typedef typename _Deque_iterator<_Tp, _Tp&, _Tp*>::_Self _Self; 6011: 6011: for (typename _Self::_Map_pointer __node = __first._M_node + 1; 6011: __node < __last._M_node; ++__node) 6011: std::fill(*__node, *__node + _Self::_S_buffer_size(), __value); 6011: 6011: if (__first._M_node != __last._M_node) 6011: { 6011: std::fill(__first._M_cur, __first._M_last, __value); 6011: std::fill(__last._M_first, __last._M_cur, __value); 6011: } 6011: else 6011: std::fill(__first._M_cur, __last._M_cur, __value); 6011: } 6011: 6011: template 6011: _Deque_iterator<_Tp, _Tp&, _Tp*> 6011: copy(_Deque_iterator<_Tp, const _Tp&, const _Tp*> __first, 6011: _Deque_iterator<_Tp, const _Tp&, const _Tp*> __last, 6011: _Deque_iterator<_Tp, _Tp&, _Tp*> __result) 6011: { 6011: typedef typename _Deque_iterator<_Tp, _Tp&, _Tp*>::_Self _Self; 6011: typedef typename _Self::difference_type difference_type; 6011: 6011: difference_type __len = __last - __first; 6011: while (__len > 0) 6011: { 6011: const difference_type __clen 6011: = std::min(__len, std::min(__first._M_last - __first._M_cur, 6011: __result._M_last - __result._M_cur)); 6011: std::copy(__first._M_cur, __first._M_cur + __clen, __result._M_cur); 6011: __first += __clen; 6011: __result += __clen; 6011: __len -= __clen; 6011: } 6011: return __result; 6011: } 6011: 6011: template 6011: _Deque_iterator<_Tp, _Tp&, _Tp*> 6011: copy_backward(_Deque_iterator<_Tp, const _Tp&, const _Tp*> __first, 6011: _Deque_iterator<_Tp, const _Tp&, const _Tp*> __last, 6011: _Deque_iterator<_Tp, _Tp&, _Tp*> __result) 6011: { 6011: typedef typename _Deque_iterator<_Tp, _Tp&, _Tp*>::_Self _Self; 6011: typedef typename _Self::difference_type difference_type; 6011: 6011: difference_type __len = __last - __first; 6011: while (__len > 0) 6011: { 6011: difference_type __llen = __last._M_cur - __last._M_first; 6011: _Tp* __lend = __last._M_cur; 6011: 6011: difference_type __rlen = __result._M_cur - __result._M_first; 6011: _Tp* __rend = __result._M_cur; 6011: 6011: if (!__llen) 6011: { 6011: __llen = _Self::_S_buffer_size(); 6011: __lend = *(__last._M_node - 1) + __llen; 6011: } 6011: if (!__rlen) 6011: { 6011: __rlen = _Self::_S_buffer_size(); 6011: __rend = *(__result._M_node - 1) + __rlen; 6011: } 6011: 6011: const difference_type __clen = std::min(__len, 6011: std::min(__llen, __rlen)); 6011: std::copy_backward(__lend - __clen, __lend, __rend); 6011: __last -= __clen; 6011: __result -= __clen; 6011: __len -= __clen; 6011: } 6011: return __result; 6011: } 6011: 6011: 6011: template 6011: _Deque_iterator<_Tp, _Tp&, _Tp*> 6011: move(_Deque_iterator<_Tp, const _Tp&, const _Tp*> __first, 6011: _Deque_iterator<_Tp, const _Tp&, const _Tp*> __last, 6011: _Deque_iterator<_Tp, _Tp&, _Tp*> __result) 6011: { 6011: typedef typename _Deque_iterator<_Tp, _Tp&, _Tp*>::_Self _Self; 6011: typedef typename _Self::difference_type difference_type; 6011: 6011: difference_type __len = __last - __first; 6011: while (__len > 0) 6011: { 6011: const difference_type __clen 6011: = std::min(__len, std::min(__first._M_last - __first._M_cur, 6011: __result._M_last - __result._M_cur)); 6011: std::move(__first._M_cur, __first._M_cur + __clen, __result._M_cur); 6011: __first += __clen; 6011: __result += __clen; 6011: __len -= __clen; 6011: } 6011: return __result; 6011: } 6011: 6011: template 6011: _Deque_iterator<_Tp, _Tp&, _Tp*> 6011: move_backward(_Deque_iterator<_Tp, const _Tp&, const _Tp*> __first, 6011: _Deque_iterator<_Tp, const _Tp&, const _Tp*> __last, 6011: _Deque_iterator<_Tp, _Tp&, _Tp*> __result) 6011: { 6011: typedef typename _Deque_iterator<_Tp, _Tp&, _Tp*>::_Self _Self; 6011: typedef typename _Self::difference_type difference_type; 6011: 6011: difference_type __len = __last - __first; 6011: while (__len > 0) 6011: { 6011: difference_type __llen = __last._M_cur - __last._M_first; 6011: _Tp* __lend = __last._M_cur; 6011: 6011: difference_type __rlen = __result._M_cur - __result._M_first; 6011: _Tp* __rend = __result._M_cur; 6011: 6011: if (!__llen) 6011: { 6011: __llen = _Self::_S_buffer_size(); 6011: __lend = *(__last._M_node - 1) + __llen; 6011: } 6011: if (!__rlen) 6011: { 6011: __rlen = _Self::_S_buffer_size(); 6011: __rend = *(__result._M_node - 1) + __rlen; 6011: } 6011: 6011: const difference_type __clen = std::min(__len, 6011: std::min(__llen, __rlen)); 6011: std::move_backward(__lend - __clen, __lend, __rend); 6011: __last -= __clen; 6011: __result -= __clen; 6011: __len -= __clen; 6011: } 6011: return __result; 6011: } 6011: 6011: 6011: 6011: 6011: } 6011: # 67 "/usr/include/c++/8/deque" 2 3 6011: # 92 "/usr/include/boost/detail/container_fwd.hpp" 2 3 4 6011: 6011: 6011: 6011: 6011: # 1 "/usr/include/c++/8/bitset" 1 3 4 6011: # 45 "/usr/include/c++/8/bitset" 3 4 6011: 6011: # 46 "/usr/include/c++/8/bitset" 3 6011: # 60 "/usr/include/c++/8/bitset" 3 6011: namespace std __attribute__ ((__visibility__ ("default"))) 6011: { 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: template 6011: struct _Base_bitset 6011: { 6011: typedef unsigned long _WordT; 6011: 6011: 6011: _WordT _M_w[_Nw]; 6011: 6011: constexpr _Base_bitset() noexcept 6011: : _M_w() { } 6011: 6011: 6011: constexpr _Base_bitset(unsigned long long __val) noexcept 6011: : _M_w{ _WordT(__val) 6011: 6011: , _WordT(__val >> (8 * 4)) 6011: 6011: } { } 6011: 6011: 6011: 6011: 6011: 6011: 6011: static constexpr size_t 6011: _S_whichword(size_t __pos) noexcept 6011: { return __pos / (8 * 4); } 6011: 6011: static constexpr size_t 6011: _S_whichbyte(size_t __pos) noexcept 6011: { return (__pos % (8 * 4)) / 8; } 6011: 6011: static constexpr size_t 6011: _S_whichbit(size_t __pos) noexcept 6011: { return __pos % (8 * 4); } 6011: 6011: static constexpr _WordT 6011: _S_maskbit(size_t __pos) noexcept 6011: { return (static_cast<_WordT>(1)) << _S_whichbit(__pos); } 6011: 6011: _WordT& 6011: _M_getword(size_t __pos) noexcept 6011: { return _M_w[_S_whichword(__pos)]; } 6011: 6011: constexpr _WordT 6011: _M_getword(size_t __pos) const noexcept 6011: { return _M_w[_S_whichword(__pos)]; } 6011: 6011: 6011: const _WordT* 6011: _M_getdata() const noexcept 6011: { return _M_w; } 6011: 6011: 6011: _WordT& 6011: _M_hiword() noexcept 6011: { return _M_w[_Nw - 1]; } 6011: 6011: constexpr _WordT 6011: _M_hiword() const noexcept 6011: { return _M_w[_Nw - 1]; } 6011: 6011: void 6011: _M_do_and(const _Base_bitset<_Nw>& __x) noexcept 6011: { 6011: for (size_t __i = 0; __i < _Nw; __i++) 6011: _M_w[__i] &= __x._M_w[__i]; 6011: } 6011: 6011: void 6011: _M_do_or(const _Base_bitset<_Nw>& __x) noexcept 6011: { 6011: for (size_t __i = 0; __i < _Nw; __i++) 6011: _M_w[__i] |= __x._M_w[__i]; 6011: } 6011: 6011: void 6011: _M_do_xor(const _Base_bitset<_Nw>& __x) noexcept 6011: { 6011: for (size_t __i = 0; __i < _Nw; __i++) 6011: _M_w[__i] ^= __x._M_w[__i]; 6011: } 6011: 6011: void 6011: _M_do_left_shift(size_t __shift) noexcept; 6011: 6011: void 6011: _M_do_right_shift(size_t __shift) noexcept; 6011: 6011: void 6011: _M_do_flip() noexcept 6011: { 6011: for (size_t __i = 0; __i < _Nw; __i++) 6011: _M_w[__i] = ~_M_w[__i]; 6011: } 6011: 6011: void 6011: _M_do_set() noexcept 6011: { 6011: for (size_t __i = 0; __i < _Nw; __i++) 6011: _M_w[__i] = ~static_cast<_WordT>(0); 6011: } 6011: 6011: void 6011: _M_do_reset() noexcept 6011: { __builtin_memset(_M_w, 0, _Nw * sizeof(_WordT)); } 6011: 6011: bool 6011: _M_is_equal(const _Base_bitset<_Nw>& __x) const noexcept 6011: { 6011: for (size_t __i = 0; __i < _Nw; ++__i) 6011: if (_M_w[__i] != __x._M_w[__i]) 6011: return false; 6011: return true; 6011: } 6011: 6011: template 6011: bool 6011: _M_are_all() const noexcept 6011: { 6011: for (size_t __i = 0; __i < _Nw - 1; __i++) 6011: if (_M_w[__i] != ~static_cast<_WordT>(0)) 6011: return false; 6011: return _M_hiword() == (~static_cast<_WordT>(0) 6011: >> (_Nw * (8 * 4) 6011: - _Nb)); 6011: } 6011: 6011: bool 6011: _M_is_any() const noexcept 6011: { 6011: for (size_t __i = 0; __i < _Nw; __i++) 6011: if (_M_w[__i] != static_cast<_WordT>(0)) 6011: return true; 6011: return false; 6011: } 6011: 6011: size_t 6011: _M_do_count() const noexcept 6011: { 6011: size_t __result = 0; 6011: for (size_t __i = 0; __i < _Nw; __i++) 6011: __result += __builtin_popcountl(_M_w[__i]); 6011: return __result; 6011: } 6011: 6011: unsigned long 6011: _M_do_to_ulong() const; 6011: 6011: 6011: unsigned long long 6011: _M_do_to_ullong() const; 6011: 6011: 6011: 6011: size_t 6011: _M_do_find_first(size_t) const noexcept; 6011: 6011: 6011: size_t 6011: _M_do_find_next(size_t, size_t) const noexcept; 6011: }; 6011: 6011: 6011: template 6011: void 6011: _Base_bitset<_Nw>::_M_do_left_shift(size_t __shift) noexcept 6011: { 6011: if (__builtin_expect(__shift != 0, 1)) 6011: { 6011: const size_t __wshift = __shift / (8 * 4); 6011: const size_t __offset = __shift % (8 * 4); 6011: 6011: if (__offset == 0) 6011: for (size_t __n = _Nw - 1; __n >= __wshift; --__n) 6011: _M_w[__n] = _M_w[__n - __wshift]; 6011: else 6011: { 6011: const size_t __sub_offset = ((8 * 4) 6011: - __offset); 6011: for (size_t __n = _Nw - 1; __n > __wshift; --__n) 6011: _M_w[__n] = ((_M_w[__n - __wshift] << __offset) 6011: | (_M_w[__n - __wshift - 1] >> __sub_offset)); 6011: _M_w[__wshift] = _M_w[0] << __offset; 6011: } 6011: 6011: std::fill(_M_w + 0, _M_w + __wshift, static_cast<_WordT>(0)); 6011: } 6011: } 6011: 6011: template 6011: void 6011: _Base_bitset<_Nw>::_M_do_right_shift(size_t __shift) noexcept 6011: { 6011: if (__builtin_expect(__shift != 0, 1)) 6011: { 6011: const size_t __wshift = __shift / (8 * 4); 6011: const size_t __offset = __shift % (8 * 4); 6011: const size_t __limit = _Nw - __wshift - 1; 6011: 6011: if (__offset == 0) 6011: for (size_t __n = 0; __n <= __limit; ++__n) 6011: _M_w[__n] = _M_w[__n + __wshift]; 6011: else 6011: { 6011: const size_t __sub_offset = ((8 * 4) 6011: - __offset); 6011: for (size_t __n = 0; __n < __limit; ++__n) 6011: _M_w[__n] = ((_M_w[__n + __wshift] >> __offset) 6011: | (_M_w[__n + __wshift + 1] << __sub_offset)); 6011: _M_w[__limit] = _M_w[_Nw-1] >> __offset; 6011: } 6011: 6011: std::fill(_M_w + __limit + 1, _M_w + _Nw, static_cast<_WordT>(0)); 6011: } 6011: } 6011: 6011: template 6011: unsigned long 6011: _Base_bitset<_Nw>::_M_do_to_ulong() const 6011: { 6011: for (size_t __i = 1; __i < _Nw; ++__i) 6011: if (_M_w[__i]) 6011: __throw_overflow_error(("_Base_bitset::_M_do_to_ulong")); 6011: return _M_w[0]; 6011: } 6011: 6011: 6011: template 6011: unsigned long long 6011: _Base_bitset<_Nw>::_M_do_to_ullong() const 6011: { 6011: const bool __dw = sizeof(unsigned long long) > sizeof(unsigned long); 6011: for (size_t __i = 1 + __dw; __i < _Nw; ++__i) 6011: if (_M_w[__i]) 6011: __throw_overflow_error(("_Base_bitset::_M_do_to_ullong")); 6011: 6011: if (__dw) 6011: return _M_w[0] + (static_cast(_M_w[1]) 6011: << (8 * 4)); 6011: return _M_w[0]; 6011: } 6011: 6011: 6011: template 6011: size_t 6011: _Base_bitset<_Nw>:: 6011: _M_do_find_first(size_t __not_found) const noexcept 6011: { 6011: for (size_t __i = 0; __i < _Nw; __i++) 6011: { 6011: _WordT __thisword = _M_w[__i]; 6011: if (__thisword != static_cast<_WordT>(0)) 6011: return (__i * (8 * 4) 6011: + __builtin_ctzl(__thisword)); 6011: } 6011: 6011: return __not_found; 6011: } 6011: 6011: template 6011: size_t 6011: _Base_bitset<_Nw>:: 6011: _M_do_find_next(size_t __prev, size_t __not_found) const noexcept 6011: { 6011: 6011: ++__prev; 6011: 6011: 6011: if (__prev >= _Nw * (8 * 4)) 6011: return __not_found; 6011: 6011: 6011: size_t __i = _S_whichword(__prev); 6011: _WordT __thisword = _M_w[__i]; 6011: 6011: 6011: __thisword &= (~static_cast<_WordT>(0)) << _S_whichbit(__prev); 6011: 6011: if (__thisword != static_cast<_WordT>(0)) 6011: return (__i * (8 * 4) 6011: + __builtin_ctzl(__thisword)); 6011: 6011: 6011: __i++; 6011: for (; __i < _Nw; __i++) 6011: { 6011: __thisword = _M_w[__i]; 6011: if (__thisword != static_cast<_WordT>(0)) 6011: return (__i * (8 * 4) 6011: + __builtin_ctzl(__thisword)); 6011: } 6011: 6011: return __not_found; 6011: } 6011: 6011: 6011: 6011: 6011: 6011: 6011: template<> 6011: struct _Base_bitset<1> 6011: { 6011: typedef unsigned long _WordT; 6011: _WordT _M_w; 6011: 6011: constexpr _Base_bitset() noexcept 6011: : _M_w(0) 6011: { } 6011: 6011: 6011: constexpr _Base_bitset(unsigned long long __val) noexcept 6011: 6011: 6011: 6011: : _M_w(__val) 6011: { } 6011: 6011: static constexpr size_t 6011: _S_whichword(size_t __pos) noexcept 6011: { return __pos / (8 * 4); } 6011: 6011: static constexpr size_t 6011: _S_whichbyte(size_t __pos) noexcept 6011: { return (__pos % (8 * 4)) / 8; } 6011: 6011: static constexpr size_t 6011: _S_whichbit(size_t __pos) noexcept 6011: { return __pos % (8 * 4); } 6011: 6011: static constexpr _WordT 6011: _S_maskbit(size_t __pos) noexcept 6011: { return (static_cast<_WordT>(1)) << _S_whichbit(__pos); } 6011: 6011: _WordT& 6011: _M_getword(size_t) noexcept 6011: { return _M_w; } 6011: 6011: constexpr _WordT 6011: _M_getword(size_t) const noexcept 6011: { return _M_w; } 6011: 6011: 6011: const _WordT* 6011: _M_getdata() const noexcept 6011: { return &_M_w; } 6011: 6011: 6011: _WordT& 6011: _M_hiword() noexcept 6011: { return _M_w; } 6011: 6011: constexpr _WordT 6011: _M_hiword() const noexcept 6011: { return _M_w; } 6011: 6011: void 6011: _M_do_and(const _Base_bitset<1>& __x) noexcept 6011: { _M_w &= __x._M_w; } 6011: 6011: void 6011: _M_do_or(const _Base_bitset<1>& __x) noexcept 6011: { _M_w |= __x._M_w; } 6011: 6011: void 6011: _M_do_xor(const _Base_bitset<1>& __x) noexcept 6011: { _M_w ^= __x._M_w; } 6011: 6011: void 6011: _M_do_left_shift(size_t __shift) noexcept 6011: { _M_w <<= __shift; } 6011: 6011: void 6011: _M_do_right_shift(size_t __shift) noexcept 6011: { _M_w >>= __shift; } 6011: 6011: void 6011: _M_do_flip() noexcept 6011: { _M_w = ~_M_w; } 6011: 6011: void 6011: _M_do_set() noexcept 6011: { _M_w = ~static_cast<_WordT>(0); } 6011: 6011: void 6011: _M_do_reset() noexcept 6011: { _M_w = 0; } 6011: 6011: bool 6011: _M_is_equal(const _Base_bitset<1>& __x) const noexcept 6011: { return _M_w == __x._M_w; } 6011: 6011: template 6011: bool 6011: _M_are_all() const noexcept 6011: { return _M_w == (~static_cast<_WordT>(0) 6011: >> ((8 * 4) - _Nb)); } 6011: 6011: bool 6011: _M_is_any() const noexcept 6011: { return _M_w != 0; } 6011: 6011: size_t 6011: _M_do_count() const noexcept 6011: { return __builtin_popcountl(_M_w); } 6011: 6011: unsigned long 6011: _M_do_to_ulong() const noexcept 6011: { return _M_w; } 6011: 6011: 6011: unsigned long long 6011: _M_do_to_ullong() const noexcept 6011: { return _M_w; } 6011: 6011: 6011: size_t 6011: _M_do_find_first(size_t __not_found) const noexcept 6011: { 6011: if (_M_w != 0) 6011: return __builtin_ctzl(_M_w); 6011: else 6011: return __not_found; 6011: } 6011: 6011: 6011: size_t 6011: _M_do_find_next(size_t __prev, size_t __not_found) const 6011: noexcept 6011: { 6011: ++__prev; 6011: if (__prev >= ((size_t) (8 * 4))) 6011: return __not_found; 6011: 6011: _WordT __x = _M_w >> __prev; 6011: if (__x != 0) 6011: return __builtin_ctzl(__x) + __prev; 6011: else 6011: return __not_found; 6011: } 6011: }; 6011: 6011: 6011: 6011: 6011: 6011: 6011: template<> 6011: struct _Base_bitset<0> 6011: { 6011: typedef unsigned long _WordT; 6011: 6011: constexpr _Base_bitset() noexcept 6011: { } 6011: 6011: 6011: constexpr _Base_bitset(unsigned long long) noexcept 6011: 6011: 6011: 6011: { } 6011: 6011: static constexpr size_t 6011: _S_whichword(size_t __pos) noexcept 6011: { return __pos / (8 * 4); } 6011: 6011: static constexpr size_t 6011: _S_whichbyte(size_t __pos) noexcept 6011: { return (__pos % (8 * 4)) / 8; } 6011: 6011: static constexpr size_t 6011: _S_whichbit(size_t __pos) noexcept 6011: { return __pos % (8 * 4); } 6011: 6011: static constexpr _WordT 6011: _S_maskbit(size_t __pos) noexcept 6011: { return (static_cast<_WordT>(1)) << _S_whichbit(__pos); } 6011: # 556 "/usr/include/c++/8/bitset" 3 6011: _WordT& 6011: _M_getword(size_t) noexcept 6011: { 6011: __throw_out_of_range(("_Base_bitset::_M_getword")); 6011: return *new _WordT; 6011: } 6011: 6011: constexpr _WordT 6011: _M_getword(size_t) const noexcept 6011: { return 0; } 6011: 6011: constexpr _WordT 6011: _M_hiword() const noexcept 6011: { return 0; } 6011: 6011: void 6011: _M_do_and(const _Base_bitset<0>&) noexcept 6011: { } 6011: 6011: void 6011: _M_do_or(const _Base_bitset<0>&) noexcept 6011: { } 6011: 6011: void 6011: _M_do_xor(const _Base_bitset<0>&) noexcept 6011: { } 6011: 6011: void 6011: _M_do_left_shift(size_t) noexcept 6011: { } 6011: 6011: void 6011: _M_do_right_shift(size_t) noexcept 6011: { } 6011: 6011: void 6011: _M_do_flip() noexcept 6011: { } 6011: 6011: void 6011: _M_do_set() noexcept 6011: { } 6011: 6011: void 6011: _M_do_reset() noexcept 6011: { } 6011: 6011: 6011: 6011: 6011: bool 6011: _M_is_equal(const _Base_bitset<0>&) const noexcept 6011: { return true; } 6011: 6011: template 6011: bool 6011: _M_are_all() const noexcept 6011: { return true; } 6011: 6011: bool 6011: _M_is_any() const noexcept 6011: { return false; } 6011: 6011: size_t 6011: _M_do_count() const noexcept 6011: { return 0; } 6011: 6011: unsigned long 6011: _M_do_to_ulong() const noexcept 6011: { return 0; } 6011: 6011: 6011: unsigned long long 6011: _M_do_to_ullong() const noexcept 6011: { return 0; } 6011: 6011: 6011: 6011: 6011: size_t 6011: _M_do_find_first(size_t) const noexcept 6011: { return 0; } 6011: 6011: size_t 6011: _M_do_find_next(size_t, size_t) const noexcept 6011: { return 0; } 6011: }; 6011: 6011: 6011: 6011: template 6011: struct _Sanitize 6011: { 6011: typedef unsigned long _WordT; 6011: 6011: static void 6011: _S_do_sanitize(_WordT& __val) noexcept 6011: { __val &= ~((~static_cast<_WordT>(0)) << _Extrabits); } 6011: }; 6011: 6011: template<> 6011: struct _Sanitize<0> 6011: { 6011: typedef unsigned long _WordT; 6011: 6011: static void 6011: _S_do_sanitize(_WordT) noexcept { } 6011: }; 6011: 6011: 6011: template 6011: struct _Sanitize_val 6011: { 6011: static constexpr unsigned long long 6011: _S_do_sanitize_val(unsigned long long __val) 6011: { return __val; } 6011: }; 6011: 6011: template 6011: struct _Sanitize_val<_Nb, true> 6011: { 6011: static constexpr unsigned long long 6011: _S_do_sanitize_val(unsigned long long __val) 6011: { return __val & ~((~static_cast(0)) << _Nb); } 6011: }; 6011: # 746 "/usr/include/c++/8/bitset" 3 6011: template 6011: class bitset 6011: : private _Base_bitset<((_Nb) / (8 * 4) + ((_Nb) % (8 * 4) == 0 ? 0 : 1))> 6011: { 6011: private: 6011: typedef _Base_bitset<((_Nb) / (8 * 4) + ((_Nb) % (8 * 4) == 0 ? 0 : 1))> _Base; 6011: typedef unsigned long _WordT; 6011: 6011: template 6011: void 6011: _M_check_initial_position(const std::basic_string<_CharT, _Traits, _Alloc>& __s, 6011: size_t __position) const 6011: { 6011: if (__position > __s.size()) 6011: __throw_out_of_range_fmt(("bitset::bitset: __position " "(which is %zu) > __s.size() " "(which is %zu)") 6011: 6011: , 6011: __position, __s.size()); 6011: } 6011: 6011: void _M_check(size_t __position, const char *__s) const 6011: { 6011: if (__position >= _Nb) 6011: __throw_out_of_range_fmt(("%s: __position (which is %zu) " ">= _Nb (which is %zu)") 6011: , 6011: __s, __position, _Nb); 6011: } 6011: 6011: void 6011: _M_do_sanitize() noexcept 6011: { 6011: typedef _Sanitize<_Nb % (8 * 4)> __sanitize_type; 6011: __sanitize_type::_S_do_sanitize(this->_M_hiword()); 6011: } 6011: 6011: 6011: template friend struct hash; 6011: 6011: 6011: public: 6011: # 798 "/usr/include/c++/8/bitset" 3 6011: class reference 6011: { 6011: friend class bitset; 6011: 6011: _WordT* _M_wp; 6011: size_t _M_bpos; 6011: 6011: 6011: reference(); 6011: 6011: public: 6011: reference(bitset& __b, size_t __pos) noexcept 6011: { 6011: _M_wp = &__b._M_getword(__pos); 6011: _M_bpos = _Base::_S_whichbit(__pos); 6011: } 6011: 6011: ~reference() noexcept 6011: { } 6011: 6011: 6011: reference& 6011: operator=(bool __x) noexcept 6011: { 6011: if (__x) 6011: *_M_wp |= _Base::_S_maskbit(_M_bpos); 6011: else 6011: *_M_wp &= ~_Base::_S_maskbit(_M_bpos); 6011: return *this; 6011: } 6011: 6011: 6011: reference& 6011: operator=(const reference& __j) noexcept 6011: { 6011: if ((*(__j._M_wp) & _Base::_S_maskbit(__j._M_bpos))) 6011: *_M_wp |= _Base::_S_maskbit(_M_bpos); 6011: else 6011: *_M_wp &= ~_Base::_S_maskbit(_M_bpos); 6011: return *this; 6011: } 6011: 6011: 6011: bool 6011: operator~() const noexcept 6011: { return (*(_M_wp) & _Base::_S_maskbit(_M_bpos)) == 0; } 6011: 6011: 6011: operator bool() const noexcept 6011: { return (*(_M_wp) & _Base::_S_maskbit(_M_bpos)) != 0; } 6011: 6011: 6011: reference& 6011: flip() noexcept 6011: { 6011: *_M_wp ^= _Base::_S_maskbit(_M_bpos); 6011: return *this; 6011: } 6011: }; 6011: friend class reference; 6011: 6011: 6011: 6011: constexpr bitset() noexcept 6011: { } 6011: 6011: 6011: 6011: constexpr bitset(unsigned long long __val) noexcept 6011: : _Base(_Sanitize_val<_Nb>::_S_do_sanitize_val(__val)) { } 6011: # 883 "/usr/include/c++/8/bitset" 3 6011: template 6011: explicit 6011: bitset(const std::basic_string<_CharT, _Traits, _Alloc>& __s, 6011: size_t __position = 0) 6011: : _Base() 6011: { 6011: _M_check_initial_position(__s, __position); 6011: _M_copy_from_string(__s, __position, 6011: std::basic_string<_CharT, _Traits, _Alloc>::npos, 6011: _CharT('0'), _CharT('1')); 6011: } 6011: # 905 "/usr/include/c++/8/bitset" 3 6011: template 6011: bitset(const std::basic_string<_CharT, _Traits, _Alloc>& __s, 6011: size_t __position, size_t __n) 6011: : _Base() 6011: { 6011: _M_check_initial_position(__s, __position); 6011: _M_copy_from_string(__s, __position, __n, _CharT('0'), _CharT('1')); 6011: } 6011: 6011: 6011: 6011: template 6011: bitset(const std::basic_string<_CharT, _Traits, _Alloc>& __s, 6011: size_t __position, size_t __n, 6011: _CharT __zero, _CharT __one = _CharT('1')) 6011: : _Base() 6011: { 6011: _M_check_initial_position(__s, __position); 6011: _M_copy_from_string(__s, __position, __n, __zero, __one); 6011: } 6011: # 936 "/usr/include/c++/8/bitset" 3 6011: template 6011: explicit 6011: bitset(const _CharT* __str, 6011: typename std::basic_string<_CharT>::size_type __n 6011: = std::basic_string<_CharT>::npos, 6011: _CharT __zero = _CharT('0'), _CharT __one = _CharT('1')) 6011: : _Base() 6011: { 6011: if (!__str) 6011: __throw_logic_error(("bitset::bitset(const _CharT*, ...)")); 6011: 6011: if (__n == std::basic_string<_CharT>::npos) 6011: __n = std::char_traits<_CharT>::length(__str); 6011: _M_copy_from_ptr<_CharT, std::char_traits<_CharT>>(__str, __n, 0, 6011: __n, __zero, 6011: __one); 6011: } 6011: # 963 "/usr/include/c++/8/bitset" 3 6011: bitset<_Nb>& 6011: operator&=(const bitset<_Nb>& __rhs) noexcept 6011: { 6011: this->_M_do_and(__rhs); 6011: return *this; 6011: } 6011: 6011: bitset<_Nb>& 6011: operator|=(const bitset<_Nb>& __rhs) noexcept 6011: { 6011: this->_M_do_or(__rhs); 6011: return *this; 6011: } 6011: 6011: bitset<_Nb>& 6011: operator^=(const bitset<_Nb>& __rhs) noexcept 6011: { 6011: this->_M_do_xor(__rhs); 6011: return *this; 6011: } 6011: # 992 "/usr/include/c++/8/bitset" 3 6011: bitset<_Nb>& 6011: operator<<=(size_t __position) noexcept 6011: { 6011: if (__builtin_expect(__position < _Nb, 1)) 6011: { 6011: this->_M_do_left_shift(__position); 6011: this->_M_do_sanitize(); 6011: } 6011: else 6011: this->_M_do_reset(); 6011: return *this; 6011: } 6011: 6011: bitset<_Nb>& 6011: operator>>=(size_t __position) noexcept 6011: { 6011: if (__builtin_expect(__position < _Nb, 1)) 6011: { 6011: this->_M_do_right_shift(__position); 6011: this->_M_do_sanitize(); 6011: } 6011: else 6011: this->_M_do_reset(); 6011: return *this; 6011: } 6011: # 1025 "/usr/include/c++/8/bitset" 3 6011: bitset<_Nb>& 6011: _Unchecked_set(size_t __pos) noexcept 6011: { 6011: this->_M_getword(__pos) |= _Base::_S_maskbit(__pos); 6011: return *this; 6011: } 6011: 6011: bitset<_Nb>& 6011: _Unchecked_set(size_t __pos, int __val) noexcept 6011: { 6011: if (__val) 6011: this->_M_getword(__pos) |= _Base::_S_maskbit(__pos); 6011: else 6011: this->_M_getword(__pos) &= ~_Base::_S_maskbit(__pos); 6011: return *this; 6011: } 6011: 6011: bitset<_Nb>& 6011: _Unchecked_reset(size_t __pos) noexcept 6011: { 6011: this->_M_getword(__pos) &= ~_Base::_S_maskbit(__pos); 6011: return *this; 6011: } 6011: 6011: bitset<_Nb>& 6011: _Unchecked_flip(size_t __pos) noexcept 6011: { 6011: this->_M_getword(__pos) ^= _Base::_S_maskbit(__pos); 6011: return *this; 6011: } 6011: 6011: constexpr bool 6011: _Unchecked_test(size_t __pos) const noexcept 6011: { return ((this->_M_getword(__pos) & _Base::_S_maskbit(__pos)) 6011: != static_cast<_WordT>(0)); } 6011: 6011: 6011: 6011: 6011: 6011: 6011: bitset<_Nb>& 6011: set() noexcept 6011: { 6011: this->_M_do_set(); 6011: this->_M_do_sanitize(); 6011: return *this; 6011: } 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: bitset<_Nb>& 6011: set(size_t __position, bool __val = true) 6011: { 6011: this->_M_check(__position, ("bitset::set")); 6011: return _Unchecked_set(__position, __val); 6011: } 6011: 6011: 6011: 6011: 6011: bitset<_Nb>& 6011: reset() noexcept 6011: { 6011: this->_M_do_reset(); 6011: return *this; 6011: } 6011: # 1104 "/usr/include/c++/8/bitset" 3 6011: bitset<_Nb>& 6011: reset(size_t __position) 6011: { 6011: this->_M_check(__position, ("bitset::reset")); 6011: return _Unchecked_reset(__position); 6011: } 6011: 6011: 6011: 6011: 6011: bitset<_Nb>& 6011: flip() noexcept 6011: { 6011: this->_M_do_flip(); 6011: this->_M_do_sanitize(); 6011: return *this; 6011: } 6011: 6011: 6011: 6011: 6011: 6011: 6011: bitset<_Nb>& 6011: flip(size_t __position) 6011: { 6011: this->_M_check(__position, ("bitset::flip")); 6011: return _Unchecked_flip(__position); 6011: } 6011: 6011: 6011: bitset<_Nb> 6011: operator~() const noexcept 6011: { return bitset<_Nb>(*this).flip(); } 6011: # 1154 "/usr/include/c++/8/bitset" 3 6011: reference 6011: operator[](size_t __position) 6011: { return reference(*this, __position); } 6011: 6011: constexpr bool 6011: operator[](size_t __position) const 6011: { return _Unchecked_test(__position); } 6011: # 1169 "/usr/include/c++/8/bitset" 3 6011: unsigned long 6011: to_ulong() const 6011: { return this->_M_do_to_ulong(); } 6011: 6011: 6011: unsigned long long 6011: to_ullong() const 6011: { return this->_M_do_to_ullong(); } 6011: # 1187 "/usr/include/c++/8/bitset" 3 6011: template 6011: std::basic_string<_CharT, _Traits, _Alloc> 6011: to_string() const 6011: { 6011: std::basic_string<_CharT, _Traits, _Alloc> __result; 6011: _M_copy_to_string(__result, _CharT('0'), _CharT('1')); 6011: return __result; 6011: } 6011: 6011: 6011: 6011: template 6011: std::basic_string<_CharT, _Traits, _Alloc> 6011: to_string(_CharT __zero, _CharT __one = _CharT('1')) const 6011: { 6011: std::basic_string<_CharT, _Traits, _Alloc> __result; 6011: _M_copy_to_string(__result, __zero, __one); 6011: return __result; 6011: } 6011: 6011: 6011: 6011: template 6011: std::basic_string<_CharT, _Traits, std::allocator<_CharT> > 6011: to_string() const 6011: { return to_string<_CharT, _Traits, std::allocator<_CharT> >(); } 6011: 6011: 6011: 6011: template 6011: std::basic_string<_CharT, _Traits, std::allocator<_CharT> > 6011: to_string(_CharT __zero, _CharT __one = _CharT('1')) const 6011: { return to_string<_CharT, _Traits, 6011: std::allocator<_CharT> >(__zero, __one); } 6011: 6011: template 6011: std::basic_string<_CharT, std::char_traits<_CharT>, 6011: std::allocator<_CharT> > 6011: to_string() const 6011: { 6011: return to_string<_CharT, std::char_traits<_CharT>, 6011: std::allocator<_CharT> >(); 6011: } 6011: 6011: template 6011: std::basic_string<_CharT, std::char_traits<_CharT>, 6011: std::allocator<_CharT> > 6011: to_string(_CharT __zero, _CharT __one = _CharT('1')) const 6011: { 6011: return to_string<_CharT, std::char_traits<_CharT>, 6011: std::allocator<_CharT> >(__zero, __one); 6011: } 6011: 6011: std::basic_string, std::allocator > 6011: to_string() const 6011: { 6011: return to_string, 6011: std::allocator >(); 6011: } 6011: 6011: std::basic_string, std::allocator > 6011: to_string(char __zero, char __one = '1') const 6011: { 6011: return to_string, 6011: std::allocator >(__zero, __one); 6011: } 6011: 6011: 6011: template 6011: void 6011: _M_copy_from_ptr(const _CharT*, size_t, size_t, size_t, 6011: _CharT, _CharT); 6011: 6011: template 6011: void 6011: _M_copy_from_string(const std::basic_string<_CharT, 6011: _Traits, _Alloc>& __s, size_t __pos, size_t __n, 6011: _CharT __zero, _CharT __one) 6011: { _M_copy_from_ptr<_CharT, _Traits>(__s.data(), __s.size(), __pos, __n, 6011: __zero, __one); } 6011: 6011: template 6011: void 6011: _M_copy_to_string(std::basic_string<_CharT, _Traits, _Alloc>&, 6011: _CharT, _CharT) const; 6011: 6011: 6011: template 6011: void 6011: _M_copy_from_string(const std::basic_string<_CharT, 6011: _Traits, _Alloc>& __s, size_t __pos, size_t __n) 6011: { _M_copy_from_string(__s, __pos, __n, _CharT('0'), _CharT('1')); } 6011: 6011: template 6011: void 6011: _M_copy_to_string(std::basic_string<_CharT, _Traits,_Alloc>& __s) const 6011: { _M_copy_to_string(__s, _CharT('0'), _CharT('1')); } 6011: 6011: 6011: size_t 6011: count() const noexcept 6011: { return this->_M_do_count(); } 6011: 6011: 6011: constexpr size_t 6011: size() const noexcept 6011: { return _Nb; } 6011: 6011: 6011: 6011: bool 6011: operator==(const bitset<_Nb>& __rhs) const noexcept 6011: { return this->_M_is_equal(__rhs); } 6011: 6011: bool 6011: operator!=(const bitset<_Nb>& __rhs) const noexcept 6011: { return !this->_M_is_equal(__rhs); } 6011: # 1312 "/usr/include/c++/8/bitset" 3 6011: bool 6011: test(size_t __position) const 6011: { 6011: this->_M_check(__position, ("bitset::test")); 6011: return _Unchecked_test(__position); 6011: } 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: bool 6011: all() const noexcept 6011: { return this->template _M_are_all<_Nb>(); } 6011: 6011: 6011: 6011: 6011: 6011: bool 6011: any() const noexcept 6011: { return this->_M_is_any(); } 6011: 6011: 6011: 6011: 6011: 6011: bool 6011: none() const noexcept 6011: { return !this->_M_is_any(); } 6011: 6011: 6011: 6011: bitset<_Nb> 6011: operator<<(size_t __position) const noexcept 6011: { return bitset<_Nb>(*this) <<= __position; } 6011: 6011: bitset<_Nb> 6011: operator>>(size_t __position) const noexcept 6011: { return bitset<_Nb>(*this) >>= __position; } 6011: # 1362 "/usr/include/c++/8/bitset" 3 6011: size_t 6011: _Find_first() const noexcept 6011: { return this->_M_do_find_first(_Nb); } 6011: # 1373 "/usr/include/c++/8/bitset" 3 6011: size_t 6011: _Find_next(size_t __prev) const noexcept 6011: { return this->_M_do_find_next(__prev, _Nb); } 6011: }; 6011: 6011: 6011: template 6011: template 6011: void 6011: bitset<_Nb>:: 6011: _M_copy_from_ptr(const _CharT* __s, size_t __len, 6011: size_t __pos, size_t __n, _CharT __zero, _CharT __one) 6011: { 6011: reset(); 6011: const size_t __nbits = std::min(_Nb, std::min(__n, size_t(__len - __pos))); 6011: for (size_t __i = __nbits; __i > 0; --__i) 6011: { 6011: const _CharT __c = __s[__pos + __nbits - __i]; 6011: if (_Traits::eq(__c, __zero)) 6011: ; 6011: else if (_Traits::eq(__c, __one)) 6011: _Unchecked_set(__i - 1); 6011: else 6011: __throw_invalid_argument(("bitset::_M_copy_from_ptr")); 6011: } 6011: } 6011: 6011: template 6011: template 6011: void 6011: bitset<_Nb>:: 6011: _M_copy_to_string(std::basic_string<_CharT, _Traits, _Alloc>& __s, 6011: _CharT __zero, _CharT __one) const 6011: { 6011: __s.assign(_Nb, __zero); 6011: for (size_t __i = _Nb; __i > 0; --__i) 6011: if (_Unchecked_test(__i - 1)) 6011: _Traits::assign(__s[_Nb - __i], __one); 6011: } 6011: # 1423 "/usr/include/c++/8/bitset" 3 6011: template 6011: inline bitset<_Nb> 6011: operator&(const bitset<_Nb>& __x, const bitset<_Nb>& __y) noexcept 6011: { 6011: bitset<_Nb> __result(__x); 6011: __result &= __y; 6011: return __result; 6011: } 6011: 6011: template 6011: inline bitset<_Nb> 6011: operator|(const bitset<_Nb>& __x, const bitset<_Nb>& __y) noexcept 6011: { 6011: bitset<_Nb> __result(__x); 6011: __result |= __y; 6011: return __result; 6011: } 6011: 6011: template 6011: inline bitset<_Nb> 6011: operator^(const bitset<_Nb>& __x, const bitset<_Nb>& __y) noexcept 6011: { 6011: bitset<_Nb> __result(__x); 6011: __result ^= __y; 6011: return __result; 6011: } 6011: # 1460 "/usr/include/c++/8/bitset" 3 6011: template 6011: std::basic_istream<_CharT, _Traits>& 6011: operator>>(std::basic_istream<_CharT, _Traits>& __is, bitset<_Nb>& __x) 6011: { 6011: typedef typename _Traits::char_type char_type; 6011: typedef std::basic_istream<_CharT, _Traits> __istream_type; 6011: typedef typename __istream_type::ios_base __ios_base; 6011: 6011: std::basic_string<_CharT, _Traits> __tmp; 6011: __tmp.reserve(_Nb); 6011: 6011: 6011: 6011: const char_type __zero = __is.widen('0'); 6011: const char_type __one = __is.widen('1'); 6011: 6011: typename __ios_base::iostate __state = __ios_base::goodbit; 6011: typename __istream_type::sentry __sentry(__is); 6011: if (__sentry) 6011: { 6011: try 6011: { 6011: for (size_t __i = _Nb; __i > 0; --__i) 6011: { 6011: static typename _Traits::int_type __eof = _Traits::eof(); 6011: 6011: typename _Traits::int_type __c1 = __is.rdbuf()->sbumpc(); 6011: if (_Traits::eq_int_type(__c1, __eof)) 6011: { 6011: __state |= __ios_base::eofbit; 6011: break; 6011: } 6011: else 6011: { 6011: const char_type __c2 = _Traits::to_char_type(__c1); 6011: if (_Traits::eq(__c2, __zero)) 6011: __tmp.push_back(__zero); 6011: else if (_Traits::eq(__c2, __one)) 6011: __tmp.push_back(__one); 6011: else if (_Traits:: 6011: eq_int_type(__is.rdbuf()->sputbackc(__c2), 6011: __eof)) 6011: { 6011: __state |= __ios_base::failbit; 6011: break; 6011: } 6011: } 6011: } 6011: } 6011: catch(__cxxabiv1::__forced_unwind&) 6011: { 6011: __is._M_setstate(__ios_base::badbit); 6011: throw; 6011: } 6011: catch(...) 6011: { __is._M_setstate(__ios_base::badbit); } 6011: } 6011: 6011: if (__tmp.empty() && _Nb) 6011: __state |= __ios_base::failbit; 6011: else 6011: __x._M_copy_from_string(__tmp, static_cast(0), _Nb, 6011: __zero, __one); 6011: if (__state) 6011: __is.setstate(__state); 6011: return __is; 6011: } 6011: 6011: template 6011: std::basic_ostream<_CharT, _Traits>& 6011: operator<<(std::basic_ostream<_CharT, _Traits>& __os, 6011: const bitset<_Nb>& __x) 6011: { 6011: std::basic_string<_CharT, _Traits> __tmp; 6011: 6011: 6011: 6011: const ctype<_CharT>& __ct = use_facet >(__os.getloc()); 6011: __x._M_copy_to_string(__tmp, __ct.widen('0'), __ct.widen('1')); 6011: return __os << __tmp; 6011: } 6011: 6011: 6011: 6011: } 6011: # 1554 "/usr/include/c++/8/bitset" 3 6011: namespace std __attribute__ ((__visibility__ ("default"))) 6011: { 6011: 6011: 6011: 6011: 6011: template 6011: struct hash> 6011: : public __hash_base> 6011: { 6011: size_t 6011: operator()(const std::bitset<_Nb>& __b) const noexcept 6011: { 6011: const size_t __clength = (_Nb + 8 - 1) / 8; 6011: return std::_Hash_impl::hash(__b._M_getdata(), __clength); 6011: } 6011: }; 6011: 6011: template<> 6011: struct hash> 6011: : public __hash_base> 6011: { 6011: size_t 6011: operator()(const std::bitset<0>&) const noexcept 6011: { return 0; } 6011: }; 6011: 6011: 6011: } 6011: # 97 "/usr/include/boost/detail/container_fwd.hpp" 2 3 4 6011: 6011: # 1 "/usr/include/c++/8/complex" 1 3 4 6011: # 39 "/usr/include/c++/8/complex" 3 4 6011: 6011: # 40 "/usr/include/c++/8/complex" 3 6011: 6011: 6011: 6011: 6011: # 1 "/usr/include/c++/8/cmath" 1 3 6011: # 39 "/usr/include/c++/8/cmath" 3 6011: 6011: # 40 "/usr/include/c++/8/cmath" 3 6011: # 45 "/usr/include/c++/8/complex" 2 3 6011: # 1 "/usr/include/c++/8/sstream" 1 3 6011: # 36 "/usr/include/c++/8/sstream" 3 6011: 6011: # 37 "/usr/include/c++/8/sstream" 3 6011: 6011: 6011: 6011: 6011: namespace std __attribute__ ((__visibility__ ("default"))) 6011: { 6011: 6011: namespace __cxx11 { 6011: # 64 "/usr/include/c++/8/sstream" 3 6011: template 6011: class basic_stringbuf : public basic_streambuf<_CharT, _Traits> 6011: { 6011: struct __xfer_bufptrs; 6011: public: 6011: 6011: typedef _CharT char_type; 6011: typedef _Traits traits_type; 6011: 6011: 6011: typedef _Alloc allocator_type; 6011: typedef typename traits_type::int_type int_type; 6011: typedef typename traits_type::pos_type pos_type; 6011: typedef typename traits_type::off_type off_type; 6011: 6011: typedef basic_streambuf __streambuf_type; 6011: typedef basic_string __string_type; 6011: typedef typename __string_type::size_type __size_type; 6011: 6011: protected: 6011: 6011: ios_base::openmode _M_mode; 6011: 6011: 6011: __string_type _M_string; 6011: 6011: public: 6011: # 99 "/usr/include/c++/8/sstream" 3 6011: explicit 6011: basic_stringbuf(ios_base::openmode __mode = ios_base::in | ios_base::out) 6011: : __streambuf_type(), _M_mode(__mode), _M_string() 6011: { } 6011: # 112 "/usr/include/c++/8/sstream" 3 6011: explicit 6011: basic_stringbuf(const __string_type& __str, 6011: ios_base::openmode __mode = ios_base::in | ios_base::out) 6011: : __streambuf_type(), _M_mode(), 6011: _M_string(__str.data(), __str.size(), __str.get_allocator()) 6011: { _M_stringbuf_init(__mode); } 6011: 6011: 6011: basic_stringbuf(const basic_stringbuf&) = delete; 6011: 6011: basic_stringbuf(basic_stringbuf&& __rhs) 6011: : basic_stringbuf(std::move(__rhs), __xfer_bufptrs(__rhs, this)) 6011: { __rhs._M_sync(const_cast(__rhs._M_string.data()), 0, 0); } 6011: 6011: 6011: 6011: basic_stringbuf& 6011: operator=(const basic_stringbuf&) = delete; 6011: 6011: basic_stringbuf& 6011: operator=(basic_stringbuf&& __rhs) 6011: { 6011: __xfer_bufptrs __st{__rhs, this}; 6011: const __streambuf_type& __base = __rhs; 6011: __streambuf_type::operator=(__base); 6011: this->pubimbue(__rhs.getloc()); 6011: _M_mode = __rhs._M_mode; 6011: _M_string = std::move(__rhs._M_string); 6011: __rhs._M_sync(const_cast(__rhs._M_string.data()), 0, 0); 6011: return *this; 6011: } 6011: 6011: void 6011: swap(basic_stringbuf& __rhs) 6011: { 6011: __xfer_bufptrs __l_st{*this, std::__addressof(__rhs)}; 6011: __xfer_bufptrs __r_st{__rhs, this}; 6011: __streambuf_type& __base = __rhs; 6011: __streambuf_type::swap(__base); 6011: __rhs.pubimbue(this->pubimbue(__rhs.getloc())); 6011: std::swap(_M_mode, __rhs._M_mode); 6011: std::swap(_M_string, __rhs._M_string); 6011: } 6011: # 166 "/usr/include/c++/8/sstream" 3 6011: __string_type 6011: str() const 6011: { 6011: __string_type __ret(_M_string.get_allocator()); 6011: if (this->pptr()) 6011: { 6011: 6011: if (this->pptr() > this->egptr()) 6011: __ret.assign(this->pbase(), this->pptr()); 6011: else 6011: __ret.assign(this->pbase(), this->egptr()); 6011: } 6011: else 6011: __ret = _M_string; 6011: return __ret; 6011: } 6011: # 190 "/usr/include/c++/8/sstream" 3 6011: void 6011: str(const __string_type& __s) 6011: { 6011: 6011: 6011: _M_string.assign(__s.data(), __s.size()); 6011: _M_stringbuf_init(_M_mode); 6011: } 6011: 6011: protected: 6011: 6011: void 6011: _M_stringbuf_init(ios_base::openmode __mode) 6011: { 6011: _M_mode = __mode; 6011: __size_type __len = 0; 6011: if (_M_mode & (ios_base::ate | ios_base::app)) 6011: __len = _M_string.size(); 6011: _M_sync(const_cast(_M_string.data()), 0, __len); 6011: } 6011: 6011: virtual streamsize 6011: showmanyc() 6011: { 6011: streamsize __ret = -1; 6011: if (_M_mode & ios_base::in) 6011: { 6011: _M_update_egptr(); 6011: __ret = this->egptr() - this->gptr(); 6011: } 6011: return __ret; 6011: } 6011: 6011: virtual int_type 6011: underflow(); 6011: 6011: virtual int_type 6011: pbackfail(int_type __c = traits_type::eof()); 6011: 6011: virtual int_type 6011: overflow(int_type __c = traits_type::eof()); 6011: # 243 "/usr/include/c++/8/sstream" 3 6011: virtual __streambuf_type* 6011: setbuf(char_type* __s, streamsize __n) 6011: { 6011: if (__s && __n >= 0) 6011: { 6011: 6011: 6011: 6011: 6011: 6011: 6011: _M_string.clear(); 6011: 6011: 6011: _M_sync(__s, __n, 0); 6011: } 6011: return this; 6011: } 6011: 6011: virtual pos_type 6011: seekoff(off_type __off, ios_base::seekdir __way, 6011: ios_base::openmode __mode = ios_base::in | ios_base::out); 6011: 6011: virtual pos_type 6011: seekpos(pos_type __sp, 6011: ios_base::openmode __mode = ios_base::in | ios_base::out); 6011: 6011: 6011: 6011: 6011: void 6011: _M_sync(char_type* __base, __size_type __i, __size_type __o); 6011: 6011: 6011: 6011: void 6011: _M_update_egptr() 6011: { 6011: const bool __testin = _M_mode & ios_base::in; 6011: if (this->pptr() && this->pptr() > this->egptr()) 6011: { 6011: if (__testin) 6011: this->setg(this->eback(), this->gptr(), this->pptr()); 6011: else 6011: this->setg(this->pptr(), this->pptr(), this->pptr()); 6011: } 6011: } 6011: 6011: 6011: 6011: void 6011: _M_pbump(char_type* __pbeg, char_type* __pend, off_type __off); 6011: 6011: private: 6011: 6011: 6011: 6011: 6011: struct __xfer_bufptrs 6011: { 6011: __xfer_bufptrs(const basic_stringbuf& __from, basic_stringbuf* __to) 6011: : _M_to{__to}, _M_goff{-1, -1, -1}, _M_poff{-1, -1, -1} 6011: { 6011: const _CharT* const __str = __from._M_string.data(); 6011: const _CharT* __end = nullptr; 6011: if (__from.eback()) 6011: { 6011: _M_goff[0] = __from.eback() - __str; 6011: _M_goff[1] = __from.gptr() - __str; 6011: _M_goff[2] = __from.egptr() - __str; 6011: __end = __from.egptr(); 6011: } 6011: if (__from.pbase()) 6011: { 6011: _M_poff[0] = __from.pbase() - __str; 6011: _M_poff[1] = __from.pptr() - __from.pbase(); 6011: _M_poff[2] = __from.epptr() - __str; 6011: if (__from.pptr() > __end) 6011: __end = __from.pptr(); 6011: } 6011: 6011: 6011: if (__end) 6011: { 6011: 6011: 6011: auto& __mut_from = const_cast(__from); 6011: __mut_from._M_string._M_length(__end - __str); 6011: } 6011: } 6011: 6011: ~__xfer_bufptrs() 6011: { 6011: char_type* __str = const_cast(_M_to->_M_string.data()); 6011: if (_M_goff[0] != -1) 6011: _M_to->setg(__str+_M_goff[0], __str+_M_goff[1], __str+_M_goff[2]); 6011: if (_M_poff[0] != -1) 6011: _M_to->_M_pbump(__str+_M_poff[0], __str+_M_poff[2], _M_poff[1]); 6011: } 6011: 6011: basic_stringbuf* _M_to; 6011: off_type _M_goff[3]; 6011: off_type _M_poff[3]; 6011: }; 6011: # 357 "/usr/include/c++/8/sstream" 3 6011: basic_stringbuf(basic_stringbuf&& __rhs, __xfer_bufptrs&&) 6011: : __streambuf_type(static_cast(__rhs)), 6011: _M_mode(__rhs._M_mode), _M_string(std::move(__rhs._M_string)) 6011: { } 6011: 6011: }; 6011: # 380 "/usr/include/c++/8/sstream" 3 6011: template 6011: class basic_istringstream : public basic_istream<_CharT, _Traits> 6011: { 6011: public: 6011: 6011: typedef _CharT char_type; 6011: typedef _Traits traits_type; 6011: 6011: 6011: typedef _Alloc allocator_type; 6011: typedef typename traits_type::int_type int_type; 6011: typedef typename traits_type::pos_type pos_type; 6011: typedef typename traits_type::off_type off_type; 6011: 6011: 6011: typedef basic_string<_CharT, _Traits, _Alloc> __string_type; 6011: typedef basic_stringbuf<_CharT, _Traits, _Alloc> __stringbuf_type; 6011: typedef basic_istream __istream_type; 6011: 6011: private: 6011: __stringbuf_type _M_stringbuf; 6011: 6011: public: 6011: # 416 "/usr/include/c++/8/sstream" 3 6011: explicit 6011: basic_istringstream(ios_base::openmode __mode = ios_base::in) 6011: : __istream_type(), _M_stringbuf(__mode | ios_base::in) 6011: { this->init(&_M_stringbuf); } 6011: # 434 "/usr/include/c++/8/sstream" 3 6011: explicit 6011: basic_istringstream(const __string_type& __str, 6011: ios_base::openmode __mode = ios_base::in) 6011: : __istream_type(), _M_stringbuf(__str, __mode | ios_base::in) 6011: { this->init(&_M_stringbuf); } 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: ~basic_istringstream() 6011: { } 6011: 6011: 6011: basic_istringstream(const basic_istringstream&) = delete; 6011: 6011: basic_istringstream(basic_istringstream&& __rhs) 6011: : __istream_type(std::move(__rhs)), 6011: _M_stringbuf(std::move(__rhs._M_stringbuf)) 6011: { __istream_type::set_rdbuf(&_M_stringbuf); } 6011: 6011: 6011: 6011: basic_istringstream& 6011: operator=(const basic_istringstream&) = delete; 6011: 6011: basic_istringstream& 6011: operator=(basic_istringstream&& __rhs) 6011: { 6011: __istream_type::operator=(std::move(__rhs)); 6011: _M_stringbuf = std::move(__rhs._M_stringbuf); 6011: return *this; 6011: } 6011: 6011: void 6011: swap(basic_istringstream& __rhs) 6011: { 6011: __istream_type::swap(__rhs); 6011: _M_stringbuf.swap(__rhs._M_stringbuf); 6011: } 6011: # 485 "/usr/include/c++/8/sstream" 3 6011: __stringbuf_type* 6011: rdbuf() const 6011: { return const_cast<__stringbuf_type*>(&_M_stringbuf); } 6011: 6011: 6011: 6011: 6011: 6011: __string_type 6011: str() const 6011: { return _M_stringbuf.str(); } 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: void 6011: str(const __string_type& __s) 6011: { _M_stringbuf.str(__s); } 6011: }; 6011: # 524 "/usr/include/c++/8/sstream" 3 6011: template 6011: class basic_ostringstream : public basic_ostream<_CharT, _Traits> 6011: { 6011: public: 6011: 6011: typedef _CharT char_type; 6011: typedef _Traits traits_type; 6011: 6011: 6011: typedef _Alloc allocator_type; 6011: typedef typename traits_type::int_type int_type; 6011: typedef typename traits_type::pos_type pos_type; 6011: typedef typename traits_type::off_type off_type; 6011: 6011: 6011: typedef basic_string<_CharT, _Traits, _Alloc> __string_type; 6011: typedef basic_stringbuf<_CharT, _Traits, _Alloc> __stringbuf_type; 6011: typedef basic_ostream __ostream_type; 6011: 6011: private: 6011: __stringbuf_type _M_stringbuf; 6011: 6011: public: 6011: # 560 "/usr/include/c++/8/sstream" 3 6011: explicit 6011: basic_ostringstream(ios_base::openmode __mode = ios_base::out) 6011: : __ostream_type(), _M_stringbuf(__mode | ios_base::out) 6011: { this->init(&_M_stringbuf); } 6011: # 578 "/usr/include/c++/8/sstream" 3 6011: explicit 6011: basic_ostringstream(const __string_type& __str, 6011: ios_base::openmode __mode = ios_base::out) 6011: : __ostream_type(), _M_stringbuf(__str, __mode | ios_base::out) 6011: { this->init(&_M_stringbuf); } 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: ~basic_ostringstream() 6011: { } 6011: 6011: 6011: basic_ostringstream(const basic_ostringstream&) = delete; 6011: 6011: basic_ostringstream(basic_ostringstream&& __rhs) 6011: : __ostream_type(std::move(__rhs)), 6011: _M_stringbuf(std::move(__rhs._M_stringbuf)) 6011: { __ostream_type::set_rdbuf(&_M_stringbuf); } 6011: 6011: 6011: 6011: basic_ostringstream& 6011: operator=(const basic_ostringstream&) = delete; 6011: 6011: basic_ostringstream& 6011: operator=(basic_ostringstream&& __rhs) 6011: { 6011: __ostream_type::operator=(std::move(__rhs)); 6011: _M_stringbuf = std::move(__rhs._M_stringbuf); 6011: return *this; 6011: } 6011: 6011: void 6011: swap(basic_ostringstream& __rhs) 6011: { 6011: __ostream_type::swap(__rhs); 6011: _M_stringbuf.swap(__rhs._M_stringbuf); 6011: } 6011: # 629 "/usr/include/c++/8/sstream" 3 6011: __stringbuf_type* 6011: rdbuf() const 6011: { return const_cast<__stringbuf_type*>(&_M_stringbuf); } 6011: 6011: 6011: 6011: 6011: 6011: __string_type 6011: str() const 6011: { return _M_stringbuf.str(); } 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: void 6011: str(const __string_type& __s) 6011: { _M_stringbuf.str(__s); } 6011: }; 6011: # 668 "/usr/include/c++/8/sstream" 3 6011: template 6011: class basic_stringstream : public basic_iostream<_CharT, _Traits> 6011: { 6011: public: 6011: 6011: typedef _CharT char_type; 6011: typedef _Traits traits_type; 6011: 6011: 6011: typedef _Alloc allocator_type; 6011: typedef typename traits_type::int_type int_type; 6011: typedef typename traits_type::pos_type pos_type; 6011: typedef typename traits_type::off_type off_type; 6011: 6011: 6011: typedef basic_string<_CharT, _Traits, _Alloc> __string_type; 6011: typedef basic_stringbuf<_CharT, _Traits, _Alloc> __stringbuf_type; 6011: typedef basic_iostream __iostream_type; 6011: 6011: private: 6011: __stringbuf_type _M_stringbuf; 6011: 6011: public: 6011: # 703 "/usr/include/c++/8/sstream" 3 6011: explicit 6011: basic_stringstream(ios_base::openmode __m = ios_base::out | ios_base::in) 6011: : __iostream_type(), _M_stringbuf(__m) 6011: { this->init(&_M_stringbuf); } 6011: # 719 "/usr/include/c++/8/sstream" 3 6011: explicit 6011: basic_stringstream(const __string_type& __str, 6011: ios_base::openmode __m = ios_base::out | ios_base::in) 6011: : __iostream_type(), _M_stringbuf(__str, __m) 6011: { this->init(&_M_stringbuf); } 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: ~basic_stringstream() 6011: { } 6011: 6011: 6011: basic_stringstream(const basic_stringstream&) = delete; 6011: 6011: basic_stringstream(basic_stringstream&& __rhs) 6011: : __iostream_type(std::move(__rhs)), 6011: _M_stringbuf(std::move(__rhs._M_stringbuf)) 6011: { __iostream_type::set_rdbuf(&_M_stringbuf); } 6011: 6011: 6011: 6011: basic_stringstream& 6011: operator=(const basic_stringstream&) = delete; 6011: 6011: basic_stringstream& 6011: operator=(basic_stringstream&& __rhs) 6011: { 6011: __iostream_type::operator=(std::move(__rhs)); 6011: _M_stringbuf = std::move(__rhs._M_stringbuf); 6011: return *this; 6011: } 6011: 6011: void 6011: swap(basic_stringstream& __rhs) 6011: { 6011: __iostream_type::swap(__rhs); 6011: _M_stringbuf.swap(__rhs._M_stringbuf); 6011: } 6011: # 770 "/usr/include/c++/8/sstream" 3 6011: __stringbuf_type* 6011: rdbuf() const 6011: { return const_cast<__stringbuf_type*>(&_M_stringbuf); } 6011: 6011: 6011: 6011: 6011: 6011: __string_type 6011: str() const 6011: { return _M_stringbuf.str(); } 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: void 6011: str(const __string_type& __s) 6011: { _M_stringbuf.str(__s); } 6011: }; 6011: 6011: 6011: 6011: template 6011: inline void 6011: swap(basic_stringbuf<_CharT, _Traits, _Allocator>& __x, 6011: basic_stringbuf<_CharT, _Traits, _Allocator>& __y) 6011: { __x.swap(__y); } 6011: 6011: 6011: template 6011: inline void 6011: swap(basic_istringstream<_CharT, _Traits, _Allocator>& __x, 6011: basic_istringstream<_CharT, _Traits, _Allocator>& __y) 6011: { __x.swap(__y); } 6011: 6011: 6011: template 6011: inline void 6011: swap(basic_ostringstream<_CharT, _Traits, _Allocator>& __x, 6011: basic_ostringstream<_CharT, _Traits, _Allocator>& __y) 6011: { __x.swap(__y); } 6011: 6011: 6011: template 6011: inline void 6011: swap(basic_stringstream<_CharT, _Traits, _Allocator>& __x, 6011: basic_stringstream<_CharT, _Traits, _Allocator>& __y) 6011: { __x.swap(__y); } 6011: 6011: 6011: } 6011: 6011: } 6011: 6011: # 1 "/usr/include/c++/8/bits/sstream.tcc" 1 3 6011: # 37 "/usr/include/c++/8/bits/sstream.tcc" 3 6011: 6011: # 38 "/usr/include/c++/8/bits/sstream.tcc" 3 6011: 6011: namespace std __attribute__ ((__visibility__ ("default"))) 6011: { 6011: 6011: 6011: template 6011: typename basic_stringbuf<_CharT, _Traits, _Alloc>::int_type 6011: basic_stringbuf<_CharT, _Traits, _Alloc>:: 6011: pbackfail(int_type __c) 6011: { 6011: int_type __ret = traits_type::eof(); 6011: if (this->eback() < this->gptr()) 6011: { 6011: 6011: 6011: const bool __testeof = traits_type::eq_int_type(__c, __ret); 6011: if (!__testeof) 6011: { 6011: const bool __testeq = traits_type::eq(traits_type:: 6011: to_char_type(__c), 6011: this->gptr()[-1]); 6011: const bool __testout = this->_M_mode & ios_base::out; 6011: if (__testeq || __testout) 6011: { 6011: this->gbump(-1); 6011: if (!__testeq) 6011: *this->gptr() = traits_type::to_char_type(__c); 6011: __ret = __c; 6011: } 6011: } 6011: else 6011: { 6011: this->gbump(-1); 6011: __ret = traits_type::not_eof(__c); 6011: } 6011: } 6011: return __ret; 6011: } 6011: 6011: template 6011: typename basic_stringbuf<_CharT, _Traits, _Alloc>::int_type 6011: basic_stringbuf<_CharT, _Traits, _Alloc>:: 6011: overflow(int_type __c) 6011: { 6011: const bool __testout = this->_M_mode & ios_base::out; 6011: if (__builtin_expect(!__testout, false)) 6011: return traits_type::eof(); 6011: 6011: const bool __testeof = traits_type::eq_int_type(__c, traits_type::eof()); 6011: if (__builtin_expect(__testeof, false)) 6011: return traits_type::not_eof(__c); 6011: 6011: const __size_type __capacity = _M_string.capacity(); 6011: 6011: 6011: if ((this->epptr() - this->pbase()) < __capacity) 6011: { 6011: 6011: char_type* __base = const_cast(_M_string.data()); 6011: _M_pbump(__base, __base + __capacity, this->pptr() - this->pbase()); 6011: if (_M_mode & ios_base::in) 6011: { 6011: const __size_type __nget = this->gptr() - this->eback(); 6011: const __size_type __eget = this->egptr() - this->eback(); 6011: this->setg(__base, __base + __nget, __base + __eget + 1); 6011: } 6011: *this->pptr() = traits_type::to_char_type(__c); 6011: this->pbump(1); 6011: return __c; 6011: } 6011: 6011: 6011: const __size_type __max_size = _M_string.max_size(); 6011: const bool __testput = this->pptr() < this->epptr(); 6011: if (__builtin_expect(!__testput && __capacity == __max_size, false)) 6011: return traits_type::eof(); 6011: 6011: 6011: 6011: const char_type __conv = traits_type::to_char_type(__c); 6011: if (!__testput) 6011: { 6011: # 129 "/usr/include/c++/8/bits/sstream.tcc" 3 6011: const __size_type __opt_len = std::max(__size_type(2 * __capacity), 6011: __size_type(512)); 6011: const __size_type __len = std::min(__opt_len, __max_size); 6011: __string_type __tmp(_M_string.get_allocator()); 6011: __tmp.reserve(__len); 6011: if (this->pbase()) 6011: __tmp.assign(this->pbase(), this->epptr() - this->pbase()); 6011: __tmp.push_back(__conv); 6011: _M_string.swap(__tmp); 6011: _M_sync(const_cast(_M_string.data()), 6011: this->gptr() - this->eback(), this->pptr() - this->pbase()); 6011: } 6011: else 6011: *this->pptr() = __conv; 6011: this->pbump(1); 6011: return __c; 6011: } 6011: 6011: template 6011: typename basic_stringbuf<_CharT, _Traits, _Alloc>::int_type 6011: basic_stringbuf<_CharT, _Traits, _Alloc>:: 6011: underflow() 6011: { 6011: int_type __ret = traits_type::eof(); 6011: const bool __testin = this->_M_mode & ios_base::in; 6011: if (__testin) 6011: { 6011: 6011: _M_update_egptr(); 6011: 6011: if (this->gptr() < this->egptr()) 6011: __ret = traits_type::to_int_type(*this->gptr()); 6011: } 6011: return __ret; 6011: } 6011: 6011: template 6011: typename basic_stringbuf<_CharT, _Traits, _Alloc>::pos_type 6011: basic_stringbuf<_CharT, _Traits, _Alloc>:: 6011: seekoff(off_type __off, ios_base::seekdir __way, ios_base::openmode __mode) 6011: { 6011: pos_type __ret = pos_type(off_type(-1)); 6011: bool __testin = (ios_base::in & this->_M_mode & __mode) != 0; 6011: bool __testout = (ios_base::out & this->_M_mode & __mode) != 0; 6011: const bool __testboth = __testin && __testout && __way != ios_base::cur; 6011: __testin &= !(__mode & ios_base::out); 6011: __testout &= !(__mode & ios_base::in); 6011: 6011: 6011: 6011: const char_type* __beg = __testin ? this->eback() : this->pbase(); 6011: if ((__beg || !__off) && (__testin || __testout || __testboth)) 6011: { 6011: _M_update_egptr(); 6011: 6011: off_type __newoffi = __off; 6011: off_type __newoffo = __newoffi; 6011: if (__way == ios_base::cur) 6011: { 6011: __newoffi += this->gptr() - __beg; 6011: __newoffo += this->pptr() - __beg; 6011: } 6011: else if (__way == ios_base::end) 6011: __newoffo = __newoffi += this->egptr() - __beg; 6011: 6011: if ((__testin || __testboth) 6011: && __newoffi >= 0 6011: && this->egptr() - __beg >= __newoffi) 6011: { 6011: this->setg(this->eback(), this->eback() + __newoffi, 6011: this->egptr()); 6011: __ret = pos_type(__newoffi); 6011: } 6011: if ((__testout || __testboth) 6011: && __newoffo >= 0 6011: && this->egptr() - __beg >= __newoffo) 6011: { 6011: _M_pbump(this->pbase(), this->epptr(), __newoffo); 6011: __ret = pos_type(__newoffo); 6011: } 6011: } 6011: return __ret; 6011: } 6011: 6011: template 6011: typename basic_stringbuf<_CharT, _Traits, _Alloc>::pos_type 6011: basic_stringbuf<_CharT, _Traits, _Alloc>:: 6011: seekpos(pos_type __sp, ios_base::openmode __mode) 6011: { 6011: pos_type __ret = pos_type(off_type(-1)); 6011: const bool __testin = (ios_base::in & this->_M_mode & __mode) != 0; 6011: const bool __testout = (ios_base::out & this->_M_mode & __mode) != 0; 6011: 6011: const char_type* __beg = __testin ? this->eback() : this->pbase(); 6011: if ((__beg || !off_type(__sp)) && (__testin || __testout)) 6011: { 6011: _M_update_egptr(); 6011: 6011: const off_type __pos(__sp); 6011: const bool __testpos = (0 <= __pos 6011: && __pos <= this->egptr() - __beg); 6011: if (__testpos) 6011: { 6011: if (__testin) 6011: this->setg(this->eback(), this->eback() + __pos, 6011: this->egptr()); 6011: if (__testout) 6011: _M_pbump(this->pbase(), this->epptr(), __pos); 6011: __ret = __sp; 6011: } 6011: } 6011: return __ret; 6011: } 6011: 6011: template 6011: void 6011: basic_stringbuf<_CharT, _Traits, _Alloc>:: 6011: _M_sync(char_type* __base, __size_type __i, __size_type __o) 6011: { 6011: const bool __testin = _M_mode & ios_base::in; 6011: const bool __testout = _M_mode & ios_base::out; 6011: char_type* __endg = __base + _M_string.size(); 6011: char_type* __endp = __base + _M_string.capacity(); 6011: 6011: if (__base != _M_string.data()) 6011: { 6011: 6011: __endg += __i; 6011: __i = 0; 6011: __endp = __endg; 6011: } 6011: 6011: if (__testin) 6011: this->setg(__base, __base + __i, __endg); 6011: if (__testout) 6011: { 6011: _M_pbump(__base, __endp, __o); 6011: 6011: 6011: 6011: if (!__testin) 6011: this->setg(__endg, __endg, __endg); 6011: } 6011: } 6011: 6011: template 6011: void 6011: basic_stringbuf<_CharT, _Traits, _Alloc>:: 6011: _M_pbump(char_type* __pbeg, char_type* __pend, off_type __off) 6011: { 6011: this->setp(__pbeg, __pend); 6011: while (__off > __gnu_cxx::__numeric_traits::__max) 6011: { 6011: this->pbump(__gnu_cxx::__numeric_traits::__max); 6011: __off -= __gnu_cxx::__numeric_traits::__max; 6011: } 6011: this->pbump(__off); 6011: } 6011: 6011: 6011: 6011: 6011: extern template class basic_stringbuf; 6011: extern template class basic_istringstream; 6011: extern template class basic_ostringstream; 6011: extern template class basic_stringstream; 6011: 6011: 6011: extern template class basic_stringbuf; 6011: extern template class basic_istringstream; 6011: extern template class basic_ostringstream; 6011: extern template class basic_stringstream; 6011: 6011: 6011: 6011: 6011: } 6011: # 828 "/usr/include/c++/8/sstream" 2 3 6011: # 46 "/usr/include/c++/8/complex" 2 3 6011: 6011: 6011: 6011: 6011: namespace std __attribute__ ((__visibility__ ("default"))) 6011: { 6011: 6011: # 63 "/usr/include/c++/8/complex" 3 6011: template class complex; 6011: template<> class complex; 6011: template<> class complex; 6011: template<> class complex; 6011: 6011: 6011: template _Tp abs(const complex<_Tp>&); 6011: 6011: template _Tp arg(const complex<_Tp>&); 6011: 6011: template _Tp norm(const complex<_Tp>&); 6011: 6011: 6011: template complex<_Tp> conj(const complex<_Tp>&); 6011: 6011: template complex<_Tp> polar(const _Tp&, const _Tp& = 0); 6011: 6011: 6011: 6011: template complex<_Tp> cos(const complex<_Tp>&); 6011: 6011: template complex<_Tp> cosh(const complex<_Tp>&); 6011: 6011: template complex<_Tp> exp(const complex<_Tp>&); 6011: 6011: template complex<_Tp> log(const complex<_Tp>&); 6011: 6011: template complex<_Tp> log10(const complex<_Tp>&); 6011: 6011: template complex<_Tp> pow(const complex<_Tp>&, int); 6011: 6011: template complex<_Tp> pow(const complex<_Tp>&, const _Tp&); 6011: 6011: template complex<_Tp> pow(const complex<_Tp>&, 6011: const complex<_Tp>&); 6011: 6011: template complex<_Tp> pow(const _Tp&, const complex<_Tp>&); 6011: 6011: template complex<_Tp> sin(const complex<_Tp>&); 6011: 6011: template complex<_Tp> sinh(const complex<_Tp>&); 6011: 6011: template complex<_Tp> sqrt(const complex<_Tp>&); 6011: 6011: template complex<_Tp> tan(const complex<_Tp>&); 6011: 6011: template complex<_Tp> tanh(const complex<_Tp>&); 6011: # 121 "/usr/include/c++/8/complex" 3 6011: template 6011: struct complex 6011: { 6011: 6011: typedef _Tp value_type; 6011: 6011: 6011: 6011: constexpr complex(const _Tp& __r = _Tp(), const _Tp& __i = _Tp()) 6011: : _M_real(__r), _M_imag(__i) { } 6011: 6011: 6011: 6011: constexpr complex(const complex&) = default; 6011: 6011: 6011: 6011: template 6011: constexpr complex(const complex<_Up>& __z) 6011: : _M_real(__z.real()), _M_imag(__z.imag()) { } 6011: 6011: 6011: 6011: 6011: __attribute ((__abi_tag__ ("cxx11"))) 6011: constexpr _Tp 6011: real() const { return _M_real; } 6011: 6011: __attribute ((__abi_tag__ ("cxx11"))) 6011: constexpr _Tp 6011: imag() const { return _M_imag; } 6011: # 172 "/usr/include/c++/8/complex" 3 6011: void 6011: real(_Tp __val) { _M_real = __val; } 6011: 6011: void 6011: imag(_Tp __val) { _M_imag = __val; } 6011: 6011: 6011: complex<_Tp>& operator=(const _Tp&); 6011: 6011: 6011: 6011: complex<_Tp>& 6011: operator+=(const _Tp& __t) 6011: { 6011: _M_real += __t; 6011: return *this; 6011: } 6011: 6011: 6011: 6011: complex<_Tp>& 6011: operator-=(const _Tp& __t) 6011: { 6011: _M_real -= __t; 6011: return *this; 6011: } 6011: 6011: 6011: complex<_Tp>& operator*=(const _Tp&); 6011: 6011: complex<_Tp>& operator/=(const _Tp&); 6011: 6011: 6011: 6011: complex& operator=(const complex&) = default; 6011: 6011: 6011: 6011: template 6011: complex<_Tp>& operator=(const complex<_Up>&); 6011: 6011: template 6011: complex<_Tp>& operator+=(const complex<_Up>&); 6011: 6011: template 6011: complex<_Tp>& operator-=(const complex<_Up>&); 6011: 6011: template 6011: complex<_Tp>& operator*=(const complex<_Up>&); 6011: 6011: template 6011: complex<_Tp>& operator/=(const complex<_Up>&); 6011: 6011: constexpr complex __rep() const 6011: { return *this; } 6011: 6011: private: 6011: _Tp _M_real; 6011: _Tp _M_imag; 6011: }; 6011: 6011: template 6011: complex<_Tp>& 6011: complex<_Tp>::operator=(const _Tp& __t) 6011: { 6011: _M_real = __t; 6011: _M_imag = _Tp(); 6011: return *this; 6011: } 6011: 6011: 6011: template 6011: complex<_Tp>& 6011: complex<_Tp>::operator*=(const _Tp& __t) 6011: { 6011: _M_real *= __t; 6011: _M_imag *= __t; 6011: return *this; 6011: } 6011: 6011: 6011: template 6011: complex<_Tp>& 6011: complex<_Tp>::operator/=(const _Tp& __t) 6011: { 6011: _M_real /= __t; 6011: _M_imag /= __t; 6011: return *this; 6011: } 6011: 6011: template 6011: template 6011: complex<_Tp>& 6011: complex<_Tp>::operator=(const complex<_Up>& __z) 6011: { 6011: _M_real = __z.real(); 6011: _M_imag = __z.imag(); 6011: return *this; 6011: } 6011: 6011: 6011: template 6011: template 6011: complex<_Tp>& 6011: complex<_Tp>::operator+=(const complex<_Up>& __z) 6011: { 6011: _M_real += __z.real(); 6011: _M_imag += __z.imag(); 6011: return *this; 6011: } 6011: 6011: 6011: template 6011: template 6011: complex<_Tp>& 6011: complex<_Tp>::operator-=(const complex<_Up>& __z) 6011: { 6011: _M_real -= __z.real(); 6011: _M_imag -= __z.imag(); 6011: return *this; 6011: } 6011: 6011: 6011: 6011: template 6011: template 6011: complex<_Tp>& 6011: complex<_Tp>::operator*=(const complex<_Up>& __z) 6011: { 6011: const _Tp __r = _M_real * __z.real() - _M_imag * __z.imag(); 6011: _M_imag = _M_real * __z.imag() + _M_imag * __z.real(); 6011: _M_real = __r; 6011: return *this; 6011: } 6011: 6011: 6011: 6011: template 6011: template 6011: complex<_Tp>& 6011: complex<_Tp>::operator/=(const complex<_Up>& __z) 6011: { 6011: const _Tp __r = _M_real * __z.real() + _M_imag * __z.imag(); 6011: const _Tp __n = std::norm(__z); 6011: _M_imag = (_M_imag * __z.real() - _M_real * __z.imag()) / __n; 6011: _M_real = __r / __n; 6011: return *this; 6011: } 6011: 6011: 6011: 6011: 6011: template 6011: inline complex<_Tp> 6011: operator+(const complex<_Tp>& __x, const complex<_Tp>& __y) 6011: { 6011: complex<_Tp> __r = __x; 6011: __r += __y; 6011: return __r; 6011: } 6011: 6011: template 6011: inline complex<_Tp> 6011: operator+(const complex<_Tp>& __x, const _Tp& __y) 6011: { 6011: complex<_Tp> __r = __x; 6011: __r += __y; 6011: return __r; 6011: } 6011: 6011: template 6011: inline complex<_Tp> 6011: operator+(const _Tp& __x, const complex<_Tp>& __y) 6011: { 6011: complex<_Tp> __r = __y; 6011: __r += __x; 6011: return __r; 6011: } 6011: 6011: 6011: 6011: 6011: template 6011: inline complex<_Tp> 6011: operator-(const complex<_Tp>& __x, const complex<_Tp>& __y) 6011: { 6011: complex<_Tp> __r = __x; 6011: __r -= __y; 6011: return __r; 6011: } 6011: 6011: template 6011: inline complex<_Tp> 6011: operator-(const complex<_Tp>& __x, const _Tp& __y) 6011: { 6011: complex<_Tp> __r = __x; 6011: __r -= __y; 6011: return __r; 6011: } 6011: 6011: template 6011: inline complex<_Tp> 6011: operator-(const _Tp& __x, const complex<_Tp>& __y) 6011: { 6011: complex<_Tp> __r(__x, -__y.imag()); 6011: __r -= __y.real(); 6011: return __r; 6011: } 6011: 6011: 6011: 6011: 6011: template 6011: inline complex<_Tp> 6011: operator*(const complex<_Tp>& __x, const complex<_Tp>& __y) 6011: { 6011: complex<_Tp> __r = __x; 6011: __r *= __y; 6011: return __r; 6011: } 6011: 6011: template 6011: inline complex<_Tp> 6011: operator*(const complex<_Tp>& __x, const _Tp& __y) 6011: { 6011: complex<_Tp> __r = __x; 6011: __r *= __y; 6011: return __r; 6011: } 6011: 6011: template 6011: inline complex<_Tp> 6011: operator*(const _Tp& __x, const complex<_Tp>& __y) 6011: { 6011: complex<_Tp> __r = __y; 6011: __r *= __x; 6011: return __r; 6011: } 6011: 6011: 6011: 6011: 6011: template 6011: inline complex<_Tp> 6011: operator/(const complex<_Tp>& __x, const complex<_Tp>& __y) 6011: { 6011: complex<_Tp> __r = __x; 6011: __r /= __y; 6011: return __r; 6011: } 6011: 6011: template 6011: inline complex<_Tp> 6011: operator/(const complex<_Tp>& __x, const _Tp& __y) 6011: { 6011: complex<_Tp> __r = __x; 6011: __r /= __y; 6011: return __r; 6011: } 6011: 6011: template 6011: inline complex<_Tp> 6011: operator/(const _Tp& __x, const complex<_Tp>& __y) 6011: { 6011: complex<_Tp> __r = __x; 6011: __r /= __y; 6011: return __r; 6011: } 6011: 6011: 6011: 6011: template 6011: inline complex<_Tp> 6011: operator+(const complex<_Tp>& __x) 6011: { return __x; } 6011: 6011: 6011: template 6011: inline complex<_Tp> 6011: operator-(const complex<_Tp>& __x) 6011: { return complex<_Tp>(-__x.real(), -__x.imag()); } 6011: 6011: 6011: 6011: template 6011: inline constexpr bool 6011: operator==(const complex<_Tp>& __x, const complex<_Tp>& __y) 6011: { return __x.real() == __y.real() && __x.imag() == __y.imag(); } 6011: 6011: template 6011: inline constexpr bool 6011: operator==(const complex<_Tp>& __x, const _Tp& __y) 6011: { return __x.real() == __y && __x.imag() == _Tp(); } 6011: 6011: template 6011: inline constexpr bool 6011: operator==(const _Tp& __x, const complex<_Tp>& __y) 6011: { return __x == __y.real() && _Tp() == __y.imag(); } 6011: 6011: 6011: 6011: 6011: template 6011: inline constexpr bool 6011: operator!=(const complex<_Tp>& __x, const complex<_Tp>& __y) 6011: { return __x.real() != __y.real() || __x.imag() != __y.imag(); } 6011: 6011: template 6011: inline constexpr bool 6011: operator!=(const complex<_Tp>& __x, const _Tp& __y) 6011: { return __x.real() != __y || __x.imag() != _Tp(); } 6011: 6011: template 6011: inline constexpr bool 6011: operator!=(const _Tp& __x, const complex<_Tp>& __y) 6011: { return __x != __y.real() || _Tp() != __y.imag(); } 6011: 6011: 6011: 6011: template 6011: basic_istream<_CharT, _Traits>& 6011: operator>>(basic_istream<_CharT, _Traits>& __is, complex<_Tp>& __x) 6011: { 6011: bool __fail = true; 6011: _CharT __ch; 6011: if (__is >> __ch) 6011: { 6011: if (_Traits::eq(__ch, __is.widen('('))) 6011: { 6011: _Tp __u; 6011: if (__is >> __u >> __ch) 6011: { 6011: const _CharT __rparen = __is.widen(')'); 6011: if (_Traits::eq(__ch, __rparen)) 6011: { 6011: __x = __u; 6011: __fail = false; 6011: } 6011: else if (_Traits::eq(__ch, __is.widen(','))) 6011: { 6011: _Tp __v; 6011: if (__is >> __v >> __ch) 6011: { 6011: if (_Traits::eq(__ch, __rparen)) 6011: { 6011: __x = complex<_Tp>(__u, __v); 6011: __fail = false; 6011: } 6011: else 6011: __is.putback(__ch); 6011: } 6011: } 6011: else 6011: __is.putback(__ch); 6011: } 6011: } 6011: else 6011: { 6011: __is.putback(__ch); 6011: _Tp __u; 6011: if (__is >> __u) 6011: { 6011: __x = __u; 6011: __fail = false; 6011: } 6011: } 6011: } 6011: if (__fail) 6011: __is.setstate(ios_base::failbit); 6011: return __is; 6011: } 6011: 6011: 6011: template 6011: basic_ostream<_CharT, _Traits>& 6011: operator<<(basic_ostream<_CharT, _Traits>& __os, const complex<_Tp>& __x) 6011: { 6011: basic_ostringstream<_CharT, _Traits> __s; 6011: __s.flags(__os.flags()); 6011: __s.imbue(__os.getloc()); 6011: __s.precision(__os.precision()); 6011: __s << '(' << __x.real() << ',' << __x.imag() << ')'; 6011: return __os << __s.str(); 6011: } 6011: 6011: 6011: 6011: template 6011: constexpr _Tp 6011: real(const complex<_Tp>& __z) 6011: { return __z.real(); } 6011: 6011: template 6011: constexpr _Tp 6011: imag(const complex<_Tp>& __z) 6011: { return __z.imag(); } 6011: # 591 "/usr/include/c++/8/complex" 3 6011: template 6011: inline _Tp 6011: __complex_abs(const complex<_Tp>& __z) 6011: { 6011: _Tp __x = __z.real(); 6011: _Tp __y = __z.imag(); 6011: const _Tp __s = std::max(abs(__x), abs(__y)); 6011: if (__s == _Tp()) 6011: return __s; 6011: __x /= __s; 6011: __y /= __s; 6011: return __s * sqrt(__x * __x + __y * __y); 6011: } 6011: 6011: 6011: inline float 6011: __complex_abs(__complex__ float __z) { return __builtin_cabsf(__z); } 6011: 6011: inline double 6011: __complex_abs(__complex__ double __z) { return __builtin_cabs(__z); } 6011: 6011: inline long double 6011: __complex_abs(const __complex__ long double& __z) 6011: { return __builtin_cabsl(__z); } 6011: 6011: template 6011: inline _Tp 6011: abs(const complex<_Tp>& __z) { return __complex_abs(__z.__rep()); } 6011: # 627 "/usr/include/c++/8/complex" 3 6011: template 6011: inline _Tp 6011: __complex_arg(const complex<_Tp>& __z) 6011: { return atan2(__z.imag(), __z.real()); } 6011: 6011: 6011: inline float 6011: __complex_arg(__complex__ float __z) { return __builtin_cargf(__z); } 6011: 6011: inline double 6011: __complex_arg(__complex__ double __z) { return __builtin_carg(__z); } 6011: 6011: inline long double 6011: __complex_arg(const __complex__ long double& __z) 6011: { return __builtin_cargl(__z); } 6011: 6011: template 6011: inline _Tp 6011: arg(const complex<_Tp>& __z) { return __complex_arg(__z.__rep()); } 6011: # 657 "/usr/include/c++/8/complex" 3 6011: template 6011: struct _Norm_helper 6011: { 6011: template 6011: static inline _Tp _S_do_it(const complex<_Tp>& __z) 6011: { 6011: const _Tp __x = __z.real(); 6011: const _Tp __y = __z.imag(); 6011: return __x * __x + __y * __y; 6011: } 6011: }; 6011: 6011: template<> 6011: struct _Norm_helper 6011: { 6011: template 6011: static inline _Tp _S_do_it(const complex<_Tp>& __z) 6011: { 6011: _Tp __res = std::abs(__z); 6011: return __res * __res; 6011: } 6011: }; 6011: 6011: template 6011: inline _Tp 6011: norm(const complex<_Tp>& __z) 6011: { 6011: return _Norm_helper<__is_floating<_Tp>::__value 6011: && !0>::_S_do_it(__z); 6011: } 6011: 6011: template 6011: inline complex<_Tp> 6011: polar(const _Tp& __rho, const _Tp& __theta) 6011: { 6011: ; 6011: return complex<_Tp>(__rho * cos(__theta), __rho * sin(__theta)); 6011: } 6011: 6011: template 6011: inline complex<_Tp> 6011: conj(const complex<_Tp>& __z) 6011: { return complex<_Tp>(__z.real(), -__z.imag()); } 6011: 6011: 6011: 6011: 6011: template 6011: inline complex<_Tp> 6011: __complex_cos(const complex<_Tp>& __z) 6011: { 6011: const _Tp __x = __z.real(); 6011: const _Tp __y = __z.imag(); 6011: return complex<_Tp>(cos(__x) * cosh(__y), -sin(__x) * sinh(__y)); 6011: } 6011: 6011: 6011: inline __complex__ float 6011: __complex_cos(__complex__ float __z) { return __builtin_ccosf(__z); } 6011: 6011: inline __complex__ double 6011: __complex_cos(__complex__ double __z) { return __builtin_ccos(__z); } 6011: 6011: inline __complex__ long double 6011: __complex_cos(const __complex__ long double& __z) 6011: { return __builtin_ccosl(__z); } 6011: 6011: template 6011: inline complex<_Tp> 6011: cos(const complex<_Tp>& __z) { return __complex_cos(__z.__rep()); } 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: template 6011: inline complex<_Tp> 6011: __complex_cosh(const complex<_Tp>& __z) 6011: { 6011: const _Tp __x = __z.real(); 6011: const _Tp __y = __z.imag(); 6011: return complex<_Tp>(cosh(__x) * cos(__y), sinh(__x) * sin(__y)); 6011: } 6011: 6011: 6011: inline __complex__ float 6011: __complex_cosh(__complex__ float __z) { return __builtin_ccoshf(__z); } 6011: 6011: inline __complex__ double 6011: __complex_cosh(__complex__ double __z) { return __builtin_ccosh(__z); } 6011: 6011: inline __complex__ long double 6011: __complex_cosh(const __complex__ long double& __z) 6011: { return __builtin_ccoshl(__z); } 6011: 6011: template 6011: inline complex<_Tp> 6011: cosh(const complex<_Tp>& __z) { return __complex_cosh(__z.__rep()); } 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: template 6011: inline complex<_Tp> 6011: __complex_exp(const complex<_Tp>& __z) 6011: { return std::polar<_Tp>(exp(__z.real()), __z.imag()); } 6011: 6011: 6011: inline __complex__ float 6011: __complex_exp(__complex__ float __z) { return __builtin_cexpf(__z); } 6011: 6011: inline __complex__ double 6011: __complex_exp(__complex__ double __z) { return __builtin_cexp(__z); } 6011: 6011: inline __complex__ long double 6011: __complex_exp(const __complex__ long double& __z) 6011: { return __builtin_cexpl(__z); } 6011: 6011: template 6011: inline complex<_Tp> 6011: exp(const complex<_Tp>& __z) { return __complex_exp(__z.__rep()); } 6011: # 791 "/usr/include/c++/8/complex" 3 6011: template 6011: inline complex<_Tp> 6011: __complex_log(const complex<_Tp>& __z) 6011: { return complex<_Tp>(log(std::abs(__z)), std::arg(__z)); } 6011: 6011: 6011: inline __complex__ float 6011: __complex_log(__complex__ float __z) { return __builtin_clogf(__z); } 6011: 6011: inline __complex__ double 6011: __complex_log(__complex__ double __z) { return __builtin_clog(__z); } 6011: 6011: inline __complex__ long double 6011: __complex_log(const __complex__ long double& __z) 6011: { return __builtin_clogl(__z); } 6011: 6011: template 6011: inline complex<_Tp> 6011: log(const complex<_Tp>& __z) { return __complex_log(__z.__rep()); } 6011: 6011: 6011: 6011: 6011: 6011: 6011: template 6011: inline complex<_Tp> 6011: log10(const complex<_Tp>& __z) 6011: { return std::log(__z) / log(_Tp(10.0)); } 6011: 6011: 6011: template 6011: inline complex<_Tp> 6011: __complex_sin(const complex<_Tp>& __z) 6011: { 6011: const _Tp __x = __z.real(); 6011: const _Tp __y = __z.imag(); 6011: return complex<_Tp>(sin(__x) * cosh(__y), cos(__x) * sinh(__y)); 6011: } 6011: 6011: 6011: inline __complex__ float 6011: __complex_sin(__complex__ float __z) { return __builtin_csinf(__z); } 6011: 6011: inline __complex__ double 6011: __complex_sin(__complex__ double __z) { return __builtin_csin(__z); } 6011: 6011: inline __complex__ long double 6011: __complex_sin(const __complex__ long double& __z) 6011: { return __builtin_csinl(__z); } 6011: 6011: template 6011: inline complex<_Tp> 6011: sin(const complex<_Tp>& __z) { return __complex_sin(__z.__rep()); } 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: template 6011: inline complex<_Tp> 6011: __complex_sinh(const complex<_Tp>& __z) 6011: { 6011: const _Tp __x = __z.real(); 6011: const _Tp __y = __z.imag(); 6011: return complex<_Tp>(sinh(__x) * cos(__y), cosh(__x) * sin(__y)); 6011: } 6011: 6011: 6011: inline __complex__ float 6011: __complex_sinh(__complex__ float __z) { return __builtin_csinhf(__z); } 6011: 6011: inline __complex__ double 6011: __complex_sinh(__complex__ double __z) { return __builtin_csinh(__z); } 6011: 6011: inline __complex__ long double 6011: __complex_sinh(const __complex__ long double& __z) 6011: { return __builtin_csinhl(__z); } 6011: 6011: template 6011: inline complex<_Tp> 6011: sinh(const complex<_Tp>& __z) { return __complex_sinh(__z.__rep()); } 6011: # 883 "/usr/include/c++/8/complex" 3 6011: template 6011: complex<_Tp> 6011: __complex_sqrt(const complex<_Tp>& __z) 6011: { 6011: _Tp __x = __z.real(); 6011: _Tp __y = __z.imag(); 6011: 6011: if (__x == _Tp()) 6011: { 6011: _Tp __t = sqrt(abs(__y) / 2); 6011: return complex<_Tp>(__t, __y < _Tp() ? -__t : __t); 6011: } 6011: else 6011: { 6011: _Tp __t = sqrt(2 * (std::abs(__z) + abs(__x))); 6011: _Tp __u = __t / 2; 6011: return __x > _Tp() 6011: ? complex<_Tp>(__u, __y / __t) 6011: : complex<_Tp>(abs(__y) / __t, __y < _Tp() ? -__u : __u); 6011: } 6011: } 6011: 6011: 6011: inline __complex__ float 6011: __complex_sqrt(__complex__ float __z) { return __builtin_csqrtf(__z); } 6011: 6011: inline __complex__ double 6011: __complex_sqrt(__complex__ double __z) { return __builtin_csqrt(__z); } 6011: 6011: inline __complex__ long double 6011: __complex_sqrt(const __complex__ long double& __z) 6011: { return __builtin_csqrtl(__z); } 6011: 6011: template 6011: inline complex<_Tp> 6011: sqrt(const complex<_Tp>& __z) { return __complex_sqrt(__z.__rep()); } 6011: # 927 "/usr/include/c++/8/complex" 3 6011: template 6011: inline complex<_Tp> 6011: __complex_tan(const complex<_Tp>& __z) 6011: { return std::sin(__z) / std::cos(__z); } 6011: 6011: 6011: inline __complex__ float 6011: __complex_tan(__complex__ float __z) { return __builtin_ctanf(__z); } 6011: 6011: inline __complex__ double 6011: __complex_tan(__complex__ double __z) { return __builtin_ctan(__z); } 6011: 6011: inline __complex__ long double 6011: __complex_tan(const __complex__ long double& __z) 6011: { return __builtin_ctanl(__z); } 6011: 6011: template 6011: inline complex<_Tp> 6011: tan(const complex<_Tp>& __z) { return __complex_tan(__z.__rep()); } 6011: # 955 "/usr/include/c++/8/complex" 3 6011: template 6011: inline complex<_Tp> 6011: __complex_tanh(const complex<_Tp>& __z) 6011: { return std::sinh(__z) / std::cosh(__z); } 6011: 6011: 6011: inline __complex__ float 6011: __complex_tanh(__complex__ float __z) { return __builtin_ctanhf(__z); } 6011: 6011: inline __complex__ double 6011: __complex_tanh(__complex__ double __z) { return __builtin_ctanh(__z); } 6011: 6011: inline __complex__ long double 6011: __complex_tanh(const __complex__ long double& __z) 6011: { return __builtin_ctanhl(__z); } 6011: 6011: template 6011: inline complex<_Tp> 6011: tanh(const complex<_Tp>& __z) { return __complex_tanh(__z.__rep()); } 6011: # 984 "/usr/include/c++/8/complex" 3 6011: template 6011: complex<_Tp> 6011: __complex_pow_unsigned(complex<_Tp> __x, unsigned __n) 6011: { 6011: complex<_Tp> __y = __n % 2 ? __x : complex<_Tp>(1); 6011: 6011: while (__n >>= 1) 6011: { 6011: __x *= __x; 6011: if (__n % 2) 6011: __y *= __x; 6011: } 6011: 6011: return __y; 6011: } 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: template 6011: inline complex<_Tp> 6011: pow(const complex<_Tp>& __z, int __n) 6011: { 6011: return __n < 0 6011: ? complex<_Tp>(1) / std::__complex_pow_unsigned(__z, -(unsigned)__n) 6011: : std::__complex_pow_unsigned(__z, __n); 6011: } 6011: 6011: template 6011: complex<_Tp> 6011: pow(const complex<_Tp>& __x, const _Tp& __y) 6011: { 6011: 6011: 6011: 6011: 6011: if (__x.imag() == _Tp() && __x.real() > _Tp()) 6011: return pow(__x.real(), __y); 6011: 6011: complex<_Tp> __t = std::log(__x); 6011: return std::polar<_Tp>(exp(__y * __t.real()), __y * __t.imag()); 6011: } 6011: 6011: template 6011: inline complex<_Tp> 6011: __complex_pow(const complex<_Tp>& __x, const complex<_Tp>& __y) 6011: { return __x == _Tp() ? _Tp() : std::exp(__y * std::log(__x)); } 6011: 6011: 6011: inline __complex__ float 6011: __complex_pow(__complex__ float __x, __complex__ float __y) 6011: { return __builtin_cpowf(__x, __y); } 6011: 6011: inline __complex__ double 6011: __complex_pow(__complex__ double __x, __complex__ double __y) 6011: { return __builtin_cpow(__x, __y); } 6011: 6011: inline __complex__ long double 6011: __complex_pow(const __complex__ long double& __x, 6011: const __complex__ long double& __y) 6011: { return __builtin_cpowl(__x, __y); } 6011: 6011: template 6011: inline complex<_Tp> 6011: pow(const complex<_Tp>& __x, const complex<_Tp>& __y) 6011: { return __complex_pow(__x.__rep(), __y.__rep()); } 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: template 6011: inline complex<_Tp> 6011: pow(const _Tp& __x, const complex<_Tp>& __y) 6011: { 6011: return __x > _Tp() ? std::polar<_Tp>(pow(__x, __y.real()), 6011: __y.imag() * log(__x)) 6011: : std::pow(complex<_Tp>(__x), __y); 6011: } 6011: 6011: 6011: 6011: template<> 6011: struct complex 6011: { 6011: typedef float value_type; 6011: typedef __complex__ float _ComplexT; 6011: 6011: constexpr complex(_ComplexT __z) : _M_value(__z) { } 6011: 6011: constexpr complex(float __r = 0.0f, float __i = 0.0f) 6011: 6011: : _M_value{ __r, __i } { } 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: explicit constexpr complex(const complex&); 6011: explicit constexpr complex(const complex&); 6011: 6011: 6011: 6011: 6011: __attribute ((__abi_tag__ ("cxx11"))) 6011: constexpr float 6011: real() const { return __real__ _M_value; } 6011: 6011: __attribute ((__abi_tag__ ("cxx11"))) 6011: constexpr float 6011: imag() const { return __imag__ _M_value; } 6011: # 1118 "/usr/include/c++/8/complex" 3 6011: void 6011: real(float __val) { __real__ _M_value = __val; } 6011: 6011: void 6011: imag(float __val) { __imag__ _M_value = __val; } 6011: 6011: complex& 6011: operator=(float __f) 6011: { 6011: _M_value = __f; 6011: return *this; 6011: } 6011: 6011: complex& 6011: operator+=(float __f) 6011: { 6011: _M_value += __f; 6011: return *this; 6011: } 6011: 6011: complex& 6011: operator-=(float __f) 6011: { 6011: _M_value -= __f; 6011: return *this; 6011: } 6011: 6011: complex& 6011: operator*=(float __f) 6011: { 6011: _M_value *= __f; 6011: return *this; 6011: } 6011: 6011: complex& 6011: operator/=(float __f) 6011: { 6011: _M_value /= __f; 6011: return *this; 6011: } 6011: 6011: 6011: 6011: 6011: 6011: template 6011: complex& 6011: operator=(const complex<_Tp>& __z) 6011: { 6011: __real__ _M_value = __z.real(); 6011: __imag__ _M_value = __z.imag(); 6011: return *this; 6011: } 6011: 6011: template 6011: complex& 6011: operator+=(const complex<_Tp>& __z) 6011: { 6011: __real__ _M_value += __z.real(); 6011: __imag__ _M_value += __z.imag(); 6011: return *this; 6011: } 6011: 6011: template 6011: complex& 6011: operator-=(const complex<_Tp>& __z) 6011: { 6011: __real__ _M_value -= __z.real(); 6011: __imag__ _M_value -= __z.imag(); 6011: return *this; 6011: } 6011: 6011: template 6011: complex& 6011: operator*=(const complex<_Tp>& __z) 6011: { 6011: _ComplexT __t; 6011: __real__ __t = __z.real(); 6011: __imag__ __t = __z.imag(); 6011: _M_value *= __t; 6011: return *this; 6011: } 6011: 6011: template 6011: complex& 6011: operator/=(const complex<_Tp>& __z) 6011: { 6011: _ComplexT __t; 6011: __real__ __t = __z.real(); 6011: __imag__ __t = __z.imag(); 6011: _M_value /= __t; 6011: return *this; 6011: } 6011: 6011: constexpr _ComplexT __rep() const { return _M_value; } 6011: 6011: private: 6011: _ComplexT _M_value; 6011: }; 6011: 6011: 6011: 6011: template<> 6011: struct complex 6011: { 6011: typedef double value_type; 6011: typedef __complex__ double _ComplexT; 6011: 6011: constexpr complex(_ComplexT __z) : _M_value(__z) { } 6011: 6011: constexpr complex(double __r = 0.0, double __i = 0.0) 6011: 6011: : _M_value{ __r, __i } { } 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: constexpr complex(const complex& __z) 6011: : _M_value(__z.__rep()) { } 6011: 6011: explicit constexpr complex(const complex&); 6011: 6011: 6011: 6011: 6011: __attribute ((__abi_tag__ ("cxx11"))) 6011: constexpr double 6011: real() const { return __real__ _M_value; } 6011: 6011: __attribute ((__abi_tag__ ("cxx11"))) 6011: constexpr double 6011: imag() const { return __imag__ _M_value; } 6011: # 1269 "/usr/include/c++/8/complex" 3 6011: void 6011: real(double __val) { __real__ _M_value = __val; } 6011: 6011: void 6011: imag(double __val) { __imag__ _M_value = __val; } 6011: 6011: complex& 6011: operator=(double __d) 6011: { 6011: _M_value = __d; 6011: return *this; 6011: } 6011: 6011: complex& 6011: operator+=(double __d) 6011: { 6011: _M_value += __d; 6011: return *this; 6011: } 6011: 6011: complex& 6011: operator-=(double __d) 6011: { 6011: _M_value -= __d; 6011: return *this; 6011: } 6011: 6011: complex& 6011: operator*=(double __d) 6011: { 6011: _M_value *= __d; 6011: return *this; 6011: } 6011: 6011: complex& 6011: operator/=(double __d) 6011: { 6011: _M_value /= __d; 6011: return *this; 6011: } 6011: 6011: 6011: 6011: 6011: template 6011: complex& 6011: operator=(const complex<_Tp>& __z) 6011: { 6011: __real__ _M_value = __z.real(); 6011: __imag__ _M_value = __z.imag(); 6011: return *this; 6011: } 6011: 6011: template 6011: complex& 6011: operator+=(const complex<_Tp>& __z) 6011: { 6011: __real__ _M_value += __z.real(); 6011: __imag__ _M_value += __z.imag(); 6011: return *this; 6011: } 6011: 6011: template 6011: complex& 6011: operator-=(const complex<_Tp>& __z) 6011: { 6011: __real__ _M_value -= __z.real(); 6011: __imag__ _M_value -= __z.imag(); 6011: return *this; 6011: } 6011: 6011: template 6011: complex& 6011: operator*=(const complex<_Tp>& __z) 6011: { 6011: _ComplexT __t; 6011: __real__ __t = __z.real(); 6011: __imag__ __t = __z.imag(); 6011: _M_value *= __t; 6011: return *this; 6011: } 6011: 6011: template 6011: complex& 6011: operator/=(const complex<_Tp>& __z) 6011: { 6011: _ComplexT __t; 6011: __real__ __t = __z.real(); 6011: __imag__ __t = __z.imag(); 6011: _M_value /= __t; 6011: return *this; 6011: } 6011: 6011: constexpr _ComplexT __rep() const { return _M_value; } 6011: 6011: private: 6011: _ComplexT _M_value; 6011: }; 6011: 6011: 6011: 6011: template<> 6011: struct complex 6011: { 6011: typedef long double value_type; 6011: typedef __complex__ long double _ComplexT; 6011: 6011: constexpr complex(_ComplexT __z) : _M_value(__z) { } 6011: 6011: constexpr complex(long double __r = 0.0L, 6011: long double __i = 0.0L) 6011: 6011: : _M_value{ __r, __i } { } 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: constexpr complex(const complex& __z) 6011: : _M_value(__z.__rep()) { } 6011: 6011: constexpr complex(const complex& __z) 6011: : _M_value(__z.__rep()) { } 6011: 6011: 6011: 6011: 6011: __attribute ((__abi_tag__ ("cxx11"))) 6011: constexpr long double 6011: real() const { return __real__ _M_value; } 6011: 6011: __attribute ((__abi_tag__ ("cxx11"))) 6011: constexpr long double 6011: imag() const { return __imag__ _M_value; } 6011: # 1421 "/usr/include/c++/8/complex" 3 6011: void 6011: real(long double __val) { __real__ _M_value = __val; } 6011: 6011: void 6011: imag(long double __val) { __imag__ _M_value = __val; } 6011: 6011: complex& 6011: operator=(long double __r) 6011: { 6011: _M_value = __r; 6011: return *this; 6011: } 6011: 6011: complex& 6011: operator+=(long double __r) 6011: { 6011: _M_value += __r; 6011: return *this; 6011: } 6011: 6011: complex& 6011: operator-=(long double __r) 6011: { 6011: _M_value -= __r; 6011: return *this; 6011: } 6011: 6011: complex& 6011: operator*=(long double __r) 6011: { 6011: _M_value *= __r; 6011: return *this; 6011: } 6011: 6011: complex& 6011: operator/=(long double __r) 6011: { 6011: _M_value /= __r; 6011: return *this; 6011: } 6011: 6011: 6011: 6011: 6011: template 6011: complex& 6011: operator=(const complex<_Tp>& __z) 6011: { 6011: __real__ _M_value = __z.real(); 6011: __imag__ _M_value = __z.imag(); 6011: return *this; 6011: } 6011: 6011: template 6011: complex& 6011: operator+=(const complex<_Tp>& __z) 6011: { 6011: __real__ _M_value += __z.real(); 6011: __imag__ _M_value += __z.imag(); 6011: return *this; 6011: } 6011: 6011: template 6011: complex& 6011: operator-=(const complex<_Tp>& __z) 6011: { 6011: __real__ _M_value -= __z.real(); 6011: __imag__ _M_value -= __z.imag(); 6011: return *this; 6011: } 6011: 6011: template 6011: complex& 6011: operator*=(const complex<_Tp>& __z) 6011: { 6011: _ComplexT __t; 6011: __real__ __t = __z.real(); 6011: __imag__ __t = __z.imag(); 6011: _M_value *= __t; 6011: return *this; 6011: } 6011: 6011: template 6011: complex& 6011: operator/=(const complex<_Tp>& __z) 6011: { 6011: _ComplexT __t; 6011: __real__ __t = __z.real(); 6011: __imag__ __t = __z.imag(); 6011: _M_value /= __t; 6011: return *this; 6011: } 6011: 6011: constexpr _ComplexT __rep() const { return _M_value; } 6011: 6011: private: 6011: _ComplexT _M_value; 6011: }; 6011: 6011: 6011: 6011: inline constexpr 6011: complex::complex(const complex& __z) 6011: : _M_value(__z.__rep()) { } 6011: 6011: inline constexpr 6011: complex::complex(const complex& __z) 6011: : _M_value(__z.__rep()) { } 6011: 6011: inline constexpr 6011: complex::complex(const complex& __z) 6011: : _M_value(__z.__rep()) { } 6011: 6011: 6011: 6011: 6011: 6011: extern template istream& operator>>(istream&, complex&); 6011: extern template ostream& operator<<(ostream&, const complex&); 6011: extern template istream& operator>>(istream&, complex&); 6011: extern template ostream& operator<<(ostream&, const complex&); 6011: extern template istream& operator>>(istream&, complex&); 6011: extern template ostream& operator<<(ostream&, const complex&); 6011: 6011: 6011: extern template wistream& operator>>(wistream&, complex&); 6011: extern template wostream& operator<<(wostream&, const complex&); 6011: extern template wistream& operator>>(wistream&, complex&); 6011: extern template wostream& operator<<(wostream&, const complex&); 6011: extern template wistream& operator>>(wistream&, complex&); 6011: extern template wostream& operator<<(wostream&, const complex&); 6011: 6011: 6011: 6011: 6011: 6011: 6011: } 6011: 6011: namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) 6011: { 6011: 6011: 6011: 6011: template 6011: struct __promote_2, _Up> 6011: { 6011: public: 6011: typedef std::complex::__type> __type; 6011: }; 6011: 6011: template 6011: struct __promote_2<_Tp, std::complex<_Up> > 6011: { 6011: public: 6011: typedef std::complex::__type> __type; 6011: }; 6011: 6011: template 6011: struct __promote_2, std::complex<_Up> > 6011: { 6011: public: 6011: typedef std::complex::__type> __type; 6011: }; 6011: 6011: 6011: } 6011: 6011: 6011: 6011: namespace std __attribute__ ((__visibility__ ("default"))) 6011: { 6011: 6011: 6011: 6011: template std::complex<_Tp> acos(const std::complex<_Tp>&); 6011: template std::complex<_Tp> asin(const std::complex<_Tp>&); 6011: template std::complex<_Tp> atan(const std::complex<_Tp>&); 6011: 6011: template std::complex<_Tp> acosh(const std::complex<_Tp>&); 6011: template std::complex<_Tp> asinh(const std::complex<_Tp>&); 6011: template std::complex<_Tp> atanh(const std::complex<_Tp>&); 6011: 6011: template _Tp fabs(const std::complex<_Tp>&); 6011: 6011: template 6011: inline std::complex<_Tp> 6011: __complex_acos(const std::complex<_Tp>& __z) 6011: { 6011: const std::complex<_Tp> __t = std::asin(__z); 6011: const _Tp __pi_2 = 1.5707963267948966192313216916397514L; 6011: return std::complex<_Tp>(__pi_2 - __t.real(), -__t.imag()); 6011: } 6011: 6011: 6011: inline __complex__ float 6011: __complex_acos(__complex__ float __z) 6011: { return __builtin_cacosf(__z); } 6011: 6011: inline __complex__ double 6011: __complex_acos(__complex__ double __z) 6011: { return __builtin_cacos(__z); } 6011: 6011: inline __complex__ long double 6011: __complex_acos(const __complex__ long double& __z) 6011: { return __builtin_cacosl(__z); } 6011: 6011: template 6011: inline std::complex<_Tp> 6011: acos(const std::complex<_Tp>& __z) 6011: { return __complex_acos(__z.__rep()); } 6011: # 1642 "/usr/include/c++/8/complex" 3 6011: template 6011: inline std::complex<_Tp> 6011: __complex_asin(const std::complex<_Tp>& __z) 6011: { 6011: std::complex<_Tp> __t(-__z.imag(), __z.real()); 6011: __t = std::asinh(__t); 6011: return std::complex<_Tp>(__t.imag(), -__t.real()); 6011: } 6011: 6011: 6011: inline __complex__ float 6011: __complex_asin(__complex__ float __z) 6011: { return __builtin_casinf(__z); } 6011: 6011: inline __complex__ double 6011: __complex_asin(__complex__ double __z) 6011: { return __builtin_casin(__z); } 6011: 6011: inline __complex__ long double 6011: __complex_asin(const __complex__ long double& __z) 6011: { return __builtin_casinl(__z); } 6011: 6011: template 6011: inline std::complex<_Tp> 6011: asin(const std::complex<_Tp>& __z) 6011: { return __complex_asin(__z.__rep()); } 6011: # 1678 "/usr/include/c++/8/complex" 3 6011: template 6011: std::complex<_Tp> 6011: __complex_atan(const std::complex<_Tp>& __z) 6011: { 6011: const _Tp __r2 = __z.real() * __z.real(); 6011: const _Tp __x = _Tp(1.0) - __r2 - __z.imag() * __z.imag(); 6011: 6011: _Tp __num = __z.imag() + _Tp(1.0); 6011: _Tp __den = __z.imag() - _Tp(1.0); 6011: 6011: __num = __r2 + __num * __num; 6011: __den = __r2 + __den * __den; 6011: 6011: return std::complex<_Tp>(_Tp(0.5) * atan2(_Tp(2.0) * __z.real(), __x), 6011: _Tp(0.25) * log(__num / __den)); 6011: } 6011: 6011: 6011: inline __complex__ float 6011: __complex_atan(__complex__ float __z) 6011: { return __builtin_catanf(__z); } 6011: 6011: inline __complex__ double 6011: __complex_atan(__complex__ double __z) 6011: { return __builtin_catan(__z); } 6011: 6011: inline __complex__ long double 6011: __complex_atan(const __complex__ long double& __z) 6011: { return __builtin_catanl(__z); } 6011: 6011: template 6011: inline std::complex<_Tp> 6011: atan(const std::complex<_Tp>& __z) 6011: { return __complex_atan(__z.__rep()); } 6011: # 1722 "/usr/include/c++/8/complex" 3 6011: template 6011: std::complex<_Tp> 6011: __complex_acosh(const std::complex<_Tp>& __z) 6011: { 6011: 6011: return _Tp(2.0) * std::log(std::sqrt(_Tp(0.5) * (__z + _Tp(1.0))) 6011: + std::sqrt(_Tp(0.5) * (__z - _Tp(1.0)))); 6011: } 6011: 6011: 6011: inline __complex__ float 6011: __complex_acosh(__complex__ float __z) 6011: { return __builtin_cacoshf(__z); } 6011: 6011: inline __complex__ double 6011: __complex_acosh(__complex__ double __z) 6011: { return __builtin_cacosh(__z); } 6011: 6011: inline __complex__ long double 6011: __complex_acosh(const __complex__ long double& __z) 6011: { return __builtin_cacoshl(__z); } 6011: 6011: template 6011: inline std::complex<_Tp> 6011: acosh(const std::complex<_Tp>& __z) 6011: { return __complex_acosh(__z.__rep()); } 6011: # 1758 "/usr/include/c++/8/complex" 3 6011: template 6011: std::complex<_Tp> 6011: __complex_asinh(const std::complex<_Tp>& __z) 6011: { 6011: std::complex<_Tp> __t((__z.real() - __z.imag()) 6011: * (__z.real() + __z.imag()) + _Tp(1.0), 6011: _Tp(2.0) * __z.real() * __z.imag()); 6011: __t = std::sqrt(__t); 6011: 6011: return std::log(__t + __z); 6011: } 6011: 6011: 6011: inline __complex__ float 6011: __complex_asinh(__complex__ float __z) 6011: { return __builtin_casinhf(__z); } 6011: 6011: inline __complex__ double 6011: __complex_asinh(__complex__ double __z) 6011: { return __builtin_casinh(__z); } 6011: 6011: inline __complex__ long double 6011: __complex_asinh(const __complex__ long double& __z) 6011: { return __builtin_casinhl(__z); } 6011: 6011: template 6011: inline std::complex<_Tp> 6011: asinh(const std::complex<_Tp>& __z) 6011: { return __complex_asinh(__z.__rep()); } 6011: # 1797 "/usr/include/c++/8/complex" 3 6011: template 6011: std::complex<_Tp> 6011: __complex_atanh(const std::complex<_Tp>& __z) 6011: { 6011: const _Tp __i2 = __z.imag() * __z.imag(); 6011: const _Tp __x = _Tp(1.0) - __i2 - __z.real() * __z.real(); 6011: 6011: _Tp __num = _Tp(1.0) + __z.real(); 6011: _Tp __den = _Tp(1.0) - __z.real(); 6011: 6011: __num = __i2 + __num * __num; 6011: __den = __i2 + __den * __den; 6011: 6011: return std::complex<_Tp>(_Tp(0.25) * (log(__num) - log(__den)), 6011: _Tp(0.5) * atan2(_Tp(2.0) * __z.imag(), __x)); 6011: } 6011: 6011: 6011: inline __complex__ float 6011: __complex_atanh(__complex__ float __z) 6011: { return __builtin_catanhf(__z); } 6011: 6011: inline __complex__ double 6011: __complex_atanh(__complex__ double __z) 6011: { return __builtin_catanh(__z); } 6011: 6011: inline __complex__ long double 6011: __complex_atanh(const __complex__ long double& __z) 6011: { return __builtin_catanhl(__z); } 6011: 6011: template 6011: inline std::complex<_Tp> 6011: atanh(const std::complex<_Tp>& __z) 6011: { return __complex_atanh(__z.__rep()); } 6011: # 1841 "/usr/include/c++/8/complex" 3 6011: template 6011: inline _Tp 6011: 6011: 6011: 6011: fabs(const std::complex<_Tp>& __z) 6011: { return std::abs(__z); } 6011: 6011: 6011: template 6011: inline typename __gnu_cxx::__promote<_Tp>::__type 6011: arg(_Tp __x) 6011: { 6011: typedef typename __gnu_cxx::__promote<_Tp>::__type __type; 6011: 6011: return std::signbit(__x) ? __type(3.1415926535897932384626433832795029L) 6011: : __type(); 6011: 6011: 6011: 6011: } 6011: 6011: template 6011: constexpr inline typename __gnu_cxx::__promote<_Tp>::__type 6011: imag(_Tp) 6011: { return _Tp(); } 6011: 6011: template 6011: inline typename __gnu_cxx::__promote<_Tp>::__type 6011: norm(_Tp __x) 6011: { 6011: typedef typename __gnu_cxx::__promote<_Tp>::__type __type; 6011: return __type(__x) * __type(__x); 6011: } 6011: 6011: template 6011: constexpr inline typename __gnu_cxx::__promote<_Tp>::__type 6011: real(_Tp __x) 6011: { return __x; } 6011: 6011: template 6011: inline std::complex::__type> 6011: pow(const std::complex<_Tp>& __x, const _Up& __y) 6011: { 6011: typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; 6011: return std::pow(std::complex<__type>(__x), __type(__y)); 6011: } 6011: 6011: template 6011: inline std::complex::__type> 6011: pow(const _Tp& __x, const std::complex<_Up>& __y) 6011: { 6011: typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; 6011: return std::pow(__type(__x), std::complex<__type>(__y)); 6011: } 6011: 6011: template 6011: inline std::complex::__type> 6011: pow(const std::complex<_Tp>& __x, const std::complex<_Up>& __y) 6011: { 6011: typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; 6011: return std::pow(std::complex<__type>(__x), 6011: std::complex<__type>(__y)); 6011: } 6011: 6011: 6011: 6011: template std::complex<_Tp> proj(const std::complex<_Tp>&); 6011: 6011: template 6011: std::complex<_Tp> 6011: __complex_proj(const std::complex<_Tp>& __z) 6011: { 6011: const _Tp __den = (__z.real() * __z.real() 6011: + __z.imag() * __z.imag() + _Tp(1.0)); 6011: 6011: return std::complex<_Tp>((_Tp(2.0) * __z.real()) / __den, 6011: (_Tp(2.0) * __z.imag()) / __den); 6011: } 6011: 6011: 6011: inline __complex__ float 6011: __complex_proj(__complex__ float __z) 6011: { return __builtin_cprojf(__z); } 6011: 6011: inline __complex__ double 6011: __complex_proj(__complex__ double __z) 6011: { return __builtin_cproj(__z); } 6011: 6011: inline __complex__ long double 6011: __complex_proj(const __complex__ long double& __z) 6011: { return __builtin_cprojl(__z); } 6011: 6011: template 6011: inline std::complex<_Tp> 6011: proj(const std::complex<_Tp>& __z) 6011: { return __complex_proj(__z.__rep()); } 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: template 6011: inline std::complex::__type> 6011: proj(_Tp __x) 6011: { 6011: typedef typename __gnu_cxx::__promote<_Tp>::__type __type; 6011: return std::proj(std::complex<__type>(__x)); 6011: } 6011: 6011: template 6011: inline std::complex::__type> 6011: conj(_Tp __x) 6011: { 6011: typedef typename __gnu_cxx::__promote<_Tp>::__type __type; 6011: return std::complex<__type>(__x, -__type()); 6011: } 6011: # 1999 "/usr/include/c++/8/complex" 3 6011: 6011: } 6011: # 99 "/usr/include/boost/detail/container_fwd.hpp" 2 3 4 6011: # 23 "/usr/include/boost/functional/hash/extensions.hpp" 2 3 4 6011: 6011: 6011: # 1 "/usr/include/boost/preprocessor/repetition/repeat_from_to.hpp" 1 3 4 6011: # 23 "/usr/include/boost/preprocessor/repetition/repeat_from_to.hpp" 3 4 6011: # 1 "/usr/include/boost/preprocessor/detail/auto_rec.hpp" 1 3 4 6011: # 24 "/usr/include/boost/preprocessor/repetition/repeat_from_to.hpp" 2 3 4 6011: # 26 "/usr/include/boost/functional/hash/extensions.hpp" 2 3 4 6011: # 44 "/usr/include/boost/functional/hash/extensions.hpp" 3 4 6011: namespace boost 6011: { 6011: template 6011: std::size_t hash_value(std::pair const&); 6011: template 6011: std::size_t hash_value(std::vector const&); 6011: template 6011: std::size_t hash_value(std::list const& v); 6011: template 6011: std::size_t hash_value(std::deque const& v); 6011: template 6011: std::size_t hash_value(std::set const& v); 6011: template 6011: std::size_t hash_value(std::multiset const& v); 6011: template 6011: std::size_t hash_value(std::map const& v); 6011: template 6011: std::size_t hash_value(std::multimap const& v); 6011: 6011: template 6011: std::size_t hash_value(std::complex const&); 6011: 6011: template 6011: std::size_t hash_value(std::pair const& v) 6011: { 6011: std::size_t seed = 0; 6011: boost::hash_combine(seed, v.first); 6011: boost::hash_combine(seed, v.second); 6011: return seed; 6011: } 6011: 6011: template 6011: std::size_t hash_value(std::vector const& v) 6011: { 6011: return boost::hash_range(v.begin(), v.end()); 6011: } 6011: 6011: template 6011: std::size_t hash_value(std::list const& v) 6011: { 6011: return boost::hash_range(v.begin(), v.end()); 6011: } 6011: 6011: template 6011: std::size_t hash_value(std::deque const& v) 6011: { 6011: return boost::hash_range(v.begin(), v.end()); 6011: } 6011: 6011: template 6011: std::size_t hash_value(std::set const& v) 6011: { 6011: return boost::hash_range(v.begin(), v.end()); 6011: } 6011: 6011: template 6011: std::size_t hash_value(std::multiset const& v) 6011: { 6011: return boost::hash_range(v.begin(), v.end()); 6011: } 6011: 6011: template 6011: std::size_t hash_value(std::map const& v) 6011: { 6011: return boost::hash_range(v.begin(), v.end()); 6011: } 6011: 6011: template 6011: std::size_t hash_value(std::multimap const& v) 6011: { 6011: return boost::hash_range(v.begin(), v.end()); 6011: } 6011: 6011: template 6011: std::size_t hash_value(std::complex const& v) 6011: { 6011: boost::hash hasher; 6011: std::size_t seed = hasher(v.imag()); 6011: seed ^= hasher(v.real()) + (seed<<6) + (seed>>2); 6011: return seed; 6011: } 6011: 6011: 6011: template 6011: std::size_t hash_value(std::array const& v) 6011: { 6011: return boost::hash_range(v.begin(), v.end()); 6011: } 6011: 6011: 6011: 6011: namespace hash_detail { 6011: template 6011: inline typename boost::enable_if_c<(I == std::tuple_size::value), 6011: void>::type 6011: hash_combine_tuple(std::size_t&, T const&) 6011: { 6011: } 6011: 6011: template 6011: inline typename boost::enable_if_c<(I < std::tuple_size::value), 6011: void>::type 6011: hash_combine_tuple(std::size_t& seed, T const& v) 6011: { 6011: boost::hash_combine(seed, std::get(v)); 6011: boost::hash_detail::hash_combine_tuple(seed, v); 6011: } 6011: 6011: template 6011: inline std::size_t hash_tuple(T const& v) 6011: { 6011: std::size_t seed = 0; 6011: boost::hash_detail::hash_combine_tuple<0>(seed, v); 6011: return seed; 6011: } 6011: } 6011: 6011: 6011: template 6011: inline std::size_t hash_value(std::tuple const& v) 6011: { 6011: return boost::hash_detail::hash_tuple(v); 6011: } 6011: # 192 "/usr/include/boost/functional/hash/extensions.hpp" 3 4 6011: template 6011: inline std::size_t hash_value(std::shared_ptr const& x) { 6011: return boost::hash_value(x.get()); 6011: } 6011: 6011: template 6011: inline std::size_t hash_value(std::unique_ptr const& x) { 6011: return boost::hash_value(x.get()); 6011: } 6011: # 256 "/usr/include/boost/functional/hash/extensions.hpp" 3 4 6011: template struct hash 6011: : boost::hash_detail::hash_base 6011: { 6011: 6011: std::size_t operator()(T const& val) const 6011: { 6011: return hash_value(val); 6011: } 6011: 6011: 6011: 6011: 6011: 6011: 6011: }; 6011: # 316 "/usr/include/boost/functional/hash/extensions.hpp" 3 4 6011: } 6011: # 595 "/usr/include/boost/functional/hash/hash.hpp" 2 3 4 6011: # 7 "/usr/include/boost/functional/hash.hpp" 2 3 4 6011: # 24 "/usr/include/boost/regex/v4/basic_regex.hpp" 2 3 4 6011: # 36 "/usr/include/boost/regex/v4/basic_regex.hpp" 3 4 6011: namespace boost{ 6011: # 45 "/usr/include/boost/regex/v4/basic_regex.hpp" 3 4 6011: namespace re_detail_106501{ 6011: 6011: 6011: 6011: 6011: template 6011: class basic_regex_parser; 6011: 6011: template 6011: void bubble_down_one(I first, I last) 6011: { 6011: if(first != last) 6011: { 6011: I next = last - 1; 6011: while((next != first) && (*next < *(next-1))) 6011: { 6011: (next-1)->swap(*next); 6011: --next; 6011: } 6011: } 6011: } 6011: 6011: template 6011: inline int hash_value_from_capture_name(Iterator i, Iterator j) 6011: { 6011: std::size_t r = boost::hash_range(i, j); 6011: r %= ((std::numeric_limits::max)() - 10001); 6011: r += 10000; 6011: return static_cast(r); 6011: } 6011: 6011: class named_subexpressions 6011: { 6011: public: 6011: struct name 6011: { 6011: template 6011: name(const charT* i, const charT* j, int idx) 6011: : index(idx) 6011: { 6011: hash = hash_value_from_capture_name(i, j); 6011: } 6011: name(int h, int idx) 6011: : index(idx), hash(h) 6011: { 6011: } 6011: int index; 6011: int hash; 6011: bool operator < (const name& other)const 6011: { 6011: return hash < other.hash; 6011: } 6011: bool operator == (const name& other)const 6011: { 6011: return hash == other.hash; 6011: } 6011: void swap(name& other) 6011: { 6011: std::swap(index, other.index); 6011: std::swap(hash, other.hash); 6011: } 6011: }; 6011: 6011: typedef std::vector::const_iterator const_iterator; 6011: typedef std::pair range_type; 6011: 6011: named_subexpressions(){} 6011: 6011: template 6011: void set_name(const charT* i, const charT* j, int index) 6011: { 6011: m_sub_names.push_back(name(i, j, index)); 6011: bubble_down_one(m_sub_names.begin(), m_sub_names.end()); 6011: } 6011: template 6011: int get_id(const charT* i, const charT* j)const 6011: { 6011: name t(i, j, 0); 6011: typename std::vector::const_iterator pos = std::lower_bound(m_sub_names.begin(), m_sub_names.end(), t); 6011: if((pos != m_sub_names.end()) && (*pos == t)) 6011: { 6011: return pos->index; 6011: } 6011: return -1; 6011: } 6011: template 6011: range_type equal_range(const charT* i, const charT* j)const 6011: { 6011: name t(i, j, 0); 6011: return std::equal_range(m_sub_names.begin(), m_sub_names.end(), t); 6011: } 6011: int get_id(int h)const 6011: { 6011: name t(h, 0); 6011: std::vector::const_iterator pos = std::lower_bound(m_sub_names.begin(), m_sub_names.end(), t); 6011: if((pos != m_sub_names.end()) && (*pos == t)) 6011: { 6011: return pos->index; 6011: } 6011: return -1; 6011: } 6011: range_type equal_range(int h)const 6011: { 6011: name t(h, 0); 6011: return std::equal_range(m_sub_names.begin(), m_sub_names.end(), t); 6011: } 6011: private: 6011: std::vector m_sub_names; 6011: }; 6011: 6011: 6011: 6011: 6011: 6011: template 6011: struct regex_data : public named_subexpressions 6011: { 6011: typedef regex_constants::syntax_option_type flag_type; 6011: typedef std::size_t size_type; 6011: 6011: regex_data(const ::boost::shared_ptr< 6011: ::boost::regex_traits_wrapper >& t) 6011: : m_ptraits(t), m_expression(0), m_expression_len(0), m_disable_match_any(false) {} 6011: regex_data() 6011: : m_ptraits(new ::boost::regex_traits_wrapper()), m_expression(0), m_expression_len(0), m_disable_match_any(false) {} 6011: 6011: ::boost::shared_ptr< 6011: ::boost::regex_traits_wrapper 6011: > m_ptraits; 6011: flag_type m_flags; 6011: int m_status; 6011: const charT* m_expression; 6011: std::ptrdiff_t m_expression_len; 6011: size_type m_mark_count; 6011: re_detail_106501::re_syntax_base* m_first_state; 6011: unsigned m_restart_type; 6011: unsigned char m_startmap[1 << 8]; 6011: unsigned int m_can_be_null; 6011: re_detail_106501::raw_storage m_data; 6011: typename traits::char_class_type m_word_mask; 6011: std::vector< 6011: std::pair< 6011: std::size_t, std::size_t> > m_subs; 6011: bool m_has_recursions; 6011: bool m_disable_match_any; 6011: }; 6011: 6011: 6011: 6011: 6011: template 6011: class basic_regex_implementation 6011: : public regex_data 6011: { 6011: public: 6011: typedef regex_constants::syntax_option_type flag_type; 6011: typedef std::ptrdiff_t difference_type; 6011: typedef std::size_t size_type; 6011: typedef typename traits::locale_type locale_type; 6011: typedef const charT* const_iterator; 6011: 6011: basic_regex_implementation(){} 6011: basic_regex_implementation(const ::boost::shared_ptr< 6011: ::boost::regex_traits_wrapper >& t) 6011: : regex_data(t) {} 6011: void assign(const charT* arg_first, 6011: const charT* arg_last, 6011: flag_type f) 6011: { 6011: regex_data* pdat = this; 6011: basic_regex_parser parser(pdat); 6011: parser.parse(arg_first, arg_last, f); 6011: } 6011: 6011: locale_type imbue(locale_type l) 6011: { 6011: return this->m_ptraits->imbue(l); 6011: } 6011: locale_type getloc()const 6011: { 6011: return this->m_ptraits->getloc(); 6011: } 6011: std::basic_string str()const 6011: { 6011: std::basic_string result; 6011: if(this->m_status == 0) 6011: result = std::basic_string(this->m_expression, this->m_expression_len); 6011: return result; 6011: } 6011: const_iterator expression()const 6011: { 6011: return this->m_expression; 6011: } 6011: std::pair subexpression(std::size_t n)const 6011: { 6011: const std::pair& pi = this->m_subs.at(n); 6011: std::pair p(expression() + pi.first, expression() + pi.second); 6011: return p; 6011: } 6011: 6011: 6011: const_iterator begin()const 6011: { 6011: return (this->m_status ? 0 : this->m_expression); 6011: } 6011: const_iterator end()const 6011: { 6011: return (this->m_status ? 0 : this->m_expression + this->m_expression_len); 6011: } 6011: flag_type flags()const 6011: { 6011: return this->m_flags; 6011: } 6011: size_type size()const 6011: { 6011: return this->m_expression_len; 6011: } 6011: int status()const 6011: { 6011: return this->m_status; 6011: } 6011: size_type mark_count()const 6011: { 6011: return this->m_mark_count - 1; 6011: } 6011: const re_detail_106501::re_syntax_base* get_first_state()const 6011: { 6011: return this->m_first_state; 6011: } 6011: unsigned get_restart_type()const 6011: { 6011: return this->m_restart_type; 6011: } 6011: const unsigned char* get_map()const 6011: { 6011: return this->m_startmap; 6011: } 6011: const ::boost::regex_traits_wrapper& get_traits()const 6011: { 6011: return *(this->m_ptraits); 6011: } 6011: bool can_be_null()const 6011: { 6011: return this->m_can_be_null; 6011: } 6011: const regex_data& get_data()const 6011: { 6011: basic_regex_implementation const* p = this; 6011: return *static_cast*>(p); 6011: } 6011: }; 6011: 6011: } 6011: # 307 "/usr/include/boost/regex/v4/basic_regex.hpp" 3 4 6011: template 6011: 6011: class basic_regex : public regbase 6011: { 6011: public: 6011: 6011: typedef std::size_t traits_size_type; 6011: typedef typename traits::string_type traits_string_type; 6011: typedef charT char_type; 6011: typedef traits traits_type; 6011: 6011: typedef charT value_type; 6011: typedef charT& reference; 6011: typedef const charT& const_reference; 6011: typedef const charT* const_iterator; 6011: typedef const_iterator iterator; 6011: typedef std::ptrdiff_t difference_type; 6011: typedef std::size_t size_type; 6011: typedef regex_constants::syntax_option_type flag_type; 6011: 6011: 6011: 6011: typedef typename traits::locale_type locale_type; 6011: 6011: public: 6011: explicit basic_regex(){} 6011: explicit basic_regex(const charT* p, flag_type f = regex_constants::normal) 6011: { 6011: assign(p, f); 6011: } 6011: basic_regex(const charT* p1, const charT* p2, flag_type f = regex_constants::normal) 6011: { 6011: assign(p1, p2, f); 6011: } 6011: basic_regex(const charT* p, size_type len, flag_type f) 6011: { 6011: assign(p, len, f); 6011: } 6011: basic_regex(const basic_regex& that) 6011: : m_pimpl(that.m_pimpl) {} 6011: ~basic_regex(){} 6011: basic_regex& operator=(const basic_regex& that) 6011: { 6011: return assign(that); 6011: } 6011: basic_regex& operator=(const charT* ptr) 6011: { 6011: return assign(ptr); 6011: } 6011: 6011: 6011: 6011: basic_regex& assign(const basic_regex& that) 6011: { 6011: m_pimpl = that.m_pimpl; 6011: return *this; 6011: } 6011: basic_regex& assign(const charT* p, flag_type f = regex_constants::normal) 6011: { 6011: return assign(p, p + traits::length(p), f); 6011: } 6011: basic_regex& assign(const charT* p, size_type len, flag_type f) 6011: { 6011: return assign(p, p + len, f); 6011: } 6011: private: 6011: basic_regex& do_assign(const charT* p1, 6011: const charT* p2, 6011: flag_type f); 6011: public: 6011: basic_regex& assign(const charT* p1, 6011: const charT* p2, 6011: flag_type f = regex_constants::normal) 6011: { 6011: return do_assign(p1, p2, f); 6011: } 6011: 6011: 6011: template 6011: unsigned int set_expression(const std::basic_string& p, flag_type f = regex_constants::normal) 6011: { 6011: return set_expression(p.data(), p.data() + p.size(), f); 6011: } 6011: 6011: template 6011: explicit basic_regex(const std::basic_string& p, flag_type f = regex_constants::normal) 6011: { 6011: assign(p, f); 6011: } 6011: 6011: template 6011: basic_regex(InputIterator arg_first, InputIterator arg_last, flag_type f = regex_constants::normal) 6011: { 6011: typedef typename traits::string_type seq_type; 6011: seq_type a(arg_first, arg_last); 6011: if(a.size()) 6011: assign(static_cast(&*a.begin()), static_cast(&*a.begin() + a.size()), f); 6011: else 6011: assign(static_cast(0), static_cast(0), f); 6011: } 6011: 6011: template 6011: basic_regex& operator=(const std::basic_string& p) 6011: { 6011: return assign(p.data(), p.data() + p.size(), regex_constants::normal); 6011: } 6011: 6011: template 6011: basic_regex& assign( 6011: const std::basic_string& s, 6011: flag_type f = regex_constants::normal) 6011: { 6011: return assign(s.data(), s.data() + s.size(), f); 6011: } 6011: 6011: template 6011: basic_regex& assign(InputIterator arg_first, 6011: InputIterator arg_last, 6011: flag_type f = regex_constants::normal) 6011: { 6011: typedef typename traits::string_type seq_type; 6011: seq_type a(arg_first, arg_last); 6011: if(a.size()) 6011: { 6011: const charT* p1 = &*a.begin(); 6011: const charT* p2 = &*a.begin() + a.size(); 6011: return assign(p1, p2, f); 6011: } 6011: return assign(static_cast(0), static_cast(0), f); 6011: } 6011: # 464 "/usr/include/boost/regex/v4/basic_regex.hpp" 3 4 6011: locale_type imbue(locale_type l); 6011: locale_type getloc()const 6011: { 6011: return m_pimpl.get() ? m_pimpl->getloc() : locale_type(); 6011: } 6011: 6011: 6011: 6011: 6011: flag_type getflags()const 6011: { 6011: return flags(); 6011: } 6011: flag_type flags()const 6011: { 6011: return m_pimpl.get() ? m_pimpl->flags() : 0; 6011: } 6011: 6011: 6011: std::basic_string str()const 6011: { 6011: return m_pimpl.get() ? m_pimpl->str() : std::basic_string(); 6011: } 6011: 6011: 6011: std::pair subexpression(std::size_t n)const 6011: { 6011: if(!m_pimpl.get()) 6011: boost::throw_exception(std::logic_error("Can't access subexpressions in an invalid regex.")); 6011: return m_pimpl->subexpression(n); 6011: } 6011: const_iterator begin()const 6011: { 6011: return (m_pimpl.get() ? m_pimpl->begin() : 0); 6011: } 6011: const_iterator end()const 6011: { 6011: return (m_pimpl.get() ? m_pimpl->end() : 0); 6011: } 6011: 6011: 6011: void swap(basic_regex& that)throw() 6011: { 6011: m_pimpl.swap(that.m_pimpl); 6011: } 6011: 6011: 6011: size_type size()const 6011: { 6011: return (m_pimpl.get() ? m_pimpl->size() : 0); 6011: } 6011: 6011: 6011: size_type max_size()const 6011: { 6011: return (0x7fffffff * 2U + 1U); 6011: } 6011: 6011: 6011: bool empty()const 6011: { 6011: return (m_pimpl.get() ? 0 != m_pimpl->status() : true); 6011: } 6011: 6011: size_type mark_count()const 6011: { 6011: return (m_pimpl.get() ? m_pimpl->mark_count() : 0); 6011: } 6011: 6011: int status()const 6011: { 6011: return (m_pimpl.get() ? m_pimpl->status() : regex_constants::error_empty); 6011: } 6011: 6011: int compare(const basic_regex& that) const 6011: { 6011: if(m_pimpl.get() == that.m_pimpl.get()) 6011: return 0; 6011: if(!m_pimpl.get()) 6011: return -1; 6011: if(!that.m_pimpl.get()) 6011: return 1; 6011: if(status() != that.status()) 6011: return status() - that.status(); 6011: if(flags() != that.flags()) 6011: return flags() - that.flags(); 6011: return str().compare(that.str()); 6011: } 6011: bool operator==(const basic_regex& e)const 6011: { 6011: return compare(e) == 0; 6011: } 6011: bool operator != (const basic_regex& e)const 6011: { 6011: return compare(e) != 0; 6011: } 6011: bool operator<(const basic_regex& e)const 6011: { 6011: return compare(e) < 0; 6011: } 6011: bool operator>(const basic_regex& e)const 6011: { 6011: return compare(e) > 0; 6011: } 6011: bool operator<=(const basic_regex& e)const 6011: { 6011: return compare(e) <= 0; 6011: } 6011: bool operator>=(const basic_regex& e)const 6011: { 6011: return compare(e) >= 0; 6011: } 6011: 6011: 6011: 6011: 6011: const charT* expression()const 6011: { 6011: return (m_pimpl.get() && !m_pimpl->status() ? m_pimpl->expression() : 0); 6011: } 6011: unsigned int set_expression(const charT* p1, const charT* p2, flag_type f = regex_constants::normal) 6011: { 6011: assign(p1, p2, f | regex_constants::no_except); 6011: return status(); 6011: } 6011: unsigned int set_expression(const charT* p, flag_type f = regex_constants::normal) 6011: { 6011: assign(p, f | regex_constants::no_except); 6011: return status(); 6011: } 6011: unsigned int error_code()const 6011: { 6011: return status(); 6011: } 6011: 6011: 6011: 6011: const re_detail_106501::re_syntax_base* get_first_state()const 6011: { 6011: (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__)); 6011: return m_pimpl->get_first_state(); 6011: } 6011: unsigned get_restart_type()const 6011: { 6011: (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__)); 6011: return m_pimpl->get_restart_type(); 6011: } 6011: const unsigned char* get_map()const 6011: { 6011: (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__)); 6011: return m_pimpl->get_map(); 6011: } 6011: const ::boost::regex_traits_wrapper& get_traits()const 6011: { 6011: (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__)); 6011: return m_pimpl->get_traits(); 6011: } 6011: bool can_be_null()const 6011: { 6011: (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__)); 6011: return m_pimpl->can_be_null(); 6011: } 6011: const re_detail_106501::regex_data& get_data()const 6011: { 6011: (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__)); 6011: return m_pimpl->get_data(); 6011: } 6011: boost::shared_ptr get_named_subs()const 6011: { 6011: return m_pimpl; 6011: } 6011: 6011: private: 6011: shared_ptr > m_pimpl; 6011: }; 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: template 6011: basic_regex& basic_regex::do_assign(const charT* p1, 6011: const charT* p2, 6011: flag_type f) 6011: { 6011: shared_ptr > temp; 6011: if(!m_pimpl.get()) 6011: { 6011: temp = shared_ptr >(new re_detail_106501::basic_regex_implementation()); 6011: } 6011: else 6011: { 6011: temp = shared_ptr >(new re_detail_106501::basic_regex_implementation(m_pimpl->m_ptraits)); 6011: } 6011: temp->assign(p1, p2, f); 6011: temp.swap(m_pimpl); 6011: return *this; 6011: } 6011: 6011: template 6011: typename basic_regex::locale_type basic_regex::imbue(locale_type l) 6011: { 6011: shared_ptr > temp(new re_detail_106501::basic_regex_implementation()); 6011: locale_type result = temp->imbue(l); 6011: temp.swap(m_pimpl); 6011: return result; 6011: } 6011: 6011: 6011: 6011: 6011: template 6011: void swap(basic_regex& e1, basic_regex& e2) 6011: { 6011: e1.swap(e2); 6011: } 6011: 6011: 6011: template 6011: std::basic_ostream& 6011: operator << (std::basic_ostream& os, 6011: const basic_regex& e) 6011: { 6011: return (os << e.str()); 6011: } 6011: # 707 "/usr/include/boost/regex/v4/basic_regex.hpp" 3 4 6011: template 6011: 6011: class reg_expression : public basic_regex 6011: { 6011: public: 6011: typedef typename basic_regex::flag_type flag_type; 6011: typedef typename basic_regex::size_type size_type; 6011: explicit reg_expression(){} 6011: explicit reg_expression(const charT* p, flag_type f = regex_constants::normal) 6011: : basic_regex(p, f){} 6011: reg_expression(const charT* p1, const charT* p2, flag_type f = regex_constants::normal) 6011: : basic_regex(p1, p2, f){} 6011: reg_expression(const charT* p, size_type len, flag_type f) 6011: : basic_regex(p, len, f){} 6011: reg_expression(const reg_expression& that) 6011: : basic_regex(that) {} 6011: ~reg_expression(){} 6011: reg_expression& operator=(const reg_expression& that) 6011: { 6011: return this->assign(that); 6011: } 6011: 6011: 6011: template 6011: explicit reg_expression(const std::basic_string& p, flag_type f = regex_constants::normal) 6011: : basic_regex(p, f) 6011: { 6011: } 6011: 6011: template 6011: reg_expression(InputIterator arg_first, InputIterator arg_last, flag_type f = regex_constants::normal) 6011: : basic_regex(arg_first, arg_last, f) 6011: { 6011: } 6011: 6011: template 6011: reg_expression& operator=(const std::basic_string& p) 6011: { 6011: this->assign(p); 6011: return *this; 6011: } 6011: # 761 "/usr/include/boost/regex/v4/basic_regex.hpp" 3 4 6011: }; 6011: 6011: 6011: 6011: 6011: 6011: } 6011: # 68 "/usr/include/boost/regex/v4/regex.hpp" 2 3 4 6011: 6011: 6011: # 1 "/usr/include/boost/regex/v4/basic_regex_creator.hpp" 1 3 4 6011: # 39 "/usr/include/boost/regex/v4/basic_regex_creator.hpp" 3 4 6011: namespace boost{ 6011: 6011: namespace re_detail_106501{ 6011: 6011: template 6011: struct digraph : public std::pair 6011: { 6011: digraph() : std::pair(0, 0){} 6011: digraph(charT c1) : std::pair(c1, 0){} 6011: digraph(charT c1, charT c2) : std::pair(c1, c2) 6011: {} 6011: digraph(const digraph& d) : std::pair(d.first, d.second){} 6011: template 6011: digraph(const Seq& s) : std::pair() 6011: { 6011: (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__)); 6011: (static_cast (s.size()) ? void (0) : __assert_fail ("s.size()", "/usr/include/boost/regex/v4/basic_regex_creator.hpp", 55, __extension__ __PRETTY_FUNCTION__)); 6011: this->first = s[0]; 6011: this->second = (s.size() > 1) ? s[1] : 0; 6011: } 6011: }; 6011: 6011: template 6011: class basic_char_set 6011: { 6011: public: 6011: typedef digraph digraph_type; 6011: typedef typename traits::string_type string_type; 6011: typedef typename traits::char_class_type m_type; 6011: 6011: basic_char_set() 6011: { 6011: m_negate = false; 6011: m_has_digraphs = false; 6011: m_classes = 0; 6011: m_negated_classes = 0; 6011: m_empty = true; 6011: } 6011: 6011: void add_single(const digraph_type& s) 6011: { 6011: m_singles.insert(s); 6011: if(s.second) 6011: m_has_digraphs = true; 6011: m_empty = false; 6011: } 6011: void add_range(const digraph_type& first, const digraph_type& end) 6011: { 6011: m_ranges.push_back(first); 6011: m_ranges.push_back(end); 6011: if(first.second) 6011: { 6011: m_has_digraphs = true; 6011: add_single(first); 6011: } 6011: if(end.second) 6011: { 6011: m_has_digraphs = true; 6011: add_single(end); 6011: } 6011: m_empty = false; 6011: } 6011: void add_class(m_type m) 6011: { 6011: m_classes |= m; 6011: m_empty = false; 6011: } 6011: void add_negated_class(m_type m) 6011: { 6011: m_negated_classes |= m; 6011: m_empty = false; 6011: } 6011: void add_equivalent(const digraph_type& s) 6011: { 6011: m_equivalents.insert(s); 6011: if(s.second) 6011: { 6011: m_has_digraphs = true; 6011: add_single(s); 6011: } 6011: m_empty = false; 6011: } 6011: void negate() 6011: { 6011: m_negate = true; 6011: 6011: } 6011: 6011: 6011: 6011: 6011: bool has_digraphs()const 6011: { 6011: return m_has_digraphs; 6011: } 6011: bool is_negated()const 6011: { 6011: return m_negate; 6011: } 6011: typedef typename std::vector::const_iterator list_iterator; 6011: typedef typename std::set::const_iterator set_iterator; 6011: set_iterator singles_begin()const 6011: { 6011: return m_singles.begin(); 6011: } 6011: set_iterator singles_end()const 6011: { 6011: return m_singles.end(); 6011: } 6011: list_iterator ranges_begin()const 6011: { 6011: return m_ranges.begin(); 6011: } 6011: list_iterator ranges_end()const 6011: { 6011: return m_ranges.end(); 6011: } 6011: set_iterator equivalents_begin()const 6011: { 6011: return m_equivalents.begin(); 6011: } 6011: set_iterator equivalents_end()const 6011: { 6011: return m_equivalents.end(); 6011: } 6011: m_type classes()const 6011: { 6011: return m_classes; 6011: } 6011: m_type negated_classes()const 6011: { 6011: return m_negated_classes; 6011: } 6011: bool empty()const 6011: { 6011: return m_empty; 6011: } 6011: private: 6011: std::set m_singles; 6011: std::vector m_ranges; 6011: bool m_negate; 6011: bool m_has_digraphs; 6011: m_type m_classes; 6011: m_type m_negated_classes; 6011: bool m_empty; 6011: std::set m_equivalents; 6011: }; 6011: 6011: template 6011: class basic_regex_creator 6011: { 6011: public: 6011: basic_regex_creator(regex_data* data); 6011: std::ptrdiff_t getoffset(void* addr) 6011: { 6011: return getoffset(addr, m_pdata->m_data.data()); 6011: } 6011: std::ptrdiff_t getoffset(const void* addr, const void* base) 6011: { 6011: return static_cast(addr) - static_cast(base); 6011: } 6011: re_syntax_base* getaddress(std::ptrdiff_t off) 6011: { 6011: return getaddress(off, m_pdata->m_data.data()); 6011: } 6011: re_syntax_base* getaddress(std::ptrdiff_t off, void* base) 6011: { 6011: return static_cast(static_cast(static_cast(base) + off)); 6011: } 6011: void init(unsigned l_flags) 6011: { 6011: m_pdata->m_flags = l_flags; 6011: m_icase = l_flags & regex_constants::icase; 6011: } 6011: regbase::flag_type flags() 6011: { 6011: return m_pdata->m_flags; 6011: } 6011: void flags(regbase::flag_type f) 6011: { 6011: m_pdata->m_flags = f; 6011: if(m_icase != static_cast(f & regbase::icase)) 6011: { 6011: m_icase = static_cast(f & regbase::icase); 6011: } 6011: } 6011: re_syntax_base* append_state(syntax_element_type t, std::size_t s = sizeof(re_syntax_base)); 6011: re_syntax_base* insert_state(std::ptrdiff_t pos, syntax_element_type t, std::size_t s = sizeof(re_syntax_base)); 6011: re_literal* append_literal(charT c); 6011: re_syntax_base* append_set(const basic_char_set& char_set); 6011: re_syntax_base* append_set(const basic_char_set& char_set, mpl::false_*); 6011: re_syntax_base* append_set(const basic_char_set& char_set, mpl::true_*); 6011: void finalize(const charT* p1, const charT* p2); 6011: protected: 6011: regex_data* m_pdata; 6011: const ::boost::regex_traits_wrapper& 6011: m_traits; 6011: re_syntax_base* m_last_state; 6011: bool m_icase; 6011: unsigned m_repeater_id; 6011: bool m_has_backrefs; 6011: unsigned m_backrefs; 6011: boost::uintmax_t m_bad_repeats; 6011: bool m_has_recursions; 6011: std::vector m_recursion_checks; 6011: typename traits::char_class_type m_word_mask; 6011: typename traits::char_class_type m_mask_space; 6011: typename traits::char_class_type m_lower_mask; 6011: typename traits::char_class_type m_upper_mask; 6011: typename traits::char_class_type m_alpha_mask; 6011: private: 6011: basic_regex_creator& operator=(const basic_regex_creator&); 6011: basic_regex_creator(const basic_regex_creator&); 6011: 6011: void fixup_pointers(re_syntax_base* state); 6011: void fixup_recursions(re_syntax_base* state); 6011: void create_startmaps(re_syntax_base* state); 6011: int calculate_backstep(re_syntax_base* state); 6011: void create_startmap(re_syntax_base* state, unsigned char* l_map, unsigned int* pnull, unsigned char mask); 6011: unsigned get_restart_type(re_syntax_base* state); 6011: void set_all_masks(unsigned char* bits, unsigned char); 6011: bool is_bad_repeat(re_syntax_base* pt); 6011: void set_bad_repeat(re_syntax_base* pt); 6011: syntax_element_type get_repeat_type(re_syntax_base* state); 6011: void probe_leading_repeat(re_syntax_base* state); 6011: }; 6011: 6011: template 6011: basic_regex_creator::basic_regex_creator(regex_data* data) 6011: : 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) 6011: { 6011: m_pdata->m_data.clear(); 6011: m_pdata->m_status = ::boost::regex_constants::error_ok; 6011: static const charT w = 'w'; 6011: static const charT s = 's'; 6011: static const charT l[5] = { 'l', 'o', 'w', 'e', 'r', }; 6011: static const charT u[5] = { 'u', 'p', 'p', 'e', 'r', }; 6011: static const charT a[5] = { 'a', 'l', 'p', 'h', 'a', }; 6011: m_word_mask = m_traits.lookup_classname(&w, &w +1); 6011: m_mask_space = m_traits.lookup_classname(&s, &s +1); 6011: m_lower_mask = m_traits.lookup_classname(l, l + 5); 6011: m_upper_mask = m_traits.lookup_classname(u, u + 5); 6011: m_alpha_mask = m_traits.lookup_classname(a, a + 5); 6011: m_pdata->m_word_mask = m_word_mask; 6011: (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__)); 6011: (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__)); 6011: (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__)); 6011: (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__)); 6011: (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__)); 6011: } 6011: 6011: template 6011: re_syntax_base* basic_regex_creator::append_state(syntax_element_type t, std::size_t s) 6011: { 6011: 6011: if(t == syntax_element_backref) 6011: this->m_has_backrefs = true; 6011: 6011: m_pdata->m_data.align(); 6011: 6011: if(m_last_state) 6011: m_last_state->next.i = m_pdata->m_data.size() - getoffset(m_last_state); 6011: 6011: m_last_state = static_cast(m_pdata->m_data.extend(s)); 6011: 6011: m_last_state->next.i = 0; 6011: m_last_state->type = t; 6011: return m_last_state; 6011: } 6011: 6011: template 6011: re_syntax_base* basic_regex_creator::insert_state(std::ptrdiff_t pos, syntax_element_type t, std::size_t s) 6011: { 6011: 6011: m_pdata->m_data.align(); 6011: 6011: if(m_last_state) 6011: m_last_state->next.i = m_pdata->m_data.size() - getoffset(m_last_state); 6011: 6011: std::ptrdiff_t off = getoffset(m_last_state) + s; 6011: 6011: re_syntax_base* new_state = static_cast(m_pdata->m_data.insert(pos, s)); 6011: 6011: new_state->next.i = s; 6011: new_state->type = t; 6011: m_last_state = getaddress(off); 6011: return new_state; 6011: } 6011: 6011: template 6011: re_literal* basic_regex_creator::append_literal(charT c) 6011: { 6011: re_literal* result; 6011: 6011: if((0 == m_last_state) || (m_last_state->type != syntax_element_literal)) 6011: { 6011: 6011: result = static_cast(append_state(syntax_element_literal, sizeof(re_literal) + sizeof(charT))); 6011: result->length = 1; 6011: *static_cast(static_cast(result+1)) = m_traits.translate(c, m_icase); 6011: } 6011: else 6011: { 6011: 6011: std::ptrdiff_t off = getoffset(m_last_state); 6011: m_pdata->m_data.extend(sizeof(charT)); 6011: m_last_state = result = static_cast(getaddress(off)); 6011: charT* characters = static_cast(static_cast(result+1)); 6011: characters[result->length] = m_traits.translate(c, m_icase); 6011: result->length += 1; 6011: } 6011: return result; 6011: } 6011: 6011: template 6011: inline re_syntax_base* basic_regex_creator::append_set( 6011: const basic_char_set& char_set) 6011: { 6011: typedef mpl::bool_< (sizeof(charT) == 1) > truth_type; 6011: return char_set.has_digraphs() 6011: ? append_set(char_set, static_cast(0)) 6011: : append_set(char_set, static_cast(0)); 6011: } 6011: 6011: template 6011: re_syntax_base* basic_regex_creator::append_set( 6011: const basic_char_set& char_set, mpl::false_*) 6011: { 6011: typedef typename traits::string_type string_type; 6011: typedef typename basic_char_set::list_iterator item_iterator; 6011: typedef typename basic_char_set::set_iterator set_iterator; 6011: typedef typename traits::char_class_type m_type; 6011: 6011: re_set_long* result = static_cast*>(append_state(syntax_element_long_set, sizeof(re_set_long))); 6011: 6011: 6011: 6011: result->csingles = static_cast(::boost::re_detail_106501::distance(char_set.singles_begin(), char_set.singles_end())); 6011: result->cranges = static_cast(::boost::re_detail_106501::distance(char_set.ranges_begin(), char_set.ranges_end())) / 2; 6011: result->cequivalents = static_cast(::boost::re_detail_106501::distance(char_set.equivalents_begin(), char_set.equivalents_end())); 6011: result->cclasses = char_set.classes(); 6011: result->cnclasses = char_set.negated_classes(); 6011: if(flags() & regbase::icase) 6011: { 6011: 6011: if(((result->cclasses & m_lower_mask) == m_lower_mask) || ((result->cclasses & m_upper_mask) == m_upper_mask)) 6011: result->cclasses |= m_alpha_mask; 6011: if(((result->cnclasses & m_lower_mask) == m_lower_mask) || ((result->cnclasses & m_upper_mask) == m_upper_mask)) 6011: result->cnclasses |= m_alpha_mask; 6011: } 6011: 6011: result->isnot = char_set.is_negated(); 6011: result->singleton = !char_set.has_digraphs(); 6011: 6011: 6011: 6011: std::ptrdiff_t offset = getoffset(result); 6011: 6011: 6011: 6011: item_iterator first, last; 6011: set_iterator sfirst, slast; 6011: sfirst = char_set.singles_begin(); 6011: slast = char_set.singles_end(); 6011: while(sfirst != slast) 6011: { 6011: charT* p = static_cast(this->m_pdata->m_data.extend(sizeof(charT) * (sfirst->first == static_cast(0) ? 1 : sfirst->second ? 3 : 2))); 6011: p[0] = m_traits.translate(sfirst->first, m_icase); 6011: if(sfirst->first == static_cast(0)) 6011: { 6011: p[0] = 0; 6011: } 6011: else if(sfirst->second) 6011: { 6011: p[1] = m_traits.translate(sfirst->second, m_icase); 6011: p[2] = 0; 6011: } 6011: else 6011: p[1] = 0; 6011: ++sfirst; 6011: } 6011: 6011: 6011: 6011: first = char_set.ranges_begin(); 6011: last = char_set.ranges_end(); 6011: while(first != last) 6011: { 6011: 6011: digraph c1 = *first; 6011: c1.first = this->m_traits.translate(c1.first, this->m_icase); 6011: c1.second = this->m_traits.translate(c1.second, this->m_icase); 6011: ++first; 6011: digraph c2 = *first; 6011: c2.first = this->m_traits.translate(c2.first, this->m_icase); 6011: c2.second = this->m_traits.translate(c2.second, this->m_icase); 6011: ++first; 6011: string_type s1, s2; 6011: 6011: if(flags() & regex_constants::collate) 6011: { 6011: 6011: charT a1[3] = { c1.first, c1.second, charT(0), }; 6011: charT a2[3] = { c2.first, c2.second, charT(0), }; 6011: s1 = this->m_traits.transform(a1, (a1[1] ? a1+2 : a1+1)); 6011: s2 = this->m_traits.transform(a2, (a2[1] ? a2+2 : a2+1)); 6011: if(s1.size() == 0) 6011: s1 = string_type(1, charT(0)); 6011: if(s2.size() == 0) 6011: s2 = string_type(1, charT(0)); 6011: } 6011: else 6011: { 6011: if(c1.second) 6011: { 6011: s1.insert(s1.end(), c1.first); 6011: s1.insert(s1.end(), c1.second); 6011: } 6011: else 6011: s1 = string_type(1, c1.first); 6011: if(c2.second) 6011: { 6011: s2.insert(s2.end(), c2.first); 6011: s2.insert(s2.end(), c2.second); 6011: } 6011: else 6011: s2.insert(s2.end(), c2.first); 6011: } 6011: if(s1 > s2) 6011: { 6011: 6011: return 0; 6011: } 6011: charT* p = static_cast(this->m_pdata->m_data.extend(sizeof(charT) * (s1.size() + s2.size() + 2) ) ); 6011: re_detail_106501::copy(s1.begin(), s1.end(), p); 6011: p[s1.size()] = charT(0); 6011: p += s1.size() + 1; 6011: re_detail_106501::copy(s2.begin(), s2.end(), p); 6011: p[s2.size()] = charT(0); 6011: } 6011: 6011: 6011: 6011: sfirst = char_set.equivalents_begin(); 6011: slast = char_set.equivalents_end(); 6011: while(sfirst != slast) 6011: { 6011: string_type s; 6011: if(sfirst->second) 6011: { 6011: charT cs[3] = { sfirst->first, sfirst->second, charT(0), }; 6011: s = m_traits.transform_primary(cs, cs+2); 6011: } 6011: else 6011: s = m_traits.transform_primary(&sfirst->first, &sfirst->first+1); 6011: if(s.empty()) 6011: return 0; 6011: charT* p = static_cast(this->m_pdata->m_data.extend(sizeof(charT) * (s.size()+1) ) ); 6011: re_detail_106501::copy(s.begin(), s.end(), p); 6011: p[s.size()] = charT(0); 6011: ++sfirst; 6011: } 6011: 6011: 6011: 6011: m_last_state = result = static_cast*>(getaddress(offset)); 6011: return result; 6011: } 6011: 6011: template 6011: inline bool char_less(T t1, T t2) 6011: { 6011: return t1 < t2; 6011: } 6011: inline bool char_less(char t1, char t2) 6011: { 6011: return static_cast(t1) < static_cast(t2); 6011: } 6011: inline bool char_less(signed char t1, signed char t2) 6011: { 6011: return static_cast(t1) < static_cast(t2); 6011: } 6011: 6011: template 6011: re_syntax_base* basic_regex_creator::append_set( 6011: const basic_char_set& char_set, mpl::true_*) 6011: { 6011: typedef typename traits::string_type string_type; 6011: typedef typename basic_char_set::list_iterator item_iterator; 6011: typedef typename basic_char_set::set_iterator set_iterator; 6011: 6011: re_set* result = static_cast(append_state(syntax_element_set, sizeof(re_set))); 6011: bool negate = char_set.is_negated(); 6011: std::memset(result->_map, 0, sizeof(result->_map)); 6011: 6011: 6011: 6011: item_iterator first, last; 6011: set_iterator sfirst, slast; 6011: sfirst = char_set.singles_begin(); 6011: slast = char_set.singles_end(); 6011: while(sfirst != slast) 6011: { 6011: for(unsigned int i = 0; i < (1 << 8); ++i) 6011: { 6011: if(this->m_traits.translate(static_cast(i), this->m_icase) 6011: == this->m_traits.translate(sfirst->first, this->m_icase)) 6011: result->_map[i] = true; 6011: } 6011: ++sfirst; 6011: } 6011: 6011: 6011: 6011: first = char_set.ranges_begin(); 6011: last = char_set.ranges_end(); 6011: while(first != last) 6011: { 6011: 6011: charT c1 = this->m_traits.translate(first->first, this->m_icase); 6011: ++first; 6011: charT c2 = this->m_traits.translate(first->first, this->m_icase); 6011: ++first; 6011: 6011: if(flags() & regex_constants::collate) 6011: { 6011: 6011: charT c3[2] = { c1, charT(0), }; 6011: string_type s1 = this->m_traits.transform(c3, c3+1); 6011: c3[0] = c2; 6011: string_type s2 = this->m_traits.transform(c3, c3+1); 6011: if(s1 > s2) 6011: { 6011: 6011: return 0; 6011: } 6011: (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__)); 6011: for(unsigned i = 0; i < (1u << 8); ++i) 6011: { 6011: c3[0] = static_cast(i); 6011: string_type s3 = this->m_traits.transform(c3, c3 +1); 6011: if((s1 <= s3) && (s3 <= s2)) 6011: result->_map[i] = true; 6011: } 6011: } 6011: else 6011: { 6011: if(char_less(c2, c1)) 6011: { 6011: 6011: return 0; 6011: } 6011: 6011: std::memset(result->_map + static_cast(c1), true, 1 + static_cast(c2) - static_cast(c1)); 6011: } 6011: } 6011: 6011: 6011: 6011: typedef typename traits::char_class_type m_type; 6011: m_type m = char_set.classes(); 6011: if(flags() & regbase::icase) 6011: { 6011: 6011: if(((m & m_lower_mask) == m_lower_mask) || ((m & m_upper_mask) == m_upper_mask)) 6011: m |= m_alpha_mask; 6011: } 6011: if(m != 0) 6011: { 6011: for(unsigned i = 0; i < (1u << 8); ++i) 6011: { 6011: if(this->m_traits.isctype(static_cast(i), m)) 6011: result->_map[i] = true; 6011: } 6011: } 6011: 6011: 6011: 6011: m = char_set.negated_classes(); 6011: if(flags() & regbase::icase) 6011: { 6011: 6011: if(((m & m_lower_mask) == m_lower_mask) || ((m & m_upper_mask) == m_upper_mask)) 6011: m |= m_alpha_mask; 6011: } 6011: if(m != 0) 6011: { 6011: for(unsigned i = 0; i < (1u << 8); ++i) 6011: { 6011: if(0 == this->m_traits.isctype(static_cast(i), m)) 6011: result->_map[i] = true; 6011: } 6011: } 6011: 6011: 6011: 6011: sfirst = char_set.equivalents_begin(); 6011: slast = char_set.equivalents_end(); 6011: while(sfirst != slast) 6011: { 6011: string_type s; 6011: (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__)); 6011: s = m_traits.transform_primary(&sfirst->first, &sfirst->first+1); 6011: if(s.empty()) 6011: return 0; 6011: for(unsigned i = 0; i < (1u << 8); ++i) 6011: { 6011: charT c[2] = { (static_cast(i)), charT(0), }; 6011: string_type s2 = this->m_traits.transform_primary(c, c+1); 6011: if(s == s2) 6011: result->_map[i] = true; 6011: } 6011: ++sfirst; 6011: } 6011: if(negate) 6011: { 6011: for(unsigned i = 0; i < (1u << 8); ++i) 6011: { 6011: result->_map[i] = !(result->_map[i]); 6011: } 6011: } 6011: return result; 6011: } 6011: 6011: template 6011: void basic_regex_creator::finalize(const charT* p1, const charT* p2) 6011: { 6011: if(this->m_pdata->m_status) 6011: return; 6011: 6011: 6011: append_state(syntax_element_match); 6011: 6011: std::ptrdiff_t len = p2 - p1; 6011: m_pdata->m_expression_len = len; 6011: charT* ps = static_cast(m_pdata->m_data.extend(sizeof(charT) * (1 + (p2 - p1)))); 6011: m_pdata->m_expression = ps; 6011: re_detail_106501::copy(p1, p2, ps); 6011: ps[p2 - p1] = 0; 6011: 6011: 6011: m_pdata->m_status = 0; 6011: 6011: m_pdata->m_first_state = static_cast(m_pdata->m_data.data()); 6011: 6011: fixup_pointers(m_pdata->m_first_state); 6011: if(m_has_recursions) 6011: { 6011: m_pdata->m_has_recursions = true; 6011: fixup_recursions(m_pdata->m_first_state); 6011: if(this->m_pdata->m_status) 6011: return; 6011: } 6011: else 6011: m_pdata->m_has_recursions = false; 6011: 6011: create_startmaps(m_pdata->m_first_state); 6011: 6011: std::memset(m_pdata->m_startmap, 0, sizeof(m_pdata->m_startmap)); 6011: m_pdata->m_can_be_null = 0; 6011: 6011: m_bad_repeats = 0; 6011: if(m_has_recursions) 6011: m_recursion_checks.assign(1 + m_pdata->m_mark_count, 0u); 6011: create_startmap(m_pdata->m_first_state, m_pdata->m_startmap, &(m_pdata->m_can_be_null), mask_all); 6011: 6011: m_pdata->m_restart_type = get_restart_type(m_pdata->m_first_state); 6011: 6011: probe_leading_repeat(m_pdata->m_first_state); 6011: } 6011: 6011: template 6011: void basic_regex_creator::fixup_pointers(re_syntax_base* state) 6011: { 6011: while(state) 6011: { 6011: switch(state->type) 6011: { 6011: case syntax_element_recurse: 6011: m_has_recursions = true; 6011: if(state->next.i) 6011: state->next.p = getaddress(state->next.i, state); 6011: else 6011: state->next.p = 0; 6011: break; 6011: case syntax_element_rep: 6011: case syntax_element_dot_rep: 6011: case syntax_element_char_rep: 6011: case syntax_element_short_set_rep: 6011: case syntax_element_long_set_rep: 6011: 6011: static_cast(state)->state_id = m_repeater_id++; 6011: __attribute__((fallthrough)); 6011: case syntax_element_alt: 6011: std::memset(static_cast(state)->_map, 0, sizeof(static_cast(state)->_map)); 6011: static_cast(state)->can_be_null = 0; 6011: __attribute__((fallthrough)); 6011: case syntax_element_jump: 6011: static_cast(state)->alt.p = getaddress(static_cast(state)->alt.i, state); 6011: __attribute__((fallthrough)); 6011: default: 6011: if(state->next.i) 6011: state->next.p = getaddress(state->next.i, state); 6011: else 6011: state->next.p = 0; 6011: } 6011: state = state->next.p; 6011: } 6011: } 6011: 6011: template 6011: void basic_regex_creator::fixup_recursions(re_syntax_base* state) 6011: { 6011: re_syntax_base* base = state; 6011: while(state) 6011: { 6011: switch(state->type) 6011: { 6011: case syntax_element_assert_backref: 6011: { 6011: 6011: int idx = static_cast(state)->index; 6011: if(idx < 0) 6011: { 6011: idx = -idx-1; 6011: if(idx >= 10000) 6011: { 6011: idx = m_pdata->get_id(idx); 6011: if(idx <= 0) 6011: { 6011: 6011: if(0 == this->m_pdata->m_status) 6011: this->m_pdata->m_status = boost::regex_constants::error_bad_pattern; 6011: 6011: 6011: 6011: this->m_pdata->m_expression = 0; 6011: this->m_pdata->m_expression_len = 0; 6011: 6011: 6011: 6011: if(0 == (this->flags() & regex_constants::no_except)) 6011: { 6011: std::string message = "Encountered a forward reference to a marked sub-expression that does not exist."; 6011: boost::regex_error e(message, boost::regex_constants::error_bad_pattern, 0); 6011: e.raise(); 6011: } 6011: } 6011: } 6011: } 6011: } 6011: break; 6011: case syntax_element_recurse: 6011: { 6011: bool ok = false; 6011: re_syntax_base* p = base; 6011: std::ptrdiff_t idx = static_cast(state)->alt.i; 6011: if(idx > 10000) 6011: { 6011: 6011: 6011: 6011: 6011: idx = m_pdata->get_id(static_cast(idx)); 6011: } 6011: if(idx < 0) 6011: { 6011: ok = false; 6011: } 6011: else 6011: { 6011: while(p) 6011: { 6011: if((p->type == syntax_element_startmark) && (static_cast(p)->index == idx)) 6011: { 6011: 6011: 6011: 6011: static_cast(state)->alt.p = p; 6011: ok = true; 6011: 6011: 6011: 6011: p = p->next.p; 6011: int next_rep_id = 0; 6011: while(p) 6011: { 6011: switch(p->type) 6011: { 6011: case syntax_element_rep: 6011: case syntax_element_dot_rep: 6011: case syntax_element_char_rep: 6011: case syntax_element_short_set_rep: 6011: case syntax_element_long_set_rep: 6011: next_rep_id = static_cast(p)->state_id; 6011: break; 6011: case syntax_element_endmark: 6011: if(static_cast(p)->index == idx) 6011: next_rep_id = -1; 6011: break; 6011: default: 6011: break; 6011: } 6011: if(next_rep_id) 6011: break; 6011: p = p->next.p; 6011: } 6011: if(next_rep_id > 0) 6011: { 6011: static_cast(state)->state_id = next_rep_id - 1; 6011: } 6011: 6011: break; 6011: } 6011: p = p->next.p; 6011: } 6011: } 6011: if(!ok) 6011: { 6011: 6011: if(0 == this->m_pdata->m_status) 6011: this->m_pdata->m_status = boost::regex_constants::error_bad_pattern; 6011: 6011: 6011: 6011: this->m_pdata->m_expression = 0; 6011: this->m_pdata->m_expression_len = 0; 6011: 6011: 6011: 6011: if(0 == (this->flags() & regex_constants::no_except)) 6011: { 6011: std::string message = "Encountered a forward reference to a recursive sub-expression that does not exist."; 6011: boost::regex_error e(message, boost::regex_constants::error_bad_pattern, 0); 6011: e.raise(); 6011: } 6011: } 6011: } 6011: break; 6011: default: 6011: break; 6011: } 6011: state = state->next.p; 6011: } 6011: } 6011: 6011: template 6011: void basic_regex_creator::create_startmaps(re_syntax_base* state) 6011: { 6011: # 896 "/usr/include/boost/regex/v4/basic_regex_creator.hpp" 3 4 6011: bool l_icase = m_icase; 6011: std::vector > v; 6011: 6011: while(state) 6011: { 6011: switch(state->type) 6011: { 6011: case syntax_element_toggle_case: 6011: 6011: m_icase = static_cast(state)->icase; 6011: state = state->next.p; 6011: continue; 6011: case syntax_element_alt: 6011: case syntax_element_rep: 6011: case syntax_element_dot_rep: 6011: case syntax_element_char_rep: 6011: case syntax_element_short_set_rep: 6011: case syntax_element_long_set_rep: 6011: 6011: v.push_back(std::pair(m_icase, state)); 6011: state = state->next.p; 6011: break; 6011: case syntax_element_backstep: 6011: 6011: static_cast(state)->index 6011: = this->calculate_backstep(state->next.p); 6011: if(static_cast(state)->index < 0) 6011: { 6011: 6011: if(0 == this->m_pdata->m_status) 6011: this->m_pdata->m_status = boost::regex_constants::error_bad_pattern; 6011: 6011: 6011: 6011: this->m_pdata->m_expression = 0; 6011: this->m_pdata->m_expression_len = 0; 6011: 6011: 6011: 6011: if(0 == (this->flags() & regex_constants::no_except)) 6011: { 6011: std::string message = "Invalid lookbehind assertion encountered in the regular expression."; 6011: boost::regex_error e(message, boost::regex_constants::error_bad_pattern, 0); 6011: e.raise(); 6011: } 6011: } 6011: __attribute__((fallthrough)); 6011: default: 6011: state = state->next.p; 6011: } 6011: } 6011: 6011: 6011: while(v.size()) 6011: { 6011: 6011: if(m_has_recursions) 6011: m_recursion_checks.assign(1 + m_pdata->m_mark_count, 0u); 6011: 6011: const std::pair& p = v.back(); 6011: m_icase = p.first; 6011: state = p.second; 6011: v.pop_back(); 6011: 6011: 6011: m_bad_repeats = 0; 6011: create_startmap(state->next.p, static_cast(state)->_map, &static_cast(state)->can_be_null, mask_take); 6011: m_bad_repeats = 0; 6011: 6011: if(m_has_recursions) 6011: m_recursion_checks.assign(1 + m_pdata->m_mark_count, 0u); 6011: create_startmap(static_cast(state)->alt.p, static_cast(state)->_map, &static_cast(state)->can_be_null, mask_skip); 6011: 6011: state->type = this->get_repeat_type(state); 6011: } 6011: 6011: m_icase = l_icase; 6011: } 6011: 6011: template 6011: int basic_regex_creator::calculate_backstep(re_syntax_base* state) 6011: { 6011: typedef typename traits::char_class_type m_type; 6011: int result = 0; 6011: while(state) 6011: { 6011: switch(state->type) 6011: { 6011: case syntax_element_startmark: 6011: if((static_cast(state)->index == -1) 6011: || (static_cast(state)->index == -2)) 6011: { 6011: state = static_cast(state->next.p)->alt.p->next.p; 6011: continue; 6011: } 6011: else if(static_cast(state)->index == -3) 6011: { 6011: state = state->next.p->next.p; 6011: continue; 6011: } 6011: break; 6011: case syntax_element_endmark: 6011: if((static_cast(state)->index == -1) 6011: || (static_cast(state)->index == -2)) 6011: return result; 6011: break; 6011: case syntax_element_literal: 6011: result += static_cast(state)->length; 6011: break; 6011: case syntax_element_wild: 6011: case syntax_element_set: 6011: result += 1; 6011: break; 6011: case syntax_element_dot_rep: 6011: case syntax_element_char_rep: 6011: case syntax_element_short_set_rep: 6011: case syntax_element_backref: 6011: case syntax_element_rep: 6011: case syntax_element_combining: 6011: case syntax_element_long_set_rep: 6011: case syntax_element_backstep: 6011: { 6011: re_repeat* rep = static_cast(state); 6011: 6011: state->type = this->get_repeat_type(state); 6011: if((state->type == syntax_element_dot_rep) 6011: || (state->type == syntax_element_char_rep) 6011: || (state->type == syntax_element_short_set_rep)) 6011: { 6011: if(rep->max != rep->min) 6011: return -1; 6011: result += static_cast(rep->min); 6011: state = rep->alt.p; 6011: continue; 6011: } 6011: else if(state->type == syntax_element_long_set_rep) 6011: { 6011: (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__)); 6011: if(static_cast*>(rep->next.p)->singleton == 0) 6011: return -1; 6011: if(rep->max != rep->min) 6011: return -1; 6011: result += static_cast(rep->min); 6011: state = rep->alt.p; 6011: continue; 6011: } 6011: } 6011: return -1; 6011: case syntax_element_long_set: 6011: if(static_cast*>(state)->singleton == 0) 6011: return -1; 6011: result += 1; 6011: break; 6011: case syntax_element_jump: 6011: state = static_cast(state)->alt.p; 6011: continue; 6011: case syntax_element_alt: 6011: { 6011: int r1 = calculate_backstep(state->next.p); 6011: int r2 = calculate_backstep(static_cast(state)->alt.p); 6011: if((r1 < 0) || (r1 != r2)) 6011: return -1; 6011: return result + r1; 6011: } 6011: default: 6011: break; 6011: } 6011: state = state->next.p; 6011: } 6011: return -1; 6011: } 6011: 6011: template 6011: void basic_regex_creator::create_startmap(re_syntax_base* state, unsigned char* l_map, unsigned int* pnull, unsigned char mask) 6011: { 6011: int not_last_jump = 1; 6011: re_syntax_base* recursion_start = 0; 6011: int recursion_sub = 0; 6011: re_syntax_base* recursion_restart = 0; 6011: 6011: 6011: bool l_icase = m_icase; 6011: 6011: while(state) 6011: { 6011: switch(state->type) 6011: { 6011: case syntax_element_toggle_case: 6011: l_icase = static_cast(state)->icase; 6011: state = state->next.p; 6011: break; 6011: case syntax_element_literal: 6011: { 6011: 6011: 6011: if(l_map) 6011: { 6011: l_map[0] |= mask_init; 6011: charT first_char = *static_cast(static_cast(static_cast(state) + 1)); 6011: for(unsigned int i = 0; i < (1u << 8); ++i) 6011: { 6011: if(m_traits.translate(static_cast(i), l_icase) == first_char) 6011: l_map[i] |= mask; 6011: } 6011: } 6011: return; 6011: } 6011: case syntax_element_end_line: 6011: { 6011: 6011: if(l_map) 6011: { 6011: l_map[0] |= mask_init; 6011: l_map[static_cast('\n')] |= mask; 6011: l_map[static_cast('\r')] |= mask; 6011: l_map[static_cast('\f')] |= mask; 6011: l_map[0x85] |= mask; 6011: } 6011: 6011: if(pnull) 6011: create_startmap(state->next.p, 0, pnull, mask); 6011: return; 6011: } 6011: case syntax_element_recurse: 6011: { 6011: (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__)); 6011: recursion_sub = static_cast(static_cast(state)->alt.p)->index; 6011: if(m_recursion_checks[recursion_sub] & 1u) 6011: { 6011: 6011: if(0 == this->m_pdata->m_status) 6011: this->m_pdata->m_status = boost::regex_constants::error_bad_pattern; 6011: 6011: 6011: 6011: this->m_pdata->m_expression = 0; 6011: this->m_pdata->m_expression_len = 0; 6011: 6011: 6011: 6011: if(0 == (this->flags() & regex_constants::no_except)) 6011: { 6011: std::string message = "Encountered an infinite recursion."; 6011: boost::regex_error e(message, boost::regex_constants::error_bad_pattern, 0); 6011: e.raise(); 6011: } 6011: } 6011: else if(recursion_start == 0) 6011: { 6011: recursion_start = state; 6011: recursion_restart = state->next.p; 6011: state = static_cast(state)->alt.p; 6011: m_recursion_checks[recursion_sub] |= 1u; 6011: break; 6011: } 6011: m_recursion_checks[recursion_sub] |= 1u; 6011: 6011: __attribute__((fallthrough)); 6011: } 6011: case syntax_element_backref: 6011: 6011: if(pnull) 6011: *pnull |= mask; 6011: __attribute__((fallthrough)); 6011: case syntax_element_wild: 6011: { 6011: 6011: set_all_masks(l_map, mask); 6011: return; 6011: } 6011: case syntax_element_accept: 6011: case syntax_element_match: 6011: { 6011: 6011: set_all_masks(l_map, mask); 6011: if(pnull) 6011: *pnull |= mask; 6011: return; 6011: } 6011: case syntax_element_word_start: 6011: { 6011: 6011: create_startmap(state->next.p, l_map, pnull, mask); 6011: if(l_map) 6011: { 6011: l_map[0] |= mask_init; 6011: for(unsigned int i = 0; i < (1u << 8); ++i) 6011: { 6011: if(!m_traits.isctype(static_cast(i), m_word_mask)) 6011: l_map[i] &= static_cast(~mask); 6011: } 6011: } 6011: return; 6011: } 6011: case syntax_element_word_end: 6011: { 6011: 6011: create_startmap(state->next.p, l_map, pnull, mask); 6011: if(l_map) 6011: { 6011: l_map[0] |= mask_init; 6011: for(unsigned int i = 0; i < (1u << 8); ++i) 6011: { 6011: if(m_traits.isctype(static_cast(i), m_word_mask)) 6011: l_map[i] &= static_cast(~mask); 6011: } 6011: } 6011: return; 6011: } 6011: case syntax_element_buffer_end: 6011: { 6011: 6011: if(pnull) 6011: *pnull |= mask; 6011: return; 6011: } 6011: case syntax_element_long_set: 6011: if(l_map) 6011: { 6011: typedef typename traits::char_class_type m_type; 6011: if(static_cast*>(state)->singleton) 6011: { 6011: l_map[0] |= mask_init; 6011: for(unsigned int i = 0; i < (1u << 8); ++i) 6011: { 6011: charT c = static_cast(i); 6011: if(&c != re_is_set_member(&c, &c + 1, static_cast*>(state), *m_pdata, l_icase)) 6011: l_map[i] |= mask; 6011: } 6011: } 6011: else 6011: set_all_masks(l_map, mask); 6011: } 6011: return; 6011: case syntax_element_set: 6011: if(l_map) 6011: { 6011: l_map[0] |= mask_init; 6011: for(unsigned int i = 0; i < (1u << 8); ++i) 6011: { 6011: if(static_cast(state)->_map[ 6011: static_cast(m_traits.translate(static_cast(i), l_icase))]) 6011: l_map[i] |= mask; 6011: } 6011: } 6011: return; 6011: case syntax_element_jump: 6011: 6011: state = static_cast(state)->alt.p; 6011: not_last_jump = -1; 6011: break; 6011: case syntax_element_alt: 6011: case syntax_element_rep: 6011: case syntax_element_dot_rep: 6011: case syntax_element_char_rep: 6011: case syntax_element_short_set_rep: 6011: case syntax_element_long_set_rep: 6011: { 6011: re_alt* rep = static_cast(state); 6011: if(rep->_map[0] & mask_init) 6011: { 6011: if(l_map) 6011: { 6011: 6011: l_map[0] |= mask_init; 6011: for(unsigned int i = 0; i <= (0x7f * 2 + 1); ++i) 6011: { 6011: if(rep->_map[i] & mask_any) 6011: l_map[i] |= mask; 6011: } 6011: } 6011: if(pnull) 6011: { 6011: if(rep->can_be_null & mask_any) 6011: *pnull |= mask; 6011: } 6011: } 6011: else 6011: { 6011: 6011: 6011: if(is_bad_repeat(state)) 6011: { 6011: set_all_masks(l_map, mask); 6011: if(pnull) 6011: *pnull |= mask; 6011: return; 6011: } 6011: set_bad_repeat(state); 6011: create_startmap(state->next.p, l_map, pnull, mask); 6011: if((state->type == syntax_element_alt) 6011: || (static_cast(state)->min == 0) 6011: || (not_last_jump == 0)) 6011: create_startmap(rep->alt.p, l_map, pnull, mask); 6011: } 6011: } 6011: return; 6011: case syntax_element_soft_buffer_end: 6011: 6011: if(l_map) 6011: { 6011: l_map[0] |= mask_init; 6011: l_map[static_cast('\n')] |= mask; 6011: l_map[static_cast('\r')] |= mask; 6011: } 6011: if(pnull) 6011: *pnull |= mask; 6011: return; 6011: case syntax_element_endmark: 6011: 6011: if(static_cast(state)->index < 0) 6011: { 6011: 6011: set_all_masks(l_map, mask); 6011: if(pnull) 6011: *pnull |= mask; 6011: return; 6011: } 6011: else if(recursion_start && (recursion_sub != 0) && (recursion_sub == static_cast(state)->index)) 6011: { 6011: 6011: recursion_start = 0; 6011: state = recursion_restart; 6011: break; 6011: } 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: if(m_pdata->m_has_recursions && static_cast(state)->index) 6011: { 6011: bool ok = false; 6011: re_syntax_base* p = m_pdata->m_first_state; 6011: while(p) 6011: { 6011: if(p->type == syntax_element_recurse) 6011: { 6011: re_brace* p2 = static_cast(static_cast(p)->alt.p); 6011: if((p2->type == syntax_element_startmark) && (p2->index == static_cast(state)->index)) 6011: { 6011: ok = true; 6011: break; 6011: } 6011: } 6011: p = p->next.p; 6011: } 6011: if(ok && ((m_recursion_checks[static_cast(state)->index] & 2u) == 0)) 6011: { 6011: m_recursion_checks[static_cast(state)->index] |= 2u; 6011: create_startmap(p->next.p, l_map, pnull, mask); 6011: } 6011: } 6011: state = state->next.p; 6011: break; 6011: 6011: case syntax_element_commit: 6011: set_all_masks(l_map, mask); 6011: 6011: state = state->next.p; 6011: break; 6011: case syntax_element_startmark: 6011: 6011: if(static_cast(state)->index == -3) 6011: { 6011: state = state->next.p->next.p; 6011: break; 6011: } 6011: __attribute__((fallthrough)); 6011: default: 6011: state = state->next.p; 6011: } 6011: ++not_last_jump; 6011: } 6011: } 6011: 6011: template 6011: unsigned basic_regex_creator::get_restart_type(re_syntax_base* state) 6011: { 6011: 6011: 6011: 6011: while(state) 6011: { 6011: switch(state->type) 6011: { 6011: case syntax_element_startmark: 6011: case syntax_element_endmark: 6011: state = state->next.p; 6011: continue; 6011: case syntax_element_start_line: 6011: return regbase::restart_line; 6011: case syntax_element_word_start: 6011: return regbase::restart_word; 6011: case syntax_element_buffer_start: 6011: return regbase::restart_buf; 6011: case syntax_element_restart_continue: 6011: return regbase::restart_continue; 6011: default: 6011: state = 0; 6011: continue; 6011: } 6011: } 6011: return regbase::restart_any; 6011: } 6011: 6011: template 6011: void basic_regex_creator::set_all_masks(unsigned char* bits, unsigned char mask) 6011: { 6011: 6011: 6011: 6011: 6011: 6011: if(bits) 6011: { 6011: if(bits[0] == 0) 6011: (std::memset)(bits, mask, 1u << 8); 6011: else 6011: { 6011: for(unsigned i = 0; i < (1u << 8); ++i) 6011: bits[i] |= mask; 6011: } 6011: bits[0] |= mask_init; 6011: } 6011: } 6011: 6011: template 6011: bool basic_regex_creator::is_bad_repeat(re_syntax_base* pt) 6011: { 6011: switch(pt->type) 6011: { 6011: case syntax_element_rep: 6011: case syntax_element_dot_rep: 6011: case syntax_element_char_rep: 6011: case syntax_element_short_set_rep: 6011: case syntax_element_long_set_rep: 6011: { 6011: unsigned state_id = static_cast(pt)->state_id; 6011: if(state_id >= sizeof(m_bad_repeats) * 8) 6011: return true; 6011: static const boost::uintmax_t one = 1uL; 6011: return m_bad_repeats & (one << state_id); 6011: } 6011: default: 6011: return false; 6011: } 6011: } 6011: 6011: template 6011: void basic_regex_creator::set_bad_repeat(re_syntax_base* pt) 6011: { 6011: switch(pt->type) 6011: { 6011: case syntax_element_rep: 6011: case syntax_element_dot_rep: 6011: case syntax_element_char_rep: 6011: case syntax_element_short_set_rep: 6011: case syntax_element_long_set_rep: 6011: { 6011: unsigned state_id = static_cast(pt)->state_id; 6011: static const boost::uintmax_t one = 1uL; 6011: if(state_id <= sizeof(m_bad_repeats) * 8) 6011: m_bad_repeats |= (one << state_id); 6011: } 6011: break; 6011: default: 6011: break; 6011: } 6011: } 6011: 6011: template 6011: syntax_element_type basic_regex_creator::get_repeat_type(re_syntax_base* state) 6011: { 6011: typedef typename traits::char_class_type m_type; 6011: if(state->type == syntax_element_rep) 6011: { 6011: 6011: if(state->next.p->next.p->next.p == static_cast(state)->alt.p) 6011: { 6011: switch(state->next.p->type) 6011: { 6011: case re_detail_106501::syntax_element_wild: 6011: return re_detail_106501::syntax_element_dot_rep; 6011: case re_detail_106501::syntax_element_literal: 6011: return re_detail_106501::syntax_element_char_rep; 6011: case re_detail_106501::syntax_element_set: 6011: return re_detail_106501::syntax_element_short_set_rep; 6011: case re_detail_106501::syntax_element_long_set: 6011: if(static_cast*>(state->next.p)->singleton) 6011: return re_detail_106501::syntax_element_long_set_rep; 6011: break; 6011: default: 6011: break; 6011: } 6011: } 6011: } 6011: return state->type; 6011: } 6011: 6011: template 6011: void basic_regex_creator::probe_leading_repeat(re_syntax_base* state) 6011: { 6011: 6011: 6011: do 6011: { 6011: switch(state->type) 6011: { 6011: case syntax_element_startmark: 6011: if(static_cast(state)->index >= 0) 6011: { 6011: state = state->next.p; 6011: continue; 6011: } 6011: if((static_cast(state)->index == -1) 6011: || (static_cast(state)->index == -2)) 6011: { 6011: 6011: state = static_cast(state->next.p)->alt.p->next.p; 6011: continue; 6011: } 6011: if(static_cast(state)->index == -3) 6011: { 6011: 6011: state = state->next.p->next.p; 6011: continue; 6011: } 6011: return; 6011: case syntax_element_endmark: 6011: case syntax_element_start_line: 6011: case syntax_element_end_line: 6011: case syntax_element_word_boundary: 6011: case syntax_element_within_word: 6011: case syntax_element_word_start: 6011: case syntax_element_word_end: 6011: case syntax_element_buffer_start: 6011: case syntax_element_buffer_end: 6011: case syntax_element_restart_continue: 6011: state = state->next.p; 6011: break; 6011: case syntax_element_dot_rep: 6011: case syntax_element_char_rep: 6011: case syntax_element_short_set_rep: 6011: case syntax_element_long_set_rep: 6011: if(this->m_has_backrefs == 0) 6011: static_cast(state)->leading = true; 6011: __attribute__((fallthrough)); 6011: default: 6011: return; 6011: } 6011: }while(state); 6011: } 6011: 6011: 6011: } 6011: 6011: } 6011: # 71 "/usr/include/boost/regex/v4/regex.hpp" 2 3 4 6011: 6011: 6011: # 1 "/usr/include/boost/regex/v4/basic_regex_parser.hpp" 1 3 4 6011: # 33 "/usr/include/boost/regex/v4/basic_regex_parser.hpp" 3 4 6011: namespace boost{ 6011: namespace re_detail_106501{ 6011: 6011: 6011: 6011: 6011: 6011: 6011: inline boost::intmax_t umax(mpl::false_ const&) 6011: { 6011: 6011: return std::numeric_limits::is_specialized ? (std::numeric_limits::max)() : 0x7fffffff; 6011: } 6011: inline boost::intmax_t umax(mpl::true_ const&) 6011: { 6011: return (std::numeric_limits::max)(); 6011: } 6011: 6011: inline boost::intmax_t umax() 6011: { 6011: return umax(mpl::bool_::digits >= std::numeric_limits::digits>()); 6011: } 6011: 6011: template 6011: class basic_regex_parser : public basic_regex_creator 6011: { 6011: public: 6011: basic_regex_parser(regex_data* data); 6011: void parse(const charT* p1, const charT* p2, unsigned flags); 6011: void fail(regex_constants::error_type error_code, std::ptrdiff_t position); 6011: void fail(regex_constants::error_type error_code, std::ptrdiff_t position, std::string message, std::ptrdiff_t start_pos); 6011: void fail(regex_constants::error_type error_code, std::ptrdiff_t position, const std::string& message) 6011: { 6011: fail(error_code, position, message, position); 6011: } 6011: 6011: bool parse_all(); 6011: bool parse_basic(); 6011: bool parse_extended(); 6011: bool parse_literal(); 6011: bool parse_open_paren(); 6011: bool parse_basic_escape(); 6011: bool parse_extended_escape(); 6011: bool parse_match_any(); 6011: bool parse_repeat(std::size_t low = 0, std::size_t high = (std::numeric_limits::max)()); 6011: bool parse_repeat_range(bool isbasic); 6011: bool parse_alt(); 6011: bool parse_set(); 6011: bool parse_backref(); 6011: void parse_set_literal(basic_char_set& char_set); 6011: bool parse_inner_set(basic_char_set& char_set); 6011: bool parse_QE(); 6011: bool parse_perl_extension(); 6011: bool parse_perl_verb(); 6011: bool match_verb(const char*); 6011: bool add_emacs_code(bool negate); 6011: bool unwind_alts(std::ptrdiff_t last_paren_start); 6011: digraph get_next_set_literal(basic_char_set& char_set); 6011: charT unescape_character(); 6011: regex_constants::syntax_option_type parse_options(); 6011: 6011: private: 6011: typedef bool (basic_regex_parser::*parser_proc_type)(); 6011: typedef typename traits::string_type string_type; 6011: typedef typename traits::char_class_type char_class_type; 6011: parser_proc_type m_parser_proc; 6011: const charT* m_base; 6011: const charT* m_end; 6011: const charT* m_position; 6011: unsigned m_mark_count; 6011: int m_mark_reset; 6011: unsigned m_max_mark; 6011: std::ptrdiff_t m_paren_start; 6011: std::ptrdiff_t m_alt_insert_point; 6011: bool m_has_case_change; 6011: 6011: 6011: 6011: 6011: 6011: 6011: std::vector m_alt_jumps; 6011: 6011: 6011: basic_regex_parser& operator=(const basic_regex_parser&); 6011: basic_regex_parser(const basic_regex_parser&); 6011: }; 6011: 6011: template 6011: basic_regex_parser::basic_regex_parser(regex_data* data) 6011: : 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) 6011: { 6011: } 6011: 6011: template 6011: void basic_regex_parser::parse(const charT* p1, const charT* p2, unsigned l_flags) 6011: { 6011: 6011: this->init(l_flags); 6011: 6011: m_position = m_base = p1; 6011: m_end = p2; 6011: 6011: if((p1 == p2) && 6011: ( 6011: ((l_flags & regbase::main_option_type) != regbase::perl_syntax_group) 6011: || (l_flags & regbase::no_empty_expressions) 6011: ) 6011: ) 6011: { 6011: fail(regex_constants::error_empty, 0); 6011: return; 6011: } 6011: 6011: switch(l_flags & regbase::main_option_type) 6011: { 6011: case regbase::perl_syntax_group: 6011: { 6011: m_parser_proc = &basic_regex_parser::parse_extended; 6011: 6011: 6011: 6011: re_brace* br = static_cast(this->append_state(syntax_element_startmark, sizeof(re_brace))); 6011: br->index = 0; 6011: br->icase = this->flags() & regbase::icase; 6011: break; 6011: } 6011: case regbase::basic_syntax_group: 6011: m_parser_proc = &basic_regex_parser::parse_basic; 6011: break; 6011: case regbase::literal: 6011: m_parser_proc = &basic_regex_parser::parse_literal; 6011: break; 6011: default: 6011: 6011: 6011: fail(regex_constants::error_unknown, 0, "An invalid combination of regular expression syntax flags was used."); 6011: return; 6011: } 6011: 6011: 6011: bool result = parse_all(); 6011: 6011: 6011: 6011: unwind_alts(-1); 6011: 6011: this->flags(l_flags); 6011: 6011: 6011: if(!result) 6011: { 6011: fail(regex_constants::error_paren, ::boost::re_detail_106501::distance(m_base, m_position), "Found a closing ) with no corresponding openening parenthesis."); 6011: return; 6011: } 6011: 6011: if(this->m_pdata->m_status) 6011: return; 6011: 6011: this->m_pdata->m_mark_count = 1 + m_mark_count; 6011: this->finalize(p1, p2); 6011: } 6011: 6011: template 6011: void basic_regex_parser::fail(regex_constants::error_type error_code, std::ptrdiff_t position) 6011: { 6011: 6011: std::string message = this->m_pdata->m_ptraits->error_string(error_code); 6011: fail(error_code, position, message); 6011: } 6011: 6011: template 6011: void basic_regex_parser::fail(regex_constants::error_type error_code, std::ptrdiff_t position, std::string message, std::ptrdiff_t start_pos) 6011: { 6011: if(0 == this->m_pdata->m_status) 6011: this->m_pdata->m_status = error_code; 6011: m_position = m_end; 6011: 6011: 6011: 6011: 6011: 6011: if(start_pos == position) 6011: start_pos = (std::max)(static_cast(0), position - static_cast(10)); 6011: std::ptrdiff_t end_pos = (std::min)(position + static_cast(10), static_cast(m_end - m_base)); 6011: if(error_code != regex_constants::error_empty) 6011: { 6011: if((start_pos != 0) || (end_pos != (m_end - m_base))) 6011: message += " The error occurred while parsing the regular expression fragment: '"; 6011: else 6011: message += " The error occurred while parsing the regular expression: '"; 6011: if(start_pos != end_pos) 6011: { 6011: message += std::string(m_base + start_pos, m_base + position); 6011: message += ">>>HERE>>>"; 6011: message += std::string(m_base + position, m_base + end_pos); 6011: } 6011: message += "'."; 6011: } 6011: 6011: 6011: 6011: if(0 == (this->flags() & regex_constants::no_except)) 6011: { 6011: boost::regex_error e(message, error_code, position); 6011: e.raise(); 6011: } 6011: 6011: 6011: 6011: } 6011: 6011: template 6011: bool basic_regex_parser::parse_all() 6011: { 6011: bool result = true; 6011: while(result && (m_position != m_end)) 6011: { 6011: result = (this->*m_parser_proc)(); 6011: } 6011: return result; 6011: } 6011: 6011: 6011: 6011: 6011: 6011: template 6011: bool basic_regex_parser::parse_basic() 6011: { 6011: switch(this->m_traits.syntax_type(*m_position)) 6011: { 6011: case regex_constants::syntax_escape: 6011: return parse_basic_escape(); 6011: case regex_constants::syntax_dot: 6011: return parse_match_any(); 6011: case regex_constants::syntax_caret: 6011: ++m_position; 6011: this->append_state(syntax_element_start_line); 6011: break; 6011: case regex_constants::syntax_dollar: 6011: ++m_position; 6011: this->append_state(syntax_element_end_line); 6011: break; 6011: case regex_constants::syntax_star: 6011: if(!(this->m_last_state) || (this->m_last_state->type == syntax_element_start_line)) 6011: return parse_literal(); 6011: else 6011: { 6011: ++m_position; 6011: return parse_repeat(); 6011: } 6011: case regex_constants::syntax_plus: 6011: if(!(this->m_last_state) || (this->m_last_state->type == syntax_element_start_line) || !(this->flags() & regbase::emacs_ex)) 6011: return parse_literal(); 6011: else 6011: { 6011: ++m_position; 6011: return parse_repeat(1); 6011: } 6011: case regex_constants::syntax_question: 6011: if(!(this->m_last_state) || (this->m_last_state->type == syntax_element_start_line) || !(this->flags() & regbase::emacs_ex)) 6011: return parse_literal(); 6011: else 6011: { 6011: ++m_position; 6011: return parse_repeat(0, 1); 6011: } 6011: case regex_constants::syntax_open_set: 6011: return parse_set(); 6011: case regex_constants::syntax_newline: 6011: if(this->flags() & regbase::newline_alt) 6011: return parse_alt(); 6011: else 6011: return parse_literal(); 6011: default: 6011: return parse_literal(); 6011: } 6011: return true; 6011: } 6011: 6011: template 6011: bool basic_regex_parser::parse_extended() 6011: { 6011: bool result = true; 6011: switch(this->m_traits.syntax_type(*m_position)) 6011: { 6011: case regex_constants::syntax_open_mark: 6011: return parse_open_paren(); 6011: case regex_constants::syntax_close_mark: 6011: return false; 6011: case regex_constants::syntax_escape: 6011: return parse_extended_escape(); 6011: case regex_constants::syntax_dot: 6011: return parse_match_any(); 6011: case regex_constants::syntax_caret: 6011: ++m_position; 6011: this->append_state( 6011: (this->flags() & regex_constants::no_mod_m ? syntax_element_buffer_start : syntax_element_start_line)); 6011: break; 6011: case regex_constants::syntax_dollar: 6011: ++m_position; 6011: this->append_state( 6011: (this->flags() & regex_constants::no_mod_m ? syntax_element_buffer_end : syntax_element_end_line)); 6011: break; 6011: case regex_constants::syntax_star: 6011: if(m_position == this->m_base) 6011: { 6011: fail(regex_constants::error_badrepeat, 0, "The repeat operator \"*\" cannot start a regular expression."); 6011: return false; 6011: } 6011: ++m_position; 6011: return parse_repeat(); 6011: case regex_constants::syntax_question: 6011: if(m_position == this->m_base) 6011: { 6011: fail(regex_constants::error_badrepeat, 0, "The repeat operator \"?\" cannot start a regular expression."); 6011: return false; 6011: } 6011: ++m_position; 6011: return parse_repeat(0,1); 6011: case regex_constants::syntax_plus: 6011: if(m_position == this->m_base) 6011: { 6011: fail(regex_constants::error_badrepeat, 0, "The repeat operator \"+\" cannot start a regular expression."); 6011: return false; 6011: } 6011: ++m_position; 6011: return parse_repeat(1); 6011: case regex_constants::syntax_open_brace: 6011: ++m_position; 6011: return parse_repeat_range(false); 6011: case regex_constants::syntax_close_brace: 6011: if((this->flags() & regbase::no_perl_ex) == regbase::no_perl_ex) 6011: { 6011: fail(regex_constants::error_brace, this->m_position - this->m_base, "Found a closing repetition operator } with no corresponding {."); 6011: return false; 6011: } 6011: result = parse_literal(); 6011: break; 6011: case regex_constants::syntax_or: 6011: return parse_alt(); 6011: case regex_constants::syntax_open_set: 6011: return parse_set(); 6011: case regex_constants::syntax_newline: 6011: if(this->flags() & regbase::newline_alt) 6011: return parse_alt(); 6011: else 6011: return parse_literal(); 6011: case regex_constants::syntax_hash: 6011: 6011: 6011: 6011: 6011: if((this->flags() 6011: & (regbase::no_perl_ex|regbase::mod_x)) 6011: == regbase::mod_x) 6011: { 6011: while((m_position != m_end) && !is_separator(*m_position++)){} 6011: return true; 6011: } 6011: __attribute__((fallthrough)); 6011: default: 6011: result = parse_literal(); 6011: break; 6011: } 6011: return result; 6011: } 6011: 6011: 6011: 6011: 6011: template 6011: bool basic_regex_parser::parse_literal() 6011: { 6011: 6011: 6011: if( 6011: ((this->flags() 6011: & (regbase::main_option_type|regbase::mod_x|regbase::no_perl_ex)) 6011: != regbase::mod_x) 6011: || !this->m_traits.isctype(*m_position, this->m_mask_space)) 6011: this->append_literal(*m_position); 6011: ++m_position; 6011: return true; 6011: } 6011: 6011: template 6011: bool basic_regex_parser::parse_open_paren() 6011: { 6011: 6011: 6011: 6011: if(++m_position == m_end) 6011: { 6011: fail(regex_constants::error_paren, m_position - m_base); 6011: return false; 6011: } 6011: 6011: 6011: 6011: if( 6011: ((this->flags() & (regbase::main_option_type | regbase::no_perl_ex)) == 0) 6011: || ((this->flags() & (regbase::main_option_type | regbase::emacs_ex)) == (regbase::basic_syntax_group|regbase::emacs_ex)) 6011: ) 6011: { 6011: if(this->m_traits.syntax_type(*m_position) == regex_constants::syntax_question) 6011: return parse_perl_extension(); 6011: if(this->m_traits.syntax_type(*m_position) == regex_constants::syntax_star) 6011: return parse_perl_verb(); 6011: } 6011: 6011: 6011: 6011: unsigned markid = 0; 6011: if(0 == (this->flags() & regbase::nosubs)) 6011: { 6011: markid = ++m_mark_count; 6011: 6011: if(this->flags() & regbase::save_subexpression_location) 6011: this->m_pdata->m_subs.push_back(std::pair(std::distance(m_base, m_position) - 1, 0)); 6011: 6011: 6011: 6011: 6011: } 6011: re_brace* pb = static_cast(this->append_state(syntax_element_startmark, sizeof(re_brace))); 6011: pb->index = markid; 6011: pb->icase = this->flags() & regbase::icase; 6011: std::ptrdiff_t last_paren_start = this->getoffset(pb); 6011: 6011: std::ptrdiff_t last_alt_point = m_alt_insert_point; 6011: this->m_pdata->m_data.align(); 6011: m_alt_insert_point = this->m_pdata->m_data.size(); 6011: 6011: 6011: 6011: regex_constants::syntax_option_type opts = this->flags(); 6011: bool old_case_change = m_has_case_change; 6011: m_has_case_change = false; 6011: 6011: 6011: 6011: int mark_reset = m_mark_reset; 6011: m_mark_reset = -1; 6011: 6011: 6011: 6011: 6011: parse_all(); 6011: 6011: 6011: 6011: if(0 == unwind_alts(last_paren_start)) 6011: return false; 6011: 6011: 6011: 6011: if(m_has_case_change) 6011: { 6011: 6011: 6011: 6011: static_cast( 6011: this->append_state(syntax_element_toggle_case, sizeof(re_case)) 6011: )->icase = opts & regbase::icase; 6011: } 6011: this->flags(opts); 6011: m_has_case_change = old_case_change; 6011: 6011: 6011: 6011: m_mark_reset = mark_reset; 6011: 6011: 6011: 6011: if(m_position == m_end) 6011: { 6011: this->fail(regex_constants::error_paren, ::boost::re_detail_106501::distance(m_base, m_end)); 6011: return false; 6011: } 6011: if(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_close_mark) 6011: return false; 6011: 6011: if(markid && (this->flags() & regbase::save_subexpression_location)) 6011: this->m_pdata->m_subs.at(markid - 1).second = std::distance(m_base, m_position); 6011: 6011: 6011: 6011: 6011: ++m_position; 6011: 6011: 6011: 6011: pb = static_cast(this->append_state(syntax_element_endmark, sizeof(re_brace))); 6011: pb->index = markid; 6011: pb->icase = this->flags() & regbase::icase; 6011: this->m_paren_start = last_paren_start; 6011: 6011: 6011: 6011: this->m_alt_insert_point = last_alt_point; 6011: 6011: 6011: 6011: if((markid > 0) && (markid < sizeof(unsigned) * 8)) 6011: this->m_backrefs |= 1u << (markid - 1); 6011: 6011: return true; 6011: } 6011: 6011: template 6011: bool basic_regex_parser::parse_basic_escape() 6011: { 6011: if(++m_position == m_end) 6011: { 6011: fail(regex_constants::error_paren, m_position - m_base); 6011: return false; 6011: } 6011: bool result = true; 6011: switch(this->m_traits.escape_syntax_type(*m_position)) 6011: { 6011: case regex_constants::syntax_open_mark: 6011: return parse_open_paren(); 6011: case regex_constants::syntax_close_mark: 6011: return false; 6011: case regex_constants::syntax_plus: 6011: if(this->flags() & regex_constants::bk_plus_qm) 6011: { 6011: ++m_position; 6011: return parse_repeat(1); 6011: } 6011: else 6011: return parse_literal(); 6011: case regex_constants::syntax_question: 6011: if(this->flags() & regex_constants::bk_plus_qm) 6011: { 6011: ++m_position; 6011: return parse_repeat(0, 1); 6011: } 6011: else 6011: return parse_literal(); 6011: case regex_constants::syntax_open_brace: 6011: if(this->flags() & regbase::no_intervals) 6011: return parse_literal(); 6011: ++m_position; 6011: return parse_repeat_range(true); 6011: case regex_constants::syntax_close_brace: 6011: if(this->flags() & regbase::no_intervals) 6011: return parse_literal(); 6011: fail(regex_constants::error_brace, this->m_position - this->m_base, "Found a closing repetition operator } with no corresponding {."); 6011: return false; 6011: case regex_constants::syntax_or: 6011: if(this->flags() & regbase::bk_vbar) 6011: return parse_alt(); 6011: else 6011: result = parse_literal(); 6011: break; 6011: case regex_constants::syntax_digit: 6011: return parse_backref(); 6011: case regex_constants::escape_type_start_buffer: 6011: if(this->flags() & regbase::emacs_ex) 6011: { 6011: ++m_position; 6011: this->append_state(syntax_element_buffer_start); 6011: } 6011: else 6011: result = parse_literal(); 6011: break; 6011: case regex_constants::escape_type_end_buffer: 6011: if(this->flags() & regbase::emacs_ex) 6011: { 6011: ++m_position; 6011: this->append_state(syntax_element_buffer_end); 6011: } 6011: else 6011: result = parse_literal(); 6011: break; 6011: case regex_constants::escape_type_word_assert: 6011: if(this->flags() & regbase::emacs_ex) 6011: { 6011: ++m_position; 6011: this->append_state(syntax_element_word_boundary); 6011: } 6011: else 6011: result = parse_literal(); 6011: break; 6011: case regex_constants::escape_type_not_word_assert: 6011: if(this->flags() & regbase::emacs_ex) 6011: { 6011: ++m_position; 6011: this->append_state(syntax_element_within_word); 6011: } 6011: else 6011: result = parse_literal(); 6011: break; 6011: case regex_constants::escape_type_left_word: 6011: if(this->flags() & regbase::emacs_ex) 6011: { 6011: ++m_position; 6011: this->append_state(syntax_element_word_start); 6011: } 6011: else 6011: result = parse_literal(); 6011: break; 6011: case regex_constants::escape_type_right_word: 6011: if(this->flags() & regbase::emacs_ex) 6011: { 6011: ++m_position; 6011: this->append_state(syntax_element_word_end); 6011: } 6011: else 6011: result = parse_literal(); 6011: break; 6011: default: 6011: if(this->flags() & regbase::emacs_ex) 6011: { 6011: bool negate = true; 6011: switch(*m_position) 6011: { 6011: case 'w': 6011: negate = false; 6011: __attribute__((fallthrough)); 6011: case 'W': 6011: { 6011: basic_char_set char_set; 6011: if(negate) 6011: char_set.negate(); 6011: char_set.add_class(this->m_word_mask); 6011: if(0 == this->append_set(char_set)) 6011: { 6011: fail(regex_constants::error_ctype, m_position - m_base); 6011: return false; 6011: } 6011: ++m_position; 6011: return true; 6011: } 6011: case 's': 6011: negate = false; 6011: __attribute__((fallthrough)); 6011: case 'S': 6011: return add_emacs_code(negate); 6011: case 'c': 6011: case 'C': 6011: 6011: 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."); 6011: return false; 6011: default: 6011: break; 6011: } 6011: } 6011: result = parse_literal(); 6011: break; 6011: } 6011: return result; 6011: } 6011: 6011: template 6011: bool basic_regex_parser::parse_extended_escape() 6011: { 6011: ++m_position; 6011: if(m_position == m_end) 6011: { 6011: fail(regex_constants::error_escape, m_position - m_base, "Incomplete escape sequence found."); 6011: return false; 6011: } 6011: bool negate = false; 6011: switch(this->m_traits.escape_syntax_type(*m_position)) 6011: { 6011: case regex_constants::escape_type_not_class: 6011: negate = true; 6011: __attribute__((fallthrough)); 6011: case regex_constants::escape_type_class: 6011: { 6011: escape_type_class_jump: 6011: typedef typename traits::char_class_type m_type; 6011: m_type m = this->m_traits.lookup_classname(m_position, m_position+1); 6011: if(m != 0) 6011: { 6011: basic_char_set char_set; 6011: if(negate) 6011: char_set.negate(); 6011: char_set.add_class(m); 6011: if(0 == this->append_set(char_set)) 6011: { 6011: fail(regex_constants::error_ctype, m_position - m_base); 6011: return false; 6011: } 6011: ++m_position; 6011: return true; 6011: } 6011: 6011: 6011: 6011: this->append_literal(unescape_character()); 6011: break; 6011: } 6011: case regex_constants::syntax_digit: 6011: return parse_backref(); 6011: case regex_constants::escape_type_left_word: 6011: ++m_position; 6011: this->append_state(syntax_element_word_start); 6011: break; 6011: case regex_constants::escape_type_right_word: 6011: ++m_position; 6011: this->append_state(syntax_element_word_end); 6011: break; 6011: case regex_constants::escape_type_start_buffer: 6011: ++m_position; 6011: this->append_state(syntax_element_buffer_start); 6011: break; 6011: case regex_constants::escape_type_end_buffer: 6011: ++m_position; 6011: this->append_state(syntax_element_buffer_end); 6011: break; 6011: case regex_constants::escape_type_word_assert: 6011: ++m_position; 6011: this->append_state(syntax_element_word_boundary); 6011: break; 6011: case regex_constants::escape_type_not_word_assert: 6011: ++m_position; 6011: this->append_state(syntax_element_within_word); 6011: break; 6011: case regex_constants::escape_type_Z: 6011: ++m_position; 6011: this->append_state(syntax_element_soft_buffer_end); 6011: break; 6011: case regex_constants::escape_type_Q: 6011: return parse_QE(); 6011: case regex_constants::escape_type_C: 6011: return parse_match_any(); 6011: case regex_constants::escape_type_X: 6011: ++m_position; 6011: this->append_state(syntax_element_combining); 6011: break; 6011: case regex_constants::escape_type_G: 6011: ++m_position; 6011: this->append_state(syntax_element_restart_continue); 6011: break; 6011: case regex_constants::escape_type_not_property: 6011: negate = true; 6011: __attribute__((fallthrough)); 6011: case regex_constants::escape_type_property: 6011: { 6011: ++m_position; 6011: char_class_type m; 6011: if(m_position == m_end) 6011: { 6011: fail(regex_constants::error_escape, m_position - m_base, "Incomplete property escape found."); 6011: return false; 6011: } 6011: 6011: if(this->m_traits.syntax_type(*m_position) == regex_constants::syntax_open_brace) 6011: { 6011: const charT* base = m_position; 6011: 6011: while((m_position != m_end) && (this->m_traits.syntax_type(*m_position) != regex_constants::syntax_close_brace)) 6011: ++m_position; 6011: if(m_position == m_end) 6011: { 6011: fail(regex_constants::error_escape, m_position - m_base, "Closing } missing from property escape sequence."); 6011: return false; 6011: } 6011: m = this->m_traits.lookup_classname(++base, m_position++); 6011: } 6011: else 6011: { 6011: m = this->m_traits.lookup_classname(m_position, m_position+1); 6011: ++m_position; 6011: } 6011: if(m != 0) 6011: { 6011: basic_char_set char_set; 6011: if(negate) 6011: char_set.negate(); 6011: char_set.add_class(m); 6011: if(0 == this->append_set(char_set)) 6011: { 6011: fail(regex_constants::error_ctype, m_position - m_base); 6011: return false; 6011: } 6011: return true; 6011: } 6011: fail(regex_constants::error_ctype, m_position - m_base, "Escape sequence was neither a valid property nor a valid character class name."); 6011: return false; 6011: } 6011: case regex_constants::escape_type_reset_start_mark: 6011: if(0 == (this->flags() & (regbase::main_option_type | regbase::no_perl_ex))) 6011: { 6011: re_brace* pb = static_cast(this->append_state(syntax_element_startmark, sizeof(re_brace))); 6011: pb->index = -5; 6011: pb->icase = this->flags() & regbase::icase; 6011: this->m_pdata->m_data.align(); 6011: ++m_position; 6011: return true; 6011: } 6011: goto escape_type_class_jump; 6011: case regex_constants::escape_type_line_ending: 6011: if(0 == (this->flags() & (regbase::main_option_type | regbase::no_perl_ex))) 6011: { 6011: const charT* e = get_escape_R_string(); 6011: const charT* old_position = m_position; 6011: const charT* old_end = m_end; 6011: const charT* old_base = m_base; 6011: m_position = e; 6011: m_base = e; 6011: m_end = e + traits::length(e); 6011: bool r = parse_all(); 6011: m_position = ++old_position; 6011: m_end = old_end; 6011: m_base = old_base; 6011: return r; 6011: } 6011: goto escape_type_class_jump; 6011: case regex_constants::escape_type_extended_backref: 6011: if(0 == (this->flags() & (regbase::main_option_type | regbase::no_perl_ex))) 6011: { 6011: bool have_brace = false; 6011: bool negative = false; 6011: static const char* incomplete_message = "Incomplete \\g escape found."; 6011: if(++m_position == m_end) 6011: { 6011: fail(regex_constants::error_escape, m_position - m_base, incomplete_message); 6011: return false; 6011: } 6011: 6011: regex_constants::syntax_type syn = this->m_traits.syntax_type(*m_position); 6011: regex_constants::syntax_type syn_end = 0; 6011: if((syn == regex_constants::syntax_open_brace) 6011: || (syn == regex_constants::escape_type_left_word) 6011: || (syn == regex_constants::escape_type_end_buffer)) 6011: { 6011: if(++m_position == m_end) 6011: { 6011: fail(regex_constants::error_escape, m_position - m_base, incomplete_message); 6011: return false; 6011: } 6011: have_brace = true; 6011: switch(syn) 6011: { 6011: case regex_constants::syntax_open_brace: 6011: syn_end = regex_constants::syntax_close_brace; 6011: break; 6011: case regex_constants::escape_type_left_word: 6011: syn_end = regex_constants::escape_type_right_word; 6011: break; 6011: default: 6011: syn_end = regex_constants::escape_type_end_buffer; 6011: break; 6011: } 6011: } 6011: negative = (*m_position == static_cast('-')); 6011: if((negative) && (++m_position == m_end)) 6011: { 6011: fail(regex_constants::error_escape, m_position - m_base, incomplete_message); 6011: return false; 6011: } 6011: const charT* pc = m_position; 6011: boost::intmax_t i = this->m_traits.toi(pc, m_end, 10); 6011: if((i < 0) && syn_end) 6011: { 6011: 6011: const charT* base = m_position; 6011: while((m_position != m_end) && (this->m_traits.syntax_type(*m_position) != syn_end)) 6011: { 6011: ++m_position; 6011: } 6011: i = hash_value_from_capture_name(base, m_position); 6011: pc = m_position; 6011: } 6011: if(negative) 6011: i = 1 + m_mark_count - i; 6011: 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))))) 6011: { 6011: m_position = pc; 6011: re_brace* pb = static_cast(this->append_state(syntax_element_backref, sizeof(re_brace))); 6011: pb->index = i; 6011: pb->icase = this->flags() & regbase::icase; 6011: } 6011: else 6011: { 6011: fail(regex_constants::error_backref, m_position - m_base); 6011: return false; 6011: } 6011: m_position = pc; 6011: if(have_brace) 6011: { 6011: if((m_position == m_end) || (this->m_traits.syntax_type(*m_position) != syn_end)) 6011: { 6011: fail(regex_constants::error_escape, m_position - m_base, incomplete_message); 6011: return false; 6011: } 6011: ++m_position; 6011: } 6011: return true; 6011: } 6011: goto escape_type_class_jump; 6011: case regex_constants::escape_type_control_v: 6011: if(0 == (this->flags() & (regbase::main_option_type | regbase::no_perl_ex))) 6011: goto escape_type_class_jump; 6011: __attribute__((fallthrough)); 6011: default: 6011: this->append_literal(unescape_character()); 6011: break; 6011: } 6011: return true; 6011: } 6011: 6011: template 6011: bool basic_regex_parser::parse_match_any() 6011: { 6011: 6011: 6011: 6011: ++m_position; 6011: static_cast( 6011: this->append_state(syntax_element_wild, sizeof(re_dot)) 6011: )->mask = static_cast(this->flags() & regbase::no_mod_s 6011: ? re_detail_106501::force_not_newline 6011: : this->flags() & regbase::mod_s ? 6011: re_detail_106501::force_newline : re_detail_106501::dont_care); 6011: return true; 6011: } 6011: 6011: template 6011: bool basic_regex_parser::parse_repeat(std::size_t low, std::size_t high) 6011: { 6011: bool greedy = true; 6011: bool pocessive = false; 6011: std::size_t insert_point; 6011: 6011: 6011: 6011: if((m_position != m_end) 6011: && ( 6011: (0 == (this->flags() & (regbase::main_option_type | regbase::no_perl_ex))) 6011: || ((regbase::basic_syntax_group|regbase::emacs_ex) == (this->flags() & (regbase::main_option_type | regbase::emacs_ex))) 6011: ) 6011: ) 6011: { 6011: 6011: if(this->m_traits.syntax_type(*m_position) == regex_constants::syntax_question) 6011: { 6011: greedy = false; 6011: ++m_position; 6011: } 6011: 6011: if((m_position != m_end) 6011: && (0 == (this->flags() & regbase::main_option_type)) 6011: && (this->m_traits.syntax_type(*m_position) == regex_constants::syntax_plus)) 6011: { 6011: pocessive = true; 6011: ++m_position; 6011: } 6011: } 6011: if(0 == this->m_last_state) 6011: { 6011: fail(regex_constants::error_badrepeat, ::boost::re_detail_106501::distance(m_base, m_position), "Nothing to repeat."); 6011: return false; 6011: } 6011: if(this->m_last_state->type == syntax_element_endmark) 6011: { 6011: 6011: insert_point = this->m_paren_start; 6011: } 6011: else if((this->m_last_state->type == syntax_element_literal) && (static_cast(this->m_last_state)->length > 1)) 6011: { 6011: 6011: re_literal* lit = static_cast(this->m_last_state); 6011: charT c = (static_cast(static_cast(lit+1)))[lit->length - 1]; 6011: lit->length -= 1; 6011: 6011: lit = static_cast(this->append_state(syntax_element_literal, sizeof(re_literal) + sizeof(charT))); 6011: lit->length = 1; 6011: (static_cast(static_cast(lit+1)))[0] = c; 6011: insert_point = this->getoffset(this->m_last_state); 6011: } 6011: else 6011: { 6011: 6011: switch(this->m_last_state->type) 6011: { 6011: case syntax_element_start_line: 6011: case syntax_element_end_line: 6011: case syntax_element_word_boundary: 6011: case syntax_element_within_word: 6011: case syntax_element_word_start: 6011: case syntax_element_word_end: 6011: case syntax_element_buffer_start: 6011: case syntax_element_buffer_end: 6011: case syntax_element_alt: 6011: case syntax_element_soft_buffer_end: 6011: case syntax_element_restart_continue: 6011: case syntax_element_jump: 6011: case syntax_element_startmark: 6011: case syntax_element_backstep: 6011: 6011: fail(regex_constants::error_badrepeat, m_position - m_base); 6011: return false; 6011: default: 6011: 6011: break; 6011: } 6011: insert_point = this->getoffset(this->m_last_state); 6011: } 6011: 6011: 6011: 6011: re_repeat* rep = static_cast(this->insert_state(insert_point, syntax_element_rep, re_repeater_size)); 6011: rep->min = low; 6011: rep->max = high; 6011: rep->greedy = greedy; 6011: rep->leading = false; 6011: 6011: std::ptrdiff_t rep_off = this->getoffset(rep); 6011: 6011: re_jump* jmp = static_cast(this->append_state(syntax_element_jump, sizeof(re_jump))); 6011: jmp->alt.i = rep_off - this->getoffset(jmp); 6011: this->m_pdata->m_data.align(); 6011: 6011: rep = static_cast(this->getaddress(rep_off)); 6011: rep->alt.i = this->m_pdata->m_data.size() - rep_off; 6011: 6011: 6011: 6011: 6011: if(pocessive) 6011: { 6011: if(m_position != m_end) 6011: { 6011: 6011: 6011: 6011: 6011: switch(this->m_traits.syntax_type(*m_position)) 6011: { 6011: case regex_constants::syntax_star: 6011: case regex_constants::syntax_plus: 6011: case regex_constants::syntax_question: 6011: case regex_constants::syntax_open_brace: 6011: fail(regex_constants::error_badrepeat, m_position - m_base); 6011: return false; 6011: } 6011: } 6011: re_brace* pb = static_cast(this->insert_state(insert_point, syntax_element_startmark, sizeof(re_brace))); 6011: pb->index = -3; 6011: pb->icase = this->flags() & regbase::icase; 6011: jmp = static_cast(this->insert_state(insert_point + sizeof(re_brace), syntax_element_jump, sizeof(re_jump))); 6011: this->m_pdata->m_data.align(); 6011: jmp->alt.i = this->m_pdata->m_data.size() - this->getoffset(jmp); 6011: pb = static_cast(this->append_state(syntax_element_endmark, sizeof(re_brace))); 6011: pb->index = -3; 6011: pb->icase = this->flags() & regbase::icase; 6011: } 6011: return true; 6011: } 6011: 6011: template 6011: bool basic_regex_parser::parse_repeat_range(bool isbasic) 6011: { 6011: static const char* incomplete_message = "Missing } in quantified repetition."; 6011: 6011: 6011: 6011: std::size_t min, max; 6011: boost::intmax_t v; 6011: 6011: while((m_position != m_end) && this->m_traits.isctype(*m_position, this->m_mask_space)) 6011: ++m_position; 6011: if(this->m_position == this->m_end) 6011: { 6011: if(this->flags() & (regbase::main_option_type | regbase::no_perl_ex)) 6011: { 6011: fail(regex_constants::error_brace, this->m_position - this->m_base, incomplete_message); 6011: return false; 6011: } 6011: 6011: --m_position; 6011: while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_brace) --m_position; 6011: return parse_literal(); 6011: } 6011: 6011: v = this->m_traits.toi(m_position, m_end, 10); 6011: 6011: if((v < 0) || (v > umax())) 6011: { 6011: if(this->flags() & (regbase::main_option_type | regbase::no_perl_ex)) 6011: { 6011: fail(regex_constants::error_brace, this->m_position - this->m_base, incomplete_message); 6011: return false; 6011: } 6011: 6011: --m_position; 6011: while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_brace) --m_position; 6011: return parse_literal(); 6011: } 6011: while((m_position != m_end) && this->m_traits.isctype(*m_position, this->m_mask_space)) 6011: ++m_position; 6011: if(this->m_position == this->m_end) 6011: { 6011: if(this->flags() & (regbase::main_option_type | regbase::no_perl_ex)) 6011: { 6011: fail(regex_constants::error_brace, this->m_position - this->m_base, incomplete_message); 6011: return false; 6011: } 6011: 6011: --m_position; 6011: while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_brace) --m_position; 6011: return parse_literal(); 6011: } 6011: min = static_cast(v); 6011: 6011: if(this->m_traits.syntax_type(*m_position) == regex_constants::syntax_comma) 6011: { 6011: 6011: ++m_position; 6011: 6011: while((m_position != m_end) && this->m_traits.isctype(*m_position, this->m_mask_space)) 6011: ++m_position; 6011: if(this->m_position == this->m_end) 6011: { 6011: if(this->flags() & (regbase::main_option_type | regbase::no_perl_ex)) 6011: { 6011: fail(regex_constants::error_brace, this->m_position - this->m_base, incomplete_message); 6011: return false; 6011: } 6011: 6011: --m_position; 6011: while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_brace) --m_position; 6011: return parse_literal(); 6011: } 6011: 6011: v = this->m_traits.toi(m_position, m_end, 10); 6011: max = ((v >= 0) && (v < umax())) ? (std::size_t)v : (std::numeric_limits::max)(); 6011: } 6011: else 6011: { 6011: 6011: max = min; 6011: } 6011: 6011: while((m_position != m_end) && this->m_traits.isctype(*m_position, this->m_mask_space)) 6011: ++m_position; 6011: 6011: if(this->m_position == this->m_end) 6011: { 6011: if(this->flags() & (regbase::main_option_type | regbase::no_perl_ex)) 6011: { 6011: fail(regex_constants::error_brace, this->m_position - this->m_base, incomplete_message); 6011: return false; 6011: } 6011: 6011: --m_position; 6011: while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_brace) --m_position; 6011: return parse_literal(); 6011: } 6011: if(isbasic) 6011: { 6011: if(this->m_traits.syntax_type(*m_position) == regex_constants::syntax_escape) 6011: { 6011: ++m_position; 6011: if(this->m_position == this->m_end) 6011: { 6011: fail(regex_constants::error_brace, this->m_position - this->m_base, incomplete_message); 6011: return false; 6011: } 6011: } 6011: else 6011: { 6011: fail(regex_constants::error_brace, this->m_position - this->m_base, incomplete_message); 6011: return false; 6011: } 6011: } 6011: if(this->m_traits.syntax_type(*m_position) == regex_constants::syntax_close_brace) 6011: ++m_position; 6011: else 6011: { 6011: 6011: --m_position; 6011: while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_brace) --m_position; 6011: return parse_literal(); 6011: } 6011: 6011: 6011: 6011: if(min > max) 6011: { 6011: 6011: m_position -= 2; 6011: while(this->m_traits.isctype(*m_position, this->m_word_mask)) --m_position; 6011: ++m_position; 6011: fail(regex_constants::error_badbrace, m_position - m_base); 6011: return false; 6011: } 6011: return parse_repeat(min, max); 6011: } 6011: 6011: template 6011: bool basic_regex_parser::parse_alt() 6011: { 6011: 6011: 6011: 6011: 6011: if( 6011: ((this->m_last_state == 0) || (this->m_last_state->type == syntax_element_startmark)) 6011: && 6011: !( 6011: ((this->flags() & regbase::main_option_type) == regbase::perl_syntax_group) 6011: && 6011: ((this->flags() & regbase::no_empty_expressions) == 0) 6011: ) 6011: ) 6011: { 6011: fail(regex_constants::error_empty, this->m_position - this->m_base, "A regular expression cannot start with the alternation operator |."); 6011: return false; 6011: } 6011: 6011: 6011: 6011: if(m_max_mark < m_mark_count) 6011: m_max_mark = m_mark_count; 6011: if(m_mark_reset >= 0) 6011: m_mark_count = m_mark_reset; 6011: 6011: ++m_position; 6011: 6011: 6011: 6011: re_syntax_base* pj = this->append_state(re_detail_106501::syntax_element_jump, sizeof(re_jump)); 6011: std::ptrdiff_t jump_offset = this->getoffset(pj); 6011: 6011: 6011: 6011: re_alt* palt = static_cast(this->insert_state(this->m_alt_insert_point, syntax_element_alt, re_alt_size)); 6011: jump_offset += re_alt_size; 6011: this->m_pdata->m_data.align(); 6011: palt->alt.i = this->m_pdata->m_data.size() - this->getoffset(palt); 6011: 6011: 6011: 6011: 6011: this->m_alt_insert_point = this->m_pdata->m_data.size(); 6011: 6011: 6011: 6011: 6011: if(m_has_case_change) 6011: { 6011: static_cast( 6011: this->append_state(syntax_element_toggle_case, sizeof(re_case)) 6011: )->icase = this->m_icase; 6011: } 6011: 6011: 6011: 6011: 6011: 6011: 6011: m_alt_jumps.push_back(jump_offset); 6011: return true; 6011: } 6011: 6011: template 6011: bool basic_regex_parser::parse_set() 6011: { 6011: static const char* incomplete_message = "Character set declaration starting with [ terminated prematurely - either no ] was found or the set had no content."; 6011: ++m_position; 6011: if(m_position == m_end) 6011: { 6011: fail(regex_constants::error_brack, m_position - m_base, incomplete_message); 6011: return false; 6011: } 6011: basic_char_set char_set; 6011: 6011: const charT* base = m_position; 6011: const charT* item_base = m_position; 6011: 6011: while(m_position != m_end) 6011: { 6011: switch(this->m_traits.syntax_type(*m_position)) 6011: { 6011: case regex_constants::syntax_caret: 6011: if(m_position == base) 6011: { 6011: char_set.negate(); 6011: ++m_position; 6011: item_base = m_position; 6011: } 6011: else 6011: parse_set_literal(char_set); 6011: break; 6011: case regex_constants::syntax_close_set: 6011: if(m_position == item_base) 6011: { 6011: parse_set_literal(char_set); 6011: break; 6011: } 6011: else 6011: { 6011: ++m_position; 6011: if(0 == this->append_set(char_set)) 6011: { 6011: fail(regex_constants::error_ctype, m_position - m_base); 6011: return false; 6011: } 6011: } 6011: return true; 6011: case regex_constants::syntax_open_set: 6011: if(parse_inner_set(char_set)) 6011: break; 6011: return true; 6011: case regex_constants::syntax_escape: 6011: { 6011: 6011: 6011: 6011: 6011: ++m_position; 6011: if(this->m_traits.escape_syntax_type(*m_position) 6011: == regex_constants::escape_type_class) 6011: { 6011: char_class_type m = this->m_traits.lookup_classname(m_position, m_position+1); 6011: if(m != 0) 6011: { 6011: char_set.add_class(m); 6011: ++m_position; 6011: break; 6011: } 6011: } 6011: else if(this->m_traits.escape_syntax_type(*m_position) 6011: == regex_constants::escape_type_not_class) 6011: { 6011: 6011: char_class_type m = this->m_traits.lookup_classname(m_position, m_position+1); 6011: if(m != 0) 6011: { 6011: char_set.add_negated_class(m); 6011: ++m_position; 6011: break; 6011: } 6011: } 6011: 6011: --m_position; 6011: parse_set_literal(char_set); 6011: break; 6011: } 6011: default: 6011: parse_set_literal(char_set); 6011: break; 6011: } 6011: } 6011: return m_position != m_end; 6011: } 6011: 6011: template 6011: bool basic_regex_parser::parse_inner_set(basic_char_set& char_set) 6011: { 6011: static const char* incomplete_message = "Character class declaration starting with [ terminated prematurely - either no ] was found or the set had no content."; 6011: 6011: 6011: 6011: 6011: 6011: if(m_end == ++m_position) 6011: { 6011: fail(regex_constants::error_brack, m_position - m_base, incomplete_message); 6011: return false; 6011: } 6011: switch(this->m_traits.syntax_type(*m_position)) 6011: { 6011: case regex_constants::syntax_dot: 6011: 6011: 6011: 6011: --m_position; 6011: parse_set_literal(char_set); 6011: return true; 6011: case regex_constants::syntax_colon: 6011: { 6011: 6011: if((this->flags() & (regbase::main_option_type | regbase::no_char_classes)) 6011: == (regbase::basic_syntax_group | regbase::no_char_classes)) 6011: { 6011: --m_position; 6011: parse_set_literal(char_set); 6011: return true; 6011: } 6011: 6011: if(m_end == ++m_position) 6011: { 6011: fail(regex_constants::error_brack, m_position - m_base, incomplete_message); 6011: return false; 6011: } 6011: const charT* name_first = m_position; 6011: 6011: if(m_end == ++m_position) 6011: { 6011: fail(regex_constants::error_brack, m_position - m_base, incomplete_message); 6011: return false; 6011: } 6011: while((m_position != m_end) 6011: && (this->m_traits.syntax_type(*m_position) != regex_constants::syntax_colon)) 6011: ++m_position; 6011: const charT* name_last = m_position; 6011: if(m_end == m_position) 6011: { 6011: fail(regex_constants::error_brack, m_position - m_base, incomplete_message); 6011: return false; 6011: } 6011: if((m_end == ++m_position) 6011: || (this->m_traits.syntax_type(*m_position) != regex_constants::syntax_close_set)) 6011: { 6011: fail(regex_constants::error_brack, m_position - m_base, incomplete_message); 6011: return false; 6011: } 6011: 6011: 6011: 6011: bool negated = false; 6011: if(this->m_traits.syntax_type(*name_first) == regex_constants::syntax_caret) 6011: { 6011: ++name_first; 6011: negated = true; 6011: } 6011: typedef typename traits::char_class_type m_type; 6011: m_type m = this->m_traits.lookup_classname(name_first, name_last); 6011: if(m == 0) 6011: { 6011: if(char_set.empty() && (name_last - name_first == 1)) 6011: { 6011: 6011: ++m_position; 6011: if( (m_position != m_end) 6011: && (this->m_traits.syntax_type(*m_position) 6011: == regex_constants::syntax_close_set)) 6011: { 6011: if(this->m_traits.escape_syntax_type(*name_first) 6011: == regex_constants::escape_type_left_word) 6011: { 6011: ++m_position; 6011: this->append_state(syntax_element_word_start); 6011: return false; 6011: } 6011: if(this->m_traits.escape_syntax_type(*name_first) 6011: == regex_constants::escape_type_right_word) 6011: { 6011: ++m_position; 6011: this->append_state(syntax_element_word_end); 6011: return false; 6011: } 6011: } 6011: } 6011: fail(regex_constants::error_ctype, name_first - m_base); 6011: return false; 6011: } 6011: if(negated == false) 6011: char_set.add_class(m); 6011: else 6011: char_set.add_negated_class(m); 6011: ++m_position; 6011: break; 6011: } 6011: case regex_constants::syntax_equal: 6011: { 6011: 6011: if(m_end == ++m_position) 6011: { 6011: fail(regex_constants::error_brack, m_position - m_base, incomplete_message); 6011: return false; 6011: } 6011: const charT* name_first = m_position; 6011: 6011: if(m_end == ++m_position) 6011: { 6011: fail(regex_constants::error_brack, m_position - m_base, incomplete_message); 6011: return false; 6011: } 6011: while((m_position != m_end) 6011: && (this->m_traits.syntax_type(*m_position) != regex_constants::syntax_equal)) 6011: ++m_position; 6011: const charT* name_last = m_position; 6011: if(m_end == m_position) 6011: { 6011: fail(regex_constants::error_brack, m_position - m_base, incomplete_message); 6011: return false; 6011: } 6011: if((m_end == ++m_position) 6011: || (this->m_traits.syntax_type(*m_position) != regex_constants::syntax_close_set)) 6011: { 6011: fail(regex_constants::error_brack, m_position - m_base, incomplete_message); 6011: return false; 6011: } 6011: string_type m = this->m_traits.lookup_collatename(name_first, name_last); 6011: if((0 == m.size()) || (m.size() > 2)) 6011: { 6011: fail(regex_constants::error_collate, name_first - m_base); 6011: return false; 6011: } 6011: digraph d; 6011: d.first = m[0]; 6011: if(m.size() > 1) 6011: d.second = m[1]; 6011: else 6011: d.second = 0; 6011: char_set.add_equivalent(d); 6011: ++m_position; 6011: break; 6011: } 6011: default: 6011: --m_position; 6011: parse_set_literal(char_set); 6011: break; 6011: } 6011: return true; 6011: } 6011: 6011: template 6011: void basic_regex_parser::parse_set_literal(basic_char_set& char_set) 6011: { 6011: digraph start_range(get_next_set_literal(char_set)); 6011: if(m_end == m_position) 6011: { 6011: fail(regex_constants::error_brack, m_position - m_base); 6011: return; 6011: } 6011: if(this->m_traits.syntax_type(*m_position) == regex_constants::syntax_dash) 6011: { 6011: 6011: if(m_end == ++m_position) 6011: { 6011: fail(regex_constants::error_brack, m_position - m_base); 6011: return; 6011: } 6011: if(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_close_set) 6011: { 6011: digraph end_range = get_next_set_literal(char_set); 6011: char_set.add_range(start_range, end_range); 6011: if(this->m_traits.syntax_type(*m_position) == regex_constants::syntax_dash) 6011: { 6011: if(m_end == ++m_position) 6011: { 6011: fail(regex_constants::error_brack, m_position - m_base); 6011: return; 6011: } 6011: if(this->m_traits.syntax_type(*m_position) == regex_constants::syntax_close_set) 6011: { 6011: 6011: --m_position; 6011: return; 6011: } 6011: fail(regex_constants::error_range, m_position - m_base); 6011: return; 6011: } 6011: return; 6011: } 6011: --m_position; 6011: } 6011: char_set.add_single(start_range); 6011: } 6011: 6011: template 6011: digraph basic_regex_parser::get_next_set_literal(basic_char_set& char_set) 6011: { 6011: digraph result; 6011: switch(this->m_traits.syntax_type(*m_position)) 6011: { 6011: case regex_constants::syntax_dash: 6011: if(!char_set.empty()) 6011: { 6011: 6011: if((++m_position == m_end) || (this->m_traits.syntax_type(*m_position) != regex_constants::syntax_close_set)) 6011: { 6011: fail(regex_constants::error_range, m_position - m_base); 6011: return result; 6011: } 6011: --m_position; 6011: } 6011: result.first = *m_position++; 6011: return result; 6011: case regex_constants::syntax_escape: 6011: 6011: if(this->flags() & regex_constants::no_escape_in_lists) 6011: { 6011: result = *m_position++; 6011: break; 6011: } 6011: ++m_position; 6011: result = unescape_character(); 6011: break; 6011: case regex_constants::syntax_open_set: 6011: { 6011: if(m_end == ++m_position) 6011: { 6011: fail(regex_constants::error_collate, m_position - m_base); 6011: return result; 6011: } 6011: if(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_dot) 6011: { 6011: --m_position; 6011: result.first = *m_position; 6011: ++m_position; 6011: return result; 6011: } 6011: if(m_end == ++m_position) 6011: { 6011: fail(regex_constants::error_collate, m_position - m_base); 6011: return result; 6011: } 6011: const charT* name_first = m_position; 6011: 6011: if(m_end == ++m_position) 6011: { 6011: fail(regex_constants::error_collate, name_first - m_base); 6011: return result; 6011: } 6011: while((m_position != m_end) 6011: && (this->m_traits.syntax_type(*m_position) != regex_constants::syntax_dot)) 6011: ++m_position; 6011: const charT* name_last = m_position; 6011: if(m_end == m_position) 6011: { 6011: fail(regex_constants::error_collate, name_first - m_base); 6011: return result; 6011: } 6011: if((m_end == ++m_position) 6011: || (this->m_traits.syntax_type(*m_position) != regex_constants::syntax_close_set)) 6011: { 6011: fail(regex_constants::error_collate, name_first - m_base); 6011: return result; 6011: } 6011: ++m_position; 6011: string_type s = this->m_traits.lookup_collatename(name_first, name_last); 6011: if(s.empty() || (s.size() > 2)) 6011: { 6011: fail(regex_constants::error_collate, name_first - m_base); 6011: return result; 6011: } 6011: result.first = s[0]; 6011: if(s.size() > 1) 6011: result.second = s[1]; 6011: else 6011: result.second = 0; 6011: return result; 6011: } 6011: default: 6011: result = *m_position++; 6011: } 6011: return result; 6011: } 6011: 6011: 6011: 6011: 6011: template 6011: bool valid_value(charT, boost::intmax_t v, const mpl::true_&) 6011: { 6011: return (v >> (sizeof(charT) * 8)) == 0; 6011: } 6011: template 6011: bool valid_value(charT, boost::intmax_t, const mpl::false_&) 6011: { 6011: return true; 6011: } 6011: template 6011: bool valid_value(charT c, boost::intmax_t v) 6011: { 6011: return valid_value(c, v, mpl::bool_<(sizeof(charT) < sizeof(boost::intmax_t))>()); 6011: } 6011: 6011: template 6011: charT basic_regex_parser::unescape_character() 6011: { 6011: 6011: 6011: 6011: 6011: charT result(0); 6011: if(m_position == m_end) 6011: { 6011: fail(regex_constants::error_escape, m_position - m_base, "Escape sequence terminated prematurely."); 6011: return false; 6011: } 6011: switch(this->m_traits.escape_syntax_type(*m_position)) 6011: { 6011: case regex_constants::escape_type_control_a: 6011: result = charT('\a'); 6011: break; 6011: case regex_constants::escape_type_e: 6011: result = charT(27); 6011: break; 6011: case regex_constants::escape_type_control_f: 6011: result = charT('\f'); 6011: break; 6011: case regex_constants::escape_type_control_n: 6011: result = charT('\n'); 6011: break; 6011: case regex_constants::escape_type_control_r: 6011: result = charT('\r'); 6011: break; 6011: case regex_constants::escape_type_control_t: 6011: result = charT('\t'); 6011: break; 6011: case regex_constants::escape_type_control_v: 6011: result = charT('\v'); 6011: break; 6011: case regex_constants::escape_type_word_assert: 6011: result = charT('\b'); 6011: break; 6011: case regex_constants::escape_type_ascii_control: 6011: ++m_position; 6011: if(m_position == m_end) 6011: { 6011: 6011: --m_position; 6011: while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_escape) --m_position; 6011: fail(regex_constants::error_escape, m_position - m_base, "ASCII escape sequence terminated prematurely."); 6011: return result; 6011: } 6011: result = static_cast(*m_position % 32); 6011: break; 6011: case regex_constants::escape_type_hex: 6011: ++m_position; 6011: if(m_position == m_end) 6011: { 6011: 6011: --m_position; 6011: while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_escape) --m_position; 6011: fail(regex_constants::error_escape, m_position - m_base, "Hexadecimal escape sequence terminated prematurely."); 6011: return result; 6011: } 6011: 6011: if(this->m_traits.syntax_type(*m_position) == regex_constants::syntax_open_brace) 6011: { 6011: ++m_position; 6011: if(m_position == m_end) 6011: { 6011: 6011: --m_position; 6011: while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_escape) --m_position; 6011: fail(regex_constants::error_escape, m_position - m_base, "Missing } in hexadecimal escape sequence."); 6011: return result; 6011: } 6011: boost::intmax_t i = this->m_traits.toi(m_position, m_end, 16); 6011: if((m_position == m_end) 6011: || (i < 0) 6011: || ((std::numeric_limits::is_specialized) && (i > (boost::intmax_t)(std::numeric_limits::max)())) 6011: || (this->m_traits.syntax_type(*m_position) != regex_constants::syntax_close_brace)) 6011: { 6011: 6011: --m_position; 6011: while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_escape) --m_position; 6011: fail(regex_constants::error_badbrace, m_position - m_base, "Hexadecimal escape sequence was invalid."); 6011: return result; 6011: } 6011: ++m_position; 6011: result = charT(i); 6011: } 6011: else 6011: { 6011: std::ptrdiff_t len = (std::min)(static_cast(2), static_cast(m_end - m_position)); 6011: boost::intmax_t i = this->m_traits.toi(m_position, m_position + len, 16); 6011: if((i < 0) 6011: || !valid_value(charT(0), i)) 6011: { 6011: 6011: --m_position; 6011: while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_escape) --m_position; 6011: fail(regex_constants::error_escape, m_position - m_base, "Escape sequence did not encode a valid character."); 6011: return result; 6011: } 6011: result = charT(i); 6011: } 6011: return result; 6011: case regex_constants::syntax_digit: 6011: { 6011: 6011: 6011: std::ptrdiff_t len = (std::min)(::boost::re_detail_106501::distance(m_position, m_end), static_cast(4)); 6011: const charT* bp = m_position; 6011: boost::intmax_t val = this->m_traits.toi(bp, bp + 1, 8); 6011: if(val != 0) 6011: { 6011: 6011: --m_position; 6011: while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_escape) --m_position; 6011: 6011: fail(regex_constants::error_escape, m_position - m_base, "Invalid octal escape sequence."); 6011: return result; 6011: } 6011: val = this->m_traits.toi(m_position, m_position + len, 8); 6011: if((val < 0) || (val > (boost::intmax_t)(std::numeric_limits::max)())) 6011: { 6011: 6011: --m_position; 6011: while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_escape) --m_position; 6011: fail(regex_constants::error_escape, m_position - m_base, "Octal escape sequence is invalid."); 6011: return result; 6011: } 6011: return static_cast(val); 6011: } 6011: case regex_constants::escape_type_named_char: 6011: { 6011: ++m_position; 6011: if(m_position == m_end) 6011: { 6011: 6011: --m_position; 6011: while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_escape) --m_position; 6011: fail(regex_constants::error_escape, m_position - m_base); 6011: return false; 6011: } 6011: 6011: if(this->m_traits.syntax_type(*m_position) == regex_constants::syntax_open_brace) 6011: { 6011: const charT* base = m_position; 6011: 6011: while((m_position != m_end) && (this->m_traits.syntax_type(*m_position) != regex_constants::syntax_close_brace)) 6011: ++m_position; 6011: if(m_position == m_end) 6011: { 6011: 6011: --m_position; 6011: while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_escape) --m_position; 6011: fail(regex_constants::error_escape, m_position - m_base); 6011: return false; 6011: } 6011: string_type s = this->m_traits.lookup_collatename(++base, m_position++); 6011: if(s.empty()) 6011: { 6011: 6011: --m_position; 6011: while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_escape) --m_position; 6011: fail(regex_constants::error_collate, m_position - m_base); 6011: return false; 6011: } 6011: if(s.size() == 1) 6011: { 6011: return s[0]; 6011: } 6011: } 6011: 6011: 6011: --m_position; 6011: while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_escape) --m_position; 6011: fail(regex_constants::error_escape, m_position - m_base); 6011: return false; 6011: } 6011: default: 6011: result = *m_position; 6011: break; 6011: } 6011: ++m_position; 6011: return result; 6011: 6011: 6011: 6011: } 6011: 6011: template 6011: bool basic_regex_parser::parse_backref() 6011: { 6011: (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__)); 6011: const charT* pc = m_position; 6011: boost::intmax_t i = this->m_traits.toi(pc, pc + 1, 10); 6011: if((i == 0) || (((this->flags() & regbase::main_option_type) == regbase::perl_syntax_group) && (this->flags() & regbase::no_bk_refs))) 6011: { 6011: 6011: charT c = unescape_character(); 6011: this->append_literal(c); 6011: } 6011: else if((i > 0) && (this->m_backrefs & (1u << (i-1)))) 6011: { 6011: m_position = pc; 6011: re_brace* pb = static_cast(this->append_state(syntax_element_backref, sizeof(re_brace))); 6011: pb->index = i; 6011: pb->icase = this->flags() & regbase::icase; 6011: } 6011: else 6011: { 6011: 6011: --m_position; 6011: while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_escape) --m_position; 6011: fail(regex_constants::error_backref, m_position - m_base); 6011: return false; 6011: } 6011: return true; 6011: } 6011: 6011: template 6011: bool basic_regex_parser::parse_QE() 6011: { 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: ++m_position; 6011: const charT* start = m_position; 6011: const charT* end; 6011: do 6011: { 6011: while((m_position != m_end) 6011: && (this->m_traits.syntax_type(*m_position) != regex_constants::syntax_escape)) 6011: ++m_position; 6011: if(m_position == m_end) 6011: { 6011: 6011: end = m_position; 6011: break; 6011: } 6011: if(++m_position == m_end) 6011: { 6011: fail(regex_constants::error_escape, m_position - m_base, "Unterminated \\Q...\\E sequence."); 6011: return false; 6011: } 6011: 6011: if(this->m_traits.escape_syntax_type(*m_position) == regex_constants::escape_type_E) 6011: { 6011: ++m_position; 6011: end = m_position - 2; 6011: break; 6011: } 6011: 6011: }while(true); 6011: 6011: 6011: 6011: while(start != end) 6011: { 6011: this->append_literal(*start); 6011: ++start; 6011: } 6011: return true; 6011: 6011: 6011: 6011: } 6011: 6011: template 6011: bool basic_regex_parser::parse_perl_extension() 6011: { 6011: if(++m_position == m_end) 6011: { 6011: 6011: --m_position; 6011: while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position; 6011: fail(regex_constants::error_perl_extension, m_position - m_base); 6011: return false; 6011: } 6011: 6011: 6011: 6011: 6011: 6011: if(this->m_traits.syntax_type(*m_position) == regex_constants::syntax_hash) 6011: { 6011: while((m_position != m_end) 6011: && (this->m_traits.syntax_type(*m_position++) != regex_constants::syntax_close_mark)) 6011: {} 6011: return true; 6011: } 6011: 6011: 6011: 6011: int markid = 0; 6011: std::ptrdiff_t jump_offset = 0; 6011: re_brace* pb = static_cast(this->append_state(syntax_element_startmark, sizeof(re_brace))); 6011: pb->icase = this->flags() & regbase::icase; 6011: std::ptrdiff_t last_paren_start = this->getoffset(pb); 6011: 6011: std::ptrdiff_t last_alt_point = m_alt_insert_point; 6011: this->m_pdata->m_data.align(); 6011: m_alt_insert_point = this->m_pdata->m_data.size(); 6011: std::ptrdiff_t expected_alt_point = m_alt_insert_point; 6011: bool restore_flags = true; 6011: regex_constants::syntax_option_type old_flags = this->flags(); 6011: bool old_case_change = m_has_case_change; 6011: m_has_case_change = false; 6011: charT name_delim; 6011: int mark_reset = m_mark_reset; 6011: int max_mark = m_max_mark; 6011: m_mark_reset = -1; 6011: m_max_mark = m_mark_count; 6011: boost::intmax_t v; 6011: 6011: 6011: 6011: switch(this->m_traits.syntax_type(*m_position)) 6011: { 6011: case regex_constants::syntax_or: 6011: m_mark_reset = m_mark_count; 6011: __attribute__((fallthrough)); 6011: case regex_constants::syntax_colon: 6011: 6011: 6011: 6011: pb->index = markid = 0; 6011: ++m_position; 6011: break; 6011: case regex_constants::syntax_digit: 6011: { 6011: 6011: 6011: 6011: v = this->m_traits.toi(m_position, m_end, 10); 6011: if((v < 0) || (this->m_traits.syntax_type(*m_position) != regex_constants::syntax_close_mark)) 6011: { 6011: 6011: --m_position; 6011: while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position; 6011: fail(regex_constants::error_perl_extension, m_position - m_base, "The recursive sub-expression refers to an invalid marking group, or is unterminated."); 6011: return false; 6011: } 6011: insert_recursion: 6011: pb->index = markid = 0; 6011: re_recurse* pr = static_cast(this->append_state(syntax_element_recurse, sizeof(re_recurse))); 6011: pr->alt.i = v; 6011: pr->state_id = 0; 6011: static_cast( 6011: this->append_state(syntax_element_toggle_case, sizeof(re_case)) 6011: )->icase = this->flags() & regbase::icase; 6011: break; 6011: } 6011: case regex_constants::syntax_plus: 6011: 6011: 6011: 6011: ++m_position; 6011: v = this->m_traits.toi(m_position, m_end, 10); 6011: if((v <= 0) || (this->m_traits.syntax_type(*m_position) != regex_constants::syntax_close_mark)) 6011: { 6011: 6011: --m_position; 6011: while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position; 6011: fail(regex_constants::error_perl_extension, m_position - m_base, "An invalid or unterminated recursive sub-expression."); 6011: return false; 6011: } 6011: v += m_mark_count; 6011: goto insert_recursion; 6011: case regex_constants::syntax_dash: 6011: 6011: 6011: 6011: ++m_position; 6011: v = this->m_traits.toi(m_position, m_end, 10); 6011: if(v <= 0) 6011: { 6011: --m_position; 6011: 6011: goto option_group_jump; 6011: } 6011: v = m_mark_count + 1 - v; 6011: if(v <= 0) 6011: { 6011: 6011: --m_position; 6011: while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position; 6011: fail(regex_constants::error_perl_extension, m_position - m_base, "An invalid or unterminated recursive sub-expression."); 6011: return false; 6011: } 6011: goto insert_recursion; 6011: case regex_constants::syntax_equal: 6011: pb->index = markid = -1; 6011: ++m_position; 6011: jump_offset = this->getoffset(this->append_state(syntax_element_jump, sizeof(re_jump))); 6011: this->m_pdata->m_data.align(); 6011: m_alt_insert_point = this->m_pdata->m_data.size(); 6011: break; 6011: case regex_constants::syntax_not: 6011: pb->index = markid = -2; 6011: ++m_position; 6011: jump_offset = this->getoffset(this->append_state(syntax_element_jump, sizeof(re_jump))); 6011: this->m_pdata->m_data.align(); 6011: m_alt_insert_point = this->m_pdata->m_data.size(); 6011: break; 6011: case regex_constants::escape_type_left_word: 6011: { 6011: 6011: if(++m_position == m_end) 6011: { 6011: 6011: --m_position; 6011: while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position; 6011: fail(regex_constants::error_perl_extension, m_position - m_base); 6011: return false; 6011: } 6011: regex_constants::syntax_type t = this->m_traits.syntax_type(*m_position); 6011: if(t == regex_constants::syntax_not) 6011: pb->index = markid = -2; 6011: else if(t == regex_constants::syntax_equal) 6011: pb->index = markid = -1; 6011: else 6011: { 6011: 6011: name_delim = '>'; 6011: --m_position; 6011: goto named_capture_jump; 6011: } 6011: ++m_position; 6011: jump_offset = this->getoffset(this->append_state(syntax_element_jump, sizeof(re_jump))); 6011: this->append_state(syntax_element_backstep, sizeof(re_brace)); 6011: this->m_pdata->m_data.align(); 6011: m_alt_insert_point = this->m_pdata->m_data.size(); 6011: break; 6011: } 6011: case regex_constants::escape_type_right_word: 6011: 6011: 6011: 6011: pb->index = markid = -3; 6011: ++m_position; 6011: jump_offset = this->getoffset(this->append_state(syntax_element_jump, sizeof(re_jump))); 6011: this->m_pdata->m_data.align(); 6011: m_alt_insert_point = this->m_pdata->m_data.size(); 6011: break; 6011: case regex_constants::syntax_open_mark: 6011: { 6011: 6011: pb->index = markid = -4; 6011: if(++m_position == m_end) 6011: { 6011: 6011: --m_position; 6011: while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position; 6011: fail(regex_constants::error_perl_extension, m_position - m_base); 6011: return false; 6011: } 6011: v = this->m_traits.toi(m_position, m_end, 10); 6011: if(m_position == m_end) 6011: { 6011: 6011: --m_position; 6011: while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position; 6011: fail(regex_constants::error_perl_extension, m_position - m_base); 6011: return false; 6011: } 6011: if(*m_position == charT('R')) 6011: { 6011: if(++m_position == m_end) 6011: { 6011: 6011: --m_position; 6011: while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position; 6011: fail(regex_constants::error_perl_extension, m_position - m_base); 6011: return false; 6011: } 6011: if(*m_position == charT('&')) 6011: { 6011: const charT* base = ++m_position; 6011: while((m_position != m_end) && (this->m_traits.syntax_type(*m_position) != regex_constants::syntax_close_mark)) 6011: ++m_position; 6011: if(m_position == m_end) 6011: { 6011: 6011: --m_position; 6011: while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position; 6011: fail(regex_constants::error_perl_extension, m_position - m_base); 6011: return false; 6011: } 6011: v = -static_cast(hash_value_from_capture_name(base, m_position)); 6011: } 6011: else 6011: { 6011: v = -this->m_traits.toi(m_position, m_end, 10); 6011: } 6011: re_brace* br = static_cast(this->append_state(syntax_element_assert_backref, sizeof(re_brace))); 6011: br->index = v < 0 ? (v - 1) : 0; 6011: if(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_close_mark) 6011: { 6011: 6011: --m_position; 6011: while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position; 6011: fail(regex_constants::error_perl_extension, m_position - m_base); 6011: return false; 6011: } 6011: if(++m_position == m_end) 6011: { 6011: 6011: --m_position; 6011: while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position; 6011: fail(regex_constants::error_perl_extension, m_position - m_base); 6011: return false; 6011: } 6011: } 6011: else if((*m_position == charT('\'')) || (*m_position == charT('<'))) 6011: { 6011: const charT* base = ++m_position; 6011: while((m_position != m_end) && (*m_position != charT('>')) && (*m_position != charT('\''))) 6011: ++m_position; 6011: if(m_position == m_end) 6011: { 6011: 6011: --m_position; 6011: while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position; 6011: fail(regex_constants::error_perl_extension, m_position - m_base); 6011: return false; 6011: } 6011: v = static_cast(hash_value_from_capture_name(base, m_position)); 6011: re_brace* br = static_cast(this->append_state(syntax_element_assert_backref, sizeof(re_brace))); 6011: br->index = v; 6011: if(((*m_position != charT('>')) && (*m_position != charT('\''))) || (++m_position == m_end)) 6011: { 6011: 6011: --m_position; 6011: while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position; 6011: fail(regex_constants::error_perl_extension, m_position - m_base, "Unterminated named capture."); 6011: return false; 6011: } 6011: if(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_close_mark) 6011: { 6011: 6011: --m_position; 6011: while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position; 6011: fail(regex_constants::error_perl_extension, m_position - m_base); 6011: return false; 6011: } 6011: if(++m_position == m_end) 6011: { 6011: 6011: --m_position; 6011: while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position; 6011: fail(regex_constants::error_perl_extension, m_position - m_base); 6011: return false; 6011: } 6011: } 6011: else if(*m_position == charT('D')) 6011: { 6011: const char* def = "DEFINE"; 6011: while(*def && (m_position != m_end) && (*m_position == charT(*def))) 6011: ++m_position, ++def; 6011: if((m_position == m_end) || *def) 6011: { 6011: 6011: --m_position; 6011: while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position; 6011: fail(regex_constants::error_perl_extension, m_position - m_base); 6011: return false; 6011: } 6011: re_brace* br = static_cast(this->append_state(syntax_element_assert_backref, sizeof(re_brace))); 6011: br->index = 9999; 6011: if(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_close_mark) 6011: { 6011: 6011: --m_position; 6011: while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position; 6011: fail(regex_constants::error_perl_extension, m_position - m_base); 6011: return false; 6011: } 6011: if(++m_position == m_end) 6011: { 6011: 6011: --m_position; 6011: while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position; 6011: fail(regex_constants::error_perl_extension, m_position - m_base); 6011: return false; 6011: } 6011: } 6011: else if(v > 0) 6011: { 6011: re_brace* br = static_cast(this->append_state(syntax_element_assert_backref, sizeof(re_brace))); 6011: br->index = v; 6011: if(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_close_mark) 6011: { 6011: 6011: --m_position; 6011: while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position; 6011: fail(regex_constants::error_perl_extension, m_position - m_base); 6011: return false; 6011: } 6011: if(++m_position == m_end) 6011: { 6011: 6011: --m_position; 6011: while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position; 6011: fail(regex_constants::error_perl_extension, m_position - m_base); 6011: return false; 6011: } 6011: } 6011: else 6011: { 6011: 6011: if(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_question) 6011: { 6011: 6011: --m_position; 6011: while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position; 6011: fail(regex_constants::error_perl_extension, m_position - m_base); 6011: return false; 6011: } 6011: if(++m_position == m_end) 6011: { 6011: 6011: --m_position; 6011: while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position; 6011: fail(regex_constants::error_perl_extension, m_position - m_base); 6011: return false; 6011: } 6011: if(this->m_traits.syntax_type(*m_position) == regex_constants::escape_type_left_word) 6011: { 6011: if(++m_position == m_end) 6011: { 6011: 6011: --m_position; 6011: while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position; 6011: fail(regex_constants::error_perl_extension, m_position - m_base); 6011: return false; 6011: } 6011: if((this->m_traits.syntax_type(*m_position) != regex_constants::syntax_equal) 6011: && (this->m_traits.syntax_type(*m_position) != regex_constants::syntax_not)) 6011: { 6011: 6011: --m_position; 6011: while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position; 6011: fail(regex_constants::error_perl_extension, m_position - m_base); 6011: return false; 6011: } 6011: m_position -= 3; 6011: } 6011: else 6011: { 6011: if((this->m_traits.syntax_type(*m_position) != regex_constants::syntax_equal) 6011: && (this->m_traits.syntax_type(*m_position) != regex_constants::syntax_not)) 6011: { 6011: 6011: --m_position; 6011: while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position; 6011: fail(regex_constants::error_perl_extension, m_position - m_base); 6011: return false; 6011: } 6011: m_position -= 2; 6011: } 6011: } 6011: break; 6011: } 6011: case regex_constants::syntax_close_mark: 6011: 6011: --m_position; 6011: while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position; 6011: fail(regex_constants::error_perl_extension, m_position - m_base); 6011: return false; 6011: case regex_constants::escape_type_end_buffer: 6011: { 6011: name_delim = *m_position; 6011: named_capture_jump: 6011: markid = 0; 6011: if(0 == (this->flags() & regbase::nosubs)) 6011: { 6011: markid = ++m_mark_count; 6011: 6011: if(this->flags() & regbase::save_subexpression_location) 6011: this->m_pdata->m_subs.push_back(std::pair(std::distance(m_base, m_position) - 2, 0)); 6011: 6011: 6011: 6011: 6011: } 6011: pb->index = markid; 6011: const charT* base = ++m_position; 6011: if(m_position == m_end) 6011: { 6011: 6011: --m_position; 6011: while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position; 6011: fail(regex_constants::error_perl_extension, m_position - m_base); 6011: return false; 6011: } 6011: while((m_position != m_end) && (*m_position != name_delim)) 6011: ++m_position; 6011: if(m_position == m_end) 6011: { 6011: 6011: --m_position; 6011: while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position; 6011: fail(regex_constants::error_perl_extension, m_position - m_base); 6011: return false; 6011: } 6011: this->m_pdata->set_name(base, m_position, markid); 6011: ++m_position; 6011: break; 6011: } 6011: default: 6011: if(*m_position == charT('R')) 6011: { 6011: ++m_position; 6011: v = 0; 6011: if(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_close_mark) 6011: { 6011: 6011: --m_position; 6011: while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position; 6011: fail(regex_constants::error_perl_extension, m_position - m_base); 6011: return false; 6011: } 6011: goto insert_recursion; 6011: } 6011: if(*m_position == charT('&')) 6011: { 6011: ++m_position; 6011: const charT* base = m_position; 6011: while((m_position != m_end) && (this->m_traits.syntax_type(*m_position) != regex_constants::syntax_close_mark)) 6011: ++m_position; 6011: if(m_position == m_end) 6011: { 6011: 6011: --m_position; 6011: while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position; 6011: fail(regex_constants::error_perl_extension, m_position - m_base); 6011: return false; 6011: } 6011: v = static_cast(hash_value_from_capture_name(base, m_position)); 6011: goto insert_recursion; 6011: } 6011: if(*m_position == charT('P')) 6011: { 6011: ++m_position; 6011: if(m_position == m_end) 6011: { 6011: 6011: --m_position; 6011: while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position; 6011: fail(regex_constants::error_perl_extension, m_position - m_base); 6011: return false; 6011: } 6011: if(*m_position == charT('>')) 6011: { 6011: ++m_position; 6011: const charT* base = m_position; 6011: while((m_position != m_end) && (this->m_traits.syntax_type(*m_position) != regex_constants::syntax_close_mark)) 6011: ++m_position; 6011: if(m_position == m_end) 6011: { 6011: 6011: --m_position; 6011: while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position; 6011: fail(regex_constants::error_perl_extension, m_position - m_base); 6011: return false; 6011: } 6011: v = static_cast(hash_value_from_capture_name(base, m_position)); 6011: goto insert_recursion; 6011: } 6011: } 6011: 6011: 6011: 6011: option_group_jump: 6011: regex_constants::syntax_option_type opts = parse_options(); 6011: if(m_position == m_end) 6011: { 6011: 6011: --m_position; 6011: while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position; 6011: fail(regex_constants::error_perl_extension, m_position - m_base); 6011: return false; 6011: } 6011: 6011: m_has_case_change = ((opts & regbase::icase) != (this->flags() & regbase::icase)); 6011: pb->index = markid = 0; 6011: if(this->m_traits.syntax_type(*m_position) == regex_constants::syntax_close_mark) 6011: { 6011: 6011: this->flags(opts); 6011: restore_flags = false; 6011: old_case_change |= m_has_case_change; 6011: } 6011: else if(this->m_traits.syntax_type(*m_position) == regex_constants::syntax_colon) 6011: { 6011: 6011: this->flags(opts); 6011: ++m_position; 6011: } 6011: else 6011: { 6011: 6011: --m_position; 6011: while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position; 6011: fail(regex_constants::error_perl_extension, m_position - m_base); 6011: return false; 6011: } 6011: 6011: 6011: if(m_has_case_change) 6011: { 6011: static_cast( 6011: this->append_state(syntax_element_toggle_case, sizeof(re_case)) 6011: )->icase = opts & regbase::icase; 6011: } 6011: 6011: } 6011: 6011: 6011: 6011: 6011: parse_all(); 6011: 6011: 6011: 6011: if(0 == unwind_alts(last_paren_start)) 6011: { 6011: 6011: --m_position; 6011: while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position; 6011: fail(regex_constants::error_perl_extension, m_position - m_base, "Invalid alternation operators within (?...) block."); 6011: return false; 6011: } 6011: 6011: 6011: 6011: if(m_position == m_end) 6011: { 6011: 6011: --m_position; 6011: while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position; 6011: this->fail(regex_constants::error_paren, ::boost::re_detail_106501::distance(m_base, m_end)); 6011: return false; 6011: } 6011: (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__)); 6011: ++m_position; 6011: 6011: 6011: 6011: if(restore_flags) 6011: { 6011: 6011: if(m_has_case_change) 6011: { 6011: static_cast( 6011: this->append_state(syntax_element_toggle_case, sizeof(re_case)) 6011: )->icase = old_flags & regbase::icase; 6011: } 6011: this->flags(old_flags); 6011: } 6011: 6011: 6011: 6011: if(jump_offset) 6011: { 6011: this->m_pdata->m_data.align(); 6011: re_jump* jmp = static_cast(this->getaddress(jump_offset)); 6011: jmp->alt.i = this->m_pdata->m_data.size() - this->getoffset(jmp); 6011: if((this->m_last_state == jmp) && (markid != -2)) 6011: { 6011: 6011: 6011: 6011: 6011: --m_position; 6011: while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position; 6011: fail(regex_constants::error_perl_extension, m_position - m_base, "Invalid or empty zero width assertion."); 6011: return false; 6011: } 6011: } 6011: 6011: 6011: 6011: 6011: if(markid == -4) 6011: { 6011: re_syntax_base* b = this->getaddress(expected_alt_point); 6011: 6011: if(b->type != syntax_element_alt) 6011: { 6011: re_alt* alt = static_cast(this->insert_state(expected_alt_point, syntax_element_alt, sizeof(re_alt))); 6011: alt->alt.i = this->m_pdata->m_data.size() - this->getoffset(alt); 6011: } 6011: 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) 6011: { 6011: 6011: 6011: --m_position; 6011: while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position; 6011: fail(regex_constants::error_bad_pattern, m_position - m_base, "More than one alternation operator | was encountered inside a conditional expression."); 6011: return false; 6011: } 6011: else 6011: { 6011: 6011: b = this->getaddress(b->next.i, b); 6011: if((b->type == syntax_element_assert_backref) && (static_cast(b)->index == 9999)) 6011: { 6011: 6011: --m_position; 6011: while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position; 6011: fail(regex_constants::error_bad_pattern, m_position - m_base, "Alternation operators are not allowed inside a DEFINE block."); 6011: return false; 6011: } 6011: } 6011: 6011: b = this->getaddress(expected_alt_point); 6011: b = this->getaddress(static_cast(b)->next.i, b); 6011: if((b->type != syntax_element_assert_backref) 6011: && (b->type != syntax_element_startmark)) 6011: { 6011: 6011: --m_position; 6011: while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position; 6011: fail(regex_constants::error_badrepeat, m_position - m_base, "A repetition operator cannot be applied to a zero-width assertion."); 6011: return false; 6011: } 6011: } 6011: 6011: 6011: 6011: pb = static_cast(this->append_state(syntax_element_endmark, sizeof(re_brace))); 6011: pb->index = markid; 6011: pb->icase = this->flags() & regbase::icase; 6011: this->m_paren_start = last_paren_start; 6011: 6011: 6011: 6011: this->m_alt_insert_point = last_alt_point; 6011: 6011: 6011: 6011: m_has_case_change = old_case_change; 6011: 6011: 6011: 6011: if(m_max_mark > m_mark_count) 6011: { 6011: m_mark_count = m_max_mark; 6011: } 6011: m_mark_reset = mark_reset; 6011: m_max_mark = max_mark; 6011: 6011: 6011: if(markid > 0) 6011: { 6011: 6011: if(this->flags() & regbase::save_subexpression_location) 6011: this->m_pdata->m_subs.at(markid - 1).second = std::distance(m_base, m_position) - 1; 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: if(markid < (int)(sizeof(unsigned) * 8)) 6011: this->m_backrefs |= 1u << (markid - 1); 6011: } 6011: return true; 6011: } 6011: 6011: template 6011: bool basic_regex_parser::match_verb(const char* verb) 6011: { 6011: while(*verb) 6011: { 6011: if(static_cast(*verb) != *m_position) 6011: { 6011: while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position; 6011: fail(regex_constants::error_perl_extension, m_position - m_base); 6011: return false; 6011: } 6011: if(++m_position == m_end) 6011: { 6011: --m_position; 6011: while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position; 6011: fail(regex_constants::error_perl_extension, m_position - m_base); 6011: return false; 6011: } 6011: ++verb; 6011: } 6011: return true; 6011: } 6011: 6011: template 6011: bool basic_regex_parser::parse_perl_verb() 6011: { 6011: if(++m_position == m_end) 6011: { 6011: 6011: --m_position; 6011: while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position; 6011: fail(regex_constants::error_perl_extension, m_position - m_base); 6011: return false; 6011: } 6011: switch(*m_position) 6011: { 6011: case 'F': 6011: if(++m_position == m_end) 6011: { 6011: 6011: --m_position; 6011: while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position; 6011: fail(regex_constants::error_perl_extension, m_position - m_base); 6011: return false; 6011: } 6011: if((this->m_traits.syntax_type(*m_position) == regex_constants::syntax_close_mark) || match_verb("AIL")) 6011: { 6011: if((m_position == m_end) || (this->m_traits.syntax_type(*m_position) != regex_constants::syntax_close_mark)) 6011: { 6011: 6011: --m_position; 6011: while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position; 6011: fail(regex_constants::error_perl_extension, m_position - m_base); 6011: return false; 6011: } 6011: ++m_position; 6011: this->append_state(syntax_element_fail); 6011: return true; 6011: } 6011: break; 6011: case 'A': 6011: if(++m_position == m_end) 6011: { 6011: 6011: --m_position; 6011: while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position; 6011: fail(regex_constants::error_perl_extension, m_position - m_base); 6011: return false; 6011: } 6011: if(match_verb("CCEPT")) 6011: { 6011: if((m_position == m_end) || (this->m_traits.syntax_type(*m_position) != regex_constants::syntax_close_mark)) 6011: { 6011: 6011: --m_position; 6011: while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position; 6011: fail(regex_constants::error_perl_extension, m_position - m_base); 6011: return false; 6011: } 6011: ++m_position; 6011: this->append_state(syntax_element_accept); 6011: return true; 6011: } 6011: break; 6011: case 'C': 6011: if(++m_position == m_end) 6011: { 6011: 6011: --m_position; 6011: while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position; 6011: fail(regex_constants::error_perl_extension, m_position - m_base); 6011: return false; 6011: } 6011: if(match_verb("OMMIT")) 6011: { 6011: if((m_position == m_end) || (this->m_traits.syntax_type(*m_position) != regex_constants::syntax_close_mark)) 6011: { 6011: 6011: --m_position; 6011: while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position; 6011: fail(regex_constants::error_perl_extension, m_position - m_base); 6011: return false; 6011: } 6011: ++m_position; 6011: static_cast(this->append_state(syntax_element_commit, sizeof(re_commit)))->action = commit_commit; 6011: this->m_pdata->m_disable_match_any = true; 6011: return true; 6011: } 6011: break; 6011: case 'P': 6011: if(++m_position == m_end) 6011: { 6011: 6011: --m_position; 6011: while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position; 6011: fail(regex_constants::error_perl_extension, m_position - m_base); 6011: return false; 6011: } 6011: if(match_verb("RUNE")) 6011: { 6011: if((m_position == m_end) || (this->m_traits.syntax_type(*m_position) != regex_constants::syntax_close_mark)) 6011: { 6011: 6011: --m_position; 6011: while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position; 6011: fail(regex_constants::error_perl_extension, m_position - m_base); 6011: return false; 6011: } 6011: ++m_position; 6011: static_cast(this->append_state(syntax_element_commit, sizeof(re_commit)))->action = commit_prune; 6011: this->m_pdata->m_disable_match_any = true; 6011: return true; 6011: } 6011: break; 6011: case 'S': 6011: if(++m_position == m_end) 6011: { 6011: 6011: --m_position; 6011: while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position; 6011: fail(regex_constants::error_perl_extension, m_position - m_base); 6011: return false; 6011: } 6011: if(match_verb("KIP")) 6011: { 6011: if((m_position == m_end) || (this->m_traits.syntax_type(*m_position) != regex_constants::syntax_close_mark)) 6011: { 6011: 6011: --m_position; 6011: while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position; 6011: fail(regex_constants::error_perl_extension, m_position - m_base); 6011: return false; 6011: } 6011: ++m_position; 6011: static_cast(this->append_state(syntax_element_commit, sizeof(re_commit)))->action = commit_skip; 6011: this->m_pdata->m_disable_match_any = true; 6011: return true; 6011: } 6011: break; 6011: case 'T': 6011: if(++m_position == m_end) 6011: { 6011: 6011: --m_position; 6011: while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position; 6011: fail(regex_constants::error_perl_extension, m_position - m_base); 6011: return false; 6011: } 6011: if(match_verb("HEN")) 6011: { 6011: if((m_position == m_end) || (this->m_traits.syntax_type(*m_position) != regex_constants::syntax_close_mark)) 6011: { 6011: 6011: --m_position; 6011: while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position; 6011: fail(regex_constants::error_perl_extension, m_position - m_base); 6011: return false; 6011: } 6011: ++m_position; 6011: this->append_state(syntax_element_then); 6011: this->m_pdata->m_disable_match_any = true; 6011: return true; 6011: } 6011: break; 6011: } 6011: 6011: --m_position; 6011: while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position; 6011: fail(regex_constants::error_perl_extension, m_position - m_base); 6011: return false; 6011: } 6011: 6011: template 6011: bool basic_regex_parser::add_emacs_code(bool negate) 6011: { 6011: 6011: 6011: 6011: if(++m_position == m_end) 6011: { 6011: 6011: --m_position; 6011: while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_escape) --m_position; 6011: fail(regex_constants::error_escape, m_position - m_base); 6011: return false; 6011: } 6011: basic_char_set char_set; 6011: if(negate) 6011: char_set.negate(); 6011: 6011: static const charT s_punct[5] = { 'p', 'u', 'n', 'c', 't', }; 6011: 6011: switch(*m_position) 6011: { 6011: case 's': 6011: case ' ': 6011: char_set.add_class(this->m_mask_space); 6011: break; 6011: case 'w': 6011: char_set.add_class(this->m_word_mask); 6011: break; 6011: case '_': 6011: char_set.add_single(digraph(charT('$'))); 6011: char_set.add_single(digraph(charT('&'))); 6011: char_set.add_single(digraph(charT('*'))); 6011: char_set.add_single(digraph(charT('+'))); 6011: char_set.add_single(digraph(charT('-'))); 6011: char_set.add_single(digraph(charT('_'))); 6011: char_set.add_single(digraph(charT('<'))); 6011: char_set.add_single(digraph(charT('>'))); 6011: break; 6011: case '.': 6011: char_set.add_class(this->m_traits.lookup_classname(s_punct, s_punct+5)); 6011: break; 6011: case '(': 6011: char_set.add_single(digraph(charT('('))); 6011: char_set.add_single(digraph(charT('['))); 6011: char_set.add_single(digraph(charT('{'))); 6011: break; 6011: case ')': 6011: char_set.add_single(digraph(charT(')'))); 6011: char_set.add_single(digraph(charT(']'))); 6011: char_set.add_single(digraph(charT('}'))); 6011: break; 6011: case '"': 6011: char_set.add_single(digraph(charT('"'))); 6011: char_set.add_single(digraph(charT('\''))); 6011: char_set.add_single(digraph(charT('`'))); 6011: break; 6011: case '\'': 6011: char_set.add_single(digraph(charT('\''))); 6011: char_set.add_single(digraph(charT(','))); 6011: char_set.add_single(digraph(charT('#'))); 6011: break; 6011: case '<': 6011: char_set.add_single(digraph(charT(';'))); 6011: break; 6011: case '>': 6011: char_set.add_single(digraph(charT('\n'))); 6011: char_set.add_single(digraph(charT('\f'))); 6011: break; 6011: default: 6011: fail(regex_constants::error_ctype, m_position - m_base); 6011: return false; 6011: } 6011: if(0 == this->append_set(char_set)) 6011: { 6011: fail(regex_constants::error_ctype, m_position - m_base); 6011: return false; 6011: } 6011: ++m_position; 6011: return true; 6011: } 6011: 6011: template 6011: regex_constants::syntax_option_type basic_regex_parser::parse_options() 6011: { 6011: 6011: regex_constants::syntax_option_type f = this->flags(); 6011: bool breakout = false; 6011: do 6011: { 6011: switch(*m_position) 6011: { 6011: case 's': 6011: f |= regex_constants::mod_s; 6011: f &= ~regex_constants::no_mod_s; 6011: break; 6011: case 'm': 6011: f &= ~regex_constants::no_mod_m; 6011: break; 6011: case 'i': 6011: f |= regex_constants::icase; 6011: break; 6011: case 'x': 6011: f |= regex_constants::mod_x; 6011: break; 6011: default: 6011: breakout = true; 6011: continue; 6011: } 6011: if(++m_position == m_end) 6011: { 6011: 6011: --m_position; 6011: while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position; 6011: fail(regex_constants::error_paren, m_position - m_base); 6011: return false; 6011: } 6011: } 6011: while(!breakout); 6011: 6011: breakout = false; 6011: 6011: if(*m_position == static_cast('-')) 6011: { 6011: if(++m_position == m_end) 6011: { 6011: 6011: --m_position; 6011: while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position; 6011: fail(regex_constants::error_paren, m_position - m_base); 6011: return false; 6011: } 6011: do 6011: { 6011: switch(*m_position) 6011: { 6011: case 's': 6011: f &= ~regex_constants::mod_s; 6011: f |= regex_constants::no_mod_s; 6011: break; 6011: case 'm': 6011: f |= regex_constants::no_mod_m; 6011: break; 6011: case 'i': 6011: f &= ~regex_constants::icase; 6011: break; 6011: case 'x': 6011: f &= ~regex_constants::mod_x; 6011: break; 6011: default: 6011: breakout = true; 6011: continue; 6011: } 6011: if(++m_position == m_end) 6011: { 6011: 6011: --m_position; 6011: while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position; 6011: fail(regex_constants::error_paren, m_position - m_base); 6011: return false; 6011: } 6011: } 6011: while(!breakout); 6011: } 6011: return f; 6011: } 6011: 6011: template 6011: bool basic_regex_parser::unwind_alts(std::ptrdiff_t last_paren_start) 6011: { 6011: 6011: 6011: 6011: 6011: if((this->m_alt_insert_point == static_cast(this->m_pdata->m_data.size())) 6011: && m_alt_jumps.size() && (m_alt_jumps.back() > last_paren_start) 6011: && 6011: !( 6011: ((this->flags() & regbase::main_option_type) == regbase::perl_syntax_group) 6011: && 6011: ((this->flags() & regbase::no_empty_expressions) == 0) 6011: ) 6011: ) 6011: { 6011: fail(regex_constants::error_empty, this->m_position - this->m_base, "Can't terminate a sub-expression with an alternation operator |."); 6011: return false; 6011: } 6011: 6011: 6011: 6011: while(m_alt_jumps.size() && (m_alt_jumps.back() > last_paren_start)) 6011: { 6011: 6011: 6011: 6011: 6011: std::ptrdiff_t jump_offset = m_alt_jumps.back(); 6011: m_alt_jumps.pop_back(); 6011: this->m_pdata->m_data.align(); 6011: re_jump* jmp = static_cast(this->getaddress(jump_offset)); 6011: (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__)); 6011: jmp->alt.i = this->m_pdata->m_data.size() - jump_offset; 6011: } 6011: return true; 6011: } 6011: 6011: 6011: 6011: 6011: 6011: } 6011: } 6011: # 74 "/usr/include/boost/regex/v4/regex.hpp" 2 3 4 6011: 6011: 6011: # 1 "/usr/include/boost/regex/v4/sub_match.hpp" 1 3 4 6011: # 33 "/usr/include/boost/regex/v4/sub_match.hpp" 3 4 6011: namespace boost{ 6011: 6011: template 6011: struct sub_match : public std::pair 6011: { 6011: typedef typename re_detail_106501::regex_iterator_traits::value_type value_type; 6011: 6011: 6011: 6011: typedef typename re_detail_106501::regex_iterator_traits::difference_type difference_type; 6011: 6011: typedef BidiIterator iterator_type; 6011: typedef BidiIterator iterator; 6011: typedef BidiIterator const_iterator; 6011: 6011: bool matched; 6011: 6011: sub_match() : std::pair(), matched(false) {} 6011: sub_match(BidiIterator i) : std::pair(i, i), matched(false) {} 6011: 6011: 6011: 6011: template 6011: operator std::basic_string ()const 6011: { 6011: return matched ? std::basic_string(this->first, this->second) : std::basic_string(); 6011: } 6011: 6011: 6011: 6011: 6011: 6011: 6011: difference_type length()const 6011: { 6011: difference_type n = matched ? ::boost::re_detail_106501::distance((BidiIterator)this->first, (BidiIterator)this->second) : 0; 6011: return n; 6011: } 6011: std::basic_string str()const 6011: { 6011: std::basic_string result; 6011: if(matched) 6011: { 6011: std::size_t len = ::boost::re_detail_106501::distance((BidiIterator)this->first, (BidiIterator)this->second); 6011: result.reserve(len); 6011: BidiIterator i = this->first; 6011: while(i != this->second) 6011: { 6011: result.append(1, *i); 6011: ++i; 6011: } 6011: } 6011: return result; 6011: } 6011: int compare(const sub_match& s)const 6011: { 6011: if(matched != s.matched) 6011: return static_cast(matched) - static_cast(s.matched); 6011: return str().compare(s.str()); 6011: } 6011: int compare(const std::basic_string& s)const 6011: { 6011: return str().compare(s); 6011: } 6011: int compare(const value_type* p)const 6011: { 6011: return str().compare(p); 6011: } 6011: 6011: bool operator==(const sub_match& that)const 6011: { return compare(that) == 0; } 6011: bool operator !=(const sub_match& that)const 6011: { return compare(that) != 0; } 6011: bool operator<(const sub_match& that)const 6011: { return compare(that) < 0; } 6011: bool operator>(const sub_match& that)const 6011: { return compare(that) > 0; } 6011: bool operator<=(const sub_match& that)const 6011: { return compare(that) <= 0; } 6011: bool operator>=(const sub_match& that)const 6011: { return compare(that) >= 0; } 6011: # 139 "/usr/include/boost/regex/v4/sub_match.hpp" 3 4 6011: sub_match(const sub_match& that, bool 6011: 6011: 6011: 6011: = true 6011: ) 6011: : std::pair(that), 6011: matched(that.matched) 6011: { 6011: 6011: 6011: 6011: 6011: 6011: } 6011: sub_match& operator=(const sub_match& that) 6011: { 6011: this->first = that.first; 6011: this->second = that.second; 6011: matched = that.matched; 6011: 6011: 6011: 6011: 6011: return *this; 6011: } 6011: 6011: 6011: 6011: BidiIterator begin()const { return this->first; } 6011: BidiIterator end()const { return this->second; } 6011: # 187 "/usr/include/boost/regex/v4/sub_match.hpp" 3 4 6011: }; 6011: 6011: typedef sub_match csub_match; 6011: typedef sub_match ssub_match; 6011: 6011: typedef sub_match wcsub_match; 6011: typedef sub_match wssub_match; 6011: 6011: 6011: 6011: template 6011: inline bool operator == (const std::basic_string::value_type, traits, Allocator>& s, 6011: const sub_match& m) 6011: { return s.compare(m.str()) == 0; } 6011: template 6011: inline bool operator != (const std::basic_string::value_type, traits, Allocator>& s, 6011: const sub_match& m) 6011: { return s.compare(m.str()) != 0; } 6011: template 6011: inline bool operator < (const std::basic_string::value_type, traits, Allocator>& s, 6011: const sub_match& m) 6011: { return s.compare(m.str()) < 0; } 6011: template 6011: inline bool operator <= (const std::basic_string::value_type, traits, Allocator>& s, 6011: const sub_match& m) 6011: { return s.compare(m.str()) <= 0; } 6011: template 6011: inline bool operator >= (const std::basic_string::value_type, traits, Allocator>& s, 6011: const sub_match& m) 6011: { return s.compare(m.str()) >= 0; } 6011: template 6011: inline bool operator > (const std::basic_string::value_type, traits, Allocator>& s, 6011: const sub_match& m) 6011: { return s.compare(m.str()) > 0; } 6011: 6011: template 6011: inline bool operator == (const sub_match& m, 6011: const std::basic_string::value_type, traits, Allocator>& s) 6011: { return m.str().compare(s) == 0; } 6011: template 6011: inline bool operator != (const sub_match& m, 6011: const std::basic_string::value_type, traits, Allocator>& s) 6011: { return m.str().compare(s) != 0; } 6011: template 6011: inline bool operator < (const sub_match& m, 6011: const std::basic_string::value_type, traits, Allocator>& s) 6011: { return m.str().compare(s) < 0; } 6011: template 6011: inline bool operator > (const sub_match& m, 6011: const std::basic_string::value_type, traits, Allocator>& s) 6011: { return m.str().compare(s) > 0; } 6011: template 6011: inline bool operator <= (const sub_match& m, 6011: const std::basic_string::value_type, traits, Allocator>& s) 6011: { return m.str().compare(s) <= 0; } 6011: template 6011: inline bool operator >= (const sub_match& m, 6011: const std::basic_string::value_type, traits, Allocator>& s) 6011: { return m.str().compare(s) >= 0; } 6011: 6011: template 6011: inline bool operator == (const sub_match& m, 6011: typename re_detail_106501::regex_iterator_traits::value_type const* s) 6011: { return m.str().compare(s) == 0; } 6011: template 6011: inline bool operator != (const sub_match& m, 6011: typename re_detail_106501::regex_iterator_traits::value_type const* s) 6011: { return m.str().compare(s) != 0; } 6011: template 6011: inline bool operator > (const sub_match& m, 6011: typename re_detail_106501::regex_iterator_traits::value_type const* s) 6011: { return m.str().compare(s) > 0; } 6011: template 6011: inline bool operator < (const sub_match& m, 6011: typename re_detail_106501::regex_iterator_traits::value_type const* s) 6011: { return m.str().compare(s) < 0; } 6011: template 6011: inline bool operator >= (const sub_match& m, 6011: typename re_detail_106501::regex_iterator_traits::value_type const* s) 6011: { return m.str().compare(s) >= 0; } 6011: template 6011: inline bool operator <= (const sub_match& m, 6011: typename re_detail_106501::regex_iterator_traits::value_type const* s) 6011: { return m.str().compare(s) <= 0; } 6011: 6011: template 6011: inline bool operator == (typename re_detail_106501::regex_iterator_traits::value_type const* s, 6011: const sub_match& m) 6011: { return m.str().compare(s) == 0; } 6011: template 6011: inline bool operator != (typename re_detail_106501::regex_iterator_traits::value_type const* s, 6011: const sub_match& m) 6011: { return m.str().compare(s) != 0; } 6011: template 6011: inline bool operator < (typename re_detail_106501::regex_iterator_traits::value_type const* s, 6011: const sub_match& m) 6011: { return m.str().compare(s) > 0; } 6011: template 6011: inline bool operator > (typename re_detail_106501::regex_iterator_traits::value_type const* s, 6011: const sub_match& m) 6011: { return m.str().compare(s) < 0; } 6011: template 6011: inline bool operator <= (typename re_detail_106501::regex_iterator_traits::value_type const* s, 6011: const sub_match& m) 6011: { return m.str().compare(s) >= 0; } 6011: template 6011: inline bool operator >= (typename re_detail_106501::regex_iterator_traits::value_type const* s, 6011: const sub_match& m) 6011: { return m.str().compare(s) <= 0; } 6011: 6011: 6011: template 6011: inline bool operator == (const sub_match& m, 6011: typename re_detail_106501::regex_iterator_traits::value_type const& s) 6011: { return m.str().compare(0, m.length(), &s, 1) == 0; } 6011: template 6011: inline bool operator != (const sub_match& m, 6011: typename re_detail_106501::regex_iterator_traits::value_type const& s) 6011: { return m.str().compare(0, m.length(), &s, 1) != 0; } 6011: template 6011: inline bool operator > (const sub_match& m, 6011: typename re_detail_106501::regex_iterator_traits::value_type const& s) 6011: { return m.str().compare(0, m.length(), &s, 1) > 0; } 6011: template 6011: inline bool operator < (const sub_match& m, 6011: typename re_detail_106501::regex_iterator_traits::value_type const& s) 6011: { return m.str().compare(0, m.length(), &s, 1) < 0; } 6011: template 6011: inline bool operator >= (const sub_match& m, 6011: typename re_detail_106501::regex_iterator_traits::value_type const& s) 6011: { return m.str().compare(0, m.length(), &s, 1) >= 0; } 6011: template 6011: inline bool operator <= (const sub_match& m, 6011: typename re_detail_106501::regex_iterator_traits::value_type const& s) 6011: { return m.str().compare(0, m.length(), &s, 1) <= 0; } 6011: 6011: template 6011: inline bool operator == (typename re_detail_106501::regex_iterator_traits::value_type const& s, 6011: const sub_match& m) 6011: { return m.str().compare(0, m.length(), &s, 1) == 0; } 6011: template 6011: inline bool operator != (typename re_detail_106501::regex_iterator_traits::value_type const& s, 6011: const sub_match& m) 6011: { return m.str().compare(0, m.length(), &s, 1) != 0; } 6011: template 6011: inline bool operator < (typename re_detail_106501::regex_iterator_traits::value_type const& s, 6011: const sub_match& m) 6011: { return m.str().compare(0, m.length(), &s, 1) > 0; } 6011: template 6011: inline bool operator > (typename re_detail_106501::regex_iterator_traits::value_type const& s, 6011: const sub_match& m) 6011: { return m.str().compare(0, m.length(), &s, 1) < 0; } 6011: template 6011: inline bool operator <= (typename re_detail_106501::regex_iterator_traits::value_type const& s, 6011: const sub_match& m) 6011: { return m.str().compare(0, m.length(), &s, 1) >= 0; } 6011: template 6011: inline bool operator >= (typename re_detail_106501::regex_iterator_traits::value_type const& s, 6011: const sub_match& m) 6011: { return m.str().compare(0, m.length(), &s, 1) <= 0; } 6011: 6011: 6011: template 6011: inline std::basic_string::value_type, traits, Allocator> 6011: operator + (const std::basic_string::value_type, traits, Allocator>& s, 6011: const sub_match& m) 6011: { 6011: std::basic_string::value_type, traits, Allocator> result; 6011: result.reserve(s.size() + m.length() + 1); 6011: return result.append(s).append(m.first, m.second); 6011: } 6011: template 6011: inline std::basic_string::value_type, traits, Allocator> 6011: operator + (const sub_match& m, 6011: const std::basic_string::value_type, traits, Allocator>& s) 6011: { 6011: std::basic_string::value_type, traits, Allocator> result; 6011: result.reserve(s.size() + m.length() + 1); 6011: return result.append(m.first, m.second).append(s); 6011: } 6011: 6011: template 6011: inline std::basic_string::value_type> 6011: operator + (typename re_detail_106501::regex_iterator_traits::value_type const* s, 6011: const sub_match& m) 6011: { 6011: std::basic_string::value_type> result; 6011: result.reserve(std::char_traits::value_type>::length(s) + m.length() + 1); 6011: return result.append(s).append(m.first, m.second); 6011: } 6011: template 6011: inline std::basic_string::value_type> 6011: operator + (const sub_match& m, 6011: typename re_detail_106501::regex_iterator_traits::value_type const * s) 6011: { 6011: std::basic_string::value_type> result; 6011: result.reserve(std::char_traits::value_type>::length(s) + m.length() + 1); 6011: return result.append(m.first, m.second).append(s); 6011: } 6011: # 403 "/usr/include/boost/regex/v4/sub_match.hpp" 3 4 6011: template 6011: inline std::basic_string::value_type> 6011: operator + (typename re_detail_106501::regex_iterator_traits::value_type const& s, 6011: const sub_match& m) 6011: { 6011: std::basic_string::value_type> result; 6011: result.reserve(m.length() + 2); 6011: return result.append(1, s).append(m.first, m.second); 6011: } 6011: template 6011: inline std::basic_string::value_type> 6011: operator + (const sub_match& m, 6011: typename re_detail_106501::regex_iterator_traits::value_type const& s) 6011: { 6011: std::basic_string::value_type> result; 6011: result.reserve(m.length() + 2); 6011: return result.append(m.first, m.second).append(1, s); 6011: } 6011: template 6011: inline std::basic_string::value_type> 6011: operator + (const sub_match& m1, 6011: const sub_match& m2) 6011: { 6011: std::basic_string::value_type> result; 6011: result.reserve(m1.length() + m2.length() + 1); 6011: return result.append(m1.first, m1.second).append(m2.first, m2.second); 6011: } 6011: 6011: template 6011: std::basic_ostream& 6011: operator << (std::basic_ostream& os, 6011: const sub_match& s) 6011: { 6011: return (os << s.str()); 6011: } 6011: # 502 "/usr/include/boost/regex/v4/sub_match.hpp" 3 4 6011: } 6011: # 77 "/usr/include/boost/regex/v4/regex.hpp" 2 3 4 6011: 6011: 6011: # 1 "/usr/include/boost/regex/v4/regex_format.hpp" 1 3 4 6011: # 24 "/usr/include/boost/regex/v4/regex_format.hpp" 3 4 6011: # 1 "/usr/include/boost/type_traits/is_pointer.hpp" 1 3 4 6011: # 26 "/usr/include/boost/type_traits/is_pointer.hpp" 3 4 6011: namespace boost { 6011: 6011: 6011: 6011: 6011: template struct is_pointer : public false_type{}; 6011: template struct is_pointer : public true_type{}; 6011: template struct is_pointer : public true_type{}; 6011: template struct is_pointer : public true_type{}; 6011: template struct is_pointer : public true_type{}; 6011: # 45 "/usr/include/boost/type_traits/is_pointer.hpp" 3 4 6011: } 6011: # 25 "/usr/include/boost/regex/v4/regex_format.hpp" 2 3 4 6011: # 1 "/usr/include/boost/type_traits/is_function.hpp" 1 3 4 6011: # 14 "/usr/include/boost/type_traits/is_function.hpp" 3 4 6011: # 1 "/usr/include/boost/type_traits/is_reference.hpp" 1 3 4 6011: # 15 "/usr/include/boost/type_traits/is_reference.hpp" 3 4 6011: # 1 "/usr/include/boost/type_traits/is_lvalue_reference.hpp" 1 3 4 6011: # 26 "/usr/include/boost/type_traits/is_lvalue_reference.hpp" 3 4 6011: namespace boost { 6011: 6011: 6011: 6011: 6011: 6011: template struct is_lvalue_reference : public false_type{}; 6011: template struct is_lvalue_reference : public true_type{}; 6011: # 47 "/usr/include/boost/type_traits/is_lvalue_reference.hpp" 3 4 6011: } 6011: # 16 "/usr/include/boost/type_traits/is_reference.hpp" 2 3 4 6011: # 1 "/usr/include/boost/type_traits/is_rvalue_reference.hpp" 1 3 4 6011: # 15 "/usr/include/boost/type_traits/is_rvalue_reference.hpp" 3 4 6011: namespace boost { 6011: 6011: template struct is_rvalue_reference : public false_type {}; 6011: 6011: template struct is_rvalue_reference : public true_type {}; 6011: 6011: 6011: } 6011: # 17 "/usr/include/boost/type_traits/is_reference.hpp" 2 3 4 6011: 6011: namespace boost { 6011: 6011: template struct is_reference 6011: : public 6011: integral_constant< 6011: bool, 6011: ::boost::is_lvalue_reference::value || ::boost::is_rvalue_reference::value> 6011: {}; 6011: 6011: } 6011: # 15 "/usr/include/boost/type_traits/is_function.hpp" 2 3 4 6011: 6011: 6011: 6011: # 1 "/usr/include/boost/type_traits/detail/is_function_ptr_helper.hpp" 1 3 4 6011: # 34 "/usr/include/boost/type_traits/detail/is_function_ptr_helper.hpp" 3 4 6011: namespace boost { 6011: namespace type_traits { 6011: 6011: template 6011: struct is_function_ptr_helper 6011: { 6011: static const bool value = false; 6011: }; 6011: 6011: 6011: 6011: 6011: template 6011: struct is_function_ptr_helper { static const bool value = true; }; 6011: template 6011: struct is_function_ptr_helper { static const bool value = true; }; 6011: template 6011: struct is_function_ptr_helper { static const bool value = true; }; 6011: template 6011: struct is_function_ptr_helper { static const bool value = true; }; 6011: template 6011: struct is_function_ptr_helper { static const bool value = true; }; 6011: template 6011: struct is_function_ptr_helper { static const bool value = true; }; 6011: template 6011: struct is_function_ptr_helper { static const bool value = true; }; 6011: template 6011: struct is_function_ptr_helper { static const bool value = true; }; 6011: template 6011: struct is_function_ptr_helper { static const bool value = true; }; 6011: template 6011: struct is_function_ptr_helper { static const bool value = true; }; 6011: template 6011: struct is_function_ptr_helper { static const bool value = true; }; 6011: template 6011: struct is_function_ptr_helper { static const bool value = true; }; 6011: template 6011: struct is_function_ptr_helper { static const bool value = true; }; 6011: template 6011: struct is_function_ptr_helper { static const bool value = true; }; 6011: template 6011: struct is_function_ptr_helper { static const bool value = true; }; 6011: template 6011: struct is_function_ptr_helper { static const bool value = true; }; 6011: template 6011: struct is_function_ptr_helper { static const bool value = true; }; 6011: template 6011: struct is_function_ptr_helper { static const bool value = true; }; 6011: template 6011: struct is_function_ptr_helper { static const bool value = true; }; 6011: template 6011: struct is_function_ptr_helper { static const bool value = true; }; 6011: template 6011: struct is_function_ptr_helper { static const bool value = true; }; 6011: template 6011: struct is_function_ptr_helper { static const bool value = true; }; 6011: template 6011: struct is_function_ptr_helper { static const bool value = true; }; 6011: template 6011: struct is_function_ptr_helper { static const bool value = true; }; 6011: template 6011: struct is_function_ptr_helper { static const bool value = true; }; 6011: template 6011: struct is_function_ptr_helper { static const bool value = true; }; 6011: template 6011: struct is_function_ptr_helper { static const bool value = true; }; 6011: template 6011: struct is_function_ptr_helper { static const bool value = true; }; 6011: template 6011: struct is_function_ptr_helper { static const bool value = true; }; 6011: template 6011: struct is_function_ptr_helper { static const bool value = true; }; 6011: template 6011: struct is_function_ptr_helper { static const bool value = true; }; 6011: template 6011: struct is_function_ptr_helper { static const bool value = true; }; 6011: template 6011: struct is_function_ptr_helper { static const bool value = true; }; 6011: template 6011: struct is_function_ptr_helper { static const bool value = true; }; 6011: template 6011: struct is_function_ptr_helper { static const bool value = true; }; 6011: template 6011: struct is_function_ptr_helper { static const bool value = true; }; 6011: template 6011: struct is_function_ptr_helper { static const bool value = true; }; 6011: template 6011: struct is_function_ptr_helper { static const bool value = true; }; 6011: template 6011: struct is_function_ptr_helper { static const bool value = true; }; 6011: template 6011: struct is_function_ptr_helper { static const bool value = true; }; 6011: template 6011: struct is_function_ptr_helper { static const bool value = true; }; 6011: template 6011: struct is_function_ptr_helper { static const bool value = true; }; 6011: template 6011: struct is_function_ptr_helper { static const bool value = true; }; 6011: template 6011: struct is_function_ptr_helper { static const bool value = true; }; 6011: template 6011: struct is_function_ptr_helper { static const bool value = true; }; 6011: template 6011: struct is_function_ptr_helper { static const bool value = true; }; 6011: template 6011: struct is_function_ptr_helper { static const bool value = true; }; 6011: template 6011: struct is_function_ptr_helper { static const bool value = true; }; 6011: template 6011: struct is_function_ptr_helper { static const bool value = true; }; 6011: template 6011: struct is_function_ptr_helper { static const bool value = true; }; 6011: template 6011: struct is_function_ptr_helper { static const bool value = true; }; 6011: template 6011: struct is_function_ptr_helper { static const bool value = true; }; 6011: # 159 "/usr/include/boost/type_traits/detail/is_function_ptr_helper.hpp" 3 4 6011: } 6011: } 6011: # 19 "/usr/include/boost/type_traits/is_function.hpp" 2 3 4 6011: # 30 "/usr/include/boost/type_traits/is_function.hpp" 3 4 6011: namespace boost { 6011: 6011: 6011: 6011: namespace detail { 6011: 6011: 6011: template 6011: struct is_function_chooser 6011: { 6011: template< typename T > struct result_ 6011: : public false_type {}; 6011: }; 6011: 6011: template <> 6011: struct is_function_chooser 6011: { 6011: template< typename T > struct result_ 6011: : public ::boost::type_traits::is_function_ptr_helper {}; 6011: }; 6011: 6011: template 6011: struct is_function_impl 6011: : public is_function_chooser< ::boost::is_reference::value > 6011: ::template result_ 6011: { 6011: }; 6011: # 88 "/usr/include/boost/type_traits/is_function.hpp" 3 4 6011: } 6011: 6011: 6011: 6011: 6011: 6011: 6011: template struct is_function : integral_constant::value> {}; 6011: 6011: template struct is_function : public false_type {}; 6011: 6011: 6011: } 6011: # 26 "/usr/include/boost/regex/v4/regex_format.hpp" 2 3 4 6011: # 1 "/usr/include/boost/type_traits/is_class.hpp" 1 3 4 6011: # 31 "/usr/include/boost/type_traits/is_class.hpp" 3 4 6011: namespace boost { 6011: 6011: namespace detail { 6011: # 96 "/usr/include/boost/type_traits/is_class.hpp" 3 4 6011: template 6011: struct is_class_impl 6011: { 6011: static const bool value = __is_class(T); 6011: }; 6011: 6011: 6011: } 6011: 6011: template struct is_class : public integral_constant::value> {}; 6011: 6011: 6011: 6011: 6011: 6011: 6011: } 6011: # 27 "/usr/include/boost/regex/v4/regex_format.hpp" 2 3 4 6011: 6011: # 1 "/usr/include/boost/type_traits/is_convertible.hpp" 1 3 4 6011: # 18 "/usr/include/boost/type_traits/is_convertible.hpp" 3 4 6011: # 1 "/usr/include/boost/type_traits/detail/yes_no_type.hpp" 1 3 4 6011: # 14 "/usr/include/boost/type_traits/detail/yes_no_type.hpp" 3 4 6011: namespace boost { 6011: namespace type_traits { 6011: 6011: typedef char yes_type; 6011: struct no_type 6011: { 6011: char padding[8]; 6011: }; 6011: 6011: } 6011: } 6011: # 19 "/usr/include/boost/type_traits/is_convertible.hpp" 2 3 4 6011: 6011: # 1 "/usr/include/boost/type_traits/is_array.hpp" 1 3 4 6011: # 20 "/usr/include/boost/type_traits/is_array.hpp" 3 4 6011: namespace boost { 6011: 6011: 6011: 6011: 6011: template struct is_array : public false_type {}; 6011: 6011: template struct is_array : public true_type {}; 6011: template struct is_array : public true_type{}; 6011: template struct is_array : public true_type{}; 6011: template struct is_array : public true_type{}; 6011: 6011: template struct is_array : public true_type{}; 6011: template struct is_array : public true_type{}; 6011: template struct is_array : public true_type{}; 6011: template struct is_array : public true_type{}; 6011: 6011: 6011: 6011: 6011: 6011: } 6011: # 21 "/usr/include/boost/type_traits/is_convertible.hpp" 2 3 4 6011: # 1 "/usr/include/boost/type_traits/is_arithmetic.hpp" 1 3 4 6011: # 13 "/usr/include/boost/type_traits/is_arithmetic.hpp" 3 4 6011: # 1 "/usr/include/boost/type_traits/is_floating_point.hpp" 1 3 4 6011: # 13 "/usr/include/boost/type_traits/is_floating_point.hpp" 3 4 6011: namespace boost { 6011: 6011: 6011: template struct is_floating_point : public false_type{}; 6011: template struct is_floating_point : public is_floating_point{}; 6011: template struct is_floating_point : public is_floating_point{}; 6011: template struct is_floating_point : public is_floating_point{}; 6011: template<> struct is_floating_point : public true_type{}; 6011: template<> struct is_floating_point : public true_type{}; 6011: template<> struct is_floating_point : public true_type{}; 6011: 6011: 6011: 6011: 6011: 6011: } 6011: # 14 "/usr/include/boost/type_traits/is_arithmetic.hpp" 2 3 4 6011: 6011: namespace boost { 6011: 6011: template 6011: struct is_arithmetic : public integral_constant::value || is_floating_point::value> {}; 6011: 6011: } 6011: # 22 "/usr/include/boost/type_traits/is_convertible.hpp" 2 3 4 6011: # 1 "/usr/include/boost/type_traits/is_void.hpp" 1 3 4 6011: # 14 "/usr/include/boost/type_traits/is_void.hpp" 3 4 6011: namespace boost { 6011: 6011: template 6011: struct is_void : public false_type {}; 6011: 6011: template<> struct is_void : public true_type {}; 6011: template<> struct is_void : public true_type{}; 6011: template<> struct is_void : public true_type{}; 6011: template<> struct is_void : public true_type{}; 6011: 6011: } 6011: # 23 "/usr/include/boost/type_traits/is_convertible.hpp" 2 3 4 6011: 6011: # 1 "/usr/include/boost/type_traits/is_abstract.hpp" 1 3 4 6011: # 63 "/usr/include/boost/type_traits/is_abstract.hpp" 3 4 6011: namespace boost { 6011: 6011: namespace detail{ 6011: 6011: 6011: template 6011: struct is_abstract_imp 6011: { 6011: static const bool value = __is_abstract(T); 6011: }; 6011: # 140 "/usr/include/boost/type_traits/is_abstract.hpp" 3 4 6011: } 6011: 6011: 6011: template struct is_abstract : public integral_constant::value> {}; 6011: 6011: 6011: 6011: 6011: } 6011: # 25 "/usr/include/boost/type_traits/is_convertible.hpp" 2 3 4 6011: 6011: # 1 "/usr/include/boost/type_traits/add_lvalue_reference.hpp" 1 3 4 6011: # 9 "/usr/include/boost/type_traits/add_lvalue_reference.hpp" 3 4 6011: # 1 "/usr/include/boost/type_traits/add_reference.hpp" 1 3 4 6011: # 15 "/usr/include/boost/type_traits/add_reference.hpp" 3 4 6011: namespace boost { 6011: 6011: namespace detail { 6011: 6011: 6011: 6011: 6011: 6011: 6011: template 6011: struct add_reference_impl 6011: { 6011: typedef T& type; 6011: }; 6011: 6011: 6011: template 6011: struct add_reference_impl 6011: { 6011: typedef T&& type; 6011: }; 6011: 6011: 6011: } 6011: 6011: template struct add_reference 6011: { 6011: typedef typename boost::detail::add_reference_impl::type type; 6011: }; 6011: template struct add_reference 6011: { 6011: typedef T& type; 6011: }; 6011: 6011: 6011: template <> struct add_reference { typedef void type; }; 6011: 6011: template <> struct add_reference { typedef const void type; }; 6011: template <> struct add_reference { typedef const volatile void type; }; 6011: template <> struct add_reference { typedef volatile void type; }; 6011: 6011: 6011: 6011: 6011: template using add_reference_t = typename add_reference::type; 6011: 6011: 6011: 6011: 6011: } 6011: # 10 "/usr/include/boost/type_traits/add_lvalue_reference.hpp" 2 3 4 6011: 6011: namespace boost{ 6011: 6011: template struct add_lvalue_reference 6011: { 6011: typedef typename boost::add_reference::type type; 6011: }; 6011: 6011: 6011: template struct add_lvalue_reference 6011: { 6011: typedef T& type; 6011: }; 6011: 6011: 6011: 6011: 6011: template using add_lvalue_reference_t = typename add_lvalue_reference::type; 6011: 6011: 6011: 6011: } 6011: # 27 "/usr/include/boost/type_traits/is_convertible.hpp" 2 3 4 6011: # 1 "/usr/include/boost/type_traits/add_rvalue_reference.hpp" 1 3 4 6011: # 31 "/usr/include/boost/type_traits/add_rvalue_reference.hpp" 3 4 6011: namespace boost { 6011: 6011: namespace type_traits_detail { 6011: 6011: template 6011: struct add_rvalue_reference_helper 6011: { typedef T type; }; 6011: 6011: 6011: template 6011: struct add_rvalue_reference_helper 6011: { 6011: typedef T&& type; 6011: }; 6011: 6011: 6011: template 6011: struct add_rvalue_reference_imp 6011: { 6011: typedef typename boost::type_traits_detail::add_rvalue_reference_helper 6011: ::value == false && is_reference::value == false) >::type type; 6011: }; 6011: 6011: } 6011: 6011: template struct add_rvalue_reference 6011: { 6011: typedef typename boost::type_traits_detail::add_rvalue_reference_imp::type type; 6011: }; 6011: 6011: 6011: 6011: template using add_rvalue_reference_t = typename add_rvalue_reference::type; 6011: 6011: 6011: 6011: } 6011: # 28 "/usr/include/boost/type_traits/is_convertible.hpp" 2 3 4 6011: 6011: 6011: 6011: 6011: 6011: 6011: # 1 "/usr/include/boost/type_traits/declval.hpp" 1 3 4 6011: # 37 "/usr/include/boost/type_traits/declval.hpp" 3 4 6011: namespace boost { 6011: 6011: template 6011: typename add_rvalue_reference::type declval() noexcept; 6011: 6011: } 6011: # 35 "/usr/include/boost/type_traits/is_convertible.hpp" 2 3 4 6011: 6011: 6011: 6011: 6011: 6011: 6011: namespace boost { 6011: # 55 "/usr/include/boost/type_traits/is_convertible.hpp" 3 4 6011: namespace detail { 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: template 6011: struct or_helper 6011: { 6011: static const bool value = (A::value || B::value || C::value); 6011: }; 6011: 6011: template, boost::is_function, boost::is_array >::value> 6011: struct is_convertible_basic_impl 6011: { 6011: 6011: static const bool value = is_void::value; 6011: }; 6011: 6011: template 6011: class is_convertible_basic_impl 6011: { 6011: typedef char one; 6011: typedef int two; 6011: 6011: template 6011: static void test_aux(To1); 6011: 6011: template 6011: static decltype(test_aux(boost::declval()), one()) test(int); 6011: 6011: template 6011: static two test(...); 6011: 6011: public: 6011: static const bool value = sizeof(test(0)) == 1; 6011: }; 6011: # 358 "/usr/include/boost/type_traits/is_convertible.hpp" 3 4 6011: template 6011: struct is_convertible_impl 6011: { 6011: static const bool value = ( ::boost::detail::is_convertible_basic_impl::value && !::boost::is_array::value && !::boost::is_function::value); 6011: }; 6011: 6011: 6011: template 6011: struct is_convertible_impl_select 6011: { 6011: template 6011: struct rebind 6011: { 6011: typedef is_convertible_impl type; 6011: }; 6011: }; 6011: 6011: template <> 6011: struct is_convertible_impl_select 6011: { 6011: template 6011: struct rebind 6011: { 6011: typedef true_type type; 6011: }; 6011: }; 6011: 6011: template <> 6011: struct is_convertible_impl_select 6011: { 6011: template 6011: struct rebind 6011: { 6011: typedef false_type type; 6011: }; 6011: }; 6011: 6011: template <> 6011: struct is_convertible_impl_select 6011: { 6011: template 6011: struct rebind 6011: { 6011: typedef false_type type; 6011: }; 6011: }; 6011: 6011: template 6011: struct is_convertible_impl_dispatch_base 6011: { 6011: 6011: typedef is_convertible_impl_select< 6011: ::boost::is_arithmetic::value, 6011: ::boost::is_arithmetic::value, 6011: 6011: 6011: 6011: 6011: false 6011: 6011: > selector; 6011: 6011: 6011: 6011: typedef typename selector::template rebind isc_binder; 6011: typedef typename isc_binder::type type; 6011: }; 6011: 6011: template 6011: struct is_convertible_impl_dispatch 6011: : public is_convertible_impl_dispatch_base::type 6011: {}; 6011: # 438 "/usr/include/boost/type_traits/is_convertible.hpp" 3 4 6011: template <> struct is_convertible_impl_dispatch : public true_type{}; 6011: template <> struct is_convertible_impl_dispatch : public true_type{}; 6011: template <> struct is_convertible_impl_dispatch : public true_type{}; 6011: template <> struct is_convertible_impl_dispatch : public true_type{}; 6011: 6011: template <> struct is_convertible_impl_dispatch : public true_type{}; 6011: template <> struct is_convertible_impl_dispatch : public true_type{}; 6011: template <> struct is_convertible_impl_dispatch : public true_type{}; 6011: template <> struct is_convertible_impl_dispatch : public true_type{}; 6011: 6011: template <> struct is_convertible_impl_dispatch : public true_type{}; 6011: template <> struct is_convertible_impl_dispatch : public true_type{}; 6011: template <> struct is_convertible_impl_dispatch : public true_type{}; 6011: template <> struct is_convertible_impl_dispatch : public true_type{}; 6011: 6011: template <> struct is_convertible_impl_dispatch : public true_type{}; 6011: template <> struct is_convertible_impl_dispatch : public true_type{}; 6011: template <> struct is_convertible_impl_dispatch : public true_type{}; 6011: template <> struct is_convertible_impl_dispatch : public true_type{}; 6011: 6011: 6011: 6011: 6011: 6011: template struct is_convertible_impl_dispatch : public false_type{}; 6011: template struct is_convertible_impl_dispatch : public false_type{}; 6011: 6011: 6011: template struct is_convertible_impl_dispatch : public false_type{}; 6011: template struct is_convertible_impl_dispatch : public false_type{}; 6011: template struct is_convertible_impl_dispatch : public false_type{}; 6011: template struct is_convertible_impl_dispatch : public false_type{}; 6011: template struct is_convertible_impl_dispatch : public false_type{}; 6011: template struct is_convertible_impl_dispatch : public false_type{}; 6011: 6011: 6011: } 6011: 6011: template 6011: struct is_convertible : public integral_constant::value> {}; 6011: # 486 "/usr/include/boost/type_traits/is_convertible.hpp" 3 4 6011: } 6011: # 29 "/usr/include/boost/regex/v4/regex_format.hpp" 2 3 4 6011: # 1 "/usr/include/boost/type_traits/remove_pointer.hpp" 1 3 4 6011: # 19 "/usr/include/boost/type_traits/remove_pointer.hpp" 3 4 6011: namespace boost { 6011: # 67 "/usr/include/boost/type_traits/remove_pointer.hpp" 3 4 6011: template struct remove_pointer{ typedef T type; }; 6011: template struct remove_pointer{ typedef T type; }; 6011: template struct remove_pointer{ typedef T type; }; 6011: template struct remove_pointer{ typedef T type; }; 6011: template struct remove_pointer{ typedef T type; }; 6011: 6011: 6011: 6011: 6011: 6011: template using remove_pointer_t = typename remove_pointer::type; 6011: 6011: 6011: 6011: } 6011: # 30 "/usr/include/boost/regex/v4/regex_format.hpp" 2 3 4 6011: 6011: # 1 "/usr/include/boost/mpl/if.hpp" 1 3 4 6011: # 17 "/usr/include/boost/mpl/if.hpp" 3 4 6011: # 1 "/usr/include/boost/mpl/aux_/value_wknd.hpp" 1 3 4 6011: # 18 "/usr/include/boost/mpl/aux_/value_wknd.hpp" 3 4 6011: # 1 "/usr/include/boost/mpl/aux_/config/integral.hpp" 1 3 4 6011: # 19 "/usr/include/boost/mpl/aux_/value_wknd.hpp" 2 3 4 6011: # 73 "/usr/include/boost/mpl/aux_/value_wknd.hpp" 3 4 6011: namespace boost { namespace mpl { namespace aux { 6011: 6011: template< typename T > struct value_type_wknd 6011: { 6011: typedef typename T::value_type type; 6011: }; 6011: # 87 "/usr/include/boost/mpl/aux_/value_wknd.hpp" 3 4 6011: }}} 6011: # 18 "/usr/include/boost/mpl/if.hpp" 2 3 4 6011: 6011: 6011: # 1 "/usr/include/boost/mpl/aux_/lambda_support.hpp" 1 3 4 6011: # 21 "/usr/include/boost/mpl/if.hpp" 2 3 4 6011: 6011: 6011: 6011: 6011: namespace boost { namespace mpl { 6011: 6011: 6011: 6011: template< 6011: bool C 6011: , typename T1 6011: , typename T2 6011: > 6011: struct if_c 6011: { 6011: typedef T1 type; 6011: }; 6011: 6011: template< 6011: typename T1 6011: , typename T2 6011: > 6011: struct if_c 6011: { 6011: typedef T2 type; 6011: }; 6011: 6011: 6011: 6011: template< 6011: typename T1 = na 6011: , typename T2 = na 6011: , typename T3 = na 6011: > 6011: struct if_ 6011: { 6011: private: 6011: 6011: typedef if_c< 6011: 6011: 6011: 6011: static_cast(T1::value) 6011: 6011: , T2 6011: , T3 6011: > almost_type_; 6011: 6011: public: 6011: typedef typename almost_type_::type type; 6011: 6011: 6011: }; 6011: # 131 "/usr/include/boost/mpl/if.hpp" 3 4 6011: 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> { }; } 6011: 6011: }} 6011: # 32 "/usr/include/boost/regex/v4/regex_format.hpp" 2 3 4 6011: # 1 "/usr/include/boost/mpl/and.hpp" 1 3 4 6011: # 17 "/usr/include/boost/mpl/and.hpp" 3 4 6011: # 1 "/usr/include/boost/mpl/aux_/config/use_preprocessed.hpp" 1 3 4 6011: # 18 "/usr/include/boost/mpl/and.hpp" 2 3 4 6011: 6011: 6011: 6011: 6011: 6011: # 1 "/usr/include/boost/mpl/aux_/nested_type_wknd.hpp" 1 3 4 6011: # 25 "/usr/include/boost/mpl/aux_/nested_type_wknd.hpp" 3 4 6011: namespace boost { namespace mpl { namespace aux { 6011: template< typename T > struct nested_type_wknd 6011: : T::type 6011: { 6011: }; 6011: }}} 6011: # 24 "/usr/include/boost/mpl/and.hpp" 2 3 4 6011: # 42 "/usr/include/boost/mpl/and.hpp" 3 4 6011: # 1 "/usr/include/boost/mpl/aux_/include_preprocessed.hpp" 1 3 4 6011: # 16 "/usr/include/boost/mpl/aux_/include_preprocessed.hpp" 3 4 6011: # 1 "/usr/include/boost/mpl/aux_/config/compiler.hpp" 1 3 4 6011: # 17 "/usr/include/boost/mpl/aux_/include_preprocessed.hpp" 2 3 4 6011: 6011: 6011: 6011: # 1 "/usr/include/boost/preprocessor/stringize.hpp" 1 3 4 6011: # 21 "/usr/include/boost/mpl/aux_/include_preprocessed.hpp" 2 3 4 6011: # 37 "/usr/include/boost/mpl/aux_/include_preprocessed.hpp" 3 4 6011: # 1 "/usr/include/boost/mpl/aux_/preprocessed/gcc/and.hpp" 1 3 4 6011: # 12 "/usr/include/boost/mpl/aux_/preprocessed/gcc/and.hpp" 3 4 6011: namespace boost { namespace mpl { 6011: 6011: namespace aux { 6011: 6011: template< bool C_, typename T1, typename T2, typename T3, typename T4 > 6011: struct and_impl 6011: : false_ 6011: { 6011: }; 6011: 6011: template< typename T1, typename T2, typename T3, typename T4 > 6011: struct and_impl< true,T1,T2,T3,T4 > 6011: : and_impl< 6011: ::boost::mpl::aux::nested_type_wknd::value 6011: , T2, T3, T4 6011: , true_ 6011: > 6011: { 6011: }; 6011: 6011: template<> 6011: struct and_impl< 6011: true 6011: , true_, true_, true_, true_ 6011: > 6011: : true_ 6011: { 6011: }; 6011: 6011: } 6011: 6011: template< 6011: typename T1 = na 6011: , typename T2 = na 6011: , typename T3 = true_, typename T4 = true_, typename T5 = true_ 6011: > 6011: struct and_ 6011: 6011: : aux::and_impl< 6011: ::boost::mpl::aux::nested_type_wknd::value 6011: , T2, T3, T4, T5 6011: > 6011: 6011: { 6011: 6011: 6011: 6011: 6011: 6011: }; 6011: 6011: 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> { }; } 6011: 6011: 6011: 6011: 6011: 6011: }} 6011: # 38 "/usr/include/boost/mpl/aux_/include_preprocessed.hpp" 2 3 4 6011: # 43 "/usr/include/boost/mpl/and.hpp" 2 3 4 6011: # 33 "/usr/include/boost/regex/v4/regex_format.hpp" 2 3 4 6011: # 1 "/usr/include/boost/mpl/not.hpp" 1 3 4 6011: # 23 "/usr/include/boost/mpl/not.hpp" 3 4 6011: namespace boost { namespace mpl { 6011: 6011: namespace aux { 6011: 6011: template< long C_ > 6011: struct not_impl 6011: : bool_ 6011: { 6011: }; 6011: 6011: } 6011: 6011: 6011: template< 6011: typename T = na 6011: > 6011: struct not_ 6011: : aux::not_impl< 6011: ::boost::mpl::aux::nested_type_wknd::value 6011: > 6011: { 6011: 6011: }; 6011: 6011: 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> { }; } 6011: 6011: }} 6011: # 34 "/usr/include/boost/regex/v4/regex_format.hpp" 2 3 4 6011: 6011: 6011: 6011: # 1 "/usr/include/boost/ref.hpp" 1 3 4 6011: # 15 "/usr/include/boost/ref.hpp" 3 4 6011: # 1 "/usr/include/boost/core/ref.hpp" 1 3 4 6011: # 39 "/usr/include/boost/core/ref.hpp" 3 4 6011: namespace boost 6011: { 6011: # 59 "/usr/include/boost/core/ref.hpp" 3 4 6011: template class reference_wrapper 6011: { 6011: public: 6011: 6011: 6011: 6011: typedef T type; 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: inline __attribute__ ((__always_inline__)) explicit reference_wrapper(T& t): t_(boost::addressof(t)) {} 6011: # 85 "/usr/include/boost/core/ref.hpp" 3 4 6011: reference_wrapper(T&& t) = delete; 6011: public: 6011: 6011: 6011: 6011: 6011: 6011: 6011: inline __attribute__ ((__always_inline__)) operator T& () const { return *t_; } 6011: 6011: 6011: 6011: 6011: 6011: inline __attribute__ ((__always_inline__)) T& get() const { return *t_; } 6011: 6011: 6011: 6011: 6011: 6011: 6011: inline __attribute__ ((__always_inline__)) T* get_pointer() const { return t_; } 6011: 6011: private: 6011: 6011: T* t_; 6011: }; 6011: # 131 "/usr/include/boost/core/ref.hpp" 3 4 6011: template inline __attribute__ ((__always_inline__)) reference_wrapper const ref( T & t ) 6011: { 6011: 6011: 6011: 6011: 6011: 6011: 6011: return reference_wrapper( t ); 6011: 6011: 6011: } 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: template inline __attribute__ ((__always_inline__)) reference_wrapper const cref( T const & t ) 6011: { 6011: return reference_wrapper(t); 6011: } 6011: # 174 "/usr/include/boost/core/ref.hpp" 3 4 6011: template void ref(T const&&) = delete; 6011: 6011: 6011: 6011: 6011: template void cref(T const&&) = delete; 6011: # 194 "/usr/include/boost/core/ref.hpp" 3 4 6011: template struct is_reference_wrapper 6011: { 6011: static const bool value = false; 6011: }; 6011: 6011: 6011: 6011: 6011: template struct is_reference_wrapper< reference_wrapper > 6011: { 6011: static const bool value = true; 6011: }; 6011: 6011: 6011: 6011: template struct is_reference_wrapper< reference_wrapper const > 6011: { 6011: static const bool value = true; 6011: }; 6011: 6011: template struct is_reference_wrapper< reference_wrapper volatile > 6011: { 6011: static const bool value = true; 6011: }; 6011: 6011: template struct is_reference_wrapper< reference_wrapper const volatile > 6011: { 6011: static const bool value = true; 6011: }; 6011: # 239 "/usr/include/boost/core/ref.hpp" 3 4 6011: template struct unwrap_reference 6011: { 6011: typedef T type; 6011: }; 6011: 6011: 6011: 6011: 6011: template struct unwrap_reference< reference_wrapper > 6011: { 6011: typedef T type; 6011: }; 6011: 6011: 6011: 6011: template struct unwrap_reference< reference_wrapper const > 6011: { 6011: typedef T type; 6011: }; 6011: 6011: template struct unwrap_reference< reference_wrapper volatile > 6011: { 6011: typedef T type; 6011: }; 6011: 6011: template struct unwrap_reference< reference_wrapper const volatile > 6011: { 6011: typedef T type; 6011: }; 6011: # 281 "/usr/include/boost/core/ref.hpp" 3 4 6011: template inline __attribute__ ((__always_inline__)) typename unwrap_reference::type& unwrap_ref( T & t ) 6011: { 6011: return t; 6011: } 6011: 6011: 6011: 6011: 6011: 6011: 6011: template inline __attribute__ ((__always_inline__)) T* get_pointer( reference_wrapper const & r ) 6011: { 6011: return r.get_pointer(); 6011: } 6011: 6011: 6011: 6011: 6011: } 6011: # 16 "/usr/include/boost/ref.hpp" 2 3 4 6011: # 38 "/usr/include/boost/regex/v4/regex_format.hpp" 2 3 4 6011: 6011: namespace boost{ 6011: # 55 "/usr/include/boost/regex/v4/regex_format.hpp" 3 4 6011: template >::allocator_type > 6011: class match_results; 6011: 6011: namespace re_detail_106501{ 6011: 6011: 6011: 6011: 6011: 6011: 6011: template 6011: struct trivial_format_traits 6011: { 6011: typedef charT char_type; 6011: 6011: static std::ptrdiff_t length(const charT* p) 6011: { 6011: return global_length(p); 6011: } 6011: static charT tolower(charT c) 6011: { 6011: return ::boost::re_detail_106501::global_lower(c); 6011: } 6011: static charT toupper(charT c) 6011: { 6011: return ::boost::re_detail_106501::global_upper(c); 6011: } 6011: static int value(const charT c, int radix) 6011: { 6011: int result = global_value(c); 6011: return result >= radix ? -1 : result; 6011: } 6011: int toi(const charT*& p1, const charT* p2, int radix)const 6011: { 6011: return (int)global_toi(p1, p2, radix, *this); 6011: } 6011: }; 6011: 6011: template 6011: class basic_regex_formatter 6011: { 6011: public: 6011: typedef typename traits::char_type char_type; 6011: basic_regex_formatter(OutputIterator o, const Results& r, const traits& t) 6011: : 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) {} 6011: OutputIterator format(ForwardIter p1, ForwardIter p2, match_flag_type f); 6011: OutputIterator format(ForwardIter p1, match_flag_type f) 6011: { 6011: return format(p1, p1 + m_traits.length(p1), f); 6011: } 6011: private: 6011: typedef typename Results::value_type sub_match_type; 6011: enum output_state 6011: { 6011: output_copy, 6011: output_next_lower, 6011: output_next_upper, 6011: output_lower, 6011: output_upper, 6011: output_none 6011: }; 6011: 6011: void put(char_type c); 6011: void put(const sub_match_type& sub); 6011: void format_all(); 6011: void format_perl(); 6011: void format_escape(); 6011: void format_conditional(); 6011: void format_until_scope_end(); 6011: bool handle_perl_verb(bool have_brace); 6011: 6011: inline typename Results::value_type const& get_named_sub(ForwardIter i, ForwardIter j, const mpl::false_&) 6011: { 6011: std::vector v(i, j); 6011: return (i != j) ? this->m_results.named_subexpression(&v[0], &v[0] + v.size()) 6011: : this->m_results.named_subexpression(static_cast(0), static_cast(0)); 6011: } 6011: inline typename Results::value_type const& get_named_sub(ForwardIter i, ForwardIter j, const mpl::true_&) 6011: { 6011: return this->m_results.named_subexpression(i, j); 6011: } 6011: inline typename Results::value_type const& get_named_sub(ForwardIter i, ForwardIter j) 6011: { 6011: typedef typename boost::is_convertible::type tag_type; 6011: return get_named_sub(i, j, tag_type()); 6011: } 6011: inline int get_named_sub_index(ForwardIter i, ForwardIter j, const mpl::false_&) 6011: { 6011: std::vector v(i, j); 6011: return (i != j) ? this->m_results.named_subexpression_index(&v[0], &v[0] + v.size()) 6011: : this->m_results.named_subexpression_index(static_cast(0), static_cast(0)); 6011: } 6011: inline int get_named_sub_index(ForwardIter i, ForwardIter j, const mpl::true_&) 6011: { 6011: return this->m_results.named_subexpression_index(i, j); 6011: } 6011: inline int get_named_sub_index(ForwardIter i, ForwardIter j) 6011: { 6011: typedef typename boost::is_convertible::type tag_type; 6011: return get_named_sub_index(i, j, tag_type()); 6011: } 6011: 6011: 6011: 6011: 6011: 6011: inline int toi(ForwardIter& i, ForwardIter j, int base, const boost::mpl::false_&) 6011: { 6011: if(i != j) 6011: { 6011: std::vector v(i, j); 6011: const char_type* start = &v[0]; 6011: const char_type* pos = start; 6011: int r = (int)m_traits.toi(pos, &v[0] + v.size(), base); 6011: std::advance(i, pos - start); 6011: return r; 6011: } 6011: return -1; 6011: } 6011: 6011: 6011: 6011: inline int toi(ForwardIter& i, ForwardIter j, int base, const boost::mpl::true_&) 6011: { 6011: return m_traits.toi(i, j, base); 6011: } 6011: inline int toi(ForwardIter& i, ForwardIter j, int base) 6011: { 6011: 6011: 6011: 6011: 6011: 6011: typedef typename boost::is_convertible::type tag_type; 6011: return toi(i, j, base, tag_type()); 6011: 6011: } 6011: 6011: const traits& m_traits; 6011: const Results& m_results; 6011: OutputIterator m_out; 6011: ForwardIter m_position; 6011: ForwardIter m_end; 6011: match_flag_type m_flags; 6011: output_state m_state; 6011: output_state m_restore_state; 6011: bool m_have_conditional; 6011: private: 6011: basic_regex_formatter(const basic_regex_formatter&); 6011: basic_regex_formatter& operator=(const basic_regex_formatter&); 6011: }; 6011: 6011: template 6011: OutputIterator basic_regex_formatter::format(ForwardIter p1, ForwardIter p2, match_flag_type f) 6011: { 6011: m_position = p1; 6011: m_end = p2; 6011: m_flags = f; 6011: format_all(); 6011: return m_out; 6011: } 6011: 6011: template 6011: void basic_regex_formatter::format_all() 6011: { 6011: 6011: while(m_position != m_end) 6011: { 6011: switch(*m_position) 6011: { 6011: case '&': 6011: if(m_flags & ::boost::regex_constants::format_sed) 6011: { 6011: ++m_position; 6011: put(m_results[0]); 6011: break; 6011: } 6011: put(*m_position++); 6011: break; 6011: case '\\': 6011: format_escape(); 6011: break; 6011: case '(': 6011: if(m_flags & boost::regex_constants::format_all) 6011: { 6011: ++m_position; 6011: bool have_conditional = m_have_conditional; 6011: m_have_conditional = false; 6011: format_until_scope_end(); 6011: m_have_conditional = have_conditional; 6011: if(m_position == m_end) 6011: return; 6011: (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__)); 6011: ++m_position; 6011: break; 6011: } 6011: put(*m_position); 6011: ++m_position; 6011: break; 6011: case ')': 6011: if(m_flags & boost::regex_constants::format_all) 6011: { 6011: return; 6011: } 6011: put(*m_position); 6011: ++m_position; 6011: break; 6011: case ':': 6011: if((m_flags & boost::regex_constants::format_all) && m_have_conditional) 6011: { 6011: return; 6011: } 6011: put(*m_position); 6011: ++m_position; 6011: break; 6011: case '?': 6011: if(m_flags & boost::regex_constants::format_all) 6011: { 6011: ++m_position; 6011: format_conditional(); 6011: break; 6011: } 6011: put(*m_position); 6011: ++m_position; 6011: break; 6011: case '$': 6011: if((m_flags & format_sed) == 0) 6011: { 6011: format_perl(); 6011: break; 6011: } 6011: 6011: __attribute__((fallthrough)); 6011: default: 6011: put(*m_position); 6011: ++m_position; 6011: break; 6011: } 6011: } 6011: } 6011: 6011: template 6011: void basic_regex_formatter::format_perl() 6011: { 6011: 6011: 6011: 6011: 6011: (static_cast (*m_position == '$') ? void (0) : __assert_fail ("*m_position == '$'", "/usr/include/boost/regex/v4/regex_format.hpp", 303, __extension__ __PRETTY_FUNCTION__)); 6011: 6011: 6011: 6011: if(++m_position == m_end) 6011: { 6011: --m_position; 6011: put(*m_position); 6011: ++m_position; 6011: return; 6011: } 6011: 6011: 6011: 6011: bool have_brace = false; 6011: ForwardIter save_position = m_position; 6011: switch(*m_position) 6011: { 6011: case '&': 6011: ++m_position; 6011: put(this->m_results[0]); 6011: break; 6011: case '`': 6011: ++m_position; 6011: put(this->m_results.prefix()); 6011: break; 6011: case '\'': 6011: ++m_position; 6011: put(this->m_results.suffix()); 6011: break; 6011: case '$': 6011: put(*m_position++); 6011: break; 6011: case '+': 6011: if((++m_position != m_end) && (*m_position == '{')) 6011: { 6011: ForwardIter base = ++m_position; 6011: while((m_position != m_end) && (*m_position != '}')) ++m_position; 6011: if(m_position != m_end) 6011: { 6011: 6011: put(get_named_sub(base, m_position)); 6011: ++m_position; 6011: break; 6011: } 6011: else 6011: { 6011: m_position = --base; 6011: } 6011: } 6011: put((this->m_results)[this->m_results.size() > 1 ? static_cast(this->m_results.size() - 1) : 1]); 6011: break; 6011: case '{': 6011: have_brace = true; 6011: ++m_position; 6011: __attribute__((fallthrough)); 6011: default: 6011: 6011: { 6011: std::ptrdiff_t len = ::boost::re_detail_106501::distance(m_position, m_end); 6011: 6011: int v = this->toi(m_position, m_position + len, 10); 6011: if((v < 0) || (have_brace && ((m_position == m_end) || (*m_position != '}')))) 6011: { 6011: 6011: if(!handle_perl_verb(have_brace)) 6011: { 6011: 6011: m_position = --save_position; 6011: put(*m_position); 6011: ++m_position; 6011: } 6011: break; 6011: } 6011: 6011: put(this->m_results[v]); 6011: if(have_brace) 6011: ++m_position; 6011: } 6011: } 6011: } 6011: 6011: template 6011: bool basic_regex_formatter::handle_perl_verb(bool have_brace) 6011: { 6011: 6011: 6011: 6011: static const char_type MATCH[] = { 'M', 'A', 'T', 'C', 'H' }; 6011: static const char_type PREMATCH[] = { 'P', 'R', 'E', 'M', 'A', 'T', 'C', 'H' }; 6011: static const char_type POSTMATCH[] = { 'P', 'O', 'S', 'T', 'M', 'A', 'T', 'C', 'H' }; 6011: static const char_type LAST_PAREN_MATCH[] = { 'L', 'A', 'S', 'T', '_', 'P', 'A', 'R', 'E', 'N', '_', 'M', 'A', 'T', 'C', 'H' }; 6011: 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' }; 6011: static const char_type LAST_SUBMATCH_RESULT_ALT[] = { '^', 'N' }; 6011: 6011: if(m_position == m_end) 6011: return false; 6011: if(have_brace && (*m_position == '^')) 6011: ++m_position; 6011: 6011: std::ptrdiff_t max_len = m_end - m_position; 6011: 6011: if((max_len >= 5) && std::equal(m_position, m_position + 5, MATCH)) 6011: { 6011: m_position += 5; 6011: if(have_brace) 6011: { 6011: if((m_position != m_end) && (*m_position == '}')) 6011: ++m_position; 6011: else 6011: { 6011: m_position -= 5; 6011: return false; 6011: } 6011: } 6011: put(this->m_results[0]); 6011: return true; 6011: } 6011: if((max_len >= 8) && std::equal(m_position, m_position + 8, PREMATCH)) 6011: { 6011: m_position += 8; 6011: if(have_brace) 6011: { 6011: if((m_position != m_end) && (*m_position == '}')) 6011: ++m_position; 6011: else 6011: { 6011: m_position -= 8; 6011: return false; 6011: } 6011: } 6011: put(this->m_results.prefix()); 6011: return true; 6011: } 6011: if((max_len >= 9) && std::equal(m_position, m_position + 9, POSTMATCH)) 6011: { 6011: m_position += 9; 6011: if(have_brace) 6011: { 6011: if((m_position != m_end) && (*m_position == '}')) 6011: ++m_position; 6011: else 6011: { 6011: m_position -= 9; 6011: return false; 6011: } 6011: } 6011: put(this->m_results.suffix()); 6011: return true; 6011: } 6011: if((max_len >= 16) && std::equal(m_position, m_position + 16, LAST_PAREN_MATCH)) 6011: { 6011: m_position += 16; 6011: if(have_brace) 6011: { 6011: if((m_position != m_end) && (*m_position == '}')) 6011: ++m_position; 6011: else 6011: { 6011: m_position -= 16; 6011: return false; 6011: } 6011: } 6011: put((this->m_results)[this->m_results.size() > 1 ? static_cast(this->m_results.size() - 1) : 1]); 6011: return true; 6011: } 6011: if((max_len >= 20) && std::equal(m_position, m_position + 20, LAST_SUBMATCH_RESULT)) 6011: { 6011: m_position += 20; 6011: if(have_brace) 6011: { 6011: if((m_position != m_end) && (*m_position == '}')) 6011: ++m_position; 6011: else 6011: { 6011: m_position -= 20; 6011: return false; 6011: } 6011: } 6011: put(this->m_results.get_last_closed_paren()); 6011: return true; 6011: } 6011: if((max_len >= 2) && std::equal(m_position, m_position + 2, LAST_SUBMATCH_RESULT_ALT)) 6011: { 6011: m_position += 2; 6011: if(have_brace) 6011: { 6011: if((m_position != m_end) && (*m_position == '}')) 6011: ++m_position; 6011: else 6011: { 6011: m_position -= 2; 6011: return false; 6011: } 6011: } 6011: put(this->m_results.get_last_closed_paren()); 6011: return true; 6011: } 6011: return false; 6011: } 6011: 6011: template 6011: void basic_regex_formatter::format_escape() 6011: { 6011: 6011: if(++m_position == m_end) 6011: { 6011: put(static_cast('\\')); 6011: return; 6011: } 6011: 6011: switch(*m_position) 6011: { 6011: case 'a': 6011: put(static_cast('\a')); 6011: ++m_position; 6011: break; 6011: case 'f': 6011: put(static_cast('\f')); 6011: ++m_position; 6011: break; 6011: case 'n': 6011: put(static_cast('\n')); 6011: ++m_position; 6011: break; 6011: case 'r': 6011: put(static_cast('\r')); 6011: ++m_position; 6011: break; 6011: case 't': 6011: put(static_cast('\t')); 6011: ++m_position; 6011: break; 6011: case 'v': 6011: put(static_cast('\v')); 6011: ++m_position; 6011: break; 6011: case 'x': 6011: if(++m_position == m_end) 6011: { 6011: put(static_cast('x')); 6011: return; 6011: } 6011: 6011: if(*m_position == static_cast('{')) 6011: { 6011: ++m_position; 6011: int val = this->toi(m_position, m_end, 16); 6011: if(val < 0) 6011: { 6011: 6011: put(static_cast('x')); 6011: put(static_cast('{')); 6011: return; 6011: } 6011: if((m_position == m_end) || (*m_position != static_cast('}'))) 6011: { 6011: --m_position; 6011: while(*m_position != static_cast('\\')) 6011: --m_position; 6011: ++m_position; 6011: put(*m_position++); 6011: return; 6011: } 6011: ++m_position; 6011: put(static_cast(val)); 6011: return; 6011: } 6011: else 6011: { 6011: std::ptrdiff_t len = ::boost::re_detail_106501::distance(m_position, m_end); 6011: len = (std::min)(static_cast(2), len); 6011: int val = this->toi(m_position, m_position + len, 16); 6011: if(val < 0) 6011: { 6011: --m_position; 6011: put(*m_position++); 6011: return; 6011: } 6011: put(static_cast(val)); 6011: } 6011: break; 6011: case 'c': 6011: if(++m_position == m_end) 6011: { 6011: --m_position; 6011: put(*m_position++); 6011: return; 6011: } 6011: put(static_cast(*m_position++ % 32)); 6011: break; 6011: case 'e': 6011: put(static_cast(27)); 6011: ++m_position; 6011: break; 6011: default: 6011: 6011: if((m_flags & boost::regex_constants::format_sed) == 0) 6011: { 6011: bool breakout = false; 6011: switch(*m_position) 6011: { 6011: case 'l': 6011: ++m_position; 6011: m_restore_state = m_state; 6011: m_state = output_next_lower; 6011: breakout = true; 6011: break; 6011: case 'L': 6011: ++m_position; 6011: m_state = output_lower; 6011: breakout = true; 6011: break; 6011: case 'u': 6011: ++m_position; 6011: m_restore_state = m_state; 6011: m_state = output_next_upper; 6011: breakout = true; 6011: break; 6011: case 'U': 6011: ++m_position; 6011: m_state = output_upper; 6011: breakout = true; 6011: break; 6011: case 'E': 6011: ++m_position; 6011: m_state = output_copy; 6011: breakout = true; 6011: break; 6011: } 6011: if(breakout) 6011: break; 6011: } 6011: 6011: std::ptrdiff_t len = ::boost::re_detail_106501::distance(m_position, m_end); 6011: len = (std::min)(static_cast(1), len); 6011: int v = this->toi(m_position, m_position+len, 10); 6011: if((v > 0) || ((v == 0) && (m_flags & ::boost::regex_constants::format_sed))) 6011: { 6011: put(m_results[v]); 6011: break; 6011: } 6011: else if(v == 0) 6011: { 6011: 6011: --m_position; 6011: len = ::boost::re_detail_106501::distance(m_position, m_end); 6011: len = (std::min)(static_cast(4), len); 6011: v = this->toi(m_position, m_position + len, 8); 6011: (static_cast (v >= 0) ? void (0) : __assert_fail ("v >= 0", "/usr/include/boost/regex/v4/regex_format.hpp", 652, __extension__ __PRETTY_FUNCTION__)); 6011: put(static_cast(v)); 6011: break; 6011: } 6011: 6011: put(*m_position++); 6011: break; 6011: } 6011: } 6011: 6011: template 6011: void basic_regex_formatter::format_conditional() 6011: { 6011: if(m_position == m_end) 6011: { 6011: 6011: put(static_cast('?')); 6011: return; 6011: } 6011: int v; 6011: if(*m_position == '{') 6011: { 6011: ForwardIter base = m_position; 6011: ++m_position; 6011: v = this->toi(m_position, m_end, 10); 6011: if(v < 0) 6011: { 6011: 6011: while((m_position != m_end) && (*m_position != '}')) 6011: ++m_position; 6011: v = this->get_named_sub_index(base + 1, m_position); 6011: } 6011: if((v < 0) || (*m_position != '}')) 6011: { 6011: m_position = base; 6011: 6011: put(static_cast('?')); 6011: return; 6011: } 6011: 6011: ++m_position; 6011: } 6011: else 6011: { 6011: std::ptrdiff_t len = ::boost::re_detail_106501::distance(m_position, m_end); 6011: len = (std::min)(static_cast(2), len); 6011: v = this->toi(m_position, m_position + len, 10); 6011: } 6011: if(v < 0) 6011: { 6011: 6011: put(static_cast('?')); 6011: return; 6011: } 6011: 6011: 6011: if(m_results[v].matched) 6011: { 6011: m_have_conditional = true; 6011: format_all(); 6011: m_have_conditional = false; 6011: if((m_position != m_end) && (*m_position == static_cast(':'))) 6011: { 6011: 6011: ++m_position; 6011: 6011: output_state saved_state = m_state; 6011: m_state = output_none; 6011: 6011: format_until_scope_end(); 6011: 6011: m_state = saved_state; 6011: } 6011: } 6011: else 6011: { 6011: 6011: output_state saved_state = m_state; 6011: m_state = output_none; 6011: 6011: m_have_conditional = true; 6011: format_all(); 6011: m_have_conditional = false; 6011: 6011: m_state = saved_state; 6011: if((m_position != m_end) && (*m_position == static_cast(':'))) 6011: { 6011: 6011: ++m_position; 6011: 6011: format_until_scope_end(); 6011: } 6011: } 6011: } 6011: 6011: template 6011: void basic_regex_formatter::format_until_scope_end() 6011: { 6011: do 6011: { 6011: format_all(); 6011: if((m_position == m_end) || (*m_position == static_cast(')'))) 6011: return; 6011: put(*m_position++); 6011: }while(m_position != m_end); 6011: } 6011: 6011: template 6011: void basic_regex_formatter::put(char_type c) 6011: { 6011: 6011: 6011: switch(this->m_state) 6011: { 6011: case output_none: 6011: return; 6011: case output_next_lower: 6011: c = m_traits.tolower(c); 6011: this->m_state = m_restore_state; 6011: break; 6011: case output_next_upper: 6011: c = m_traits.toupper(c); 6011: this->m_state = m_restore_state; 6011: break; 6011: case output_lower: 6011: c = m_traits.tolower(c); 6011: break; 6011: case output_upper: 6011: c = m_traits.toupper(c); 6011: break; 6011: default: 6011: break; 6011: } 6011: *m_out = c; 6011: ++m_out; 6011: } 6011: 6011: template 6011: void basic_regex_formatter::put(const sub_match_type& sub) 6011: { 6011: typedef typename sub_match_type::iterator iterator_type; 6011: iterator_type i = sub.first; 6011: while(i != sub.second) 6011: { 6011: put(*i); 6011: ++i; 6011: } 6011: } 6011: 6011: template 6011: class string_out_iterator 6011: 6011: : public std::iterator 6011: 6011: { 6011: S* out; 6011: public: 6011: string_out_iterator(S& s) : out(&s) {} 6011: string_out_iterator& operator++() { return *this; } 6011: string_out_iterator& operator++(int) { return *this; } 6011: string_out_iterator& operator*() { return *this; } 6011: string_out_iterator& operator=(typename S::value_type v) 6011: { 6011: out->append(1, v); 6011: return *this; 6011: } 6011: # 826 "/usr/include/boost/regex/v4/regex_format.hpp" 3 4 6011: }; 6011: 6011: template 6011: OutputIterator regex_format_imp(OutputIterator out, 6011: const match_results& m, 6011: ForwardIter p1, ForwardIter p2, 6011: match_flag_type flags, 6011: const traits& t 6011: ) 6011: { 6011: if(flags & regex_constants::format_literal) 6011: { 6011: return re_detail_106501::copy(p1, p2, out); 6011: } 6011: 6011: re_detail_106501::basic_regex_formatter< 6011: OutputIterator, 6011: match_results, 6011: traits, ForwardIter> f(out, m, t); 6011: return f.format(p1, p2, flags); 6011: } 6011: 6011: 6011: 6011: 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; }; 6011: 6011: struct any_type 6011: { 6011: template 6011: any_type(const T&); 6011: template 6011: any_type(const T&, const U&); 6011: template 6011: any_type(const T&, const U&, const V&); 6011: }; 6011: typedef char no_type; 6011: typedef char (&unary_type)[2]; 6011: typedef char (&binary_type)[3]; 6011: typedef char (&ternary_type)[4]; 6011: 6011: no_type check_is_formatter(unary_type, binary_type, ternary_type); 6011: template 6011: unary_type check_is_formatter(T const &, binary_type, ternary_type); 6011: template 6011: binary_type check_is_formatter(unary_type, T const &, ternary_type); 6011: template 6011: binary_type check_is_formatter(T const &, U const &, ternary_type); 6011: template 6011: ternary_type check_is_formatter(unary_type, binary_type, T const &); 6011: template 6011: ternary_type check_is_formatter(T const &, binary_type, U const &); 6011: template 6011: ternary_type check_is_formatter(unary_type, T const &, U const &); 6011: template 6011: ternary_type check_is_formatter(T const &, U const &, V const &); 6011: 6011: struct unary_binary_ternary 6011: { 6011: typedef unary_type (*unary_fun)(any_type); 6011: typedef binary_type (*binary_fun)(any_type, any_type); 6011: typedef ternary_type (*ternary_fun)(any_type, any_type, any_type); 6011: operator unary_fun(); 6011: operator binary_fun(); 6011: operator ternary_fun(); 6011: }; 6011: 6011: template::value> 6011: struct formatter_wrapper 6011: : Formatter 6011: , unary_binary_ternary 6011: { 6011: formatter_wrapper(){} 6011: }; 6011: 6011: template 6011: struct formatter_wrapper 6011: : unary_binary_ternary 6011: { 6011: operator Formatter *(); 6011: }; 6011: 6011: template 6011: struct formatter_wrapper 6011: : unary_binary_ternary 6011: { 6011: operator Formatter *(); 6011: }; 6011: 6011: template 6011: struct format_traits_imp 6011: { 6011: private: 6011: 6011: 6011: 6011: 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)"); 6011: static formatter_wrapper::type> f; 6011: static M m; 6011: static O out; 6011: static boost::regex_constants::match_flag_type flags; 6011: public: 6011: static const int value = sizeof(check_is_formatter(f(m), f(m, out), f(m, out, flags))); 6011: }; 6011: 6011: template 6011: struct format_traits 6011: { 6011: public: 6011: # 943 "/usr/include/boost/regex/v4/regex_format.hpp" 3 4 6011: typedef typename boost::mpl::if_< 6011: boost::mpl::and_, boost::mpl::not_::type> > >, 6011: boost::mpl::int_<0>, 6011: typename boost::mpl::if_< 6011: has_const_iterator, 6011: boost::mpl::int_<1>, 6011: boost::mpl::int_::value> 6011: >::type 6011: >::type type; 6011: 6011: 6011: 6011: 6011: 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"); 6011: }; 6011: # 983 "/usr/include/boost/regex/v4/regex_format.hpp" 3 4 6011: template 6011: struct format_functor3 6011: { 6011: format_functor3(Base b) : func(b) {} 6011: template 6011: OutputIter operator()(const Match& m, OutputIter i, boost::regex_constants::match_flag_type f) 6011: { 6011: return boost::unwrap_ref(func)(m, i, f); 6011: } 6011: template 6011: OutputIter operator()(const Match& m, OutputIter i, boost::regex_constants::match_flag_type f, const Traits&) 6011: { 6011: return (*this)(m, i, f); 6011: } 6011: private: 6011: Base func; 6011: format_functor3(const format_functor3&); 6011: format_functor3& operator=(const format_functor3&); 6011: }; 6011: 6011: template 6011: struct format_functor2 6011: { 6011: format_functor2(Base b) : func(b) {} 6011: template 6011: OutputIter operator()(const Match& m, OutputIter i, boost::regex_constants::match_flag_type ) 6011: { 6011: return boost::unwrap_ref(func)(m, i); 6011: } 6011: template 6011: OutputIter operator()(const Match& m, OutputIter i, boost::regex_constants::match_flag_type f, const Traits&) 6011: { 6011: return (*this)(m, i, f); 6011: } 6011: private: 6011: Base func; 6011: format_functor2(const format_functor2&); 6011: format_functor2& operator=(const format_functor2&); 6011: }; 6011: 6011: template 6011: struct format_functor1 6011: { 6011: format_functor1(Base b) : func(b) {} 6011: 6011: template 6011: OutputIter do_format_string(const S& s, OutputIter i) 6011: { 6011: return re_detail_106501::copy(s.begin(), s.end(), i); 6011: } 6011: template 6011: inline OutputIter do_format_string(const S* s, OutputIter i) 6011: { 6011: while(s && *s) 6011: { 6011: *i = *s; 6011: ++i; 6011: ++s; 6011: } 6011: return i; 6011: } 6011: template 6011: OutputIter operator()(const Match& m, OutputIter i, boost::regex_constants::match_flag_type ) 6011: { 6011: return do_format_string(boost::unwrap_ref(func)(m), i); 6011: } 6011: template 6011: OutputIter operator()(const Match& m, OutputIter i, boost::regex_constants::match_flag_type f, const Traits&) 6011: { 6011: return (*this)(m, i, f); 6011: } 6011: private: 6011: Base func; 6011: format_functor1(const format_functor1&); 6011: format_functor1& operator=(const format_functor1&); 6011: }; 6011: 6011: template 6011: struct format_functor_c_string 6011: { 6011: format_functor_c_string(const charT* ps) : func(ps) {} 6011: 6011: template 6011: OutputIter operator()(const Match& m, OutputIter i, boost::regex_constants::match_flag_type f, const Traits& t = Traits()) 6011: { 6011: 6011: const charT* end = func; 6011: while(*end) ++end; 6011: return regex_format_imp(i, m, func, end, f, t); 6011: } 6011: private: 6011: const charT* func; 6011: format_functor_c_string(const format_functor_c_string&); 6011: format_functor_c_string& operator=(const format_functor_c_string&); 6011: }; 6011: 6011: template 6011: struct format_functor_container 6011: { 6011: format_functor_container(const Container& c) : func(c) {} 6011: 6011: template 6011: OutputIter operator()(const Match& m, OutputIter i, boost::regex_constants::match_flag_type f, const Traits& t = Traits()) 6011: { 6011: 6011: return re_detail_106501::regex_format_imp(i, m, func.begin(), func.end(), f, t); 6011: } 6011: private: 6011: const Container& func; 6011: format_functor_container(const format_functor_container&); 6011: format_functor_container& operator=(const format_functor_container&); 6011: }; 6011: 6011: template > 6011: struct compute_functor_type 6011: { 6011: typedef typename format_traits::type tag; 6011: typedef typename boost::remove_cv< typename boost::remove_pointer::type>::type maybe_char_type; 6011: 6011: typedef typename mpl::if_< 6011: ::boost::is_same >, format_functor_c_string, 6011: typename mpl::if_< 6011: ::boost::is_same >, format_functor_container, 6011: typename mpl::if_< 6011: ::boost::is_same >, format_functor1, 6011: typename mpl::if_< 6011: ::boost::is_same >, format_functor2, 6011: format_functor3 6011: >::type 6011: >::type 6011: >::type 6011: >::type type; 6011: }; 6011: 6011: } 6011: 6011: template 6011: inline OutputIterator regex_format(OutputIterator out, 6011: const match_results& m, 6011: Functor fmt, 6011: match_flag_type flags = format_all 6011: ) 6011: { 6011: return m.format(out, fmt, flags); 6011: } 6011: 6011: template 6011: inline std::basic_string::char_type> regex_format(const match_results& m, 6011: Functor fmt, 6011: match_flag_type flags = format_all) 6011: { 6011: return m.format(fmt, flags); 6011: } 6011: # 1148 "/usr/include/boost/regex/v4/regex_format.hpp" 3 4 6011: } 6011: # 80 "/usr/include/boost/regex/v4/regex.hpp" 2 3 4 6011: 6011: 6011: # 1 "/usr/include/boost/regex/v4/match_results.hpp" 1 3 4 6011: # 33 "/usr/include/boost/regex/v4/match_results.hpp" 3 4 6011: namespace boost{ 6011: # 42 "/usr/include/boost/regex/v4/match_results.hpp" 3 4 6011: namespace re_detail_106501{ 6011: 6011: class named_subexpressions; 6011: 6011: } 6011: 6011: template 6011: class match_results 6011: { 6011: private: 6011: 6011: typedef std::vector, Allocator> vector_type; 6011: 6011: 6011: 6011: public: 6011: typedef sub_match value_type; 6011: 6011: typedef typename Allocator::const_reference const_reference; 6011: 6011: 6011: 6011: typedef const_reference reference; 6011: typedef typename vector_type::const_iterator const_iterator; 6011: typedef const_iterator iterator; 6011: typedef typename re_detail_106501::regex_iterator_traits< 6011: BidiIterator>::difference_type difference_type; 6011: typedef typename Allocator::size_type size_type; 6011: typedef Allocator allocator_type; 6011: typedef typename re_detail_106501::regex_iterator_traits< 6011: BidiIterator>::value_type char_type; 6011: typedef std::basic_string string_type; 6011: typedef re_detail_106501::named_subexpressions named_sub_type; 6011: 6011: 6011: explicit match_results(const Allocator& a = Allocator()) 6011: 6011: : m_subs(a), m_base(), m_null(), m_last_closed_paren(0), m_is_singular(true) {} 6011: # 88 "/usr/include/boost/regex/v4/match_results.hpp" 3 4 6011: match_results(const match_results& m) 6011: : 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) 6011: { 6011: if(!m_is_singular) 6011: { 6011: m_base = m.m_base; 6011: m_null = m.m_null; 6011: } 6011: } 6011: match_results& operator=(const match_results& m) 6011: { 6011: m_subs = m.m_subs; 6011: m_named_subs = m.m_named_subs; 6011: m_last_closed_paren = m.m_last_closed_paren; 6011: m_is_singular = m.m_is_singular; 6011: if(!m_is_singular) 6011: { 6011: m_base = m.m_base; 6011: m_null = m.m_null; 6011: } 6011: return *this; 6011: } 6011: ~match_results(){} 6011: 6011: 6011: size_type size() const 6011: { return empty() ? 0 : m_subs.size() - 2; } 6011: size_type max_size() const 6011: { return m_subs.max_size(); } 6011: bool empty() const 6011: { return m_subs.size() < 2; } 6011: 6011: difference_type length(int sub = 0) const 6011: { 6011: if(m_is_singular) 6011: raise_logic_error(); 6011: sub += 2; 6011: if((sub < (int)m_subs.size()) && (sub > 0)) 6011: return m_subs[sub].length(); 6011: return 0; 6011: } 6011: difference_type length(const char_type* sub) const 6011: { 6011: if(m_is_singular) 6011: raise_logic_error(); 6011: const char_type* sub_end = sub; 6011: while(*sub_end) ++sub_end; 6011: return length(named_subexpression_index(sub, sub_end)); 6011: } 6011: template 6011: difference_type length(const charT* sub) const 6011: { 6011: if(m_is_singular) 6011: raise_logic_error(); 6011: const charT* sub_end = sub; 6011: while(*sub_end) ++sub_end; 6011: return length(named_subexpression_index(sub, sub_end)); 6011: } 6011: template 6011: difference_type length(const std::basic_string& sub) const 6011: { 6011: return length(sub.c_str()); 6011: } 6011: difference_type position(size_type sub = 0) const 6011: { 6011: if(m_is_singular) 6011: raise_logic_error(); 6011: sub += 2; 6011: if(sub < m_subs.size()) 6011: { 6011: const sub_match& s = m_subs[sub]; 6011: if(s.matched || (sub == 2)) 6011: { 6011: return ::boost::re_detail_106501::distance((BidiIterator)(m_base), (BidiIterator)(s.first)); 6011: } 6011: } 6011: return ~static_cast(0); 6011: } 6011: difference_type position(const char_type* sub) const 6011: { 6011: const char_type* sub_end = sub; 6011: while(*sub_end) ++sub_end; 6011: return position(named_subexpression_index(sub, sub_end)); 6011: } 6011: template 6011: difference_type position(const charT* sub) const 6011: { 6011: const charT* sub_end = sub; 6011: while(*sub_end) ++sub_end; 6011: return position(named_subexpression_index(sub, sub_end)); 6011: } 6011: template 6011: difference_type position(const std::basic_string& sub) const 6011: { 6011: return position(sub.c_str()); 6011: } 6011: string_type str(int sub = 0) const 6011: { 6011: if(m_is_singular) 6011: raise_logic_error(); 6011: sub += 2; 6011: string_type result; 6011: if(sub < (int)m_subs.size() && (sub > 0)) 6011: { 6011: const sub_match& s = m_subs[sub]; 6011: if(s.matched) 6011: { 6011: result = s.str(); 6011: } 6011: } 6011: return result; 6011: } 6011: string_type str(const char_type* sub) const 6011: { 6011: return (*this)[sub].str(); 6011: } 6011: template 6011: string_type str(const std::basic_string& sub) const 6011: { 6011: return (*this)[sub].str(); 6011: } 6011: template 6011: string_type str(const charT* sub) const 6011: { 6011: return (*this)[sub].str(); 6011: } 6011: template 6011: string_type str(const std::basic_string& sub) const 6011: { 6011: return (*this)[sub].str(); 6011: } 6011: const_reference operator[](int sub) const 6011: { 6011: if(m_is_singular && m_subs.empty()) 6011: raise_logic_error(); 6011: sub += 2; 6011: if(sub < (int)m_subs.size() && (sub >= 0)) 6011: { 6011: return m_subs[sub]; 6011: } 6011: return m_null; 6011: } 6011: 6011: 6011: 6011: const_reference named_subexpression(const char_type* i, const char_type* j) const 6011: { 6011: 6011: 6011: 6011: if(m_is_singular) 6011: raise_logic_error(); 6011: re_detail_106501::named_subexpressions::range_type r = m_named_subs->equal_range(i, j); 6011: while((r.first != r.second) && ((*this)[r.first->index].matched == false)) 6011: ++r.first; 6011: return r.first != r.second ? (*this)[r.first->index] : m_null; 6011: } 6011: template 6011: const_reference named_subexpression(const charT* i, const charT* j) const 6011: { 6011: static_assert(sizeof(charT) <= sizeof(char_type), "sizeof(charT) <= sizeof(char_type)"); 6011: if(i == j) 6011: return m_null; 6011: std::vector s; 6011: while(i != j) 6011: s.insert(s.end(), *i++); 6011: return named_subexpression(&*s.begin(), &*s.begin() + s.size()); 6011: } 6011: int named_subexpression_index(const char_type* i, const char_type* j) const 6011: { 6011: 6011: 6011: 6011: 6011: 6011: if(m_is_singular) 6011: raise_logic_error(); 6011: re_detail_106501::named_subexpressions::range_type s, r; 6011: s = r = m_named_subs->equal_range(i, j); 6011: while((r.first != r.second) && ((*this)[r.first->index].matched == false)) 6011: ++r.first; 6011: if(r.first == r.second) 6011: r = s; 6011: return r.first != r.second ? r.first->index : -20; 6011: } 6011: template 6011: int named_subexpression_index(const charT* i, const charT* j) const 6011: { 6011: static_assert(sizeof(charT) <= sizeof(char_type), "sizeof(charT) <= sizeof(char_type)"); 6011: if(i == j) 6011: return -20; 6011: std::vector s; 6011: while(i != j) 6011: s.insert(s.end(), *i++); 6011: return named_subexpression_index(&*s.begin(), &*s.begin() + s.size()); 6011: } 6011: template 6011: const_reference operator[](const std::basic_string& s) const 6011: { 6011: return named_subexpression(s.c_str(), s.c_str() + s.size()); 6011: } 6011: const_reference operator[](const char_type* p) const 6011: { 6011: const char_type* e = p; 6011: while(*e) ++e; 6011: return named_subexpression(p, e); 6011: } 6011: 6011: template 6011: const_reference operator[](const charT* p) const 6011: { 6011: static_assert(sizeof(charT) <= sizeof(char_type), "sizeof(charT) <= sizeof(char_type)"); 6011: if(*p == 0) 6011: return m_null; 6011: std::vector s; 6011: while(*p) 6011: s.insert(s.end(), *p++); 6011: return named_subexpression(&*s.begin(), &*s.begin() + s.size()); 6011: } 6011: template 6011: const_reference operator[](const std::basic_string& ns) const 6011: { 6011: static_assert(sizeof(charT) <= sizeof(char_type), "sizeof(charT) <= sizeof(char_type)"); 6011: if(ns.empty()) 6011: return m_null; 6011: std::vector s; 6011: for(unsigned i = 0; i < ns.size(); ++i) 6011: s.insert(s.end(), ns[i]); 6011: return named_subexpression(&*s.begin(), &*s.begin() + s.size()); 6011: } 6011: 6011: const_reference prefix() const 6011: { 6011: if(m_is_singular) 6011: raise_logic_error(); 6011: return (*this)[-1]; 6011: } 6011: 6011: const_reference suffix() const 6011: { 6011: if(m_is_singular) 6011: raise_logic_error(); 6011: return (*this)[-2]; 6011: } 6011: const_iterator begin() const 6011: { 6011: return (m_subs.size() > 2) ? (m_subs.begin() + 2) : m_subs.end(); 6011: } 6011: const_iterator end() const 6011: { 6011: return m_subs.end(); 6011: } 6011: 6011: template 6011: OutputIterator format(OutputIterator out, 6011: Functor fmt, 6011: match_flag_type flags = format_default) const 6011: { 6011: if(m_is_singular) 6011: raise_logic_error(); 6011: typedef typename re_detail_106501::compute_functor_type, OutputIterator>::type F; 6011: F func(fmt); 6011: return func(*this, out, flags); 6011: } 6011: template 6011: string_type format(Functor fmt, match_flag_type flags = format_default) const 6011: { 6011: if(m_is_singular) 6011: raise_logic_error(); 6011: std::basic_string result; 6011: re_detail_106501::string_out_iterator > i(result); 6011: 6011: typedef typename re_detail_106501::compute_functor_type, re_detail_106501::string_out_iterator > >::type F; 6011: F func(fmt); 6011: 6011: func(*this, i, flags); 6011: return result; 6011: } 6011: 6011: template 6011: OutputIterator format(OutputIterator out, 6011: Functor fmt, 6011: match_flag_type flags, 6011: const RegexT& re) const 6011: { 6011: if(m_is_singular) 6011: raise_logic_error(); 6011: typedef ::boost::regex_traits_wrapper traits_type; 6011: typedef typename re_detail_106501::compute_functor_type, OutputIterator, traits_type>::type F; 6011: F func(fmt); 6011: return func(*this, out, flags, re.get_traits()); 6011: } 6011: template 6011: string_type format(Functor fmt, 6011: match_flag_type flags, 6011: const RegexT& re) const 6011: { 6011: if(m_is_singular) 6011: raise_logic_error(); 6011: typedef ::boost::regex_traits_wrapper traits_type; 6011: std::basic_string result; 6011: re_detail_106501::string_out_iterator > i(result); 6011: 6011: typedef typename re_detail_106501::compute_functor_type, re_detail_106501::string_out_iterator >, traits_type >::type F; 6011: F func(fmt); 6011: 6011: func(*this, i, flags, re.get_traits()); 6011: return result; 6011: } 6011: 6011: const_reference get_last_closed_paren()const 6011: { 6011: if(m_is_singular) 6011: raise_logic_error(); 6011: return m_last_closed_paren == 0 ? m_null : (*this)[m_last_closed_paren]; 6011: } 6011: 6011: allocator_type get_allocator() const 6011: { 6011: 6011: return m_subs.get_allocator(); 6011: 6011: 6011: 6011: } 6011: void swap(match_results& that) 6011: { 6011: std::swap(m_subs, that.m_subs); 6011: std::swap(m_named_subs, that.m_named_subs); 6011: std::swap(m_last_closed_paren, that.m_last_closed_paren); 6011: if(m_is_singular) 6011: { 6011: if(!that.m_is_singular) 6011: { 6011: m_base = that.m_base; 6011: m_null = that.m_null; 6011: } 6011: } 6011: else if(that.m_is_singular) 6011: { 6011: that.m_base = m_base; 6011: that.m_null = m_null; 6011: } 6011: else 6011: { 6011: std::swap(m_base, that.m_base); 6011: std::swap(m_null, that.m_null); 6011: } 6011: std::swap(m_is_singular, that.m_is_singular); 6011: } 6011: bool operator==(const match_results& that)const 6011: { 6011: if(m_is_singular) 6011: { 6011: return that.m_is_singular; 6011: } 6011: else if(that.m_is_singular) 6011: { 6011: return false; 6011: } 6011: return (m_subs == that.m_subs) && (m_base == that.m_base) && (m_last_closed_paren == that.m_last_closed_paren); 6011: } 6011: bool operator!=(const match_results& that)const 6011: { return !(*this == that); } 6011: # 466 "/usr/include/boost/regex/v4/match_results.hpp" 3 4 6011: void set_second(BidiIterator i) 6011: { 6011: (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__)); 6011: m_subs[2].second = i; 6011: m_subs[2].matched = true; 6011: m_subs[0].first = i; 6011: m_subs[0].matched = (m_subs[0].first != m_subs[0].second); 6011: m_null.first = i; 6011: m_null.second = i; 6011: m_null.matched = false; 6011: m_is_singular = false; 6011: } 6011: 6011: void set_second(BidiIterator i, size_type pos, bool m = true, bool escape_k = false) 6011: { 6011: if(pos) 6011: m_last_closed_paren = static_cast(pos); 6011: pos += 2; 6011: (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__)); 6011: m_subs[pos].second = i; 6011: m_subs[pos].matched = m; 6011: if((pos == 2) && !escape_k) 6011: { 6011: m_subs[0].first = i; 6011: m_subs[0].matched = (m_subs[0].first != m_subs[0].second); 6011: m_null.first = i; 6011: m_null.second = i; 6011: m_null.matched = false; 6011: m_is_singular = false; 6011: } 6011: } 6011: void set_size(size_type n, BidiIterator i, BidiIterator j) 6011: { 6011: value_type v(j); 6011: size_type len = m_subs.size(); 6011: if(len > n + 2) 6011: { 6011: m_subs.erase(m_subs.begin()+n+2, m_subs.end()); 6011: std::fill(m_subs.begin(), m_subs.end(), v); 6011: } 6011: else 6011: { 6011: std::fill(m_subs.begin(), m_subs.end(), v); 6011: if(n+2 != len) 6011: m_subs.insert(m_subs.end(), n+2-len, v); 6011: } 6011: m_subs[1].first = i; 6011: m_last_closed_paren = 0; 6011: } 6011: void set_base(BidiIterator pos) 6011: { 6011: m_base = pos; 6011: } 6011: BidiIterator base()const 6011: { 6011: return m_base; 6011: } 6011: void set_first(BidiIterator i) 6011: { 6011: (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__)); 6011: 6011: m_subs[1].second = i; 6011: m_subs[1].matched = (m_subs[1].first != i); 6011: 6011: m_subs[2].first = i; 6011: 6011: for(size_type n = 3; n < m_subs.size(); ++n) 6011: { 6011: m_subs[n].first = m_subs[n].second = m_subs[0].second; 6011: m_subs[n].matched = false; 6011: } 6011: } 6011: void set_first(BidiIterator i, size_type pos, bool escape_k = false) 6011: { 6011: (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__)); 6011: if(pos || escape_k) 6011: { 6011: m_subs[pos+2].first = i; 6011: if(escape_k) 6011: { 6011: m_subs[1].second = i; 6011: m_subs[1].matched = (m_subs[1].first != m_subs[1].second); 6011: } 6011: } 6011: else 6011: set_first(i); 6011: } 6011: void maybe_assign(const match_results& m); 6011: 6011: void set_named_subs(boost::shared_ptr subs) 6011: { 6011: m_named_subs = subs; 6011: } 6011: 6011: private: 6011: 6011: 6011: 6011: static void raise_logic_error() 6011: { 6011: std::logic_error e("Attempt to access an uninitialzed boost::match_results<> class."); 6011: boost::throw_exception(e); 6011: } 6011: 6011: 6011: vector_type m_subs; 6011: BidiIterator m_base; 6011: sub_match m_null; 6011: boost::shared_ptr m_named_subs; 6011: int m_last_closed_paren; 6011: bool m_is_singular; 6011: }; 6011: 6011: template 6011: void match_results::maybe_assign(const match_results& m) 6011: { 6011: if(m_is_singular) 6011: { 6011: *this = m; 6011: return; 6011: } 6011: const_iterator p1, p2; 6011: p1 = begin(); 6011: p2 = m.begin(); 6011: # 600 "/usr/include/boost/regex/v4/match_results.hpp" 3 4 6011: BidiIterator l_end = this->suffix().second; 6011: BidiIterator l_base = (p1->first == l_end) ? this->prefix().first : (*this)[0].first; 6011: difference_type len1 = 0; 6011: difference_type len2 = 0; 6011: difference_type base1 = 0; 6011: difference_type base2 = 0; 6011: std::size_t i; 6011: for(i = 0; i < size(); ++i, ++p1, ++p2) 6011: { 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: if(p1->first == l_end) 6011: { 6011: if(p2->first != l_end) 6011: { 6011: 6011: 6011: base1 = 1; 6011: base2 = 0; 6011: break; 6011: } 6011: else 6011: { 6011: 6011: 6011: if((p1->matched == false) && (p2->matched == true)) 6011: break; 6011: if((p1->matched == true) && (p2->matched == false)) 6011: return; 6011: continue; 6011: } 6011: } 6011: else if(p2->first == l_end) 6011: { 6011: 6011: return; 6011: } 6011: base1 = ::boost::re_detail_106501::distance(l_base, p1->first); 6011: base2 = ::boost::re_detail_106501::distance(l_base, p2->first); 6011: (static_cast (base1 >= 0) ? void (0) : __assert_fail ("base1 >= 0", "/usr/include/boost/regex/v4/match_results.hpp", 644, __extension__ __PRETTY_FUNCTION__)); 6011: (static_cast (base2 >= 0) ? void (0) : __assert_fail ("base2 >= 0", "/usr/include/boost/regex/v4/match_results.hpp", 645, __extension__ __PRETTY_FUNCTION__)); 6011: if(base1 < base2) return; 6011: if(base2 < base1) break; 6011: 6011: len1 = ::boost::re_detail_106501::distance((BidiIterator)p1->first, (BidiIterator)p1->second); 6011: len2 = ::boost::re_detail_106501::distance((BidiIterator)p2->first, (BidiIterator)p2->second); 6011: (static_cast (len1 >= 0) ? void (0) : __assert_fail ("len1 >= 0", "/usr/include/boost/regex/v4/match_results.hpp", 651, __extension__ __PRETTY_FUNCTION__)); 6011: (static_cast (len2 >= 0) ? void (0) : __assert_fail ("len2 >= 0", "/usr/include/boost/regex/v4/match_results.hpp", 652, __extension__ __PRETTY_FUNCTION__)); 6011: if((len1 != len2) || ((p1->matched == false) && (p2->matched == true))) 6011: break; 6011: if((p1->matched == true) && (p2->matched == false)) 6011: return; 6011: } 6011: if(i == size()) 6011: return; 6011: if(base2 < base1) 6011: *this = m; 6011: else if((len2 > len1) || ((p1->matched == false) && (p2->matched == true)) ) 6011: *this = m; 6011: } 6011: 6011: template 6011: void swap(match_results& a, match_results& b) 6011: { 6011: a.swap(b); 6011: } 6011: 6011: 6011: template 6011: std::basic_ostream& 6011: operator << (std::basic_ostream& os, 6011: const match_results& s) 6011: { 6011: return (os << s.str()); 6011: } 6011: # 692 "/usr/include/boost/regex/v4/match_results.hpp" 3 4 6011: } 6011: # 83 "/usr/include/boost/regex/v4/regex.hpp" 2 3 4 6011: 6011: 6011: # 1 "/usr/include/boost/regex/v4/protected_call.hpp" 1 3 4 6011: # 34 "/usr/include/boost/regex/v4/protected_call.hpp" 3 4 6011: namespace boost{ 6011: namespace re_detail_106501{ 6011: 6011: class abstract_protected_call 6011: { 6011: public: 6011: bool execute()const; 6011: 6011: virtual ~abstract_protected_call(){} 6011: private: 6011: virtual bool call()const = 0; 6011: }; 6011: 6011: template 6011: class concrete_protected_call 6011: : public abstract_protected_call 6011: { 6011: public: 6011: typedef bool (T::*proc_type)(); 6011: concrete_protected_call(T* o, proc_type p) 6011: : obj(o), proc(p) {} 6011: private: 6011: virtual bool call()const; 6011: T* obj; 6011: proc_type proc; 6011: }; 6011: 6011: template 6011: bool concrete_protected_call::call()const 6011: { 6011: return (obj->*proc)(); 6011: } 6011: 6011: } 6011: } 6011: # 86 "/usr/include/boost/regex/v4/regex.hpp" 2 3 4 6011: 6011: 6011: # 1 "/usr/include/boost/regex/v4/perl_matcher.hpp" 1 3 4 6011: # 15 "/usr/include/boost/regex/v4/perl_matcher.hpp" 3 4 6011: # 1 "/usr/include/boost/regex/v4/iterator_category.hpp" 1 3 4 6011: # 28 "/usr/include/boost/regex/v4/iterator_category.hpp" 3 4 6011: namespace boost{ 6011: namespace detail{ 6011: 6011: template 6011: struct is_random_imp 6011: { 6011: 6011: private: 6011: typedef typename std::iterator_traits::iterator_category cat; 6011: public: 6011: static const bool value = (::boost::is_convertible::value); 6011: 6011: 6011: 6011: }; 6011: 6011: template 6011: struct is_random_pointer_imp 6011: { 6011: static const bool value = true; 6011: }; 6011: 6011: template 6011: struct is_random_imp_selector 6011: { 6011: template 6011: struct rebind 6011: { 6011: typedef is_random_imp type; 6011: }; 6011: }; 6011: 6011: template <> 6011: struct is_random_imp_selector 6011: { 6011: template 6011: struct rebind 6011: { 6011: typedef is_random_pointer_imp type; 6011: }; 6011: }; 6011: 6011: } 6011: 6011: template 6011: struct is_random_access_iterator 6011: { 6011: private: 6011: typedef detail::is_random_imp_selector< ::boost::is_pointer::value> selector; 6011: typedef typename selector::template rebind bound_type; 6011: typedef typename bound_type::type answer; 6011: public: 6011: static const bool value = answer::value; 6011: }; 6011: 6011: 6011: template 6011: const bool is_random_access_iterator::value; 6011: 6011: 6011: } 6011: # 16 "/usr/include/boost/regex/v4/perl_matcher.hpp" 2 3 4 6011: # 33 "/usr/include/boost/regex/v4/perl_matcher.hpp" 3 4 6011: namespace boost{ 6011: namespace re_detail_106501{ 6011: 6011: 6011: 6011: 6011: void verify_options(boost::regex_constants::syntax_option_type ef, match_flag_type mf); 6011: 6011: 6011: 6011: template 6011: inline bool can_start(charT c, const unsigned char* map, unsigned char mask) 6011: { 6011: return ((c < static_cast(0)) ? true : ((c >= static_cast(1 << 8)) ? true : map[c] & mask)); 6011: } 6011: inline bool can_start(char c, const unsigned char* map, unsigned char mask) 6011: { 6011: return map[(unsigned char)c] & mask; 6011: } 6011: inline bool can_start(signed char c, const unsigned char* map, unsigned char mask) 6011: { 6011: return map[(unsigned char)c] & mask; 6011: } 6011: inline bool can_start(unsigned char c, const unsigned char* map, unsigned char mask) 6011: { 6011: return map[c] & mask; 6011: } 6011: inline bool can_start(unsigned short c, const unsigned char* map, unsigned char mask) 6011: { 6011: return ((c >= (1 << 8)) ? true : map[c] & mask); 6011: } 6011: 6011: 6011: inline bool can_start(wchar_t c, const unsigned char* map, unsigned char mask) 6011: { 6011: return ((c >= static_cast(1u << 8)) ? true : map[c] & mask); 6011: } 6011: 6011: 6011: 6011: inline bool can_start(unsigned int c, const unsigned char* map, unsigned char mask) 6011: { 6011: return (((c >= static_cast(1u << 8)) ? true : map[c] & mask)); 6011: } 6011: # 89 "/usr/include/boost/regex/v4/perl_matcher.hpp" 3 4 6011: template 6011: inline int string_compare(const std::basic_string& s, const C* p) 6011: { 6011: if(0 == *p) 6011: { 6011: if(s.empty() || ((s.size() == 1) && (s[0] == 0))) 6011: return 0; 6011: } 6011: return s.compare(p); 6011: } 6011: # 117 "/usr/include/boost/regex/v4/perl_matcher.hpp" 3 4 6011: template 6011: inline int string_compare(const Seq& s, const C* p) 6011: { 6011: std::size_t i = 0; 6011: while((i < s.size()) && (p[i] == s[i])) 6011: { 6011: ++i; 6011: } 6011: return (i == s.size()) ? -p[i] : s[i] - p[i]; 6011: } 6011: 6011: 6011: template 6011: inline const charT* re_skip_past_null(const charT* p) 6011: { 6011: while (*p != static_cast(0)) ++p; 6011: return ++p; 6011: } 6011: 6011: template 6011: iterator re_is_set_member(iterator next, 6011: iterator last, 6011: const re_set_long* set_, 6011: const regex_data& e, bool icase) 6011: { 6011: const charT* p = reinterpret_cast(set_+1); 6011: iterator ptr; 6011: unsigned int i; 6011: 6011: 6011: if(next == last) return next; 6011: 6011: typedef typename traits_type::string_type traits_string_type; 6011: const ::boost::regex_traits_wrapper& traits_inst = *(e.m_ptraits); 6011: 6011: 6011: 6011: (void)traits_inst; 6011: 6011: 6011: 6011: for(i = 0; i < set_->csingles; ++i) 6011: { 6011: ptr = next; 6011: if(*p == static_cast(0)) 6011: { 6011: 6011: if(traits_inst.translate(*ptr, icase)) 6011: { 6011: ++p; 6011: continue; 6011: } 6011: return set_->isnot ? next : (ptr == next) ? ++next : ptr; 6011: } 6011: else 6011: { 6011: while(*p && (ptr != last)) 6011: { 6011: if(traits_inst.translate(*ptr, icase) != *p) 6011: break; 6011: ++p; 6011: ++ptr; 6011: } 6011: 6011: if(*p == static_cast(0)) 6011: return set_->isnot ? next : (ptr == next) ? ++next : ptr; 6011: 6011: p = re_skip_past_null(p); 6011: } 6011: } 6011: 6011: charT col = traits_inst.translate(*next, icase); 6011: 6011: 6011: if(set_->cranges || set_->cequivalents) 6011: { 6011: traits_string_type s1; 6011: 6011: 6011: if(set_->cranges) 6011: { 6011: if((e.m_flags & regex_constants::collate) == 0) 6011: s1.assign(1, col); 6011: else 6011: { 6011: charT a[2] = { col, charT(0), }; 6011: s1 = traits_inst.transform(a, a + 1); 6011: } 6011: for(i = 0; i < set_->cranges; ++i) 6011: { 6011: if(string_compare(s1,p) >= 0) 6011: { 6011: do{ ++p; }while(*p); 6011: ++p; 6011: if(string_compare(s1,p) <= 0) 6011: return set_->isnot ? next : ++next; 6011: } 6011: else 6011: { 6011: 6011: do{ ++p; }while(*p); 6011: ++p; 6011: } 6011: 6011: do{ ++p; }while(*p); 6011: ++p; 6011: } 6011: } 6011: 6011: 6011: if(set_->cequivalents) 6011: { 6011: charT a[2] = { col, charT(0), }; 6011: s1 = traits_inst.transform_primary(a, a +1); 6011: for(i = 0; i < set_->cequivalents; ++i) 6011: { 6011: if(string_compare(s1,p) == 0) 6011: return set_->isnot ? next : ++next; 6011: 6011: do{ ++p; }while(*p); 6011: ++p; 6011: } 6011: } 6011: } 6011: if(traits_inst.isctype(col, set_->cclasses) == true) 6011: return set_->isnot ? next : ++next; 6011: if((set_->cnclasses != 0) && (traits_inst.isctype(col, set_->cnclasses) == false)) 6011: return set_->isnot ? next : ++next; 6011: return set_->isnot ? ++next : next; 6011: } 6011: 6011: template 6011: class repeater_count 6011: { 6011: repeater_count** stack; 6011: repeater_count* next; 6011: int state_id; 6011: std::size_t count; 6011: BidiIterator start_pos; 6011: 6011: repeater_count* unwind_until(int n, repeater_count* p, int current_recursion_id) 6011: { 6011: while(p && (p->state_id != n)) 6011: { 6011: if(-2 - current_recursion_id == p->state_id) 6011: return 0; 6011: p = p->next; 6011: if(p && (p->state_id < 0)) 6011: { 6011: p = unwind_until(p->state_id, p, current_recursion_id); 6011: if(!p) 6011: return p; 6011: p = p->next; 6011: } 6011: } 6011: return p; 6011: } 6011: public: 6011: repeater_count(repeater_count** s) : stack(s), next(0), state_id(-1), count(0), start_pos() {} 6011: 6011: repeater_count(int i, repeater_count** s, BidiIterator start, int current_recursion_id) 6011: : start_pos(start) 6011: { 6011: state_id = i; 6011: stack = s; 6011: next = *stack; 6011: *stack = this; 6011: if((state_id > next->state_id) && (next->state_id >= 0)) 6011: count = 0; 6011: else 6011: { 6011: repeater_count* p = next; 6011: p = unwind_until(state_id, p, current_recursion_id); 6011: if(p) 6011: { 6011: count = p->count; 6011: start_pos = p->start_pos; 6011: } 6011: else 6011: count = 0; 6011: } 6011: } 6011: ~repeater_count() 6011: { 6011: if(next) 6011: *stack = next; 6011: } 6011: std::size_t get_count() { return count; } 6011: int get_id() { return state_id; } 6011: std::size_t operator++() { return ++count; } 6011: bool check_null_repeat(const BidiIterator& pos, std::size_t max) 6011: { 6011: 6011: 6011: 6011: bool result = (count == 0) ? false : (pos == start_pos); 6011: if(result) 6011: count = max; 6011: else 6011: start_pos = pos; 6011: return result; 6011: } 6011: }; 6011: 6011: struct saved_state; 6011: 6011: enum saved_state_type 6011: { 6011: saved_type_end = 0, 6011: saved_type_paren = 1, 6011: saved_type_recurse = 2, 6011: saved_type_assertion = 3, 6011: saved_state_alt = 4, 6011: saved_state_repeater_count = 5, 6011: saved_state_extra_block = 6, 6011: saved_state_greedy_single_repeat = 7, 6011: saved_state_rep_slow_dot = 8, 6011: saved_state_rep_fast_dot = 9, 6011: saved_state_rep_char = 10, 6011: saved_state_rep_short_set = 11, 6011: saved_state_rep_long_set = 12, 6011: saved_state_non_greedy_long_repeat = 13, 6011: saved_state_count = 14 6011: }; 6011: 6011: template 6011: struct recursion_info 6011: { 6011: typedef typename Results::value_type value_type; 6011: typedef typename value_type::iterator iterator; 6011: int idx; 6011: const re_syntax_base* preturn_address; 6011: Results results; 6011: repeater_count* repeater_stack; 6011: iterator location_of_start; 6011: }; 6011: # 362 "/usr/include/boost/regex/v4/perl_matcher.hpp" 3 4 6011: template 6011: class perl_matcher 6011: { 6011: public: 6011: typedef typename traits::char_type char_type; 6011: typedef perl_matcher self_type; 6011: typedef bool (self_type::*matcher_proc_type)(void); 6011: typedef std::size_t traits_size_type; 6011: typedef typename is_byte::width_type width_type; 6011: typedef typename regex_iterator_traits::difference_type difference_type; 6011: typedef match_results results_type; 6011: 6011: perl_matcher(BidiIterator first, BidiIterator end, 6011: match_results& what, 6011: const basic_regex& e, 6011: match_flag_type f, 6011: BidiIterator l_base) 6011: : m_result(what), base(first), last(end), 6011: position(first), backstop(l_base), re(e), traits_inst(e.get_traits()), 6011: m_independent(false), next_count(&rep_obj), rep_obj(&next_count) 6011: { 6011: construct_init(e, f); 6011: } 6011: 6011: bool match(); 6011: bool find(); 6011: 6011: void setf(match_flag_type f) 6011: { m_match_flags |= f; } 6011: void unsetf(match_flag_type f) 6011: { m_match_flags &= ~f; } 6011: 6011: private: 6011: void construct_init(const basic_regex& e, match_flag_type f); 6011: 6011: bool find_imp(); 6011: bool match_imp(); 6011: 6011: 6011: 6011: 6011: void estimate_max_state_count(std::random_access_iterator_tag*); 6011: void estimate_max_state_count(void*); 6011: bool match_prefix(); 6011: bool match_all_states(); 6011: 6011: 6011: bool match_startmark(); 6011: bool match_endmark(); 6011: bool match_literal(); 6011: bool match_start_line(); 6011: bool match_end_line(); 6011: bool match_wild(); 6011: bool match_match(); 6011: bool match_word_boundary(); 6011: bool match_within_word(); 6011: bool match_word_start(); 6011: bool match_word_end(); 6011: bool match_buffer_start(); 6011: bool match_buffer_end(); 6011: bool match_backref(); 6011: bool match_long_set(); 6011: bool match_set(); 6011: bool match_jump(); 6011: bool match_alt(); 6011: bool match_rep(); 6011: bool match_combining(); 6011: bool match_soft_buffer_end(); 6011: bool match_restart_continue(); 6011: bool match_long_set_repeat(); 6011: bool match_set_repeat(); 6011: bool match_char_repeat(); 6011: bool match_dot_repeat_fast(); 6011: bool match_dot_repeat_slow(); 6011: bool match_dot_repeat_dispatch() 6011: { 6011: return ::boost::is_random_access_iterator::value ? match_dot_repeat_fast() : match_dot_repeat_slow(); 6011: } 6011: bool match_backstep(); 6011: bool match_assert_backref(); 6011: bool match_toggle_case(); 6011: 6011: 6011: 6011: bool match_recursion(); 6011: bool match_fail(); 6011: bool match_accept(); 6011: bool match_commit(); 6011: bool match_then(); 6011: bool skip_until_paren(int index, bool match = true); 6011: 6011: 6011: bool find_restart_any(); 6011: bool find_restart_word(); 6011: bool find_restart_line(); 6011: bool find_restart_buf(); 6011: bool find_restart_lit(); 6011: 6011: private: 6011: 6011: match_results& m_result; 6011: 6011: scoped_ptr > m_temp_match; 6011: 6011: match_results* m_presult; 6011: 6011: BidiIterator base; 6011: 6011: BidiIterator last; 6011: 6011: BidiIterator position; 6011: 6011: BidiIterator restart; 6011: 6011: BidiIterator search_base; 6011: 6011: BidiIterator backstop; 6011: 6011: const basic_regex& re; 6011: 6011: const ::boost::regex_traits_wrapper& traits_inst; 6011: 6011: const re_syntax_base* pstate; 6011: 6011: match_flag_type m_match_flags; 6011: 6011: std::ptrdiff_t state_count; 6011: 6011: std::ptrdiff_t max_state_count; 6011: 6011: bool icase; 6011: 6011: bool m_has_partial_match; 6011: 6011: bool m_has_found_match; 6011: 6011: bool m_independent; 6011: 6011: repeater_count* next_count; 6011: 6011: repeater_count rep_obj; 6011: 6011: typename traits::char_class_type m_word_mask; 6011: 6011: unsigned char match_any_mask; 6011: 6011: std::vector > recursion_stack; 6011: # 519 "/usr/include/boost/regex/v4/perl_matcher.hpp" 3 4 6011: typedef bool (self_type::*unwind_proc_type)(bool); 6011: 6011: void extend_stack(); 6011: bool unwind(bool); 6011: bool unwind_end(bool); 6011: bool unwind_paren(bool); 6011: bool unwind_recursion_stopper(bool); 6011: bool unwind_assertion(bool); 6011: bool unwind_alt(bool); 6011: bool unwind_repeater_counter(bool); 6011: bool unwind_extra_block(bool); 6011: bool unwind_greedy_single_repeat(bool); 6011: bool unwind_slow_dot_repeat(bool); 6011: bool unwind_fast_dot_repeat(bool); 6011: bool unwind_char_repeat(bool); 6011: bool unwind_short_set_repeat(bool); 6011: bool unwind_long_set_repeat(bool); 6011: bool unwind_non_greedy_repeat(bool); 6011: bool unwind_recursion(bool); 6011: bool unwind_recursion_pop(bool); 6011: bool unwind_commit(bool); 6011: bool unwind_then(bool); 6011: bool unwind_case(bool); 6011: void destroy_single_repeat(); 6011: void push_matched_paren(int index, const sub_match& sub); 6011: void push_recursion_stopper(); 6011: void push_assertion(const re_syntax_base* ps, bool positive); 6011: void push_alt(const re_syntax_base* ps); 6011: void push_repeater_count(int i, repeater_count** s); 6011: void push_single_repeat(std::size_t c, const re_repeat* r, BidiIterator last_position, int state_id); 6011: void push_non_greedy_repeat(const re_syntax_base* ps); 6011: void push_recursion(int idx, const re_syntax_base* p, results_type* presults); 6011: void push_recursion_pop(); 6011: void push_case_change(bool); 6011: 6011: 6011: saved_state* m_stack_base; 6011: 6011: saved_state* m_backup_state; 6011: 6011: unsigned used_block_count; 6011: 6011: 6011: bool m_recursive_result; 6011: 6011: bool m_unwound_lookahead; 6011: 6011: bool m_unwound_alt; 6011: 6011: 6011: 6011: 6011: 6011: 6011: perl_matcher& operator=(const perl_matcher&) 6011: { 6011: return *this; 6011: } 6011: perl_matcher(const perl_matcher& that) 6011: : m_result(that.m_result), re(that.re), traits_inst(that.traits_inst), rep_obj(0) {} 6011: }; 6011: 6011: 6011: 6011: 6011: 6011: } 6011: # 598 "/usr/include/boost/regex/v4/perl_matcher.hpp" 3 4 6011: } 6011: # 610 "/usr/include/boost/regex/v4/perl_matcher.hpp" 3 4 6011: # 1 "/usr/include/boost/regex/v4/perl_matcher_non_recursive.hpp" 1 3 4 6011: # 40 "/usr/include/boost/regex/v4/perl_matcher_non_recursive.hpp" 3 4 6011: namespace boost{ 6011: namespace re_detail_106501{ 6011: 6011: template 6011: inline void inplace_destroy(T* p) 6011: { 6011: (void)p; 6011: p->~T(); 6011: } 6011: 6011: struct saved_state 6011: { 6011: union{ 6011: unsigned int state_id; 6011: 6011: std::size_t padding1; 6011: std::ptrdiff_t padding2; 6011: void* padding3; 6011: }; 6011: saved_state(unsigned i) : state_id(i) {} 6011: }; 6011: 6011: template 6011: struct saved_matched_paren : public saved_state 6011: { 6011: int index; 6011: sub_match sub; 6011: saved_matched_paren(int i, const sub_match& s) : saved_state(1), index(i), sub(s){}; 6011: }; 6011: 6011: template 6011: struct saved_position : public saved_state 6011: { 6011: const re_syntax_base* pstate; 6011: BidiIterator position; 6011: saved_position(const re_syntax_base* ps, BidiIterator pos, int i) : saved_state(i), pstate(ps), position(pos){}; 6011: }; 6011: 6011: template 6011: struct saved_assertion : public saved_position 6011: { 6011: bool positive; 6011: saved_assertion(bool p, const re_syntax_base* ps, BidiIterator pos) 6011: : saved_position(ps, pos, saved_type_assertion), positive(p){}; 6011: }; 6011: 6011: template 6011: struct saved_repeater : public saved_state 6011: { 6011: repeater_count count; 6011: saved_repeater(int i, repeater_count** s, BidiIterator start, int current_recursion_id) 6011: : saved_state(saved_state_repeater_count), count(i, s, start, current_recursion_id){} 6011: }; 6011: 6011: struct saved_extra_block : public saved_state 6011: { 6011: saved_state *base, *end; 6011: saved_extra_block(saved_state* b, saved_state* e) 6011: : saved_state(saved_state_extra_block), base(b), end(e) {} 6011: }; 6011: 6011: struct save_state_init 6011: { 6011: saved_state** stack; 6011: save_state_init(saved_state** base, saved_state** end) 6011: : stack(base) 6011: { 6011: *base = static_cast(get_mem_block()); 6011: *end = reinterpret_cast(reinterpret_cast(*base)+4096); 6011: --(*end); 6011: (void) new (*end)saved_state(0); 6011: (static_cast (*end > *base) ? void (0) : __assert_fail ("*end > *base", "/usr/include/boost/regex/v4/perl_matcher_non_recursive.hpp", 111, __extension__ __PRETTY_FUNCTION__)); 6011: } 6011: ~save_state_init() 6011: { 6011: put_mem_block(*stack); 6011: *stack = 0; 6011: } 6011: }; 6011: 6011: template 6011: struct saved_single_repeat : public saved_state 6011: { 6011: std::size_t count; 6011: const re_repeat* rep; 6011: BidiIterator last_position; 6011: saved_single_repeat(std::size_t c, const re_repeat* r, BidiIterator lp, int arg_id) 6011: : saved_state(arg_id), count(c), rep(r), last_position(lp){} 6011: }; 6011: 6011: template 6011: struct saved_recursion : public saved_state 6011: { 6011: saved_recursion(int idx, const re_syntax_base* p, Results* pr) 6011: : saved_state(14), recursion_id(idx), preturn_address(p), results(*pr) {} 6011: int recursion_id; 6011: const re_syntax_base* preturn_address; 6011: Results results; 6011: }; 6011: 6011: struct saved_change_case : public saved_state 6011: { 6011: bool icase; 6011: saved_change_case(bool c) : saved_state(18), icase(c) {} 6011: }; 6011: 6011: template 6011: bool perl_matcher::match_all_states() 6011: { 6011: static matcher_proc_type const s_match_vtable[34] = 6011: { 6011: (&perl_matcher::match_startmark), 6011: &perl_matcher::match_endmark, 6011: &perl_matcher::match_literal, 6011: &perl_matcher::match_start_line, 6011: &perl_matcher::match_end_line, 6011: &perl_matcher::match_wild, 6011: &perl_matcher::match_match, 6011: &perl_matcher::match_word_boundary, 6011: &perl_matcher::match_within_word, 6011: &perl_matcher::match_word_start, 6011: &perl_matcher::match_word_end, 6011: &perl_matcher::match_buffer_start, 6011: &perl_matcher::match_buffer_end, 6011: &perl_matcher::match_backref, 6011: &perl_matcher::match_long_set, 6011: &perl_matcher::match_set, 6011: &perl_matcher::match_jump, 6011: &perl_matcher::match_alt, 6011: &perl_matcher::match_rep, 6011: &perl_matcher::match_combining, 6011: &perl_matcher::match_soft_buffer_end, 6011: &perl_matcher::match_restart_continue, 6011: 6011: 6011: 6011: 6011: &perl_matcher::match_dot_repeat_dispatch, 6011: &perl_matcher::match_char_repeat, 6011: &perl_matcher::match_set_repeat, 6011: &perl_matcher::match_long_set_repeat, 6011: &perl_matcher::match_backstep, 6011: &perl_matcher::match_assert_backref, 6011: &perl_matcher::match_toggle_case, 6011: &perl_matcher::match_recursion, 6011: &perl_matcher::match_fail, 6011: &perl_matcher::match_accept, 6011: &perl_matcher::match_commit, 6011: &perl_matcher::match_then, 6011: }; 6011: 6011: push_recursion_stopper(); 6011: do{ 6011: while(pstate) 6011: { 6011: matcher_proc_type proc = s_match_vtable[pstate->type]; 6011: ++state_count; 6011: if(!(this->*proc)()) 6011: { 6011: if(state_count > max_state_count) 6011: raise_error(traits_inst, regex_constants::error_complexity); 6011: if((m_match_flags & match_partial) && (position == last) && (position != search_base)) 6011: m_has_partial_match = true; 6011: bool successful_unwind = unwind(false); 6011: if((m_match_flags & match_partial) && (position == last) && (position != search_base)) 6011: m_has_partial_match = true; 6011: if(false == successful_unwind) 6011: return m_recursive_result; 6011: } 6011: } 6011: }while(unwind(true)); 6011: return m_recursive_result; 6011: } 6011: 6011: template 6011: void perl_matcher::extend_stack() 6011: { 6011: if(used_block_count) 6011: { 6011: --used_block_count; 6011: saved_state* stack_base; 6011: saved_state* backup_state; 6011: stack_base = static_cast(get_mem_block()); 6011: backup_state = reinterpret_cast(reinterpret_cast(stack_base)+4096); 6011: saved_extra_block* block = static_cast(backup_state); 6011: --block; 6011: (void) new (block) saved_extra_block(m_stack_base, m_backup_state); 6011: m_stack_base = stack_base; 6011: m_backup_state = block; 6011: } 6011: else 6011: raise_error(traits_inst, regex_constants::error_stack); 6011: } 6011: 6011: template 6011: inline void perl_matcher::push_matched_paren(int index, const sub_match& sub) 6011: { 6011: 6011: saved_matched_paren* pmp = static_cast*>(m_backup_state); 6011: --pmp; 6011: if(pmp < m_stack_base) 6011: { 6011: extend_stack(); 6011: pmp = static_cast*>(m_backup_state); 6011: --pmp; 6011: } 6011: (void) new (pmp)saved_matched_paren(index, sub); 6011: m_backup_state = pmp; 6011: } 6011: 6011: template 6011: inline void perl_matcher::push_case_change(bool c) 6011: { 6011: 6011: saved_change_case* pmp = static_cast(m_backup_state); 6011: --pmp; 6011: if(pmp < m_stack_base) 6011: { 6011: extend_stack(); 6011: pmp = static_cast(m_backup_state); 6011: --pmp; 6011: } 6011: (void) new (pmp)saved_change_case(c); 6011: m_backup_state = pmp; 6011: } 6011: 6011: template 6011: inline void perl_matcher::push_recursion_stopper() 6011: { 6011: saved_state* pmp = m_backup_state; 6011: --pmp; 6011: if(pmp < m_stack_base) 6011: { 6011: extend_stack(); 6011: pmp = m_backup_state; 6011: --pmp; 6011: } 6011: (void) new (pmp)saved_state(saved_type_recurse); 6011: m_backup_state = pmp; 6011: } 6011: 6011: template 6011: inline void perl_matcher::push_assertion(const re_syntax_base* ps, bool positive) 6011: { 6011: saved_assertion* pmp = static_cast*>(m_backup_state); 6011: --pmp; 6011: if(pmp < m_stack_base) 6011: { 6011: extend_stack(); 6011: pmp = static_cast*>(m_backup_state); 6011: --pmp; 6011: } 6011: (void) new (pmp)saved_assertion(positive, ps, position); 6011: m_backup_state = pmp; 6011: } 6011: 6011: template 6011: inline void perl_matcher::push_alt(const re_syntax_base* ps) 6011: { 6011: saved_position* pmp = static_cast*>(m_backup_state); 6011: --pmp; 6011: if(pmp < m_stack_base) 6011: { 6011: extend_stack(); 6011: pmp = static_cast*>(m_backup_state); 6011: --pmp; 6011: } 6011: (void) new (pmp)saved_position(ps, position, saved_state_alt); 6011: m_backup_state = pmp; 6011: } 6011: 6011: template 6011: inline void perl_matcher::push_non_greedy_repeat(const re_syntax_base* ps) 6011: { 6011: saved_position* pmp = static_cast*>(m_backup_state); 6011: --pmp; 6011: if(pmp < m_stack_base) 6011: { 6011: extend_stack(); 6011: pmp = static_cast*>(m_backup_state); 6011: --pmp; 6011: } 6011: (void) new (pmp)saved_position(ps, position, saved_state_non_greedy_long_repeat); 6011: m_backup_state = pmp; 6011: } 6011: 6011: template 6011: inline void perl_matcher::push_repeater_count(int i, repeater_count** s) 6011: { 6011: saved_repeater* pmp = static_cast*>(m_backup_state); 6011: --pmp; 6011: if(pmp < m_stack_base) 6011: { 6011: extend_stack(); 6011: pmp = static_cast*>(m_backup_state); 6011: --pmp; 6011: } 6011: (void) new (pmp)saved_repeater(i, s, position, this->recursion_stack.size() ? this->recursion_stack.back().idx : ((-0x7fffffff - 1) + 3)); 6011: m_backup_state = pmp; 6011: } 6011: 6011: template 6011: inline void perl_matcher::push_single_repeat(std::size_t c, const re_repeat* r, BidiIterator last_position, int state_id) 6011: { 6011: saved_single_repeat* pmp = static_cast*>(m_backup_state); 6011: --pmp; 6011: if(pmp < m_stack_base) 6011: { 6011: extend_stack(); 6011: pmp = static_cast*>(m_backup_state); 6011: --pmp; 6011: } 6011: (void) new (pmp)saved_single_repeat(c, r, last_position, state_id); 6011: m_backup_state = pmp; 6011: } 6011: 6011: template 6011: inline void perl_matcher::push_recursion(int idx, const re_syntax_base* p, results_type* presults) 6011: { 6011: saved_recursion* pmp = static_cast*>(m_backup_state); 6011: --pmp; 6011: if(pmp < m_stack_base) 6011: { 6011: extend_stack(); 6011: pmp = static_cast*>(m_backup_state); 6011: --pmp; 6011: } 6011: (void) new (pmp)saved_recursion(idx, p, presults); 6011: m_backup_state = pmp; 6011: } 6011: 6011: template 6011: bool perl_matcher::match_toggle_case() 6011: { 6011: 6011: push_case_change(this->icase); 6011: this->icase = static_cast(pstate)->icase; 6011: pstate = pstate->next.p; 6011: return true; 6011: } 6011: 6011: template 6011: bool perl_matcher::match_startmark() 6011: { 6011: int index = static_cast(pstate)->index; 6011: icase = static_cast(pstate)->icase; 6011: switch(index) 6011: { 6011: case 0: 6011: pstate = pstate->next.p; 6011: break; 6011: case -1: 6011: case -2: 6011: { 6011: 6011: const re_syntax_base* next_pstate = static_cast(pstate->next.p)->alt.p->next.p; 6011: pstate = pstate->next.p->next.p; 6011: push_assertion(next_pstate, index == -1); 6011: break; 6011: } 6011: case -3: 6011: { 6011: 6011: bool old_independent = m_independent; 6011: m_independent = true; 6011: const re_syntax_base* next_pstate = static_cast(pstate->next.p)->alt.p->next.p; 6011: pstate = pstate->next.p->next.p; 6011: bool r = false; 6011: 6011: try{ 6011: 6011: r = match_all_states(); 6011: if(!r && !m_independent) 6011: { 6011: 6011: 6011: while(unwind(false)); 6011: return false; 6011: } 6011: 6011: } 6011: catch(...) 6011: { 6011: pstate = next_pstate; 6011: 6011: 6011: 6011: while(unwind(true)) {} 6011: throw; 6011: } 6011: 6011: pstate = next_pstate; 6011: m_independent = old_independent; 6011: # 475 "/usr/include/boost/regex/v4/perl_matcher_non_recursive.hpp" 3 4 6011: return r; 6011: } 6011: case -4: 6011: { 6011: 6011: const re_alt* alt = static_cast(pstate->next.p); 6011: (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__)); 6011: pstate = alt->next.p; 6011: if(pstate->type == syntax_element_assert_backref) 6011: { 6011: if(!match_assert_backref()) 6011: pstate = alt->alt.p; 6011: break; 6011: } 6011: else 6011: { 6011: 6011: (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__)); 6011: bool negated = static_cast(pstate)->index == -2; 6011: BidiIterator saved_position = position; 6011: const re_syntax_base* next_pstate = static_cast(pstate->next.p)->alt.p->next.p; 6011: pstate = pstate->next.p->next.p; 6011: 6011: try{ 6011: 6011: bool r = match_all_states(); 6011: position = saved_position; 6011: if(negated) 6011: r = !r; 6011: if(r) 6011: pstate = next_pstate; 6011: else 6011: pstate = alt->alt.p; 6011: 6011: } 6011: catch(...) 6011: { 6011: pstate = next_pstate; 6011: 6011: 6011: 6011: while(unwind(true)){} 6011: throw; 6011: } 6011: 6011: break; 6011: } 6011: } 6011: case -5: 6011: { 6011: push_matched_paren(0, (*m_presult)[0]); 6011: m_presult->set_first(position, 0, true); 6011: pstate = pstate->next.p; 6011: break; 6011: } 6011: default: 6011: { 6011: (static_cast (index > 0) ? void (0) : __assert_fail ("index > 0", "/usr/include/boost/regex/v4/perl_matcher_non_recursive.hpp", 532, __extension__ __PRETTY_FUNCTION__)); 6011: if((m_match_flags & match_nosubs) == 0) 6011: { 6011: push_matched_paren(index, (*m_presult)[index]); 6011: m_presult->set_first(position, index); 6011: } 6011: pstate = pstate->next.p; 6011: break; 6011: } 6011: } 6011: return true; 6011: } 6011: 6011: template 6011: bool perl_matcher::match_alt() 6011: { 6011: bool take_first, take_second; 6011: const re_alt* jmp = static_cast(pstate); 6011: 6011: 6011: if(position == last) 6011: { 6011: take_first = jmp->can_be_null & mask_take; 6011: take_second = jmp->can_be_null & mask_skip; 6011: } 6011: else 6011: { 6011: take_first = can_start(*position, jmp->_map, (unsigned char)mask_take); 6011: take_second = can_start(*position, jmp->_map, (unsigned char)mask_skip); 6011: } 6011: 6011: if(take_first) 6011: { 6011: 6011: 6011: if(take_second) 6011: { 6011: push_alt(jmp->alt.p); 6011: } 6011: pstate = pstate->next.p; 6011: return true; 6011: } 6011: if(take_second) 6011: { 6011: pstate = jmp->alt.p; 6011: return true; 6011: } 6011: return false; 6011: } 6011: 6011: template 6011: bool perl_matcher::match_rep() 6011: { 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: const re_repeat* rep = static_cast(pstate); 6011: 6011: 6011: bool take_first, take_second; 6011: if(position == last) 6011: { 6011: take_first = rep->can_be_null & mask_take; 6011: take_second = rep->can_be_null & mask_skip; 6011: } 6011: else 6011: { 6011: take_first = can_start(*position, rep->_map, (unsigned char)mask_take); 6011: take_second = can_start(*position, rep->_map, (unsigned char)mask_skip); 6011: } 6011: 6011: if((m_backup_state->state_id != saved_state_repeater_count) 6011: || (static_cast*>(m_backup_state)->count.get_id() != rep->state_id) 6011: || (next_count->get_id() != rep->state_id)) 6011: { 6011: 6011: 6011: push_repeater_count(rep->state_id, &next_count); 6011: } 6011: 6011: 6011: 6011: 6011: 6011: next_count->check_null_repeat(position, rep->max); 6011: 6011: if(next_count->get_count() < rep->min) 6011: { 6011: 6011: if(take_first) 6011: { 6011: 6011: ++(*next_count); 6011: pstate = rep->next.p; 6011: return true; 6011: } 6011: return false; 6011: } 6011: 6011: bool greedy = (rep->greedy) && (!(m_match_flags & regex_constants::match_any) || m_independent); 6011: if(greedy) 6011: { 6011: 6011: if((next_count->get_count() < rep->max) && take_first) 6011: { 6011: if(take_second) 6011: { 6011: 6011: push_alt(rep->alt.p); 6011: } 6011: 6011: ++(*next_count); 6011: pstate = rep->next.p; 6011: return true; 6011: } 6011: else if(take_second) 6011: { 6011: pstate = rep->alt.p; 6011: return true; 6011: } 6011: return false; 6011: } 6011: else 6011: { 6011: 6011: if(take_second) 6011: { 6011: if((next_count->get_count() < rep->max) && take_first) 6011: { 6011: 6011: push_non_greedy_repeat(rep->next.p); 6011: } 6011: pstate = rep->alt.p; 6011: return true; 6011: } 6011: if((next_count->get_count() < rep->max) && take_first) 6011: { 6011: 6011: ++(*next_count); 6011: pstate = rep->next.p; 6011: return true; 6011: } 6011: } 6011: return false; 6011: 6011: 6011: 6011: 6011: 6011: 6011: } 6011: 6011: template 6011: bool perl_matcher::match_dot_repeat_slow() 6011: { 6011: unsigned count = 0; 6011: const re_repeat* rep = static_cast(pstate); 6011: re_syntax_base* psingle = rep->next.p; 6011: 6011: while(count < rep->min) 6011: { 6011: pstate = psingle; 6011: if(!match_wild()) 6011: return false; 6011: ++count; 6011: } 6011: bool greedy = (rep->greedy) && (!(m_match_flags & regex_constants::match_any) || m_independent); 6011: if(greedy) 6011: { 6011: 6011: while(count < rep->max) 6011: { 6011: pstate = psingle; 6011: if(!match_wild()) 6011: break; 6011: ++count; 6011: } 6011: 6011: if((rep->leading) && (count < rep->max)) 6011: restart = position; 6011: 6011: if(count - rep->min) 6011: push_single_repeat(count, rep, position, saved_state_greedy_single_repeat); 6011: 6011: pstate = rep->alt.p; 6011: return true; 6011: } 6011: else 6011: { 6011: 6011: if(count < rep->max) 6011: push_single_repeat(count, rep, position, saved_state_rep_slow_dot); 6011: pstate = rep->alt.p; 6011: return (position == last) ? (rep->can_be_null & mask_skip) : can_start(*position, rep->_map, mask_skip); 6011: } 6011: } 6011: 6011: template 6011: bool perl_matcher::match_dot_repeat_fast() 6011: { 6011: if(m_match_flags & match_not_dot_null) 6011: return match_dot_repeat_slow(); 6011: if((static_cast(pstate->next.p)->mask & match_any_mask) == 0) 6011: return match_dot_repeat_slow(); 6011: 6011: const re_repeat* rep = static_cast(pstate); 6011: bool greedy = (rep->greedy) && (!(m_match_flags & regex_constants::match_any) || m_independent); 6011: unsigned count = static_cast((std::min)(static_cast(::boost::re_detail_106501::distance(position, last)), static_cast(greedy ? rep->max : rep->min))); 6011: if(rep->min > count) 6011: { 6011: position = last; 6011: return false; 6011: } 6011: std::advance(position, count); 6011: 6011: if(greedy) 6011: { 6011: if((rep->leading) && (count < rep->max)) 6011: restart = position; 6011: 6011: if(count - rep->min) 6011: push_single_repeat(count, rep, position, saved_state_greedy_single_repeat); 6011: 6011: pstate = rep->alt.p; 6011: return true; 6011: } 6011: else 6011: { 6011: 6011: if(count < rep->max) 6011: push_single_repeat(count, rep, position, saved_state_rep_fast_dot); 6011: pstate = rep->alt.p; 6011: return (position == last) ? (rep->can_be_null & mask_skip) : can_start(*position, rep->_map, mask_skip); 6011: } 6011: } 6011: 6011: template 6011: bool perl_matcher::match_char_repeat() 6011: { 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: const re_repeat* rep = static_cast(pstate); 6011: (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__)); 6011: const char_type what = *reinterpret_cast(static_cast(rep->next.p) + 1); 6011: std::size_t count = 0; 6011: 6011: 6011: 6011: bool greedy = (rep->greedy) && (!(m_match_flags & regex_constants::match_any) || m_independent); 6011: std::size_t desired = greedy ? rep->max : rep->min; 6011: if(::boost::is_random_access_iterator::value) 6011: { 6011: BidiIterator end = position; 6011: 6011: 6011: std::size_t len = (desired == (std::numeric_limits::max)()) ? 0u : ::boost::re_detail_106501::distance(position, last); 6011: if(desired >= len) 6011: end = last; 6011: else 6011: std::advance(end, desired); 6011: BidiIterator origin(position); 6011: while((position != end) && (traits_inst.translate(*position, icase) == what)) 6011: { 6011: ++position; 6011: } 6011: count = (unsigned)::boost::re_detail_106501::distance(origin, position); 6011: } 6011: else 6011: { 6011: while((count < desired) && (position != last) && (traits_inst.translate(*position, icase) == what)) 6011: { 6011: ++position; 6011: ++count; 6011: } 6011: } 6011: 6011: if(count < rep->min) 6011: return false; 6011: 6011: if(greedy) 6011: { 6011: if((rep->leading) && (count < rep->max)) 6011: restart = position; 6011: 6011: if(count - rep->min) 6011: push_single_repeat(count, rep, position, saved_state_greedy_single_repeat); 6011: 6011: pstate = rep->alt.p; 6011: return true; 6011: } 6011: else 6011: { 6011: 6011: if(count < rep->max) 6011: push_single_repeat(count, rep, position, saved_state_rep_char); 6011: pstate = rep->alt.p; 6011: return (position == last) ? (rep->can_be_null & mask_skip) : can_start(*position, rep->_map, mask_skip); 6011: } 6011: 6011: 6011: 6011: 6011: 6011: 6011: } 6011: 6011: template 6011: bool perl_matcher::match_set_repeat() 6011: { 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: const re_repeat* rep = static_cast(pstate); 6011: const unsigned char* map = static_cast(rep->next.p)->_map; 6011: std::size_t count = 0; 6011: 6011: 6011: 6011: bool greedy = (rep->greedy) && (!(m_match_flags & regex_constants::match_any) || m_independent); 6011: std::size_t desired = greedy ? rep->max : rep->min; 6011: if(::boost::is_random_access_iterator::value) 6011: { 6011: BidiIterator end = position; 6011: 6011: 6011: std::size_t len = (desired == (std::numeric_limits::max)()) ? 0u : ::boost::re_detail_106501::distance(position, last); 6011: if(desired >= len) 6011: end = last; 6011: else 6011: std::advance(end, desired); 6011: BidiIterator origin(position); 6011: while((position != end) && map[static_cast(traits_inst.translate(*position, icase))]) 6011: { 6011: ++position; 6011: } 6011: count = (unsigned)::boost::re_detail_106501::distance(origin, position); 6011: } 6011: else 6011: { 6011: while((count < desired) && (position != last) && map[static_cast(traits_inst.translate(*position, icase))]) 6011: { 6011: ++position; 6011: ++count; 6011: } 6011: } 6011: 6011: if(count < rep->min) 6011: return false; 6011: 6011: if(greedy) 6011: { 6011: if((rep->leading) && (count < rep->max)) 6011: restart = position; 6011: 6011: if(count - rep->min) 6011: push_single_repeat(count, rep, position, saved_state_greedy_single_repeat); 6011: 6011: pstate = rep->alt.p; 6011: return true; 6011: } 6011: else 6011: { 6011: 6011: if(count < rep->max) 6011: push_single_repeat(count, rep, position, saved_state_rep_short_set); 6011: pstate = rep->alt.p; 6011: return (position == last) ? (rep->can_be_null & mask_skip) : can_start(*position, rep->_map, mask_skip); 6011: } 6011: 6011: 6011: 6011: 6011: 6011: 6011: } 6011: 6011: template 6011: bool perl_matcher::match_long_set_repeat() 6011: { 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: typedef typename traits::char_class_type m_type; 6011: const re_repeat* rep = static_cast(pstate); 6011: const re_set_long* set = static_cast*>(pstate->next.p); 6011: std::size_t count = 0; 6011: 6011: 6011: 6011: bool greedy = (rep->greedy) && (!(m_match_flags & regex_constants::match_any) || m_independent); 6011: std::size_t desired = greedy ? rep->max : rep->min; 6011: if(::boost::is_random_access_iterator::value) 6011: { 6011: BidiIterator end = position; 6011: 6011: 6011: std::size_t len = (desired == (std::numeric_limits::max)()) ? 0u : ::boost::re_detail_106501::distance(position, last); 6011: if(desired >= len) 6011: end = last; 6011: else 6011: std::advance(end, desired); 6011: BidiIterator origin(position); 6011: while((position != end) && (position != re_is_set_member(position, last, set, re.get_data(), icase))) 6011: { 6011: ++position; 6011: } 6011: count = (unsigned)::boost::re_detail_106501::distance(origin, position); 6011: } 6011: else 6011: { 6011: while((count < desired) && (position != last) && (position != re_is_set_member(position, last, set, re.get_data(), icase))) 6011: { 6011: ++position; 6011: ++count; 6011: } 6011: } 6011: 6011: if(count < rep->min) 6011: return false; 6011: 6011: if(greedy) 6011: { 6011: if((rep->leading) && (count < rep->max)) 6011: restart = position; 6011: 6011: if(count - rep->min) 6011: push_single_repeat(count, rep, position, saved_state_greedy_single_repeat); 6011: 6011: pstate = rep->alt.p; 6011: return true; 6011: } 6011: else 6011: { 6011: 6011: if(count < rep->max) 6011: push_single_repeat(count, rep, position, saved_state_rep_long_set); 6011: pstate = rep->alt.p; 6011: return (position == last) ? (rep->can_be_null & mask_skip) : can_start(*position, rep->_map, mask_skip); 6011: } 6011: 6011: 6011: 6011: 6011: 6011: 6011: } 6011: 6011: template 6011: bool perl_matcher::match_recursion() 6011: { 6011: (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__)); 6011: 6011: 6011: 6011: 6011: for(typename std::vector >::reverse_iterator i = recursion_stack.rbegin(); i != recursion_stack.rend(); ++i) 6011: { 6011: if(i->idx == static_cast(static_cast(pstate)->alt.p)->index) 6011: { 6011: if(i->location_of_start == position) 6011: return false; 6011: break; 6011: } 6011: } 6011: 6011: 6011: 6011: push_recursion_pop(); 6011: 6011: 6011: 6011: if(recursion_stack.capacity() == 0) 6011: { 6011: recursion_stack.reserve(50); 6011: } 6011: recursion_stack.push_back(recursion_info()); 6011: recursion_stack.back().preturn_address = pstate->next.p; 6011: recursion_stack.back().results = *m_presult; 6011: pstate = static_cast(pstate)->alt.p; 6011: recursion_stack.back().idx = static_cast(pstate)->index; 6011: recursion_stack.back().location_of_start = position; 6011: 6011: { 6011: push_repeater_count(-(2 + static_cast(pstate)->index), &next_count); 6011: } 6011: 6011: return true; 6011: } 6011: 6011: template 6011: bool perl_matcher::match_endmark() 6011: { 6011: int index = static_cast(pstate)->index; 6011: icase = static_cast(pstate)->icase; 6011: if(index > 0) 6011: { 6011: if((m_match_flags & match_nosubs) == 0) 6011: { 6011: m_presult->set_second(position, index); 6011: } 6011: if(!recursion_stack.empty()) 6011: { 6011: if(index == recursion_stack.back().idx) 6011: { 6011: pstate = recursion_stack.back().preturn_address; 6011: *m_presult = recursion_stack.back().results; 6011: push_recursion(recursion_stack.back().idx, recursion_stack.back().preturn_address, &recursion_stack.back().results); 6011: recursion_stack.pop_back(); 6011: push_repeater_count(-(2 + index), &next_count); 6011: } 6011: } 6011: } 6011: else if((index < 0) && (index != -4)) 6011: { 6011: 6011: pstate = 0; 6011: return true; 6011: } 6011: pstate = pstate->next.p; 6011: return true; 6011: } 6011: 6011: template 6011: bool perl_matcher::match_match() 6011: { 6011: if(!recursion_stack.empty()) 6011: { 6011: (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__)); 6011: pstate = recursion_stack.back().preturn_address; 6011: *m_presult = recursion_stack.back().results; 6011: push_recursion(recursion_stack.back().idx, recursion_stack.back().preturn_address, &recursion_stack.back().results); 6011: recursion_stack.pop_back(); 6011: return true; 6011: } 6011: if((m_match_flags & match_not_null) && (position == (*m_presult)[0].first)) 6011: return false; 6011: if((m_match_flags & match_all) && (position != last)) 6011: return false; 6011: if((m_match_flags & regex_constants::match_not_initial_null) && (position == search_base)) 6011: return false; 6011: m_presult->set_second(position); 6011: pstate = 0; 6011: m_has_found_match = true; 6011: if((m_match_flags & match_posix) == match_posix) 6011: { 6011: m_result.maybe_assign(*m_presult); 6011: if((m_match_flags & match_any) == 0) 6011: return false; 6011: } 6011: # 1106 "/usr/include/boost/regex/v4/perl_matcher_non_recursive.hpp" 3 4 6011: return true; 6011: } 6011: 6011: template 6011: bool perl_matcher::match_commit() 6011: { 6011: 6011: 6011: 6011: 6011: 6011: switch(static_cast(pstate)->action) 6011: { 6011: case commit_commit: 6011: restart = last; 6011: break; 6011: case commit_skip: 6011: if(base != position) 6011: { 6011: restart = position; 6011: 6011: --restart; 6011: } 6011: break; 6011: case commit_prune: 6011: break; 6011: } 6011: 6011: saved_state* pmp = m_backup_state; 6011: --pmp; 6011: if(pmp < m_stack_base) 6011: { 6011: extend_stack(); 6011: pmp = m_backup_state; 6011: --pmp; 6011: } 6011: (void) new (pmp)saved_state(16); 6011: m_backup_state = pmp; 6011: pstate = pstate->next.p; 6011: return true; 6011: } 6011: 6011: template 6011: bool perl_matcher::match_then() 6011: { 6011: 6011: saved_state* pmp = m_backup_state; 6011: --pmp; 6011: if(pmp < m_stack_base) 6011: { 6011: extend_stack(); 6011: pmp = m_backup_state; 6011: --pmp; 6011: } 6011: (void) new (pmp)saved_state(17); 6011: m_backup_state = pmp; 6011: pstate = pstate->next.p; 6011: return true; 6011: } 6011: 6011: template 6011: bool perl_matcher::skip_until_paren(int index, bool have_match) 6011: { 6011: while(pstate) 6011: { 6011: if(pstate->type == syntax_element_endmark) 6011: { 6011: if(static_cast(pstate)->index == index) 6011: { 6011: if(have_match) 6011: return this->match_endmark(); 6011: pstate = pstate->next.p; 6011: return true; 6011: } 6011: else 6011: { 6011: 6011: 6011: match_endmark(); 6011: if(!pstate) 6011: { 6011: unwind(true); 6011: } 6011: } 6011: continue; 6011: } 6011: else if(pstate->type == syntax_element_match) 6011: return true; 6011: else if(pstate->type == syntax_element_startmark) 6011: { 6011: int idx = static_cast(pstate)->index; 6011: pstate = pstate->next.p; 6011: skip_until_paren(idx, false); 6011: continue; 6011: } 6011: pstate = pstate->next.p; 6011: } 6011: return true; 6011: } 6011: # 1213 "/usr/include/boost/regex/v4/perl_matcher_non_recursive.hpp" 3 4 6011: template 6011: bool perl_matcher::unwind(bool have_match) 6011: { 6011: static unwind_proc_type const s_unwind_table[19] = 6011: { 6011: &perl_matcher::unwind_end, 6011: &perl_matcher::unwind_paren, 6011: &perl_matcher::unwind_recursion_stopper, 6011: &perl_matcher::unwind_assertion, 6011: &perl_matcher::unwind_alt, 6011: &perl_matcher::unwind_repeater_counter, 6011: &perl_matcher::unwind_extra_block, 6011: &perl_matcher::unwind_greedy_single_repeat, 6011: &perl_matcher::unwind_slow_dot_repeat, 6011: &perl_matcher::unwind_fast_dot_repeat, 6011: &perl_matcher::unwind_char_repeat, 6011: &perl_matcher::unwind_short_set_repeat, 6011: &perl_matcher::unwind_long_set_repeat, 6011: &perl_matcher::unwind_non_greedy_repeat, 6011: &perl_matcher::unwind_recursion, 6011: &perl_matcher::unwind_recursion_pop, 6011: &perl_matcher::unwind_commit, 6011: &perl_matcher::unwind_then, 6011: &perl_matcher::unwind_case, 6011: }; 6011: 6011: m_recursive_result = have_match; 6011: m_unwound_lookahead = false; 6011: m_unwound_alt = false; 6011: unwind_proc_type unwinder; 6011: bool cont; 6011: 6011: 6011: 6011: do 6011: { 6011: unwinder = s_unwind_table[m_backup_state->state_id]; 6011: cont = (this->*unwinder)(m_recursive_result); 6011: }while(cont); 6011: 6011: 6011: 6011: return pstate ? true : false; 6011: } 6011: 6011: template 6011: bool perl_matcher::unwind_end(bool) 6011: { 6011: pstate = 0; 6011: return false; 6011: } 6011: 6011: template 6011: bool perl_matcher::unwind_case(bool) 6011: { 6011: saved_change_case* pmp = static_cast(m_backup_state); 6011: icase = pmp->icase; 6011: boost::re_detail_106501::inplace_destroy(pmp++); 6011: m_backup_state = pmp; 6011: return true; 6011: } 6011: 6011: template 6011: bool perl_matcher::unwind_paren(bool have_match) 6011: { 6011: saved_matched_paren* pmp = static_cast*>(m_backup_state); 6011: 6011: if(have_match == false) 6011: { 6011: m_presult->set_first(pmp->sub.first, pmp->index, pmp->index == 0); 6011: m_presult->set_second(pmp->sub.second, pmp->index, pmp->sub.matched, pmp->index == 0); 6011: } 6011: # 1293 "/usr/include/boost/regex/v4/perl_matcher_non_recursive.hpp" 3 4 6011: m_backup_state = pmp+1; 6011: boost::re_detail_106501::inplace_destroy(pmp); 6011: return true; 6011: } 6011: 6011: template 6011: bool perl_matcher::unwind_recursion_stopper(bool) 6011: { 6011: boost::re_detail_106501::inplace_destroy(m_backup_state++); 6011: pstate = 0; 6011: return false; 6011: } 6011: 6011: template 6011: bool perl_matcher::unwind_assertion(bool r) 6011: { 6011: saved_assertion* pmp = static_cast*>(m_backup_state); 6011: pstate = pmp->pstate; 6011: position = pmp->position; 6011: bool result = (r == pmp->positive); 6011: m_recursive_result = pmp->positive ? r : !r; 6011: boost::re_detail_106501::inplace_destroy(pmp++); 6011: m_backup_state = pmp; 6011: m_unwound_lookahead = true; 6011: return !result; 6011: } 6011: 6011: template 6011: bool perl_matcher::unwind_alt(bool r) 6011: { 6011: saved_position* pmp = static_cast*>(m_backup_state); 6011: if(!r) 6011: { 6011: pstate = pmp->pstate; 6011: position = pmp->position; 6011: } 6011: boost::re_detail_106501::inplace_destroy(pmp++); 6011: m_backup_state = pmp; 6011: m_unwound_alt = !r; 6011: return r; 6011: } 6011: 6011: template 6011: bool perl_matcher::unwind_repeater_counter(bool) 6011: { 6011: saved_repeater* pmp = static_cast*>(m_backup_state); 6011: boost::re_detail_106501::inplace_destroy(pmp++); 6011: m_backup_state = pmp; 6011: return true; 6011: } 6011: 6011: template 6011: bool perl_matcher::unwind_extra_block(bool) 6011: { 6011: saved_extra_block* pmp = static_cast(m_backup_state); 6011: void* condemmed = m_stack_base; 6011: m_stack_base = pmp->base; 6011: m_backup_state = pmp->end; 6011: boost::re_detail_106501::inplace_destroy(pmp); 6011: put_mem_block(condemmed); 6011: return true; 6011: } 6011: 6011: template 6011: inline void perl_matcher::destroy_single_repeat() 6011: { 6011: saved_single_repeat* p = static_cast*>(m_backup_state); 6011: boost::re_detail_106501::inplace_destroy(p++); 6011: m_backup_state = p; 6011: } 6011: 6011: template 6011: bool perl_matcher::unwind_greedy_single_repeat(bool r) 6011: { 6011: saved_single_repeat* pmp = static_cast*>(m_backup_state); 6011: 6011: 6011: if(r) 6011: { 6011: destroy_single_repeat(); 6011: return true; 6011: } 6011: 6011: const re_repeat* rep = pmp->rep; 6011: std::size_t count = pmp->count; 6011: (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__)); 6011: (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__)); 6011: 6011: count -= rep->min; 6011: 6011: if((m_match_flags & match_partial) && (position == last)) 6011: m_has_partial_match = true; 6011: 6011: (static_cast (count) ? void (0) : __assert_fail ("count", "/usr/include/boost/regex/v4/perl_matcher_non_recursive.hpp", 1386, __extension__ __PRETTY_FUNCTION__)); 6011: position = pmp->last_position; 6011: 6011: 6011: do 6011: { 6011: --position; 6011: --count; 6011: ++state_count; 6011: }while(count && !can_start(*position, rep->_map, mask_skip)); 6011: 6011: 6011: if(count == 0) 6011: { 6011: destroy_single_repeat(); 6011: if(!can_start(*position, rep->_map, mask_skip)) 6011: return true; 6011: } 6011: else 6011: { 6011: pmp->count = count + rep->min; 6011: pmp->last_position = position; 6011: } 6011: pstate = rep->alt.p; 6011: return false; 6011: } 6011: 6011: template 6011: bool perl_matcher::unwind_slow_dot_repeat(bool r) 6011: { 6011: saved_single_repeat* pmp = static_cast*>(m_backup_state); 6011: 6011: 6011: if(r) 6011: { 6011: destroy_single_repeat(); 6011: return true; 6011: } 6011: 6011: const re_repeat* rep = pmp->rep; 6011: std::size_t count = pmp->count; 6011: (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__)); 6011: (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__)); 6011: (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__)); 6011: (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__)); 6011: 6011: (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__)); 6011: pstate = rep->next.p; 6011: position = pmp->last_position; 6011: 6011: if(position != last) 6011: { 6011: 6011: do 6011: { 6011: if(!match_wild()) 6011: { 6011: 6011: destroy_single_repeat(); 6011: return true; 6011: } 6011: ++count; 6011: ++state_count; 6011: pstate = rep->next.p; 6011: }while((count < rep->max) && (position != last) && !can_start(*position, rep->_map, mask_skip)); 6011: } 6011: if(position == last) 6011: { 6011: 6011: destroy_single_repeat(); 6011: if((m_match_flags & match_partial) && (position == last) && (position != search_base)) 6011: m_has_partial_match = true; 6011: if(0 == (rep->can_be_null & mask_skip)) 6011: return true; 6011: } 6011: else if(count == rep->max) 6011: { 6011: 6011: destroy_single_repeat(); 6011: if(!can_start(*position, rep->_map, mask_skip)) 6011: return true; 6011: } 6011: else 6011: { 6011: pmp->count = count; 6011: pmp->last_position = position; 6011: } 6011: pstate = rep->alt.p; 6011: return false; 6011: } 6011: 6011: template 6011: bool perl_matcher::unwind_fast_dot_repeat(bool r) 6011: { 6011: saved_single_repeat* pmp = static_cast*>(m_backup_state); 6011: 6011: 6011: if(r) 6011: { 6011: destroy_single_repeat(); 6011: return true; 6011: } 6011: 6011: const re_repeat* rep = pmp->rep; 6011: std::size_t count = pmp->count; 6011: 6011: (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__)); 6011: position = pmp->last_position; 6011: if(position != last) 6011: { 6011: 6011: 6011: do 6011: { 6011: ++position; 6011: ++count; 6011: ++state_count; 6011: }while((count < rep->max) && (position != last) && !can_start(*position, rep->_map, mask_skip)); 6011: } 6011: 6011: 6011: if((rep->leading) && (count < rep->max)) 6011: restart = position; 6011: if(position == last) 6011: { 6011: 6011: destroy_single_repeat(); 6011: if((m_match_flags & match_partial) && (position == last) && (position != search_base)) 6011: m_has_partial_match = true; 6011: if(0 == (rep->can_be_null & mask_skip)) 6011: return true; 6011: } 6011: else if(count == rep->max) 6011: { 6011: 6011: destroy_single_repeat(); 6011: if(!can_start(*position, rep->_map, mask_skip)) 6011: return true; 6011: } 6011: else 6011: { 6011: pmp->count = count; 6011: pmp->last_position = position; 6011: } 6011: pstate = rep->alt.p; 6011: return false; 6011: } 6011: 6011: template 6011: bool perl_matcher::unwind_char_repeat(bool r) 6011: { 6011: saved_single_repeat* pmp = static_cast*>(m_backup_state); 6011: 6011: 6011: if(r) 6011: { 6011: destroy_single_repeat(); 6011: return true; 6011: } 6011: 6011: const re_repeat* rep = pmp->rep; 6011: std::size_t count = pmp->count; 6011: pstate = rep->next.p; 6011: const char_type what = *reinterpret_cast(static_cast(pstate) + 1); 6011: position = pmp->last_position; 6011: 6011: (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__)); 6011: (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__)); 6011: (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__)); 6011: (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__)); 6011: (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__)); 6011: 6011: if(position != last) 6011: { 6011: 6011: do 6011: { 6011: if(traits_inst.translate(*position, icase) != what) 6011: { 6011: 6011: destroy_single_repeat(); 6011: return true; 6011: } 6011: ++count; 6011: ++ position; 6011: ++state_count; 6011: pstate = rep->next.p; 6011: }while((count < rep->max) && (position != last) && !can_start(*position, rep->_map, mask_skip)); 6011: } 6011: 6011: if((rep->leading) && (count < rep->max)) 6011: restart = position; 6011: if(position == last) 6011: { 6011: 6011: destroy_single_repeat(); 6011: if((m_match_flags & match_partial) && (position == last) && (position != search_base)) 6011: m_has_partial_match = true; 6011: if(0 == (rep->can_be_null & mask_skip)) 6011: return true; 6011: } 6011: else if(count == rep->max) 6011: { 6011: 6011: destroy_single_repeat(); 6011: if(!can_start(*position, rep->_map, mask_skip)) 6011: return true; 6011: } 6011: else 6011: { 6011: pmp->count = count; 6011: pmp->last_position = position; 6011: } 6011: pstate = rep->alt.p; 6011: return false; 6011: } 6011: 6011: template 6011: bool perl_matcher::unwind_short_set_repeat(bool r) 6011: { 6011: saved_single_repeat* pmp = static_cast*>(m_backup_state); 6011: 6011: 6011: if(r) 6011: { 6011: destroy_single_repeat(); 6011: return true; 6011: } 6011: 6011: const re_repeat* rep = pmp->rep; 6011: std::size_t count = pmp->count; 6011: pstate = rep->next.p; 6011: const unsigned char* map = static_cast(rep->next.p)->_map; 6011: position = pmp->last_position; 6011: 6011: (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__)); 6011: (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__)); 6011: (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__)); 6011: (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__)); 6011: (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__)); 6011: 6011: if(position != last) 6011: { 6011: 6011: do 6011: { 6011: if(!map[static_cast(traits_inst.translate(*position, icase))]) 6011: { 6011: 6011: destroy_single_repeat(); 6011: return true; 6011: } 6011: ++count; 6011: ++ position; 6011: ++state_count; 6011: pstate = rep->next.p; 6011: }while((count < rep->max) && (position != last) && !can_start(*position, rep->_map, mask_skip)); 6011: } 6011: 6011: if((rep->leading) && (count < rep->max)) 6011: restart = position; 6011: if(position == last) 6011: { 6011: 6011: destroy_single_repeat(); 6011: if((m_match_flags & match_partial) && (position == last) && (position != search_base)) 6011: m_has_partial_match = true; 6011: if(0 == (rep->can_be_null & mask_skip)) 6011: return true; 6011: } 6011: else if(count == rep->max) 6011: { 6011: 6011: destroy_single_repeat(); 6011: if(!can_start(*position, rep->_map, mask_skip)) 6011: return true; 6011: } 6011: else 6011: { 6011: pmp->count = count; 6011: pmp->last_position = position; 6011: } 6011: pstate = rep->alt.p; 6011: return false; 6011: } 6011: 6011: template 6011: bool perl_matcher::unwind_long_set_repeat(bool r) 6011: { 6011: typedef typename traits::char_class_type m_type; 6011: saved_single_repeat* pmp = static_cast*>(m_backup_state); 6011: 6011: 6011: if(r) 6011: { 6011: destroy_single_repeat(); 6011: return true; 6011: } 6011: 6011: const re_repeat* rep = pmp->rep; 6011: std::size_t count = pmp->count; 6011: pstate = rep->next.p; 6011: const re_set_long* set = static_cast*>(pstate); 6011: position = pmp->last_position; 6011: 6011: (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__)); 6011: (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__)); 6011: (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__)); 6011: (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__)); 6011: (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__)); 6011: 6011: if(position != last) 6011: { 6011: 6011: do 6011: { 6011: if(position == re_is_set_member(position, last, set, re.get_data(), icase)) 6011: { 6011: 6011: destroy_single_repeat(); 6011: return true; 6011: } 6011: ++position; 6011: ++count; 6011: ++state_count; 6011: pstate = rep->next.p; 6011: }while((count < rep->max) && (position != last) && !can_start(*position, rep->_map, mask_skip)); 6011: } 6011: 6011: if((rep->leading) && (count < rep->max)) 6011: restart = position; 6011: if(position == last) 6011: { 6011: 6011: destroy_single_repeat(); 6011: if((m_match_flags & match_partial) && (position == last) && (position != search_base)) 6011: m_has_partial_match = true; 6011: if(0 == (rep->can_be_null & mask_skip)) 6011: return true; 6011: } 6011: else if(count == rep->max) 6011: { 6011: 6011: destroy_single_repeat(); 6011: if(!can_start(*position, rep->_map, mask_skip)) 6011: return true; 6011: } 6011: else 6011: { 6011: pmp->count = count; 6011: pmp->last_position = position; 6011: } 6011: pstate = rep->alt.p; 6011: return false; 6011: } 6011: 6011: template 6011: bool perl_matcher::unwind_non_greedy_repeat(bool r) 6011: { 6011: saved_position* pmp = static_cast*>(m_backup_state); 6011: if(!r) 6011: { 6011: position = pmp->position; 6011: pstate = pmp->pstate; 6011: ++(*next_count); 6011: } 6011: boost::re_detail_106501::inplace_destroy(pmp++); 6011: m_backup_state = pmp; 6011: return r; 6011: } 6011: 6011: template 6011: bool perl_matcher::unwind_recursion(bool r) 6011: { 6011: saved_recursion* pmp = static_cast*>(m_backup_state); 6011: if(!r) 6011: { 6011: recursion_stack.push_back(recursion_info()); 6011: recursion_stack.back().idx = pmp->recursion_id; 6011: recursion_stack.back().preturn_address = pmp->preturn_address; 6011: recursion_stack.back().results = pmp->results; 6011: recursion_stack.back().location_of_start = position; 6011: } 6011: boost::re_detail_106501::inplace_destroy(pmp++); 6011: m_backup_state = pmp; 6011: return true; 6011: } 6011: 6011: template 6011: bool perl_matcher::unwind_recursion_pop(bool r) 6011: { 6011: saved_state* pmp = static_cast(m_backup_state); 6011: if(!r) 6011: { 6011: recursion_stack.pop_back(); 6011: } 6011: boost::re_detail_106501::inplace_destroy(pmp++); 6011: m_backup_state = pmp; 6011: return true; 6011: } 6011: 6011: template 6011: void perl_matcher::push_recursion_pop() 6011: { 6011: saved_state* pmp = static_cast(m_backup_state); 6011: --pmp; 6011: if(pmp < m_stack_base) 6011: { 6011: extend_stack(); 6011: pmp = static_cast(m_backup_state); 6011: --pmp; 6011: } 6011: (void) new (pmp)saved_state(15); 6011: m_backup_state = pmp; 6011: } 6011: 6011: template 6011: bool perl_matcher::unwind_commit(bool b) 6011: { 6011: boost::re_detail_106501::inplace_destroy(m_backup_state++); 6011: while(unwind(b) && !m_unwound_lookahead){} 6011: if(m_unwound_lookahead && pstate) 6011: { 6011: 6011: 6011: 6011: 6011: saved_state* pmp = m_backup_state; 6011: --pmp; 6011: if(pmp < m_stack_base) 6011: { 6011: extend_stack(); 6011: pmp = m_backup_state; 6011: --pmp; 6011: } 6011: (void) new (pmp)saved_state(16); 6011: m_backup_state = pmp; 6011: } 6011: 6011: m_independent = false; 6011: return false; 6011: } 6011: 6011: template 6011: bool perl_matcher::unwind_then(bool b) 6011: { 6011: 6011: boost::re_detail_106501::inplace_destroy(m_backup_state++); 6011: bool result = false; 6011: while((result = unwind(b)) && !m_unwound_alt){} 6011: 6011: 6011: if(result && m_unwound_alt) 6011: unwind(b); 6011: return false; 6011: } 6011: # 1900 "/usr/include/boost/regex/v4/perl_matcher_non_recursive.hpp" 3 4 6011: } 6011: } 6011: # 611 "/usr/include/boost/regex/v4/perl_matcher.hpp" 2 3 4 6011: 6011: 6011: # 1 "/usr/include/boost/regex/v4/perl_matcher_common.hpp" 1 3 4 6011: # 42 "/usr/include/boost/regex/v4/perl_matcher_common.hpp" 3 4 6011: namespace boost{ 6011: namespace re_detail_106501{ 6011: 6011: template 6011: void perl_matcher::construct_init(const basic_regex& e, match_flag_type f) 6011: { 6011: typedef typename regex_iterator_traits::iterator_category category; 6011: typedef typename basic_regex::flag_type expression_flag_type; 6011: 6011: if(e.empty()) 6011: { 6011: 6011: std::invalid_argument ex("Invalid regular expression object"); 6011: boost::throw_exception(ex); 6011: } 6011: pstate = 0; 6011: m_match_flags = f; 6011: estimate_max_state_count(static_cast(0)); 6011: expression_flag_type re_f = re.flags(); 6011: icase = re_f & regex_constants::icase; 6011: if(!(m_match_flags & (match_perl|match_posix))) 6011: { 6011: if((re_f & (regbase::main_option_type|regbase::no_perl_ex)) == 0) 6011: m_match_flags |= match_perl; 6011: else if((re_f & (regbase::main_option_type|regbase::emacs_ex)) == (regbase::basic_syntax_group|regbase::emacs_ex)) 6011: m_match_flags |= match_perl; 6011: else if((re_f & (regbase::main_option_type|regbase::literal)) == (regbase::literal)) 6011: m_match_flags |= match_perl; 6011: else 6011: m_match_flags |= match_posix; 6011: } 6011: if(m_match_flags & match_posix) 6011: { 6011: m_temp_match.reset(new match_results()); 6011: m_presult = m_temp_match.get(); 6011: } 6011: else 6011: m_presult = &m_result; 6011: 6011: m_stack_base = 0; 6011: m_backup_state = 0; 6011: 6011: 6011: 6011: 6011: 6011: m_word_mask = re.get_data().m_word_mask; 6011: 6011: match_any_mask = static_cast((f & match_not_dot_newline) ? re_detail_106501::test_not_newline : re_detail_106501::test_newline); 6011: 6011: if(e.get_data().m_disable_match_any) 6011: m_match_flags &= regex_constants::match_not_any; 6011: } 6011: 6011: template 6011: void perl_matcher::estimate_max_state_count(std::random_access_iterator_tag*) 6011: { 6011: # 109 "/usr/include/boost/regex/v4/perl_matcher_common.hpp" 3 4 6011: static const std::ptrdiff_t k = 100000; 6011: std::ptrdiff_t dist = boost::re_detail_106501::distance(base, last); 6011: if(dist == 0) 6011: dist = 1; 6011: std::ptrdiff_t states = re.size(); 6011: if(states == 0) 6011: states = 1; 6011: states *= states; 6011: if((std::numeric_limits::max)() / dist < states) 6011: { 6011: max_state_count = (std::min)((std::ptrdiff_t)100000000, (std::numeric_limits::max)() - 2); 6011: return; 6011: } 6011: states *= dist; 6011: if((std::numeric_limits::max)() - k < states) 6011: { 6011: max_state_count = (std::min)((std::ptrdiff_t)100000000, (std::numeric_limits::max)() - 2); 6011: return; 6011: } 6011: states += k; 6011: 6011: max_state_count = states; 6011: 6011: 6011: 6011: 6011: states = dist; 6011: if((std::numeric_limits::max)() / dist < states) 6011: { 6011: max_state_count = (std::min)((std::ptrdiff_t)100000000, (std::numeric_limits::max)() - 2); 6011: return; 6011: } 6011: states *= dist; 6011: if((std::numeric_limits::max)() - k < states) 6011: { 6011: max_state_count = (std::min)((std::ptrdiff_t)100000000, (std::numeric_limits::max)() - 2); 6011: return; 6011: } 6011: states += k; 6011: 6011: 6011: 6011: 6011: if(states > 100000000) 6011: states = 100000000; 6011: 6011: 6011: 6011: 6011: if(states > max_state_count) 6011: max_state_count = states; 6011: } 6011: 6011: template 6011: inline void perl_matcher::estimate_max_state_count(void*) 6011: { 6011: 6011: max_state_count = 100000000; 6011: } 6011: # 182 "/usr/include/boost/regex/v4/perl_matcher_common.hpp" 3 4 6011: template 6011: inline bool perl_matcher::match() 6011: { 6011: 6011: 6011: 6011: return match_imp(); 6011: 6011: } 6011: 6011: template 6011: bool perl_matcher::match_imp() 6011: { 6011: 6011: 6011: save_state_init init(&m_stack_base, &m_backup_state); 6011: used_block_count = 1024; 6011: 6011: try{ 6011: 6011: 6011: 6011: 6011: position = base; 6011: search_base = base; 6011: state_count = 0; 6011: m_match_flags |= regex_constants::match_all; 6011: m_presult->set_size((m_match_flags & match_nosubs) ? 1u : static_cast(1u + re.mark_count()), search_base, last); 6011: m_presult->set_base(base); 6011: m_presult->set_named_subs(this->re.get_named_subs()); 6011: if(m_match_flags & match_posix) 6011: m_result = *m_presult; 6011: verify_options(re.flags(), m_match_flags); 6011: if(0 == match_prefix()) 6011: return false; 6011: return (m_result[0].second == last) && (m_result[0].first == base); 6011: 6011: 6011: } 6011: catch(...) 6011: { 6011: 6011: 6011: 6011: while(unwind(true)){} 6011: throw; 6011: } 6011: 6011: } 6011: 6011: template 6011: inline bool perl_matcher::find() 6011: { 6011: 6011: 6011: 6011: return find_imp(); 6011: 6011: } 6011: 6011: template 6011: bool perl_matcher::find_imp() 6011: { 6011: static matcher_proc_type const s_find_vtable[7] = 6011: { 6011: &perl_matcher::find_restart_any, 6011: &perl_matcher::find_restart_word, 6011: &perl_matcher::find_restart_line, 6011: &perl_matcher::find_restart_buf, 6011: &perl_matcher::match_prefix, 6011: &perl_matcher::find_restart_lit, 6011: &perl_matcher::find_restart_lit, 6011: }; 6011: 6011: 6011: 6011: save_state_init init(&m_stack_base, &m_backup_state); 6011: used_block_count = 1024; 6011: 6011: try{ 6011: 6011: 6011: 6011: state_count = 0; 6011: if((m_match_flags & regex_constants::match_init) == 0) 6011: { 6011: 6011: search_base = position = base; 6011: pstate = re.get_first_state(); 6011: m_presult->set_size((m_match_flags & match_nosubs) ? 1u : static_cast(1u + re.mark_count()), base, last); 6011: m_presult->set_base(base); 6011: m_presult->set_named_subs(this->re.get_named_subs()); 6011: m_match_flags |= regex_constants::match_init; 6011: } 6011: else 6011: { 6011: 6011: search_base = position = m_result[0].second; 6011: 6011: 6011: if(((m_match_flags & match_not_null) == 0) && (m_result.length() == 0)) 6011: { 6011: if(position == last) 6011: return false; 6011: else 6011: ++position; 6011: } 6011: 6011: m_presult->set_size((m_match_flags & match_nosubs) ? 1u : static_cast(1u + re.mark_count()), search_base, last); 6011: 6011: 6011: } 6011: if(m_match_flags & match_posix) 6011: { 6011: m_result.set_size(static_cast(1u + re.mark_count()), base, last); 6011: m_result.set_base(base); 6011: } 6011: 6011: verify_options(re.flags(), m_match_flags); 6011: 6011: unsigned type = (m_match_flags & match_continuous) ? 6011: static_cast(regbase::restart_continue) 6011: : static_cast(re.get_restart_type()); 6011: 6011: 6011: matcher_proc_type proc = s_find_vtable[type]; 6011: return (this->*proc)(); 6011: 6011: 6011: } 6011: catch(...) 6011: { 6011: 6011: 6011: 6011: while(unwind(true)){} 6011: throw; 6011: } 6011: 6011: } 6011: 6011: template 6011: bool perl_matcher::match_prefix() 6011: { 6011: m_has_partial_match = false; 6011: m_has_found_match = false; 6011: pstate = re.get_first_state(); 6011: m_presult->set_first(position); 6011: restart = position; 6011: match_all_states(); 6011: if(!m_has_found_match && m_has_partial_match && (m_match_flags & match_partial)) 6011: { 6011: m_has_found_match = true; 6011: m_presult->set_second(last, 0, false); 6011: position = last; 6011: if((m_match_flags & match_posix) == match_posix) 6011: { 6011: m_result.maybe_assign(*m_presult); 6011: } 6011: } 6011: # 355 "/usr/include/boost/regex/v4/perl_matcher_common.hpp" 3 4 6011: if(!m_has_found_match) 6011: position = restart; 6011: 6011: 6011: 6011: return m_has_found_match; 6011: } 6011: 6011: template 6011: bool perl_matcher::match_literal() 6011: { 6011: unsigned int len = static_cast(pstate)->length; 6011: const char_type* what = reinterpret_cast(static_cast(pstate) + 1); 6011: 6011: 6011: 6011: for(unsigned int i = 0; i < len; ++i, ++position) 6011: { 6011: if((position == last) || (traits_inst.translate(*position, icase) != what[i])) 6011: return false; 6011: } 6011: pstate = pstate->next.p; 6011: return true; 6011: } 6011: 6011: template 6011: bool perl_matcher::match_start_line() 6011: { 6011: if(position == backstop) 6011: { 6011: if((m_match_flags & match_prev_avail) == 0) 6011: { 6011: if((m_match_flags & match_not_bol) == 0) 6011: { 6011: pstate = pstate->next.p; 6011: return true; 6011: } 6011: return false; 6011: } 6011: } 6011: else if(m_match_flags & match_single_line) 6011: return false; 6011: 6011: 6011: BidiIterator t(position); 6011: --t; 6011: if(position != last) 6011: { 6011: if(is_separator(*t) && !((*t == static_cast('\r')) && (*position == static_cast('\n'))) ) 6011: { 6011: pstate = pstate->next.p; 6011: return true; 6011: } 6011: } 6011: else if(is_separator(*t)) 6011: { 6011: pstate = pstate->next.p; 6011: return true; 6011: } 6011: return false; 6011: } 6011: 6011: template 6011: bool perl_matcher::match_end_line() 6011: { 6011: if(position != last) 6011: { 6011: if(m_match_flags & match_single_line) 6011: return false; 6011: 6011: if(is_separator(*position)) 6011: { 6011: if((position != backstop) || (m_match_flags & match_prev_avail)) 6011: { 6011: 6011: BidiIterator t(position); 6011: --t; 6011: if((*t == static_cast('\r')) && (*position == static_cast('\n'))) 6011: { 6011: return false; 6011: } 6011: } 6011: pstate = pstate->next.p; 6011: return true; 6011: } 6011: } 6011: else if((m_match_flags & match_not_eol) == 0) 6011: { 6011: pstate = pstate->next.p; 6011: return true; 6011: } 6011: return false; 6011: } 6011: 6011: template 6011: bool perl_matcher::match_wild() 6011: { 6011: if(position == last) 6011: return false; 6011: if(is_separator(*position) && ((match_any_mask & static_cast(pstate)->mask) == 0)) 6011: return false; 6011: if((*position == char_type(0)) && (m_match_flags & match_not_dot_null)) 6011: return false; 6011: pstate = pstate->next.p; 6011: ++position; 6011: return true; 6011: } 6011: 6011: template 6011: bool perl_matcher::match_word_boundary() 6011: { 6011: bool b; 6011: if(position != last) 6011: { 6011: 6011: b = traits_inst.isctype(*position, m_word_mask); 6011: } 6011: else 6011: { 6011: b = (m_match_flags & match_not_eow) ? true : false; 6011: } 6011: if((position == backstop) && ((m_match_flags & match_prev_avail) == 0)) 6011: { 6011: if(m_match_flags & match_not_bow) 6011: b ^= true; 6011: else 6011: b ^= false; 6011: } 6011: else 6011: { 6011: --position; 6011: b ^= traits_inst.isctype(*position, m_word_mask); 6011: ++position; 6011: } 6011: if(b) 6011: { 6011: pstate = pstate->next.p; 6011: return true; 6011: } 6011: return false; 6011: } 6011: 6011: template 6011: bool perl_matcher::match_within_word() 6011: { 6011: if(position == last) 6011: return false; 6011: 6011: bool prev = traits_inst.isctype(*position, m_word_mask); 6011: { 6011: bool b; 6011: if((position == backstop) && ((m_match_flags & match_prev_avail) == 0)) 6011: return false; 6011: else 6011: { 6011: --position; 6011: b = traits_inst.isctype(*position, m_word_mask); 6011: ++position; 6011: } 6011: if(b == prev) 6011: { 6011: pstate = pstate->next.p; 6011: return true; 6011: } 6011: } 6011: return false; 6011: } 6011: 6011: template 6011: bool perl_matcher::match_word_start() 6011: { 6011: if(position == last) 6011: return false; 6011: if(!traits_inst.isctype(*position, m_word_mask)) 6011: return false; 6011: if((position == backstop) && ((m_match_flags & match_prev_avail) == 0)) 6011: { 6011: if(m_match_flags & match_not_bow) 6011: return false; 6011: } 6011: else 6011: { 6011: 6011: BidiIterator t(position); 6011: --t; 6011: if(traits_inst.isctype(*t, m_word_mask)) 6011: return false; 6011: } 6011: 6011: pstate = pstate->next.p; 6011: return true; 6011: } 6011: 6011: template 6011: bool perl_matcher::match_word_end() 6011: { 6011: if((position == backstop) && ((m_match_flags & match_prev_avail) == 0)) 6011: return false; 6011: BidiIterator t(position); 6011: --t; 6011: if(traits_inst.isctype(*t, m_word_mask) == false) 6011: return false; 6011: 6011: if(position == last) 6011: { 6011: if(m_match_flags & match_not_eow) 6011: return false; 6011: } 6011: else 6011: { 6011: 6011: if(traits_inst.isctype(*position, m_word_mask)) 6011: return false; 6011: } 6011: pstate = pstate->next.p; 6011: return true; 6011: } 6011: 6011: template 6011: bool perl_matcher::match_buffer_start() 6011: { 6011: if((position != backstop) || (m_match_flags & match_not_bob)) 6011: return false; 6011: 6011: pstate = pstate->next.p; 6011: return true; 6011: } 6011: 6011: template 6011: bool perl_matcher::match_buffer_end() 6011: { 6011: if((position != last) || (m_match_flags & match_not_eob)) 6011: return false; 6011: 6011: pstate = pstate->next.p; 6011: return true; 6011: } 6011: 6011: template 6011: bool perl_matcher::match_backref() 6011: { 6011: 6011: 6011: 6011: 6011: 6011: 6011: int index = static_cast(pstate)->index; 6011: if(index >= 10000) 6011: { 6011: named_subexpressions::range_type r = re.get_data().equal_range(index); 6011: (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__)); 6011: do 6011: { 6011: index = r.first->index; 6011: ++r.first; 6011: }while((r.first != r.second) && ((*m_presult)[index].matched != true)); 6011: } 6011: 6011: if((m_match_flags & match_perl) && !(*m_presult)[index].matched) 6011: return false; 6011: 6011: BidiIterator i = (*m_presult)[index].first; 6011: BidiIterator j = (*m_presult)[index].second; 6011: while(i != j) 6011: { 6011: if((position == last) || (traits_inst.translate(*position, icase) != traits_inst.translate(*i, icase))) 6011: return false; 6011: ++i; 6011: ++position; 6011: } 6011: pstate = pstate->next.p; 6011: return true; 6011: } 6011: 6011: template 6011: bool perl_matcher::match_long_set() 6011: { 6011: typedef typename traits::char_class_type char_class_type; 6011: 6011: if(position == last) 6011: return false; 6011: BidiIterator t = re_is_set_member(position, last, static_cast*>(pstate), re.get_data(), icase); 6011: if(t != position) 6011: { 6011: pstate = pstate->next.p; 6011: position = t; 6011: return true; 6011: } 6011: return false; 6011: } 6011: 6011: template 6011: bool perl_matcher::match_set() 6011: { 6011: if(position == last) 6011: return false; 6011: if(static_cast(pstate)->_map[static_cast(traits_inst.translate(*position, icase))]) 6011: { 6011: pstate = pstate->next.p; 6011: ++position; 6011: return true; 6011: } 6011: return false; 6011: } 6011: 6011: template 6011: bool perl_matcher::match_jump() 6011: { 6011: pstate = static_cast(pstate)->alt.p; 6011: return true; 6011: } 6011: 6011: template 6011: bool perl_matcher::match_combining() 6011: { 6011: if(position == last) 6011: return false; 6011: if(is_combining(traits_inst.translate(*position, icase))) 6011: return false; 6011: ++position; 6011: while((position != last) && is_combining(traits_inst.translate(*position, icase))) 6011: ++position; 6011: pstate = pstate->next.p; 6011: return true; 6011: } 6011: 6011: template 6011: bool perl_matcher::match_soft_buffer_end() 6011: { 6011: if(m_match_flags & match_not_eob) 6011: return false; 6011: BidiIterator p(position); 6011: while((p != last) && is_separator(traits_inst.translate(*p, icase)))++p; 6011: if(p != last) 6011: return false; 6011: pstate = pstate->next.p; 6011: return true; 6011: } 6011: 6011: template 6011: bool perl_matcher::match_restart_continue() 6011: { 6011: if(position == search_base) 6011: { 6011: pstate = pstate->next.p; 6011: return true; 6011: } 6011: return false; 6011: } 6011: 6011: template 6011: bool perl_matcher::match_backstep() 6011: { 6011: 6011: 6011: 6011: 6011: if( ::boost::is_random_access_iterator::value) 6011: { 6011: std::ptrdiff_t maxlen = ::boost::re_detail_106501::distance(backstop, position); 6011: if(maxlen < static_cast(pstate)->index) 6011: return false; 6011: std::advance(position, -static_cast(pstate)->index); 6011: } 6011: else 6011: { 6011: int c = static_cast(pstate)->index; 6011: while(c--) 6011: { 6011: if(position == backstop) 6011: return false; 6011: --position; 6011: } 6011: } 6011: pstate = pstate->next.p; 6011: return true; 6011: 6011: 6011: 6011: } 6011: 6011: template 6011: inline bool perl_matcher::match_assert_backref() 6011: { 6011: 6011: int index = static_cast(pstate)->index; 6011: bool result = false; 6011: if(index == 9999) 6011: { 6011: 6011: return false; 6011: } 6011: else if(index > 0) 6011: { 6011: 6011: 6011: if(index >= 10000) 6011: { 6011: named_subexpressions::range_type r = re.get_data().equal_range(index); 6011: while(r.first != r.second) 6011: { 6011: if((*m_presult)[r.first->index].matched) 6011: { 6011: result = true; 6011: break; 6011: } 6011: ++r.first; 6011: } 6011: } 6011: else 6011: { 6011: result = (*m_presult)[index].matched; 6011: } 6011: pstate = pstate->next.p; 6011: } 6011: else 6011: { 6011: 6011: 6011: int idx = -index-1; 6011: if(idx >= 10000) 6011: { 6011: named_subexpressions::range_type r = re.get_data().equal_range(idx); 6011: int stack_index = recursion_stack.empty() ? -1 : recursion_stack.back().idx; 6011: while(r.first != r.second) 6011: { 6011: result |= (stack_index == r.first->index); 6011: if(result)break; 6011: ++r.first; 6011: } 6011: } 6011: else 6011: { 6011: result = !recursion_stack.empty() && ((recursion_stack.back().idx == idx) || (index == 0)); 6011: } 6011: pstate = pstate->next.p; 6011: } 6011: return result; 6011: } 6011: 6011: template 6011: bool perl_matcher::match_fail() 6011: { 6011: 6011: return false; 6011: } 6011: 6011: template 6011: bool perl_matcher::match_accept() 6011: { 6011: if(!recursion_stack.empty()) 6011: { 6011: return skip_until_paren(recursion_stack.back().idx); 6011: } 6011: else 6011: { 6011: return skip_until_paren(0x7fffffff); 6011: } 6011: } 6011: 6011: template 6011: bool perl_matcher::find_restart_any() 6011: { 6011: 6011: 6011: 6011: 6011: const unsigned char* _map = re.get_map(); 6011: while(true) 6011: { 6011: 6011: while((position != last) && !can_start(*position, _map, (unsigned char)mask_any) ) 6011: ++position; 6011: if(position == last) 6011: { 6011: 6011: if(re.can_be_null()) 6011: return match_prefix(); 6011: break; 6011: } 6011: 6011: if(match_prefix()) 6011: return true; 6011: if(position == last) 6011: return false; 6011: ++position; 6011: } 6011: return false; 6011: 6011: 6011: 6011: } 6011: 6011: template 6011: bool perl_matcher::find_restart_word() 6011: { 6011: 6011: 6011: 6011: 6011: 6011: const unsigned char* _map = re.get_map(); 6011: if((m_match_flags & match_prev_avail) || (position != base)) 6011: --position; 6011: else if(match_prefix()) 6011: return true; 6011: do 6011: { 6011: while((position != last) && traits_inst.isctype(*position, m_word_mask)) 6011: ++position; 6011: while((position != last) && !traits_inst.isctype(*position, m_word_mask)) 6011: ++position; 6011: if(position == last) 6011: break; 6011: 6011: if(can_start(*position, _map, (unsigned char)mask_any) ) 6011: { 6011: if(match_prefix()) 6011: return true; 6011: } 6011: if(position == last) 6011: break; 6011: } while(true); 6011: return false; 6011: 6011: 6011: 6011: } 6011: 6011: template 6011: bool perl_matcher::find_restart_line() 6011: { 6011: 6011: const unsigned char* _map = re.get_map(); 6011: if(match_prefix()) 6011: return true; 6011: while(position != last) 6011: { 6011: while((position != last) && !is_separator(*position)) 6011: ++position; 6011: if(position == last) 6011: return false; 6011: ++position; 6011: if(position == last) 6011: { 6011: if(re.can_be_null() && match_prefix()) 6011: return true; 6011: return false; 6011: } 6011: 6011: if( can_start(*position, _map, (unsigned char)mask_any) ) 6011: { 6011: if(match_prefix()) 6011: return true; 6011: } 6011: if(position == last) 6011: return false; 6011: 6011: } 6011: return false; 6011: } 6011: 6011: template 6011: bool perl_matcher::find_restart_buf() 6011: { 6011: if((position == base) && ((m_match_flags & match_not_bob) == 0)) 6011: return match_prefix(); 6011: return false; 6011: } 6011: 6011: template 6011: bool perl_matcher::find_restart_lit() 6011: { 6011: # 985 "/usr/include/boost/regex/v4/perl_matcher_common.hpp" 3 4 6011: return false; 6011: } 6011: 6011: } 6011: 6011: } 6011: # 614 "/usr/include/boost/regex/v4/perl_matcher.hpp" 2 3 4 6011: # 89 "/usr/include/boost/regex/v4/regex.hpp" 2 3 4 6011: # 97 "/usr/include/boost/regex/v4/regex.hpp" 3 4 6011: # 1 "/usr/include/boost/regex/v4/instances.hpp" 1 3 4 6011: # 25 "/usr/include/boost/regex/v4/instances.hpp" 3 4 6011: namespace boost{ 6011: # 136 "/usr/include/boost/regex/v4/instances.hpp" 3 4 6011: namespace re_detail_106501{ 6011: __extension__ extern template 6011: std::locale cpp_regex_traits_base::imbue(const std::locale& l); 6011: 6011: __extension__ extern template 6011: cpp_regex_traits_implementation::string_type 6011: cpp_regex_traits_implementation::transform_primary(const char* p1, const char* p2) const; 6011: __extension__ extern template 6011: cpp_regex_traits_implementation::string_type 6011: cpp_regex_traits_implementation::transform(const char* p1, const char* p2) const; 6011: __extension__ extern template 6011: cpp_regex_traits_implementation::string_type 6011: cpp_regex_traits_implementation::lookup_collatename(const char* p1, const char* p2) const; 6011: __extension__ extern template 6011: void cpp_regex_traits_implementation::init(); 6011: __extension__ extern template 6011: cpp_regex_traits_implementation::char_class_type 6011: cpp_regex_traits_implementation::lookup_classname_imp(const char* p1, const char* p2) const; 6011: 6011: 6011: 6011: 6011: } 6011: __extension__ extern template 6011: boost::intmax_t cpp_regex_traits::toi(const char*& first, const char* last, int radix)const; 6011: __extension__ extern template 6011: std::string cpp_regex_traits::catalog_name(const std::string& name); 6011: __extension__ extern template 6011: std::string& cpp_regex_traits::get_catalog_name_inst(); 6011: __extension__ extern template 6011: std::string cpp_regex_traits::get_catalog_name(); 6011: 6011: __extension__ extern template 6011: static_mutex& cpp_regex_traits::get_mutex_inst(); 6011: 6011: 6011: 6011: __extension__ extern template basic_regex >& 6011: basic_regex >::do_assign( 6011: const char* p1, 6011: const char* p2, 6011: flag_type f); 6011: __extension__ extern template basic_regex >::locale_type 6011: basic_regex >::imbue(locale_type l); 6011: 6011: __extension__ extern template void 6011: match_results::maybe_assign( 6011: const match_results& m); 6011: 6011: namespace re_detail_106501{ 6011: __extension__ extern template void perl_matcher::allocator_type , boost::regex_traits >::construct_init( 6011: const basic_regex >& e, match_flag_type f); 6011: __extension__ extern template bool perl_matcher::allocator_type , boost::regex_traits >::match(); 6011: __extension__ extern template bool perl_matcher::allocator_type , boost::regex_traits >::find(); 6011: } 6011: 6011: 6011: 6011: 6011: 6011: 6011: __extension__ extern template void 6011: match_results::const_iterator>::maybe_assign( 6011: const match_results::const_iterator>& m); 6011: 6011: namespace re_detail_106501{ 6011: __extension__ extern template void perl_matcher::const_iterator, match_results< std::basic_string::const_iterator >::allocator_type, boost::regex_traits >::construct_init( 6011: const basic_regex& e, match_flag_type f); 6011: __extension__ extern template bool perl_matcher::const_iterator, match_results< std::basic_string::const_iterator >::allocator_type, boost::regex_traits >::match(); 6011: __extension__ extern template bool perl_matcher::const_iterator, match_results< std::basic_string::const_iterator >::allocator_type, boost::regex_traits >::find(); 6011: } 6011: # 218 "/usr/include/boost/regex/v4/instances.hpp" 3 4 6011: } 6011: # 98 "/usr/include/boost/regex/v4/regex.hpp" 2 3 4 6011: # 108 "/usr/include/boost/regex/v4/regex.hpp" 3 4 6011: # 1 "/usr/include/boost/regex/v4/instances.hpp" 1 3 4 6011: # 25 "/usr/include/boost/regex/v4/instances.hpp" 3 4 6011: namespace boost{ 6011: # 136 "/usr/include/boost/regex/v4/instances.hpp" 3 4 6011: namespace re_detail_106501{ 6011: __extension__ extern template 6011: std::locale cpp_regex_traits_base::imbue(const std::locale& l); 6011: 6011: __extension__ extern template 6011: cpp_regex_traits_implementation::string_type 6011: cpp_regex_traits_implementation::transform_primary(const wchar_t* p1, const wchar_t* p2) const; 6011: __extension__ extern template 6011: cpp_regex_traits_implementation::string_type 6011: cpp_regex_traits_implementation::transform(const wchar_t* p1, const wchar_t* p2) const; 6011: __extension__ extern template 6011: cpp_regex_traits_implementation::string_type 6011: cpp_regex_traits_implementation::lookup_collatename(const wchar_t* p1, const wchar_t* p2) const; 6011: __extension__ extern template 6011: void cpp_regex_traits_implementation::init(); 6011: __extension__ extern template 6011: cpp_regex_traits_implementation::char_class_type 6011: cpp_regex_traits_implementation::lookup_classname_imp(const wchar_t* p1, const wchar_t* p2) const; 6011: 6011: 6011: 6011: 6011: } 6011: __extension__ extern template 6011: boost::intmax_t cpp_regex_traits::toi(const wchar_t*& first, const wchar_t* last, int radix)const; 6011: __extension__ extern template 6011: std::string cpp_regex_traits::catalog_name(const std::string& name); 6011: __extension__ extern template 6011: std::string& cpp_regex_traits::get_catalog_name_inst(); 6011: __extension__ extern template 6011: std::string cpp_regex_traits::get_catalog_name(); 6011: 6011: __extension__ extern template 6011: static_mutex& cpp_regex_traits::get_mutex_inst(); 6011: 6011: 6011: 6011: __extension__ extern template basic_regex >& 6011: basic_regex >::do_assign( 6011: const wchar_t* p1, 6011: const wchar_t* p2, 6011: flag_type f); 6011: __extension__ extern template basic_regex >::locale_type 6011: basic_regex >::imbue(locale_type l); 6011: 6011: __extension__ extern template void 6011: match_results::maybe_assign( 6011: const match_results& m); 6011: 6011: namespace re_detail_106501{ 6011: __extension__ extern template void perl_matcher::allocator_type , boost::regex_traits >::construct_init( 6011: const basic_regex >& e, match_flag_type f); 6011: __extension__ extern template bool perl_matcher::allocator_type , boost::regex_traits >::match(); 6011: __extension__ extern template bool perl_matcher::allocator_type , boost::regex_traits >::find(); 6011: } 6011: 6011: 6011: 6011: 6011: 6011: 6011: __extension__ extern template void 6011: match_results::const_iterator>::maybe_assign( 6011: const match_results::const_iterator>& m); 6011: 6011: namespace re_detail_106501{ 6011: __extension__ extern template void perl_matcher::const_iterator, match_results< std::basic_string::const_iterator >::allocator_type, boost::regex_traits >::construct_init( 6011: const basic_regex& e, match_flag_type f); 6011: __extension__ extern template bool perl_matcher::const_iterator, match_results< std::basic_string::const_iterator >::allocator_type, boost::regex_traits >::match(); 6011: __extension__ extern template bool perl_matcher::const_iterator, match_results< std::basic_string::const_iterator >::allocator_type, boost::regex_traits >::find(); 6011: } 6011: # 218 "/usr/include/boost/regex/v4/instances.hpp" 3 4 6011: } 6011: # 109 "/usr/include/boost/regex/v4/regex.hpp" 2 3 4 6011: # 128 "/usr/include/boost/regex/v4/regex.hpp" 3 4 6011: namespace boost{ 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: typedef match_results cmatch; 6011: typedef match_results smatch; 6011: 6011: typedef match_results wcmatch; 6011: typedef match_results wsmatch; 6011: 6011: 6011: } 6011: 6011: # 1 "/usr/include/boost/regex/v4/regex_match.hpp" 1 3 4 6011: # 25 "/usr/include/boost/regex/v4/regex_match.hpp" 3 4 6011: namespace boost{ 6011: # 43 "/usr/include/boost/regex/v4/regex_match.hpp" 3 4 6011: template 6011: bool regex_match(BidiIterator first, BidiIterator last, 6011: match_results& m, 6011: const basic_regex& e, 6011: match_flag_type flags = match_default) 6011: { 6011: re_detail_106501::perl_matcher matcher(first, last, m, e, flags, first); 6011: return matcher.match(); 6011: } 6011: template 6011: bool regex_match(iterator first, iterator last, 6011: const basic_regex& e, 6011: match_flag_type flags = match_default) 6011: { 6011: match_results m; 6011: return regex_match(first, last, m, e, flags | regex_constants::match_any); 6011: } 6011: 6011: 6011: 6011: 6011: 6011: 6011: 6011: template 6011: inline bool regex_match(const charT* str, 6011: match_results& m, 6011: const basic_regex& e, 6011: match_flag_type flags = match_default) 6011: { 6011: return regex_match(str, str + traits::length(str), m, e, flags); 6011: } 6011: 6011: template 6011: inline bool regex_match(const std::basic_string& s, 6011: match_results::const_iterator, Allocator>& m, 6011: const basic_regex& e, 6011: match_flag_type flags = match_default) 6011: { 6011: return regex_match(s.begin(), s.end(), m, e, flags); 6011: } 6011: template 6011: inline bool regex_match(const charT* str, 6011: const basic_regex& e, 6011: match_flag_type flags = match_default) 6011: { 6011: match_results m; 6011: return regex_match(str, str + traits::length(str), m, e, flags | regex_constants::match_any); 6011: } 6011: 6011: template 6011: inline bool regex_match(const std::basic_string& s, 6011: const basic_regex& e, 6011: match_flag_type flags = match_default) 6011: { 6011: typedef typename std::basic_string::const_iterator iterator; 6011: match_results m; 6011: return regex_match(s.begin(), s.end(), m, e, flags | regex_constants::match_any); 6011: } 6011: # 362 "/usr/include/boost/regex/v4/regex_match.hpp" 3 4 6011: } 6011: # 146 "/usr/include/boost/regex/v4/regex.hpp" 2 3 4 6011: 6011: 6011: # 1 "/usr/include/boost/regex/v4/regex_search.hpp" 1 3 4 6011: # 23 "/usr/include/boost/regex/v4/regex_search.hpp" 3 4 6011: namespace boost{ 6011: # 36 "/usr/include/boost/regex/v4/regex_search.hpp" 3 4 6011: template 6011: bool regex_search(BidiIterator first, BidiIterator last, 6011: match_results& m, 6011: const basic_regex& e, 6011: match_flag_type flags = match_default) 6011: { 6011: return regex_search(first, last, m, e, flags, first); 6011: } 6011: 6011: template 6011: bool regex_search(BidiIterator first, BidiIterator last, 6011: match_results& m, 6011: const basic_regex& e, 6011: match_flag_type flags, 6011: BidiIterator base) 6011: { 6011: if(e.flags() & regex_constants::failbit) 6011: return false; 6011: 6011: re_detail_106501::perl_matcher matcher(first, last, m, e, flags, base); 6011: return matcher.find(); 6011: } 6011: # 66 "/usr/include/boost/regex/v4/regex_search.hpp" 3 4 6011: template 6011: inline bool regex_search(const charT* str, 6011: match_results& m, 6011: const basic_regex& e, 6011: match_flag_type flags = match_default) 6011: { 6011: return regex_search(str, str + traits::length(str), m, e, flags); 6011: } 6011: 6011: template 6011: inline bool regex_search(const std::basic_string& s, 6011: match_results::const_iterator, Allocator>& m, 6011: const basic_regex& e, 6011: match_flag_type flags = match_default) 6011: { 6011: return regex_search(s.begin(), s.end(), m, e, flags); 6011: } 6011: # 134 "/usr/include/boost/regex/v4/regex_search.hpp" 3 4 6011: template 6011: bool regex_search(BidiIterator first, BidiIterator last, 6011: const basic_regex& e, 6011: match_flag_type flags = match_default) 6011: { 6011: if(e.flags() & regex_constants::failbit) 6011: return false; 6011: 6011: match_results m; 6011: typedef typename match_results::allocator_type match_alloc_type; 6011: re_detail_106501::perl_matcher matcher(first, last, m, e, flags | regex_constants::match_any, first); 6011: return matcher.find(); 6011: } 6011: 6011: 6011: 6011: template 6011: inline bool regex_search(const charT* str, 6011: const basic_regex& e, 6011: match_flag_type flags = match_default) 6011: { 6011: return regex_search(str, str + traits::length(str), e, flags); 6011: } 6011: 6011: template 6011: inline bool regex_search(const std::basic_string& s, 6011: const basic_regex& e, 6011: match_flag_type flags = match_default) 6011: { 6011: return regex_search(s.begin(), s.end(), e, flags); 6011: } 6011: # 213 "/usr/include/boost/regex/v4/regex_search.hpp" 3 4 6011: } 6011: # 149 "/usr/include/boost/regex/v4/regex.hpp" 2 3 4 6011: 6011: 6011: # 1 "/usr/include/boost/regex/v4/regex_iterator.hpp" 1 3 4 6011: # 24 "/usr/include/boost/regex/v4/regex_iterator.hpp" 3 4 6011: namespace boost{ 6011: # 37 "/usr/include/boost/regex/v4/regex_iterator.hpp" 3 4 6011: template 6011: class regex_iterator_implementation 6011: { 6011: typedef basic_regex regex_type; 6011: 6011: match_results what; 6011: BidirectionalIterator base; 6011: BidirectionalIterator end; 6011: const regex_type re; 6011: match_flag_type flags; 6011: 6011: public: 6011: regex_iterator_implementation(const regex_type* p, BidirectionalIterator last, match_flag_type f) 6011: : base(), end(last), re(*p), flags(f){} 6011: bool init(BidirectionalIterator first) 6011: { 6011: base = first; 6011: return regex_search(first, end, what, re, flags); 6011: } 6011: bool compare(const regex_iterator_implementation& that) 6011: { 6011: if(this == &that) return true; 6011: 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); 6011: } 6011: const match_results& get() 6011: { return what; } 6011: bool next() 6011: { 6011: 6011: 6011: BidirectionalIterator next_start = what[0].second; 6011: match_flag_type f(flags); 6011: if(!what.length() || (f & regex_constants::match_posix)) 6011: f |= regex_constants::match_not_initial_null; 6011: 6011: 6011: bool result = regex_search(next_start, end, what, re, f, base); 6011: if(result) 6011: what.set_base(base); 6011: return result; 6011: } 6011: private: 6011: regex_iterator_implementation& operator=(const regex_iterator_implementation&); 6011: }; 6011: 6011: template ::value_type, 6011: class traits = regex_traits > 6011: class regex_iterator 6011: 6011: : public std::iterator< 6011: std::forward_iterator_tag, 6011: match_results, 6011: typename re_detail_106501::regex_iterator_traits::difference_type, 6011: const match_results*, 6011: const match_results& > 6011: 6011: { 6011: private: 6011: typedef regex_iterator_implementation impl; 6011: typedef shared_ptr pimpl; 6011: public: 6011: typedef basic_regex regex_type; 6011: typedef match_results value_type; 6011: typedef typename re_detail_106501::regex_iterator_traits::difference_type 6011: difference_type; 6011: typedef const value_type* pointer; 6011: typedef const value_type& reference; 6011: typedef std::forward_iterator_tag iterator_category; 6011: 6011: regex_iterator(){} 6011: regex_iterator(BidirectionalIterator a, BidirectionalIterator b, 6011: const regex_type& re, 6011: match_flag_type m = match_default) 6011: : pdata(new impl(&re, b, m)) 6011: { 6011: if(!pdata->init(a)) 6011: { 6011: pdata.reset(); 6011: } 6011: } 6011: regex_iterator(const regex_iterator& that) 6011: : pdata(that.pdata) {} 6011: regex_iterator& operator=(const regex_iterator& that) 6011: { 6011: pdata = that.pdata; 6011: return *this; 6011: } 6011: bool operator==(const regex_iterator& that)const 6011: { 6011: if((pdata.get() == 0) || (that.pdata.get() == 0)) 6011: return pdata.get() == that.pdata.get(); 6011: return pdata->compare(*(that.pdata.get())); 6011: } 6011: bool operator!=(const regex_iterator& that)const 6011: { return !(*this == that); } 6011: const value_type& operator*()const 6011: { return pdata->get(); } 6011: const value_type* operator->()const 6011: { return &(pdata->get()); } 6011: regex_iterator& operator++() 6011: { 6011: cow(); 6011: if(0 == pdata->next()) 6011: { 6011: pdata.reset(); 6011: } 6011: return *this; 6011: } 6011: regex_iterator operator++(int) 6011: { 6011: regex_iterator result(*this); 6011: ++(*this); 6011: return result; 6011: } 6011: private: 6011: 6011: pimpl pdata; 6011: 6011: void cow() 6011: { 6011: 6011: if(pdata.get() && !pdata.unique()) 6011: { 6011: pdata.reset(new impl(*(pdata.get()))); 6011: } 6011: } 6011: }; 6011: 6011: typedef regex_iterator cregex_iterator; 6011: typedef regex_iterator sregex_iterator; 6011: 6011: typedef regex_iterator wcregex_iterator; 6011: typedef regex_iterator wsregex_iterator; 6011: 6011: 6011: 6011: template 6011: inline regex_iterator make_regex_iterator(const charT* p, const basic_regex& e, regex_constants::match_flag_type m = regex_constants::match_default) 6011: { 6011: return regex_iterator(p, p+traits::length(p), e, m); 6011: } 6011: template 6011: 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) 6011: { 6011: return regex_iterator::const_iterator, charT, traits>(p.begin(), p.end(), e, m); 6011: } 6011: # 198 "/usr/include/boost/regex/v4/regex_iterator.hpp" 3 4 6011: } 6011: # 152 "/usr/include/boost/regex/v4/regex.hpp" 2 3 4 6011: 6011: 6011: # 1 "/usr/include/boost/regex/v4/regex_token_iterator.hpp" 1 3 4 6011: # 36 "/usr/include/boost/regex/v4/regex_token_iterator.hpp" 3 4 6011: namespace boost{ 6011: # 51 "/usr/include/boost/regex/v4/regex_token_iterator.hpp" 3 4 6011: template 6011: class regex_token_iterator_implementation 6011: { 6011: typedef basic_regex regex_type; 6011: typedef sub_match value_type; 6011: 6011: match_results what; 6011: BidirectionalIterator base; 6011: BidirectionalIterator end; 6011: const regex_type re; 6011: match_flag_type flags; 6011: value_type result; 6011: int N; 6011: std::vector subs; 6011: 6011: public: 6011: regex_token_iterator_implementation(const regex_type* p, BidirectionalIterator last, int sub, match_flag_type f) 6011: : end(last), re(*p), flags(f){ subs.push_back(sub); } 6011: regex_token_iterator_implementation(const regex_type* p, BidirectionalIterator last, const std::vector& v, match_flag_type f) 6011: : end(last), re(*p), flags(f), subs(v){} 6011: # 90 "/usr/include/boost/regex/v4/regex_token_iterator.hpp" 3 4 6011: template 6011: regex_token_iterator_implementation(const regex_type* p, BidirectionalIterator last, const int (&submatches)[CN], match_flag_type f) 6011: : end(last), re(*p), flags(f) 6011: { 6011: for(std::size_t i = 0; i < CN; ++i) 6011: { 6011: subs.push_back(submatches[i]); 6011: } 6011: } 6011: 6011: 6011: bool init(BidirectionalIterator first) 6011: { 6011: N = 0; 6011: base = first; 6011: if(regex_search(first, end, what, re, flags, base) == true) 6011: { 6011: N = 0; 6011: result = ((subs[N] == -1) ? what.prefix() : what[(int)subs[N]]); 6011: return true; 6011: } 6011: else if((subs[N] == -1) && (first != end)) 6011: { 6011: result.first = first; 6011: result.second = end; 6011: result.matched = (first != end); 6011: N = -1; 6011: return true; 6011: } 6011: return false; 6011: } 6011: bool compare(const regex_token_iterator_implementation& that) 6011: { 6011: if(this == &that) return true; 6011: return (&re.get_data() == &that.re.get_data()) 6011: && (end == that.end) 6011: && (flags == that.flags) 6011: && (N == that.N) 6011: && (what[0].first == that.what[0].first) 6011: && (what[0].second == that.what[0].second); 6011: } 6011: const value_type& get() 6011: { return result; } 6011: bool next() 6011: { 6011: if(N == -1) 6011: return false; 6011: if(N+1 < (int)subs.size()) 6011: { 6011: ++N; 6011: result =((subs[N] == -1) ? what.prefix() : what[subs[N]]); 6011: return true; 6011: } 6011: 6011: 6011: BidirectionalIterator last_end(what[0].second); 6011: if(regex_search(last_end, end, what, re, ((what[0].first == what[0].second) ? flags | regex_constants::match_not_initial_null : flags), base)) 6011: { 6011: N =0; 6011: result =((subs[N] == -1) ? what.prefix() : what[subs[N]]); 6011: return true; 6011: } 6011: else if((last_end != end) && (subs[0] == -1)) 6011: { 6011: N =-1; 6011: result.first = last_end; 6011: result.second = end; 6011: result.matched = (last_end != end); 6011: return true; 6011: } 6011: return false; 6011: } 6011: private: 6011: regex_token_iterator_implementation& operator=(const regex_token_iterator_implementation&); 6011: }; 6011: 6011: template ::value_type, 6011: class traits = regex_traits > 6011: class regex_token_iterator 6011: 6011: : public std::iterator< 6011: std::forward_iterator_tag, 6011: sub_match, 6011: typename re_detail_106501::regex_iterator_traits::difference_type, 6011: const sub_match*, 6011: const sub_match& > 6011: 6011: { 6011: private: 6011: typedef regex_token_iterator_implementation impl; 6011: typedef shared_ptr pimpl; 6011: public: 6011: typedef basic_regex regex_type; 6011: typedef sub_match value_type; 6011: typedef typename re_detail_106501::regex_iterator_traits::difference_type 6011: difference_type; 6011: typedef const value_type* pointer; 6011: typedef const value_type& reference; 6011: typedef std::forward_iterator_tag iterator_category; 6011: 6011: regex_token_iterator(){} 6011: regex_token_iterator(BidirectionalIterator a, BidirectionalIterator b, const regex_type& re, 6011: int submatch = 0, match_flag_type m = match_default) 6011: : pdata(new impl(&re, b, submatch, m)) 6011: { 6011: if(!pdata->init(a)) 6011: pdata.reset(); 6011: } 6011: regex_token_iterator(BidirectionalIterator a, BidirectionalIterator b, const regex_type& re, 6011: const std::vector& submatches, match_flag_type m = match_default) 6011: : pdata(new impl(&re, b, submatches, m)) 6011: { 6011: if(!pdata->init(a)) 6011: pdata.reset(); 6011: } 6011: # 219 "/usr/include/boost/regex/v4/regex_token_iterator.hpp" 3 4 6011: template 6011: regex_token_iterator(BidirectionalIterator a, BidirectionalIterator b, const regex_type& re, 6011: const int (&submatches)[N], match_flag_type m = match_default) 6011: : pdata(new impl(&re, b, submatches, m)) 6011: { 6011: if(!pdata->init(a)) 6011: pdata.reset(); 6011: } 6011: 6011: 6011: regex_token_iterator(const regex_token_iterator& that) 6011: : pdata(that.pdata) {} 6011: regex_token_iterator& operator=(const regex_token_iterator& that) 6011: { 6011: pdata = that.pdata; 6011: return *this; 6011: } 6011: bool operator==(const regex_token_iterator& that)const 6011: { 6011: if((pdata.get() == 0) || (that.pdata.get() == 0)) 6011: return pdata.get() == that.pdata.get(); 6011: return pdata->compare(*(that.pdata.get())); 6011: } 6011: bool operator!=(const regex_token_iterator& that)const 6011: { return !(*this == that); } 6011: const value_type& operator*()const 6011: { return pdata->get(); } 6011: const value_type* operator->()const 6011: { return &(pdata->get()); } 6011: regex_token_iterator& operator++() 6011: { 6011: cow(); 6011: if(0 == pdata->next()) 6011: { 6011: pdata.reset(); 6011: } 6011: return *this; 6011: } 6011: regex_token_iterator operator++(int) 6011: { 6011: regex_token_iterator result(*this); 6011: ++(*this); 6011: return result; 6011: } 6011: private: 6011: 6011: pimpl pdata; 6011: 6011: void cow() 6011: { 6011: 6011: if(pdata.get() && !pdata.unique()) 6011: { 6011: pdata.reset(new impl(*(pdata.get()))); 6011: } 6011: } 6011: }; 6011: 6011: typedef regex_token_iterator cregex_token_iterator; 6011: typedef regex_token_iterator sregex_token_iterator; 6011: 6011: typedef regex_token_iterator wcregex_token_iterator; 6011: typedef regex_token_iterator wsregex_token_iterator; 6011: 6011: 6011: template 6011: 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) 6011: { 6011: return regex_token_iterator(p, p+traits::length(p), e, submatch, m); 6011: } 6011: template 6011: 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) 6011: { 6011: return regex_token_iterator::const_iterator, charT, traits>(p.begin(), p.end(), e, submatch, m); 6011: } 6011: template 6011: 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) 6011: { 6011: return regex_token_iterator(p, p+traits::length(p), e, submatch, m); 6011: } 6011: template 6011: 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) 6011: { 6011: return regex_token_iterator::const_iterator, charT, traits>(p.begin(), p.end(), e, submatch, m); 6011: } 6011: template 6011: 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) 6011: { 6011: return regex_token_iterator(p, p+traits::length(p), e, submatch, m); 6011: } 6011: template 6011: 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) 6011: { 6011: return regex_token_iterator::const_iterator, charT, traits>(p.begin(), p.end(), e, submatch, m); 6011: } 6011: # 327 "/usr/include/boost/regex/v4/regex_token_iterator.hpp" 3 4 6011: } 6011: # 155 "/usr/include/boost/regex/v4/regex.hpp" 2 3 4 6011: 6011: 6011: # 1 "/usr/include/boost/regex/v4/regex_grep.hpp" 1 3 4 6011: # 23 "/usr/include/boost/regex/v4/regex_grep.hpp" 3 4 6011: namespace boost{ 6011: # 40 "/usr/include/boost/regex/v4/regex_grep.hpp" 3 4 6011: template 6011: inline unsigned int regex_grep(Predicate foo, 6011: BidiIterator first, 6011: BidiIterator last, 6011: const basic_regex& e, 6011: match_flag_type flags = match_default) 6011: { 6011: if(e.flags() & regex_constants::failbit) 6011: return false; 6011: 6011: typedef typename match_results::allocator_type match_allocator_type; 6011: 6011: match_results m; 6011: re_detail_106501::perl_matcher matcher(first, last, m, e, flags, first); 6011: unsigned int count = 0; 6011: while(matcher.find()) 6011: { 6011: ++count; 6011: if(0 == foo(m)) 6011: return count; 6011: if(m[0].second == last) 6011: return count; 6011: if(m.length() == 0) 6011: { 6011: if(m[0].second == last) 6011: return count; 6011: 6011: 6011: match_results m2(m); 6011: matcher.setf(match_not_null | match_continuous); 6011: if(matcher.find()) 6011: { 6011: ++count; 6011: if(0 == foo(m)) 6011: return count; 6011: } 6011: else 6011: { 6011: 6011: m = m2; 6011: } 6011: matcher.unsetf((match_not_null | match_continuous) & ~flags); 6011: } 6011: } 6011: return count; 6011: } 6011: # 94 "/usr/include/boost/regex/v4/regex_grep.hpp" 3 4 6011: template 6011: inline unsigned int regex_grep(Predicate foo, const charT* str, 6011: const basic_regex& e, 6011: match_flag_type flags = match_default) 6011: { 6011: return regex_grep(foo, str, str + traits::length(str), e, flags); 6011: } 6011: 6011: template 6011: inline unsigned int regex_grep(Predicate foo, const std::basic_string& s, 6011: const basic_regex& e, 6011: match_flag_type flags = match_default) 6011: { 6011: return regex_grep(foo, s.begin(), s.end(), e, flags); 6011: } 6011: # 152 "/usr/include/boost/regex/v4/regex_grep.hpp" 3 4 6011: } 6011: # 158 "/usr/include/boost/regex/v4/regex.hpp" 2 3 4 6011: 6011: 6011: # 1 "/usr/include/boost/regex/v4/regex_replace.hpp" 1 3 4 6011: # 25 "/usr/include/boost/regex/v4/regex_replace.hpp" 3 4 6011: namespace boost{ 6011: # 38 "/usr/include/boost/regex/v4/regex_replace.hpp" 3 4 6011: template 6011: OutputIterator regex_replace(OutputIterator out, 6011: BidirectionalIterator first, 6011: BidirectionalIterator last, 6011: const basic_regex& e, 6011: Formatter fmt, 6011: match_flag_type flags = match_default) 6011: { 6011: regex_iterator i(first, last, e, flags); 6011: regex_iterator j; 6011: if(i == j) 6011: { 6011: if(!(flags & regex_constants::format_no_copy)) 6011: out = re_detail_106501::copy(first, last, out); 6011: } 6011: else 6011: { 6011: BidirectionalIterator last_m(first); 6011: while(i != j) 6011: { 6011: if(!(flags & regex_constants::format_no_copy)) 6011: out = re_detail_106501::copy(i->prefix().first, i->prefix().second, out); 6011: out = i->format(out, fmt, flags, e); 6011: last_m = (*i)[0].second; 6011: if(flags & regex_constants::format_first_only) 6011: break; 6011: ++i; 6011: } 6011: if(!(flags & regex_constants::format_no_copy)) 6011: out = re_detail_106501::copy(last_m, last, out); 6011: } 6011: return out; 6011: } 6011: 6011: template 6011: std::basic_string regex_replace(const std::basic_string& s, 6011: const basic_regex& e, 6011: Formatter fmt, 6011: match_flag_type flags = match_default) 6011: { 6011: std::basic_string result; 6011: re_detail_106501::string_out_iterator > i(result); 6011: regex_replace(i, s.begin(), s.end(), e, fmt, flags); 6011: return result; 6011: } 6011: # 95 "/usr/include/boost/regex/v4/regex_replace.hpp" 3 4 6011: } 6011: # 161 "/usr/include/boost/regex/v4/regex.hpp" 2 3 4 6011: 6011: 6011: # 1 "/usr/include/boost/regex/v4/regex_merge.hpp" 1 3 4 6011: # 25 "/usr/include/boost/regex/v4/regex_merge.hpp" 3 4 6011: namespace boost{ 6011: # 38 "/usr/include/boost/regex/v4/regex_merge.hpp" 3 4 6011: template 6011: inline OutputIterator regex_merge(OutputIterator out, 6011: Iterator first, 6011: Iterator last, 6011: const basic_regex& e, 6011: const charT* fmt, 6011: match_flag_type flags = match_default) 6011: { 6011: return regex_replace(out, first, last, e, fmt, flags); 6011: } 6011: 6011: template 6011: inline OutputIterator regex_merge(OutputIterator out, 6011: Iterator first, 6011: Iterator last, 6011: const basic_regex& e, 6011: const std::basic_string& fmt, 6011: match_flag_type flags = match_default) 6011: { 6011: return regex_merge(out, first, last, e, fmt.c_str(), flags); 6011: } 6011: 6011: template 6011: inline std::basic_string regex_merge(const std::basic_string& s, 6011: const basic_regex& e, 6011: const charT* fmt, 6011: match_flag_type flags = match_default) 6011: { 6011: return regex_replace(s, e, fmt, flags); 6011: } 6011: 6011: template 6011: inline std::basic_string regex_merge(const std::basic_string& s, 6011: const basic_regex& e, 6011: const std::basic_string& fmt, 6011: match_flag_type flags = match_default) 6011: { 6011: return regex_replace(s, e, fmt, flags); 6011: } 6011: # 89 "/usr/include/boost/regex/v4/regex_merge.hpp" 3 4 6011: } 6011: # 164 "/usr/include/boost/regex/v4/regex.hpp" 2 3 4 6011: 6011: 6011: # 1 "/usr/include/boost/regex/v4/regex_split.hpp" 1 3 4 6011: # 24 "/usr/include/boost/regex/v4/regex_split.hpp" 3 4 6011: namespace boost{ 6011: # 42 "/usr/include/boost/regex/v4/regex_split.hpp" 3 4 6011: namespace re_detail_106501{ 6011: 6011: template 6011: const basic_regex& get_default_expression(charT) 6011: { 6011: static const charT expression_text[4] = { '\\', 's', '+', '\00', }; 6011: static const basic_regex e(expression_text); 6011: return e; 6011: } 6011: 6011: template 6011: class split_pred 6011: { 6011: typedef std::basic_string string_type; 6011: typedef typename string_type::const_iterator iterator_type; 6011: iterator_type* p_last; 6011: OutputIterator* p_out; 6011: std::size_t* p_max; 6011: std::size_t initial_max; 6011: public: 6011: split_pred(iterator_type* a, OutputIterator* b, std::size_t* c) 6011: : p_last(a), p_out(b), p_max(c), initial_max(*c) {} 6011: 6011: bool operator()(const match_results& what); 6011: }; 6011: 6011: template 6011: bool split_pred::operator() 6011: (const match_results& what) 6011: { 6011: *p_last = what[0].second; 6011: if(what.size() > 1) 6011: { 6011: 6011: for(unsigned i = 1; i < what.size(); ++i) 6011: { 6011: *(*p_out) = what.str(i); 6011: ++(*p_out); 6011: if(0 == --*p_max) return false; 6011: } 6011: return *p_max != 0; 6011: } 6011: else 6011: { 6011: 6011: const sub_match& sub = what[-1]; 6011: if((sub.first != sub.second) || (*p_max != initial_max)) 6011: { 6011: *(*p_out) = sub.str(); 6011: ++(*p_out); 6011: return --*p_max; 6011: } 6011: } 6011: 6011: 6011: return true; 6011: } 6011: 6011: } 6011: 6011: template 6011: std::size_t regex_split(OutputIterator out, 6011: std::basic_string& s, 6011: const basic_regex& e, 6011: match_flag_type flags, 6011: std::size_t max_split) 6011: { 6011: typedef typename std::basic_string::const_iterator ci_t; 6011: 6011: ci_t last = s.begin(); 6011: std::size_t init_size = max_split; 6011: re_detail_106501::split_pred pred(&last, &out, &max_split); 6011: ci_t i, j; 6011: i = s.begin(); 6011: j = s.end(); 6011: regex_grep(pred, i, j, e, flags); 6011: 6011: 6011: 6011: 6011: if(max_split && (last != s.end()) && (e.mark_count() == 0)) 6011: { 6011: *out = std::basic_string((ci_t)last, (ci_t)s.end()); 6011: ++out; 6011: last = s.end(); 6011: --max_split; 6011: } 6011: 6011: 6011: s.erase(0, last - s.begin()); 6011: 6011: 6011: return init_size - max_split; 6011: } 6011: 6011: template 6011: inline std::size_t regex_split(OutputIterator out, 6011: std::basic_string& s, 6011: const basic_regex& e, 6011: match_flag_type flags = match_default) 6011: { 6011: return regex_split(out, s, e, flags, (0x7fffffff * 2U + 1U)); 6011: } 6011: 6011: template 6011: inline std::size_t regex_split(OutputIterator out, 6011: std::basic_string& s) 6011: { 6011: return regex_split(out, s, re_detail_106501::get_default_expression(charT(0)), match_default, (0x7fffffff * 2U + 1U)); 6011: } 6011: # 168 "/usr/include/boost/regex/v4/regex_split.hpp" 3 4 6011: } 6011: # 167 "/usr/include/boost/regex/v4/regex.hpp" 2 3 4 6011: # 32 "/usr/include/boost/regex.hpp" 2 3 4 6011: # 9 "regex.hh" 2 6011: 6011: 6011: # 10 "regex.hh" 6011: namespace Kakoune 6011: { 6011: 6011: struct regex_error : runtime_error 6011: { 6011: regex_error(StringView desc) 6011: : runtime_error{format("regex error: '{}'", desc)} 6011: {} 6011: }; 6011: 6011: using RegexBase = boost::basic_regex>; 6011: 6011: 6011: class Regex : public RegexBase 6011: { 6011: public: 6011: Regex() = default; 6011: 6011: explicit Regex(StringView re, flag_type flags = ECMAScript); 6011: bool empty() const { return m_str.empty(); } 6011: bool operator==(const Regex& other) const { return m_str == other.m_str; } 6011: bool operator!=(const Regex& other) const { return m_str != other.m_str; } 6011: 6011: const String& str() const { return m_str; } 6011: 6011: static constexpr const char* option_type_name = "regex"; 6011: 6011: private: 6011: String m_str; 6011: }; 6011: 6011: template 6011: using RegexUtf8It = utf8::iterator; 6011: 6011: template 6011: using RegexIteratorBase = boost::regex_iterator, wchar_t, 6011: boost::c_regex_traits>; 6011: 6011: namespace RegexConstant = boost::regex_constants; 6011: 6011: template 6011: struct MatchResults : boost::match_results> 6011: { 6011: using ParentType = boost::match_results>; 6011: struct SubMatch : std::pair 6011: { 6011: SubMatch() = default; 6011: SubMatch(const boost::sub_match>& m) 6011: : std::pair{m.first.base(), m.second.base()}, 6011: matched{m.matched} 6011: {} 6011: 6011: bool matched = false; 6011: }; 6011: 6011: struct iterator : boost::match_results>::iterator 6011: { 6011: using ParentType = typename boost::match_results>::iterator; 6011: iterator(const ParentType& it) : ParentType(it) {} 6011: 6011: SubMatch operator*() const { return {ParentType::operator*()}; } 6011: }; 6011: 6011: iterator begin() const { return {ParentType::begin()}; } 6011: iterator cbegin() const { return {ParentType::cbegin()}; } 6011: iterator end() const { return {ParentType::end()}; } 6011: iterator cend() const { return {ParentType::cend()}; } 6011: 6011: SubMatch operator[](size_t s) const { return {ParentType::operator[](s)}; } 6011: }; 6011: 6011: template 6011: struct RegexIterator : RegexIteratorBase 6011: { 6011: using Utf8It = RegexUtf8It; 6011: using ValueType = MatchResults; 6011: 6011: RegexIterator() = default; 6011: RegexIterator(Iterator begin, Iterator end, const Regex& re, 6011: RegexConstant::match_flag_type flags = RegexConstant::match_default) 6011: : RegexIteratorBase{Utf8It{begin, begin, end}, Utf8It{end, begin, end}, re, flags} {} 6011: 6011: const ValueType& operator*() const { return *reinterpret_cast(&RegexIteratorBase::operator*()); } 6011: const ValueType* operator->() const { return reinterpret_cast(RegexIteratorBase::operator->()); } 6011: }; 6011: 6011: inline RegexConstant::match_flag_type match_flags(bool bol, bool eol, bool bow, bool eow) 6011: { 6011: return (bol ? RegexConstant::match_default : RegexConstant::match_not_bol) | 6011: (eol ? RegexConstant::match_default : RegexConstant::match_not_eol) | 6011: (bow ? RegexConstant::match_default : RegexConstant::match_not_bow) | 6011: (eow ? RegexConstant::match_default : RegexConstant::match_not_eow); 6011: } 6011: 6011: template 6011: bool regex_match(It begin, It end, const Regex& re) 6011: { 6011: using Utf8It = RegexUtf8It; 6011: try 6011: { 6011: return boost::regex_match(Utf8It{begin, begin, end}, Utf8It{end, begin, end}, re); 6011: } 6011: catch (std::runtime_error& err) 6011: { 6011: throw runtime_error{format("Regex matching error: {}", err.what())}; 6011: } 6011: } 6011: 6011: template 6011: bool regex_match(It begin, It end, MatchResults& res, const Regex& re) 6011: { 6011: using Utf8It = RegexUtf8It; 6011: try 6011: { 6011: return boost::regex_match(Utf8It{begin, begin, end}, Utf8It{end, begin, end}, res, re); 6011: } 6011: catch (std::runtime_error& err) 6011: { 6011: throw runtime_error{format("Regex matching error: {}", err.what())}; 6011: } 6011: } 6011: 6011: template 6011: bool regex_search(It begin, It end, const Regex& re, 6011: RegexConstant::match_flag_type flags = RegexConstant::match_default) 6011: { 6011: using Utf8It = RegexUtf8It; 6011: try 6011: { 6011: return boost::regex_search(Utf8It{begin, begin, end}, Utf8It{end, begin, end}, re, flags); 6011: } 6011: catch (std::runtime_error& err) 6011: { 6011: throw runtime_error{format("Regex searching error: {}", err.what())}; 6011: } 6011: } 6011: 6011: template 6011: bool regex_search(It begin, It end, MatchResults& res, const Regex& re, 6011: RegexConstant::match_flag_type flags = RegexConstant::match_default) 6011: { 6011: using Utf8It = RegexUtf8It; 6011: try 6011: { 6011: return boost::regex_search(Utf8It{begin, begin, end}, Utf8It{end, begin, end}, res, re, flags); 6011: } 6011: catch (std::runtime_error& err) 6011: { 6011: throw runtime_error{format("Regex searching error: {}", err.what())}; 6011: } 6011: } 6011: 6011: String option_to_string(const Regex& re); 6011: void option_from_string(StringView str, Regex& re); 6011: 6011: } 6011: # 10 "selectors.hh" 2 6011: 6011: namespace Kakoune 6011: { 6011: 6011: inline Selection keep_direction(Selection res, const Selection& ref) 6011: { 6011: if ((res.cursor() < res.anchor()) != (ref.cursor() < ref.anchor())) 6011: std::swap(res.cursor(), res.anchor()); 6011: return res; 6011: } 6011: 6011: inline Selection target_eol(Selection sel) 6011: { 6011: sel.cursor().target = 0x7fffffff; 6011: return sel; 6011: } 6011: 6011: using Utf8Iterator = utf8::iterator; 6011: 6011: inline Selection utf8_range(const BufferIterator& first, const BufferIterator& last) 6011: { 6011: return {first.coord(), last.coord()}; 6011: } 6011: 6011: inline Selection utf8_range(const Utf8Iterator& first, const Utf8Iterator& last) 6011: { 6011: return {first.base().coord(), last.base().coord()}; 6011: } 6011: 6011: template 6011: Selection select_to_next_word(const Buffer& buffer, const Selection& selection) 6011: { 6011: Utf8Iterator begin{buffer.iterator_at(selection.cursor()), buffer}; 6011: if (begin+1 == buffer.end()) 6011: return selection; 6011: if (categorize(*begin) != categorize(*(begin+1))) 6011: ++begin; 6011: 6011: if (not skip_while(begin, buffer.end(), 6011: [](Codepoint c) { return is_eol(c); })) 6011: return selection; 6011: Utf8Iterator end = begin+1; 6011: 6011: if (word_type == Word and is_punctuation(*begin)) 6011: skip_while(end, buffer.end(), is_punctuation); 6011: else if (is_word(*begin)) 6011: skip_while(end, buffer.end(), is_word); 6011: 6011: skip_while(end, buffer.end(), is_horizontal_blank); 6011: 6011: return utf8_range(begin, end-1); 6011: } 6011: 6011: template 6011: Selection select_to_next_word_end(const Buffer& buffer, const Selection& selection) 6011: { 6011: Utf8Iterator begin{buffer.iterator_at(selection.cursor()), buffer}; 6011: if (begin+1 == buffer.end()) 6011: return selection; 6011: if (categorize(*begin) != categorize(*(begin+1))) 6011: ++begin; 6011: 6011: if (not skip_while(begin, buffer.end(), 6011: [](Codepoint c) { return is_eol(c); })) 6011: return selection; 6011: Utf8Iterator end = begin; 6011: skip_while(end, buffer.end(), is_horizontal_blank); 6011: 6011: if (word_type == Word and is_punctuation(*end)) 6011: skip_while(end, buffer.end(), is_punctuation); 6011: else if (is_word(*end)) 6011: skip_while(end, buffer.end(), is_word); 6011: 6011: return utf8_range(begin, end-1); 6011: } 6011: 6011: template 6011: Selection select_to_previous_word(const Buffer& buffer, const Selection& selection) 6011: { 6011: Utf8Iterator begin{buffer.iterator_at(selection.cursor()), buffer}; 6011: if (begin == buffer.begin()) 6011: return selection; 6011: if (categorize(*begin) != categorize(*(begin-1))) 6011: --begin; 6011: 6011: skip_while_reverse(begin, buffer.begin(), [](Codepoint c){ return is_eol(c); }); 6011: Utf8Iterator end = begin; 6011: 6011: bool with_end = skip_while_reverse(end, buffer.begin(), is_horizontal_blank); 6011: if (word_type == Word and is_punctuation(*end)) 6011: with_end = skip_while_reverse(end, buffer.begin(), is_punctuation); 6011: 6011: else if (is_word(*end)) 6011: with_end = skip_while_reverse(end, buffer.begin(), is_word); 6011: 6011: return utf8_range(begin, with_end ? end : end+1); 6011: } 6011: 6011: Selection select_line(const Buffer& buffer, const Selection& selection); 6011: Selection select_matching(const Buffer& buffer, const Selection& selection); 6011: 6011: Selection select_to(const Buffer& buffer, const Selection& selection, 6011: Codepoint c, int count, bool inclusive); 6011: Selection select_to_reverse(const Buffer& buffer, const Selection& selection, 6011: Codepoint c, int count, bool inclusive); 6011: 6011: template 6011: Selection select_to_line_end(const Buffer& buffer, const Selection& selection) 6011: { 6011: BufferCoord begin = selection.cursor(); 6011: LineCount line = begin.line; 6011: BufferCoord end = utf8::previous(buffer.iterator_at({line, buffer[line].length() - 1}), 6011: buffer.iterator_at(line)).coord(); 6011: if (end < begin) 6011: end = begin; 6011: return target_eol({only_move ? end : begin, end}); 6011: } 6011: 6011: template 6011: Selection select_to_line_begin(const Buffer& buffer, const Selection& selection) 6011: { 6011: BufferCoord begin = selection.cursor(); 6011: BufferCoord end = begin.line; 6011: return {only_move ? end : begin, end}; 6011: } 6011: 6011: enum class ObjectFlags 6011: { 6011: ToBegin = 1, 6011: ToEnd = 2, 6011: Inner = 4 6011: }; 6011: 6011: template<> struct WithBitOps : std::true_type {}; 6011: 6011: template 6011: Selection select_word(const Buffer& buffer, const Selection& selection, 6011: int count, ObjectFlags flags) 6011: { 6011: Utf8Iterator first{buffer.iterator_at(selection.cursor()), buffer}; 6011: if (not is_word(*first) and 6011: ((flags & ObjectFlags::Inner) or 6011: not skip_while(first, buffer.end(), [](Codepoint c) 6011: { return not is_word(c); }))) 6011: return selection; 6011: 6011: Utf8Iterator last = first; 6011: if (flags & ObjectFlags::ToBegin) 6011: { 6011: skip_while_reverse(first, buffer.begin(), is_word); 6011: if (not is_word(*first)) 6011: ++first; 6011: } 6011: if (flags & ObjectFlags::ToEnd) 6011: { 6011: skip_while(last, buffer.end(), is_word); 6011: if (not (flags & ObjectFlags::Inner)) 6011: skip_while(last, buffer.end(), is_horizontal_blank); 6011: --last; 6011: } 6011: return (flags & ObjectFlags::ToEnd) ? utf8_range(first, last) 6011: : utf8_range(last, first); 6011: } 6011: 6011: Selection select_number(const Buffer& buffer, const Selection& selection, 6011: int count, ObjectFlags flags); 6011: 6011: Selection select_sentence(const Buffer& buffer, const Selection& selection, 6011: int count, ObjectFlags flags); 6011: 6011: Selection select_paragraph(const Buffer& buffer, const Selection& selection, 6011: int count, ObjectFlags flags); 6011: 6011: Selection select_whitespaces(const Buffer& buffer, const Selection& selection, 6011: int count, ObjectFlags flags); 6011: 6011: Selection select_indent(const Buffer& buffer, const Selection& selection, 6011: int count, ObjectFlags flags); 6011: 6011: Selection select_argument(const Buffer& buffer, const Selection& selection, 6011: int level, ObjectFlags flags); 6011: 6011: Selection select_lines(const Buffer& buffer, const Selection& selection); 6011: 6011: Selection trim_partial_lines(const Buffer& buffer, const Selection& selection); 6011: 6011: void select_buffer(SelectionList& selections); 6011: 6011: enum Direction { Forward, Backward }; 6011: 6011: inline bool find_last_match(const Buffer& buffer, const BufferIterator& pos, 6011: MatchResults& res, 6011: const Regex& regex) 6011: { 6011: MatchResults matches; 6011: const bool is_pos_eol = is_eol(buffer, pos.coord()); 6011: const bool is_pos_eow = is_eow(buffer, pos.coord()); 6011: auto begin = buffer.begin(); 6011: while (begin != pos and regex_search(begin, pos, matches, regex, 6011: match_flags(is_bol(begin.coord()), is_pos_eol, 6011: is_bow(buffer, begin.coord()), is_pos_eow))) 6011: { 6011: begin = utf8::next(matches[0].first, pos); 6011: if (res.empty() or matches[0].second > res[0].second) 6011: res.swap(matches); 6011: } 6011: return not res.empty(); 6011: } 6011: 6011: template 6011: bool find_match_in_buffer(const Buffer& buffer, const BufferIterator pos, 6011: MatchResults& matches, 6011: const Regex& ex, bool& wrapped) 6011: { 6011: wrapped = false; 6011: if (direction == Forward) 6011: { 6011: if (pos != buffer.end() and 6011: regex_search(pos, buffer.end(), matches, ex, 6011: match_flags(is_bol(pos.coord()), true, 6011: is_bow(buffer, pos.coord()), true))) 6011: return true; 6011: wrapped = true; 6011: return regex_search(buffer.begin(), buffer.end(), matches, ex); 6011: } 6011: else 6011: { 6011: if (find_last_match(buffer, pos, matches, ex)) 6011: return true; 6011: wrapped = true; 6011: return find_last_match(buffer, buffer.end(), matches, ex); 6011: } 6011: } 6011: 6011: inline BufferIterator ensure_char_start(const Buffer& buffer, const BufferIterator& it) 6011: { 6011: return it != buffer.end() ? 6011: utf8::character_start(it, buffer.iterator_at(it.coord().line)) : it; 6011: } 6011: 6011: template 6011: Selection find_next_match(const Buffer& buffer, const Selection& sel, const Regex& regex, bool& wrapped) 6011: { 6011: auto begin = buffer.iterator_at(direction == Backward ? sel.min() : sel.max()); 6011: auto end = begin; 6011: 6011: CaptureList captures; 6011: MatchResults matches; 6011: bool found = false; 6011: auto pos = direction == Forward ? utf8::next(begin, buffer.end()) : begin; 6011: if ((found = find_match_in_buffer(buffer, pos, matches, regex, wrapped))) 6011: { 6011: begin = matches[0].first; 6011: end = matches[0].second; 6011: for (const auto& match : matches) 6011: captures.push_back(buffer.string(match.first.coord(), 6011: match.second.coord())); 6011: } 6011: if (not found or begin == buffer.end()) 6011: throw runtime_error(format("'{}': no matches found", regex.str())); 6011: 6011: end = (begin == end) ? end : utf8::previous(end, begin); 6011: if (direction == Backward) 6011: std::swap(begin, end); 6011: 6011: return {begin.coord(), end.coord(), std::move(captures)}; 6011: } 6011: 6011: void select_all_matches(SelectionList& selections, const Regex& regex, unsigned capture = 0); 6011: void split_selections(SelectionList& selections, const Regex& separator_regex, unsigned capture = 0); 6011: 6011: Selection select_surrounding(const Buffer& buffer, const Selection& selection, 6011: StringView opening, StringView closing, int level, 6011: ObjectFlags flags); 6011: 6011: } 6011: # 17 "normal.cc" 2 6011: 6011: 6011: # 1 "user_interface.hh" 1 6011: # 9 "user_interface.hh" 6011: namespace Kakoune 6011: { 6011: 6011: class String; 6011: class DisplayBuffer; 6011: class DisplayLine; 6011: struct DisplayCoord; 6011: struct Face; 6011: struct Key; 6011: 6011: enum class MenuStyle 6011: { 6011: Prompt, 6011: Inline 6011: }; 6011: 6011: enum class InfoStyle 6011: { 6011: Prompt, 6011: Inline, 6011: InlineAbove, 6011: InlineBelow, 6011: MenuDoc 6011: }; 6011: 6011: enum class EventMode; 6011: 6011: using OnKeyCallback = std::function; 6011: 6011: class UserInterface 6011: { 6011: public: 6011: virtual ~UserInterface() {} 6011: 6011: virtual void menu_show(ConstArrayView choices, 6011: DisplayCoord anchor, Face fg, Face bg, 6011: MenuStyle style) = 0; 6011: virtual void menu_select(int selected) = 0; 6011: virtual void menu_hide() = 0; 6011: 6011: virtual void info_show(StringView title, StringView content, 6011: DisplayCoord anchor, Face face, 6011: InfoStyle style) = 0; 6011: virtual void info_hide() = 0; 6011: 6011: virtual void draw(const DisplayBuffer& display_buffer, 6011: const Face& default_face, 6011: const Face& padding_face) = 0; 6011: 6011: virtual void draw_status(const DisplayLine& status_line, 6011: const DisplayLine& mode_line, 6011: const Face& default_face) = 0; 6011: 6011: virtual DisplayCoord dimensions() = 0; 6011: 6011: virtual void refresh(bool force) = 0; 6011: 6011: virtual void set_on_key(OnKeyCallback callback) = 0; 6011: 6011: using Options = IdMap; 6011: virtual void set_ui_options(const Options& options) = 0; 6011: }; 6011: 6011: } 6011: # 20 "normal.cc" 2 6011: # 1 "window.hh" 1 6011: 6011: 6011: 6011: 6011: 6011: # 1 "highlighter_group.hh" 1 6011: 6011: 6011: 6011: 6011: 6011: # 1 "highlighter.hh" 1 6011: # 15 "highlighter.hh" 6011: namespace Kakoune 6011: { 6011: 6011: class Context; 6011: 6011: enum class HighlightFlags 6011: { 6011: Highlight, 6011: MoveOnly 6011: }; 6011: 6011: 6011: 6011: 6011: 6011: 6011: struct Highlighter; 6011: 6011: using HighlighterAndId = std::pair>; 6011: 6011: struct Highlighter 6011: { 6011: virtual ~Highlighter() {} 6011: virtual void highlight(const Context& context, HighlightFlags flags, DisplayBuffer& display_buffer, BufferRange range) = 0; 6011: 6011: virtual bool has_children() const { return false; } 6011: virtual Highlighter& get_child(StringView path) { throw runtime_error("this highlighter do not hold children"); } 6011: virtual void add_child(HighlighterAndId&& hl) { throw runtime_error("this highlighter do not hold children"); } 6011: virtual void remove_child(StringView id) { throw runtime_error("this highlighter do not hold children"); } 6011: virtual Completions complete_child(StringView path, ByteCount cursor_pos, bool group) const { throw runtime_error("this highlighter do not hold children"); } 6011: }; 6011: 6011: template 6011: struct SimpleHighlighter : public Highlighter 6011: { 6011: SimpleHighlighter(Func func) : m_func(std::move(func)) {} 6011: virtual void highlight(const Context& context, HighlightFlags flags, DisplayBuffer& display_buffer, BufferRange range) override 6011: { 6011: m_func(context, flags, display_buffer, range); 6011: } 6011: private: 6011: Func m_func; 6011: }; 6011: 6011: template 6011: std::unique_ptr> make_simple_highlighter(T func) 6011: { 6011: return make_unique>(std::move(func)); 6011: } 6011: 6011: using HighlighterParameters = ConstArrayView; 6011: using HighlighterFactory = std::function; 6011: 6011: struct HighlighterFactoryAndDocstring 6011: { 6011: HighlighterFactory factory; 6011: String docstring; 6011: }; 6011: 6011: struct HighlighterRegistry : IdMap, 6011: Singleton 6011: {}; 6011: 6011: } 6011: # 7 "highlighter_group.hh" 2 6011: 6011: 6011: namespace Kakoune 6011: { 6011: 6011: struct child_not_found : public runtime_error 6011: { 6011: using runtime_error::runtime_error; 6011: }; 6011: 6011: class HighlighterGroup : public Highlighter 6011: { 6011: public: 6011: void highlight(const Context& context, HighlightFlags flags, DisplayBuffer& display_buffer, BufferRange range) override; 6011: 6011: bool has_children() const override { return true; } 6011: void add_child(HighlighterAndId&& hl) override; 6011: void remove_child(StringView id) override; 6011: 6011: Highlighter& get_child(StringView path) override; 6011: 6011: Completions complete_child(StringView path, ByteCount cursor_pos, bool group) const override; 6011: 6011: private: 6011: using HighlighterMap = IdMap, MemoryDomain::Highlight>; 6011: HighlighterMap m_highlighters; 6011: }; 6011: 6011: struct DefinedHighlighters : public HighlighterGroup, 6011: public Singleton 6011: { 6011: }; 6011: 6011: } 6011: # 7 "window.hh" 2 6011: 6011: 6011: 6011: 6011: namespace Kakoune 6011: { 6011: 6011: 6011: class Window : public SafeCountable, public OptionManagerWatcher, public Scope 6011: { 6011: public: 6011: Window(Buffer& buffer); 6011: ~Window(); 6011: 6011: const DisplayCoord& position() const { return m_position; } 6011: void set_position(DisplayCoord position); 6011: 6011: const DisplayCoord& dimensions() const { return m_dimensions; } 6011: void set_dimensions(DisplayCoord dimensions); 6011: 6011: void scroll(LineCount offset); 6011: void center_line(LineCount buffer_line); 6011: void display_line_at(LineCount buffer_line, LineCount display_line); 6011: 6011: void scroll(ColumnCount offset); 6011: void center_column(ColumnCount buffer_column); 6011: void display_column_at(ColumnCount buffer_column, ColumnCount display_column); 6011: 6011: const DisplayBuffer& update_display_buffer(const Context& context); 6011: 6011: DisplayCoord display_position(BufferCoord coord) const; 6011: BufferCoord buffer_coord(DisplayCoord coord) const; 6011: 6011: Highlighter& highlighters() { return m_highlighters; } 6011: 6011: Buffer& buffer() const { return *m_buffer; } 6011: 6011: bool needs_redraw(const Context& context) const; 6011: void force_redraw() { m_last_setup = Setup{}; } 6011: 6011: BufferCoord offset_coord(BufferCoord coord, CharCount offset); 6011: BufferCoordAndTarget offset_coord(BufferCoordAndTarget coord, LineCount offset); 6011: 6011: void set_client(Client* client) { m_client = client; } 6011: 6011: void clear_display_buffer(); 6011: private: 6011: Window(const Window&) = delete; 6011: 6011: void on_option_changed(const Option& option) override; 6011: void scroll_to_keep_selection_visible_ifn(const Context& context); 6011: 6011: void run_hook_in_own_context(StringView hook_name, StringView param, 6011: String client_name = ""); 6011: 6011: SafePtr m_buffer; 6011: SafePtr m_client; 6011: 6011: DisplayCoord m_position; 6011: DisplayCoord m_dimensions; 6011: DisplayBuffer m_display_buffer; 6011: 6011: HighlighterGroup m_highlighters; 6011: HighlighterGroup m_builtin_highlighters; 6011: 6011: struct Setup 6011: { 6011: DisplayCoord position; 6011: DisplayCoord dimensions; 6011: size_t timestamp; 6011: size_t main_selection; 6011: Vector selections; 6011: }; 6011: Setup build_setup(const Context& context) const; 6011: Setup m_last_setup; 6011: }; 6011: 6011: } 6011: # 21 "normal.cc" 2 6011: 6011: namespace Kakoune 6011: { 6011: 6011: using namespace std::placeholders; 6011: 6011: enum class SelectMode 6011: { 6011: Replace, 6011: Extend, 6011: Append, 6011: }; 6011: 6011: template 6011: void select(Context& context, T func) 6011: { 6011: auto& buffer = context.buffer(); 6011: auto& selections = context.selections(); 6011: if (mode == SelectMode::Append) 6011: { 6011: auto& sel = selections.main(); 6011: auto res = func(buffer, sel); 6011: if (res.captures().empty()) 6011: res.captures() = sel.captures(); 6011: selections.push_back(res); 6011: selections.set_main_index(selections.size() - 1); 6011: } 6011: else 6011: { 6011: for (auto& sel : selections) 6011: { 6011: auto res = func(buffer, sel); 6011: if (mode == SelectMode::Extend) 6011: sel.merge_with(res); 6011: else 6011: { 6011: sel.anchor() = res.anchor(); 6011: sel.cursor() = res.cursor(); 6011: } 6011: if (not res.captures().empty()) 6011: sel.captures() = std::move(res.captures()); 6011: } 6011: } 6011: selections.sort_and_merge_overlapping(); 6011: selections.check_invariant(); 6011: } 6011: 6011: template 6011: void select(Context& context, NormalParams) 6011: { 6011: select(context, func); 6011: } 6011: 6011: template 6011: void select_and_set_last(Context& context, Func&& func) 6011: { 6011: context.set_last_select( 6011: [func](Context& context){ select(context, func); }); 6011: return select(context, func); 6011: } 6011: 6011: template 6011: void select_coord(Buffer& buffer, BufferCoord coord, SelectionList& selections) 6011: { 6011: coord = buffer.clamp(coord); 6011: if (mode == SelectMode::Replace) 6011: selections = SelectionList{ buffer, coord }; 6011: else if (mode == SelectMode::Extend) 6011: { 6011: for (auto& sel : selections) 6011: sel.cursor() = coord; 6011: selections.sort_and_merge_overlapping(); 6011: } 6011: } 6011: 6011: template 6011: void enter_insert_mode(Context& context, NormalParams params) 6011: { 6011: context.input_handler().insert(mode, params.count); 6011: } 6011: 6011: void repeat_last_insert(Context& context, NormalParams) 6011: { 6011: context.input_handler().repeat_last_insert(); 6011: } 6011: 6011: void repeat_last_select(Context& context, NormalParams) 6011: { 6011: context.repeat_last_select(); 6011: } 6011: 6011: template 6011: void goto_commands(Context& context, NormalParams params) 6011: { 6011: if (params.count != 0) 6011: { 6011: context.push_jump(); 6011: select_coord(context.buffer(), LineCount{params.count - 1}, context.selections()); 6011: if (context.has_window()) 6011: context.window().center_line(LineCount{params.count-1}); 6011: } 6011: else 6011: { 6011: on_next_key_with_autoinfo(context, KeymapMode::Goto, 6011: [](Key key, Context& context) { 6011: auto cp = key.codepoint(); 6011: if (not cp) 6011: return; 6011: auto& buffer = context.buffer(); 6011: switch (to_lower(*cp)) 6011: { 6011: case 'g': 6011: case 'k': 6011: context.push_jump(); 6011: select_coord(buffer, BufferCoord{0,0}, context.selections()); 6011: break; 6011: case 'l': 6011: select>(context, {}); 6011: break; 6011: case 'h': 6011: select>(context, {}); 6011: break; 6011: case 'j': 6011: context.push_jump(); 6011: select_coord(buffer, buffer.line_count() - 1, context.selections()); 6011: break; 6011: case 'e': 6011: context.push_jump(); 6011: select_coord(buffer, buffer.back_coord(), context.selections()); 6011: break; 6011: case 't': 6011: if (context.has_window()) 6011: { 6011: auto line = context.window().position().line; 6011: select_coord(buffer, line, context.selections()); 6011: } 6011: break; 6011: case 'b': 6011: if (context.has_window()) 6011: { 6011: auto& window = context.window(); 6011: auto line = window.position().line + window.dimensions().line - 1; 6011: select_coord(buffer, line, context.selections()); 6011: } 6011: break; 6011: case 'c': 6011: if (context.has_window()) 6011: { 6011: auto& window = context.window(); 6011: auto line = window.position().line + window.dimensions().line / 2; 6011: select_coord(buffer, line, context.selections()); 6011: } 6011: break; 6011: case 'a': 6011: { 6011: Buffer* target = nullptr; 6011: if (not context.has_client() or 6011: not (target = context.client().last_buffer())) 6011: { 6011: context.print_status({"no last buffer", get_face("Error")}); 6011: break; 6011: } 6011: context.push_jump(); 6011: context.change_buffer(*target); 6011: break; 6011: } 6011: case 'f': 6011: { 6011: auto filename = content(buffer, context.selections().main()); 6011: static constexpr char forbidden[] = { '\'', '\\', '\0' }; 6011: if (contains_that(filename, [](char c){ return contains(forbidden, c); })) 6011: return; 6011: 6011: auto paths = context.options()["path"].get>(); 6011: StringView buffer_dir = split_path(buffer.name()).first; 6011: if (not buffer_dir.empty()) 6011: paths.insert(paths.begin(), buffer_dir.str()); 6011: 6011: String path = find_file(filename, paths); 6011: if (path.empty()) 6011: throw runtime_error(format("unable to find file '{}'", filename)); 6011: 6011: Buffer* buffer = BufferManager::instance().get_buffer_ifp(path); 6011: if (not buffer) 6011: { 6011: buffer = open_file_buffer(path, context.hooks_disabled() ? 6011: Buffer::Flags::NoHooks 6011: : Buffer::Flags::None); 6011: buffer->flags() &= ~Buffer::Flags::NoHooks; 6011: } 6011: 6011: if (buffer != &context.buffer()) 6011: { 6011: context.push_jump(); 6011: context.change_buffer(*buffer); 6011: } 6011: break; 6011: } 6011: case '.': 6011: { 6011: context.push_jump(); 6011: auto pos = buffer.last_modification_coord(); 6011: if (pos >= buffer.back_coord()) 6011: pos = buffer.back_coord(); 6011: else if (buffer[pos.line].length() == pos.column + 1) 6011: pos = BufferCoord{ pos.line+1, 0 }; 6011: select_coord(buffer, pos, context.selections()); 6011: break; 6011: } 6011: } 6011: }, "goto", 6011: "g,k: buffer top \n" 6011: "l: line end \n" 6011: "h: line start \n" 6011: "j: buffer bottom \n" 6011: "e: buffer end \n" 6011: "t: window top \n" 6011: "b: window bottom \n" 6011: "c: window center \n" 6011: "a: last buffer \n" 6011: "f: file \n" 6011: ".: last buffer change\n"); 6011: } 6011: } 6011: 6011: template 6011: void view_commands(Context& context, NormalParams params) 6011: { 6011: const int count = params.count; 6011: on_next_key_with_autoinfo(context, KeymapMode::View, 6011: [count](Key key, Context& context) { 6011: if (key == Key::Escape) 6011: return; 6011: 6011: if (lock) 6011: view_commands(context, {}); 6011: 6011: auto cp = key.codepoint(); 6011: if (not cp or not context.has_window()) 6011: return; 6011: 6011: const BufferCoord cursor = context.selections().main().cursor(); 6011: Window& window = context.window(); 6011: switch (to_lower(*cp)) 6011: { 6011: case 'v': 6011: case 'c': 6011: context.window().center_line(cursor.line); 6011: break; 6011: case 'm': 6011: context.window().center_column( 6011: context.buffer()[cursor.line].column_count_to(cursor.column)); 6011: break; 6011: case 't': 6011: context.window().display_line_at(cursor.line, 0); 6011: break; 6011: case 'b': 6011: context.window().display_line_at(cursor.line, window.dimensions().line-1); 6011: break; 6011: case 'h': 6011: context.window().scroll(-std::max(1, count)); 6011: break; 6011: case 'j': 6011: context.window().scroll( std::max(1, count)); 6011: break; 6011: case 'k': 6011: context.window().scroll(-std::max(1, count)); 6011: break; 6011: case 'l': 6011: context.window().scroll( std::max(1, count)); 6011: break; 6011: } 6011: }, "view", 6011: "v,c: center cursor (vertically)\n" 6011: "m: center cursor (horizontally)\n" 6011: "t: cursor on top \n" 6011: "b: cursor on bottom\n" 6011: "h: scroll left \n" 6011: "j: scroll down \n" 6011: "k: scroll up \n" 6011: "l: scroll right \n"); 6011: } 6011: 6011: void replace_with_char(Context& context, NormalParams) 6011: { 6011: on_next_key_with_autoinfo(context, KeymapMode::None, 6011: [](Key key, Context& context) { 6011: auto cp = key.codepoint(); 6011: if (not cp) 6011: return; 6011: ScopedEdition edition(context); 6011: Buffer& buffer = context.buffer(); 6011: SelectionList& selections = context.selections(); 6011: Vector strings; 6011: for (auto& sel : selections) 6011: { 6011: CharCount count = char_length(buffer, sel); 6011: strings.emplace_back(*cp, count); 6011: } 6011: selections.insert(strings, InsertMode::Replace); 6011: }, "replace with char", "enter char to replace with\n"); 6011: } 6011: 6011: Codepoint swap_case(Codepoint cp) 6011: { 6011: Codepoint res = to_lower(cp); 6011: return res == cp ? to_upper(cp) : res; 6011: } 6011: 6011: template 6011: void for_each_codepoint(Context& context, NormalParams) 6011: { 6011: using Utf8It = utf8::iterator; 6011: 6011: ScopedEdition edition(context); 6011: Buffer& buffer = context.buffer(); 6011: SelectionList& selections = context.selections(); 6011: Vector strings; 6011: for (auto& sel : selections) 6011: { 6011: String str; 6011: for (auto begin = Utf8It{buffer.iterator_at(sel.min()), buffer}, 6011: end = Utf8It{buffer.iterator_at(sel.max()), buffer}+1; 6011: begin != end; ++begin) 6011: utf8::dump(std::back_inserter(str), func(*begin)); 6011: 6011: strings.push_back(std::move(str)); 6011: } 6011: selections.insert(strings, InsertMode::Replace); 6011: } 6011: 6011: void command(Context& context, NormalParams params) 6011: { 6011: if (not CommandManager::has_instance()) 6011: return; 6011: 6011: CommandManager::instance().clear_last_complete_command(); 6011: 6011: context.input_handler().prompt( 6011: ":", "", get_face("Prompt"), PromptFlags::DropHistoryEntriesWithBlankPrefix, 6011: [](const Context& context, CompletionFlags flags, 6011: StringView cmd_line, ByteCount pos) { 6011: return CommandManager::instance().complete(context, flags, cmd_line, pos); 6011: }, 6011: [params](StringView cmdline, PromptEvent event, Context& context) { 6011: if (context.has_client()) 6011: { 6011: context.client().info_hide(); 6011: auto autoinfo = context.options()["autoinfo"].get(); 6011: if (event == PromptEvent::Change and autoinfo & AutoInfo::Command) 6011: { 6011: if (cmdline.length() == 1 and is_horizontal_blank(cmdline[0_byte])) 6011: context.client().info_show("prompt", "commands preceded by a blank won't be saved to history", 6011: {}, InfoStyle::Prompt); 6011: 6011: auto info = CommandManager::instance().command_info(context, cmdline); 6011: if (not info.first.empty() and not info.second.empty()) 6011: context.client().info_show(info.first, info.second, {}, InfoStyle::Prompt); 6011: } 6011: } 6011: if (event == PromptEvent::Validate) 6011: { 6011: EnvVarMap env_vars = { 6011: { "count", to_string(params.count) }, 6011: { "register", String{¶ms.reg, 1} } 6011: }; 6011: CommandManager::instance().execute( 6011: cmdline, context, { {}, env_vars }); 6011: } 6011: }); 6011: } 6011: 6011: template 6011: void pipe(Context& context, NormalParams) 6011: { 6011: const char* prompt = replace ? "pipe:" : "pipe-to:"; 6011: context.input_handler().prompt( 6011: prompt, "", get_face("Prompt"), 6011: PromptFlags::DropHistoryEntriesWithBlankPrefix, shell_complete, 6011: [](StringView cmdline, PromptEvent event, Context& context) 6011: { 6011: if (event != PromptEvent::Validate) 6011: return; 6011: 6011: StringView real_cmd; 6011: if (cmdline.empty()) 6011: real_cmd = context.main_sel_register_value("|"); 6011: else 6011: { 6011: RegisterManager::instance()['|'] = cmdline.str(); 6011: real_cmd = cmdline; 6011: } 6011: 6011: if (real_cmd.empty()) 6011: return; 6011: 6011: Buffer& buffer = context.buffer(); 6011: SelectionList& selections = context.selections(); 6011: const int old_main = selections.main_index(); 6011: auto restore_main = on_scope_end([&] { selections.set_main_index(old_main); }); 6011: if (replace) 6011: { 6011: Vector strings; 6011: for (int i = 0; i < selections.size(); ++i) 6011: { 6011: selections.set_main_index(i); 6011: String in = content(buffer, selections.main()); 6011: const bool insert_eol = in.back() != '\n'; 6011: if (insert_eol) 6011: in += '\n'; 6011: String out = ShellManager::instance().eval( 6011: real_cmd, context, in, 6011: ShellManager::Flags::WaitForStdout).first; 6011: 6011: if (insert_eol and out.back() == '\n') 6011: out = out.substr(0, out.length()-1).str(); 6011: strings.push_back(std::move(out)); 6011: } 6011: ScopedEdition edition(context); 6011: selections.insert(strings, InsertMode::Replace); 6011: } 6011: else 6011: { 6011: for (int i = 0; i < selections.size(); ++i) 6011: { 6011: selections.set_main_index(i); 6011: ShellManager::instance().eval(real_cmd, context, 6011: content(buffer, selections.main()), 6011: ShellManager::Flags::None); 6011: } 6011: } 6011: }); 6011: } 6011: 6011: template 6011: void insert_output(Context& context, NormalParams) 6011: { 6011: const char* prompt = mode == InsertMode::Insert ? "insert-output:" : "append-output:"; 6011: context.input_handler().prompt( 6011: prompt, "", get_face("Prompt"), 6011: PromptFlags::DropHistoryEntriesWithBlankPrefix, shell_complete, 6011: [](StringView cmdline, PromptEvent event, Context& context) 6011: { 6011: if (event != PromptEvent::Validate) 6011: return; 6011: 6011: StringView real_cmd; 6011: if (cmdline.empty()) 6011: real_cmd = context.main_sel_register_value("|"); 6011: else 6011: { 6011: RegisterManager::instance()['|'] = cmdline.str(); 6011: real_cmd = cmdline; 6011: } 6011: 6011: if (real_cmd.empty()) 6011: return; 6011: 6011: auto str = ShellManager::instance().eval( 6011: real_cmd, context, {}, ShellManager::Flags::WaitForStdout).first; 6011: ScopedEdition edition(context); 6011: context.selections().insert(str, mode); 6011: }); 6011: } 6011: 6011: template 6011: void select_next_match(const Buffer& buffer, SelectionList& selections, 6011: const Regex& regex, bool& main_wrapped) 6011: { 6011: const int main_index = selections.main_index(); 6011: bool wrapped = false; 6011: if (mode == SelectMode::Replace) 6011: { 6011: for (int i = 0; i < selections.size(); ++i) 6011: { 6011: auto& sel = selections[i]; 6011: sel = keep_direction(find_next_match(buffer, sel, regex, wrapped), sel); 6011: if (i == main_index) 6011: main_wrapped = wrapped; 6011: } 6011: } 6011: if (mode == SelectMode::Extend) 6011: { 6011: for (int i = 0; i < selections.size(); ++i) 6011: { 6011: auto& sel = selections[i]; 6011: sel.merge_with(find_next_match(buffer, sel, regex, wrapped)); 6011: if (i == main_index) 6011: main_wrapped = wrapped; 6011: } 6011: } 6011: else if (mode == SelectMode::Append) 6011: { 6011: auto sel = keep_direction( 6011: find_next_match(buffer, selections.main(), regex, main_wrapped), 6011: selections.main()); 6011: selections.push_back(std::move(sel)); 6011: selections.set_main_index(selections.size() - 1); 6011: } 6011: selections.sort_and_merge_overlapping(); 6011: } 6011: 6011: void yank(Context& context, NormalParams params) 6011: { 6011: const char reg = params.reg ? params.reg : '"'; 6011: RegisterManager::instance()[reg] = context.selections_content(); 6011: context.print_status({ format("yanked {} selections to register {}", 6011: context.selections().size(), reg), 6011: get_face("Information") }); 6011: } 6011: 6011: void erase_selections(Context& context, NormalParams params) 6011: { 6011: const char reg = params.reg ? params.reg : '"'; 6011: RegisterManager::instance()[reg] = context.selections_content(); 6011: ScopedEdition edition(context); 6011: context.selections().erase(); 6011: context.selections().avoid_eol(); 6011: } 6011: 6011: void change(Context& context, NormalParams params) 6011: { 6011: const char reg = params.reg ? params.reg : '"'; 6011: RegisterManager::instance()[reg] = context.selections_content(); 6011: enter_insert_mode(context, params); 6011: } 6011: 6011: constexpr InsertMode adapt_for_linewise(InsertMode mode) 6011: { 6011: return ((mode == InsertMode::Append) ? 6011: InsertMode::InsertAtNextLineBegin : 6011: ((mode == InsertMode::Insert) ? 6011: InsertMode::InsertAtLineBegin : 6011: ((mode == InsertMode::Replace) ? 6011: InsertMode::Replace : InsertMode::Insert))); 6011: } 6011: 6011: template 6011: void paste(Context& context, NormalParams params) 6011: { 6011: const char reg = params.reg ? params.reg : '"'; 6011: auto strings = RegisterManager::instance()[reg].values(context); 6011: InsertMode effective_mode = mode; 6011: for (auto& str : strings) 6011: { 6011: if (not str.empty() and str.back() == '\n') 6011: { 6011: effective_mode = adapt_for_linewise(mode); 6011: break; 6011: } 6011: } 6011: ScopedEdition edition(context); 6011: context.selections().insert(strings, effective_mode); 6011: } 6011: 6011: template 6011: void paste_all(Context& context, NormalParams params) 6011: { 6011: const char reg = params.reg ? params.reg : '"'; 6011: auto strings = RegisterManager::instance()[reg].values(context); 6011: InsertMode effective_mode = mode; 6011: String all; 6011: Vector offsets; 6011: for (auto& str : strings) 6011: { 6011: if (str.empty()) 6011: continue; 6011: 6011: if (str.back() == '\n') 6011: effective_mode = adapt_for_linewise(mode); 6011: all += str; 6011: offsets.push_back(all.length()); 6011: } 6011: 6011: auto& selections = context.selections(); 6011: { 6011: ScopedEdition edition(context); 6011: selections.insert(all, effective_mode, true); 6011: } 6011: 6011: const Buffer& buffer = context.buffer(); 6011: Vector result; 6011: for (auto& selection : selections) 6011: { 6011: ByteCount pos = 0; 6011: for (auto offset : offsets) 6011: { 6011: result.push_back({ buffer.advance(selection.min(), pos), 6011: buffer.advance(selection.min(), offset-1) }); 6011: pos = offset; 6011: } 6011: } 6011: if (not result.empty()) 6011: selections = std::move(result); 6011: } 6011: 6011: template 6011: void regex_prompt(Context& context, String prompt, T func) 6011: { 6011: DisplayCoord position = context.has_window() ? context.window().position() : DisplayCoord{}; 6011: SelectionList selections = context.selections(); 6011: context.input_handler().prompt( 6011: std::move(prompt), "", get_face("Prompt"), PromptFlags::None, complete_nothing, 6011: [=](StringView str, PromptEvent event, Context& context) mutable { 6011: try 6011: { 6011: if (event != PromptEvent::Change and context.has_client()) 6011: context.client().info_hide(); 6011: 6011: const bool incsearch = context.options()["incsearch"].get(); 6011: if (incsearch) 6011: { 6011: selections.update(); 6011: context.selections_write_only() = selections; 6011: if (context.has_window()) 6011: context.window().set_position(position); 6011: 6011: context.input_handler().set_prompt_face(get_face("Prompt")); 6011: } 6011: 6011: if (event == PromptEvent::Abort or 6011: (event == PromptEvent::Change and (not incsearch or str.empty()))) 6011: return; 6011: 6011: if (event == PromptEvent::Validate) 6011: context.push_jump(); 6011: 6011: func(str.empty() ? Regex{} : Regex{str}, event, context); 6011: } 6011: catch (regex_error& err) 6011: { 6011: if (event == PromptEvent::Validate) 6011: throw; 6011: else 6011: context.input_handler().set_prompt_face(get_face("Error")); 6011: } 6011: catch (runtime_error&) 6011: { 6011: context.selections_write_only() = selections; 6011: 6011: 6011: if (event == PromptEvent::Validate) 6011: throw; 6011: } 6011: }); 6011: } 6011: 6011: template 6011: void search(Context& context, NormalParams params) 6011: { 6011: constexpr StringView prompt = mode == SelectMode::Extend ? 6011: (direction == Forward ? "search (extend):" : "reverse search (extend):") 6011: : (direction == Forward ? "search:" : "reverse search:"); 6011: 6011: const char reg = to_lower(params.reg ? params.reg : '/'); 6011: int count = params.count; 6011: regex_prompt(context, prompt.str(), 6011: [reg, count](Regex ex, PromptEvent event, Context& context) { 6011: if (ex.empty()) 6011: ex = Regex{context.main_sel_register_value(reg)}; 6011: else if (event == PromptEvent::Validate) 6011: RegisterManager::instance()[reg] = ex.str(); 6011: if (not ex.empty() and not ex.str().empty()) 6011: { 6011: bool main_wrapped = false; 6011: int c = count; 6011: do { 6011: select_next_match(context.buffer(), context.selections(), ex, main_wrapped); 6011: } while (--c > 0); 6011: } 6011: }); 6011: } 6011: 6011: template 6011: void search_next(Context& context, NormalParams params) 6011: { 6011: const char reg = to_lower(params.reg ? params.reg : '/'); 6011: StringView str = context.main_sel_register_value(reg); 6011: if (not str.empty()) 6011: { 6011: Regex ex{str}; 6011: bool main_wrapped = false; 6011: do { 6011: bool wrapped = false; 6011: select_next_match(context.buffer(), context.selections(), ex, wrapped); 6011: main_wrapped = main_wrapped or wrapped; 6011: } while (--params.count > 0); 6011: 6011: if (main_wrapped) 6011: context.print_status({"main selection search wrapped around buffer", get_face("Information")}); 6011: } 6011: else 6011: throw runtime_error("no search pattern"); 6011: } 6011: 6011: template 6011: void use_selection_as_search_pattern(Context& context, NormalParams params) 6011: { 6011: Vector patterns; 6011: auto& sels = context.selections(); 6011: const auto& buffer = context.buffer(); 6011: for (auto& sel : sels) 6011: { 6011: const auto beg = sel.min(), end = buffer.char_next(sel.max()); 6011: patterns.push_back(format("{}\\Q{}\\E{}", 6011: smart and is_bow(buffer, beg) ? "\\b" : "", 6011: buffer.string(beg, end), 6011: smart and is_eow(buffer, end) ? "\\b" : "")); 6011: } 6011: 6011: const char reg = to_lower(params.reg ? params.reg : '/'); 6011: 6011: context.print_status({ 6011: format("register '{}' set to '{}'", reg, patterns[sels.main_index()]), 6011: get_face("Information") }); 6011: 6011: RegisterManager::instance()[reg] = patterns; 6011: 6011: 6011: if (context.has_window()) 6011: context.window().force_redraw(); 6011: } 6011: 6011: void select_regex(Context& context, NormalParams params) 6011: { 6011: const char reg = to_lower(params.reg ? params.reg : '/'); 6011: unsigned capture = (unsigned)params.count; 6011: auto prompt = capture ? format("select (capture {}):", (int)capture) : "select:"_str; 6011: regex_prompt(context, std::move(prompt), 6011: [reg, capture](Regex ex, PromptEvent event, Context& context) { 6011: if (ex.empty()) 6011: ex = Regex{context.main_sel_register_value(reg)}; 6011: else if (event == PromptEvent::Validate) 6011: RegisterManager::instance()[reg] = ex.str(); 6011: if (not ex.empty() and not ex.str().empty()) 6011: select_all_matches(context.selections(), ex, capture); 6011: }); 6011: } 6011: 6011: void split_regex(Context& context, NormalParams params) 6011: { 6011: const char reg = to_lower(params.reg ? params.reg : '/'); 6011: unsigned capture = (unsigned)params.count; 6011: auto prompt = capture ? format("split (on capture {}):", (int)capture) : "split:"_str; 6011: regex_prompt(context, std::move(prompt), 6011: [reg, capture](Regex ex, PromptEvent event, Context& context) { 6011: if (ex.empty()) 6011: ex = Regex{context.main_sel_register_value(reg)}; 6011: else if (event == PromptEvent::Validate) 6011: RegisterManager::instance()[reg] = ex.str(); 6011: if (not ex.empty() and not ex.str().empty()) 6011: split_selections(context.selections(), ex, capture); 6011: }); 6011: } 6011: 6011: void split_lines(Context& context, NormalParams) 6011: { 6011: auto& selections = context.selections(); 6011: auto& buffer = context.buffer(); 6011: Vector res; 6011: for (auto& sel : selections) 6011: { 6011: if (sel.anchor().line == sel.cursor().line) 6011: { 6011: res.push_back(std::move(sel)); 6011: continue; 6011: } 6011: auto min = sel.min(); 6011: auto max = sel.max(); 6011: res.push_back(keep_direction({min, {min.line, buffer[min.line].length()-1}}, sel)); 6011: for (auto line = min.line+1; line < max.line; ++line) 6011: res.push_back(keep_direction({line, {line, buffer[line].length()-1}}, sel)); 6011: res.push_back(keep_direction({max.line, max}, sel)); 6011: } 6011: selections = std::move(res); 6011: } 6011: 6011: void join_lines_select_spaces(Context& context, NormalParams) 6011: { 6011: auto& buffer = context.buffer(); 6011: Vector selections; 6011: for (auto& sel : context.selections()) 6011: { 6011: const LineCount min_line = sel.min().line; 6011: const LineCount max_line = sel.max().line; 6011: auto end_line = std::min(buffer.line_count()-1, 6011: max_line + (min_line == max_line ? 1 : 0)); 6011: for (LineCount line = min_line; line < end_line; ++line) 6011: { 6011: auto begin = buffer.iterator_at({line, buffer[line].length()-1}); 6011: auto end = std::find_if_not(begin+1, buffer.end(), is_horizontal_blank); 6011: selections.push_back({begin.coord(), (end-1).coord()}); 6011: } 6011: } 6011: if (selections.empty()) 6011: return; 6011: context.selections_write_only() = std::move(selections); 6011: ScopedEdition edition(context); 6011: context.selections().insert(" "_str, InsertMode::Replace); 6011: } 6011: 6011: void join_lines(Context& context, NormalParams params) 6011: { 6011: SelectionList sels{context.selections()}; 6011: auto restore_sels = on_scope_end([&]{ 6011: sels.update(); 6011: context.selections_write_only() = std::move(sels); 6011: }); 6011: 6011: join_lines_select_spaces(context, params); 6011: } 6011: 6011: template 6011: void keep(Context& context, NormalParams) 6011: { 6011: constexpr const char* prompt = matching ? "keep matching:" : "keep not matching:"; 6011: regex_prompt(context, prompt, [](const Regex& ex, PromptEvent, Context& context) { 6011: if (ex.empty()) 6011: return; 6011: const Buffer& buffer = context.buffer(); 6011: 6011: Vector keep; 6011: for (auto& sel : context.selections()) 6011: { 6011: auto begin = buffer.iterator_at(sel.min()); 6011: auto end = utf8::next(buffer.iterator_at(sel.max()), buffer.end()); 6011: 6011: 6011: const auto flags = match_flags(is_bol(begin.coord()), false, 6011: is_bow(buffer, begin.coord()), 6011: is_eow(buffer, end.coord())) | 6011: RegexConstant::match_any; 6011: if (regex_search(begin, end, ex, flags) == matching) 6011: keep.push_back(sel); 6011: } 6011: if (keep.empty()) 6011: throw runtime_error("no selections remaining"); 6011: context.selections_write_only() = std::move(keep); 6011: }); 6011: } 6011: 6011: void keep_pipe(Context& context, NormalParams) 6011: { 6011: context.input_handler().prompt( 6011: "keep pipe:", "", get_face("Prompt"), 6011: PromptFlags::DropHistoryEntriesWithBlankPrefix, shell_complete, 6011: [](StringView cmdline, PromptEvent event, Context& context) { 6011: if (event != PromptEvent::Validate) 6011: return; 6011: const Buffer& buffer = context.buffer(); 6011: auto& shell_manager = ShellManager::instance(); 6011: Vector keep; 6011: for (auto& sel : context.selections()) 6011: { 6011: if (shell_manager.eval(cmdline, context, content(buffer, sel), 6011: ShellManager::Flags::None).second == 0) 6011: keep.push_back(sel); 6011: } 6011: if (keep.empty()) 6011: throw runtime_error("no selections remaining"); 6011: context.selections_write_only() = std::move(keep); 6011: }); 6011: } 6011: template 6011: void indent(Context& context, NormalParams) 6011: { 6011: CharCount indent_width = context.options()["indentwidth"].get(); 6011: String indent = indent_width == 0 ? "\t" : String{' ', indent_width}; 6011: 6011: auto& buffer = context.buffer(); 6011: Vector sels; 6011: LineCount last_line = 0; 6011: for (auto& sel : context.selections()) 6011: { 6011: for (auto line = std::max(last_line, sel.min().line); line < sel.max().line+1; ++line) 6011: { 6011: if (indent_empty or buffer[line].length() > 1) 6011: sels.push_back({line, line}); 6011: } 6011: 6011: last_line = sel.max().line+1; 6011: } 6011: if (not sels.empty()) 6011: { 6011: ScopedEdition edition(context); 6011: SelectionList selections{buffer, std::move(sels)}; 6011: selections.insert(indent, InsertMode::Insert); 6011: } 6011: } 6011: 6011: template 6011: void deindent(Context& context, NormalParams) 6011: { 6011: ColumnCount tabstop = context.options()["tabstop"].get(); 6011: ColumnCount indent_width = context.options()["indentwidth"].get(); 6011: if (indent_width == 0) 6011: indent_width = tabstop; 6011: 6011: auto& buffer = context.buffer(); 6011: Vector sels; 6011: LineCount last_line = 0; 6011: for (auto& sel : context.selections()) 6011: { 6011: for (auto line = std::max(sel.min().line, last_line); 6011: line < sel.max().line+1; ++line) 6011: { 6011: ColumnCount width = 0; 6011: auto content = buffer[line]; 6011: for (auto column = 0_byte; column < content.length(); ++column) 6011: { 6011: const char c = content[column]; 6011: if (c == '\t') 6011: width = (width / tabstop + 1) * tabstop; 6011: else if (c == ' ') 6011: ++width; 6011: else 6011: { 6011: if (deindent_incomplete and width != 0) 6011: sels.push_back({ line, BufferCoord{line, column-1} }); 6011: break; 6011: } 6011: if (width == indent_width) 6011: { 6011: sels.push_back({ line, BufferCoord{line, column} }); 6011: break; 6011: } 6011: } 6011: } 6011: 6011: last_line = sel.max().line + 1; 6011: } 6011: if (not sels.empty()) 6011: { 6011: ScopedEdition edition(context); 6011: SelectionList selections{context.buffer(), std::move(sels)}; 6011: selections.erase(); 6011: } 6011: } 6011: 6011: template 6011: void select_object(Context& context, NormalParams params) 6011: { 6011: auto get_title = [] { 6011: const auto whole_flags = (ObjectFlags::ToBegin | ObjectFlags::ToEnd); 6011: const bool whole = (flags & whole_flags) == whole_flags; 6011: return format("select {}{}object{}", 6011: whole ? "" : "to ", 6011: flags & ObjectFlags::Inner ? "inner " : "", 6011: whole ? "" : (flags & ObjectFlags::ToBegin ? " begin" : " end")); 6011: }; 6011: 6011: const int count = params.count <= 0 ? 0 : params.count - 1; 6011: on_next_key_with_autoinfo(context, KeymapMode::Object, 6011: [count](Key key, Context& context) { 6011: auto cp = key.codepoint().value_or((Codepoint)-1); 6011: if (cp == -1) 6011: return; 6011: 6011: static constexpr struct ObjectType 6011: { 6011: Codepoint key; 6011: Selection (*func)(const Buffer&, const Selection&, int, ObjectFlags); 6011: } selectors[] = { 6011: { 'w', select_word }, 6011: { 'W', select_word }, 6011: { 's', select_sentence }, 6011: { 'p', select_paragraph }, 6011: { ' ', select_whitespaces }, 6011: { 'i', select_indent }, 6011: { 'n', select_number }, 6011: { 'u', select_argument }, 6011: }; 6011: auto obj_it = find(selectors | transform(std::mem_fn(&ObjectType::key)), cp).base(); 6011: if (obj_it != std::end(selectors)) 6011: return select_and_set_last( 6011: context, std::bind(obj_it->func, _1, _2, count, flags)); 6011: 6011: if (cp == ':') 6011: { 6011: const bool info = show_auto_info_ifn( 6011: "Enter object desc", "format: ,", 6011: AutoInfo::Command, context); 6011: 6011: context.input_handler().prompt( 6011: "object desc:", "", get_face("Prompt"), 6011: PromptFlags::None, complete_nothing, 6011: [count,info](StringView cmdline, PromptEvent event, Context& context) { 6011: if (event != PromptEvent::Change) 6011: hide_auto_info_ifn(context, info); 6011: if (event != PromptEvent::Validate) 6011: return; 6011: 6011: Vector params = split(cmdline, ',', '\\'); 6011: if (params.size() != 2 or params[0].empty() or params[1].empty()) 6011: throw runtime_error{"desc parsing failed, expected ,"}; 6011: 6011: select_and_set_last( 6011: context, std::bind(select_surrounding, _1, _2, 6011: params[0], params[1], 6011: count, flags)); 6011: }); 6011: return; 6011: } 6011: 6011: static constexpr struct SurroundingPair 6011: { 6011: StringView opening; 6011: StringView closing; 6011: Codepoint name; 6011: } surrounding_pairs[] = { 6011: { "(", ")", 'b' }, 6011: { "{", "}", 'B' }, 6011: { "[", "]", 'r' }, 6011: { "<", ">", 'a' }, 6011: { "\"", "\"", 'Q' }, 6011: { "'", "'", 'q' }, 6011: { "`", "`", 'g' }, 6011: }; 6011: auto pair_it = find_if(surrounding_pairs, 6011: [cp](const SurroundingPair& s) { 6011: return s.opening[0_char] == cp or 6011: s.closing[0_char] == cp or 6011: (s.name != 0 and s.name == cp); 6011: }); 6011: if (pair_it != std::end(surrounding_pairs)) 6011: return select_and_set_last( 6011: context, std::bind(select_surrounding, _1, _2, 6011: pair_it->opening, pair_it->closing, 6011: count, flags)); 6011: 6011: if (is_punctuation(cp)) 6011: { 6011: auto utf8cp = to_string(cp); 6011: return select_and_set_last( 6011: context, std::bind(select_surrounding, _1, _2, 6011: utf8cp, utf8cp, count, flags)); 6011: } 6011: }, get_title(), 6011: "b,(,): parenthesis block\n" 6011: "B,{,}: braces block \n" 6011: "r,[,]: brackets block \n" 6011: "a,<,>: angle block \n" 6011: "\",Q: double quote string\n" 6011: "',q: single quote string\n" 6011: "`,g: grave quote string \n" 6011: "w: word \n" 6011: "W: WORD \n" 6011: "s: sentence \n" 6011: "p: paragraph \n" 6011: "␣: whitespaces \n" 6011: "i: indent \n" 6011: "u: argument \n" 6011: "n: number \n" 6011: ":: custom object desc \n"); 6011: } 6011: 6011: template 6011: void scroll(Context& context, NormalParams) 6011: { 6011: Window& window = context.window(); 6011: const LineCount offset = (window.dimensions().line - 2) / (half ? 2 : 1); 6011: 6011: scroll_window(context, direction == Direction::Forward ? offset : -offset); 6011: } 6011: 6011: template 6011: void copy_selections_on_next_lines(Context& context, NormalParams params) 6011: { 6011: auto& selections = context.selections(); 6011: auto& buffer = context.buffer(); 6011: const ColumnCount tabstop = context.options()["tabstop"].get(); 6011: Vector result; 6011: for (auto& sel : selections) 6011: { 6011: auto anchor = sel.anchor(); 6011: auto cursor = sel.cursor(); 6011: ColumnCount cursor_col = get_column(buffer, tabstop, cursor); 6011: ColumnCount anchor_col = get_column(buffer, tabstop, anchor); 6011: result.push_back(std::move(sel)); 6011: for (int i = 0; i < std::max(params.count, 1); ++i) 6011: { 6011: LineCount offset = (direction == Forward ? 1 : -1) * (i + 1); 6011: 6011: const LineCount anchor_line = anchor.line + offset; 6011: const LineCount cursor_line = cursor.line + offset; 6011: 6011: if (anchor_line < 0 or cursor_line < 0 or 6011: anchor_line >= buffer.line_count() or cursor_line >= buffer.line_count()) 6011: continue; 6011: 6011: ByteCount anchor_byte = get_byte_to_column(buffer, tabstop, {anchor_line, anchor_col}); 6011: ByteCount cursor_byte = get_byte_to_column(buffer, tabstop, {cursor_line, cursor_col}); 6011: 6011: if (anchor_byte != buffer[anchor_line].length() and 6011: cursor_byte != buffer[cursor_line].length()) 6011: result.emplace_back(BufferCoord{anchor_line, anchor_byte}, 6011: BufferCoordAndTarget{cursor_line, cursor_byte, cursor.target}); 6011: } 6011: } 6011: selections = std::move(result); 6011: selections.sort_and_merge_overlapping(); 6011: } 6011: 6011: void rotate_selections(Context& context, NormalParams params) 6011: { 6011: context.selections().rotate_main(params.count != 0 ? params.count : 1); 6011: } 6011: 6011: void rotate_selections_content(Context& context, NormalParams params) 6011: { 6011: int group = params.count; 6011: int count = 1; 6011: auto strings = context.selections_content(); 6011: if (group == 0 or group > (int)strings.size()) 6011: group = (int)strings.size(); 6011: count = count % group; 6011: for (auto it = strings.begin(); it != strings.end(); ) 6011: { 6011: auto end = std::min(strings.end(), it + group); 6011: std::rotate(it, end-count, end); 6011: it = end; 6011: } 6011: context.selections().insert(strings, InsertMode::Replace); 6011: context.selections().rotate_main(count); 6011: } 6011: 6011: enum class SelectFlags 6011: { 6011: None = 0, 6011: Reverse = 1, 6011: Inclusive = 2, 6011: Extend = 4 6011: }; 6011: 6011: template<> struct WithBitOps : std::true_type {}; 6011: 6011: template 6011: void select_to_next_char(Context& context, NormalParams params) 6011: { 6011: auto get_title = [] { 6011: return format("{}select {} next char", 6011: flags & SelectFlags::Reverse ? "reverse " : "", 6011: flags & SelectFlags::Inclusive ? "onto" : "to"); 6011: }; 6011: 6011: on_next_key_with_autoinfo(context, KeymapMode::None, 6011: [params](Key key, Context& context) { 6011: constexpr auto new_flags = flags & SelectFlags::Extend ? SelectMode::Extend 6011: : SelectMode::Replace; 6011: if (auto cp = key.codepoint()) 6011: select_and_set_last( 6011: context, 6011: std::bind(flags & SelectFlags::Reverse ? select_to_reverse 6011: : select_to, 6011: _1, _2, *cp, params.count, 6011: flags & SelectFlags::Inclusive)); 6011: }, get_title(),"enter char to select to"); 6011: } 6011: 6011: void start_or_end_macro_recording(Context& context, NormalParams params) 6011: { 6011: if (context.input_handler().is_recording()) 6011: context.input_handler().stop_recording(); 6011: else 6011: { 6011: const char reg = to_lower(params.reg ? params.reg : '@'); 6011: if (not is_basic_alpha(reg) and reg != '@') 6011: throw runtime_error("Macros can only use the '@' and alphabetic registers"); 6011: context.input_handler().start_recording(reg); 6011: } 6011: } 6011: 6011: void end_macro_recording(Context& context, NormalParams) 6011: { 6011: if (context.input_handler().is_recording()) 6011: context.input_handler().stop_recording(); 6011: } 6011: 6011: void replay_macro(Context& context, NormalParams params) 6011: { 6011: const char reg = to_lower(params.reg ? params.reg : '@'); 6011: if (not is_basic_alpha(reg) and reg != '@') 6011: throw runtime_error("Macros can only use the '@' and alphabetic registers"); 6011: 6011: static bool running_macros[27] = {}; 6011: const size_t idx = reg != '@' ? (size_t)(reg - 'a') : 26; 6011: if (running_macros[idx]) 6011: throw runtime_error("recursive macros call detected"); 6011: 6011: ConstArrayView reg_val = RegisterManager::instance()[reg].values(context); 6011: if (reg_val.empty() or reg_val[0].empty()) 6011: throw runtime_error(format("Register '{}' is empty", reg)); 6011: 6011: running_macros[idx] = true; 6011: auto stop = on_scope_end([&]{ running_macros[idx] = false; }); 6011: 6011: auto keys = parse_keys(reg_val[0]); 6011: ScopedEdition edition(context); 6011: do 6011: { 6011: for (auto& key : keys) 6011: context.input_handler().handle_key(key); 6011: } while (--params.count > 0); 6011: } 6011: 6011: template 6011: void jump(Context& context, NormalParams) 6011: { 6011: auto jump = (direction == Forward) ? 6011: context.jump_list().forward() : 6011: context.jump_list().backward(context.selections()); 6011: 6011: Buffer* oldbuf = &context.buffer(); 6011: Buffer& buffer = const_cast(jump.buffer()); 6011: if (&buffer != oldbuf) 6011: context.change_buffer(buffer); 6011: context.selections_write_only() = jump; 6011: } 6011: 6011: void push_selections(Context& context, NormalParams) 6011: { 6011: context.push_jump(); 6011: context.print_status({ format("saved {} selections", context.selections().size()), 6011: get_face("Information") }); 6011: } 6011: 6011: void align(Context& context, NormalParams) 6011: { 6011: auto& selections = context.selections(); 6011: auto& buffer = context.buffer(); 6011: const ColumnCount tabstop = context.options()["tabstop"].get(); 6011: 6011: Vector> columns; 6011: LineCount last_line = -1; 6011: size_t column = 0; 6011: for (auto& sel : selections) 6011: { 6011: auto line = sel.cursor().line; 6011: if (sel.anchor().line != line) 6011: throw runtime_error("align cannot work with multi line selections"); 6011: 6011: column = (line == last_line) ? column + 1 : 0; 6011: if (column >= columns.size()) 6011: columns.resize(column+1); 6011: columns[column].push_back(&sel); 6011: last_line = line; 6011: } 6011: 6011: const bool use_tabs = context.options()["aligntab"].get(); 6011: for (auto& col : columns) 6011: { 6011: ColumnCount maxcol = 0; 6011: for (auto& sel : col) 6011: maxcol = std::max(get_column(buffer, tabstop, sel->cursor()), maxcol); 6011: for (auto& sel : col) 6011: { 6011: auto insert_coord = sel->min(); 6011: ColumnCount lastcol = get_column(buffer, tabstop, sel->cursor()); 6011: ColumnCount inscount = maxcol - lastcol; 6011: String padstr; 6011: if (not use_tabs) 6011: padstr = String{ ' ', inscount }; 6011: else 6011: { 6011: ColumnCount inscol = get_column(buffer, tabstop, insert_coord); 6011: ColumnCount targetcol = inscol + inscount; 6011: ColumnCount tabcol = inscol - (inscol % tabstop); 6011: CharCount tabs = (int)((targetcol - tabcol) / tabstop); 6011: CharCount spaces = (int)(targetcol - (tabs ? (tabcol + (int)tabs * tabstop) : inscol)); 6011: padstr = String{ '\t', tabs } + String{ ' ', spaces }; 6011: } 6011: buffer.insert(insert_coord, std::move(padstr)); 6011: } 6011: selections.update(); 6011: } 6011: } 6011: 6011: void copy_indent(Context& context, NormalParams params) 6011: { 6011: int selection = params.count; 6011: auto& buffer = context.buffer(); 6011: auto& selections = context.selections(); 6011: Vector lines; 6011: for (auto sel : selections) 6011: { 6011: for (LineCount l = sel.min().line; l < sel.max().line + 1; ++l) 6011: lines.push_back(l); 6011: } 6011: if (selection > selections.size()) 6011: throw runtime_error("invalid selection index"); 6011: if (selection == 0) 6011: selection = context.selections().main_index() + 1; 6011: 6011: auto ref_line = selections[selection-1].min().line; 6011: auto line = buffer[ref_line]; 6011: auto it = line.begin(); 6011: while (it != line.end() and is_horizontal_blank(*it)) 6011: ++it; 6011: const StringView indent = line.substr(0_byte, (int)(it-line.begin())); 6011: 6011: ScopedEdition edition{context}; 6011: for (auto& l : lines) 6011: { 6011: if (l == ref_line) 6011: continue; 6011: 6011: auto line = buffer[l]; 6011: ByteCount i = 0; 6011: while (i < line.length() and is_horizontal_blank(line[i])) 6011: ++i; 6011: buffer.replace(l, {l, i}, indent); 6011: } 6011: } 6011: 6011: void tabs_to_spaces(Context& context, NormalParams params) 6011: { 6011: auto& buffer = context.buffer(); 6011: const ColumnCount opt_tabstop = context.options()["tabstop"].get(); 6011: const ColumnCount tabstop = params.count == 0 ? opt_tabstop : params.count; 6011: Vector tabs; 6011: Vector spaces; 6011: for (auto& sel : context.selections()) 6011: { 6011: for (auto it = buffer.iterator_at(sel.min()), 6011: end = buffer.iterator_at(sel.max())+1; it != end; ++it) 6011: { 6011: if (*it == '\t') 6011: { 6011: ColumnCount col = get_column(buffer, opt_tabstop, it.coord()); 6011: ColumnCount end_col = (col / tabstop + 1) * tabstop; 6011: tabs.push_back({ it.coord() }); 6011: spaces.push_back(String{ ' ', end_col - col }); 6011: } 6011: } 6011: } 6011: if (not tabs.empty()) 6011: SelectionList{ buffer, std::move(tabs) }.insert(spaces, InsertMode::Replace); 6011: } 6011: 6011: void spaces_to_tabs(Context& context, NormalParams params) 6011: { 6011: auto& buffer = context.buffer(); 6011: const ColumnCount opt_tabstop = context.options()["tabstop"].get(); 6011: const ColumnCount tabstop = params.count == 0 ? opt_tabstop : params.count; 6011: Vector spaces; 6011: for (auto& sel : context.selections()) 6011: { 6011: for (auto it = buffer.iterator_at(sel.min()), 6011: end = buffer.iterator_at(sel.max())+1; it != end;) 6011: { 6011: if (*it == ' ') 6011: { 6011: auto spaces_beg = it; 6011: auto spaces_end = spaces_beg+1; 6011: ColumnCount col = get_column(buffer, opt_tabstop, spaces_end.coord()); 6011: while (spaces_end != end and 6011: *spaces_end == ' ' and (col % tabstop) != 0) 6011: { 6011: ++spaces_end; 6011: ++col; 6011: } 6011: if ((col % tabstop) == 0) 6011: spaces.push_back({spaces_beg.coord(), (spaces_end-1).coord()}); 6011: else if (spaces_end != end and *spaces_end == '\t') 6011: spaces.push_back({spaces_beg.coord(), spaces_end.coord()}); 6011: it = spaces_end; 6011: } 6011: else 6011: ++it; 6011: } 6011: } 6011: if (not spaces.empty()) 6011: SelectionList{ buffer, std::move(spaces) }.insert("\t"_str, InsertMode::Replace); 6011: } 6011: 6011: SelectionList read_selections_from_register(char reg, Context& context) 6011: { 6011: if (not is_basic_alpha(reg) and reg != '^') 6011: throw runtime_error("selections can only be saved to the '^' and alphabetic registers"); 6011: 6011: auto content = RegisterManager::instance()[reg].values(context); 6011: 6011: if (content.size() != 1) 6011: throw runtime_error(format("Register {} does not contain a selections desc", reg)); 6011: 6011: StringView desc = content[0]; 6011: auto arobase = find(desc, '@'); 6011: auto percent = find(desc, '%'); 6011: 6011: if (arobase == desc.end() or percent == desc.end()) 6011: throw runtime_error(format("Register {} does not contain a selections desc", reg)); 6011: 6011: Buffer& buffer = BufferManager::instance().get_buffer({arobase+1, percent}); 6011: size_t timestamp = str_to_int({percent + 1, desc.end()}); 6011: 6011: Vector sels; 6011: for (auto sel_desc : StringView{desc.begin(), arobase} | split(':')) 6011: sels.push_back(selection_from_string(sel_desc)); 6011: 6011: return {buffer, std::move(sels), timestamp}; 6011: } 6011: 6011: template 6011: void save_selections(Context& context, NormalParams params) 6011: { 6011: const char reg = to_lower(params.reg ? params.reg : '^'); 6011: if (not is_basic_alpha(reg) and reg != '^') 6011: throw runtime_error("selections can only be saved to the '^' and alphabetic registers"); 6011: 6011: auto gen_desc = [&] { 6011: if (not add) 6011: return selection_list_to_string(context.selections()); 6011: 6011: auto selections = read_selections_from_register(reg, context); 6011: if (&selections.buffer() != &context.buffer()) 6011: throw runtime_error("cannot save selections from different buffers in the same register"); 6011: selections.update(); 6011: 6011: for (auto& sel : context.selections()) 6011: selections.push_back(sel); 6011: selections.sort_and_merge_overlapping(); 6011: return selection_list_to_string(selections); 6011: }; 6011: 6011: String desc = format("{}@{}%{}", gen_desc(), 6011: context.buffer().name(), 6011: context.buffer().timestamp()); 6011: 6011: RegisterManager::instance()[reg] = desc; 6011: 6011: context.print_status({format("{} selections to register '{}'", add ? "Added" : "Saved", reg), get_face("Information")}); 6011: } 6011: 6011: template 6011: void restore_selections(Context& context, NormalParams params) 6011: { 6011: const char reg = to_lower(params.reg ? params.reg : '^'); 6011: auto selections = read_selections_from_register(reg, context); 6011: 6011: if (not add) 6011: { 6011: if (&selections.buffer() != &context.buffer()) 6011: context.change_buffer(selections.buffer()); 6011: } 6011: else 6011: { 6011: if (&selections.buffer() != &context.buffer()) 6011: throw runtime_error("Cannot add selections from another buffer"); 6011: 6011: selections.update(); 6011: int main_index = selections.size() + context.selections_write_only().main_index(); 6011: for (auto& sel : context.selections()) 6011: selections.push_back(std::move(sel)); 6011: 6011: selections.set_main_index(main_index); 6011: selections.sort_and_merge_overlapping(); 6011: } 6011: 6011: context.selections_write_only() = std::move(selections); 6011: context.print_status({format("{} selections from register '{}'", add ? "Added" : "Restored", reg), get_face("Information")}); 6011: } 6011: 6011: void undo(Context& context, NormalParams params) 6011: { 6011: Buffer& buffer = context.buffer(); 6011: size_t timestamp = buffer.timestamp(); 6011: if (buffer.undo(std::max(1, params.count))) 6011: { 6011: auto ranges = compute_modified_ranges(buffer, timestamp); 6011: if (not ranges.empty()) 6011: context.selections_write_only() = std::move(ranges); 6011: } 6011: else 6011: context.print_status({ "nothing left to undo", get_face("Information") }); 6011: } 6011: 6011: void redo(Context& context, NormalParams params) 6011: { 6011: Buffer& buffer = context.buffer(); 6011: size_t timestamp = buffer.timestamp(); 6011: if (buffer.redo(std::max(1, params.count))) 6011: { 6011: auto ranges = compute_modified_ranges(buffer, timestamp); 6011: if (not ranges.empty()) 6011: context.selections_write_only() = std::move(ranges); 6011: } 6011: else 6011: context.print_status({ "nothing left to redo", get_face("Information") }); 6011: } 6011: 6011: template 6011: void move_in_history(Context& context, NormalParams params) 6011: { 6011: Buffer& buffer = context.buffer(); 6011: size_t timestamp = buffer.timestamp(); 6011: const int count = std::max(1, params.count); 6011: const int history_id = (int)buffer.current_history_id() + 6011: (direction == Direction::Forward ? count : -count); 6011: if (buffer.move_to((size_t)history_id)) 6011: { 6011: auto ranges = compute_modified_ranges(buffer, timestamp); 6011: if (not ranges.empty()) 6011: context.selections_write_only() = std::move(ranges); 6011: context.selections().avoid_eol(); 6011: 6011: context.print_status({ format("moved to change #{}", history_id), 6011: get_face("Information") }); 6011: } 6011: else 6011: context.print_status({ format("no such change: #{}", history_id), 6011: get_face("Information") }); 6011: } 6011: 6011: void exec_user_mappings(Context& context, NormalParams params) 6011: { 6011: on_next_key_with_autoinfo(context, KeymapMode::None, 6011: [params](Key key, Context& context) mutable { 6011: if (not context.keymaps().is_mapped(key, KeymapMode::User)) 6011: return; 6011: 6011: auto mapping = context.keymaps().get_mapping(key, KeymapMode::User); 6011: ScopedSetBool disable_keymaps(context.keymaps_disabled()); 6011: 6011: InputHandler::ScopedForceNormal force_normal{context.input_handler(), params}; 6011: 6011: ScopedEdition edition(context); 6011: for (auto& key : mapping) 6011: context.input_handler().handle_key(key); 6011: }, "user mapping", "enter user key"); 6011: } 6011: 6011: template 6011: class Repeated 6011: { 6011: public: 6011: constexpr Repeated(T t) : m_func(t) {} 6011: 6011: void operator() (Context& context, NormalParams params) 6011: { 6011: ScopedEdition edition(context); 6011: do { m_func(context, {0, params.reg}); } while(--params.count > 0); 6011: } 6011: private: 6011: T m_func; 6011: }; 6011: 6011: template 6011: void repeated(Context& context, NormalParams params) 6011: { 6011: ScopedEdition edition(context); 6011: do { func(context, {0, params.reg}); } while(--params.count > 0); 6011: } 6011: 6011: template 6011: void move(Context& context, NormalParams params) 6011: { 6011: 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"); 6011: Type offset(std::max(params.count,1)); 6011: if (direction == Backward) 6011: offset = -offset; 6011: auto& selections = context.selections(); 6011: for (auto& sel : selections) 6011: { 6011: auto cursor = context.has_window() ? context.window().offset_coord(sel.cursor(), offset) 6011: : context.buffer().offset_coord(sel.cursor(), offset); 6011: 6011: sel.anchor() = mode == SelectMode::Extend ? sel.anchor() : cursor; 6011: sel.cursor() = cursor; 6011: } 6011: selections.sort(); 6011: 6011: if (std::is_same::value) 6011: selections.avoid_eol(); 6011: 6011: selections.merge_overlapping(); 6011: } 6011: 6011: void select_whole_buffer(Context& context, NormalParams) 6011: { 6011: select_buffer(context.selections()); 6011: } 6011: 6011: void keep_selection(Context& context, NormalParams p) 6011: { 6011: auto& selections = context.selections(); 6011: const int index = p.count ? p.count-1 : selections.main_index(); 6011: if (index < selections.size()) 6011: selections = SelectionList{ selections.buffer(), std::move(selections[index]) }; 6011: selections.check_invariant(); 6011: } 6011: 6011: void remove_selection(Context& context, NormalParams p) 6011: { 6011: auto& selections = context.selections(); 6011: const int index = p.count ? p.count-1 : selections.main_index(); 6011: if (selections.size() > 1 and index < selections.size()) 6011: { 6011: selections.remove(index); 6011: size_t main_index = selections.main_index(); 6011: if (index < main_index or main_index == selections.size()) 6011: selections.set_main_index(main_index - 1); 6011: } 6011: selections.check_invariant(); 6011: } 6011: 6011: void clear_selections(Context& context, NormalParams) 6011: { 6011: for (auto& sel : context.selections()) 6011: sel.anchor() = sel.cursor(); 6011: } 6011: 6011: void flip_selections(Context& context, NormalParams) 6011: { 6011: for (auto& sel : context.selections()) 6011: { 6011: const BufferCoord tmp = sel.anchor(); 6011: sel.anchor() = sel.cursor(); 6011: sel.cursor() = tmp; 6011: } 6011: context.selections().check_invariant(); 6011: } 6011: 6011: void ensure_forward(Context& context, NormalParams) 6011: { 6011: for (auto& sel : context.selections()) 6011: { 6011: const BufferCoord min = sel.min(), max = sel.max(); 6011: sel.anchor() = min; 6011: sel.cursor() = max; 6011: } 6011: context.selections().check_invariant(); 6011: } 6011: 6011: void merge_consecutive(Context& context, NormalParams params) 6011: { 6011: ensure_forward(context, params); 6011: context.selections().merge_consecutive(); 6011: } 6011: 6011: void force_redraw(Context& context, NormalParams) 6011: { 6011: if (context.has_client()) 6011: { 6011: context.client().force_redraw(); 6011: context.client().redraw_ifn(); 6011: } 6011: } 6011: 6011: static NormalCmdDesc cmds[] = 6011: { 6011: { 'h', "move left", move }, 6011: { 'j', "move down", move }, 6011: { 'k', "move up", move }, 6011: { 'l', "move right", move }, 6011: 6011: { 'H', "extend left", move }, 6011: { 'J', "extend down", move }, 6011: { 'K', "extend up", move }, 6011: { 'L', "extend right", move }, 6011: 6011: { 't', "select to next character", select_to_next_char }, 6011: { 'f', "select to next character included", select_to_next_char }, 6011: { 'T', "extend to next character", select_to_next_char }, 6011: { 'F', "extend to next character included", select_to_next_char }, 6011: { alt('t'), "select to previous character", select_to_next_char }, 6011: { alt('f'), "select to previous character included", select_to_next_char }, 6011: { alt('T'), "extend to previous character", select_to_next_char }, 6011: { alt('F'), "extend to previous character included", select_to_next_char }, 6011: 6011: { 'd', "erase selected text", erase_selections }, 6011: { 'c', "change selected text", change }, 6011: { 'i', "insert before selected text", enter_insert_mode }, 6011: { 'I', "insert at the start of the line", enter_insert_mode }, 6011: { 'a', "insert after selected text", enter_insert_mode }, 6011: { 'A', "insert at the end of the line", enter_insert_mode }, 6011: { 'o', "insert on a new line below", enter_insert_mode }, 6011: { 'O', "insert on a new line above", enter_insert_mode }, 6011: { 'r', "replace with character", replace_with_char }, 6011: 6011: { 'g', "go to location", goto_commands }, 6011: { 'G', "extend to location", goto_commands }, 6011: 6011: { 'v', "move view", view_commands }, 6011: { 'V', "move view (locked)", view_commands }, 6011: 6011: { 'y', "yank selected text", yank }, 6011: { 'p', "paste after selected text", repeated> }, 6011: { 'P', "paste before selected text", repeated> }, 6011: { alt('p'), "paste every yanked selection after selected text", paste_all }, 6011: { alt('P'), "paste every yanked selection before selected text", paste_all }, 6011: { 'R', "replace selected text with yanked text", paste }, 6011: { alt('R'), "replace selected text with yanked text", paste_all }, 6011: 6011: { 's', "select regex matches in selected text", select_regex }, 6011: { 'S', "split selected text on regex matches", split_regex }, 6011: { alt('s'), "split selected text on line ends", split_lines }, 6011: 6011: { '.', "repeat last insert command", repeat_last_insert }, 6011: { alt('.'), "repeat last object select/character find", repeat_last_select }, 6011: 6011: { '%', "select whole buffer", select_whole_buffer }, 6011: 6011: { ':', "enter command prompt", command }, 6011: { '|', "pipe each selection through filter and replace with output", pipe }, 6011: { alt('|'), "pipe each selection through command and ignore output", pipe }, 6011: { '!', "insert command output", insert_output }, 6011: { alt('!'), "append command output", insert_output }, 6011: 6011: { ' ', "remove all selection except main", keep_selection }, 6011: { alt(' '), "remove main selection", remove_selection }, 6011: { ';', "reduce selections to their cursor", clear_selections }, 6011: { alt(';'), "swap selections cursor and anchor", flip_selections }, 6011: { alt(':'), "ensure selection cursor is after anchor", ensure_forward }, 6011: { alt('m'), "merge consecutive selections", merge_consecutive }, 6011: 6011: { 'w', "select to next word start", repeated<&select>> }, 6011: { 'e', "select to next word end", repeated>> }, 6011: { 'b', "select to previous word start", repeated>> }, 6011: { 'W', "extend to next word start", repeated>> }, 6011: { 'E', "extend to next word end", repeated>> }, 6011: { 'B', "extend to previous word start", repeated>> }, 6011: 6011: { alt('w'), "select to next WORD start", repeated>> }, 6011: { alt('e'), "select to next WORD end", repeated>> }, 6011: { alt('b'), "select to previous WORD start", repeated>> }, 6011: { alt('W'), "extend to next WORD start", repeated>> }, 6011: { alt('E'), "extend to next WORD end", repeated>> }, 6011: { alt('B'), "extend to previous WORD start", repeated>> }, 6011: 6011: { alt('l'), "select to the end of the line", repeated>> }, 6011: { Key::End, "select to the end of the line", repeated>> }, 6011: { alt('L'), "extend to the end of the line", repeated>> }, 6011: { alt('h'), "select to the start of the line", repeated>> }, 6011: { Key::Home, "select to the start of the line", repeated>> }, 6011: { alt('H'), "extend to the start of the line", repeated>> }, 6011: 6011: { 'x', "select line", repeated> }, 6011: { 'X', "extend line", repeated> }, 6011: { alt('x'), "extend selections to whole lines", select }, 6011: { alt('X'), "crop selections to whole lines", select }, 6011: 6011: { 'm', "select to matching character", select }, 6011: { 'M', "extend to matching character", select }, 6011: 6011: { '/', "select next given regex match", search }, 6011: { '?', "extend with next given regex match", search }, 6011: { alt('/'), "select previous given regex match", search }, 6011: { alt('?'), "extend with previous given regex match", search }, 6011: { 'n', "select next current search pattern match", search_next }, 6011: { 'N', "extend with next current search pattern match", search_next }, 6011: { alt('n'), "select previous current search pattern match", search_next }, 6011: { alt('N'), "extend with previous current search pattern match", search_next }, 6011: { '*', "set search pattern to main selection content", use_selection_as_search_pattern }, 6011: { alt('*'), "set search pattern to main selection content, do not detect words", use_selection_as_search_pattern }, 6011: 6011: { 'u', "undo", undo }, 6011: { 'U', "redo", redo }, 6011: { alt('u'), "move backward in history", move_in_history }, 6011: { alt('U'), "move forward in history", move_in_history }, 6011: 6011: { alt('i'), "select inner object", select_object }, 6011: { alt('a'), "select whole object", select_object }, 6011: { '[', "select to object start", select_object }, 6011: { ']', "select to object end", select_object }, 6011: { '{', "extend to object start", select_object }, 6011: { '}', "extend to object end", select_object }, 6011: { alt('['), "select to inner object start", select_object }, 6011: { alt(']'), "select to inner object end", select_object }, 6011: { alt('{'), "extend to inner object start", select_object }, 6011: { alt('}'), "extend to inner object end", select_object }, 6011: 6011: { alt('j'), "join lines", join_lines }, 6011: { alt('J'), "join lines and select spaces", join_lines_select_spaces }, 6011: 6011: { alt('k'), "keep selections matching given regex", keep }, 6011: { alt('K'), "keep selections not matching given regex", keep }, 6011: { '$', "pipe each selection through shell command and keep the ones whose command succeed", keep_pipe }, 6011: 6011: { '<', "deindent", deindent }, 6011: { '>', "indent", indent }, 6011: { alt('>'), "indent, including empty lines", indent }, 6011: { alt('<'), "deindent, not including incomplete indent", deindent }, 6011: 6011: { Key::Tab, "jump forward in jump list",jump }, 6011: { ctrl('o'), "jump backward in jump list", jump }, 6011: { ctrl('s'), "push current selections in jump list", push_selections }, 6011: 6011: { '\'', "rotate main selection", rotate_selections }, 6011: { alt('\''), "rotate selections content", rotate_selections_content }, 6011: 6011: { 'q', "replay recorded macro", replay_macro }, 6011: { 'Q', "start or end macro recording", start_or_end_macro_recording }, 6011: 6011: { Key::Escape, "end macro recording", end_macro_recording }, 6011: 6011: { '`', "convert to lower case in selections", for_each_codepoint }, 6011: { '~', "convert to upper case in selections", for_each_codepoint }, 6011: { alt('`'), "swap case in selections", for_each_codepoint }, 6011: 6011: { '&', "align selection cursors", align }, 6011: { alt('&'), "copy indentation", copy_indent }, 6011: 6011: { '@', "convert tabs to spaces in selections", tabs_to_spaces }, 6011: { alt('@'), "convert spaces to tabs in selections", spaces_to_tabs }, 6011: 6011: { 'C', "copy selection on next lines", copy_selections_on_next_lines }, 6011: { alt('C'), "copy selection on previous lines", copy_selections_on_next_lines }, 6011: 6011: { ',', "user mappings", exec_user_mappings }, 6011: 6011: { Key::Left, "move left", move }, 6011: { Key::Down, "move down", move }, 6011: { Key::Up, "move up", move }, 6011: { Key::Right, "move right", move }, 6011: 6011: { ctrl('b'), "scroll one page up", scroll }, 6011: { ctrl('f'), "scroll one page down", scroll }, 6011: { ctrl('u'), "scroll half a page up", scroll }, 6011: { ctrl('d'), "scroll half a page down", scroll }, 6011: 6011: { Key::PageUp, "scroll one page up", scroll }, 6011: { Key::PageDown, "scroll one page down", scroll }, 6011: 6011: { 'z', "restore selections from register", restore_selections }, 6011: { alt('z'), "append selections from register", restore_selections }, 6011: { 'Z', "save selections to register", save_selections }, 6011: { alt('Z'), "append selections to register", save_selections }, 6011: 6011: { ctrl('l'), "force redraw", force_redraw }, 6011: }; 6011: 6011: KeyMap keymap = cmds; 6011: 6011: } === END GCC DUMP === Makefile:76: recipe for target '.normal.debug.o' failed make[1]: *** [.normal.debug.o] Error 1 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-1102 Finished -------- E: Build failure (dpkg-buildpackage died) +------------------------------------------------------------------------------+ | Cleanup | +------------------------------------------------------------------------------+ Purging /<> Not removing build depends: as requested +------------------------------------------------------------------------------+ | Summary | +------------------------------------------------------------------------------+ Build Architecture: armhf Build-Space: 67272 Build-Time: 162 Distribution: bionic Fail-Stage: build Host Architecture: armhf Install-Time: 47 Job: kakoune_0~2016.12.20.1.3a6167ae-1build1.dsc Machine Architecture: arm64 Package: kakoune Package-Time: 210 Source-Version: 0~2016.12.20.1.3a6167ae-1build1 Space: 67272 Status: attempted Version: 0~2016.12.20.1.3a6167ae-1build1 -------------------------------------------------------------------------------- Finished at 20180115-1102 Build needed 00:03:30, 67272k disc space RUN: /usr/share/launchpad-buildd/slavebin/in-target scan-for-processes --backend=chroot --series=bionic --arch=armhf PACKAGEBUILD-14111326 Scanning for processes to kill in build PACKAGEBUILD-14111326 RUN: /usr/share/launchpad-buildd/slavebin/in-target umount-chroot --backend=chroot --series=bionic --arch=armhf PACKAGEBUILD-14111326 Stopping target for build PACKAGEBUILD-14111326 RUN: /usr/share/launchpad-buildd/slavebin/in-target remove-build --backend=chroot --series=bionic --arch=armhf PACKAGEBUILD-14111326 Removing build PACKAGEBUILD-14111326